@cntrl-site/components 1.0.19-alpha.4 → 1.0.19-alpha.5
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.
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2320,7 +2320,7 @@ type MarqueeProps = {
|
|
|
2320
2320
|
isPreviewMode?: boolean;
|
|
2321
2321
|
isEditMode?: boolean;
|
|
2322
2322
|
} & CommonComponentProps;
|
|
2323
|
-
`,Eu={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},hoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["off","brightness","grayscale"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,display:{type:"numeric-input"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,display:{type:"numeric-input"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,display:{type:"numeric-input"}},imageFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.21},d:{speed:1.64,gap:.02,imageMaxWidth:.208,imageMaxHeight:.278}},displayRules:[{if:{name:"imageFit.display",value:"cover"},then:{name:"properties.hoverEffect.display.enum",value:["off","brightness","grayscale","randomize"]}}],layout:["__componentName__","speed","direction","pauseOnHover","hoverEffect","gap","imageMaxWidth","imageMaxHeight","imageFit"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction"]},{type:"row",items:["speed","imageFit"]},{type:"row",items:["imageMaxWidth","imageMaxHeight"]},{type:"row",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",name:""},link:""}]}},Pu={element:Tu,id:"marquee",name:"Simple Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%",height:400},m:{width:390,height:80}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple_Marquee.mp4"},schema:Eu,sourceCode:Lu,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function ga(e){return`
|
|
2323
|
+
`,Eu={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},hoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["off","brightness","grayscale"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,display:{type:"numeric-input"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,display:{type:"numeric-input"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,display:{type:"numeric-input"}},imageFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.21},d:{speed:1.64,gap:.02,imageMaxWidth:.208,imageMaxHeight:.278}},displayRules:[{if:{name:"imageFit.display",value:"cover"},then:{name:"properties.hoverEffect.display.enum",value:["off","brightness","grayscale","randomize"]}}],layout:["__componentName__","speed","direction","pauseOnHover","hoverEffect","gap","imageMaxWidth","imageMaxHeight","imageFit"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction"]},{type:"row",items:["speed","imageFit"]},{type:"row",items:["imageMaxWidth","imageMaxHeight"]},{type:"row",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",name:""},link:""}]}},Pu={element:Tu,id:"marquee",name:"Simple Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%",height:400},m:{width:390,height:80}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple_Marquee.mp4"},schema:Eu,sourceCode:Lu,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function ga(e){return`
|
|
2324
2324
|
.${e}-marquee-wrapper {
|
|
2325
2325
|
overflow: hidden;
|
|
2326
2326
|
width: 100%;
|
|
@@ -10348,7 +10348,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
|
|
|
10348
10348
|
</>
|
|
10349
10349
|
);
|
|
10350
10350
|
};
|
|
10351
|
-
`,Hm="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="#000000" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /></svg>'),Dn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",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 Om(e){const t={};return t[mt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[mt(e,"fontSettings")]={...Dn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[mt(e,"fontSize")]={...Dn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[mt(e,"lineHeight")]={...Dn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[mt(e,"letterSpacing")]={...Dn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[mt(e,"wordSpacing")]={...Dn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[mt(e,"textAlign")]={...Dn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[mt(e,"textAppearance")]={...Dn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Bm=zi.reduce((e,t)=>({...e,...Om(t)}),{}),jm=zi.reduce((e,t)=>({...e,[mt(t,"fontFamily")]:"Arial",[mt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[mt(t,"letterSpacing")]:0,[mt(t,"wordSpacing")]:0,[mt(t,"textAlign")]:"left",[mt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Va(e){return zi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[mt(n,"fontSize")]=i),o!==void 0&&(t[mt(n,"lineHeight")]=o),t},{})}const zm=Am(),Vm={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailGap:{type:"number",scope:"layout",title:"Thumbnail Gap",min:0,display:{type:"range-control"}},thumbnailMarginBottom:{type:"number",scope:"layout",title:"Thumbnail Margin Bottom",min:0,display:{type:"range-control"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"layout",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},thumbnailVisibility:{type:"boolean",scope:"layout",title:"Visibility",display:{type:"toggle-cycle",enum:["on","off"]}},thumbnailObjectFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailTrigger:{type:"string",scope:"common",title:"Trigger",display:{type:"toggle-cycle",enum:["click","hover"]}},thumbnailActive:{type:"boolean",scope:"common",title:"Active",display:{type:"toggle-cycle",enum:["outline","color","scale-up"]}},thumbnailActiveColor:{type:"string",scope:"common",title:"Outline Active",display:{type:"palette-color-picker",visible:!1}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},...Bm,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},iconMarginLeft:{type:"number",scope:"layout",title:"Icon margin left",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/lightbox_strip_1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Hm,closeIconColor:"#ffffff",closeIconHoverColor:"#cccccc",thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",thumbnailActiveColor:"#ffffff",title1Color:"#ffffff",title2Color:"#ffffff",title3Color:"#ffffff",...jm},layoutDefaults:{m:{thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,backgroundColor:"rgba(28, 31, 34, 0.9)",contentMarginTop:.08,iconMarginLeft:.02,...Va({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04})},d:{thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,title1Width:.3,title2Width:.13,title3Width:.14,title1MarginLeft:.02,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,backgroundColor:"rgba(28, 31, 34, 0.9)",contentMarginTop:.02,iconMarginLeft:.02,...Va({title1FontSize:.015,title1LineHeight:.02,title2FontSize:.015,title2LineHeight:.02,title3FontSize:.015,title3LineHeight:.02})}},displayRules:[{if:{name:"thumbnailActive",value:"outline"},then:{name:"properties.thumbnailActiveColor.display.visible",value:!0}}],layout:["__componentName__","thumbnailGap","thumbnailMarginBottom","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","contentMarginTop","title1MarginLeft","iconMarginLeft"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",title:"Thumbnails",items:["thumbnailVisibility","thumbnailObjectFit"]},{type:"row",items:["thumbnailTrigger","thumbnailActive"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[zm]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0,stripFieldsOnAdd:["title1","title2","title3","text"]},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input",supportsMainImage:!0}},title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_2.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_3.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_4.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_5.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_6.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_7.jpg",name:"",objectFit:"contain"}}]}},Dm={element:Fm,id:"lightbox-strip",name:"Lightbox Strip",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:Vm,sourceCode:Nm,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:zi.map(e=>({path:`styles.${mt(e,"fontSettings")}`}))}},qm=50,Da=10,qr="cntrl-lightbox-journal",Fo=qr,hr=`${qr}-`,No=e=>`${qr}-${e}`,Kr=e=>e===Fo||e.startsWith(hr),qa=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Ka=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=qa(t.get(No(e)));if(i)return i}const n=qa(t.get(Fo));if(n)return n;for(const[i]of t){if(!i.startsWith(hr))continue;const o=i.slice(hr.length);if(!/^\d+$/.test(o))continue;const s=Number.parseInt(o,10);if(Number.isFinite(s)&&s>=1)return s}return null},Ua=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Ds=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(a=>{Kr(a)&&i.searchParams.delete(a)}),t?i.searchParams.set(No(t),String(e)):i.searchParams.set(Fo,String(e));const o=n?"replaceState":"pushState",s=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",s)},Km=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===No(e)||i===Fo:Kr(i));if(n.forEach(i=>t.searchParams.delete(i)),n.length>0){const i=`${t.pathname}${t.search}${t.hash}`;window.history.replaceState(window.history.state,"",i)}},qs=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(No(e)):[...t.keys()].some(n=>Kr(n))},Um=(e,t)=>{if(qs(t)){if(e){window.history.back();return}Km(t)}},Gm=20,Xm=2,ir=e=>`max(${e}, ${Gm}px)`,hi=e=>((e==null?void 0:e.image)??[]).slice(0,Xm),Ks=e=>e.reduce((t,n)=>t+hi(n).length,0),Ym=(e,t)=>{const n=e.slice(0,t).reduce((o,s)=>o+hi(s).length,1),i=hi(e[t]).length;return{start:n,end:n+i-1}},Jm=(e,t)=>{const n=Ks(e),{start:i,end:o}=Ym(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},go=(e,t)=>t==="B"?e.flatMap((n,i)=>hi(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:hi(n)})),Zm=(e,t,n,i)=>{var s;if(n==="B")return`${t+1} / ${e.length}`;const o=((s=e[t])==null?void 0:s.entryIndex)??0;return Jm(i,o)},Ga=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Qm=(e,t,n)=>e==="B"?t.length>1:Ks(n)>1,ei=.004,eo=.004,or={title1Width:.13,title2Width:.13,title3Width:.14},to=(e,t,n,i,o)=>{const s=[];return t.title1&&s.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&s.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&s.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),s},wo=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...a]};const l=Math.min(s,d);return{overflow:s-l,widths:[d-l,...a]}},{overflow:i-1,widths:[]});return o},fr=(e,t)=>wo(e,t),qn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},no=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:wo(e.length,n),effective:fr(e.length,n)}},eg=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),tg=(e,t,n,i)=>e.slice(0,i+1).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),Vi=["title1","title2","title3","count"],gt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,ng={title1:"1",title2:"2",title3:"3",count:"Count"},ig=e=>[gt(e,"fontFamily"),gt(e,"fontSettings"),{type:"row",items:[gt(e,"fontSize"),gt(e,"lineHeight"),gt(e,"letterSpacing"),gt(e,"wordSpacing")]},gt(e,"textAlign"),gt(e,"textAppearance")],og=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Vi.map(e=>[ng[e],ig(e)]))}),rg={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},ag={title1:.02,title2:.02,title3:.02,count:.017},io=(e,t)=>{const n=i=>{const o=gt(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[rg[t]]}},oo=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??ag[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return kt(i,n)},sg=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,initialSlideIndex:a=0,enableUrlSync:d=!1,journalItemId:l=null,onBeforeClose:p,onClose:u})=>{const{type:w,coverFit:x,backgroundColor:v,imageGap:m,maxWidth:y,maxHeight:P,textTransition:$,title1Width:T,title2Width:S,title3Width:M,title1MarginLeft:I=0,title2MarginLeft:W=0,title3MarginLeft:b=0,titleRowMarginBottom:R=0,titleHeaderLayout:V="single-row",countCloseGap:g=0,closeIcon:L,closeIconMaxWidth:A,closeIconColor:H,closeIconHoverColor:U,contentMarginTop:se=0,iconMarginRight:j=0}=n,k=c.useCallback(C=>E.scalingValue(C,i??!1),[i]),X=k(m??0),q=`${y}%`,O=`${P}%`,Y=k(g),ie=k(se),re=k(j),F=oo("title1",io(n,"title1"),i),ae=oo("title2",io(n,"title2"),i),f=oo("title3",io(n,"title3"),i),oe=oo("count",io(n,"count"),i),he=V==="mobile",fe=!i||!!s,We=!o&&(!i||!!s),Z=c.useMemo(()=>go(t,w),[t,w]),[ce,G]=c.useState(a),B=Z[ce],N=B==null?void 0:B.entry,[me,Ce]=c.useState(!1),[Be,_e]=c.useState(null),[Te,Ne]=c.useState(!1),[z,ue]=c.useState(null),[_,J]=c.useState(!1),[D,ee]=c.useState(0),[ge,we]=c.useState(),[De,Ie]=c.useState(),[Ae,Ke]=c.useState(null),de=c.useRef(null),ke=c.useRef(0),Ve=c.useRef(0),Le=c.useRef(0),at=c.useRef(!1),tt=c.useRef(null),xt=c.useRef(null),qe=c.useRef(null),pt=c.useRef(null),Et=c.useRef(null),_t=c.useRef(null),At=c.useRef(null),ve=c.useCallback(()=>{const C=xt.current;if(!C)return;const ne=C.closest(`.${e}-lightbox-content-area`);if(!ne)return C.getBoundingClientRect().width;const $e=Array.from(ne.children).reduce((be,xe)=>!(xe instanceof HTMLElement)||xe.contains(C)?be:be+xe.getBoundingClientRect().width,0);return ne.getBoundingClientRect().width-$e},[e]),He=c.useCallback(()=>{de.current&&(clearTimeout(de.current),de.current=null)},[]),Ue=c.useCallback(C=>{C===ke.current&&(ue(null),J(!1))},[]),nt=c.useCallback(()=>{o||at.current||(at.current=!0,p==null||p(),Ce(!1),tt.current=setTimeout(()=>{u()},300))},[o,p,u]),vt=c.useCallback(C=>!!(C.closest("[data-controls]")||C.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Ht,backdropStyle:Mt,mediaAreaStyle:qt,overlayContentStyle:on,swipeHandlers:Oe,dismissAreaStyle:Tt}=js({enabled:We,onClose:nt,animMs:300,isBlockedTarget:vt}),bt=c.useCallback(C=>{d&&Ds(C+1,l,!0)},[d,l]),it=c.useCallback(C=>{if(C)return C.getBoundingClientRect().height},[]),ft=c.useCallback(C=>{if(Z.length===0)return;const ne=(C%Z.length+Z.length)%Z.length;if(ne===ce)return;const $e=Z[ce],be=Z[ne];ke.current+=1;const xe=ke.current,lt=$==="fade"&&Ga($e==null?void 0:$e.entry)!==Ga(be==null?void 0:be.entry),ut=it(qe.current),Ye=lt?(()=>{const Kt=ve();ki.flushSync(()=>{Ke(be.entry)}),qe.current&&Kt&&(qe.current.style.width=`${Kt}px`);const qi=it(qe.current);return qe.current&&(qe.current.style.width=""),{measuredIncomingTitlesHeight:qi,incomingTitlesMeasureWidth:Kt}})():void 0,Vt=Math.max(ut??0,(Ye==null?void 0:Ye.measuredIncomingTitlesHeight)??0)||void 0;ee(xe),ue(ce),J(!0),G(ne),bt(ne),Le.current=ne,lt?(He(),Vt&&we(Vt),Ye!=null&&Ye.incomingTitlesMeasureWidth&&Ie(Ye.incomingTitlesMeasureWidth),_e(($e==null?void 0:$e.entryIndex)??null),Ne(!0),Ve.current=be.entryIndex,de.current=setTimeout(()=>{_e(null),Ne(!1),we(void 0),Ie(void 0),Ke(null),de.current=null},400)):(He(),_e(null),Ne(!1),we(void 0),Ie(void 0),Ke(null),Ve.current=be.entryIndex)},[ce,He,ve,it,Z,bt,$]),Ot=c.useCallback(()=>{At.current=null},[]),un=c.useCallback(C=>{!fe||Z.length<=1||C.pointerType==="mouse"&&C.button!==0||C.target.closest("[data-controls]")||(At.current={startX:C.clientX,startY:C.clientY,pointerId:C.pointerId})},[fe,Z.length]),Ft=c.useCallback(C=>{var Kt;if(!fe||Z.length<=1||C.pointerType==="mouse"&&C.button!==0)return;if(Ht){Ot();return}const ne=At.current;if(!ne||ne.pointerId!==C.pointerId||(Ot(),C.target.closest("[data-controls]")))return;const be=C.clientX-ne.startX,xe=C.clientY-ne.startY,lt=Math.abs(be),ut=Math.abs(xe);if(lt>=qm&<>ut){ft(be>0?ce-1:ce+1);return}if(lt>Da||ut>Da)return;const Ye=(Kt=pt.current)==null?void 0:Kt.getBoundingClientRect(),Vt=Ye?Ye.left+Ye.width/2:window.innerWidth/2;ft(C.clientX<Vt?ce-1:ce+1)},[ce,fe,ft,Ht,Ot,Z.length]),wn=c.useCallback(C=>{const ne=At.current;(ne==null?void 0:ne.pointerId)===C.pointerId&&Ot()},[Ot]);zs(),c.useEffect(()=>{_t.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const C=requestAnimationFrame(()=>{Ce(!0),requestAnimationFrame(()=>{Et.current?Et.current.focus():pt.current&&pt.current.focus()})});return()=>{cancelAnimationFrame(C),tt.current&&clearTimeout(tt.current),de.current&&clearTimeout(de.current);const ne=_t.current;ne&&document.contains(ne)&&ne.focus()}},[]),c.useEffect(()=>{var C;$!=="fade"&&(Ve.current=((C=Z[ce])==null?void 0:C.entryIndex)??0,He(),_e(null),Ne(!1),we(void 0),Ie(void 0))},[ce,He,Z,$]),c.useEffect(()=>{const C=ne=>{if(ne.key==="Escape"){nt();return}if(ne.key==="ArrowLeft"&&Z.length>1){ft(ce-1);return}if(ne.key==="ArrowRight"&&Z.length>1){ft(ce+1);return}if(ne.key==="Tab"&&pt.current){const $e=pt.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),be=Array.from($e).filter(Ye=>!Ye.closest('[aria-hidden="true"]'));if(be.length===0)return;const xe=be[0],lt=be[be.length-1],ut=document.activeElement;ne.shiftKey?(ut===xe||!pt.current.contains(ut))&&(ne.preventDefault(),lt.focus()):(ut===lt||!pt.current.contains(ut))&&(ne.preventDefault(),xe.focus())}};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[ft,nt,ce,Z.length]),c.useLayoutEffect(()=>{He(),ke.current=0,ee(0),ue(null),J(!1),_e(null),Ne(!1),we(void 0),Ie(void 0),Ke(null),G(C=>{const ne=Math.max(0,Z.length-1);return Math.min(C,ne)})},[He,t.length,w,Z.length]),c.useLayoutEffect(()=>{var $e;const C=Math.max(0,Z.length-1),ne=Math.min(Math.max(0,a),C);Le.current=ne,Ve.current=(($e=Z[ne])==null?void 0:$e.entryIndex)??0,G(ne)},[a]);const Qe=Be!==null?t[Be]:null,Bt=z!==null?Z[z]:null,rn=(N==null?void 0:N.title1)||(N==null?void 0:N.title2)||(N==null?void 0:N.title3)||(Qe==null?void 0:Qe.title1)||(Qe==null?void 0:Qe.title2)||(Qe==null?void 0:Qe.title3),Me=Qm(w,Z,t),ct=L!==null,Rt=rn||Me||ct,te=Me&&ct?{gap:Y}:void 0,Se=`${e}-titles-stack${he?` ${e}-titles-stack-stacked`:""}`,Re=`${e}-titles-layer-out${he?` ${e}-titles-layer-out-stacked`:""}`,je=k(R),Xe=c.useMemo(()=>({title1Width:T??or.title1Width,title2Width:S??or.title2Width,title3Width:M??or.title3Width}),[T,S,M]),et=c.useMemo(()=>({title2MarginLeft:W,title3MarginLeft:b}),[W,b]),Ee=c.useMemo(()=>N?to(e,N,F,ae,f):[],[e,N,F,ae,f]),Lt=c.useMemo(()=>Ee.map(C=>Xe[C.widthKey]),[Ee,Xe]),yt=c.useMemo(()=>wo(Ee.length,Lt),[Ee.length,Lt]),St=c.useMemo(()=>fr(Ee.length,Lt),[Ee.length,Lt]),$t=c.useMemo(()=>Ee.filter(C=>C.prefix==="title1"),[Ee]),Fe=c.useMemo(()=>Ee.filter(C=>C.prefix==="title2"||C.prefix==="title3"),[Ee]),ot=c.useMemo(()=>no($t,Xe),[$t,Xe]),dt=c.useMemo(()=>no(Fe,Xe),[Fe,Xe]),Ct=c.useCallback((C,ne)=>{const $e=Ee.findIndex(xe=>xe.prefix===C.prefix);if(!he||ne==="single-row")return{effectiveWidth:St[$e]??0,resolvedWidth:yt[$e]??0,maxWidth:qn($e,yt)};if(ne==="two-row-top"){const xe=$t.findIndex(lt=>lt.prefix===C.prefix);return{effectiveWidth:ot.effective[xe]??0,resolvedWidth:ot.resolved[xe]??0,maxWidth:qn(xe,ot.resolved)}}const be=Fe.findIndex(xe=>xe.prefix===C.prefix);return{effectiveWidth:dt.effective[be]??0,resolvedWidth:dt.resolved[be]??0,maxWidth:qn(be,dt.resolved)}},[Ee,Fe,dt,St,yt,$t,ot,he]),an=c.useCallback(C=>tg(Ee,yt,et,C)+(he?0:I??0),[Ee,yt,et,he,I]),st=c.useCallback(()=>he?0:I??0,[he,I]),Zt=c.useCallback(C=>Fe.slice(0,C).reduce((ne,$e,be)=>ne+($e.marginLeftKey?et[$e.marginLeftKey]??0:0)+(dt.resolved[be]??0),0),[Fe,dt.resolved,et]),Ze=c.useCallback(C=>{const ne=Fe[C];return Zt(C)+(ne.marginLeftKey?et[ne.marginLeftKey]??0:0)+(dt.resolved[C]??0)},[Fe,dt.resolved,Zt,et]),Nt=c.useCallback((C,ne,$e)=>{if(!he||$e==="single-row"){const Ye=C.findIndex(Bn=>Bn.prefix===ne.prefix),Vt=C.map(Bn=>Xe[Bn.widthKey]),Kt=wo(C.length,Vt);return{effectiveWidth:fr(C.length,Vt)[Ye]??0,resolvedWidth:Kt[Ye]??0,maxWidth:qn(Ye,Kt)}}if($e==="two-row-top"){const Ye=C.filter(Bn=>Bn.prefix==="title1"),Vt=Ye.findIndex(Bn=>Bn.prefix===ne.prefix),{resolved:Kt,effective:qi}=no(Ye,Xe);return{effectiveWidth:qi[Vt]??0,resolvedWidth:Kt[Vt]??0,maxWidth:qn(Vt,Kt)}}const be=C.filter(Ye=>Ye.prefix==="title2"||Ye.prefix==="title3"),xe=be.findIndex(Ye=>Ye.prefix===ne.prefix),{resolved:lt,effective:ut}=no(be,Xe);return{effectiveWidth:ut[xe]??0,resolvedWidth:lt[xe]??0,maxWidth:qn(xe,lt)}},[Xe,he]),jt=(C,ne,$e)=>{const be=C.marginLeftKey?et[C.marginLeftKey]??0:0,{effectiveWidth:xe,resolvedWidth:lt,maxWidth:ut}=$e??Ct(C,ne),Ye=Math.max(be,eo),Vt=o&&ne==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":C.prefix,style:{width:k(xe),...be>0?{marginLeft:k(be)}:{}},children:[r.jsx("p",{className:C.className,style:C.style,children:C.text}),Vt&&C.marginLeftKey?r.jsx("div",{"data-controls":C.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(lt),style:{position:"absolute",top:0,left:k(-be),width:k(Ye),height:"100%",pointerEvents:"auto"}}):null,Vt?r.jsx("div",{"data-controls":C.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ut),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:k(-ei/2),width:k(ei),height:"100%",pointerEvents:"auto"}}):null]},C.className)},Sn=()=>r.jsx("div",{...o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:k(I??0),flexShrink:0,alignSelf:"stretch",...o?{pointerEvents:"auto"}:{}}}),Hn=()=>r.jsxs("div",{className:`${e}-text-bar-cell`,children:[r.jsx("span",{className:`${e}-entry-counter`,style:oe,"aria-live":"polite","aria-atomic":"true",children:Zm(Z,ce,w,t)}),o&&ct&&r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${ir(Y)} + ${Y}))`,width:ir(Y),height:"100%",pointerEvents:"auto",zIndex:3}})]}),On=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:E.scalingValue(A??0,i),height:E.scalingValue(A??0,i),marginRight:re,"--close-icon-hover-color":U},children:[r.jsx("button",{ref:Et,type:"button",className:`${e}-close-icon-inner`,onClick:nt,"aria-label":"Close",children:r.jsx(tn,{url:L??"",fill:H,hoverFill:i&&!s?H:U,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:re,height:"100%",pointerEvents:"auto"}})]}),$n=()=>!Me&&!ct?null:r.jsxs("div",{className:`${e}-titles-row-top-controls`,style:te,children:[Me?Hn():null,ct?On():null]}),Jn=C=>{if(!C)return null;const ne=to(e,C,F,ae,f);return r.jsxs(r.Fragment,{children:[I>0||o?Sn():null,ne.map($e=>jt($e,"single-row",Nt(ne,$e,"single-row")))]})},Cn=C=>{if(!C)return null;const ne=to(e,C,F,ae,f),$e=ne.find(be=>be.prefix==="title1");return!$e&&!(I>0||o)?null:r.jsxs(r.Fragment,{children:[I>0||o?Sn():null,$e?jt($e,"two-row-top",Nt(ne,$e,"two-row-top")):null]})},Tn=(C,ne=!1)=>{const $e=C?to(e,C,F,ae,f):[],be=$e.filter(ut=>ut.prefix==="title2"||ut.prefix==="title3"),xe=o&≠return be.length>0||xe||(R??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[be.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[be.map(ut=>jt(ut,"two-row-bottom",Nt($e,ut,"two-row-bottom"))),ne&&o?r.jsxs(r.Fragment,{children:[Di(),Bo()]}):null]}):null,(R??0)>0||xe?r.jsx("div",{"data-controls":xe?"titleRowMarginBottom":void 0,"data-controls-axis":xe?"y":void 0,"data-controls-reverse":xe?"":void 0,className:xe?`${e}-control`:void 0,style:{height:je,width:"100%",flexShrink:0,pointerEvents:xe?"auto":"none"}}):null]}):null},Ln=(C,ne=!1)=>r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-titles-row-top`,children:[Cn(C),$n()]}),Tn(C,ne)]}),sn=C=>he?r.jsx("div",{className:`${e}-titles-row-two-row`,style:{width:"100%"},children:Ln(C)}):C?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Jn(C)}):null,Ho=()=>{const C=he?-1:Ee.findIndex(be=>be.prefix==="title1"),ne=!he&&(o||(I??0)>0)?(()=>{const xe=Math.max(I??0,eo),lt=C>=0?yt[C]:T;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(lt),style:{position:"absolute",top:0,left:0,width:k(xe),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,$e=Ee.flatMap((be,xe)=>{if(!be.marginLeftKey)return[];const lt=et[be.marginLeftKey]??0,ut=eg(Ee,yt,et,xe)+st(),Ye=Math.max(lt,eo);return r.jsx("div",{"data-controls":be.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(yt[xe]),style:{position:"absolute",top:0,left:k(ut),width:k(Ye),height:"100%",pointerEvents:"auto"}},be.marginLeftKey)});return ne?[ne,...$e]:$e},Oo=()=>Ee.map((C,ne)=>{const $e=qn(ne,yt),xe=an(ne)-ei/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":C.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String($e),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:k(xe),width:k(ei),height:"100%",pointerEvents:"auto"}})},`${C.widthKey}-junction`)}),Di=()=>Fe.flatMap((C,ne)=>{if(!C.marginLeftKey)return[];const $e=et[C.marginLeftKey]??0,be=Zt(ne),xe=Math.max($e,eo),{resolvedWidth:lt}=Ct(C,"two-row-bottom");return r.jsx("div",{"data-controls":C.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(lt),style:{position:"absolute",top:0,left:k(be),width:k(xe),height:"100%",pointerEvents:"auto"}},C.marginLeftKey)}),Bo=()=>Fe.map((C,ne)=>{const{maxWidth:$e}=Ct(C,"two-row-bottom"),xe=Ze(ne)-ei/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":C.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String($e),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:k(xe),width:k(ei),height:"100%",pointerEvents:"auto"}})},`${C.widthKey}-junction`)}),h=()=>!o||he?null:r.jsxs(r.Fragment,{children:[Ho(),Oo()]}),K=C=>{const ne=!C.objectFit&&vn(x);return{className:`${e}-slide-image-cell${ne?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:q,maxHeight:O,...ne?{"--image-aspect-ratio":Wo(x)}:{}}}},Q=C=>C.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":C.objectFit}}:vn(x)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},le=C=>{if(C.length===0)return null;const ne=C.length>1,$e=ir(X),be=`calc(-0.5 * (${$e} + ${X}))`;if(C.length===1){const xe=C[0];return r.jsx("div",{...K(xe),children:r.jsx("img",{...Q(xe),src:xe.url,alt:xe.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:ne?{gap:X}:void 0,children:C.map((xe,lt)=>r.jsxs("div",{...K(xe),children:[r.jsx("img",{...Q(xe),src:xe.url,alt:xe.name??"",draggable:!1}),o&&ne&<<C.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:be,width:$e,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${xe.url}-${lt}`))})},ye=!!(N!=null&&N.title2||N!=null&&N.title3||Qe!=null&&Qe.title2||Qe!=null&&Qe.title3||(R??0)>0||o),rt=()=>r.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[r.jsx("div",{ref:qe,className:Se,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Ln(Ae||N)}),r.jsxs("div",{ref:xt,className:`${e}-titles-row-two-row`,style:{...Te&&ge?{minHeight:ge}:void 0,...Te&&De?{width:De,maxWidth:"100%"}:void 0},children:[r.jsxs("div",{className:`${e}-titles-row-top`,children:[r.jsxs("div",{className:Se,style:{position:"relative",flex:1,minWidth:0},children:[Qe&&Te?r.jsx("div",{className:`${Re} ${e}-titles-fade-out`,children:Cn(Qe)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Te?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Cn(N)})]}),$n()]}),ye?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[Qe&&Te?r.jsx("div",{className:`${Re} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:Tn(Qe)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Te?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${he?` ${e}-titles-layer-in-stacked`:""}`,children:Tn(N,!0)})]}):null]})]}),Pt=()=>{const C=ye;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...C?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:C?void 0:{flex:"0 0 auto",height:"auto"},children:Ln(N,!0)}),h()]})};return r.jsxs("div",{ref:pt,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Ht||nt()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:ct?void 0:-1,style:{opacity:me?1:0,transition:"opacity 300ms ease",pointerEvents:me?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:v,...Mt}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:{position:"relative",width:"100%",height:"100%",...Tt},...Oe,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:qt,onClick:C=>C.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":fe&&Z.length>1?"true":"false",onPointerDown:fe?un:void 0,onPointerUp:fe?Ft:void 0,onPointerCancel:fe?wn:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[Bt&&_?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:C=>{C.target===C.currentTarget&&Ue(D)},children:r.jsx("div",{className:`${e}-slide-area`,children:le(Bt.images)})},`slide-out-${D}`):null,r.jsx("div",{className:`${e}-slide-layer-in${_?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:B?le(B.images):null})},`slide-in-${D}-${ce}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:{width:"100%",height:"100%",...on},children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:ie,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...he?{flex:1,minHeight:0}:{}},children:r.jsxs("div",{className:`${e}-lightbox-content-area${he?` ${e}-lightbox-content-area-stacked`:""}`,children:[(he?Rt:rn)&&r.jsx("div",{className:`${e}-text-bar-cell${he?` ${e}-text-bar-cell-stacked`:""}`,children:he?$==="fade"?rt():Pt():$==="fade"?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:qe,className:Se,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:sn(Ae||N)}),r.jsxs("div",{ref:xt,className:Se,style:{width:"100%",...Te&&ge?{minHeight:ge}:void 0,...Te&&De?{width:De,maxWidth:"100%"}:void 0},children:[Qe&&Te?r.jsx("div",{className:`${Re} ${e}-titles-fade-out`,children:sn(Qe)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Te?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:sn(N)}),h()]})]}):r.jsxs("div",{style:{position:"relative",width:"100%"},children:[sn(N),h()]})}),!he&&r.jsxs("div",{className:`${e}-lightbox-persistent-controls`,style:te,children:[Me&&Hn(),ct&&On()]})]})})]})]})]})};function lg(e){return`
|
|
10351
|
+
`,Hm="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="#000000" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /></svg>'),Dn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",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 Om(e){const t={};return t[mt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[mt(e,"fontSettings")]={...Dn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[mt(e,"fontSize")]={...Dn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[mt(e,"lineHeight")]={...Dn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[mt(e,"letterSpacing")]={...Dn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[mt(e,"wordSpacing")]={...Dn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[mt(e,"textAlign")]={...Dn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[mt(e,"textAppearance")]={...Dn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Bm=zi.reduce((e,t)=>({...e,...Om(t)}),{}),jm=zi.reduce((e,t)=>({...e,[mt(t,"fontFamily")]:"Arial",[mt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[mt(t,"letterSpacing")]:0,[mt(t,"wordSpacing")]:0,[mt(t,"textAlign")]:"left",[mt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Va(e){return zi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[mt(n,"fontSize")]=i),o!==void 0&&(t[mt(n,"lineHeight")]=o),t},{})}const zm=Am(),Vm={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailGap:{type:"number",scope:"layout",title:"Thumbnail Gap",min:0,display:{type:"range-control"}},thumbnailMarginBottom:{type:"number",scope:"layout",title:"Thumbnail Margin Bottom",min:0,display:{type:"range-control"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"layout",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},thumbnailVisibility:{type:"boolean",scope:"layout",title:"Visibility",display:{type:"toggle-cycle",enum:["on","off"]}},thumbnailObjectFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailTrigger:{type:"string",scope:"common",title:"Trigger",display:{type:"toggle-cycle",enum:["click","hover"]}},thumbnailActive:{type:"boolean",scope:"common",title:"Active",display:{type:"toggle-cycle",enum:["outline","color","scale-up"]}},thumbnailActiveColor:{type:"string",scope:"common",title:"Outline Active",display:{type:"palette-color-picker",visible:!1}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},...Bm,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},iconMarginLeft:{type:"number",scope:"layout",title:"Icon margin left",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/lightbox_strip_1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Hm,closeIconColor:"#ffffff",closeIconHoverColor:"#cccccc",thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",thumbnailActiveColor:"#ffffff",title1Color:"#ffffff",title2Color:"#ffffff",title3Color:"#ffffff",...jm},layoutDefaults:{m:{thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,backgroundColor:"rgba(28, 31, 34, 0.9)",contentMarginTop:.08,iconMarginLeft:.02,...Va({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04})},d:{thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,title1Width:.3,title2Width:.13,title3Width:.14,title1MarginLeft:.02,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,backgroundColor:"rgba(28, 31, 34, 0.9)",contentMarginTop:.02,iconMarginLeft:.02,...Va({title1FontSize:.015,title1LineHeight:.02,title2FontSize:.015,title2LineHeight:.02,title3FontSize:.015,title3LineHeight:.02})}},displayRules:[{if:{name:"thumbnailActive",value:"outline"},then:{name:"properties.thumbnailActiveColor.display.visible",value:!0}}],layout:["__componentName__","thumbnailGap","thumbnailMarginBottom","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","contentMarginTop","title1MarginLeft","iconMarginLeft"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",title:"Thumbnails",items:["thumbnailVisibility","thumbnailObjectFit"]},{type:"row",items:["thumbnailTrigger","thumbnailActive"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[zm]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0,stripFieldsOnAdd:["title1","title2","title3","text"]},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input",supportsMainImage:!0}},title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_2.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_3.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_4.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_5.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_6.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_7.jpg",name:"",objectFit:"contain"}}]}},Dm={element:Fm,id:"lightbox-strip",name:"Lightbox Strip",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:Vm,sourceCode:Nm,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:zi.map(e=>({path:`styles.${mt(e,"fontSettings")}`}))}},qm=50,Da=10,qr="cntrl-lightbox-journal",Fo=qr,hr=`${qr}-`,No=e=>`${qr}-${e}`,Kr=e=>e===Fo||e.startsWith(hr),qa=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Ka=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=qa(t.get(No(e)));if(i)return i}const n=qa(t.get(Fo));if(n)return n;for(const[i]of t){if(!i.startsWith(hr))continue;const o=i.slice(hr.length);if(!/^\d+$/.test(o))continue;const s=Number.parseInt(o,10);if(Number.isFinite(s)&&s>=1)return s}return null},Ua=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Ds=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(a=>{Kr(a)&&i.searchParams.delete(a)}),t?i.searchParams.set(No(t),String(e)):i.searchParams.set(Fo,String(e));const o=n?"replaceState":"pushState",s=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",s)},Km=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===No(e)||i===Fo:Kr(i));if(n.forEach(i=>t.searchParams.delete(i)),n.length>0){const i=`${t.pathname}${t.search}${t.hash}`;window.history.replaceState(window.history.state,"",i)}},qs=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(No(e)):[...t.keys()].some(n=>Kr(n))},Um=(e,t)=>{if(qs(t)){if(e){window.history.back();return}Km(t)}},Gm=20,Xm=2,ir=e=>`max(${e}, ${Gm}px)`,hi=e=>((e==null?void 0:e.image)??[]).slice(0,Xm),Ks=e=>e.reduce((t,n)=>t+hi(n).length,0),Ym=(e,t)=>{const n=e.slice(0,t).reduce((o,s)=>o+hi(s).length,1),i=hi(e[t]).length;return{start:n,end:n+i-1}},Jm=(e,t)=>{const n=Ks(e),{start:i,end:o}=Ym(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},go=(e,t)=>t==="B"?e.flatMap((n,i)=>hi(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:hi(n)})),Zm=(e,t,n,i)=>{var s;if(n==="B")return`${t+1} / ${e.length}`;const o=((s=e[t])==null?void 0:s.entryIndex)??0;return Jm(i,o)},Ga=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Qm=(e,t,n)=>e==="B"?t.length>1:Ks(n)>1,ei=.004,eo=.004,or={title1Width:.13,title2Width:.13,title3Width:.14},to=(e,t,n,i,o)=>{const s=[];return t.title1&&s.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&s.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&s.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),s},wo=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...a]};const l=Math.min(s,d);return{overflow:s-l,widths:[d-l,...a]}},{overflow:i-1,widths:[]});return o},fr=(e,t)=>wo(e,t),qn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},no=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:wo(e.length,n),effective:fr(e.length,n)}},eg=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),tg=(e,t,n,i)=>e.slice(0,i+1).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),Vi=["title1","title2","title3","count"],gt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,ng={title1:"1",title2:"2",title3:"3",count:"Count"},ig=e=>[gt(e,"fontFamily"),gt(e,"fontSettings"),{type:"row",items:[gt(e,"fontSize"),gt(e,"lineHeight"),gt(e,"letterSpacing"),gt(e,"wordSpacing")]},gt(e,"textAlign"),gt(e,"textAppearance")],og=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Vi.map(e=>[ng[e],ig(e)]))}),rg={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},ag={title1:.02,title2:.02,title3:.02,count:.017},io=(e,t)=>{const n=i=>{const o=gt(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[rg[t]]}},oo=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??ag[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return kt(i,n)},sg=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,initialSlideIndex:a=0,enableUrlSync:d=!1,journalItemId:l=null,onBeforeClose:p,onClose:u})=>{const{type:w,coverFit:x,backgroundColor:v,imageGap:m,maxWidth:y,maxHeight:P,textTransition:$,title1Width:T,title2Width:S,title3Width:M,title1MarginLeft:I=0,title2MarginLeft:W=0,title3MarginLeft:b=0,titleRowMarginBottom:R=0,titleHeaderLayout:V="single-row",countCloseGap:g=0,closeIcon:L,closeIconMaxWidth:A,closeIconColor:H,closeIconHoverColor:U,contentMarginTop:se=0,iconMarginRight:j=0}=n,k=c.useCallback(C=>E.scalingValue(C,i??!1),[i]),X=k(m??0),q=`${y}%`,O=`${P}%`,Y=k(g),ie=k(se),re=k(j),F=oo("title1",io(n,"title1"),i),ae=oo("title2",io(n,"title2"),i),f=oo("title3",io(n,"title3"),i),oe=oo("count",io(n,"count"),i),he=V==="mobile",fe=!i||!!s,We=!o&&(!i||!!s),Z=c.useMemo(()=>go(t,w),[t,w]),[ce,G]=c.useState(a),B=Z[ce],N=B==null?void 0:B.entry,[me,Ce]=c.useState(!1),[Be,_e]=c.useState(null),[Te,Ne]=c.useState(!1),[z,ue]=c.useState(null),[_,J]=c.useState(!1),[D,ee]=c.useState(0),[ge,we]=c.useState(),[De,Ie]=c.useState(),[Ae,Ke]=c.useState(null),de=c.useRef(null),ke=c.useRef(0),Ve=c.useRef(0),Le=c.useRef(0),at=c.useRef(!1),tt=c.useRef(null),xt=c.useRef(null),qe=c.useRef(null),pt=c.useRef(null),Et=c.useRef(null),_t=c.useRef(null),At=c.useRef(null),ve=c.useCallback(()=>{const C=xt.current;if(!C)return;const ne=C.closest(`.${e}-lightbox-content-area`);if(!ne)return C.getBoundingClientRect().width;const $e=Array.from(ne.children).reduce((be,xe)=>!(xe instanceof HTMLElement)||xe.contains(C)?be:be+xe.getBoundingClientRect().width,0);return ne.getBoundingClientRect().width-$e},[e]),He=c.useCallback(()=>{de.current&&(clearTimeout(de.current),de.current=null)},[]),Ue=c.useCallback(C=>{C===ke.current&&(ue(null),J(!1))},[]),nt=c.useCallback(()=>{o||at.current||(at.current=!0,p==null||p(),Ce(!1),tt.current=setTimeout(()=>{u()},300))},[o,p,u]),vt=c.useCallback(C=>!!(C.closest("[data-controls]")||C.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Ht,backdropStyle:Mt,mediaAreaStyle:qt,overlayContentStyle:on,swipeHandlers:Oe,dismissAreaStyle:Tt}=js({enabled:We,onClose:nt,animMs:300,isBlockedTarget:vt}),bt=c.useCallback(C=>{d&&Ds(C+1,l,!0)},[d,l]),it=c.useCallback(C=>{if(C)return C.getBoundingClientRect().height},[]),ft=c.useCallback(C=>{if(Z.length===0)return;const ne=(C%Z.length+Z.length)%Z.length;if(ne===ce)return;const $e=Z[ce],be=Z[ne];ke.current+=1;const xe=ke.current,lt=$==="fade"&&Ga($e==null?void 0:$e.entry)!==Ga(be==null?void 0:be.entry),ut=it(qe.current),Ye=lt?(()=>{const Kt=ve();ki.flushSync(()=>{Ke(be.entry)}),qe.current&&Kt&&(qe.current.style.width=`${Kt}px`);const qi=it(qe.current);return qe.current&&(qe.current.style.width=""),{measuredIncomingTitlesHeight:qi,incomingTitlesMeasureWidth:Kt}})():void 0,Vt=Math.max(ut??0,(Ye==null?void 0:Ye.measuredIncomingTitlesHeight)??0)||void 0;ee(xe),ue(ce),J(!0),G(ne),bt(ne),Le.current=ne,lt?(He(),Vt&&we(Vt),Ye!=null&&Ye.incomingTitlesMeasureWidth&&Ie(Ye.incomingTitlesMeasureWidth),_e(($e==null?void 0:$e.entryIndex)??null),Ne(!0),Ve.current=be.entryIndex,de.current=setTimeout(()=>{_e(null),Ne(!1),we(void 0),Ie(void 0),Ke(null),de.current=null},400)):(He(),_e(null),Ne(!1),we(void 0),Ie(void 0),Ke(null),Ve.current=be.entryIndex)},[ce,He,ve,it,Z,bt,$]),Ot=c.useCallback(()=>{At.current=null},[]),un=c.useCallback(C=>{!fe||Z.length<=1||C.pointerType==="mouse"&&C.button!==0||C.target.closest("[data-controls]")||(At.current={startX:C.clientX,startY:C.clientY,pointerId:C.pointerId})},[fe,Z.length]),Ft=c.useCallback(C=>{var Kt;if(!fe||Z.length<=1||C.pointerType==="mouse"&&C.button!==0)return;if(Ht){Ot();return}const ne=At.current;if(!ne||ne.pointerId!==C.pointerId||(Ot(),C.target.closest("[data-controls]")))return;const be=C.clientX-ne.startX,xe=C.clientY-ne.startY,lt=Math.abs(be),ut=Math.abs(xe);if(lt>=qm&<>ut){ft(be>0?ce-1:ce+1);return}if(lt>Da||ut>Da)return;const Ye=(Kt=pt.current)==null?void 0:Kt.getBoundingClientRect(),Vt=Ye?Ye.left+Ye.width/2:window.innerWidth/2;ft(C.clientX<Vt?ce-1:ce+1)},[ce,fe,ft,Ht,Ot,Z.length]),wn=c.useCallback(C=>{const ne=At.current;(ne==null?void 0:ne.pointerId)===C.pointerId&&Ot()},[Ot]);zs(),c.useEffect(()=>{_t.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const C=requestAnimationFrame(()=>{Ce(!0),requestAnimationFrame(()=>{Et.current?Et.current.focus():pt.current&&pt.current.focus()})});return()=>{cancelAnimationFrame(C),tt.current&&clearTimeout(tt.current),de.current&&clearTimeout(de.current);const ne=_t.current;ne&&document.contains(ne)&&ne.focus()}},[]),c.useEffect(()=>{var C;$!=="fade"&&(Ve.current=((C=Z[ce])==null?void 0:C.entryIndex)??0,He(),_e(null),Ne(!1),we(void 0),Ie(void 0))},[ce,He,Z,$]),c.useEffect(()=>{const C=ne=>{if(ne.key==="Escape"){nt();return}if(ne.key==="ArrowLeft"&&Z.length>1){ft(ce-1);return}if(ne.key==="ArrowRight"&&Z.length>1){ft(ce+1);return}if(ne.key==="Tab"&&pt.current){const $e=pt.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),be=Array.from($e).filter(Ye=>!Ye.closest('[aria-hidden="true"]'));if(be.length===0)return;const xe=be[0],lt=be[be.length-1],ut=document.activeElement;ne.shiftKey?(ut===xe||!pt.current.contains(ut))&&(ne.preventDefault(),lt.focus()):(ut===lt||!pt.current.contains(ut))&&(ne.preventDefault(),xe.focus())}};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[ft,nt,ce,Z.length]),c.useLayoutEffect(()=>{He(),ke.current=0,ee(0),ue(null),J(!1),_e(null),Ne(!1),we(void 0),Ie(void 0),Ke(null),G(C=>{const ne=Math.max(0,Z.length-1);return Math.min(C,ne)})},[He,t.length,w,Z.length]),c.useLayoutEffect(()=>{var $e;const C=Math.max(0,Z.length-1),ne=Math.min(Math.max(0,a),C);Le.current=ne,Ve.current=(($e=Z[ne])==null?void 0:$e.entryIndex)??0,G(ne)},[a]);const Qe=Be!==null?t[Be]:null,Bt=z!==null?Z[z]:null,rn=(N==null?void 0:N.title1)||(N==null?void 0:N.title2)||(N==null?void 0:N.title3)||(Qe==null?void 0:Qe.title1)||(Qe==null?void 0:Qe.title2)||(Qe==null?void 0:Qe.title3),Me=Qm(w,Z,t),ct=L!==null,Rt=rn||Me||ct,te=Me&&ct?{gap:Y}:void 0,Se=`${e}-titles-stack${he?` ${e}-titles-stack-stacked`:""}`,Re=`${e}-titles-layer-out${he?` ${e}-titles-layer-out-stacked`:""}`,je=k(R),Xe=c.useMemo(()=>({title1Width:T??or.title1Width,title2Width:S??or.title2Width,title3Width:M??or.title3Width}),[T,S,M]),et=c.useMemo(()=>({title2MarginLeft:W,title3MarginLeft:b}),[W,b]),Ee=c.useMemo(()=>N?to(e,N,F,ae,f):[],[e,N,F,ae,f]),Lt=c.useMemo(()=>Ee.map(C=>Xe[C.widthKey]),[Ee,Xe]),yt=c.useMemo(()=>wo(Ee.length,Lt),[Ee.length,Lt]),St=c.useMemo(()=>fr(Ee.length,Lt),[Ee.length,Lt]),$t=c.useMemo(()=>Ee.filter(C=>C.prefix==="title1"),[Ee]),Fe=c.useMemo(()=>Ee.filter(C=>C.prefix==="title2"||C.prefix==="title3"),[Ee]),ot=c.useMemo(()=>no($t,Xe),[$t,Xe]),dt=c.useMemo(()=>no(Fe,Xe),[Fe,Xe]),Ct=c.useCallback((C,ne)=>{const $e=Ee.findIndex(xe=>xe.prefix===C.prefix);if(!he||ne==="single-row")return{effectiveWidth:St[$e]??0,resolvedWidth:yt[$e]??0,maxWidth:qn($e,yt)};if(ne==="two-row-top"){const xe=$t.findIndex(lt=>lt.prefix===C.prefix);return{effectiveWidth:ot.effective[xe]??0,resolvedWidth:ot.resolved[xe]??0,maxWidth:qn(xe,ot.resolved)}}const be=Fe.findIndex(xe=>xe.prefix===C.prefix);return{effectiveWidth:dt.effective[be]??0,resolvedWidth:dt.resolved[be]??0,maxWidth:qn(be,dt.resolved)}},[Ee,Fe,dt,St,yt,$t,ot,he]),an=c.useCallback(C=>tg(Ee,yt,et,C)+(he?0:I??0),[Ee,yt,et,he,I]),st=c.useCallback(()=>he?0:I??0,[he,I]),Zt=c.useCallback(C=>Fe.slice(0,C).reduce((ne,$e,be)=>ne+($e.marginLeftKey?et[$e.marginLeftKey]??0:0)+(dt.resolved[be]??0),0),[Fe,dt.resolved,et]),Ze=c.useCallback(C=>{const ne=Fe[C];return Zt(C)+(ne.marginLeftKey?et[ne.marginLeftKey]??0:0)+(dt.resolved[C]??0)},[Fe,dt.resolved,Zt,et]),Nt=c.useCallback((C,ne,$e)=>{if(!he||$e==="single-row"){const Ye=C.findIndex(Bn=>Bn.prefix===ne.prefix),Vt=C.map(Bn=>Xe[Bn.widthKey]),Kt=wo(C.length,Vt);return{effectiveWidth:fr(C.length,Vt)[Ye]??0,resolvedWidth:Kt[Ye]??0,maxWidth:qn(Ye,Kt)}}if($e==="two-row-top"){const Ye=C.filter(Bn=>Bn.prefix==="title1"),Vt=Ye.findIndex(Bn=>Bn.prefix===ne.prefix),{resolved:Kt,effective:qi}=no(Ye,Xe);return{effectiveWidth:qi[Vt]??0,resolvedWidth:Kt[Vt]??0,maxWidth:qn(Vt,Kt)}}const be=C.filter(Ye=>Ye.prefix==="title2"||Ye.prefix==="title3"),xe=be.findIndex(Ye=>Ye.prefix===ne.prefix),{resolved:lt,effective:ut}=no(be,Xe);return{effectiveWidth:ut[xe]??0,resolvedWidth:lt[xe]??0,maxWidth:qn(xe,lt)}},[Xe,he]),jt=(C,ne,$e)=>{const be=C.marginLeftKey?et[C.marginLeftKey]??0:0,{effectiveWidth:xe,resolvedWidth:lt,maxWidth:ut}=$e??Ct(C,ne),Ye=Math.max(be,eo),Vt=o&&ne==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":C.prefix,style:{width:k(xe),...be>0?{marginLeft:k(be)}:{}},children:[r.jsx("p",{className:C.className,style:C.style,children:C.text}),Vt&&C.marginLeftKey?r.jsx("div",{"data-controls":C.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(lt),style:{position:"absolute",top:0,left:k(-be),width:k(Ye),height:"100%",pointerEvents:"auto"}}):null,Vt?r.jsx("div",{"data-controls":C.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ut),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:k(-ei/2),width:k(ei),height:"100%",pointerEvents:"auto"}}):null]},C.className)},Sn=()=>r.jsx("div",{...o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:k(I??0),flexShrink:0,alignSelf:"stretch",...o?{pointerEvents:"auto"}:{}}}),Hn=()=>r.jsxs("div",{className:`${e}-text-bar-cell`,children:[r.jsx("span",{className:`${e}-entry-counter`,style:oe,"aria-live":"polite","aria-atomic":"true",children:Zm(Z,ce,w,t)}),o&&ct&&r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${ir(Y)} + ${Y}))`,width:ir(Y),height:"100%",pointerEvents:"auto",zIndex:3}})]}),On=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:E.scalingValue(A??0,i),height:E.scalingValue(A??0,i),marginRight:re,"--close-icon-hover-color":U},children:[r.jsx("button",{ref:Et,type:"button",className:`${e}-close-icon-inner`,onClick:nt,"aria-label":"Close",children:r.jsx(tn,{url:L??"",fill:H,hoverFill:i&&!s?H:U,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:re,height:"100%",pointerEvents:"auto"}})]}),$n=()=>!Me&&!ct?null:r.jsxs("div",{className:`${e}-titles-row-top-controls`,style:te,children:[Me?Hn():null,ct?On():null]}),Jn=C=>{if(!C)return null;const ne=to(e,C,F,ae,f);return r.jsxs(r.Fragment,{children:[I>0||o?Sn():null,ne.map($e=>jt($e,"single-row",Nt(ne,$e,"single-row")))]})},Cn=C=>{if(!C)return null;const ne=to(e,C,F,ae,f),$e=ne.find(be=>be.prefix==="title1");return!$e&&!(I>0||o)?null:r.jsxs(r.Fragment,{children:[I>0||o?Sn():null,$e?jt($e,"two-row-top",Nt(ne,$e,"two-row-top")):null]})},Tn=(C,ne=!1)=>{const $e=C?to(e,C,F,ae,f):[],be=$e.filter(ut=>ut.prefix==="title2"||ut.prefix==="title3"),xe=o&≠return be.length>0||xe||(R??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[be.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[be.map(ut=>jt(ut,"two-row-bottom",Nt($e,ut,"two-row-bottom"))),ne&&o?r.jsxs(r.Fragment,{children:[Di(),Bo()]}):null]}):null,(R??0)>0||xe?r.jsx("div",{"data-controls":xe?"titleRowMarginBottom":void 0,"data-controls-axis":xe?"y":void 0,"data-controls-reverse":xe?"":void 0,className:xe?`${e}-control`:void 0,style:{height:je,width:"100%",flexShrink:0,pointerEvents:xe?"auto":"none"}}):null]}):null},Ln=(C,ne=!1)=>r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-titles-row-top`,children:[Cn(C),$n()]}),Tn(C,ne)]}),sn=C=>he?r.jsx("div",{className:`${e}-titles-row-two-row`,style:{width:"100%"},children:Ln(C)}):C?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Jn(C)}):null,Ho=()=>{const C=he?-1:Ee.findIndex(be=>be.prefix==="title1"),ne=!he&&(o||(I??0)>0)?(()=>{const xe=Math.max(I??0,eo),lt=C>=0?yt[C]:T;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(lt),style:{position:"absolute",top:0,left:0,width:k(xe),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,$e=Ee.flatMap((be,xe)=>{if(!be.marginLeftKey)return[];const lt=et[be.marginLeftKey]??0,ut=eg(Ee,yt,et,xe)+st(),Ye=Math.max(lt,eo);return r.jsx("div",{"data-controls":be.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(yt[xe]),style:{position:"absolute",top:0,left:k(ut),width:k(Ye),height:"100%",pointerEvents:"auto"}},be.marginLeftKey)});return ne?[ne,...$e]:$e},Oo=()=>Ee.map((C,ne)=>{const $e=qn(ne,yt),xe=an(ne)-ei/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":C.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String($e),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:k(xe),width:k(ei),height:"100%",pointerEvents:"auto"}})},`${C.widthKey}-junction`)}),Di=()=>Fe.flatMap((C,ne)=>{if(!C.marginLeftKey)return[];const $e=et[C.marginLeftKey]??0,be=Zt(ne),xe=Math.max($e,eo),{resolvedWidth:lt}=Ct(C,"two-row-bottom");return r.jsx("div",{"data-controls":C.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(lt),style:{position:"absolute",top:0,left:k(be),width:k(xe),height:"100%",pointerEvents:"auto"}},C.marginLeftKey)}),Bo=()=>Fe.map((C,ne)=>{const{maxWidth:$e}=Ct(C,"two-row-bottom"),xe=Ze(ne)-ei/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":C.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String($e),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:k(xe),width:k(ei),height:"100%",pointerEvents:"auto"}})},`${C.widthKey}-junction`)}),h=()=>!o||he?null:r.jsxs(r.Fragment,{children:[Ho(),Oo()]}),K=C=>{const ne=!C.objectFit&&vn(x);return{className:`${e}-slide-image-cell${ne?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:q,maxHeight:O,...ne?{"--image-aspect-ratio":Wo(x)}:{}}}},Q=C=>C.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":C.objectFit}}:vn(x)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},le=C=>{if(C.length===0)return null;const ne=C.length>1,$e=ir(X),be=`calc(-0.5 * (${$e} + ${X}))`;if(C.length===1){const xe=C[0];return r.jsx("div",{...K(xe),children:r.jsx("img",{...Q(xe),src:xe.url,alt:xe.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:ne?{gap:X}:void 0,children:C.map((xe,lt)=>r.jsxs("div",{...K(xe),children:[r.jsx("img",{...Q(xe),src:xe.url,alt:xe.name??"",draggable:!1}),o&&ne&<<C.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:be,width:$e,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${xe.url}-${lt}`))})},ye=!!(N!=null&&N.title2||N!=null&&N.title3||Qe!=null&&Qe.title2||Qe!=null&&Qe.title3||(R??0)>0||o),rt=()=>r.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[r.jsx("div",{ref:qe,className:Se,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Ln(Ae||N)}),r.jsxs("div",{ref:xt,className:`${e}-titles-row-two-row`,style:{...Te&&ge?{minHeight:ge}:void 0,...Te&&De?{width:De,maxWidth:"100%"}:void 0},children:[r.jsxs("div",{className:`${e}-titles-row-top`,children:[r.jsxs("div",{className:Se,style:{position:"relative",flex:1,minWidth:0},children:[Qe&&Te?r.jsx("div",{className:`${Re} ${e}-titles-fade-out`,children:Cn(Qe)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Te?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Cn(N)})]}),$n()]}),ye?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[Qe&&Te?r.jsx("div",{className:`${Re} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:Tn(Qe)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Te?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${he?` ${e}-titles-layer-in-stacked`:""}`,children:Tn(N,!0)})]}):null]})]}),Pt=()=>{const C=ye;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...C?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:C?void 0:{flex:"0 0 auto",height:"auto"},children:Ln(N,!0)}),h()]})};return r.jsxs("div",{ref:pt,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Ht||nt()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:ct?void 0:-1,style:{opacity:me?1:0,transition:"opacity 300ms ease",pointerEvents:me?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:v,...Mt}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:{position:"relative",width:"100%",height:"100%",...Tt},...Oe,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:qt,onClick:C=>C.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":fe&&Z.length>1?"true":"false",onPointerDown:fe?un:void 0,onPointerUp:fe?Ft:void 0,onPointerCancel:fe?wn:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[Bt&&_?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:C=>{C.target===C.currentTarget&&Ue(D)},children:r.jsx("div",{className:`${e}-slide-area`,children:le(Bt.images)})},`slide-out-${D}`):null,r.jsx("div",{className:`${e}-slide-layer-in${_?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:B?le(B.images):null})},`slide-in-${D}-${ce}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:{width:"100%",height:"100%",...on},children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:ie,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...he?{flex:1,minHeight:0}:{}},children:r.jsxs("div",{className:`${e}-lightbox-content-area${he?` ${e}-lightbox-content-area-stacked`:""}`,children:[(he?Rt:rn)&&r.jsx("div",{className:`${e}-text-bar-cell${he?` ${e}-text-bar-cell-stacked`:""}`,children:he?$==="fade"?rt():Pt():$==="fade"?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:qe,className:Se,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:sn(Ae||N)}),r.jsxs("div",{ref:xt,className:Se,style:{width:"100%",...Te&&ge?{minHeight:ge}:void 0,...Te&&De?{width:De,maxWidth:"100%"}:void 0},children:[Qe&&Te?r.jsx("div",{className:`${Re} ${e}-titles-fade-out`,children:sn(Qe)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Te?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:sn(N)}),h()]})]}):r.jsxs("div",{style:{position:"relative",width:"100%"},children:[sn(N),h()]})}),!he&&r.jsxs("div",{className:`${e}-lightbox-persistent-controls`,style:te,children:[Me&&Hn(),ct&&On()]})]})})]})]})]})};function lg(e){return`
|
|
10352
10352
|
.${e}-wrapper {
|
|
10353
10353
|
position: relative;
|
|
10354
10354
|
width: 100%;
|
package/dist/index.mjs
CHANGED
|
@@ -9516,6 +9516,7 @@ type MarqueeProps = {
|
|
|
9516
9516
|
type: "object",
|
|
9517
9517
|
label: "Image",
|
|
9518
9518
|
display: {
|
|
9519
|
+
isObjectFitEditable: !1,
|
|
9519
9520
|
type: "media-input"
|
|
9520
9521
|
}
|
|
9521
9522
|
},
|
|
@@ -25399,6 +25400,7 @@ const tg = Vm(), eg = {
|
|
|
25399
25400
|
type: "object",
|
|
25400
25401
|
label: "Image",
|
|
25401
25402
|
display: {
|
|
25403
|
+
isObjectFitEditable: !1,
|
|
25402
25404
|
type: "media-input",
|
|
25403
25405
|
supportsMainImage: !0
|
|
25404
25406
|
}
|