@sitecore-feaas/clientside 0.3.13 → 0.3.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/components/FEAASComponent.js +2 -0
- package/build/components/FEAASComponent.js.map +1 -1
- package/build/ui/FEAASExternal.js +6 -2
- package/build/ui/FEAASExternal.js.map +1 -1
- package/build/ui/react.js +2 -0
- package/build/ui/react.js.map +1 -1
- package/dist/browser/headless.cjs +1 -1
- package/dist/browser/headless.cjs.map +2 -2
- package/dist/browser/headless.esm.js +1 -1
- package/dist/browser/headless.esm.js.map +1 -1
- package/dist/browser/index.cjs +1 -1
- package/dist/browser/index.cjs.map +2 -2
- package/dist/browser/index.esm.js +1 -1
- package/dist/browser/index.esm.js.map +1 -1
- package/dist/browser/react.cjs +5 -5
- package/dist/browser/react.cjs.map +2 -2
- package/dist/browser/react.esm.js +5 -5
- package/dist/browser/react.esm.js.map +1 -1
- package/dist/node/headless.cjs +4 -4
- package/dist/node/headless.cjs.map +3 -3
- package/dist/node/headless.esm.js +4 -4
- package/dist/node/headless.esm.js.map +3 -3
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.cjs.map +2 -2
- package/dist/node/index.esm.js +1 -1
- package/dist/node/index.esm.js.map +2 -2
- package/dist/node/react.cjs +4 -4
- package/dist/node/react.cjs.map +2 -2
- package/dist/node/react.esm.js +4 -4
- package/dist/node/react.esm.js.map +2 -2
- package/headless.cjs +4 -4
- package/headless.cjs.map +3 -3
- package/headless.js +4 -4
- package/headless.js.map +3 -3
- package/package.json +1 -1
- package/react.cjs +5 -5
- package/react.cjs.map +2 -2
- package/react.js +5 -5
- package/react.js.map +2 -2
- package/src/components/FEAASComponent.tsx +2 -1
- package/src/ui/FEAASExternal.tsx +9 -2
- package/src/ui/react.tsx +2 -0
- package/test/ServerComponent.test.tsx +8 -8
- package/types/components/FEAASComponent.d.ts.map +1 -1
- package/types/tsbuildinfo +1 -1
- package/types/ui/FEAASExternal.d.ts.map +1 -1
- package/types/ui/react.d.ts.map +1 -1
- package/types/ui/tsbuildinfo +1 -1
package/dist/node/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var Le=Object.create;var vt=Object.defineProperty;var $e=Object.getOwnPropertyDescriptor;var Fe=Object.getOwnPropertyNames;var Ue=Object.getPrototypeOf,je=Object.prototype.hasOwnProperty;var H=(t,e)=>{for(var r in e)vt(t,r,{get:e[r],enumerable:!0})},he=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Fe(e))!je.call(t,n)&&n!==r&&vt(t,n,{get:()=>e[n],enumerable:!(i=$e(e,n))||i.enumerable});return t};var Ie=(t,e,r)=>(r=t!=null?Le(Ue(t)):{},he(e||!t||!t.__esModule?vt(r,"default",{value:t,enumerable:!0}):r,t)),We=t=>he(vt({},"__esModule",{value:!0}),t);var Ke={};H(Ke,{Component:()=>X,ComponentProps:()=>Yt,Context:()=>L,ControlledPromise:()=>C,DEFAULT_CDN_URL:()=>N,DOM:()=>ct,DataPath:()=>dt,DataScope:()=>at,DataSettings:()=>S,Element:()=>v,FEAASComponent:()=>X,FEAASComponentsProps:()=>Yt,FEAASContext:()=>L,FEAASContextProps:()=>ne,FEAASEditor:()=>tt,FEAASEditorProps:()=>re,FEAASElement:()=>v,FEAASLoader:()=>Z,FEAASLoaderProps:()=>Qt,FEAASPicker:()=>et,FEAASPickerProps:()=>ie,FEAASStylesheet:()=>gt,FEAASStylesheetProps:()=>Xt,InvalidResponse:()=>ht,JSONPath:()=>f,Loader:()=>Z,MyComponent:()=>st,Picker:()=>et,Stylesheet:()=>gt,Thumbnail:()=>yt,WebComponent:()=>_t,adjustNumbers:()=>It,autoloadScripts:()=>$t,cleanCollectionBit:()=>J,clearFetchCache:()=>Ae,createStylesheet:()=>qt,fetchAndRevalidate:()=>G,fetchAndRevalidateComponent:()=>j,fetchAndRevalidateStylesheet:()=>ft,fetchBypassingCache:()=>ut,fetchCache:()=>q,fetchComponent:()=>Ce,fetchData:()=>St,fetchToValidateCache:()=>K,fetchWithCacheAwareness:()=>D,findStylesheet:()=>Jt,getComponentSource:()=>Ee,getComponentURL:()=>Et,getFetchCache:()=>Vt,getFramePosition:()=>ee,getHumanizedLabel:()=>Wt,getLastPathBit:()=>Ht,getQualifier:()=>jt,getStylesheetSource:()=>we,getStylesheetURL:()=>Q,loadScript:()=>z,loadStylesheet:()=>mt,loadStylesheetAllowStale:()=>wt,normalizeCollectionScope:()=>lt,observeDOMElement:()=>Lt,parseComponentSource:()=>Y,parseLimit:()=>Ft,parseRange:()=>Ut,parseStylesheetSource:()=>pt,queryObject:()=>F,queryObjectRaw:()=>At,queryScopes:()=>V,renderComponent:()=>Ct,renderComponentElement:()=>Se,renderComponentPromise:()=>Gt,renderDOMContent:()=>M,renderDOMElement:()=>R,renderHTMLContent:()=>Bt,renderStylesheet:()=>xe,renderStylesheetPromise:()=>zt,serializeCH1RichText:()=>P,setDOMAttribute:()=>O});module.exports=We(Ke);var oe={};H(oe,{Component:()=>X,ComponentProps:()=>Yt,Context:()=>L,ControlledPromise:()=>C,DEFAULT_CDN_URL:()=>N,DOM:()=>ct,DataPath:()=>dt,DataScope:()=>at,DataSettings:()=>S,Element:()=>v,FEAASComponent:()=>X,FEAASComponentsProps:()=>Yt,FEAASContext:()=>L,FEAASContextProps:()=>ne,FEAASEditor:()=>tt,FEAASEditorProps:()=>re,FEAASElement:()=>v,FEAASLoader:()=>Z,FEAASLoaderProps:()=>Qt,FEAASPicker:()=>et,FEAASPickerProps:()=>ie,FEAASStylesheet:()=>gt,FEAASStylesheetProps:()=>Xt,InvalidResponse:()=>ht,JSONPath:()=>f,Loader:()=>Z,MyComponent:()=>st,Picker:()=>et,Stylesheet:()=>gt,Thumbnail:()=>yt,WebComponent:()=>_t,adjustNumbers:()=>It,autoloadScripts:()=>$t,cleanCollectionBit:()=>J,clearFetchCache:()=>Ae,createStylesheet:()=>qt,fetchAndRevalidate:()=>G,fetchAndRevalidateComponent:()=>j,fetchAndRevalidateStylesheet:()=>ft,fetchBypassingCache:()=>ut,fetchCache:()=>q,fetchComponent:()=>Ce,fetchData:()=>St,fetchToValidateCache:()=>K,fetchWithCacheAwareness:()=>D,findStylesheet:()=>Jt,getComponentSource:()=>Ee,getComponentURL:()=>Et,getFetchCache:()=>Vt,getFramePosition:()=>ee,getHumanizedLabel:()=>Wt,getLastPathBit:()=>Ht,getQualifier:()=>jt,getStylesheetSource:()=>we,getStylesheetURL:()=>Q,loadScript:()=>z,loadStylesheet:()=>mt,loadStylesheetAllowStale:()=>wt,normalizeCollectionScope:()=>lt,observeDOMElement:()=>Lt,parseComponentSource:()=>Y,parseLimit:()=>Ft,parseRange:()=>Ut,parseStylesheetSource:()=>pt,queryObject:()=>F,queryObjectRaw:()=>At,queryScopes:()=>V,renderComponent:()=>Ct,renderComponentElement:()=>Se,renderComponentPromise:()=>Gt,renderDOMContent:()=>M,renderDOMElement:()=>R,renderHTMLContent:()=>Bt,renderStylesheet:()=>xe,renderStylesheetPromise:()=>zt,serializeCH1RichText:()=>P,setDOMAttribute:()=>O});function C(t,e=r=>{}){var r;let i=()=>{var n,s;let o=new Promise((d,l)=>{n=h=>{t==null||t(h),d(h)},s=l});var a=Object.assign(o,{resolve:n,reject:s,restart:i,first:r});return r=a,a.catch(e),a};return i()}var _t=typeof HTMLElement=="undefined"?typeof windowJSDOM!="undefined"?windowJSDOM.HTMLElement:class{}:HTMLElement,v=class extends _t{getProps(e){return{}}constructor(){super(),this.defaultProps={},this.connected=!1,this.refs={},this.descendants=[],this.whenLoaded=C(e=>{this.payload=e}),this.whenRendered=C(()=>this.initialized=!0,()=>cancelAnimationFrame(this.nextRender)),this.addEventListener("feaasMount",this),this.addEventListener("feaasUnmount",this)}getRoot(){return this}attributeChangedCallback(e,r,i){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 i;return(i=r.mount)===null||i===void 0?void 0:i.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){if(typeof process!="undefined"&&process.env.TESTING)return;let r=e[0];(typeof location!="undefined"&&(location!=null&&location.hostname.startsWith("components-"))||localStorage["Sitecore.Components.Debug"])&&console.log(r+" "+e.slice(1).map(i=>i&&typeof i=="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=!1)}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(i=>[!r||i.tagName.startsWith("FEAAS-")?i:null,i.shadowRoot?this.getElements(i.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,i;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 s=e.refs.parent;s;s=s.refs.parent)s.render&&((i=e.refs).parentReact||(i.parentReact=s),e.refs.topReact=s)}getComponentName(){return this.tagName.replace("FEAAS-","").toLowerCase()}isReadyToLoad(){return this.payload===void 0&&this.getAttribute("hidden")==null}onError(e,r="uncaught",i=!1){let n=new CustomEvent("feaasError",{bubbles:!0,composed:!0,detail:e});if(this.dispatchEventIndirectly(n),this.whenLoaded.reject(e),!n.defaultPrevented&&!i){this.whenRendered.reject(e);try{this.unmount()}catch(s){}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 i=(r=(e=this.payload)===null||e===void 0?void 0:e.ReactDOM)===null||r===void 0?void 0:r.flushSync;i?i(()=>this.update()):this.update()}load(){return Promise.resolve(null)}update(){var e,r,i;if(this.payload==null||!this.render)return;let{React:n,ReactDOM:s,ReactDOMClient:o}=this.payload||{};if(!n)throw new Error(`${this.tagName}: React is not present in payload`);if(!s)throw new Error(`${this.tagName}: ReactDOM is not present in payload`);this.getAttribute("hydrate")!="false"&&(!this.refs.topReact&&!this.forceUpdateReact?o?(this.reactRoot||(this.reactRoot=o.createRoot(this.getReactRootElement())),this.reactRoot.render(this.getReactElement())):s.render(this.getReactElement(),this.getReactRootElement()):this.forceUpdateReact?(e=this.forceUpdateReact)===null||e===void 0||e.call(this):(i=(r=this.refs.topReact).forceUpdateReact)===null||i===void 0||i.call(r))}invokeReactRendering(){let{React:e,ReactDOM:r}=this.payload||{};if(!this.connected)return null;let i=this.descendants.filter(n=>n.refs.parentReact==this&&n.payload).map((n,s)=>this.getReactElement(n));return this.render({...this.props,children:i},this.payload)}getReactErrorBoundary(e=this,r=e.tagName){if(this.reactErrorBoundary)return this.reactErrorBoundary;let{React:i,ReactDOM:n}=e.payload||{};return this.reactErrorBoundary||(this.reactErrorBoundary=class extends i.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromError(o){return{error:o}}componentDidCatch(o,a){console.error(`FEAAS: ${e.tagName} Error:`,o,a),e.onError(o,"react")}render(){if(!this.state.error)return this.props.children}})}getReactElement(e=this,r){let{React:i,ReactDOM:n}=e.payload||{},s=this.getReactErrorBoundary(),o=this.getReactWrapper(e);return i.createElement(s,{key:e.tagName+"-"+e.getUID(),slot:e.getAttribute("slot")},i.createElement(o,null))}getReactWrapper(e=this,r=e.tagName){if(e.reactWrapper)return e.reactWrapper;let{React:i,ReactDOM:n}=e.payload||{};return e.reactWrapper=s=>{if(e.render){let[o,a]=i.useReducer(d=>d+1,0);return e.forceUpdateReact=a,n.createPortal(i.createElement(i.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 n=this.isJSONAttribute(r),s=this.props[r],o=n?JSON.stringify(s):String(s),a=this.defaultProps[r],d=n?JSON.stringify(a):String(a),l=r.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),h=this.getAttribute(l);try{var i=n?JSON.stringify(JSON.parse(h)):h}catch(m){var i=null}s==null||o===d?this.removeAttribute(l):(typeof s=="string"||typeof s=="number"||typeof s=="boolean"||n)&&i!=o&&this.setAttribute(l,o)}}catch(n){this.whenRendered.reject(n),this.onError(n,"set")}return this}import(e){return import( /*@vite-ignore*/ /* webpackIgnore: true */ e)}scheduleRender(){this.nextRender==null&&(this.whenRendered=this.whenRendered.restart()),cancelAnimationFrame(this.nextRender),this.nextRender=requestAnimationFrame(()=>{this.nextRender=null,this.advance().catch(e=>{})})}formatURL(e,r){return typeof e=="string"&&e.match(/^\/[^\/]/)?r+e:e}getContextAttribute(e,r=this){for(var i=this;i=i.parentElement||(i.parentNode instanceof ShadowRoot?i.parentNode.host:null);)if(i.getAttribute(e)!=null)return i.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 B=class extends v{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")]).then(([e,r])=>({React:e,ReactDOM:r}))}render({},{React:e}){return e.createElement(e.Fragment,null)}},st=class extends B{constructor(){super(...arguments),this.useShadowRoot=!0}getProps(){return{counter:parseFloat(this.getAttribute("counter"))}}render({counter:e},{React:r}){let[i,n]=r.useState(0);return r.useEffect(()=>{n(s=>s+1)},[e]),r.createElement(r.Fragment,null,r.createElement("p",null,"Rendering attribute: ",e),r.createElement("p",null,"Triggered updates: ",i))}};st.observedAttributes=["counter"];var ct={};H(ct,{renderDOMContent:()=>M,renderDOMElement:()=>R,renderHTMLContent:()=>Bt,setDOMAttribute:()=>O});var at={};H(at,{JSONPath:()=>f,queryObject:()=>F,queryObjectRaw:()=>At,queryScopes:()=>V,serializeCH1RichText:()=>P});var ue=Ie(require("vm"),1),{hasOwnProperty:x}=Object.prototype;function $(t,e){return t=t.slice(),t.push(e),t}function Tt(t,e){return e=e.slice(),e.unshift(t),e}var Pt=class extends Error{constructor(e){super('JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)'),this.avoidNew=!0,this.value=e,this.name="NewError"}};function f(t,e,r,i,n){if(!(this instanceof f))try{return new f(t,e,r,i,n)}catch(o){if(!o.avoidNew)throw o;return o.value}typeof t=="string"&&(n=i,i=r,r=e,e=t,t=null);let s=t&&typeof 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=x.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||i||null,this.otherTypeCallback=t.otherTypeCallback||n||function(){throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")},t.autostart!==!1){let o={path:s?t.path:e};s?"json"in t&&(o.json=t.json):o.json=r;let a=this.evaluate(o);if(!a||typeof a!="object")throw new Pt(a);return a}}f.prototype.evaluate=function(t,e,r,i){let n=this.parent,s=this.parentProperty,{flatten:o,wrap:a}=this;if(this.currResultType=this.resultType,this.currPreventEval=this.preventEval,this.currSandbox=this.sandbox,r=r||this.callback,this.currOtherTypeCallback=i||this.otherTypeCallback,e=e||this.json,t=t||this.path,t&&typeof 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(!x.call(t,"json"))throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');({json:e}=t),o=x.call(t,"flatten")?t.flatten:o,this.currResultType=x.call(t,"resultType")?t.resultType:this.currResultType,this.currSandbox=x.call(t,"sandbox")?t.sandbox:this.currSandbox,a=x.call(t,"wrap")?t.wrap:a,this.currPreventEval=x.call(t,"preventEval")?t.preventEval:this.currPreventEval,r=x.call(t,"callback")?t.callback:r,this.currOtherTypeCallback=x.call(t,"otherTypeCallback")?t.otherTypeCallback:this.currOtherTypeCallback,n=x.call(t,"parent")?t.parent:n,s=x.call(t,"parentProperty")?t.parentProperty:s,t=t.path}if(n=n||null,s=s||null,Array.isArray(t)&&(t=f.toPathString(t)),!t&&t!==""||!e)return;let d=f.toPathArray(t);d[0]==="$"&&d.length>1&&d.shift(),this._hasParentSelector=null;let l=this._trace(d,e,["$"],n,s,r).filter(function(h){return h&&!h.isParentSelector});return l.length?!a&&l.length===1&&!l[0].hasArrExpr?this._getPreferredOutput(l[0]):l.reduce((h,m)=>{let u=this._getPreferredOutput(m);return o&&Array.isArray(u)?h=h.concat(u):h.push(u),h},[]):a?[]:void 0};f.prototype._getPreferredOutput=function(t){let e=this.currResultType;switch(e){case"all":{let r=Array.isArray(t.path)?t.path:f.toPathArray(t.path);return t.pointer=f.toPointer(r),t.path=typeof t.path=="string"?t.path:f.toPathString(t.path),t}case"value":case"parent":case"parentProperty":return t[e];case"path":return f.toPathString(t[e]);case"pointer":return f.toPointer(t.path);default:throw new TypeError("Unknown result type")}};f.prototype._handleCallback=function(t,e,r){if(e){let i=this._getPreferredOutput(t);t.path=typeof t.path=="string"?t.path:f.toPathString(t.path),e(i,r,t)}};f.prototype._trace=function(t,e,r,i,n,s,o,a){let d;if(!t.length)return d={path:r,value:e,parent:i,parentProperty:n,hasArrExpr:o},this._handleCallback(d,s,"value"),d;let l=t[0],h=t.slice(1),m=[];function u(c){Array.isArray(c)?c.forEach(p=>{m.push(p)}):m.push(c)}if((typeof l!="string"||a)&&e&&x.call(e,l))u(this._trace(h,e[l],$(r,l),e,l,s,o));else if(l==="*")this._walk(e,c=>{u(this._trace(h,e[c],$(r,c),e,c,s,!0,!0))});else if(l==="..")u(this._trace(h,e,r,i,n,s,o)),this._walk(e,c=>{typeof e[c]=="object"&&u(this._trace(t.slice(),e[c],$(r,c),e,c,s,!0))});else{if(l==="^")return this._hasParentSelector=!0,{path:r.slice(0,-1),expr:h,isParentSelector:!0};if(l==="~")return d={path:$(r,l),value:n,parent:i,parentProperty:null},this._handleCallback(d,s,"property"),d;if(l==="$")u(this._trace(h,e,r,null,null,s,o));else if(/^(-?\d*):(-?\d*):?(\d*)$/u.test(l))u(this._slice(l,h,e,r,i,n,s));else if(l.indexOf("?(")===0){if(this.currPreventEval)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");let c=l.replace(/^\?\((.*?)\)$/u,"$1");this._walk(e,p=>{this._eval(c,e[p],p,r,i,n)&&u(this._trace(h,e[p],$(r,p),e,p,s,!0))})}else if(l[0]==="("){if(this.currPreventEval)throw new Error("Eval [(expr)] prevented in JSONPath expression.");u(this._trace(Tt(this._eval(l,e,r[r.length-1],r.slice(0,-1),i,n),h),e,r,i,n,s,o))}else if(l[0]==="@"){let c=!1,p=l.slice(1,-2);switch(p){case"scalar":(!e||!["object","function"].includes(typeof e))&&(c=!0);break;case"boolean":case"string":case"undefined":case"function":typeof e===p&&(c=!0);break;case"integer":Number.isFinite(e)&&!(e%1)&&(c=!0);break;case"number":Number.isFinite(e)&&(c=!0);break;case"nonFinite":typeof e=="number"&&!Number.isFinite(e)&&(c=!0);break;case"object":e&&typeof e===p&&(c=!0);break;case"array":Array.isArray(e)&&(c=!0);break;case"other":c=this.currOtherTypeCallback(e,r,i,n);break;case"null":e===null&&(c=!0);break;default:throw new TypeError("Unknown value type "+p)}if(c)return d={path:r,value:e,parent:i,parentProperty:n},this._handleCallback(d,s,"value"),d}else if(l[0]==="`"&&e&&x.call(e,l.slice(1))){let c=l.slice(1);u(this._trace(h,e[c],$(r,c),e,c,s,o,!0))}else if(l.includes(",")){let c=l.split(",");for(let p of c)u(this._trace(Tt(p,h),e,r,i,n,s,!0))}else!a&&e&&x.call(e,l)&&u(this._trace(h,e[l],$(r,l),e,l,s,o,!0))}if(this._hasParentSelector)for(let c=0;c<m.length;c++){let p=m[c];if(p&&p.isParentSelector){let g=this._trace(p.expr,e,p.path,i,n,s,o);if(Array.isArray(g)){m[c]=g[0];let A=g.length;for(let b=1;b<A;b++)c++,m.splice(c,0,g[b])}else m[c]=g}}return m};f.prototype._walk=function(t,e){if(Array.isArray(t)){let r=t.length;for(let i=0;i<r;i++)e(i)}else t&&typeof t=="object"&&Object.keys(t).forEach(r=>{e(r)})};f.prototype._slice=function(t,e,r,i,n,s,o){if(!Array.isArray(r))return;let a=r.length,d=t.split(":"),l=d[2]&&Number.parseInt(d[2])||1,h=d[0]&&Number.parseInt(d[0])||0,m=d[1]&&Number.parseInt(d[1])||a;h=h<0?Math.max(0,h+a):Math.min(a,h),m=m<0?Math.max(0,m+a):Math.min(a,m);let u=[];for(let c=h;c<m;c+=l)this._trace(Tt(c,e),r,i,n,s,o,!0).forEach(g=>{u.push(g)});return u};f.prototype._eval=function(t,e,r,i,n,s){this.currSandbox._$_parentProperty=s,this.currSandbox._$_parent=n,this.currSandbox._$_property=r,this.currSandbox._$_root=this.json,this.currSandbox._$_v=e;let o=t.includes("@path");o&&(this.currSandbox._$_path=f.toPathString(i.concat([r])));let a="script:"+t;if(!f.cache[a]){let d=t.replace(/@parentProperty/gu,"_$_parentProperty").replace(/@parent/gu,"_$_parent").replace(/@property/gu,"_$_property").replace(/@root/gu,"_$_root").replace(/@([.\s)[])/gu,"_$_v$1");o&&(d=d.replace(/@path/gu,"_$_path")),f.cache[a]=new this.vm.Script(d)}try{return f.cache[a].runInNewContext(this.currSandbox)}catch(d){throw new Error("jsonPath: "+d.message+": "+t)}};f.cache={};f.toPathString=function(t){let e=t,r=e.length,i="$";for(let n=1;n<r;n++)/^(~|\^|@.*?\(\))$/u.test(e[n])||(i+=/^[0-9*]+$/u.test(e[n])?"["+e[n]+"]":"['"+e[n]+"']");return i};f.toPointer=function(t){let e=t,r=e.length,i="";for(let n=1;n<r;n++)/^(~|\^|@.*?\(\))$/u.test(e[n])||(i+="/"+e[n].toString().replace(/~/gu,"~0").replace(/\//gu,"~1"));return i};f.toPathArray=function(t){let{cache:e}=f;if(e[t])return e[t].concat();let r=[],n=t.replace(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/gu,";$&;").replace(/[['](\??\(.*?\))[\]']/gu,function(s,o){return"[#"+(r.push(o)-1)+"]"}).replace(/\[['"]([^'\]]*)['"]\]/gu,function(s,o){return"['"+o.replace(/\./gu,"%@%").replace(/~/gu,"%%@@%%")+"']"}).replace(/~/gu,";~;").replace(/['"]?\.['"]?(?![^[]*\])|\[['"]?/gu,";").replace(/%@%/gu,".").replace(/%%@@%%/gu,"~").replace(/(?:;)?(\^+)(?:;)?/gu,function(s,o){return";"+o.split("").join(";")+";"}).replace(/;;;|;;/gu,";..;").replace(/;$|'?\]|'$/gu,"").split(";").map(function(s){let o=s.match(/#(\d+)/u);return!o||!o[1]?s:r[o[1]]});return e[t]=n,e[t].concat()};f.prototype.vm=ue.default;function At(t,e){try{return f({path:e,json:t})}catch(r){return[]}}function F(t,e){var r;return((r=At(t,e))===null||r===void 0?void 0:r.flat(1/0))||[]}function V(t,e,r=!1,i=t){var n=e;let s=Object.keys(t).sort((a,d)=>d.length-a.length);for(let a of s)if(e.startsWith(a)){if(a==e){if(r)return t[a];continue}n=e.substring(a.length+1),i=t[a];break}var o=F(i,n);return Array.isArray(o)&&(o==null?void 0:o.length)==0&&(o=[n.replace(/^.*?\./,"_."),n.replace(/^.*?\./,""),n.replace(/^([^.]+).*?\.\$([\.\[])/,"$1$2"),n.replace(/^.*?\.\$([\.\[])/,"_$1"),n.replace(/^.*?\.\$([\.\[])/,"$$$1"),n.replace(/^[^.]+$/,"_")].filter((a,d,l)=>l.indexOf(a)===d).reduce((a,d)=>a.length>0?a:F(i,d),[])),r&&Array.isArray(o)?o[0]:o}function Ot(t,e={},r){return r?`<${r}${Object.entries(e).map(([i,n])=>n!=null&&` ${i}="${n}"`).filter(Boolean).join("")}>${P(t)}</${r}>`.replace(/^<([a-z0-9][^>]*)><\/[^>]+>$/,"<$1 />"):P(t)}function P(t){var e;if(Array.isArray(t))return t.map(P).join(`
|
|
2
|
-
`).trim();if(typeof t=="string")return t;if(t==null)return"";switch(t.type){case"heading":let{level:r,...i}=t.attrs;return Ot(t.content,i,"h"+r);case"text":return(t.marks||[]).reduce((n,s)=>Ot(n,s.attrs,{link:"a",bold:"strong",italic:"em",strike:"s",underline:"u"}[s.type]),(e=t.text)===null||e===void 0?void 0:e.replace(/\s+/," "));default:return Ot(t.content||t.text,t.attrs,{bulletList:"ul",orderedList:"ol",listItem:"li",horizontalRule:"hr",paragraph:"p",codeBlock:"code",blockquote:"blockquote"}[t.type])}}var U=class{constructor(e,r=1,i){this.ownerDocument={createElement(n){return new U(n)}},this.nodeName=e,this.nodeType=r,this.textContent=i,this.attributes=[],this.childNodes=[]}setAttribute(e,r){let i=this.attributes.find(n=>n.name===e);i?i.value=r:this.attributes.push({name:e,value:r})}getAttribute(e){let r=this.attributes.find(i=>i.name===e);return r?r.value:void 0}insertBefore(e,r){if(e.parentNode=this,r===null)this.childNodes.push(e);else{let i=this.childNodes.indexOf(r);i!==-1&&this.childNodes.splice(i,0,e)}}removeAttribute(e){let r=this.attributes.findIndex(i=>i.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 Mt(this.childNodes)}set innerHTML(e){this.childNodes=Dt(String(e!=null?e:""))}get outerHTML(){return Mt([this])}get children(){return this.childNodes.filter(e=>e.nodeType==1)}closest(e){let r=this;for(;r;){if(pe(e,r))return r;r=r.parentNode}return null}querySelectorAll(e){let r=e.split(/\s*,\s*/),i=[],n=s=>{for(let o of r)if(pe(o,s)){i.push(s);break}for(let o of s.childNodes)n(o)};for(let s of this.childNodes)n(s);return i}querySelector(e){return this.querySelectorAll(e)[0]}findSibling(e,r){if(!this.parentNode)return null;let i=this.parentNode.childNodes,n=i.indexOf(this);if(n===-1)return null;for(let s=n+e;s>=0&&s<i.length;s+=e){let o=i[s];if(!r||o.nodeType===1)return o}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 U(this.nodeName,this.nodeType);if(r.attributes=JSON.parse(JSON.stringify(this.attributes)),this.textContent&&(r.textContent=this.textContent),e)for(let i of this.childNodes){let n=i.cloneNode(!0);r.appendChild(n)}return r}get parentElement(){var e;return((e=this.parentNode)===null||e===void 0?void 0:e.nodeType)==1?this.parentNode:null}};function pe(t,e){let r=t.match(/([.#]?[\w-]+|\[([\w-]+)(="([^"]*)")?\])/g);if(!r)return!1;for(let i of r)if(i.startsWith("#")){if(e.getAttribute("id")!==i.slice(1))return!1}else if(i.startsWith(".")){if(!(e.getAttribute("class")||"").split(" ").includes(i.slice(1)))return!1}else if(i.startsWith("[")){let n=i.match(/^\[([\w-]+)(="([^"]*)")?\]$/);if(n){let s=n[1],o=n[3],a=e.getAttribute(s);if(typeof o=="undefined"){if(a===void 0)return!1}else if(a!==o)return!1}else return!1}else if(e.nodeName!==i)return!1;return!0}function Dt(t){var e;let r=[],i=[];for(;t;){let n=t.match(/^<([\w-]+)(\s[^>]*)?>/),s=t.match(/^<\/([\w-]+)>/);if(n){let o=n[1],d=((e=(n[2]||"").match(/([\w-]+)(="([^"]*)")?/g))===null||e===void 0?void 0:e.map(h=>{let[m,u,,c]=h.match(/([\w-]+)(="([^"]*)")?/);return{name:u,value:Be(c||"")}}))||[],l=new U(o,1);if(l.attributes=d,i.length>0){let h=i[i.length-1];h.childNodes.push(l),l.parentNode=h}else r.push(l);i.push(l),t=t.slice(n[0].length)}else if(s)i.pop(),t=t.slice(s[0].length);else{let o=t.indexOf("<"),a=t.slice(0,o!==-1?o:void 0),d=new U("#text",3);if(d.textContent=a,i.length>0){let l=i[i.length-1];l.childNodes.push(d),d.parentNode=l}else r.push(d);t=t.slice(a.length)}}return r}function He(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Be(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'")}function Mt(t){return t.map(e=>{if(e.nodeType===3)return e.textContent||"";let{nodeName:r,attributes:i}=e,n=i.map(({name:o,value:a})=>` ${o}="${He(String(a))}"`).join(""),s=Mt(e.childNodes);return["img","input","br"].includes(r)?`<${r}${n} />`:`<${r}${n}>${s}</${r}>`}).join("")}function Lt(t){let e=new t.ownerDocument.defaultView.MutationObserver(r=>{r.forEach(i=>{let n=i.target,s=n.getAttribute("data-embed-src");s&&z(n,s),i.addedNodes&&i.addedNodes.forEach(o=>{o.nodeType==1&&$t(o,!1)})})});return e.observe(t,{attributes:!0,subtree:!0,childList:!0}),e}function $t(t,e=!0){let r=t.querySelectorAll("[data-embed-src]");for(var i=0;i<r.length;i++){let n=r[i];z(n,n.getAttribute("data-embed-src"))}if(e)return Lt(t)}function z(t,e){for(var r=t;r;r=r.parentElement)if(!r.parentElement){let n=r.querySelectorAll("script");for(var i=0;i<n.length;i++)if(n[i].getAttribute("src")==e)return!0;r.tagName=="HTML"&&(r=r.querySelector("head")||r);let s=r.ownerDocument.createElement("script");s.setAttribute("type","module"),s.setAttribute("src",e),r.appendChild(s);break}}var dt={};H(dt,{adjustNumbers:()=>It,cleanCollectionBit:()=>J,getHumanizedLabel:()=>Wt,getLastPathBit:()=>Ht,getQualifier:()=>jt,normalizeCollectionScope:()=>lt,parseLimit:()=>Ft,parseRange:()=>Ut});var Ft=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},Ut=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(i=>{if(i.match(/^-?\d+$/))return i;let n=i.match(/^(\d+):(\d+)$/);return n&&parseInt(n[1],10)<parseInt(n[2],10)?n[1]+"-"+n[2]:null});return r!=null&&r.every(Boolean)?r.join(","):null},jt=t=>{var e;return(e=t==null?void 0:t.match(/(\.\*|\[[^\]]*\])$/))===null||e===void 0?void 0:e[0]};function J(t){return t.replace(/(\.?\[[^\]\[]*\]|\.\*)$/g,"")}function lt(t){return J(t)+".*"}function It(t,e){return t==null?void 0:t.replace(/(.|^)(\d+)/g,(r,i,n)=>i+(i==":"?n:String(parseInt(n)+e)))}function Wt(t,e=2){var r=J(t).split(/]\.|\.\*\./g).pop().split(/\./g).slice(-3);return r=r.filter(i=>isNaN(parseInt(i))),r.map(i=>i.charAt(0).toUpperCase()+i.slice(1)).slice(-e).join(" ")}function Ht(t){return J(t).split(".").pop()}var Ve=["January","February","March","April","May","June","July","August","September","October","November","December"],fe=t=>{if(!t||typeof t.getDay!="function")return;let e=t.getFullYear(),r=Ve[t.getMonth()],i=t.getDate();return`${r} ${i}, ${e}`},me=function(t){return String(new Date(t))!=="Invalid Date"&&!isNaN(Number(new Date(t)))};function ye(t){let e=t.getAttribute("data-path-scope");for(var r=0,i=t;i=i.previousElementSibling;)i.getAttribute("data-path-scope")==e&&r++;return r}function ze(t,e,r){let i=t.getAttribute("data-path-scope");if(i==null)return;var n=ye(t);if(n!=0)return;let s=t.parentNode;if(s!=null){e==0?t.setAttribute("hidden","hidden"):t.getAttribute("hidden")!=null&&t.removeAttribute("hidden");for(var o=n+1,a=t,d=t;d=d.nextElementSibling;)d.getAttribute("data-path-scope")==i&&(o++,a=d);for(var l=o;l<e;l++)s.insertBefore(a.cloneNode(!0),a.nextElementSibling);for(var l=Math.max(1,e);l<o;l++)a=a.previousElementSibling,s.removeChild(a.nextElementSibling)}}function O(t,e,r,i){var n,s;if(!t)return;var o=t;(r==null?void 0:r.type)=="doc"&&Array.isArray(r.content)&&(r=P(r)),i!=null&&i.processValue&&(r=i==null?void 0:i.processValue(t,e,r));var a=e.replace("data-path-","");if(e=="data-path-src"||e=="data-path-alt"){let g=Array.from(t.children).find(A=>A.localName=="picture")||t;o=t.localName=="img"?t:g.querySelector("img, video")}else if(e=="data-path-href")o=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")a="innerHTML";else if(e=="data-embed-src")z(t,r);else if(e=="data-path-attributes"){let g=((n=t.getAttribute("data-attributes-keys"))===null||n===void 0?void 0:n.split(",").filter(Boolean))||[];if(!Array.isArray(r))for(var d in r){var l=r[d];O(t,d,typeof l=="object"&&l?JSON.stringify(l):l,i)}for(var h=0;h<g.length;h++)(r==null||!(g[h]in r))&&O(t,g[h],null,i);O(t,"data-attributes-keys",Object.keys(r||{}).join(","));return}if(typeof r=="boolean"&&(r=r?"":null),!o)return;if((a=="innerHTML"||a=="src")&&(r==null||r==="")){var u=String((s=t.getAttribute("data-path-placeholder")||o[a])!==null&&s!==void 0?s:o.getAttribute(a));a=="innerHTML"?o.innerHTML=u:u?o.setAttribute(a,u):o.removeAttribute(a)}else if(r!=null)if(a=="innerHTML"){for(var c=String(r),p=o;p.parentElement&&p.localName.match(/^(a|var|strong|em|i|b)$/);)p=p.parentElement;p.localName.match(/p|h\d|button|time|li/)&&(c=c.replace(/<(p|h\d|li|ul)[^>]*?>|<\/(p|h\d|li|ul)[^>]*?>/g," ").trim().replace(/\s+/g," ")),String(p.getAttribute("class")).includes("-inline--time")&&me(c)&&(c=fe(new Date(c))),o.innerHTML!=c&&(o.innerHTML=c)}else o.getAttribute(a)!=r&&o.setAttribute(a,r);else o.removeAttribute(a)}var ge=["data-attributes-keys","data-path-attributes","data-path-scope"];function R(t,e,r,i){var n,s,o;let a=t;if(i||(e=((n=r==null?void 0:r.processData)===null||n===void 0?void 0:n.call(r,a,e))||e),a.nodeType==1){let h=a.getAttribute("data-path-scope");if(h){let u=ye(a),c=V(e,h,!1);u==0&&ze(a,((s=r==null?void 0:r.shouldRepeat)===null||s===void 0?void 0:s.call(r,a,c))===!1?1:c.length,r),e={...e,[lt(h)]:c[u]}}let m=Array.prototype.slice.call(a.attributes).sort((u,c)=>ge.indexOf(u.name)-ge.indexOf(c.name));for(var d=0;d<m.length;d++){let{name:u,value:c}=m[d];u.startsWith("data-path")&&u!="data-path-scope"&&O(a,u,V(e,c,!0),r),u=="data-embed-src"&&O(a,u,a.getAttribute(u),r)}}for(var d=0,l;l=a.childNodes[d++];)be(l)&&R(l,e,r,!0);return i||(o=r==null?void 0:r.onRender)===null||o===void 0||o.call(r,a,e),a}function be(t){return t.nodeType==1}function M(t,e,r,i){var n;let s=((n=i==null?void 0:i.processTemplate)===null||n===void 0?void 0:n.call(i,t,e,r))||e;if(t.innerHTML=s,t.classList.add("-feaas"),(t.closest(".component.feaas")||t).className.includes("-theme--"))for(var a=0,d;d=t.childNodes[a++];)be(d)&&(d.className=d.className.replace(/(\s|^)-theme--[^\s]+\s*/g,"$1"));return R(t,r,i)}function Bt(t,e,r,i=!1){var n;let s=((n=r==null?void 0:r.processTemplate)===null||n===void 0?void 0:n.call(r,null,t,e))||t;if(typeof document=="undefined"||i){let o=Dt(s);return R(o[0],e,r).outerHTML}else{let o=document.createElement("div");return o.innerHTML=s,R(o,e,r),o.innerHTML}}var ve=["initial","check","updated"],q={};function Ae(){q={}}async function G(t,e,r,i,n=q){return D({url:t,options:e,validator:r,callback:i,cache:n}).then(K).then(s=>s.response)}function Vt(t,e=!1){let r=String(t).replace("?head","");var i=q[r];return!i&&!e&&(i=q[r]={phase:null,initial:C(),check:C(),updated:C(),final:C()}),i}var ht=class extends Error{};async function D({url:t,options:e,validator:r,callback:i,cache:n},s="initial"){let o=new Date;if(n!=null){var a=Vt(t);if(ve.indexOf(a.phase)>=ve.indexOf(s))var d=a[s];else a.phase=s}let l=await(d||fetch(t,e));if(!d&&a&&(l.ok?a[s].resolve(l):a[s].reject(new Error("Fetch failed"))),!l.ok)throw new Error("Fetch failed");let h=new Date(l.headers.get("date"))<o||d&&s=="initial"&&(a.phase=="updated"||a.phase=="check");if((r==null?void 0:r(l,h))===!1)throw new ht("Response is not valid");return await(i==null?void 0:i(l,s,h)),{url:t,options:e,isCached:h,response:l,validator:r,callback:i,cache:n}}async function K(t){let{url:e,isCached:r,options:i,validator:n,response:s,cache:o}=t;if(r){let{response:a}=await D({url:e+"?head",options:{...i,method:"HEAD",cache:"no-cache"},validator:n,cache:o},"check");if(a.headers.get("last-modified")!=s.headers.get("last-modified"))return ut(t)}return t}async function ut(t){return D({...t,options:{...t.options,cache:"reload"}},"updated")}var N="https://feaas.blob.core.windows.net";function Y(t){let e=t.match(/^(?:(.*?)\/components)?\/?([^\/]+)\/([^\/]+)(?:\/([^\/]+)(?:\/(published|staged|saved|\d+)(?:\.html?)?)?)?$/);if(e){var[,r,i,n,s,o]=e;return{cdn:r,library:i,component:n,version:s,revision:o}}}function Ee(t){if(!t||!t.library||!t.component)throw new Error("Component requires `library` and `component` properties");return`${t.cdn&&t.cdn!=N?`${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 we(t){return`${t.cdn&&t.cdn!=N?`${t.cdn}/styles/`:""}${t.library}/${!t.revision||t.revision=="published"?"":t.revision}`.replace(/\/$|\/\/(?!.+\/styles\/)/g,"")}function pt(t){let e=t.match(/^(?:(.*?)\/styles\/)?([^\/]+)(?:\/(published|staged|saved|\d+)(?:.css)?)?$/);if(e){var[,r,i,n]=e;return{cdn:r,library:i,revision:n}}else{let s=Y(t);if(s){var{cdn:r,library:i,revision:n}=s;return n!=null&&n.match(/\d/)&&(n=void 0),{cdn:r,library:i,revision:n}}}}function Et(t){return typeof t=="string"&&(t={src:t}),"src"in t&&(t={...Y(t.src)}),`${t.cdn||t.hostname||N}/components/${t.library}/${t.component}/${t.version}/${t.revision||"published"}.html`}function Q(t){return typeof t=="string"&&(t={src:t}),"src"in t&&(t={...pt(t.src)}),`${t.cdn||t.hostname||N}/styles/${t.library}/${t.revision||"published"}.css`}async function j(t,e,r=!1){let i=a=>a.headers.get("x-ms-meta-versionDeletedAt")==null,n=a=>a.clone().text().then(e),s=await Promise.all([t.instance&&D({options:{headers:{Accept:"text/html"},credentials:"omit"},url:Et({...t,version:t.instance}),validator:i}).catch(a=>a),D({url:Et(t),validator:i}).catch(a=>a)]),o=s.find(a=>a&&"isCached"in a&&a);if(!o||o instanceof Error)throw s.find(d=>d&&d instanceof Error)||new Error("Can not fetch component");return s[0]==o&&console.log("Using fork!",s),await n(o.response),r?o:K({...o,callback:n}).catch(a=>{if(s[0]==o&&(ut({...o,callback:null,validator:null}),console.log("Fork was deleted"),!(s[1]instanceof Error)))return n(s[1].response),K({...s[1],callback:n});throw a})}async function Ce(t){typeof t=="string"&&(t={src:t});var e;let{response:r}=await j(t,i=>{e=i},!0);return{...t,template:e,lastModified:r.headers.get("last-modified")}}async function ft(t,e){return typeof t=="string"&&(t={src:t}),G(Q(t),{headers:{Accept:"text/css"},credentials:"omit"},r=>r.headers.get("x-ms-meta-deletedAt")==null,(r,i)=>r.clone().text().then(n=>e(n,i)))}function xe(t,e){return zt(t,e||(e=document.createElement("style"))),e}function zt(t,e){return e||(e=document.createElement("style")),ft(t,(r,i)=>{e.textContent=r}).then(()=>e)}function mt(t,e){var r=Jt(t);if(!r)var i=qt(t);return ft(t,(n,s)=>{i&&(i.textContent=n),e==null||e(n,s)}).then(()=>r||i)}function wt(t){return new Promise((e,r)=>{mt(t,e).catch(r)})}function Jt(t){return document.head.querySelector(`style[data-href="${Q(t)}"]`)}function qt(t){let e=Q(t),r=document.createElement("style");return r.setAttribute("data-href",e),document.head.appendChild(r),r}function Se(t,e){let r=document.createElement("div");r.innerHTML=t;let i=document.createDocumentFragment();for(;r.firstChild;)i.appendChild(r.firstChild);return R(i,e),r}function Ct(t,e){return Gt(t,e||(e=document.createElement("div"))),e}async function Gt(t,e){return e||(e=document.createElement("div")),e.childNodes.length?R(e,t.data,t):"template"in t?M(e,t.template,t.data,t):j(t,r=>M(e,r,t.data,t)).then(()=>e)}function Je(t){let{params:e,method:r,headers:i,body:n,url:s}=S(t);var o={url:s},a={...i};return i["Content-Type"]==="application/json"&&delete a["Content-Type"],i.Accept==="application/json"&&delete a.Accept,Object.keys(a).length>0&&(o.headers=a),r!=="GET"&&(o.method=r),r==="GET"||r==="HEAD"||Object.keys(n).length===0||(o.body=n),Object.keys(e).length>0&&(o={...o,params:e}),o}var xt=t=>{if(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 Re(t){let{url:e,headers:r,params:i,method:n,body:s}=S(t),o,a=r["Content-Type"];n!="GET"&&n!="HEAD"&&(a==="application/json"&&(o=JSON.stringify(s)),a==="multipart/form-data"&&(o=Object.keys(s).reduce((l,h)=>(l.append(h,s[h]),l),new FormData)),a==="application/x-www-form-urlencoded"&&(o=new URLSearchParams(s)));let d=Object.keys(i).length?`?${new URLSearchParams(i)}`:"";return[`${e}${d}`,{headers:r,body:o,method:n}]}function S(t){let e={};for(let r in(t==null?void 0:t.headers)||{})if(t.headers.hasOwnProperty(r)){let i=r.replace(/^[a-z]|\-[a-z]/g,n=>n.toUpperCase());e[i]=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 Kt=async t=>{try{let[e,r]=Re(t),n=await(await S.fetchImplementation(e,{...r,method:r.method.toLowerCase()})).json();return t.jsonpath&&t.jsonpath!="$"?F(n,t.jsonpath):n}catch(e){return{}}};async function St(t){if(!t)return t;if(xt(t))return Kt(t);let e=Object.keys(t),r=await Promise.all(e.map(i=>xt(t[i])?Kt(t[i]):null).filter(Boolean));return e.reduce((i,n)=>({...i,[n]:xt(t[n])?r.shift():t[n]}),{})}S.clean=Je;S.toFetchArguments=Re;S.fetchOne=Kt;S.fetch=St;S.isDataSettings=xt;S.fetchImplementation=(...t)=>fetch(...t);function Yt(t){var e,r,i,n,s,o,a,d;let l,h=t.getAttribute("src");if(h){let b=Y(h);if(!b)throw new Error(`Could not parse FEAAS Component source: ${h}`);var{cdn:m,library:u,component:c,version:p,revision:g}=b}let A=t.getAttribute("data");if(A!=null&&A!="")try{l=typeof A=="string"?JSON.parse(A):{}}catch(b){console.error(b)}return{data:l||{},cdn:(r=(e=t.getContextAttribute("cdn"))!==null&&e!==void 0?e:m)!==null&&r!==void 0?r:N,library:(i=t.getAttribute("library"))!==null&&i!==void 0?i:u,component:(n=t.getAttribute("component"))!==null&&n!==void 0?n:c,version:(o=(s=t.getAttribute("version"))!==null&&s!==void 0?s:p)!==null&&o!==void 0?o:"responsive",revision:(d=(a=t.getAttribute("revision"))!==null&&a!==void 0?a:g)!==null&&d!==void 0?d:"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"),withStylesheet:t.getAttribute("with-stylesheet")!="false"}}var X=class extends v{setData(e){this.set({data:e})}getProps(){return Yt(this)}isJSONAttribute(e){return e=="data"}attributeChangedCallback(e,r,i){r!==i&&((e=="library"||e=="component"||e=="revision"||e=="version")&&(this.payload=void 0),this.needsRefresh=!0,super.attributeChangedCallback(e,r,i),e==="data"&&this.fetchData())}async fetchData(){this.readyData=void 0,this.whenDataReady=this.whenDataReady.restart();let e=await S.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=C(e=>this.readyData=e,e=>this.onError(e)),this.defaultProps={cdn:N,revision:"published",version:"responsive",withStylesheet:!0,editable:!1,suspended:!1,data:{}},this.onLoad=e=>{this.payload=e,this.advance()},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 i=r;return i}}isReadyToLoad(){return super.isReadyToLoad()&&this.props.library!=null&&this.props.component!=null&&this.props.version!=null}async load(){if(this.getOriginal())return;let e=()=>{this.payload&&(r||this.readyData&&this.onLoad(this.payload))};if(this.props.withStylesheet)var r=wt({...this.props,revision:"published"}).then(()=>{r=null,e()});return Promise.all([r,this.whenDataReady.then(()=>e()),j(this.props,i=>{this.payload=i,e()})]).then(()=>this.payload)}flush(){this.readyData&&super.flush()}update(){if(this.alreadyRendered=!0,Array.from(this.children).filter(e=>e.tagName!="BR").length>0&&!this.needsRefresh)R(this,this.readyData);else{if(this.needsRefresh=!0,this.getOriginal())return;M(this,this.payload,this.readyData)}}};X.observedAttributes=["library","component","version","revision","hostname","cdn","template","data","instance","editable","with-stylesheet"];X.register("feaas-component");function Qt(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 Z=class extends v{constructor(){super(...arguments),this.defaultProps={hidden:!1}}getProps(){return Qt(this)}attributeChangedCallback(e,r,i){if(r!==i)return e=="hidden"&&(this.style.setProperty("display","block","important"),this.style.setProperty("transition","opacity 0.3s","important"),i?(this.style.setProperty("opacity","0","important"),this.style.pointerEvents="none"):(this.style.setProperty("opacity","1","important"),this.style.pointerEvents="all")),super.attributeChangedCallback(e,r,i)}connectedCallback(){this.payload=null,super.connectedCallback(),this.attributeChangedCallback("hidden",this.getAttribute("hidden"),this.getAttribute("hidden")),this.stylesheet=document.createElement("style"),this.stylesheet.textContent=`
|
|
2
|
+
`).trim();if(typeof t=="string")return t;if(t==null)return"";switch(t.type){case"heading":let{level:r,...i}=t.attrs;return Ot(t.content,i,"h"+r);case"text":return(t.marks||[]).reduce((n,s)=>Ot(n,s.attrs,{link:"a",bold:"strong",italic:"em",strike:"s",underline:"u"}[s.type]),(e=t.text)===null||e===void 0?void 0:e.replace(/\s+/," "));default:return Ot(t.content||t.text,t.attrs,{bulletList:"ul",orderedList:"ol",listItem:"li",horizontalRule:"hr",paragraph:"p",codeBlock:"code",blockquote:"blockquote"}[t.type])}}var U=class{constructor(e,r=1,i){this.ownerDocument={createElement(n){return new U(n)}},this.nodeName=e,this.nodeType=r,this.textContent=i,this.attributes=[],this.childNodes=[]}setAttribute(e,r){let i=this.attributes.find(n=>n.name===e);i?i.value=r:this.attributes.push({name:e,value:r})}getAttribute(e){let r=this.attributes.find(i=>i.name===e);return r?r.value:void 0}insertBefore(e,r){if(e.parentNode=this,r===null)this.childNodes.push(e);else{let i=this.childNodes.indexOf(r);i!==-1&&this.childNodes.splice(i,0,e)}}removeAttribute(e){let r=this.attributes.findIndex(i=>i.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 Mt(this.childNodes)}set innerHTML(e){this.childNodes=Dt(String(e!=null?e:""))}get outerHTML(){return Mt([this])}get children(){return this.childNodes.filter(e=>e.nodeType==1)}closest(e){let r=this;for(;r;){if(pe(e,r))return r;r=r.parentNode}return null}querySelectorAll(e){let r=e.split(/\s*,\s*/),i=[],n=s=>{for(let o of r)if(pe(o,s)){i.push(s);break}for(let o of s.childNodes)n(o)};for(let s of this.childNodes)n(s);return i}querySelector(e){return this.querySelectorAll(e)[0]}findSibling(e,r){if(!this.parentNode)return null;let i=this.parentNode.childNodes,n=i.indexOf(this);if(n===-1)return null;for(let s=n+e;s>=0&&s<i.length;s+=e){let o=i[s];if(!r||o.nodeType===1)return o}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 U(this.nodeName,this.nodeType);if(r.attributes=JSON.parse(JSON.stringify(this.attributes)),this.textContent&&(r.textContent=this.textContent),e)for(let i of this.childNodes){let n=i.cloneNode(!0);r.appendChild(n)}return r}get parentElement(){var e;return((e=this.parentNode)===null||e===void 0?void 0:e.nodeType)==1?this.parentNode:null}};function pe(t,e){let r=t.match(/([.#]?[\w-]+|\[([\w-]+)(="([^"]*)")?\])/g);if(!r)return!1;for(let i of r)if(i.startsWith("#")){if(e.getAttribute("id")!==i.slice(1))return!1}else if(i.startsWith(".")){if(!(e.getAttribute("class")||"").split(" ").includes(i.slice(1)))return!1}else if(i.startsWith("[")){let n=i.match(/^\[([\w-]+)(="([^"]*)")?\]$/);if(n){let s=n[1],o=n[3],a=e.getAttribute(s);if(typeof o=="undefined"){if(a===void 0)return!1}else if(a!==o)return!1}else return!1}else if(e.nodeName!==i)return!1;return!0}function Dt(t){var e;let r=[],i=[];for(;t;){let n=t.match(/^<([\w-]+)(\s[^>]*)?>/),s=t.match(/^<\/([\w-]+)>/);if(n){let o=n[1],d=((e=(n[2]||"").match(/([\w-]+)(="([^"]*)")?/g))===null||e===void 0?void 0:e.map(h=>{let[m,u,,c]=h.match(/([\w-]+)(="([^"]*)")?/);return{name:u,value:Be(c||"")}}))||[],l=new U(o,1);if(l.attributes=d,i.length>0){let h=i[i.length-1];h.childNodes.push(l),l.parentNode=h}else r.push(l);i.push(l),t=t.slice(n[0].length)}else if(s)i.pop(),t=t.slice(s[0].length);else{let o=t.indexOf("<"),a=t.slice(0,o!==-1?o:void 0),d=new U("#text",3);if(d.textContent=a,i.length>0){let l=i[i.length-1];l.childNodes.push(d),d.parentNode=l}else r.push(d);t=t.slice(a.length)}}return r}function He(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Be(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'")}function Mt(t){return t.map(e=>{if(e.nodeType===3)return e.textContent||"";let{nodeName:r,attributes:i}=e,n=i.map(({name:o,value:a})=>` ${o}="${He(String(a))}"`).join(""),s=Mt(e.childNodes);return["img","input","br"].includes(r)?`<${r}${n} />`:`<${r}${n}>${s}</${r}>`}).join("")}function Lt(t){let e=new t.ownerDocument.defaultView.MutationObserver(r=>{r.forEach(i=>{let n=i.target,s=n.getAttribute("data-embed-src");s&&z(n,s),i.addedNodes&&i.addedNodes.forEach(o=>{o.nodeType==1&&$t(o,!1)})})});return e.observe(t,{attributes:!0,subtree:!0,childList:!0}),e}function $t(t,e=!0){let r=t.querySelectorAll("[data-embed-src]");for(var i=0;i<r.length;i++){let n=r[i];z(n,n.getAttribute("data-embed-src"))}if(e)return Lt(t)}function z(t,e){for(var r=t;r;r=r.parentElement)if(!r.parentElement){let n=r.querySelectorAll("script");for(var i=0;i<n.length;i++)if(n[i].getAttribute("src")==e)return!0;r.tagName=="HTML"&&(r=r.querySelector("head")||r);let s=r.ownerDocument.createElement("script");s.setAttribute("type","module"),s.setAttribute("src",e),r.appendChild(s);break}}var dt={};H(dt,{adjustNumbers:()=>It,cleanCollectionBit:()=>J,getHumanizedLabel:()=>Wt,getLastPathBit:()=>Ht,getQualifier:()=>jt,normalizeCollectionScope:()=>lt,parseLimit:()=>Ft,parseRange:()=>Ut});var Ft=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},Ut=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(i=>{if(i.match(/^-?\d+$/))return i;let n=i.match(/^(\d+):(\d+)$/);return n&&parseInt(n[1],10)<parseInt(n[2],10)?n[1]+"-"+n[2]:null});return r!=null&&r.every(Boolean)?r.join(","):null},jt=t=>{var e;return(e=t==null?void 0:t.match(/(\.\*|\[[^\]]*\])$/))===null||e===void 0?void 0:e[0]};function J(t){return t.replace(/(\.?\[[^\]\[]*\]|\.\*)$/g,"")}function lt(t){return J(t)+".*"}function It(t,e){return t==null?void 0:t.replace(/(.|^)(\d+)/g,(r,i,n)=>i+(i==":"?n:String(parseInt(n)+e)))}function Wt(t,e=2){var r=J(t).split(/]\.|\.\*\./g).pop().split(/\./g).slice(-3);return r=r.filter(i=>isNaN(parseInt(i))),r.map(i=>i.charAt(0).toUpperCase()+i.slice(1)).slice(-e).join(" ")}function Ht(t){return J(t).split(".").pop()}var Ve=["January","February","March","April","May","June","July","August","September","October","November","December"],fe=t=>{if(!t||typeof t.getDay!="function")return;let e=t.getFullYear(),r=Ve[t.getMonth()],i=t.getDate();return`${r} ${i}, ${e}`},me=function(t){return String(new Date(t))!=="Invalid Date"&&!isNaN(Number(new Date(t)))};function ye(t){let e=t.getAttribute("data-path-scope");for(var r=0,i=t;i=i.previousElementSibling;)i.getAttribute("data-path-scope")==e&&r++;return r}function ze(t,e,r){let i=t.getAttribute("data-path-scope");if(i==null)return;var n=ye(t);if(n!=0)return;let s=t.parentNode;if(s!=null){e==0?t.setAttribute("hidden","hidden"):t.getAttribute("hidden")!=null&&t.removeAttribute("hidden");for(var o=n+1,a=t,d=t;d=d.nextElementSibling;)d.getAttribute("data-path-scope")==i&&(o++,a=d);for(var l=o;l<e;l++)s.insertBefore(a.cloneNode(!0),a.nextElementSibling);for(var l=Math.max(1,e);l<o;l++)a=a.previousElementSibling,s.removeChild(a.nextElementSibling)}}function O(t,e,r,i){var n,s;if(!t)return;var o=t;(r==null?void 0:r.type)=="doc"&&Array.isArray(r.content)&&(r=P(r)),i!=null&&i.processValue&&(r=i==null?void 0:i.processValue(t,e,r));var a=e.replace("data-path-","");if(e=="data-path-src"||e=="data-path-alt"){let g=Array.from(t.children).find(A=>A.localName=="picture")||t;o=t.localName=="img"?t:g.querySelector("img, video")}else if(e=="data-path-href")o=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")a="innerHTML";else if(e=="data-embed-src")z(t,r);else if(e=="data-path-attributes"){let g=((n=t.getAttribute("data-attributes-keys"))===null||n===void 0?void 0:n.split(",").filter(Boolean))||[];if(!Array.isArray(r))for(var d in r){var l=r[d];O(t,d,typeof l=="object"&&l?JSON.stringify(l):l,i)}for(var h=0;h<g.length;h++)(r==null||!(g[h]in r))&&O(t,g[h],null,i);O(t,"data-attributes-keys",Object.keys(r||{}).join(","));return}if(typeof r=="boolean"&&(r=r?"":null),!o)return;if((a=="innerHTML"||a=="src")&&(r==null||r==="")){var u=String((s=t.getAttribute("data-path-placeholder")||o[a])!==null&&s!==void 0?s:o.getAttribute(a));a=="innerHTML"?o.innerHTML=u:u?o.setAttribute(a,u):o.removeAttribute(a)}else if(r!=null)if(a=="innerHTML"){for(var c=String(r),p=o;p.parentElement&&p.localName.match(/^(a|var|strong|em|i|b)$/);)p=p.parentElement;p.localName.match(/p|h\d|button|time|li/)&&(c=c.replace(/<(p|h\d|li|ul)[^>]*?>|<\/(p|h\d|li|ul)[^>]*?>/g," ").trim().replace(/\s+/g," ")),String(p.getAttribute("class")).includes("-inline--time")&&me(c)&&(c=fe(new Date(c))),o.innerHTML!=c&&(o.innerHTML=c)}else o.getAttribute(a)!=r&&o.setAttribute(a,r);else o.removeAttribute(a)}var ge=["data-attributes-keys","data-path-attributes","data-path-scope"];function R(t,e,r,i){var n,s,o;let a=t;if(i||(e=((n=r==null?void 0:r.processData)===null||n===void 0?void 0:n.call(r,a,e))||e),a.nodeType==1){let h=a.getAttribute("data-path-scope");if(h){let u=ye(a),c=V(e,h,!1);u==0&&ze(a,((s=r==null?void 0:r.shouldRepeat)===null||s===void 0?void 0:s.call(r,a,c))===!1?1:c.length,r),e={...e,[lt(h)]:c[u]}}let m=Array.prototype.slice.call(a.attributes).sort((u,c)=>ge.indexOf(u.name)-ge.indexOf(c.name));for(var d=0;d<m.length;d++){let{name:u,value:c}=m[d];u.startsWith("data-path")&&u!="data-path-scope"&&O(a,u,V(e,c,!0),r),u=="data-embed-src"&&O(a,u,a.getAttribute(u),r)}}for(var d=0,l;l=a.childNodes[d++];)be(l)&&R(l,e,r,!0);return i||(o=r==null?void 0:r.onRender)===null||o===void 0||o.call(r,a,e),a}function be(t){return t.nodeType==1}function M(t,e,r,i){var n;let s=((n=i==null?void 0:i.processTemplate)===null||n===void 0?void 0:n.call(i,t,e,r))||e;if(t.innerHTML=s,t.classList.add("-feaas"),(t.closest(".component.feaas")||t).className.includes("-theme--"))for(var a=0,d;d=t.childNodes[a++];)be(d)&&(d.className=d.className.replace(/(\s|^)-theme--[^\s]+\s*/g,"$1"));return R(t,r,i)}function Bt(t,e,r,i=!1){var n;let s=((n=r==null?void 0:r.processTemplate)===null||n===void 0?void 0:n.call(r,null,t,e))||t;if(typeof document=="undefined"||i){let o=Dt(s);return R(o[0],e,r).outerHTML}else{let o=document.createElement("div");return o.innerHTML=s,R(o,e,r),o.innerHTML}}var ve=["initial","check","updated"],q={};function Ae(){q={}}async function G(t,e,r,i,n=q){return D({url:t,options:e,validator:r,callback:i,cache:n}).then(K).then(s=>s.response)}function Vt(t,e=!1){let r=String(t).replace("?head","");var i=q[r];return!i&&!e&&(i=q[r]={phase:null,initial:C(),check:C(),updated:C(),final:C()}),i}var ht=class extends Error{};async function D({url:t,options:e,validator:r,callback:i,cache:n},s="initial"){let o=new Date;if(n!=null){var a=Vt(t);if(ve.indexOf(a.phase)>=ve.indexOf(s))var d=a[s];else a.phase=s}let l=await(d||fetch(t,e));if(!d&&a&&(l.ok?a[s].resolve(l):a[s].reject(new Error("Fetch failed"))),!l.ok)throw new Error("Fetch failed");let h=new Date(l.headers.get("date"))<o||d&&s=="initial"&&(a.phase=="updated"||a.phase=="check");if((r==null?void 0:r(l,h))===!1)throw new ht("Response is not valid");return await(i==null?void 0:i(l,s,h)),{url:t,options:e,isCached:h,response:l,validator:r,callback:i,cache:n}}async function K(t){let{url:e,isCached:r,options:i,validator:n,response:s,cache:o}=t;if(r){let{response:a}=await D({url:e+"?head",options:{...i,method:"HEAD",cache:"no-cache"},validator:n,cache:o},"check");if(a.headers.get("last-modified")!=s.headers.get("last-modified"))return ut(t)}return t}async function ut(t){return D({...t,options:{...t.options,cache:"reload"}},"updated")}var N="https://feaas.blob.core.windows.net";function Y(t){let e=t.match(/^(?:(.*?)\/components)?\/?([^\/]+)\/([^\/]+)(?:\/([^\/]+)(?:\/(published|staged|saved|\d+)(?:\.html?)?)?)?$/);if(e){var[,r,i,n,s,o]=e;return{cdn:r,library:i,component:n,version:s,revision:o}}}function Ee(t){if(!t||!t.library||!t.component)throw new Error("Component requires `library` and `component` properties");return`${t.cdn&&t.cdn!=N?`${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 we(t){return`${t.cdn&&t.cdn!=N?`${t.cdn}/styles/`:""}${t.library}/${!t.revision||t.revision=="published"?"":t.revision}`.replace(/\/$|\/\/(?!.+\/styles\/)/g,"")}function pt(t){let e=t.match(/^(?:(.*?)\/styles\/)?([^\/]+)(?:\/(published|staged|saved|\d+)(?:.css)?)?$/);if(e){var[,r,i,n]=e;return{cdn:r,library:i,revision:n}}else{let s=Y(t);if(s){var{cdn:r,library:i,revision:n}=s;return n!=null&&n.match(/\d/)&&(n=void 0),{cdn:r,library:i,revision:n}}}}function Et(t){return typeof t=="string"&&(t={src:t}),"src"in t&&(t={...Y(t.src)}),`${t.cdn||t.hostname||N}/components/${t.library}/${t.component}/${t.version}/${t.revision||"published"}.html`}function Q(t){return typeof t=="string"&&(t={src:t}),"src"in t&&(t={...pt(t.src)}),`${t.cdn||t.hostname||N}/styles/${t.library}/${t.revision||"published"}.css`}async function j(t,e,r=!1){let i=a=>a.headers.get("x-ms-meta-versionDeletedAt")==null,n=a=>a.clone().text().then(e),s=await Promise.all([t.instance&&D({options:{headers:{Accept:"text/html"},credentials:"omit"},url:Et({...t,version:t.instance}),validator:i}).catch(a=>a),D({url:Et(t),validator:i}).catch(a=>a)]),o=s.find(a=>a&&"isCached"in a&&a);if(!o||o instanceof Error)throw s.find(d=>d&&d instanceof Error)||new Error("Can not fetch component");return s[0]==o&&console.log("Using fork!",s),await n(o.response),r?o:K({...o,callback:n}).catch(a=>{if(s[0]==o&&(ut({...o,callback:null,validator:null}),console.log("Fork was deleted"),!(s[1]instanceof Error)))return n(s[1].response),K({...s[1],callback:n});throw a})}async function Ce(t){typeof t=="string"&&(t={src:t});var e;let{response:r}=await j(t,i=>{e=i},!0);return{...t,template:e,lastModified:r.headers.get("last-modified")}}async function ft(t,e){return typeof t=="string"&&(t={src:t}),G(Q(t),{headers:{Accept:"text/css"},credentials:"omit"},r=>r.headers.get("x-ms-meta-deletedAt")==null,(r,i)=>r.clone().text().then(n=>e(n,i)))}function xe(t,e){return zt(t,e||(e=document.createElement("style"))),e}function zt(t,e){return e||(e=document.createElement("style")),ft(t,(r,i)=>{e.textContent=r}).then(()=>e)}function mt(t,e){var r=Jt(t);if(!r)var i=qt(t);return ft(t,(n,s)=>{i&&(i.textContent=n),e==null||e(n,s)}).then(()=>r||i)}function wt(t){return new Promise((e,r)=>{mt(t,e).catch(r)})}function Jt(t){return document.head.querySelector(`style[data-href="${Q(t)}"]`)}function qt(t){let e=Q(t),r=document.createElement("style");return r.setAttribute("data-href",e),document.head.appendChild(r),r}function Se(t,e){let r=document.createElement("div");r.innerHTML=t;let i=document.createDocumentFragment();for(;r.firstChild;)i.appendChild(r.firstChild);return R(i,e),r}function Ct(t,e){return Gt(t,e||(e=document.createElement("div"))),e}async function Gt(t,e){return e||(e=document.createElement("div")),e.childNodes.length?R(e,t.data,t):"template"in t?M(e,t.template,t.data,t):j(t,r=>M(e,r,t.data,t)).then(()=>e)}function Je(t){let{params:e,method:r,headers:i,body:n,url:s}=S(t);var o={url:s},a={...i};return i["Content-Type"]==="application/json"&&delete a["Content-Type"],i.Accept==="application/json"&&delete a.Accept,Object.keys(a).length>0&&(o.headers=a),r!=="GET"&&(o.method=r),r==="GET"||r==="HEAD"||Object.keys(n).length===0||(o.body=n),Object.keys(e).length>0&&(o={...o,params:e}),o}var xt=t=>{if(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 Re(t){let{url:e,headers:r,params:i,method:n,body:s}=S(t),o,a=r["Content-Type"];n!="GET"&&n!="HEAD"&&(a==="application/json"&&(o=JSON.stringify(s)),a==="multipart/form-data"&&(o=Object.keys(s).reduce((l,h)=>(l.append(h,s[h]),l),new FormData)),a==="application/x-www-form-urlencoded"&&(o=new URLSearchParams(s)));let d=Object.keys(i).length?`?${new URLSearchParams(i)}`:"";return[`${e}${d}`,{headers:r,body:o,method:n}]}function S(t){let e={};for(let r in(t==null?void 0:t.headers)||{})if(t.headers.hasOwnProperty(r)){let i=r.replace(/^[a-z]|\-[a-z]/g,n=>n.toUpperCase());e[i]=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 Kt=async t=>{try{let[e,r]=Re(t),n=await(await S.fetchImplementation(e,{...r,method:r.method.toLowerCase()})).json();return t.jsonpath&&t.jsonpath!="$"?F(n,t.jsonpath):n}catch(e){return{}}};async function St(t){if(!t)return t;if(xt(t))return Kt(t);let e=Object.keys(t),r=await Promise.all(e.map(i=>xt(t[i])?Kt(t[i]):null).filter(Boolean));return e.reduce((i,n)=>({...i,[n]:xt(t[n])?r.shift():t[n]}),{})}S.clean=Je;S.toFetchArguments=Re;S.fetchOne=Kt;S.fetch=St;S.isDataSettings=xt;S.fetchImplementation=(...t)=>fetch(...t);function Yt(t){var e,r,i,n,s,o,a,d;let l,h=t.getAttribute("src");if(h){let b=Y(h);if(!b)throw new Error(`Could not parse FEAAS Component source: ${h}`);var{cdn:m,library:u,component:c,version:p,revision:g}=b}let A=t.getAttribute("data");if(A!=null&&A!="")try{l=typeof A=="string"?JSON.parse(A):{}}catch(b){console.error(b)}return{data:l||{},cdn:(r=(e=t.getContextAttribute("cdn"))!==null&&e!==void 0?e:m)!==null&&r!==void 0?r:N,library:(i=t.getAttribute("library"))!==null&&i!==void 0?i:u,component:(n=t.getAttribute("component"))!==null&&n!==void 0?n:c,version:(o=(s=t.getAttribute("version"))!==null&&s!==void 0?s:p)!==null&&o!==void 0?o:"responsive",revision:(d=(a=t.getAttribute("revision"))!==null&&a!==void 0?a:g)!==null&&d!==void 0?d:"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"),withStylesheet:t.getAttribute("with-stylesheet")!="false"}}var X=class extends v{setData(e){this.set({data:e})}getProps(){return Yt(this)}isJSONAttribute(e){return e=="data"}attributeChangedCallback(e,r,i){r!==i&&((e=="library"||e=="component"||e=="revision"||e=="version")&&(this.payload=void 0),this.needsRefresh=!0,super.attributeChangedCallback(e,r,i),e==="data"&&this.fetchData())}async fetchData(){this.readyData=void 0,this.whenDataReady=this.whenDataReady.restart();let e=await S.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=C(e=>this.readyData=e,e=>this.onError(e)),this.defaultProps={cdn:N,revision:"published",version:"responsive",withStylesheet:!0,editable:!1,suspended:!1,data:{}},this.onLoad=e=>{this.payload=e,this.advance()},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 i=r;return i}}isReadyToLoad(){return super.isReadyToLoad()&&this.props.library!=null&&this.props.component!=null&&this.props.version!=null}async load(){if(this.getOriginal())return;let e=()=>{this.payload&&(r||this.readyData&&this.onLoad(this.payload))};if(this.props.withStylesheet)var r=wt({...this.props,revision:"published"}).then(()=>{r=null,e()});return Promise.all([r,this.whenDataReady.then(()=>e()),j(this.props,i=>{this.payload=i,e()})]).then(()=>this.payload)}flush(){this.readyData&&super.flush()}update(){if(this.alreadyRendered=!0,this.getAttribute("hydrate")!="false")if(Array.from(this.children).filter(e=>e.tagName!="BR").length>0&&!this.needsRefresh)R(this,this.readyData);else{if(this.needsRefresh=!0,this.getOriginal())return;M(this,this.payload,this.readyData)}}};X.observedAttributes=["library","component","version","revision","hostname","cdn","template","data","instance","editable","with-stylesheet"];X.register("feaas-component");function Qt(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 Z=class extends v{constructor(){super(...arguments),this.defaultProps={hidden:!1}}getProps(){return Qt(this)}attributeChangedCallback(e,r,i){if(r!==i)return e=="hidden"&&(this.style.setProperty("display","block","important"),this.style.setProperty("transition","opacity 0.3s","important"),i?(this.style.setProperty("opacity","0","important"),this.style.pointerEvents="none"):(this.style.setProperty("opacity","1","important"),this.style.pointerEvents="all")),super.attributeChangedCallback(e,r,i)}connectedCallback(){this.payload=null,super.connectedCallback(),this.attributeChangedCallback("hidden",this.getAttribute("hidden"),this.getAttribute("hidden")),this.stylesheet=document.createElement("style"),this.stylesheet.textContent=`
|
|
3
3
|
#loader {
|
|
4
4
|
position: absolute;
|
|
5
5
|
top: 0;
|