@sitecore-feaas/clientside 0.6.3-alpha.14 → 0.6.3-alpha.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/ui/react.js CHANGED
@@ -70,6 +70,7 @@ export const FEAASReactServerComponent = async ({ data, fetch, ...props }) => {
70
70
  */
71
71
  export function FEAASReactComponent({ data, lastModified, fetchedData, renderNode, ...props }) {
72
72
  console.log('=== FEAASReactComponent', data, props);
73
+ console.log('parse html content', parseHTMLContent(props.template, fetchedData || data || {}));
73
74
  let preload = null;
74
75
  let children;
75
76
  if ('template' in props && props.template) {
@@ -148,6 +149,8 @@ export function HTMLNodeToReact(node, callback, key) {
148
149
  attributes[name] = value;
149
150
  }
150
151
  }
152
+ if (node.nodeType === 1)
153
+ attributes['hidden'] = node.hidden;
151
154
  const reactNode = callback === null || callback === void 0 ? void 0 : callback(node, attributes);
152
155
  const reactName = (reactNode === null || reactNode === void 0 ? void 0 : reactNode[0]) || node.nodeName.toLowerCase();
153
156
  if (reactName == 'style') {
@@ -1 +1 @@
1
- {"version":3,"file":"react.js","sourceRoot":"","sources":["../../src/ui/react.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,sBAAsB,CAAA;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAY,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EAIL,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,YAAY,CAAA;AACnB,cAAc,gBAAgB,CAAA;AAC9B,OAAO,EAAE,QAAQ,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACvF,cAAc,YAAY,CAAA;AAC1B,OAAO,EAAE,iBAAiB,EAAE,CAAA;AAE5B,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GAAG,CAAC,YAAY,EAAE,UAAU,CAAC,CAAA;IACrC,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,eAAe,CAAC,CAAA;IAChD,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAA;IAChC,MAAM,aAAa,GAAG,CAAA,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAG,CAAC,CAAC,0CAAE,QAAQ,KAAI,QAAQ,CAAA;IAC1D,OAAO,KAAK,CAAC,aAAa,CACxB,SAAS,EACT,eAAe,EACf,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,aAAa,CAC3E,CAAA;AACH,CAAC;AAID,MAAM,CAAC,MAAM,8BAA8B,GAAG,IAAI,CAAC,8BAA8B,CAAA;AACjF,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC,oBAAoB,CAAA;AAC7D,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAC,MAAM,CAAA;AAClD,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,SAAS,CAAA;AAC/C,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC,gBAAgB,CAAA;AAC3D,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC,aAAa,CAAA;AACvD,MAAM,CAAC,MAAM,SAAS,GAAG,mBAAmB,CAAA;AAC5C,MAAM,CAAC,MAAM,eAAe,GAAG,yBAAyB,CAAA;AACxD,MAAM,CAAC,MAAM,UAAU,GAAG,oBAAoB,CAAA"}
@@ -1,10 +1,10 @@
1
- var ur=Object.create;var Bt=Object.defineProperty;var hr=Object.getOwnPropertyDescriptor;var pr=Object.getOwnPropertyNames;var fr=Object.getPrototypeOf,mr=Object.prototype.hasOwnProperty;var it=(t,e)=>{for(var r in e)Bt(t,r,{get:e[r],enumerable:!0})},Te=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of pr(e))!mr.call(t,i)&&i!==r&&Bt(t,i,{get:()=>e[i],enumerable:!(n=hr(e,i))||n.enumerable});return t};var xt=(t,e,r)=>(r=t!=null?ur(fr(t)):{},Te(e||!t||!t.__esModule?Bt(r,"default",{value:t,enumerable:!0}):r,t)),vr=t=>Te(Bt({},"__esModule",{value:!0}),t);var Gr={};it(Gr,{Component:()=>Fe,ComponentProps:()=>ve,Context:()=>X,ControlledPromise:()=>O,DEFAULT_CDN_URL:()=>M,DOM:()=>Dt,DataPath:()=>Ot,DataScope:()=>_t,DataSettings:()=>x,Element:()=>E,External:()=>$,ExternalComponent:()=>zr,ExternalComponentBundle:()=>Hr,FEAASComponent:()=>ft,FEAASComponentsProps:()=>ve,FEAASContext:()=>X,FEAASContextProps:()=>we,FEAASEditor:()=>vt,FEAASEditorProps:()=>Ee,FEAASElement:()=>E,FEAASExternalPropsObject:()=>_e,FEAASLoader:()=>mt,FEAASLoaderProps:()=>ge,FEAASPicker:()=>gt,FEAASPickerProps:()=>xe,FEAASReactComponent:()=>Ne,FEAASReactServerComponent:()=>cr,FEAASReactStylesheet:()=>lr,FEAASStylesheet:()=>Lt,FEAASStylesheetProps:()=>ye,HTMLNodeToReact:()=>ke,InvalidResponse:()=>kt,JSONPath:()=>v,Loader:()=>mt,MyComponent:()=>Nt,NextExternalComponent:()=>Jr,Picker:()=>gt,ReactExternalComponent:()=>Vr,ServerComponent:()=>Yr,Stylesheet:()=>qr,Thumbnail:()=>$t,WebComponent:()=>de,adjustNumbers:()=>ie,autoloadScripts:()=>te,cleanCollectionBit:()=>at,clearFetchCache:()=>Xe,createStylesheet:()=>fe,customizeDataSettings:()=>k.customizeDataSettings,enableNextClientsideComponents:()=>Ur,fetchAndRevalidate:()=>ut,fetchAndRevalidateComponent:()=>rt,fetchAndRevalidateStylesheet:()=>Tt,fetchBypassingCache:()=>Pt,fetchCache:()=>dt,fetchComponent:()=>Vt,fetchData:()=>Ht,fetchToValidateCache:()=>ht,fetchWithCacheAwareness:()=>q,findStylesheet:()=>pe,getComponent:()=>k.getComponent,getComponentSource:()=>Qe,getComponentURL:()=>pt,getFetchCache:()=>ue,getFramePosition:()=>Ce,getHumanizedLabel:()=>oe,getLastPathBit:()=>se,getQualifier:()=>ne,getStylesheetSource:()=>zt,getStylesheetURL:()=>K,linkComponents:()=>ar,loadScript:()=>st,loadStylesheet:()=>Mt,loadStylesheetAllowStale:()=>Jt,normalizeCollectionScope:()=>Ft,normalizeFetchAttribute:()=>De,observeDOMElement:()=>Zt,parseComponentSource:()=>G,parseLimit:()=>ee,parseRange:()=>re,parseStylesheetSource:()=>W,queryObject:()=>et,queryObjectRaw:()=>Ut,queryScopes:()=>ot,registerComponent:()=>k.registerComponent,registerDatasource:()=>k.registerDatasource,renderComponent:()=>Yt,renderComponentElement:()=>tr,renderComponentPromise:()=>me,renderDOMContent:()=>J,renderDOMElement:()=>S,renderHTMLContent:()=>Ye,renderStylesheet:()=>Ze,renderStylesheetPromise:()=>he,serializeCH1RichText:()=>V,setContextProperties:()=>Wr,setDOMAttribute:()=>U,setElementImplementation:()=>Br});module.exports=vr(Gr);var w=xt(require("@sitecore/byoc/react"),1),j=xt(require("react"),1);var Dt={};it(Dt,{renderDOMContent:()=>J,renderDOMElement:()=>S,renderHTMLContent:()=>Ve,setDOMAttribute:()=>U});var _t={};it(_t,{JSONPath:()=>v,queryObject:()=>et,queryObjectRaw:()=>Ut,queryScopes:()=>ot,serializeCH1RichText:()=>V});function L(t){return L=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(t)}function Le(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Me(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function $e(t,e,r){return e&&Me(t.prototype,e),r&&Me(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function gr(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Rt(t,e)}function St(t){return St=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},St(t)}function Rt(t,e){return Rt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Rt(t,e)}function je(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function wt(t,e,r){return je()?wt=Reflect.construct.bind():wt=function(i,o,s){var a=[null];a.push.apply(a,o);var l=Function.bind.apply(i,a),c=new l;return s&&Rt(c,s.prototype),c},wt.apply(null,arguments)}function yr(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function Gt(t){var e=typeof Map=="function"?new Map:void 0;return Gt=function(n){if(n===null||!yr(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(n))return e.get(n);e.set(n,i)}function i(){return wt(n,arguments,St(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Rt(i,n)},Gt(t)}function br(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ar(t,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return br(t)}function Cr(t){var e=je();return function(){var n=St(t),i;if(e){var o=St(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Ar(this,i)}}function Er(t){return xr(t)||wr(t)||Ie(t)||Sr()}function xr(t){if(Array.isArray(t))return Kt(t)}function wr(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Ie(t,e){if(t){if(typeof t=="string")return Kt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Kt(t,e)}}function Kt(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Sr(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1
+ var ur=Object.create;var Bt=Object.defineProperty;var hr=Object.getOwnPropertyDescriptor;var pr=Object.getOwnPropertyNames;var fr=Object.getPrototypeOf,mr=Object.prototype.hasOwnProperty;var it=(t,e)=>{for(var r in e)Bt(t,r,{get:e[r],enumerable:!0})},Te=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of pr(e))!mr.call(t,i)&&i!==r&&Bt(t,i,{get:()=>e[i],enumerable:!(n=hr(e,i))||n.enumerable});return t};var xt=(t,e,r)=>(r=t!=null?ur(fr(t)):{},Te(e||!t||!t.__esModule?Bt(r,"default",{value:t,enumerable:!0}):r,t)),vr=t=>Te(Bt({},"__esModule",{value:!0}),t);var Gr={};it(Gr,{Component:()=>Fe,ComponentProps:()=>ve,Context:()=>X,ControlledPromise:()=>O,DEFAULT_CDN_URL:()=>M,DOM:()=>Dt,DataPath:()=>Ot,DataScope:()=>_t,DataSettings:()=>x,Element:()=>E,External:()=>$,ExternalComponent:()=>zr,ExternalComponentBundle:()=>Hr,FEAASComponent:()=>ft,FEAASComponentsProps:()=>ve,FEAASContext:()=>X,FEAASContextProps:()=>we,FEAASEditor:()=>vt,FEAASEditorProps:()=>Ee,FEAASElement:()=>E,FEAASExternalPropsObject:()=>_e,FEAASLoader:()=>mt,FEAASLoaderProps:()=>ge,FEAASPicker:()=>gt,FEAASPickerProps:()=>xe,FEAASReactComponent:()=>Ne,FEAASReactServerComponent:()=>cr,FEAASReactStylesheet:()=>lr,FEAASStylesheet:()=>Lt,FEAASStylesheetProps:()=>ye,HTMLNodeToReact:()=>ke,InvalidResponse:()=>kt,JSONPath:()=>v,Loader:()=>mt,MyComponent:()=>Nt,NextExternalComponent:()=>Jr,Picker:()=>gt,ReactExternalComponent:()=>Vr,ServerComponent:()=>Yr,Stylesheet:()=>qr,Thumbnail:()=>$t,WebComponent:()=>de,adjustNumbers:()=>oe,autoloadScripts:()=>ee,cleanCollectionBit:()=>at,clearFetchCache:()=>Xe,createStylesheet:()=>fe,customizeDataSettings:()=>k.customizeDataSettings,enableNextClientsideComponents:()=>Ur,fetchAndRevalidate:()=>ut,fetchAndRevalidateComponent:()=>rt,fetchAndRevalidateStylesheet:()=>Tt,fetchBypassingCache:()=>Pt,fetchCache:()=>dt,fetchComponent:()=>Jt,fetchData:()=>zt,fetchToValidateCache:()=>ht,fetchWithCacheAwareness:()=>q,findStylesheet:()=>pe,getComponent:()=>k.getComponent,getComponentSource:()=>Qe,getComponentURL:()=>pt,getFetchCache:()=>ue,getFramePosition:()=>Ce,getHumanizedLabel:()=>se,getLastPathBit:()=>ae,getQualifier:()=>ie,getStylesheetSource:()=>Vt,getStylesheetURL:()=>K,linkComponents:()=>ar,loadScript:()=>st,loadStylesheet:()=>Mt,loadStylesheetAllowStale:()=>Yt,normalizeCollectionScope:()=>Ft,normalizeFetchAttribute:()=>De,observeDOMElement:()=>te,parseComponentSource:()=>G,parseLimit:()=>re,parseRange:()=>ne,parseStylesheetSource:()=>W,queryObject:()=>et,queryObjectRaw:()=>Ut,queryScopes:()=>ot,registerComponent:()=>k.registerComponent,registerDatasource:()=>k.registerDatasource,renderComponent:()=>qt,renderComponentElement:()=>tr,renderComponentPromise:()=>me,renderDOMContent:()=>J,renderDOMElement:()=>S,renderHTMLContent:()=>Ye,renderStylesheet:()=>Ze,renderStylesheetPromise:()=>he,serializeCH1RichText:()=>V,setContextProperties:()=>Wr,setDOMAttribute:()=>U,setElementImplementation:()=>Br});module.exports=vr(Gr);var w=xt(require("@sitecore/byoc/react"),1),j=xt(require("react"),1);var Dt={};it(Dt,{renderDOMContent:()=>J,renderDOMElement:()=>S,renderHTMLContent:()=>Ve,setDOMAttribute:()=>U});var _t={};it(_t,{JSONPath:()=>v,queryObject:()=>et,queryObjectRaw:()=>Ut,queryScopes:()=>ot,serializeCH1RichText:()=>V});function L(t){return L=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(t)}function Le(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Me(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function $e(t,e,r){return e&&Me(t.prototype,e),r&&Me(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function gr(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Rt(t,e)}function St(t){return St=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},St(t)}function Rt(t,e){return Rt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Rt(t,e)}function je(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function wt(t,e,r){return je()?wt=Reflect.construct.bind():wt=function(i,o,s){var a=[null];a.push.apply(a,o);var l=Function.bind.apply(i,a),c=new l;return s&&Rt(c,s.prototype),c},wt.apply(null,arguments)}function yr(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function Kt(t){var e=typeof Map=="function"?new Map:void 0;return Kt=function(n){if(n===null||!yr(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(n))return e.get(n);e.set(n,i)}function i(){return wt(n,arguments,St(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Rt(i,n)},Kt(t)}function br(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ar(t,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return br(t)}function Cr(t){var e=je();return function(){var n=St(t),i;if(e){var o=St(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Ar(this,i)}}function Er(t){return xr(t)||wr(t)||Ie(t)||Sr()}function xr(t){if(Array.isArray(t))return Xt(t)}function wr(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Ie(t,e){if(t){if(typeof t=="string")return Xt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Xt(t,e)}}function Xt(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Sr(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rr(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Ie(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
3
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){r=r.call(t)},n:function(){var l=r.next();return o=l.done,l},e:function(l){s=!0,a=l},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(s)throw a}}}}var F=Object.prototype.hasOwnProperty;function tt(t,e){return t=t.slice(),t.push(e),t}function Xt(t,e){return e=e.slice(),e.unshift(t),e}var _r=function(t){gr(r,t);var e=Cr(r);function r(n){var i;return Le(this,r),i=e.call(this,'JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)'),i.avoidNew=!0,i.value=n,i.name="NewError",i}return $e(r)}(Gt(Error));function v(t,e,r,n,i){if(!(this instanceof v))try{return new v(t,e,r,n,i)}catch(l){if(!l.avoidNew)throw l;return l.value}typeof t=="string"&&(i=n,n=r,r=e,e=t,t=null);var o=t&&L(t)==="object";if(t=t||{},this.json=t.json||r,this.path=t.path||e,this.resultType=t.resultType||"value",this.flatten=t.flatten||!1,this.wrap=F.call(t,"wrap")?t.wrap:!0,this.sandbox=t.sandbox||{},this.preventEval=t.preventEval||!1,this.parent=t.parent||null,this.parentProperty=t.parentProperty||null,this.callback=t.callback||n||null,this.otherTypeCallback=t.otherTypeCallback||i||function(){throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")},t.autostart!==!1){var s={path:o?t.path:e};o?"json"in t&&(s.json=t.json):s.json=r;var a=this.evaluate(s);if(!a||L(a)!=="object")throw new _r(a);return a}}v.prototype.evaluate=function(t,e,r,n){var i=this,o=this.parent,s=this.parentProperty,a=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,e=e||this.json,t=t||this.path,t&&L(t)==="object"&&!Array.isArray(t)){if(!t.path&&t.path!=="")throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');if(!F.call(t,"json"))throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');var c=t;e=c.json,a=F.call(t,"flatten")?t.flatten:a,this.currResultType=F.call(t,"resultType")?t.resultType:this.currResultType,this.currSandbox=F.call(t,"sandbox")?t.sandbox:this.currSandbox,l=F.call(t,"wrap")?t.wrap:l,this.currPreventEval=F.call(t,"preventEval")?t.preventEval:this.currPreventEval,r=F.call(t,"callback")?t.callback:r,this.currOtherTypeCallback=F.call(t,"otherTypeCallback")?t.otherTypeCallback:this.currOtherTypeCallback,o=F.call(t,"parent")?t.parent:o,s=F.call(t,"parentProperty")?t.parentProperty:s,t=t.path}if(o=o||null,s=s||null,Array.isArray(t)&&(t=v.toPathString(t)),!(!t&&t!==""||!e)){var d=v.toPathArray(t);d[0]==="$"&&d.length>1&&d.shift(),this._hasParentSelector=null;var u=this._trace(d,e,["$"],o,s,r).filter(function(h){return h&&!h.isParentSelector});return u.length?!l&&u.length===1&&!u[0].hasArrExpr?this._getPreferredOutput(u[0]):u.reduce(function(h,p){var f=i._getPreferredOutput(p);return a&&Array.isArray(f)?h=h.concat(f):h.push(f),h},[]):l?[]:void 0}};v.prototype._getPreferredOutput=function(t){var e=this.currResultType;switch(e){case"all":{var r=Array.isArray(t.path)?t.path:v.toPathArray(t.path);return t.pointer=v.toPointer(r),t.path=typeof t.path=="string"?t.path:v.toPathString(t.path),t}case"value":case"parent":case"parentProperty":return t[e];case"path":return v.toPathString(t[e]);case"pointer":return v.toPointer(t.path);default:throw new TypeError("Unknown result type")}};v.prototype._handleCallback=function(t,e,r){if(e){var n=this._getPreferredOutput(t);t.path=typeof t.path=="string"?t.path:v.toPathString(t.path),e(n,r,t)}};v.prototype._trace=function(t,e,r,n,i,o,s,a){var l=this,c;if(!t.length)return c={path:r,value:e,parent:n,parentProperty:i,hasArrExpr:s},this._handleCallback(c,o,"value"),c;var d=t[0],u=t.slice(1),h=[];function p(A){Array.isArray(A)?A.forEach(function(y){h.push(y)}):h.push(A)}if((typeof d!="string"||a)&&e&&F.call(e,d))p(this._trace(u,e[d],tt(r,d),e,d,o,s));else if(d==="*")this._walk(e,function(A){p(l._trace(u,e[A],tt(r,A),e,A,o,!0,!0))});else if(d==="..")p(this._trace(u,e,r,n,i,o,s)),this._walk(e,function(A){L(e[A])==="object"&&p(l._trace(t.slice(),e[A],tt(r,A),e,A,o,!0))});else{if(d==="^")return this._hasParentSelector=!0,{path:r.slice(0,-1),expr:u,isParentSelector:!0};if(d==="~")return c={path:tt(r,d),value:i,parent:n,parentProperty:null},this._handleCallback(c,o,"property"),c;if(d==="$")p(this._trace(u,e,r,null,null,o,s));else if(/^(\x2D?[0-9]*):(\x2D?[0-9]*):?([0-9]*)$/.test(d))p(this._slice(d,u,e,r,n,i,o));else if(d.indexOf("?(")===0){if(this.currPreventEval)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");var f=d.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(e,function(A){l._eval(f,e[A],A,r,n,i)&&p(l._trace(u,e[A],tt(r,A),e,A,o,!0))})}else if(d[0]==="("){if(this.currPreventEval)throw new Error("Eval [(expr)] prevented in JSONPath expression.");p(this._trace(Xt(this._eval(d,e,r[r.length-1],r.slice(0,-1),n,i),u),e,r,n,i,o,s))}else if(d[0]==="@"){var m=!1,g=d.slice(1,-2);switch(g){case"scalar":(!e||!["object","function"].includes(L(e)))&&(m=!0);break;case"boolean":case"string":case"undefined":case"function":L(e)===g&&(m=!0);break;case"integer":Number.isFinite(e)&&!(e%1)&&(m=!0);break;case"number":Number.isFinite(e)&&(m=!0);break;case"nonFinite":typeof e=="number"&&!Number.isFinite(e)&&(m=!0);break;case"object":e&&L(e)===g&&(m=!0);break;case"array":Array.isArray(e)&&(m=!0);break;case"other":m=this.currOtherTypeCallback(e,r,n,i);break;case"null":e===null&&(m=!0);break;default:throw new TypeError("Unknown value type "+g)}if(m)return c={path:r,value:e,parent:n,parentProperty:i},this._handleCallback(c,o,"value"),c}else if(d[0]==="`"&&e&&F.call(e,d.slice(1))){var b=d.slice(1);p(this._trace(u,e[b],tt(r,b),e,b,o,s,!0))}else if(d.includes(",")){var N=d.split(","),I=Rr(N),nt;try{for(I.s();!(nt=I.n()).done;){var jt=nt.value;p(this._trace(Xt(jt,u),e,r,n,i,o,!0))}}catch(A){I.e(A)}finally{I.f()}}else!a&&e&&F.call(e,d)&&p(this._trace(u,e[d],tt(r,d),e,d,o,s,!0))}if(this._hasParentSelector)for(var P=0;P<h.length;P++){var H=h[P];if(H&&H.isParentSelector){var R=this._trace(H.expr,e,H.path,n,i,o,s);if(Array.isArray(R)){h[P]=R[0];for(var yt=R.length,Q=1;Q<yt;Q++)P++,h.splice(P,0,R[Q])}else h[P]=R}}return h};v.prototype._walk=function(t,e){if(Array.isArray(t))for(var r=t.length,n=0;n<r;n++)e(n);else t&&L(t)==="object"&&Object.keys(t).forEach(function(i){e(i)})};v.prototype._slice=function(t,e,r,n,i,o,s){if(Array.isArray(r)){var a=r.length,l=t.split(":"),c=l[2]&&Number.parseInt(l[2])||1,d=l[0]&&Number.parseInt(l[0])||0,u=l[1]&&Number.parseInt(l[1])||a;d=d<0?Math.max(0,d+a):Math.min(a,d),u=u<0?Math.max(0,u+a):Math.min(a,u);for(var h=[],p=d;p<u;p+=c){var f=this._trace(Xt(p,e),r,n,i,o,s,!0);f.forEach(function(m){h.push(m)})}return h}};v.prototype._eval=function(t,e,r,n,i,o){this.currSandbox._$_parentProperty=o,this.currSandbox._$_parent=i,this.currSandbox._$_property=r,this.currSandbox._$_root=this.json,this.currSandbox._$_v=e;var s=t.includes("@path");s&&(this.currSandbox._$_path=v.toPathString(n.concat([r])));var a="script:"+t;if(!v.cache[a]){var l=t.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");s&&(l=l.replace(/@path/g,"_$_path")),v.cache[a]=new this.vm.Script(l)}try{return v.cache[a].runInNewContext(this.currSandbox)}catch(c){throw new Error("jsonPath: "+c.message+": "+t)}};v.cache={};v.toPathString=function(t){for(var e=t,r=e.length,n="$",i=1;i<r;i++)/^(~|\^|@(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\(\))$/.test(e[i])||(n+=/^[\*0-9]+$/.test(e[i])?"["+e[i]+"]":"['"+e[i]+"']");return n};v.toPointer=function(t){for(var e=t,r=e.length,n="",i=1;i<r;i++)/^(~|\^|@(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\(\))$/.test(e[i])||(n+="/"+e[i].toString().replace(/~/g,"~0").replace(/\//g,"~1"));return n};v.toPathArray=function(t){var e=v.cache;if(e[t])return e[t].concat();var r=[],n=t.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(o,s){return"[#"+(r.push(s)-1)+"]"}).replace(/\[["']((?:(?!['\]])[\s\S])*)["']\]/g,function(o,s){return"['"+s.replace(/\./g,"%@%").replace(/~/g,"%%@@%%")+"']"}).replace(/~/g,";~;").replace(/["']?\.["']?(?!(?:(?!\[)[\s\S])*\])|\[["']?/g,";").replace(/%@%/g,".").replace(/%%@@%%/g,"~").replace(/(?:;)?(\^+)(?:;)?/g,function(o,s){return";"+s.split("").join(";")+";"}).replace(/;;;|;;/g,";..;").replace(/;$|'?\]|'$/g,""),i=n.split(";").map(function(o){var s=o.match(/#([0-9]+)/);return!s||!s[1]?o:r[s[1]]});return e[t]=i,e[t].concat()};var Fr=function(e,r,n){for(var i=e.length,o=0;o<i;o++){var s=e[o];n(s)&&r.push(e.splice(o--,1)[0])}},Or=function(){function t(e){Le(this,t),this.code=e}return $e(t,[{key:"runInNewContext",value:function(r){var n=this.code,i=Object.keys(r),o=[];Fr(i,o,function(d){return typeof r[d]=="function"});var s=i.map(function(d,u){return r[d]}),a=o.reduce(function(d,u){var h=r[u].toString();return/function/.test(h)||(h="function "+h),"var "+u+"="+h+";"+d},"");n=a+n,!/(["'])use strict\1/.test(n)&&!i.includes("arguments")&&(n="var arguments = undefined;"+n),n=n.replace(/;[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*$/,"");var l=n.lastIndexOf(";"),c=l>-1?n.slice(0,l+1)+" return "+n.slice(l+1):" return "+n;return wt(Function,i.concat([c])).apply(void 0,Er(s))}}]),t}();v.prototype.vm={Script:Or};function Ut(t,e){try{return v({path:e,json:t})}catch(r){return[]}}function et(t,e,r=!0){let n=Ut(t,e)||[];return r?n.flat(1/0):n}function ot(t,e,r=!1,n=t,i=!0){var o=e;let s=Object.keys(t).sort((l,c)=>c.length-l.length);for(let l of s)if(e.startsWith(l)){if(l==e){if(r)return t[l];continue}o=e.substring(l.length+1),n=t[l];break}var a=et(n,o,i);return a.length==0&&(a=[o.replace(/^.*?\./,"_."),o.replace(/^.*?\./,""),o.replace(/^([^.]+).*?\.\$([\.\[])/,"$1$2"),o.replace(/^.*?\.\$([\.\[])/,"_$1"),o.replace(/^.*?\.\$([\.\[])/,"$$$1"),o.replace(/^[^.]+$/,"_")].filter((l,c,d)=>d.indexOf(l)===c).reduce((l,c)=>l.length>0?l:et(n,c,i),[])),r?a[0]:a}function Qt(t,e={},r){return r?`<${r}${Object.entries(e).map(([n,i])=>i!=null&&` ${n}="${i}"`).filter(Boolean).join("")}>${V(t)}</${r}>`.replace(/^<([a-z0-9][^>]*)><\/[^>]+>$/,"<$1 />"):V(t)}function V(t){var e;if(Array.isArray(t))return t.map(V).join(`
4
- `).trim();if(typeof t=="string")return t;if(t==null)return"";switch(t.type){case"heading":let{level:r,...n}=t.attrs;return Qt(t.content,n,"h"+r);case"text":return(t.marks||[]).reduce((i,o)=>Qt(i,o.attrs,{link:"a",bold:"strong",italic:"em",strike:"s",underline:"u"}[o.type]),(e=t.text)===null||e===void 0?void 0:e.replace(/\s+/," "));default:return Qt(t.content||t.text,t.attrs,{bulletList:"ul",orderedList:"ol",listItem:"li",horizontalRule:"hr",paragraph:"p",codeBlock:"code",blockquote:"blockquote"}[t.type])}}function Zt(t){let e=new t.ownerDocument.defaultView.MutationObserver(r=>{r.forEach(n=>{let i=n.target,o=i.getAttribute("data-embed-src");o&&st(i,o),n.addedNodes&&n.addedNodes.forEach(s=>{s.nodeType==1&&te(s,!1)})})});return e.observe(t,{attributes:!0,subtree:!0,childList:!0}),e}function te(t,e=!0){let r=t.querySelectorAll("[data-embed-src]");for(var n=0;n<r.length;n++){let i=r[n];st(i,i.getAttribute("data-embed-src"))}if(e)return Zt(t)}function st(t,e){for(var r=t;r;r=r.parentElement)if(!r.parentElement){let i=r.querySelectorAll("script");for(var n=0;n<i.length;n++)if(i[n].getAttribute("src")==e)return!0;r.tagName=="HTML"&&(r=r.querySelector("head")||r);let o=r.ownerDocument.createElement("script");o.setAttribute("type","module"),o.setAttribute("src",e),r.appendChild(o);break}}var Ot={};it(Ot,{adjustNumbers:()=>ie,cleanCollectionBit:()=>at,getHumanizedLabel:()=>oe,getLastPathBit:()=>se,getQualifier:()=>ne,normalizeCollectionScope:()=>Ft,parseLimit:()=>ee,parseRange:()=>re});var ee=t=>{var e;let r=parseInt((e=t==null?void 0:t.match(/\[0:(\d+)\]/))===null||e===void 0?void 0:e[1],10);return!isNaN(r)&&r>0?String(r):null},re=t=>{var e;let r=(e=t==null?void 0:t.match(/\[([^\]]+)\]/))===null||e===void 0?void 0:e[1].split(/\s*,\s*/g).filter(Boolean).map(n=>{if(n.match(/^-?\d+$/))return n;let i=n.match(/^(\d+):(\d+)$/);return i&&parseInt(i[1],10)<parseInt(i[2],10)?i[1]+"-"+i[2]:null});return r!=null&&r.every(Boolean)?r.join(","):null},ne=t=>{var e;return(e=t==null?void 0:t.match(/(\.\*|\[[^\]]*\])$/))===null||e===void 0?void 0:e[0]};function at(t){return t.replace(/(\.?\[[^\]\[]*\]|\.\*)$/g,"")}function Ft(t){return at(t)+".*"}function ie(t,e){return t==null?void 0:t.replace(/(.|^)(\d+)/g,(r,n,i)=>n+(n==":"?i:String(parseInt(i)+e)))}function oe(t,e=2){var r=at(t).split(/]\.|\.\*\./g).pop().split(/\./g).slice(-3);return r=r.filter(n=>isNaN(parseInt(n))),r.map(n=>n.charAt(0).toUpperCase()+n.slice(1)).slice(-e).join(" ")}function se(t){return at(t).split(".").pop()}var Dr=["January","February","March","April","May","June","July","August","September","October","November","December"],Be=t=>{if(!t||typeof t.getDay!="function")return;let e=t.getFullYear(),r=Dr[t.getMonth()],n=t.getDate();return`${r} ${n}, ${e}`},Ue=function(t){return String(new Date(t))!=="Invalid Date"&&!isNaN(Number(new Date(t)))};function He(t){let e=t.getAttribute("data-path-scope");for(var r=0,n=t;n=n.previousElementSibling;)n.getAttribute("data-path-scope")==e&&r++;return r}function Nr(t,e,r){let n=t.getAttribute("data-path-scope");if(n==null)return;var i=He(t);if(i!=0)return;let o=t.parentNode;if(o!=null){e==0?t.setAttribute("hidden","hidden"):t.getAttribute("hidden")!=null&&t.removeAttribute("hidden");for(var s=i+1,a=t,l=t;l=l.nextElementSibling;)l.getAttribute("data-path-scope")==n&&(s++,a=l);for(var c=s;c<e;c++)o.insertBefore(a.cloneNode(!0),a.nextElementSibling);for(var c=Math.max(1,e);c<s;c++)a=a.previousElementSibling,o.removeChild(a.nextElementSibling)}}function U(t,e,r,n,i=!0){var o,s,a;if(!t)return;var l=t;(r==null?void 0:r.type)=="doc"&&Array.isArray(r.content)&&(r=V(r)),n!=null&&n.processValue&&(r=n==null?void 0:n.processValue(t,e,r));var c=e.replace("data-path-","");if(e=="data-path-src"||e=="data-path-alt"){let b=Array.from(t.children).find(N=>N.localName=="picture")||t;l=t.localName=="img"?t:b.querySelector("img, video")}else if(e=="data-path-href")l=t.querySelector("a")||t.closest("a");else if(e=="data-path-hidden")r=r?null:!0;else if(e=="data-path"||e=="data-embed-html"||e=="html")c="innerHTML";else if(e=="data-embed-src"&&i)st(t,r);else if(e=="data-path-attributes"){if(!Array.isArray(r)){let b=((o=t.getAttribute("data-attributes-keys"))===null||o===void 0?void 0:o.split(",").filter(Boolean))||[];if(!Array.isArray(r))for(var d in r){var u=r[d];U(t,d,typeof u=="object"&&u?JSON.stringify(u):u,n,i)}for(var h=0;h<b.length;h++)(r==null||!(b[h]in r))&&U(t,b[h],null,n,i);U(t,"data-attributes-keys",Object.keys(r||{}).join(","),{},i)}if(t.tagName=="FEAAS-EXTERNAL"){let b=String(t.getAttribute("data-path-attributes")||"").slice(0,-1).split(".")[0]||"_";U(t,"datasources",JSON.stringify({[b]:r}),{},i)}return}if(typeof r=="boolean"&&(r=r?"":null),!l)return;if((c=="innerHTML"||c=="src")&&(r==null||r==="")){var f=String((a=(s=t.getAttribute("data-path-placeholder")||l[c])!==null&&s!==void 0?s:l.getAttribute(c))!==null&&a!==void 0?a:"");c=="innerHTML"?l.innerHTML=f:f?l.setAttribute(c,f):l.removeAttribute(c)}else if(r!=null)if(c=="innerHTML"){for(var m=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/)&&(m=m.replace(/<(p|h\d|li|ul)[^>]*?>|<\/(p|h\d|li|ul)[^>]*?>/g," ").trim().replace(/\s+/g," ")),String(g.getAttribute("class")).includes("-inline--time")&&Ue(m)&&(m=Be(new Date(m))),l.innerHTML!=m&&(l.innerHTML=m)}else l.getAttribute(c)!=r&&(c==="hidden"?(console.log("in here?..."),l[c]=!0):l.setAttribute(c,r));else l.removeAttribute(c)}var We=["data-attributes-keys","data-path-attributes","data-path-scope"];function S(t,e,r,n,i=!0){var o,s,a;let l=t;if(n||(e=((o=r==null?void 0:r.processData)===null||o===void 0?void 0:o.call(r,l,e))||e),l.nodeType==1){let u=l.getAttribute("data-path-scope");if(u){let p=He(l),f=ot(e,u,!1);p==0&&Nr(l,((s=r==null?void 0:r.shouldRepeat)===null||s===void 0?void 0:s.call(r,l,f))===!1?1:f.length,r),e={...e,[Ft(u)]:f[p]}}let h=Array.prototype.slice.call(l.attributes).sort((p,f)=>We.indexOf(p.name)-We.indexOf(f.name));for(var c=0;c<h.length;c++){let{name:p,value:f}=h[c];p.startsWith("data-path")&&p!="data-path-scope"&&U(l,p,ot(e,f,!0,void 0,l.tagName!="FEAAS-EXTERNAL"),r,i),p=="data-embed-src"&&U(l,p,l.getAttribute(p),r,i)}}for(var c=0,d;d=l.childNodes[c++];)ze(d)&&S(d,e,r,!0,i);return n||(a=r==null?void 0:r.onRender)===null||a===void 0||a.call(r,l,e),l}function ze(t){return t.nodeType==1}function J(t,e,r,n,i=!0){var o;let s=((o=n==null?void 0:n.processTemplate)===null||o===void 0?void 0:o.call(n,t,e,r))||e;if(t.innerHTML=s,t.classList.add("-feaas"),(t.closest(".component.feaas")||t).className.includes("-theme--"))for(var l=0,c;c=t.childNodes[l++];)ze(c)&&(c.className=c.className.replace(/(\s|^)-theme--[^\s]+\s*/g,"$1"));return S(t,r,n,null,i)}function Ve(t,e,r,n=!1,i=!0){var o;let s=((o=r==null?void 0:r.processTemplate)===null||o===void 0?void 0:o.call(r,null,t,e))||t;if(typeof document=="undefined"||n){let a=Wt(s);return S(a[0],e,r,null,i).outerHTML}else{let a=document.createElement("div");return a.innerHTML=s,S(a,e,r,null,i),a.innerHTML}}var Y=class{constructor(e,r=1,n){this.ownerDocument={createElement(i){return new Y(i)},createDocumentFragment(){return new Y(null,11)}},this.nodeName=e,this.nodeType=r,this.textContent=n,this.attributes=[],this.childNodes=[]}setAttribute(e,r){let n=this.attributes.find(i=>i.name===e);n?n.value=r:this.attributes.push({name:e,value:r})}getAttribute(e){let r=this.attributes.find(n=>n.name===e);return r?r.value:void 0}insertBefore(e,r){if(e.parentNode=this,r===null)this.childNodes.push(e);else{let n=this.childNodes.indexOf(r);n!==-1&&this.childNodes.splice(n,0,e)}}removeAttribute(e){let r=this.attributes.findIndex(n=>n.name===e);r!==-1&&this.attributes.splice(r,1)}appendChild(e){e.parentNode=this,this.childNodes.push(e)}get tagName(){var e;return(e=this.nodeName)===null||e===void 0?void 0:e.toUpperCase()}get localName(){var e;return(e=this.nodeName)===null||e===void 0?void 0:e.toLowerCase()}get innerHTML(){return ae(this.childNodes)}set innerHTML(e){this.childNodes=Wt(String(e!=null?e:""))}get outerHTML(){return ae([this])}get children(){return this.childNodes.filter(e=>e.nodeType==1)}closest(e){let r=this;for(;r;){if(Je(e,r))return r;r=r.parentNode}return null}querySelectorAll(e){let r=e.split(/\s*,\s*/),n=[],i=o=>{for(let s of r)if(Je(s,o)){n.push(o);break}for(let s of o.childNodes)i(s)};for(let o of this.childNodes)i(o);return n}querySelector(e){return this.querySelectorAll(e)[0]}findSibling(e,r){if(!this.parentNode)return null;let n=this.parentNode.childNodes,i=n.indexOf(this);if(i===-1)return null;for(let o=i+e;o>=0&&o<n.length;o+=e){let s=n[o];if(!r||s.nodeType===1)return s}return null}removeChild(e){let r=this.childNodes.indexOf(e);if(r!==-1)return this.childNodes.splice(r,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 r=new Y(this.nodeName,this.nodeType);if(r.attributes=JSON.parse(JSON.stringify(this.attributes)),this.textContent&&(r.textContent=this.textContent),e)for(let n of this.childNodes){let i=n.cloneNode(!0);r.appendChild(i)}return r}get parentElement(){var e;return((e=this.parentNode)===null||e===void 0?void 0:e.nodeType)==1?this.parentNode:null}};function Je(t,e){let r=t.match(/([.#]?[\w-]+|\[([\w-]+)(="([^"]*)")?\])/g);if(!r)return!1;for(let n of r)if(n.startsWith("#")){if(e.getAttribute("id")!==n.slice(1))return!1}else if(n.startsWith(".")){if(!(e.getAttribute("class")||"").split(" ").includes(n.slice(1)))return!1}else if(n.startsWith("[")){let i=n.match(/^\[([\w-]+)(="([^"]*)")?\]$/);if(i){let o=i[1],s=i[3],a=e.getAttribute(o);if(typeof s=="undefined"){if(a===void 0)return!1}else if(a!==s)return!1}else return!1}else if(e.nodeName!==n)return!1;return!0}function Wt(t){var e;let r=[],n=[];for(;t;){let i=t.match(/^<([\w-]+)(\s[^>]*)?>/),o=t.match(/^<\/([\w-]+)>/);if(i){let s=i[1].toLowerCase(),l=((e=(i[2]||"").match(/([\w-]+)(="([^"]*)")?/g))===null||e===void 0?void 0:e.map(d=>{let[u,h,,p]=d.match(/([\w-]+)(="([^"]*)")?/);return{name:h,value:Pr(p||"")}}))||[],c=new Y(s,1);if(c.attributes=l,n.length>0){let d=n[n.length-1];d.childNodes.push(c),c.parentNode=d}else r.push(c);["img","input","br"].includes(s)||n.push(c),t=t.slice(i[0].length)}else if(o)n.pop(),t=t.slice(o[0].length);else{let s=t.indexOf("<"),a=t.slice(0,s!==-1?s:void 0),l=new Y("#text",3);if(l.textContent=a,n.length>0){let c=n[n.length-1];c.childNodes.push(l),l.parentNode=c}else r.push(l);t=t.slice(a.length)}}return r}function kr(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function Pr(t){return t.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#x27;/g,"'")}function ae(t){return t.map(e=>{if(e.nodeType===3)return e.textContent||"";let{nodeName:r,attributes:n}=e,i=n.map(({name:s,value:a})=>` ${s}="${kr(String(a))}"`).join(""),o=ae(e.childNodes);return["img","input","br"].includes(r)?`<${r}${i} />`:`<${r}${i}>${o}</${r}>`}).join("")}function Ye(t,e,r){return le(t,e,r)[0].outerHTML}function le(t,e,r){var n;let i=((n=r==null?void 0:r.processTemplate)===null||n===void 0?void 0:n.call(r,null,t,e))||t,o=Wt(i);return console.log("=== parseHTMLContent",o),o.map(s=>(console.log("=== renderDOMElement result",S(s,e,r)),S(s,e,r)))}var qe=require("@sitecore/byoc");function Tr(t){let{params:e,method:r,headers:n,body:i,url:o}=x(t);var s={url:o},a={...n};return n["Content-Type"]==="application/json"&&delete a["Content-Type"],n.Accept==="application/json"&&delete a.Accept,Object.keys(a).length>0&&(s.headers=a),r!=="GET"&&(s.method=r),r==="GET"||r==="HEAD"||Object.keys(i).length===0||(s.body=i),Object.keys(e).length>0&&(s={...s,params:e}),s}var lt=t=>{if(!t||typeof t.url!="string")return!1;for(var e in t)if(!(e=="body"||e=="params"||e=="headers"||e=="url"||e==="method"||e=="jsonpath"&&typeof t[e]=="string"))return!1;return!0};function Ge(t){let{url:e,headers:r,params:n,method:i,body:o}=x(t),s,a=r["Content-Type"];i!="GET"&&i!="HEAD"&&(a==="application/json"&&(s=JSON.stringify(o)),a==="multipart/form-data"&&(s=Object.keys(o).reduce((c,d)=>(c.append(d,o[d]),c),new FormData)),a==="application/x-www-form-urlencoded"&&(s=new URLSearchParams(o)));let l=Object.keys(n).length?`?${new URLSearchParams(n)}`:"";return[`${e}${l}`,{headers:r,body:s,method:i}]}function x(t){let e={};for(let r in(t==null?void 0:t.headers)||{})if(t.headers.hasOwnProperty(r)){let n=r.replace(/^[a-z]|\-[a-z]/g,i=>i.toUpperCase());e[n]=t.headers[r]}return e.Accept||(e.Accept="application/json"),{params:(t==null?void 0:t.params)||{},headers:e,jsonpath:String((t==null?void 0:t.jsonpath)||"$"),method:((t==null?void 0:t.method)||"GET").toUpperCase(),body:(t==null?void 0:t.body)||{},url:String((t==null?void 0:t.url)||"")}}var ce=async(t,e)=>{let r=(0,qe.customizeDataSettings)(e,t);if(r instanceof Promise)return r;let n=t;r&&(n=x(r));try{let[i,o]=Ge(n),a=await(await x.fetchImplementation(i,{...o,method:o.method.toLowerCase()})).json();return n.jsonpath&&n.jsonpath!="$"?et(a,n.jsonpath):a}catch(i){return{}}};async function Ht(t){if(!t)return t;if(lt(t))return ce(t);let e=Object.keys(t),r=await Promise.all(e.map(n=>lt(t[n])?ce(t[n],n):null).filter(Boolean));return e.reduce((n,i)=>({...n,[i]:lt(t[i])?r.shift():t[i]}),{})}function Mr(t){return t?lt(t)||Object.values(t).some(lt):!1}x.clean=Tr;x.toFetchArguments=Ge;x.fetchOne=ce;x.fetch=Ht;x.isDataSettings=lt;x.hasDataSettings=Mr;x.fetchImplementation=(...t)=>fetch(...t);var Se={};it(Se,{Component:()=>ft,ComponentProps:()=>ve,Context:()=>X,ControlledPromise:()=>O,DEFAULT_CDN_URL:()=>M,DOM:()=>Dt,DataPath:()=>Ot,DataScope:()=>_t,DataSettings:()=>x,Element:()=>E,FEAASComponent:()=>ft,FEAASComponentsProps:()=>ve,FEAASContext:()=>X,FEAASContextProps:()=>we,FEAASEditor:()=>vt,FEAASEditorProps:()=>Ee,FEAASElement:()=>E,FEAASLoader:()=>mt,FEAASLoaderProps:()=>ge,FEAASPicker:()=>gt,FEAASPickerProps:()=>xe,FEAASStylesheet:()=>Lt,FEAASStylesheetProps:()=>ye,InvalidResponse:()=>kt,JSONPath:()=>v,Loader:()=>mt,MyComponent:()=>Nt,Picker:()=>gt,Stylesheet:()=>Lt,Thumbnail:()=>$t,WebComponent:()=>de,adjustNumbers:()=>ie,autoloadScripts:()=>te,cleanCollectionBit:()=>at,clearFetchCache:()=>Xe,createStylesheet:()=>fe,customizeDataSettings:()=>k.customizeDataSettings,fetchAndRevalidate:()=>ut,fetchAndRevalidateComponent:()=>rt,fetchAndRevalidateStylesheet:()=>Tt,fetchBypassingCache:()=>Pt,fetchCache:()=>dt,fetchComponent:()=>Vt,fetchData:()=>Ht,fetchToValidateCache:()=>ht,fetchWithCacheAwareness:()=>q,findStylesheet:()=>pe,getComponent:()=>k.getComponent,getComponentSource:()=>Qe,getComponentURL:()=>pt,getFetchCache:()=>ue,getFramePosition:()=>Ce,getHumanizedLabel:()=>oe,getLastPathBit:()=>se,getQualifier:()=>ne,getStylesheetSource:()=>zt,getStylesheetURL:()=>K,loadScript:()=>st,loadStylesheet:()=>Mt,loadStylesheetAllowStale:()=>Jt,normalizeCollectionScope:()=>Ft,observeDOMElement:()=>Zt,parseComponentSource:()=>G,parseLimit:()=>ee,parseRange:()=>re,parseStylesheetSource:()=>W,queryObject:()=>et,queryObjectRaw:()=>Ut,queryScopes:()=>ot,registerComponent:()=>k.registerComponent,registerDatasource:()=>k.registerDatasource,renderComponent:()=>Yt,renderComponentElement:()=>tr,renderComponentPromise:()=>me,renderDOMContent:()=>J,renderDOMElement:()=>S,renderHTMLContent:()=>Ve,renderStylesheet:()=>Ze,renderStylesheetPromise:()=>he,serializeCH1RichText:()=>V,setDOMAttribute:()=>U});function O(t,e=r=>{}){var r;let n=()=>{var i,o;let s=new Promise((l,c)=>{i=d=>{t==null||t(d),l(d)},o=c});var a=Object.assign(s,{resolve:i,reject:o,restart:n,first:r});return r=a,a.catch(e),a};return n()}var de=typeof HTMLElement=="undefined"?typeof windowJSDOM!="undefined"?windowJSDOM.HTMLElement:class{}:HTMLElement,E=class extends de{getProps(e){return{}}constructor(){super(),this.defaultProps={},this.connected=!1,this.refs={},this.descendants=[],this.whenLoaded=O(e=>{this.payload=e}),this.whenRendered=O(()=>this.initialized=!0,()=>this.cancelRender()),this.addEventListener("feaasMount",this),this.addEventListener("feaasUnmount",this)}getRoot(){return this}attributeChangedCallback(e,r,n){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(r=>{var n;return(n=r.mount)===null||n===void 0?void 0:n.call(r)}),this.set()}catch(e){this.onError(e)}}dispatchEventIndirectly(e){this.dispatchEvent(e);let r=this.getParent();r&&!r.contains(this)&&(Object.defineProperty(e,"target",{value:this,writable:!1}),Object.defineProperty(e,"composedPath",{value:()=>[this],writable:!1}),r.handleEvent(e))}isJSONAttribute(e){return!1}log(...e){let r=e[0];(typeof location!="undefined"&&(location!=null&&location.hostname.startsWith("components-"))||localStorage["Sitecore.Components.Debug"])&&console.log(r+" "+e.slice(1).map(n=>n&&typeof n=="object"?"%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 r=this;r=r.parentElement||(r.parentNode instanceof ShadowRoot?r.parentNode.host:null);)if(!e||r.tagName.startsWith("FEAAS-"))return r;if(this.tagName!="FEAAS-CONTEXT")return document.querySelector("feaas-context")}getElements(e=this.getRoot(),r=!0){return Array.from(e.querySelectorAll("*")).map(n=>[!r||n.tagName.startsWith("FEAAS-")?n:null,n.shadowRoot?this.getElements(n.shadowRoot,r):null]).flat().filter(Boolean)}handleEvent(e){let r=e.composedPath()[0];switch(e.type){case"feaasMount":r!=this&&this.nestedCallback(r);break;case"feaasUnmount":r!=this&&this.unnestedCallback(r);break}}unnestedCallback(e){let r=this.descendants.indexOf(e);r!=-1&&(this.log("FEAAS: Unnest",this,e),this.descendants.splice(r,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 r,n;if(this.descendants.indexOf(e)==-1&&(this.descendants.push(e),this.log("FEAAS: Nest",this,e),this.refs[e.getComponentName()]=e,e.refs.top=this,(r=e.refs).parent||(r.parent=this),e.render))for(var o=e.refs.parent;o;o=o.refs.parent)o.render&&((n=e.refs).parentReact||(n.parentReact=o),e.refs.topReact=o)}getComponentName(){return this.tagName.replace("FEAAS-","").toLowerCase()}isReadyToLoad(){return this.payload===void 0&&this.getAttribute("hidden")==null}onError(e,r="uncaught",n=!1){let i=new CustomEvent("feaasError",{bubbles:!0,composed:!0,detail:e});if(this.dispatchEventIndirectly(i),this.whenLoaded.reject(e),!i.defaultPrevented&&!n){this.whenRendered.reject(e);try{this.unmount()}catch(o){}return!0}return!1}shouldUpdateOnLoad(){return!0}async advance(){try{if(this.payload===void 0){if(!this.isReadyToLoad())return;this.payload=null,this.dispatchEventIndirectly(new Event("feaasLoad",{bubbles:!0,composed:!0}));let e=await this.load().catch(r=>{throw this.payload=void 0,r});if(this.whenLoaded.resolve(e),this.onLoad)return}else if(this.payload==null)return;this.flush(),this.whenRendered.resolve(this)}catch(e){this.onError(e)}}flush(){var e,r;if(!this.connected)return;let n=(r=(e=this.payload)===null||e===void 0?void 0:e.ReactDOM)===null||r===void 0?void 0:r.flushSync;n?n(()=>this.update()):this.update()}load(){return Promise.resolve(null)}update(){var e,r,n;if(this.payload==null||!this.render)return;let{React:i,ReactDOM:o,ReactDOMClient:s}=this.payload||{};if(!i)throw new Error(`${this.tagName}: React is not present in payload`);if(!o)throw new Error(`${this.tagName}: ReactDOM is not present in payload`);this.getAttribute("hydrate")=="false"&&this.firstElementChild||(!this.refs.topReact&&!this.forceUpdateReact?(this.reactRoot||(this.reactRoot=s.createRoot(this.getReactRootElement())),this.reactRoot.render(this.getReactElement())):this.forceUpdateReact&&this.connected?(e=this.forceUpdateReact)===null||e===void 0||e.call(this):(n=(r=this.refs.topReact)===null||r===void 0?void 0:r.forceUpdateReact)===null||n===void 0||n.call(r))}invokeReactRendering(){let{React:e,ReactDOM:r}=this.payload||{};if(!this.connected)return null;let n=this.descendants.filter(i=>i.refs.parentReact==this&&i.payload&&i.connected).map((i,o)=>this.getReactElement(i));return this.render({...this.props,children:n},this.payload)}getReactErrorBoundary(e=this,r=e.tagName){if(this.reactErrorBoundary)return this.reactErrorBoundary;let{React:n,ReactDOM:i}=e.payload||{};return this.reactErrorBoundary||(this.reactErrorBoundary=class extends n.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromError(s){return{error:s}}componentDidCatch(s,a){console.error(`FEAAS: ${e.tagName} Error:`,s,a),e.onError(s,"react")}render(){if(!this.state.error)return this.props.children}})}getReactElement(e=this,r){let{React:n,ReactDOM:i}=e.payload||{},o=this.getReactErrorBoundary(),s=this.getReactWrapper(e);return n.createElement(o,{key:e.tagName+"-"+e.getUID(),slot:e.getAttribute("slot")},n.createElement(s,null))}getReactWrapper(e=this,r=e.tagName){if(e.reactWrapper)return e.reactWrapper;let{React:n,ReactDOM:i}=e.payload||{};return e.reactWrapper=o=>{if(e.render){let[s,a]=n.useReducer(l=>l+1,0);return e.forceUpdateReact=a,i.createPortal(n.createElement(n.Fragment,null,e.invokeReactRendering()),e.getReactRootElement())}else return e.update()},Object.assign(e.reactWrapper,{key:e.tagName+"-"+e.getUID(),displayName:r}),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{this.scheduleRender(),this.overrides={...this.overrides,...e},this.props={...this.getProps(),...this.overrides};for(var r in this.props){let i=this.isJSONAttribute(r),o=this.props[r],s=i?JSON.stringify(o):String(o),a=this.defaultProps[r],l=i?JSON.stringify(a):String(a),c=r.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),d=this.getAttribute(c);try{var n=i?JSON.stringify(JSON.parse(d)):d}catch(u){var n=null}o==null||s===l?this.removeAttribute(c):(typeof o=="string"||typeof o=="number"||typeof o=="boolean"||i)&&n!=s&&this.setAttribute(c,s)}}catch(i){this.whenRendered.reject(i),this.onError(i,"set")}return this}import(e){return import( /*@vite-ignore*/ /* webpackIgnore: true */ e)}scheduleRender(){this.nextRender==null&&(this.whenRendered=this.whenRendered.restart()),this.cancelRender(),this.nextRender=requestAnimationFrame(()=>{this.nextRender=null,this.advance().catch(e=>{})})}cancelRender(){cancelAnimationFrame(this.nextRender)}formatURL(e,r){return typeof e=="string"&&e.match(/^\/[^\/]/)?r+e:e}getContextAttribute(e,r=this){for(var n=this;n=n.parentElement||(n.parentNode instanceof ShadowRoot?n.parentNode.host:null);)if(n.getAttribute(e)!=null)return n.getAttribute(e);return this.getAttribute(e)}static register(e,r){r==null&&(r=typeof window!="undefined"?window:null),r&&!r.customElements.get(e)&&r.customElements.define(e,this)}};var ct=class extends E{load(){return Promise.all([import( /*@vite-ignore*/ /* webpackIgnore: true */ "https://cdn.skypack.dev/react"),import( /*@vite-ignore*/ /* webpackIgnore: true */ "https://cdn.skypack.dev/react-dom"),import( /*@vite-ignore*/ /* webpackIgnore: true */ "https://cdn.skypack.dev/react-dom/client")]).then(([e,r,n])=>({React:e,ReactDOM:r,ReactDOMClient:n}))}render({},{React:e}){return e.createElement(e.Fragment,null)}},Nt=class extends ct{constructor(){super(...arguments),this.useShadowRoot=!0}getProps(){return{counter:parseFloat(this.getAttribute("counter"))}}render({counter:e},{React:r}){let[n,i]=r.useState(0);return r.useEffect(()=>{i(o=>o+1)},[e]),r.createElement(r.Fragment,null,r.createElement("p",null,"Rendering attribute: ",e),r.createElement("p",null,"Triggered updates: ",n))}};Nt.observedAttributes=["counter"];var Ke=["initial","check","updated"],dt={};function Xe(){dt={}}async function ut(t,e,r,n,i=dt){return q({url:t,options:e,validator:r,callback:n,cache:i}).then(ht).then(o=>o.response)}async function q({url:t,options:e,validator:r,callback:n,cache:i},o="initial"){let s=new Date;if(i!=null){var a=ue(t);if(Ke.indexOf(a.phase)>=Ke.indexOf(o))var l=a[o];else a.phase=o}let c=await(l||fetch(t,e));if(!l&&a&&(c.ok?a[o].resolve(c):a[o].reject(new Error("Fetch failed"))),!c.ok)throw new Error("Fetch failed");let d=new Date(c.headers.get("date"))<s||l&&o=="initial"&&(a.phase=="updated"||a.phase=="check");if((r==null?void 0:r(c,d))===!1)throw new kt("Response is not valid");return await(n==null?void 0:n(c,o,d)),{url:t,options:e,isCached:d,response:c,validator:r,callback:n,cache:i}}function ue(t,e=!1){let r=String(t).replace("?head","");var n=dt[r];return!n&&!e&&(n=dt[r]={phase:null,initial:O(),check:O(),updated:O(),final:O()}),n}var kt=class extends Error{};async function ht(t){let{url:e,isCached:r,options:n,validator:i,response:o,cache:s}=t;if(r){let{response:a}=await q({url:e+(e.toString().includes("?")?"&":"?")+"head",options:{...n,method:"HEAD",cache:"no-cache"},validator:i,cache:s},"check");if(a.headers.get("last-modified")!=o.headers.get("last-modified"))return Pt(t)}return t}async function Pt(t){return q({...t,options:{...t.options,cache:"reload"}},"updated")}var M="https://feaas.blob.core.windows.net";function G(t){let e=t==null?void 0:t.match(/^(?:(.*?)\/components)?\/?([^\/]+)\/([^\/]+)(?:\/([^\/]+)(?:\/(published|staged|saved|\d+)(?:\.html?)?)?)?$/);if(e){var[,r,n,i,o,s]=e;return{cdn:r,library:n,component:i,version:o,revision:s}}}function Qe(t){if(!t||!t.library||!t.component)throw new Error("Component requires `library` and `component` properties");return`${t.cdn&&t.cdn!=M?`${t.cdn}/components`:""}/${t.library}/${t.component}/${!t.version||t.version=="responsive"&&(!t.revision||t.revision=="published")?"":t.version}/${!t.revision||t.revision=="published"?"":t.revision}`.replace(/(^\/|\/$|\/\/)(?!.+\/components\/)/g,"")}function zt(t){return`${t.cdn&&t.cdn!=M?`${t.cdn}/styles/`:""}${t.library}/${!t.revision||t.revision=="published"?"":t.revision}`.replace(/\/$|\/\/(?!.+\/styles\/)/g,"")}function W(t){let e=t==null?void 0:t.match(/^(?:(.*?)\/styles\/)?([^\/]+)(?:\/(published|staged|saved|\d+)(?:.css)?)?$/);if(e){var[,r,n,i]=e;return{cdn:r,library:n,revision:i}}else{let o=G(t);if(o){var{cdn:r,library:n,revision:i}=o;return i!=null&&i.match(/\d/)&&(i=void 0),{cdn:r,library:n,revision:i}}}}function pt(t){return typeof t=="string"&&(t={src:t}),"src"in t&&t.src?t={...G(t.src)}:t={...t},`${t.cdn||t.hostname||M}/components/${t.library}/${t.component}/${t.version||"responsive"}/${t.revision||"published"}.html`}function K(t){if(typeof t=="string"&&(t={src:t}),"src"in t){if(String(t.src).includes("v1/files/components/styles"))return t.src;t={...W(t.src)}}else t={...t};return`${t.cdn||t.hostname||M}/styles/${t.library}/${t.revision=="staged"?"staged":t.revision=="saved"?"saved":"published"}.css`}async function rt(t,e,r=!1){let n=a=>a.headers.get("x-ms-meta-versionDeletedAt")==null,i=a=>a.clone().text().then(e),o=await Promise.all([t.instance&&q({options:{headers:{Accept:"text/html"},credentials:"omit"},url:pt({...t,version:t.instance}),validator:n}).catch(a=>a),q({url:pt(t),validator:n}).catch(a=>a)]),s=o.find(a=>a&&"isCached"in a&&a);if(!s||s instanceof Error)throw o.find(l=>l&&l instanceof Error)||new Error("Can not fetch component");return o[0]==s&&console.log("Using fork!",o),await i(s.response),r?s:ht({...s,callback:i}).catch(a=>{if(o[0]==s&&(Pt({...s,callback:null,validator:null}),console.log("Fork was deleted"),!(o[1]instanceof Error)))return i(o[1].response),ht({...o[1],callback:i});throw a})}async function Vt(t){typeof t=="string"&&(t={src:t});var e;let{response:r}=await rt(t,n=>{e=n},!0);return{...t,template:e,lastModified:r.headers.get("last-modified")}}async function Tt(t,e){return ut(K(t),{headers:{Accept:"text/css"},credentials:"omit"},r=>r.headers.get("x-ms-meta-deletedAt")==null,(r,n)=>r.clone().text().then(i=>e(i,n)))}function Ze(t,e){return he(t,e||(e=document.createElement("style"))),e}function he(t,e){return e||(e=document.createElement("style")),Tt(t,(r,n)=>{e.textContent=r}).then(()=>e)}var Lr=new WeakSet;function Mt(t,e){var r,n=pe(t);if(n){if(Lr.has(n))return Promise.resolve(n);t=n.getAttribute("data-href")||n.getAttribute("href")}return Tt(t,(i,o)=>{o=="initial"&&n||(r||(r=!n||n.tagName=="LINK"?fe(t):n),r.textContent=i),e==null||e(i,o)}).then(()=>r||n)}function Jt(t){return new Promise((e,r)=>{Mt(t,e).catch(r)})}function pe(t){let e=K(t),{library:r}=W(e),n=`/files/components/styles/${r}.css`;return document.querySelector(`style[data-href="${e}"],
3
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){r=r.call(t)},n:function(){var l=r.next();return o=l.done,l},e:function(l){s=!0,a=l},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(s)throw a}}}}var F=Object.prototype.hasOwnProperty;function tt(t,e){return t=t.slice(),t.push(e),t}function Qt(t,e){return e=e.slice(),e.unshift(t),e}var _r=function(t){gr(r,t);var e=Cr(r);function r(n){var i;return Le(this,r),i=e.call(this,'JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)'),i.avoidNew=!0,i.value=n,i.name="NewError",i}return $e(r)}(Kt(Error));function v(t,e,r,n,i){if(!(this instanceof v))try{return new v(t,e,r,n,i)}catch(l){if(!l.avoidNew)throw l;return l.value}typeof t=="string"&&(i=n,n=r,r=e,e=t,t=null);var o=t&&L(t)==="object";if(t=t||{},this.json=t.json||r,this.path=t.path||e,this.resultType=t.resultType||"value",this.flatten=t.flatten||!1,this.wrap=F.call(t,"wrap")?t.wrap:!0,this.sandbox=t.sandbox||{},this.preventEval=t.preventEval||!1,this.parent=t.parent||null,this.parentProperty=t.parentProperty||null,this.callback=t.callback||n||null,this.otherTypeCallback=t.otherTypeCallback||i||function(){throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")},t.autostart!==!1){var s={path:o?t.path:e};o?"json"in t&&(s.json=t.json):s.json=r;var a=this.evaluate(s);if(!a||L(a)!=="object")throw new _r(a);return a}}v.prototype.evaluate=function(t,e,r,n){var i=this,o=this.parent,s=this.parentProperty,a=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,e=e||this.json,t=t||this.path,t&&L(t)==="object"&&!Array.isArray(t)){if(!t.path&&t.path!=="")throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');if(!F.call(t,"json"))throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');var c=t;e=c.json,a=F.call(t,"flatten")?t.flatten:a,this.currResultType=F.call(t,"resultType")?t.resultType:this.currResultType,this.currSandbox=F.call(t,"sandbox")?t.sandbox:this.currSandbox,l=F.call(t,"wrap")?t.wrap:l,this.currPreventEval=F.call(t,"preventEval")?t.preventEval:this.currPreventEval,r=F.call(t,"callback")?t.callback:r,this.currOtherTypeCallback=F.call(t,"otherTypeCallback")?t.otherTypeCallback:this.currOtherTypeCallback,o=F.call(t,"parent")?t.parent:o,s=F.call(t,"parentProperty")?t.parentProperty:s,t=t.path}if(o=o||null,s=s||null,Array.isArray(t)&&(t=v.toPathString(t)),!(!t&&t!==""||!e)){var d=v.toPathArray(t);d[0]==="$"&&d.length>1&&d.shift(),this._hasParentSelector=null;var u=this._trace(d,e,["$"],o,s,r).filter(function(h){return h&&!h.isParentSelector});return u.length?!l&&u.length===1&&!u[0].hasArrExpr?this._getPreferredOutput(u[0]):u.reduce(function(h,p){var f=i._getPreferredOutput(p);return a&&Array.isArray(f)?h=h.concat(f):h.push(f),h},[]):l?[]:void 0}};v.prototype._getPreferredOutput=function(t){var e=this.currResultType;switch(e){case"all":{var r=Array.isArray(t.path)?t.path:v.toPathArray(t.path);return t.pointer=v.toPointer(r),t.path=typeof t.path=="string"?t.path:v.toPathString(t.path),t}case"value":case"parent":case"parentProperty":return t[e];case"path":return v.toPathString(t[e]);case"pointer":return v.toPointer(t.path);default:throw new TypeError("Unknown result type")}};v.prototype._handleCallback=function(t,e,r){if(e){var n=this._getPreferredOutput(t);t.path=typeof t.path=="string"?t.path:v.toPathString(t.path),e(n,r,t)}};v.prototype._trace=function(t,e,r,n,i,o,s,a){var l=this,c;if(!t.length)return c={path:r,value:e,parent:n,parentProperty:i,hasArrExpr:s},this._handleCallback(c,o,"value"),c;var d=t[0],u=t.slice(1),h=[];function p(A){Array.isArray(A)?A.forEach(function(y){h.push(y)}):h.push(A)}if((typeof d!="string"||a)&&e&&F.call(e,d))p(this._trace(u,e[d],tt(r,d),e,d,o,s));else if(d==="*")this._walk(e,function(A){p(l._trace(u,e[A],tt(r,A),e,A,o,!0,!0))});else if(d==="..")p(this._trace(u,e,r,n,i,o,s)),this._walk(e,function(A){L(e[A])==="object"&&p(l._trace(t.slice(),e[A],tt(r,A),e,A,o,!0))});else{if(d==="^")return this._hasParentSelector=!0,{path:r.slice(0,-1),expr:u,isParentSelector:!0};if(d==="~")return c={path:tt(r,d),value:i,parent:n,parentProperty:null},this._handleCallback(c,o,"property"),c;if(d==="$")p(this._trace(u,e,r,null,null,o,s));else if(/^(\x2D?[0-9]*):(\x2D?[0-9]*):?([0-9]*)$/.test(d))p(this._slice(d,u,e,r,n,i,o));else if(d.indexOf("?(")===0){if(this.currPreventEval)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");var f=d.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(e,function(A){l._eval(f,e[A],A,r,n,i)&&p(l._trace(u,e[A],tt(r,A),e,A,o,!0))})}else if(d[0]==="("){if(this.currPreventEval)throw new Error("Eval [(expr)] prevented in JSONPath expression.");p(this._trace(Qt(this._eval(d,e,r[r.length-1],r.slice(0,-1),n,i),u),e,r,n,i,o,s))}else if(d[0]==="@"){var m=!1,g=d.slice(1,-2);switch(g){case"scalar":(!e||!["object","function"].includes(L(e)))&&(m=!0);break;case"boolean":case"string":case"undefined":case"function":L(e)===g&&(m=!0);break;case"integer":Number.isFinite(e)&&!(e%1)&&(m=!0);break;case"number":Number.isFinite(e)&&(m=!0);break;case"nonFinite":typeof e=="number"&&!Number.isFinite(e)&&(m=!0);break;case"object":e&&L(e)===g&&(m=!0);break;case"array":Array.isArray(e)&&(m=!0);break;case"other":m=this.currOtherTypeCallback(e,r,n,i);break;case"null":e===null&&(m=!0);break;default:throw new TypeError("Unknown value type "+g)}if(m)return c={path:r,value:e,parent:n,parentProperty:i},this._handleCallback(c,o,"value"),c}else if(d[0]==="`"&&e&&F.call(e,d.slice(1))){var b=d.slice(1);p(this._trace(u,e[b],tt(r,b),e,b,o,s,!0))}else if(d.includes(",")){var N=d.split(","),I=Rr(N),nt;try{for(I.s();!(nt=I.n()).done;){var jt=nt.value;p(this._trace(Qt(jt,u),e,r,n,i,o,!0))}}catch(A){I.e(A)}finally{I.f()}}else!a&&e&&F.call(e,d)&&p(this._trace(u,e[d],tt(r,d),e,d,o,s,!0))}if(this._hasParentSelector)for(var P=0;P<h.length;P++){var H=h[P];if(H&&H.isParentSelector){var R=this._trace(H.expr,e,H.path,n,i,o,s);if(Array.isArray(R)){h[P]=R[0];for(var yt=R.length,Q=1;Q<yt;Q++)P++,h.splice(P,0,R[Q])}else h[P]=R}}return h};v.prototype._walk=function(t,e){if(Array.isArray(t))for(var r=t.length,n=0;n<r;n++)e(n);else t&&L(t)==="object"&&Object.keys(t).forEach(function(i){e(i)})};v.prototype._slice=function(t,e,r,n,i,o,s){if(Array.isArray(r)){var a=r.length,l=t.split(":"),c=l[2]&&Number.parseInt(l[2])||1,d=l[0]&&Number.parseInt(l[0])||0,u=l[1]&&Number.parseInt(l[1])||a;d=d<0?Math.max(0,d+a):Math.min(a,d),u=u<0?Math.max(0,u+a):Math.min(a,u);for(var h=[],p=d;p<u;p+=c){var f=this._trace(Qt(p,e),r,n,i,o,s,!0);f.forEach(function(m){h.push(m)})}return h}};v.prototype._eval=function(t,e,r,n,i,o){this.currSandbox._$_parentProperty=o,this.currSandbox._$_parent=i,this.currSandbox._$_property=r,this.currSandbox._$_root=this.json,this.currSandbox._$_v=e;var s=t.includes("@path");s&&(this.currSandbox._$_path=v.toPathString(n.concat([r])));var a="script:"+t;if(!v.cache[a]){var l=t.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");s&&(l=l.replace(/@path/g,"_$_path")),v.cache[a]=new this.vm.Script(l)}try{return v.cache[a].runInNewContext(this.currSandbox)}catch(c){throw new Error("jsonPath: "+c.message+": "+t)}};v.cache={};v.toPathString=function(t){for(var e=t,r=e.length,n="$",i=1;i<r;i++)/^(~|\^|@(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\(\))$/.test(e[i])||(n+=/^[\*0-9]+$/.test(e[i])?"["+e[i]+"]":"['"+e[i]+"']");return n};v.toPointer=function(t){for(var e=t,r=e.length,n="",i=1;i<r;i++)/^(~|\^|@(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\(\))$/.test(e[i])||(n+="/"+e[i].toString().replace(/~/g,"~0").replace(/\//g,"~1"));return n};v.toPathArray=function(t){var e=v.cache;if(e[t])return e[t].concat();var r=[],n=t.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(o,s){return"[#"+(r.push(s)-1)+"]"}).replace(/\[["']((?:(?!['\]])[\s\S])*)["']\]/g,function(o,s){return"['"+s.replace(/\./g,"%@%").replace(/~/g,"%%@@%%")+"']"}).replace(/~/g,";~;").replace(/["']?\.["']?(?!(?:(?!\[)[\s\S])*\])|\[["']?/g,";").replace(/%@%/g,".").replace(/%%@@%%/g,"~").replace(/(?:;)?(\^+)(?:;)?/g,function(o,s){return";"+s.split("").join(";")+";"}).replace(/;;;|;;/g,";..;").replace(/;$|'?\]|'$/g,""),i=n.split(";").map(function(o){var s=o.match(/#([0-9]+)/);return!s||!s[1]?o:r[s[1]]});return e[t]=i,e[t].concat()};var Fr=function(e,r,n){for(var i=e.length,o=0;o<i;o++){var s=e[o];n(s)&&r.push(e.splice(o--,1)[0])}},Or=function(){function t(e){Le(this,t),this.code=e}return $e(t,[{key:"runInNewContext",value:function(r){var n=this.code,i=Object.keys(r),o=[];Fr(i,o,function(d){return typeof r[d]=="function"});var s=i.map(function(d,u){return r[d]}),a=o.reduce(function(d,u){var h=r[u].toString();return/function/.test(h)||(h="function "+h),"var "+u+"="+h+";"+d},"");n=a+n,!/(["'])use strict\1/.test(n)&&!i.includes("arguments")&&(n="var arguments = undefined;"+n),n=n.replace(/;[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*$/,"");var l=n.lastIndexOf(";"),c=l>-1?n.slice(0,l+1)+" return "+n.slice(l+1):" return "+n;return wt(Function,i.concat([c])).apply(void 0,Er(s))}}]),t}();v.prototype.vm={Script:Or};function Ut(t,e){try{return v({path:e,json:t})}catch(r){return[]}}function et(t,e,r=!0){let n=Ut(t,e)||[];return r?n.flat(1/0):n}function ot(t,e,r=!1,n=t,i=!0){var o=e;let s=Object.keys(t).sort((l,c)=>c.length-l.length);for(let l of s)if(e.startsWith(l)){if(l==e){if(r)return t[l];continue}o=e.substring(l.length+1),n=t[l];break}var a=et(n,o,i);return a.length==0&&(a=[o.replace(/^.*?\./,"_."),o.replace(/^.*?\./,""),o.replace(/^([^.]+).*?\.\$([\.\[])/,"$1$2"),o.replace(/^.*?\.\$([\.\[])/,"_$1"),o.replace(/^.*?\.\$([\.\[])/,"$$$1"),o.replace(/^[^.]+$/,"_")].filter((l,c,d)=>d.indexOf(l)===c).reduce((l,c)=>l.length>0?l:et(n,c,i),[])),r?a[0]:a}function Zt(t,e={},r){return r?`<${r}${Object.entries(e).map(([n,i])=>i!=null&&` ${n}="${i}"`).filter(Boolean).join("")}>${V(t)}</${r}>`.replace(/^<([a-z0-9][^>]*)><\/[^>]+>$/,"<$1 />"):V(t)}function V(t){var e;if(Array.isArray(t))return t.map(V).join(`
4
+ `).trim();if(typeof t=="string")return t;if(t==null)return"";switch(t.type){case"heading":let{level:r,...n}=t.attrs;return Zt(t.content,n,"h"+r);case"text":return(t.marks||[]).reduce((i,o)=>Zt(i,o.attrs,{link:"a",bold:"strong",italic:"em",strike:"s",underline:"u"}[o.type]),(e=t.text)===null||e===void 0?void 0:e.replace(/\s+/," "));default:return Zt(t.content||t.text,t.attrs,{bulletList:"ul",orderedList:"ol",listItem:"li",horizontalRule:"hr",paragraph:"p",codeBlock:"code",blockquote:"blockquote"}[t.type])}}function te(t){let e=new t.ownerDocument.defaultView.MutationObserver(r=>{r.forEach(n=>{let i=n.target,o=i.getAttribute("data-embed-src");o&&st(i,o),n.addedNodes&&n.addedNodes.forEach(s=>{s.nodeType==1&&ee(s,!1)})})});return e.observe(t,{attributes:!0,subtree:!0,childList:!0}),e}function ee(t,e=!0){let r=t.querySelectorAll("[data-embed-src]");for(var n=0;n<r.length;n++){let i=r[n];st(i,i.getAttribute("data-embed-src"))}if(e)return te(t)}function st(t,e){for(var r=t;r;r=r.parentElement)if(!r.parentElement){let i=r.querySelectorAll("script");for(var n=0;n<i.length;n++)if(i[n].getAttribute("src")==e)return!0;r.tagName=="HTML"&&(r=r.querySelector("head")||r);let o=r.ownerDocument.createElement("script");o.setAttribute("type","module"),o.setAttribute("src",e),r.appendChild(o);break}}var Ot={};it(Ot,{adjustNumbers:()=>oe,cleanCollectionBit:()=>at,getHumanizedLabel:()=>se,getLastPathBit:()=>ae,getQualifier:()=>ie,normalizeCollectionScope:()=>Ft,parseLimit:()=>re,parseRange:()=>ne});var re=t=>{var e;let r=parseInt((e=t==null?void 0:t.match(/\[0:(\d+)\]/))===null||e===void 0?void 0:e[1],10);return!isNaN(r)&&r>0?String(r):null},ne=t=>{var e;let r=(e=t==null?void 0:t.match(/\[([^\]]+)\]/))===null||e===void 0?void 0:e[1].split(/\s*,\s*/g).filter(Boolean).map(n=>{if(n.match(/^-?\d+$/))return n;let i=n.match(/^(\d+):(\d+)$/);return i&&parseInt(i[1],10)<parseInt(i[2],10)?i[1]+"-"+i[2]:null});return r!=null&&r.every(Boolean)?r.join(","):null},ie=t=>{var e;return(e=t==null?void 0:t.match(/(\.\*|\[[^\]]*\])$/))===null||e===void 0?void 0:e[0]};function at(t){return t.replace(/(\.?\[[^\]\[]*\]|\.\*)$/g,"")}function Ft(t){return at(t)+".*"}function oe(t,e){return t==null?void 0:t.replace(/(.|^)(\d+)/g,(r,n,i)=>n+(n==":"?i:String(parseInt(i)+e)))}function se(t,e=2){var r=at(t).split(/]\.|\.\*\./g).pop().split(/\./g).slice(-3);return r=r.filter(n=>isNaN(parseInt(n))),r.map(n=>n.charAt(0).toUpperCase()+n.slice(1)).slice(-e).join(" ")}function ae(t){return at(t).split(".").pop()}var Dr=["January","February","March","April","May","June","July","August","September","October","November","December"],Be=t=>{if(!t||typeof t.getDay!="function")return;let e=t.getFullYear(),r=Dr[t.getMonth()],n=t.getDate();return`${r} ${n}, ${e}`},Ue=function(t){return String(new Date(t))!=="Invalid Date"&&!isNaN(Number(new Date(t)))};function He(t){let e=t.getAttribute("data-path-scope");for(var r=0,n=t;n=n.previousElementSibling;)n.getAttribute("data-path-scope")==e&&r++;return r}function Nr(t,e,r){let n=t.getAttribute("data-path-scope");if(n==null)return;var i=He(t);if(i!=0)return;let o=t.parentNode;if(o!=null){e==0?t.setAttribute("hidden","hidden"):t.getAttribute("hidden")!=null&&t.removeAttribute("hidden");for(var s=i+1,a=t,l=t;l=l.nextElementSibling;)l.getAttribute("data-path-scope")==n&&(s++,a=l);for(var c=s;c<e;c++)o.insertBefore(a.cloneNode(!0),a.nextElementSibling);for(var c=Math.max(1,e);c<s;c++)a=a.previousElementSibling,o.removeChild(a.nextElementSibling)}}function U(t,e,r,n,i=!0){var o,s,a;if(!t)return;var l=t;(r==null?void 0:r.type)=="doc"&&Array.isArray(r.content)&&(r=V(r)),n!=null&&n.processValue&&(r=n==null?void 0:n.processValue(t,e,r));var c=e.replace("data-path-","");if(e=="data-path-src"||e=="data-path-alt"){let b=Array.from(t.children).find(N=>N.localName=="picture")||t;l=t.localName=="img"?t:b.querySelector("img, video")}else if(e=="data-path-href")l=t.querySelector("a")||t.closest("a");else if(e=="data-path-hidden")r=r?null:!0;else if(e=="data-path"||e=="data-embed-html"||e=="html")c="innerHTML";else if(e=="data-embed-src"&&i)st(t,r);else if(e=="data-path-attributes"){if(!Array.isArray(r)){let b=((o=t.getAttribute("data-attributes-keys"))===null||o===void 0?void 0:o.split(",").filter(Boolean))||[];if(!Array.isArray(r))for(var d in r){var u=r[d];U(t,d,typeof u=="object"&&u?JSON.stringify(u):u,n,i)}for(var h=0;h<b.length;h++)(r==null||!(b[h]in r))&&U(t,b[h],null,n,i);U(t,"data-attributes-keys",Object.keys(r||{}).join(","),{},i)}if(t.tagName=="FEAAS-EXTERNAL"){let b=String(t.getAttribute("data-path-attributes")||"").slice(0,-1).split(".")[0]||"_";U(t,"datasources",JSON.stringify({[b]:r}),{},i)}return}if(typeof r=="boolean"&&(r=r?"":null),!l)return;if((c=="innerHTML"||c=="src")&&(r==null||r==="")){var f=String((a=(s=t.getAttribute("data-path-placeholder")||l[c])!==null&&s!==void 0?s:l.getAttribute(c))!==null&&a!==void 0?a:"");c=="innerHTML"?l.innerHTML=f:f?l.setAttribute(c,f):l.removeAttribute(c)}else if(r!=null)if(c=="innerHTML"){for(var m=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/)&&(m=m.replace(/<(p|h\d|li|ul)[^>]*?>|<\/(p|h\d|li|ul)[^>]*?>/g," ").trim().replace(/\s+/g," ")),String(g.getAttribute("class")).includes("-inline--time")&&Ue(m)&&(m=Be(new Date(m))),l.innerHTML!=m&&(l.innerHTML=m)}else l.getAttribute(c)!=r&&(c==="hidden"?(console.log("in here?..."),l[c]=!0):l.setAttribute(c,r));else l.removeAttribute(c)}var We=["data-attributes-keys","data-path-attributes","data-path-scope"];function S(t,e,r,n,i=!0){var o,s,a;let l=t;if(n||(e=((o=r==null?void 0:r.processData)===null||o===void 0?void 0:o.call(r,l,e))||e),l.nodeType==1){let u=l.getAttribute("data-path-scope");if(u){let p=He(l),f=ot(e,u,!1);p==0&&Nr(l,((s=r==null?void 0:r.shouldRepeat)===null||s===void 0?void 0:s.call(r,l,f))===!1?1:f.length,r),e={...e,[Ft(u)]:f[p]}}let h=Array.prototype.slice.call(l.attributes).sort((p,f)=>We.indexOf(p.name)-We.indexOf(f.name));for(var c=0;c<h.length;c++){let{name:p,value:f}=h[c];p.startsWith("data-path")&&p!="data-path-scope"&&U(l,p,ot(e,f,!0,void 0,l.tagName!="FEAAS-EXTERNAL"),r,i),p=="data-embed-src"&&U(l,p,l.getAttribute(p),r,i)}}for(var c=0,d;d=l.childNodes[c++];)ze(d)&&S(d,e,r,!0,i);return n||(a=r==null?void 0:r.onRender)===null||a===void 0||a.call(r,l,e),l}function ze(t){return t.nodeType==1}function J(t,e,r,n,i=!0){var o;let s=((o=n==null?void 0:n.processTemplate)===null||o===void 0?void 0:o.call(n,t,e,r))||e;if(t.innerHTML=s,t.classList.add("-feaas"),(t.closest(".component.feaas")||t).className.includes("-theme--"))for(var l=0,c;c=t.childNodes[l++];)ze(c)&&(c.className=c.className.replace(/(\s|^)-theme--[^\s]+\s*/g,"$1"));return S(t,r,n,null,i)}function Ve(t,e,r,n=!1,i=!0){var o;let s=((o=r==null?void 0:r.processTemplate)===null||o===void 0?void 0:o.call(r,null,t,e))||t;if(typeof document=="undefined"||n){let a=Wt(s);return S(a[0],e,r,null,i).outerHTML}else{let a=document.createElement("div");return a.innerHTML=s,S(a,e,r,null,i),a.innerHTML}}var Y=class{constructor(e,r=1,n){this.ownerDocument={createElement(i){return new Y(i)},createDocumentFragment(){return new Y(null,11)}},this.nodeName=e,this.nodeType=r,this.textContent=n,this.attributes=[],this.childNodes=[]}setAttribute(e,r){let n=this.attributes.find(i=>i.name===e);n?n.value=r:this.attributes.push({name:e,value:r})}getAttribute(e){let r=this.attributes.find(n=>n.name===e);return r?r.value:void 0}insertBefore(e,r){if(e.parentNode=this,r===null)this.childNodes.push(e);else{let n=this.childNodes.indexOf(r);n!==-1&&this.childNodes.splice(n,0,e)}}removeAttribute(e){let r=this.attributes.findIndex(n=>n.name===e);r!==-1&&this.attributes.splice(r,1)}appendChild(e){e.parentNode=this,this.childNodes.push(e)}get tagName(){var e;return(e=this.nodeName)===null||e===void 0?void 0:e.toUpperCase()}get localName(){var e;return(e=this.nodeName)===null||e===void 0?void 0:e.toLowerCase()}get innerHTML(){return le(this.childNodes)}set innerHTML(e){this.childNodes=Wt(String(e!=null?e:""))}get outerHTML(){return le([this])}get children(){return this.childNodes.filter(e=>e.nodeType==1)}closest(e){let r=this;for(;r;){if(Je(e,r))return r;r=r.parentNode}return null}querySelectorAll(e){let r=e.split(/\s*,\s*/),n=[],i=o=>{for(let s of r)if(Je(s,o)){n.push(o);break}for(let s of o.childNodes)i(s)};for(let o of this.childNodes)i(o);return n}querySelector(e){return this.querySelectorAll(e)[0]}findSibling(e,r){if(!this.parentNode)return null;let n=this.parentNode.childNodes,i=n.indexOf(this);if(i===-1)return null;for(let o=i+e;o>=0&&o<n.length;o+=e){let s=n[o];if(!r||s.nodeType===1)return s}return null}removeChild(e){let r=this.childNodes.indexOf(e);if(r!==-1)return this.childNodes.splice(r,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 r=new Y(this.nodeName,this.nodeType);if(r.attributes=JSON.parse(JSON.stringify(this.attributes)),this.textContent&&(r.textContent=this.textContent),e)for(let n of this.childNodes){let i=n.cloneNode(!0);r.appendChild(i)}return r}get parentElement(){var e;return((e=this.parentNode)===null||e===void 0?void 0:e.nodeType)==1?this.parentNode:null}};function Je(t,e){let r=t.match(/([.#]?[\w-]+|\[([\w-]+)(="([^"]*)")?\])/g);if(!r)return!1;for(let n of r)if(n.startsWith("#")){if(e.getAttribute("id")!==n.slice(1))return!1}else if(n.startsWith(".")){if(!(e.getAttribute("class")||"").split(" ").includes(n.slice(1)))return!1}else if(n.startsWith("[")){let i=n.match(/^\[([\w-]+)(="([^"]*)")?\]$/);if(i){let o=i[1],s=i[3],a=e.getAttribute(o);if(typeof s=="undefined"){if(a===void 0)return!1}else if(a!==s)return!1}else return!1}else if(e.nodeName!==n)return!1;return!0}function Wt(t){var e;let r=[],n=[];for(;t;){let i=t.match(/^<([\w-]+)(\s[^>]*)?>/),o=t.match(/^<\/([\w-]+)>/);if(i){let s=i[1].toLowerCase(),l=((e=(i[2]||"").match(/([\w-]+)(="([^"]*)")?/g))===null||e===void 0?void 0:e.map(d=>{let[u,h,,p]=d.match(/([\w-]+)(="([^"]*)")?/);return{name:h,value:Pr(p||"")}}))||[],c=new Y(s,1);if(c.attributes=l,n.length>0){let d=n[n.length-1];d.childNodes.push(c),c.parentNode=d}else r.push(c);["img","input","br"].includes(s)||n.push(c),t=t.slice(i[0].length)}else if(o)n.pop(),t=t.slice(o[0].length);else{let s=t.indexOf("<"),a=t.slice(0,s!==-1?s:void 0),l=new Y("#text",3);if(l.textContent=a,n.length>0){let c=n[n.length-1];c.childNodes.push(l),l.parentNode=c}else r.push(l);t=t.slice(a.length)}}return r}function kr(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function Pr(t){return t.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#x27;/g,"'")}function le(t){return t.map(e=>{if(e.nodeType===3)return e.textContent||"";let{nodeName:r,attributes:n}=e,i=n.map(({name:s,value:a})=>` ${s}="${kr(String(a))}"`).join(""),o=le(e.childNodes);return["img","input","br"].includes(r)?`<${r}${i} />`:`<${r}${i}>${o}</${r}>`}).join("")}function Ye(t,e,r){return Ht(t,e,r)[0].outerHTML}function Ht(t,e,r){var n;let i=((n=r==null?void 0:r.processTemplate)===null||n===void 0?void 0:n.call(r,null,t,e))||t,o=Wt(i);return console.log("=== parseHTMLContent",o),o.map(s=>(console.log("=== renderDOMElement result",S(s,e,r)),S(s,e,r)))}var qe=require("@sitecore/byoc");function Tr(t){let{params:e,method:r,headers:n,body:i,url:o}=x(t);var s={url:o},a={...n};return n["Content-Type"]==="application/json"&&delete a["Content-Type"],n.Accept==="application/json"&&delete a.Accept,Object.keys(a).length>0&&(s.headers=a),r!=="GET"&&(s.method=r),r==="GET"||r==="HEAD"||Object.keys(i).length===0||(s.body=i),Object.keys(e).length>0&&(s={...s,params:e}),s}var lt=t=>{if(!t||typeof t.url!="string")return!1;for(var e in t)if(!(e=="body"||e=="params"||e=="headers"||e=="url"||e==="method"||e=="jsonpath"&&typeof t[e]=="string"))return!1;return!0};function Ge(t){let{url:e,headers:r,params:n,method:i,body:o}=x(t),s,a=r["Content-Type"];i!="GET"&&i!="HEAD"&&(a==="application/json"&&(s=JSON.stringify(o)),a==="multipart/form-data"&&(s=Object.keys(o).reduce((c,d)=>(c.append(d,o[d]),c),new FormData)),a==="application/x-www-form-urlencoded"&&(s=new URLSearchParams(o)));let l=Object.keys(n).length?`?${new URLSearchParams(n)}`:"";return[`${e}${l}`,{headers:r,body:s,method:i}]}function x(t){let e={};for(let r in(t==null?void 0:t.headers)||{})if(t.headers.hasOwnProperty(r)){let n=r.replace(/^[a-z]|\-[a-z]/g,i=>i.toUpperCase());e[n]=t.headers[r]}return e.Accept||(e.Accept="application/json"),{params:(t==null?void 0:t.params)||{},headers:e,jsonpath:String((t==null?void 0:t.jsonpath)||"$"),method:((t==null?void 0:t.method)||"GET").toUpperCase(),body:(t==null?void 0:t.body)||{},url:String((t==null?void 0:t.url)||"")}}var ce=async(t,e)=>{let r=(0,qe.customizeDataSettings)(e,t);if(r instanceof Promise)return r;let n=t;r&&(n=x(r));try{let[i,o]=Ge(n),a=await(await x.fetchImplementation(i,{...o,method:o.method.toLowerCase()})).json();return n.jsonpath&&n.jsonpath!="$"?et(a,n.jsonpath):a}catch(i){return{}}};async function zt(t){if(!t)return t;if(lt(t))return ce(t);let e=Object.keys(t),r=await Promise.all(e.map(n=>lt(t[n])?ce(t[n],n):null).filter(Boolean));return e.reduce((n,i)=>({...n,[i]:lt(t[i])?r.shift():t[i]}),{})}function Mr(t){return t?lt(t)||Object.values(t).some(lt):!1}x.clean=Tr;x.toFetchArguments=Ge;x.fetchOne=ce;x.fetch=zt;x.isDataSettings=lt;x.hasDataSettings=Mr;x.fetchImplementation=(...t)=>fetch(...t);var Se={};it(Se,{Component:()=>ft,ComponentProps:()=>ve,Context:()=>X,ControlledPromise:()=>O,DEFAULT_CDN_URL:()=>M,DOM:()=>Dt,DataPath:()=>Ot,DataScope:()=>_t,DataSettings:()=>x,Element:()=>E,FEAASComponent:()=>ft,FEAASComponentsProps:()=>ve,FEAASContext:()=>X,FEAASContextProps:()=>we,FEAASEditor:()=>vt,FEAASEditorProps:()=>Ee,FEAASElement:()=>E,FEAASLoader:()=>mt,FEAASLoaderProps:()=>ge,FEAASPicker:()=>gt,FEAASPickerProps:()=>xe,FEAASStylesheet:()=>Lt,FEAASStylesheetProps:()=>ye,InvalidResponse:()=>kt,JSONPath:()=>v,Loader:()=>mt,MyComponent:()=>Nt,Picker:()=>gt,Stylesheet:()=>Lt,Thumbnail:()=>$t,WebComponent:()=>de,adjustNumbers:()=>oe,autoloadScripts:()=>ee,cleanCollectionBit:()=>at,clearFetchCache:()=>Xe,createStylesheet:()=>fe,customizeDataSettings:()=>k.customizeDataSettings,fetchAndRevalidate:()=>ut,fetchAndRevalidateComponent:()=>rt,fetchAndRevalidateStylesheet:()=>Tt,fetchBypassingCache:()=>Pt,fetchCache:()=>dt,fetchComponent:()=>Jt,fetchData:()=>zt,fetchToValidateCache:()=>ht,fetchWithCacheAwareness:()=>q,findStylesheet:()=>pe,getComponent:()=>k.getComponent,getComponentSource:()=>Qe,getComponentURL:()=>pt,getFetchCache:()=>ue,getFramePosition:()=>Ce,getHumanizedLabel:()=>se,getLastPathBit:()=>ae,getQualifier:()=>ie,getStylesheetSource:()=>Vt,getStylesheetURL:()=>K,loadScript:()=>st,loadStylesheet:()=>Mt,loadStylesheetAllowStale:()=>Yt,normalizeCollectionScope:()=>Ft,observeDOMElement:()=>te,parseComponentSource:()=>G,parseLimit:()=>re,parseRange:()=>ne,parseStylesheetSource:()=>W,queryObject:()=>et,queryObjectRaw:()=>Ut,queryScopes:()=>ot,registerComponent:()=>k.registerComponent,registerDatasource:()=>k.registerDatasource,renderComponent:()=>qt,renderComponentElement:()=>tr,renderComponentPromise:()=>me,renderDOMContent:()=>J,renderDOMElement:()=>S,renderHTMLContent:()=>Ve,renderStylesheet:()=>Ze,renderStylesheetPromise:()=>he,serializeCH1RichText:()=>V,setDOMAttribute:()=>U});function O(t,e=r=>{}){var r;let n=()=>{var i,o;let s=new Promise((l,c)=>{i=d=>{t==null||t(d),l(d)},o=c});var a=Object.assign(s,{resolve:i,reject:o,restart:n,first:r});return r=a,a.catch(e),a};return n()}var de=typeof HTMLElement=="undefined"?typeof windowJSDOM!="undefined"?windowJSDOM.HTMLElement:class{}:HTMLElement,E=class extends de{getProps(e){return{}}constructor(){super(),this.defaultProps={},this.connected=!1,this.refs={},this.descendants=[],this.whenLoaded=O(e=>{this.payload=e}),this.whenRendered=O(()=>this.initialized=!0,()=>this.cancelRender()),this.addEventListener("feaasMount",this),this.addEventListener("feaasUnmount",this)}getRoot(){return this}attributeChangedCallback(e,r,n){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(r=>{var n;return(n=r.mount)===null||n===void 0?void 0:n.call(r)}),this.set()}catch(e){this.onError(e)}}dispatchEventIndirectly(e){this.dispatchEvent(e);let r=this.getParent();r&&!r.contains(this)&&(Object.defineProperty(e,"target",{value:this,writable:!1}),Object.defineProperty(e,"composedPath",{value:()=>[this],writable:!1}),r.handleEvent(e))}isJSONAttribute(e){return!1}log(...e){let r=e[0];(typeof location!="undefined"&&(location!=null&&location.hostname.startsWith("components-"))||localStorage["Sitecore.Components.Debug"])&&console.log(r+" "+e.slice(1).map(n=>n&&typeof n=="object"?"%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 r=this;r=r.parentElement||(r.parentNode instanceof ShadowRoot?r.parentNode.host:null);)if(!e||r.tagName.startsWith("FEAAS-"))return r;if(this.tagName!="FEAAS-CONTEXT")return document.querySelector("feaas-context")}getElements(e=this.getRoot(),r=!0){return Array.from(e.querySelectorAll("*")).map(n=>[!r||n.tagName.startsWith("FEAAS-")?n:null,n.shadowRoot?this.getElements(n.shadowRoot,r):null]).flat().filter(Boolean)}handleEvent(e){let r=e.composedPath()[0];switch(e.type){case"feaasMount":r!=this&&this.nestedCallback(r);break;case"feaasUnmount":r!=this&&this.unnestedCallback(r);break}}unnestedCallback(e){let r=this.descendants.indexOf(e);r!=-1&&(this.log("FEAAS: Unnest",this,e),this.descendants.splice(r,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 r,n;if(this.descendants.indexOf(e)==-1&&(this.descendants.push(e),this.log("FEAAS: Nest",this,e),this.refs[e.getComponentName()]=e,e.refs.top=this,(r=e.refs).parent||(r.parent=this),e.render))for(var o=e.refs.parent;o;o=o.refs.parent)o.render&&((n=e.refs).parentReact||(n.parentReact=o),e.refs.topReact=o)}getComponentName(){return this.tagName.replace("FEAAS-","").toLowerCase()}isReadyToLoad(){return this.payload===void 0&&this.getAttribute("hidden")==null}onError(e,r="uncaught",n=!1){let i=new CustomEvent("feaasError",{bubbles:!0,composed:!0,detail:e});if(this.dispatchEventIndirectly(i),this.whenLoaded.reject(e),!i.defaultPrevented&&!n){this.whenRendered.reject(e);try{this.unmount()}catch(o){}return!0}return!1}shouldUpdateOnLoad(){return!0}async advance(){try{if(this.payload===void 0){if(!this.isReadyToLoad())return;this.payload=null,this.dispatchEventIndirectly(new Event("feaasLoad",{bubbles:!0,composed:!0}));let e=await this.load().catch(r=>{throw this.payload=void 0,r});if(this.whenLoaded.resolve(e),this.onLoad)return}else if(this.payload==null)return;this.flush(),this.whenRendered.resolve(this)}catch(e){this.onError(e)}}flush(){var e,r;if(!this.connected)return;let n=(r=(e=this.payload)===null||e===void 0?void 0:e.ReactDOM)===null||r===void 0?void 0:r.flushSync;n?n(()=>this.update()):this.update()}load(){return Promise.resolve(null)}update(){var e,r,n;if(this.payload==null||!this.render)return;let{React:i,ReactDOM:o,ReactDOMClient:s}=this.payload||{};if(!i)throw new Error(`${this.tagName}: React is not present in payload`);if(!o)throw new Error(`${this.tagName}: ReactDOM is not present in payload`);this.getAttribute("hydrate")=="false"&&this.firstElementChild||(!this.refs.topReact&&!this.forceUpdateReact?(this.reactRoot||(this.reactRoot=s.createRoot(this.getReactRootElement())),this.reactRoot.render(this.getReactElement())):this.forceUpdateReact&&this.connected?(e=this.forceUpdateReact)===null||e===void 0||e.call(this):(n=(r=this.refs.topReact)===null||r===void 0?void 0:r.forceUpdateReact)===null||n===void 0||n.call(r))}invokeReactRendering(){let{React:e,ReactDOM:r}=this.payload||{};if(!this.connected)return null;let n=this.descendants.filter(i=>i.refs.parentReact==this&&i.payload&&i.connected).map((i,o)=>this.getReactElement(i));return this.render({...this.props,children:n},this.payload)}getReactErrorBoundary(e=this,r=e.tagName){if(this.reactErrorBoundary)return this.reactErrorBoundary;let{React:n,ReactDOM:i}=e.payload||{};return this.reactErrorBoundary||(this.reactErrorBoundary=class extends n.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromError(s){return{error:s}}componentDidCatch(s,a){console.error(`FEAAS: ${e.tagName} Error:`,s,a),e.onError(s,"react")}render(){if(!this.state.error)return this.props.children}})}getReactElement(e=this,r){let{React:n,ReactDOM:i}=e.payload||{},o=this.getReactErrorBoundary(),s=this.getReactWrapper(e);return n.createElement(o,{key:e.tagName+"-"+e.getUID(),slot:e.getAttribute("slot")},n.createElement(s,null))}getReactWrapper(e=this,r=e.tagName){if(e.reactWrapper)return e.reactWrapper;let{React:n,ReactDOM:i}=e.payload||{};return e.reactWrapper=o=>{if(e.render){let[s,a]=n.useReducer(l=>l+1,0);return e.forceUpdateReact=a,i.createPortal(n.createElement(n.Fragment,null,e.invokeReactRendering()),e.getReactRootElement())}else return e.update()},Object.assign(e.reactWrapper,{key:e.tagName+"-"+e.getUID(),displayName:r}),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{this.scheduleRender(),this.overrides={...this.overrides,...e},this.props={...this.getProps(),...this.overrides};for(var r in this.props){let i=this.isJSONAttribute(r),o=this.props[r],s=i?JSON.stringify(o):String(o),a=this.defaultProps[r],l=i?JSON.stringify(a):String(a),c=r.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),d=this.getAttribute(c);try{var n=i?JSON.stringify(JSON.parse(d)):d}catch(u){var n=null}o==null||s===l?this.removeAttribute(c):(typeof o=="string"||typeof o=="number"||typeof o=="boolean"||i)&&n!=s&&this.setAttribute(c,s)}}catch(i){this.whenRendered.reject(i),this.onError(i,"set")}return this}import(e){return import( /*@vite-ignore*/ /* webpackIgnore: true */ e)}scheduleRender(){this.nextRender==null&&(this.whenRendered=this.whenRendered.restart()),this.cancelRender(),this.nextRender=requestAnimationFrame(()=>{this.nextRender=null,this.advance().catch(e=>{})})}cancelRender(){cancelAnimationFrame(this.nextRender)}formatURL(e,r){return typeof e=="string"&&e.match(/^\/[^\/]/)?r+e:e}getContextAttribute(e,r=this){for(var n=this;n=n.parentElement||(n.parentNode instanceof ShadowRoot?n.parentNode.host:null);)if(n.getAttribute(e)!=null)return n.getAttribute(e);return this.getAttribute(e)}static register(e,r){r==null&&(r=typeof window!="undefined"?window:null),r&&!r.customElements.get(e)&&r.customElements.define(e,this)}};var ct=class extends E{load(){return Promise.all([import( /*@vite-ignore*/ /* webpackIgnore: true */ "https://cdn.skypack.dev/react"),import( /*@vite-ignore*/ /* webpackIgnore: true */ "https://cdn.skypack.dev/react-dom"),import( /*@vite-ignore*/ /* webpackIgnore: true */ "https://cdn.skypack.dev/react-dom/client")]).then(([e,r,n])=>({React:e,ReactDOM:r,ReactDOMClient:n}))}render({},{React:e}){return e.createElement(e.Fragment,null)}},Nt=class extends ct{constructor(){super(...arguments),this.useShadowRoot=!0}getProps(){return{counter:parseFloat(this.getAttribute("counter"))}}render({counter:e},{React:r}){let[n,i]=r.useState(0);return r.useEffect(()=>{i(o=>o+1)},[e]),r.createElement(r.Fragment,null,r.createElement("p",null,"Rendering attribute: ",e),r.createElement("p",null,"Triggered updates: ",n))}};Nt.observedAttributes=["counter"];var Ke=["initial","check","updated"],dt={};function Xe(){dt={}}async function ut(t,e,r,n,i=dt){return q({url:t,options:e,validator:r,callback:n,cache:i}).then(ht).then(o=>o.response)}async function q({url:t,options:e,validator:r,callback:n,cache:i},o="initial"){let s=new Date;if(i!=null){var a=ue(t);if(Ke.indexOf(a.phase)>=Ke.indexOf(o))var l=a[o];else a.phase=o}let c=await(l||fetch(t,e));if(!l&&a&&(c.ok?a[o].resolve(c):a[o].reject(new Error("Fetch failed"))),!c.ok)throw new Error("Fetch failed");let d=new Date(c.headers.get("date"))<s||l&&o=="initial"&&(a.phase=="updated"||a.phase=="check");if((r==null?void 0:r(c,d))===!1)throw new kt("Response is not valid");return await(n==null?void 0:n(c,o,d)),{url:t,options:e,isCached:d,response:c,validator:r,callback:n,cache:i}}function ue(t,e=!1){let r=String(t).replace("?head","");var n=dt[r];return!n&&!e&&(n=dt[r]={phase:null,initial:O(),check:O(),updated:O(),final:O()}),n}var kt=class extends Error{};async function ht(t){let{url:e,isCached:r,options:n,validator:i,response:o,cache:s}=t;if(r){let{response:a}=await q({url:e+(e.toString().includes("?")?"&":"?")+"head",options:{...n,method:"HEAD",cache:"no-cache"},validator:i,cache:s},"check");if(a.headers.get("last-modified")!=o.headers.get("last-modified"))return Pt(t)}return t}async function Pt(t){return q({...t,options:{...t.options,cache:"reload"}},"updated")}var M="https://feaas.blob.core.windows.net";function G(t){let e=t==null?void 0:t.match(/^(?:(.*?)\/components)?\/?([^\/]+)\/([^\/]+)(?:\/([^\/]+)(?:\/(published|staged|saved|\d+)(?:\.html?)?)?)?$/);if(e){var[,r,n,i,o,s]=e;return{cdn:r,library:n,component:i,version:o,revision:s}}}function Qe(t){if(!t||!t.library||!t.component)throw new Error("Component requires `library` and `component` properties");return`${t.cdn&&t.cdn!=M?`${t.cdn}/components`:""}/${t.library}/${t.component}/${!t.version||t.version=="responsive"&&(!t.revision||t.revision=="published")?"":t.version}/${!t.revision||t.revision=="published"?"":t.revision}`.replace(/(^\/|\/$|\/\/)(?!.+\/components\/)/g,"")}function Vt(t){return`${t.cdn&&t.cdn!=M?`${t.cdn}/styles/`:""}${t.library}/${!t.revision||t.revision=="published"?"":t.revision}`.replace(/\/$|\/\/(?!.+\/styles\/)/g,"")}function W(t){let e=t==null?void 0:t.match(/^(?:(.*?)\/styles\/)?([^\/]+)(?:\/(published|staged|saved|\d+)(?:.css)?)?$/);if(e){var[,r,n,i]=e;return{cdn:r,library:n,revision:i}}else{let o=G(t);if(o){var{cdn:r,library:n,revision:i}=o;return i!=null&&i.match(/\d/)&&(i=void 0),{cdn:r,library:n,revision:i}}}}function pt(t){return typeof t=="string"&&(t={src:t}),"src"in t&&t.src?t={...G(t.src)}:t={...t},`${t.cdn||t.hostname||M}/components/${t.library}/${t.component}/${t.version||"responsive"}/${t.revision||"published"}.html`}function K(t){if(typeof t=="string"&&(t={src:t}),"src"in t){if(String(t.src).includes("v1/files/components/styles"))return t.src;t={...W(t.src)}}else t={...t};return`${t.cdn||t.hostname||M}/styles/${t.library}/${t.revision=="staged"?"staged":t.revision=="saved"?"saved":"published"}.css`}async function rt(t,e,r=!1){let n=a=>a.headers.get("x-ms-meta-versionDeletedAt")==null,i=a=>a.clone().text().then(e),o=await Promise.all([t.instance&&q({options:{headers:{Accept:"text/html"},credentials:"omit"},url:pt({...t,version:t.instance}),validator:n}).catch(a=>a),q({url:pt(t),validator:n}).catch(a=>a)]),s=o.find(a=>a&&"isCached"in a&&a);if(!s||s instanceof Error)throw o.find(l=>l&&l instanceof Error)||new Error("Can not fetch component");return o[0]==s&&console.log("Using fork!",o),await i(s.response),r?s:ht({...s,callback:i}).catch(a=>{if(o[0]==s&&(Pt({...s,callback:null,validator:null}),console.log("Fork was deleted"),!(o[1]instanceof Error)))return i(o[1].response),ht({...o[1],callback:i});throw a})}async function Jt(t){typeof t=="string"&&(t={src:t});var e;let{response:r}=await rt(t,n=>{e=n},!0);return{...t,template:e,lastModified:r.headers.get("last-modified")}}async function Tt(t,e){return ut(K(t),{headers:{Accept:"text/css"},credentials:"omit"},r=>r.headers.get("x-ms-meta-deletedAt")==null,(r,n)=>r.clone().text().then(i=>e(i,n)))}function Ze(t,e){return he(t,e||(e=document.createElement("style"))),e}function he(t,e){return e||(e=document.createElement("style")),Tt(t,(r,n)=>{e.textContent=r}).then(()=>e)}var Lr=new WeakSet;function Mt(t,e){var r,n=pe(t);if(n){if(Lr.has(n))return Promise.resolve(n);t=n.getAttribute("data-href")||n.getAttribute("href")}return Tt(t,(i,o)=>{o=="initial"&&n||(r||(r=!n||n.tagName=="LINK"?fe(t):n),r.textContent=i),e==null||e(i,o)}).then(()=>r||n)}function Yt(t){return new Promise((e,r)=>{Mt(t,e).catch(r)})}function pe(t){let e=K(t),{library:r}=W(e),n=`/files/components/styles/${r}.css`;return document.querySelector(`style[data-href="${e}"],
5
5
  link[rel="stylesheet"][href="${e}"],
6
6
  style[data-href*="${n}"],
7
- link[rel="stylesheet"][href*="${n}"]`)}function fe(t){let e=K(t),r=document.createElement("style");return r.setAttribute("data-href",e),document.head.appendChild(r),r}function tr(t,e){let r=document.createElement("div");r.innerHTML=t;let n=document.createDocumentFragment();for(;r.firstChild;)n.appendChild(r.firstChild);return console.log("=== renderComponentElement",n,e),S(n,e),r}function Yt(t,e,r=!0){return me(t,e||(e=document.createElement("div")),r),e}async function me(t,e,r=!0){return e||(e=document.createElement("div")),e.childNodes.length?(console.log("=== renderComponentPromise",e,t.data),S(e,t.data,t,null,r)):"template"in t?J(e,t.template,t.data,t,r):rt(t,n=>J(e,n,t.data,t,r)).then(()=>e)}function ve(t){var e,r,n,i,o,s,a,l;let c,d=t.getAttribute("src");if(d){let N=G(d);if(!N)throw new Error(`Could not parse FEAAS Component source: ${d}`);var{cdn:u,library:h,component:p,version:f,revision:m}=N}let g=t.getAttribute("data");if(g!=null&&g!="")try{c=typeof g=="string"?JSON.parse(g):{}}catch(N){console.error(N)}let b=t.getAttribute("fetch");return{data:c||{},cdn:(r=(e=t.getContextAttribute("cdn"))!==null&&e!==void 0?e:u)!==null&&r!==void 0?r:M,library:(n=t.getAttribute("library"))!==null&&n!==void 0?n:h,component:(i=t.getAttribute("component"))!==null&&i!==void 0?i:p,version:(s=(o=t.getAttribute("version"))!==null&&o!==void 0?o:f)!==null&&s!==void 0?s:"responsive",revision:(l=(a=t.getAttribute("revision"))!==null&&a!==void 0?a:m)!==null&&l!==void 0?l:"published",hostname:t.getAttribute("hostname"),template:t.getAttribute("template"),instance:t.getAttribute("instance"),editable:t.getAttribute("editable")!=null,suspended:t.getAttribute("suspended")!=null,lastModified:t.getAttribute("last-modified"),fetch:b=="false"||b==null&&t.hasAttribute("fetch")?[]:b==null||b=="true"?["data","template","stylesheet"]:b.split(/(\s+|\-)+/g).filter(Boolean)}}var ft=class extends E{setData(e){this.set({data:e})}getProps(){return ve(this)}isJSONAttribute(e){return e=="data"}attributeChangedCallback(e,r,n){r!==n&&((e=="library"||e=="component"||e=="revision"||e=="version")&&(this.payload=void 0,this.alreadyRendered&&this.connected&&(this.needsRefresh=!0,this.needsToFetchTemplate=!0)),super.attributeChangedCallback(e,r,n),e=="data"&&(this.needsRefresh=!0,(this.props.fetch.includes("data")||this.alreadyRendered||!x.hasDataSettings(this.props.data))&&this.fetchData()))}async fetchData(){this.readyData=void 0,this.whenDataReady=this.whenDataReady.restart();let e=await x.fetch(this.props.data),r=this.alreadyRendered;await this.whenDataReady.resolve(e),r&&this.advance()}getEditor(){var e;return(e=document.querySelector("feaas-context"))===null||e===void 0?void 0:e.refs.editor}constructor(){super(),this.readyData={},this.whenDataReady=O(r=>this.readyData=r,r=>this.onError(r)),this.defaultProps={cdn:M,revision:"published",version:"responsive",editable:!1,suspended:!1,data:{}},this.onLoad=r=>{this.payload=r,this.advance()};let e=this.getAttribute("data");this.getAttribute("data")||this.whenDataReady.resolve({}),this.addEventListener("click",()=>{this.props.editable&&this.edit()})}edit(){let e=this.getEditor();if(e!=null&&e.setTarget(this))return e.open(),!0}getOriginal(){let e=this.getAttribute("data-path-scope");if(e){for(var r=this;(r=r.previousElementSibling)&&r.getAttribute("data-path-scope")==e;)var n=r;return n}}isReadyToLoad(){return super.isReadyToLoad()&&this.props.library!=null&&this.props.component!=null&&this.props.version!=null}async load(){var e;if(this.getOriginal())return;let r=()=>{this.payload!=null&&(n||this.readyData&&this.onLoad(this.payload))};if(this.props.fetch.includes("stylesheet"))var n=Jt({...this.props}).then(()=>{n=null,r()});if(this.props.fetch.includes("template")||this.needsToFetchTemplate){this.needsToFetchTemplate=!1;var i=rt(this.props,o=>{this.payload=o,this.needsRefresh=!0,r()})}else this.payload=(e=this.props.template)!==null&&e!==void 0?e:this.innerHTML;return Promise.all([n,this.whenDataReady.then(()=>r()),i]).then(()=>this.payload)}flush(){this.readyData&&super.flush()}update(){if(this.alreadyRendered=!0,console.log("=== feaascomponent update",this.alreadyRendered),!(!this.props.fetch.includes("data")&&!this.props.fetch.includes("template")&&this.firstElementChild&&!this.needsRefresh))if(Array.from(this.children).filter(e=>e.tagName!="BR").length>0&&!this.needsRefresh)S(this,this.readyData);else{if(this.needsRefresh=!1,this.getOriginal())return;J(this,this.payload,this.readyData)}}};ft.observedAttributes=["library","component","version","revision","hostname","cdn","template","data","instance","editable","with-stylesheet","fetch"];ft.register("feaas-component");function ge(t){return{opacity:t!=null&&t.getAttribute("opacity")?parseFloat(t==null?void 0:t.getAttribute("opacity")):1,hidden:(t==null?void 0:t.getAttribute("hidden"))!=null}}var mt=class extends E{constructor(){super(...arguments),this.defaultProps={hidden:!1}}getProps(){return ge(this)}attributeChangedCallback(e,r,n){if(r!==n)return e=="hidden"&&(this.style.setProperty("display","block","important"),this.style.setProperty("transition","opacity 0.3s","important"),n?(this.style.setProperty("opacity","0","important"),this.style.pointerEvents="none"):(this.style.setProperty("opacity","1","important"),this.style.pointerEvents="all")),super.attributeChangedCallback(e,r,n)}connectedCallback(){this.payload=null,super.connectedCallback(),this.attributeChangedCallback("hidden",this.getAttribute("hidden"),this.getAttribute("hidden")),this.stylesheet=document.createElement("style"),this.stylesheet.textContent=`
7
+ link[rel="stylesheet"][href*="${n}"]`)}function fe(t){let e=K(t),r=document.createElement("style");return r.setAttribute("data-href",e),document.head.appendChild(r),r}function tr(t,e){let r=document.createElement("div");r.innerHTML=t;let n=document.createDocumentFragment();for(;r.firstChild;)n.appendChild(r.firstChild);return console.log("=== renderComponentElement",n,e),S(n,e),r}function qt(t,e,r=!0){return me(t,e||(e=document.createElement("div")),r),e}async function me(t,e,r=!0){return e||(e=document.createElement("div")),e.childNodes.length?(console.log("=== renderComponentPromise",e,t.data),S(e,t.data,t,null,r)):"template"in t?J(e,t.template,t.data,t,r):rt(t,n=>J(e,n,t.data,t,r)).then(()=>e)}function ve(t){var e,r,n,i,o,s,a,l;let c,d=t.getAttribute("src");if(d){let N=G(d);if(!N)throw new Error(`Could not parse FEAAS Component source: ${d}`);var{cdn:u,library:h,component:p,version:f,revision:m}=N}let g=t.getAttribute("data");if(g!=null&&g!="")try{c=typeof g=="string"?JSON.parse(g):{}}catch(N){console.error(N)}let b=t.getAttribute("fetch");return{data:c||{},cdn:(r=(e=t.getContextAttribute("cdn"))!==null&&e!==void 0?e:u)!==null&&r!==void 0?r:M,library:(n=t.getAttribute("library"))!==null&&n!==void 0?n:h,component:(i=t.getAttribute("component"))!==null&&i!==void 0?i:p,version:(s=(o=t.getAttribute("version"))!==null&&o!==void 0?o:f)!==null&&s!==void 0?s:"responsive",revision:(l=(a=t.getAttribute("revision"))!==null&&a!==void 0?a:m)!==null&&l!==void 0?l:"published",hostname:t.getAttribute("hostname"),template:t.getAttribute("template"),instance:t.getAttribute("instance"),editable:t.getAttribute("editable")!=null,suspended:t.getAttribute("suspended")!=null,lastModified:t.getAttribute("last-modified"),fetch:b=="false"||b==null&&t.hasAttribute("fetch")?[]:b==null||b=="true"?["data","template","stylesheet"]:b.split(/(\s+|\-)+/g).filter(Boolean)}}var ft=class extends E{setData(e){this.set({data:e})}getProps(){return ve(this)}isJSONAttribute(e){return e=="data"}attributeChangedCallback(e,r,n){r!==n&&((e=="library"||e=="component"||e=="revision"||e=="version")&&(this.payload=void 0,this.alreadyRendered&&this.connected&&(this.needsRefresh=!0,this.needsToFetchTemplate=!0)),super.attributeChangedCallback(e,r,n),e=="data"&&(this.needsRefresh=!0,(this.props.fetch.includes("data")||this.alreadyRendered||!x.hasDataSettings(this.props.data))&&this.fetchData()))}async fetchData(){this.readyData=void 0,this.whenDataReady=this.whenDataReady.restart();let e=await x.fetch(this.props.data),r=this.alreadyRendered;await this.whenDataReady.resolve(e),r&&this.advance()}getEditor(){var e;return(e=document.querySelector("feaas-context"))===null||e===void 0?void 0:e.refs.editor}constructor(){super(),this.readyData={},this.whenDataReady=O(r=>this.readyData=r,r=>this.onError(r)),this.defaultProps={cdn:M,revision:"published",version:"responsive",editable:!1,suspended:!1,data:{}},this.onLoad=r=>{this.payload=r,this.advance()};let e=this.getAttribute("data");this.getAttribute("data")||this.whenDataReady.resolve({}),this.addEventListener("click",()=>{this.props.editable&&this.edit()})}edit(){let e=this.getEditor();if(e!=null&&e.setTarget(this))return e.open(),!0}getOriginal(){let e=this.getAttribute("data-path-scope");if(e){for(var r=this;(r=r.previousElementSibling)&&r.getAttribute("data-path-scope")==e;)var n=r;return n}}isReadyToLoad(){return super.isReadyToLoad()&&this.props.library!=null&&this.props.component!=null&&this.props.version!=null}async load(){var e;if(this.getOriginal())return;let r=()=>{this.payload!=null&&(n||this.readyData&&this.onLoad(this.payload))};if(this.props.fetch.includes("stylesheet"))var n=Yt({...this.props}).then(()=>{n=null,r()});if(this.props.fetch.includes("template")||this.needsToFetchTemplate){this.needsToFetchTemplate=!1;var i=rt(this.props,o=>{this.payload=o,this.needsRefresh=!0,r()})}else this.payload=(e=this.props.template)!==null&&e!==void 0?e:this.innerHTML;return Promise.all([n,this.whenDataReady.then(()=>r()),i]).then(()=>this.payload)}flush(){this.readyData&&super.flush()}update(){if(this.alreadyRendered=!0,console.log("=== feaascomponent update",this.alreadyRendered),!(!this.props.fetch.includes("data")&&!this.props.fetch.includes("template")&&this.firstElementChild&&!this.needsRefresh))if(Array.from(this.children).filter(e=>e.tagName!="BR").length>0&&!this.needsRefresh)S(this,this.readyData);else{if(this.needsRefresh=!1,this.getOriginal())return;J(this,this.payload,this.readyData)}}};ft.observedAttributes=["library","component","version","revision","hostname","cdn","template","data","instance","editable","with-stylesheet","fetch"];ft.register("feaas-component");function ge(t){return{opacity:t!=null&&t.getAttribute("opacity")?parseFloat(t==null?void 0:t.getAttribute("opacity")):1,hidden:(t==null?void 0:t.getAttribute("hidden"))!=null}}var mt=class extends E{constructor(){super(...arguments),this.defaultProps={hidden:!1}}getProps(){return ge(this)}attributeChangedCallback(e,r,n){if(r!==n)return e=="hidden"&&(this.style.setProperty("display","block","important"),this.style.setProperty("transition","opacity 0.3s","important"),n?(this.style.setProperty("opacity","0","important"),this.style.pointerEvents="none"):(this.style.setProperty("opacity","1","important"),this.style.pointerEvents="all")),super.attributeChangedCallback(e,r,n)}connectedCallback(){this.payload=null,super.connectedCallback(),this.attributeChangedCallback("hidden",this.getAttribute("hidden"),this.getAttribute("hidden")),this.stylesheet=document.createElement("style"),this.stylesheet.textContent=`
8
8
  #loader {
9
9
  position: absolute;
10
10
  top: 0;
@@ -73,6 +73,6 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
73
73
  body, html { padding: 0; margin: 0; overflow: hidden }
74
74
  `;let u=s.contentWindow.document.createElement("style");u.textContent=`
75
75
  body, html { padding: 0; margin: 0; overflow: hidden }
76
- `,s.contentWindow.document.head.appendChild(d),s.contentWindow.document.head.appendChild(u);let h=Yt({template:r,data:n},null,!1);h.classList.add(...t,"-feaas--preview","-emulate--"+e.details.slug),s.contentWindow.document.body.appendChild(h)})}async function or(t,e,r){let n=e?e.getThumbnailURL():t.getThumbnailURL(),i=new Date(Math.max(Number(t.modifiedAt),Number(t.library.stylesheet.modifiedAt)));try{await t.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":e?e.id:null,"x-ms-meta-versionRevision":e?e.revision.toString():null,"x-ms-meta-componentId":t.id,"x-ms-meta-componentRenderedAt":i.toUTCString(),"x-ms-meta-componentModifiedAt":t.modifiedAt.toUTCString(),"x-ms-meta-componentCreatedAt":t.createdAt.toUTCString(),"x-ms-meta-modifiedAt":t.modifiedAt.toUTCString()}}),fetch(n,{cache:"no-cache"}).then(()=>{t.sdk.log("FEAAS: Thumbnail uploaded",n)})}catch(o){t.sdk.log("FEAAS: Thumbnail failed to upload",n,o)}return n}var k=require("@sitecore/byoc"),Ae;typeof window!="undefined"&&(window.FEAASReactElement=ct,(Ae=window.FEAASLoading)!==null&&Ae!==void 0||(window.FEAASLoading=Promise.resolve()));function Ce(t){let e=[];if(t){let r=t.ownerDocument.defaultView,n,i;for(;r!==window.top;){n=r.parent;for(let o=0;o<n.frames.length;o++)if(n.frames[o]===r){for(let s of n.document.getElementsByTagName("iframe"))if(s.contentWindow===r){i=s.getBoundingClientRect();let a=s.contentWindow.getComputedStyle(s);e.push({left:i.left+parseInt(a.borderLeftWidth),top:i.top+parseInt(a.borderTopWidth)})}r=n;break}}}return e.reduce((r,n)=>({left:r.left+n.left,top:r.top+n.top}),{left:0,top:0})}function Ee(t){var e;return{context:HTMLElement,frontend:t==null?void 0:t.getContextAttribute("frontend"),src:(e=t==null?void 0:t.getAttribute("src"))!==null&&e!==void 0?e:"/editor.js",library:t==null?void 0:t.getAttribute("library"),component:t==null?void 0:t.getAttribute("component"),version:t==null?void 0:t.getAttribute("version"),instance:t==null?void 0:t.getAttribute("instance"),forked:t==null?void 0:t.getAttribute("forked"),revision:(t==null?void 0:t.getAttribute("revision"))||"saved",hidden:(t==null?void 0:t.getAttribute("hidden"))!=null,for:t==null?void 0:t.getAttribute("for"),state:(t==null?void 0:t.getAttribute("state"))||"idle",changed:(t==null?void 0:t.getAttribute("changed"))!=null}}var vt=class extends E{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,r={component:e.getAttribute("component"),version:e.getAttribute("version"),revision:e.getAttribute("revision"),instance:e.getAttribute("instance")})=>{if(!this.closing&&(!this.target||e==null))return this.set(r),this.target=e,!0},this.onChromeMeasureElement=(e,r=e.getBoundingClientRect())=>e.ownerDocument==document?{left:r.left-this.bodyRect.left,top:r.top-this.bodyRect.top,width:r.width,height:r.height}:{left:r.left+this.framePoint.left-this.bodyRect.left,top:r.top+this.framePoint.top-this.bodyRect.top,width:r.width,height:r.height},this.onBeforeMeasure=e=>{e.memoized.focusable&&(this.framePoint=Ce(e.memoized.focusable)),this.chrome&&(this.wrapperRect=this.chrome.positionable.getBoundingClientRect(),this.bodyRect=this.chrome.positionable.ownerDocument.body.parentElement.getBoundingClientRect())},this.onMeasure=()=>{},this.onPosition=({focusable:e,root:r})=>{!this.chrome||this.props.hidden||(e?(this.chrome.wrapper.style.width=e.width+16*2+"px",this.chrome.wrapper.style.height=e.height+16*1+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=r.left+"px",this.chrome.absolute.style.top=r.top+"px")):(this.chrome.wrapper.style.opacity="0",this.chrome.wrapper.style.left="-1000px",this.chrome.wrapper.style.top="-1000px"))},this.onWindowMessage=e=>{var r;switch((r=e.data)===null||r===void 0?void 0:r.type){case"feaasEdit":let n=this.getPlaceholder();this.setTarget(n.editable,e.data)&&(this.loader=n.loader,document.body.appendChild(n.clipper),this.editedUID=e.data.id,this.setPlaceholder(),this.open());break;case"feaasMeasurements":this.measurements=e.data.measurements,this.props.hidden||this.setPlaceholder();break}},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"),!((e=this.target)===null||e===void 0)&&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,r)=>{this.versionContext=e,this.setVersionContext=r},this.onEditorStateChange=(e,r)=>{this.editorContext=e,this.setEditorContext=r,e.editor&&this.props.state=="loading"&&!this.props.hidden&&(this.setAttribute("state","ready"),this.ownerDocument.fonts.ready.then(()=>setTimeout(()=>{this.setReadyState(),this.setIframeComponentContent()},100)))}}getProps(){return Ee(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),this.target.tagName=="FEAAS-COMPONENT"&&(this.target.style.position="relative"))}hideLoader(){this.loader&&(this.loader.setAttribute("hidden","hidden"),this.target.tagName=="FEAAS-COMPONENT"&&(this.target.style.position="relative",this.target.style.position=""))}load(){return import( /*@vite-ignore*/ /* webpackIgnore: true */ 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,r=this.iframe.clientHeight,n=this.iframe.getBoundingClientRect(),i=this.getPlaceholder(),o=document.body.getBoundingClientRect(),s=this.measurements[this.editedUID];s&&(Object.assign(i.clipper.style,{position:"absolute",top:n.top+this.iframe.clientTop-o.top+"px",left:n.left+this.iframe.clientLeft-o.left+"px",width:e+"px",height:r+"px",pointerEvents:"none",zIndex:1,overflow:"hidden"}),Object.assign(i.positionable.style,{position:"absolute",top:s.top+"px",left:s.left+"px",width:s.width+"px",zIndex:2,transition:"opacity 0.4s",pointerEvents:this.props.hidden?"none":"all"}),Object.assign(i.loader.style,{position:"absolute",top:s.top+"px",left:s.left+"px",width:s.width+"px",height:s.height+"px",filter:"opacity(0.6)",zIndex:3,pointerEvents:"none"}),document.dispatchEvent(new Event("feaasRefresh",{bubbles:!0})))}getPlaceholder(){return this.placeholder?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,r,n){r!==n&&(e=="hidden"&&(this.style.setProperty("display","block","important"),this.style.setProperty("transition","opacity 0.3s","important"),n?(this.style.setProperty("opacity","0","important"),this.style.pointerEvents="none"):(this.style.setProperty("opacity","1","important"),this.style.pointerEvents="all")),super.attributeChangedCallback(e,r,n))}open(){clearTimeout(this.closing),this.removeAttribute("hidden"),this.removeAttribute("changed"),this.setLoadingState()}shouldFork(e){return e.forkOriginId==null&&this.props.instance!=null}cleanup(){var e;this.placeholder&&((e=this.placeholder.clipper)===null||e===void 0||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")}render({children:e,component:r,version:n,instance:i},{Editor:o,VersionStatusList:s,VersionStatusButton:a,Version:l,VersionMenu:c,EditorUIUndo:d,EditorUIMode:u,React:{useEffect:h,useMemo:p,useState:f,useContext:m},Chakra:{HStack:g,Box:b,Button:N,MenuItem:I},Chrome:nt,ReactDOM:jt,useSDK:P,useLibrary:H,useSlots:R,useModelObserver:yt,ConfirmationContext:Q,VersionContext:A}){if(!this.payload)return;let{React:y}=this.payload,It=P(),bt=H(),[C,B]=f(),{setConfirm:z}=m(Q),At=i||n;C&&(this.component=C),h(()=>{if(this.props.hidden)return;let _=bt.components.getItem(r).clone();return _.versions.search({ids:[n,i].filter(Boolean),componentIds:[r]}).then(Z=>{_.versions.setItems(Z);let T=_.findVersion(i,["staged","published"]),Et=_.findVersion(n,["staged","published"]);if(T)T.deletedAt?(T.getDraft().changeAndNotify(Et.toProperties()).restore(),console.error("FEAAS Editor: Restoring fork")):(console.error("FEAAS Editor: Pre-forked"),this.setAttribute("forked",T.id));else if(this.removeAttribute("forked"),this.shouldFork(Et)){console.error("FEAAS Editor: Forking");let qt=Et.fork(i).id;this.setAttribute("instance",qt)}else console.error("FEAAS Editor: Regular");B(_)}),()=>{this.closing=setTimeout(()=>{this.closing=null,this.cleanup(),B(null)},400)}},[n,this.props.hidden]);let Pe=yt(C==null?void 0:C.versions,[]).filter(_=>_.id==At),Ct=Pe[0];Ct&&!this.props.hidden&&(this.version=Ct),h(()=>(this.unfork=()=>{z({title:"Reverting component customizations",button:"Discard",body:"Are you sure to reset component to its original state? All changes will be lost.",action:()=>{let _=C.findVersion(n,["staged","published"]);C.findVersion(i).unstage().unpublish().changeAndNotify(_.toProperties()),C.saveVersions(!1),this.setVersionContext({needsWrite:!0}),this.removeAttribute("forked"),requestAnimationFrame(this.onClose)}})},this.discard=()=>{this.props.changed&&(C.findVersion(At).revert(),C.saveVersions(!1),this.setVersionContext({needsWrite:!0}))},this.close=()=>{z({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=()=>{z({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 _,Z;(Z=(_=C.findVersion(At).commitData({view:this.editorContext.editor.getData({rootName:At}),model:""}))===null||_===void 0?void 0:_.stage())===null||Z===void 0||Z.publish(),this.removeAttribute("changed"),this.setAttribute("forked",At),C.saveVersions(!1)}})},()=>{delete this.unfork,delete this.discard,delete this.save,delete this.editorContext,delete this.versionContext,delete this.setEditorContext,delete this.setVersionContext}),[C]);let dr=p(()=>this.target,[C]);return p(()=>C&&R(e,({picker:_,children:Z})=>y.createElement(b,{ref:T=>{this.chrome=T?{positionable:T,wrapper:T.querySelector(".editor-chrome"),absolute:this.querySelector(".ui.overlays")}:null}},y.createElement(b,{className:"editor-wrapper",position:"absolute",left:0,top:0},y.createElement(o,{datasources:It.datasources,sdk:It,library:bt,component:C,versions:Pe,context:{isAutosaveEnabled:!1,onChromeMeasure:this.onMeasure,onChromeBeforeMeasure:this.onBeforeMeasure,onChromeMeasureElement:this.onChromeMeasureElement,onChromePosition:this.onPosition,onContentChange:this.onContentChange}},{exports:this.onEditorStateChange,after:Z,chrome:({editor:T})=>T&&y.createElement(nt,null),children:({isArchivedDisplayed:T,editor:Et,status:qt})=>y.createElement(b,{position:"absolute",left:0,top:0,className:"editor-chrome",p:4,boxShadow:"2xl",pointerEvents:"none",opacity:0,transition:"opacity 0.3s"},y.createElement(b,{left:0,width:"4",top:0,bottom:0,backdropFilter:"blur(2px)",background:"rgb(244 244 244 / 80%)",position:"absolute"}),y.createElement(b,{right:0,width:"4",top:0,bottom:0,backdropFilter:"blur(2px)",background:"rgb(244 244 244 / 80%)",position:"absolute"}),y.createElement(b,{top:0,height:"16",left:0,right:0,backdropFilter:"blur(2px)",background:"rgb(244 244 244 / 80%)",position:"absolute"}),y.createElement(b,{bottom:0,height:"4",left:0,right:0,backdropFilter:"blur(2px)",background:"rgb(244 244 244 / 80%)",position:"absolute"}),Ct&&y.createElement(l,{version:Ct,node:dr,ignoreBreakpoints:!0,deps:[this.props.forked,this.props.changed]},{exports:this.onVersionStateChange,left:y.createElement(g,{justifyContent:"space-between"},y.createElement(d,{size:"sm",editor:qt=="ready"?Et:null}),y.createElement(u,{size:"sm"})),middle:(Kr,Xr)=>[!1],right:y.createElement(y.Fragment,null,y.createElement(N,{variant:"secondary",size:"sm",onClick:this.close},"Close"),y.createElement(N,{variant:"primary",size:"sm",onClick:this.save,isDisabled:!this.props.changed},this.props.changed?this.props.forked?"Save":"Save customization":"Up to date"),y.createElement(c,{isDisabled:!this.props.forked&&!this.props.changed},y.createElement(I,{onClick:this.unfork,isDisabled:!this.props.forked},"Unfork"),y.createElement(I,{onClick:this.discard,isDisabled:!this.props.changed},"Discard")))}))})))),[Ct,this.props.forked,this.props.changed])}isReadyToLoad(){return this.props.component!=null&&this.props.version!=null&&!this.props.hidden}};vt.observedAttributes=["library","component","version","revision","hidden","state","changed","forked"];vt.register("feaas-editor");function xe(t){var e,r;return{part:(t==null?void 0:t.getAttribute("part"))||"picker",slot:(t==null?void 0:t.getAttribute("part"))||"picker",mode:t==null?void 0:t.getAttribute("mode"),dialog:t==null?void 0:t.getAttribute("dialog"),placeholder:(t==null?void 0:t.getAttribute("placeholder"))||"No theme",frontend:(e=t==null?void 0:t.getContextAttribute("frontend"))!==null&&e!==void 0?e:"https://components.sitecorecloud.io",src:(r=t==null?void 0:t.getAttribute("src"))!==null&&r!==void 0?r:"/picker.js",hidden:(t==null?void 0:t.getAttribute("hidden"))!=null,variant:t==null?void 0:t.getAttribute("variant"),context:void 0,onClose:void 0,setAttribute:void 0,getAttribute:void 0}}var gt=class extends E{constructor(){super(...arguments),this.defaultProps={hidden:!1}}getProps(){return xe(this)}load(){return this.import( /*@vite-ignore*/ /* webpackIgnore: true */ this.formatURL(this.props.src,this.props.frontend))}connectedCallback(){this.setAttribute("feaas-role","ui"),super.connectedCallback()}render({placeholder:e,context:r,mode:n,dialog:i,children:o,variant:s},{Picker:a,React:l,useContext:c,EnvironmentContext:d,useLibrary:u,useSDK:h,BYOC:p}){var f,m,g;let[b,N]=l.useReducer(C=>C+1,0),I=h(),nt=c(d),jt=u("collections"),P=u("components"),H=h("datasources"),R=u(),yt=((m=(f=R==null?void 0:R.stylesheets)===null||f===void 0?void 0:f.first)===null||m===void 0?void 0:m.rules)||((g=R==null?void 0:R.stylesheet)===null||g===void 0?void 0:g.styles),Q=h("renderingHost.expandedComponents");var A=r==null?void 0:r.getAttribute("data");if(A)try{A=JSON.parse(A)}catch(C){}if(r)var y=I.ExternalComponent.getDefinition(r),It=y&&!y.getConfiguration(r),bt=(y==null?void 0:y.type)=="feaas"?P.find(C=>C.id==r.getAttribute("component")):p==null?void 0:p.getComponent(String(r.getAttribute("data-external-id")));return l.createElement(a,{cdn:nt.cdn,rules:yt,collections:jt,themeContext:r,placeholder:e,embed:bt,externalComponents:Q,datasources:H,data:A,versionId:r==null?void 0:r.getAttribute("version"),mode:n||(It?"library":bt?"context":null),setAttribute:(C,B,z)=>{B=="data"&&z&&(z=JSON.stringify(z)),this.props.setAttribute(C,B,z),N()},getAttribute:(C,B)=>r==null?void 0:r.getAttribute(B),dialog:i,context:r,variant:s,onModeChange:(C,B)=>{this.set({mode:C,dialog:B})}},o)}};gt.observedAttributes=["library","mode","frontend","src","hidden","variant","dialog"];gt.register("feaas-picker");function we(t){var e,r,n,i,o;return{library:t==null?void 0:t.getAttribute("library"),src:(e=t==null?void 0:t.getAttribute("src"))!==null&&e!==void 0?e:"/context.js",environment:(r=t==null?void 0:t.getAttribute("environment"))!==null&&r!==void 0?r:void 0,frontend:(n=t==null?void 0:t.getAttribute("frontend"))!==null&&n!==void 0?n:"https://components.sitecorecloud.io",backend:(i=t==null?void 0:t.getAttribute("backend"))!==null&&i!==void 0?i:"https://components.sitecorecloud.io/api",cdn:(o=t==null?void 0:t.getAttribute("cdn"))!==null&&o!==void 0?o:"https://feaas.blob.core.windows.net",auth:null,isolate:(t==null?void 0:t.getAttribute("isolate"))==null||(t==null?void 0:t.getAttribute("isolate"))=="true"}}var X=class extends E{constructor(){super(...arguments),this.defaultProps={isolate:!0},this.onStatusChange=(e,r)=>{e=="ready"&&(this.whenSDKReady.resolve(r),this.dispatchEvent(new CustomEvent("feaasReady",{bubbles:!0,composed:!0,detail:r})))},this.whenSDKReady=O(e=>{this.sdk=e})}getProps(){return we(this)}load(){return this.import( /*@vite-ignore*/ /* webpackIgnore: true */ this.formatURL(this.props.src,this.props.frontend))}isReadyToLoad(){return super.isReadyToLoad()&&this.props.library!=null}getTheme(e){return e}getRoot(){return this.getAttribute("isolate")==="false"?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:r},{AppContext:n,Chakra:{Button:i,Tooltip:o},React:s}){let a={containerRef:{current:this.getPortalRoot()}};return o.defaultProps={hasArrow:!0,placement:"top",portalProps:a},s.createElement(n,{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:a},chakraProps:{resetScope:':where([feaas-role="ui"])',cssVarsRoot:":host",resetCSS:!0,toastOptions:{portalProps:a}}},e)}};X.observedAttributes=["library","component","version","revision","hostname","template"];X.register("feaas-context");X.prototype.clientside=Se;var D=xt(require("@sitecore/byoc"),1),Re=xt(require("react"),1),sr=xt(require("react-dom"),1);var _e=D.getMergedComponentProperties;function Ir(t){let e=D.objectKeysToCamelCase(Array.from(t.attributes).reduce((r,{name:n,value:i})=>(n=="data-external-id"&&(n="component-name"),Object.assign(r,{[n]:i})),{}));return _e(e).merged}var $=class extends E{load(){return Promise.all([import( /*@vite-ignore*/ /* webpackIgnore: true */ "https://cdn.skypack.dev/react-dom/client")]).then(([e])=>({React:Re.default,ReactDOM:sr.default,ReactDOMClient:e}))}connectedCallback(){this._setAttribute||(this._setAttribute=this.setAttribute,this.setAttribute=function(e,r){let n=this.getAttribute(r);this._setAttribute(e,r),this.attributeChangedCallback(e,n,r)}),super.connectedCallback()}update(){var e;if(!(!(!((e=D.getComponent(this.getComponentName()))===null||e===void 0)&&e.component)&&this.getAttribute("hydrate")=="false"))return super.update()}render(e,{React:r}){var n;let i=(n=D.getComponent(this.getComponentName()))===null||n===void 0?void 0:n.component;return i||console.warn(`FEAASExternal: \`${this.getComponentName()}\` is not registered`),r.createElement(r.Fragment,null,i&&r.createElement(i,{componentName:this.getComponentName(),...e}))}getComponentName(){return this.getAttribute("data-external-id")}getProps(){return Ir(this)}static Preview(e){var r;let n=(e==null?void 0:e.src)||(typeof window!="undefined"?(r=window.location.search.match(/feaasSrc=([^&]+)/))===null||r===void 0?void 0:r[1]:null);return n?Re.default.createElement(Fe,{src:n,...e}):null}static linkComponents(e){return()=>e.map(r=>null)}};$.registered=D.registered;$.registerComponent=D.registerComponent;$.setRegistrationCallback=D.setRegistrationCallback;$.getComponent=D.getComponent;$.register("feaas-external");var{linkComponents:ar}=$;var Oe={};function Br(t,e){Oe[t]=e}function De(t){return t==null||t===!0?["template","stylesheet","data"]:[].concat(t||[])}var lr=t=>("src"in t&&(t=W(t.src)),j.default.createElement("link",{rel:"stylesheet",href:zt(t)})),cr=async({data:t,fetch:e,...r})=>{let n=await x.fetch(t||{});e=De(e!=null?e:["stylesheet"]);let i={...r};if(("src"in r||"component"in r)&&(r==null?void 0:r.template)==null){let o=await Vt(r);i.template=o.template,i.lastModified=o.lastModified}else(r==null?void 0:r.template)==null&&!e.includes("template")&&e.push("template");return Ne({...i,data:t,fetch:e,fetchedData:n})};function Ne({data:t,lastModified:e,fetchedData:r,renderNode:n,...i}){console.log("=== FEAASReactComponent",t,i);let o=null,s;"template"in i&&i.template&&(s=le(i.template,r||t||{}).map((c,d)=>ke(c,(u,h)=>{if(n){let f=n==null?void 0:n(u,h);if(f!=null&&"type"in f)return[f.type,f.props];h={...h,...f}}if(Oe[u.localName])return[Oe[u.localName],h];if(u.localName=="feaas-external"){let f={};for(var p in h){let m=p=="data-external-id"?"componentName":w.toCamelCase(p);f[m]=h[p]}return[w.Component,f]}},d))),"src"in i&&(i={...G(i.src),...i});let a=De(i.fetch),l=a.includes("data")?t:a.includes("template")?r||t:null;return console.log("htmlnode to react",s),j.default.createElement(j.default.Fragment,null,"preload"in i&&o===!0&&"src"in i&&j.default.createElement(j.default.Fragment,null,j.default.createElement("link",{rel:"preload",as:"fetch",href:pt(i.src),crossOrigin:"anonymous"}),j.default.createElement("link",{rel:"preload",as:"style",href:K(i.src),crossOrigin:"anonymous"})),j.default.createElement("feaas-component",{class:"-feaas",...i,"last-modified":e?String(e):null,fetch:i.fetch==null?i.fetch:[].concat(i.fetch).join(" "),suppressHydrationWarning:!0,template:null,data:typeof l=="string"?l:l?JSON.stringify(l):null},s))}function ke(t,e,r){var n;if(t.nodeType===3)return t.textContent;let i=Array.from(t.childNodes).map((d,u)=>ke(d,e,u)),o={};for(let d=0;d<t.attributes.length;d++){let{name:u,value:h}=t.attributes[d];u=="style"?o[u]=String(h||"").trim().split(/\s*;\s*/).reduce((p,f)=>{let[m,g]=f.split(":");return{...p,[w.toCamelCase(m)]:g}},{}):u=="class"?o.className=h:o[u]=h}let s=e==null?void 0:e(t,o),a=(s==null?void 0:s[0])||t.nodeName.toLowerCase();a=="style"&&(o.dangerouslySetInnerHTML={__html:i.join(`
76
+ `,s.contentWindow.document.head.appendChild(d),s.contentWindow.document.head.appendChild(u);let h=qt({template:r,data:n},null,!1);h.classList.add(...t,"-feaas--preview","-emulate--"+e.details.slug),s.contentWindow.document.body.appendChild(h)})}async function or(t,e,r){let n=e?e.getThumbnailURL():t.getThumbnailURL(),i=new Date(Math.max(Number(t.modifiedAt),Number(t.library.stylesheet.modifiedAt)));try{await t.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":e?e.id:null,"x-ms-meta-versionRevision":e?e.revision.toString():null,"x-ms-meta-componentId":t.id,"x-ms-meta-componentRenderedAt":i.toUTCString(),"x-ms-meta-componentModifiedAt":t.modifiedAt.toUTCString(),"x-ms-meta-componentCreatedAt":t.createdAt.toUTCString(),"x-ms-meta-modifiedAt":t.modifiedAt.toUTCString()}}),fetch(n,{cache:"no-cache"}).then(()=>{t.sdk.log("FEAAS: Thumbnail uploaded",n)})}catch(o){t.sdk.log("FEAAS: Thumbnail failed to upload",n,o)}return n}var k=require("@sitecore/byoc"),Ae;typeof window!="undefined"&&(window.FEAASReactElement=ct,(Ae=window.FEAASLoading)!==null&&Ae!==void 0||(window.FEAASLoading=Promise.resolve()));function Ce(t){let e=[];if(t){let r=t.ownerDocument.defaultView,n,i;for(;r!==window.top;){n=r.parent;for(let o=0;o<n.frames.length;o++)if(n.frames[o]===r){for(let s of n.document.getElementsByTagName("iframe"))if(s.contentWindow===r){i=s.getBoundingClientRect();let a=s.contentWindow.getComputedStyle(s);e.push({left:i.left+parseInt(a.borderLeftWidth),top:i.top+parseInt(a.borderTopWidth)})}r=n;break}}}return e.reduce((r,n)=>({left:r.left+n.left,top:r.top+n.top}),{left:0,top:0})}function Ee(t){var e;return{context:HTMLElement,frontend:t==null?void 0:t.getContextAttribute("frontend"),src:(e=t==null?void 0:t.getAttribute("src"))!==null&&e!==void 0?e:"/editor.js",library:t==null?void 0:t.getAttribute("library"),component:t==null?void 0:t.getAttribute("component"),version:t==null?void 0:t.getAttribute("version"),instance:t==null?void 0:t.getAttribute("instance"),forked:t==null?void 0:t.getAttribute("forked"),revision:(t==null?void 0:t.getAttribute("revision"))||"saved",hidden:(t==null?void 0:t.getAttribute("hidden"))!=null,for:t==null?void 0:t.getAttribute("for"),state:(t==null?void 0:t.getAttribute("state"))||"idle",changed:(t==null?void 0:t.getAttribute("changed"))!=null}}var vt=class extends E{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,r={component:e.getAttribute("component"),version:e.getAttribute("version"),revision:e.getAttribute("revision"),instance:e.getAttribute("instance")})=>{if(!this.closing&&(!this.target||e==null))return this.set(r),this.target=e,!0},this.onChromeMeasureElement=(e,r=e.getBoundingClientRect())=>e.ownerDocument==document?{left:r.left-this.bodyRect.left,top:r.top-this.bodyRect.top,width:r.width,height:r.height}:{left:r.left+this.framePoint.left-this.bodyRect.left,top:r.top+this.framePoint.top-this.bodyRect.top,width:r.width,height:r.height},this.onBeforeMeasure=e=>{e.memoized.focusable&&(this.framePoint=Ce(e.memoized.focusable)),this.chrome&&(this.wrapperRect=this.chrome.positionable.getBoundingClientRect(),this.bodyRect=this.chrome.positionable.ownerDocument.body.parentElement.getBoundingClientRect())},this.onMeasure=()=>{},this.onPosition=({focusable:e,root:r})=>{!this.chrome||this.props.hidden||(e?(this.chrome.wrapper.style.width=e.width+16*2+"px",this.chrome.wrapper.style.height=e.height+16*1+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=r.left+"px",this.chrome.absolute.style.top=r.top+"px")):(this.chrome.wrapper.style.opacity="0",this.chrome.wrapper.style.left="-1000px",this.chrome.wrapper.style.top="-1000px"))},this.onWindowMessage=e=>{var r;switch((r=e.data)===null||r===void 0?void 0:r.type){case"feaasEdit":let n=this.getPlaceholder();this.setTarget(n.editable,e.data)&&(this.loader=n.loader,document.body.appendChild(n.clipper),this.editedUID=e.data.id,this.setPlaceholder(),this.open());break;case"feaasMeasurements":this.measurements=e.data.measurements,this.props.hidden||this.setPlaceholder();break}},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"),!((e=this.target)===null||e===void 0)&&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,r)=>{this.versionContext=e,this.setVersionContext=r},this.onEditorStateChange=(e,r)=>{this.editorContext=e,this.setEditorContext=r,e.editor&&this.props.state=="loading"&&!this.props.hidden&&(this.setAttribute("state","ready"),this.ownerDocument.fonts.ready.then(()=>setTimeout(()=>{this.setReadyState(),this.setIframeComponentContent()},100)))}}getProps(){return Ee(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),this.target.tagName=="FEAAS-COMPONENT"&&(this.target.style.position="relative"))}hideLoader(){this.loader&&(this.loader.setAttribute("hidden","hidden"),this.target.tagName=="FEAAS-COMPONENT"&&(this.target.style.position="relative",this.target.style.position=""))}load(){return import( /*@vite-ignore*/ /* webpackIgnore: true */ 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,r=this.iframe.clientHeight,n=this.iframe.getBoundingClientRect(),i=this.getPlaceholder(),o=document.body.getBoundingClientRect(),s=this.measurements[this.editedUID];s&&(Object.assign(i.clipper.style,{position:"absolute",top:n.top+this.iframe.clientTop-o.top+"px",left:n.left+this.iframe.clientLeft-o.left+"px",width:e+"px",height:r+"px",pointerEvents:"none",zIndex:1,overflow:"hidden"}),Object.assign(i.positionable.style,{position:"absolute",top:s.top+"px",left:s.left+"px",width:s.width+"px",zIndex:2,transition:"opacity 0.4s",pointerEvents:this.props.hidden?"none":"all"}),Object.assign(i.loader.style,{position:"absolute",top:s.top+"px",left:s.left+"px",width:s.width+"px",height:s.height+"px",filter:"opacity(0.6)",zIndex:3,pointerEvents:"none"}),document.dispatchEvent(new Event("feaasRefresh",{bubbles:!0})))}getPlaceholder(){return this.placeholder?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,r,n){r!==n&&(e=="hidden"&&(this.style.setProperty("display","block","important"),this.style.setProperty("transition","opacity 0.3s","important"),n?(this.style.setProperty("opacity","0","important"),this.style.pointerEvents="none"):(this.style.setProperty("opacity","1","important"),this.style.pointerEvents="all")),super.attributeChangedCallback(e,r,n))}open(){clearTimeout(this.closing),this.removeAttribute("hidden"),this.removeAttribute("changed"),this.setLoadingState()}shouldFork(e){return e.forkOriginId==null&&this.props.instance!=null}cleanup(){var e;this.placeholder&&((e=this.placeholder.clipper)===null||e===void 0||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")}render({children:e,component:r,version:n,instance:i},{Editor:o,VersionStatusList:s,VersionStatusButton:a,Version:l,VersionMenu:c,EditorUIUndo:d,EditorUIMode:u,React:{useEffect:h,useMemo:p,useState:f,useContext:m},Chakra:{HStack:g,Box:b,Button:N,MenuItem:I},Chrome:nt,ReactDOM:jt,useSDK:P,useLibrary:H,useSlots:R,useModelObserver:yt,ConfirmationContext:Q,VersionContext:A}){if(!this.payload)return;let{React:y}=this.payload,It=P(),bt=H(),[C,B]=f(),{setConfirm:z}=m(Q),At=i||n;C&&(this.component=C),h(()=>{if(this.props.hidden)return;let _=bt.components.getItem(r).clone();return _.versions.search({ids:[n,i].filter(Boolean),componentIds:[r]}).then(Z=>{_.versions.setItems(Z);let T=_.findVersion(i,["staged","published"]),Et=_.findVersion(n,["staged","published"]);if(T)T.deletedAt?(T.getDraft().changeAndNotify(Et.toProperties()).restore(),console.error("FEAAS Editor: Restoring fork")):(console.error("FEAAS Editor: Pre-forked"),this.setAttribute("forked",T.id));else if(this.removeAttribute("forked"),this.shouldFork(Et)){console.error("FEAAS Editor: Forking");let Gt=Et.fork(i).id;this.setAttribute("instance",Gt)}else console.error("FEAAS Editor: Regular");B(_)}),()=>{this.closing=setTimeout(()=>{this.closing=null,this.cleanup(),B(null)},400)}},[n,this.props.hidden]);let Pe=yt(C==null?void 0:C.versions,[]).filter(_=>_.id==At),Ct=Pe[0];Ct&&!this.props.hidden&&(this.version=Ct),h(()=>(this.unfork=()=>{z({title:"Reverting component customizations",button:"Discard",body:"Are you sure to reset component to its original state? All changes will be lost.",action:()=>{let _=C.findVersion(n,["staged","published"]);C.findVersion(i).unstage().unpublish().changeAndNotify(_.toProperties()),C.saveVersions(!1),this.setVersionContext({needsWrite:!0}),this.removeAttribute("forked"),requestAnimationFrame(this.onClose)}})},this.discard=()=>{this.props.changed&&(C.findVersion(At).revert(),C.saveVersions(!1),this.setVersionContext({needsWrite:!0}))},this.close=()=>{z({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=()=>{z({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 _,Z;(Z=(_=C.findVersion(At).commitData({view:this.editorContext.editor.getData({rootName:At}),model:""}))===null||_===void 0?void 0:_.stage())===null||Z===void 0||Z.publish(),this.removeAttribute("changed"),this.setAttribute("forked",At),C.saveVersions(!1)}})},()=>{delete this.unfork,delete this.discard,delete this.save,delete this.editorContext,delete this.versionContext,delete this.setEditorContext,delete this.setVersionContext}),[C]);let dr=p(()=>this.target,[C]);return p(()=>C&&R(e,({picker:_,children:Z})=>y.createElement(b,{ref:T=>{this.chrome=T?{positionable:T,wrapper:T.querySelector(".editor-chrome"),absolute:this.querySelector(".ui.overlays")}:null}},y.createElement(b,{className:"editor-wrapper",position:"absolute",left:0,top:0},y.createElement(o,{datasources:It.datasources,sdk:It,library:bt,component:C,versions:Pe,context:{isAutosaveEnabled:!1,onChromeMeasure:this.onMeasure,onChromeBeforeMeasure:this.onBeforeMeasure,onChromeMeasureElement:this.onChromeMeasureElement,onChromePosition:this.onPosition,onContentChange:this.onContentChange}},{exports:this.onEditorStateChange,after:Z,chrome:({editor:T})=>T&&y.createElement(nt,null),children:({isArchivedDisplayed:T,editor:Et,status:Gt})=>y.createElement(b,{position:"absolute",left:0,top:0,className:"editor-chrome",p:4,boxShadow:"2xl",pointerEvents:"none",opacity:0,transition:"opacity 0.3s"},y.createElement(b,{left:0,width:"4",top:0,bottom:0,backdropFilter:"blur(2px)",background:"rgb(244 244 244 / 80%)",position:"absolute"}),y.createElement(b,{right:0,width:"4",top:0,bottom:0,backdropFilter:"blur(2px)",background:"rgb(244 244 244 / 80%)",position:"absolute"}),y.createElement(b,{top:0,height:"16",left:0,right:0,backdropFilter:"blur(2px)",background:"rgb(244 244 244 / 80%)",position:"absolute"}),y.createElement(b,{bottom:0,height:"4",left:0,right:0,backdropFilter:"blur(2px)",background:"rgb(244 244 244 / 80%)",position:"absolute"}),Ct&&y.createElement(l,{version:Ct,node:dr,ignoreBreakpoints:!0,deps:[this.props.forked,this.props.changed]},{exports:this.onVersionStateChange,left:y.createElement(g,{justifyContent:"space-between"},y.createElement(d,{size:"sm",editor:Gt=="ready"?Et:null}),y.createElement(u,{size:"sm"})),middle:(Kr,Xr)=>[!1],right:y.createElement(y.Fragment,null,y.createElement(N,{variant:"secondary",size:"sm",onClick:this.close},"Close"),y.createElement(N,{variant:"primary",size:"sm",onClick:this.save,isDisabled:!this.props.changed},this.props.changed?this.props.forked?"Save":"Save customization":"Up to date"),y.createElement(c,{isDisabled:!this.props.forked&&!this.props.changed},y.createElement(I,{onClick:this.unfork,isDisabled:!this.props.forked},"Unfork"),y.createElement(I,{onClick:this.discard,isDisabled:!this.props.changed},"Discard")))}))})))),[Ct,this.props.forked,this.props.changed])}isReadyToLoad(){return this.props.component!=null&&this.props.version!=null&&!this.props.hidden}};vt.observedAttributes=["library","component","version","revision","hidden","state","changed","forked"];vt.register("feaas-editor");function xe(t){var e,r;return{part:(t==null?void 0:t.getAttribute("part"))||"picker",slot:(t==null?void 0:t.getAttribute("part"))||"picker",mode:t==null?void 0:t.getAttribute("mode"),dialog:t==null?void 0:t.getAttribute("dialog"),placeholder:(t==null?void 0:t.getAttribute("placeholder"))||"No theme",frontend:(e=t==null?void 0:t.getContextAttribute("frontend"))!==null&&e!==void 0?e:"https://components.sitecorecloud.io",src:(r=t==null?void 0:t.getAttribute("src"))!==null&&r!==void 0?r:"/picker.js",hidden:(t==null?void 0:t.getAttribute("hidden"))!=null,variant:t==null?void 0:t.getAttribute("variant"),context:void 0,onClose:void 0,setAttribute:void 0,getAttribute:void 0}}var gt=class extends E{constructor(){super(...arguments),this.defaultProps={hidden:!1}}getProps(){return xe(this)}load(){return this.import( /*@vite-ignore*/ /* webpackIgnore: true */ this.formatURL(this.props.src,this.props.frontend))}connectedCallback(){this.setAttribute("feaas-role","ui"),super.connectedCallback()}render({placeholder:e,context:r,mode:n,dialog:i,children:o,variant:s},{Picker:a,React:l,useContext:c,EnvironmentContext:d,useLibrary:u,useSDK:h,BYOC:p}){var f,m,g;let[b,N]=l.useReducer(C=>C+1,0),I=h(),nt=c(d),jt=u("collections"),P=u("components"),H=h("datasources"),R=u(),yt=((m=(f=R==null?void 0:R.stylesheets)===null||f===void 0?void 0:f.first)===null||m===void 0?void 0:m.rules)||((g=R==null?void 0:R.stylesheet)===null||g===void 0?void 0:g.styles),Q=h("renderingHost.expandedComponents");var A=r==null?void 0:r.getAttribute("data");if(A)try{A=JSON.parse(A)}catch(C){}if(r)var y=I.ExternalComponent.getDefinition(r),It=y&&!y.getConfiguration(r),bt=(y==null?void 0:y.type)=="feaas"?P.find(C=>C.id==r.getAttribute("component")):p==null?void 0:p.getComponent(String(r.getAttribute("data-external-id")));return l.createElement(a,{cdn:nt.cdn,rules:yt,collections:jt,themeContext:r,placeholder:e,embed:bt,externalComponents:Q,datasources:H,data:A,versionId:r==null?void 0:r.getAttribute("version"),mode:n||(It?"library":bt?"context":null),setAttribute:(C,B,z)=>{B=="data"&&z&&(z=JSON.stringify(z)),this.props.setAttribute(C,B,z),N()},getAttribute:(C,B)=>r==null?void 0:r.getAttribute(B),dialog:i,context:r,variant:s,onModeChange:(C,B)=>{this.set({mode:C,dialog:B})}},o)}};gt.observedAttributes=["library","mode","frontend","src","hidden","variant","dialog"];gt.register("feaas-picker");function we(t){var e,r,n,i,o;return{library:t==null?void 0:t.getAttribute("library"),src:(e=t==null?void 0:t.getAttribute("src"))!==null&&e!==void 0?e:"/context.js",environment:(r=t==null?void 0:t.getAttribute("environment"))!==null&&r!==void 0?r:void 0,frontend:(n=t==null?void 0:t.getAttribute("frontend"))!==null&&n!==void 0?n:"https://components.sitecorecloud.io",backend:(i=t==null?void 0:t.getAttribute("backend"))!==null&&i!==void 0?i:"https://components.sitecorecloud.io/api",cdn:(o=t==null?void 0:t.getAttribute("cdn"))!==null&&o!==void 0?o:"https://feaas.blob.core.windows.net",auth:null,isolate:(t==null?void 0:t.getAttribute("isolate"))==null||(t==null?void 0:t.getAttribute("isolate"))=="true"}}var X=class extends E{constructor(){super(...arguments),this.defaultProps={isolate:!0},this.onStatusChange=(e,r)=>{e=="ready"&&(this.whenSDKReady.resolve(r),this.dispatchEvent(new CustomEvent("feaasReady",{bubbles:!0,composed:!0,detail:r})))},this.whenSDKReady=O(e=>{this.sdk=e})}getProps(){return we(this)}load(){return this.import( /*@vite-ignore*/ /* webpackIgnore: true */ this.formatURL(this.props.src,this.props.frontend))}isReadyToLoad(){return super.isReadyToLoad()&&this.props.library!=null}getTheme(e){return e}getRoot(){return this.getAttribute("isolate")==="false"?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:r},{AppContext:n,Chakra:{Button:i,Tooltip:o},React:s}){let a={containerRef:{current:this.getPortalRoot()}};return o.defaultProps={hasArrow:!0,placement:"top",portalProps:a},s.createElement(n,{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:a},chakraProps:{resetScope:':where([feaas-role="ui"])',cssVarsRoot:":host",resetCSS:!0,toastOptions:{portalProps:a}}},e)}};X.observedAttributes=["library","component","version","revision","hostname","template"];X.register("feaas-context");X.prototype.clientside=Se;var D=xt(require("@sitecore/byoc"),1),Re=xt(require("react"),1),sr=xt(require("react-dom"),1);var _e=D.getMergedComponentProperties;function Ir(t){let e=D.objectKeysToCamelCase(Array.from(t.attributes).reduce((r,{name:n,value:i})=>(n=="data-external-id"&&(n="component-name"),Object.assign(r,{[n]:i})),{}));return _e(e).merged}var $=class extends E{load(){return Promise.all([import( /*@vite-ignore*/ /* webpackIgnore: true */ "https://cdn.skypack.dev/react-dom/client")]).then(([e])=>({React:Re.default,ReactDOM:sr.default,ReactDOMClient:e}))}connectedCallback(){this._setAttribute||(this._setAttribute=this.setAttribute,this.setAttribute=function(e,r){let n=this.getAttribute(r);this._setAttribute(e,r),this.attributeChangedCallback(e,n,r)}),super.connectedCallback()}update(){var e;if(!(!(!((e=D.getComponent(this.getComponentName()))===null||e===void 0)&&e.component)&&this.getAttribute("hydrate")=="false"))return super.update()}render(e,{React:r}){var n;let i=(n=D.getComponent(this.getComponentName()))===null||n===void 0?void 0:n.component;return i||console.warn(`FEAASExternal: \`${this.getComponentName()}\` is not registered`),r.createElement(r.Fragment,null,i&&r.createElement(i,{componentName:this.getComponentName(),...e}))}getComponentName(){return this.getAttribute("data-external-id")}getProps(){return Ir(this)}static Preview(e){var r;let n=(e==null?void 0:e.src)||(typeof window!="undefined"?(r=window.location.search.match(/feaasSrc=([^&]+)/))===null||r===void 0?void 0:r[1]:null);return n?Re.default.createElement(Fe,{src:n,...e}):null}static linkComponents(e){return()=>e.map(r=>null)}};$.registered=D.registered;$.registerComponent=D.registerComponent;$.setRegistrationCallback=D.setRegistrationCallback;$.getComponent=D.getComponent;$.register("feaas-external");var{linkComponents:ar}=$;var Oe={};function Br(t,e){Oe[t]=e}function De(t){return t==null||t===!0?["template","stylesheet","data"]:[].concat(t||[])}var lr=t=>("src"in t&&(t=W(t.src)),j.default.createElement("link",{rel:"stylesheet",href:Vt(t)})),cr=async({data:t,fetch:e,...r})=>{let n=await x.fetch(t||{});e=De(e!=null?e:["stylesheet"]);let i={...r};if(("src"in r||"component"in r)&&(r==null?void 0:r.template)==null){let o=await Jt(r);i.template=o.template,i.lastModified=o.lastModified}else(r==null?void 0:r.template)==null&&!e.includes("template")&&e.push("template");return Ne({...i,data:t,fetch:e,fetchedData:n})};function Ne({data:t,lastModified:e,fetchedData:r,renderNode:n,...i}){console.log("=== FEAASReactComponent",t,i),console.log("parse html content",Ht(i.template,r||t||{}));let o=null,s;"template"in i&&i.template&&(s=Ht(i.template,r||t||{}).map((c,d)=>ke(c,(u,h)=>{if(n){let f=n==null?void 0:n(u,h);if(f!=null&&"type"in f)return[f.type,f.props];h={...h,...f}}if(Oe[u.localName])return[Oe[u.localName],h];if(u.localName=="feaas-external"){let f={};for(var p in h){let m=p=="data-external-id"?"componentName":w.toCamelCase(p);f[m]=h[p]}return[w.Component,f]}},d))),"src"in i&&(i={...G(i.src),...i});let a=De(i.fetch),l=a.includes("data")?t:a.includes("template")?r||t:null;return console.log("htmlnode to react",s),j.default.createElement(j.default.Fragment,null,"preload"in i&&o===!0&&"src"in i&&j.default.createElement(j.default.Fragment,null,j.default.createElement("link",{rel:"preload",as:"fetch",href:pt(i.src),crossOrigin:"anonymous"}),j.default.createElement("link",{rel:"preload",as:"style",href:K(i.src),crossOrigin:"anonymous"})),j.default.createElement("feaas-component",{class:"-feaas",...i,"last-modified":e?String(e):null,fetch:i.fetch==null?i.fetch:[].concat(i.fetch).join(" "),suppressHydrationWarning:!0,template:null,data:typeof l=="string"?l:l?JSON.stringify(l):null},s))}function ke(t,e,r){var n;if(t.nodeType===3)return t.textContent;let i=Array.from(t.childNodes).map((d,u)=>ke(d,e,u)),o={};for(let d=0;d<t.attributes.length;d++){let{name:u,value:h}=t.attributes[d];u=="style"?o[u]=String(h||"").trim().split(/\s*;\s*/).reduce((p,f)=>{let[m,g]=f.split(":");return{...p,[w.toCamelCase(m)]:g}},{}):u=="class"?o.className=h:o[u]=h}t.nodeType===1&&(o.hidden=t.hidden);let s=e==null?void 0:e(t,o),a=(s==null?void 0:s[0])||t.nodeName.toLowerCase();a=="style"&&(o.dangerouslySetInnerHTML={__html:i.join(`
77
77
  `)});let l=Object.assign({key:r,suppressHydrationWarning:!0},(s==null?void 0:s[1])||o);console.log(t,t.attributes),console.log("attributes",o),console.log("react attributes",l),console.log("-----------------");let c=((n=s==null?void 0:s[1])===null||n===void 0?void 0:n.children)||i;return j.default.createElement(a,l,["img","br","input","style"].includes(a)?null:c)}var Ur=w.enableNextClientsideComponents,Wr=w.setContextProperties,Hr=w.Bundle,zr=w.Component,Vr=w.RegularComponent,Jr=w.NextComponent,Fe=Ne,Yr=cr,qr=lr;
78
78
  //# sourceMappingURL=react.cjs.map