1"use strict"; 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="272feb67-e0ae-58ee-9945-c1ec5eb4235b")}catch(e){}}(); 3(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2303],{87068:(e,t,n)=>{n.d(t,{B4:()=>ey,CX:()=>ez,DC:()=>tE,Dh:()=>e8,Dr:()=>tI,Gi:()=>eH,HO:()=>e4,H_:()=>eQ,J4:()=>ev,Lh:()=>h,NU:()=>eJ,Nv:()=>ta,Nw:()=>eA,Oc:()=>e$,Oi:()=>td,PJ:()=>eO,Pt:()=>eT,Qm:()=>z,UC:()=>v,VI:()=>tl,WN:()=>x,WT:()=>eB,Wb:()=>eg,XA:()=>o,Yz:()=>eC,ZZ:()=>e5,_z:()=>tp,gZ:()=>ek,hL:()=>tv,iD:()=>eE,jK:()=>e_,m6:()=>eX,oC:()=>tu,oP:()=>ts,oZ:()=>ef,q8:()=>em,qk:()=>eh,s4:()=>b,sN:()=>tc,uF:()=>eG,um:()=>eq,vm:()=>eU,xW:()=>ex,yA:()=>e1});var i,r,a,o,s=n(20880),l=n(74281);n(17085);var c=n(4963),d=n(29906);let u={RequestEditorMode:"requestEditorMode",RequestReadOnlyMode:"requestReadOnlyMode",ExperienceUpdated:"componentTreeUpdated",ComponentDraggingChanged:"componentDraggingChanged",ComponentDragCanceled:"componentDragCanceled",ComponentDragStarted:"componentDragStarted",ComponentDragEnded:"componentDragEnded",ComponentMoveEnded:"componentMoveEnded",CanvasResized:"canvasResized",SelectComponent:"selectComponent",HoverComponent:"hoverComponent",UpdatedEntity:"updatedEntity",AssembliesAdded:"assembliesAdded",AssembliesRegistered:"assembliesRegistered",MouseMove:"mouseMove",RequestedEntities:"REQUESTED_ENTITIES"};!function(e){e.READ_ONLY="readOnlyMode",e.EDITOR="editorMode",e.NONE="none"}(i||(i={}));let p={section:{id:"contentful-section",name:"Section"},container:{id:"contentful-container",name:"Container"},columns:{id:"contentful-columns",name:"Columns"},singleColumn:{id:"contentful-single-column",name:"Column"},button:{id:"contentful-button",name:"Button"},heading:{id:"contentful-heading",name:"Heading"},image:{id:"contentful-image",name:"Image"},richText:{id:"contentful-richText",name:"Rich Text"},text:{id:"contentful-text",name:"Text"},divider:{id:"contentful-divider",name:"Divider"},carousel:{id:"contentful-carousel",name:"Carousel"}},f="Assemblies",g=["cfVisibility","cfHorizontalAlignment","cfVerticalAlignment","cfMargin","cfPadding","cfBackgroundColor","cfWidth","cfMaxWidth","cfHeight","cfImageAsset","cfImageOptions","cfBackgroundImageUrl","cfBackgroundImageOptions","cfFlexDirection","cfFlexWrap","cfFlexReverse","cfBorder","cfBorderRadius","cfGap","cfColumnSpan","cfColumnSpanLock","cfColumns","cfFontSize","cfFontWeight","cfLineHeight","cfLetterSpacing","cfTextColor","cfTextAlign","cfTextTransform","cfTextBold","cfTextItalic","cfTextUnderline"];!function(e){e.REQUEST_ENTITIES="REQUEST_ENTITIES",e.REQUESTED_ENTITIES="REQUESTED_ENTITIES"}(r||(r={}));let y=["jpg","png","webp","gif","avif"],m=new Set([p.section.id,p.columns.id,p.container.id,p.singleColumn.id]);Object.values(p).map(e=>e.id);let h=e=>m.has(null!=e?e:""),v={cfVerticalAlignment:{validations:{in:[{value:"start",displayName:"Align left"},{value:"center",displayName:"Align center"},{value:"end",displayName:"Align right"},{value:"stretch",displayName:"Stretch"}]},type:"Text",group:"style",defaultValue:"center",displayName:"Vertical alignment"},cfHorizontalAlignment:{validations:{in:[{value:"start",displayName:"Align top"},{value:"center",displayName:"Align center"},{value:"end",displayName:"Align bottom"},{value:"stretch",displayName:"Stretch"}]},type:"Text",group:"style",defaultValue:"center",displayName:"Horizontal alignment"},cfVisibility:{displayName:"Visibility toggle",type:"Boolean",group:"style",defaultValue:!0},cfMargin:{displayName:"Margin",type:"Text",group:"style",defaultValue:"0 0 0 0"},cfPadding:{displayName:"Padding",type:"Text",group:"style",defaultValue:"0 0 0 0"},cfBackgroundColor:{displayName:"Background color",type:"Text",group:"style",defaultValue:"rgba(0, 0, 0, 0)"},cfWidth:{displayName:"Width",type:"Text",group:"style",defaultValue:"100%"},cfHeight:{displayName:"Height",type:"Text",group:"style",defaultValue:"fit-content"},cfMaxWidth:{displayName:"Max width",type:"Text",group:"style",defaultValue:"none"},cfFlexDirection:{displayName:"Direction",type:"Text",group:"style",defaultValue:"column"},cfFlexReverse:{displayName:"Reverse Direction",type:"Boolean",group:"style",defaultValue:!1},cfFlexWrap:{displayName:"Wrap objects",type:"Text",group:"style",defaultValue:"nowrap"},cfBorder:{displayName:"Border",type:"Text",group:"style",defaultValue:"0px solid rgba(0, 0, 0, 0)"},cfGap:{displayName:"Gap",type:"Text",group:"style",defaultValue:"0px"},cfHyperlink:{displayName:"URL",type:"Hyperlink",defaultValue:"",validations:{format:"URL",bindingSourceType:["entry","experience","manual"]}},cfOpenInNewTab:{displayName:"URL behaviour",type:"Boolean",defaultValue:!1,description:"Open in new tab"}},b={cfFontSize:{displayName:"Font Size",type:"Text",group:"style",defaultValue:"16px"},cfFontWeight:{validations:{in:[{value:"400",displayName:"Normal"},{value:"500",displayName:"Medium"},{value:"600",displayName:"Semi Bold"}]},displayName:"Font Weight",type:"Text",group:"style",defaultValue:"400"},cfImageAsset:{displayName:"Image",type:"Media",validations:{bindingSourceType:["asset","entry","manual"]}},cfImageOptions:{displayName:"Image options",type:"Object",group:"style",defaultValue:{width:"100%",height:"100%",targetSize:"unset"}}
3,cfBackgroundColor:{displayName:"Background color",type:"Text",group:"style",defaultValue:"rgba(0, 0, 0, 0)"},cfBackgroundImageUrl:{displayName:"Background image",type:"Media",validations:{bindingSourceType:["asset","entry","manual"]}},cfBackgroundImageOptions:{displayName:"Background image options",type:"Object",group:"style",defaultValue:{scaling:"fill",alignment:"left top",targetSize:"2000px"}},cfBorderRadius:{displayName:"Border Radius",type:"Text",group:"style",defaultValue:"0px"},cfLineHeight:{displayName:"Line Height",type:"Text",group:"style",defaultValue:"20px"},cfLetterSpacing:{displayName:"Letter Spacing",type:"Text",group:"style",defaultValue:"0px"},cfTextColor:{displayName:"Text Color",type:"Text",group:"style",defaultValue:"rgba(0, 0, 0, 1)"},cfTextAlign:{validations:{in:[{value:"start",displayName:"Align start"},{value:"center",displayName:"Align center"},{value:"end",displayName:"Align end"}]},displayName:"Text Align",type:"Text",group:"style",defaultValue:"start"},cfTextTransform:{validations:{in:[{value:"none",displayName:"Normal"},{value:"capitalize",displayName:"Capitalize"},{value:"uppercase",displayName:"Uppercase"},{value:"lowercase",displayName:"Lowercase"}]},displayName:"Text Transform",type:"Text",group:"style",defaultValue:"none"},cfTextBold:{displayName:"Bold",type:"Boolean",group:"style",defaultValue:!1},cfTextItalic:{displayName:"Italic",type:"Boolean",group:"style",defaultValue:!1},cfTextUnderline:{displayName:"Underline",type:"Boolean",group:"style",defaultValue:!1}};b.cfBorderRadius,b.cfBackgroundImageUrl,b.cfBackgroundImageOptions,b.cfBorderRadius,b.cfBackgroundImageUrl,b.cfBackgroundImageOptions,v.cfVisibility,b.cfBorderRadius,v.cfVisibility,b.cfBorderRadius,b.cfBackgroundColor,b.cfBackgroundImageUrl,b.cfBackgroundImageOptions,v.cfVisibility,b.cfBorderRadius,b.cfBackgroundColor,b.cfBackgroundImageUrl,b.cfBackgroundImageOptions;let x={},z=e=>{Object.assign(x,(e=>{if(e.text)for(let t in e.text){let n=e.text[t];e.text[t]={emphasis:n.emphasis||"none",fontSize:n.fontSize||"16px",case:n.case||"normal",fontWeight:n.fontWeight||"400",lineHeight:n.lineHeight||"20px",letterSpacing:n.letterSpacing||"0px",color:n.color||"#000000"}}if(e.border)for(let t in e.border){let n=e.border[t];e.border[t]={width:n.width||"1px",style:n.style||"solid",color:n.color||"#000000"}}return e})(e))},E=/\${(\w.+?)}/g,I=(e,t)=>{let[n,i]=e.replace(E,"$1").split("."),r=x[n];if(r&&r[i]){if("cfBorder"===t){let{width:e,style:t,color:n}=r[i];return"".concat(e," ").concat(t," ").concat(n)}return r[i]}return v[t]?v[t].defaultValue:b[t]?b[t].defaultValue:"0px"},S=s.z.literal("2023-09-28");s.z.union([s.z.literal("2023-08-23"),s.z.literal("2023-07-26"),s.z.literal("2023-06-27")]);let k=s.z.enum(["Text","RichText","Number","Date","Boolean","Location","Media","Object","Hyperlink","Array","Link"]),T=s.z.string().regex(/^[a-zA-Z0-9-_]{1,32}$/,{message:"Property needs to match: /^[a-zA-Z0-9-_]{1,32}$/"}),w=s.z.union([s.z.string(),s.z.boolean(),s.z.number(),s.z.record(s.z.any(),s.z.any()),s.z.undefined()]),V=s.z.array(s.z.object({sys:s.z.object({type:s.z.literal("Link"),id:s.z.string(),linkType:s.z.literal("Entry")})})),j=s.z.string().regex(/^[a-zA-Z0-9-_]{1,21}$/,{message:"Does not match /^[a-zA-Z0-9-_]{1,21}$/"}),N=s.z.record(j,s.z.object({sys:s.z.object({type:s.z.literal("Link"),id:s.z.string(),linkType:s.z.enum(["Entry","Asset"])})})),C=s.z.record(j,s.z.object({value:w})),A=s.z.string().regex(/^[a-zA-Z0-9-_]{1,54}$/,{message:"Does not match /^[a-zA-Z0-9-_]{1,54}$/"}),B=s.z.string().regex(/^[a-zA-Z0-9]{1,8}$/,{message:"Does not match /^[a-zA-Z0-9]{1,8}$/"}),O=(e,t)=>{if(!e.length||"*"!==e[0].query)return void t.addIssue({code:s.z.ZodIssueCode.custom,message:'The first breakpoint should include the following attributes: { "query": "*" }'});if(1===e.length)return;let n=e.map(e=>e.id);if(new Set(n).size!==n.length)return void t.addIssue({code:s.z.ZodIssueCode.custom,message:"Breakpoint IDs must be unique"});let i=e.slice(1),r=i[0].query.startsWith(">"),a=i[0].query.startsWith("<");r?(i.every(e=>{let{query:t}=e;return t.startsWith(">")})||t.addIssue({code:s.z.ZodIssueCode.custom,message:'Breakpoint queries must be in the format ">[size]px" for mobile-first strategy'}),i.map(e=>parseInt(e.query.replace(/px|<|>/,""))).every((e,t,n)=>0===t||e>n[t-1])||t.addIssue({code:s.z.ZodIssueCode.custom,message:"When using a mobile-first strategy, all breakpoints must have strictly increasing pixel values"})):a?(i.every(e=>{let{query:t}=e;return t.startsWith("<")})||t.addIssue({code:s.z.ZodIssueCode.custom,message:'Breakpoint queries must be in the format "<[size]px" for desktop-first strategy'}),i.map(e=>parseInt(e.query.replace(/px|<|>/,""))).every((e,t,n)=>0===t||e<n[t-1])||t.addIssue({code:s.z.ZodIssueCode.custom,message:"When using a desktop-first strategy, all breakpoints must have strictly decreasing pixel values"})):r||a||t.addIssue({code:s.z.ZodIssueCode.custom,message:"You may only use a mobile-first or desktop-first strategy for breakpoints using '<' or '>' queries"})},M=s.z.record(s.z.lazy(()=>w)),D=s.z.array(s.z.enum(["entry","asset","manual","experience"])).nonempty(),F=s.z.object({type:s.z.literal("DesignValue"),valuesByBreakpoint:M}).strict(),_=s.z.object({type:s.z.literal("BoundValue"),path:s.z.string()}).strict(),L=s.z.object({type:s.z.literal("HyperlinkValue"),linkTargetKey:s.z.string(),overrides:s.z.object({}).optional()}).strict(),R=s.z.object({type:s.z.literal("UnboundValue"),key:s.z.string()}).strict(),W=s.z.object({type:s.z.literal("ComponentValue"),key:s.z.string()}).strict(),q=s.z.object({type:s.z.literal("NoValue")}
3).strict(),U=s.z.discriminatedUnion("type",[F,_,R,L,W,q]),Z=s.z.object({type:s.z.literal("BoundValue"),path:s.z.string()}),P=s.z.record(A,Z),H=/^\*$|^[<>][0-9]+px$/,$=s.z.object({id:A,query:s.z.string().refine(e=>H.test(e)),previewSize:s.z.string().optional(),displayName:s.z.string(),displayIcon:s.z.enum(["desktop","tablet","mobile"]).optional()}).strict(),J=s.z.object({id:B.optional(),definitionId:T,prebindingId:s.z.string().optional(),displayName:s.z.string().optional(),slotId:s.z.string().optional(),variables:s.z.record(A,U),parameters:P.optional()}),Q=s.z.object({displayName:s.z.string().optional(),type:k,description:s.z.string().optional(),group:s.z.string().optional(),defaultValue:w.or(U).optional(),validations:s.z.object({bindingSourceType:D.optional(),required:s.z.boolean().optional(),format:s.z.literal("URL").optional(),in:s.z.array(s.z.object({value:s.z.union([s.z.string(),s.z.number()]),displayName:s.z.string().optional()})).optional()}).optional()}),G=J.extend({children:s.z.lazy(()=>G.array())}).superRefine((e,t)=>{let{id:n,prebindingId:i,parameters:r}=e;i&&!r&&t.addIssue({code:s.z.ZodIssueCode.custom,message:'Found "prebindingId" but no "parameters" for node with i
3d: "'.concat(n,'"')})}),K=s.z.object({breakpoints:s.z.array($).superRefine(O),children:s.z.array(G),schemaVersion:S}).strict(),Y=e=>s.z.record(s.z.string(),e);s.z.object({componentTree:Y(K),dataSource:Y(N),unboundValues:Y(C),usedComponents:Y(V).optional()});let X=s.z.object({parameterId:A,type:s.z.literal("ContentTypeMapping"),pathsByContentType:s.z.record(s.z.string(),s.z.object({path:s.z.string()})).superRefine((e,t)=>{let n=t.path[t.path.length-2];Object.keys(e).length>200&&t.addIssue({code:s.z.ZodIssueCode.custom,message:'Too many paths defined for variable mapping with id "'.concat(n,'", maximum allowed is ').concat(200)})})}),ee=s.z.object({nodeId:A,parameterId:A,prebindingId:A}).strict(),et=s.z.object({defaultSource:s.z.strictObject({type:s.z.enum(["Entry"]),contentTypeId:s.z.string(),link:s.z.strictObject({sys:s.z.strictObject({type:s.z.literal("Link"),id:s.z.string(),linkType:s.z.enum(["Entry"])})})}).optional(),contentTypes:s.z.array(s.z.string()).min(1),passToNodes:s.z.array(ee).max(1,'At most one "passToNodes" element is allowed per parameter definition.')}),en=s.z.record(A,et),ei=s.z.record(A,X),er=s.z.record(s.z.string().regex(/^[a-zA-Z0-9-_]{1,54}$/),Q),ea=s.z.object({id:A,parameterDefinitions:en,variableMappings:ei.optional(),allowedVariableOverrides:s.z.array(s.z.string()).optional()}).strict(),eo=s.z.object({variableDefinitions:er,thumbnailId:s.z.enum(["columns","columnsPlusRight","imagesSquare","subtitles","rowsPlusBottom","userRectangle","textbox","monitorPlay","article","table","star","heartStraight","frameCorners","rows","dotsThreeOutline","listDashes","checkerBoard","gridFour","slideshow","diamondsFour","cards","textColumns","duplex"]).optional(),category:s.z.string().max(50,"Category must contain at most 50 characters").optional(),prebindingDefinitions:s.z.array(ea).length(1).optional()}).strict().superRefine((e,t)=>{let{variableDefinitions:n,prebindingDefinitions:i}=e;if(!i||0===i.length)return;let{parameterDefinitions:r,variableMappings:a,allowedVariableOverrides:o}=i[0];es(r,t),el(a,o,t),ec(a,o,n,t),ed(a,r,t)});s.z.object({componentTree:Y(K),dataSource:Y(N),unboundValues:Y(C),usedComponents:Y(V).optional(),componentSettings:Y(eo)}).superRefine((e,t)=>{let{componentTree:n,componentSettings:i}=e,r=Object.values(n)[0],a=Object.values(i)[0];a&&r&&eu(r.children||[],a||{},t)});let es=(e,t)=>{Object.values(e).filter(e=>!(e.passToNodes&&e.passToNodes.length>0)).length>1&&t.addIssue({code:s.z.ZodIssueCode.custom,message:"Only one native parameter definition (parameter definition without passToNodes) is allowed per prebinding definition."})},el=(e,t,n)=>{let i=Object.keys(e||{}),r=new Set(t||[]),a=i.filter(e=>r.has(e));a.length>0&&n.addIssue({code:s.z.ZodIssueCode.custom,message:"Found both variable mapping and allowed override for the following keys: ".concat(a.map(e=>'"'.concat(e,'"')).join(", "),".")})},ec=(e,t,n,i)=>{let r=Object.entries(n).filter(e=>{let[t,n]=e;return"style"!==n.group}).map(e=>{let[t]=e;return t}),a=[...Object.keys(e||{}),...t||[]].filter(e=>!r.includes(e));a.length>0&&i.addIssue({code:s.z.ZodIssueCode.custom,message:"The following variable mappings or overrides are missing from the variable definitions: ".concat(a.map(e=>'"'.concat(e,'"')).join(", "),".")})},ed=(e,t,n)=>{let i=Object.keys(t||{});for(let[t,r]of Object.entries(e||{}))i.includes(r.parameterId)||n.addIssue({code:s.z.ZodIssueCode.custom,message:'The variable mapping with id "'.concat(t,'" references a non-existing parameterId "').concat(r.parameterId,'".')})},eu=(e,t,n)=>{if(!t.prebindingDefinitions||0===t.prebindingDefinitions.length)return;let{parameterDefinitions:i}=t.prebindingDefinitions[0],r=new Set;for(let e of Object.values(i||{})){var a;null==(a=e.passToNodes)||a.forEach(e=>r.add(e.nodeId))}if(!function(e,t){let n=e=>{let i=[...e.children];for(let r of(t(e),i))n(r)};if(Array.isArray(e))for(let t of e)n(t);else n(e)}(e,e=>{e.id&&r.has(e.id)&&r.delete(e.id)}),r.size>0){let e=Array.from(r).map(e=>'"'.concat(e,'"')).join(", ");n.addIssue({code:s.z.ZodIssueCode.custom,message:"The following node IDs referenced in passToNodes are not present in the component tree: ".concat(e,".")})}};s.z.object({id:T,name:s.z.string(),category:s.z.string().optional(),thumbnailUrl:s.z.string().optional(),thumbnailId:s.z.string().optional(),hyperlinkPattern:s.z.string().optional(),children:s.z.boolean().optional(),slots:s.z.record(T,s.z.object({displayName:s.z.string().optional()})).optional(),builtInStyles:s.z.array(s.z.string()).optional(),tooltip:s.z.object({imageUrl:s.z.string().optional(),description:s.z.string()}).optional(),variables:s.z.record(T,Q.extend({defaultValue:w.optional()}).superRefine((e,t)=>
3{switch(e.type){case"Array":void 0!==e.defaultValue&&t.addIssue({code:s.z.ZodIssueCode.custom,message:'defaultValue is not supported for "Array" type for '.concat(t.path.join(".")),fatal:!1});break;case"Boolean":void 0!==e.defaultValue&&"boolean"!=typeof e.defaultValue&&t.addIssue({code:s.z.ZodIssueCode.custom,message:'defaultValue must be a boolean when type is "Boolean" for '.concat(t.path.join("."),", got ").concat(typeof e.defaultValue," instead"),fatal:!1});break;case"Date":void 0!==e.defaultValue&&"string"!=typeof e.defaultValue&&t.addIssue({code:s.z.ZodIssueCode.custom,message:'defaultValue must be a string when type is "Date" for '.concat(t.path.join("."),", got ").concat(typeof e.defaultValue," instead"),fatal:!1});break;case"Hyperlink":void 0!==e.defaultValue&&"string"!=typeof e.defaultValue&&t.addIssue({code:s.z.ZodIssueCode.custom,message:'defaultValue must be a string when type is "Hyperlink" for '.concat(t.path.join("."),", got ").concat(typeof e.defaultValue," instead"),fatal:!1});break;case"Link":void 0!==e.defaultValue&&"object"!=typeof e.defaultValue&&t.addIssue({code:s.z.ZodIssueCode.custom,message:'defaultValue is not supported for "Link" type for '.concat(t.path.join(".")),fatal:!1});break;case"Location":void 0!==e.defaultValue&&"object"!=typeof e.defaultValue&&t.addIssue({code:s.z.ZodIssueCode.custom,message:'defaultValue must be an object when type is "Location" for '.concat(t.path.join("."),", got ").concat(typeof e.defaultValue," instead"),fatal:!1});break;case"Media":void 0!==e.defaultValue&&"string"!=typeof e.defaultValue&&t.addIssue({code:s.z.ZodIssueCode.custom,message:'defaultValue must be a string when type is "Media" for '.concat(t.path.join("."),", got ").concat(typeof e.defaultValue," instead"),fatal:!1});break;case"Number":void 0!==e.defaultValue&&"number"!=typeof e.defaultValue&&t.addIssue({code:s.z.ZodIssueCode.custom,message:'defaultValue must be a number when type is "Number" for '.concat(t.path.join("."),", got ").concat(typeof e.defaultValue," instead"),fatal:!1});break;case"Object":void 0!==e.defaultValue&&"object"!=typeof e.defaultValue&&t.addIssue({code:s.z.ZodIssueCode.custom,message:'defaultValue must be an object when type is "Object" for '.concat(t.path.join("."),", got ").concat(typeof e.defaultValue," instead"),fatal:!1});break;case"RichText":void 0!==e.defaultValue&&"object"!=typeof e.defaultValue&&t.addIssue({code:s.z.ZodIssueCode.custom,message:'defaultValue must be an object when type is "RichText" for '.concat(t.path.join("."),", got ").concat(typeof e.defaultValue," instead"),fatal:!1});break;case"Text":void 0!==e.defaultValue&&"string"!=typeof e.defaultValue&&t.addIssue({code:s.z.ZodIssueCode.custom,message:'defaultValue must be a string when type is "Text" for '.concat(t.path.join("."),", got ").concat(typeof e.defaultValue," instead"),fatal:!1})}}))}).superRefine((e,t)=>{var n;!0===e.children&&(e.variables.children||(null==(n=e.slots)?void 0:n.children))&&t.addIssue({code:s.z.ZodIssueCode.custom,message:"Cannot activate 'children: true' and name a variable or slot 'children' at the same time",fatal:!1}),e.variables&&e.slots&&Object.keys(e.variables).forEach(n=>{e.slots[n]&&t.addIssue({code:s.z.ZodIssueCode.custom,message:"Variable and slot cannot have the same name: ".concat(n),fatal:!1})})}),function(e){e.Type="type",e.Required="required",e.Unexpected="unexpected",e.Regex="regex",e.In="in",e.Size="size",e.Custom="custom"}(a||(a={}));let ep=e=>{switch(e.code){case s.eq.invalid_type:return(e=>{let t="undefined"===e.received?a.Required:a.Type;return{details:"undefined"===e.received?'The property "'.concat(e.path.slice(-1),'" is required here'):'The type of "'.concat(e.path.slice(-1),'" is incorrect, expected type: ').concat(e.expected),name:t,path:e.path,value:e.received.toString()}})(e);case s.eq.unrecognized_keys:return(e=>{let t=e.keys.map(e=>'"'.concat(e,'"')).join(", ");return{details:e.keys.length>1?"The properties ".concat(t," are not expected"):"The property ".concat(t," is not expected"),name:a.Unexpected,path:e.path}})(e);case s.eq.invalid_enum_value:return(e=>({details:e.message||"Value must be one of expected values",name:a.In,path:e.path,value:e.received.toString(),expected:e.options}))(e);
3case s.eq.invalid_string:return(e=>({details:e.message||"Invalid string",name:"regex"===e.validation?a.Regex:a.Unexpected,path:e.path}))(e);case s.eq.too_small:return(e=>({details:e.message||"Size should be at least ".concat(e.minimum),name:a.Size,path:e.path,min:e.minimum}))(e);case s.eq.too_big:return(e=>({details:e.message||"Size should be at most ".concat(e.maximum),name:a.Size,path:e.path,max:e.maximum}))(e);case s.eq.invalid_literal:return(e=>({details:e.message||"Value must be one of expected values",name:a.In,path:e.path,value:e.received,expected:[e.expected]}))(e);default:return(e=>({details:e.message||"An unexpected error occurred",name:a.Custom,path:e.path.map(String)}))(e)}},ef=[],eg=e=>{Object.assign(ef,e)},ey=()=>{if(!ef.length)return;let e=(e=>{let t=s.z.array($).superRefine(O).safeParse(e);return t.success?{success:!0}:{success:!1,errors:t.error.issues.map(ep)}})(ef);if(!e.success)throw Error("Invalid breakpoints definition. Failed with errors: \n".concat(JSON.stringify(e.errors,null,2)))},em={},eh=e=>{Object.assign(em,e)},ev=()=>({...em}),eb=/(<|>)(\d{1,})(px|cm|mm|in|pt|pc)$/,ex=e=>{let t={};return[e.map(e=>{let n=(e=>{let{query:t}=e;if("*"===t)return;let n=t.match(eb);if(!n)return;let[,i,r,a]=n;if("<"===i){let e=Number(r)-1;return"(max-width: ".concat(e).concat(a,")")}if(">"===i){let e=Number(r)+1;return"(min-width: ".concat(e).concat(a,")")}})(e);if(!n||"undefined"==typeof window)return;let i=window.matchMedia(n);return t[e.id]=i.matches,{id:e.id,signal:i}}).filter(e=>!!e),t]},ez=(e,t,n)=>{var i;let r,a,o=null===(r=e.map((e,i)=>{var r;let{id:a}=e;return{id:a,index:i,isMatch:null!=(r=t[a])?r:i===n}}),a=e=>{let{isMatch:t}=e;return t},i=[...r].reverse().find(a))||void 0===i?void 0:i.index;return null!=o?o:n},eE=e=>Math.max(e.findIndex(e=>{let{query:t}=e;return"*"===t}),0),eI=["cfMargin","cfPadding","cfGap","cfWidth","cfHeight","cfBackgroundColor","cfBorder","cfBorderRadius","cfFontSize","cfLineHeight","cfLetterSpacing","cfTextColor","cfMaxWidth"],eS=e=>null!=e&&""!==e,ek=function(e,t,n,i,r){let a=!(arguments.length>5)||void 0===arguments[5]||arguments[5],o=e=>{if(!a)return e;if(r&&eI.includes(r)){if(!e)return e;let t="",n=e.match(/(\${.+?}|\S+)/g);if(n)for(let e of n){let n=E.test(e)?I(e,r):e;t+="".concat(n," ")}return t.trim()}return e};if(!(e instanceof Object))return e;{var s,l;for(let i=n;i>=0;i--){let n=null==(l=t[i])?void 0:l.id;if(eS(e[n]))return o(e[n])}let r=null==(s=t[i])?void 0:s.id;if(eS(e[r]))return o(e[r])}};function eT(e,t){if(!e||!t)return null!=e?e:t;let n={...e.valuesByBreakpoint};for(let[e,i]of Object.entries(t.valuesByBreakpoint))eS(i)&&(n[e]=i);return{type:"DesignValue",valuesByBreakpoint:n}}let ew="cf_debug",eV=()=>{try{if("undefined"==typeof localStorage||null===localStorage)return!1;let e="cf_test_local_storage";if(localStorage.setItem(e,"yes"),"yes"===localStorage.getItem(e))return localStorage.removeItem(e),!0;return!1}catch(e){return!1}},ej=["error","warn","log","debug"];class eN{static getInstance(){return null===this.instance&&(this.instance=new eN),this.instance}getActiveLevel(){return this.activeLevel}setActiveLevel(e){this.activeLevel=e,eV()&&("debug"===this.activeLevel||"log"===this.activeLevel?localStorage.setItem(ew,"true"):localStorage.removeItem(ew))}logger(e){var t=this;return function(){for(var n=arguments.length,i=Array(n),r=0;r<n;r++)i[r]=arguments[r];let a=ej.indexOf(e);a<=ej.indexOf(t.activeLevel)&&console[e](...i)}}constructor(){if(this.activeLevel="warn",this.error=this.logger("error"),this.warn=this.logger("warn"),this.log=this.logger("log"),this.debug=this.logger("debug"),!eV())return;"true"===localStorage.getItem(ew)&&(this.activeLevel="debug")}}eN.instance=null;let eC=eN.getInstance(),eA=()=>{eC.setActiveLevel("debug"),console.log("Debug mode enabled")},eB=()=>{eC.setActiveLevel("warn"),console.log("Debug mode disabled")};function eO(e){var t,n,i;return null!==e&&"object"==typeof e&&!!(null==(t=e.sys)?void 0:t.id)&&(null==(n=e.sys)?void 0:n.type)==="Link"&&!!(null==(i=e.sys)?void 0:i.linkType)}let eM=e=>{let t=eD(e);return!!t&&t.fields.length>1},eD=e=>{let t=eF(e.split("/"),{startNextChunkOnElementEqualTo:"fields"});if(t.length<=1||2===t.length)return null;let[n,...i]=t;return/^\/([^/^~]+)$/.test(n.join("/"))&&i.every(e=>/^fields\/[^/^~]+\/~locale$/.test(e.join("/")))?{key:n[1],fields:i.map(e=>e[1])}:null},eF=(e,t)=>{let{startNextChunkOnElementEqualTo:n}=t,i=[],r=[],a=e=>e===n;for(let t=0;t<e.length;t++){let n=0===t,o=e[t];n?r=[o]:a(o)?(i.push(r),r=[o]):r.push(o)}return i.push(r),i.filter(e=>e.length>0)}
3,e_=(e,t,n)=>t&&n?function(e){let{template:t,context:n}=e;return t.replace(/{\s*locale\s*}/g,n.locale).replace(/{\s*([\S]+?)\s*}/g,(e,t)=>{var i;let r=t+"_NOT_FOUND",a=null!=(i=function(e,t){let n=function(e,t){let n="fields",i=e.indexOf(n);if(-1!==i){let r=e.indexOf(".",i+n.length+1);if(-1!==r)return e.slice(0,r+1)+t+"."+e.slice(r+1)}return e}(t,e.locale),i=n.replace(/\[/g,".").replace(/\]/g,"").split(".").reduce((e,t)=>(e||{})[t],e);return"object"==typeof i&&null!==i?i[e.locale]:i}(n,t))?i:r;return String("function"==typeof a?a():a)})}({template:e,context:{entry:t,locale:n}}):null,eL=["cfImageAsset"],eR=g.filter(e=>!eL.includes(e)),eW=["cfSsrClassName","cfWrapColumns","cfWrapColumnsCount"],eq=e=>{let t=[...eR,...eW];return Object.fromEntries(Object.entries(e).filter(e=>{let[n]=e;return!t.includes(n)}))},eU=e=>!1===e?{display:"none !important"}:{},eZ=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"column";return"row"===n?{alignItems:e,justifyContent:"center"===t?"safe ".concat(t):t}:{alignItems:t,justifyContent:"center"===e?"safe ".concat(e):e}},eP=e=>{let t=e.replace(/[A-Z]/g,e=>"-"+e.toLowerCase());return t.replace(/\d+$/,"")},eH=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Object.entries(e).filter(e=>{let[,t]=e;return void 0!==t}).map(e=>{let[n,i]=e;return t?"".concat(eP(n),": ").concat(i,";"):"".concat(eP(n),":").concat(i,";")}).join(t?"\n":"")},e$=e=>{var t,n,i,r;return Object.fromEntries(Object.entries({margin:e.cfMargin,padding:e.cfPadding,backgroundColor:e.cfBackgroundColor,width:e.cfWidth||(null==(t=e.cfImageOptions)?void 0:t.width),height:e.cfHeight||(null==(n=e.cfImageOptions)?void 0:n.height),maxWidth:e.cfMaxWidth,...(e=>e?{gridColumn:"span ".concat(e)}:{})(e.cfColumnSpan),...(e=>{if(!e)return{};let t=e.split(" ");if(t.length<3)return{border:e};let[n,i,...r]=t,a=r.join(" ");return{border:"".concat(n," ").concat(i," ").concat(a)}})(e.cfBorder),borderRadius:e.cfBorderRadius,gap:e.cfGap,...eZ(e.cfHorizontalAlignment,e.cfVerticalAlignment,e.cfFlexDirection),flexDirection:e.cfFlexReverse&&e.cfFlexDirection?"".concat(e.cfFlexDirection,"-reverse"):e.cfFlexDirection,flexWrap:e.cfFlexWrap,...((e,t)=>{let n,i;if(e){if("string"==typeof e)n="url(".concat(e,")");else{var r;let t=null==(r=e.srcSet)?void 0:r.join(",");n="url(".concat(e.url,")"),i="image-set(".concat(t,")")}return{backgroundImage:n,backgroundImage2:i,backgroundRepeat:(null==t?void 0:t.scaling)==="tile"?"repeat":"no-repeat",backgroundPosition:(e=>{if(!e||"string"!=typeof e)return;let[t,n]=e.trim().split(/\s+/,2),i=["left","right","center"].includes(t),r=["top","bottom","center"].includes(n);return t=i?t:"left",n=r?n:"top","".concat(t," ").concat(n)})(null==t?void 0:t.alignment),backgroundSize:(e=>"fill"===e?"cover":"fit"===e?"contain":void 0)(null==t?void 0:t.scaling)}}})(e.cfBackgroundImageUrl,e.cfBackgroundImageOptions),fontSize:e.cfFontSize,fontWeight:e.cfTextBold?"bold":e.cfFontWeight,fontStyle:e.cfTextItalic?"italic":void 0,textDecoration:e.cfTextUnderline?"underline":void 0,lineHeight:e.cfLineHeight,letterSpacing:e.cfLetterSpacing,color:e.cfTextColor,textAlign:(e=>{if(e){if(!ev().__disableTextAlignmentTransform){if("left"===e)return"start";if("right"===e)return"end"}return e}})(e.cfTextAlign),textTransform:e.cfTextTransform,objectFit:null==(i=e.cfImageOptions)?void 0:i.objectFit,objectPosition:null==(r=e.cfImageOptions)?void 0:r.objectPosition}).filter(e=>{let[,t]=e;return void 0!==t}))},eJ=(e,t)=>!t.children.length&&((e,t)=>h(e)&&!(null==t?void 0:t.toString().endsWith("px")))(t.definitionId,e.height)?{...e,minHeight:"80px"}:e,eQ=e=>{let{componentId:t,usedComponents:n}=e;return!!(null==n?void 0:n.length)&&n.some(e=>e.sys.id===t)},eG=e=>(null==e?void 0:e.category)===f;function eK(e){let t=e.match(/^(\d+(\.\d+)?)(px|em|rem)$/);return t?{value:parseFloat(t[1]),unit:t[3]}:null}function eY(e){switch(e.unit){case"px":default:return e.value;case"em":case"rem":return 16*e.value}}let eX=e=>({id:e,name:"Component",variables:{},children:!0,category:f}),e0=e=>{let[t,n]=[e[0],e.substring(1)];return"(".concat("<"===t?"max-width":"min-width",":").concat(n,")")},e1=e=>{let{cssByClassName:t,condition:n,nextCondition:i}=e,r=Object.entries(t).reduce((e,t)=>
3{let[n,i]=t;return""===i?e:"".concat(e,".").concat(n,"{").concat(i,"}")},"");if(""===r)return"";let a=e0(n);if(!i)return"*"===n?r:"@media".concat(a,"{").concat(r,"}");let o=e0(i);return"*"===n?"@media not ".concat(o,"{").concat(r,"}"):"@media".concat(a," and (not ").concat(o,"){").concat(r,"}")};function e2(e,t,n,i){e.startsWith("//")&&(e="https:"+e);let r=new URLSearchParams;t&&r.append("w",t.toString()),n&&n>0&&n<100&&r.append("q",n.toString()),i&&r.append("fm",i);let a=r.toString();return"".concat(e).concat(a?"?"+a:"")}function e3(e,t,n){if(!e.details.image)throw Error("No image in file asset to transform");if(t<0||t>100)throw Error("Quality must be between 0 and 100");if(n&&!y.includes(n))throw Error("Format must be one of ".concat(y.join(", ")));return!0}let e9=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"100%",i=arguments.length>3?arguments[3]:void 0,r=Number(n.replace("%",""));e3(e,r,i),e3(e,r,i);let a=e.url,{width1x:o,width2x:s}=function(e,t){let n=0,i=0,r=t.details.image.width;return i=Math.min(2*(n=e.endsWith("px")?Math.min(Number(e.replace("px","")),r):Math.min(2e3,r)),r),{width1x:n,width2x:i}}(t,e),l=e2(a,o,r,i),c=e2(a,s,r,i);return{url:e2(a,s,r,i),srcSet:["url(".concat(l,") 1x"),"url(".concat(c,") 2x")],file:e}},e4=e=>g.includes(e),e8=(e,t,n)=>"string"==typeof t&&e4(e)?t.replace(/\$\{(\w[^}]*)}/g,(t,i)=>{let r=n[i];if(!r){var a,o;return(null==(a=v[e])?void 0:a.defaultValue)?String(v[e].defaultValue):(null==(o=b[e])?void 0:o.defaultValue)?String(b[e].defaultValue):"0px"}if(("cfBorder"===e||e.startsWith("cfBorder_"))&&"object"==typeof r){let{width:e,style:t,color:n}=r;return"".concat(e," ").concat(t," ").concat(n)}return String(r)}).replace(/ +/g," "):t,e5=e=>{let t=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object.entries(e).reduce((e,i)=>{let[r,a]=i,o=n?"".concat(n,".").concat(r):r;return!a||"object"!=typeof a||Array.isArray(a)||"object"==typeof a&&("width"in a||"style"in a||"color"in a)?{...e,[o]:a}:{...e,...t(a,o)}},{})};return t(e)};function e6(e,t){if(!t.length)return e;try{let[n,...i]=t;return e6(e[n],i)}catch(e){return}}let e7=(e,t)=>{let n=e6(e,t.split("/").slice(2,-1));return n&&"object"==typeof n&&n.url?n.url:n},te=(e,t)=>{if(e){if((e=>{var t,n,i;return(null==e||null==(i=e.data)||null==(n=i.target)||null==(t=n.sys)?void 0:t.type)==="Link"})(e)){let n=t.getEntityFromLink(e.data.target);n&&(e.data.target=n)}"content"in e&&Array.isArray(e.content)&&e.content.forEach(e=>te(e,t))}},tt=e=>{var t,n,i,r;return(null==e||null==(t=e.sys)?void 0:t.type)==="Entry"&&!!(null==(n=e.fields)?void 0:n.title)&&!!(null==(i=e.fields)?void 0:i.slug)&&!!(null==(r=e.fields)?void 0:r.componentTree)&&Array.isArray(e.fields.componentTree.breakpoints)&&Array.isArray(e.fields.componentTree.children)&&"string"==typeof e.fields.componentTree.schemaVersion},tn=e=>{var t;return null!==e&&"object"==typeof e&&"sys"in e&&(null==(t=e.sys)?void 0:t.type)==="Entry"},ti=e=>{var t;return null!==e&&"object"==typeof e&&"sys"in e&&(null==(t=e.sys)?void 0:t.type)==="Asset"},tr=e=>void 0!==e,ta=(e,t,n,i,r,a,o)=>{let s=t.getEntryOrAsset(n,o);if(s)switch(a){case"Media":if("Entry"===s.sys.type)return e7(s,o);return((e,t,n,i,r)=>{var a,o,s,l,c,d,u;if(!eM(r)&&!((e,t)=>{let n=e.split("/");return n.length<2?(eC.warn("[experiences-core::pathSchema] Attempting to check whether last named segment of the path (".concat(e,") equals to '").concat(t,"', but the path doesn't have enough segments.")),!1):n[n.length-2]===t})(r,"file"))return e7(e,r);if("cfImageAsset"===i){let i="cfImageOptions",r=n((null==(o=t[i])?void 0:o.type)==="DesignValue"?t[i].valuesByBreakpoint:{});if(!r)return void eC.error("[experiences-core::transformMedia] Error transforming image asset: Required variable [".concat(i,"] missing from component definition"));try{return(e=>{let{file:t,sizes:n,loading:i,quality:r="100%",format:a}=e,o=Number(r.replace("%",""));e3(t,o,a);let s=t.url,l=Math.min(t.details.image.width,4e3),c=Math.max(2,Math.ceil(l/500)),d=Array.from({length:c},(e,t)=>Math.ceil(l/c*(t+1))),u=n?d.map(e=>"".concat(e2(s,e,o,a)," ").concat(e,"w")):[],p=t.details.image.width;return p>4e3&&u.push("".concat(e2(s,void 0,o,a)," ").concat(p,"w")),{url:e2(s,t.details.image.width>2e3?2e3:void 0,o,a),srcSet:u,sizes:n,file:t,loading:i}})({file:e.fields.file,loading:r.loading,sizes:r.targetSize,quality:r.quality,format:r.format})}catch(e){eC.error("[experiences-core::transformMedia] Error transforming image asset",e)}return}
3if("cfBackgroundImageUrl"===i){let i=n((null==(s=t.cfWidth)?void 0:s.type)==="DesignValue"?t.cfWidth.valuesByBreakpoint:{},"cfWidth")||"100%",r="cfBackgroundImageOptions",a=n((null==(l=t[r])?void 0:l.type)==="DesignValue"?t[r].valuesByBreakpoint:{});if(!a)return void eC.error("[experiences-core::transformMedia] Error transforming image asset: Required variable [".concat(r,"] missing from component definition"));try{let t=null==(d=e.fields.file)?void 0:d.details,n=(null==t||null==(u=t.image)?void 0:u.width)||0,r=eK(a.targetSize),o=r?eY(r):n;return o<n&&(i="".concat(o,"px")),e9(e.fields.file,i,a.quality,a.format)}catch(e){eC.error("[experiences-core::transformMedia] Error transforming image asset",e)}return null==(c=e.fields.file)?void 0:c.url}return null==(a=e.fields.file)?void 0:a.url})(s,e,i,r,o);case"RichText":return((e,t,n)=>{let i=e7(e,n);if("string"==typeof i)return{data:{},content:[{nodeType:c.BLOCKS.PARAGRAPH,data:{},content:[{data:{},nodeType:"text",value:i,marks:[]}]}],nodeType:c.BLOCKS.DOCUMENT};if("object"==typeof i&&i.nodeType===c.BLOCKS.DOCUMENT){let e=l(i);return te(e,t),e}})(s,t,o);case"Array":return function(e,t,n){if("Asset"===e.sys.type)return e;let i=t.split("/").slice(2,-1),r=e6(e,i);if(!Array.isArray(r))return void eC.warn("[experiences-core::getArrayValue] A field '".concat(i,"' of an entity was bound to an Array variable. Expected value of that field to be an array, but got: ").concat(JSON.stringify(r)),{entity:e});let a=r.map(e=>{var t;if("string"==typeof e)return e;if((null==e||null==(t=e.sys)?void 0:t.type)!=="Link")return void eC.warn("[experiences-core::getArrayValue] Expected value to be a string or Link, but got: ".concat(JSON.stringify(e)));{let t=n.getEntityFromLink(e);if(!t)return;return t}}).filter(tr);return a.length>0?a:void 0}(s,o,t);case"Link":return function(e,t,n){let i;if(ti(e))return e;if(!tn(e))throw Error("Expected an Entry or Asset, but got: ".concat(JSON.stringify(e)));let r=t.split("/").slice(2,-1),a=e6(e,r);if(ti(a)||tn(a))i=a;else{if((null==a?void 0:a.sys.type)!=="Link")return void eC.warn("[experiences-core::getResolvedEntryFromLink] When attempting to follow link in field '".concat(r,"' of entity, the value is expected to be a link, but got: ").concat(JSON.stringify(a)),{entity:e});i=n.getEntityFromLink(a)}if(i)return i}(s,o,t);default:return e7(s,o)}};class to extends Error{constructor(e){super(e)}}let ts=e=>{try{return tl(e),!1}catch(e){if(e instanceof to)return e.message;throw e}},tl=e=>{if(!e.data)throw new to("Field event.data is missing");if("string"!=typeof e.data)throw new to("Field event.data must be a string, instead of '".concat(typeof e.data,"'"));if(!(e=>{try{let t=JSON.parse(e);if("object"!=typeof t)return!1;return!0}catch(e){return!1}})(e.data))throw new to("Field event.data must be a valid JSON object serialized as string");let t=JSON.parse(e.data);if(!t.source)throw new to("Field eventData.source must be equal to 'composability-app'");if("composability-app"!==t.source)throw new to("Field eventData.source must be equal to 'composability-app', instead of '".concat(t.source,"'"));let n=Object.values(u);if(!n.includes(t.eventType)&&t.eventType!==r.REQUESTED_ENTITIES)throw new to("Field eventData.eventType must be one of the supported values: [".concat(n.join(", "),"]"));return t},tc=e=>{let{locale:t,mode:n}=e;if(n!==i.EDITOR&&n!==i.READ_ONLY&&!t)throw Error('Parameter "locale" is required for experience builder initialization outside of editor mode')},td=(e,t)=>{let n=e=>"data"in e?e.data.slotId:e.slotId,i={};for(let r in t.slots){let t=e.filter(e=>n(e)===r);i[r]=t.length?t:null}let r=e.filter(e=>void 0===n(e));return t.children&&r.length?{slotNodesMap:i,directChildNodes:r}:{slotNodesMap:i,directChildNodes:void 0}},tu=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!t||!Array.isArray(t)||!t.length)return{dataSource:{},parameters:{}};let n=t[0],i={},r={};for(let[t,a]of Object.entries(null!=(e=n.parameterDefinitions)?e:{}))if(a.defaultSource&&eO(a.defaultSource.link)){let e=a.defaultSource.link.sys.id;i[e]=a.defaultSource.link,r[t]={type:"BoundValue",path:"/".concat(e)}}return{dataSource:i,parameters:r}},tp=(e,t)=>{var n;"undefined"!=typeof window&&(eC.debug("[experiences-sdk-react::sendMessage] Sending message [".concat(e,"]"),{source:"customer-app",eventType:e,payload:t}),null==(n=window.parent)||n.postMessage({source:"customer-app",eventType:e,payload:t},"*"))};function tf(e){for(let t of Object.getOwnPropertyNames(e)){let n=e[t];n&&"object"==typeof n&&tf(n)}return Object.freeze(e)}class tg{get entities(){return[...this.entryMap.values(),...this.assetMap.values()]}updateEntity(e){this.addEntity(e)}getEntryOrAsset(e,t){let n;if(eM(t))return this.getDeepEntry(e,t);if(eO(e)){let t="Entry"===e.sys.linkType?this.entryMap.get(e.sys.id):this.assetMap.get(e.sys.id);if(!t||t.sys.type!==e.sys.linkType)return void eC.warn("[experiences-core::EntityStoreBase] Experience references unresolved entity: ".concat(JSON.stringify(e)));n=t}else if(ti(e)||tn(e))n=e;else throw Error("[experiences-core::EntityStoreBase] Unexpected object when resolving entity: ".concat(JSON.stringify(e)));return n}getValue(e,t){let n=this.getEntity(e.sys.linkType,e.sys.id);return n?e6(n,t):void eC.warn("Unresolved entity reference: ".concat(e.sys.linkType," with ID ").concat(e.sys.id))}getEntityFromLink(e){let t="Entry"===e.sys.linkType?this.entryMap.get(e.sys.id):this.assetMap.get(e.sys.id);return t&&t.sys.type===e.sys.linkType?t:void eC.warn("[experiences-core::EntityStoreBase] Experience references unresolved entity: ".concat(JSON.stringify(e)))}getAssetById(e){let t=this.assetMap.get(e);return t||void eC.warn('[experiences-core::EntityStoreBase] Asset with ID "'.concat(e,'" is not found in the store'))}getEntryById(e){let t=this.entryMap.get(e);return t||void eC.warn('[experiences-core::EntityStoreBase] Entry with ID "'.concat(e,'" is not found in the store'))}getEntitiesFromMap(e,t){let n=[],i=[];for(let r of t){let t=this.getEntity(e,r);t?n.push(t):i.push(r)}return{resolved:n,missing:i}}addEntity(e){if(ti(e))this.assetMap.set(e.sys.id,tf(l(e)));else if(tn(e))this.entryMap.set(e.sys.id,tf(l(e)));else throw Error("Attempted to add an entity to the store that is neither Asset nor Entry: '".concat(JSON.stringify(e),"'"))}async fetchAsset(e){let{resolved:t,missing:n}=this.getEntitiesFromMap("Asset",[e]);return n.length?void eC.warn('[experiences-core::EntityStoreBase] Asset "'.concat(e,'" is not in the store')):t[0]}async fetchAssets(e){let{resolved:t,missing:n}=this.getEntitiesFromMap("Asset",e);if(n.length)throw Error("Missing assets in the store (".concat(n.join(","),")"));return t}async fetchEntry(e){let{resolved:t,missing:n}=this.getEntitiesFromMap("Entry",[e]);return n.length?void eC.warn('[experiences-core::EntityStoreBase] Entry "'.concat(e,'" is not in the store')):t[0]}async fetchEntries(e){let{resolved:t,missing:n}=this.getEntitiesFromMap("Entry",e);if(n.length)throw Error("Missing assets in the store (".concat(n.join(","),")"));return t}getDeepEntry(e,t){let n=(e,t)=>{let n=[],i=t;for(let t=0;t<e.length;t++){let r=t===e.length-1,[,a,o]=e[t];if(!i)throw Error("Logic Error: Cannot resolve field ".concat(a," of a fieldset as there is no entity to resolve it from."));if(r){n.push([i,a,o]);break}let s=e6(i,["fields",a]);if(void 0===s)return{resolvedFieldset:n,isFullyResolved:!1,reason:"Cannot resolve field Link<".concat(i.sys.type,">(sys.id=").concat(i.sys.id,").fields[").concat(a,"] as field value is not defined")};if(eO(s)){let e=this.getEntityFromLink(s);if(void 0===e)return{resolvedFieldset:n,isFullyResolved:!1,reason:"Field reference Link (sys.id=".concat(s.sys.id,") not found in the EntityStore, waiting...")};n.push([i,a,o]),i=e}else{if(!(ti(s)||tn(s)))return{resolvedFieldset:n,isFullyResolved:!1,reason:"Deep path points to an invali
3d field value of type '".concat(typeof s,"' (value=").concat(s,")")};n.push([i,a,o]),i=s}}return{resolvedFieldset:n,isFullyResolved:!0}},i=eO(e)?this.getEntityFromLink(e):e;if(void 0===i)return;let{resolvedFieldset:r,isFullyResolved:a,reason:o}=n((e=>{let t=eD(e);if(null===t)throw Error("Cannot parse path '".concat(e,"' as deep path"));return t.fields.map(e=>[null,e,"~locale"])})(t),i);if(!a){o&&eC.log("[experiences-core::EntityStoreBase] Deep path wasn't resolved till leaf node, falling back to undefined, because: ".concat(o));return}let[s]=r[r.length-1];return s}getEntity(e,t){return"Asset"===e?this.assetMap.get(t):this.entryMap.get(t)}toJSON(){return{entryMap:Object.fromEntries(this.entryMap),assetMap:Object.fromEntries(this.assetMap),locale:this.locale}}constructor({entities:e,locale:t}){for(let n of(this.entryMap=new Map,this.assetMap=new Map,this.locale=t,e))this.addEntity(n)}}let ty=e=>{let{experienceEntryFields:t,parentComponents:n}=e,i=[],r=null==t?void 0:t.usedComponents;if(!r||0===r.length)return[];for(let e of r)if("fields"in e){if(i.push(e),n.has(e.sys.id))continue;i.push(...ty({experienceEntryFields:e.fields,parentComponents:new Set([...n,e.sys.id])}))}return i};class tm extends tg{static calculateHoistedParameterDefinitions(e,t){var n,i;let r={};return r=Object.assign(r,(null==(i=e.componentSettings)||null==(n=i.prebindingDefinitions)?void 0:n[0].parameterDefinitions)||{}),t.forEach(e=>{var t,n;r={...r,...null==(n=e.fields.componentSettings)||null==(t=n.prebindingDefinitions)?void 0:t[0].parameterDefinitions}}),t.flatMap(e=>(e.fields.usedComponents||[]).filter(e=>void 0!==e&&tt(e))).forEach(e=>{var t,n;r={...r,...null==(n=e.fields.componentSettings)||null==(t=n.prebindingDefinitions)?void 0:t[0].parameterDefinitions}}),r}static calculateHoistedVariableMappings(e,t){var n,i;let r={};return r=Object.assign(r,(null==(i=e.componentSettings)||null==(n=i.prebindingDefinitions)?void 0:n[0].variableMappings)||{}),t.forEach(e=>{var t,n;r={...r,...null==(n=e.fields.componentSettings)||null==(t=n.prebindingDefinitions)?void 0:t[0].variableMappings}}),t.flatMap(e=>(e.fields.usedComponents||[]).filter(e=>void 0!==e&&tt(e))).forEach(e=>{var t,n;r={...r,...null==(n=e.fields.componentSettings)||null==(t=n.prebindingDefinitions)?void 0:t[0].variableMappings}}),r}getCurrentLocale(){return this.locale}get isExperienceAPatternEntry(){return this._isExperienceAPatternEntry}get hoistedVariableMappings(){return this._hoistedVariableMappings}get hoistedParameterDefinitions(){return this._hoistedParameterDefinitions}get experienceEntryFields(){return this._experienceEntryFields}get experienceEntryId(){return this._experienceEntryId}get schemaVersion(){var e;return null==(e=this._experienceEntryFields)?void 0:e.componentTree.schemaVersion}get breakpoints(){var e,t;return null!=(t=null==(e=this._experienceEntryFields)?void 0:e.componentTree.breakpoints)?t:[]}get dataSource(){var e,t;return null!=(t=null==(e=this._experienceEntryFields)?void 0:e.dataSource)?t:{}}get unboundValues(){var e;return null!=(e=this._unboundValues)?e:{}}get usedComponents(){var e;return null!=(e=this._usedComponentsWithDeepReferences)?e:[]}addAssemblyUnboundValues(e){var t;this._unboundValues={...e,...null!=(t=this._unboundValues)?t:{}}}getValue(e,t){var n;let i=eO(e)?this.getEntityFromLink(e):e;if(void 0!==i)return(n=e6(i,t))&&"object"==typeof n&&n.url?n.url:n}toJSON(){return{_experienceEntryFields:this._experienceEntryFields,_experienceEntryId:this._experienceEntryId,_unboundValues:this._unboundValues,...super.toJSON()}}constructor(e){if("string"==typeof e){let t=JSON.parse(e).entityStore;super({entities:[...Object.values(t.entryMap),...Object.values(t.assetMap)],locale:t.locale}),this._hoistedParameterDefinitions={},this._hoistedVariableMappings={},this._experienceEntryFields=t._experienceEntryFields,this._experienceEntryId=t._experienceEntryId,this._unboundValues=t._unboundValues}else{let{experienceEntry:t,entities:n,locale:i}=e;if(!tt(t))throw Error("Provided entry is not an experience entry");super({entities:n,locale:i}),this._hoistedParameterDefinitions={},this._hoistedVariableMappings={},this._experienceEntryFields=t.fields,this._experienceEntryId=t.sys.id,this._unboundValues=t.fields.unboundValues}this._isExperienceAPatternEntry=(e=>{var t;return!!(null==(t=e.fields)?void 0:t.componentSettings)})({fields:this._experienceEntryFields});{var t;let e=(null!=(t=this._experienceEntryFields.usedComponents)?t:[]).map(e=>eO(e)?this.getEntityFromLink(e):e).filter(e=>void 0!==e);this._hoistedParameterDefinitions=tm.calculateHoistedParameterDefinitions(this._experienceEntryFields,e),this._hoistedVariableMappings=tm.calculateHoistedVariableMappings(this._experienceEntryFields,e)}this._usedComponentsWithDeepReferences=ty({experienceEntryFields:this._experienceEntryFields,parentComponents:new Set([this._experienceEntryId])})}}class th extends tg{constructor(){super({entities:[],locale:"uninitialized-locale-in-uninitialized-entity-store"})}}let tv=(0,d.vt)((e,t)=>({entityStore:new th,areEntitiesFetched:!1,setEntitiesFetched(t){e({areEntitiesFetched:t})},resolveAssetById(e){if(!e)return;let{entityStore:n}=t();return n.getAssetById(e)},resolveEntryById(e){if(!e)return;let{entityStore:n}=t();return n.getEntryById(e)},resolveEntity(e){if(!e)return;let{entityStore:n}=t();return n.getEntityFromLink(e)},resetEntityStore(t){e({entityStore:t,areEntitiesFetched:!1})}}));function tb(e){return tv.getState().resolveAssetById(e)}function tx(e){return tv.getState().resolveEntryById(e)}let tz={maybeResolveLink:function(e){return eO(e)?tv.getState().resolveEntity(e):void eC.warn("[experiences-core::InMemoryEntitiesStore] maybeResolveLink function must receive Link shape. Provided argument does not match the Link shape: ",e)},maybeResolveByAssetId:tb,maybeResolveByEntryId:tx,hasEntry:function(e){return!!tx(e)},hasAsset:function(e){return!!tb(e)},addEntities:function(e){if(!Array.isArray(e)||0===e.length)return;let{entityStore:t}=tv.getState();for(let n of e.filter(Boolean))t.updateEntity(n)}},tE=()=>tz;function tI(e){let t;if("string"==typeof e)t=new tm(e);else{let{experienceEntry:n,referencedAssets:i,referencedEntries:r,locale:a}=e;if([n,...i,...r].some(tS))throw Error("Some of the provided content is not localized. Please localize every entity before passing it to this function. Note that this is solely determined by `sys.locale` being set respectively.");if(!tt(n))throw Error("Provided entry is not an experience entry");t=new tm({experienceEntry:n,entities:[...r,...i],locale:a})}return tv.getState().resetEntityStore(t),{entityStore:t}}!function(e){e.LazyLoad="lazyLoad",e.InjectScript="injectScript"}(o||(o={}));let tS=e=>!e.sys.locale}}]); 4//# sourceMappingURL=db8192a9-79b7baae04d6aaca.js.map 5//# debugId=272feb67-e0ae-58ee-9945-c1ec5eb4235b
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.