@cntrl-site/components 1.0.118-alpha.4 → 1.0.118-alpha.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/{Burger-DyORh_vF.mjs → Burger-C8JIQQwm.mjs} +330 -307
  2. package/dist/Burger-C_SjPZWp.js +669 -0
  3. package/dist/{ChroniclesComponent-DVoJ0kdT.mjs → ChroniclesComponent-Bf8jxaas.mjs} +512 -442
  4. package/dist/ChroniclesComponent-XAHXrzRb.js +1 -0
  5. package/dist/Components/Burger/Burger.d.ts +4 -2
  6. package/dist/Components/Grid/CustomGridComponent.d.ts +41 -0
  7. package/dist/Components/Grid/Grid.d.ts +27 -7
  8. package/dist/Components/helpers/SvgImage/loadSvgMaskUrl.d.ts +0 -7
  9. package/dist/{ControlSlider-3w-bHQEg.mjs → ControlSlider-BBAXRDLP.mjs} +3 -4
  10. package/dist/ControlSlider-BCkVFl4w.js +1 -0
  11. package/dist/{FAQ-GmiwRdFq.mjs → FAQ-CJHCMSBa.mjs} +1 -1
  12. package/dist/{FAQ-7HEkaoU6.js → FAQ-DLh63Utr.js} +1 -1
  13. package/dist/Grid-Dwn03N-q.mjs +1853 -0
  14. package/dist/Grid-pyPdnAeI.js +445 -0
  15. package/dist/{Hive-34KvKNsa.js → Hive-CzabuuCc.js} +1 -1
  16. package/dist/{Hive-7xHXyMM1.mjs → Hive-DyxYd5eg.mjs} +1 -1
  17. package/dist/{HiveLightboxTitles-BCoL46-V.mjs → HiveLightboxTitles-DhEeFKWs.mjs} +1 -1
  18. package/dist/{HiveLightboxTitles-DEeyQGcf.js → HiveLightboxTitles-DlyptAaK.js} +1 -1
  19. package/dist/{Lightbox-DzPqgKP4.mjs → Lightbox-BY99NS14.mjs} +1 -1
  20. package/dist/{Lightbox-Cb7lyaNt.js → Lightbox-DZckgBzK.js} +1 -1
  21. package/dist/{LightboxJournal-DisD2DLv.mjs → LightboxJournal-BDUs6T0B.mjs} +1 -1
  22. package/dist/{LightboxJournal-B-vul_be.js → LightboxJournal-Bf_rZzmz.js} +1 -1
  23. package/dist/{LightboxStrip-wCHUhAqN.mjs → LightboxStrip-Cuhb2fIR.mjs} +1 -1
  24. package/dist/{LightboxStrip-YDyEPEb6.js → LightboxStrip-RA4ABUC-.js} +1 -1
  25. package/dist/{Mercury-BmhtFYOw.js → Mercury-B-s2Kvuq.js} +1 -1
  26. package/dist/{Mercury-Q788wrYQ.mjs → Mercury-CCW0Es-s.mjs} +1 -1
  27. package/dist/{OnelinerForm-D8WIB9Qy.mjs → OnelinerForm-BEu7_sho.mjs} +1 -1
  28. package/dist/{OnelinerForm-CUmY-bXL.js → OnelinerForm-C2Y_XMCY.js} +1 -1
  29. package/dist/{SimpleButton-DTpzfmb6.mjs → SimpleButton-C-o2W9bS.mjs} +1 -1
  30. package/dist/{SimpleButton-DtaCYa3y.js → SimpleButton-nGEcO2gB.js} +1 -1
  31. package/dist/{Slider20-q0iGgnE3.js → Slider20-BOmjDRf2.js} +1 -1
  32. package/dist/{Slider20-CKngROrc.mjs → Slider20-DUi6qwnd.mjs} +1 -1
  33. package/dist/SvgImage-B5mR9y6q.mjs +51 -0
  34. package/dist/SvgImage-DFlmxAoL.js +1 -0
  35. package/dist/{TestimonialSingle-CpEUendN.js → TestimonialSingle-BORQom3u.js} +1 -1
  36. package/dist/{TestimonialSingle-Bax71Hyo.mjs → TestimonialSingle-DrnyReim.mjs} +1 -1
  37. package/dist/{Waterfall-znaoynn5.mjs → Waterfall-3kKioKh2.mjs} +1 -1
  38. package/dist/{Waterfall-B9YWMhrg.js → Waterfall-DII4-WV5.js} +1 -1
  39. package/dist/{components-eK82xypT.mjs → components-IX-rNSn-.mjs} +30 -653
  40. package/dist/components-QVeWZKot.js +1 -0
  41. package/dist/components.css +1 -1
  42. package/dist/elements.js +1 -1
  43. package/dist/elements.mjs +24 -24
  44. package/dist/elements.node.js +1 -1
  45. package/dist/elements.node.mjs +1 -1
  46. package/dist/index.d.ts +1 -3
  47. package/dist/index.js +1 -1
  48. package/dist/index.mjs +36 -63
  49. package/dist/loadSvgMaskUrl-DfF7ay6h.js +1 -0
  50. package/dist/loadSvgMaskUrl-xHgGYgPe.mjs +20 -0
  51. package/dist/sources.js +676 -244
  52. package/dist/sources.mjs +717 -284
  53. package/dist/types/Component.d.ts +0 -7
  54. package/dist/types/SchemaV1.d.ts +0 -3
  55. package/package.json +1 -1
  56. package/dist/Burger-B4kXX9aY.js +0 -669
  57. package/dist/ChroniclesComponent-Nm_yIRmr.js +0 -1
  58. package/dist/Components/PopupMenu/PopupMenu.d.ts +0 -73
  59. package/dist/Components/PopupMenu/PopupMenuComponent.d.ts +0 -594
  60. package/dist/Components/PopupMenu/popupMenuLayout.d.ts +0 -203
  61. package/dist/Components/PopupMenu/popupMenuSnap.d.ts +0 -61
  62. package/dist/ControlSlider-DB4nbVLT.js +0 -1
  63. package/dist/Grid-BuRdth9A.mjs +0 -1622
  64. package/dist/Grid-tqSSYh2-.js +0 -408
  65. package/dist/PopupMenu-CYdDyzEt.mjs +0 -1372
  66. package/dist/PopupMenu-Di1fHgho.js +0 -409
  67. package/dist/SvgImage-CwRq9-ec.mjs +0 -56
  68. package/dist/SvgImage-_QN8ngad.js +0 -1
  69. package/dist/components-BYoTPJk3.js +0 -1
  70. package/dist/loadSvgMaskUrl-B6kHUyof.js +0 -1
  71. package/dist/loadSvgMaskUrl-DUhCVvpl.mjs +0 -39
@@ -1,409 +0,0 @@
1
- "use strict";const x=require("react/jsx-runtime"),$=require("react"),ao=require("react-dom"),me=require("./scalingValue-CSHYgTZl.js"),so=require("./useScopedStyles-Bf6yohVQ.js"),ce=require("./EmbedMediaFrame-DsOTKE4i.js"),lo=require("./useLightboxScrollLock-Hf16Eq4g.js"),co=require("./textStylesToCss-CNN3zZTV.js"),uo=require("./RichTextRenderer-DEFXh5o6.js"),ho=require("./SvgImage-_QN8ngad.js"),ge=60,$e=900/1440,be=["left","center","right"],Ft={columns:12,columnWidth:99/1440,gutter:20/1440};function ve(t,e=Ft){const o=l=>typeof l=="number"&&Number.isFinite(l),r=(l,...h)=>h.find(o)??l,i=t.gridLayout??{},s=Math.max(0,r(e.gutter,i.horizontalGap,t.gridGutter));return{columns:Math.max(1,Math.round(r(e.columns,i.columnsCount,t.gridColumns))),columnWidth:Math.max(0,r(e.columnWidth,i.entryWidth,t.gridColumnWidth)),gutter:s,rowGap:Math.max(0,r(s,t.verticalGap))}}function tt(t){return t.rowGap??t.gutter}function Gt(t){const e=t.popupHeight;return Math.min(100,Math.max(0,typeof e=="number"&&Number.isFinite(e)?e:ge))}function xe(t,e=$e){return Gt(t)/100*e}function po(t){return be.includes(t.popupAlign)?t.popupAlign:"center"}function ye(t,e){var i;const o=(i=t.gridLayout)==null?void 0:i.wrapperWidth,r=e.columns*e.columnWidth+(e.columns-1)*e.gutter;return typeof o=="number"&&Number.isFinite(o)&&o>0?Math.max(o,r):r>0?r:1}function Me(t){if(typeof t=="number")return{top:t,right:t,bottom:t,left:t};const e=o=>typeof o=="number"&&Number.isFinite(o)?Math.max(0,o):0;return{top:e(t==null?void 0:t.top),right:e(t==null?void 0:t.right),bottom:e(t==null?void 0:t.bottom),left:e(t==null?void 0:t.left)}}function kt(t){const e=Math.max(1,Math.floor(t.columns));return t.columnWidth>0?t.columnWidth:Math.max(0,(1-(e-1)*t.gutter)/e)}function H(t){const e=Math.max(1,Math.floor(t.columns));return e*kt(t)+(e-1)*t.gutter}function Dt(t){const e=Math.max(1,Math.floor(t.columns)),o=kt(t),r=o+t.gutter;return Array.from({length:e},(i,s)=>[U(s*r),U(s*r+o)]).flat()}function St(t,e,o,r,i){const s=kt(t),l={left:U(e*(s+t.gutter)),width:U(o*s+Math.max(0,o-1)*t.gutter),top:r};return i===void 0?l:{...l,height:i}}function Rt(){return 8/1440}function we(t){const e=Math.max(1,Math.floor(t.columns));return St(t,0,Math.min(e,Math.max(1,Math.round(e/4))),0)}function ke(t){const e=t;return typeof e.left=="number"&&Number.isFinite(e.left)&&typeof e.width=="number"&&Number.isFinite(e.width)}function Se(t,e){if(ke(t))return t;const o=Math.max(1,Math.floor(e.columns)),r=Math.min(o,Math.max(1,Math.round(t.span??1))),i=Math.min(Math.max(0,Math.round(t.column??0)),o-r);return St(e,i,r,t.top,typeof t.height=="number"?t.height:void 0)}function Re(t){return t.placements.every(ke)?t:{...t,placements:t.placements.map(e=>Se(e,t.grid))}}const Ee={span:{text:{min:1/4,max:5/12},image:{min:1/6,max:1/3},listA:{min:1/6,max:1/4},listB:{min:1/6,max:1/4}},breakChance:.25};function Le(t,e,o,r,i=Ee){const s=go(o),l=Math.max(1,Math.floor(e.columns)),h=[];let u=0,d=new Array(l).fill(!1);const n={};for(const w of t){const p=n[w]??(n[w]=mo(i.span[w]??i.span.text,l,s));let g=ue(d,p);const I=d.some(Boolean);(g.length===0||I&&s()<i.breakChance)&&(u+=1,d=new Array(l).fill(!1),g=ue(d,p));const j=g[Math.floor(s()*g.length)];for(let M=Math.max(0,j-1);M<Math.min(l,j+p+1);M++)d[M]=!0;h.push({column:j,span:p,row:u})}const m=u+1,R={...e,columns:l};return{seed:o,grid:R,placements:h.map(({column:w,span:p,row:g})=>St(R,w,p,_e(e,g*r/m,r)))}}function _e(t,e,o=1/0){const r=t.beat??0,i=Math.max(0,o),s=r>0?Math.round(e/r)*r:e,l=s<=i?s:r>0?Math.floor(i/r+1e-9)*r:i;return Math.round(Math.max(0,l)*1e6)/1e6}function Ut(t){return t.beat&&t.beat>0?t.beat:8/1440}function fo(t,e,o=1/0){const r=t.beat??0,i=Ut(t),s=r>0?Math.round(e/r)*r:e,l=s<=o?s:r>0?Math.floor(o/r+1e-9)*r:o;return U(Math.max(i,l))}function Ie(t,e){const o=(r,i)=>Math.abs(r-i)<1e-9;return Math.floor(t.columns)===Math.floor(e.columns)&&o(t.columnWidth,e.columnWidth)&&o(t.gutter,e.gutter)&&o(tt(t),tt(e))&&o(t.beat??0,e.beat??0)}function Ce(t,e){const o={...e,columns:Math.max(1,Math.floor(e.columns))};if(Ie(t.grid,o))return t;const r=H(t.grid),i=H(o),s=r>0?i/r:1,l=t.placements.map(h=>{const u=U(Math.min(i,Math.max(Rt(),h.width*s))),d=U(Math.min(Math.max(0,h.left*s),i-u));return h.height===void 0?{left:d,width:u,top:h.top}:{left:d,width:u,top:h.top,height:h.height}});return{...t,grid:o,placements:l}}function U(t){return Math.round(t*1e6)/1e6}function Ne(t,e,o,r,i){return t.left<o.left+o.width-1e-9&&o.left<t.left+t.width-1e-9&&t.top<o.top+r+i-1e-9&&o.top<t.top+e+i-1e-9}function Ae(t,e,o,r,i){const s=t.placements[e];return s?ze(t,e,{...s,left:o,top:r},i):null}function Te(t,e,o,r){if(!t.placements[e])return null;const i=H(t.grid),s=Math.min(Rt(),i),l=Ut(t.grid),h=Math.min(Math.max(0,o.left),i-s),u=Math.min(Math.max(s,o.width),i-h),d=Math.min(Math.max(0,o.top),r?Math.max(0,r.height-l):1/0),n=o.height===void 0?void 0:Math.min(Math.max(l,o.height),r?Math.max(l,r.height-d):1/0);return ze(t,e,n===void 0?{left:h,width:u,top:d}:{left:h,width:u,top:d,height:n},r)}function ze(t,e,o,r){const i=tt(t.grid),s=H(t.grid),l=U(Math.min(Math.max(o.width,Math.min(Rt(),s)),s)),h=o.height??(r==null?void 0:r.heights[e])??0,u={left:U(Math.min(Math.max(0,o.left),s-l)),width:l,top:U(Math.min(Math.max(0,o.top),r?Math.max(0,r.height-h):1/0)),...o.height===void 0?{}:{height:U(o.height)}};return r&&t.placements.some((d,n)=>n!==e&&Ne(u,h,d,r.heights[n]??0,i))?null:{...t,edited:!0,placements:t.placements.map((d,n)=>n===e?u:d)}}function Be(t,e){const o=H(t.grid),r=Dt(t.grid).filter((p,g)=>g%2===0),i=tt(t.grid),s=t.grid.beat??0,l=e.height,h=t.placements.map((p,g)=>e.heights[g]??0),u=[...t.placements],d=u.map((p,g)=>g).sort((p,g)=>u[p].top-u[g].top||p-g),n=[],m=(p,g)=>{let{top:I}=p;for(let j=!0,M=0;j&&M<=n.length;M++){j=!1;for(const A of n){const y=u[A];if(!Ne({...p,top:I},g,y,h[A],i))continue;const E=y.top+h[A]+i,b=s>0?U(Math.ceil(E/s-1e-9)*s):Math.ceil(E*1e6-1e-6)/1e6;b<=I||(I=b,j=!0)}}return I},R=(p,g)=>p+g>l+1e-9;let w=!1;for(const p of d){const g=u[p];let I={left:g.left,top:m(g,h[p])};if(I.top!==g.top&&R(I.top,h[p])){const j=r.filter(A=>A+g.width<=o+1e-9).sort((A,y)=>Math.abs(A-g.left)-Math.abs(y-g.left)||A-y);let M=null;for(const A of j){const y=m({...g,left:A},h[p]);!R(y,h[p])&&(!M||y<M.top-1e-9)&&(M={left:A,top:y})}M&&(I=M)}(I.left!==g.left||I.top!==g.top)&&(u[p]={...u[p],...I},w=!0),n.push(p)}return w?{...t,placements:u}:t}function mo(t,e,o){const r=Math.max(1,Math.round(t.min*e)),i=Math.max(r,Math.round(t.max*e));return Math.min(e,r+Math.floor(o()*(i-r+1)))}function ue(t,e){const o=[];for(let r=0;r+e<=t.length;r++){let i=!0;for(let s=r;s<r+e;s++)if(t[s]){i=!1;break}i&&o.push(r)}return o}function go(t){let e=t>>>0;return()=>{e=e+1831565813>>>0;let o=e;return o=Math.imul(o^o>>>15,o|1),o^=o+Math.imul(o^o>>>7,o|61),((o^o>>>14)>>>0)/4294967296}}const he=5,gt=t=>Array.from(new Set(t.map(e=>Math.round(e*1e6)/1e6)));function $o(t,e){const o=t.beat||tt(t);if(!(o>0))return[];const r=[];for(let i=1;i*o<=e+1e-9;i++)r.push(i*o);return r}function bo(t,e,o,r=[]){const i=H(t.grid),s=tt(t.grid),l=t.grid.beat??0,h=[0,i/2,i,...Dt(t.grid)],u=[0,o.height];if(l>0)for(let n=l;n<o.height;n+=l)u.push(n);const d=$o(t.grid,o.height);return t.placements.forEach((n,m)=>{if(m===e)return;const R=n.height??o.heights[m]??0;h.push(n.left,n.left+n.width/2,n.left+n.width),u.push(n.top,n.top+R/2,n.top+R),s>0&&u.push(n.top-s,n.top+R+s);const w=r[m];typeof w=="number"&&d.push(n.top+w)}),{xs:gt(h),ys:gt(u.filter(n=>n>=0)),baselines:gt(d)}}function Mt(t,e,o){let r=null;for(const i of t)for(const s of e){const l=s-i;Math.abs(l)<=o&&(r===null||Math.abs(l)<Math.abs(r))&&(r=l)}return r}function vo(t,e){return t===null?e:e===null?t:Math.abs(e)<Math.abs(t)?e:t}function je(t,e){const o=(r,i)=>i.filter(s=>r.some(l=>Math.abs(l-s)<1e-5));return{xs:gt(o(t.xs,e.xs)),ys:gt([...o(t.ys,e.ys),...o(t.baselines??[],e.baselines??[])])}}function xo(t,e,o,r,i,s,l,h,u){const{width:d}=t;let n=t.left+o,m=t.top+r;const R=typeof u=="number";return n+=Mt([n,n+d/2,n+d],i.xs,s.x)??0,m+=vo(Mt([m,m+e/2,m+e],i.ys,s.y),R?Mt([m+u],i.baselines??[],s.y):null)??0,n=Math.min(Math.max(0,n),Math.max(0,l-d)),m=Math.min(Math.max(0,m),Math.max(0,h-e)),{placement:{...t,left:n,top:m},guides:je({xs:[n,n+d/2,n+d],ys:[m,m+e/2,m+e],baselines:R?[m+u]:[]},i)}}function yo(t,e,o,r,i,s,l,h,u,d,{keepRatio:n=!1,fromCenter:m=!1}={}){const R=Math.min(Rt(),h),w=o.includes("left"),p=o.includes("right"),g=o.includes("top"),I=o.includes("bottom"),j=w||p,M=g||I,A=t.left+t.width/2,y=t.top+e/2;let E=t.left,b=t.left+t.width,C=t.top,T=t.top+e;const q=(S,G,F)=>S+(Mt([S],G,F)??0);let V=!1,Z=!1;if(w){const S=t.left+r;E=q(S,s.xs,l.x),V=E!==S,m&&(b=2*A-E)}else if(p){const S=t.left+t.width+r;b=q(S,s.xs,l.x),V=b!==S,m&&(E=2*A-b)}if(g){const S=t.top+i;C=q(S,s.ys,l.y),Z=C!==S,m&&(T=2*y-C)}else if(I){const S=t.top+e+i;T=q(S,s.ys,l.y),Z=T!==S,m&&(C=2*y-T)}if(n&&j&&M&&t.width>0&&e>0){const S=t.width/e,G=Math.abs(b-E),F=Math.abs(T-C);if(V!==Z?V:Math.abs(G/t.width-1)>=Math.abs(F/e-1)){const O=G/S;m?[C,T]=[y-O/2,y+O/2]:g?C=T-O:T=C+O}else{const O=F*S;m?[E,b]=[A-O/2,A+O/2]:w?E=b-O:b=E+O}}const $t=(S,G,F,et,O)=>G-S>=F?[S,G]:m?[O-F/2,O+F/2]:et?[G-F,G]:[S,S+F];j&&([E,b]=$t(E,b,R,w,A)),M&&([C,T]=$t(C,T,d,g,y)),E=Math.max(0,E),b=Math.min(h,Math.max(E+R,b)),C=Math.max(0,C),M&&(T=Math.min(Math.max(u,C+d),Math.max(C+d,T)));const at={left:E,width:b-E,top:C},st=M?T-C:t.height;return st!==void 0&&(at.height=st),{placement:at,guides:je({xs:j?m||n?[E,b]:[w?E:b]:[],ys:M?m||n?[C,T]:[g?C:T]:[]},s)}}const P=300,Mo=3e3,Ht=["slide down","slide up","fade","scale","none"],wo="slide down";function ko(t){const e=t.popupTransition;return Ht.includes(e)?e:wo}const Oe=["burger","plus","icon","text"],So=24/1440,We=["--cntrl-article-top","--cntrl-article-left","--cntrl-article-width","--cntrl-viewport-height"];function Ro(t){const e=getComputedStyle(t);return Object.fromEntries(We.map(o=>[o,e.getPropertyValue(o).trim()]).filter(([,o])=>o))}function Eo(t){const e=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(!e)return t;let o=t;for(let r=o.parentElement;r&&getComputedStyle(r).getPropertyValue("--cntrl-article-width").trim()===e;r=r.parentElement)o=r;return o}const Lo=["top","right","bottom","left","top-left","top-right","bottom-right","bottom-left"],_o=["right","left"],Io=["top","right","bottom","left"],Co=["right","left"],No=3;function Ot(t,e,o){const{start:r,startHeight:i,handle:s,lines:l,measure:h,unitX:u,unitY:d}=e,n=(o.x-e.origin.x)/u,m=(o.y-e.origin.y)/d,R={x:he/u,y:he/d},w=H(t.grid),p=s?yo(r,i,s,n,m,l,R,w,h.height,Ut(t.grid),{keepRatio:o.shiftKey,fromCenter:o.altKey}):xo(r,i,n,m,l,R,w,h.height,e.baseline);return{...e,pointer:o,placement:p.placement,guides:p.guides}}function de(t,e){return{...e,heights:e.heights.map((o,r)=>{var i;return((i=t.placements[r])==null?void 0:i.height)??o})}}function Ao(t,e){return t.left===e.left&&t.width===e.width&&t.top===e.top&&t.height===e.height}function To(t){const o=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode:s=>{var l;return(l=s.textContent)!=null&&l.trim()?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}}).nextNode();if(!(o!=null&&o.parentNode))return null;const r=document.createElement("span");r.style.cssText="display:inline-block;width:0;height:0;margin:0;padding:0;border:0;vertical-align:baseline",o.parentNode.insertBefore(r,o);const i=r.getBoundingClientRect().bottom;return r.remove(),i-t.getBoundingClientRect().top}const zo={leftRight:'<g fill="none" transform="translate(7 8)"><path fill-rule="evenodd" clip-rule="evenodd" d="m7 0v6.006h-1.021v-3.466l-5.979 5.472 5.979 5.461v-3.478h1.021v6.005h.02 3.961v-6.006h1.058v3.467l5.961-5.473-5.961-5.461v3.478h-1.058v-6.005z" fill="#fff"/><path d="m16.34 7.989-3.32-3.223v2.254h-3.02v-5.96h-.019v-.02h-1.941v6h-3.06v-2.28l-3.32 3.251 3.32 3.224v-2.254h3.06v6h.02 1.921.019v-6h3.02v2.259z" fill="#000"/></g>',topBottom:'<g fill="none" transform="translate(8 7)"><path fill-rule="evenodd" clip-rule="evenodd" d="m7.988 0-5.461 5.962h3.478v1.038h-6.005v.019 3.942.02h6.005v1.058h-3.466l5.472 5.961 5.462-5.961h-3.478v-1.058h6.005v-3.981h-6.006v-1.038h3.467z" fill="#fff"/><path d="m14.961 8.02h-5.981v-3.039h2.26l-3.251-3.32-3.223 3.32h2.254v3.039h-5.98-.02v1.96h.02 6v3.04h-2.28l3.251 3.32 3.223-3.32h-2.253v-3.04h5.98.02v-1.96z" fill="#000"/></g>',diagonalRight:'<g fill="none" transform="translate(9 9)"><path fill-rule="evenodd" clip-rule="evenodd" d="m9.743 7.087-4.072 4.068 2.829 2.828-8.473-.013-.013-8.47 2.841 2.842 4.075-4.068 1.414-1.415-2.844-2.842h8.486v8.484l-2.83-2.827z" fill="#fff"/><path d="m8.683 6.733-4.427 4.424 1.828 1.828-5.056-.016-.014-5.054 1.842 1.841 4.428-4.422 2.474-2.475-1.844-1.843h5.073v5.071l-1.83-1.828z" fill="#000"/></g>',diagonalLeft:'<g fill="none" transform="translate(9 9)"><path fill-rule="evenodd" clip-rule="evenodd" d="m4.257 7.087 4.072 4.068-2.829 2.828 8.473-.013.013-8.47-2.841 2.842-4.075-4.068-1.414-1.415 2.844-2.842h-8.486v8.484l2.829-2.827z" fill="#fff"/><path d="m5.317 6.733 4.427 4.424-1.828 1.828 5.056-.016.014-5.054-1.842 1.841-4.428-4.422-2.474-2.475 1.844-1.843h-5.073v5.071l1.83-1.828z" fill="#000"/></g>'},Bo={leftRight:"ew-resize",topBottom:"ns-resize",diagonalRight:"nesw-resize",diagonalLeft:"nwse-resize"},K=Object.fromEntries(Object.entries(zo).map(([t,e])=>{const o=`<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" fill="none">${e}</svg>`;return[t,`url("data:image/svg+xml,${encodeURIComponent(o)}") 16 16, ${Bo[t]}`]})),pe=40;function fe(t,e){return e.handle?Te(t,e.index,e.placement,e.measure):Ae(t,e.index,e.placement.left,e.placement.top,e.measure)}function jo(t){return`
2
- /* the element is the trigger alone, placed and sized on the page as any other element; the popup opens over the page */
3
- .${t}-root {
4
- position: relative;
5
- width: 100%;
6
- height: 100%;
7
- box-sizing: border-box;
8
- }
9
- /* fills the element's box, its icon or text centred in it inside its padding */
10
- .${t}-button {
11
- all: unset;
12
- box-sizing: border-box;
13
- display: flex;
14
- align-items: center;
15
- justify-content: center;
16
- width: 100%;
17
- height: 100%;
18
- cursor: pointer;
19
- white-space: nowrap;
20
- color: var(--${t}-trigger-color);
21
- background-color: var(--${t}-trigger-bg);
22
- }
23
- /* an icon trigger's lines, as thick as a twelfth of it and a pixel at least, drawn in the trigger's colour */
24
- .${t}-icon {
25
- position: relative;
26
- display: block;
27
- flex: none;
28
- width: var(--${t}-icon-size);
29
- height: var(--${t}-icon-size);
30
- --${t}-icon-stroke: max(1px, calc(var(--${t}-icon-size) / 12));
31
- transition: transform ${P}ms ease;
32
- }
33
- .${t}-icon-line {
34
- position: absolute;
35
- left: 0;
36
- width: 100%;
37
- height: var(--${t}-icon-stroke);
38
- top: calc(50% - var(--${t}-icon-stroke) / 2);
39
- background-color: currentColor;
40
- transition: transform ${P}ms ease, opacity ${P}ms ease;
41
- }
42
- /* three lines, the outer two meeting in the middle and crossing as the popup opens, the middle one fading */
43
- .${t}-icon-burger .${t}-icon-line:nth-child(1) { transform: translateY(calc(var(--${t}-icon-size) * -0.3)) rotate(0deg) scaleX(1); }
44
- .${t}-icon-burger .${t}-icon-line:nth-child(3) { transform: translateY(calc(var(--${t}-icon-size) * 0.3)) rotate(0deg) scaleX(1); }
45
- .${t}-button-open .${t}-icon-burger .${t}-icon-line:nth-child(1) { transform: translateY(0) rotate(45deg) scaleX(1); }
46
- .${t}-button-open .${t}-icon-burger .${t}-icon-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
47
- .${t}-button-open .${t}-icon-burger .${t}-icon-line:nth-child(3) { transform: translateY(0) rotate(-45deg) scaleX(1); }
48
- /* a plus, turned an eighth as the popup opens, into a cross */
49
- .${t}-icon-plus .${t}-icon-line:nth-child(2) { transform: rotate(90deg); }
50
- .${t}-button-open .${t}-icon-plus { transform: rotate(45deg); }
51
- /* the user's image, fitted to the icon's size: an SVG tinted with the trigger's colour, anything else as it is */
52
- .${t}-icon-picture {
53
- display: block;
54
- width: 100%;
55
- height: 100%;
56
- }
57
- @media (prefers-reduced-motion: reduce) {
58
- .${t}-icon,
59
- .${t}-icon-line {
60
- transition: none;
61
- }
62
- }
63
- .${t}-button:focus-visible {
64
- outline: 1px solid currentColor;
65
- outline-offset: 2px;
66
- }
67
- /* the popup opens over the whole screen, out of the element's box (it is portalled out of it); in the editor, over
68
- the whole article as it is drawn on the canvas */
69
- .${t}-overlay {
70
- position: fixed;
71
- inset: 0;
72
- z-index: 9997;
73
- pointer-events: none;
74
- overflow: hidden;
75
- }
76
- .${t}-overlay-editor {
77
- inset: auto;
78
- top: var(--cntrl-article-top, 0);
79
- left: var(--cntrl-article-left, 0);
80
- width: var(--cntrl-article-width, 100vw);
81
- height: var(--cntrl-viewport-height, 100vh);
82
- }
83
- .${t}-overlay-active {
84
- pointer-events: auto;
85
- }
86
- /* the trigger drawn again over the popup, where it is on the page, so that its cross shows above the popup and closes
87
- it; the page's own trigger, under the overlay, is hidden meanwhile */
88
- .${t}-overlay .${t}-close {
89
- position: absolute;
90
- z-index: 1;
91
- }
92
- /* on the canvas, where the popup is pinned open, it lets the blocks under it be taken */
93
- .${t}-overlay .${t}-close-inert {
94
- pointer-events: none;
95
- }
96
- .${t}-button-hidden {
97
- opacity: 0;
98
- }
99
- .${t}-backdrop {
100
- all: unset;
101
- position: absolute;
102
- inset: 0;
103
- background-color: var(--${t}-overlay-color);
104
- /* the page behind blurred, the blur fading in and out with the overlay's colour */
105
- -webkit-backdrop-filter: var(--${t}-overlay-blur, none);
106
- backdrop-filter: var(--${t}-overlay-blur, none);
107
- opacity: 0;
108
- transition: opacity ${P}ms ease;
109
- }
110
- .${t}-card {
111
- position: absolute;
112
- box-sizing: border-box;
113
- /* content reaching below the popup's bottom scrolls, within the popup alone */
114
- overflow-x: hidden;
115
- overflow-y: auto;
116
- overscroll-behavior: contain;
117
- background-color: var(--${t}-popup-bg);
118
- opacity: 0;
119
- transition: opacity ${P}ms ease, transform ${P}ms ease;
120
- }
121
- /* where the popup comes in from and goes back to, by its transition; it fades in and out with each, and 'none'
122
- shows and hides the popup and its overlay at once */
123
- .${t}-transition-slide-down .${t}-card {
124
- transform: translateY(24px);
125
- }
126
- .${t}-transition-slide-up .${t}-card {
127
- transform: translateY(-24px);
128
- }
129
- .${t}-transition-scale .${t}-card {
130
- transform: scale(0.95);
131
- }
132
- .${t}-transition-none .${t}-backdrop,
133
- .${t}-transition-none .${t}-card {
134
- transition: none;
135
- }
136
- @media (prefers-reduced-motion: reduce) {
137
- .${t}-overlay .${t}-card {
138
- transform: none;
139
- }
140
- }
141
- .${t}-overlay-active .${t}-backdrop,
142
- .${t}-overlay-active .${t}-card {
143
- opacity: 1;
144
- transform: none;
145
- }
146
- /* one cell, which every block shares: its left and width a share of the grid's width, its top from a spacer above
147
- it. The cell is as tall as the popup at least, and as tall as the lowest block reaches where that is further,
148
- the popup scrolling down to it */
149
- .${t}-grid {
150
- position: relative;
151
- display: grid;
152
- grid-template-columns: minmax(0, 1fr);
153
- grid-template-rows: auto;
154
- min-height: 100%;
155
- }
156
- /* the lines a block being moved or resized has snapped to, as the article draws them */
157
- .${t}-snaps {
158
- position: absolute;
159
- inset: 0;
160
- z-index: 4;
161
- pointer-events: none;
162
- }
163
- .${t}-snap {
164
- position: absolute;
165
- background-color: rgba(255, 48, 0, 0.7);
166
- }
167
- .${t}-snap-x {
168
- top: 0;
169
- bottom: 0;
170
- width: 1px;
171
- transform: translateX(-0.5px);
172
- }
173
- .${t}-snap-y {
174
- left: 0;
175
- right: 0;
176
- height: 1px;
177
- transform: translateY(-0.5px);
178
- }
179
- /* the grid the blocks snap to, drawn as the article's is while a block is moved or resized: a hairline at both
180
- edges of every column, and one across every beat from the popup's top, or, with no beat, every vertical gap */
181
- .${t}-guides {
182
- position: absolute;
183
- inset: 0;
184
- z-index: 2;
185
- display: grid;
186
- grid-template-rows: minmax(0, 1fr);
187
- pointer-events: none;
188
- opacity: 0;
189
- transition: opacity 200ms ease;
190
- --${t}-guide-color: var(--cntrl-grid-color, rgba(255, 92, 2, 0.45));
191
- }
192
- .${t}-guides-shown {
193
- opacity: 1;
194
- }
195
- .${t}-guides-beats {
196
- background-image: repeating-linear-gradient(
197
- to bottom,
198
- var(--${t}-guide-color) 0 1px,
199
- transparent 1px var(--${t}-beat)
200
- );
201
- }
202
- .${t}-guide {
203
- grid-row: 1;
204
- box-shadow: inset 1px 0 var(--${t}-guide-color), inset -1px 0 var(--${t}-guide-color);
205
- }
206
- /* the block and, on the canvas, the handles it is resized by, which sit on its edges outside any scroller */
207
- .${t}-frame {
208
- position: relative;
209
- display: flex;
210
- flex-direction: column;
211
- flex: none;
212
- min-width: 0;
213
- min-height: 0;
214
- }
215
- .${t}-slot {
216
- display: flex;
217
- flex-direction: column;
218
- grid-area: 1 / 1;
219
- min-width: 0;
220
- min-height: 0;
221
- pointer-events: none;
222
- }
223
- .${t}-spacer {
224
- flex: none;
225
- }
226
- .${t}-block {
227
- flex: none;
228
- min-width: 0;
229
- pointer-events: auto;
230
- }
231
- /* the text's box runs from the first line's cap height to the last line's baseline, where the browser can
232
- trim it: a title lines up with the top of an image beside it, and the block is no taller than its text */
233
- .${t}-block.${t}-block-text,
234
- .${t}-block.${t}-block-listA,
235
- .${t}-block.${t}-block-listB {
236
- text-box: trim-both cap alphabetic;
237
- }
238
- .${t}-block-title {
239
- color: var(--${t}-title-color);
240
- }
241
- .${t}-block-text {
242
- color: var(--${t}-text-color);
243
- }
244
- .${t}-block-text a {
245
- color: inherit;
246
- }
247
- .${t}-block-listA .${t}-block-text {
248
- color: var(--${t}-list-a-color, var(--${t}-text-color));
249
- }
250
- .${t}-block-listB .${t}-block-text {
251
- color: var(--${t}-list-b-color, var(--${t}-text-color));
252
- }
253
- .${t}-block-listA .${t}-block-text a,
254
- .${t}-block-listB .${t}-block-text a {
255
- text-decoration: none;
256
- }
257
- .${t}-block-listA .${t}-block-text a:hover,
258
- .${t}-block-listB .${t}-block-text a:hover {
259
- text-decoration: underline;
260
- }
261
- .${t}-images {
262
- display: grid;
263
- }
264
- /* every image takes the same cell, so the block is as tall as its tallest image and keeps still as they change */
265
- .${t}-image {
266
- display: block;
267
- grid-area: 1 / 1;
268
- width: 100%;
269
- height: auto;
270
- object-fit: cover;
271
- }
272
- /* a block resized to a height: its images fill it, cut to it */
273
- .${t}-block-sized .${t}-images {
274
- height: 100%;
275
- grid-template-rows: minmax(0, 100%);
276
- }
277
- .${t}-block-sized .${t}-image {
278
- height: 100%;
279
- }
280
- .${t}-image {
281
- transition: opacity 800ms ease-in-out;
282
- }
283
- .${t}-image-hidden {
284
- opacity: 0;
285
- }
286
- @media (prefers-reduced-motion: reduce) {
287
- .${t}-image {
288
- transition: none;
289
- }
290
- }
291
- .${t}-grid-editable .${t}-block {
292
- cursor: default;
293
- touch-action: none;
294
- user-select: none;
295
- }
296
- .${t}-grid-editable .${t}-block * {
297
- pointer-events: none;
298
- }
299
- .${t}-slot-dragged {
300
- z-index: 1;
301
- }
302
- /* the editor's chrome, as an article's items have it: a 2px outline on the block the pointer is over, a hairline
303
- border round the one selected, vermilion for text and grey for images, and the handles it is resized by */
304
- .${t}-frame::before,
305
- .${t}-box {
306
- content: '';
307
- position: absolute;
308
- inset: 0;
309
- z-index: 2;
310
- box-sizing: border-box;
311
- pointer-events: none;
312
- }
313
- .${t}-grid-editable:not(.${t}-grid-busy) .${t}-frame:not(.${t}-frame-selected):hover::before {
314
- box-shadow: inset 0 0 0 1px #FF4400, 0 0 0 1px #FF4400;
315
- }
316
- .${t}-box {
317
- border: 0.5px solid var(--${t}-box-color, #ACACAC);
318
- }
319
- .${t}-grid-editable .${t}-block-invalid {
320
- opacity: 0.5;
321
- }
322
- .${t}-box-invalid {
323
- border-style: dashed;
324
- }
325
- /* the side a handle reshapes the block by, as a structured block's: while its handle is pointed at or dragged, the
326
- block's edge thickens to 5px out of a 1px line, and thins back after. A corner thickens both sides it moves */
327
- .${t}-edge {
328
- position: absolute;
329
- z-index: 3;
330
- background-color: #FF5C02;
331
- pointer-events: none;
332
- opacity: 0;
333
- transition: opacity 0.15s ease, transform 0.15s ease;
334
- }
335
- .${t}-edge-left,
336
- .${t}-edge-right {
337
- top: 0;
338
- bottom: 0;
339
- width: 5px;
340
- transform: scaleX(0.2);
341
- }
342
- .${t}-edge-left { left: -2.5px; }
343
- .${t}-edge-right { right: -2.5px; }
344
- .${t}-edge-top,
345
- .${t}-edge-bottom {
346
- left: 0;
347
- right: 0;
348
- height: 5px;
349
- transform: scaleY(0.2);
350
- }
351
- .${t}-edge-top { top: -2.5px; }
352
- .${t}-edge-bottom { bottom: -2.5px; }
353
- .${t}-frame:has(> .${t}-handle-left:hover, > .${t}-handle-top-left:hover, > .${t}-handle-bottom-left:hover) > .${t}-edge-left,
354
- .${t}-frame:has(> .${t}-handle-right:hover, > .${t}-handle-top-right:hover, > .${t}-handle-bottom-right:hover) > .${t}-edge-right,
355
- .${t}-frame:has(> .${t}-handle-top:hover, > .${t}-handle-top-left:hover, > .${t}-handle-top-right:hover) > .${t}-edge-top,
356
- .${t}-frame:has(> .${t}-handle-bottom:hover, > .${t}-handle-bottom-left:hover, > .${t}-handle-bottom-right:hover) > .${t}-edge-bottom,
357
- .${t}-edge-shown {
358
- opacity: 1;
359
- transform: none;
360
- }
361
- @media (prefers-reduced-motion: reduce) {
362
- .${t}-edge {
363
- transition: none;
364
- }
365
- }
366
- /* a handle is an 11px strip along an edge, or a 22px square on a corner, centred on it and drawn by the edge it
367
- thickens alone; on a block under 40px, outside it, so that the block is still there to be taken */
368
- .${t}-handle {
369
- position: absolute;
370
- z-index: 3;
371
- pointer-events: auto;
372
- touch-action: none;
373
- }
374
- .${t}-handle-left,
375
- .${t}-handle-right {
376
- top: 50%;
377
- width: 11px;
378
- height: max(0px, calc(100% - 22px));
379
- }
380
- .${t}-handle-top,
381
- .${t}-handle-bottom {
382
- left: 50%;
383
- width: max(0px, calc(100% - 22px));
384
- height: 11px;
385
- }
386
- .${t}-handle-top-left,
387
- .${t}-handle-top-right,
388
- .${t}-handle-bottom-right,
389
- .${t}-handle-bottom-left {
390
- width: 22px;
391
- height: 22px;
392
- }
393
- .${t}-handle-right { right: 0; transform: translate(50%, -50%); cursor: ${K.leftRight}; }
394
- .${t}-handle-left { left: 0; transform: translate(-50%, -50%); cursor: ${K.leftRight}; }
395
- .${t}-handle-top { top: 0; transform: translate(-50%, -50%); cursor: ${K.topBottom}; }
396
- .${t}-handle-bottom { bottom: 0; transform: translate(-50%, 50%); cursor: ${K.topBottom}; }
397
- .${t}-handle-top-left { top: 0; left: 0; transform: translate(-50%, -50%); cursor: ${K.diagonalLeft}; }
398
- .${t}-handle-top-right { top: 0; right: 0; transform: translate(50%, -50%); cursor: ${K.diagonalRight}; }
399
- .${t}-handle-bottom-right { bottom: 0; right: 0; transform: translate(50%, 50%); cursor: ${K.diagonalLeft}; }
400
- .${t}-handle-bottom-left { bottom: 0; left: 0; transform: translate(-50%, 50%); cursor: ${K.diagonalRight}; }
401
- .${t}-handles-outer .${t}-handle-right { transform: translate(100%, -50%); }
402
- .${t}-handles-outer .${t}-handle-left { transform: translate(-100%, -50%); }
403
- .${t}-handles-outer .${t}-handle-top { transform: translate(-50%, -100%); }
404
- .${t}-handles-outer .${t}-handle-bottom { transform: translate(-50%, 100%); }
405
- .${t}-handles-outer .${t}-handle-top-left { transform: translate(-100%, -100%); }
406
- .${t}-handles-outer .${t}-handle-top-right { transform: translate(100%, -100%); }
407
- .${t}-handles-outer .${t}-handle-bottom-right { transform: translate(100%, 100%); }
408
- .${t}-handles-outer .${t}-handle-bottom-left { transform: translate(-100%, 100%); }
409
- `}function mt(t,e,o,r){const i=u=>t[`${e}${u}`]??(r?t[`${r}${u}`]:void 0),s=u=>{const d=i(u);return d===void 0?void 0:me.scalingValue(d,o)},l=i("FontSettings"),h=i("TextAppearance");return{fontFamily:co.normalizeFontFamilyCssValue(i("FontFamily")),fontWeight:l==null?void 0:l.fontWeight,fontStyle:l==null?void 0:l.fontStyle,fontSize:s("FontSize"),lineHeight:s("LineHeight"),letterSpacing:s("LetterSpacing"),wordSpacing:s("WordSpacing"),textTransform:h==null?void 0:h.textTransform,textDecoration:h==null?void 0:h.textDecoration,fontVariant:h==null?void 0:h.fontVariant}}function wt(t){const e=t.type??"text";return e==="list"?"listA":e}function Oo(t,e,o,r){return t!=null&&t.grid&&Array.isArray(t.placements)&&t.placements.every(i=>typeof(i==null?void 0:i.top)=="number")?Wo(Ce(Re(t),r),e):Le(e.map(wt),r,1,o)}function Wo(t,e){const o=(r,i)=>r.height!==void 0&&e[i]&&wt(e[i])!=="image";return t.placements.some(o)?{...t,placements:t.placements.map((r,i)=>{if(!o(r,i))return r;const{height:s,...l}=r;return l})}:t}function Fo(t,e){const o=(r,i)=>Math.abs(r-i)<1e-4;return o(t.height,e.height)&&t.heights.length===e.heights.length&&t.heights.every((r,i)=>o(r,e.heights[i]))}function Wt(t,e){const o=t.placements[e];if(!o)return we(t.grid);const r=H(t.grid),i=Math.min(o.width,r),s={left:Math.min(Math.max(0,o.left),r-i),width:i,top:o.top};return typeof o.height=="number"?{...s,height:o.height}:s}function Fe({settings:t,content:e=[],isEditor:o,isEditMode:r,isPreviewMode:i,portalId:s,currentState:l,unavailableStates:h=[],onOpenChange:u,onUpdateSettings:d}){var ae,se;const{prefix:n}=so.useScopedStyles(),m=$.useMemo(()=>jo(n),[n]),[R,w]=$.useState(!1),[p,g]=$.useState(!1),[I,j]=$.useState(!1),M=!!(o&&!i),A=M&&l==="open"&&!h.includes("open"),y=A||!M&&R,E=ko(t);lo.useLightboxScrollLock(y&&!M),$.useEffect(()=>{u==null||u(y)},[y,u]),$.useEffect(()=>{if(y){g(!0);return}j(!1);const a=window.setTimeout(()=>g(!1),E==="none"?0:P);return()=>window.clearTimeout(a)},[y,E]),$.useEffect(()=>{if(!y||!p)return;const a=ut.current;a&&getComputedStyle(a.querySelector("[role=dialog]")??a).opacity;const c=requestAnimationFrame(()=>j(!0));return()=>cancelAnimationFrame(c)},[y,p]),$.useEffect(()=>{if(!y||M)return;const a=c=>{c.key==="Escape"&&w(!1)};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[y,M]);const b=a=>me.scalingValue(a??0,o),C=xe(t),T=(ae=t.menuLayout)==null?void 0:ae.grid,q=ve(t,T!=null&&T.columnWidth?T:Ft),V=`min(100%, ${b(ye(t,q))})`,Z=b(t.popupOffset),$t={left:`calc(0px + ${Z})`,center:`calc((100% - ${V}) / 2 + ${Z})`,right:`calc(100% - ${V} + ${Z})`}[po(t)],{columns:at,columnWidth:st,gutter:S,rowGap:G}=q,F=$.useMemo(()=>({columns:at,columnWidth:st,gutter:S,rowGap:G}),[at,st,S,G]),[et,O]=$.useState(null),Xt=et&&et.from===t.menuLayout?et.layout:t.menuLayout;$.useEffect(()=>{O(a=>a&&a.from!==t.menuLayout?null:a)},[t.menuLayout]);const lt=$.useMemo(()=>Oo(Xt,e,C,F),[Xt,e,C,F]),[Et,Ge]=$.useState(null),ot=$.useMemo(()=>Et?de(lt,Et):null,[lt,Et]),z=$.useMemo(()=>ot?Be(lt,ot):lt,[lt,ot]),{columns:ct,gutter:Lt,columnWidth:_t}=z.grid,De=ct*_t+(ct-1)*Lt,bt=_t>0?{gridTemplateColumns:`repeat(${ct}, minmax(0, ${b(_t)}))`,columnGap:b(Lt),width:`min(100%, ${b(De)})`,marginInline:"auto"}:{gridTemplateColumns:`repeat(${ct}, minmax(0, 1fr))`,columnGap:b(Lt)},Ue={width:bt.width,marginInline:bt.marginInline},Vt=H(z.grid),It=a=>`${a/(Vt||1)*100}%`,Yt=t.triggerLabel||"Menu",vt=Me(t.triggerPadding),nt=t.triggerType==="icon"&&!t.triggerIcon?"burger":t.triggerType??"text",He=mt(t,"trigger",o),Xe=mt(t,"title",o),Ve={text:mt(t,"text",o),listA:mt(t,"listA",o,"text"),listB:mt(t,"listB",o,"text")},J=((se=t.stateOverrides)==null?void 0:se.open)??{},Kt={[`--${n}-trigger-bg`]:t.barBackgroundColor,[`--${n}-trigger-color`]:(y?J.triggerColor:void 0)??t.triggerColor,[`--${n}-overlay-color`]:J.overlayColor??t.overlayColor,[`--${n}-overlay-blur`]:t.overlayBlur?`blur(${b(t.overlayBlur)})`:void 0,[`--${n}-popup-bg`]:J.popupBackgroundColor??t.popupBackgroundColor,[`--${n}-title-color`]:J.titleColor??t.titleColor,[`--${n}-text-color`]:J.textColor??t.textColor,[`--${n}-list-a-color`]:J.listAColor??t.listAColor,[`--${n}-list-b-color`]:J.listBColor??t.listBColor},qt=$.useRef(null),[Ye,Zt]=$.useState(void 0);$.useLayoutEffect(()=>{const a=qt.current;if(!p||!o||!a){Zt(void 0);return}const c=()=>Zt(_=>{const B=Ro(a);return _&&We.every(k=>_[k]===B[k])?_:B});if(c(),typeof ResizeObserver>"u")return;const f=new ResizeObserver(c);f.observe(a);const L=new MutationObserver(c),v=Eo(a);return v!==a&&(f.observe(v),L.observe(v,{attributes:!0,attributeFilter:["style"]})),()=>{f.disconnect(),L.disconnect()}},[p,o]);const ut=$.useRef(null),Jt=$.useRef(null),Qt=$.useRef(null),Ct=$.useRef(null),ht=$.useRef([]),[W,Ke]=$.useState(null),dt=$.useRef(null),rt=a=>{dt.current=a,Ke(a)},Q=$.useRef(null),X=!!(A&&r&&d),qe=W?fe(z,W):null,[Nt,At]=$.useState(null),Ze=X&&Nt!==null&&Nt<e.length?Nt:null,[Tt,Je]=$.useState(0);$.useEffect(()=>{X||(Q.current=null,rt(null),At(null),O(null))},[X]);const[zt,Pt]=$.useState(null);$.useLayoutEffect(()=>{const a=Jt.current;if(!p||!a){Pt(null);return}const c=()=>{const L=ut.current;if(!L)return;const v=L.getBoundingClientRect(),_=a.getBoundingClientRect(),B={top:_.top-v.top,left:_.left-v.left,width:_.width,height:_.height};Pt(k=>k&&k.top===B.top&&k.left===B.left&&k.width===B.width&&k.height===B.height?k:B)};c();const f=new ResizeObserver(c);return f.observe(a),window.addEventListener("resize",c),window.addEventListener("scroll",c,{capture:!0,passive:!0}),()=>{f.disconnect(),window.removeEventListener("resize",c),window.removeEventListener("scroll",c,{capture:!0})}},[p]),$.useLayoutEffect(()=>{const a=Qt.current,c=Ct.current;if(!p||!a||!c)return;const f=()=>{var B;const v=(B=ut.current)==null?void 0:B.getBoundingClientRect().width;if(!v)return;const _={height:a.getBoundingClientRect().height/v,heights:e.map((k,it)=>{var Y;return(((Y=ht.current[it])==null?void 0:Y.getBoundingClientRect().height)??0)/v})};Ge(k=>k&&Fo(k,_)?k:_),Je(v)};f();const L=new ResizeObserver(f);return L.observe(a),L.observe(c),ht.current.slice(0,e.length).forEach(v=>v&&L.observe(v)),()=>L.disconnect()},[p,e]);const Qe=(a,c,f)=>{!X||!z.placements[c]||a.button!==0||(a.preventDefault(),a.stopPropagation(),a.currentTarget.setPointerCapture(a.pointerId),Q.current={index:c,handle:f,pointerId:a.pointerId,origin:{x:a.clientX,y:a.clientY}},At(c))},Pe=({index:a,handle:c,pointerId:f,origin:L},v)=>{var yt;const _=Ct.current;if(!_||!z.placements[a])return null;const B=_.getBoundingClientRect(),k=((yt=ut.current)==null?void 0:yt.getBoundingClientRect().width)||1,it=B.width/(Vt||1)||k,Y=Wt(z,a),pt=de(z,{height:B.height/k,heights:e.map((ft,N)=>{var D;return(((D=ht.current[N])==null?void 0:D.getBoundingClientRect().height)??0)/k})}),xt=e.map((ft,N)=>{const D=ht.current[N];if(!D||wt(ft)==="image")return null;const le=To(D);return le===null?null:le/k});return Ot(z,{index:a,pointerId:f,handle:c,origin:L,unitX:it,unitY:k,start:Y,startHeight:Y.height??pt.heights[a]??0,placement:Y,measure:pt,baseline:xt[a]??null,lines:bo(z,a,pt,xt),guides:{xs:[],ys:[]},pointer:v},v)},to=a=>{const c={x:a.clientX,y:a.clientY,shiftKey:a.shiftKey,altKey:a.altKey},f=dt.current;if(f){if(a.pointerId!==f.pointerId)return;a.stopPropagation(),rt(Ot(z,f,c));return}const L=Q.current;if(!L||a.pointerId!==L.pointerId||(a.stopPropagation(),Math.hypot(c.x-L.origin.x,c.y-L.origin.y)<No))return;Q.current=null;const v=Pe(L,c);v&&rt(v)},eo=()=>{Q.current=null,rt(null)},te=$.useRef(()=>{});te.current=a=>{const c=dt.current;c!=null&&c.handle&&rt(Ot(z,c,a))};const ee=!!W;$.useEffect(()=>{if(!ee)return;const a=c=>{if(c.key!=="Shift"&&c.key!=="Alt")return;const f=dt.current;f!=null&&f.handle&&(c.preventDefault(),te.current({...f.pointer,shiftKey:c.shiftKey,altKey:c.altKey}))};return window.addEventListener("keydown",a),window.addEventListener("keyup",a),()=>{window.removeEventListener("keydown",a),window.removeEventListener("keyup",a)}},[ee]);const oo=a=>{var v;if(((v=Q.current)==null?void 0:v.pointerId)===a.pointerId){a.stopPropagation(),Q.current=null;return}const c=dt.current;if(!c||a.pointerId!==c.pointerId)return;a.stopPropagation();const f=fe(z,c),L=f==null?void 0:f.placements[c.index];f&&L&&!Ao(L,Wt(z,c.index))&&oe(f),rt(null)},oe=a=>{O({layout:a,from:t.menuLayout}),d==null||d({...t,menuLayout:a})},no=(a,c)=>{a.stopPropagation();const f=z.placements[c];if(!X||!f||f.height===void 0)return;const{height:L,...v}=f;oe({...z,edited:!0,placements:z.placements.map((_,B)=>B===c?v:_)})},Bt=()=>w(!1),ro=a=>{!M&&a.target.closest("a")&&Bt()},io=(a,c)=>{const f=wt(a),L=(a.images??[]).filter(N=>N==null?void 0:N.assetId),v=(W==null?void 0:W.index)===c,_=v?W.placement:Wt(z,c),B=_.height!==void 0,k=Ze===c,it=v&&!qe,Y=f==="image"?Lo:_o,pt=(_.height??(ot==null?void 0:ot.heights[c])??0)*Tt,xt=_.width*Tt,yt=Tt>0&&(xt<pe||f==="image"&&pt<pe),ft=N=>({onPointerDown:D=>Qe(D,c,N),onPointerMove:to,onPointerUp:oo,onPointerCancel:eo});return x.jsxs("div",{className:`${n}-slot${v?` ${n}-slot-dragged`:""}`,style:{marginLeft:It(_.left),width:It(_.width)},children:[x.jsx("div",{className:`${n}-spacer`,style:{height:b(_.top)}}),x.jsxs("div",{className:[`${n}-frame`,k?`${n}-frame-selected`:"",k&&yt?`${n}-handles-outer`:""].filter(Boolean).join(" "),children:[x.jsxs("div",{ref:N=>{ht.current[c]=N},className:[`${n}-block ${n}-block-${f}`,B?`${n}-block-sized`:"",v?`${n}-block-dragged`:"",it?`${n}-block-invalid`:""].filter(Boolean).join(" "),style:B?{height:b(_.height)}:void 0,...X?ft(null):{},children:[a.title&&f!=="image"?x.jsx("div",{className:`${n}-block-title`,style:{...Xe,marginBottom:b(t.titleGap)},children:a.title}):null,f==="image"?x.jsx(Do,{prefix:n,images:L,isRunning:y,radius:b(t.imageRadius)}):x.jsx("div",{className:`${n}-block-text`,style:Ve[f],children:x.jsx(uo.RichTextRenderer,{content:Array.isArray(a.text)?a.text:[]})})]}),k?x.jsx("div",{className:`${n}-box${it?` ${n}-box-invalid`:""}`,style:{[`--${n}-box-color`]:f==="image"?"#ACACAC":"#FF4400"},"aria-hidden":!0}):null,k?(f==="image"?Io:Co).map(N=>{var D;return x.jsx("div",{className:`${n}-edge ${n}-edge-${N}${v&&((D=W.handle)!=null&&D.includes(N))?` ${n}-edge-shown`:""}`,"aria-hidden":!0},N)}):null,k?Y.map(N=>x.jsx("div",{className:`${n}-handle ${n}-handle-${N}`,"aria-hidden":!0,...ft(N),onDoubleClick:N.includes("top")||N.includes("bottom")?D=>no(D,c):void 0},N)):null]})]},c)},ne={...nt==="text"?He:void 0,padding:[vt.top,vt.right,vt.bottom,vt.left].map(a=>b(a)).join(" "),[`--${n}-icon-size`]:b(t.triggerIconSize??So)},re=nt==="text"?Yt:x.jsx("span",{className:`${n}-icon ${n}-icon-${nt}`,"aria-hidden":!0,children:nt==="icon"?x.jsx(ho.SvgImage,{url:t.triggerIcon,fill:`var(--${n}-trigger-color)`,hoverFill:`var(--${n}-trigger-color)`,className:`${n}-icon-picture`}):Array.from({length:nt==="burger"?3:2},(a,c)=>x.jsx("span",{className:`${n}-icon-line`},c))}),jt=z.grid.beat||tt(z.grid),ie=p?x.jsxs("div",{ref:ut,"data-selection":"none",className:[`${n}-overlay`,`${n}-transition-${E.replace(" ","-")}`,o?`${n}-overlay-editor`:"",I?`${n}-overlay-active`:""].filter(Boolean).join(" "),style:{...Ye,...Kt},"aria-hidden":!I,onPointerDown:X?a=>{a.target.closest(`.${n}-frame`)||At(null)}:void 0,children:[x.jsx("button",{type:"button",className:`${n}-backdrop`,"aria-label":"Close menu",tabIndex:-1,onClick:M?void 0:Bt}),x.jsx("div",{ref:Qt,className:`${n}-card`,role:"dialog","aria-modal":"true","aria-label":t.triggerLabel||"Menu",onClick:ro,style:{top:b(t.popupOffsetTop),height:`${Gt(t)}%`,left:$t,width:V,borderRadius:b(t.popupRadius)},children:x.jsxs("div",{ref:Ct,className:`${n}-grid${X?` ${n}-grid-editable`:""}${W?` ${n}-grid-busy`:""}`,style:Ue,children:[e.map(io),W&&(W.guides.xs.length>0||W.guides.ys.length>0)?x.jsxs("div",{className:`${n}-snaps`,"aria-hidden":!0,children:[W.guides.xs.map(a=>x.jsx("div",{className:`${n}-snap ${n}-snap-x`,style:{left:It(a)}},`x${a}`)),W.guides.ys.map(a=>x.jsx("div",{className:`${n}-snap ${n}-snap-y`,style:{top:b(a)}},`y${a}`))]}):null,X?x.jsx("div",{className:`${n}-guides${jt>0?` ${n}-guides-beats`:""}${W?` ${n}-guides-shown`:""}`,style:{gridTemplateColumns:bt.gridTemplateColumns,columnGap:bt.columnGap,[`--${n}-beat`]:jt>0?b(jt):void 0},"aria-hidden":!0,children:Array.from({length:ct},(a,c)=>x.jsx("div",{className:`${n}-guide`},c))}):null]})}),zt?x.jsx("button",{type:"button",className:[`${n}-button ${n}-close`,I?`${n}-button-open`:"",M?`${n}-close-inert`:""].filter(Boolean).join(" "),style:{...ne,...zt},"aria-label":"Close menu","aria-expanded":y,tabIndex:I?void 0:-1,onClick:M?void 0:Bt,children:re}):null]}):null;return x.jsxs("div",{ref:qt,className:`${n}-root`,style:Kt,"data-edit-mode":r?"":void 0,children:[x.jsx("style",{dangerouslySetInnerHTML:{__html:m}}),x.jsx("button",{ref:Jt,type:"button",className:[`${n}-button`,y?`${n}-button-open`:"",zt?`${n}-button-hidden`:""].filter(Boolean).join(" "),style:ne,"aria-expanded":y,"aria-label":nt==="text"?void 0:Yt,onClick:M?void 0:()=>w(a=>!a),children:re}),ie&&typeof document<"u"?ao.createPortal(ie,(s?document.getElementById(s):null)??document.body):null]})}function Go(t){return t.type==="video"?!0:t.type?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t.name||t.assetId)}function Do({prefix:t,images:e,isRunning:o,radius:r}){const[i,s]=$.useState(0),l=$.useRef([]),h=e.length;return $.useEffect(()=>{if(!o||h<2){s(0);return}const u=window.setInterval(()=>s(d=>(d+1)%h),Mo);return()=>window.clearInterval(u)},[o,h]),$.useEffect(()=>{l.current.slice(0,h).forEach((u,d)=>{var n;u&&(o&&d===i%h?(n=u.play())==null||n.catch(()=>{}):u.pause())})},[o,i,h,e]),x.jsx("div",{className:`${t}-images`,children:e.map((u,d)=>{const n=d===i%h,m=`${t}-image${n?"":` ${t}-image-hidden`}`,R={borderRadius:r};return ce.isEmbedMedia(u)?x.jsx(ce.EmbedMediaFrame,{className:m,media:u,fit:"cover",lazy:!1,silentLoop:!0,"aria-hidden":!n,style:R},d):Go(u)?x.jsx("video",{ref:w=>{l.current[d]=w},className:m,src:u.assetId,autoPlay:o&&n,muted:!0,loop:!0,playsInline:!0,"aria-hidden":!n,style:R},d):x.jsx("img",{className:m,src:u.assetId,alt:u.name??"","aria-hidden":!n,style:R},d)})})}const Uo=Object.freeze(Object.defineProperty({__proto__:null,POPUP_MENU_TRANSITIONS:Ht,POPUP_MENU_TRIGGER_TYPES:Oe,PopupMenu:Fe},Symbol.toStringTag,{value:"Module"}));exports.DEFAULT_POPUP_MENU_GRID=Ft;exports.DEFAULT_POPUP_MENU_HEIGHT=ge;exports.DEFAULT_POPUP_MENU_VIEWPORT_RATIO=$e;exports.POPUP_MENU_ALIGNS=be;exports.POPUP_MENU_TRANSITIONS=Ht;exports.POPUP_MENU_TRIGGER_TYPES=Oe;exports.PopupMenu=Fe;exports.PopupMenu$1=Uo;exports.defaultPopupMenuLayoutRules=Ee;exports.fitPopupMenuLayoutToGrid=Ce;exports.generatePopupMenuLayout=Le;exports.getDefaultPopupMenuPlacement=we;exports.getPopupMenuColumnEdges=Dt;exports.getPopupMenuColumnWidth=kt;exports.getPopupMenuColumnsPlacement=St;exports.getPopupMenuGrid=ve;exports.getPopupMenuGridWidth=H;exports.getPopupMenuHeight=xe;exports.getPopupMenuHeightPercent=Gt;exports.getPopupMenuSides=Me;exports.getPopupMenuWidth=ye;exports.isSamePopupMenuGrid=Ie;exports.movePopupMenuBlock=Ae;exports.normalizePopupMenuLayout=Re;exports.resizePopupMenuBlock=Te;exports.settlePopupMenuLayout=Be;exports.snapPopupMenuHeight=fo;exports.snapPopupMenuTop=_e;exports.toPopupMenuPlacement=Se;
@@ -1,56 +0,0 @@
1
- import { jsx as l } from "react/jsx-runtime";
2
- import { useState as c, useEffect as C } from "react";
3
- import p from "classnames";
4
- import { a as f, i as u, b as _, l as h } from "./loadSvgMaskUrl-DUhCVvpl.mjs";
5
- const U = "SvgImage-module__svg___q3xE-", b = "SvgImage-module__img___VsTm-", d = {
6
- svg: U,
7
- img: b
8
- }, k = (s) => {
9
- const t = s.trim().toLowerCase();
10
- return !!(t.startsWith("data:image/svg+xml") || t.includes("image/svg+xml") || t.includes(".svg") || t.startsWith("blob:"));
11
- }, I = (s) => `url("${s.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}")`, j = ({ url: s, fill: t = "#000000", hoverFill: v = "#CCCCCC", className: m = "", style: n }) => {
12
- const [o, w] = c(() => typeof window > "u" ? !0 : CSS.supports("mask-image", 'url("")') || CSS.supports("-webkit-mask-image", 'url("")')), [e, a] = c(() => f(s) ? { url: s, mask: s } : null);
13
- C(() => {
14
- if (!k(s)) {
15
- a({ url: s, mask: null });
16
- return;
17
- }
18
- if (f(s)) {
19
- a({ url: s, mask: s });
20
- return;
21
- }
22
- let i = !1;
23
- return (u(s) ? _(s).then((r) => r ? s : null) : h(s)).then((r) => {
24
- i || a({ url: s, mask: r });
25
- }).catch(() => {
26
- i || a({ url: s, mask: null });
27
- }), () => {
28
- i = !0;
29
- };
30
- }, [s]);
31
- const g = (e == null ? void 0 : e.url) === s ? e.mask : null, S = (e == null ? void 0 : e.url) !== s && u(s) && k(s);
32
- return !g || !o ? /* @__PURE__ */ l(
33
- "img",
34
- {
35
- src: s,
36
- alt: "",
37
- className: p(d.img, m),
38
- style: S ? { ...n, visibility: "hidden" } : n
39
- }
40
- ) : /* @__PURE__ */ l(
41
- "span",
42
- {
43
- "data-supports-mask": o,
44
- className: p(d.svg, m),
45
- style: {
46
- "--svg": I(g),
47
- "--fill": t,
48
- "--hover-fill": v,
49
- ...n ?? {}
50
- }
51
- }
52
- );
53
- };
54
- export {
55
- j as S
56
- };
@@ -1 +0,0 @@
1
- "use strict";const u=require("react/jsx-runtime"),c=require("react"),f=require("classnames"),n=require("./loadSvgMaskUrl-B6kHUyof.js"),S="SvgImage-module__svg___q3xE-",C="SvgImage-module__img___VsTm-",k={svg:S,img:C},p=s=>{const e=s.trim().toLowerCase();return!!(e.startsWith("data:image/svg+xml")||e.includes("image/svg+xml")||e.includes(".svg")||e.startsWith("blob:"))},U=s=>`url("${s.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,_=({url:s,fill:e="#000000",hoverFill:v="#CCCCCC",className:l="",style:i})=>{const[m,I]=c.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")')),[t,a]=c.useState(()=>n.isSvgDataUrl(s)?{url:s,mask:s}:null);c.useEffect(()=>{if(!p(s)){a({url:s,mask:null});return}if(n.isSvgDataUrl(s)){a({url:s,mask:s});return}let r=!1;return(n.isInlineMaskUrl(s)?n.isInlineSvgUrl(s).then(g=>g?s:null):n.loadSvgMaskUrl(s)).then(g=>{r||a({url:s,mask:g})}).catch(()=>{r||a({url:s,mask:null})}),()=>{r=!0}},[s]);const o=(t==null?void 0:t.url)===s?t.mask:null,d=(t==null?void 0:t.url)!==s&&n.isInlineMaskUrl(s)&&p(s);return!o||!m?u.jsx("img",{src:s,alt:"",className:f(k.img,l),style:d?{...i,visibility:"hidden"}:i}):u.jsx("span",{"data-supports-mask":m,className:f(k.svg,l),style:{"--svg":U(o),"--fill":e,"--hover-fill":v,...i??{}}})};exports.SvgImage=_;
@@ -1 +0,0 @@
1
- "use strict";const u=require("./ControlSlider-DB4nbVLT.js"),d=require("./ImageRevealSlider-DlxudBUy.js"),b=require("./Lightbox-Cb7lyaNt.js"),t=require("./ChroniclesComponent-Nm_yIRmr.js"),l=require("./PopupMenu-Di1fHgho.js"),s={element:u.ControlSlider,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"inside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",assetId:"01M3QM74XES6E7GVC0H3KJ2RH6",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEAZ8H1DTC5V1S554K",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEDRP49HNTEPNZYQTP",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},c={element:d.ImageRevealSlider,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},link:{type:"object",label:"URL",display:{type:"link-input"}}},required:["image"]},default:[{image:{objectFit:"cover",assetId:"01M3QM74XGWBJY3AQQ71GC2Z6Q",name:"Slider-1.png"},link:{type:"url",value:"",target:"blank"}},{image:{objectFit:"cover",assetId:"01M3QM74XGMXS1Z5ZY2RFGS3T4",name:"Slider-2.png"},link:{type:"url",value:"",target:"blank"}},{image:{objectFit:"cover",assetId:"01M3QM74XGWG6VCHNEXKVKAJGT",name:"Slider-3.png"},link:{type:"url",value:"",target:"blank"}},{image:{objectFit:"cover",assetId:"01M3QM74XGCVMTPNHFHMR98RPZ",name:"Slider-4.png"},link:{type:"url",value:"",target:"blank"}}]}}}},y={element:b.LightboxGallery,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Lightbox.png"},defaultSize:{d:{width:440,height:550},t:{width:235,height:293},m:{width:265,height:331}},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.assetId",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{assetId:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},lightboxBlock:{appear:{type:"slide in",duration:"1000ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.01,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:0,bottom:.06,left:0}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},linkColor:"#cccccc",linkHoverColor:"#cccccc"}}},m:{thumbnailBlock:{cover:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"horiz",duration:"1000ms"},thumbnail:{isActive:!0,position:"bottom-center",fit:"fit",align:"start",triggers:"hov",grid:{size:.1,gap:.05},offset:{x:.01,y:-.05},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.05,bottom:.06,left:.05}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}},t:{thumbnailBlock:{cover:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",assetId:"01M3QM74XD4J8X0B8TTSQ8CV3P",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XD0N6VQJ5J8J9YB32N",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XE4WSEPVF1QQSKMD76",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}};function o(e){return{[`${e}FontFamily`]:{type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},[`${e}FontSettings`]:{type:"object",scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},[`${e}FontSize`]:{type:"number",scope:"layout",title:"",display:{type:"font-size"}},[`${e}LineHeight`]:{type:"number",scope:"layout",title:"",display:{type:"line-height-input"}},[`${e}LetterSpacing`]:{type:"number",scope:"layout",title:"",display:{type:"letter-spacing-input"}},[`${e}WordSpacing`]:{type:"number",scope:"layout",title:"",display:{type:"word-spacing-input"}},[`${e}TextAppearance`]:{type:"object",scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}}}function h(e){return[`${e}FontFamily`,`${e}FontSettings`,{type:"row",items:[`${e}FontSize`,`${e}LineHeight`,`${e}LetterSpacing`,`${e}WordSpacing`]},`${e}TextAppearance`]}const a={trigger:"Trigger",title:"Title",text:"Text",listA:"List A",listB:"List B"},f={type:"tab",id:"popupMenuTextStyle",tabs:Object.fromEntries(Object.keys(a).map(e=>[a[e],h(e)]))};function r(e,i,m){return{[`${e}FontSize`]:i,[`${e}LineHeight`]:m,[`${e}LetterSpacing`]:0,[`${e}WordSpacing`]:0,[`${e}TextAppearance`]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function n(e,i){return{...r("trigger",i.trigger[0]/e,i.trigger[1]/e),...r("title",i.title[0]/e,i.title[1]/e),...r("text",i.text[0]/e,i.text[1]/e),...r("listA",i.listA[0]/e,i.listA[1]/e),...r("listB",i.listB[0]/e,i.listB[1]/e)}}const p={fontWeight:400,fontStyle:"normal"},v=["barBackgroundColor","triggerColor","overlayColor","popupBackgroundColor","titleColor","textColor","listAColor","listBColor"],C=[...["burger","plus","icon"].flatMap(e=>[{if:{name:"triggerType",value:e},then:{name:"properties.triggerLabel.display.visible",value:!1}},{if:{name:"triggerType",value:e},then:{name:"properties.triggerIconSize.display.visible",value:!0}},...Object.keys(o("trigger")).map(i=>({if:{name:"triggerType",value:e},then:{name:`properties.${i}.display.visible`,value:!1}}))]),{if:{name:"triggerType",value:"icon"},then:{name:"properties.triggerIcon.display.visible",value:!0}}],S={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{type:{type:"string",label:"Type",enum:["text","image","listA","listB"],default:"text",display:{type:"select-input"}},title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"},byRowType:{image:{display:{type:"text-input",visible:!1}}}},text:{label:"Text",placeholder:"Add text...",display:{type:"rich-text"},byRowType:{...Object.fromEntries(["listA","listB","list"].map(e=>[e,{placeholder:"Add item...",display:{type:"rich-text-list"}}])),image:{display:{type:"rich-text",visible:!1}}}},images:{type:"object",label:"Images",display:{type:"media-list-input"},byRowType:Object.fromEntries(["text","listA","listB","list"].map(e=>[e,{display:{type:"media-list-input",visible:!1}}])),properties:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]}}},default:[{type:"text",title:"About",text:[{type:"paragraph",children:[{text:"An independent studio for identity, type and the web. We work with people who care about the details."}]}],images:[]},{type:"image",title:"",text:[],images:[{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"cover"}]},{type:"listA",title:"Selected Work",text:["Archive","Identity","Type","Web"].map(e=>({type:"paragraph",children:[{text:e}]})),images:[]},{type:"listB",title:"Contact",text:["hello@studio.com","Instagram"].map(e=>({type:"paragraph",children:[{text:e}]})),images:[]}]},settings:{sizing:"auto",properties:{menuLayout:{type:"object",scope:"layout"},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:24,display:{type:"numeric-input"}},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",min:0,max:1e3,display:{type:"numeric-input"}},triggerType:{type:"string",scope:"common",title:"Trigger",enum:[...l.POPUP_MENU_TRIGGER_TYPES],display:{type:"radio-group"}},triggerLabel:{type:"string",scope:"common",title:"Text",display:{type:"label-input"}},triggerIcon:{type:["string","null"],scope:"common",title:"Image",display:{type:"settings-image-input",visible:!1}},triggerIconSize:{type:"number",scope:"layout",title:"Icon Size",min:1,max:1e3,display:{type:"numeric-input",visible:!1}},triggerPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"},properties:{top:{type:"number"},right:{type:"number"},bottom:{type:"number"},left:{type:"number"}}},popupHeight:{type:"number",scope:"layout",title:"Height (%)",min:0,max:100,display:{type:"percentage-input"}},popupAlign:{type:"string",scope:"layout",title:"Align",enum:[...l.POPUP_MENU_ALIGNS],display:{type:"align-group",direction:"horizontal"}},popupOffset:{type:"number",scope:"layout",title:"Offset",min:-1e4,max:1e4,display:{type:"numeric-input"}},popupOffsetTop:{type:"number",scope:"layout",title:"Offset Top",min:-1e4,max:1e4,display:{type:"numeric-input"}},titleGap:{type:"number",scope:"layout",title:"Title gap",min:0,max:1e3,display:{type:"numeric-input"}},popupRadius:{type:"number",scope:"layout",title:"Popup Radius",min:0,max:1e3,display:{type:"numeric-input"}},imageRadius:{type:"number",scope:"layout",title:"Image Radius",min:0,max:1e3,display:{type:"numeric-input"}},popupTransition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:[...l.POPUP_MENU_TRANSITIONS]}},overlayBlur:{type:"number",scope:"layout",title:"Overlay Blur",min:0,max:100,display:{type:"numeric-input"}},stateOverrides:{type:"object",scope:"common"},barBackgroundColor:{type:"string",scope:"common",title:"Trigger BG",display:{type:"palette-color-picker"}},triggerColor:{type:"string",scope:"common",title:"Trigger",display:{type:"palette-color-picker"}},overlayColor:{type:"string",scope:"common",title:"Overlay",display:{type:"palette-color-picker"}},popupBackgroundColor:{type:"string",scope:"common",title:"Popup BG",display:{type:"palette-color-picker"}},titleColor:{type:"string",scope:"common",title:"Title",display:{type:"palette-color-picker"}},textColor:{type:"string",scope:"common",title:"Text",display:{type:"palette-color-picker"}},listAColor:{type:"string",scope:"common",title:"List A",display:{type:"palette-color-picker"}},listBColor:{type:"string",scope:"common",title:"List B",display:{type:"palette-color-picker"}},...o("trigger"),...o("title"),...o("text"),...o("listA"),...o("listB")},displayRules:C,defaults:{menuLayout:null,triggerType:"burger",triggerLabel:"Menu",triggerIcon:null,popupTransition:"slide down",barBackgroundColor:"rgba(255, 255, 255, 0)",triggerColor:"#000000",overlayColor:"rgba(0, 0, 0, 0.35)",popupBackgroundColor:"#ffffff",titleColor:"#8c8c8c",textColor:"#000000",listAColor:"#000000",listBColor:"#000000",triggerFontFamily:"Inter",triggerFontSettings:p,titleFontFamily:"Inter",titleFontSettings:p,textFontFamily:"Inter",textFontSettings:p,listAFontFamily:"Inter",listAFontSettings:p,listBFontFamily:"Inter",listBFontSettings:p},layoutDefaults:{d:{triggerPadding:{top:16/1440,right:16/1440,bottom:16/1440,left:16/1440},triggerIconSize:24/1440,popupHeight:60,popupAlign:"center",popupOffset:0,popupOffsetTop:0,titleGap:8/1440,popupRadius:16/1440,imageRadius:12/1440,overlayBlur:0,gridLayout:{columnsCount:12,wrapperWidth:1408/1440,entryWidth:99/1440,horizontalGap:20/1440,lockedParam:"wrapperWidth"},verticalGap:20/1440,...n(1440,{trigger:[14,18],title:[14,18],text:[14,18],listA:[14,18],listB:[14,18]})},t:{triggerPadding:{top:16/768,right:16/768,bottom:16/768,left:16/768},triggerIconSize:24/768,popupHeight:60,popupAlign:"center",popupOffset:0,popupOffsetTop:0,titleGap:6/768,popupRadius:12/768,imageRadius:10/768,overlayBlur:0,gridLayout:{columnsCount:12,wrapperWidth:744/768,entryWidth:51/768,horizontalGap:12/768,lockedParam:"wrapperWidth"},verticalGap:12/768,...n(768,{trigger:[14,18],title:[14,18],text:[14,18],listA:[14,18],listB:[14,18]})},m:{triggerPadding:{top:12/375,right:12/375,bottom:12/375,left:12/375},triggerIconSize:24/375,popupHeight:60,popupAlign:"center",popupOffset:0,popupOffsetTop:0,titleGap:6/375,popupRadius:10/375,imageRadius:8/375,overlayBlur:0,gridLayout:{columnsCount:6,wrapperWidth:359/375,entryWidth:54/375,horizontalGap:7/375,lockedParam:"wrapperWidth"},verticalGap:8/375,...n(375,{trigger:[13,16],title:[13,16],text:[13,16],listA:[13,16],listB:[13,16]})}}},panels:[{id:"default",icon:"default",title:"Default",tooltip:"Default State",layout:["__componentName__","triggerType","triggerLabel",{type:"row",items:["triggerIcon","triggerIconSize"]},"triggerPadding"]},{id:"open",icon:"open",title:"Open",tooltip:"Open State",layout:["__componentName__","popupAlign",{type:"row",items:["popupOffset","popupOffsetTop"]},{type:"row",items:["popupHeight","popupRadius"]},{type:"row",items:["titleGap","imageRadius"]},{type:"row",items:["overlayBlur","popupTransition"]},{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},"verticalGap"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",f]}],paletteBookmark:{items:[...v],panelIds:["default","open","typeStyle"],stateItems:{default:["barBackgroundColor","triggerColor"],open:["overlayColor","popupBackgroundColor","titleColor","textColor","listAColor","listBColor","triggerColor"]}},statePanels:["default","open"]},g={element:l.PopupMenu,id:"popup-menu",name:"Popup Menu",category:"navigation",version:1,layoutMode:"navigation",navigationLayout:"freeform",defaultSize:{d:{width:56,height:56},t:{width:56,height:56},m:{width:48,height:48}},schema:S,assetsPaths:{content:[{path:"images.assetId",placeholderEnabled:!0}],parameters:[{path:"triggerIcon"}]},fontSettingsPaths:{content:[],parameters:[{path:"triggerFontFamily"},{path:"titleFontFamily"},{path:"textFontFamily"},{path:"listAFontFamily"},{path:"listBFontFamily"}]},fontRelations:{triggerFontSettings:"triggerFontFamily",titleFontSettings:"titleFontFamily",textFontSettings:"textFontFamily",listAFontSettings:"listAFontFamily",listBFontSettings:"listBFontFamily"}},x=[s,c,t.ClickGallerieComponent,y,t.FormComponent,t.OnelinerFormComponent,t.MarqueeComponent,t.MarqueeTextComponent,t.TestimonialGridComponent,t.TestimonialSingleComponent,t.GridComponent,t.HiveComponent,t.ListComponent,t.FAQComponent,t.LightboxStripComponent,t.LightboxJournalComponent,t.ScaleComponent,t.WaterfallComponent,t.SimpleButtonComponent,t.Slider20Component,t.MercuryComponent,t.HelixComponent,t.BurgerComponent,t.PretextComponent,t.ChroniclesComponent,g];exports.ControlImageRevealSliderComponent=c;exports.ControlSliderComponent=s;exports.LightboxComponent=y;exports.PopupMenuComponent=g;exports.components=x;
@@ -1 +0,0 @@
1
- "use strict";const a=new Map,i=new Map;function r(t){return t.startsWith("data:")||t.startsWith("blob:")}function c(t){return/^data:image\/svg\+xml[;,]/i.test(t.trim())}async function o(t){const e=t.type.toLowerCase();if(e.startsWith("image/svg+xml"))return!0;if(e.startsWith("image/")||e.startsWith("video/"))return!1;const s=(await t.slice(0,1024).text()).trimStart().toLowerCase();return s.startsWith("<svg")||s.startsWith("<?xml")&&s.includes("<svg")}function h(t){if(t.startsWith("data:"))return Promise.resolve(c(t));const e=i.get(t);if(e)return e;const s=fetch(t).then(n=>n.blob()).then(o).catch(()=>!1);return i.set(t,s),s}function g(t){if(r(t))return Promise.resolve(t);const e=a.get(t);if(e)return e;const s=fetch(t,{mode:"cors",cache:"reload"}).then(n=>{if(!n.ok)throw new Error(String(n.status));return n.blob()}).then(n=>URL.createObjectURL(n)).catch(n=>{throw a.delete(t),n});return a.set(t,s),s}exports.isInlineMaskUrl=r;exports.isInlineSvgUrl=h;exports.isSvgDataUrl=c;exports.loadSvgMaskUrl=g;