1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,812099,e=>{"use strict";e.s(["HIDDEN_RENDERING_NAME",0,"Hidden Rendering"])},228242,e=>{"use strict";var t=e.i(433652);let r={form:(0,t.debugModule)(`${t.debugNamespace}:form`),layout:(0,t.debugModule)(`${t.debugNamespace}:layout`),dictionary:(0,t.debugModule)(`${t.debugNamespace}:dictionary`),editing:(0,t.debugModule)(`${t.debugNamespace}:editing`),sitemap:(0,t.debugModule)(`${t.debugNamespace}:sitemap`),multisite:(0,t.debugModule)(`${t.debugNamespace}:multisite`),robots:(0,t.debugModule)(`${t.debugNamespace}:robots`),llmsTxt:(0,t.debugModule)(`${t.debugNamespace}:llmsTxt`),redirects:(0,t.debugModule)(`${t.debugNamespace}:redirects`),personalize:(0,t.debugModule)(`${t.debugNamespace}:personalize`),locale:(0,t.debugModule)(`${t.debugNamespace}:locale`),errorpages:(0,t.debugModule)(`${t.debugNamespace}:errorpages`)};e.s(["default",0,r])},225790,e=>{"use strict";var t=e.i(122707),r=e.i(439845),n=e.i(168383),i=e.i(699174),a=e.i(228242),o=e.i(426868);let{ERROR_MESSAGES:s}=t.constants;e.s(["ComponentLayoutService",0,class{constructor(e){this.config=e}fetchComponentData(e,t){let n=this.config.contextId||this.config.clientContextId;if(!n)throw Error(s.MV_001);let i=new r.NativeDataFetcher({debugger:a.default.layout});return a.default.layout("fetching component with uid %s for %s %s %s %s",e.componentUid,e.itemId,e.language,e.siteName,e.dataSourceId),i.get(this.getFetchUrl(e),Object.assign(Object.assign({},t),{headers:Object.assign(Object.assign({},null==t?void 0:t.headers),{"x-sitecore-contextid":n,sc_editMode:`${e.mode===o.DesignLibraryMode.Metadata}`})})).then(e=>e.data).catch(e=>{var t;if((null==(t=e.response)?void 0:t.status)===404)return e.response.data;throw e})}getComponentFetchParams(e){return JSON.parse(JSON.stringify({item:e.itemId,uid:e.componentUid,dataSourceId:e.dataSourceId,renderingItemId:e.renderingId,version:e.version,sc_site:e.siteName,sc_lang:e.language||"en"}))}getFetchUrl(e){var r;let a=(0,n.normalizeUrl)(null!=(r=this.config.edgeUrl)?r:t.constants.SITECORE_EDGE_PLATFORM_URL_DEFAULT);return(0,i.resolveUrl)(`${a}/layout/component`,this.getComponentFetchParams(e))}}])},285463,e=>{"use strict";var t=e.i(228242),r=e.i(426868),n=e.i(18621);let i=` 2 query EditingQuery($itemId: String!, $language: String!, $version: String) { 3 item(path: $itemId, language: $language, version: $version) { 4 rendered 5 } 6 } 7`;e.s(["EditingService",0,class{constructor(e){this.serviceConfig=e,this.graphQLClient=this.getGraphQLClient()}async fetchEditingData({itemId:e,language:a,version:o,layoutKind:s=r.LayoutKind.Final,mode:l,site:c,variantId:u,previewTime:d},p){var h;if(t.default.editing("fetching editing data for %s %s %s %s",e,a,o,s),!a)throw RangeError("The language must be a non-empty string");let m=await this.graphQLClient.request(i,{itemId:e,version:o,language:a},Object.assign(Object.assign({},p),{headers:Object.assign(Object.assign(Object.assign(Object.assign({},null==p?void 0:p.headers),{sc_layoutKind:s,sc_editMode:"edit"===l?"true":"false",sc_previewMode:"preview"===l?"true":"false",sc_variant:u===n.DEFAULT_VARIANT?"default":u}),c&&{sc_site:c}),d&&{sc_previewTime:d})}));return{layoutData:(null==(h=null==m?void 0:m.item)?void 0:h.rendered)||{sitecore:{context:{pageEditing:!0,language:a},route:null}}}}getGraphQLClient(){if(!this.serviceConfig.clientFactory)throw Error("clientFactory needs to be provided when initializing GraphQL client.");return this.serviceConfig.clientFactory({debugger:t.default.editing})}}])},426868,e=>{"use strict";var t,r,n,i,a,o,s;(a=t||(t={})).Final="final",a.Shared="shared",(o=r||(r={})).Open="open",o.Close="close",(s=n||(n={})).Normal="library",s.Metadata="library-metadata",(i||(i={})).Variant="variant",e.s(["DesignLibraryMode",0,n,"DesignLibraryVariantGeneration",0,i,"LayoutKind",0,t,"MetadataKind",0,r])},66808,e=>{"use strict";var t=e.i(827971),t=t;let r="jss-hrz-editing",n="Sitecore.Horizon.ResetChromes";class i{static isActive(){return!(0,t.default)()&&(window.location.search.indexOf("sc_headless_mode=edit")>-1||!!window.document.getElementById(r))}static resetChromes(){!(0,t.default)()&&window[n]&&window[n]()}}e.s(["DEFAULT_PLACEHOLDER_UID",0,"00000000-0000-0000-0000-000000000000","EDITING_ALLOWED_ORIGINS",0,["https://pages.sitecorecloud.io","https://xmapps.sitecorecloud.io","https://designlibrary.sitecorecloud.io","https://app.sitecorecloud.io"],"INVALID_SECRET_HTML_MESSAGE",0,"<html><body>Missing or invalid secret</body></html>","PAGES_EDITING_MARKER",0,r,"PREVIEW_KEY",0,"sc_preview","PagesEditor",0,i,"QUERY_PARAM_EDITING_SECRET",0,"secret","getContentSdkPagesClientData",0,()=>{let e={};return e[r]={},e},"isEditorActive",0,()=>i.isActive(),"resetEditorChromes",0,()=>{i.isActive()&&i.resetChromes()}],66808)},26301,e=>{"use strict";e.s(["getDynamicPlaceholderPattern",0,e=>RegExp(`^${e.replace(/\{\*\}+/i,"\\d+")}$`),"getFieldValue",0,function(e,t,r){if(!e||!t)return r;let n=e[t];return n&&void 0!==n.value?n.value:e.fields&&e.fields[t]&&void 0!==e.fields[t].value?e.fields[t].value:r},"getRenderingParamString",0,function(e){if(null!=e){if("string"==typeof e)return e;if("object"==typeof e){let t=e.Value;if(t&&"object"==typeof t&&null!==t&&"value"in t){let e=t.value;if("string"==typeof e)return e}return"string"==typeof e.value?e.value:void 0}}},"isDynamicPlaceholder",0,e=>-1!==e.indexOf("{*}"),"isFieldValueEmpty",0,function(e){if(!e)return!0;let t=e=>"string"==typeof e?"0001-01-01T00:00:00Z"===e:!("function"==typeof(null==e?void 0:e.getMonth)&&!isNaN(null==e?void 0:e.getMonth())),r=e=>null==e||("object"==typeof e?!e.src&&!e.src&&!e.href&&t(e):"number"!=typeof e&&"boolean"!=typeof e&&(!e||t(e)));return r(void 0!==e.value?e.value:e)}])},18621,e=>{"use strict";let t="_default",r="_variantId_";e.s(["CdpHelper",0,class{static getPageVariantId(e,r,n,i){let a=e.replace(/[{}
7-]/g,""),o=r.replace("-","_"),s=i?`${this.normalizeScope(i)}_`:"",l=n;return n&&n!==t||(l="default"),`${s}${a}_${o}_${l}`.toLowerCase()}static getPageFriendlyId(e,t,r){let n=e.replace(/[{}-]/g,""),i=t.replace("-","_"),a=r?`${this.normalizeScope(r)}_`:"";return`embedded_${a}${n}_${i}`.toLowerCase()}static getComponentFriendlyId(e,t,r,n){let i=e.replace(/[{}-]/g,""),a=t.replace(/[{}-]/g,""),o=r.replace("-","_"),s=n?`${this.normalizeScope(n)}_`:"";return`component_${s}${i}_${a}_${o}*`.toLowerCase()}static normalizeScope(e){return(null==e?void 0:e.replace(/[^a-zA-Z0-9]+/g,""))||""}},"DEFAULT_VARIANT",0,t,"getPersonalizedRewrite",0,function(e,t){let n=e.endsWith("/")?e.slice(0,-1):e;return`${n}${t.map(e=>`/${r}${e}`).join("")}`},"getPersonalizedRewriteData",0,function(e){var n;let i,a=e.split("/"),o=[];return a.forEach(e=>{let t=e.match(`${r}(.*$)`);t&&o.push(t[1])}),n=o,i={variantId:t,componentVariantIds:[]},n.forEach(e=>{var t;e.includes("_")?null==(t=i.componentVariantIds)||t.push(e):i.variantId=e}),i},"normalizePersonalizedRewrite",0,function(e){if(!e.includes(r))return e;let t=e.split("/");return(t=t.filter(e=>!e.includes(r))).join("/")||"/"}])},699174,e=>{"use strict";e.i(247167);var t=e.i(827971);e.s(["escapeRegExp",0,function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")},"resolveUrl",0,function(e,r={}){if(!e)throw RangeError("url must be a non-empty string");if((0,t.default)()){let t=new URL(e);for(let e in r)({}).hasOwnProperty.call(r,e)&&t.searchParams.append(e,String(r[e]));return t.toString()}let n=Object.keys(r).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(String(r[e]))}`).join("&");return -1!==e.indexOf("?")?`${e}&${n}`:`${e}?${n}`}])},809467,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(882596);let n=e=>t.default.createElement("div",{className:"sc-content-sdk-placeholder-error"},e.message?e.message:e.children);class i extends t.default.Component{constructor(e){super(e),this.defaultErrorMessage="There was a problem loading this section.",this.defaultLoadingMessage="Loading component...",this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){var r,n;this.showErrorDetails()&&console.error(`An error occurred in component ${null==(r=this.props.rendering)?void 0:r.componentName} (${null==(n=this.props.rendering)?void 0:n.uid}): `),console.error({error:e,errorInfo:t})}isInDevMode(){return!1}showErrorDetails(){return this.isInDevMode()||this.props.page.mode.isEditing||this.props.page.mode.isPreview}render(){var e,r;if(this.state.error)if(this.props.errorComponent)return t.default.createElement(this.props.errorComponent,{error:this.state.error});else if(this.showErrorDetails())return t.default.createElement("div",null,t.default.createElement(n,null,"A rendering error occurred in component"," ",t.default.createElement("em",null,null==(e=this.props.rendering)?void 0:e.componentName),t.default.createElement("br",null),"Error: ",t.default.createElement("em",null,this.state.error.message||JSON.stringify(this.state.error))));else return t.default.createElement("div",null,t.default.createElement(n,{message:this.defaultErrorMessage}));return null==(r=this.props.disableSuspense)||r||this.props.isDynamic?this.props.children:t.default.createElement(t.Suspense,{fallback:t.default.createElement("h4",null,this.props.componentLoadingMessage||this.defaultLoadingMessage)},this.props.children)}}e.s(["ErrorComponent",0,n,"default",0,e=>{let{page:n}=(0,r.useSitecore)(),a=Object.assign(Object.assign({},e),{page:n});return t.default.createElement(i,Object.assign({},a))}])},562531,e=>{"use strict";var t=e.i(271645);e.i(936848);var r=e.i(864352),n=e.i(508954),i=e.i(953288);let{ExternalComponent:a}=r,o=e=>{var r;return t.default.createElement("div",null,"A rendering error occurred: ",null==(r=e.error)?void 0:r.message,".")};class s extends t.default.Component{constructor(e){super(e),this.state={}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e){this.setState({error:e})}render(){var e,r,s;let l=this.props;if(this.state.error)return this.props.errorComponent?t.default.createElement(this.props.errorComponent,{error:this.state.error}):t.default.createElement(o,{error:this.state.error});let{ComponentName:c}=l.params||{};if(!c){let e={errorOverride:"BYOC: The ComponentName for this rendering is missing"},r=this.props.missingComponentComponent;return r?t.default.createElement(r,Object.assign({},e)):t.default.createElement(i.MissingComponent,Object.assign({},e))}let u={rendering:{componentName:c},errorOverride:"BYOC: This component was not registered."},d=this.props.missingComponentComponent?t.default.createElement(this.props.missingComponentComponent,Object.assign({},u)):t.default.createElement(i.MissingComponent,Object.assign({},u)),p=this.props.errorComponent,h={};if(null==(e=l.params)?void 0:e.ComponentProps)try{h=null!=(r=JSON.parse(l.params.ComponentProps))?r:{}}catch(e){return console.error(`Parsing props for ${c} component from rendering params failed. Error: ${e}`),p?t.default.createElement(p,{error:e}):t.default.createElement(o,{error:e})}let m=Object.assign(Object.assign({},l.fetchedData),{_:(0,n.getDataFromFields)(null!=(s=l.fields)?s:{})});return t.default.createElement(a,Object.assign({},l.rendering,{componentName:c,clientFallback:d,datasources:m},h))}}e.s(["BYOCComponent",0,s,"BYOCWrapper",0,e=>{var r,n,i;let a=null==(n=null==(r=e.params)?void 0:r.styles)?void 0:n.trimEnd(),o=null==(i=e.params)?void 0:i.RenderingIdentifier;return t.default.createElement("div",{className:a||void 0,id:o||void 0},t.default.createElement("div",{className:"component-content"},t.default.createElement(s,Object.assign({},e))))},"__mockDependencies",0,e=>{e.ExternalComponent&&(a=e.ExternalComponent)}])},574949,e=>{"use strict";var t=e.i(271645),r=e.i(936848),n=e.i(508954);let i=e=>{var i,a,o,s,l,c,u,d,p;let h=(null==(i=e.params)?void 0:i.ComponentRevision)||e.revisionFallback;if(!e.template&&(!e.params||!e.params.LibraryId||!e.params.ComponentId||!e.params.ComponentVersion||!e.params.ComponentHostName||!h))return null;let m=Object.assign(Object.assign({},e.fetchedData),{_:(0,n.getDataFromFields)(null!=(a=e.fields)?a:{})});return t.default.createElement(r.Component,{data:m,template:e.template,cdn:null==(o=e.params)?void 0:o.ComponentHostName,library:null!=(l=null==(s=e.params)?void 0:s.LibraryId)?l:"",version:null==(c=e.params)?void 0:c.ComponentVersion,component:null!=(d=null==(u=e.params)?void 0:u.ComponentId)?d:"",instance:null==(p=e.params)?void 0:p.ComponentInstanceId,revision:h,fetch:[]})};e.s(["FEaaSComponent",0,i,"FEaaSWrapper",0,e=>{var r,n;let a=`component feaas ${null==(r=e.params)?void 0:r.styles}`.trimEnd(),o=null==(n=e.params)?void 0:n.RenderingIdentifier;return t.default.createElement("div",{className:a,id:o||void 0},t.default.createElement("div",{className:"component-content"},t.default.createElement(i,Object.assign({},e))))}])},953288,e=>{"use strict";var t=e.i(271645);let r=e=>{let r=e.rendering&&e.rendering.componentName?e.rendering.componentName:"Unnamed Component";e.errorOverride||console.log(`Component props for unimplemented '${r}' component`,e);let n=e.errorOverride||"Content SDK component is missing React implementation. See the developer console for more information.";return t.default.createElement("div",{style:{background:"darkorange",outline:"5px solid orange",padding:"10px",color:"white",maxWidth:"500px"}},t.default.createElement("h2",null,r),t.default.createElement("p",null,n))};r.displayName="MissingComponent",e.s(["MissingComponent",0,r])},398058,37746,e=>{"use strict";var t=e.i(882596),r=e.i(271645),n=e.i(953288);let i="Default";var a=e.i(26301),o=e.i(812099);let s={backgroundSize:"3px 3px",display:"flex",justifyContent:"center",alignItems:"center",padding:"30px",color:"#aaa"},l={backgroundImage:"linear-gradient(45deg, #ffffff 25%, #dcdcdc 25%, #dcdcdc 50%, #ffffff 50%, #ffffff 75%, #dcdcdc 75%, #dcdcdc 100%)"},c=()=>{let e=Object.assign(Object.assign({},s),l);return r.default.createElement("div",{style:e},"The component is hidden")};var u=e.i(574949),d=e.i(562531);let p="BYOCWrapper",h=(e,t,a,s,l)=>{var h,m;let f=r=>{console.error(`Placeholder ${t} contains unknown component ${e.componentName}${r?` (${r})`:""}. Ensure that a React component exists for it, and that it is registered in your component-map file.`)};if(e.componentName===o.HIDDEN_RENDERING_NAME)return{component:null!=s?s:c,isEmpty:!0,componentType:"universal"};
7if(!e.componentName)return{component:()=>r.default.createElement(r.default.Fragment,null),isEmpty:!0,componentType:"universal"};let g=null;if(a&&0!==a.size?g=a.get(e.componentName):console.warn(`No components were available in component map to service request for component ${e}`),!g){if("FEaaSComponent"===e.componentName)return{component:u.FEaaSComponent,isEmpty:!1,componentType:"universal"};if("FEaaSWrapper"===e.componentName)return{component:u.FEaaSWrapper,isEmpty:!1,componentType:"universal"};if("BYOCComponent"===e.componentName)return{component:d.BYOCComponent,isEmpty:!1,componentType:"universal"};else if(e.componentName===p)return{component:d.BYOCWrapper,dynamic:!0,componentType:"universal",isEmpty:!1};return f(),{component:null!=l?l:n.MissingComponent,isEmpty:!0,componentType:"universal"}}let b=null==(h=e.params)?void 0:h.FieldNames,y=b&&b!==i?g[b]:g.default||g.Default||g;if(!y)return f(b!==i?b:void 0),{component:null!=l?l:n.MissingComponent,isEmpty:!0,componentType:"universal"};let v=!!(null==(m=y.render)?void 0:m.preload)||e.componentName===p;return{component:y,dynamic:v,componentType:g.componentType,isEmpty:!1}};e.s(["getChildComponentProps",0,function(e,t){return{fields:Object.assign(Object.assign({},e.fields||{}),t.fields||{}),params:Object.assign(Object.assign({},Object.assign(Object.assign({},e.params||{}),t.params||{})),(e=>{var t,r;if(!e.params)return{styles:""};let n=[null!=(t=(0,a.getRenderingParamString)(e.params.GridParameters))?t:"",null!=(r=(0,a.getRenderingParamString)(e.params.Styles))?r:""].filter(Boolean).join(" ");if(n)return{styles:n}})(t)),rendering:t}},"getComponentForRendering",0,h,"getPlaceholderRenderings",0,(e,t,r)=>{let n,i=t.slice();return((null==e?void 0:e.placeholders)&&Object.entries(e.placeholders).forEach(([t,n])=>{let o=(0,a.isDynamicPlaceholder)(t)?(0,a.getDynamicPlaceholderPattern)(t):null;o&&o.test(i)&&(r?i=t:(e.placeholders[i]=n,delete e.placeholders[t]))}),n=e&&e.placeholders&&Object.keys(e.placeholders).length>0?e.placeholders[i]:null)?n:(console.warn(`Placeholder '${i}' was not found in the current rendering data`,JSON.stringify(e,null,2)),[])},"renderEmptyPlaceholder",0,e=>r.default.createElement("div",{className:"sc-jss-empty-placeholder",suppressHydrationWarning:!0},e)],37746),e.s(["ClientComponentWrapper",0,e=>{let{page:n,componentMap:i}=(0,t.useSitecore)(),a=Object.assign(Object.assign({},e.componentProps),{rendering:e.rendering,componentMap:i,page:n}),{component:o}=h(e.rendering,e.placeholderName,i);return r.default.createElement(o,Object.assign({},a))}],398058)},882596,906439,e=>{"use strict";var t=e.i(271645),r=e.i(233309);let n=()=>Promise.resolve({default:[]});e.s(["noopLoadImportMap",0,n],906439);let i=t.default.createContext({}),a=t.default.createContext(new Map),o=t.default.createContext(void 0),s=e=>{let{api:a,page:o,componentMap:s,loadImportMap:l=n,children:c}=e,[u,d]=(0,t.useState)(o),p=(0,t.useCallback)(e=>{d(e)},[]);(0,t.useEffect)(()=>{(0,r.default)(o,u)||p(o)},[o,u,p]);let h=(0,t.useMemo)(()=>({page:u,setPage:p,api:a,componentMap:s,loadImportMap:l}),[u,p,a,s,l]);return t.default.createElement(i.Provider,{value:h},c)};s.displayName="SitecoreProvider",e.s(["ComponentMapReactContext",0,a,"ImportMapReactContext",0,o,"SitecoreProvider",0,s,"SitecoreProviderReactContext",0,i,"useSitecore",0,function(e){let r=(0,t.useContext)(i),n=null==e?void 0:e.updatable;return Object.assign(Object.assign({},r),{setPage:n?r.setPage:void 0})}],882596)},508954,e=>{"use strict";var t=e.i(26301);e.s(["addClassName",0,e=>{if(e.class){if(e.className){let t=e.className;t+=` ${e.class}`,e.className=t}else e.className=e.class;delete e.class}},"getDataFromFields",0,e=>{let r={};return Object.entries(e).reduce((r,[n])=>(r[n]=(0,t.getFieldValue)(e,n),r),r)}])},864352,e=>{"use strict";var t=e.i(936848),r=e.i(410805);e.s(["Component",()=>t.Component,"ComponentProps",()=>t.ComponentProps,"Context",()=>t.Context,"ControlledPromise",()=>t.ControlledPromise,"DEFAULT_CDN_URL",()=>t.DEFAULT_CDN_URL,"DOM",()=>t.DOM,"DataPath",()=>t.DataPath,"DataScope",()=>t.DataScope,"DataSettings",()=>t.DataSettings,"Element",()=>t.Element,"External",()=>t.External,"ExternalComponent",()=>t.ExternalComponent,"ExternalComponentBundle",()=>t.ExternalComponentBundle,"FEAASComponent",()=>t.FEAASComponent,"FEAASComponentsProps",()=>t.FEAASComponentsProps,"FEAASContext",()=>t.FEAASContext,"FEAASContextProps",()=>t.FEAASContextProps,"FEAASEditor",()=>t.FEAASEditor,"FEAASEditorProps",()=>t.FEAASEditorProps,"FEAASElement",()=>t.FEAASElement,"FEAASExternalPropsObject",()=>t.FEAASExternalPropsObject,"FEAASLoader",()=>t.FEAASLoader,"FEAASLoaderProps",()=>t.FEAASLoaderProps,"FEAASPicker",()=>t.FEAASPicker,"FEAASPickerProps",()=>t.FEAASPickerProps,"FEAASReactComponent",()=>t.FEAASReactComponent,"FEAASReactServerComponent",()=>t.FEAASReactServerComponent,"FEAASReactStylesheet",()=>t.FEAASReactStylesheet,"FEAASStylesheet",()=>t.FEAASStylesheet,"FEAASStylesheetProps",()=>t.FEAASStylesheetProps,"HTMLNodeToReact",()=>t.HTMLNodeToReact,"InvalidResponse",()=>t.InvalidResponse,"JSONPath",()=>t.JSONPath,"Loader",()=>t.Loader,"MyComponent",()=>
7t.MyComponent,"NextExternalComponent",()=>t.NextExternalComponent,"Picker",()=>t.Picker,"ReactExternalComponent",()=>t.ReactExternalComponent,"ServerComponent",()=>t.ServerComponent,"Stylesheet",()=>t.Stylesheet,"Thumbnail",()=>t.Thumbnail,"WebComponent",()=>t.WebComponent,"adjustNumbers",()=>t.adjustNumbers,"autoloadScripts",()=>t.autoloadScripts,"cleanCollectionBit",()=>t.cleanCollectionBit,"clearFetchCache",()=>t.clearFetchCache,"createStylesheet",()=>t.createStylesheet,"customizeDataSettings",()=>r.customizeDataSettings,"enableNextClientsideComponents",()=>t.enableNextClientsideComponents,"fetchAndRevalidate",()=>t.fetchAndRevalidate,"fetchAndRevalidateComponent",()=>t.fetchAndRevalidateComponent,"fetchAndRevalidateStylesheet",()=>t.fetchAndRevalidateStylesheet,"fetchBypassingCache",()=>t.fetchBypassingCache,"fetchCache",()=>t.fetchCache,"fetchComponent",()=>t.fetchComponent,"fetchData",()=>t.fetchData,"fetchToValidateCache",()=>t.fetchToValidateCache,"fetchWithCacheAwareness",()=>t.fetchWithCacheAwareness,"findStylesheet",()=>t.findStylesheet,"getComponent",()=>r.getComponent,"getComponentSource",()=>t.getComponentSource,"getComponentURL",()=>t.getComponentURL,"getFetchCache",()=>t.getFetchCache,"getFramePosition",()=>t.getFramePosition,"getHumanizedLabel",()=>t.getHumanizedLabel,"getLastPathBit",()=>t.getLastPathBit,"getQualifier",()=>t.getQualifier,"getStylesheetSource",()=>t.getStylesheetSource,"getStylesheetURL",()=>t.getStylesheetURL,"linkComponents",()=>t.linkComponents,"loadScript",()=>t.loadScript,"loadStylesheet",()=>t.loadStylesheet,"loadStylesheetAllowStale",()=>t.loadStylesheetAllowStale,"normalizeCollectionScope",()=>t.normalizeCollectionScope,"normalizeFetchAttribute",()=>t.normalizeFetchAttribute,"observeDOMElement",()=>t.observeDOMElement,"parseComponentSource",()=>t.parseComponentSource,"parseLimit",()=>t.parseLimit,"parseRange",()=>t.parseRange,"parseStylesheetSource",()=>t.parseStylesheetSource,"queryObject",()=>t.queryObject,"queryObjectRaw",()=>t.queryObjectRaw,"queryScopes",()=>t.queryScopes,"registerComponent",()=>r.registerComponent,"registerDatasource",()=>r.registerDatasource,"renderComponent",()=>t.renderComponent,"renderComponentElement",()=>t.renderComponentElement,"renderComponentPromise",()=>t.renderComponentPromise,"renderDOMContent",()=>t.renderDOMContent,"renderDOMElement",()=>t.renderDOMElement,"renderHTMLContent",()=>t.renderHTMLContent,"renderStylesheet",()=>t.renderStylesheet,"renderStylesheetPromise",()=>t.renderStylesheetPromise,"serializeCH1RichText",()=>t.serializeCH1RichText,"setContextProperties",()=>t.setContextProperties,"setDOMAttribute",()=>t.setDOMAttribute,"setElementImplementation",()=>t.setElementImplementation])},936848,410805,e=>{"use strict";var t=(e={})=>Object.keys(e).reduce((t,r)=>Object.assign(t,{[n(r)]:e[r]}),{});function r(e){return n(e).replace(/[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g,function(e){return"-"+e.toLowerCase()})}function n(e){return(e=(e=e.replace(/[-_ ]+/g," ")).charAt(0).toLowerCase()+e.slice(1)).split(/\s+/).map((e,t)=>0===t?e:e.charAt(0).toUpperCase()+e.slice(1)).join("")}var i=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},a={},o=e=>{var{properties:t}=e;return Object.assign(Object.assign({},i(e,["properties"])),{type:"object",properties:{name:{type:"string"},displayName:{type:"string"},id:{type:"string"},url:{type:"string"},fields:s(t)}})};function s(e={}){return{type:"object",properties:Object.keys(e).reduce((t,r)=>{let n=e[r],{title:a}=n;return i(n,["title"]),Object.assign(Object.assign({},t),{[r]:{type:"object",properties:{value:Object.assign({title:a||r},e[r])}}})},{})}}var l={Link:()=>({type:"object",properties:{href:{required:!0,type:"string",title:"URL",description:"The URL of the link, except for media items, for which the Url property contains the path to the media item relative to /Sitecore/Media Library."},text:{type:"string",title:"Text",description:"The text content of the HTML <a> element."},linktype:{type:"string",enum:["internal","external","media","anchor","mailto","javascript"],default:"internal",title:"Target",description:"The target attribute of the HTML <a> element."},title:{type:"string",title:"Title",description:"The title attribute of the HTML <a> element."},class:{type:"string",title:"Class Name",description:"The class attribute of the HTML <a> element."},target:{type:"string",title:"Target",description:"The target attribute of the HTML <a> element.",enum:["","_blank","_self","_parent","_top"]},anchor:{type:"string",title:"Anchor",description:"The name attribute of the HTML <a> element, without the leading hash character (â#â)."},querystring:{type:"string",title:"Query String",description:"Query string parameters to add to the URL."}}}),DropLink:o,DropTree:o,File:()=>({type:"object",properties:{src:{type:"string",title:"Source",description:"The URL of the file."},title:{type:"string",title:"Title",description:"Title of a file"},displayName:{type:"string",title:"Display name",description:"Display name of a file"}}}),Date:()=>({type:"string",format:"date"}),Datetime:()=>({type:"string",format:"date-time"}),RichText:()=>({type:"string"}),Image:e=>({type:"object",properties:Object.assign({src:{type:"string"}},e.properties)}),SingleLineText:()=>{},MultiLineText:()=>({type:"string"}),Checkbox:()=>({type:"boolean"}),String:()=>({type:"string"}),Number:()=>({type:"number"}),Boolean:()=>({type:"boolean"}),Item:o,List:e=>{var{properties:t}=e;return Object.assign(Object.assign({},i(e,["properties"])),{type:"array",items:{type:"object",properties:{name:{type:"string"},displayName:{type:"string"},id:{type:"string"},url:{type:"string"},fields:s(t)}}})}};function c(e,t={}){return function e(t,r){var n={};for(var i in t){let a=t[i];a&&"object"==typeof a?Array.isArray(a)?n[i]=a.map(t=>"object"==typeof t&&t?e(t,r):t):n[i]=e(r(a),r):n[i]=t[i]}return n}(e=u(Object.assign({type:"object",properties:{},required:[]},e)),e=>e.properties?u(e,t):e)}function u(e,t={}){var n;let i=Object.assign({},e);return i.properties&&(i.required=(null==(n=e.required)?void 0:n.slice())||[],i.properties=Object.keys(i.properties).reduce((e,n)=>{var o;let s=i.properties[n],l=null==(o=a[null==s?void 0:s.type])?void 0:o.call(a,s),c=Object.assign(Object.assign(Object.assign({},l),s),{type:(null==l?void 0:l.type)||s.type,default:t.hasOwnProperty(n)?t[n]:s.default,title:s.title||r(n).split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" ")});return(null!=s&&s.properties||null!=l&&l.properties)&&(c.properties=Object.assign({},(null==l?void 0:l.properties)||(null==s?void 0:s.properties)),Object.keys((null==l?void 0:l.properties)||{}
7).forEach(e=>{var t,r;c.properties[e]=Object.assign(Object.assign({},null==(t=null==l?void 0:l.properties)?void 0:t[e]),null==(r=null==s?void 0:s.properties)?void 0:r[e])})),(null!=s&&s.items||null!=l&&l.items)&&(c.items=(null==l?void 0:l.items)||(null==s?void 0:s.items)),void 0===c.default&&delete c.default,"required"in c&&"boolean"==typeof c.required&&(-1==i.required.indexOf(n)&&i.required.push(n),delete c.required),Object.assign(e,{[n]:c})},{})),Object.assign({type:"object"},i)}Object.keys(l).forEach(e=>{!function(e,{name:t}){if(t.charAt(0)!=t.charAt(0).toUpperCase())throw Error("Custom types must start with a capital letter");a[t]=e}(l[e],{name:e})});var d=(e,t)=>{var r,n,i,a;let o=Object.assign({},e);for(var s in t)"object"==typeof t[s]&&t[s]&&(((null==(r=t[s])?void 0:r.type)=="integer"||(null==(n=t[s])?void 0:n.type)=="number")&&(o[s]=Object.assign(Object.assign({},o[s]),{"ui:options":{widget:"updown"}})),null!=(i=t[s])&&i.ui&&(o[s]=Object.assign(Object.assign({},o[s]),{"ui:options":Object.assign(Object.assign({},null==(a=o[s])?void 0:a["ui:options"]),t[s].ui)})),o=Object.assign(Object.assign({},o),{[s]:t[s].items?{items:d(o[s],t[s].items.properties)}:d(o[s],t[s].properties||{})}));return o};function p(e,t){switch(t){case"string":default:return e;case"object":try{return"object"==typeof e&&null!=e?e:JSON.parse(e)}catch(e){return null}case"array":try{return Array.isArray(e)?e:JSON.parse(e)}catch(e){return null}case"number":return parseFloat(e);case"integer":return parseInt(e);case"boolean":return"true"==e||"1"==e}}var h="u">typeof window?window.BYOCDatasources||(window.BYOCDatasources={}):{};function m(e,t){if("function"!=typeof e)throw Error("The first argument of registerDatasource must be a function returning DataSettings or Promise of data");if(!t.id)throw Error("Missing 'id' property in input");if(!/^[a-zA-Z0-9-_]+$/.test(t.id))throw Error("Invalid 'id' property in input. 'id' should only contain alphanumeric characters, hyphens, and underscores.");h[t.id]=Object.assign(Object.assign({},function(e){let{id:t,name:r,title:n,properties:i,sample:a,schema:o,description:s=null,type:l="object"}=e;return{id:t,description:s,sample:a,name:r||n||t,handler:e=>e,schema:o||i?c(Object.assign(Object.assign({},o||{properties:i,type:l}),{title:(null==o?void 0:o.title)||n||r})):void 0}}(t)),{handler:e}),v()}var f,g=!1,b=0,y=!1;function v(){if(clearTimeout(f),"u">typeof window&&window.parent!==window){"u"<typeof window||y||(y=!0,window.addEventListener("message",e=>{try{"register-datasources-ack"===("string"==typeof e.data?JSON.parse(e.data):e.data).action&&(g=!0,b=0,clearTimeout(f))}catch(e){}})),g=!1,b=0;let e=()=>{var t;g||b>=150||(null==(t=window.parent)||t.postMessage(JSON.stringify({action:"register-datasources",data:Object.values(h)}),"*"),b++,!g&&b<150&&(f=setTimeout(e,200)))};f=setTimeout(e,30)}}function E(e,t){let r=h[e];return null!=r&&r.handler?r.handler(t):t}v();var C,A=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},S=!1,w=0,O=!1,x="u">typeof HTMLElement?HTMLElement:"u">typeof windowJSDOM?windowJSDOM.HTMLElement:class{setAttribute(){}},R="u">typeof window?window.BYOCComponents||(window.BYOCComponents={}):{};function j(e,t,n={}){if(!(null!=t&&t.name))throw Error("Could not register external component. Please make sure you provide a name in the options"+JSON.stringify(t));let i=function(e,t,r){let{thumbnail:n="https://feaasstatic.blob.core.windows.net/assets/thumbnails/byoc.svg",name:i,id:a=e.name,group:o=null,ui:s,isHidden:l=!1,datasourceIds:u=[],links:p={},meta:h={},uiSchema:m,schema:f}=e,g=A(e,["thumbnail","name","id","group","ui","isHidden","datasourceIds","links","meta","uiSchema","schema"]),b=c(Object.assign(Object.assign({description:"External component"},f||g||{}),{type:"object"}),r),y=d(m||s||{},b.properties||{});return{component:t||(()=>null),name:i,schema:b,uiSchema:y,thumbnail:n,group:o||"Default collection",isHidden:l,id:a,datasourceIds:u,links:p,meta:h,title:(null==b?void 0:b.title)||(null==g?void 0:g.title)||i}}(t,e,n);R[i.id]=i,F(e)&&D.register("byoc-"+r(t.name),void 0,e),P()}function F(e){return e&&"prototype"in e&&"setAttribute"in e.prototype}function N(e){if("string"!=typeof e){if(e&&"schema"in e)return e;throw Error(`Component name should be a string, got ${typeof e}`)}let[t,r]=e.split("?");var n=R[t];if(r){let t=R[e];if(!t&&!n)return null;t&&(n=Object.assign(Object.assign(Object.assign({},n),t),{component:t.component||(null==n?void 0:n.component)}
7)),r.split(/\&/g).forEach(e=>{var t,r,i;let[a,o]=e.split("="),s=(null==(t=n.schema.properties)?void 0:t[a])||{type:"string"};n=Object.assign(Object.assign({},n),{schema:Object.assign(Object.assign({},n.schema),{properties:Object.assign(Object.assign({},n.schema.properties),{[a]:Object.assign(Object.assign({},s),{default:p(decodeURIComponent(o),s.type)})})}),uiSchema:Object.assign(Object.assign({},n.uiSchema),{[a]:Object.assign(Object.assign({},n.uiSchema[a]),{"ui:widget":null!=(i=null==(r=n.uiSchema[a])?void 0:r["ui:widget"])?i:"hidden"})})})})}return n}function k(e){let{componentName:t,className:i,fallbackWrapper:a,fallback:o,suppressHydrationWarning:s,_dynamic:l,datasources:c}=e,u=A(e,["componentName","className","fallbackWrapper","fallback","suppressHydrationWarning","_dynamic","datasources"]);try{var d="string"==typeof c?JSON.parse(c):c}catch(e){}let h=Object.values(d||{}).find(e=>e&&!Array.isArray(e)&&Object.keys(e).length>0),m=Object.assign(Object.assign(Object.assign({},h),function(e,t={}){var r,i;let a=null==(r=N(e))?void 0:r.schema;return a?Object.assign(Object.assign({},Object.keys((i=a).properties).reduce((e,t)=>{var r,n;return(null==(r=i.properties[t])?void 0:r.default)!=null?Object.assign(Object.assign({},e),{[t]:null==(n=i.properties[t])?void 0:n.default}):e},{})),Object.keys(t).reduce((e,r)=>{let i=t[r],o=n(r),s=null==a?void 0:a.properties[o],l=p(i,null==s?void 0:s.type);return null==l||r.startsWith("data-attribute")||["class","id","contenteditable"].includes(r)?e:Object.assign(Object.assign({},e),{[o]:l})},{})):t}(t,Object.assign(Object.assign({},h),u))),d?{datasources:d}:{}),f=Object.assign(Object.assign({"data-external-id":t},((e={})=>Object.keys(e).reduce((t,n)=>Object.assign(t,{[r(n)]:e[n]}),{}))(m)),{suppressHydrationWarning:!0,class:i});return L.forEach(e=>{Object.assign(f,{[r(e)]:T[e]})}),Object.keys(f).forEach(e=>{let t=f[e];if(t&&"object"==typeof t&&"class"!=e&&"children"!=e)try{Object.assign(f,{[e]:JSON.stringify(t)})}catch(t){delete f[e]}("function"==typeof t||null==t)&&delete f[e]}),{attributes:f,properties:m,merged:Object.assign(Object.assign({},T),m)}}function P(){if(clearTimeout(C),"u">typeof window&&window.parent!==window){"u"<typeof window||O||(O=!0,window.addEventListener("message",e=>{try{"register-components-ack"===("string"==typeof e.data?JSON.parse(e.data):e.data).action&&(S=!0,w=0,clearTimeout(C))}catch(e){}})),S=!1,w=0;let e=()=>{var t;S||w>=150||(null==(t=window.parent)||t.postMessage(JSON.stringify({action:"register-components",data:Object.values(R)}),"*"),w++,!S&&w<150&&(C=setTimeout(e,200)))};C=setTimeout(e,30)}}P();var D=class extends x{connectedCallback(){try{JSON.parse(String(this.getAttribute("components"))).forEach(e=>{N(e.id)||j(null,e)}),JSON.parse(String(this.getAttribute("datasources"))).forEach(e=>{h[e.id]||m(e=>e,e)})}catch(e){}}static register(e,t,r=this){null==t&&(t="u">typeof window?window:void 0),t&&!t.customElements.get(e)&&t.customElements.define(e,class extends r{})}},T={};function M(e){T=e}var L=["sitecoreEdgeUrl","sitecoreEdgeContextId"];D.register("byoc-registration"),e.s(["customizeDataSettings",0,E,"getComponent",0,N,"getMergedComponentProperties",0,k,"isWebComponent",0,F,"objectKeysToCamelCase",0,t,"registerComponent",0,j,"registerDatasource",0,m,"registered",0,R,"registeredDatasources",0,h,"setContextProperties",0,M,"setRegistrationCallback",0,P,"toCamelCase",0,n,"toKebabCase",0,r],410805);var $=e.i(271645),_=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},I=null,U=null;function B(e){let{componentName:t,clientFallback:r}=e,n=_(e,["componentName","clientFallback"]),i=null==(s=N(t))?void 0:s.component,a=$.default.useMemo(()=>$.default.createElement(W,Object.assign({},n,{componentName:t})),[]),o=$.default.useMemo(()=>U(()=>Promise.resolve(I),{ssr:!1,loading:()=>a}),[]);var s,l="u"<typeof window?JSON.parse(JSON.stringify(n)):n;return $.default.createElement(o,Object.assign({},l,{componentName:t,fallbackWrapper:!i,fallback:i?a:r?$.default.createElement(U(()=>Promise.resolve(()=>r),{ssr:!1})):e.fallback}))}function H(e){return 0==Object.keys(e).length?$.default.createElement($.default.Fragment,null):U&&!e._dynamic?B(Object.assign({_dynamic:!0},e)):W(e)}
7function W(e){let{componentName:t,fallback:n,fallbackWrapper:i}=e,a=N(t),o=null==a?void 0:a.component,{attributes:s,properties:l,merged:c}=k(e);if(!o&&n||!t)return!1===i?$.default.createElement($.default.Fragment,null,n):$.default.createElement("feaas-external",Object.assign({},s,{hydrate:"false"}),n);if(a&&o&&F(o)){let e="byoc-"+r(a.id);return $.default.createElement(e,Object.assign(Object.assign({},s),{ref:t=>{var r;t&&"u">typeof window&&(null==(r=window.customElements)||r.whenDefined(e).then(()=>{var e;null==(e=t.sitecoreContextCallback)||e.call(t,Object.assign({},c))}))}}))}return $.default.createElement($.default.Fragment,null,$.default.createElement("feaas-external",Object.assign({},s,{hydrate:"false"}),null==o?null:$.default.createElement(o,Object.assign({},c))))}var z=e.i(174080),J=Object.defineProperty,q=(e,t)=>{for(var r in t)J(e,r,{get:t[r],enumerable:!0})},V={};q(V,{renderDOMContent:()=>eL,renderDOMElement:()=>eT,renderHTMLContent:()=>e$,setDOMAttribute:()=>eP});var Y={};function G(e){return(G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function K(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function Q(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Z(e,t,r){return t&&Q(e.prototype,t),r&&Q(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function X(e){return(X=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ee(e,t){return(ee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function et(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function er(e,t,r){return(er=et()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&ee(i,r.prototype),i}).apply(null,arguments)}function en(e){var t="function"==typeof Map?new Map:void 0;return(en=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if("u">typeof t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return er(e,arguments,X(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),ee(r,e)})(e)}function ei(e,t){if(e){if("string"==typeof e)return ea(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ea(e,t)}}function ea(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}q(Y,{JSONPath:()=>eu,queryObject:()=>em,queryObjectRaw:()=>eh,queryScopes:()=>ef,serializeCH1RichText:()=>eb});var eo=Object.prototype.hasOwnProperty;function es(e,t){return(e=e.slice()).push(t),e}function el(e,t){return(t=t.slice()).unshift(e),t}var ec=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&ee(n,e);var t,r=(t=et(),function(){var e,r=X(n);e=t?Reflect.construct(r,arguments,X(this).constructor):r.apply(this,arguments);if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");if(void 0===this)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return this});function n(e){var t;return K(this,n),(t=r.call(this,'JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)')).avoidNew=!0,t.value=e,t.name="NewError",t}return Z(n)}(en(Error));function eu(e,t,r,n,i){if(!(this instanceof eu))try{return new eu(e,t,r,n,i)}catch(e){if(!e.avoidNew)throw e;return e.value}"string"==typeof e&&(i=n,n=r,r=t,t=e,e=null);var a=e&&"object"===G(e);if(e=e||{},this.json=e.json||r,this.path=e.path||t,this.resultType=e.resultType||"value",this.flatten=e.flatten||!1,this.wrap=!eo.call(e,"wrap")||e.wrap,this.sandbox=e.sandbox||{},this.preventEval=e.preventEval||!1,this.parent=e.parent||null,this.parentProperty=e.parentProperty||null,this.callback=e.callback||n||null,this.otherTypeCallback=e.otherTypeCallback||i||function(){throw TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")},!1!==e.autostart){var o={path:a?e.path:t};a?"json"in e&&(o.json=e.json):o.json=r;var s=this.evaluate(o);
7if(!s||"object"!==G(s))throw new ec(s);return s}}eu.prototype.evaluate=function(e,t,r,n){var i=this,a=this.parent,o=this.parentProperty,s=this.flatten,l=this.wrap;if(this.currResultType=this.resultType,this.currPreventEval=this.preventEval,this.currSandbox=this.sandbox,r=r||this.callback,this.currOtherTypeCallback=n||this.otherTypeCallback,t=t||this.json,(e=e||this.path)&&"object"===G(e)&&!Array.isArray(e)){if(!e.path&&""!==e.path)throw TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');if(!eo.call(e,"json"))throw TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');t=e.json,s=eo.call(e,"flatten")?e.flatten:s,this.currResultType=eo.call(e,"resultType")?e.resultType:this.currResultType,this.currSandbox=eo.call(e,"sandbox")?e.sandbox:this.currSandbox,l=eo.call(e,"wrap")?e.wrap:l,this.currPreventEval=eo.call(e,"preventEval")?e.preventEval:this.currPreventEval,r=eo.call(e,"callback")?e.callback:r,this.currOtherTypeCallback=eo.call(e,"otherTypeCallback")?e.otherTypeCallback:this.currOtherTypeCallback,a=eo.call(e,"parent")?e.parent:a,o=eo.call(e,"parentProperty")?e.parentProperty:o,e=e.path}if(a=a||null,o=o||null,Array.isArray(e)&&(e=eu.toPathString(e)),!(!e&&""!==e||!t)){var c=eu.toPathArray(e);"$"===c[0]&&c.length>1&&c.shift(),this._hasParentSelector=null;var u=this._trace(c,t,["$"],a,o,r).filter(function(e){return e&&!e.isParentSelector});return u.length?l||1!==u.length||u[0].hasArrExpr?u.reduce(function(e,t){var r=i._getPreferredOutput(t);return s&&Array.isArray(r)?e=e.concat(r):e.push(r),e},[]):this._getPreferredOutput(u[0]):l?[]:void 0}},eu.prototype._getPreferredOutput=function(e){var t=this.currResultType;switch(t){case"all":var r=Array.isArray(e.path)?e.path:eu.toPathArray(e.path);
7return e.pointer=eu.toPointer(r),e.path="string"==typeof e.path?e.path:eu.toPathString(e.path),e;case"value":case"parent":case"parentProperty":return e[t];case"path":return eu.toPathString(e[t]);case"pointer":return eu.toPointer(e.path);default:throw TypeError("Unknown result type")}},eu.prototype._handleCallback=function(e,t,r){if(t){var n=this._getPreferredOutput(e);e.path="string"==typeof e.path?e.path:eu.toPathString(e.path),t(n,r,e)}},eu.prototype._trace=function(e,t,r,n,i,a,o,s){var l,c=this;if(!e.length)return l={path:r,value:t,parent:n,parentProperty:i,hasArrExpr:o},this._handleCallback(l,a,"value"),l;var u=e[0],d=e.slice(1),p=[];function h(e){Array.isArray(e)?e.forEach(function(e){p.push(e)}):p.push(e)}if(("string"!=typeof u||s)&&t&&eo.call(t,u))h(this._trace(d,t[u],es(r,u),t,u,a,o));else if("*"===u)this._walk(t,function(e){h(c._trace(d,t[e],es(r,e),t,e,a,!0,!0))});else if(".."===u)h(this._trace(d,t,r,n,i,a,o)),this._walk(t,function(n){"object"===G(t[n])&&h(c._trace(e.slice(),t[n],es(r,n),t,n,a,!0))});else{if("^"===u)return this._hasParentSelector=!0,{path:r.slice(0,-1),expr:d,isParentSelector:!0};if("~"===u)return l={path:es(r,u),value:i,parent:n,parentProperty:null},this._handleCallback(l,a,"property"),l;if("$"===u)h(this._trace(d,t,r,null,null,a,o));else if(/^(\x2D?[0-9]*):(\x2D?[0-9]*):?([0-9]*)$/.test(u))h(this._slice(u,d,t,r,n,i,a));else if(0===u.indexOf("?(")){if(this.currPreventEval)throw Error("Eval [?(expr)] prevented in JSONPath expression.");var m=u.replace(/^\?\(((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?)\)$/,"$1");this._walk(t,function(e){c._eval(m,t[e],e,r,n,i)&&h(c._trace(d,t[e],es(r,e),t,e,a,!0))})}else if("("===u[0]){if(this.currPreventEval)throw Error("Eval [(expr)] prevented in JSONPath expression.");h(this._trace(el(this._eval(u,t,r[r.length-1],r.slice(0,-1),n,i),d),t,r,n,i,a,o))}else if("@"===u[0]){var f=!1,g=u.slice(1,-2);switch(g){case"scalar":t&&["object","function"].includes(G(t))||(f=!0);break;case"boolean":case"string":case"undefined":case"function":G(t)===g&&(f=!0);break;case"integer":Number.isFinite(t)&&!(t%1)&&(f=!0);break;case"number":Number.isFinite(t)&&(f=!0);break;case"nonFinite":"number"!=typeof t||Number.isFinite(t)||(f=!0);break;case"object":t&&G(t)===g&&(f=!0);break;case"array":Array.isArray(t)&&(f=!0);break;case"other":f=this.currOtherTypeCallback(t,r,n,i);break;case"null":null===t&&(f=!0);break;default:throw TypeError("Unknown value type "+g)}if(f)return l={path:r,value:t,parent:n,parentProperty:i},this._handleCallback(l,a,"value"),l}else if("`"===u[0]&&t&&eo.call(t,u.slice(1))){var b=u.slice(1);h(this._trace(d,t[b],es(r,b),t,b,a,o,!0))}else if(u.includes(",")){var y,v=function(e){var t="u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=ei(e))){t&&(e=t);var r=0,n=function(){};return{s:n,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw TypeError(`Invalid attempt to iterate non-iterable instance. 8In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,a=!0,o=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==t.return||t.return()}finally{if(o)throw i}}}}(u.split(","));try{for(v.s();!(y=v.n()).done;){var E=y.value;h(this._trace(el(E,d),t,r,n,i,a,!0))}}catch(e){v.e(e)}finally{v.f()}}else!s&&t&&eo.call(t,u)&&h(this._trace(d,t[u],es(r,u),t,u,a,o,!0))}if(this._hasParentSelector)for(var C=0;C<p.length;C++){var A=p[C];if(A&&A.isParentSelector){var S=this._trace(A.expr,t,A.path,n,i,a,o);if(Array.isArray(S)){p[C]=S[0];for(var w=S.length,O=1;O<w;O++)C++,p.splice(C,0,S[O])}else p[C]=S}}return p},eu.prototype._walk=function(e,t){if(Array.isArray(e))for(var r=e.length,n=0;n<r;n++)t(n);else e&&"object"===G(e)&&Object.keys(e).forEach(function(e){t(e)})},eu.prototype._slice=function(e,t,r,n,i,a,o){if(Array.isArray(r)){var s=r.length,l=e.split(":"),c=l[2]&&Number.parseInt(l[2])||1,u=l[0]&&Number.parseInt(l[0])||0,d=l[1]&&Number.parseInt(l[1])||s;u=u<0?Math.max(0,u+s):Math.min(s,u),d=d<0?Math.max(0,d+s):Math.min(s,d);for(var p=[],h=u;h<d;
8h+=c)this._trace(el(h,t),r,n,i,a,o,!0).forEach(function(e){p.push(e)});return p}},eu.prototype._eval=function(e,t,r,n,i,a){this.currSandbox._$_parentProperty=a,this.currSandbox._$_parent=i,this.currSandbox._$_property=r,this.currSandbox._$_root=this.json,this.currSandbox._$_v=t;var o=e.includes("@path");o&&(this.currSandbox._$_path=eu.toPathString(n.concat([r])));var s="script:"+e;if(!eu.cache[s]){var l=e.replace(/@parentProperty/g,"_$_parentProperty").replace(/@parent/g,"_$_parent").replace(/@property/g,"_$_property").replace(/@root/g,"_$_root").replace(/@([\t-\r \)\.\[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF])/g,"_$_v$1");o&&(l=l.replace(/@path/g,"_$_path")),eu.cache[s]=new this.vm.Script(l)}try{return eu.cache[s].runInNewContext(this.currSandbox)}catch(t){throw Error("jsonPath: "+t.message+": "+e)}},eu.cache={},eu.toPathString=function(e){for(var t=e.length,r="$",n=1;n<t;n++)/^(~|\^|@(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\(\))$/.test(e[n])||(r+=/^[\*0-9]+$/.test(e[n])?"["+e[n]+"]":"['"+e[n]+"']");return r},eu.toPointer=function(e){for(var t=e.length,r="",n=1;n<t;n++)/^(~|\^|@(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\(\))$/.test(e[n])||(r+="/"+e[n].toString().replace(/~/g,"~0").replace(/\//g,"~1"));return r},eu.toPathArray=function(e){var t=eu.cache;if(t[e])return t[e].concat();var r=[],n=e.replace(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/g,";$&;").replace(/['\[](\??\((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\))['\]]/g,function(e,t){return"[#"+(r.push(t)-1)+"]"}).replace(/\[["']((?:(?!['\]])[\s\S])*)["']\]/g,function(e,t){return"['"+t.replace(/\./g,"%@%").replace(/~/g,"%%@@%%")+"']"}).replace(/~/g,";~;").replace(/["']?\.["']?(?!(?:(?!\[)[\s\S])*\])|\[["']?/g,";").replace(/%@%/g,".").replace(/%%@@%%/g,"~").replace(/(?:;)?(\^+)(?:;)?/g,function(e,t){return";"+t.split("").join(";")+";"}).replace(/;;;|;;/g,";..;").replace(/;$|'?\]|'$/g,"").split(";").map(function(e){var t=e.match(/#([0-9]+)/);return t&&t[1]?r[t[1]]:e});return t[e]=n,t[e].concat()};var ed=function(e,t,r){for(var n=e.length,i=0;i<n;i++)r(e[i])&&t.push(e.splice(i--,1)[0])},ep=function(){function e(t){K(this,e),this.code=t}return Z(e,[{key:"runInNewContext",value:function(e){var t=this.code,r=Object.keys(e),n=[];ed(r,n,function(t){return"function"==typeof e[t]});var i=r.map(function(t,r){return e[t]});t=n.reduce(function(t,r){var n=e[r].toString();return/function/.test(n)||(n="function "+n),"var "+r+"="+n+";"+t},"")+t,/(["'])use strict\1/.test(t)||r.includes("arguments")||(t="var arguments = undefined;"+t);var a=(t=t.replace(/;[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*$/,"")).lastIndexOf(";"),o=a>-1?t.slice(0,a+1)+" return "+t.slice(a+1):" return "+t;return er(Function,r.concat([o])).apply(void 0,function(e){if(Array.isArray(e))return ea(e)}(i)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||ei(i)||function(){throw TypeError(`Invalid attempt to spread non-iterable instance. 9In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}())}}]),e}();function eh(e,t){try{return eu({path:t,json:e})}catch(e){return[]}}function em(e,t,r=!0){let n=eh(e,t)||[];return r?n.flat(1/0):n}function ef(e,t,r=!1,n=e,i=!0){var a=t;for(let i of Object.keys(e).sort((e,t)=>t.length-e.length))if(t.startsWith(i)){if(i==t){if(r)return e[i];continue}a=t.substring(i.length+1),n=e[i];break}var o=em(n,a,i);return 0==o.length&&(o=[a.replace(/^.*?\./,"_."),a.replace(/^.*?\./,""),a.replace(/^([^.]+).*?\.\$([\.\[])/,"$1$2"),a.replace(/^.*?\.\$([\.\[])/,"_$1"),a.replace(/^.*?\.\$([\.\[])/,"$$$1"),a.replace(/^[^.]+$/,"_")].filter((e,t,r)=>r.indexOf(e)===t).reduce((e,t)=>
9e.length>0?e:em(n,t,i),[])),r?o[0]:o}function eg(e,t={},r){return r?`<${r}${Object.entries(t).map(([e,t])=>null!=t&&` ${e}="${t}"`).filter(Boolean).join("")}>${eb(e)}</${r}>`.replace(/^<([a-z0-9][^>]*)><\/[^>]+>$/,"<$1 />"):eb(e)}function eb(e){var t;if(Array.isArray(e))return e.map(eb).join(` 10`).trim();if("string"==typeof e)return e;if(null==e)return"";switch(e.type){case"heading":let{level:r,...n}=e.attrs;return eg(e.content,n,"h"+r);case"text":return(e.marks||[]).reduce((e,t)=>eg(e,t.attrs,{link:"a",bold:"strong",italic:"em",strike:"s",underline:"u"}[t.type]),null==(t=e.text)?void 0:t.replace(/\s+/," "));default:return eg(e.content||e.text,e.attrs,{bulletList:"ul",orderedList:"ol",listItem:"li",horizontalRule:"hr",paragraph:"p",codeBlock:"code",blockquote:"blockquote"}[e.type])}}function ey(e){let t=new e.ownerDocument.defaultView.MutationObserver(e=>{e.forEach(e=>{let t=e.target,r=t.getAttribute("data-embed-src");r&&eE(t,r),e.addedNodes&&e.addedNodes.forEach(e=>{1==e.nodeType&&ev(e,!1)})})});return t.observe(e,{attributes:!0,subtree:!0,childList:!0}),t}function ev(e,t=!0){let r=e.querySelectorAll("[data-embed-src]");for(var n=0;n<r.length;n++){let e=r[n];eE(e,e.getAttribute("data-embed-src"))}if(t)return ey(e)}function eE(e,t){for(var r=e;r;r=r.parentElement)if(!r.parentElement){let e=r.querySelectorAll("script");for(var n=0;n<e.length;n++)if(e[n].getAttribute("src")==t)return!0;"HTML"==r.tagName&&(r=r.querySelector("head")||r);let i=r.ownerDocument.createElement("script");i.setAttribute("type","module"),i.setAttribute("src",t),r.appendChild(i);break}}eu.prototype.vm={Script:ep};var eC={};q(eC,{adjustNumbers:()=>eR,cleanCollectionBit:()=>eO,getHumanizedLabel:()=>ej,getLastPathBit:()=>eF,getQualifier:()=>ew,normalizeCollectionScope:()=>ex,parseLimit:()=>eA,parseRange:()=>eS});var eA=e=>{var t;let r=parseInt(null==(t=null==e?void 0:e.match(/\[0:(\d+)\]/))?void 0:t[1],10);return!isNaN(r)&&r>0?String(r):null},eS=e=>{var t;let r=null==(t=null==e?void 0:e.match(/\[([^\]]+)\]/))?void 0:t[1].split(/\s*,\s*/g).filter(Boolean).map(e=>{if(e.match(/^-?\d+$/))return e;let t=e.match(/^(\d+):(\d+)$/);return t&&parseInt(t[1],10)<parseInt(t[2],10)?t[1]+"-"+t[2]:null});return null!=r&&r.every(Boolean)?r.join(","):null},ew=e=>{var t;return null==(t=null==e?void 0:e.match(/(\.\*|\[[^\]]*\])$/))?void 0:t[0]};function eO(e){return e.replace(/(\.?\[[^\]\[]*\]|\.\*)$/g,"")}function ex(e){return eO(e)+".*"}function eR(e,t){return null==e?void 0:e.replace(/(.|^)(\d+)/g,(e,r,n)=>r+(":"==r?n:String(parseInt(n)+t)))}function ej(e,t=2){var r=eO(e).split(/]\.|\.\*\./g).pop().split(/\./g).slice(-3);return(r=r.filter(e=>isNaN(parseInt(e)))).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).slice(-t).join(" ")}function eF(e){return eO(e).split(".").pop()}var eN=["January","February","March","April","May","June","July","August","September","October","November","December"];function ek(e){let t=e.getAttribute("data-path-scope");for(var r=0,n=e;n=n.previousElementSibling;)n.getAttribute("data-path-scope")==t&&r++;return r}function eP(e,t,r,n,i=!0){if(e){var a,o,s,l=e;(null==r?void 0:r.type)=="doc"&&Array.isArray(r.content)&&(r=eb(r)),null!=n&&n.processValue&&(r=null==n?void 0:n.processValue(e,t,r));var c=t.replace("data-path-","");if("data-path-src"==t||"data-path-alt"==t){let t=Array.from(e.children).find(e=>"picture"==e.localName)||e;l="img"==e.localName?e:t.querySelector("img, video")}else if("data-path-href"==t)l=e.querySelector("a")||e.closest("a");else if("data-path-hidden"==t)r=!r||null;else if("data-path"==t||"data-embed-html"==t||"html"==t)c="innerHTML";else if("data-embed-src"==t&&i)eE(e,r);else if("data-path-attributes"==t){if(!Array.isArray(r)){let t=(null==(a=e.getAttribute("data-attributes-keys"))?void 0:a.split(",").filter(Boolean))||[];if(!Array.isArray(r))for(var u in r){var d=r[u];eP(e,u,"object"==typeof d&&d?JSON.stringify(d):d,n,i)}for(var p=0;p<t.length;p++)null!=r&&t[p]in r||eP(e,t[p],null,n,i);eP(e,"data-attributes-keys",Object.keys(r||{}).join(","),{},i)}if("FEAAS-EXTERNAL"==e.tagName){let t=String(e.getAttribute("data-path-attributes")||"").slice(0,-1).split(".")[0]||"_";eP(e,"datasources",JSON.stringify({[t]:r}),{},i)}return}
10if("boolean"==typeof r&&"hidden"!==c&&(r=r?"":null),l)if(("innerHTML"==c||"src"==c)&&(null==r||""===r)){var h=String(null!=(s=null!=(o=e.getAttribute("data-path-placeholder")||l[c])?o:l.getAttribute(c))?s:"");"innerHTML"==c?l.innerHTML=h:h?l.setAttribute(c,h):l.removeAttribute(c)}else if(null!=r)if("innerHTML"==c){for(var m,f=String(r),g=l;g.parentElement&&g.localName.match(/^(a|var|strong|em|i|b)$/);)g=g.parentElement;g.localName.match(/p|h\d|button|time|li/)&&(f=f.replace(/<(p|h\d|li|ul)[^>]*?>|<\/(p|h\d|li|ul)[^>]*?>/g," ").trim().replace(/\s+/g," ")),String(g.getAttribute("class")).includes("-inline--time")&&"Invalid Date"!==String(new Date(m=f))&&!isNaN(Number(new Date(m)))&&(f=(e=>{if(!e||"function"!=typeof e.getDay)return;let t=e.getFullYear(),r=eN[e.getMonth()],n=e.getDate();return`${r} ${n}, ${t}`})(new Date(f))),l.innerHTML!=f&&(l.innerHTML=f)}else l.getAttribute(c)!=r&&l.setAttribute(c,r);else l.removeAttribute(c)}}var eD=["data-attributes-keys","data-path-attributes","data-path-scope"];function eT(e,t,r,n,i=!0){if(n||(t=(null==(o=null==r?void 0:r.processData)?void 0:o.call(r,e,t))||t),1==e.nodeType){let n=e.getAttribute("data-path-scope");if(n){let i=ek(e),a=ef(t,n,!1);0==i&&function(e,t){let r=e.getAttribute("data-path-scope");if(null==r)return;var n=ek(e);if(0!=n)return;let i=e.parentNode;if(null!=i){0==t?e.setAttribute("hidden","hidden"):null!=e.getAttribute("hidden")&&e.removeAttribute("hidden");for(var a=n+1,o=e,s=e;s=s.nextElementSibling;)s.getAttribute("data-path-scope")==r&&(a++,o=s);for(var l=a;l<t;l++)i.insertBefore(o.cloneNode(!0),o.nextElementSibling);for(var l=Math.max(1,t);l<a;l++)o=o.previousElementSibling,i.removeChild(o.nextElementSibling)}}(e,(null==(s=null==r?void 0:r.shouldRepeat)?void 0:s.call(r,e,a))===!1?1:a.length),t={...t,[ex(n)]:a[i]}}let o=Array.prototype.slice.call(e.attributes).sort((e,t)=>eD.indexOf(e.name)-eD.indexOf(t.name));for(var a=0;a<o.length;a++){let{name:n,value:s}=o[a];n.startsWith("data-path")&&"data-path-scope"!=n&&eP(e,n,ef(t,s,!0,void 0,"FEAAS-EXTERNAL"!=e.tagName),r,i),"data-embed-src"==n&&eP(e,n,e.getAttribute(n),r,i)}}for(var o,s,l,c,a=0;c=e.childNodes[a++];)eM(c)&&eT(c,t,r,!0,i);return n||null==(l=null==r?void 0:r.onRender)||l.call(r,e,t),e}function eM(e){return 1==e.nodeType}function eL(e,t,r,n,i=!0){let a=(null==(o=null==n?void 0:n.processTemplate)?void 0:o.call(n,e,t,r))||t;if(e.innerHTML=a,e.classList.add("-feaas"),(e.closest(".component.feaas")||e).className.includes("-theme--"))for(var o,s,l=0;s=e.childNodes[l++];)eM(s)&&(s.className=s.className.replace(/(\s|^)-theme--[^\s]+\s*/g,"$1"));return eT(e,r,n,null,i)}function e$(e,t,r,n=!1,i=!0){var a;let o=(null==(a=null==r?void 0:r.processTemplate)?void 0:a.call(r,null,e,t))||e;if("u"<typeof document||n)return eT(eU(o)[0],t,r,null,i).outerHTML;{let e=document.createElement("div");return e.innerHTML=o,eT(e,t,r,null,i),e.innerHTML}}var e_=class{constructor(e,t=1,r){this.ownerDocument={createElement:e=>new e_(e),createDocumentFragment:()=>new e_(null,11)},this.nodeName=e,this.nodeType=t,this.textContent=r,this.attributes=[],this.childNodes=[]}setAttribute(e,t){let r=this.attributes.find(t=>t.name===e);r?r.value=t:this.attributes.push({name:e,value:t})}getAttribute(e){let t=this.attributes.find(t=>t.name===e);return t?t.value:void 0}insertBefore(e,t){if(e.parentNode=this,null===t)this.childNodes.push(e);else{let r=this.childNodes.indexOf(t);-1!==r&&this.childNodes.splice(r,0,e)}}removeAttribute(e){let t=this.attributes.findIndex(t=>t.name===e);-1!==t&&this.attributes.splice(t,1)}appendChild(e){e.parentNode=this,this.childNodes.push(e)}get tagName(){var e;return null==(e=this.nodeName)?void 0:e.toUpperCase()}get localName(){var e;return null==(e=this.nodeName)?void 0:e.toLowerCase()}get innerHTML(){return eB(this.childNodes)}set innerHTML(e){this.childNodes=eU(String(null!=e?e:""))}get outerHTML(){return eB([this])}get children(){return this.childNodes.filter(e=>1==e.nodeType)}closest(e){let t=this;for(;t;){if(eI(e,t))return t;t=t.parentNode}return null}querySelectorAll(e){let t=e.split(/\s*,\s*/),r=[],n=e=>{for(let n of t)if(eI(n,e)){r.push(e);break}for(let t of e.childNodes)n(t)};for(let e of this.childNodes)n(e);return r}querySelector(e){return this.querySelectorAll(e)[0]}findSibling(e,t){if(!this.parentNode)return null;let r=this.parentNode.childNodes,n=r.indexOf(this);if(-1===n)return null;for(let i=n+e;i>=0&&i<r.length;i+=e){let e=r[i];if(!t||1===e.nodeType)return e}return null}removeChild(e){let t=this.childNodes.indexOf(e);if(-1!==t)return this.childNodes.splice(t,1),e.parentNode=void 0,e}get previousSibling(){return this.findSibling(-1)}get nextSibling(){return this.findSibling(1)}get previousElementSibling(){return this.findSibling(-1,!0)}get nextElementSibling(){return this.findSibling(1,!0)}cloneNode(e=!1){let t=new e_(this.nodeName,this.nodeType);if(t.attributes=JSON.parse(JSON.stringify(this.attributes)),this.textContent&&(t.textContent=this.textContent),e)for(let e of this.childNodes){let r=e.cloneNode(!0);t.appendChild(r)}return t}get parentElement(){var e;return(null==(e=this.parentNode)?void 0:e.nodeType)==1?this.parentNode:null}};function eI(e,t){let r=e.match(/([.#]?[\w-]+|\[([\w-]+)(="([^"]*)")?\])/g);if(!r)return!1;for(let e of r)if(e.startsWith("#")){if(t.getAttribute("id")!==e.slice(1))return!1}else if(e.startsWith(".")){if(!(t.getAttribute("class")||"").split(" ").includes(e.slice(1)))return!1}else if(e.startsWith("[")){let r=e.match(/^\[([\w-]+)(="([^"]*)")?\]$/);if(!r)return!1;{let e=r[1],n=r[3],i=t.getAttribute(e);
10if(void 0===n){if(void 0===i)return!1}else if(i!==n)return!1}}else if(t.nodeName!==e)return!1;return!0}function eU(e){var t;let r=[],n=[];for(;e;){let i=e.match(/^<([\w-]+)(\s[^>]*)?>/),a=e.match(/^<\/([\w-]+)>/);if(i){let a=i[1].toLowerCase(),o=(null==(t=(i[2]||"").match(/([\w-]+)(="([^"]*)")?/g))?void 0:t.map(e=>{let[t,r,,n]=e.match(/([\w-]+)(="([^"]*)")?/);return{name:r,value:(n||"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'")}}))||[],s=new e_(a,1);if(s.attributes=o,n.length>0){let e=n[n.length-1];e.childNodes.push(s),s.parentNode=e}else r.push(s);["img","input","br"].includes(a)||n.push(s),e=e.slice(i[0].length)}else if(a)n.pop(),e=e.slice(a[0].length);else{let t=e.indexOf("<"),i=e.slice(0,-1!==t?t:void 0),a=new e_("#text",3);if(a.textContent=i,n.length>0){let e=n[n.length-1];e.childNodes.push(a),a.parentNode=e}else r.push(a);e=e.slice(i.length)}}return r}function eB(e){return e.map(e=>{if(3===e.nodeType)return e.textContent||"";let{nodeName:t,attributes:r}=e,n=r.map(({name:e,value:t})=>` ${e}="${String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}"`).join(""),i=eB(e.childNodes);return["img","input","br"].includes(t)?`<${t}${n} />`:`<${t}${n}>${i}</${t}>`}).join("")}function eH(e,t,r){var n;return eU((null==(n=null==r?void 0:r.processTemplate)?void 0:n.call(r,null,e,t))||e).map(e=>eT(e,t,r))}var eW=e=>{if(!e||"string"!=typeof e.url)return!1;for(var t in e)if("body"!=t&&"params"!=t&&"headers"!=t&&"url"!=t&&"method"!==t&&("jsonpath"!=t||"string"!=typeof e[t]))return!1;return!0};function ez(e){let{url:t,headers:r,params:n,method:i,body:a}=eJ(e),o,s=r["Content-Type"];"GET"!=i&&"HEAD"!=i&&("application/json"===s&&(o=JSON.stringify(a)),"multipart/form-data"===s&&(o=Object.keys(a).reduce((e,t)=>(e.append(t,a[t]),e),new FormData)),"application/x-www-form-urlencoded"===s&&(o=new URLSearchParams(a)));let l=Object.keys(n).length?`?${new URLSearchParams(n)}`:"";return[`${t}${l}`,{headers:r,body:o,method:i}]}function eJ(e){let t={};for(let r in(null==e?void 0:e.headers)||{})e.headers.hasOwnProperty(r)&&(t[r.replace(/^[a-z]|\-[a-z]/g,e=>e.toUpperCase())]=e.headers[r]);return t.Accept||(t.Accept="application/json"),{params:(null==e?void 0:e.params)||{},headers:t,jsonpath:String((null==e?void 0:e.jsonpath)||"$"),method:((null==e?void 0:e.method)||"GET").toUpperCase(),body:(null==e?void 0:e.body)||{},url:String((null==e?void 0:e.url)||"")}}var eq=async(e,t)=>{let r=E(t,e);if(r instanceof Promise)return r;let n=e;r&&(n=eJ(r));try{let[e,t]=ez(n),r=await (await eJ.fetchImplementation(e,{...t,method:t.method.toLowerCase()})).json();return n.jsonpath&&"$"!=n.jsonpath?em(r,n.jsonpath):r}catch(e){return{}}};async function eV(e){if(!e)return e;if(eW(e))return eq(e);let t=Object.keys(e),r=await Promise.all(t.map(t=>eW(e[t])?eq(e[t],t):null).filter(Boolean));return t.reduce((t,n)=>({...t,[n]:eW(e[n])?r.shift():e[n]}),{})}eJ.clean=function(e){let{params:t,method:r,headers:n,body:i,url:a}=eJ(e);var o={url:a},s={...n};return"application/json"===n["Content-Type"]&&delete s["Content-Type"],"application/json"===n.Accept&&delete s.Accept,Object.keys(s).length>0&&(o.headers=s),"GET"!==r&&(o.method=r),"GET"===r||"HEAD"===r||0===Object.keys(i).length||(o.body=i),Object.keys(t).length>0&&(o={...o,params:t}),o},eJ.toFetchArguments=ez,eJ.fetchOne=eq,eJ.fetch=eV,eJ.isDataSettings=eW,eJ.hasDataSettings=function(e){return!!e&&(eW(e)||Object.values(e).some(eW))},eJ.fetchImplementation=(...e)=>fetch(...e);var eY={};function eG(e,t=e=>{}){var r;let n=()=>{var i,a,o=Object.assign(new Promise((t,r)=>{i=r=>{null==e||e(r),t(r)},a=r}),{resolve:i,reject:a,restart:n,first:r});return r=o,o.catch(t),o};return n()}q(eY,{Component:()=>tE,ComponentProps:()=>tv,Context:()=>tI,ControlledPromise:()=>eG,DEFAULT_CDN_URL:()=>e7,DOM:()=>V,DataPath:()=>eC,DataScope:()=>Y,DataSettings:()=>eJ,Element:()=>eQ,FEAASComponent:()=>tE,FEAASComponentsProps:()=>tv,FEAASContext:()=>tI,FEAASContextProps:()=>t_,FEAASEditor:()=>tM,FEAASEditorProps:()=>tT,FEAASElement:()=>eQ,FEAASLoader:()=>tA,FEAASLoaderProps:()=>tC,FEAASPicker:()=>t$,FEAASPickerProps:()=>tL,FEAASStylesheet:()=>tw,FEAASStylesheetProps:()=>tS,InvalidResponse:()=>e5,JSONPath:()=>eu,Loader:()=>tA,MyComponent:()=>eX,Picker:()=>t$,Stylesheet:()=>tw,Thumbnail:()=>tO,WebComponent:()=>eK,adjustNumbers:()=>eR,autoloadScripts:()=>ev,cleanCollectionBit:()=>eO,clearFetchCache:()=>e2,createStylesheet:()=>tf,customizeDataSettings:()=>E,fetchAndRevalidate:()=>e4,fetchAndRevalidateComponent:()=>to,fetchAndRevalidateStylesheet:()=>tl,fetchBypassingCache:()=>e9,fetchCache:()=>e1,fetchComponent:()=>ts,fetchData:()=>eV,fetchToValidateCache:()=>e3,fetchWithCacheAwareness:()=>e8,findStylesheet:()=>tm,getComponent:()=>N,getComponentSource:()=>tt,getComponentURL:()=>ti,getFetchCache:()=>e6,getFramePosition:()=>tD,getHumanizedLabel:()=>ej,getLastPathBit:()=>eF,getQualifier:()=>ew,getStylesheetSource:()=>tr,getStylesheetURL:()=>ta,loadScript:()=>eE,loadStylesheet:()=>tp,loadStylesheetAllowStale:()=>th,normalizeCollectionScope:()=>ex,observeDOMElement:()=>ey,parseComponentSource:()=>te,parseLimit:()=>eA,parseRange:()=>eS,parseStylesheetSource:()=>tn,queryObject:()=>em,queryObjectRaw:()=>eh,queryScopes:()=>ef,registerComponent:()=>j,registerDatasource:()=>m,renderComponent:()=>tb,renderComponentElement:()=>tg,renderComponentPromise:()=>ty,renderDOMContent:()=>eL,renderDOMElement:()=>eT,renderHTMLContent:()=>e$,renderStylesheet:()=>tc,renderStylesheetPromise:()=>tu,serializeCH1RichText:()=>eb,setDOMAttribute:()=>eP});var eK="u"<typeof HTMLElement?"u">typeof windowJSDOM?windowJSDOM.HTMLElement:class{}:HTMLElement,eQ=class extends eK{getProps(e){return{}}constructor(){super(),this.defaultProps={},this.connected=!1,this.refs={},this.descendants=[],this.whenLoaded=eG(e=>{this.payload=e}),this.whenRendered=eG(()=>this.initialized=!0,()=>this.cancelRender()),this.addEventListener("feaasMount",this),this.addEventListener("feaasUnmount",this)}getRoot(){return this}attributeChangedCallback(e,t,r){this.set()}connectedCallback(){this.mount()}disconnectedCallback(){this.unmount()}mount(){try{let e=this.getParent();if(e&&!e.connected||this.connected)return;this.connected=!0,this.log("FEAAS: Mount",this.tagName,this),this.dispatchEventIndirectly(new Event("feaasMount",{bubbles:!0,composed:!0})),this.getElements().map(e=>{var t;return null==(t=e.mount)?void 0:t.call(e)}),this.set()}catch(e){this.onError(e)}}dispatchEventIndirectly(e){this.dispatchEvent(e);let t=this.getParent();t&&!t.contains(this)&&(Object.defineProperty(e,"target",{value:this,writable:!1}),Object.defineProperty(e,"composedPath",{value:()=>[this],writable:!1}),t.handleEvent(e))}isJSONAttribute(e){return!1}log(...e){let t=e[0];("u">typeof location&&null!=location&&location.hostname.startsWith("components-")||localStorage["Sitecore.Components.Debug"])&&console.log(t+" "+e.slice(1).map(e=>e&&"object"==typeof e?"%O":"%s").join(" "),...e.slice(1))}unmount(){this.connected&&(this.log("FEAAS: Unmount",this),this.dispatchEventIndirectly(new Event("feaasUnmount",{bubbles:!0,composed:!0})),this.connected&&this.initialized&&this.render&&this.update(),this.cancelRender(),this.connected=!1,this.initialized&&this.render&&this.update())}getParent(e=!0){for(var t=this;t=t.parentElement||(t.parentNode instanceof ShadowRoot?t.parentNode.host:null);)if(!e||t.tagName.startsWith("FEAAS-"))return t;if("FEAAS-CONTEXT"!=this.tagName)return document.querySelector("feaas-context")}getElements(e=this.getRoot(),t=!0){return Array.from(e.querySelectorAll("*")).map(e=>[!t||e.tagName.startsWith("FEAAS-")?e:null,e.shadowRoot?this.getElements(e.shadowRoot,t):null]).flat().filter(
10Boolean)}handleEvent(e){let t=e.composedPath()[0];switch(e.type){case"feaasMount":t!=this&&this.nestedCallback(t);break;case"feaasUnmount":t!=this&&this.unnestedCallback(t)}}unnestedCallback(e){let t=this.descendants.indexOf(e);-1!=t&&(this.log("FEAAS: Unnest",this,e),this.descendants.splice(t,1),this.refs[e.getComponentName()]=null,e.refs.parent==this&&(e.refs.parent=null),e.refs.top==this&&(e.refs.top=e.refs.parent))}nestedCallback(e){var t,r;if(-1==this.descendants.indexOf(e)&&(this.descendants.push(e),this.log("FEAAS: Nest",this,e),this.refs[e.getComponentName()]=e,e.refs.top=this,(t=e.refs).parent||(t.parent=this),e.render))for(var n=e.refs.parent;n;n=n.refs.parent)n.render&&((r=e.refs).parentReact||(r.parentReact=n),e.refs.topReact=n)}getComponentName(){return this.tagName.replace("FEAAS-","").toLowerCase()}isReadyToLoad(){return void 0===this.payload&&null==this.getAttribute("hidden")}onError(e,t="uncaught",r=!1){let n=new CustomEvent("feaasError",{bubbles:!0,composed:!0,detail:e});if(this.dispatchEventIndirectly(n),this.whenLoaded.reject(e),!n.defaultPrevented&&!r){this.whenRendered.reject(e);try{this.unmount()}catch(e){}return!0}return!1}shouldUpdateOnLoad(){return!0}async advance(){try{if(void 0===this.payload){if(!this.isReadyToLoad())return;this.payload=null,this.dispatchEventIndirectly(new Event("feaasLoad",{bubbles:!0,composed:!0}));let e=await this.load().catch(e=>{throw this.payload=void 0,e});if(this.whenLoaded.resolve(e),this.onLoad)return}else if(null==this.payload)return;this.flush(),this.whenRendered.resolve(this)}catch(e){this.onError(e)}}flush(){var e,t;if(!this.connected)return;let r=null==(t=null==(e=this.payload)?void 0:e.ReactDOM)?void 0:t.flushSync;r?r(()=>this.update()):this.update()}load(){return Promise.resolve(null)}update(){var e,t,r;if(null==this.payload||!this.render)return;let{React:n,ReactDOM:i,ReactDOMClient:a}=this.payload||{};if(!n)throw Error(`${this.tagName}: React is not present in payload`);if(!i)throw Error(`${this.tagName}: ReactDOM is not present in payload`);"false"==this.getAttribute("hydrate")&&this.firstElementChild||(this.refs.topReact||this.forceUpdateReact?this.forceUpdateReact&&this.connected?null==(e=this.forceUpdateReact)||e.call(this):null==(r=null==(t=this.refs.topReact)?void 0:t.forceUpdateReact)||r.call(t):(this.reactRoot||(this.reactRoot=a.createRoot(this.getReactRootElement())),this.reactRoot.render(this.getReactElement())))}invokeReactRendering(){let{React:e,ReactDOM:t}=this.payload||{};if(!this.connected)return null;let r=this.descendants.filter(e=>e.refs.parentReact==this&&e.payload&&e.connected).map((e,t)=>this.getReactElement(e));return this.render({...this.props,children:r},this.payload)}getReactErrorBoundary(e=this,t=e.tagName){if(this.reactErrorBoundary)return this.reactErrorBoundary;let{React:r,ReactDOM:n}=e.payload||{};return this.reactErrorBoundary||(this.reactErrorBoundary=class extends r.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(t,r){console.error(`FEAAS: ${e.tagName} Error:`,t,r),e.onError(t,"react")}render(){if(!this.state.error)return this.props.children}})}getReactElement(e=this,t){let{React:r,ReactDOM:n}=e.payload||{},i=this.getReactErrorBoundary(),a=this.getReactWrapper(e);return r.createElement(i,{key:e.tagName+"-"+e.getUID(),slot:e.getAttribute("slot")},r.createElement(a,null))}getReactWrapper(e=this,t=e.tagName){if(e.reactWrapper)return e.reactWrapper;let{React:r,ReactDOM:n}=e.payload||{};return e.reactWrapper=t=>{if(!e.render)return e.update();{let[t,i]=r.useReducer(e=>e+1,0);return e.forceUpdateReact=i,n.createPortal(r.createElement(r.Fragment,null,e.invokeReactRendering()),e.getReactRootElement())}},Object.assign(e.reactWrapper,{key:e.tagName+"-"+e.getUID(),displayName:t}),e.reactWrapper}getUID(){return this.uid||(this.uid=String(Math.random()))}getShadowRoot(){return this.shadowRoot||this.attachShadow({mode:"open"}),this.shadowRoot}getReactRootElement(){return this.useShadowRoot?this.getShadowRoot():this.getRoot()}set(e){try{for(var t in this.scheduleRender(),this.overrides={...this.overrides,...e},this.props={...this.getProps(),...this.overrides},this.props){let e=this.isJSONAttribute(t),n=this.props[t],i=e?JSON.stringify(n):String(n),a=this.defaultProps[t],o=e?JSON.stringify(a):String(a),s=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),l=this.getAttribute(s);try{var r=e?JSON.stringify(JSON.parse(l)):l}catch(e){var r=null}null==n||i===o?this.removeAttribute(s):("string"==typeof n||"number"==typeof n||"boolean"==typeof n||e)&&r!=i&&this.setAttribute(s,i)}}catch(e){this.whenRendered.reject(e),this.onError(e,"set")}return this}import(e){return import(e)}scheduleRender(){null==this.nextRender&&(this.whenRendered=this.whenRendered.restart()),this.cancelRender(),this.nextRender=requestAnimationFrame(()=>{this.nextRender=null,this.advance().catch(e=>{})})}cancelRender(){cancelAnimationFrame(this.nextRender)}formatURL(e,t){return"string"==typeof e&&e.match(/^\/[^\/]/)?t+e:e}getContextAttribute(e,t=this){for(var r=this;r=r.parentElement||(r.parentNode instanceof ShadowRoot?r.parentNode.host:null);)if(null!=r.getAttribute(e))return r.getAttribute(e);return this.getAttribute(e)}static register(e,t){null==t&&(t="u">typeof window?window:null),t&&!t.customElements.get(e)&&t.customElements.define(e,this)}},eZ=class extends eQ{load(){return Promise.all([import("https://cdn.skypack.dev/react"),import("https://cdn.skypack.dev/react-dom"),import("https://cdn.skypack.dev/react-dom/client")]).then(([e,t,r])=>({React:e,ReactDOM:t,ReactDOMClient:r}))}render({},{React:e}){return e.createElement(e.Fragment,null)}},eX=class extends eZ{constructor(){super(...arguments),this.useShadowRoot=!0}getProps(){return{counter:parseFloat(this.getAttribute("counter"))}}render({counter:e},{React:t}){let[r,n]=t.useState(0);return t.useEffect(()=>{n(e=>e+1)},[e]),t.createElement(t.Fragment,null,t.createElement("p",null,"Rendering attribute: ",e),t.createElement("p",null,"Triggered updates: ",r))}};eX.observedAttributes=["counter"];var e0=["initial","check","updated"],e1={};function e2(){e1={}}async function e4(e,t,r,n,i=e1){return e8({url:e,options:t,validator:r,callback:n,cache:i}
10).then(e3).then(e=>e.response)}async function e8({url:e,options:t,validator:r,callback:n,cache:i},a="initial"){let o=new Date;if(null!=i){var s=e6(e);if(e0.indexOf(s.phase)>=e0.indexOf(a))var l=s[a];else s.phase=a}let c=await (l||fetch(e,t));if(!l&&s&&(c.ok?s[a].resolve(c):s[a].reject(Error("Fetch failed"))),!c.ok)throw Error("Fetch failed");let u=new Date(c.headers.get("date"))<o||l&&"initial"==a&&("updated"==s.phase||"check"==s.phase);if((null==r?void 0:r(c,u))===!1)throw new e5("Response is not valid");return await (null==n?void 0:n(c,a,u)),{url:e,options:t,isCached:u,response:c,validator:r,callback:n,cache:i}}function e6(e,t=!1){let r=String(e).replace("?head","");var n=e1[r];return n||t||(n=e1[r]={phase:null,initial:eG(),check:eG(),updated:eG(),final:eG()}),n}var e5=class extends Error{};async function e3(e){let{url:t,isCached:r,options:n,validator:i,response:a,cache:o}=e;if(r){let{response:r}=await e8({url:t+(t.toString().includes("?")?"&":"?")+"head",options:{...n,method:"HEAD",cache:"no-cache"},validator:i,cache:o},"check");if(r.headers.get("last-modified")!=a.headers.get("last-modified"))return e9(e)}return e}async function e9(e){return e8({...e,options:{...e.options,cache:"reload"}},"updated")}var e7="https://feaas.blob.core.windows.net";function te(e){let t=null==e?void 0:e.match(/^(?:(.*?)\/components)?\/?([^\/]+)\/([^\/]+)(?:\/([^\/]+)(?:\/(published|staged|saved|\d+)(?:\.html?)?)?)?$/);if(t){var[,r,n,i,a,o]=t;return{cdn:r,library:n,component:i,version:a,revision:o}}}function tt(e){if(!e||!e.library||!e.component)throw Error("Component requires `library` and `component` properties");return`${e.cdn&&e.cdn!=e7?`${e.cdn}/components`:""}/${e.library}/${e.component}/${!e.version||"responsive"==e.version&&(!e.revision||"published"==e.revision)?"":e.version}/${!e.revision||"published"==e.revision?"":e.revision}`.replace(/(^\/|\/$|\/\/)(?!.+\/components\/)/g,"")}function tr(e){return`${e.cdn&&e.cdn!=e7?`${e.cdn}/styles/`:""}${e.library}/${!e.revision||"published"==e.revision?"":e.revision}`.replace(/\/$|\/\/(?!.+\/styles\/)/g,"")}function tn(e){let t=null==e?void 0:e.match(/^(?:(.*?)\/styles\/)?([^\/]+)(?:\/(published|staged|saved|\d+)(?:.css)?)?$/);if(t){var[,r,n,i]=t;return{cdn:r,library:n,revision:i}}{let t=te(e);if(t){var{cdn:r,library:n,revision:i}=t;return null!=i&&i.match(/\d/)&&(i=void 0),{cdn:r,library:n,revision:i}}}}function ti(e){return"string"==typeof e&&(e={src:e}),e="src"in e&&e.src?{...te(e.src)}:{...e},`${e.cdn||e.hostname||e7}/components/${e.library}/${e.component}/${e.version||"responsive"}/${e.revision||"published"}.html`}function ta(e){if("string"==typeof e&&(e={src:e}),"src"in e){if(String(e.src).includes("v1/files/components/styles"))return e.src;e={...tn(e.src)}}else e={...e};return`${e.cdn||e.hostname||e7}/styles/${e.library}/${"staged"==e.revision?"staged":"saved"==e.revision?"saved":"published"}.css`}async function to(e,t,r=!1){let n=e=>null==e.headers.get("x-ms-meta-versionDeletedAt"),i=e=>e.clone().text().then(t),a=await Promise.all([e.instance&&e8({options:{headers:{Accept:"text/html"},credentials:"omit"},url:ti({...e,version:e.instance}),validator:n}).catch(e=>e),e8({url:ti(e),validator:n}).catch(e=>e)]),o=a.find(e=>e&&"isCached"in e&&e);if(!o||o instanceof Error)throw a.find(e=>e&&e instanceof Error)||Error("Can not fetch component");return a[0]==o&&console.log("Using fork!",a),await i(o.response),r?o:e3({...o,callback:i}).catch(e=>{if(a[0]==o&&(e9({...o,callback:null,validator:null}),console.log("Fork was deleted"),!(a[1]instanceof Error)))return i(a[1].response),e3({...a[1],callback:i});throw e})}async function ts(e){var t;"string"==typeof e&&(e={src:e});let{response:r}=await to(e,e=>{t=e},!0);return{...e,template:t,lastModified:r.headers.get("last-modified")}}async function tl(e,t){return e4(ta(e),{headers:{Accept:"text/css"},credentials:"omit"},e=>null==e.headers.get("x-ms-meta-deletedAt"),(e,r)=>e.clone().text().then(e=>t(e,r)))}function tc(e,t){return tu(e,t||(t=document.createElement("style"))),t}function tu(e,t){return t||(t=document.createElement("style")),tl(e,(e,r)=>{t.textContent=e}).then(()=>t)}var td=new WeakSet;function tp(e,t){var r,n=tm(e);if(n){if(td.has(n))return Promise.resolve(n);e=n.getAttribute("data-href")||n.getAttribute("href")}return tl(e,(i,a)=>{"initial"==a&&n||(r||(r=n&&"LINK"!=n.tagName?n:tf(e)),r.textContent=i),null==t||t(i,a)}).then(()=>r||n)}function th(e){return new Promise((t,r)=>{tp(e,t).catch(r)})}function tm(e){let t=ta(e),{library:r}=tn(t),n=`/files/components/styles/${r}.css`;return document.querySelector(`style[data-href="${t}"], 11 link[rel="stylesheet"][href="${t}"], 12 style[data-href*="${n}"], 13 link[rel="stylesheet"][href*="${n}"]`)}function tf(e){let t=ta(e),r=document.createElement("style");return r.setAttribute("data-href",t),document.head.appendChild(r),r}function tg(e,t){let r=document.createElement("div");r.innerHTML=e;let n=document.createDocumentFragment();for(;r.firstChild;)n.appendChild(r.firstChild);return eT(n,t),r}function tb(e,t,r=!0){return ty(e,t||(t=document.createElement("div")),r),t}async function ty(e,t,r=!0){return t||(t=document.createElement("div")),t.childNodes.length?eT(t,e.data,e,
13null,r):"template"in e?eL(t,e.template,e.data,e,r):to(e,n=>eL(t,n,e.data,e,r)).then(()=>t)}function tv(e){var t,r,n,i,a,o,s,l;let c,u=e.getAttribute("src");if(u){let e=te(u);if(!e)throw Error(`Could not parse FEAAS Component source: ${u}`);var{cdn:d,library:p,component:h,version:m,revision:f}=e}let g=e.getAttribute("data");if(null!=g&&""!=g)try{c="string"==typeof g?JSON.parse(g):{}}catch(e){console.error(e)}let b=e.getAttribute("fetch");return{data:c||{},cdn:null!=(r=null!=(t=e.getContextAttribute("cdn"))?t:d)?r:e7,library:null!=(n=e.getAttribute("library"))?n:p,component:null!=(i=e.getAttribute("component"))?i:h,version:null!=(o=null!=(a=e.getAttribute("version"))?a:m)?o:"responsive",revision:null!=(l=null!=(s=e.getAttribute("revision"))?s:f)?l:"published",hostname:e.getAttribute("hostname"),template:e.getAttribute("template"),instance:e.getAttribute("instance"),editable:null!=e.getAttribute("editable"),suspended:null!=e.getAttribute("suspended"),lastModified:e.getAttribute("last-modified"),fetch:"false"==b||null==b&&e.hasAttribute("fetch")?[]:null==b||"true"==b?["data","template","stylesheet"]:b.split(/(\s+|\-)+/g).filter(Boolean)}}var tE=class extends eQ{setData(e){this.set({data:e})}getProps(){return tv(this)}isJSONAttribute(e){return"data"==e}attributeChangedCallback(e,t,r){t!==r&&(("library"==e||"component"==e||"revision"==e||"version"==e)&&(this.payload=void 0,this.alreadyRendered&&this.connected&&(this.needsRefresh=!0,this.needsToFetchTemplate=!0)),super.attributeChangedCallback(e,t,r),"data"==e&&(this.needsRefresh=!0,(this.props.fetch.includes("data")||this.alreadyRendered||!eJ.hasDataSettings(this.props.data))&&this.fetchData()))}async fetchData(){this.readyData=void 0,this.whenDataReady=this.whenDataReady.restart();let e=await eJ.fetch(this.props.data),t=this.alreadyRendered;await this.whenDataReady.resolve(e),t&&this.advance()}getEditor(){var e;return null==(e=document.querySelector("feaas-context"))?void 0:e.refs.editor}constructor(){super(),this.readyData={},this.whenDataReady=eG(e=>this.readyData=e,e=>this.onError(e)),this.defaultProps={cdn:e7,revision:"published",version:"responsive",editable:!1,suspended:!1,data:{}},this.onLoad=e=>{this.payload=e,this.advance()},this.getAttribute("data"),this.getAttribute("data")||this.whenDataReady.resolve({}),this.addEventListener("click",()=>{this.props.editable&&this.edit()})}edit(){let e=this.getEditor();if(null!=e&&e.setTarget(this))return e.open(),!0}getOriginal(){let e=this.getAttribute("data-path-scope");if(e){for(var t=this;(t=t.previousElementSibling)&&t.getAttribute("data-path-scope")==e;)var r=t;return r}}isReadyToLoad(){return super.isReadyToLoad()&&null!=this.props.library&&null!=this.props.component&&null!=this.props.version}async load(){var e;if(this.getOriginal())return;let t=()=>{null!=this.payload&&(r||this.readyData&&this.onLoad(this.payload))};if(this.props.fetch.includes("stylesheet"))var r=th({...this.props}).then(()=>{r=null,t()});if(this.props.fetch.includes("template")||this.needsToFetchTemplate){this.needsToFetchTemplate=!1;var n=to(this.props,e=>{this.payload=e,this.needsRefresh=!0,t()})}else this.payload=null!=(e=this.props.template)?e:this.innerHTML;return Promise.all([r,this.whenDataReady.then(()=>t()),n]).then(()=>this.payload)}flush(){this.readyData&&super.flush()}update(){if(this.alreadyRendered=!0,!(!this.props.fetch.includes("data")&&!this.props.fetch.includes("template")&&this.firstElementChild&&!this.needsRefresh))if(Array.from(this.children).filter(e=>"BR"!=e.tagName).length>0&&!this.needsRefresh)eT(this,this.readyData);else{if(this.needsRefresh=!1,this.getOriginal())return;eL(this,this.payload,this.readyData)}}};function tC(e){return{opacity:null!=e&&e.getAttribute("opacity")?parseFloat(null==e?void 0:e.getAttribute("opacity")):1,hidden:(null==e?void 0:e.getAttribute("hidden"))!=null}}tE.observedAttributes=["library","component","version","revision","hostname","cdn","template","data","instance","editable","with-stylesheet","fetch"],tE.register("feaas-component");var tA=class extends eQ{constructor(){super(...arguments),this.defaultProps={hidden:!1}}getProps(){return tC(this)}attributeChangedCallback(e,t,r){if(t!==r)return"hidden"==e&&(this.style.setProperty("display","block","important"),this.style.setProperty("transition","opacity 0.3s","important"),r?(this.style.setProperty("opacity","0","important"),this.style.pointerEvents="none"):(this.style.setProperty("opacity","1","important"),this.style.pointerEvents="all")),super.attributeChangedCallback(e,t,r)}
13connectedCallback(){this.payload=null,super.connectedCallback(),this.attributeChangedCallback("hidden",this.getAttribute("hidden"),this.getAttribute("hidden")),this.stylesheet=document.createElement("style"),this.stylesheet.textContent=` 14 #loader { 15 position: absolute; 16 top: 0; 17 left: 0; 18 right: 0; 19 bottom: 0; 20 display: flex; 21 align-items: center; 22 justify-content: center; 23 background: #f6f6ff; 24 z-index: 1000; 25 } 26 @keyframes loader-circular-track { 27 0% { 28 stroke-dasharray: 1, 400; 29 stroke-dashoffset: 0; 30 } 31 50% { 32 stroke-dasharray: 400, 400; 33 stroke-dashoffset: -100; 34 } 35 100% { 36 stroke-dasharray: 400, 400; 37 stroke-dashoffset: -260; 38 } 39 } 40 41 @keyframes loader-circular-spinner { 42 0% { 43 transform: rotate(0deg); 44 } 45 46 100% { 47 transform: rotate(360deg); 48 } 49 } 50 #loader .spinner { 51 width: 48px; 52 height: 48px; 53 } 54 `,this.loader=document.createElement("div"),this.loader.id="loader",this.loader.innerHTML=` 55 <div class="spinner"> 56 <svg 57 viewBox="0 0 100 100" 58 style=" 59 animation: 2s linear 0s infinite normal none running loader-circular-spinner; 60 display: block; 61 width: 48px; 62 height: 48px; 63 " 64 > 65 <circle fill="transparent" cx="50" cy="50" r="42" stroke="rgba(0,0,0,0.1)" stroke-width="10px"></circle> 66 <circle 67 fill="transparent" 68 stroke="#5548D9" 69 cx="50" 70 cy="50" 71 r="42" 72 stroke-width="10px" 73 stroke-linecap="round" 74 style="animation: 1.5s linear 0s infinite normal none running loader-circular-track" 75 ></circle> 76 </svg> 77 </div>`,this.getRoot().appendChild(this.stylesheet),this.getRoot().appendChild(this.loader)}update(){this.loader.style.opacity=String(this.props.opacity)}};function tS(e){var t,r,n,i;let a=e.getAttribute("src");if(a)var{cdn:o,library:s,revision:l}=tn(a);return{library:null==e?void 0:e.getContextAttribute("library"),revision:null!=(r=null!=(t=null==e?void 0:e.getAttribute("revision"))?t:l)?r:"published",cdn:null!=(i=null!=(n=null==e?void 0:e.getContextAttribute("cdn"))?n:null==e?void 0:e.getContextAttribute("hostname"))?i:e7}}tA.observedAttributes=["hidden","opacity"],tA.register("feaas-loader");var tw=class extends eQ{constructor(){super(...arguments),this.onLoad=e=>{this.payload=e,this.advance()}}getProps(){return tS(this)}isReadyToLoad(){return null!=this.props.library&&null!=this.props.revision&&null!=this.props.cdn}load(){return tp(this.props,this.onLoad)}};tw.register("feaas-stylesheet");var tO={};q(tO,{convertBase64toBlob:()=>tx,generate:()=>tk,get:()=>tF,getVersionForThumbnail:()=>tj,load:()=>tN,responseToImage:()=>tR,upload:()=>tP});var tx=e=>fetch(e).then(e=>e.blob()),tR=e=>e.blob().then(e=>new Promise((t,r)=>{let n=new Image;n.onerror=r,n.onload=()=>{t(n)},n.src=URL.createObjectURL(e)}));async function tj(e){return e.versions.length||await e.versions.fetch(),e.getVersionForWidth(800)}async function tF(e,t,r){try{if(!e.isNew)return await tN(e,t,r)}catch(r){e.sdk.log(`FEAAS: Thumbnail ${e.id}, version: ${(null==t?void 0:t.id)||"responsive"}, status: generating ${status}, reason: ${r}`)}let n=await tk(e,t);return null==r||r(n,!1),n&&!e.isNew&&tx(n.src).then(r=>tP(e,t,r)),n}async function tN(e,t,r){var n;let i=t?t.getThumbnailURL():e.getThumbnailURL(),a=e.library.stylesheet,o=new Date(Math.max(Number(e.modifiedAt),Number(a.modifiedAt)));return e.sdk.log(`FEAAS: Thumbnail ${e.id}/${(null==t?void 0:t.id)||"responsive"}, loading`),await e4(i,{},(e,t)=>{let i=2e3>Math.abs(Number(new Date(e.headers.get("x-ms-meta-componentRenderedAt")))-Number(o));return t&&!i&&tR(e).then(e=>{n=e,r(e,t)}),i},(i,a,o)=>{e.sdk.log(`FEAAS: Thumbnail ${e.id}/${(null==t?void 0:t.id)||"responsive"}, status: ${a}`),tR(i).then(e=>{n=e,r(e,o)})},null),n}async function tk(e,t,r){var n,i,a,o,s,l;let c,u=t||(e.isNew?null:await tj(e));if(!u||u.isViewEmpty())return null;let d=r||e.library.stylesheets.first,{datasources:p}=e.sdk;return await (n=u.classList,i=d.getBreakpointForWidth(800,u.getBreakpoints()),a=u.view,o=p.reduce((e,t)=>
77Object.assign(e,{[t.id]:t.sample}),{}),s=d.css,l=e.sdk,(c=document.createElement("iframe")).style.position="absolute",c.style.top="-2000px",c.style.left="-2000px",c.style.width=i.props.minWidth+"px",c.style.height="720px",c.style.zIndex="100011",document.body.appendChild(c),new Promise((e,t)=>{let r=document.createElement("script");r.onerror=t,r.src=l.frontend+"/assets/html2canvas.js",r.onload=()=>{var r;((null==(r=c.contentWindow.document.fonts)?void 0:r.ready)||Promise.resolve()).then(function(){return c.contentWindow.html2canvas(p,{scale:Math.max(1.1,1e3/Math.min(1401,Math.max(320,i.props.minWidth))),width:Math.min(1401,Math.max(320,i.props.minWidth)),height:Math.max(1,Math.min(2e3,p.offsetHeight)),windowWidth:i.props.minWidth||i.props.maxWidth+"px",windowHeight:1e3,proxy:l.backend+"/proxy/media",backgroundColor:"#ffffff"}).then(r=>{let n=r.toDataURL("image/jpeg",.6);c.parentElement.removeChild(c);let i=new Image;i.onload=()=>{e(i)},i.onerror=t,i.src=n})})},c.contentWindow.document.head.appendChild(r);let u=c.contentWindow.document.createElement("style");u.textContent=` 78 ${s} 79 body, html { padding: 0; margin: 0; overflow: hidden } 80 `;let d=c.contentWindow.document.createElement("style");d.textContent=` 81 body, html { padding: 0; margin: 0; overflow: hidden } 82 `,c.contentWindow.document.head.appendChild(u),c.contentWindow.document.head.appendChild(d);let p=tb({template:a,data:o},null,!1);p.classList.add(...n,"-feaas--preview","-emulate--"+i.details.slug),c.contentWindow.document.body.appendChild(p)}))}async function tP(e,t,r){let n=t?t.getThumbnailURL():e.getThumbnailURL(),i=new Date(Math.max(Number(e.modifiedAt),Number(e.library.stylesheet.modifiedAt)));try{await e.sdk.uploadBlob("thumbnails",n.split(/\/thumbnails\//)[1],r,{headers:{"x-ms-blob-content-type":"image/jpg","x-ms-blob-cache-control":"public,max-age=31536000,immutable","x-ms-meta-versionId":t?t.id:null,"x-ms-meta-versionRevision":t?t.revision.toString():null,"x-ms-meta-componentId":e.id,"x-ms-meta-componentRenderedAt":i.toUTCString(),"x-ms-meta-componentModifiedAt":e.modifiedAt.toUTCString(),"x-ms-meta-componentCreatedAt":e.createdAt.toUTCString(),"x-ms-meta-modifiedAt":e.modifiedAt.toUTCString()}}),fetch(n,{cache:"no-cache"}).then(()=>{e.sdk.log("FEAAS: Thumbnail uploaded",n)})}catch(t){e.sdk.log("FEAAS: Thumbnail failed to upload",n,t)}return n}function tD(e){let t=[];if(e){let r=e.ownerDocument.defaultView,n,i;for(;r!==window.top;){n=r.parent;for(let e=0;e<n.frames.length;e++)if(n.frames[e]===r){for(let e of n.document.getElementsByTagName("iframe"))if(e.contentWindow===r){i=e.getBoundingClientRect();let r=e.contentWindow.getComputedStyle(e);t.push({left:i.left+parseInt(r.borderLeftWidth),top:i.top+parseInt(r.borderTopWidth)})}r=n;break}}}return t.reduce((e,t)=>({left:e.left+t.left,top:e.top+t.top}),{left:0,top:0})}function tT(e){var t;return{context:HTMLElement,frontend:null==e?void 0:e.getContextAttribute("frontend"),src:null!=(t=null==e?void 0:e.getAttribute("src"))?t:"/editor.js",library:null==e?void 0:e.getAttribute("library"),component:null==e?void 0:e.getAttribute("component"),version:null==e?void 0:e.getAttribute("version"),instance:null==e?void 0:e.getAttribute("instance"),forked:null==e?void 0:e.getAttribute("forked"),revision:(null==e?void 0:e.getAttribute("revision"))||"saved",hidden:(null==e?void 0:e.getAttribute("hidden"))!=null,for:null==e?void 0:e.getAttribute("for"),state:(null==e?void 0:e.getAttribute("state"))||"idle",changed:(null==e?void 0:e.getAttribute("changed"))!=null}}"u">typeof window&&(window.FEAASReactElement=eZ,null!=window.FEAASLoading||(window.FEAASLoading=Promise.resolve()));var tM=class extends eQ{constructor(){super(...arguments),this.framePoint={top:0,left:0},this.wrapperRect={top:0,left:0,width:0,height:0},this.bodyRect={top:0,left:0,width:0,height:0},this.defaultProps={hidden:!1},this.setTarget=(e,t={component:e.getAttribute("component"),version:e.getAttribute("version"),revision:e.getAttribute("revision"),instance:e.getAttribute("instance")})=>{if(!this.closing&&(!this.target||null==e))return this.set(t),this.target=e,!0},this.onChromeMeasureElement=(e,t=e.getBoundingClientRect())=>e.ownerDocument==document?{left:t.left-this.bodyRect.left,top:t.top-this.bodyRect.top,width:t.width,height:t.height}:{left:t.left+this.framePoint.left-this.bodyRect.left,top:t.top+this.framePoint.top-this.bodyRect.top,width:t.width,height:t.height},this.onBeforeMeasure=e=>{e.memoized.focusable&&(this.framePoint=tD(e.memoized.focusable)),this.chrome&&(this.wrapperRect=this.chrome.positionable.getBoundingClientRect(),this.bodyRect=this.chrome.positionable.ownerDocument.body.parentElement.getBoundingClientRect())},this.onMeasure=()=>{}
82,this.onPosition=({focusable:e,root:t})=>{!this.chrome||this.props.hidden||(e?(this.chrome.wrapper.style.width=e.width+32+"px",this.chrome.wrapper.style.height=e.height+16+64+"px",this.chrome.wrapper.style.left=e.left-16+"px",this.chrome.wrapper.style.top=e.top-64+"px",this.chrome.wrapper.style.opacity="1",this.chrome.absolute=this.querySelector(".ui.overlays"),this.chrome.absolute&&(this.chrome.absolute.style.left=t.left+"px",this.chrome.absolute.style.top=t.top+"px")):(this.chrome.wrapper.style.opacity="0",this.chrome.wrapper.style.left="-1000px",this.chrome.wrapper.style.top="-1000px"))},this.onWindowMessage=e=>{var t;switch(null==(t=e.data)?void 0:t.type){case"feaasEdit":let r=this.getPlaceholder();this.setTarget(r.editable,e.data)&&(this.loader=r.loader,document.body.appendChild(r.clipper),this.editedUID=e.data.id,this.setPlaceholder(),this.open());break;case"feaasMeasurements":this.measurements=e.data.measurements,this.props.hidden||this.setPlaceholder()}},this.onContentChange=()=>{this.setAttribute("changed","changed"),requestAnimationFrame(()=>{this.setIframeComponentContent()})},this.onClose=()=>{var e;this.setAttribute("hidden","hidden"),this.placeholder&&(this.placeholder.positionable.style.opacity="0",this.placeholder.positionable.style.pointerEvents="none"),this.chrome&&(this.chrome.wrapper.style.opacity="0"),null!=(e=this.target)&&e.parentNode&&(this.target.outerHTML=this.target.outerHTML),this.setTarget(null,{component:null,version:null,instance:null,revision:null}),this.setEditorContext({isFocused:!1})},this.onVersionStateChange=(e,t)=>
82{this.versionContext=e,this.setVersionContext=t},this.onEditorStateChange=(e,t)=>{this.editorContext=e,this.setEditorContext=t,e.editor&&"loading"==this.props.state&&!this.props.hidden&&(this.setAttribute("state","ready"),this.ownerDocument.fonts.ready.then(()=>setTimeout(()=>{this.setReadyState(),this.setIframeComponentContent()},100)))}}getProps(){return tT(this)}getReactRootElement(){return this.reactRootElement||(this.reactRootElement=document.createElement("div"),this.getRoot().appendChild(this.reactRootElement)),this.reactRootElement}showLoader(){this.loader||(this.loader=document.createElement("feaas-loader"),this.loader.setAttribute("opacity","0.6"),this.loader.style.zIndex="1000",this.target.appendChild(this.loader),"FEAAS-COMPONENT"==this.target.tagName&&(this.target.style.position="relative"))}hideLoader(){this.loader&&(this.loader.setAttribute("hidden","hidden"),"FEAAS-COMPONENT"==this.target.tagName&&(this.target.style.position="relative",this.target.style.position=""))}load(){return import(this.formatURL(this.props.src,this.props.frontend))}connectedCallback(){super.connectedCallback(),window.addEventListener("message",this.onWindowMessage)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("message",this.onWindowMessage)}setIframe(e){this.iframe=e}setIframeComponentContent(){this.placeholder&&this.iframe&&this.placeholder.editable.innerHTML&&this.iframe.contentWindow.postMessage({type:"feaasUpdate",id:this.editedUID,content:this.placeholder.editable.innerHTML})}setPlaceholder(){if(!this.iframe)return;let e=this.iframe.clientWidth,t=this.iframe.clientHeight,r=this.iframe.getBoundingClientRect(),n=this.getPlaceholder(),i=document.body.getBoundingClientRect(),a=this.measurements[this.editedUID];a&&(Object.assign(n.clipper.style,{position:"absolute",top:r.top+this.iframe.clientTop-i.top+"px",left:r.left+this.iframe.clientLeft-i.left+"px",width:e+"px",height:t+"px",pointerEvents:"none",zIndex:1,overflow:"hidden"}),Object.assign(n.positionable.style,{position:"absolute",top:a.top+"px",left:a.left+"px",width:a.width+"px",zIndex:2,transition:"opacity 0.4s",pointerEvents:this.props.hidden?"none":"all"}),Object.assign(n.loader.style,{position:"absolute",top:a.top+"px",left:a.left+"px",width:a.width+"px",height:a.height+"px",filter:"opacity(0.6)",zIndex:3,pointerEvents:"none"}),document.dispatchEvent(new Event("feaasRefresh",{bubbles:!0})))}getPlaceholder(){return this.placeholder||(this.placeholder={clipper:document.createElement("div"),positionable:document.createElement("div"),editable:Object.assign(document.createElement("div"),{className:"-feaas"}),loader:document.createElement("feaas-loader")},this.placeholder.clipper.appendChild(this.placeholder.positionable),this.placeholder.positionable.appendChild(this.placeholder.editable),this.placeholder.clipper.appendChild(this.placeholder.loader)),this.placeholder}attributeChangedCallback(e,t,r){t!==r&&("hidden"==e&&(this.style.setProperty("display","block","important"),this.style.setProperty("transition","opacity 0.3s","important"),r?(this.style.setProperty("opacity","0","important"),this.style.pointerEvents="none"):(this.style.setProperty("opacity","1","important"),this.style.pointerEvents="all")),super.attributeChangedCallback(e,t,r))}open(){clearTimeout(this.closing),this.removeAttribute("hidden"),this.removeAttribute("changed"),this.setLoadingState()}shouldFork(e){return null==e.forkOriginId&&null!=this.props.instance}cleanup(){var e;this.placeholder&&(null==(e=this.placeholder.clipper)||e.remove(),this.placeholder=null)}close(){console.log("Editor is not ready")}unfork(){console.log("Editor is not ready")}discard(){console.log("Editor is not ready")}save(){console.log("Editor is not ready")}setVersionContext(e){console.log("Editor is not ready")}setEditorContext(e){console.log("Editor is not ready")}setLoadingState(){this.showLoader(),this.setAttribute("state","loading")}setReadyState(){this.hideLoader(),this.setEditorContext({activeVersionId:this.component.versions[0].id}),this.setAttribute("state","ready")}
vendor: 4,622 bytes, line 82
82render({children:e,component:t,version:r,instance:n},{Editor:i,VersionStatusList:a,VersionStatusButton:o,Version:s,VersionMenu:l,EditorUIUndo:c,EditorUIMode:u,React:{useEffect:d,useMemo:p,useState:h,useContext:m},Chakra:{HStack:f,Box:g,Button:b,MenuItem:y},Chrome:v,ReactDOM:E,useSDK:C,useLibrary:A,useSlots:S,useModelObserver:w,ConfirmationContext:O,VersionContext:x}){if(!this.payload)return;let{React:R}=this.payload,j=C(),F=A(),[N,k]=h(),{setConfirm:P}=m(O),D=n||r;N&&(this.component=N),d(()=>{if(this.props.hidden)return;let e=F.components.getItem(t).clone();return e.versions.search({ids:[r,n].filter(Boolean),componentIds:[t]}).then(t=>{e.versions.setItems(t);let i=e.findVersion(n,["staged","published"]),a=e.findVersion(r,["staged","published"]);if(i)i.deletedAt?(i.getDraft().changeAndNotify(a.toProperties()).restore(),console.error("FEAAS Editor: Restoring fork")):(console.error("FEAAS Editor: Pre-forked"),this.setAttribute("forked",i.id));else if(this.removeAttribute("forked"),this.shouldFork(a)){console.error("FEAAS Editor: Forking");let e=a.fork(n).id;this.setAttribute("instance",e)}else console.error("FEAAS Editor: Regular");k(e)}),()=>{this.closing=setTimeout(()=>{this.closing=null,this.cleanup(),k(null)},400)}},[r,this.props.hidden]);let T=w(null==N?void 0:N.versions,[]).filter(e=>e.id==D),M=T[0];M&&!this.props.hidden&&(this.version=M),d(()=>(this.unfork=()=>{P({title:"Reverting component customizations",button:"Discard",body:"Are you sure to reset component to its original state? All changes will be lost.",action:()=>{let e=N.findVersion(r,["staged","published"]);N.findVersion(n).unstage().unpublish().changeAndNotify(e.toProperties()),N.saveVersions(!1),this.setVersionContext({needsWrite:!0}),this.removeAttribute("forked"),requestAnimationFrame(this.onClose)}})},this.discard=()=>{this.props.changed&&(N.findVersion(D).revert(),N.saveVersions(!1),this.setVersionContext({needsWrite:!0}))},this.close=()=>{P({title:"Component has unsaved changes",button:"Discard",body:"Are you sure to close editor and discard changes?",bypass:!this.props.changed,action:()=>{this.discard(),requestAnimationFrame(this.onClose)}})},this.save=()=>{P({bypass:!!this.props.forked,title:"Customizing component",button:"Save",body:"Changes to the component will only be visible on that page. Changes to component done in Component Builder will not be reflected here. It will be possible to revert the customization.",action:()=>{var e,t;null==(t=null==(e=N.findVersion(D).commitData({view:this.editorContext.editor.getData({rootName:D}),model:""}))?void 0:e.stage())||t.publish(),this.removeAttribute("changed"),this.setAttribute("forked",D),N.saveVersions(!1)}})},()=>{delete this.unfork,delete this.discard,delete this.save,delete this.editorContext,delete this.versionContext,delete this.setEditorContext,delete this.setVersionContext}),[N]);let L=p(()=>this.target,[N]);return p(()=>N&&S(e,({picker:e,children:t})=>R.createElement(g,{ref:e=>{this.chrome=e?{positionable:e,wrapper:e.querySelector(".editor-chrome"),absolute:this.querySelector(".ui.overlays")}:null}},R.createElement(g,{className:"editor-wrapper",position:"absolute",left:0,top:0},R.createElement(i,{datasources:j.datasources,sdk:j,library:F,component:N,versions:T,context:{isAutosaveEnabled:!1,onChromeMeasure:this.onMeasure,onChromeBeforeMeasure:this.onBeforeMeasure,onChromeMeasureElement:this.onChromeMeasureElement,onChromePosition:this.onPosition,onContentChange:this.onContentChange}},{exports:this.onEditorStateChange,after:t,chrome:({editor:e})=>e&&R.createElement(v,null),children:({isArchivedDisplayed:e,editor:t,status:r})=>R.createElement(g,{position:"absolute",left:0,top:0,className:"editor-chrome",p:4,boxShadow:"2xl",pointerEvents:"none",opacity:0,transition:"opacity 0.3s"},R.createElement(g,{left:0,width:"4",top:0,bottom:0,backdropFilter:"blur(2px)",background:"rgb(244 244 244 / 80%)",position:"absolute"}),R.createElement(g,{right:0,width:"4",top:0,bottom:0,backdropFilter:"blur(2px)",background:"rgb(244 244 244 / 80%)",position:"absolute"}),R.createElement(g,{top:0,height:"16",left:0,right:0,backdropFilter:"blur(2px)",background:"rgb(244 244 244 / 80%)",position:"absolute"}),R.createElement(g,{bottom:0,height:"4",left:0,right:0,backdropFilter:"blur(2px)",background:"rgb(244 244 244 / 80%)",position:"absolute"}),M&&R.createElement(s,{version:M,node:L,ignoreBreakpoints:!0,deps:[this.props.forked,this.props.changed]},{exports:this.onVersionStateChange,left:R.createElement(f,{justifyContent:"space-between"},R.createElement(c,{size:"sm",editor:"ready"==r?t:null}),R.createElement(u,{size:"sm"})),middle:(e,t)=>
82[!1],right:R.createElement(R.Fragment,null,R.createElement(b,{variant:"secondary",size:"sm",onClick:this.close},"Close"),R.createElement(b,{variant:"primary",size:"sm",onClick:this.save,isDisabled:!this.props.changed},this.props.changed?this.props.forked?"Save":"Save customization":"Up to date"),R.createElement(l,{isDisabled:!this.props.forked&&!this.props.changed},R.createElement(y,{onClick:this.unfork,isDisabled:!this.props.forked},"Unfork"),R.createElement(y,{onClick:this.discard,isDisabled:!this.props.changed},"Discard")))}))})))),[M,this.props.forked,this.props.changed])}isReadyToLoad(){return null!=this.props.component&&null!=this.props.version&&!this.props.hidden}};function tL(e){var t,r;return{part:(null==e?void 0:e.getAttribute("part"))||"picker",slot:(null==e?void 0:e.getAttribute("part"))||"picker",mode:null==e?void 0:e.getAttribute("mode"),dialog:null==e?void 0:e.getAttribute("dialog"),placeholder:(null==e?void 0:e.getAttribute("placeholder"))||"No theme",frontend:null!=(t=null==e?void 0:e.getContextAttribute("frontend"))?t:"https://components.sitecorecloud.io",src:null!=(r=null==e?void 0:e.getAttribute("src"))?r:"/picker.js",hidden:(null==e?void 0:e.getAttribute("hidden"))!=null,variant:null==e?void 0:e.getAttribute("variant"),context:void 0,onClose:void 0,setAttribute:void 0,getAttribute:void 0}}tM.observedAttributes=["library","component","version","revision","hidden","state","changed","forked"],tM.register("feaas-editor");var t$=class extends eQ{constructor(){super(...arguments),this.defaultProps={hidden:!1}}getProps(){return tL(this)}load(){return this.import(this.formatURL(this.props.src,this.props.frontend))}connectedCallback(){this.setAttribute("feaas-role","ui"),super.connectedCallback()}render({placeholder:e,context:t,mode:r,dialog:n,children:i,variant:a},{Picker:o,React:s,useContext:l,EnvironmentContext:c,useLibrary:u,useSDK:d,BYOC:p}){let[h,m]=s.useReducer(e=>e+1,0),f=d(),g=l(c),b=u("collections"),y=u("components"),v=d("datasources"),E=u(),C=(null==(w=null==(S=null==E?void 0:E.stylesheets)?void 0:S.first)?void 0:w.rules)||(null==(O=null==E?void 0:E.stylesheet)?void 0:O.styles),A=d("renderingHost.expandedComponents");var S,w,O,x=null==t?void 0:t.getAttribute("data");if(x)try{x=JSON.parse(x)}catch(e){}if(t)var R=f.ExternalComponent.getDefinition(t),j=R&&!R.getConfiguration(t),F=(null==R?void 0:R.type)=="feaas"?y.find(e=>e.id==t.getAttribute("component")):null==p?void 0:p.getComponent(String(t.getAttribute("data-external-id")));return s.createElement(o,{cdn:g.cdn,rules:C,collections:b,themeContext:t,placeholder:e,embed:F,externalComponents:A,datasources:v,data:x,versionId:null==t?void 0:t.getAttribute("version"),mode:r||(j?"library":F?"context":null),setAttribute:(e,t,r)=>{"data"==t&&r&&(r=JSON.stringify(r)),this.props.setAttribute(e,t,r),m()},getAttribute:(e,r)=>null==t?void 0:t.getAttribute(r),dialog:n,context:t,variant:a,onModeChange:(e,t)=>
82{this.set({mode:e,dialog:t})}},i)}};function t_(e){var t,r,n,i,a;return{library:null==e?void 0:e.getAttribute("library"),src:null!=(t=null==e?void 0:e.getAttribute("src"))?t:"/context.js",environment:null!=(r=null==e?void 0:e.getAttribute("environment"))?r:void 0,frontend:null!=(n=null==e?void 0:e.getAttribute("frontend"))?n:"https://components.sitecorecloud.io",backend:null!=(i=null==e?void 0:e.getAttribute("backend"))?i:"https://components.sitecorecloud.io/api",cdn:null!=(a=null==e?void 0:e.getAttribute("cdn"))?a:"https://feaas.blob.core.windows.net",auth:null,isolate:(null==e?void 0:e.getAttribute("isolate"))==null||(null==e?void 0:e.getAttribute("isolate"))=="true"}}t$.observedAttributes=["library","mode","frontend","src","hidden","variant","dialog"],t$.register("feaas-picker");var tI=class extends eQ{constructor(){super(...arguments),this.defaultProps={isolate:!0},this.onStatusChange=(e,t)=>{"ready"==e&&(this.whenSDKReady.resolve(t),this.dispatchEvent(new CustomEvent("feaasReady",{bubbles:!0,composed:!0,detail:t})))},this.whenSDKReady=eG(e=>{this.sdk=e})}getProps(){return t_(this)}load(){return this.import(this.formatURL(this.props.src,this.props.frontend))}isReadyToLoad(){return super.isReadyToLoad()&&null!=this.props.library}getTheme(e){return e}getRoot(){return"false"===this.getAttribute("isolate")?this:this.shadowRoot||this.attachShadow({mode:"open"})}getReactRootElement(){return this.reactRootElement||(this.reactRootElement=document.createElement("div"),this.getRoot().appendChild(this.reactRootElement)),this.reactRootElement}connectedCallback(){this.setAttribute("feaas-role","ui"),Array.from(this.children).forEach(e=>{this.getRoot().appendChild(e)}),document.addEventListener("feaasMount",this),document.addEventListener("feaasUnmount",this),super.connectedCallback()}disconnectedCallback(){document.removeEventListener("feaasMount",this),document.removeEventListener("feaasUnmount",this),super.disconnectedCallback()}getPortalRoot(){return this.getRoot()}render({children:e,library:t},{AppContext:r,Chakra:{Button:n,Tooltip:i},React:a}){let o={containerRef:{current:this.getPortalRoot()}};return i.defaultProps={hasArrow:!0,placement:"top",portalProps:o},a.createElement(r,{environment:this.props.environment,backend:this.props.backend,libraryId:this.props.library,container:this.getRoot(),auth:this.props.auth,getTheme:this.getTheme,onStatusChange:this.onStatusChange,modalProps:{portalProps:o},chakraProps:{resetScope:':where([feaas-role="ui"])',cssVarsRoot:":host",resetCSS:!0,toastOptions:{portalProps:o}}},e)}};tI.observedAttributes=["library","component","version","revision","hostname","template"],tI.register("feaas-context"),tI.prototype.clientside=eY;var tU=class extends eQ{load(){return Promise.all([import("https://cdn.skypack.dev/react-dom/client")]).then(([e])=>({React:$.default,ReactDOM:z.default,ReactDOMClient:e}))}connectedCallback(){this._setAttribute||(this._setAttribute=this.setAttribute,this.setAttribute=function(e,t){let r=this.getAttribute(t);this._setAttribute(e,t),this.attributeChangedCallback(e,r,t)}),super.connectedCallback()}update(){var e;if(!(!(null!=(e=N(this.getComponentName()))&&e.component)&&"false"==this.getAttribute("hydrate")))return super.update()}render(e,{React:t}){var r;let n=null==(r=N(this.getComponentName()))?void 0:r.component;return n||console.warn(`FEAASExternal: \`${this.getComponentName()}\` is not registered`),t.createElement(t.Fragment,null,n&&t.createElement(n,{componentName:this.getComponentName(),...e}))}getComponentName(){return this.getAttribute("data-external-id")}getProps(){return k(t(Array.from(this.attributes).reduce((e,{name:t,value:r})=>("data-external-id"==t&&(t="component-name"),Object.assign(e,{[t]:r})),{}))).merged}static Preview(e){var t;let r=(null==e?void 0:e.src)||("u">typeof window?null==(t=window.location.search.match(/feaasSrc=([^&]+)/))?void 0:t[1]:null);return r?$.default.createElement(tY,{src:r,...e}):null}static linkComponents(e){return()=>e.map(e=>null)}};tU.registered=R,tU.registerComponent=j,tU.setRegistrationCallback=P,tU.getComponent=N,tU.register("feaas-external");var{linkComponents:tB}=tU,tH={};function tW(e){return null==e||!0===e?["template","stylesheet","data"]:[].concat(e||[])}var tz=e=>("src"in e&&(e=tn(e.src)),$.default.createElement("link",{rel:"stylesheet",href:tr(e)})),tJ=async({data:e,fetch:t,...r})=>{let n=await eJ.fetch(e||{});t=tW(null!=t?t:["stylesheet"]);let i={...r};if(("src"in r||"component"in r)&&(null==r?void 0:r.template)==null){let e=await ts(r);i.template=e.template,i.lastModified=e.lastModified}else(null==r?void 0:r.template)!=null||t.includes("template")||t.push("template");return tq({...i,data:e,fetch:t,fetchedData:n})};function tq({data:e,lastModified:t,fetchedData:r,renderNode:i,...a}){let o;"template"in a&&a.template&&(o=eH(a.template,r||e||{}).map((e,t)=>tV(e,(e,t)=>{if(i){let r=null==i?void 0:i(e,t);if(null!=r&&"type"in r)return[r.type,r.props];t={...t,...r}}if(tH[e.localName])return[tH[e.localName],t];if("feaas-external"==e.localName){let e={};for(var r in t)e["data-external-id"==r?"componentName":n(r)]=t[r];return[H,e]}},t))),"src"in a&&(a={...te(a.src),...a}
82);let s=tW(a.fetch),l=s.includes("data")?e:s.includes("template")?r||e:null;return $.default.createElement($.default.Fragment,null,"preload"in a&&!1,$.default.createElement("feaas-component",{class:"-feaas",...a,"last-modified":t?String(t):null,fetch:null==a.fetch?a.fetch:[].concat(a.fetch).join(" "),suppressHydrationWarning:!0,template:null,data:"string"==typeof l?l:l?JSON.stringify(l):null},o))}function tV(e,t,r){var i;if(3===e.nodeType)return e.textContent;let a=Array.from(e.childNodes).map((e,r)=>tV(e,t,r)),o={};for(let t=0;t<e.attributes.length;t++){let{name:r,value:i}=e.attributes[t];"style"==r?o[r]=String(i||"").trim().split(/\s*;\s*/).reduce((e,t)=>{let[r,i]=t.split(":");return{...e,[n(r)]:i}},{}):"class"==r?o.className=i:o[r]=i}let s=null==t?void 0:t(e,o),l=(null==s?void 0:s[0])||e.nodeName.toLowerCase();"style"==l&&(o.dangerouslySetInnerHTML={__html:a.join(` 83`)});let c=Object.assign({key:r,suppressHydrationWarning:!0},(null==s?void 0:s[1])||o),u=(null==(i=null==s?void 0:s[1])?void 0:i.children)||a;return $.default.createElement(l,c,["img","br","input","style"].includes(l)?null:u)}var tY=tq;e.s(["Component",0,tY,"ComponentProps",0,tv,"Context",0,tI,"ControlledPromise",0,eG,"DEFAULT_CDN_URL",0,e7,"DOM",0,V,"DataPath",0,eC,"DataScope",0,Y,"DataSettings",0,eJ,"Element",0,eQ,"External",0,tU,"ExternalComponent",0,H,"ExternalComponentBundle",0,function(){return $.default.createElement($.default.Fragment,null,$.default.createElement("byoc-registration",{components:JSON.stringify(Object.values(R)),datasources:JSON.stringify(Object.values(h)),suppressHydrationWarning:!0}),$.default.createElement(I,null))},"FEAASComponent",0,tE,"FEAASComponentsProps",0,tv,"FEAASContext",0,tI,"FEAASContextProps",0,t_,"FEAASEditor",0,tM,"FEAASEditorProps",0,tT,"FEAASElement",0,eQ,"FEAASExternalPropsObject",0,k,"FEAASLoader",0,tA,"FEAASLoaderProps",0,tC,"FEAASPicker",0,t$,"FEAASPickerProps",0,tL,"FEAASReactComponent",0,tq,"FEAASReactServerComponent",0,tJ,"FEAASReactStylesheet",0,tz,"FEAASStylesheet",0,tw,"FEAASStylesheetProps",0,tS,"HTMLNodeToReact",0,tV,"InvalidResponse",0,e5,"JSONPath",0,eu,"Loader",0,tA,"MyComponent",0,eX,"NextExternalComponent",0,B,"Picker",0,t$,"ReactExternalComponent",0,W,"ServerComponent",0,tJ,"Stylesheet",0,tz,"Thumbnail",0,tO,"WebComponent",0,eK,"adjustNumbers",0,eR,"autoloadScripts",0,ev,"cleanCollectionBit",0,eO,"clearFetchCache",0,e2,"createStylesheet",0,tf,"enableNextClientsideComponents",0,function(e,t){return U=e,I=t,t},"fetchAndRevalidate",0,e4,"fetchAndRevalidateComponent",0,to,"fetchAndRevalidateStylesheet",0,tl,"fetchBypassingCache",0,e9,"fetchCache",()=>e1,"fetchComponent",0,ts,"fetchData",0,eV,"fetchToValidateCache",0,e3,"fetchWithCacheAwareness",0,e8,"findStylesheet",0,tm,"getComponentSource",0,tt,"getComponentURL",0,ti,"getFetchCache",0,e6,"getFramePosition",0,tD,"getHumanizedLabel",0,ej,"getLastPathBit",0,eF,"getQualifier",0,ew,"getStylesheetSource",0,tr,"getStylesheetURL",0,ta,"linkComponents",0,tB,"loadScript",0,eE,"loadStylesheet",0,tp,"loadStylesheetAllowStale",0,th,"normalizeCollectionScope",0,ex,"normalizeFetchAttribute",0,tW,"observeDOMElement",0,ey,"parseComponentSource",0,te,"parseLimit",0,eA,"parseRange",0,eS,"parseStylesheetSource",0,tn,"queryObject",0,em,"queryObjectRaw",0,eh,"queryScopes",0,ef,"renderComponent",0,tb,"renderComponentElement",0,tg,"renderComponentPromise",0,ty,"renderDOMContent",0,eL,"renderDOMElement",0,eT,"renderHTMLContent",0,function(e,t,r){return eH(e,t,r)[0].outerHTML},"renderStylesheet",0,tc,"renderStylesheetPromise",0,tu,"serializeCH1RichText",0,eb,"setContextProperties",0,M,"setDOMAttribute",0,eP,"setElementImplementation",0,function(e,t){tH[e]=t}],936848)},233309,(e,t,r)=>{"use strict";t.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(i of t.entries())if(!r.has(i[0]))return!1;for(i of t.entries())if(!e(i[1],r.get(i[0])))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(i of t.entries())if(!r.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(r)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(t[i]!==r[i])return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(a=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,a[i]))return!1;for(i=n;0!=i--;){var n,i,a,o=a[i];if(("_owner"!==o||!t.$$typeof)&&!e(t[o],r[o]))return!1}return!0}return t!=t&&r!=r}}]);
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.