/*
╔══════════════════════════════════════════════════════════════════════════════╗
║  PLUGIN:   SLIDER REVOLUTION 7                                                ║
║  MODULE:   PAGE EFFECTS  —  editor shell + registry (core)                    ║
║  AUTHOR:   ThemePunch                                                         ║
╚══════════════════════════════════════════════════════════════════════════════╝

  Provides: the generic "page effect" Gutenberg block, the on-page Recorder shell, the shared responsive
  engine, the skin (--pe-* tokens) and the device switcher. Each addon registers
  SR7.PE.registerType(type, { card?, tool }); the tool owns its panel UI, its iframe overlay and
  load()/collect(). Save and load go through the framework AJAX (sr7_pe_*).

  @copyright 2026 ThemePunch
*/
(()=>{"use strict";window.SR7??={},SR7.PE??={},SR7.PE.types??={},window.SR7PELang&&(SR7.LANG=Object.assign({},SR7.LANG||{},window.SR7PELang)),SR7.t??=(e,...t)=>{const r=SR7.LANG,n=r&&null!=r[e]?r[e]:e;return t.length?String(n).replace(/%s/g,()=>t.shift()):n};const e=window.SR7PECfg||{types:{}};SR7.PE.registerType=(e,t)=>{SR7.PE.types[e]=t||{}},SR7.PE.claims??={},SR7.PE.registerClaim=(e,t)=>{if(!t||!t.attr)return;const r=t.takes||("descendants"===t.scope?"media-tree":"media");SR7.PE.claims[e]=Object.assign({type:e,scope:"self"},t,{takes:r})},Object.keys(e.types||{}).forEach(t=>{const r=e.types[t];r&&r.claim&&SR7.PE.registerClaim(t,Object.assign({label:r.title||t,takes:r.takes||null},r.claim))}),SR7.PE.actions??={},SR7.PE.registerAction=(e,t)=>{t&&(SR7.PE.actions[e]=Object.assign({type:e},t))};const t={};SR7.PE.setOpener=(e,r,n)=>{e&&(t[e]??={},n?t[e][r]=n:delete t[e][r])};const r=(e,t)=>{const r=t.hosts||[];if(t.selfBlock&&e.name===t.selfBlock)return{id:e.clientId,on:!0,self:!0};if(-1!==r.indexOf(e.name))return{id:e.clientId,on:!!((e.attributes||{})[t.attr]||{}).enabled};if(!t.ancestor||-1===(t.ancestorFor||[]).indexOf(e.name))return null;const n=window.wp&&wp.data&&wp.data.select&&wp.data.select("core/block-editor");if(!n||!n.getBlockParents)return null;const o=n.getBlockParents(e.clientId)||[];for(let e=o.length-1;e>=0;e--){const s=o[e];if(-1!==r.indexOf(n.getBlockName?n.getBlockName(s):""))return{id:s,viaHost:!0,on:!!((n.getBlockAttributes(s)||{})[t.attr]||{}).enabled}}return null},n=(e,r)=>{const n=window.wp&&wp.data&&wp.data.dispatch&&wp.data.dispatch("core/block-editor");r.viaHost&&n&&n.selectBlock&&n.selectBlock(r.id);let o=0;const s=()=>{const n=(t[r.id]||{})[e.type];if(n)return n();o++<60&&setTimeout(s,16)};s()},o=e=>{const t=[];for(const r in SR7.PE.actions){const n=SR7.PE.actions[r];-1!==(n.hosts||[]).indexOf(e.name)&&(((e.attributes||{})[n.attr]||{}).enabled&&t.push(n))}return t},s=wp.compose.createHigherOrderComponent(e=>t=>{const s=wp.element.createElement,a=wp.blockEditor.BlockControls,i=wp.components.ToolbarGroup,p=wp.blockEditor.ToolbarDropdownMenu||wp.components.DropdownMenu,l=wp.element.useRef(),[c,d]=wp.element.useState(null),m=o(t);wp.element.useEffect(()=>{if(!m.length||!l.current)return void(c&&d(null));const e=l.current.ownerDocument,r=e&&e.querySelector('[data-block="'+t.clientId+'"]');r&&r.isContentEditable?c&&d(null):r&&r!==c&&d(r)});const u=[];for(const e in SR7.PE.actions){const n=SR7.PE.actions[e],o=r(t,n);o&&u.push({a:n,hit:o})}const g=u.map(({a:e,hit:r})=>{const o=r.on||r.self||!SR7.PE.claimedBy?null:SR7.PE.claimedBy({attributes:t.attributes,clientId:t.clientId},e.type);return{title:s("span",{className:"sr7pe-mi"},s("span",{className:"sr7pe-mi-txt"},s("span",{className:"sr7pe-mi-name"},e.title),o?s("span",{className:"sr7pe-mi-why"},(a=o,SR7.t("Blocked by %s",a.label||a.type))):null),r.on&&!r.self?s("span",{className:"sr7pe-mi-on",title:SR7.t("On")},s("svg",{width:12,height:12,viewBox:"0 0 12 12","aria-hidden":!0},s("path",{d:"M2.5 6.3l2.4 2.4 4.6-5",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"}))):null),icon:e.icon||null,isDisabled:!!o,onClick:()=>{o||n(e,r)}};var a});(()=>{if(document.getElementById("sr7pe-menu-css"))return;SR7.PE.resolveSkin();const e="#5c24ff",t=SR7.PE.skin,r=document.createElement("style");r.id="sr7pe-menu-css";const n=[".sr7pe-tbmenu-pop .components-popover__content .components-button.components-dropdown-menu__menu-item",".sr7pe-tbmenu-pop .components-popover__content .components-button.components-menu-item__button"],o=e=>n.map(t=>t+e).join(","),s=t=>"color-mix(in srgb,"+e+" "+t+"%,transparent)";var a;r.textContent=".sr7pe-tbmenu-pop .components-dropdown-menu__menu,.sr7pe-tbmenu-pop .components-menu-group{padding:0}.sr7pe-tbmenu-pop .components-popover__content{overflow:hidden;padding:0}.sr7pe-own-block .block-editor-block-switcher{display:none}"+o("")+"{width:100%;height:auto;min-height:0;border-radius:0;padding:10px 20px;gap:15px;color:"+t.text+"}"+o((a="")+">svg")+","+o(a+">.dashicon")+","+o(a+">.dashicons")+"{flex:0 0 20px;width:20px;height:20px;font-size:20px;line-height:20px}"+o(":has(.sr7pe-mi-on)")+"{background:"+s(7)+"}"+o(":has(.sr7pe-mi-on):hover")+"{background:"+s(13)+"}.sr7pe-tbmenu-pop .components-menu-item__item{min-width:0;margin-right:0}"+o(":focus")+"{box-shadow:none;outline:none}"+o(':hover:not(:disabled):not([aria-disabled="true"])')+"{background:"+s(8)+"}"+o(":focus-visible")+"{background:"+s(14)+"}"+o(":disabled")+","+o('[aria-disabled="true"]')+"{opacity:.6;color:"+t.textDim+"}.sr7pe-tbmenu-pop .sr7pe-mi{display:flex;align-items:center;gap:12px;width:100%;min-width:0}.sr7pe-tbmenu-pop .sr7pe-mi-txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px;text-align:left}.sr7pe-tbmenu-pop .sr7pe-mi-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.3}.sr7pe-tbmenu-pop .sr7pe-mi-why{font-size:11px;line-height:1.3;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sr7pe-tbmenu-pop .sr7pe-mi-on{flex:0 0 20px;width:20px;height:20px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:"+s(14)+";color:"+e+"}.sr7pe-tbmenu-pop .sr7pe-mi-on svg{display:block}",document.head.appendChild(r)})();const f=1===u.length&&u[0].hit.self?u[0]:null;wp.element.useEffect(()=>{if(f&&t.isSelected)return document.body.classList.add("sr7pe-own-block"),()=>document.body.classList.remove("sr7pe-own-block")},[!!f,t.isSelected]);const h=!f&&u.length&&a?s(a,{key:"sr7pe-menu"},s(i,null,s(p,{className:"sr7pe-tbmenu",popoverProps:{className:"sr7pe-tbmenu-pop"},icon:SR7.PE.fxToolbarIcon,label:SR7.t("Page FX"),controls:g}))):null,x=s("button",{type:"button",className:"sr7pe-badge",title:u.length>1?SR7.t("Choose which effect to open"):SR7.t("Open %s settings",((u[0]||{}).a||{}).title||""),onMouseDown:e=>e.stopPropagation(),onClick:e=>{e.preventDefault(),e.stopPropagation();const r=window.wp&&wp.data&&wp.data.dispatch&&wp.data.dispatch("core/block-editor");if(r&&r.selectBlock&&r.selectBlock(t.clientId),1===u.length)return void n(u[0].a,u[0].hit);let o=0;const s=()=>{const e=document.querySelector(".sr7pe-tbmenu button");if(e)return e.click();o++<60&&window.setTimeout(s,16)};s()}},SR7.PE.fxBadge(40)),b=m.length?s("span",{ref:l,key:"sr7pe-anchor",style:{display:"none"}}):null,v=m.length&&c?wp.element.createPortal(x,c):null;return h||v?s(wp.element.Fragment,null,s(e,t),b,v,h):s(e,t)},"withSr7PageEffectsMenu"),a=wp.compose.createHigherOrderComponent(e=>t=>{const r=wp.element.createElement;return o(t).length?r(e,Object.assign({},t,{className:((t.className||"")+" has-sr7-pe").trim()})):r(e,t)},"withSr7PageEffectsBadgedBlock");SR7.PE.mountToolbarMenu=()=>{!SR7.PE._menuOn&&window.wp&&wp.hooks&&wp.compose&&(SR7.PE._menuOn=!0,wp.hooks.addFilter("editor.BlockEdit","sr7/pe-toolbar-menu",s),wp.hooks.addFilter("editor.BlockListBlock","sr7/pe-block-badge",a))};const i=(e,t)=>e===t||"media"===e&&"media-tree"===t||"media-tree"===e&&"media"===t;SR7.PE.takes=e=>(SR7.PE.claims[e]||{}).takes||"media",SR7.PE.claimedBy=(e,t)=>{const r=SR7.PE.takes(t),n=e&&e.attributes||{};for(const e in SR7.PE.claims){if(e===t)continue;const o=SR7.PE.claims[e];if(n[o.attr]&&n[o.attr].enabled&&i(r,o.takes||"media"))return o}const o=window.wp&&wp.data&&wp.data.select&&wp.data.select("core/block-editor");if(!(o&&o.getBlockParents&&e&&e.clientId))return null;for(const t of o.getBlockParents(e.clientId)){const e=o.getBlockAttributes(t)||{};for(const t in SR7.PE.claims){const r=SR7.PE.claims[t];if("media-tree"===(r.takes||"media")&&e[r.attr]&&e[r.attr].enabled)return r}}return null},SR7.PE.claimsBelow=(e,t)=>{const r=[];if("media-tree"!==SR7.PE.takes(t))return r;const n=window.wp&&wp.data&&wp.data.select&&wp.data.select("core/block-editor");if(!(n&&n.getClientIdsOfDescendants&&e&&e.clientId))return r;for(const o of n.getClientIdsOfDescendants([e.clientId])||[]){const e=n.getBlockAttributes(o)||{};for(const n in SR7.PE.claims){if(n===t)continue;const s=SR7.PE.claims[n];e[s.attr]&&e[s.attr].enabled&&r.push({clientId:o,claim:s})}}return r},SR7.PE.takeOverBelow=(e,t)=>{const r=SR7.PE.claimsBelow(e,t);if(!r.length)return r;const n=window.wp&&wp.data&&wp.data.dispatch,o=n&&n("core/block-editor");if(!o||!o.updateBlockAttributes)return[];const s=[];for(const e of r){const t=(wp.data.select("core/block-editor").getBlockAttributes(e.clientId)||{})[e.claim.attr]||{};o.updateBlockAttributes(e.clientId,{[e.claim.attr]:Object.assign({},t,{enabled:!1})});const r=e.claim.label||e.claim.type;-1===s.indexOf(r)&&s.push(r)}const a=(SR7.PE.claims[t]||{}).label||t,i=1===r.length?SR7.t("%s was switched off on one image — a %s takes over every picture below it.",s.join(", "),a):SR7.t("%s was switched off on %s images — a %s takes over every picture below it.",s.join(", "),String(r.length),a),p=n&&n("core/notices");return p&&p.createNotice&&p.createNotice("info",i,{type:"snackbar",isDismissible:!0}),r},SR7.PE.devices??=window.SR7&&SR7.D&&Array.isArray(SR7.D.devices)?SR7.D.devices:["wdesktop","desktop","notebook","tablet","mobile"],SR7.PE.deviceWidths??=[1600,1240,1024,778,480],SR7.PE.deviceLabels??=["Wide","Desktop","Notebook","Tablet","Mobile"],SR7.PE.levelForWidth??=e=>{const t=SR7.PE.deviceWidths;for(let r=t.length-1;r>=0;r--)if(e<=t[r])return r;return 0},SR7.PE.lev??=(e,t)=>{if(!Array.isArray(e))return e;let r=e[t];if(null!=r&&"#a"!==r&&""!==r)return r;for(let n=t-1;n>=0;n--)if(r=e[n],null!=r&&"#a"!==r&&""!==r)return r;for(let n=t+1;n<5;n++)if(r=e[n],null!=r&&"#a"!==r&&""!==r)return r;return 0},SR7.PE.setLev=(e,t,r,n)=>{let o=e[t];return Array.isArray(o)||(o=[null==o?"#a":o,"#a","#a","#a","#a"],e[t]=o),o[r]=n,o},SR7.PE.tokenMap??={bg:["--sr-col-w11-d3","#f5f5f5"],surface:["--sr-col-w12-d1","#ffffff"],surface2:["--sr-col-w12-d4","#F9F9F9"],surface3:["--sr-col-w10-d4","#f0f0f1"],border:["--sr-col-w6-d1","#dddddd"],border2:["--sr-col-w6-d0","#cccccc"],text:["--sr-col-w0-d0","#1a1a1a"],text2:["--sr-col-w2-d1","#555555"],textDim:["--sr-col-w3-d0","#777777"],accent:["--sr-col-b0","#309BFF"],accentStrong:["--sr-col-b-ctrl","#5597FC"],accentText:["--sr-col-w12","#FFFFFF"],accentBg:["--sr-col-b4-d0","#EAF5FF"],good:["--sr-col-g0-d0","#25C196"],warn:["--sr-col-o0-d0","#FF8D1C"],danger:["--sr-col-r1","#F36559"],stage:["--sr-col-w9-d0","#eeeeee"],dropSel:["--sr-col-b3-d1","#D6EBFF"],shadow:["--sr-bs-1","0 10px 30px rgba(0,0,0,.35)"],radius:["--sr-border-radius","10px"],radiusS:["--sr-border-radius-s","4px"]},SR7.PE.fontFallback??="-apple-system, BlinkMacSystemFont, system-ui, sans-serif";const p=e=>{const t=SR7.PE.tokenMap[e];return"var("+t[0]+","+t[1]+")"};SR7.PE.resolveSkin=()=>{const e=document.body||document.documentElement,t=document.createElement("span");t.style.cssText="position:absolute;width:0;height:0;opacity:0;pointer-events:none",e.appendChild(t);const r=getComputedStyle(t),n={};for(const e in SR7.PE.tokenMap){const t=SR7.PE.tokenMap[e];n[e]=(r.getPropertyValue(t[0])||"").trim()||t[1]}const o=(r.getPropertyValue("--sr-font-family")||"").trim();return n.font=(o?o+", ":"'Inter', ")+SR7.PE.fontFallback,t.remove(),SR7.PE.skin=n},SR7.PE.resolveSkin(),SR7.PE.injectSkin=()=>{SR7.PE.resolveSkin();let e="--pe-font:var(--sr-font-family,'Inter'),"+SR7.PE.fontFallback+";";for(const t in SR7.PE.tokenMap)e+="--pe-"+t.replace(/[A-Z0-9]/g,e=>"-"+e.toLowerCase())+":"+p(t)+";";let t=document.getElementById("sr7pe-skin-vars");if(t||(t=document.createElement("style"),t.id="sr7pe-skin-vars",document.head.appendChild(t)),t.textContent=":root,body{"+e+"}",document.getElementById("sr7pe-skin"))return;const r=document.createElement("style");r.id="sr7pe-skin",r.textContent=".sr7pe-overlay{position:fixed;inset:0;z-index:100000;display:flex;flex-direction:column;background:var(--pe-bg);font-family:var(--pe-font);-webkit-font-smoothing:antialiased}.sr7pe-bar{box-sizing:border-box;flex:0 0 52px;display:flex;align-items:center;gap:12px;padding:0 16px;background:var(--pe-surface);border-bottom:1px solid var(--pe-border);color:var(--pe-text);position:relative}.sr7pe-brand{display:flex;align-items:center;gap:9px;font-size:14px;font-weight:600;color:var(--pe-text)}.sr7pe-logo{display:flex;flex:0 0 auto}.sr7pe-logo svg,.sr7pe-logo img{display:block;width:32px;height:32px}.sr7pe-brand em{font-style:normal;color:var(--pe-text-dim);font-weight:400}.sr7pe-devices{display:flex;align-items:center;gap:2px;background:none;border:0;border-radius:0;padding:0;box-shadow:none}.sr7pe-device{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border:0;background:transparent;border-radius:var(--pe-radius-s);box-shadow:none;color:var(--pe-text-2);cursor:pointer;padding:0;transition:color .12s,background .12s}.sr7pe-device:hover{background:var(--pe-surface-3);color:var(--pe-text)}.sr7pe-device.sr7pe-device--active{background:var(--pe-accent-bg);color:var(--pe-accent)}.sr7pe-device svg{display:block;pointer-events:none}.sr7pe-divider{flex:0 0 1px;width:1px;height:24px;background:var(--pe-border);margin:0}.sr7pe-actions{display:flex;align-items:center;gap:4px}.sr7pe-spacer{flex:1}.sr7pe-icobtn{display:inline-flex;align-items:center;justify-content:center;gap:7px;flex:0 0 auto;width:34px;height:34px;padding:0;border:0;border-radius:var(--pe-radius-s);background:transparent;color:var(--pe-text-2);cursor:pointer;transition:.12s}.sr7pe-icobtn svg{display:block;flex:0 0 auto}.sr7pe-icobtn:hover{background:var(--pe-surface-3);color:var(--pe-text)}.sr7pe-icobtn--wide{width:auto;padding:0 11px;font:700 12.5px var(--pe-font);color:var(--pe-text)}.sr7pe-icobtn--primary{width:auto;padding:0 14px;background:var(--pe-accent);color:var(--pe-accent-text)}.sr7pe-icobtn--primary:hover{background:var(--pe-accent-strong);color:#fff}.sr7pe-icobtn.sr7pe-btn--saved,.sr7pe-icobtn.sr7pe-btn--saved:hover{background:var(--pe-good);color:#fff}.sr7pe-more .sr7pe-icobtn.open{background:var(--pe-surface-3);color:var(--pe-text)}.sr7pe-btn{background:var(--pe-surface-2);color:var(--pe-text);border:1px solid var(--pe-border-2);border-radius:var(--pe-radius-s);padding:7px 15px;font:500 13px var(--pe-font);cursor:pointer;transition:.13s}.sr7pe-btn:hover{border-color:var(--pe-text-dim);color:var(--pe-text)}.sr7pe-btn--primary{background:var(--pe-accent);border-color:var(--pe-accent);color:var(--pe-accent-text)}.sr7pe-btn--primary:hover{background:var(--pe-accent-strong);border-color:var(--pe-accent-strong);color:#fff}.sr7pe-btn--saved{background:var(--pe-good);border-color:var(--pe-good);color:#fff}.sr7pe-file{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden;clip:rect(0,0,0,0)}.sr7pe-body{flex:1;display:flex;min-height:0}.sr7pe-panel{width:308px;flex:0 0 308px;background:var(--pe-surface-2);border-right:1px solid var(--pe-border);display:flex;flex-direction:column;overflow:hidden;color:var(--pe-text);font-size:13px}.sr7pe-panel-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden}.sr7pe-panel-foot{flex:0 0 auto;background:var(--pe-bg);border-top:1px solid var(--pe-border)}.sr7pe-panel-foot:empty{display:none}.sr7pe-stagewrap{flex:1;min-width:0;display:flex;flex-direction:column}.sr7pe-ribbon{box-sizing:border-box;flex:0 0 26px;display:flex;align-items:center;justify-content:center;background:var(--pe-surface-3);border-bottom:1px solid var(--pe-border);color:var(--pe-text-dim);font:700 10px/1 var(--pe-font);letter-spacing:.08em;text-transform:uppercase;user-select:none}.sr7pe-stage{flex:1;min-height:0;position:relative;background:var(--pe-stage) repeating-linear-gradient(45deg,transparent,transparent 10px,rgba(128,128,128,.06) 10px,rgba(128,128,128,.06) 20px);display:flex;justify-content:center;align-items:stretch;overflow:auto}.sr7pe-iframe{height:100%;border:0;display:block;background:#fff;box-shadow:var(--pe-shadow);transition:width .18s ease}.sr7pe-more{position:relative}.sr7pe-menu{box-sizing:border-box;position:absolute;top:40px;right:0;width:216px;background:var(--pe-surface-2);border:1px solid var(--pe-border);border-radius:var(--pe-radius-s);box-shadow:var(--pe-shadow);padding:5px;z-index:100031}.sr7pe-menu-lbl{padding:7px 9px 5px;font:700 9.5px var(--pe-font);letter-spacing:.1em;text-transform:uppercase;color:var(--pe-text-dim)}.sr7pe-menu-item{display:flex;align-items:center;gap:9px;height:32px;padding:0 9px;border-radius:var(--pe-radius-s);font-size:12.5px;color:var(--pe-text);cursor:pointer;white-space:nowrap}.sr7pe-menu-item:hover{background:var(--pe-surface-3)}.sr7pe-menu-ic{flex:0 0 13px;display:flex;align-items:center;justify-content:center;color:var(--pe-text-dim)}.sr7pe-menu-ic svg{display:block}.sr7pe-menu-item:hover .sr7pe-menu-ic{color:var(--pe-text-2)}.sr7pe-dot{display:none;flex:0 0 6px;width:6px;height:6px;border-radius:50%;background:var(--pe-warn)}.sr7pe-btn--dirty .sr7pe-dot{display:inline-block}.sr7pe-panel,.sr7pe-panel *{box-sizing:border-box}.sr7pe-panel select{-webkit-appearance:none;-moz-appearance:none;appearance:none;font:600 13px/26px var(--pe-font);height:28px;color:var(--pe-text);background-color:var(--pe-surface-3);border:1px solid var(--pe-border-2);border-radius:var(--pe-radius-s);padding:0 26px 0 9px;cursor:pointer;background-image:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%23AAAEB3' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/></svg>\");background-repeat:no-repeat;background-position:right 9px center}.sr7pe-panel select:hover{border-color:var(--pe-accent)}.sr7pe-panel select:focus{outline:none;border-color:var(--pe-accent);box-shadow:0 0 0 2px var(--pe-accent-bg)}.sr7pe-panel option{background:var(--pe-surface-2);color:var(--pe-text)}.sr7pe-drop{position:relative;display:block;height:28px;margin:0 16px 8px;border:1px solid var(--pe-border-2);border-radius:var(--pe-radius-s);background:var(--pe-surface-3);padding:0 8px;cursor:pointer;font:600 13px/26px var(--pe-font);color:var(--pe-text);box-sizing:border-box}.sr7pe-drop:hover,.sr7pe-drop.open{border-color:var(--pe-accent)}.sr7pe-drop.disabled{opacity:.5;cursor:default;color:var(--pe-text-dim);border-color:var(--pe-border)}.sr7pe-drop.off{display:none}.sr7pe-drop-value{display:block;margin-right:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:26px}.sr7pe-drop-title{position:absolute;right:24px;top:0;line-height:28px;font-size:11px;font-weight:400;color:var(--pe-text-dim);pointer-events:none;max-width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sr7pe-drop-arrow{position:absolute;right:8px;top:0;height:28px;display:flex;align-items:center;color:var(--pe-text-dim);pointer-events:none}.sr7pe-drop-list{position:fixed;z-index:100030;background:var(--pe-surface-2,#323438);border:1px solid var(--pe-border,#3F444A);border-radius:var(--pe-radius-s,4px);box-shadow:var(--pe-shadow,0 10px 30px rgba(0,0,0,.45));padding:5px;max-height:280px;overflow:auto;box-sizing:border-box;font-family:var(--pe-font,'Inter',system-ui,sans-serif)}.sr7pe-drop-opt{padding:8px 12px;border-radius:4px;font-size:13px;font-weight:500;color:var(--pe-text,#B7BBC0);cursor:pointer;white-space:nowrap}.sr7pe-drop-opt:hover,.sr7pe-drop-opt.selected{color:var(--pe-accent,#309BFF);background:var(--pe-drop-sel,#20374D)}.sr7pe-panel input[type=text],.sr7pe-panel input[type=number]{font:600 13px/24px var(--pe-font);color:var(--pe-text);background:var(--pe-surface-3);border:1px solid var(--pe-border-2);border-radius:var(--pe-radius-s);padding:2px 9px;height:28px}.sr7pe-panel input[type=text]:focus,.sr7pe-panel input[type=number]:focus{outline:none;border-color:var(--pe-accent)}.sr7pe-panel input[type=color]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:40px;height:26px;border:1px solid var(--pe-border-2);border-radius:var(--pe-radius-s);background:none;cursor:pointer;padding:2px}.sr7pe-panel input[type=color]::-webkit-color-swatch-wrapper{padding:0}.sr7pe-panel input[type=color]::-webkit-color-swatch{border:none;border-radius:2px}.sr7pe-panel input[type=range]{-webkit-appearance:none;appearance:none;width:130px;height:14px;background:transparent;accent-color:var(--pe-accent);cursor:pointer}.sr7pe-panel input[type=range]::-webkit-slider-runnable-track{height:4px;border-radius:9999px;background:linear-gradient(to right,var(--pe-accent) 0 var(--pe-rp,0%),var(--pe-surface-3) var(--pe-rp,0%) 100%)}.sr7pe-panel input[type=range]::-moz-range-track{height:4px;border-radius:9999px;background:var(--pe-surface-3)}.sr7pe-panel input[type=range]::-moz-range-progress{height:4px;border-radius:9999px;background:var(--pe-accent)}.sr7pe-panel input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:13px;height:13px;margin-top:-5px;border-radius:50%;background:#fff;border:2px solid var(--pe-text-dim);box-shadow:0 1px 2px rgba(0,0,0,.4)}.sr7pe-panel input[type=range]::-moz-range-thumb{width:13px;height:13px;border-radius:50%;background:#fff;border:2px solid var(--pe-text-dim)}.sr7pe-panel input[type=checkbox]{-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;vertical-align:middle;width:34px;height:18px;border:0;box-shadow:none;border-radius:9999px;background:var(--pe-border-2);position:relative;cursor:pointer;transition:.15s;flex:0 0 auto;margin:0}.sr7pe-panel input[type=checkbox]:checked{background:var(--pe-accent)}.sr7pe-panel input[type=checkbox]:before,.sr7pe-panel input[type=checkbox]:checked:before{content:none!important;display:none!important}.sr7pe-panel input[type=checkbox]:after{content:'';position:absolute;width:14px;height:14px;border-radius:50%;background:#fff;top:50%;margin-top:-7px;left:2px;transition:left .15s;box-shadow:0 1px 2px rgba(0,0,0,.35)}.sr7pe-panel input[type=checkbox]:checked:after{left:18px}.sr7pe-panel sr-radio.sr7pe-seg{display:flex;gap:3px;padding:3px;margin:0 16px 8px;border-radius:15px;background:var(--pe-surface-3);box-sizing:border-box}.sr7pe-panel sr-radio.sr7pe-seg sr-radio-item{flex:1;display:flex;align-items:center;justify-content:center;height:26px;border-radius:13px;font:700 var(--sr-fs-9,11px)/1 var(--pe-font);color:var(--pe-text-dim);transition:.12s}.sr7pe-panel sr-radio.sr7pe-seg sr-radio-item span{margin:0}.sr7pe-panel sr-radio.sr7pe-seg sr-radio-item:hover{color:var(--pe-text-2)}.sr7pe-panel sr-radio.sr7pe-seg sr-radio-item.checked{background:var(--pe-surface);color:var(--pe-accent);box-shadow:0 1px 2px rgba(0,0,0,.12)}.sr7pe-scope{display:flex;align-items:center;gap:8px;padding:18px 14px;background:var(--pe-surface-3);box-shadow:inset 0 1px 0 rgba(0,0,0,.03)}.sr7pe-scope--all{background:var(--pe-accent-bg)}.sr7pe-scope-txt{min-width:0;line-height:1.25}.sr7pe-scope-eyebrow{display:block;font:700 var(--sr-fs-12,9px) var(--pe-font);letter-spacing:.1em;text-transform:uppercase;color:var(--pe-text-dim)}.sr7pe-scope-title{display:flex;align-items:baseline;gap:5px;min-width:0;font:700 var(--sr-fs-7,13px) var(--pe-font);color:var(--pe-text);overflow:hidden;white-space:nowrap}.sr7pe-scope-title>*{min-width:0;overflow:hidden;text-overflow:ellipsis}.sr7pe-scope-sep{flex:0 0 auto;color:var(--pe-text-dim);font-weight:400}.sr7pe-scope-crumb{flex:0 1 auto;background:none;border:0;padding:0;font:inherit;color:inherit;cursor:pointer;text-align:left}.sr7pe-scope-crumb:hover{color:var(--pe-accent)}.sr7pe-panel sr-radio.sr7pe-tiles{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin:0 16px 8px}.sr7pe-panel sr-radio.sr7pe-tiles sr-radio-item{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;height:42px;line-height:1;border-radius:6px;background:var(--pe-surface-3);border:1px solid var(--pe-border);box-sizing:border-box}.sr7pe-panel sr-radio.sr7pe-tiles sr-radio-item span{margin:0}.sr7pe-panel sr-radio.sr7pe-tiles sr-radio-item:hover{border-color:var(--pe-text-dim)}.sr7pe-panel sr-radio.sr7pe-tiles sr-radio-item.checked{background:var(--pe-accent-bg);border-color:var(--pe-accent)}.sr7pe-panel sr-radio.sr7pe-tiles .sr7pe-tile-art{display:flex;align-items:center;justify-content:center;height:15px;color:var(--pe-text-2);fill:currentColor}.sr7pe-panel sr-radio.sr7pe-tiles sr-radio-item.checked .sr7pe-tile-art{color:var(--pe-accent)}.sr7pe-panel sr-radio.sr7pe-tiles .sr7pe-tile-cap{font:600 var(--sr-fs-12,9px) var(--pe-font);color:var(--pe-text-dim)}.sr7pe-panel sr-radio.sr7pe-tiles sr-radio-item.checked .sr7pe-tile-cap{color:var(--pe-accent)}.sr7pe-tree{display:flex;flex-direction:column;padding:0 0 12px;background:var(--pe-surface-2);border-bottom:1px solid var(--pe-border)}.sr7pe-tree-hd{display:flex;align-items:center;justify-content:space-between;padding:18px 14px 12px}.sr7pe-tree-hd b{font:700 var(--sr-fs-10,10px) var(--pe-font);letter-spacing:.11em;text-transform:uppercase;color:var(--pe-text-dim)}.sr7pe-tree-hd i{font-style:normal;font-size:var(--sr-fs-10,10px);color:var(--pe-text-dim)}.sr7pe-tree-row{display:flex;align-items:center;gap:8px;border-radius:7px;cursor:pointer;user-select:none;box-sizing:border-box}.sr7pe-tree-row:hover{background:var(--pe-surface-3)}.sr7pe-tree-row.sel{background:var(--pe-accent-bg)}.sr7pe-tree-row.sel .sr7pe-tree-name{color:var(--pe-accent)}.sr7pe-tree-row.kidsel{background:color-mix(in srgb,var(--pe-accent-bg) 55%,transparent)}.sr7pe-tree-root{height:38px;margin:0 9px 8px;padding:0 9px;background:var(--pe-surface);border:1px solid var(--pe-border)}.sr7pe-tree-root.sel{border-color:var(--pe-accent)}.sr7pe-tree-grp{height:36px;margin:0 9px 4px;padding:0 10px 0 4px}.sr7pe-tree-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:600 var(--sr-fs-8,12px) var(--pe-font);color:var(--pe-text)}.sr7pe-tree-root .sr7pe-tree-name{font-weight:700}.sr7pe-tree-meta{flex:0 0 auto;font:400 var(--sr-fs-10,10px) var(--pe-font);color:var(--pe-text-dim)}.sr7pe-tree-caret{flex:0 0 18px;width:18px;height:18px;display:flex;align-items:center;justify-content:center;border-radius:4px;color:var(--pe-text-dim);transition:transform .14s}.sr7pe-tree-caret:hover{background:var(--pe-surface-3)}.sr7pe-tree-caret.open{transform:rotate(90deg)}.sr7pe-tree-ico{flex:0 0 14px;width:14px;height:14px;display:flex;align-items:center;justify-content:center;color:var(--pe-text-dim)}.sr7pe-tree-row.sel .sr7pe-tree-ico{color:var(--pe-accent)}.sr7pe-tree-kids{display:flex;flex-direction:column;gap:3px;margin:1px 9px 6px 23px;padding-left:8px;border-left:1px solid var(--pe-border)}.sr7pe-tree-item{height:34px;padding:0 8px 0 4px;gap:9px;border-radius:6px}.sr7pe-tree-grip{flex:0 0 8px;display:flex;align-items:center;justify-content:center;width:8px;height:12px;opacity:.45;cursor:grab;color:var(--pe-text-dim)}.sr7pe-tree-badge{flex:0 0 17px;width:17px;height:17px;border-radius:50%;display:flex;align-items:center;justify-content:center;font:700 var(--sr-fs-12,9px) var(--pe-font);background:var(--pe-surface-3);color:var(--pe-text-dim)}.sr7pe-tree-row.sel .sr7pe-tree-badge{background:var(--pe-accent);color:var(--pe-accent-text)}.sr7pe-tree-item .sr7pe-tree-name{font-weight:400}.sr7pe-tree-type{flex:0 0 auto;padding:2px 5px;border-radius:3px;font:700 var(--sr-fs-12,9px) var(--pe-font);letter-spacing:.05em;text-transform:uppercase;background:var(--pe-surface-3);color:var(--pe-text-dim)}.sr7pe-tree-type.gap{background:var(--pe-danger);color:var(--pe-accent-text)}.sr7pe-tree-row.sel .sr7pe-tree-type{background:var(--pe-accent);color:var(--pe-accent-text)}.sr7pe-tree-drop{border-top:2px solid var(--pe-accent)}.sr7pe-tree-del{flex:0 0 16px;width:16px;height:16px;display:flex;align-items:center;justify-content:center;border-radius:3px;color:var(--pe-text-dim);opacity:0;transition:opacity .12s,color .12s}.sr7pe-tree-row:hover .sr7pe-tree-del{opacity:.55}.sr7pe-tree-del:hover{opacity:1!important;color:var(--pe-danger);background:rgba(128,128,128,.14)}.sr7pe-tree-ghost{display:flex;align-items:center;gap:8px;box-sizing:border-box;background:transparent;border:none;color:var(--pe-text-dim);cursor:pointer;transition:background .13s,border-color .13s,color .13s}.sr7pe-tree-ghost:hover{background:var(--pe-accent);border-color:var(--pe-accent);color:var(--pe-accent-text)}.sr7pe-tree-ghost-badge{flex:0 0 auto;display:flex;align-items:center;justify-content:center;border-radius:50%;background:var(--pe-surface-3)}.sr7pe-tree-ghost-badge svg{display:block}.sr7pe-tree-ghost:hover .sr7pe-tree-ghost-badge,.sr7pe-tree-ghost.arm .sr7pe-tree-ghost-badge{background:rgba(255,255,255,.22)}.sr7pe-tree-ghost-lbl{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;font:400 var(--sr-fs-8,12px) var(--pe-font)}.sr7pe-tree-ghost-add{flex:0 0 auto;font:700 var(--sr-fs-9,11px) var(--pe-font);opacity:.7}.sr7pe-tree-ghost.arm{background:var(--pe-accent);border-color:var(--pe-accent);color:var(--pe-accent-text);animation:sr7peArm 1.4s ease-in-out infinite}.sr7pe-tree-ghost--grp{height:36px;margin:4px 9px 0;padding:0 10px 0 5px;border-radius:7px}.sr7pe-tree-ghost--grp .sr7pe-tree-ghost-badge{width:20px;height:20px}.sr7pe-tree-ghost--item{height:34px;margin:0;padding:0 8px 0 5px;border-radius:6px}.sr7pe-tree-ghost--item .sr7pe-tree-ghost-badge{width:19px;height:19px}@keyframes sr7peArm{0%,100%{box-shadow:0 0 0 0 rgba(48,155,255,.5)}70%{box-shadow:0 0 0 5px rgba(48,155,255,0)}}",document.head.appendChild(r)},SR7.PE.injectInspectorChrome??=()=>{if(document.getElementById("sr7pe-inspector-css"))return;const e=SR7.PE.skin,t=e=>".sr7pe-inspector "+e+",.sr7pe-wb-cfg "+e,r=e=>".sr7pe-inspector.sr7pe-inspector.sr7pe-inspector "+e+",.sr7pe-wb-cfg.sr7pe-wb-cfg.sr7pe-wb-cfg "+e,n=document.createElement("style");n.id="sr7pe-inspector-css",n.textContent=".sr7pe-inspector .components-panel__body-title button{font-family:'Inter',-apple-system,BlinkMacSystemFont,system-ui,sans-serif;font-weight:600}.sr7pe-inspector .components-panel__body.is-opened h2{margin-bottom:8px}.sr7pe-inspector .components-button:focus:not(:focus-visible){box-shadow:none;outline:none}.sr7pe-inspector input:focus,.sr7pe-inspector select:focus,.sr7pe-inspector textarea:focus{box-shadow:none;outline:none}.sr7pe-inspector .components-input-base:focus-within .components-input-control__backdrop{box-shadow:none}.sr7pe-inspector .components-range-control__root{align-items:center}"+t(".components-range-control__root")+"{min-height:"+"28px}"+t(".components-base-control")+"{margin-bottom:15px}"+t(".components-base-control:last-child")+"{margin-bottom:0}"+t(".components-base-control__field")+"{margin-bottom:0}"+r(".components-base-control__label")+","+r(".components-input-control__label")+","+t(".sr7pe-esslbl")+"{display:block;margin:0 0 6px;font-size:11px;font-weight:500;line-height:1.4;text-transform:uppercase;letter-spacing:.02em;color:"+e.text+"}"+r(".components-select-control__input")+","+r(".components-text-control__input")+","+r(".components-input-control__input")+","+r('input[type="text"]')+","+r('input[type="number"]')+","+r('input[type="search"]')+"{height:"+"28px;min-height:"+"28px;line-height:26px;padding:0 8px;font-size:13px;font-weight:600;border-radius:"+e.radiusS+"}"+r(".components-input-control__container")+"{min-height:"+"28px;height:"+"28px}"+r(".components-input-base")+"{min-height:"+"28px}"+t(".components-button.is-primary")+","+t(".components-button.is-secondary")+","+t(".components-button.is-tertiary")+"{height:"+"28px;min-height:"+"28px;padding:0 12px;font-size:12px;font-weight:600;border-radius:"+e.radiusS+"}"+t(".sr7pe-seg")+"{margin-bottom:15px}"+t(".sr7pe-segbtn")+"{height:"+"28px;padding:0 10px;line-height:26px;min-width:fit-content}"+t("summary")+"{font-size:11px;font-weight:600;line-height:1.4;text-transform:uppercase;letter-spacing:.02em;color:"+e.text+"}"+t(".components-base-control__help")+"{margin:6px 0 0;font-size:11px;line-height:1.45;color:"+e.textDim+"}"+t(".components-toggle-control .components-base-control__field")+"{align-items:center}"+t(".components-toggle-control .components-form-toggle")+"{flex:0 0 auto}"+t(".components-toggle-control label")+"{font-size:13px;font-weight:400;text-transform:none;letter-spacing:0;margin:0}.sr7pe-cta{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;height:"+"28px;padding:0 12px;box-sizing:border-box;border:1px solid "+e.border2+";border-radius:"+e.radiusS+";background:"+e.surface+";color:"+e.text+";font-family:"+e.font+";font-size:12px;font-weight:600;line-height:1;cursor:pointer}.sr7pe-cta:hover{border-color:#FF8D1C;color:#FF8D1C}.sr7pe-cta-go{background:"+e.accent+";border-color:"+e.accent+";color:"+e.accentText+"}.sr7pe-cta-go:hover{background:"+e.accentStrong+";border-color:"+e.accentStrong+";color:"+e.accentText+"}.sr7pe-cta-wrap{margin:15px 0 0}.sr7pe-inspector{--wp-admin-theme-color:"+e.accent+";--wp-admin-theme-color-darker-10:"+e.accentStrong+";--wp-admin-theme-color-darker-20:"+e.accentStrong+";--wp-components-color-accent:"+e.accent+";--wp-components-color-accent-darker-10:"+e.accentStrong+";--wp-components-color-accent-darker-20:"+e.accentStrong+"}",document.head.appendChild(n)},SR7.PE.previewPost=()=>{const e=wp.data&&wp.data.select("core/editor"),t=wp.data&&wp.data.dispatch("core/editor");if(!e||!t)return;const r=window.open("","sr7pe-preview");try{r&&r.document&&r.document.body&&(r.document.body.innerHTML='<div style="font-family:system-ui,sans-serif;padding:16px;">'+SR7.t("Loading preview…")+"</div>")}catch(e){}Promise.resolve(t.autosave()).then(()=>{const t=e.getEditedPostPreviewLink()||(e.getCurrentPost()||{}).link;if(t)if(r)try{r.location.replace(t),r.focus()}catch(e){r.location.href=t}else window.open(t,"sr7pe-preview");else try{r&&r.close()}catch(e){}}).catch(()=>{try{r&&r.close()}catch(e){}})},SR7.PE.removeButton=e=>{const t=wp.element.createElement;return SR7.PE.injectInspectorChrome(),t("div",{className:"sr7pe-cta-wrap"},t("button",{type:"button",className:"sr7pe-cta",onClick:t=>{t.preventDefault(),e&&e.onRemove&&e.onRemove()}},e&&e.label||SR7.t("Remove Effect")))},SR7.PE.starter=e=>{const t=wp.element.createElement;return e=e||{},SR7.PE.injectInspectorChrome(),t(wp.element.Fragment,null,e.hint||null,e.onEdit?t("button",{type:"button",className:"sr7pe-cta sr7pe-cta-go",onClick:t=>{t.preventDefault(),e.onEdit()}},SR7.t("Edit %s",e.label||"")):null,e.onRemove?SR7.PE.removeButton({onRemove:e.onRemove}):null)};let l=null;const c=()=>{if(!l)return;const e=l;l=null,document.removeEventListener("pointerdown",e.outside,!0),document.removeEventListener("keydown",e.onKey,!0),e.list.parentNode&&e.list.remove(),e.el.classList.remove("open")};SR7.PE.closeDropdown=c,SR7.PE.tree=e=>{e=e||{};let t=Object.assign({groups:[],selection:{kind:"all"},arming:!1,labels:{}},e);const r=document.createElement("div");r.className="sr7pe-tree";const n=(e,...r)=>{"function"==typeof t[e]&&t[e](...r)},o=(e,t)=>{const r=document.createElement("span");return r.className="sr7pe-tree-del",r.title=e||"",r.innerHTML="<svg width='9' height='9' viewBox='0 0 10 10'><path d='M1.5 1.5l7 7M8.5 1.5l-7 7' stroke='currentColor' stroke-width='1.5' stroke-linecap='round'/></svg>",r.onclick=e=>{e.stopPropagation(),t()},r},s=(e,r,n,o)=>{const s=document.createElement("button");s.type="button",s.className="sr7pe-tree-ghost "+e+(n?" arm":"");const a=document.createElement("span");a.className="sr7pe-tree-ghost-badge",a.innerHTML="<svg width='10' height='10' viewBox='0 0 10 10'><path d='M5 1v8M1 5h8' stroke='currentColor' stroke-width='1.6' stroke-linecap='round'/></svg>";const i=document.createElement("span");if(i.className="sr7pe-tree-ghost-lbl",i.textContent=r,s.appendChild(a),s.appendChild(i),t.labels.add){const e=document.createElement("span");e.className="sr7pe-tree-ghost-add",e.textContent=t.labels.add,s.appendChild(e)}return s.onclick=e=>{e.stopPropagation(),o()},s},a=()=>{r.innerHTML="";const e=t.selection||{kind:"all"},a=document.createElement("div");a.className="sr7pe-tree-hd";const p=document.createElement("b");p.textContent=t.title||"";const l=document.createElement("i");l.textContent=t.meta||"",a.appendChild(p),a.appendChild(l),r.appendChild(a);const c=document.createElement("div");c.className="sr7pe-tree-row sr7pe-tree-root"+("all"===e.kind?" sel":"");const d=document.createElement("span");d.className="sr7pe-tree-ico",d.innerHTML="<svg width='14' height='14' viewBox='0 0 14 14'><path d='M1.5 3.5h11M1.5 7h11M1.5 10.5h11' fill='none' stroke='currentColor' stroke-width='1.5' stroke-linecap='round'/></svg>";const m=document.createElement("span");m.className="sr7pe-tree-name",m.textContent=t.root&&t.root.label||"";const u=document.createElement("span");u.className="sr7pe-tree-meta",u.textContent=t.root&&t.root.meta||"",c.appendChild(d),c.appendChild(m),c.appendChild(u),c.onclick=()=>{((e,t)=>e&&t&&e.kind===t.kind&&e.group===t.group&&e.item===t.item)(e,{kind:"all"})||n("onSelect",{kind:"all"})},r.appendChild(c),(t.groups||[]).forEach((a,p)=>{const l="all"===e.kind||"group"===e.kind&&e.group===p,c="item"===e.kind&&e.group===p,d=document.createElement("div");d.className="sr7pe-tree-row sr7pe-tree-grp"+(l?" sel":c?" kidsel":"");const m=document.createElement("span");m.className="sr7pe-tree-caret"+(a.open?" open":""),m.innerHTML="<svg width='8' height='8' viewBox='0 0 8 8'><path d='M2.5 1L6 4L2.5 7' fill='none' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>",m.onclick=e=>{e.stopPropagation(),l?n("onToggle",p):n("onSelect",{kind:"group",group:p})};const u=document.createElement("span");u.className="sr7pe-tree-name",u.textContent=a.name||"",u.title=a.name||"";const g=document.createElement("span");if(g.className="sr7pe-tree-meta",g.textContent=a.meta||"",d.appendChild(m),d.appendChild(u),d.appendChild(g),"function"==typeof t.onDeleteGroup&&d.appendChild(o(t.labels.delGroup||"",()=>n("onDeleteGroup",p))),d.onclick=()=>n("onSelect",{kind:"group",group:p}),r.appendChild(d),!a.open)return;const f=document.createElement("div");f.className="sr7pe-tree-kids",(a.items||[]).forEach((r,s)=>{const a="item"===e.kind&&e.group===p&&e.item===s,l=document.createElement("div");l.className="sr7pe-tree-row sr7pe-tree-item"+(a?" sel":""),l.draggable=!0;const c=document.createElement("span");c.className="sr7pe-tree-grip",c.innerHTML="<svg width='8' height='12' viewBox='0 0 8 12' fill='currentColor'><circle cx='1.5' cy='2' r='1'/><circle cx='6.5' cy='2' r='1'/><circle cx='1.5' cy='6' r='1'/><circle cx='6.5' cy='6' r='1'/><circle cx='1.5' cy='10' r='1'/><circle cx='6.5' cy='10' r='1'/></svg>";const d=document.createElement("span");d.className="sr7pe-tree-badge",d.textContent=String(s+1);const m=document.createElement("span");if(m.className="sr7pe-tree-name",m.textContent=r.label||"",m.title=r.label||"",l.appendChild(c),l.appendChild(d),l.appendChild(m),r.type){const e=document.createElement("span");e.className="sr7pe-tree-type"+(r.typeKind?" "+r.typeKind:""),e.textContent=r.type,l.appendChild(e)}"function"==typeof t.onDeleteItem&&l.appendChild(o(t.labels.delItem||"",()=>n("onDeleteItem",p,s))),l.onclick=()=>n("onSelect",{kind:"item",group:p,item:s}),l.addEventListener("dragstart",e=>{i={g:p,i:s},e.dataTransfer.effectAllowed="move"}),l.addEventListener("dragover",e=>{i&&i.g===p&&(e.preventDefault(),l.classList.add("sr7pe-tree-drop"))}),l.addEventListener("dragleave",()=>l.classList.remove("sr7pe-tree-drop")),l.addEventListener("drop",e=>{if(l.classList.remove("sr7pe-tree-drop"),!i||i.g!==p||i.i===s)return;e.preventDefault();const t=i.i;i=null,n("onReorder",p,t,s)}),l.addEventListener("dragend",()=>{i=null}),f.appendChild(l)});const h=!!t.arming&&"all"!==e.kind&&e.group===p;f.appendChild(s("sr7pe-tree-ghost--item",h?t.labels.arming||"Click on the page…":t.labels.addItem||"New item",h,()=>n("onAddItem",p))),r.appendChild(f)}),r.appendChild(s("sr7pe-tree-ghost--grp",t.labels.addGroup||"New group",!1,()=>n("onAddGroup")))};let i=null;return r.update=e=>(t=Object.assign(t,e||{}),a(),r),a(),r},SR7.PE.paintRange=e=>{if(!e)return e;const t=+e.min||0,r=""===e.max||null==e.max?100:+e.max,n=r>t?(+e.value-t)/(r-t)*100:0;return e.style.setProperty("--pe-rp",Math.max(0,Math.min(100,n)).toFixed(2)+"%"),e},SR7.PE.segmented=e=>{let t=(e=e||{}).value;const r=document.createElement("sr-radio");r.className="sr7pe-seg";const n=[];(e.options||[]).forEach(s=>{const a=document.createElement("sr-radio-item"),i=document.createElement("span");i.textContent=s[1],a.appendChild(i),a.addEventListener("click",()=>{t!==s[0]&&(t=s[0],o(),e.onChange&&e.onChange(t))}),n.push([s[0],a]),r.appendChild(a)});const o=()=>n.forEach(([e,r])=>r.classList.toggle("checked",e===t));return o(),r.setValue=e=>{t=e,o()},r.getValue=()=>t,r},SR7.PE.scopeBanner=e=>{e=e||{};const t=document.createElement("div");t.className="sr7pe-scope";const r=document.createElement("span");r.className="sr7pe-scope-txt";const n=document.createElement("span");n.className="sr7pe-scope-eyebrow",n.textContent=e.eyebrow||SR7.t("Editing");const o=document.createElement("span");return o.className="sr7pe-scope-title",r.appendChild(n),r.appendChild(o),t.appendChild(r),t.set=(e,r,n)=>{const s=Array.isArray(e)?e:[{text:e||""}];o.innerHTML="",s.forEach((e,t)=>{if(t){const e=document.createElement("span");e.className="sr7pe-scope-sep",e.textContent="→",o.appendChild(e)}const r=document.createElement(e.onClick?"button":"span");e.onClick&&(r.type="button",r.className="sr7pe-scope-crumb",r.onclick=e.onClick),r.textContent=e.text||"",o.appendChild(r)}),o.title=s.map(e=>e.text||"").join(" → "),t.classList.toggle("sr7pe-scope--all",!!n)},t.set(e.title,e.color,e.all),t},SR7.PE.tileGrid=e=>{let t=(e=e||{}).value;const r=document.createElement("sr-radio");r.className="sr7pe-tiles",e.columns&&(r.style.gridTemplateColumns="repeat("+e.columns+",1fr)");const n=[];(e.options||[]).forEach(s=>{const a=document.createElement("sr-radio-item");a.title=s.label||s.id;const i=document.createElement("span");if(i.className="sr7pe-tile-art","function"==typeof s.art){const e=s.art();e&&i.appendChild(e)}else"string"==typeof s.art&&(i.innerHTML=s.art);const p=document.createElement("span");p.className="sr7pe-tile-cap",p.textContent=s.label||"",a.appendChild(i),a.appendChild(p),a.addEventListener("click",()=>{t!==s.id&&(t=s.id,o(),e.onChange&&e.onChange(t))}),n.push([s.id,a]),r.appendChild(a)});const o=()=>n.forEach(([e,r])=>r.classList.toggle("checked",e===t));return o(),r.setValue=e=>{t=e,o()},r.getValue=()=>t,r},SR7.PE.dropField=e=>{let t=(e=e||{}).options||[],r=e.value;const n=document.createElement("div");n.className="sr7pe-drop"+(e.disabled?" disabled":""),n.tabIndex=0;const o=document.createElement("span");o.className="sr7pe-drop-value";const s=document.createElement("span");s.className="sr7pe-drop-title",s.textContent=e.title||"";const a=document.createElement("span");a.className="sr7pe-drop-arrow",a.innerHTML="<svg width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='currentColor' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/></svg>",n.appendChild(o),n.appendChild(s),n.appendChild(a);const i=()=>{o.textContent=(e=>{const r=t.find(t=>t[0]===e);return r?r[1]:null==e?"":e})(r)};return n.addEventListener("click",()=>{if(n.classList.contains("disabled"))return;c();const o=document.createElement("div");o.className="sr7pe-drop-list",t.forEach(t=>{const n=document.createElement("div");n.className="sr7pe-drop-opt"+(t[0]===r?" selected":""),n.textContent=t[1],n.addEventListener("pointerdown",n=>{n.preventDefault(),r=t[0],i(),c(),e.onChange&&e.onChange(r)}),o.appendChild(n)}),document.body.appendChild(o);const s=n.getBoundingClientRect();o.style.left=s.left+"px",o.style.width=s.width+"px";const a=o.offsetHeight;let p=s.bottom+4;p+a>window.innerHeight-8&&(p=Math.max(8,s.top-a-4)),o.style.top=p+"px",n.classList.add("open");const d=e=>{o.contains(e.target)||n.contains(e.target)||c()},m=e=>{"Escape"===e.key&&c()};document.addEventListener("pointerdown",d,!0),document.addEventListener("keydown",m,!0),l={el:n,list:o,outside:d,onKey:m}}),n.setValue=e=>{r=e,i()},n.getValue=()=>r,n.setDisabled=e=>{n.classList.toggle("disabled",!!e)},n.setOptions=e=>{t=e||[],i()},i(),n},SR7.PE.iconFonts={FontAwesome:{family:"FontAwesome",base:"fa",css:"font-awesome/css/font-awesome.css"},PeIcon7Stroke:{family:"Pe-icon-7-stroke",base:"",css:"pe-icon-7-stroke/css/pe-icon-7-stroke.css"}};const d=()=>window.SR7PECfg&&SR7PECfg.fontsUrl||window.SR7&&SR7.E&&SR7.E.peFontsUrl||"";SR7.PE.ensureIconFonts=e=>{e=e||document;const t=d();if(t)for(const r in SR7.PE.iconFonts){const n="sr7pe-iconfont-"+r;if(!e.getElementById(n)){const o=e.createElement("link");o.id=n,o.rel="stylesheet",o.href=t+SR7.PE.iconFonts[r].css,e.head.appendChild(o)}}},SR7.PE.loadIcons=async()=>{if(SR7.PE._iconList)return SR7.PE._iconList;const e=d(),t=[];for(const r in SR7.PE.iconFonts){const n=SR7.PE.iconFonts[r];try{const r=await fetch(e+n.css).then(e=>e.text()),o=/\.([a-zA-Z0-9_-]+):before\s*\{\s*content:\s*["']\\([a-fA-F0-9]+)["']/g;let s;for(;s=o.exec(r);)t.push({family:n.family,code:s[2],cls:(n.base?n.base+" ":"")+s[1],name:s[1].replace(/^fa-|^pe-7s-/,"").replace(/-/g," ")})}catch(e){}}return SR7.PE._iconList=t,t};let m=null;const u=()=>{if(!m)return;const e=m;m=null,document.removeEventListener("pointerdown",e.outside,!0),document.removeEventListener("keydown",e.onKey,!0),e.pop.parentNode&&e.pop.remove(),e.el.classList.remove("open")};SR7.PE.iconField=e=>{let t=(e=e||{}).value||null;const r=document.createElement("div");r.className="sr7pe-drop",r.tabIndex=0;const n=document.createElement("span");n.className="sr7pe-drop-value";const o=document.createElement("span");o.className="sr7pe-drop-title",o.textContent=e.title||"Icon";const s=document.createElement("span");s.className="sr7pe-drop-arrow",s.innerHTML="<svg width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='currentColor' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/></svg>",r.appendChild(n),r.appendChild(o),r.appendChild(s);const a=e=>"<span style=\"font-family:'"+e.family+"';font-style:normal;font-weight:normal;line-height:1\">"+String.fromCodePoint(parseInt(e.code,16)||0)+"</span>",i=()=>{n.innerHTML=t&&t.code?a(t)+'<span style="margin-left:7px">'+(t.name||"icon")+"</span>":"Pick an icon…"};return r.addEventListener("click",async()=>{if(r.classList.contains("disabled"))return;(()=>{if(document.getElementById("sr7pe-icon-css"))return;const e=document.createElement("style");e.id="sr7pe-icon-css",e.textContent=".sr7pe-iconpop{position:fixed;z-index:100040;width:300px;background:#323438;border:1px solid #3F444A;border-radius:6px;box-shadow:0 10px 30px rgba(0,0,0,.45);padding:8px;box-sizing:border-box;font-family:'Inter',system-ui,sans-serif}.sr7pe-iconpop input{width:100%;box-sizing:border-box;height:30px;background:#383B41;border:1px solid #4A4E51;border-radius:4px;color:#C7CCD2;padding:0 9px;font-size:13px;margin-bottom:8px;outline:none}.sr7pe-icongrid{display:grid;grid-template-columns:repeat(6,1fr);gap:2px;max-height:300px;overflow:auto}.sr7pe-iconbtn{display:flex;align-items:center;justify-content:center;height:38px;border-radius:4px;color:#C7CCD2;cursor:pointer;font-size:18px}.sr7pe-iconbtn:hover{background:#20374D;color:#309BFF}.sr7pe-iconbtn.sel{background:#309BFF;color:#fff}.sr7pe-iconempty{padding:14px;color:#777C80;font-size:12px;text-align:center}",document.head.appendChild(e)})(),SR7.PE.ensureIconFonts(),u();const n=document.createElement("div");n.className="sr7pe-iconpop";const o=document.createElement("input");o.type="text",o.placeholder="Search icons…";const s=document.createElement("div");s.className="sr7pe-icongrid",n.appendChild(o),n.appendChild(s),document.body.appendChild(n);const p=r.getBoundingClientRect();n.style.left=Math.max(8,Math.min(p.left,window.innerWidth-308))+"px";let l=p.bottom+4;l+360>window.innerHeight-8&&(l=Math.max(8,p.top-364)),n.style.top=l+"px",r.classList.add("open");const c=await SR7.PE.loadIcons(),d=r=>{s.innerHTML="";const n=(r||"").toLowerCase().trim(),o=n?c.filter(e=>e.name.indexOf(n)>-1||e.cls.indexOf(n)>-1):c;if(!o.length){const e=document.createElement("div");return e.className="sr7pe-iconempty",e.textContent=c.length?"No matches":"Icons couldn’t load",void s.appendChild(e)}o.slice(0,600).forEach(r=>{const n=document.createElement("div");n.className="sr7pe-iconbtn"+(t&&t.code===r.code&&t.family===r.family?" sel":""),n.title=r.name,n.innerHTML=a(r),n.addEventListener("pointerdown",n=>{n.preventDefault(),t={family:r.family,code:r.code,cls:r.cls,name:r.name},i(),u(),e.onChange&&e.onChange(t)}),s.appendChild(n)})};d(""),o.addEventListener("input",()=>d(o.value)),setTimeout(()=>o.focus(),30);const g=e=>{n.contains(e.target)||r.contains(e.target)||u()},f=e=>{"Escape"===e.key&&u()};document.addEventListener("pointerdown",g,!0),document.addEventListener("keydown",f,!0),m={el:r,pop:n,outside:g,onKey:f}}),r.setValue=e=>{t=e,i()},r.getValue=()=>t,r.setDisabled=e=>r.classList.toggle("disabled",!!e),i(),r};const g=(e,t)=>new Promise(r=>{_tpt.ajax({action:e,data:t,callBack:e=>r(_tpt.fixResponse(e))})});SR7.PE.ajax=g;const f={display:"flex",alignItems:"center",gap:"16px",width:"100%",boxSizing:"border-box",border:"1px solid #e0d8ff",borderRadius:"0",padding:"8px 20px",background:"linear-gradient(180deg,#faf8ff,#fff)",fontFamily:"'Inter',system-ui,sans-serif"},h=[{transform:"translate(-28.331 -0.8)",d:"M46.311,18.755l2.807,2.81a.2.2,0,0,1-.14.337H40.089a.121.121,0,0,1-.137-.137l-.006-8.912a.188.188,0,0,1,.322-.134l2.938,2.933a.109.109,0,0,0,.185-.006A6.5,6.5,0,0,0,43.9,7.7a6.271,6.271,0,0,0-5.255-2.944q-.123.009-.123-.117l0-3.991a.121.121,0,0,1,.148-.137c5.283.394,9.36,3.746,10.293,8.929a10.885,10.885,0,0,1-2.231,8.781.516.516,0,0,1-.168.145l-.211.114Q46.146,18.589,46.311,18.755Z"},{transform:"translate(-0.8 -1.481)",d:"M0,1.745V1.46l8.975.014a.124.124,0,0,1,.14.14l0,8.627a.251.251,0,0,1-.431.177L5.974,7.688a.133.133,0,0,0-.225.009C2.037,12.144,5,18.126,10.521,18.714a.168.168,0,0,1,.148.168v3.766a.123.123,0,0,1-.145.14A10.328,10.328,0,0,1,3.94,20.36Q-1.717,15.456.79,7.893A9.566,9.566,0,0,1,2.844,4.8a.151.151,0,0,0-.006-.234Z"}],x=(e,t,r)=>{const n=wp.element.createElement;return n("svg",{width:r||24,height:r||24,viewBox:t?"0 0 36 36":"7.2 7.2 21.7 21.7",xmlns:"http://www.w3.org/2000/svg"},n("g",{transform:"translate(8 7.493)"},t?n("rect",{width:36,height:36,rx:5,transform:"translate(-8 -7.493)",fill:"#5c24ff"}):null,h.map((t,r)=>n("path",{key:r,fill:e,transform:t.transform,d:t.d}))))};SR7.PE.logoIcon=()=>x("#fff",!0),SR7.PE.markIcon=e=>x("currentColor",!1,e),SR7.PE.fxTitle=e=>SR7.t("Page FX")+(e?" · "+e:""),SR7.PE.fxMarkURL=()=>(window.SR7&&SR7.E&&SR7.E.plugin_url||"")+"admin/assets/images/pagefx_thumb_big.webp",SR7.PE.fxMark=e=>wp.element.createElement("img",{className:"sr7pe-fxmark",alt:"",width:e||50,height:e||50,src:SR7.PE.fxMarkURL()}),SR7.PE.fxIcon=e=>{const{size:t,...r}=e||{},n=t||24;return wp.element.createElement("img",Object.assign({src:SR7.PE.fxMarkURL(),alt:"",width:n,height:n,style:{display:"block"}},r))},SR7.PE.fxToolbarIcon=()=>SR7.PE.fxIcon({size:30}),SR7.PE.fxBadge=e=>SR7.PE.fxIcon({size:e||52,style:{display:"block",flex:"0 0 auto"}}),SR7.PE.fxMeta=(e,t)=>{const r=wp.element.createElement;return r(wp.element.Fragment,null,r("b",{style:{color:"#1e1e1e",fontWeight:600}},e),t?" · "+t:null)},SR7.PE.spriteIcon=e=>t=>{const r=wp.element.createElement,{size:n,...o}=t||{},s=n||24;return r("svg",Object.assign({width:s,height:s,viewBox:"0 0 36 36",role:"img","aria-hidden":!0,xmlns:"http://www.w3.org/2000/svg"},o),r("rect",{width:36,height:36,rx:5,fill:"#5c24ff"}),r("use",{href:"#"+e,xlinkHref:"#"+e,x:7,y:7,width:22,height:22,fill:"#fff"}))};const b=e=>(0,wp.element.createElement)("img",{src:e||(window.SR7&&SR7.E&&SR7.E.plugin_url||"")+"admin/assets/images/sr7placeholder.webp",style:{width:"100%",display:"block"},alt:""});SR7.PE.previewImage=b,SR7.PE.btnStyle={fontFamily:"'Inter',system-ui,sans-serif",fontWeight:600,boxShadow:"inset 0 0 0 1px #ccc",color:"#1e1e1e"};const v=()=>{if(document.getElementById("sr7pe-ess-css"))return;const e=SR7.PE.skin,t=document.createElement("style");t.id="sr7pe-ess-css",t.textContent=".sr7pe-tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 9px;margin:16px 0 20px}.sr7pe-tile{display:block;padding:0;overflow:hidden;border:1px solid #e0e0e0;border-radius:8px;background:#fff;cursor:pointer;text-align:left;font-family:'Inter',system-ui,sans-serif;transition:transform .18s,box-shadow .18s,border-color .18s}.sr7pe-tile-pv{display:block;position:relative;overflow:hidden;aspect-ratio:16/10;background:#f0f0f1}.sr7pe-tile-pv img{display:block;width:100%;height:100%;object-fit:cover}.sr7pe-tile-tx{display:flex;align-items:center;justify-content:center;width:100%;height:100%;padding:4px;font:700 12px/1.25 'Inter',system-ui,sans-serif;color:#1e1e1e;text-align:center;background:#f6f5fa}.sr7pe-tile-nm{display:block;padding:6px 6px 7px;border-top:1px solid #f0f0f1;font-size:10px;line-height:1.3;font-weight:600;color:#1e1e1e;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sr7pe-tile:hover{transform:translateY(-2px);border-color:"+e.accent+";box-shadow:0 10px 22px -12px rgba(0,0,0,.35)}.sr7pe-tile.is-on{border-color:"+e.accent+";box-shadow:0 0 0 1px "+e.accent+",0 8px 20px -10px "+e.accent+"}.sr7pe-tile.is-on .sr7pe-tile-nm{color:"+e.accent+";border-top-color:"+e.accent+"}.sr7pe-esslbl{margin:0 0 6px;font-size:11px;font-weight:500;line-height:1.4;text-transform:uppercase;color:#1e1e1e}.sr7pe-seg{display:flex;flex-wrap:wrap;gap:4px;margin:0 0 14px}.sr7pe-segbtn{flex:1 1 auto;padding:6px 8px;border:1px solid #dcdcde;border-radius:4px;background:#fff;font:500 11px/1.3 'Inter',system-ui,sans-serif;color:#1e1e1e;cursor:pointer;white-space:nowrap}.sr7pe-segbtn:hover{border-color:"+e.accent+";color:"+e.accent+"}.sr7pe-segbtn.on{border-color:"+e.accent+";background:"+e.accent+";color:#fff}",document.head.appendChild(t)},w=e=>{const t=wp.element.createElement,r=wp.element.useRef(null),n=()=>{try{r.current&&r.current()}catch(e){}r.current=null};return wp.element.useEffect(()=>n,[]),SR7.PE.resolveSkin(),v(),t("div",{className:"sr7pe-tiles",style:e.cols?{gridTemplateColumns:"repeat("+e.cols+",minmax(0,1fr))"}:null},(e.items||[]).map(o=>t("button",{key:o.key,type:"button",className:"sr7pe-tile"+(o.key===e.value?" is-on":""),onClick:()=>{n(),e.onPick&&e.onPick(o.key)},onMouseEnter:t=>{n();const s=t.currentTarget.querySelector("img,.sr7pe-tile-tx");e.onHover&&s&&(r.current=e.onHover(o.key,s)||null)},onMouseLeave:n},t("span",{className:"sr7pe-tile-pv"},o.art?t("img",{src:o.art,alt:"",draggable:!1}):o.text?t("span",{className:"sr7pe-tile-tx"},o.text):null),t("span",{className:"sr7pe-tile-nm",ref:e=>{e&&(e.title=e.scrollWidth>e.clientWidth&&o.label||"")}},o.label))))};SR7.PE.presetGrid=e=>wp.element.createElement(w,e||{}),SR7.PE.segRow=(e,t,r,n)=>{const o=wp.element.createElement;return SR7.PE.resolveSkin(),v(),o(wp.element.Fragment,null,o("div",{className:"sr7pe-esslbl"},e),o("div",{className:"sr7pe-seg"},(t||[]).map(e=>o("button",{key:e[0],type:"button",className:"sr7pe-segbtn"+(e[0]===r?" on":""),onClick:()=>n&&n(e[0])},e[1]))))};const y=()=>{if(document.getElementById("sr7pe-wb-css"))return;const e=SR7.PE.skin,t=document.createElement("style");t.id="sr7pe-wb-css",t.textContent=".sr7pe-wb{width:min(1180px,96vw);max-height:min(88vh,900px)}.sr7pe-wb .components-modal__content{padding-top:0;overflow:hidden;display:flex;flex-direction:column;min-height:0}.sr7pe-wb .components-modal__children-container{display:flex;flex-direction:column;flex:1 1 auto;min-height:0}.sr7pe-wb-split{display:grid;grid-template-columns:minmax(0,1fr) 330px;flex:0 1 auto;min-height:380px}.sr7pe-wb-cat{overflow-y:auto;min-height:0;padding:0 20px 8px 0}.sr7pe-wb-cfg{overflow-y:auto;overflow-x:hidden;min-height:0;border-left:1px solid #e0e0e0;padding:0 2px 24px 20px}.sr7pe-wb-cfg .sr7pe-inspector{width:auto}.sr7pe-wb .sr7pe-inspector .components-panel__body{margin:0}.sr7pe-wb-cfg .components-panel__body{margin:0}.sr7pe-wb .sr7pe-tiles{margin:8px 0 20px;gap:10px 8px}.sr7pe-wb .sr7pe-tile-nm{font-size:11px;padding:6px 6px 7px}.sr7pe-wb .sr7pe-esslbl{margin-top:4px}.sr7pe-wb .components-modal__header-heading{display:inline-flex;align-items:center;gap:5px}.sr7pe-wb .components-modal__header-heading .sr7pe-fxmark{flex:0 0 auto;display:block;width:64px;height:64px}.sr7pe-wb-foot{flex:0 0 auto;display:flex;align-items:center;justify-content:flex-end;gap:10px;margin:0;padding:14px 0 0;border-top:1px solid #e0e0e0}.sr7pe-wb-brand{margin-right:auto;display:inline-flex;align-items:center;gap:8px;white-space:nowrap;font:500 11px/1 "+e.font+";color:var(--pe-text-dim,#757575);letter-spacing:.01em;user-select:none}.sr7pe-wb-brand svg{display:block;flex:0 0 auto;opacity:.85}.sr7pe-wb-foot .sr7pe-cta-wrap{margin:0;flex:0 0 auto}.sr7pe-wb-foot .sr7pe-cta{width:auto;min-width:100px;padding:0 5px;white-space:nowrap}.sr7pe-wb-prev:hover{border-color:"+e.accent+";color:"+e.accent+"}.sr7pe-wb-off{margin:0 0 14px;padding:0 0 12px;border-bottom:1px solid #e0e0e0}.sr7pe-wb-off .components-base-control{margin-bottom:0}.sr7pe-pick{display:flex;align-items:center;gap:10px;margin:0 0 15px;padding:6px;border:1px solid #e0e0e0;border-radius:8px;background:#fff}.sr7pe-pick-thumb{flex:0 0 auto;width:52px;height:34px;border-radius:5px;background:#f0f0f1 center/cover no-repeat;display:flex;align-items:center;justify-content:center;font:700 11px/1 'Inter',system-ui,sans-serif;color:#5c24ff}.sr7pe-pick-name{flex:1;min-width:0;font:600 12px/1.3 'Inter',system-ui,sans-serif;color:#1e1e1e;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sr7pe-pick-sub{font-weight:400;color:#646970}.sr7pe-pick-btn{flex:0 0 auto}.sr7pe-pick-empty{width:100%;justify-content:center;margin:0 0 15px}.sr7pe-pick-hint{margin:0 0 15px;font-size:11px;line-height:1.45;color:#757575}@media (max-width:900px){.sr7pe-wb-split{display:block;min-height:0;overflow-y:auto}.sr7pe-wb-cat,.sr7pe-wb-cfg{overflow:visible;min-height:0}.sr7pe-wb-cat{padding-right:0}.sr7pe-wb-cfg{border-left:0;border-top:1px solid #e0e0e0;padding:16px 0 0}}",document.head.appendChild(t)};SR7.PE.workbench=e=>{const t=wp.element.createElement,r=wp.components.Modal;if(!r)return null;SR7.PE.resolveSkin(),v(),y(),SR7.PE.injectInspectorChrome();const n=t(wp.element.Fragment,null,SR7.PE.fxIcon({size:64,className:"sr7pe-fxmark",alt:SR7.t("Page FX")}),t("span",null,e.title||""));return t(r,{title:n,className:"sr7pe-wb "+(e.className||""),onRequestClose:e.onClose},t("div",{className:"sr7pe-wb-split"},t("div",{className:"sr7pe-wb-cat"},e.browse),t("div",{className:"sr7pe-wb-cfg"},t("div",{className:"sr7pe-inspector"},e.settings))),t("div",{className:"sr7pe-wb-foot"},t("span",{className:"sr7pe-wb-brand"},SR7.PE.markIcon(16),t("span",null,SR7.t("A Slider Revolution Feature"))),e.onEnable?SR7.PE.removeButton({label:e.enableLabel||SR7.t("Remove"),onRemove:()=>{e.onEnable(!1),e.onClose&&e.onClose()}}):null,t("button",{type:"button",className:"sr7pe-cta sr7pe-wb-prev",onClick:e=>{e.preventDefault(),SR7.PE.previewPost()}},SR7.t("Preview")),t("button",{type:"button",className:"sr7pe-cta sr7pe-cta-go sr7pe-wb-done",onClick:t=>{t.preventDefault(),e.onClose&&e.onClose()}},SR7.t("Done"))))},SR7.PE.pickRow=e=>{const t=wp.element.createElement;return SR7.PE.resolveSkin(),y(),e.label?t("div",{className:"sr7pe-pick"},t("span",{className:"sr7pe-pick-thumb",style:e.art?{backgroundImage:"url("+e.art+")"}:null},e.text||null),t("span",{className:"sr7pe-pick-name"},e.label,e.sub?t("span",{className:"sr7pe-pick-sub"}," · "+e.sub):null),e.onOpen?t(wp.components.Button,{variant:"tertiary",className:"sr7pe-pick-btn",onClick:e.onOpen},e.change):null):e.onOpen?t(wp.components.Button,{variant:"secondary",className:"sr7pe-pick-empty",onClick:e.onOpen},e.empty):t("p",{className:"sr7pe-pick-hint"},e.empty)};const k=(e,t,r)=>{const n=wp.element.createElement,o=wp.blockEditor.useBlockProps;wp.components.Button;return n("div",o({className:"sr7-pe-block"}),n("div",{style:f},SR7.PE.fxBadge(),n("div",{style:{flex:"1",minWidth:0}},n("div",{style:{color:"#646970",fontSize:"13px"}},SR7.PE.fxMeta(t.title,e.attributes.summary||SR7.t("Not set up yet — click Settings to draw your line.")))),n("button",{type:"button",className:"sr7pe-cta sr7pe-cta-go",onClick:r},SR7.t("Settings"))))},S={},E={},R=e=>"pe"+String(e||"").replace(/-/g,"").slice(0,12),C=e=>{const t=e.clientId||"";let r=e.attributes.effectId;r?S[r]&&S[r]!==t&&(r=R(t),e.setAttributes({effectId:r,summary:""})):(r=R(t),E[t]=1,e.setAttributes({effectId:r})),S[r]=t};SR7.PE.ensureEffectId=C,SR7.PE.seedPreset=(e,t)=>{const r=e.clientId||"";E[r]&&!1!==t()&&delete E[r]};let P=null;SR7.PE.ensureRuntime=(e,t)=>{const r=SR7.E&&SR7.E.plugin_url||"";if(!r||!window._tpt||!_tpt.checkResources)return Promise.reject(new Error("no SR7 loader in this editor"));SR7.E.resources??={};const n=(e,t)=>{SR7.E.resources[e]??=t,_tpt.regResource({id:e,url:SR7.E.resources[e]})};return P??=(()=>{const e=["srtools","defaults","module","canvas","draw","animate","transitions","media"];e.forEach(e=>n(e,r+"public/js/"+e+".js"));const t=e.slice();return _tpt.gsap||(n("tpgsap",r+"public/js/libs/tpgsap.js"),t.push("tpgsap")),_tpt.checkResources(t)})(),P.then(()=>{const e=[];return(t||[]).forEach(t=>{n(t,r+"public/js/libs/"+String(t).toLowerCase()+".js"),e.push(t)}),e.length?_tpt.checkResources(e):null}).then(()=>{const t=Object.keys(e||{});return t.forEach(t=>n(t,e[t])),t.length?_tpt.checkResources(t):null})};let I=!1;const N=(e,t,r)=>{const n=wp.data.select("core/editor").getCurrentPost(),o=wp.data.select("core/editor").getCurrentPostId();SR7.PE.openRecorder({type:r,postId:o,effectId:e.attributes.effectId,url:n&&n.link?n.link:"/?page_id="+o,onSaved:t=>{e.setAttributes({summary:String(t||""),savedAt:Date.now()})}})};let L=null;const _="<svg width='11' height='12' viewBox='0 0 11 12'><path d='M0.5 0.6l9.6 5.4-9.6 5.4z' fill='currentColor'/></svg>",M="<svg width='13' height='13' viewBox='0 0 16 16' fill='none' stroke='currentColor' stroke-width='1.5' stroke-linejoin='round'><path d='M2.2 3.4a1.2 1.2 0 011.2-1.2h7.2L13.8 5v7.6a1.2 1.2 0 01-1.2 1.2H3.4a1.2 1.2 0 01-1.2-1.2z'/><path d='M5.2 2.2v3.6h4.6V2.2M5.2 13.8V9.9h5.6v3.9'/></svg>",B="<svg width='16' height='16' viewBox='0 0 16 16' fill='currentColor'><circle cx='8' cy='3.3' r='1.35'/><circle cx='8' cy='8' r='1.35'/><circle cx='8' cy='12.7' r='1.35'/></svg>",F="<svg width='13' height='13' viewBox='0 0 16 16' fill='none' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M8 1.9v7.5M5.2 6.6L8 9.4l2.8-2.8'/><path d='M2.5 11.1v1.5a1.4 1.4 0 001.4 1.4h8.2a1.4 1.4 0 001.4-1.4v-1.5'/></svg>",O="<svg width='13' height='13' viewBox='0 0 16 16' fill='none' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M8 9.4V1.9M5.2 4.7L8 1.9l2.8 2.8'/><path d='M2.5 11.1v1.5a1.4 1.4 0 001.4 1.4h8.2a1.4 1.4 0 001.4-1.4v-1.5'/></svg>",A="<svg width='19' height='19' viewBox='0 0 20 20' fill='none' stroke='currentColor' stroke-width='1.6' stroke-linecap='round'><path d='M5.2 5.2l9.6 9.6M14.8 5.2l-9.6 9.6'/></svg>",j=(e,t,r)=>{const n=document.createElement("button");if(n.type="button",n.className="sr7pe-icobtn"+(t?" sr7pe-icobtn--wide":"")+(r?" "+r:""),n.innerHTML=e,t){const e=document.createElement("span");e.textContent=t,n.appendChild(e),n.__lbl=e}return n},H={wdesktop:'<svg viewBox="0 0 24 14" width="24" height="14" fill="currentColor"><path d="M11,16H3a3,3,0,0,1-3-3V8A3,3,0,0,1,3,5H21a3,3,0,0,1,3,3v5a3,3,0,0,1-3,3H13v1h2a1,1,0,0,1,0,2H9a1,1,0,0,1,0-2h2ZM3,7H21a1,1,0,0,1,1,1v5a1,1,0,0,1-1,1H3a1,1,0,0,1-1-1V8A1,1,0,0,1,3,7Z" transform="translate(0 -5)" fill-rule="evenodd"/></svg>',desktop:'<svg viewBox="0 0 22 18" width="22" height="18" fill="currentColor"><path d="M11,17H4a3,3,0,0,1-3-3V6A3,3,0,0,1,4,3H20a3,3,0,0,1,3,3v8a3,3,0,0,1-3,3H13v2h3a1,1,0,0,1,0,2H8a1,1,0,0,1,0-2h3ZM4,5H20a1,1,0,0,1,1,1v8a1,1,0,0,1-1,1H4a1,1,0,0,1-1-1V6A1,1,0,0,1,4,5Z" transform="translate(-1 -3)" fill-rule="evenodd"/></svg>',notebook:'<svg viewBox="0 0 22 16" width="22" height="16" fill="currentColor"><path d="M3,6A2,2,0,0,1,5,4H19a2,2,0,0,1,2,2v8a2,2,0,0,1-2,2H5a2,2,0,0,1-2-2ZM5,6H19v8H5Z" transform="translate(-1 -4)" fill-rule="evenodd"/><path d="M2,18a1,1,0,0,0,0,2H22a1,1,0,0,0,0-2Z" transform="translate(-1 -4)"/></svg>',tablet:'<svg viewBox="0 0 20 24" width="20" height="24" fill="currentColor"><path d="M16,23.955a.817.817,0,0,0,.6-.232.846.846,0,0,0,0-1.173.885.885,0,0,0-1.194,0,.846.846,0,0,0,0,1.173A.817.817,0,0,0,16,23.955ZM7.667,26a1.622,1.622,0,0,1-1.181-.477A1.564,1.564,0,0,1,6,24.364V3.636a1.564,1.564,0,0,1,.486-1.159A1.622,1.622,0,0,1,7.667,2H24.333a1.622,1.622,0,0,1,1.181.477A1.564,1.564,0,0,1,26,3.636V24.364a1.564,1.564,0,0,1-.486,1.159A1.622,1.622,0,0,1,24.333,26Zm0-4.091v2.455H24.333V21.909Zm0-1.636H24.333V6.091H7.667Zm0-15.818H24.333V3.636H7.667Z" transform="translate(-6 -2)"/></svg>',mobile:'<svg viewBox="0 0 14 20" width="14" height="20" fill="currentColor"><path d="M13,16H11v2h2Z" transform="translate(-5 -2)"/><path d="M5,4A2,2,0,0,1,7,2H17a2,2,0,0,1,2,2V20a2,2,0,0,1-2,2H7a2,2,0,0,1-2-2ZM7,4H17V20H7Z" transform="translate(-5 -2)" fill-rule="evenodd"/></svg>'},z=["wdesktop","desktop","notebook","tablet","mobile"],T=()=>{L?.devices&&L.devices.querySelectorAll(".sr7pe-device").forEach(e=>{e.classList.toggle("sr7pe-device--active",+e.dataset.lev===L.level)})},D=()=>{if(!L)return;const e=SR7.PE.deviceWidths[L.level],t=L.stage.clientWidth||9999;L.iframe.style.width=0===L.level||e>=t?"100%":e+"px"},V=()=>{if(!L||!L.ribbon)return;const e=SR7.PE.deviceLabels||SR7.PE.devices,t=SR7.t("live page");L.ribbon.textContent=(e[L.level]||"")+" · "+SR7.PE.deviceWidths[L.level]+"px · "+t},K=e=>{L&&L.save&&(L.dirty=!!e,L.save.classList.toggle("sr7pe-btn--dirty",!!e))},Z=e=>{if(!L||e===L.level)return;L.level=e,T(),D(),V();const t=L.win&&L.win.requestAnimationFrame||window.requestAnimationFrame;t(()=>t(()=>{L&&L.levelCb&&L.levelCb(L.level)}))},W={IMG:1,FIGURE:1,PICTURE:1,SVG:1,VIDEO:1,CANVAS:1,BUTTON:1,A:1,H1:1,H2:1,H3:1,H4:1,H5:1,H6:1,P:1,BLOCKQUOTE:1,UL:1,OL:1,LI:1,TABLE:1,SECTION:1,HEADER:1,FOOTER:1,ARTICLE:1,ASIDE:1,NAV:1},U=e=>window.CSS&&CSS.escape?CSS.escape(e):String(e).replace(/[^a-zA-Z0-9_-]/g,"\\$&"),G=e=>{const t=e.getAttribute&&e.getAttribute("class");return!(!t||!/\bwp-block-\S/.test(t))};SR7.PE.isWpBlock=G,SR7.PE.selectorFor=e=>{if(!e||1!==e.nodeType)return"";if(e.id)return"#"+U(e.id);const t=[];let r=e;for(;r&&1===r.nodeType&&"BODY"!==r.tagName&&"HTML"!==r.tagName;){if(r.id){t.unshift("#"+U(r.id));break}const e=r.tagName.toLowerCase();let n=1,o=r,s=!1;for(;o=o.previousElementSibling;)o.tagName===r.tagName&&n++;for(o=r;o=o.nextElementSibling;)if(o.tagName===r.tagName){s=!0;break}t.unshift(n>1||s?e+":nth-of-type("+n+")":e),r=r.parentElement}return t.join(" > ")};const J=(e,t)=>{if(!L||!L.doc)return null;const r=L.doc,n=r.elementFromPoint(e,t);if(!n||n===r.body||n===r.documentElement)return null;let o=null,s=n;for(;s&&s!==r.body;){if("SR7-MODULE"===s.tagName&&s.id||s.id||G(s)||W[s.tagName]){o=s;break}s=s.parentElement}o||(o=n);const a=SR7.PE.selectorFor(o);let i=!1;try{const e=r.querySelectorAll(a);i=1===e.length&&e[0]===o}catch(e){}return{selector:a,el:o,unique:i}};SR7.PE.openRecorder=e=>{L&&ce();const t=SR7.PE.types[e.type];if(!t||!t.tool)return void window.alert("Effect tool not loaded: "+e.type);SR7.PE.injectSkin();const r=document.createElement("div");r.className="sr7pe-overlay";const n=document.createElement("div");n.className="sr7pe-bar";const o=document.createElement("div");o.className="sr7pe-brand";const s=document.createElement("span");s.className="sr7pe-logo";const a=document.createElement("img");a.src=SR7.PE.fxMarkURL(),a.alt="",s.appendChild(a);const i=document.createElement("span"),p=document.createElement("em");p.textContent=t.label||t.title||"",i.appendChild(p),o.appendChild(s),o.appendChild(i);const l=document.createElement("div");l.id="sr7pe-devices",l.className="sr7pe-devices";const c=document.createElement("span");c.className="sr7pe-spacer";const d=document.createElement("input");d.type="file",d.accept="application/json,.json",d.className="sr7pe-file";const m=j(_,SR7.t("Preview")),u=m.__lbl,f=j(M,SR7.t("Save"),"sr7pe-icobtn--primary"),h=f.__lbl,x=document.createElement("span");x.className="sr7pe-dot",f.appendChild(x);const b=document.createElement("div");b.className="sr7pe-more";const v=j(B);b.appendChild(v);let w=null;const y=()=>{w&&(document.removeEventListener("mousedown",k,!0),w.remove(),w=null,v.classList.remove("open"))},k=e=>{w&&!b.contains(e.target)&&y()},S=(e,t,r)=>{const n=document.createElement("div");if(n.className="sr7pe-menu-item",e){const t=document.createElement("span");t.className="sr7pe-menu-ic",t.innerHTML=e,n.appendChild(t)}const o=document.createElement("span");return o.textContent=t,n.appendChild(o),n.onclick=()=>{y(),r()},n};v.onclick=e=>{if(e.stopPropagation(),w)return void y();w=document.createElement("div"),w.className="sr7pe-menu";const r=document.createElement("div");r.className="sr7pe-menu-lbl",r.textContent=t.menuLabel||SR7.t("Effect data"),w.appendChild(r),w.appendChild(S(F,SR7.t("Import…"),()=>{L&&L.impFile&&L.impFile.click()})),w.appendChild(S(O,SR7.t("Export…"),()=>oe())),b.appendChild(w),v.classList.add("open"),document.addEventListener("mousedown",k,!0)};const E=j(A);E.title=SR7.t("Close");const R=document.createElement("span");R.className="sr7pe-divider";const C=document.createElement("div");C.className="sr7pe-actions",[m,f,b,E].forEach(e=>C.appendChild(e)),[o,c,l,R,C,d].forEach(e=>n.appendChild(e));const P=document.createElement("div");P.className="sr7pe-body";const I=document.createElement("div");I.className="sr7pe-panel";const N=document.createElement("div");N.className="sr7pe-panel-body";const W=document.createElement("div");W.className="sr7pe-panel-foot",I.appendChild(N),I.appendChild(W);const U=document.createElement("div");U.className="sr7pe-stagewrap";const G=document.createElement("div");G.className="sr7pe-ribbon";const q=document.createElement("div");q.className="sr7pe-stage";const X=document.createElement("iframe");X.className="sr7pe-iframe",X.style.width="100%",q.appendChild(X),U.appendChild(G),U.appendChild(q),P.appendChild(I),P.appendChild(U),r.appendChild(n),r.appendChild(P),document.body.appendChild(r),L={opts:e,overlay:r,iframe:X,stage:q,ribbon:G,panel:N,panelFoot:W,devices:l,preview:m,previewLbl:u,save:f,saveLbl:h,impFile:d,closeMenu:y,dirty:!1,doc:null,win:null,tool:t.tool,level:1,levelCb:null},(()=>{if(!L?.devices)return;L.devices.innerHTML="";const e=SR7.PE.deviceLabels||SR7.PE.devices;SR7.PE.devices.forEach((t,r)=>{const n=z[r]||"desktop",o=document.createElement("button");o.type="button",o.className="sr7pe-device",o.dataset.lev=String(r),o.title=(e[r]||t)+" ("+SR7.PE.deviceWidths[r]+"px)",o.innerHTML=H[n]||H.desktop,o.onclick=()=>Z(r),L.devices.appendChild(o)}),T()})(),V(),d.onchange=()=>{const e=d.files&&d.files[0];d.value="",e&&se(e)},m.onclick=ae,f.onclick=le,E.onclick=()=>{L.dirty&&!window.confirm(SR7.t("Close without saving?"))||ce()},X.addEventListener("load",()=>{try{L.doc=X.contentDocument,L.win=X.contentWindow,L.doc.body}catch(e){return void window.alert("Cannot access the page (cross-origin). It must be on this site.")}const t={doc:L.doc,win:L.win,panel:N,footer:W,devices:l,bindPicker:J,getLevel:()=>L.level,onLevelChange:e=>{L.levelCb=e},markDirty:()=>K(!0)};L.handle=L.tool.mount(t)||{},D(),g("page_effects.get",{post_id:e.postId,effect_id:e.effectId}).then(e=>{const t=e&&e.success?e.stored:null;t&&t.data&&L.tool.load&&L.tool.load(t.data)})}),X.src=e.url+(e.url.indexOf("?")>-1?"&":"?")+"sr7pe_edit=1"};const q=(e,t)=>{const r=[];return e?(e.querySelectorAll("sr7-module[id]").forEach(e=>{const n=e.id,o=t&&t.SR7&&t.SR7.M&&t.SR7.M[n],s=o&&(o.alias||o.settings&&o.settings.alias)||e.getAttribute("data-alias")||e.dataset&&e.dataset.alias||"",a=String(n).match(/^SR7_(\d+)_(\d+)$/);r.push({htmlId:n,alias:String(s||""),sliderId:a?a[1]:"",instance:a?a[2]:"",el:e})}),r):r},X=e=>{const t=String(e||"").match(/^#(SR7_\d+_\d+)(?:-(.+))?$/);if(!t)return null;const r=t[1],n=t[2]||"";if(!n)return{htmlId:r,slideId:"",layerKey:""};const o=n.lastIndexOf("-");return o<0?{htmlId:r,slideId:n,layerKey:""}:{htmlId:r,slideId:n.slice(0,o),layerKey:n.slice(o+1)}},Q=(e,t)=>{const r=e&&e.SR7&&e.SR7.M&&e.SR7.M[t];if(!r||!r.slides)return[];const n={};(r.staticSlides||[]).forEach(e=>{e&&(n[String(e)]=!0)});let o=[];return o=Array.isArray(r.navSlideOrder)&&r.navSlideOrder.length?r.navSlideOrder.map(String):Array.isArray(r.slideOrder)&&r.slideOrder.length?r.slideOrder.map(String):Object.keys(r.slides),o.filter(e=>!(!e||"error"===e||!r.slides[e])&&(!n[String(e)]&&(!String(e).endsWith("_2")&&(!r.slides[e].slide||!r.slides[e].slide.global))))},$=(e,t,r,n)=>{const o=e&&e.SR7&&e.SR7.M&&e.SR7.M[t],s=o&&o.slides&&o.slides[r]&&o.slides[r].layers;return!(!s||null==n||""===n)&&(null!=s[n]||null!=s[String(n)])},Y=(e,t,r,n)=>{const o=Q(e,t);return o.length?null!=r&&r>=0&&o[r]?String(o[r]):null!=n&&""!==n&&o.indexOf(String(n))>=0?String(n):String(o[0]):""},ee=(e,t)=>{(e&&e.segments||[]).forEach(e=>(e.anchors||[]).forEach(t)),(e&&e.anchors||[]).forEach(t)},te=(e,t,r)=>{const n=q(t,r),o={};return n.forEach(e=>{o[e.htmlId]=e}),(e=>{const t=[];return ee(e,e=>{const r=X(e&&e.bind);r&&t.indexOf(r.htmlId)<0&&t.push(r.htmlId)}),t})(e).map(e=>o[e]||{htmlId:e,alias:"",sliderId:(String(e).match(/^SR7_(\d+)/)||[])[1]||"",instance:(String(e).match(/^SR7_\d+_(\d+)/)||[])[1]||""})},re=(e,t,r,n)=>{const o=JSON.parse(JSON.stringify(e||{})),s={ok:0,missing:[],remapped:0,aliasesNeeded:[],aliasesFound:t.map(e=>e.alias||e.htmlId)};return ee(o,e=>{if(!e||!e.bind)return;const o=e._export||null;o&&o.alias&&s.aliasesNeeded.indexOf(o.alias)<0&&s.aliasesNeeded.push(o.alias);const a=X(e.bind),i=((e,t,r)=>{if(e&&e.alias){const t=String(e.alias);let n=r.find(e=>e.alias&&e.alias===t);if(n)return n;const o=t.toLowerCase().trim();if(n=r.find(e=>e.alias&&e.alias.toLowerCase().trim()===o),n)return n}if(e&&e.sliderId){const t=r.find(t=>t.sliderId===String(e.sliderId));if(t)return t}if(t){const e=r.find(e=>e.htmlId===t.htmlId);if(e)return e;const n=(t.htmlId.match(/^SR7_(\d+)/)||[])[1];if(n){const e=r.find(e=>e.sliderId===n);if(e)return e}}return null})(o,a,t);if(!i)return void s.missing.push((o&&o.alias?o.alias+" / ":"")+e.bind);const p=o&&o.layerKey||a&&a.layerKey||"",l=o&&o.slideId||a&&a.slideId||"",c=o&&null!=o.slideIndex?o.slideIndex:null;let d="";d=p?((e,t,r,n,o,s)=>{if(!r||null==n||""===n)return"";const a=Q(t,r),i=e=>e&&$(t,r,e,n)?"#"+r+"-"+e+"-"+n:"";let p=i(Y(t,r,o,s));if(p)return p;for(let e=0;e<a.length;e++)if(p=i(a[e]),p)return p;const l=t&&t.SR7&&t.SR7.M&&t.SR7.M[r];if(l&&l.slides)for(const e of Object.keys(l.slides))if(p=i(e),p)return p;if(e){const t=e.querySelectorAll('[id^="'+r.replace(/"/g,"")+'-"]');for(let e=0;e<t.length;e++){const o=t[e].id;if(o.length<=r.length+1)continue;const s=o.slice(r.length+1),a=s.lastIndexOf("-");if(a>=0&&s.slice(a+1)===String(n))return"#"+o}}return""})(r,n,i.htmlId,p,c,l):l||null!=c?((e,t,r,n)=>{if(!t)return"";const o=Y(e,t,r,n);return o?"#"+t+"-"+o:"#"+t})(n,i.htmlId,c,l):"#"+i.htmlId,d?(d!==e.bind&&s.remapped++,e.bind=d,s.ok++,delete e._export):s.missing.push(e.bind+" → "+(i.alias||i.htmlId)+(p?" / layer "+p:""))}),{data:o,report:s}},ne=(e,t,r,n)=>new Promise(o=>{if(!e||!t||!r.length)return void o();n=n||{};const s=()=>{r.forEach(r=>{const n=e.getElementById(r.htmlId);if(n&&t.SR7&&t.SR7.F&&t.SR7.F.module&&t.SR7.F.module.init)try{t.SR7.F.module.init(n)}catch(e){}})};s();let a=0;const i=setInterval(()=>{a++,5!==a&&20!==a&&40!==a||s();const e=r.filter(e=>{const r=e.alias&&n[e.alias]||[];return!((e,t,r)=>{const n=e&&e.SR7&&e.SR7.M&&e.SR7.M[t];if(!n||!n.slides)return!1;const o=Object.keys(n.slides).filter(e=>"error"!==e&&n.slides[e]);return!!o.length&&(!(r||[]).length||r.every(r=>o.some(n=>$(e,t,n,r))))})(t,e.htmlId,r)});(!e.length||a>160)&&(clearInterval(i),o())},50)}),oe=()=>{if(!L||!L.tool||!L.tool.collect)return;const e=((e,t,r)=>{const n=JSON.parse(JSON.stringify(e||{})),o=q(t,r),s={};return o.forEach(e=>{s[e.htmlId]=e}),ee(n,e=>{if(!e||!e.bind)return;const t=X(e.bind);if(!t)return;const n=s[t.htmlId],o=Q(r,t.htmlId),a=t.slideId?o.indexOf(String(t.slideId)):-1;e._export={alias:n&&n.alias||"",sliderId:n&&n.sliderId||(t.htmlId.match(/^SR7_(\d+)/)||[])[1]||"",htmlId:t.htmlId,slideId:t.slideId||"",layerKey:t.layerKey||"",slideIndex:a>=0?a:null}}),n})(L.tool.collect(),L.doc,L.win);((e,t)=>{const r=new Blob([JSON.stringify(e,null,2)],{type:"application/json"}),n=document.createElement("a");n.href=URL.createObjectURL(r),n.download=t,document.body.appendChild(n),n.click(),setTimeout(()=>{try{URL.revokeObjectURL(n.href)}catch(e){}n.remove()},500)})({format:"sr7-page-effect",version:2,type:L.opts.type,exportedAt:(new Date).toISOString(),source:{postId:L.opts.postId,effectId:L.opts.effectId,url:L.opts.url||""},modules:te(e,L.doc,L.win).map(e=>({htmlId:e.htmlId,alias:e.alias,sliderId:e.sliderId,instance:e.instance})),data:e},"sr7-"+String(L.opts.type||"effect").replace(/[^a-z0-9_-]/gi,"")+"-"+String(L.opts.effectId||"pe").replace(/[^a-z0-9_-]/gi,"")+".json")};SR7.PE.exportEffect=oe;const se=e=>{if(!L||!L.tool||!L.tool.load)return;const t=new FileReader;t.onerror=()=>window.alert(SR7.t("Could not read the file.")),t.onload=()=>{let e;try{e=JSON.parse(String(t.result||""))}catch(e){return void window.alert(SR7.t("Invalid JSON file."))}let r=e.type||L.opts.type,n=e.data,o=e.modules||[];if("sr7-page-effect"===e.format?(r=e.type,n=e.data,o=e.modules||[]):n||!e.segments&&!e.anchors||(n=e,r=L.opts.type),!n||"object"!=typeof n)return void window.alert(SR7.t("This file has no effect data."));if(r&&r!==L.opts.type)return void window.alert(SR7.t("This export is for a different effect type.")+" ("+r+")");n=((e,t)=>{const r={};return(t||[]).forEach(e=>{e&&e.htmlId&&(r[e.htmlId]=e)}),ee(e,e=>{if(!e||!e.bind)return;const t=X(e.bind);if(!t)return;const n=r[t.htmlId]||{},o=e._export||{};e._export={alias:o.alias||n.alias||"",sliderId:o.sliderId||n.sliderId||(t.htmlId.match(/^SR7_(\d+)/)||[])[1]||"",htmlId:o.htmlId||t.htmlId,slideId:null!=o.slideId&&""!==o.slideId?o.slideId:t.slideId||"",layerKey:null!=o.layerKey?o.layerKey:t.layerKey||"",slideIndex:null!=o.slideIndex?o.slideIndex:null}}),e})(JSON.parse(JSON.stringify(n)),o);const s=q(L.doc,L.win);if(!s.length)return void window.alert(SR7.t("No Slider Revolution modules found on this page. Place the same modules first, then import."));const a=[];ee(n,e=>{const t=e&&e._export&&e._export.alias;t&&a.indexOf(t)<0&&a.push(t)}),(o||[]).forEach(e=>{e&&e.alias&&a.indexOf(e.alias)<0&&a.push(e.alias)});const i=s.map(e=>e.alias).filter(Boolean),p=a.filter(e=>!i.some(t=>t===e||t.toLowerCase()===e.toLowerCase()));if(p.length)return void window.alert(SR7.t("This page is missing the modules this chalk line was bound to.")+"\n\n"+SR7.t("Needed aliases:")+"\n• "+p.join("\n• ")+"\n\n"+SR7.t("Modules on this page:")+"\n• "+(i.length?i.join("\n• "):"(none with alias)")+"\n\n"+SR7.t("Import the same SR modules (same aliases) onto this page, then try Import again."));var l;l=SR7.t("Importing…"),L&&L.ribbon&&(L.ribbon.textContent=l);const c=(e=>{const t={};return ee(e,e=>{const r=e&&e._export;if(!r||!r.alias)return;const n=null!=r.layerKey?String(r.layerKey):"";n&&(t[r.alias]||(t[r.alias]=[]),t[r.alias].indexOf(n)<0&&t[r.alias].push(n))}),t})(n);ne(L.doc,L.win,s,c).then(()=>{const e=q(L.doc,L.win),{data:t,report:r}=re(n,e,L.doc,L.win);L.tool.load((e=>{const t=JSON.parse(JSON.stringify(e||{}));return ee(t,e=>{e&&delete e._export}),t})(t)),K(!0),V();let o=SR7.t("Imported. Click Save to store on this page.");o+="\n"+SR7.t("Anchors linked:")+" "+r.ok,r.remapped&&(o+="\n"+SR7.t("Binds remapped to local module/slide ids:")+" "+r.remapped),r.missing.length&&(o+="\n\n"+SR7.t("Could not match these anchors:")+"\n"+r.missing.map(e=>"• "+e).join("\n"),o+="\n\n"+SR7.t("Page modules:")+" "+(r.aliasesFound.join(", ")||"(none)"),o+="\n\n"+SR7.t("Wait for modules to finish loading in Live Edit, then Import again.")),window.alert(o)})},t.readAsText(e)};SR7.PE.importEffectFile=se;const ae=()=>{if(!L||!L.tool||!L.tool.collect)return;const e="SliderRevolutionPageEffectPreview";let t=window.open("",e);try{t&&t.document&&(t.document.title="Slider Revolution Preview",t.document.body||t.document.write("<!doctype html><title>Slider Revolution Preview</title><body></body>"),t.document.body&&(t.document.body.innerHTML='<div style="font-family:system-ui,sans-serif;padding:16px;">'+SR7.t("Loading preview…")+"</div>"))}catch(e){}pe(SR7.t("Previewing…")),g("page_effects.preview",{post_id:L.opts.postId,effect_id:L.opts.effectId,type:L.opts.type,effect:JSON.stringify(L.tool.collect())}).then(r=>{if(pe(SR7.t("Preview")),!(r&&r.success&&r.effect_id&&r.token)){window.alert(SR7.t("Preview failed."));try{t&&t.close()}catch(e){}return}let n=L.opts.url;const o=n.indexOf("?")>-1?"&":"?";if(n+=o+"sr7pe_preview=1&pe_id="+encodeURIComponent(r.effect_id)+"&pe_token="+encodeURIComponent(r.token),t){try{t.location.replace(n)}catch(e){t.location.href=n}try{t.focus()}catch(e){}}else window.open(n,e)}).catch(()=>{pe(SR7.t("Preview")),window.alert(SR7.t("Preview failed."));try{t&&t.close()}catch(e){}})};SR7.PE.previewLive=ae;const ie=e=>{L&&L.saveLbl&&(L.saveLbl.textContent=e)},pe=e=>{L&&L.previewLbl&&(L.previewLbl.textContent=e)},le=()=>{L&&L.tool.collect&&(ie(SR7.t("Saving…")),g("page_effects.save",{post_id:L.opts.postId,effect_id:L.opts.effectId,type:L.opts.type,effect:JSON.stringify(L.tool.collect())}).then(e=>{e&&e.success?(K(!1),ie(SR7.t("Saved ✓")),L.save.classList.add("sr7pe-btn--saved"),L.opts.onSaved&&L.opts.onSaved(e.summary||""),setTimeout(()=>{L&&(ie(SR7.t("Save")),L.save.classList.remove("sr7pe-btn--saved"))},1500)):ie(SR7.t("Save (error)"))}).catch(()=>ie(SR7.t("Save (error)"))))},ce=()=>{if(L){try{L.closeMenu&&L.closeMenu()}catch(e){}try{L.tool&&L.tool.destroy&&L.tool.destroy()}catch(e){}L.overlay&&L.overlay.remove(),L=null}};SR7.PE.closeRecorder=ce;const de=()=>{!I&&window.wp&&wp.blocks&&(I=!0,Object.keys(e.types).forEach(t=>{const r=e.types[t];r.self_block||wp.blocks.registerBlockType(r.block,{apiVersion:3,title:SR7.PE.fxTitle(r.title),keywords:["Slider Revolution","SR7","themepunch","Page FX",r.title],category:"themepunch",icon:r.spriteIcon?{src:SR7.PE.spriteIcon(r.spriteIcon),background:"#5c24ff",foreground:"#fff"}:SR7.PE.logoIcon(),description:r.description,attributes:{effectId:{type:"string",default:""},summary:{type:"string",default:""},previewMode:{type:"boolean",default:!1},savedAt:{type:"number",default:0}},example:{attributes:{previewMode:!0}},edit:e=>{if(e.attributes.previewMode)return b(r.preview);C(e);const n=SR7.PE.types[t];return(n&&n.card?n.card:k)(e,r,()=>N(e,r,t))},save:()=>null})})),SR7.PE.mountToolbarMenu()};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",de):de()})();