@sitecore-feaas/clientside 0.3.4 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/FEAASElement.js +9 -1
- package/build/components/FEAASElement.js.map +1 -1
- package/build/dom/rendering.js +9 -0
- package/build/dom/rendering.js.map +1 -1
- package/dist/browser/headless.cjs +7 -7
- package/dist/browser/headless.cjs.map +3 -3
- package/dist/browser/headless.esm.js +7 -7
- package/dist/browser/headless.esm.js.map +1 -1
- package/dist/browser/index.cjs +5 -5
- package/dist/browser/index.cjs.map +3 -3
- package/dist/browser/index.esm.js +5 -5
- package/dist/browser/index.esm.js.map +1 -1
- package/dist/browser/react.cjs +5 -5
- package/dist/browser/react.cjs.map +3 -3
- package/dist/browser/react.esm.js +6 -6
- package/dist/browser/react.esm.js.map +1 -1
- package/dist/node/headless.cjs +5 -5
- package/dist/node/headless.cjs.map +3 -3
- package/dist/node/headless.esm.js +5 -5
- package/dist/node/headless.esm.js.map +3 -3
- package/dist/node/index.cjs +4 -4
- package/dist/node/index.cjs.map +3 -3
- package/dist/node/index.esm.js +4 -4
- package/dist/node/index.esm.js.map +3 -3
- package/dist/node/react.cjs +4 -4
- package/dist/node/react.cjs.map +3 -3
- package/dist/node/react.esm.js +4 -4
- package/dist/node/react.esm.js.map +3 -3
- package/headless.cjs +5 -5
- package/headless.cjs.map +3 -3
- package/headless.js +5 -5
- package/headless.js.map +3 -3
- package/package.json +1 -1
- package/react.cjs +5 -5
- package/react.cjs.map +3 -3
- package/react.js +5 -5
- package/react.js.map +3 -3
- package/src/components/FEAASElement.tsx +13 -1
- package/src/dom/rendering.ts +10 -0
- package/test/dom.test.ts +45 -0
- package/types/components/FEAASElement.d.ts.map +1 -1
- package/types/dom/rendering.d.ts.map +1 -1
- package/types/tsbuildinfo +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var Ge=Object.defineProperty;var H=(t,e)=>{for(var r in e)Ge(t,r,{get:e[r],enumerable:!0})};function S(t,e=r=>{}){var r;let n=()=>{var i,o;let a=new Promise((u,c)=>{i=l=>{t==null||t(l),u(l)},o=c});var s=Object.assign(a,{resolve:i,reject:o,restart:n,first:r});return r=s,s.catch(e),s};return n()}var Ke=typeof HTMLElement=="undefined"?typeof windowJSDOM!="undefined"?windowJSDOM.HTMLElement:class{}:HTMLElement,x=class extends Ke{getProps(e){return{}}constructor(){super(),this.defaultProps={},this.connected=!1,this.refs={},this.descendants=[],this.whenLoaded=S(e=>{this.payload=e}),this.whenRendered=S(()=>this.initialized=!0,()=>cancelAnimationFrame(this.nextRender)),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){typeof process!="undefined"&&process.env.TESTING||console.log(...e)}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(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:a}=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.refs.topReact&&!this.forceUpdateReact?a?(this.reactRoot||(this.reactRoot=a.createRoot(this.getReactRootElement())),this.reactRoot.render(this.getReactElement())):o.render(this.getReactElement(),this.getReactRootElement()):this.forceUpdateReact?(e=this.forceUpdateReact)===null||e===void 0||e.call(this):(n=(r=this.refs.topReact).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).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(a){return{error:a}}componentDidCatch(a,s){console.error(`FEAAS: ${e.tagName} Error:`,a,s),e.onError(a,"react")}render(){if(!this.state.error)return this.props.children}})}getReactElement(e=this,r){let{React:n,ReactDOM:i}=e.payload||{},o=this.getReactErrorBoundary(),a=this.getReactWrapper(e);return n.createElement(o,{key:e.tagName+"-"+e.getUID(),slot:e.getAttribute("slot")},n.createElement(a,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[a,s]=n.useReducer(u=>u+1,0);return e.forceUpdateReact=s,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],a=i?JSON.stringify(o):String(o),s=this.defaultProps[r],u=i?JSON.stringify(s):String(s),c=r.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),l=this.getAttribute(c);try{var n=i?JSON.stringify(JSON.parse(l)):l}catch(f){var n=null}o==null||a===u?this.removeAttribute(c):(typeof o=="string"||typeof o=="number"||typeof o=="boolean"||i)&&n!=a&&this.setAttribute(c,a)}}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()),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 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 N=class extends x{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)}},re=class extends N{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))}};re.observedAttributes=["counter"];var he={};H(he,{renderDOMContent:()=>P,renderDOMElement:()=>A,renderHTMLContent:()=>wt,setDOMAttribute:()=>T});var se={};H(se,{JSONPath:()=>p,queryObject:()=>I,queryScopes:()=>J,serializeCH1RichText:()=>O});function E(t){return E=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},E(t)}function _e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ee(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 Ce(t,e,r){return e&&Ee(t.prototype,e),r&&Ee(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ye(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&&j(t,e)}function L(t){return L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},L(t)}function j(t,e){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},j(t,e)}function Fe(){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 M(t,e,r){return Fe()?M=Reflect.construct.bind():M=function(i,o,a){var s=[null];s.push.apply(s,o);var u=Function.bind.apply(i,s),c=new u;return a&&j(c,a.prototype),c},M.apply(null,arguments)}function Qe(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function ne(t){var e=typeof Map=="function"?new Map:void 0;return ne=function(n){if(n===null||!Qe(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 M(n,arguments,L(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),j(i,n)},ne(t)}function Xe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ze(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 Xe(t)}function et(t){var e=Fe();return function(){var n=L(t),i;if(e){var o=L(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Ze(this,i)}}function tt(t){return rt(t)||nt(t)||De(t)||it()}function rt(t){if(Array.isArray(t))return ie(t)}function nt(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function De(t,e){if(t){if(typeof t=="string")return ie(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 ie(t,e)}}function ie(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 it(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ot(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=De(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(
|
|
3
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,s;return{s:function(){r=r.call(t)},n:function(){var u=r.next();return o=u.done,u},e:function(u){a=!0,s=u},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw s}}}}var g=Object.prototype.hasOwnProperty;function D(t,e){return t=t.slice(),t.push(e),t}function oe(t,e){return e=e.slice(),e.unshift(t),e}var at=function(t){Ye(r,t);var e=et(r);function r(n){var i;return _e(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 Ce(r)}(ne(Error));function p(t,e,r,n,i){if(!(this instanceof p))try{return new p(t,e,r,n,i)}catch(u){if(!u.avoidNew)throw u;return u.value}typeof t=="string"&&(i=n,n=r,r=e,e=t,t=null);var o=t&&E(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=g.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 a={path:o?t.path:e};o?"json"in t&&(a.json=t.json):a.json=r;var s=this.evaluate(a);if(!s||E(s)!=="object")throw new at(s);return s}}p.prototype.evaluate=function(t,e,r,n){var i=this,o=this.parent,a=this.parentProperty,s=this.flatten,u=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&&E(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(!g.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,s=g.call(t,"flatten")?t.flatten:s,this.currResultType=g.call(t,"resultType")?t.resultType:this.currResultType,this.currSandbox=g.call(t,"sandbox")?t.sandbox:this.currSandbox,u=g.call(t,"wrap")?t.wrap:u,this.currPreventEval=g.call(t,"preventEval")?t.preventEval:this.currPreventEval,r=g.call(t,"callback")?t.callback:r,this.currOtherTypeCallback=g.call(t,"otherTypeCallback")?t.otherTypeCallback:this.currOtherTypeCallback,o=g.call(t,"parent")?t.parent:o,a=g.call(t,"parentProperty")?t.parentProperty:a,t=t.path}if(o=o||null,a=a||null,Array.isArray(t)&&(t=p.toPathString(t)),!(!t&&t!==""||!e)){var l=p.toPathArray(t);l[0]==="$"&&l.length>1&&l.shift(),this._hasParentSelector=null;var f=this._trace(l,e,["$"],o,a,r).filter(function(d){return d&&!d.isParentSelector});return f.length?!u&&f.length===1&&!f[0].hasArrExpr?this._getPreferredOutput(f[0]):f.reduce(function(d,h){var v=i._getPreferredOutput(h);return s&&Array.isArray(v)?d=d.concat(v):d.push(v),d},[]):u?[]:void 0}};p.prototype._getPreferredOutput=function(t){var e=this.currResultType;switch(e){case"all":{var r=Array.isArray(t.path)?t.path:p.toPathArray(t.path);return t.pointer=p.toPointer(r),t.path=typeof t.path=="string"?t.path:p.toPathString(t.path),t}case"value":case"parent":case"parentProperty":return t[e];case"path":return p.toPathString(t[e]);case"pointer":return p.toPointer(t.path);default:throw new TypeError("Unknown result type")}};p.prototype._handleCallback=function(t,e,r){if(e){var n=this._getPreferredOutput(t);t.path=typeof t.path=="string"?t.path:p.toPathString(t.path),e(n,r,t)}};p.prototype._trace=function(t,e,r,n,i,o,a,s){var u=this,c;if(!t.length)return c={path:r,value:e,parent:n,parentProperty:i,hasArrExpr:a},this._handleCallback(c,o,"value"),c;var l=t[0],f=t.slice(1),d=[];function h(m){Array.isArray(m)?m.forEach(function(qe){d.push(qe)}):d.push(m)}if((typeof l!="string"||s)&&e&&g.call(e,l))h(this._trace(f,e[l],D(r,l),e,l,o,a));else if(l==="*")this._walk(e,function(m){h(u._trace(f,e[m],D(r,m),e,m,o,!0,!0))});else if(l==="..")h(this._trace(f,e,r,n,i,o,a)),this._walk(e,function(m){E(e[m])==="object"&&h(u._trace(t.slice(),e[m],D(r,m),e,m,o,!0))});else{if(l==="^")return this._hasParentSelector=!0,{path:r.slice(0,-1),expr:f,isParentSelector:!0};if(l==="~")return c={path:D(r,l),value:i,parent:n,parentProperty:null},this._handleCallback(c,o,"property"),c;if(l==="$")h(this._trace(f,e,r,null,null,o,a));else if(/^(\x2D?[0-9]*):(\x2D?[0-9]*):?([0-9]*)$/.test(l))h(this._slice(l,f,e,r,n,i,o));else if(l.indexOf("?(")===0){if(this.currPreventEval)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");var v=l.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(m){u._eval(v,e[m],m,r,n,i)&&h(u._trace(f,e[m],D(r,m),e,m,o,!0))})}else if(l[0]==="("){if(this.currPreventEval)throw new Error("Eval [(expr)] prevented in JSONPath expression.");h(this._trace(oe(this._eval(l,e,r[r.length-1],r.slice(0,-1),n,i),f),e,r,n,i,o,a))}else if(l[0]==="@"){var y=!1,b=l.slice(1,-2);switch(b){case"scalar":(!e||!["object","function"].includes(E(e)))&&(y=!0);break;case"boolean":case"string":case"undefined":case"function":E(e)===b&&(y=!0);break;case"integer":Number.isFinite(e)&&!(e%1)&&(y=!0);break;case"number":Number.isFinite(e)&&(y=!0);break;case"nonFinite":typeof e=="number"&&!Number.isFinite(e)&&(y=!0);break;case"object":e&&E(e)===b&&(y=!0);break;case"array":Array.isArray(e)&&(y=!0);break;case"other":y=this.currOtherTypeCallback(e,r,n,i);break;case"null":e===null&&(y=!0);break;default:throw new TypeError("Unknown value type "+b)}if(y)return c={path:r,value:e,parent:n,parentProperty:i},this._handleCallback(c,o,"value"),c}else if(l[0]==="`"&&e&&g.call(e,l.slice(1))){var C=l.slice(1);h(this._trace(f,e[C],D(r,C),e,C,o,a,!0))}else if(l.includes(",")){var Je=l.split(","),B=ot(Je),xe;try{for(B.s();!(xe=B.n()).done;){var ze=xe.value;h(this._trace(oe(ze,f),e,r,n,i,o,!0))}}catch(m){B.e(m)}finally{B.f()}}else!s&&e&&g.call(e,l)&&h(this._trace(f,e[l],D(r,l),e,l,o,a,!0))}if(this._hasParentSelector)for(var F=0;F<d.length;F++){var W=d[F];if(W&&W.isParentSelector){var k=this._trace(W.expr,e,W.path,n,i,o,a);if(Array.isArray(k)){d[F]=k[0];for(var Ve=k.length,te=1;te<Ve;te++)F++,d.splice(F,0,k[te])}else d[F]=k}}return d};p.prototype._walk=function(t,e){if(Array.isArray(t))for(var r=t.length,n=0;n<r;n++)e(n);else t&&E(t)==="object"&&Object.keys(t).forEach(function(i){e(i)})};p.prototype._slice=function(t,e,r,n,i,o,a){if(Array.isArray(r)){var s=r.length,u=t.split(":"),c=u[2]&&Number.parseInt(u[2])||1,l=u[0]&&Number.parseInt(u[0])||0,f=u[1]&&Number.parseInt(u[1])||s;l=l<0?Math.max(0,l+s):Math.min(s,l),f=f<0?Math.max(0,f+s):Math.min(s,f);for(var d=[],h=l;h<f;h+=c){var v=this._trace(oe(h,e),r,n,i,o,a,!0);v.forEach(function(y){d.push(y)})}return d}};p.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 a=t.includes("@path");a&&(this.currSandbox._$_path=p.toPathString(n.concat([r])));var s="script:"+t;if(!p.cache[s]){var u=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");a&&(u=u.replace(/@path/g,"_$_path")),p.cache[s]=new this.vm.Script(u)}try{return p.cache[s].runInNewContext(this.currSandbox)}catch(c){throw new Error("jsonPath: "+c.message+": "+t)}};p.cache={};p.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};p.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};p.toPathArray=function(t){var e=p.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,a){return"[#"+(r.push(a)-1)+"]"}).replace(/\[["']((?:(?!['\]])[\s\S])*)["']\]/g,function(o,a){return"['"+a.replace(/\./g,"%@%").replace(/~/g,"%%@@%%")+"']"}).replace(/~/g,";~;").replace(/["']?\.["']?(?!(?:(?!\[)[\s\S])*\])|\[["']?/g,";").replace(/%@%/g,".").replace(/%%@@%%/g,"~").replace(/(?:;)?(\^+)(?:;)?/g,function(o,a){return";"+a.split("").join(";")+";"}).replace(/;;;|;;/g,";..;").replace(/;$|'?\]|'$/g,""),i=n.split(";").map(function(o){var a=o.match(/#([0-9]+)/);return!a||!a[1]?o:r[a[1]]});return e[t]=i,e[t].concat()};var st=function(e,r,n){for(var i=e.length,o=0;o<i;o++){var a=e[o];n(a)&&r.push(e.splice(o--,1)[0])}},ut=function(){function t(e){_e(this,t),this.code=e}return Ce(t,[{key:"runInNewContext",value:function(r){var n=this.code,i=Object.keys(r),o=[];st(i,o,function(l){return typeof r[l]=="function"});var a=i.map(function(l,f){return r[l]}),s=o.reduce(function(l,f){var d=r[f].toString();return/function/.test(d)||(d="function "+d),"var "+f+"="+d+";"+l},"");n=s+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 u=n.lastIndexOf(";"),c=u>-1?n.slice(0,u+1)+" return "+n.slice(u+1):" return "+n;return M(Function,i.concat([c])).apply(void 0,tt(a))}}]),t}();p.prototype.vm={Script:ut};function I(t,e){var r;return((r=p({path:e,json:t}))===null||r===void 0?void 0:r.flat(1/0))||[]}function J(t,e,r=!1,n=t){var i=e;let o=Object.keys(t).sort((s,u)=>u.length-s.length);for(let s of o)if(e.startsWith(s)){if(s==e){if(r)return t[s];continue}i=e.substring(s.length+1),n=t[s];break}var a=I(n,i);return Array.isArray(a)&&(a==null?void 0:a.length)==0&&(a=[i.replace(/^.*?\./,"_."),i.replace(/^.*?\./,""),i.replace(/^([^.]+).*?\.\$\./,"$1."),i.replace(/^.*?\.\$\./,"_."),i.replace(/^.*?\.\$\./,""),i.replace(/^[^.]+$/,"_")].filter((s,u,c)=>c.indexOf(s)===u).reduce((s,u)=>s.length>0?s:I(n,u),[])),r&&Array.isArray(a)?a[0]:a}function ae(t,e={},r){return r?`<${r}${Object.entries(e).map(([n,i])=>i!=null&&` ${n}="${i}"`).filter(Boolean).join("")}>${O(t)}</${r}>`.replace(/^<([a-z0-9][^>]*)><\/[^>]+>$/,"<$1 />"):O(t)}function O(t){var e;if(Array.isArray(t))return t.map(O).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 ae(t.content,n,"h"+r);case"text":return(t.marks||[]).reduce((i,o)=>ae(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 ae(t.content||t.text,t.attrs,{bulletList:"ul",orderedList:"ol",listItem:"li",horizontalRule:"hr",paragraph:"p",codeBlock:"code",blockquote:"blockquote"}[t.type])}}var R=class{constructor(e,r=1,n){this.ownerDocument={createElement(i){return new R(i)}},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 ue(this.childNodes)}set innerHTML(e){this.childNodes=le(String(e!=null?e:""))}get outerHTML(){return ue([this])}get children(){return this.childNodes.filter(e=>e.nodeType==1)}closest(e){let r=this;for(;r;){if(Re(e,r))return r;r=r.parentNode}return null}querySelectorAll(e){let r=e.split(/\s*,\s*/),n=[],i=o=>{for(let a of r)if(Re(a,o)){n.push(o);break}for(let a of o.childNodes)i(a)};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 a=n[o];if(!r||a.nodeType===1)return a}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 R(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 Re(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],a=i[3],s=e.getAttribute(o);if(typeof a=="undefined"){if(s===void 0)return!1}else if(s!==a)return!1}else return!1}else if(e.nodeName!==n)return!1;return!0}function le(t){var e;let r=[],n=[];for(;t;){let i=t.match(/^<([\w-]+)(\s[^>]*)?>/),o=t.match(/^<\/([\w-]+)>/);if(i){let a=i[1],u=((e=(i[2]||"").match(/([\w-]+)(="([^"]*)")?/g))===null||e===void 0?void 0:e.map(l=>{let[f,d,,h]=l.match(/([\w-]+)(="([^"]*)")?/);return{name:d,value:ct(h||"")}}))||[],c=new R(a,1);if(c.attributes=u,n.length>0){let l=n[n.length-1];l.childNodes.push(c),c.parentNode=l}else r.push(c);n.push(c),t=t.slice(i[0].length)}else if(o)n.pop(),t=t.slice(o[0].length);else{let a=t.indexOf("<"),s=t.slice(0,a!==-1?a:void 0),u=new R("#text",3);if(u.textContent=s,n.length>0){let c=n[n.length-1];c.childNodes.push(u),u.parentNode=c}else r.push(u);t=t.slice(s.length)}}return r}function lt(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function ct(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'")}function ue(t){return t.map(e=>{if(e.nodeType===3)return e.textContent||"";let{nodeName:r,attributes:n}=e,i=n.map(({name:a,value:s})=>` ${a}="${lt(String(s))}"`).join(""),o=ue(e.childNodes);return["img","input","br"].includes(r)?`<${r}${i} />`:`<${r}${i}>${o}</${r}>`}).join("")}function dt(t){let e=new t.ownerDocument.defaultView.MutationObserver(r=>{r.forEach(n=>{let i=n.target,o=i.getAttribute("data-embed-src");o&&z(i,o),n.addedNodes&&n.addedNodes.forEach(a=>{a.nodeType==1&&ht(a,!1)})})});return e.observe(t,{attributes:!0,subtree:!0,childList:!0}),e}function ht(t,e=!0){let r=t.querySelectorAll("[data-embed-src]");for(var n=0;n<r.length;n++){let i=r[n];z(i,i.getAttribute("data-embed-src"))}if(e)return dt(t)}function z(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 de={};H(de,{adjustNumbers:()=>yt,cleanCollectionBit:()=>V,getHumanizedLabel:()=>vt,getLastPathBit:()=>bt,getQualifier:()=>mt,normalizeCollectionScope:()=>ce,parseLimit:()=>ft,parseRange:()=>pt});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},pt=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},mt=t=>{var e;return(e=t==null?void 0:t.match(/(\.\*|\[[^\]]*\])$/))===null||e===void 0?void 0:e[0]};function V(t){return t.replace(/(\.?\[[^\]\[]*\]|\.\*)$/g,"")}function ce(t){return V(t)+".*"}function yt(t,e){return t==null?void 0:t.replace(/(.|^)(\d+)/g,(r,n,i)=>n+(n==":"?i:String(parseInt(i)+e)))}function vt(t,e=2){var r=V(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 bt(t){return V(t).split(".").pop()}function Oe(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 gt(t,e,r){let n=t.getAttribute("data-path-scope");if(n==null)return;var i=Oe(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 a=i+1,s=t,u=t;u=u.nextElementSibling;)u.getAttribute("data-path-scope")==n&&(a++,s=u);for(var c=a;c<e;c++)o.insertBefore(s.cloneNode(!0),s.nextElementSibling);for(var c=Math.max(1,e);c<a;c++)s=s.previousElementSibling,o.removeChild(s.nextElementSibling)}}function T(t,e,r,n){var i,o;if(t){var a=t;(r==null?void 0:r.type)=="doc"&&Array.isArray(r.content)&&(r=O(r)),n!=null&&n.processValue&&(r=n==null?void 0:n.processValue(t,e,r));var s=e.replace("data-path-","");if(e=="data-path-src"){let h=Array.from(t.children).find(v=>v.localName=="picture")||t;a=t.localName=="img"?t:h.querySelector("img, video")}else if(e=="data-path-href")a=t.querySelector("a")||t.closest("a");else if(e=="data-path-alt")a=(Array.from(t.children).find(v=>v.localName=="picture")||t).querySelector("img, picture");else if(e=="data-path-hidden")r=r?null:!0;else if(e=="data-path"||e=="data-embed-html"||e=="html")s="innerHTML";else if(e=="data-embed-src")z(t,r);else if(e=="data-path-attributes"){let h=((i=t.getAttribute("data-attributes-keys"))===null||i===void 0?void 0:i.split(",").filter(Boolean))||[];if(!Array.isArray(r))for(var u in r){var c=r[u];T(t,u,typeof c=="object"&&c?JSON.stringify(c):c,n)}for(var l=0;l<h.length;l++)(r==null||!(h[l]in r))&&T(t,h[l],null,n);T(t,"data-attributes-keys",Object.keys(r||{}).join(","));return}if(typeof r=="boolean"&&(r=r?"":null),!!a){var f=String((o=t.getAttribute("data-path-placeholder")||a[s])!==null&&o!==void 0?o:a.getAttribute(s));if(r!=null)if(s=="innerHTML"){var d=String(r);a.innerHTML!=d&&(a.innerHTML=d)}else a.getAttribute(s)!=r&&a.setAttribute(s,r);else s=="innerHTML"?a.innerHTML=f:a.removeAttribute(s)}}}var Ne=["data-attributes-keys","data-path-attributes","data-path-scope"];function A(t,e,r,n){var i,o,a;let s=t;if(n||(e=((i=r==null?void 0:r.processData)===null||i===void 0?void 0:i.call(r,s,e))||e),s.nodeType==1){let l=s.getAttribute("data-path-scope");if(l){let d=Oe(s),h=J(e,l,!1);d==0&>(s,((o=r==null?void 0:r.shouldRepeat)===null||o===void 0?void 0:o.call(r,s,h))===!1?1:h.length,r),e={...e,[ce(l)]:h[d]}}let f=Array.prototype.slice.call(s.attributes).sort((d,h)=>Ne.indexOf(d.name)-Ne.indexOf(h.name));for(var u=0;u<f.length;u++){let{name:d,value:h}=f[u];d.startsWith("data-path")&&d!="data-path-scope"&&T(s,d,J(e,h,!0),r),d=="data-embed-src"&&T(s,d,s.getAttribute(d),r)}}for(var u=0,c;c=s.childNodes[u++];)Te(c)&&A(c,e,r,!0);return n||(a=r==null?void 0:r.onRender)===null||a===void 0||a.call(r,s,e),s}function Te(t){return t.nodeType==1}function P(t,e,r,n){var i;let o=((i=n==null?void 0:n.processTemplate)===null||i===void 0?void 0:i.call(n,t,e,r))||e;if(t.innerHTML=o,t.classList.add("-feaas"),(t.closest(".component.feaas")||t).className.includes("-theme--"))for(var s=0,u;u=t.childNodes[s++];)Te(u)&&(u.className=u.className.replace(/(\s|^)-theme--[^\s]+\s*/g,"$1"));return A(t,r,n)}function wt(t,e,r,n=!1){var i;let o=((i=r==null?void 0:r.processTemplate)===null||i===void 0?void 0:i.call(r,null,t,e))||t;if(typeof document=="undefined"||n){let a=le(o);return A(a[0],e,r).outerHTML}else{let a=document.createElement("div");return a.innerHTML=o,A(a,e,r),a.innerHTML}}var Pe=["initial","check","updated"],q={};function Yt(){q={}}async function G(t,e,r,n,i=q){return $({url:t,options:e,validator:r,callback:n,cache:i}).then(K).then(o=>o.response)}function At(t,e=!1){let r=String(t).replace("?head","");var n=q[r];return!n&&!e&&(n=q[r]={phase:null,initial:S(),check:S(),updated:S(),final:S()}),n}var fe=class extends Error{};async function $({url:t,options:e,validator:r,callback:n,cache:i},o="initial"){let a=new Date;if(i!=null){var s=At(t);if(Pe.indexOf(s.phase)>=Pe.indexOf(o))var u=s[o];else s.phase=o}let c=await(u||fetch(t,e));if(!u&&s&&(c.ok?s[o].resolve(c):s[o].reject(new Error("Fetch failed"))),!c.ok)throw new Error("Fetch failed");let l=new Date(c.headers.get("date"))<a||u&&o=="initial"&&(s.phase=="updated"||s.phase=="check");if((r==null?void 0:r(c,l))===!1)throw new fe("Response is not valid");return await(n==null?void 0:n(c,o,l)),{url:t,options:e,isCached:l,response:c,validator:r,callback:n,cache:i}}async function K(t){let{url:e,isCached:r,options:n,validator:i,response:o,cache:a}=t;if(r){let{response:s}=await $({url:e+"?head",options:{...n,method:"HEAD",cache:"no-cache"},validator:i,cache:a},"check");if(s.headers.get("last-modified")!=o.headers.get("last-modified"))return pe(t)}return t}async function pe(t){return $({...t,options:{...t.options,cache:"reload"}},"updated")}var _="https://feaas.blob.core.windows.net";function Y(t){let e=t.match(/^(?:(.*?)\/components)?\/?([^\/]+)\/([^\/]+)(?:\/([^\/]+)(?:\/(published|staged|saved|\d+)(?:\.html?)?)?)?$/);if(e){var[,r,n,i,o,a]=e;return{cdn:r,library:n,component:i,version:o,revision:a}}}function Zt(t){if(!t||!t.library||!t.component)throw new Error("Component requires `library` and `component` properties");return`${t.cdn&&t.cdn!=_?`${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 er(t){return`${t.cdn&&t.cdn!=_?`${t.cdn}/styles/`:""}${t.library}/${!t.revision||t.revision=="published"?"":t.revision}`.replace(/\/$|\/\/(?!.+\/styles\/)/g,"")}function me(t){let e=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=Y(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 $e(t){return typeof t=="string"&&(t={src:t}),"src"in t&&(t={...Y(t.src)}),`${t.cdn||t.hostname||_}/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={...me(t.src)}),`${t.cdn||t.hostname||_}/styles/${t.library}/${t.revision||"published"}.css`}async function U(t,e,r=!1){let n=s=>s.headers.get("x-ms-meta-versionDeletedAt")==null,i=s=>s.clone().text().then(e),o=await Promise.all([t.instance&&$({options:{headers:{Accept:"text/html"},credentials:"omit"},url:$e({...t,version:t.instance}),validator:n}).catch(s=>s),$({url:$e(t),validator:n}).catch(s=>s)]),a=o.find(s=>s&&"isCached"in s&&s);if(!a||a instanceof Error)throw o.find(u=>u&&u instanceof Error)||new Error("Can not fetch component");return o[0]==a&&console.log("Using fork!",o),await i(a.response),r?a:K({...a,callback:i}).catch(s=>{if(o[0]==a&&(pe({...a,callback:null,validator:null}),console.log("Fork was deleted"),!(o[1]instanceof Error)))return i(o[1].response),K({...o[1],callback:i});throw s})}async function tr(t){typeof t=="string"&&(t={src:t});var e;let{response:r}=await U(t,n=>{e=n},!0);return{...t,template:e,lastModified:r.headers.get("last-modified")}}async function ye(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,n)=>r.clone().text().then(i=>e(i,n)))}function ir(t,e){return St(t,e||(e=document.createElement("style"))),e}function St(t,e){return e||(e=document.createElement("style")),ye(t,(r,n)=>{e.textContent=r}).then(()=>e)}function ve(t,e){var r=xt(t);if(!r)var n=Et(t);return ye(t,(i,o)=>{n&&(n.textContent=i),e==null||e(i,o)}).then(()=>r||n)}function ke(t){return new Promise((e,r)=>{ve(t,e).catch(r)})}function xt(t){return document.head.querySelector(`style[data-href="${Q(t)}"]`)}function Et(t){let e=Q(t),r=document.createElement("style");return r.setAttribute("data-href",e),document.head.appendChild(r),r}function ur(t,e){let r=document.createElement("div");r.innerHTML=t;let n=document.createDocumentFragment();for(;r.firstChild;)n.appendChild(r.firstChild);return A(n,e),r}function Me(t,e){return _t(t,e||(e=document.createElement("div"))),e}async function _t(t,e){return e||(e=document.createElement("div")),e.childNodes.length?A(e,t.data,t):"template"in t?P(e,t.template,t.data,t):U(t,r=>P(e,r,t.data,t)).then(()=>e)}function Ct(t){let{params:e,method:r,headers:n,body:i,url:o}=w(t);var a={url:o},s={...n};return n["Content-Type"]==="application/json"&&delete s["Content-Type"],n.Accept==="application/json"&&delete s.Accept,Object.keys(s).length>0&&(a.headers=s),r!=="GET"&&(a.method=r),r==="GET"||r==="HEAD"||Object.keys(i).length===0||(a.body=i),Object.keys(e).length>0&&(a={...a,params:e}),a}var X=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 Le(t){let{url:e,headers:r,params:n,method:i,body:o}=w(t),a,s=r["Content-Type"];i!="GET"&&i!="HEAD"&&(s==="application/json"&&(a=JSON.stringify(o)),s==="multipart/form-data"&&(a=Object.keys(o).reduce((c,l)=>(c.append(l,o[l]),c),new FormData)),s==="application/x-www-form-urlencoded"&&(a=new URLSearchParams(o)));let u=Object.keys(n).length?`?${new URLSearchParams(n)}`:"";return[`${e}${u}`,{headers:r,body:a,method:i}]}function w(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 be=async t=>{try{let[e,r]=Le(t),i=await(await w.fetchImplementation(e,{...r,method:r.method.toLowerCase()})).json();return t.jsonpath&&t.jsonpath!="$"?I(i,t.jsonpath):i}catch(e){return{}}};async function je(t){if(!t)return t;if(X(t))return be(t);let e=Object.keys(t),r=await Promise.all(e.map(n=>X(t[n])?be(t[n]):null).filter(Boolean));return e.reduce((n,i)=>({...n,[i]:X(t[i])?r.shift():t[i]}),{})}w.clean=Ct;w.toFetchArguments=Le;w.fetchOne=be;w.fetch=je;w.isDataSettings=X;w.fetchImplementation=(...t)=>fetch(...t);function Ft(t){var e,r,n,i,o,a,s,u;let c,l=t.getAttribute("src");if(l){let C=Y(l);if(!C)throw new Error(`Could not parse FEAAS Component source: ${l}`);var{cdn:f,library:d,component:h,version:v,revision:y}=C}let b=t.getAttribute("data");if(b!=null&&b!="")try{c=typeof b=="string"?JSON.parse(b):{}}catch(C){console.error(C)}return{data:c||{},cdn:(r=(e=t.getContextAttribute("cdn"))!==null&&e!==void 0?e:f)!==null&&r!==void 0?r:_,library:(n=t.getAttribute("library"))!==null&&n!==void 0?n:d,component:(i=t.getAttribute("component"))!==null&&i!==void 0?i:h,version:(a=(o=t.getAttribute("version"))!==null&&o!==void 0?o:v)!==null&&a!==void 0?a:"responsive",revision:(u=(s=t.getAttribute("revision"))!==null&&s!==void 0?s:y)!==null&&u!==void 0?u:"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 Z=class extends x{setData(e){this.set({data:e})}getProps(){return Ft(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.needsRefresh=!0,super.attributeChangedCallback(e,r,n),e==="data"&&this.fetchData())}async fetchData(){this.readyData=void 0,this.whenDataReady=this.whenDataReady.restart();let e=await w.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=S(e=>this.readyData=e,e=>this.onError(e)),this.defaultProps={cdn:_,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 n=r;return n}}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=ke({...this.props,revision:"published"}).then(()=>{r=null,e()});return Promise.all([r,this.whenDataReady.then(()=>e()),U(this.props,n=>{this.payload=n,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)A(this,this.readyData);else{if(this.needsRefresh=!0,this.getOriginal())return;P(this,this.payload,this.readyData)}}};Z.observedAttributes=["library","component","version","revision","hostname","cdn","template","data","instance","editable","with-stylesheet"];Z.register("feaas-component");function Dt(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 ee=class extends x{constructor(){super(...arguments),this.defaultProps={hidden:!1}}getProps(){return Dt(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=`
|
|
1
|
+
var Ge=Object.defineProperty;var H=(t,e)=>{for(var r in e)Ge(t,r,{get:e[r],enumerable:!0})};function S(t,e=r=>{}){var r;let n=()=>{var i,o;let a=new Promise((l,c)=>{i=u=>{t==null||t(u),l(u)},o=c});var s=Object.assign(a,{resolve:i,reject:o,restart:n,first:r});return r=s,s.catch(e),s};return n()}var Ke=typeof HTMLElement=="undefined"?typeof windowJSDOM!="undefined"?windowJSDOM.HTMLElement:class{}:HTMLElement,x=class extends Ke{getProps(e){return{}}constructor(){super(),this.defaultProps={},this.connected=!1,this.refs={},this.descendants=[],this.whenLoaded=S(e=>{this.payload=e}),this.whenRendered=S(()=>this.initialized=!0,()=>cancelAnimationFrame(this.nextRender)),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){if(typeof process!="undefined"&&process.env.TESTING)return;let r=e[0];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=!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(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:a}=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.refs.topReact&&!this.forceUpdateReact?a?(this.reactRoot||(this.reactRoot=a.createRoot(this.getReactRootElement())),this.reactRoot.render(this.getReactElement())):o.render(this.getReactElement(),this.getReactRootElement()):this.forceUpdateReact?(e=this.forceUpdateReact)===null||e===void 0||e.call(this):(n=(r=this.refs.topReact).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).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(a){return{error:a}}componentDidCatch(a,s){console.error(`FEAAS: ${e.tagName} Error:`,a,s),e.onError(a,"react")}render(){if(!this.state.error)return this.props.children}})}getReactElement(e=this,r){let{React:n,ReactDOM:i}=e.payload||{},o=this.getReactErrorBoundary(),a=this.getReactWrapper(e);return n.createElement(o,{key:e.tagName+"-"+e.getUID(),slot:e.getAttribute("slot")},n.createElement(a,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[a,s]=n.useReducer(l=>l+1,0);return e.forceUpdateReact=s,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],a=i?JSON.stringify(o):String(o),s=this.defaultProps[r],l=i?JSON.stringify(s):String(s),c=r.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),u=this.getAttribute(c);try{var n=i?JSON.stringify(JSON.parse(u)):u}catch(h){var n=null}o==null||a===l?this.removeAttribute(c):(typeof o=="string"||typeof o=="number"||typeof o=="boolean"||i)&&n!=a&&this.setAttribute(c,a)}}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()),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 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 N=class extends x{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)}},re=class extends N{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))}};re.observedAttributes=["counter"];var he={};H(he,{renderDOMContent:()=>P,renderDOMElement:()=>A,renderHTMLContent:()=>wt,setDOMAttribute:()=>T});var se={};H(se,{JSONPath:()=>p,queryObject:()=>I,queryScopes:()=>J,serializeCH1RichText:()=>O});function E(t){return E=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},E(t)}function _e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ee(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 Ce(t,e,r){return e&&Ee(t.prototype,e),r&&Ee(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ye(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&&j(t,e)}function L(t){return L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},L(t)}function j(t,e){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},j(t,e)}function Fe(){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 M(t,e,r){return Fe()?M=Reflect.construct.bind():M=function(i,o,a){var s=[null];s.push.apply(s,o);var l=Function.bind.apply(i,s),c=new l;return a&&j(c,a.prototype),c},M.apply(null,arguments)}function Qe(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function ne(t){var e=typeof Map=="function"?new Map:void 0;return ne=function(n){if(n===null||!Qe(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 M(n,arguments,L(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),j(i,n)},ne(t)}function Xe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ze(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 Xe(t)}function et(t){var e=Fe();return function(){var n=L(t),i;if(e){var o=L(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Ze(this,i)}}function tt(t){return rt(t)||nt(t)||De(t)||it()}function rt(t){if(Array.isArray(t))return ie(t)}function nt(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function De(t,e){if(t){if(typeof t=="string")return ie(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 ie(t,e)}}function ie(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 it(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ot(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=De(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,a=!1,s;return{s:function(){r=r.call(t)},n:function(){var l=r.next();return o=l.done,l},e:function(l){a=!0,s=l},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw s}}}}var g=Object.prototype.hasOwnProperty;function D(t,e){return t=t.slice(),t.push(e),t}function oe(t,e){return e=e.slice(),e.unshift(t),e}var at=function(t){Ye(r,t);var e=et(r);function r(n){var i;return _e(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 Ce(r)}(ne(Error));function p(t,e,r,n,i){if(!(this instanceof p))try{return new p(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&&E(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=g.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 a={path:o?t.path:e};o?"json"in t&&(a.json=t.json):a.json=r;var s=this.evaluate(a);if(!s||E(s)!=="object")throw new at(s);return s}}p.prototype.evaluate=function(t,e,r,n){var i=this,o=this.parent,a=this.parentProperty,s=this.flatten,l=this.wrap;if(this.currResultType=this.resultType,this.currPreventEval=this.preventEval,this.currSandbox=this.sandbox,r=r||this.callback,this.currOtherTypeCallback=n||this.otherTypeCallback,e=e||this.json,t=t||this.path,t&&E(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(!g.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,s=g.call(t,"flatten")?t.flatten:s,this.currResultType=g.call(t,"resultType")?t.resultType:this.currResultType,this.currSandbox=g.call(t,"sandbox")?t.sandbox:this.currSandbox,l=g.call(t,"wrap")?t.wrap:l,this.currPreventEval=g.call(t,"preventEval")?t.preventEval:this.currPreventEval,r=g.call(t,"callback")?t.callback:r,this.currOtherTypeCallback=g.call(t,"otherTypeCallback")?t.otherTypeCallback:this.currOtherTypeCallback,o=g.call(t,"parent")?t.parent:o,a=g.call(t,"parentProperty")?t.parentProperty:a,t=t.path}if(o=o||null,a=a||null,Array.isArray(t)&&(t=p.toPathString(t)),!(!t&&t!==""||!e)){var u=p.toPathArray(t);u[0]==="$"&&u.length>1&&u.shift(),this._hasParentSelector=null;var h=this._trace(u,e,["$"],o,a,r).filter(function(d){return d&&!d.isParentSelector});return h.length?!l&&h.length===1&&!h[0].hasArrExpr?this._getPreferredOutput(h[0]):h.reduce(function(d,f){var v=i._getPreferredOutput(f);return s&&Array.isArray(v)?d=d.concat(v):d.push(v),d},[]):l?[]:void 0}};p.prototype._getPreferredOutput=function(t){var e=this.currResultType;switch(e){case"all":{var r=Array.isArray(t.path)?t.path:p.toPathArray(t.path);return t.pointer=p.toPointer(r),t.path=typeof t.path=="string"?t.path:p.toPathString(t.path),t}case"value":case"parent":case"parentProperty":return t[e];case"path":return p.toPathString(t[e]);case"pointer":return p.toPointer(t.path);default:throw new TypeError("Unknown result type")}};p.prototype._handleCallback=function(t,e,r){if(e){var n=this._getPreferredOutput(t);t.path=typeof t.path=="string"?t.path:p.toPathString(t.path),e(n,r,t)}};p.prototype._trace=function(t,e,r,n,i,o,a,s){var l=this,c;if(!t.length)return c={path:r,value:e,parent:n,parentProperty:i,hasArrExpr:a},this._handleCallback(c,o,"value"),c;var u=t[0],h=t.slice(1),d=[];function f(y){Array.isArray(y)?y.forEach(function(qe){d.push(qe)}):d.push(y)}if((typeof u!="string"||s)&&e&&g.call(e,u))f(this._trace(h,e[u],D(r,u),e,u,o,a));else if(u==="*")this._walk(e,function(y){f(l._trace(h,e[y],D(r,y),e,y,o,!0,!0))});else if(u==="..")f(this._trace(h,e,r,n,i,o,a)),this._walk(e,function(y){E(e[y])==="object"&&f(l._trace(t.slice(),e[y],D(r,y),e,y,o,!0))});else{if(u==="^")return this._hasParentSelector=!0,{path:r.slice(0,-1),expr:h,isParentSelector:!0};if(u==="~")return c={path:D(r,u),value:i,parent:n,parentProperty:null},this._handleCallback(c,o,"property"),c;if(u==="$")f(this._trace(h,e,r,null,null,o,a));else if(/^(\x2D?[0-9]*):(\x2D?[0-9]*):?([0-9]*)$/.test(u))f(this._slice(u,h,e,r,n,i,o));else if(u.indexOf("?(")===0){if(this.currPreventEval)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");var v=u.replace(/^\?\(((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?)\)$/,"$1");this._walk(e,function(y){l._eval(v,e[y],y,r,n,i)&&f(l._trace(h,e[y],D(r,y),e,y,o,!0))})}else if(u[0]==="("){if(this.currPreventEval)throw new Error("Eval [(expr)] prevented in JSONPath expression.");f(this._trace(oe(this._eval(u,e,r[r.length-1],r.slice(0,-1),n,i),h),e,r,n,i,o,a))}else if(u[0]==="@"){var m=!1,b=u.slice(1,-2);switch(b){case"scalar":(!e||!["object","function"].includes(E(e)))&&(m=!0);break;case"boolean":case"string":case"undefined":case"function":E(e)===b&&(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&&E(e)===b&&(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 "+b)}if(m)return c={path:r,value:e,parent:n,parentProperty:i},this._handleCallback(c,o,"value"),c}else if(u[0]==="`"&&e&&g.call(e,u.slice(1))){var C=u.slice(1);f(this._trace(h,e[C],D(r,C),e,C,o,a,!0))}else if(u.includes(",")){var Je=u.split(","),B=ot(Je),xe;try{for(B.s();!(xe=B.n()).done;){var ze=xe.value;f(this._trace(oe(ze,h),e,r,n,i,o,!0))}}catch(y){B.e(y)}finally{B.f()}}else!s&&e&&g.call(e,u)&&f(this._trace(h,e[u],D(r,u),e,u,o,a,!0))}if(this._hasParentSelector)for(var F=0;F<d.length;F++){var W=d[F];if(W&&W.isParentSelector){var k=this._trace(W.expr,e,W.path,n,i,o,a);if(Array.isArray(k)){d[F]=k[0];for(var Ve=k.length,te=1;te<Ve;te++)F++,d.splice(F,0,k[te])}else d[F]=k}}return d};p.prototype._walk=function(t,e){if(Array.isArray(t))for(var r=t.length,n=0;n<r;n++)e(n);else t&&E(t)==="object"&&Object.keys(t).forEach(function(i){e(i)})};p.prototype._slice=function(t,e,r,n,i,o,a){if(Array.isArray(r)){var s=r.length,l=t.split(":"),c=l[2]&&Number.parseInt(l[2])||1,u=l[0]&&Number.parseInt(l[0])||0,h=l[1]&&Number.parseInt(l[1])||s;u=u<0?Math.max(0,u+s):Math.min(s,u),h=h<0?Math.max(0,h+s):Math.min(s,h);for(var d=[],f=u;f<h;f+=c){var v=this._trace(oe(f,e),r,n,i,o,a,!0);v.forEach(function(m){d.push(m)})}return d}};p.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 a=t.includes("@path");a&&(this.currSandbox._$_path=p.toPathString(n.concat([r])));var s="script:"+t;if(!p.cache[s]){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");a&&(l=l.replace(/@path/g,"_$_path")),p.cache[s]=new this.vm.Script(l)}try{return p.cache[s].runInNewContext(this.currSandbox)}catch(c){throw new Error("jsonPath: "+c.message+": "+t)}};p.cache={};p.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};p.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};p.toPathArray=function(t){var e=p.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,a){return"[#"+(r.push(a)-1)+"]"}).replace(/\[["']((?:(?!['\]])[\s\S])*)["']\]/g,function(o,a){return"['"+a.replace(/\./g,"%@%").replace(/~/g,"%%@@%%")+"']"}).replace(/~/g,";~;").replace(/["']?\.["']?(?!(?:(?!\[)[\s\S])*\])|\[["']?/g,";").replace(/%@%/g,".").replace(/%%@@%%/g,"~").replace(/(?:;)?(\^+)(?:;)?/g,function(o,a){return";"+a.split("").join(";")+";"}).replace(/;;;|;;/g,";..;").replace(/;$|'?\]|'$/g,""),i=n.split(";").map(function(o){var a=o.match(/#([0-9]+)/);return!a||!a[1]?o:r[a[1]]});return e[t]=i,e[t].concat()};var st=function(e,r,n){for(var i=e.length,o=0;o<i;o++){var a=e[o];n(a)&&r.push(e.splice(o--,1)[0])}},lt=function(){function t(e){_e(this,t),this.code=e}return Ce(t,[{key:"runInNewContext",value:function(r){var n=this.code,i=Object.keys(r),o=[];st(i,o,function(u){return typeof r[u]=="function"});var a=i.map(function(u,h){return r[u]}),s=o.reduce(function(u,h){var d=r[h].toString();return/function/.test(d)||(d="function "+d),"var "+h+"="+d+";"+u},"");n=s+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 M(Function,i.concat([c])).apply(void 0,tt(a))}}]),t}();p.prototype.vm={Script:lt};function I(t,e){var r;return((r=p({path:e,json:t}))===null||r===void 0?void 0:r.flat(1/0))||[]}function J(t,e,r=!1,n=t){var i=e;let o=Object.keys(t).sort((s,l)=>l.length-s.length);for(let s of o)if(e.startsWith(s)){if(s==e){if(r)return t[s];continue}i=e.substring(s.length+1),n=t[s];break}var a=I(n,i);return Array.isArray(a)&&(a==null?void 0:a.length)==0&&(a=[i.replace(/^.*?\./,"_."),i.replace(/^.*?\./,""),i.replace(/^([^.]+).*?\.\$\./,"$1."),i.replace(/^.*?\.\$\./,"_."),i.replace(/^.*?\.\$\./,""),i.replace(/^[^.]+$/,"_")].filter((s,l,c)=>c.indexOf(s)===l).reduce((s,l)=>s.length>0?s:I(n,l),[])),r&&Array.isArray(a)?a[0]:a}function ae(t,e={},r){return r?`<${r}${Object.entries(e).map(([n,i])=>i!=null&&` ${n}="${i}"`).filter(Boolean).join("")}>${O(t)}</${r}>`.replace(/^<([a-z0-9][^>]*)><\/[^>]+>$/,"<$1 />"):O(t)}function O(t){var e;if(Array.isArray(t))return t.map(O).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 ae(t.content,n,"h"+r);case"text":return(t.marks||[]).reduce((i,o)=>ae(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 ae(t.content||t.text,t.attrs,{bulletList:"ul",orderedList:"ol",listItem:"li",horizontalRule:"hr",paragraph:"p",codeBlock:"code",blockquote:"blockquote"}[t.type])}}var R=class{constructor(e,r=1,n){this.ownerDocument={createElement(i){return new R(i)}},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=ue(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(Re(e,r))return r;r=r.parentNode}return null}querySelectorAll(e){let r=e.split(/\s*,\s*/),n=[],i=o=>{for(let a of r)if(Re(a,o)){n.push(o);break}for(let a of o.childNodes)i(a)};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 a=n[o];if(!r||a.nodeType===1)return a}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 R(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 Re(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],a=i[3],s=e.getAttribute(o);if(typeof a=="undefined"){if(s===void 0)return!1}else if(s!==a)return!1}else return!1}else if(e.nodeName!==n)return!1;return!0}function ue(t){var e;let r=[],n=[];for(;t;){let i=t.match(/^<([\w-]+)(\s[^>]*)?>/),o=t.match(/^<\/([\w-]+)>/);if(i){let a=i[1],l=((e=(i[2]||"").match(/([\w-]+)(="([^"]*)")?/g))===null||e===void 0?void 0:e.map(u=>{let[h,d,,f]=u.match(/([\w-]+)(="([^"]*)")?/);return{name:d,value:ct(f||"")}}))||[],c=new R(a,1);if(c.attributes=l,n.length>0){let u=n[n.length-1];u.childNodes.push(c),c.parentNode=u}else r.push(c);n.push(c),t=t.slice(i[0].length)}else if(o)n.pop(),t=t.slice(o[0].length);else{let a=t.indexOf("<"),s=t.slice(0,a!==-1?a:void 0),l=new R("#text",3);if(l.textContent=s,n.length>0){let c=n[n.length-1];c.childNodes.push(l),l.parentNode=c}else r.push(l);t=t.slice(s.length)}}return r}function ut(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function ct(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/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:a,value:s})=>` ${a}="${ut(String(s))}"`).join(""),o=le(e.childNodes);return["img","input","br"].includes(r)?`<${r}${i} />`:`<${r}${i}>${o}</${r}>`}).join("")}function dt(t){let e=new t.ownerDocument.defaultView.MutationObserver(r=>{r.forEach(n=>{let i=n.target,o=i.getAttribute("data-embed-src");o&&z(i,o),n.addedNodes&&n.addedNodes.forEach(a=>{a.nodeType==1&&ht(a,!1)})})});return e.observe(t,{attributes:!0,subtree:!0,childList:!0}),e}function ht(t,e=!0){let r=t.querySelectorAll("[data-embed-src]");for(var n=0;n<r.length;n++){let i=r[n];z(i,i.getAttribute("data-embed-src"))}if(e)return dt(t)}function z(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 de={};H(de,{adjustNumbers:()=>yt,cleanCollectionBit:()=>V,getHumanizedLabel:()=>vt,getLastPathBit:()=>bt,getQualifier:()=>mt,normalizeCollectionScope:()=>ce,parseLimit:()=>ft,parseRange:()=>pt});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},pt=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},mt=t=>{var e;return(e=t==null?void 0:t.match(/(\.\*|\[[^\]]*\])$/))===null||e===void 0?void 0:e[0]};function V(t){return t.replace(/(\.?\[[^\]\[]*\]|\.\*)$/g,"")}function ce(t){return V(t)+".*"}function yt(t,e){return t==null?void 0:t.replace(/(.|^)(\d+)/g,(r,n,i)=>n+(n==":"?i:String(parseInt(i)+e)))}function vt(t,e=2){var r=V(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 bt(t){return V(t).split(".").pop()}function Oe(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 gt(t,e,r){let n=t.getAttribute("data-path-scope");if(n==null)return;var i=Oe(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 a=i+1,s=t,l=t;l=l.nextElementSibling;)l.getAttribute("data-path-scope")==n&&(a++,s=l);for(var c=a;c<e;c++)o.insertBefore(s.cloneNode(!0),s.nextElementSibling);for(var c=Math.max(1,e);c<a;c++)s=s.previousElementSibling,o.removeChild(s.nextElementSibling)}}function T(t,e,r,n){var i,o;if(t){var a=t;(r==null?void 0:r.type)=="doc"&&Array.isArray(r.content)&&(r=O(r)),n!=null&&n.processValue&&(r=n==null?void 0:n.processValue(t,e,r));var s=e.replace("data-path-","");if(e=="data-path-src"){let v=Array.from(t.children).find(m=>m.localName=="picture")||t;a=t.localName=="img"?t:v.querySelector("img, video")}else if(e=="data-path-href")a=t.querySelector("a")||t.closest("a");else if(e=="data-path-alt")a=(Array.from(t.children).find(m=>m.localName=="picture")||t).querySelector("img, picture");else if(e=="data-path-hidden")r=r?null:!0;else if(e=="data-path"||e=="data-embed-html"||e=="html")s="innerHTML";else if(e=="data-embed-src")z(t,r);else if(e=="data-path-attributes"){let v=((i=t.getAttribute("data-attributes-keys"))===null||i===void 0?void 0:i.split(",").filter(Boolean))||[];if(!Array.isArray(r))for(var l in r){var c=r[l];T(t,l,typeof c=="object"&&c?JSON.stringify(c):c,n)}for(var u=0;u<v.length;u++)(r==null||!(v[u]in r))&&T(t,v[u],null,n);T(t,"data-attributes-keys",Object.keys(r||{}).join(","));return}if(typeof r=="boolean"&&(r=r?"":null),!!a){var h=String((o=t.getAttribute("data-path-placeholder")||a[s])!==null&&o!==void 0?o:a.getAttribute(s));if(r!=null)if(s=="innerHTML"){for(var d=String(r),f=a;f.parentElement&&f.localName.match(/^(a|var|strong|em|i|b)$/);)f=f.parentElement;f.localName.match(/p|h\d|button|li/)&&(d=d.replace(/<(p|h\d|li|ul)[^>]*?>|<\/(p|h\d|li|ul)[^>]*?>/g," ").trim().replace(/\s+/g," ")),a.innerHTML!=d&&(a.innerHTML=d)}else a.getAttribute(s)!=r&&a.setAttribute(s,r);else s=="innerHTML"?a.innerHTML=h:a.removeAttribute(s)}}}var Ne=["data-attributes-keys","data-path-attributes","data-path-scope"];function A(t,e,r,n){var i,o,a;let s=t;if(n||(e=((i=r==null?void 0:r.processData)===null||i===void 0?void 0:i.call(r,s,e))||e),s.nodeType==1){let u=s.getAttribute("data-path-scope");if(u){let d=Oe(s),f=J(e,u,!1);d==0&>(s,((o=r==null?void 0:r.shouldRepeat)===null||o===void 0?void 0:o.call(r,s,f))===!1?1:f.length,r),e={...e,[ce(u)]:f[d]}}let h=Array.prototype.slice.call(s.attributes).sort((d,f)=>Ne.indexOf(d.name)-Ne.indexOf(f.name));for(var l=0;l<h.length;l++){let{name:d,value:f}=h[l];d.startsWith("data-path")&&d!="data-path-scope"&&T(s,d,J(e,f,!0),r),d=="data-embed-src"&&T(s,d,s.getAttribute(d),r)}}for(var l=0,c;c=s.childNodes[l++];)Te(c)&&A(c,e,r,!0);return n||(a=r==null?void 0:r.onRender)===null||a===void 0||a.call(r,s,e),s}function Te(t){return t.nodeType==1}function P(t,e,r,n){var i;let o=((i=n==null?void 0:n.processTemplate)===null||i===void 0?void 0:i.call(n,t,e,r))||e;if(t.innerHTML=o,t.classList.add("-feaas"),(t.closest(".component.feaas")||t).className.includes("-theme--"))for(var s=0,l;l=t.childNodes[s++];)Te(l)&&(l.className=l.className.replace(/(\s|^)-theme--[^\s]+\s*/g,"$1"));return A(t,r,n)}function wt(t,e,r,n=!1){var i;let o=((i=r==null?void 0:r.processTemplate)===null||i===void 0?void 0:i.call(r,null,t,e))||t;if(typeof document=="undefined"||n){let a=ue(o);return A(a[0],e,r).outerHTML}else{let a=document.createElement("div");return a.innerHTML=o,A(a,e,r),a.innerHTML}}var Pe=["initial","check","updated"],q={};function Yt(){q={}}async function G(t,e,r,n,i=q){return $({url:t,options:e,validator:r,callback:n,cache:i}).then(K).then(o=>o.response)}function At(t,e=!1){let r=String(t).replace("?head","");var n=q[r];return!n&&!e&&(n=q[r]={phase:null,initial:S(),check:S(),updated:S(),final:S()}),n}var fe=class extends Error{};async function $({url:t,options:e,validator:r,callback:n,cache:i},o="initial"){let a=new Date;if(i!=null){var s=At(t);if(Pe.indexOf(s.phase)>=Pe.indexOf(o))var l=s[o];else s.phase=o}let c=await(l||fetch(t,e));if(!l&&s&&(c.ok?s[o].resolve(c):s[o].reject(new Error("Fetch failed"))),!c.ok)throw new Error("Fetch failed");let u=new Date(c.headers.get("date"))<a||l&&o=="initial"&&(s.phase=="updated"||s.phase=="check");if((r==null?void 0:r(c,u))===!1)throw new fe("Response is not valid");return await(n==null?void 0:n(c,o,u)),{url:t,options:e,isCached:u,response:c,validator:r,callback:n,cache:i}}async function K(t){let{url:e,isCached:r,options:n,validator:i,response:o,cache:a}=t;if(r){let{response:s}=await $({url:e+"?head",options:{...n,method:"HEAD",cache:"no-cache"},validator:i,cache:a},"check");if(s.headers.get("last-modified")!=o.headers.get("last-modified"))return pe(t)}return t}async function pe(t){return $({...t,options:{...t.options,cache:"reload"}},"updated")}var _="https://feaas.blob.core.windows.net";function Y(t){let e=t.match(/^(?:(.*?)\/components)?\/?([^\/]+)\/([^\/]+)(?:\/([^\/]+)(?:\/(published|staged|saved|\d+)(?:\.html?)?)?)?$/);if(e){var[,r,n,i,o,a]=e;return{cdn:r,library:n,component:i,version:o,revision:a}}}function Zt(t){if(!t||!t.library||!t.component)throw new Error("Component requires `library` and `component` properties");return`${t.cdn&&t.cdn!=_?`${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 er(t){return`${t.cdn&&t.cdn!=_?`${t.cdn}/styles/`:""}${t.library}/${!t.revision||t.revision=="published"?"":t.revision}`.replace(/\/$|\/\/(?!.+\/styles\/)/g,"")}function me(t){let e=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=Y(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 $e(t){return typeof t=="string"&&(t={src:t}),"src"in t&&(t={...Y(t.src)}),`${t.cdn||t.hostname||_}/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={...me(t.src)}),`${t.cdn||t.hostname||_}/styles/${t.library}/${t.revision||"published"}.css`}async function U(t,e,r=!1){let n=s=>s.headers.get("x-ms-meta-versionDeletedAt")==null,i=s=>s.clone().text().then(e),o=await Promise.all([t.instance&&$({options:{headers:{Accept:"text/html"},credentials:"omit"},url:$e({...t,version:t.instance}),validator:n}).catch(s=>s),$({url:$e(t),validator:n}).catch(s=>s)]),a=o.find(s=>s&&"isCached"in s&&s);if(!a||a instanceof Error)throw o.find(l=>l&&l instanceof Error)||new Error("Can not fetch component");return o[0]==a&&console.log("Using fork!",o),await i(a.response),r?a:K({...a,callback:i}).catch(s=>{if(o[0]==a&&(pe({...a,callback:null,validator:null}),console.log("Fork was deleted"),!(o[1]instanceof Error)))return i(o[1].response),K({...o[1],callback:i});throw s})}async function tr(t){typeof t=="string"&&(t={src:t});var e;let{response:r}=await U(t,n=>{e=n},!0);return{...t,template:e,lastModified:r.headers.get("last-modified")}}async function ye(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,n)=>r.clone().text().then(i=>e(i,n)))}function ir(t,e){return St(t,e||(e=document.createElement("style"))),e}function St(t,e){return e||(e=document.createElement("style")),ye(t,(r,n)=>{e.textContent=r}).then(()=>e)}function ve(t,e){var r=xt(t);if(!r)var n=Et(t);return ye(t,(i,o)=>{n&&(n.textContent=i),e==null||e(i,o)}).then(()=>r||n)}function ke(t){return new Promise((e,r)=>{ve(t,e).catch(r)})}function xt(t){return document.head.querySelector(`style[data-href="${Q(t)}"]`)}function Et(t){let e=Q(t),r=document.createElement("style");return r.setAttribute("data-href",e),document.head.appendChild(r),r}function lr(t,e){let r=document.createElement("div");r.innerHTML=t;let n=document.createDocumentFragment();for(;r.firstChild;)n.appendChild(r.firstChild);return A(n,e),r}function Me(t,e){return _t(t,e||(e=document.createElement("div"))),e}async function _t(t,e){return e||(e=document.createElement("div")),e.childNodes.length?A(e,t.data,t):"template"in t?P(e,t.template,t.data,t):U(t,r=>P(e,r,t.data,t)).then(()=>e)}function Ct(t){let{params:e,method:r,headers:n,body:i,url:o}=w(t);var a={url:o},s={...n};return n["Content-Type"]==="application/json"&&delete s["Content-Type"],n.Accept==="application/json"&&delete s.Accept,Object.keys(s).length>0&&(a.headers=s),r!=="GET"&&(a.method=r),r==="GET"||r==="HEAD"||Object.keys(i).length===0||(a.body=i),Object.keys(e).length>0&&(a={...a,params:e}),a}var X=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 Le(t){let{url:e,headers:r,params:n,method:i,body:o}=w(t),a,s=r["Content-Type"];i!="GET"&&i!="HEAD"&&(s==="application/json"&&(a=JSON.stringify(o)),s==="multipart/form-data"&&(a=Object.keys(o).reduce((c,u)=>(c.append(u,o[u]),c),new FormData)),s==="application/x-www-form-urlencoded"&&(a=new URLSearchParams(o)));let l=Object.keys(n).length?`?${new URLSearchParams(n)}`:"";return[`${e}${l}`,{headers:r,body:a,method:i}]}function w(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 be=async t=>{try{let[e,r]=Le(t),i=await(await w.fetchImplementation(e,{...r,method:r.method.toLowerCase()})).json();return t.jsonpath&&t.jsonpath!="$"?I(i,t.jsonpath):i}catch(e){return{}}};async function je(t){if(!t)return t;if(X(t))return be(t);let e=Object.keys(t),r=await Promise.all(e.map(n=>X(t[n])?be(t[n]):null).filter(Boolean));return e.reduce((n,i)=>({...n,[i]:X(t[i])?r.shift():t[i]}),{})}w.clean=Ct;w.toFetchArguments=Le;w.fetchOne=be;w.fetch=je;w.isDataSettings=X;w.fetchImplementation=(...t)=>fetch(...t);function Ft(t){var e,r,n,i,o,a,s,l;let c,u=t.getAttribute("src");if(u){let C=Y(u);if(!C)throw new Error(`Could not parse FEAAS Component source: ${u}`);var{cdn:h,library:d,component:f,version:v,revision:m}=C}let b=t.getAttribute("data");if(b!=null&&b!="")try{c=typeof b=="string"?JSON.parse(b):{}}catch(C){console.error(C)}return{data:c||{},cdn:(r=(e=t.getContextAttribute("cdn"))!==null&&e!==void 0?e:h)!==null&&r!==void 0?r:_,library:(n=t.getAttribute("library"))!==null&&n!==void 0?n:d,component:(i=t.getAttribute("component"))!==null&&i!==void 0?i:f,version:(a=(o=t.getAttribute("version"))!==null&&o!==void 0?o:v)!==null&&a!==void 0?a:"responsive",revision:(l=(s=t.getAttribute("revision"))!==null&&s!==void 0?s: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"),withStylesheet:t.getAttribute("with-stylesheet")!="false"}}var Z=class extends x{setData(e){this.set({data:e})}getProps(){return Ft(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.needsRefresh=!0,super.attributeChangedCallback(e,r,n),e==="data"&&this.fetchData())}async fetchData(){this.readyData=void 0,this.whenDataReady=this.whenDataReady.restart();let e=await w.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=S(e=>this.readyData=e,e=>this.onError(e)),this.defaultProps={cdn:_,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 n=r;return n}}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=ke({...this.props,revision:"published"}).then(()=>{r=null,e()});return Promise.all([r,this.whenDataReady.then(()=>e()),U(this.props,n=>{this.payload=n,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)A(this,this.readyData);else{if(this.needsRefresh=!0,this.getOriginal())return;P(this,this.payload,this.readyData)}}};Z.observedAttributes=["library","component","version","revision","hostname","cdn","template","data","instance","editable","with-stylesheet"];Z.register("feaas-component");function Dt(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 ee=class extends x{constructor(){super(...arguments),this.defaultProps={hidden:!1}}getProps(){return Dt(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=`
|
|
5
5
|
#loader {
|
|
6
6
|
position: absolute;
|
|
7
7
|
top: 0;
|
|
@@ -65,10 +65,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
65
65
|
style="animation: 1.5s linear 0s infinite normal none running loader-circular-track"
|
|
66
66
|
></circle>
|
|
67
67
|
</svg>
|
|
68
|
-
</div>`,this.getRoot().appendChild(this.stylesheet),this.getRoot().appendChild(this.loader)}update(){this.loader.style.opacity=String(this.props.opacity)}};ee.observedAttributes=["hidden","opacity"];ee.register("feaas-loader");function Rt(t){var e,r,n,i;let o=t.getAttribute("src");if(o)var{cdn:a,library:s,revision:
|
|
68
|
+
</div>`,this.getRoot().appendChild(this.stylesheet),this.getRoot().appendChild(this.loader)}update(){this.loader.style.opacity=String(this.props.opacity)}};ee.observedAttributes=["hidden","opacity"];ee.register("feaas-loader");function Rt(t){var e,r,n,i;let o=t.getAttribute("src");if(o)var{cdn:a,library:s,revision:l}=me(o);return{library:t==null?void 0:t.getContextAttribute("library"),revision:(r=(e=t==null?void 0:t.getAttribute("revision"))!==null&&e!==void 0?e:l)!==null&&r!==void 0?r:"published",cdn:(i=(n=t==null?void 0:t.getContextAttribute("cdn"))!==null&&n!==void 0?n:t==null?void 0:t.getContextAttribute("hostname"))!==null&&i!==void 0?i:_}}var ge=class extends x{constructor(){super(...arguments),this.onLoad=e=>{this.payload=e,this.advance()}}getProps(){return Rt(this)}isReadyToLoad(){return this.props.library!=null&&this.props.revision!=null&&this.props.cdn!=null}load(){return ve(this.props,this.onLoad)}};ge.register("feaas-stylesheet");var Ae={};H(Ae,{convertBase64toBlob:()=>Ie,generate:()=>We,get:()=>Nt,getVersionForThumbnail:()=>Ue,load:()=>Be,responseToImage:()=>we,upload:()=>He});var Ie=t=>fetch(t).then(e=>e.blob()),we=t=>t.blob().then(e=>new Promise((r,n)=>{let i=new Image;i.onerror=n,i.onload=()=>{r(i)},i.src=URL.createObjectURL(e)}));async function Ue(t){return t.versions.length||await t.versions.fetch(),t.getVersionForWidth(800)}async function Nt(t,e,r){try{if(!t.isNew)return await Be(t,e,r)}catch(i){t.sdk.log(`FEAAS: Thumbnail ${t.id}, version: ${(e==null?void 0:e.id)||"responsive"}, status: generating ${status}, reason: ${i}`)}let n=await We(t,e);return r==null||r(n,!1),n&&!t.isNew&&Ie(n.src).then(i=>He(t,e,i)),n}async function Be(t,e,r){let n=e?e.getThumbnailURL():t.getThumbnailURL(),i=t.library.stylesheet,o=new Date(Math.max(Number(t.modifiedAt),Number(i.modifiedAt)));t.sdk.log(`FEAAS: Thumbnail ${t.id}/${(e==null?void 0:e.id)||"responsive"}, loading`);var a;return await G(n,{},(s,l)=>{let c=Math.abs(Number(new Date(s.headers.get("x-ms-meta-componentRenderedAt")))-Number(o))<2e3;return l&&!c&&we(s).then(u=>{a=u,r(u,l)}),c},(s,l,c)=>{t.sdk.log(`FEAAS: Thumbnail ${t.id}/${(e==null?void 0:e.id)||"responsive"}, status: ${l}`),we(s).then(u=>{a=u,r(u,c)})},null),a}async function We(t,e){let r=e||(t.isNew?null:await Ue(t));if(!r||r.isViewEmpty())return null;let{stylesheet:n,datasources:i}=t.library;return await Ot(r.classList,n.getBreakpointForWidth(800,r.getBreakpoints()),r.view,i.reduce((a,s)=>Object.assign(a,{[s.id]:s.sample}),{}),n.css,t.sdk)}function Ot(t,e,r,n,i,o){let a=document.createElement("iframe");return a.style.position="absolute",a.style.top="-2000px",a.style.left="-2000px",a.style.width=e.props.minWidth+"px",a.style.height="720px",a.style.zIndex="100011",document.body.appendChild(a),new Promise((s,l)=>{let c=document.createElement("script");c.onerror=l,c.src=o.frontend+"/assets/html2canvas.js",c.onload=()=>{var f;(((f=a.contentWindow.document.fonts)===null||f===void 0?void 0:f.ready)||Promise.resolve()).then(function(){return a.contentWindow.html2canvas(d,{scale:Math.max(1.1,1e3/Math.min(1401,Math.max(320,e.props.minWidth))),width:Math.min(1401,Math.max(320,e.props.minWidth)),height:Math.max(1,Math.min(2e3,d.offsetHeight)),windowWidth:e.props.minWidth+"px",windowHeight:1e3,proxy:o.backend+"/proxy/media",backgroundColor:"#ffffff"}).then(v=>{let m=v.toDataURL("image/jpeg",.6);a.parentElement.removeChild(a);let b=new Image;b.onload=()=>{s(b)},b.onerror=l,b.src=m})})},a.contentWindow.document.head.appendChild(c);let u=a.contentWindow.document.createElement("style");u.textContent=`
|
|
69
69
|
${i}
|
|
70
70
|
body, html { padding: 0; margin: 0; overflow: hidden }
|
|
71
|
-
`;let
|
|
71
|
+
`;let h=a.contentWindow.document.createElement("style");h.textContent=`
|
|
72
72
|
body, html { padding: 0; margin: 0; overflow: hidden }
|
|
73
|
-
`,a.contentWindow.document.head.appendChild(
|
|
73
|
+
`,a.contentWindow.document.head.appendChild(u),a.contentWindow.document.head.appendChild(h);let d=Me({template:r,data:n});d.classList.add(...t,"-feaas--preview","-emulate--"+e.details.slug),a.contentWindow.document.body.appendChild(d)})}async function He(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 Se;typeof window!="undefined"&&(window.FEAASReactElement=N,(Se=window.FEAASLoading)!==null&&Se!==void 0||(window.FEAASLoading=Promise.resolve()));export{Z as Component,Ft as ComponentProps,S as ControlledPromise,_ as DEFAULT_CDN_URL,he as DOM,de as DataPath,se as DataScope,w as DataSettings,x as Element,Z as FEAASComponent,Ft as FEAASComponentsProps,x as FEAASElement,ee as FEAASLoader,Dt as FEAASLoaderProps,ge as FEAASStylesheet,Rt as FEAASStylesheetProps,fe as InvalidResponse,p as JSONPath,ee as Loader,re as MyComponent,ge as Stylesheet,Ae as Thumbnail,yt as adjustNumbers,ht as autoloadScripts,V as cleanCollectionBit,Yt as clearFetchCache,Et as createStylesheet,G as fetchAndRevalidate,U as fetchAndRevalidateComponent,ye as fetchAndRevalidateStylesheet,pe as fetchBypassingCache,q as fetchCache,tr as fetchComponent,je as fetchData,K as fetchToValidateCache,$ as fetchWithCacheAwareness,xt as findStylesheet,Zt as getComponentSource,$e as getComponentURL,At as getFetchCache,vt as getHumanizedLabel,bt as getLastPathBit,mt as getQualifier,er as getStylesheetSource,Q as getStylesheetURL,z as loadScript,ve as loadStylesheet,ke as loadStylesheetAllowStale,ce as normalizeCollectionScope,dt as observeDOMElement,Y as parseComponentSource,ft as parseLimit,pt as parseRange,me as parseStylesheetSource,I as queryObject,J as queryScopes,Me as renderComponent,lr as renderComponentElement,_t as renderComponentPromise,P as renderDOMContent,A as renderDOMElement,wt as renderHTMLContent,ir as renderStylesheet,St as renderStylesheetPromise,O as serializeCH1RichText,T as setDOMAttribute};
|
|
74
74
|
//# sourceMappingURL=headless.esm.js.map
|