@saasira/holi 0.1.6 → 0.1.9

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/dist/holi.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see holi.js.LICENSE.txt */
2
- (()=>{var t={892(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function l(n,r,i,a){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return o(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,o(h,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(h),o(h,a,"Generator"),o(h,r,function(){return this}),o(h,"toString",function(){return"[object Generator]"}),(i=function(){return{w:l,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function l(t){a(o,r,i,l,s,"next",t)}function s(t){a(o,r,i,l,s,"throw",t)}l(void 0)})}}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,v(r.key),r)}}function u(t,e,n){return e=h(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,n||[],h(t).constructor):e.apply(t,n))}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function d(t,e,n,r){var i=f(h(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},f.apply(null,arguments)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function v(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{AccordionComponent:()=>g});var y,m,b,g=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=u(this,e,[t,r])).templateId=e.templateId,n.multipleOpen=n.readBooleanAttr("multiple",!1),n.initialOpenIndex=Math.max(0,Number(n.container.getAttribute("open-index"))||0),n.items=[],n.openIndexes=new Set,n.onClick=function(t){return n.handleClick(t)},n.onKeydown=function(t){return n.handleKeydown(t)},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&p(t,e)}(e,t),n=e,r=[{key:"readBooleanAttr",value:function(t,e){if(!this.container.hasAttribute(t))return e;var n=String(this.container.getAttribute(t)||"").trim().toLowerCase();return!n||"false"!==n&&"0"!==n&&"no"!==n}},{key:"validateStructure",value:function(){if(d(e,"validateStructure",this,3)([]),!this.container)throw new Error("Accordion requires a container")}},{key:"init",value:(c=l(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return c.apply(this,arguments)})},{key:"render",value:(a=l(i().m(function t(){var n;return i().w(function(t){for(;;)switch(t.n){case 0:return n=this.collectSourceItems(),t.n=1,d(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".holi-accordion"),this.list=this.container.querySelector('[data-role="accordion-list"]'),this.element&&this.list){t.n=2;break}return t.a(2);case 2:this.buildItems(n),this.bindEvents(),this.items.length&&this.openPanel(this.initialOpenIndex,!1);case 3:return t.a(2)}},t,this)})),function(){return a.apply(this,arguments)})},{key:"collectSourceItems",value:function(){var t=Array.from(this.container.querySelectorAll('[data-accordion-item], [slot="panel"]'));return t.length?t:Array.from(this.container.children).filter(function(t){return t instanceof HTMLElement&&!t.classList.contains("holi-accordion")})}},{key:"buildItems",value:function(t){var e=this;this.list.replaceChildren(),this.items=[],t.forEach(function(t,n){var r=e.extractTitle(t,n),i=e.extractContent(t),o=e.createItem(n,r,i);e.items.push(o),e.list.appendChild(o.root)})}},{key:"extractTitle",value:function(t,e){var n,r=t.getAttribute("title")||t.getAttribute("data-title")||"";if(r)return r;var i=t.querySelector('[slot="title"], [data-role="title"], h1, h2, h3, h4, h5, h6');return i&&(null===(n=i.textContent)||void 0===n?void 0:n.trim())||"Section ".concat(e+1)}},{key:"extractContent",value:function(t){var e=t.cloneNode(!0),n=e.querySelector('[slot="title"], [data-role="title"], h1, h2, h3, h4, h5, h6');return n&&n.remove(),e}},{key:"createItem",value:function(t,e,n){var r=document.createElement("article");r.className="accordion-item",r.setAttribute("data-index",String(t));var i=document.createElement("button");i.type="button",i.className="accordion-trigger",i.setAttribute("data-action","toggle"),i.setAttribute("data-index",String(t)),i.setAttribute("aria-expanded","false"),i.setAttribute("aria-controls","accordion-panel-".concat(t)),i.textContent=e;var o=document.createElement("section");return o.className="accordion-panel",o.id="accordion-panel-".concat(t),o.hidden=!0,o.setAttribute("aria-hidden","true"),o.appendChild(n),r.append(i,o),{index:t,root:r,trigger:i,panel:o}}},{key:"bindEvents",value:function(){this.element.addEventListener("click",this.onClick),this.element.addEventListener("keydown",this.onKeydown)}},{key:"handleClick",value:function(t){var e,n,r=null===(e=t.target)||void 0===e||null===(n=e.closest)||void 0===n?void 0:n.call(e,'[data-action="toggle"]');if(r){var i=Number(r.getAttribute("data-index"));Number.isNaN(i)||this.togglePanel(i)}}},{key:"handleKeydown",value:function(t){var e,n,r=null===(e=t.target)||void 0===e||null===(n=e.closest)||void 0===n?void 0:n.call(e,".accordion-trigger");if(r){var i=Number(r.getAttribute("data-index"));if(!Number.isNaN(i))if("ArrowDown"!==t.key)if("ArrowUp"!==t.key)"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.togglePanel(i));else{var o;t.preventDefault();var a=(i-1+this.items.length)%this.items.length;null===(o=this.items[a])||void 0===o||null===(o=o.trigger)||void 0===o||o.focus()}else{var l;t.preventDefault();var s=(i+1)%this.items.length;null===(l=this.items[s])||void 0===l||null===(l=l.trigger)||void 0===l||l.focus()}}}},{key:"togglePanel",value:function(t){this.items[t]&&(this.openIndexes.has(t)?this.closePanel(t):this.openPanel(t))}},{key:"openPanel",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this.items[t];r&&(this.multipleOpen||Array.from(this.openIndexes).forEach(function(n){n!==t&&e.closePanel(n,!1)}),this.openIndexes.add(t),r.root.classList.add("is-open"),r.trigger.setAttribute("aria-expanded","true"),r.panel.hidden=!1,r.panel.setAttribute("aria-hidden","false"),n&&this.dispatchEvent("accordionchange",{index:t,open:!0,multiple:this.multipleOpen,openIndexes:Array.from(this.openIndexes)}))}},{key:"closePanel",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.items[t];n&&(this.openIndexes.delete(t),n.root.classList.remove("is-open"),n.trigger.setAttribute("aria-expanded","false"),n.panel.hidden=!0,n.panel.setAttribute("aria-hidden","true"),e&&this.dispatchEvent("accordionchange",{index:t,open:!1,multiple:this.multipleOpen,openIndexes:Array.from(this.openIndexes)}))}},{key:"openAll",value:function(){var t=this;this.multipleOpen&&(this.items.forEach(function(e){return t.openPanel(e.index,!1)}),this.dispatchEvent("accordionchange",{index:-1,open:!0,multiple:!0,openIndexes:Array.from(this.openIndexes)}))}},{key:"closeAll",value:function(){var t=this;this.items.forEach(function(e){return t.closePanel(e.index,!1)}),this.dispatchEvent("accordionchange",{index:-1,open:!1,multiple:this.multipleOpen,openIndexes:[]})}},{key:"destroy",value:function(){var t,n;null===(t=this.element)||void 0===t||t.removeEventListener("click",this.onClick),null===(n=this.element)||void 0===n||n.removeEventListener("keydown",this.onKeydown),d(e,"destroy",this,3)([])}}],o=[{key:"selector",get:function(){return"accordion"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"accordion"}}],r&&s(n.prototype,r),o&&s(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,a,c}(n(812).Component);y=g,b="accordion-template",(m=v(m="templateId"))in y?Object.defineProperty(y,m,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[m]=b,"undefined"!=typeof window&&(window.AccordionComponent=g)},951(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function l(n,r,i,a){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return o(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,o(h,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(h),o(h,a,"Generator"),o(h,r,function(){return this}),o(h,"toString",function(){return"[object Generator]"}),(i=function(){return{w:l,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,p(r.key),r)}}function s(t,e,n){return e=f(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,u()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}function u(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(u=function(){return!!t})()}function c(t,e,n,r){var i=d(f(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function d(){return d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},d.apply(null,arguments)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}function p(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{BackToTopComponent:()=>b});var v,y,m,b=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=s(this,e,[t,r])).templateId=e.templateId,n.config={anchor:n.readAttr(["anchor","target","href","data-anchor"],""),label:n.readAttr(["label","data-label"],"Back to top"),ariaLabel:n.readAttr(["aria-label","data-aria-label"],"Back to top"),showAfter:Math.max(0,Number(n.readAttr(["show-after","data-show-after"],"240"))||240),behavior:n.readAttr(["behavior","data-behavior"],"smooth"),vertical:n.readAttr(["vertical","data-vertical"],""),alwaysVisible:n.readBoolAttr(["always-visible","data-always-visible"],!1)},n.state={label:n.config.label,ariaLabel:n.config.ariaLabel,visible:n.config.alwaysVisible},n.boundScroll=function(){return n.handleScroll()},n.boundClick=function(t){return n.handleClick(t)},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&h(t,e)}(e,t),n=e,r=[{key:"readAttr",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=0;n<t.length;n+=1){var r=this.container.getAttribute(t[n]);if(null!=r&&""!==String(r).trim())return String(r).trim()}return e}},{key:"readBoolAttr",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0;n<t.length;n+=1){var r=t[n];if(this.container.hasAttribute(r)){var i=String(this.container.getAttribute(r)||"").trim().toLowerCase();return!i||"false"!==i&&"0"!==i&&"no"!==i}}return e}},{key:"init",value:function(){this.validateStructure(),this.render()}},{key:"render",value:(u=i().m(function t(){var n;return i().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,c(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-backtotop"),this.buttonEl=this.container.querySelector('[data-role="button"]'),this.projectSlot("prefix"),this.projectSlot("label"),this.projectSlot("suffix"),this.applyPosition(),null===(n=this.buttonEl)||void 0===n||n.addEventListener("click",this.boundClick),window.addEventListener("scroll",this.boundScroll,{passive:!0}),this.handleScroll();case 2:return t.a(2)}},t,this)}),d=function(){var t=this,e=arguments;return new Promise(function(n,r){var i=u.apply(t,e);function o(t){a(i,n,r,o,l,"next",t)}function l(t){a(i,n,r,o,l,"throw",t)}o(void 0)})},function(){return d.apply(this,arguments)})},{key:"projectSlot",value:function(t){var e=this.container.querySelector('slot[name="'.concat(t,'"]'));if(e){var n=Array.from(this.container.querySelectorAll('[slot="'.concat(t,'"]')));if(n.length){var r=document.createDocumentFragment();n.forEach(function(t){t.removeAttribute("slot"),r.appendChild(t)}),e.replaceWith(r)}}}},{key:"applyPosition",value:function(){if(this.element){var t=this.resolveVertical(this.config.vertical);if(!t)return this.element.style.removeProperty("top"),void this.element.style.removeProperty("bottom");this.element.style.top=t,this.element.style.bottom="auto"}}},{key:"resolveVertical",value:function(t){var e=String(t||"").trim().toLowerCase();return e&&"bottom"!==e?"middle"===e||"center"===e?"50%":/^\d+(\.\d+)?%$/.test(e)||/^\d+(\.\d+)?px$/.test(e)?e:"":""}},{key:"handleScroll",value:function(){var t,e=this.config.alwaysVisible||window.scrollY>=this.config.showAfter;this.state.visible=e,null===(t=this.element)||void 0===t||t.classList.toggle("is-visible",e),this.element&&(this.element.hidden=!e)}},{key:"resolveAnchorTarget",value:function(){var t,e=this,n=String(this.config.anchor||"").trim();if(n){var r=n.startsWith("#")?n.slice(1):"";if(r){var i=document.getElementById(r);if(i)return i}var o=document.querySelector(n);if(o)return o}return Array.from((null===(t=document.body)||void 0===t?void 0:t.children)||[]).find(function(t){if(!(t instanceof HTMLElement))return!1;if(t===e.container)return!1;var n=t.tagName.toLowerCase();return"script"!==n&&"template"!==n})||document.documentElement}},{key:"scrollToTop",value:function(){var t=this.resolveAnchorTarget(),e="auto"===this.config.behavior?"auto":"smooth";t&&"function"==typeof t.scrollIntoView?t.scrollIntoView({behavior:e,block:"start",inline:"nearest"}):window.scrollTo({top:0,behavior:e})}},{key:"handleClick",value:function(t){t.preventDefault(),this.scrollToTop(),this.dispatchEvent("backtotopclick",{anchor:this.config.anchor||"",visible:this.state.visible})}},{key:"destroy",value:function(){var t;null===(t=this.buttonEl)||void 0===t||t.removeEventListener("click",this.boundClick),window.removeEventListener("scroll",this.boundScroll),c(e,"destroy",this,3)([])}}],o=[{key:"selector",get:function(){return"backtotop"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"backtotop"}}],r&&l(n.prototype,r),o&&l(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,u,d}(n(812).Component);v=b,m="backtotop-template",(y=p(y="templateId"))in v?Object.defineProperty(v,y,{value:m,enumerable:!0,configurable:!0,writable:!0}):v[y]=m,"undefined"!=typeof window&&(window.BackToTopComponent=b)},935(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function l(n,r,i,a){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return o(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,o(h,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(h),o(h,a,"Generator"),o(h,r,function(){return this}),o(h,"toString",function(){return"[object Generator]"}),(i=function(){return{w:l,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function l(t){a(o,r,i,l,s,"next",t)}function s(t){a(o,r,i,l,s,"throw",t)}l(void 0)})}}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,v(r.key),r)}}function u(t,e,n){return e=h(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,n||[],h(t).constructor):e.apply(t,n))}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function d(t,e,n,r){var i=f(h(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},f.apply(null,arguments)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function v(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{BlockComponent:()=>g});var y,m,b,g=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=u(this,e,[t,r])).templateId=e.templateId,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&p(t,e)}(e,t),n=e,r=[{key:"validateStructure",value:function(){if(d(e,"validateStructure",this,3)([]),!this.container)throw new Error("Block requires a container")}},{key:"init",value:(c=l(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return c.apply(this,arguments)})},{key:"render",value:(a=l(i().m(function t(){var n,r;return i().w(function(t){for(;;)switch(t.n){case 0:return n=Array.from(this.container.childNodes),t.n=1,d(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".holi-block"),this.content=this.container.querySelector('[data-role="block-content"]'),!this.content){t.n=3;break}return(r=this.content).replaceChildren.apply(r,n),t.n=2,this.createChildren();case 2:this.syncChildren();case 3:this.applyLayoutConfig();case 4:return t.a(2)}},t,this)})),function(){return a.apply(this,arguments)})},{key:"applyLayoutConfig",value:function(){if(this.element){var t=Math.max(1,Number(this.container.getAttribute("columns"))||12),e=this.container.getAttribute("gap")||"12px";this.element.style.setProperty("--holi-block-columns",String(t)),this.element.style.setProperty("--holi-block-gap",String(e))}}}],o=[{key:"selector",get:function(){return"block"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"block"}},{key:"canInitElement",value:function(t){if(!(t instanceof Element))return!0;var e=t.parentElement;return!(e instanceof Element&&e.matches('page[layout], [component="page"][layout], [role="page"][layout]'))}}],r&&s(n.prototype,r),o&&s(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,a,c}(n(812).Component);y=g,b="block-template",(m=v(m="templateId"))in y?Object.defineProperty(y,m,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[m]=b,"undefined"!=typeof window&&(window.BlockComponent=g)},400(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function l(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return a(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(a(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,a(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,a(h,"constructor",d),a(d,"constructor",c),c.displayName="GeneratorFunction",a(d,i,"GeneratorFunction"),a(h),a(h,i,"Generator"),a(h,r,function(){return this}),a(h,"toString",function(){return"[object Generator]"}),(o=function(){return{w:l,m:p}})()}function a(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}a=function(t,e,n,r){function o(e,n){a(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},a(t,e,n,r)}function l(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function s(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){l(o,r,i,a,s,"next",t)}function s(t){l(o,r,i,a,s,"throw",t)}a(void 0)})}}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,y(r.key),r)}}function c(t,e,n){return e=p(e),function(t,e){if(e&&("object"==i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,d()?Reflect.construct(e,n||[],p(t).constructor):e.apply(t,n))}function d(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(d=function(){return!!t})()}function f(t,e,n,r){var i=h(p(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function h(){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},h.apply(null,arguments)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}function y(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}n.r(e),n.d(e,{BreadCrumbsComponent:()=>w});var m,b,g,w=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=c(this,e,[t,r])).templateId=e.templateId,n.separator=n.container.getAttribute("separator")||"/",n.maxItems=Math.max(0,Number(n.container.getAttribute("max-items"))||0),n.items=[],n.boundClick=function(t){return n.handleClick(t)},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&v(t,e)}(e,t),n=e,a=[{key:"validateStructure",value:function(){f(e,"validateStructure",this,3)([])}},{key:"init",value:(h=s(o().m(function t(){return o().w(function(t){for(;;)switch(t.n){case 0:return this.items=this.collectItems(),this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return h.apply(this,arguments)})},{key:"parseItemsAttr",value:function(){var t=String(this.container.getAttribute("data-items")||"").trim();if(!t)return[];try{var e=JSON.parse(t);return Array.isArray(e)?e:[]}catch(t){return[]}}},{key:"collectItems",value:function(){var t=this.parseItemsAttr();if(t.length)return this.normalizeItems(t);var e=this.container.querySelector('[slot="items"]')||this.container.querySelector("ol, ul");if(!e)return[];var n=Array.from(e.querySelectorAll(":scope > li")).map(function(t){var e=t.querySelector("a");return{label:String((null==e?void 0:e.textContent)||t.textContent||"").trim(),href:(null==e?void 0:e.getAttribute("href"))||"",current:t.hasAttribute("aria-current")||"true"===t.getAttribute("data-current")||"page"===(null==e?void 0:e.getAttribute("aria-current"))}});return e.remove(),this.normalizeItems(n)}},{key:"normalizeItems",value:function(t){var e=(t||[]).map(function(t){return t&&"object"===i(t)?{label:String(t.label||t.name||t.title||"").trim(),href:String(t.href||t.url||"").trim(),current:!!t.current}:{label:String(t||"").trim(),href:"",current:!1}}).filter(function(t){return t.label});return e.length?(e.some(function(t){return t.current})||(e[e.length-1].current=!0),e):e}},{key:"getVisibleItems",value:function(){return!this.maxItems||this.items.length<=this.maxItems?this.items:this.maxItems<3?this.items.slice(0,this.maxItems):[this.items[0],{label:"...",href:"",current:!1,ellipsis:!0}].concat(function(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(this.items.slice(this.items.length-(this.maxItems-2))))}},{key:"render",value:(d=s(o().m(function t(){return o().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,f(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".holi-breadcrumbs"),this.list=this.container.querySelector('[data-role="list"]'),this.element&&this.list){t.n=2;break}return t.a(2);case 2:this.projectSlot("prefix"),this.projectSlot("suffix"),this.applySeparator(),this.renderItems(),this.list.addEventListener("click",this.boundClick);case 3:return t.a(2)}},t,this)})),function(){return d.apply(this,arguments)})},{key:"projectSlot",value:function(t){var e=this.container.querySelector('slot[name="'.concat(t,'"]'));if(e){var n=Array.from(this.container.querySelectorAll('[slot="'.concat(t,'"]')));if(n.length){var r=document.createDocumentFragment();n.forEach(function(t){t.removeAttribute("slot"),r.appendChild(t)}),e.replaceWith(r)}}}},{key:"applySeparator",value:function(){var t=String(this.separator||"/").replace(/["\\]/g,"\\$&");this.element.style.setProperty("--holi-breadcrumb-separator",'"'.concat(t,'"'))}},{key:"renderItems",value:function(){var t=this;this.list&&(this.list.replaceChildren(),this.getVisibleItems().forEach(function(e,n){var r=document.createElement("li");if(r.className="holi-breadcrumb-item",r.setAttribute("data-index",String(n)),e.ellipsis){var i=document.createElement("span");return i.className="holi-breadcrumb-ellipsis",i.textContent=e.label,r.appendChild(i),void t.list.appendChild(r)}if(e.current||!e.href){var o=document.createElement("span");o.className="holi-breadcrumb-current",o.textContent=e.label,e.current&&o.setAttribute("aria-current","page"),r.appendChild(o)}else{var a=document.createElement("a");a.className="holi-breadcrumb-link",a.href=e.href,a.textContent=e.label,r.appendChild(a)}t.list.appendChild(r)}))}},{key:"handleClick",value:function(t){var e=t.target.closest("a.holi-breadcrumb-link");if(e){var n=e.closest(".holi-breadcrumb-item"),r=Number((null==n?void 0:n.getAttribute("data-index"))||"-1"),i=this.getVisibleItems()[r];this.dispatchEvent("breadcrumbclick",{index:r,item:i||null,href:e.getAttribute("href")||""})}}},{key:"destroy",value:function(){var t;null===(t=this.list)||void 0===t||t.removeEventListener("click",this.boundClick),f(e,"destroy",this,3)([])}}],l=[{key:"selector",get:function(){return"breadcrumbs"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"breadcrumbs"}}],a&&u(n.prototype,a),l&&u(n,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,a,l,d,h}(n(812).Component);m=w,g="breadcrumbs-template",(b=y(b="templateId"))in m?Object.defineProperty(m,b,{value:g,enumerable:!0,configurable:!0,writable:!0}):m[b]=g,"undefined"!=typeof window&&(window.BreadCrumbsComponent=w)},92(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function l(n,r,i,a){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return o(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,o(h,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(h),o(h,a,"Generator"),o(h,r,function(){return this}),o(h,"toString",function(){return"[object Generator]"}),(i=function(){return{w:l,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,p(r.key),r)}}function s(t,e,n){return e=f(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,u()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}function u(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(u=function(){return!!t})()}function c(t,e,n,r){var i=d(f(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function d(){return d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},d.apply(null,arguments)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}function p(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{ButtonComponent:()=>b});var v,y,m,b=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=s(this,e,[t,r])).templateId=e.templateId,n.config={label:n.readAttr("label","Button"),type:n.readAttr("type","button"),variant:n.readAttr("variant","primary"),disabled:n.readBoolAttr("disabled",!1)},n.state={label:n.config.label,type:n.config.type,disabled:n.config.disabled},n.boundClick=function(t){return n.handleClick(t)},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&h(t,e)}(e,t),n=e,r=[{key:"readAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.container.getAttribute(t);return null==n?e:String(n)}},{key:"readBoolAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.container.hasAttribute(t))return e;var n=String(this.container.getAttribute(t)||"").trim().toLowerCase();return!n||"false"!==n&&"0"!==n&&"no"!==n}},{key:"init",value:function(){this.validateStructure(),this.render()}},{key:"render",value:(u=i().m(function t(){var n;return i().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,c(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-button"),this.buttonEl=this.container.querySelector('[data-role="button"]'),this.projectSlot("prefix"),this.projectSlot("label"),this.projectSlot("suffix"),this.applyAttributes(),null===(n=this.buttonEl)||void 0===n||n.addEventListener("click",this.boundClick);case 2:return t.a(2)}},t,this)}),d=function(){var t=this,e=arguments;return new Promise(function(n,r){var i=u.apply(t,e);function o(t){a(i,n,r,o,l,"next",t)}function l(t){a(i,n,r,o,l,"throw",t)}o(void 0)})},function(){return d.apply(this,arguments)})},{key:"projectSlot",value:function(t){var e=this.container.querySelector('slot[name="'.concat(t,'"]'));if(e){var n=Array.from(this.container.querySelectorAll('[slot="'.concat(t,'"]')));if(n.length){var r=document.createDocumentFragment();n.forEach(function(t){t.removeAttribute("slot"),r.appendChild(t)}),e.replaceWith(r)}}}},{key:"applyAttributes",value:function(){this.buttonEl&&(this.buttonEl.type=this.config.type||"button",this.buttonEl.disabled=!!this.config.disabled,this.buttonEl.setAttribute("data-variant",this.config.variant||"primary"))}},{key:"handleClick",value:function(t){var e;this.dispatchEvent("buttonclick",{nativeEvent:t,type:(null===(e=this.buttonEl)||void 0===e?void 0:e.type)||"button"})}},{key:"destroy",value:function(){var t;null===(t=this.buttonEl)||void 0===t||t.removeEventListener("click",this.boundClick),c(e,"destroy",this,3)([])}}],o=[{key:"selector",get:function(){return"holi-button"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"button-control"}}],r&&l(n.prototype,r),o&&l(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,u,d}(n(812).Component);v=b,m="button-template",(y=p(y="templateId"))in v?Object.defineProperty(v,y,{value:m,enumerable:!0,configurable:!0,writable:!0}):v[y]=m,"undefined"!=typeof window&&(window.ButtonComponent=b)},110(t,e,n){"use strict";n.r(e),n.d(e,{CalendarComponent:()=>O});var r=n(812);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function a(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var a=r&&r.prototype instanceof u?r:u,c=Object.create(a.prototype);return l(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(l(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,l(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,l(h,"constructor",d),l(d,"constructor",c),c.displayName="GeneratorFunction",l(d,i,"GeneratorFunction"),l(h),l(h,i,"Generator"),l(h,r,function(){return this}),l(h,"toString",function(){return"[object Generator]"}),(a=function(){return{w:o,m:p}})()}function l(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}l=function(t,e,n,r){function o(e,n){l(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},l(t,e,n,r)}function s(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function u(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){s(o,r,i,a,l,"next",t)}function l(t){s(o,r,i,a,l,"throw",t)}a(void 0)})}}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,m(r.key),r)}}function d(t,e,n){return e=v(e),function(t,e){if(e&&("object"==i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,f()?Reflect.construct(e,n||[],v(t).constructor):e.apply(t,n))}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!t})()}function h(t,e,n,r){var i=p(v(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=v(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},p.apply(null,arguments)}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}function m(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}var b=["ar","fa","he","ur"],g=new Map;function w(t,e,n){return Math.max(e,Math.min(n,t))}var S,k,E,O=function(t){function e(t){var n,r,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=d(this,e,[t,o])).templateId=e.templateId,n.locale=n.readAttr("locale",navigator.language||"en-US"),n.dir=n.readAttr("dir","auto"),n.rtl=(r=n.locale,"rtl"===(i=n.dir)||"ltr"!==i&&b.some(function(t){return String(r||"").startsWith(t)})),n.tz=n.readAttr("timezone",Intl.DateTimeFormat().resolvedOptions().timeZone),n.today=new Date,n.year=n.today.getFullYear(),n.month=n.today.getMonth()+1,n.day=null,n.hour=0,n.minute=0,n.step=Math.max(1,Number(n.readAttr("step","5"))||5),n.hour12=n.readBoolean("hour12",!1),n.validatorNames=n.parseList(n.readAttr("validators","")),n.validators=n.validatorNames.map(function(t){return g.get(t)}).filter(Boolean),n.onPrev=function(){return n.changeMonth(-1)},n.onNext=function(){return n.changeMonth(1)},n.onDayClick=function(t){return n.handleDayClick(t)},n.onToggleAmPm=function(){n.hour=(n.hour+12)%24,n.renderTime()},n.onTouchStart=function(t){return n.handleSwipe(t)},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&y(t,e)}(e,t),n=e,r=[{key:"readAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.container.getAttribute(t);if(null!=n&&""!==String(n).trim())return String(n).trim();var r=this.container.getAttribute("data-".concat(t));return null!=r&&""!==String(r).trim()?String(r).trim():e}},{key:"readBoolean",value:function(t,e){var n=this.readAttr(t,"");if(!n)return e;var r=n.toLowerCase();return!!["1","true","yes","on"].includes(r)||!["0","false","no","off"].includes(r)&&e}},{key:"parseList",value:function(t){return t?String(t).split(",").map(function(t){return t.trim()}).filter(Boolean):[]}},{key:"resolveInputElement",value:function(){var t=this.container.querySelector('[data-role="calendar-input"]');if(t instanceof HTMLInputElement)return t;var e=this.container.querySelector('input[slot="input"]');return e instanceof HTMLInputElement?e:null}},{key:"init",value:(p=u(a().m(function t(){return a().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents();case 2:return t.a(2)}},t,this)})),function(){return p.apply(this,arguments)})},{key:"render",value:(f=u(a().m(function t(){return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,h(e,"render",this,3)([]);case 1:if(this.input=this.resolveInputElement(),this.element=this.container.querySelector(".holi-calendar"),this.prevBtn=this.container.querySelector('[data-action="prev-month"]'),this.nextBtn=this.container.querySelector('[data-action="next-month"]'),this.titleEl=this.container.querySelector('[data-role="title"]'),this.thead=this.container.querySelector('[data-role="thead"]'),this.tbody=this.container.querySelector('[data-role="tbody"]'),this.timeBox=this.container.querySelector('[data-role="time"]'),this.hourInput=this.container.querySelector('[data-role="hour"]'),this.minuteInput=this.container.querySelector('[data-role="minute"]'),this.timeToggle=this.container.querySelector('[data-action="toggle-ampm"]'),this.messages=this.container.querySelector('[data-role="messages"]'),this.live=this.container.querySelector('[data-role="live"]'),this.element&&this.thead&&this.tbody&&this.prevBtn&&this.nextBtn&&this.titleEl&&this.messages&&this.live){t.n=2;break}throw new Error("Calendar template is missing required nodes");case 2:this.element.dir=this.rtl?"rtl":"ltr",this.renderCalendar();case 3:return t.a(2)}},t,this)})),function(){return f.apply(this,arguments)})},{key:"bindEvents",value:function(){var t,e,n,r,i,o,a,l=this;null===(t=this.prevBtn)||void 0===t||t.addEventListener("click",this.onPrev),null===(e=this.nextBtn)||void 0===e||e.addEventListener("click",this.onNext),null===(n=this.tbody)||void 0===n||n.addEventListener("click",this.onDayClick),null===(r=this.timeToggle)||void 0===r||r.addEventListener("click",this.onToggleAmPm),null===(i=this.element)||void 0===i||i.addEventListener("touchstart",this.onTouchStart,{passive:!0}),null===(o=this.hourInput)||void 0===o||o.addEventListener("input",function(){var t=Number(l.hourInput.value);if(Number.isFinite(t)){if(l.hour12){var e=l.hour>=12,n=w(t,1,12);l.hour=n%12+(e?12:0)}else l.hour=w(t,0,23);l.renderTime()}}),null===(a=this.minuteInput)||void 0===a||a.addEventListener("input",function(){var t=Number(l.minuteInput.value);if(Number.isFinite(t)){var e=Math.round(t/l.step)*l.step;l.minute=w(e,0,59),l.renderTime()}})}},{key:"renderCalendar",value:function(){this.renderHeader(),this.renderDays(),this.renderTime()}},{key:"renderHeader",value:function(){var t=new Intl.DateTimeFormat(this.locale,{month:"long",year:"numeric",timeZone:this.tz});this.titleEl.textContent=t.format(new Date(this.year,this.month-1,1)),this.thead.replaceChildren();var e=document.createElement("tr"),n=new Intl.DateTimeFormat(this.locale,{weekday:"short"}),r=function(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Array(7).keys()).map(function(t){return n.format(new Date(2021,7,t+1))});this.rtl&&r.reverse(),r.forEach(function(t){var n=document.createElement("th");n.textContent=t,e.appendChild(n)}),this.thead.appendChild(e)}},{key:"renderDays",value:function(){var t=this;this.tbody.replaceChildren();for(var e,n,r=new Date(this.year,this.month-1,1).getDay(),i=(e=this.year,n=this.month,new Date(e,n,0).getDate()),o=this.today.getFullYear(),a=this.today.getMonth()+1,l=this.today.getDate(),s=1-r,u=function(){for(var e=document.createElement("tr"),n=[],r=0;r<7;r+=1,s+=1){var u=document.createElement("td");u.className="holi-calendar-day",s<1||s>i?u.classList.add("is-outside"):(u.textContent=String(s),u.tabIndex=0,u.setAttribute("data-day",String(s)),t.year===o&&t.month===a&&s===l&&u.classList.add("is-today"),t.day===s&&u.classList.add("is-selected"),t.applyDateValidation(u,new Date(t.year,t.month-1,s))),n.push(u)}t.rtl&&n.reverse(),n.forEach(function(t){return e.appendChild(t)}),t.tbody.appendChild(e)},c=0;c<6;c+=1)u()}},{key:"renderTime",value:function(){this.timeBox&&this.hourInput&&this.minuteInput&&this.timeToggle&&(this.hourInput.step="1",this.minuteInput.step=String(this.step),this.hourInput.value=String(this.hour12?w(this.hour%12||12,1,12):w(this.hour,0,23)),this.minuteInput.value=String(w(this.minute,0,59)),this.timeToggle.hidden=!this.hour12,this.timeToggle.textContent=this.hour>=12?"PM":"AM")}},{key:"runValidators",value:(s=u(a().m(function t(e,n){var r,i,o,l;return a().w(function(t){for(;;)switch(t.n){case 0:r=[],i=0;case 1:if(!(i<this.validators.length)){t.n=5;break}if((o=this.validators[i])&&o.type===e){t.n=2;break}return t.a(3,4);case 2:return t.n=3,o.validate(n,this);case 3:!0!==(l=t.v)&&r.push({severity:o.severity||"error",message:"string"==typeof l?l:o.name});case 4:i+=1,t.n=1;break;case 5:return t.a(2,r)}},t,this)})),function(t,e){return s.apply(this,arguments)})},{key:"applyDateValidation",value:function(t,e){this.runValidators("date",e).then(function(e){var n=e.some(function(t){return"error"===t.severity}),r=e.find(function(t){return"warning"===t.severity});if(n){var i=e.find(function(t){return"error"===t.severity});return t.classList.add("is-invalid"),t.setAttribute("aria-disabled","true"),void(t.title=(null==i?void 0:i.message)||"Unavailable")}r&&(t.classList.add("is-warning"),t.title=r.message)})}},{key:"showIssues",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.messages&&(this.messages.replaceChildren(),e.forEach(function(e){var n=document.createElement("div");n.className="holi-calendar-message is-".concat(e.severity||"info"),n.textContent=e.message||"",t.messages.appendChild(n)}),e.length&&this.announce(e.map(function(t){return t.message}).join(". ")))}},{key:"handleDayClick",value:(l=u(a().m(function t(e){var n,r,i,o,l;return a().w(function(t){for(;;)switch(t.n){case 0:if(i=null===(n=e.target)||void 0===n||null===(r=n.closest)||void 0===r?void 0:r.call(n,"[data-day]")){t.n=1;break}return t.a(2);case 1:if(!i.classList.contains("is-invalid")&&!i.classList.contains("is-outside")){t.n=2;break}return t.a(2);case 2:if(o=Number(i.getAttribute("data-day")),Number.isFinite(o)&&!(o<=0)){t.n=3;break}return t.a(2);case 3:return this.day=o,this.renderDays(),t.n=4,this.runValidators("selection",this.getDate());case 4:if(l=t.v,this.showIssues(l),!l.some(function(t){return"error"===t.severity})){t.n=5;break}return t.a(2);case 5:this.commit();case 6:return t.a(2)}},t,this)})),function(t){return l.apply(this,arguments)})},{key:"handleSwipe",value:function(t){var e,n,r=this,i=null===(e=t.touches)||void 0===e||null===(e=e[0])||void 0===e?void 0:e.clientX;Number.isFinite(i)&&(null===(n=this.element)||void 0===n||n.addEventListener("touchmove",function(t){var e,n=null===(e=t.touches)||void 0===e||null===(e=e[0])||void 0===e?void 0:e.clientX;if(Number.isFinite(n)){var o=n-i,a=r.rtl?-1:1;o>60*a&&r.changeMonth(-1),o<-60*a&&r.changeMonth(1)}},{once:!0}))}},{key:"changeMonth",value:function(t){this.month+=t,this.month<1&&(this.month=12,this.year-=1),this.month>12&&(this.month=1,this.year+=1),this.renderCalendar()}},{key:"getDate",value:function(){var t,e=this.hour12?this.hour%12+("PM"===(null===(t=this.timeToggle)||void 0===t?void 0:t.textContent)?12:0):this.hour,n=this.day||1;return new Date(this.year,this.month-1,n,e,this.minute)}},{key:"commit",value:function(){var t,e=this.getDate();this.input&&(this.input.value=e.toISOString(),this.input.dispatchEvent(new Event("input",{bubbles:!0})),this.input.dispatchEvent(new Event("change",{bubbles:!0}))),null===(t=this.element)||void 0===t||t.dispatchEvent(new CustomEvent("calendarchange",{bubbles:!0,detail:{value:e.toISOString(),date:e}})),this.announce("Selected ".concat(e.toLocaleString(this.locale,{timeZone:this.tz})))}},{key:"announce",value:function(t){var e=this;this.live&&(this.live.textContent="",requestAnimationFrame(function(){e.live.textContent=t||""}))}},{key:"destroy",value:function(){var t,n,r,i,o;null===(t=this.prevBtn)||void 0===t||t.removeEventListener("click",this.onPrev),null===(n=this.nextBtn)||void 0===n||n.removeEventListener("click",this.onNext),null===(r=this.tbody)||void 0===r||r.removeEventListener("click",this.onDayClick),null===(i=this.timeToggle)||void 0===i||i.removeEventListener("click",this.onToggleAmPm),null===(o=this.element)||void 0===o||o.removeEventListener("touchstart",this.onTouchStart),h(e,"destroy",this,3)([])}}],i=[{key:"selector",get:function(){return"calendar"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"calendar"}},{key:"registerValidator",value:function(t){if(!t||!t.name||"function"!=typeof t.validate)throw new Error("Invalid calendar validator");g.set(t.name,t)}}],r&&c(n.prototype,r),i&&c(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i,l,s,f,p}(r.Component);S=O,E="calendar-template",(k=m(k="templateId"))in S?Object.defineProperty(S,k,{value:E,enumerable:!0,configurable:!0,writable:!0}):S[k]=E,"undefined"!=typeof window&&(window.CalendarComponent=O,window.Calendar=O,window.Calendar.registerValidator=O.registerValidator.bind(O))},838(t,e,n){"use strict";function r(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||i(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){if(t){if("string"==typeof t)return o(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function a(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var a=r&&r.prototype instanceof u?r:u,c=Object.create(a.prototype);return l(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(l(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,l(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,l(h,"constructor",d),l(d,"constructor",c),c.displayName="GeneratorFunction",l(d,i,"GeneratorFunction"),l(h),l(h,i,"Generator"),l(h,r,function(){return this}),l(h,"toString",function(){return"[object Generator]"}),(a=function(){return{w:o,m:p}})()}function l(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}l=function(t,e,n,r){function o(e,n){l(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},l(t,e,n,r)}function s(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function u(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){s(o,r,i,a,l,"next",t)}function l(t){s(o,r,i,a,l,"throw",t)}a(void 0)})}}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,b(r.key),r)}}function f(t,e,n){return e=y(e),function(t,e){if(e&&("object"==c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,h()?Reflect.construct(e,n||[],y(t).constructor):e.apply(t,n))}function h(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(h=function(){return!!t})()}function p(t,e,n,r){var i=v(y(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function v(){return v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=y(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},v.apply(null,arguments)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}function b(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}n.r(e),n.d(e,{CarouselComponent:()=>k});var g,w,S,k=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=f(this,e,[t,r])).templateId=e.templateId,n.mode=n.resolveMode(t.getAttribute("mode")||"fade"),n.baseActiveSlides=n.parseNumber(t.getAttribute("active-slides"),1),n.baseSlidesToMove=n.parseNumber(t.getAttribute("move-slides"),1),n.activeSlides=n.baseActiveSlides,n.slidesToMove=n.baseSlidesToMove,n.loop=!t.hasAttribute("no-loop"),n.autoStart=!t.hasAttribute("no-autoplay"),n.pauseOnHover=!t.hasAttribute("no-pause-on-hover"),n.intervalMs=n.parseNumber(t.getAttribute("interval"),5e3),n.skipTarget=t.getAttribute("skip-target")||"#main-content",n.responsive=n.parseResponsiveConfig(t.getAttribute("responsive")),n.currentIndex=0,n.isPlaying=n.autoStart,n.animationFrame=null,n.progressStartedAt=0,n.boundResize=null,n.slotted=null,n.track=null,n.slideList=[],n.prevButton=null,n.nextButton=null,n.playPauseButton=null,n.loopButton=null,n.dotsContainer=null,n.progressBar=null,n.liveRegion=null,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&m(t,e)}(e,t),n=e,o=[{key:"parseNumber",value:function(t,e){var n=Number(t);return Number.isFinite(n)&&n>0?n:e}},{key:"resolveMode",value:function(t){return"slide"===String(t||"fade").trim().toLowerCase()?"slide":"fade"}},{key:"parseResponsiveConfig",value:function(t){if(!t)return{};try{var e=JSON.parse(t);return e&&"object"===c(e)?e:{}}catch(t){return{}}}},{key:"captureSlots",value:function(){var t=Array.from(this.container.children).filter(function(t){return!t.classList.contains("holi-carousel")}),e=function(e){return t.find(function(t){return t.getAttribute("slot")===e})||null},n=e("slides")||this.container.querySelector(".slides");this.slotted={skipLink:e("skip-link"),slides:n,anchors:e("anchors"),dots:e("dots"),controls:e("controls"),progress:e("progress"),liveRegion:e("live-region")}}},{key:"init",value:(h=u(a().m(function t(){return a().w(function(t){for(;;)switch(t.n){case 0:return this.captureSlots(),this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents(),this.applyResponsiveSettings(),this.goToSlide(0,!1),this.autoStart&&this.startAutoSlide();case 2:return t.a(2)}},t,this)})),function(){return h.apply(this,arguments)})},{key:"validateStructure",value:function(){var t;if(p(e,"validateStructure",this,3)([]),!(null!==(t=this.slotted)&&void 0!==t&&t.slides||this.container.querySelector('.slides, .slide, [slot="slides"]')))throw new Error('Carousel requires slides markup. Provide [slot="slides"] with .slide items.')}},{key:"render",value:(s=u(a().m(function t(){return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,p(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".holi-carousel"),this.element){t.n=2;break}return t.a(2);case 2:this.element.classList.toggle("fade","fade"===this.mode),this.element.classList.toggle("slide-mode","slide"===this.mode),this.applySlotContent(),this.track=this.container.querySelector('[data-role="track"]'),this.prevButton=this.container.querySelector('[data-action="previous"]'),this.nextButton=this.container.querySelector('[data-action="next"]'),this.playPauseButton=this.container.querySelector('[data-action="play-pause"]'),this.loopButton=this.container.querySelector('[data-action="toggle-loop"]'),this.dotsContainer=this.container.querySelector('[data-role="dots"]'),this.progressBar=this.container.querySelector('[data-role="progress-bar"]'),this.liveRegion=this.container.querySelector('[data-role="live-region"]'),this.refreshSlides(),this.updateControlLabels(),this.updateTrackSizing(),this.renderDots();case 3:return t.a(2)}},t,this)})),function(){return s.apply(this,arguments)})},{key:"applySlotContent",value:function(){var t,e,n,o,a,l,s,u,c=this;if([["skip-link",null===(t=this.slotted)||void 0===t?void 0:t.skipLink],["slides",null===(e=this.slotted)||void 0===e?void 0:e.slides],["anchors",null===(n=this.slotted)||void 0===n?void 0:n.anchors],["dots",null===(o=this.slotted)||void 0===o?void 0:o.dots],["controls",null===(a=this.slotted)||void 0===a?void 0:a.controls],["progress",null===(l=this.slotted)||void 0===l?void 0:l.progress],["live-region",null===(s=this.slotted)||void 0===s?void 0:s.liveRegion]].forEach(function(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){u=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(t,e)||i(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,2),n=e[0],r=e[1];if(r){var o=c.container.querySelector('slot[name="'.concat(n,'"]'));o&&o.replaceWith(r)}}),this.track&&null!==(u=this.slotted)&&void 0!==u&&u.slides){var d=this.slotted.slides.matches(".slides")?this.slotted.slides:this.slotted.slides.querySelector(".slides");if(d){var f;(f=this.track).replaceChildren.apply(f,r(Array.from(d.children)))}else{var h,p=Array.from(this.slotted.slides.children).filter(function(t){var e;return null===(e=t.classList)||void 0===e?void 0:e.contains("slide")});p.length&&(h=this.track).replaceChildren.apply(h,r(p))}}var v=this.container.querySelector('slot[name="slides"]');v&&v.parentElement===this.track&&v.replaceWith.apply(v,r(Array.from(v.childNodes)));var y=this.container.querySelector(".skip-link");y&&y.setAttribute("href",this.skipTarget)}},{key:"refreshSlides",value:function(){this.track&&(this.slideList=Array.from(this.track.querySelectorAll(".slide")),this.slideList.forEach(function(t,e){t.setAttribute("data-index",String(e)),t.setAttribute("aria-hidden","true"),t.classList.remove("active")}))}},{key:"bindEvents",value:function(){var t,e,n,r=this;this.element&&(this.element.addEventListener("click",function(t){var e=t.target.closest("[data-action]");if(e){var n=e.getAttribute("data-action");return"next"===n?(t.preventDefault(),void r.next()):"previous"===n?(t.preventDefault(),void r.previous()):"play-pause"===n?(t.preventDefault(),void r.togglePlayPause()):void("toggle-loop"===n&&(t.preventDefault(),r.toggleLoop()))}}),null===(t=this.dotsContainer)||void 0===t||t.addEventListener("click",function(t){var e=t.target.closest("[data-dot-index]");if(e){var n=Number(e.getAttribute("data-dot-index"));Number.isFinite(n)&&r.goToSlide(n,!0)}}),this.element.addEventListener("keydown",function(t){return r.handleKeydown(t)}),null===(e=this.track)||void 0===e||e.addEventListener("touchstart",function(t){return r.onTouchStart(t)},{passive:!0}),null===(n=this.track)||void 0===n||n.addEventListener("touchend",function(t){return r.onTouchEnd(t)},{passive:!0}),this.pauseOnHover&&(this.element.addEventListener("mouseenter",function(){return r.pauseAutoSlide(!1)}),this.element.addEventListener("mouseleave",function(){return r.resumeAutoSlide()})),"undefined"!=typeof window&&(this.boundResize=function(){return r.applyResponsiveSettings()},window.addEventListener("resize",this.boundResize)))}},{key:"applyResponsiveSettings",value:function(){var t=this,e=window.innerWidth||document.documentElement.clientWidth,n=null;Object.keys(this.responsive).map(function(t){return Number(t)}).filter(function(t){return Number.isFinite(t)}).sort(function(t,e){return t-e}).forEach(function(r){e<=r&&null==n&&(n=t.responsive[String(r)]||t.responsive[r])}),this.activeSlides=this.baseActiveSlides,this.slidesToMove=this.baseSlidesToMove,n&&"object"===c(n)&&(this.activeSlides=this.parseNumber(n.active,this.baseActiveSlides),this.slidesToMove=this.parseNumber(n.move,this.baseSlidesToMove)),this.activeSlides=Math.max(1,Math.min(this.activeSlides,this.slideList.length||1)),this.slidesToMove=Math.max(1,this.slidesToMove),this.updateTrackSizing(),this.renderDots(),this.goToSlide(Math.min(this.currentIndex,Math.max(this.getDotCount()-1,0)),!1)}},{key:"getDotCount",value:function(){return Math.max(1,Math.ceil((this.slideList.length||1)/this.slidesToMove))}},{key:"renderDots",value:function(){if(this.dotsContainer){this.dotsContainer.replaceChildren();for(var t=this.getDotCount(),e=0;e<t;e+=1){var n=document.createElement("button");n.type="button",n.className="dot",n.setAttribute("data-dot-index",String(e)),n.setAttribute("aria-label","Go to slide ".concat(e+1)),n.setAttribute("aria-pressed",e===this.currentIndex?"true":"false"),e===this.currentIndex&&n.classList.add("selected"),this.dotsContainer.appendChild(n)}}}},{key:"updateDots",value:function(){var t=this;this.dotsContainer&&this.dotsContainer.querySelectorAll("[data-dot-index]").forEach(function(e,n){var r=n===t.currentIndex;e.classList.toggle("selected",r),e.setAttribute("aria-pressed",r?"true":"false")})}},{key:"updateTrackSizing",value:function(){if(this.track&&this.slideList.length){var t=100/this.activeSlides;this.slideList.forEach(function(e){e.style.flex="0 0 ".concat(t,"%")})}}},{key:"goToSlide",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.slideList.length){var r=this.getDotCount()-1;this.currentIndex=Math.max(0,Math.min(t,r));var i=this.currentIndex*this.slidesToMove;if("slide"===this.mode){var o=i*(100/this.activeSlides);this.track&&(this.track.style.transform="translateX(-".concat(o,"%)")),this.slideList.forEach(function(t,n){var r=n>=i&&n<i+e.activeSlides;t.classList.toggle("active",r),t.setAttribute("aria-hidden",r?"false":"true")})}else this.slideList.forEach(function(t,n){var r=n>=i&&n<i+e.activeSlides;t.classList.toggle("active",r),t.setAttribute("aria-hidden",r?"false":"true")});this.updateDots(),this.announce("Slide ".concat(this.currentIndex+1," of ").concat(this.getDotCount()," is now visible")),n&&this.isPlaying&&this.startAutoSlide()}}},{key:"next",value:function(){var t=this.getDotCount()-1;if(this.currentIndex>=t){if(!this.loop)return;this.goToSlide(0)}else this.goToSlide(this.currentIndex+1)}},{key:"previous",value:function(){if(this.currentIndex<=0){if(!this.loop)return;this.goToSlide(this.getDotCount()-1)}else this.goToSlide(this.currentIndex-1)}},{key:"togglePlayPause",value:function(){this.isPlaying?this.pauseAutoSlide(!0):(this.isPlaying=!0,this.updateControlLabels(),this.announce("Carousel playing"),this.startAutoSlide())}},{key:"pauseAutoSlide",value:function(t){this.isPlaying=!1,this.animationFrame&&(cancelAnimationFrame(this.animationFrame),this.animationFrame=null),this.updateControlLabels(),t&&this.announce("Carousel paused")}},{key:"resumeAutoSlide",value:function(){this.isPlaying||(this.isPlaying=!0,this.updateControlLabels(),this.startAutoSlide())}},{key:"toggleLoop",value:function(){this.loop=!this.loop,this.updateControlLabels(),this.announce("Loop mode ".concat(this.loop?"enabled":"disabled"))}},{key:"updateControlLabels",value:function(){this.playPauseButton&&(this.playPauseButton.textContent=this.isPlaying?"Pause":"Play",this.playPauseButton.setAttribute("aria-label",this.isPlaying?"Pause auto sliding":"Resume auto sliding")),this.loopButton&&(this.loopButton.textContent=this.loop?"Disable Loop":"Enable Loop",this.loopButton.setAttribute("aria-pressed",this.loop?"true":"false"))}},{key:"startAutoSlide",value:function(){var t=this;if(this.progressBar){this.animationFrame&&cancelAnimationFrame(this.animationFrame),this.progressBar.style.width="0%",this.progressStartedAt=Date.now();var e=function(){if(t.isPlaying){var n=Date.now()-t.progressStartedAt,r=Math.min(n/t.intervalMs*100,100);t.progressBar.style.width="".concat(r,"%"),n>=t.intervalMs&&(t.next(),t.progressStartedAt=Date.now(),t.progressBar.style.width="0%"),t.animationFrame=requestAnimationFrame(e)}};this.animationFrame=requestAnimationFrame(e)}}},{key:"onTouchStart",value:function(t){var e,n;this.touchStartX=null!==(e=null===(n=t.changedTouches)||void 0===n||null===(n=n[0])||void 0===n?void 0:n.clientX)&&void 0!==e?e:0}},{key:"onTouchEnd",value:function(t){var e,n,r=(null!==(e=null===(n=t.changedTouches)||void 0===n||null===(n=n[0])||void 0===n?void 0:n.clientX)&&void 0!==e?e:0)-(this.touchStartX||0);Math.abs(r)<24||(r<0?this.next():this.previous())}},{key:"handleKeydown",value:function(t){return"ArrowRight"===t.key?(t.preventDefault(),void this.next()):"ArrowLeft"===t.key?(t.preventDefault(),void this.previous()):void(" "===t.key&&(t.preventDefault(),this.togglePlayPause()))}},{key:"announce",value:function(t){this.liveRegion&&(this.liveRegion.textContent=t)}},{key:"destroy",value:function(){this.animationFrame&&(cancelAnimationFrame(this.animationFrame),this.animationFrame=null),this.boundResize&&(window.removeEventListener("resize",this.boundResize),this.boundResize=null),p(e,"destroy",this,3)([])}}],l=[{key:"selector",get:function(){return"carousel"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"carousel"}}],o&&d(n.prototype,o),l&&d(n,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o,l,s,h}(n(812).Component);g=k,S="carousel-template",(w=b(w="templateId"))in g?Object.defineProperty(g,w,{value:S,enumerable:!0,configurable:!0,writable:!0}):g[w]=S,"undefined"!=typeof window&&(window.CarouselComponent=k)},546(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||o(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){if(t){if("string"==typeof t)return a(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function l(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return s(c,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var a={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(s(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,s(h,"constructor",d),s(d,"constructor",c),c.displayName="GeneratorFunction",s(d,i,"GeneratorFunction"),s(h),s(h,i,"Generator"),s(h,r,function(){return this}),s(h,"toString",function(){return"[object Generator]"}),(l=function(){return{w:o,m:p}})()}function s(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}s=function(t,e,n,r){function o(e,n){s(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},s(t,e,n,r)}function u(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function c(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){u(o,r,i,a,l,"next",t)}function l(t){u(o,r,i,a,l,"throw",t)}a(void 0)})}}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,b(r.key),r)}}function f(t,e,n){return e=y(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,h()?Reflect.construct(e,n||[],y(t).constructor):e.apply(t,n))}function h(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(h=function(){return!!t})()}function p(t,e,n,r){var i=v(y(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function v(){return v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=y(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},v.apply(null,arguments)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}function b(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{ChartComponent:()=>k});var g,w,S,k=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=f(this,e,[t,r])).templateId=e.templateId,n.type=n.resolveType(r.type||n.readAttr("type","line")),n.height=n.parseNumber(r.height,n.readAttr("height","220"),220),n.showLegend=n.parseBoolean(r.showLegend,n.readAttr("show-legend","true"),!0),n.title=String(r.title||n.readAttr("title","")).trim(),n.colors=n.resolveColors(r.colors||n.readAttr("colors","")),n.data=n.resolveData(r.data),n.element=null,n.svgEl=null,n.legendEl=null,n.emptyEl=null,n.boundClick=function(t){return n.handlePointClick(t)},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&m(t,e)}(e,t),n=e,r=[{key:"readAttr",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=this.container.getAttribute(t);return null!=r?r:null!==(e=this.container.getAttribute("data-".concat(t)))&&void 0!==e?e:n}},{key:"parseNumber",value:function(){for(var t,e=(t=arguments.length-1)<0||arguments.length<=t?void 0:arguments[t],n=0;n<arguments.length-1;n+=1){var r=n<0||arguments.length<=n?void 0:arguments[n];if(null!=r&&""!==r){var i=Number(r);if(Number.isFinite(i))return i}}return e}},{key:"parseBoolean",value:function(){for(var t,e=(t=arguments.length-1)<0||arguments.length<=t?void 0:arguments[t],n=0;n<arguments.length-1;n+=1){var r=n<0||arguments.length<=n?void 0:arguments[n];if(null!=r&&""!==r){if("boolean"==typeof r)return r;var i=String(r).trim().toLowerCase();if(["1","true","yes","on"].includes(i))return!0;if(["0","false","no","off"].includes(i))return!1}}return e}},{key:"resolveType",value:function(t){var e=String(t||"line").trim().toLowerCase();return new Set(["line","bar","area","pie","doughnut"]).has(e)?e:"line"}},{key:"resolveColors",value:function(t){if(Array.isArray(t))return t.map(function(t){return String(t).trim()}).filter(Boolean);var e=String(t||"").trim();if(!e)return["#2563eb","#10b981","#f59e0b","#ef4444","#7c3aed","#14b8a6","#f97316"];if(e.startsWith("["))try{var n=JSON.parse(e);if(Array.isArray(n))return n.map(function(t){return String(t).trim()}).filter(Boolean)}catch(t){}return e.split(",").map(function(t){return t.trim()}).filter(Boolean)}},{key:"resolveData",value:function(t){var e=this;if(Array.isArray(t))return this.normalizeData(t);var n=this.readAttr("data",this.readAttr("series",""));if(n)try{var r=JSON.parse(n);if(Array.isArray(r))return this.normalizeData(r)}catch(t){}var i=Array.from(this.container.querySelectorAll("[data-point], [data-value], li"));if(i.length){var o=i.map(function(t,n){var r;return{label:t.getAttribute("data-label")||t.getAttribute("label")||(null===(r=t.textContent)||void 0===r?void 0:r.trim())||"Item ".concat(n+1),value:e.parseNumber(t.getAttribute("data-point"),t.getAttribute("data-value"),t.getAttribute("value"),0)}});return this.normalizeData(o)}return[]}},{key:"normalizeData",value:function(t){var e=this;return(Array.isArray(t)?t:[]).map(function(t,n){var r,i,o,a=null!==(r=null!==(i=null!==(o=null==t?void 0:t.label)&&void 0!==o?o:null==t?void 0:t.name)&&void 0!==i?i:null==t?void 0:t.x)&&void 0!==r?r:"Item ".concat(n+1),l=e.parseNumber(null==t?void 0:t.value,null==t?void 0:t.y,null==t?void 0:t.amount,0);return{label:String(a),value:Math.max(0,Number(l)||0)}})}},{key:"init",value:(u=c(l().m(function t(){return l().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents();case 2:return t.a(2)}},t,this)})),function(){return u.apply(this,arguments)})},{key:"render",value:(s=c(l().m(function t(){return l().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,p(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".holi-chart"),this.svgEl=this.container.querySelector('[data-role="svg"]'),this.legendEl=this.container.querySelector('[data-role="legend"]'),this.emptyEl=this.container.querySelector('[data-role="empty"]'),this.titleEl=this.container.querySelector('[data-role="title"]'),this.element&&this.svgEl&&this.legendEl&&this.emptyEl&&this.titleEl){t.n=2;break}throw new Error("Chart template is missing required nodes");case 2:this.element.style.setProperty("--chart-height","".concat(Math.max(120,this.height),"px")),this.titleEl.textContent=this.title,this.titleEl.hidden=!this.title,this.draw();case 3:return t.a(2)}},t,this)})),function(){return s.apply(this,arguments)})},{key:"bindEvents",value:function(){var t;null===(t=this.svgEl)||void 0===t||t.addEventListener("click",this.boundClick)}},{key:"handlePointClick",value:function(t){var e,n,r=null===(e=t.target)||void 0===e||null===(n=e.closest)||void 0===n?void 0:n.call(e,"[data-point-index]");if(r){var i=Number(r.getAttribute("data-point-index"));!Number.isFinite(i)||i<0||i>=this.data.length||this.dispatchEvent("chartpointselect",{index:i,item:this.data[i],type:this.type})}}},{key:"draw",value:function(){if(this.svgEl&&this.legendEl&&this.emptyEl){this.svgEl.replaceChildren(),this.legendEl.replaceChildren();var t=this.normalizeData(this.data);this.data=t;var e=t.length>0&&t.some(function(t){return t.value>0});this.emptyEl.hidden=e,this.svgEl.hidden=!e,this.legendEl.hidden=!e||!this.showLegend,e&&(this.svgEl.setAttribute("viewBox","0 0 100 100"),this.svgEl.setAttribute("aria-label","Chart (".concat(this.type,")")),this.svgEl.setAttribute("preserveAspectRatio","pie"===this.type||"doughnut"===this.type?"xMidYMid meet":"none"),"bar"===this.type?this.drawBars(t):"pie"===this.type||"doughnut"===this.type?this.drawPie(t,"doughnut"===this.type):this.drawLine(t,"area"===this.type),this.showLegend&&this.drawLegend(t))}}},{key:"drawLine",value:function(t){for(var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.calculateCartesianPoints(t),o=this.createSvgNode("g",{class:"holi-chart-grid"}),a=0;a<=4;a+=1){var l=10+20*a;o.appendChild(this.createSvgNode("line",{x1:8,y1:l,x2:96,y2:l}))}if(this.svgEl.appendChild(o),n){var s=r[0],u=r[r.length-1],c=["M ".concat(s.x," 90")].concat(i(r.map(function(t,e){return"".concat("L"," ").concat(t.x," ").concat(t.y)})),["L ".concat(u.x," 90 Z")]).join(" ");this.svgEl.appendChild(this.createSvgNode("path",{d:c,class:"holi-chart-area"}))}var d=r.map(function(t,e){return"".concat(0===e?"M":"L"," ").concat(t.x," ").concat(t.y)}).join(" ");this.svgEl.appendChild(this.createSvgNode("path",{d,class:"holi-chart-line",stroke:this.resolveColor(0)})),r.forEach(function(t){var n=e.createSvgNode("circle",{cx:t.x,cy:t.y,r:2.2,class:"holi-chart-dot",fill:e.resolveColor(t.index),"data-point-index":t.index});e.svgEl.appendChild(n)})}},{key:"drawBars",value:function(t){var e=this,n=Math.max.apply(Math,i(t.map(function(t){return t.value})).concat([1])),r=Math.max(4,(88-2*(t.length-1))/t.length);t.forEach(function(t,i){var o=t.value/n*72,a=8+i*(r+2),l=90-o;e.svgEl.appendChild(e.createSvgNode("rect",{x:a,y:l,width:r,height:o,rx:1.5,fill:e.resolveColor(i),class:"holi-chart-bar","data-point-index":i}))})}},{key:"drawPie",value:function(t,e){var n=this,r=t.reduce(function(t,e){return t+e.value},0);if(!(r<=0)){var i=-Math.PI/2;t.forEach(function(t,e){var o=t.value/r*Math.PI*2,a=i+o,l=n.describeArc(50,50,36,i,a);n.svgEl.appendChild(n.createSvgNode("path",{d:l,fill:n.resolveColor(e),class:"holi-chart-slice","data-point-index":e})),i=a}),e&&this.svgEl.appendChild(this.createSvgNode("circle",{cx:50,cy:50,r:19,class:"holi-chart-hole"}))}}},{key:"calculateCartesianPoints",value:function(t){var e=Math.max.apply(Math,i(t.map(function(t){return t.value})).concat([1])),n=t.length>1?84/(t.length-1):0;return t.map(function(t,r){return{x:10+r*n,y:90-t.value/e*76,index:r}})}},{key:"describeArc",value:function(t,e,n,r,i){var o=t+n*Math.cos(r),a=e+n*Math.sin(r),l=t+n*Math.cos(i),s=e+n*Math.sin(i),u=i-r>Math.PI?1:0;return"M ".concat(t," ").concat(e," L ").concat(o," ").concat(a," A ").concat(n," ").concat(n," 0 ").concat(u," 1 ").concat(l," ").concat(s," Z")}},{key:"drawLegend",value:function(t){var e=this;t.forEach(function(t,n){var r=document.createElement("li");r.className="holi-chart-legend-item",r.setAttribute("data-point-index",String(n));var i=document.createElement("span");i.className="holi-chart-legend-swatch",i.style.backgroundColor=e.resolveColor(n);var o=document.createElement("span");o.className="holi-chart-legend-label",o.textContent="".concat(t.label," (").concat(t.value,")"),r.append(i,o),e.legendEl.appendChild(r)})}},{key:"createSvgNode",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=document.createElementNS("http://www.w3.org/2000/svg",t);return Object.entries(e).forEach(function(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){u=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(t,e)||o(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,2),r=e[0],i=e[1];null!=i&&n.setAttribute(r,String(i))}),n}},{key:"resolveColor",value:function(t){return this.colors.length?this.colors[t%this.colors.length]:"#2563eb"}},{key:"setType",value:function(t){this.type=this.resolveType(t),this.draw()}},{key:"update",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n.type&&(this.type=this.resolveType(n.type)),null!=n.height&&(this.height=this.parseNumber(n.height,this.height),null===(t=this.element)||void 0===t||t.style.setProperty("--chart-height","".concat(Math.max(120,this.height),"px"))),n.colors&&(this.colors=this.resolveColors(n.colors)),null!=n.title&&(this.title=String(n.title||"").trim(),this.titleEl&&(this.titleEl.textContent=this.title,this.titleEl.hidden=!this.title)),null!=n.showLegend&&(this.showLegend=this.parseBoolean(n.showLegend,this.showLegend)),this.data=this.normalizeData(e),this.draw(),this.dispatchEvent("chartupdate",{type:this.type,count:this.data.length})}},{key:"destroy",value:function(){var t;null===(t=this.svgEl)||void 0===t||t.removeEventListener("click",this.boundClick),p(e,"destroy",this,3)([])}}],a=[{key:"selector",get:function(){return"chart"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"chart"}}],r&&d(n.prototype,r),a&&d(n,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,a,s,u}(n(812).Component);g=k,S="chart-template",(w=b(w="templateId"))in g?Object.defineProperty(g,w,{value:S,enumerable:!0,configurable:!0,writable:!0}):g[w]=S,"undefined"!=typeof window&&(window.ChartComponent=k)},673(t,e,n){"use strict";n.r(e),n.d(e,{CheckboxGroupComponent:()=>k});var r=n(812),i=n(853);function o(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function s(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,c=Object.create(s.prototype);return u(c,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var a={};function l(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(u(e={},r,function(){return this}),e),h=d.prototype=l.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,u(h,"constructor",d),u(d,"constructor",c),c.displayName="GeneratorFunction",u(d,i,"GeneratorFunction"),u(h),u(h,i,"Generator"),u(h,r,function(){return this}),u(h,"toString",function(){return"[object Generator]"}),(s=function(){return{w:o,m:p}})()}function u(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}u=function(t,e,n,r){function o(e,n){u(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},u(t,e,n,r)}function c(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,b(r.key),r)}}function f(t,e,n){return e=y(e),function(t,e){if(e&&("object"==l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,h()?Reflect.construct(e,n||[],y(t).constructor):e.apply(t,n))}function h(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(h=function(){return!!t})()}function p(t,e,n,r){var i=v(y(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function v(){return v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=y(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},v.apply(null,arguments)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}function b(t){var e=function(t){if("object"!=l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==l(e)?e:e+""}var g,w,S,k=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=f(this,e,[t,r])).templateId=e.templateId,n.config={legend:n.container.getAttribute("legend")||"",name:n.container.getAttribute("name")||"",type:n.container.getAttribute("type")||"checkbox",options:n.parseOptions(n.container.getAttribute("data-options"))},n.state={legend:n.config.legend,name:n.config.name,type:n.config.type,options:n.config.options,values:[]},n.boundChange=function(){return n.syncState()},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&m(t,e)}(e,t),n=e,r=[{key:"parseOptions",value:function(t){if(!t)return[];try{var e=JSON.parse(t);return Array.isArray(e)?e:[]}catch(t){return[]}}},{key:"init",value:function(){this.validateStructure(),this.render()}},{key:"render",value:(u=s().m(function t(){var n,r;return s().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,p(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-checkbox-group"),this.optionsHost=this.container.querySelector('[data-role="options"]'),this.projectSlot("legend"),this.projectSlot("options"),this.projectSlot("actions"),!(null===(n=this.optionsHost)||void 0===n?void 0:n.querySelector('input[type="checkbox"], input[type="radio"]'))&&this.config.options.length>0&&this.renderConfiguredOptions(),this.applyNameToInputs(),this.syncState(),null===(r=this.element)||void 0===r||r.addEventListener("change",this.boundChange);case 2:return t.a(2)}},t,this)}),h=function(){var t=this,e=arguments;return new Promise(function(n,r){var i=u.apply(t,e);function o(t){c(i,n,r,o,a,"next",t)}function a(t){c(i,n,r,o,a,"throw",t)}o(void 0)})},function(){return h.apply(this,arguments)})},{key:"projectSlot",value:function(t){var e=this.container.querySelector('slot[name="'.concat(t,'"]'));if(e){var n=Array.from(this.container.querySelectorAll('[slot="'.concat(t,'"]')));if(n.length){var r=document.createDocumentFragment();n.forEach(function(t){t.removeAttribute("slot"),r.appendChild(t)}),e.replaceWith(r)}}}},{key:"renderConfiguredOptions",value:function(){var t=this;if(this.optionsHost){var e=document.createDocumentFragment();this.config.options.forEach(function(n,r){var i=n&&"object"===l(n)?n:{value:n,label:String(n)},o=document.createElement("label");o.className="holi-checkbox-option";var a=document.createElement("input");a.type="radio"===t.config.type?"radio":"checkbox",a.value=null==i.value?"":String(i.value),a.checked=!!i.checked,a.name=t.config.name||"holi-checkbox-".concat(r);var s=document.createElement("span");s.textContent=null==i.label?String(i.value||""):String(i.label),o.append(a,s),e.appendChild(o)}),this.optionsHost.appendChild(e)}}},{key:"applyNameToInputs",value:function(){var t=this;this.optionsHost&&this.config.name&&this.optionsHost.querySelectorAll('input[type="checkbox"], input[type="radio"]').forEach(function(e){e.name||(e.name=t.config.name)})}},{key:"syncState",value:function(){if(this.optionsHost){var t=Array.from(this.optionsHost.querySelectorAll('input[type="checkbox"], input[type="radio"]')).filter(function(t){return t.checked}).map(function(t){return t.value});this.state.values=t,this.dispatchEvent("checkboxchange",{values:o(this.state.values)})}}},{key:"value",get:function(){return o(this.state.values)}},{key:"validate",value:function(){return!0}},{key:"destroy",value:function(){var t;null===(t=this.element)||void 0===t||t.removeEventListener("change",this.boundChange),p(e,"destroy",this,3)([])}}],a=[{key:"selector",get:function(){return"holi-checkbox"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"checkbox-group"}},{key:"getNativeSelectors",value:function(){return['input[type="checkbox"][component="checkbox"]','input[type="checkbox"][role="checkbox"]']}},{key:"prepareHost",value:function(t){if(!(t instanceof HTMLInputElement)||"checkbox"!==t.type)return t;var e=document.createElement("section");(0,i.ts)(t,e,{exclude:["component","role","type","checked","value"]}),e.setAttribute("component","checkbox-group"),e.setAttribute("type","checkbox");var n=t.getAttribute("id");n&&(e.setAttribute("id",n),t.removeAttribute("id"));var r=(0,i.VC)(t);return(r===t.parentElement?r:t).replaceWith(e),r&&e.appendChild(r),e}}],r&&d(n.prototype,r),a&&d(n,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,a,u,h}(r.Component);g=k,S="checkbox-group-template",(w=b(w="templateId"))in g?Object.defineProperty(g,w,{value:S,enumerable:!0,configurable:!0,writable:!0}):g[w]=S,"undefined"!=typeof window&&(window.CheckboxGroupComponent=k)},812(t,e,n){"use strict";n.r(e),n.d(e,{Component:()=>M});var r=n(904),i=n(573),o=n(458);function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach(function(e){s(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function s(t,e,n){return(e=h(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){u=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return c(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,h(r.key),r)}}function h(t){var e=function(t){if("object"!=d(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==d(e)?e:e+""}var p=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.component=e,this.container=(null==e?void 0:e.container)||null,this.stateKey=this.resolveStateKey(),this.stateStoreId=this.resolveStateStoreId(),this.stateMap={},this.stateHydratedFromAttr=!1,this.stateInternal={},this.isPublishingState=!1,this.isApplyingExternalState=!1,this.isApplyingMappedState=!1,this.stateUnsubscribe=null,this.stateMapUnsubscribers=[],this.stateProxyCache=new WeakMap},e=[{key:"resolveStateKey",value:function(){var t,e,n,r,i,o,a,l,s,u=null===(t=this.container)||void 0===t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"data-state-key");if(u)return String(u).trim();var c,d,f,h=(null===(n=this.container)||void 0===n||null===(r=n.getAttribute)||void 0===r?void 0:r.call(n,"component"))||(null===(i=this.container)||void 0===i||null===(o=i.getAttribute)||void 0===o?void 0:o.call(i,"role"))||((f=String((null===(c=this.container)||void 0===c?void 0:c.tagName)||"").toLowerCase()).startsWith("holi-")?f.slice(5):f||((null===(d=this.component)||void 0===d||null===(d=d.constructor)||void 0===d?void 0:d.name)||"component").replace(/component$/i,"").toLowerCase()),p=(null===(a=this.container)||void 0===a||null===(l=a.getAttribute)||void 0===l?void 0:l.call(a,"data-component-id"))||(null===(s=this.container)||void 0===s?void 0:s.id)||"component";return"".concat(String(h||"component").trim().toLowerCase(),".").concat(String(p).trim())}},{key:"resolveStateStoreId",value:function(){var t,e,n=null===(t=this.container)||void 0===t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"data-state-store");return n?String(n).trim():o.T.defaultStoreId}},{key:"install",value:function(){var t=this;this.container&&(this.stateMap=this.resolveStateMap(),Object.defineProperty(this.component,"state",{get:function(){return t.stateInternal},set:function(e){var n=e&&"object"===d(e)?e:{};t.stateInternal=t.createStateProxy(n),t.hydrateStateFromAttribute(),t.publishStateSnapshot()},configurable:!0,enumerable:!0}),this.component.state={},this.stateUnsubscribe=o.T.subscribe(this.stateKey,function(e){if(!t.isPublishingState&&!t.isApplyingExternalState&&e&&"object"===d(e)){t.isApplyingExternalState=!0;try{Object.keys(e).forEach(function(n){t.stateInternal[n]=e[n]})}finally{t.isApplyingExternalState=!1}}},this.stateStoreId),this.bindMappedStateSubscriptions())}},{key:"uninstall",value:function(){var t;null===(t=this.stateUnsubscribe)||void 0===t||t.call(this),this.stateUnsubscribe=null,this.stateMapUnsubscribers.forEach(function(t){return null==t?void 0:t()}),this.stateMapUnsubscribers=[]}},{key:"resolveStateMap",value:function(){var t,e,n=null===(t=this.container)||void 0===t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"data-state-map");if(!n)return{};try{var r=JSON.parse(n);if(!r||"object"!==d(r))return{};var i={};return Object.keys(r).forEach(function(t){var e=String(t||"").trim(),n=String(r[t]||"").trim();e&&n&&(i[e]=n)}),i}catch(t){return{}}}},{key:"bindMappedStateSubscriptions",value:function(){var t=this;this.stateMapUnsubscribers.forEach(function(t){return null==t?void 0:t()}),this.stateMapUnsubscribers=[],Object.entries(this.stateMap).forEach(function(e){var n=u(e,2),r=n[0],i=n[1],a=o.T.subscribe(i,function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(t.isPublishingState||t.isApplyingExternalState||t.isApplyingMappedState||void 0===e&&null!=n&&n.initial)){t.isApplyingMappedState=!0;try{t.setStatePath(r,e)}finally{t.isApplyingMappedState=!1}}},t.stateStoreId);t.stateMapUnsubscribers.push(a)})}},{key:"hydrateStateFromAttribute",value:function(){var t,e,n=this;if(!this.stateHydratedFromAttr){this.stateHydratedFromAttr=!0;var r=null===(t=this.container)||void 0===t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"state");if(r)try{var i=JSON.parse(r);if(!i||"object"!==d(i))return;var o=this.resolveStateExpressions(i);Object.keys(o).forEach(function(t){n.stateInternal[t]=o[t]})}catch(t){}}}},{key:"resolveStateExpressions",value:function(t){var e=this;if(Array.isArray(t))return t.map(function(t){return e.resolveStateExpressions(t)});if(t&&"object"===d(t)){var n={};return Object.keys(t).forEach(function(r){n[r]=e.resolveStateExpressions(t[r])}),n}if("string"!=typeof t)return t;var r=t.trim().match(/^@\{(.+)\}$/);if(!r)return t;var i=r[1].trim(),o=l(l(l({},"undefined"!=typeof window&&window.appState||{}),"undefined"!=typeof window&&window.pageContext||{}),this.stateInternal);try{var a;if("function"==typeof(null===(a=this.component)||void 0===a?void 0:a.evaluateExpression))return this.component.evaluateExpression(i,o)}catch(t){}return t}},{key:"createStateProxy",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(null==t||"object"!==d(t))return t;if(this.stateProxyCache.has(t))return this.stateProxyCache.get(t);var r=new Proxy(t,{get:function(t,r){var i=t[r];return null!=i&&"object"===d(i)?e.createStateProxy(i,n.concat(String(r))):i},set:function(t,r,i){t[r]=i;var o=n.concat(String(r)).join(".");return e.reflectStateValue(o,i),e.isApplyingExternalState||e.isApplyingMappedState||e.publishStateChange(o,i),!0},deleteProperty:function(t,r){if(!(r in t))return!0;delete t[r];var i=n.concat(String(r)).join(".");return e.isApplyingExternalState||e.isApplyingMappedState||e.publishStateChange(i,void 0),!0}});return this.stateProxyCache.set(t,r),r}},{key:"setStatePath",value:function(t,e){var n=String(t||"").replace(/\[(\w+)\]/g,".$1").split(".").filter(Boolean);if(n.length){for(var r=this.stateInternal,i=0;i<n.length-1;i+=1){var o=n[i];null!=r[o]&&"object"===d(r[o])||(r[o]={}),r=r[o]}r[n[n.length-1]]=e}}},{key:"getStatePath",value:function(t){return String(t||"").replace(/\[(\w+)\]/g,".$1").split(".").filter(Boolean).reduce(function(t,e){return null==t?void 0:t[e]},this.stateInternal)}},{key:"resolveMappedPath",value:function(t){var e=String(t||"").trim();if(!e)return"";for(var n=Object.entries(this.stateMap),r=0;r<n.length;r+=1){var i=u(n[r],2),o=i[0],a=i[1];if(e===o)return a;if(e.startsWith("".concat(o,"."))){var l=e.slice(o.length);return"".concat(a).concat(l)}}return""}},{key:"cloneSerializable",value:function(t){return this.snapshotValue(t)}},{key:"snapshotValue",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new WeakSet;if(null==t||"object"!==d(t))return t;if(n.has(t))return null;if(n.add(t),Array.isArray(t))return t.map(function(t){return e.snapshotValue(t,n)});var r={};return Object.keys(t).forEach(function(i){r[i]=e.snapshotValue(t[i],n)}),r}},{key:"toKebabCase",value:function(t){return String(t||"").replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[_\s]+/g,"-").toLowerCase()}},{key:"reflectStateValue",value:function(t,e){var n,r=String(t||"").trim();if(r&&!r.includes(".")){var i,o,a=this.toKebabCase(r);if(null==e)null===(i=this.container)||void 0===i||null===(o=i.removeAttribute)||void 0===o||o.call(i,a);else if("object"!==d(e)){var l,s;null===(l=this.container)||void 0===l||null===(s=l.setAttribute)||void 0===s||s.call(l,a,String(e))}r in this.component&&"function"!=typeof this.component[r]&&(this.component[r]=e),"function"==typeof(null===(n=this.component)||void 0===n?void 0:n.onStateReflect)&&this.component.onStateReflect(r,e)}}},{key:"publishStateSnapshot",value:function(){var t=this,e=this.cloneSerializable(this.stateInternal||{});this.shouldDispatchPpr("",e,!0)&&this.dispatchPprChange("",e,!0),this.isPublishingState=!0;try{o.T.publish(this.stateKey,e,this.stateStoreId),Object.entries(this.stateMap).forEach(function(e){var n=u(e,2),r=n[0],i=n[1],a=t.cloneSerializable(t.getStatePath(r));void 0!==a&&o.T.publish(i,a,t.stateStoreId)})}finally{this.isPublishingState=!1}}},{key:"publishStateChange",value:function(t,e){var n=String(t||"").trim();if(n){this.shouldDispatchPpr(n,e,!1)&&this.dispatchPprChange(n,e,!1),this.isPublishingState=!0;try{o.T.publish("".concat(this.stateKey,".").concat(n),this.cloneSerializable(e),this.stateStoreId);var r=this.resolveMappedPath(n);r&&o.T.publish(r,this.cloneSerializable(e),this.stateStoreId)}finally{this.isPublishingState=!1}}else this.publishStateSnapshot()}},{key:"dispatchPprChange",value:function(t,e,n){this.container instanceof Element&&this.container.dispatchEvent(new CustomEvent("holi:ppr-change",{detail:{component:this.component,path:t,value:this.cloneSerializable(e),initial:!!n},bubbles:!0}))}},{key:"shouldDispatchPpr",value:function(t,e,n){var r,i;return!(null!==(r=this.component)&&void 0!==r&&r.isApplyingDependencyUpdate||"function"==typeof(null===(i=this.component)||void 0===i?void 0:i.shouldDispatchPprChange)&&!1===this.component.shouldDispatchPprChange(t,e,n))}}],e&&f(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function v(t){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v(t)}function y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function m(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?y(Object(n),!0).forEach(function(e){g(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function b(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,w(r.key),r)}}function g(t,e,n){return(e=w(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function w(t){var e=function(t){if("object"!=v(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=v(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==v(e)?e:e+""}var S=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.component=e,this.container=(null==e?void 0:e.container)||null,this.boundDocumentChange=function(t){return n.handleDocumentChange(t)},this.boundOwnChange=function(t){return n.handleOwnChange(t)},this.initialSyncTimer=null}return e=t,(n=[{key:"install",value:function(){this.container instanceof Element&&(this.ensureComponentId(),this.hasInboundSubscriptions()&&(document.addEventListener("holi:ppr-change",this.boundDocumentChange),this.scheduleInitialSync()),this.hasOutboundTargets()&&this.container.addEventListener("holi:ppr-change",this.boundOwnChange))}},{key:"uninstall",value:function(){var t;this.initialSyncTimer&&(clearTimeout(this.initialSyncTimer),this.initialSyncTimer=null),document.removeEventListener("holi:ppr-change",this.boundDocumentChange),null===(t=this.container)||void 0===t||t.removeEventListener("holi:ppr-change",this.boundOwnChange)}},{key:"ensureComponentId",value:function(){this.container&&!this.container.getAttribute("data-component-id")&&this.container.setAttribute("data-component-id","holi-".concat(t.nextAutoId++))}},{key:"scheduleInitialSync",value:function(){var t=this;this.initialSyncTimer&&clearTimeout(this.initialSyncTimer),this.initialSyncTimer=setTimeout(function(){t.initialSyncTimer=null,t.performInitialSync()},0)}},{key:"performInitialSync",value:function(){var e=this;if(this.container instanceof Element){var n=this.readFirstAttr(t.sourceAttrNames);this.resolveElements(n).forEach(function(t){if(t instanceof Element&&t!==e.container){var n=r.Z.getElementInstances(t)[0]||null,i="function"==typeof(null==n?void 0:n.getStateSnapshot)?n.getStateSnapshot():{};e.applyInboundUpdate({sourceElement:t,sourceComponent:n,path:"",value:i,snapshot:i,initial:!0})}})}}},{key:"hasInboundSubscriptions",value:function(){return!!this.readFirstAttr(t.sourceAttrNames)}},{key:"hasOutboundTargets",value:function(){return!!this.readFirstAttr(t.targetAttrNames)}},{key:"readFirstAttr",value:function(t){for(var e=0;e<t.length;e+=1){var n,r,i=null===(n=this.container)||void 0===n||null===(r=n.getAttribute)||void 0===r?void 0:r.call(n,t[e]);if(i&&String(i).trim())return String(i).trim()}return""}},{key:"handleDocumentChange",value:function(t){var e=t.target;if(e instanceof Element&&e!==this.container&&this.matchesInboundSource(e)){var n=t.detail||{},i=r.Z.getElementInstances(e),o=n.component||i[0]||null,a="function"==typeof(null==o?void 0:o.getStateSnapshot)?o.getStateSnapshot():{};this.applyInboundUpdate({sourceElement:e,sourceComponent:o,path:n.path||"",value:n.value,snapshot:a,initial:!1})}}},{key:"handleOwnChange",value:function(e){var n;if(e.target===this.container){var r=e.detail||{};this.applyTargets(this.readFirstAttr(t.targetAttrNames),{sourceElement:this.container,sourceComponent:this.component,path:r.path||"",value:r.value,snapshot:"function"==typeof(null===(n=this.component)||void 0===n?void 0:n.getStateSnapshot)?this.component.getStateSnapshot():{},initial:!!r.initial})}}},{key:"matchesInboundSource",value:function(e){var n=this.readFirstAttr(t.sourceAttrNames);return this.resolveElements(n).includes(e)}},{key:"applyInboundUpdate",value:function(e){var n,r;null===(n=this.component)||void 0===n||null===(r=n.recordDependencySnapshot)||void 0===r||r.call(n,e);var i=this.readFirstAttr(t.targetAttrNames)||"@this";this.applyTargets(i,e)}},{key:"getElementAliases",value:function(t){if(!(t instanceof Element))return[];var e=[];return[String(t.id||"").trim(),String(t.getAttribute("data-ppr-id")||"").trim(),String(t.getAttribute("data-component-id")||"").trim(),String(t.getAttribute("component")||t.getAttribute("role")||t.getAttribute("data-holi-component-class")||t.tagName).trim().toLowerCase()].forEach(function(t){t&&!e.includes(t)&&e.push(t)}),e}},{key:"applyTargets",value:function(t,e){var n=this,r=this.resolveElements(t),i=new Set;r.forEach(function(t){t instanceof Element&&!i.has(t)&&(i.add(t),n.updateTarget(t,e))})}},{key:"updateTarget",value:function(t,e){var n=r.Z.getElementInstances(t)[0]||null,i=m(m({},e),{},{targetElement:t,targetComponent:n,subscriberComponent:this.component});t.dispatchEvent(new CustomEvent("holi:ppr-update",{detail:i,bubbles:!0})),n&&!n.isDestroyed&&("function"!=typeof n.receiveDependencyUpdate?"function"==typeof n.handlePprUpdate&&n.handlePprUpdate(i):n.receiveDependencyUpdate(i))}},{key:"resolveElements",value:function(t){var e=this,n=this.tokenize(t),r=[],i=new Set;return n.forEach(function(t){e.resolveToken(t).forEach(function(t){t instanceof Element&&!i.has(t)&&(i.add(t),r.push(t))})}),r}},{key:"tokenize",value:function(t){return String(t||"").split(/[\s,]+/).map(function(t){return t.trim()}).filter(Boolean)}},{key:"resolveToken",value:function(t){if(!t||"@none"===t)return[];if(!(this.container instanceof Element))return[];if("@this"===t)return[this.container];if("@parent"===t){var e=this.findClosestComponentHost(this.container.parentElement);return e?[e]:[]}if("@form"===t){var n=this.container.closest('form, holi-form, [component="form-shell"], [role="form-shell"]');return n?[n]:[]}if("@all"===t)return r.Z.collectInstances(document).map(function(t){return null==t?void 0:t.container}).filter(function(t){return t instanceof Element});if("@root"===t)return[document.documentElement];if(t.startsWith("#")){var i=document.querySelector(t);return i?[i]:[]}var o=document.getElementById(t);if(o)return[o];var a=document.querySelector('[data-component-id="'.concat(t,'"], [data-ppr-id="').concat(t,'"]'));if(a)return[a];var l=this.container.closest("[data-component-id], form, body")||document;if(l.querySelectorAll){var s=Array.from(l.querySelectorAll('[id="'.concat(t,'"], [data-component-id="').concat(t,'"], [data-ppr-id="').concat(t,'"]')));if(s.length)return s}return[]}},{key:"findClosestComponentHost",value:function(t){for(var e=t;e instanceof Element;){if(this.isComponentHost(e))return e;e=e.parentElement}return null}},{key:"isComponentHost",value:function(e){return e instanceof Element&&(r.Z.getElementInstances(e).length>0||e.matches(t.componentSelectors))}}])&&b(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();g(S,"nextAutoId",1),g(S,"sourceAttrNames",["data-ppr-listen","data-ppr-source"]),g(S,"targetAttrNames",["data-ppr-render","data-ppr-update","render","update"]),g(S,"componentSelectors",["[data-holi-component-class]","[component]","[role]","dropdown","region","tabs","holi-form","holi-input","holi-select"].join(", "));var k=n(531);function E(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function O(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return C(u,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),u}var a={};function l(){}function s(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(C(e={},r,function(){return this}),e),d=u.prototype=l.prototype=Object.create(c);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,C(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=u,C(d,"constructor",u),C(u,"constructor",s),s.displayName="GeneratorFunction",C(u,i,"GeneratorFunction"),C(d),C(d,i,"Generator"),C(d,r,function(){return this}),C(d,"toString",function(){return"[object Generator]"}),(O=function(){return{w:o,m:f}})()}function C(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}C=function(t,e,n,r){function o(e,n){C(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},C(t,e,n,r)}function A(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function P(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){A(o,r,i,a,l,"next",t)}function l(t){A(o,r,i,a,l,"throw",t)}a(void 0)})}}function j(t){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},j(t)}function T(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function x(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?T(Object(n),!0).forEach(function(e){N(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function L(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,D(r.key),r)}}function I(){return I="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=R(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},I.apply(null,arguments)}function R(t){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},R(t)}function N(t,e,n){return(e=D(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function D(t){var e=function(t){if("object"!=j(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=j(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==j(e)?e:e+""}var M=function(){function t(e){var n,i,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.element=null,this.container=e,this.children=new Map,this.isDestroyed=!1,this.ppr={},this.pprMeta={},Object.assign(this,a),this.container instanceof Element&&!this.container.getAttribute("data-component-id")&&this.container.setAttribute("data-component-id","holi-".concat(t.nextComponentId++)),this.instanceKey=this.constructor.name.toLowerCase(),this.instanceClassAttr="data-holi-component-class",null===(n=this.container)||void 0===n||null===(i=n.setAttribute)||void 0===i||i.call(n,this.instanceClassAttr,this.constructor.name);var l=null===(o=this.container)||void 0===o?void 0:o[this.instanceKey];if(l&&l!==this)try{delete this.container[this.instanceKey]}catch(t){}Object.defineProperty(this.container,this.instanceKey,{value:this,writable:!1,configurable:!0}),this.stateBridge=new p(this),this.stateBridge.install(),this.pprBridge=new S(this),this.pprBridge.install(),r.Z.registerInstance(this.container,this)}return e=t,n=[{key:"init",value:function(){var e;if(!this.initializing){this.initializing=!0;var n,r,i,o=performance.now();null===(n=t,r=this,e="function"==typeof(i=I(R(1&3?n.prototype:n),"init",r))?function(t){return i.apply(r,t)}:i)||void 0===e||e([]),this.validateStructure(),performance.now()-o>100&&console.warn("Component init slow:",this.constructor.name),this.initializing=!1}}},{key:"parseValidators",value:function(t){return i.D.parseList(t)}},{key:"runValidator",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return i.D.validateToken(t,e,x({component:this},n))}},{key:"toCamelCase",value:function(t){return String(t||"").replace(/[-_\s]+(.)?/g,function(t,e){return e?e.toUpperCase():""}).replace(/^(.)/,function(t){return t.toLowerCase()})}},{key:"onStateReflect",value:function(t,e){var n=String(t||"").trim();if(n&&!n.includes(".")&&!this.isReflectingState){this.isReflectingState=!0;try{var r=this.toCamelCase(n),i="".concat(r,"Text");if(r in this&&"function"!=typeof this[r]&&(this[r]=e),i in this&&"function"!=typeof this[i]&&(this[i]=null==e?"":String(e)),this.config&&"object"===j(this.config)&&(Object.prototype.hasOwnProperty.call(this.config,n)?this.config[n]=e:Object.prototype.hasOwnProperty.call(this.config,r)&&(this.config[r]=e)),"function"==typeof this.applyStateUpdate)return void this.applyStateUpdate(r,e);"function"==typeof this.applyLayoutState&&this.applyLayoutState(),"function"==typeof this.applyDialogContent&&this.applyDialogContent(),"function"==typeof this.updateView&&this.updateView()}finally{this.isReflectingState=!1}}}},{key:"render",value:(l=P(O().m(function t(){var e;return O().w(function(t){for(;;)switch(t.n){case 0:if((e=k._.getTemplate(this.templateId))&&e.content){t.n=1;break}throw new Error('Template "'.concat(this.templateId,'" not found'));case 1:return this.fragment=e.content.cloneNode(!0),this.populateSlots(this.fragment),this.bindAttributes(this.fragment),this.container.appendChild(this.fragment),t.n=2,this.createChildren();case 2:this.syncChildren();case 3:return t.a(2)}},t,this)})),function(){return l.apply(this,arguments)})},{key:"populateSlots",value:function(t){var e=this;t.querySelectorAll("[slot]").forEach(function(t){var n=e.container.querySelector('[slot="'.concat(t.name,'"]'));n&&t.appendChild(n)})}},{key:"bindAttributes",value:function(t){var e=this.getBindingContext();this.applyBindings(t,e)}},{key:"refresh",value:function(){this.refreshChildren()}},{key:"handlePprUpdate",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.resolvePprHandler();return e?(e(t),!0):(this.reportMissingPprContract(t),!1)}},{key:"receiveDependencyUpdate",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.recordDependencySnapshot(t),this.isApplyingDependencyUpdate=!0;try{return this.handlePprUpdate(t)}finally{this.isApplyingDependencyUpdate=!1}}},{key:"recordDependencySnapshot",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=null==e?void 0:e.sourceElement,r=null==e?void 0:e.snapshot;if(n instanceof Element){this.ppr&&"object"===j(this.ppr)||(this.ppr={});var i=this.resolveDependencyAliases(n);i.forEach(function(e){t.ppr[e]=r}),this.pprMeta={source:i[0]||"",path:(null==e?void 0:e.path)||"",initial:!(null==e||!e.initial)}}}},{key:"resolveDependencyAliases",value:function(t){if(!(t instanceof Element))return[];var e=[];return[t.id,t.getAttribute("data-ppr-id"),t.getAttribute("data-component-id"),t.getAttribute("component"),t.getAttribute("role"),t.getAttribute("data-holi-component-class"),String(t.tagName||"").toLowerCase()].forEach(function(t){var n=String(t||"").trim(),r=n.toLowerCase();[n,r].forEach(function(t){t&&!e.includes(t)&&e.push(t)})}),e}},{key:"resolvePprHandler",value:function(){for(var e,n=Array.isArray(null===(e=this.constructor)||void 0===e?void 0:e.pprHookNames)?this.constructor.pprHookNames:t.pprHookNames,r=0;r<n.length;r+=1){var i=this[n[r]];if("function"==typeof i)return i.bind(this)}return null}},{key:"getPprMissingHookPolicy",value:function(){var t,e,n=null===(t=this.container)||void 0===t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"data-ppr-missing-hook-policy"),r="undefined"!=typeof window?window.HoliPprMissingHookPolicy:"",i=String(n||r||"warn").trim().toLowerCase();return"throw"===i||"ignore"===i?i:"warn"}},{key:"reportMissingPprContract",value:function(){var e,n,r,i,o,a,l,s,u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=this.getPprMissingHookPolicy();if("ignore"!==c){var d=(null===(e=this.container)||void 0===e?void 0:e.id)||(null===(n=this.container)||void 0===n||null===(r=n.getAttribute)||void 0===r?void 0:r.call(n,"data-component-id"))||(null===(i=this.constructor)||void 0===i?void 0:i.name)||"component",f=(null==u||null===(o=u.sourceElement)||void 0===o?void 0:o.id)||(null==u||null===(a=u.sourceElement)||void 0===a||null===(l=a.getAttribute)||void 0===l?void 0:l.call(a,"data-component-id"))||(null==u||null===(s=u.sourceComponent)||void 0===s||null===(s=s.constructor)||void 0===s?void 0:s.name)||"unknown-source",h='PPR target "'.concat(d,'" cannot handle updates from "').concat(f,'". Implement one of: ').concat(t.pprHookNames.join(", "));if("throw"===c)throw new Error(h);console.warn(h,{component:this,payload:u})}}},{key:"createChildren",value:(a=P(O().m(function t(){var e;return O().w(function(t){for(;;)switch(t.n){case 0:if((e=this.element||this.container)instanceof Element){t.n=1;break}return t.a(2);case 1:r.Z.initAll(e,{includeRoleSelectors:!1});case 2:return t.a(2)}},t,this)})),function(){return a.apply(this,arguments)})},{key:"syncChildren",value:function(){var t=this,e=this.element||this.container;if(e instanceof Element){var n=r.Z.collectInstances(e,!0).filter(function(e){return e&&e!==t&&!e.isDestroyed});this.children.clear(),n.forEach(function(e,n){var r,i,o=e.container,a=(null==o?void 0:o.id)||(null==o||null===(r=o.getAttribute)||void 0===r?void 0:r.call(o,"data-component-id"))||"child-".concat(n),l="".concat((null===(i=e.constructor)||void 0===i?void 0:i.name)||"Component",":").concat(a,":").concat(n);t.children.set(l,e)})}}},{key:"refreshChildren",value:function(){this.syncChildren(),this.children.forEach(function(t){"function"==typeof t.refresh&&t.refresh()})}},{key:"destroy",value:function(){var t,e,n,i,o,a,l;if(null===(t=this.pprBridge)||void 0===t||null===(e=t.uninstall)||void 0===e||e.call(t),null===(n=this.stateBridge)||void 0===n||null===(i=n.uninstall)||void 0===i||i.call(n),this.children.forEach(function(t){return t.destroy()}),this.children.clear(),null===(o=this.element)||void 0===o||o.remove(),this.isDestroyed=!0,this.dispatchEvent("destroy",{component:this}),r.Z.unregisterInstance(this.container,this),(null===(a=this.container)||void 0===a||null===(l=a.getAttribute)||void 0===l?void 0:l.call(a,this.instanceClassAttr))===this.constructor.name&&this.container.removeAttribute(this.instanceClassAttr),this.container&&this.instanceKey&&this.container[this.instanceKey]===this)try{delete this.container[this.instanceKey]}catch(t){}}},{key:"registerChild",value:function(t,e){var n=this;this.children.set(t,e),e.on("destroy",function(){return n.children.delete(t)})}},{key:"on",value:function(t,e){var n;null===(n=this.element)||void 0===n||n.addEventListener(t,e)}},{key:"dispatchEvent",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};null===(e=this.element)||void 0===e||e.dispatchEvent(new CustomEvent(t,{detail:n}))}},{key:"validateStructure",value:function(){if(!this.templateId)throw new Error("".concat(this.constructor.name," must define templateId"))}},{key:"getBindingContext",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return x(x(x(x(x({},window.appState||{}),window.pageContext||{}),this),this.state||{}),{},{data:this.data,ppr:this.ppr||{},pprMeta:this.pprMeta||{}},t)}},{key:"getStateSnapshot",value:function(){if(this.stateBridge&&"function"==typeof this.stateBridge.cloneSerializable)return this.stateBridge.cloneSerializable(this.state||{});try{return JSON.parse(JSON.stringify(this.state||{}))}catch(t){return this.state||{}}}},{key:"applyBindings",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.processRepeats(t,e),this.processConditionals(t,e),this.processTextInterpolation(t,e),this.processAttributeInterpolation(t,e)}},{key:"processRepeats",value:function(t,e){var n=this;Array.from(t.querySelectorAll("[data-repeat]")).forEach(function(t){if(t.parentNode){var r=n.extractExpression(t.getAttribute("data-repeat")),i=n.evaluateExpression(r,e),o=Array.isArray(i)?i:[],a=t.getAttribute("data-for")||"item";o.forEach(function(r,i){var o=t.cloneNode(!0);o.removeAttribute("data-repeat"),o.removeAttribute("data-for");var l=n.getBindingContext(x(x({},e),{},N(N(N({},a,r),"item",r),"index",i)));n.applyBindings(o,l),t.parentNode.insertBefore(o,t)}),t.remove()}})}},{key:"processConditionals",value:function(t,e){var n=this;Array.from(t.querySelectorAll("[data-if], [data-show], [data-open], [visible]")).forEach(function(t){if(t.hasAttribute("data-if")){var r=n.extractExpression(t.getAttribute("data-if"));if(!n.evaluateExpression(r,e))return void t.remove()}if(t.hasAttribute("data-show")){var i=n.extractExpression(t.getAttribute("data-show")),o=!!n.evaluateExpression(i,e);t.hidden=!o}if(t.hasAttribute("visible")){var a=n.extractExpression(t.getAttribute("visible")),l=!!n.evaluateExpression(a,e);t.hidden=!l}if(t.hasAttribute("data-open")){var s=n.extractExpression(t.getAttribute("data-open"));n.evaluateExpression(s,e)?t.setAttribute("open",""):t.removeAttribute("open")}})}},{key:"processTextInterpolation",value:function(t,e){for(var n=this,r=document.createTreeWalker(t,NodeFilter.SHOW_TEXT),i=[],o=r.nextNode();o;)i.push(o),o=r.nextNode();i.forEach(function(t){var r=t.textContent;if(r&&-1!==r.indexOf("@{")){var i=n.resolveTemplateString(r,e);t.textContent=null==i?"":String(i)}})}},{key:"processAttributeInterpolation",value:function(t,e){var n=this,r=[];t.nodeType===Node.ELEMENT_NODE&&r.push(t),r.push.apply(r,function(t){return function(t){if(Array.isArray(t))return E(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return E(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t.querySelectorAll("*"))),r.forEach(function(t){Array.from(t.attributes).forEach(function(r){if(r.value&&-1!==r.value.indexOf("@{")){var i=n.resolveAttributeValue(r.value,e);n.setBoundAttribute(t,r.name,i)}})})}},{key:"setBoundAttribute",value:function(t,e,n){new Set(["checked","disabled","selected","readonly","required","open","hidden"]).has(e)?n?(t.setAttribute(e,""),e in t&&(t[e]=!0)):(t.removeAttribute(e),e in t&&(t[e]=!1)):"data-slot"!==e?t.setAttribute(e,null==n?"":String(n)):null==n||""===n?t.removeAttribute("slot"):t.setAttribute("slot",String(n))}},{key:"resolveAttributeValue",value:function(t,e){var n=t.match(/^\s*@\{([^}]+)\}\s*$/);return n?this.evaluateExpression(n[1].trim(),e):this.resolveTemplateString(t,e)}},{key:"resolveTemplateString",value:function(t,e){var n=this;return t.replace(/@\{([^}]+)\}/g,function(t,r){var i=n.evaluateExpression(r.trim(),e);return null==i?"":String(i)})}},{key:"extractExpression",value:function(t){if(!t)return"";var e=String(t).trim().match(/^@\{([^}]+)\}$/);return e?e[1].trim():String(t).trim()}},{key:"evaluateExpression",value:function(t,e){if(t){var n=this.normalizeExpression(t);try{var r=window.ELEngine||("undefined"!=typeof ELEngine?ELEngine:null);if(r)return new r(e).evaluate(n)}catch(t){}return this.getPathValue(e,n)}}},{key:"normalizeExpression",value:function(t){return String(t).replace(/\s*===\s*/g," eq ").replace(/\s*!==\s*/g," ne ").replace(/\s*>=\s*/g," gteq ").replace(/\s*<=\s*/g," lteq ").replace(/\s*>\s*/g," gt ").replace(/\s*<\s*/g," lt ").replace(/\s*&&\s*/g," and ").replace(/\s*\|\|\s*/g," or ").trim()}},{key:"getPathValue",value:function(t,e){if(t&&e){var n=String(e).replace(/\[(\w+)\]/g,".$1");if(/^[a-zA-Z_$][\w$]*(\.[a-zA-Z_$][\w$]*|\.\d+)*$/.test(n))return n.split(".").reduce(function(t,e){return null==t?void 0:t[e]},t)}}}],o=[{key:"selector",get:function(){return null}},{key:"library",get:function(){return"default"}},{key:"matchesLibrary",value:function(t,e){var n=t.getAttribute("library");return!n||n===e}},{key:"registerValidator",value:function(t,e){i.D.register(t,e)}},{key:"unregisterValidator",value:function(t){return i.D.unregister(t)}},{key:"parseValidators",value:function(t){return i.D.parseList(t)}}],n&&L(e.prototype,n),o&&L(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,o,a,l}();N(M,"nextComponentId",1),N(M,"pprHookNames",["refreshPpr","refresh","updateView"]),"undefined"!=typeof window&&(window.Component=M,i.D.enableAutoBind())},40(t,e,n){"use strict";n.r(e),n.d(e,{DataGrid:()=>P});var r=n(812),i=n(696),o=n(62),a=n(76);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){u=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(t,e)||c(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||c(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){if(t){if("string"==typeof t)return d(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(t,e):void 0}}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function f(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return h(u,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),u}var a={};function l(){}function s(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(h(e={},r,function(){return this}),e),d=u.prototype=l.prototype=Object.create(c);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,h(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=u,h(d,"constructor",u),h(u,"constructor",s),s.displayName="GeneratorFunction",h(u,i,"GeneratorFunction"),h(d),h(d,i,"Generator"),h(d,r,function(){return this}),h(d,"toString",function(){return"[object Generator]"}),(f=function(){return{w:o,m:p}})()}function h(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}h=function(t,e,n,r){function o(e,n){h(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},h(t,e,n,r)}function p(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function v(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){p(o,r,i,a,l,"next",t)}function l(t){p(o,r,i,a,l,"throw",t)}a(void 0)})}}function y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function m(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?y(Object(n),!0).forEach(function(e){C(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function b(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,A(r.key),r)}}function g(t,e,n){return e=E(e),function(t,e){if(e&&("object"==l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,w()?Reflect.construct(e,n||[],E(t).constructor):e.apply(t,n))}function w(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(w=function(){return!!t})()}function S(t,e,n,r){var i=k(E(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function k(){return k="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=E(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},k.apply(null,arguments)}function E(t){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},E(t)}function O(t,e){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},O(t,e)}function C(t,e,n){return(e=A(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function A(t){var e=function(t){if("object"!=l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==l(e)?e:e+""}var P=function(t){function e(t){var n,r,o,a,l,s,u,c,d,f,h,p,v,y,b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var w=e.normalizeArgs(t,b);return(y=g(this,e,[w.container,w.config])).templateId=e.templateId,y.parent=w.parent,y.textProvider=w.textProvider,y.config=m({localLimit:1e4,remoteLimit:50,endpoint:(null===(n=y.container)||void 0===n?void 0:n.getAttribute("data-endpoint"))||(null===(r=y.container)||void 0===r?void 0:r.getAttribute("endpoint"))||null,serverSide:(null===(o=y.container)||void 0===o?void 0:o.hasAttribute("server-side"))||!1,mode:y.resolveMode(y.container),pageSize:Number(null===(a=y.container)||void 0===a?void 0:a.getAttribute("data-page-size"))||24,infiniteChunkSize:Number(null===(l=y.container)||void 0===l?void 0:l.getAttribute("data-infinite-chunk"))||24,titleField:(null===(s=y.container)||void 0===s?void 0:s.getAttribute("data-title-field"))||null,iconField:(null===(u=y.container)||void 0===u?void 0:u.getAttribute("data-icon-field"))||null,avatarField:(null===(c=y.container)||void 0===c?void 0:c.getAttribute("data-avatar-field"))||null,mandatoryFields:y.parseFieldListAttr("data-mandatory-fields"),priorityFields:y.parseFieldListAttr("data-priority-fields"),readonlyFields:y.parseFieldListAttr("data-readonly-fields"),fieldMetadata:y.parseMetadataAttr("data-field-metadata"),idField:String((null===(d=y.container)||void 0===d?void 0:d.getAttribute("data-id-field"))||"id"),detailsSource:(null===(f=y.container)||void 0===f?void 0:f.getAttribute("data-details-source"))||(null===(h=y.container)||void 0===h?void 0:h.getAttribute("details-source"))||"",detailsCacheEnabled:y.parseBooleanAttr("data-details-cache",!0),detailsCacheMaxSize:y.parsePositiveIntAttr("data-details-cache-size",100),detailsCacheTTL:y.parsePositiveIntAttr("data-details-cache-ttl",0),createMethod:String((null===(p=y.container)||void 0===p?void 0:p.getAttribute("data-create-method"))||"POST").toUpperCase(),updateMethod:String((null===(v=y.container)||void 0===v?void 0:v.getAttribute("data-update-method"))||"PUT").toUpperCase(),rows:[],headers:[],visibleFields:[]},w.config),y.config.endpointTemplate=y.config.endpoint,y.config.requestParams=y.parseObjectAttr("data-request-params"),y.rawRows=[],y.processedRows=[],y.remoteLoaded=!1,y.loadingMore=!1,y.windowScrollHandler=null,y.localCardPool=[],y.localCardsVersion=0,y.localCardsRenderedVersion=-1,y.state={rows:[],headers:[],page:1,totalPages:1,totalCount:0,sortField:null,sortDir:"asc",searchTerm:"",filters:{},visibleFields:[],fieldChooserOpen:!1,hasMore:!1,visibleStart:0,visibleEnd:0},y.mandatoryFieldsResolved=[],y.priorityFieldsResolved=[],y.detailsDialog=new i.q,y.detailsCache=new Map,!1!==w.autoInit&&y.init(),y}return function(t,e){if("function"!=typeof e&&null!==e)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&&O(t,e)}(e,t),n=e,r=[{key:"validateStructure",value:function(){if(S(e,"validateStructure",this,3)([]),!this.container)throw new Error("DataGrid requires a container element")}},{key:"init",value:(I=v(f().m(function t(){return f().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return I.apply(this,arguments)})},{key:"render",value:(L=v(f().m(function t(){var n,r,i,l,s,u,c,d,h,p,v,y;return f().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,S(e,"render",this,3)([]);case 1:return this.element=this.container.querySelector(".holi-datagrid"),this.contentEl=null===(n=this.element)||void 0===n?void 0:n.querySelector(".datagrid-content"),this.cardsHost=null===(r=this.element)||void 0===r?void 0:r.querySelector('[data-role="cards"]'),this.fieldChooser=null===(i=this.element)||void 0===i?void 0:i.querySelector('[data-role="field-chooser"]'),this.fieldChooserList=null===(l=this.element)||void 0===l?void 0:l.querySelector('[data-role="field-chooser-list"]'),this.resultCount=null===(s=this.element)||void 0===s?void 0:s.querySelector('[data-role="result-count"]'),this.pageInfo=null===(u=this.element)||void 0===u?void 0:u.querySelector('[data-role="page-info"]'),this.paginationControls=null===(c=this.element)||void 0===c?void 0:c.querySelector('[data-role="pagination-controls"]'),this.sortFieldSelect=null===(d=this.element)||void 0===d?void 0:d.querySelector('[data-action="sort-field"]'),this.sortDirectionButton=null===(h=this.element)||void 0===h?void 0:h.querySelector('[data-action="sort-direction"]'),this.requestStatus=null===(p=this.element)||void 0===p?void 0:p.querySelector('[data-role="request-status"]'),this.requestStatusText=null===(v=this.element)||void 0===v?void 0:v.querySelector('[data-role="request-status-text"]'),this.retryButton=null===(y=this.element)||void 0===y?void 0:y.querySelector('[data-action="retry-load"]'),this.loaderState=(0,o.w)(this,{host:this.element,busyTarget:this.contentEl||this.element,scope:"block",defaultMessage:"Loading data..."}),this.stateBinding=(0,a.x)(this,{defaultPath:"datagrid",eventName:"stateupdate",getSnapshot:function(t){return t.getBindableState()},applySnapshot:function(t,e){return t.applyBindableState(e)}}),this.initEventDelegation(),this.initScrollingMode(),t.n=2,this.loadData();case 2:return t.a(2)}},t,this)})),function(){return L.apply(this,arguments)})},{key:"initEventDelegation",value:function(){var t=this;this.element&&(this.element.addEventListener("click",function(e){return t.handleAction(e)}),this.element.addEventListener("input",function(e){return t.handleInput(e)}),this.element.addEventListener("change",function(e){return t.handleChange(e)}))}},{key:"handleAction",value:function(t){var e,n,r,i=null===(e=t.target)||void 0===e||null===(n=e.closest)||void 0===n?void 0:n.call(e,"[data-action]"),o=null==i||null===(r=i.dataset)||void 0===r?void 0:r.action;if(o){if("toggle-fields"===o)return this.state.fieldChooserOpen=!this.state.fieldChooserOpen,void this.renderFieldChooser();if("add-row"!==o)if("view-row"!==o&&"edit-row"!==o){if("sort-direction"===o)return this.state.sortDir="asc"===this.state.sortDir?"desc":"asc",this.resetViewport(),void(this.config.serverSide?this.loadData():(this.applyClientProcessing(),this.updateView()));"prev-page"!==o?"next-page"!==o?"retry-load"===o&&this.retryLoad():this.gotoPage(this.state.page+1):this.gotoPage(this.state.page-1)}else{var a,l=Number(null==i||null===(a=i.dataset)||void 0===a?void 0:a.rowIndex);if(Number.isNaN(l)||l<0)return;var s=this.isLocalDomReuseEnabled()?this.processedRows:this.state.rows;if(l>=s.length)return;var u=s[l];this.openDetailsDialog("edit-row"===o?"edit":"view",u)}else this.openDetailsDialog("add")}}},{key:"handleInput",value:function(t){var e;"search"===(null===(e=t.target)||void 0===e||null===(e=e.dataset)||void 0===e?void 0:e.action)&&(this.state.searchTerm=t.target.value||"",this.resetViewport(),this.config.serverSide?this.loadData():(this.applyClientProcessing(),this.updateView()))}},{key:"handleChange",value:function(t){var e,n,r,i=t.target,o=null==i||null===(e=i.dataset)||void 0===e?void 0:e.action,a=null==i||null===(n=i.dataset)||void 0===n?void 0:n.field,l=null==i||null===(r=i.dataset)||void 0===r?void 0:r.filter;if("toggle-field"===o&&a)return this.setFieldVisibility(a,!!i.checked),void this.updateView();if("sort-field"===o){var s=String(i.value||"").trim();return this.state.sortField=s||null,this.resetViewport(),void(this.config.serverSide?this.loadData():(this.applyClientProcessing(),this.updateView()))}if(l){var u=String(i.value||"").trim();u&&"all"!==u.toLowerCase()?this.state.filters[l]=u:delete this.state.filters[l],this.resetViewport(),this.config.serverSide?this.loadData():(this.applyClientProcessing(),this.updateView())}}},{key:"loadData",value:(x=v(f().m(function t(){return f().w(function(t){for(;;)switch(t.n){case 0:if(!this.resolveConfiguredEndpoint()){t.n=3;break}return t.n=1,this.loadRemote(this.config.serverSide,!1);case 1:if(t.v){t.n=2;break}return this.updateView(),t.a(2);case 2:t.n=4;break;case 3:return t.n=4,this.loadLocal();case 4:if(this.hydrateFilterControls(),this.hydrateSortControls(),this.config.serverSide||this.applyClientProcessing(),this.updateView(),!this.config.serverSide||"infinite"!==this.config.mode){t.n=5;break}return t.n=5,this.prefillInfiniteViewport();case 5:return t.a(2)}},t,this)})),function(){return x.apply(this,arguments)})},{key:"loadRemote",value:(T=v(f().m(function t(){var e,n,r,i,o,a,l,s=arguments;return f().w(function(t){for(;;)switch(t.p=t.n){case 0:if(e=s.length>0&&void 0!==s[0]&&s[0],n=s.length>1&&void 0!==s[1]&&s[1],!this.remoteLoaded||e||this.config.serverSide){t.n=1;break}return t.a(2,!0);case 1:if(this.setRequestStatus("loading","Loading page ".concat(this.state.page,"...")),r=this.buildEndpointUrl(!0)){t.n=2;break}return t.a(2,!1);case 2:return t.p=2,t.n=3,fetch(r);case 3:if((o=t.v).ok){t.n=4;break}throw new Error("HTTP ".concat(o.status));case 4:return t.n=5,o.json();case 5:i=t.v,t.n=7;break;case 6:return t.p=6,t.v,this.setRequestStatus("error","Request failed"),t.a(2,!1);case 7:if(a=Array.isArray(i.rows)?i.rows:[],this.rawRows=a,l=Array.isArray(i.headers)?i.headers.map(function(t){return m(m({},t),{},{visible:!1!==t.visible})}):this.deriveHeaders(a),this.state.headers=l,this.state.totalPages=Number(i.totalPages)||1,this.state.totalCount=Number(i.totalCount)||a.length,0===this.state.visibleFields.length&&(Array.isArray(i.visibleFields)&&i.visibleFields.length?this.state.visibleFields=u(i.visibleFields):this.state.visibleFields=l.filter(function(t){return t.visible}).map(function(t){return t.field})),this.applyChooserPoliciesForFields(),!this.config.serverSide){t.n=8;break}return this.state.rows=n?[].concat(u(this.state.rows),u(a)):a,this.processedRows=u(this.state.rows),this.state.hasMore="infinite"===this.config.mode&&this.state.page<this.state.totalPages,"infinite"!==this.config.mode||this.state.hasMore?this.setRequestStatus("idle",""):this.setRequestStatus("end","No more records"),t.a(2,!0);case 8:return this.remoteLoaded=!0,this.setRequestStatus("idle",""),t.a(2,!0)}},t,this,[[2,6]])})),function(){return T.apply(this,arguments)})},{key:"loadLocal",value:(j=v(f().m(function t(){return f().w(function(t){for(;;)switch(t.n){case 0:this.rawRows=Array.isArray(this.config.rows)?this.config.rows:[],this.state.headers=Array.isArray(this.config.headers)?this.config.headers.map(function(t){return m(m({},t),{},{visible:!1!==t.visible})}):this.deriveHeaders(this.rawRows),this.state.totalPages=1,this.state.totalCount=this.rawRows.length,Array.isArray(this.config.visibleFields)&&this.config.visibleFields.length?this.state.visibleFields=u(this.config.visibleFields):this.state.visibleFields=this.state.headers.filter(function(t){return t.visible}).map(function(t){return t.field}),this.applyChooserPoliciesForFields();case 1:return t.a(2)}},t,this)})),function(){return j.apply(this,arguments)})},{key:"buildEndpointUrl",value:function(t){var e=this.resolveConfiguredEndpoint();if(!e)return"";if(!t)return e;var n="pagination"===this.config.mode?this.config.pageSize:"infinite"===this.config.mode?this.config.infiniteChunkSize:this.config.remoteLimit,r=new URLSearchParams(m({page:String(this.state.page),limit:String(n),sort:"".concat(this.state.sortField||"",",").concat(this.state.sortDir),q:this.state.searchTerm},this.state.filters)),i=this.resolveRequestParams();return Object.entries(i).forEach(function(t){var e=s(t,2),n=e[0],i=e[1];null!=i&&""!==i&&r.set(n,String(i))}),"".concat(e,"?").concat(r)}},{key:"deriveHeaders",value:function(t){var e=t[0];return e&&"object"===l(e)?Object.keys(e).map(function(t){return{field:t,label:t,visible:!0}}):[]}},{key:"applyClientProcessing",value:function(){var t=Array.isArray(this.rawRows)?u(this.rawRows):[];t=this.applyFilters(t),t=this.applySearch(t),t=this.applySort(t),this.processedRows=t,this.bumpLocalCardsVersion(),this.applyViewport(t)}},{key:"applyViewport",value:function(t){if("pagination"===this.config.mode){var e=Math.max(1,Number(this.config.pageSize)||24),n=Math.max(1,Math.ceil(t.length/e));this.state.totalPages=n,this.state.page=Math.min(Math.max(1,this.state.page),n);var r=(this.state.page-1)*e;return this.state.rows=t.slice(r,r+e),this.state.hasMore=!1,this.state.visibleStart=r,void(this.state.visibleEnd=Math.min(r+e,t.length))}if("infinite"===this.config.mode){var i=Math.max(1,Number(this.config.infiniteChunkSize)||24),o=this.state.page*i;return this.state.rows=t.slice(0,o),this.state.hasMore=o<t.length,this.state.totalPages=1,this.state.visibleStart=0,void(this.state.visibleEnd=Math.min(o,t.length))}this.state.rows=t,this.state.totalPages=1,this.state.hasMore=!1,this.state.visibleStart=0,this.state.visibleEnd=t.length}},{key:"applyFilters",value:function(t){var e=Object.entries(this.state.filters||{});return e.length?t.filter(function(t){return e.every(function(e){var n=s(e,2),r=n[0],i=n[1],o=null==t?void 0:t[r];return null!=o&&String(o).toLowerCase()===String(i).toLowerCase()})}):t}},{key:"applySearch",value:function(t){var e=String(this.state.searchTerm||"").trim().toLowerCase();if(!e)return t;var n=this.state.headers.map(function(t){return t.field});return t.filter(function(t){return n.some(function(n){var r=null==t?void 0:t[n];return null!=r&&String(r).toLowerCase().includes(e)})})}},{key:"applySort",value:function(t){var e=this.state.sortField;if(!e)return t;var n="desc"===this.state.sortDir?-1:1;return t.sort(function(t,r){var i=null==t?void 0:t[e],o=null==r?void 0:r[e];if(null==i&&null==o)return 0;if(null==i)return-1*n;if(null==o)return 1*n;var a=Number(i),l=Number(o);return Number.isNaN(a)||Number.isNaN(l)?String(i).localeCompare(String(o),void 0,{numeric:!0,sensitivity:"base"})*n:(a-l)*n})}},{key:"setFieldVisibility",value:function(t,e){if(e)this.state.visibleFields.includes(t)||this.state.visibleFields.push(t);else{if(this.isMandatoryField(t))return;this.state.visibleFields=this.state.visibleFields.filter(function(e){return e!==t})}this.state.visibleFields=this.getOrderedVisibleFields(this.state.visibleFields),this.bumpLocalCardsVersion()}},{key:"hydrateFilterControls",value:function(){var t,e=this,n=null===(t=this.element)||void 0===t?void 0:t.querySelectorAll("[data-filter]");null!=n&&n.length&&n.forEach(function(t){if(t instanceof HTMLSelectElement&&!(t.options.length>1)){var n=t.dataset.filter;if(n){var r=new Set;e.rawRows.forEach(function(t){null!=(null==t?void 0:t[n])&&r.add(String(t[n]))}),Array.from(r).sort(function(t,e){return t.localeCompare(e,void 0,{numeric:!0,sensitivity:"base"})}).forEach(function(e){var n=document.createElement("option");n.value=e,n.textContent=e,t.appendChild(n)})}}})}},{key:"hydrateSortControls",value:function(){var t=this;this.sortFieldSelect instanceof HTMLSelectElement&&(this.sortFieldSelect.options.length>1||this.state.headers.forEach(function(e){var n=document.createElement("option");n.value=e.field,n.textContent=e.label||e.field,t.sortFieldSelect.appendChild(n)}))}},{key:"updateView",value:function(){this.renderCards(),!this.config.serverSide&&this.ensureInfiniteScrollable()&&this.renderCards(),this.renderFieldChooser(),this.renderSortControls(),this.renderMeta(),this.renderPagination(),this.renderRequestStatus(),this.dispatchEvent("stateupdate",this.state)}},{key:"renderCards",value:function(){var t=this;if(this.cardsHost)if(this.isLocalDomReuseEnabled())this.renderCardsWithLocalPool();else{if(this.cardsHost.replaceChildren(),!this.state.rows.length){var e=document.createElement("div");return e.className="datagrid-empty",e.textContent="No matching records",void this.cardsHost.appendChild(e)}this.state.rows.forEach(function(e,n){t.cardsHost.appendChild(t.createCard(e,n))})}}},{key:"isLocalDomReuseEnabled",value:function(){return!this.config.serverSide}},{key:"bumpLocalCardsVersion",value:function(){this.localCardsVersion+=1}},{key:"renderCardsWithLocalPool",value:function(){if(this.cardsHost){if(!this.processedRows.length){this.localCardPool=[],this.localCardsRenderedVersion=this.localCardsVersion,this.cardsHost.replaceChildren();var t=document.createElement("div");return t.className="datagrid-empty",t.textContent="No matching records",void this.cardsHost.appendChild(t)}this.localCardsRenderedVersion!==this.localCardsVersion?this.rebuildLocalCardPool():this.applyLocalCardVisibility()}}},{key:"rebuildLocalCardPool",value:function(){var t=this;this.cardsHost&&(this.cardsHost.replaceChildren(),this.localCardPool=[],this.processedRows.forEach(function(e,n){var r=t.createCard(e,n);t.localCardPool.push(r),t.cardsHost.appendChild(r)}),this.localCardsRenderedVersion=this.localCardsVersion,this.applyLocalCardVisibility())}},{key:"applyLocalCardVisibility",value:function(){var t=Math.max(0,Number(this.state.visibleStart)||0),e=Math.max(t,Number(this.state.visibleEnd)||0);this.localCardPool.forEach(function(n,r){n.hidden=r<t||r>=e})}},{key:"createCard",value:function(t,e){var n=document.createElement("article");n.className="datagrid-card";var r=this.resolveProminentFields(t),i=r.titleField&&this.state.visibleFields.includes(r.titleField),o=r.iconField&&this.state.visibleFields.includes(r.iconField),a=r.avatarField&&this.state.visibleFields.includes(r.avatarField);if(i||o||a){var l=document.createElement("header");if(l.className="datagrid-card-head",a){var s=document.createElement("img");s.className="datagrid-card-avatar",s.src=String(t[r.avatarField]||""),s.alt=i?String(t[r.titleField]||""):"Avatar",l.appendChild(s)}else if(o){var u=document.createElement("span");u.className="datagrid-card-icon",u.textContent=String(t[r.iconField]||""),l.appendChild(u)}if(i){var c=document.createElement("h3");c.className="datagrid-card-title",c.textContent=String(t[r.titleField]||""),l.appendChild(c)}n.appendChild(l)}var d=document.createElement("div");d.className="datagrid-card-body";var f=this.buildFieldLabelMap();this.state.visibleFields.forEach(function(e){if(e!==r.titleField&&e!==r.iconField&&e!==r.avatarField){var n=document.createElement("div");n.className="datagrid-field";var i=document.createElement("span");i.className="datagrid-field-label",i.textContent=f.get(e)||e;var o=document.createElement("span");o.className="datagrid-field-value",o.textContent=null==(null==t?void 0:t[e])?"":String(t[e]),n.append(i,o),d.appendChild(n)}}),n.appendChild(d);var h=document.createElement("footer");h.className="datagrid-card-actions";var p=document.createElement("button");p.type="button",p.dataset.action="view-row",p.dataset.rowIndex=String(e),p.textContent="View",h.appendChild(p);var v=document.createElement("button");return v.type="button",v.dataset.action="edit-row",v.dataset.rowIndex=String(e),v.textContent="Edit",h.appendChild(v),n.appendChild(h),n}},{key:"buildFieldLabelMap",value:function(){var t=new Map;return this.state.headers.forEach(function(e){t.set(e.field,e.label||e.field)}),t}},{key:"resolveProminentFields",value:function(t){var e=this.state.headers.map(function(t){return t.field}),n=function(t,n){return t&&e.includes(t)?t:n.find(function(t){return e.includes(t)})||null},r=n(this.config.titleField,["title","name","customer","orderNo","id"]),i=n(this.config.iconField,["icon"]),o=n(this.config.avatarField,["avatar","avatarUrl","photo","image"]);return o&&null==(null==t?void 0:t[o])?{titleField:r,iconField:i,avatarField:null}:{titleField:r,iconField:i,avatarField:o}}},{key:"renderFieldChooser",value:function(){var t=this;this.fieldChooser&&(this.fieldChooser.hidden=!this.state.fieldChooserOpen),this.fieldChooserList&&(this.fieldChooserList.replaceChildren(),this.state.headers.forEach(function(e){var n=document.createElement("label");n.className="datagrid-field-option";var r=document.createElement("input");r.type="checkbox",r.dataset.action="toggle-field",r.dataset.field=e.field,r.checked=t.state.visibleFields.includes(e.field),r.disabled=t.isMandatoryField(e.field);var i=document.createElement("span");i.textContent=e.label||e.field,n.append(r,i),t.fieldChooserList.appendChild(n)}))}},{key:"renderSortControls",value:function(){this.sortDirectionButton&&(this.sortDirectionButton.textContent="asc"===this.state.sortDir?"Asc":"Desc"),this.sortFieldSelect instanceof HTMLSelectElement&&(this.sortFieldSelect.value=this.state.sortField||"")}},{key:"renderMeta",value:function(){this.resultCount&&(this.config.serverSide?this.resultCount.textContent="".concat(this.state.rows.length," shown / ").concat(this.state.totalCount," total"):this.resultCount.textContent="".concat(this.processedRows.length," rows"))}},{key:"renderPagination",value:function(){if(this.paginationControls&&this.pageInfo)if("pagination"===this.config.mode){this.paginationControls.hidden=!1,this.pageInfo.textContent="Page ".concat(this.state.page," of ").concat(this.state.totalPages);var t=this.paginationControls.querySelector('[data-action="prev-page"]'),e=this.paginationControls.querySelector('[data-action="next-page"]');t&&(t.disabled=this.state.page<=1),e&&(e.disabled=this.state.page>=this.state.totalPages)}else this.paginationControls.hidden=!0}},{key:"gotoPage",value:(P=v(f().m(function t(e){var n;return f().w(function(t){for(;;)switch(t.n){case 0:if("pagination"===this.config.mode){t.n=1;break}return t.a(2);case 1:if(n=Math.min(Math.max(1,e),Math.max(1,this.state.totalPages)),this.state.page=n,!this.config.serverSide){t.n=4;break}return t.n=2,this.loadRemote(!0,!1);case 2:if(t.v){t.n=3;break}return this.updateView(),t.a(2);case 3:t.n=5;break;case 4:this.applyViewport(this.processedRows);case 5:this.updateView();case 6:return t.a(2)}},t,this)})),function(t){return P.apply(this,arguments)})},{key:"resolveMode",value:function(t){var e=String((null==t?void 0:t.getAttribute("data-mode"))||"").trim().toLowerCase();return"pagination"===e||"infinite"===e?e:null!=t&&t.hasAttribute("infinite-scroll")?"infinite":null!=t&&t.hasAttribute("pagination")?"pagination":"standard"}},{key:"resetViewport",value:function(){this.state.page=1,this.contentEl&&(this.contentEl.scrollTop=0)}},{key:"initScrollingMode",value:function(){var t,e=this;if("infinite"===this.config.mode&&this.contentEl){this.contentEl.classList.add("datagrid-scrollable");var n=(null===(t=this.container)||void 0===t?void 0:t.getAttribute("data-scroll-height"))||"500px";this.contentEl.style.maxHeight=n,this.contentEl.style.overflowY="auto",this.contentEl.addEventListener("scroll",function(){e.handleInfiniteScroll()}),this.config.serverSide||(this.windowScrollHandler=function(){e.handleWindowInfiniteScroll()},window.addEventListener("scroll",this.windowScrollHandler,{passive:!0}))}}},{key:"handleInfiniteScroll",value:(A=v(f().m(function t(){return f().w(function(t){for(;;)switch(t.n){case 0:if("infinite"===this.config.mode&&this.contentEl&&this.state.hasMore&&!this.loadingMore){t.n=1;break}return t.a(2);case 1:if(this.contentEl.scrollTop+this.contentEl.clientHeight>=this.contentEl.scrollHeight-48){t.n=2;break}return t.a(2);case 2:if(this.loadingMore=!0,this.state.page+=1,!this.config.serverSide){t.n=5;break}return t.n=3,this.loadRemote(!0,!0);case 3:if(t.v){t.n=4;break}return this.loadingMore=!1,this.updateView(),t.a(2);case 4:t.n=6;break;case 5:this.applyViewport(this.processedRows);case 6:this.renderCards(),this.renderMeta(),this.loadingMore=!1;case 7:return t.a(2)}},t,this)})),function(){return A.apply(this,arguments)})},{key:"handleWindowInfiniteScroll",value:(E=v(f().m(function t(){var e,n;return f().w(function(t){for(;;)switch(t.n){case 0:if("infinite"===this.config.mode&&this.state.hasMore&&!this.loadingMore){t.n=1;break}return t.a(2);case 1:if(n=null===(e=this.container)||void 0===e?void 0:e.getBoundingClientRect()){t.n=2;break}return t.a(2);case 2:if(n.bottom<=window.innerHeight+120){t.n=3;break}return t.a(2);case 3:if(this.loadingMore=!0,this.state.page+=1,!this.config.serverSide){t.n=6;break}return t.n=4,this.loadRemote(!0,!0);case 4:if(t.v){t.n=5;break}return this.loadingMore=!1,this.updateView(),t.a(2);case 5:t.n=7;break;case 6:this.applyViewport(this.processedRows);case 7:this.renderCards(),this.renderMeta(),this.loadingMore=!1;case 8:return t.a(2)}},t,this)})),function(){return E.apply(this,arguments)})},{key:"prefillInfiniteViewport",value:(k=v(f().m(function t(){var e,n;return f().w(function(t){for(;;)switch(t.n){case 0:if(this.contentEl&&"infinite"===this.config.mode&&this.config.serverSide){t.n=1;break}return t.a(2);case 1:e=10,n=0;case 2:if(!(this.state.hasMore&&this.contentEl.scrollHeight<=this.contentEl.clientHeight&&n<e)){t.n=5;break}return this.loadingMore=!0,this.state.page+=1,t.n=3,this.loadRemote(!0,!0);case 3:if(t.v){t.n=4;break}return this.loadingMore=!1,t.a(3,5);case 4:this.renderCards(),this.renderMeta(),this.loadingMore=!1,n+=1,t.n=2;break;case 5:return t.a(2)}},t,this)})),function(){return k.apply(this,arguments)})},{key:"ensureInfiniteScrollable",value:function(){if("infinite"!==this.config.mode||!this.contentEl||!this.state.hasMore)return!1;for(var t=0,e=!1;this.state.hasMore&&this.contentEl.scrollHeight<=this.contentEl.clientHeight&&t<10;)this.state.page+=1,this.applyViewport(this.processedRows),t+=1,e=!0;return e}},{key:"openDetailsDialog",value:(w=v(f().m(function t(e){var n,r,i,o,a=this,l=arguments;return f().w(function(t){for(;;)switch(t.n){case 0:return n=l.length>1&&void 0!==l[1]?l[1]:null,t.n=1,this.resolveDetailsRecord(e,n);case 1:r=t.v,i=this.resolveDetailFields(r),o=this.config.readonlyFields||[],this.detailsDialog.open({title:"Record",mode:e,record:r,fields:i,readonlyFields:o,onSave:function(){var t=v(f().m(function t(e,n){var r;return f().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,a.persistRecord(e,"add"===n);case 1:return r=t.v,t.n=2,a.refreshAfterMutation(r,"add"===n);case 2:return a.seedDetailsCache(r),t.a(2,r)}},t)}));return function(e,n){return t.apply(this,arguments)}}()});case 2:return t.a(2)}},t,this)})),function(t){return w.apply(this,arguments)})},{key:"resolveDetailsRecord",value:(y=v(f().m(function t(e,n){var r,i,o,a,s,u,c,d,h,p,v,y;return f().w(function(t){for(;;)switch(t.p=t.n){case 0:if("add"!==e){t.n=1;break}return t.a(2,this.createEmptyRecord());case 1:if(n&&"object"===l(n)){t.n=2;break}return t.a(2,this.createEmptyRecord());case 2:if(r=this.cloneRow(n),i=this.getRecordId(n)){t.n=3;break}return t.a(2,r);case 3:if(this.shouldFetchDetails(e)){t.n=4;break}return t.a(2,r);case 4:if(!(o=this.getCachedDetails(i))){t.n=5;break}return t.a(2,this.mergeDetailRecord(r,o));case 5:if(a=this.buildDetailsEndpoint(i,n)){t.n=6;break}return t.a(2,r);case 6:return s=!1,t.p=7,null===(u=this.detailsDialog)||void 0===u||null===(c=u.openLoading)||void 0===c||c.call(u,{title:"Record"}),s=!0,t.n=8,fetch(a,{method:"GET",credentials:"same-origin"});case 8:if((d=t.v).ok){t.n=9;break}return t.a(2,r);case 9:return t.n=10,d.json().catch(function(){return null});case 10:if(h=t.v,p=this.extractDetailsPayload(h)){t.n=11;break}return t.a(2,r);case 11:return this.setCachedDetails(i,p),t.a(2,this.mergeDetailRecord(r,p));case 12:return t.p=12,t.v,t.a(2,r);case 13:return t.p=13,s&&(null===(v=this.detailsDialog)||void 0===v||null===(y=v.close)||void 0===y||y.call(v)),t.f(13);case 14:return t.a(2)}},t,this,[[7,12,13,14]])})),function(t,e){return y.apply(this,arguments)})},{key:"shouldFetchDetails",value:function(t){return("view"===t||"edit"===t)&&!!String(this.config.detailsSource||"").trim()}},{key:"buildDetailsEndpoint",value:function(t,e){var n=String(this.config.detailsSource||"").trim();if(!n)return"";var r=n,i=String(this.config.idField||"id"),o=C({id:t},i,t);if(Object.keys(o).forEach(function(t){var e,n=encodeURIComponent(String(null!==(e=o[t])&&void 0!==e?e:""));r=r.replace(new RegExp("@\\{\\s*".concat(t,"\\s*\\}"),"g"),n)}),r.includes("@{")&&(r=r.replace(/@\{([^}]+)\}/g,function(t,n){var r=String(n||"").trim(),i=null==e?void 0:e[r];return null==i?"":encodeURIComponent(String(i))})),!/[?&](id|rowId|recordId|key)=/.test(r)&&!n.includes("@{")){var a=r.includes("?")?"&":"?";r="".concat(r).concat(a).concat(encodeURIComponent(i),"=").concat(encodeURIComponent(t))}return r}},{key:"extractDetailsPayload",value:function(t){return t&&"object"===l(t)?t.row&&"object"===l(t.row)?this.cloneRow(t.row):t.record&&"object"===l(t.record)?this.cloneRow(t.record):t.data&&"object"===l(t.data)&&!Array.isArray(t.data)?this.cloneRow(t.data):Array.isArray(t)?null:this.cloneRow(t):null}},{key:"mergeDetailRecord",value:function(t,e){var n=t&&"object"===l(t)?t:{},r=e&&"object"===l(e)?e:{};return m(m({},n),r)}},{key:"resolveDetailFields",value:function(t){var e=this,n=[],r=new Set,i=this.config.fieldMetadata||{};return this.state.headers.forEach(function(o){var a=String(o.field||"").trim();if(a&&!r.has(a)){r.add(a);var s=i[a]&&"object"===l(i[a])?i[a]:{};n.push({name:a,label:s.label||o.label||a,type:s.formFieldType||s.type||e.inferFieldType(null==t?void 0:t[a]),required:s.required,optional:s.optional,readonly:s.readonly,constraints:s.constraints&&"object"===l(s.constraints)?s.constraints:{},lov:s.lov||s.options||[]})}}),Object.keys(t||{}).forEach(function(o){if(!r.has(o)){r.add(o);var a=i[o]&&"object"===l(i[o])?i[o]:{};n.push({name:o,label:a.label||o,type:a.formFieldType||a.type||e.inferFieldType(null==t?void 0:t[o]),required:a.required,optional:a.optional,readonly:a.readonly,constraints:a.constraints&&"object"===l(a.constraints)?a.constraints:{},lov:a.lov||a.options||[]})}}),n}},{key:"inferFieldType",value:function(t){return"boolean"==typeof t?"boolean":"number"==typeof t?"number":"text"}},{key:"createEmptyRecord",value:function(){var t={};return this.state.headers.forEach(function(e){t[e.field]=""}),t}},{key:"cloneRow",value:function(t){return JSON.parse(JSON.stringify(t||{}))}},{key:"getRecordId",value:function(t){if(!t||"object"!==l(t))return"";var e=t[String(this.config.idField||"id")];return null==e?"":String(e)}},{key:"getCachedDetails",value:function(t){if(!this.config.detailsCacheEnabled||!t||!this.detailsCache.has(t))return null;var e=this.detailsCache.get(t);if(!e)return null;var n=Number(this.config.detailsCacheTTL)||0;return n>0&&Date.now()-e.ts>n?(this.detailsCache.delete(t),null):(this.detailsCache.delete(t),this.detailsCache.set(t,e),this.cloneRow(e.data))}},{key:"setCachedDetails",value:function(t,e){if(this.config.detailsCacheEnabled&&t&&e&&"object"===l(e)){this.detailsCache.has(t)&&this.detailsCache.delete(t),this.detailsCache.set(t,{data:this.cloneRow(e),ts:Date.now()});for(var n=Math.max(1,Number(this.config.detailsCacheMaxSize)||100);this.detailsCache.size>n;){var r=this.detailsCache.keys().next().value;this.detailsCache.delete(r)}}}},{key:"seedDetailsCache",value:function(t){var e=this.getRecordId(t);e&&this.setCachedDetails(e,t)}},{key:"clearDetailsCache",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.detailsCache&&(null!=t?this.detailsCache.delete(String(t)):this.detailsCache.clear())}},{key:"getDetailsCacheStats",value:function(){return{size:this.detailsCache.size,max:Math.max(1,Number(this.config.detailsCacheMaxSize)||100),ttl:Number(this.config.detailsCacheTTL)||0,keys:Array.from(this.detailsCache.keys())}}},{key:"getSaveEndpoint",value:function(){return String(this.config.detailsSource||"").trim()||String(this.config.endpoint||"").trim()}},{key:"persistRecord",value:(p=v(f().m(function t(e,n){var r,i,o,a,s,u;return f().w(function(t){for(;;)switch(t.n){case 0:if((r=this.getSaveEndpoint())&&(this.config.serverSide||-1===r.indexOf(".json"))){t.n=1;break}return t.a(2,this.persistRecordLocal(e,n));case 1:return i=n?this.config.createMethod:this.config.updateMethod,o={id:this.getRecordId(e),row:e},t.n=2,fetch(r,{method:i,credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});case 2:if((a=t.v).ok){t.n=3;break}throw new Error("Save failed (".concat(a.status,")"));case 3:return t.n=4,a.json().catch(function(){return{}});case 4:return s=t.v,u=null!=s&&s.row&&"object"===l(s.row)?s.row:e,t.a(2,u)}},t,this)})),function(t,e){return p.apply(this,arguments)})},{key:"persistRecordLocal",value:function(t,e){var n=this,r=this.getRecordId(t);if(e||!r){if(!r){var i=this.getNextLocalId();t[this.config.idField]=i}return this.rawRows.unshift(this.cloneRow(t)),t}var o=this.rawRows.findIndex(function(t){return n.getRecordId(t)===r});return o>=0?this.rawRows[o]=this.cloneRow(t):this.rawRows.unshift(this.cloneRow(t)),t}},{key:"getNextLocalId",value:function(){var t=this,e=0;return this.rawRows.forEach(function(n){var r=Number(null==n?void 0:n[t.config.idField]);Number.isNaN(r)||(e=Math.max(e,r))}),e+1}},{key:"refreshAfterMutation",value:(h=v(f().m(function t(e,n){var r,i,o=this;return f().w(function(t){for(;;)switch(t.n){case 0:if(!this.config.serverSide){t.n=2;break}return this.resetViewport(),t.n=1,this.loadData();case 1:return t.a(2);case 2:n||(r=this.getRecordId(e),(i=this.rawRows.findIndex(function(t){return o.getRecordId(t)===r}))>=0&&(this.rawRows[i]=this.cloneRow(e))),this.applyClientProcessing(),this.updateView();case 3:return t.a(2)}},t,this)})),function(t,e){return h.apply(this,arguments)})},{key:"setRequestStatus",value:function(t,e){var n,r;this.requestState=t||"idle",this.requestMessage=e||"",null===(n=this.loaderState)||void 0===n||null===(r=n.setLoading)||void 0===r||r.call(n,"loading"===this.requestState,this.requestMessage),this.renderRequestStatus()}},{key:"renderRequestStatus",value:function(){this.requestStatus&&this.requestStatusText&&this.retryButton&&(this.requestStatus.dataset.state=this.requestState||"idle",this.requestStatusText.textContent=this.requestMessage||"",this.retryButton.hidden="error"!==this.requestState)}},{key:"retryLoad",value:(d=v(f().m(function t(){return f().w(function(t){for(;;)switch(t.n){case 0:return this.setRequestStatus("loading","Loading page ".concat(this.state.page,"...")),t.n=1,this.loadData();case 1:return t.a(2)}},t,this)})),function(){return d.apply(this,arguments)})},{key:"parseFieldListAttr",value:function(t){var e,n=String((null===(e=this.container)||void 0===e?void 0:e.getAttribute(t))||"").trim();return n?n.split(",").map(function(t){return t.trim()}).filter(Boolean):[]}},{key:"parseBooleanAttr",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null===(e=this.container)||void 0===e||!e.hasAttribute(t))return n;var r=String(this.container.getAttribute(t)||"").trim().toLowerCase();return!r||"false"!==r&&"0"!==r&&"no"!==r&&"off"!==r}},{key:"parsePositiveIntAttr",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=String((null===(e=this.container)||void 0===e?void 0:e.getAttribute(t))||"").trim();if(!r)return n;var i=Number(r);return!Number.isFinite(i)||i<0?n:Math.floor(i)}},{key:"parseMetadataAttr",value:function(t){var e,n=String((null===(e=this.container)||void 0===e?void 0:e.getAttribute(t))||"").trim();if(!n)return{};if(n.startsWith("{")&&n.endsWith("}")||n.startsWith("[")&&n.endsWith("]"))try{var r=JSON.parse(n);return r&&"object"===l(r)?r:{}}catch(t){return{}}if("undefined"!=typeof window){var i=window[n];if("function"==typeof i)try{var o=i(this.container);return o&&"object"===l(o)?o:{}}catch(t){return{}}if(i&&"object"===l(i))return i}return{}}},{key:"parseObjectAttr",value:function(t){var e,n=String((null===(e=this.container)||void 0===e?void 0:e.getAttribute(t))||"").trim();if(!n)return{};try{var r=JSON.parse(n);return r&&"object"===l(r)&&!Array.isArray(r)?r:{}}catch(t){return{}}}},{key:"resolveConfiguredEndpoint",value:function(){var t=String(this.config.endpointTemplate||this.config.endpoint||"").trim();if(!t)return this.config.endpoint="","";var e=t.includes("@{")?this.resolveTemplateString(t,this.getBindingContext()):t;return this.config.endpoint=String(e||"").trim(),this.config.endpoint}},{key:"resolveRequestParams",value:function(){var t=this,e=Object.entries(this.config.requestParams||{});if(!e.length)return{};var n={};return e.forEach(function(e){var r=s(e,2),i=r[0],o=r[1];if(i){var a=String(o||"").trim();if(a){var l=t.extractExpression(a),u=t.evaluateExpression(l,t.getBindingContext());null!=u&&""!==u&&(n[i]=u)}}}),n}},{key:"resolveConfiguredFields",value:function(t,e){if(!Array.isArray(t)||0===t.length)return[];var n=new Set(e),r=new Set,i=[];return t.forEach(function(t){n.has(t)&&!r.has(t)&&(r.add(t),i.push(t))}),i}},{key:"applyChooserPoliciesForFields",value:function(){var t=this.state.headers.map(function(t){return t.field});this.mandatoryFieldsResolved=this.resolveConfiguredFields(this.config.mandatoryFields,t),this.priorityFieldsResolved=this.resolveConfiguredFields(this.config.priorityFields,t);var e=Array.isArray(this.state.visibleFields)?this.state.visibleFields.filter(function(e){return t.includes(e)}):[];e.length||(e=this.state.headers.filter(function(t){return t.visible}).map(function(t){return t.field})),this.mandatoryFieldsResolved.forEach(function(t){e.includes(t)||e.push(t)}),this.state.visibleFields=this.getOrderedVisibleFields(e)}},{key:"getOrderedVisibleFields",value:function(t){var e=new Set(this.state.headers.map(function(t){return t.field})),n=[],r=new Set;if(t.forEach(function(t){e.has(t)&&!r.has(t)&&(r.add(t),n.push(t))}),!this.priorityFieldsResolved.length)return n;var i=new Map;return this.priorityFieldsResolved.forEach(function(t,e){i.set(t,e)}),[].concat(n).sort(function(t,e){var n=i.has(t)?i.get(t):Number.MAX_SAFE_INTEGER,r=i.has(e)?i.get(e):Number.MAX_SAFE_INTEGER;return n!==r?n-r:0})}},{key:"isMandatoryField",value:function(t){return this.mandatoryFieldsResolved.includes(t)}},{key:"getBindableState",value:function(){return{searchTerm:this.state.searchTerm||"",sortField:this.state.sortField||null,sortDir:this.state.sortDir||"asc",filters:m({},this.state.filters||{}),page:Number(this.state.page)||1,visibleFields:u(this.state.visibleFields||[])}}},{key:"getStateSnapshot",value:function(){return this.getBindableState()}},{key:"shouldDispatchPprChange",value:function(t,e,n){return!!n||["searchTerm","sortField","sortDir","filters","page","visibleFields"].includes(t)}},{key:"refreshPpr",value:function(){this.resetViewport(),this.remoteLoaded=!1,this.resolveConfiguredEndpoint()?this.loadData():(this.applyClientProcessing(),this.updateView())}},{key:"applyBindableState",value:function(t){var e=this;if(t&&"object"===l(t)){var n=!1;if("string"==typeof t.searchTerm&&t.searchTerm!==this.state.searchTerm){var r;this.state.searchTerm=t.searchTerm;var i=null===(r=this.element)||void 0===r?void 0:r.querySelector('[data-action="search"]');i&&"value"in i&&(i.value=t.searchTerm),n=!0}if(void 0!==t.sortField){var o=null==t.sortField?null:String(t.sortField);o!==this.state.sortField&&(this.state.sortField=o,n=!0)}if("string"==typeof t.sortDir){var a="desc"===t.sortDir.toLowerCase()?"desc":"asc";a!==this.state.sortDir&&(this.state.sortDir=a,n=!0)}if(t.filters&&"object"===l(t.filters)&&(this.state.filters=m({},t.filters),n=!0),Array.isArray(t.visibleFields)&&this.state.headers.length){var s=new Set(t.visibleFields.map(function(t){return String(t)})),u=this.state.headers.map(function(t){return t.field}).filter(function(t){return e.isMandatoryField(t)||s.has(t)});u.length||(u=this.state.headers.filter(function(t){return!1!==t.visible}).map(function(t){return t.field})),this.state.visibleFields=this.getOrderedVisibleFields(u),n=!0}if(Number.isFinite(Number(t.page))){var c=Math.max(1,Number(t.page));c!==this.state.page&&(this.state.page=c,n=!0)}n&&(this.config.serverSide?this.loadData():(this.applyClientProcessing(),this.updateView()))}}},{key:"destroy",value:function(){var t,n,r,i,o,a;null===(t=this.detailsDialog)||void 0===t||null===(n=t.close)||void 0===n||n.call(t),null===(r=this.loaderState)||void 0===r||null===(i=r.destroy)||void 0===i||i.call(r),null===(o=this.stateBinding)||void 0===o||null===(a=o.disconnect)||void 0===a||a.call(o),this.windowScrollHandler&&(window.removeEventListener("scroll",this.windowScrollHandler),this.windowScrollHandler=null),S(e,"destroy",this,3)([])}}],c=[{key:"selector",get:function(){return"datagrid"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"datagrid"}},{key:"normalizeArgs",value:function(t,e){if(t instanceof Element)return{container:t,config:e||{},autoInit:!0};var n=t||{};return{container:n.container,parent:n.parent,textProvider:n.textProvider||null,config:n.config||{},autoInit:n.autoInit}}}],r&&b(n.prototype,r),c&&b(n,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,c,d,h,p,y,w,k,E,A,P,j,T,x,L,I}(r.Component);C(P,"templateId","datagrid-template"),"undefined"!=typeof window&&(window.DataGrid=P)},994(t,e,n){"use strict";n.r(e),n.d(e,{DataTable:()=>P});var r=n(812),i=n(696),o=n(62),a=n(76);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){u=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(t,e)||c(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||c(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){if(t){if("string"==typeof t)return d(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(t,e):void 0}}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function f(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return h(u,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),u}var a={};function l(){}function s(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(h(e={},r,function(){return this}),e),d=u.prototype=l.prototype=Object.create(c);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,h(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=u,h(d,"constructor",u),h(u,"constructor",s),s.displayName="GeneratorFunction",h(u,i,"GeneratorFunction"),h(d),h(d,i,"Generator"),h(d,r,function(){return this}),h(d,"toString",function(){return"[object Generator]"}),(f=function(){return{w:o,m:p}})()}function h(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}h=function(t,e,n,r){function o(e,n){h(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},h(t,e,n,r)}function p(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function v(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){p(o,r,i,a,l,"next",t)}function l(t){p(o,r,i,a,l,"throw",t)}a(void 0)})}}function y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function m(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?y(Object(n),!0).forEach(function(e){C(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function b(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,A(r.key),r)}}function g(t,e,n){return e=E(e),function(t,e){if(e&&("object"==l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,w()?Reflect.construct(e,n||[],E(t).constructor):e.apply(t,n))}function w(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(w=function(){return!!t})()}function S(t,e,n,r){var i=k(E(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function k(){return k="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=E(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},k.apply(null,arguments)}function E(t){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},E(t)}function O(t,e){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},O(t,e)}function C(t,e,n){return(e=A(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function A(t){var e=function(t){if("object"!=l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==l(e)?e:e+""}var P=function(t){function e(t){var n,r,o,a,l,s,u,c,d,f,h,p,v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var y=e.normalizeArgs(t,v);return(p=g(this,e,[y.container,y.config])).templateId=e.templateId,p.parent=y.parent,p.textProvider=y.textProvider,p.config=m({localLimit:1e4,remoteLimit:50,endpoint:(null===(n=p.container)||void 0===n?void 0:n.getAttribute("data-endpoint"))||(null===(r=p.container)||void 0===r?void 0:r.getAttribute("endpoint"))||null,serverSide:(null===(o=p.container)||void 0===o?void 0:o.hasAttribute("server-side"))||!1,mode:p.resolveMode(p.container),pageSize:Number(null===(a=p.container)||void 0===a?void 0:a.getAttribute("data-page-size"))||25,infiniteChunkSize:Number(null===(l=p.container)||void 0===l?void 0:l.getAttribute("data-infinite-chunk"))||25,mandatoryFields:p.parseFieldListAttr("data-mandatory-fields"),priorityFields:p.parseFieldListAttr("data-priority-fields"),readonlyFields:p.parseFieldListAttr("data-readonly-fields"),columnMetadata:p.parseMetadataAttr("data-column-metadata"),idField:String((null===(s=p.container)||void 0===s?void 0:s.getAttribute("data-id-field"))||"id"),detailsSource:(null===(u=p.container)||void 0===u?void 0:u.getAttribute("data-details-source"))||(null===(c=p.container)||void 0===c?void 0:c.getAttribute("details-source"))||"",detailsCacheEnabled:p.parseBooleanAttr("data-details-cache",!0),detailsCacheMaxSize:p.parsePositiveIntAttr("data-details-cache-size",100),detailsCacheTTL:p.parsePositiveIntAttr("data-details-cache-ttl",0),createMethod:String((null===(d=p.container)||void 0===d?void 0:d.getAttribute("data-create-method"))||"POST").toUpperCase(),updateMethod:String((null===(f=p.container)||void 0===f?void 0:f.getAttribute("data-update-method"))||"PUT").toUpperCase(),renderMode:p.normalizeRenderMode(null===(h=p.container)||void 0===h?void 0:h.getAttribute("data-render-mode")),rows:[],headers:[]},y.config),p.config.endpointTemplate=p.config.endpoint,p.config.requestParams=p.parseObjectAttr("data-request-params"),p.rawRows=[],p.processedRows=[],p.remoteLoaded=!1,p.loadingMore=!1,p.windowScrollHandler=null,p.pinnedColumns={left:[],right:[]},p.onPinnedResize=null,p.localRowPool=[],p.localRowsVersion=0,p.localRowsRenderedVersion=-1,p.state={rows:[],headers:[],page:1,totalPages:1,totalCount:0,sortField:null,sortDir:"asc",searchTerm:"",filters:{},visibleColumns:[],columnChooserOpen:!1,hasMore:!1,visibleStart:0,visibleEnd:0},p.mandatoryFieldsResolved=[],p.priorityFieldsResolved=[],p.detailsDialog=new i.q,p.detailsCache=new Map,!1!==y.autoInit&&p.init(),p}return function(t,e){if("function"!=typeof e&&null!==e)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&&O(t,e)}(e,t),n=e,r=[{key:"validateStructure",value:function(){if(S(e,"validateStructure",this,3)([]),!this.container)throw new Error("DataTable requires a container element")}},{key:"init",value:(R=v(f().m(function t(){return f().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return R.apply(this,arguments)})},{key:"render",value:(I=v(f().m(function t(){var n,r,i,l,s,u,c,d,h,p,v,y,m,b,g,w=this;return f().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,S(e,"render",this,3)([]);case 1:return this.element=this.container.querySelector(".holi-datatable"),this.contentEl=null===(n=this.element)||void 0===n?void 0:n.querySelector(".datatable-content"),this.thead=null===(r=this.element)||void 0===r?void 0:r.querySelector('[data-role="thead"]'),this.tbody=null===(i=this.element)||void 0===i?void 0:i.querySelector('[data-role="tbody"]'),this.columnChooser=null===(l=this.element)||void 0===l?void 0:l.querySelector('[data-role="column-chooser"]'),this.columnChooserList=null===(s=this.element)||void 0===s?void 0:s.querySelector('[data-role="column-chooser-list"]'),this.resultCount=null===(u=this.element)||void 0===u?void 0:u.querySelector('[data-role="result-count"]'),this.pageInfo=null===(c=this.element)||void 0===c?void 0:c.querySelector('[data-role="page-info"]'),this.paginationControls=null===(d=this.element)||void 0===d?void 0:d.querySelector('[data-role="pagination-controls"]'),this.requestStatus=null===(h=this.element)||void 0===h?void 0:h.querySelector('[data-role="request-status"]'),this.requestStatusText=null===(p=this.element)||void 0===p?void 0:p.querySelector('[data-role="request-status-text"]'),this.retryButton=null===(v=this.element)||void 0===v?void 0:v.querySelector('[data-action="retry-load"]'),this.headerCellTemplate=null===(y=this.element)||void 0===y?void 0:y.querySelector('template[data-role="header-cell-template"]'),this.rowCellTemplate=null===(m=this.element)||void 0===m?void 0:m.querySelector('template[data-role="row-cell-template"]'),this.actionsCellTemplate=null===(b=this.element)||void 0===b?void 0:b.querySelector('template[data-role="actions-cell-template"]'),this.emptyRowTemplate=null===(g=this.element)||void 0===g?void 0:g.querySelector('template[data-role="empty-row-template"]'),this.loaderState=(0,o.w)(this,{host:this.element,busyTarget:this.contentEl||this.element,scope:"block",defaultMessage:"Loading data..."}),this.stateBinding=(0,a.x)(this,{defaultPath:"datatable",eventName:"stateupdate",getSnapshot:function(t){return t.getBindableState()},applySnapshot:function(t,e){return t.applyBindableState(e)}}),this.initEventDelegation(),this.initScrollingMode(),this.onPinnedResize=function(){return w.applyPinnedStyles()},window.addEventListener("resize",this.onPinnedResize),t.n=2,this.loadData();case 2:return t.a(2)}},t,this)})),function(){return I.apply(this,arguments)})},{key:"initEventDelegation",value:function(){var t=this;this.element&&(this.element.addEventListener("click",function(e){return t.handleAction(e)}),this.element.addEventListener("input",function(e){return t.handleInput(e)}),this.element.addEventListener("change",function(e){return t.handleChange(e)}))}},{key:"handleAction",value:function(t){var e,n,r,i,o=null===(e=t.target)||void 0===e||null===(n=e.closest)||void 0===n?void 0:n.call(e,"[data-action]"),a=null==o||null===(r=o.dataset)||void 0===r?void 0:r.action,l=null==o||null===(i=o.dataset)||void 0===i?void 0:i.field;if("sort"===a&&l)this.sort(l);else{if("toggle-columns"===a)return this.state.columnChooserOpen=!this.state.columnChooserOpen,void this.renderColumnChooser();if("add-row"!==a)if("view-row"!==a&&"edit-row"!==a)"prev-page"!==a?"next-page"!==a?"retry-load"===a&&this.retryLoad():this.gotoPage(this.state.page+1):this.gotoPage(this.state.page-1);else{var s,u=Number(null==o||null===(s=o.dataset)||void 0===s?void 0:s.rowIndex);if(Number.isNaN(u)||u<0)return;var c=this.isLocalDomReuseEnabled()?this.processedRows:this.state.rows;if(u>=c.length)return;var d=c[u];this.openDetailsDialog("edit-row"===a?"edit":"view",d)}else this.openDetailsDialog("add")}}},{key:"handleInput",value:function(t){var e;"search"===(null===(e=t.target)||void 0===e||null===(e=e.dataset)||void 0===e?void 0:e.action)&&(this.state.searchTerm=t.target.value||"",this.resetViewport(),this.config.serverSide?this.loadData():(this.applyClientProcessing(),this.updateView()))}},{key:"handleChange",value:function(t){var e,n,r,i=t.target,o=null==i||null===(e=i.dataset)||void 0===e?void 0:e.action,a=null==i||null===(n=i.dataset)||void 0===n?void 0:n.field,l=null==i||null===(r=i.dataset)||void 0===r?void 0:r.filter;if("toggle-column"===o&&a){var s=!!i.checked;return this.setColumnVisibility(a,s),void this.updateView()}if(l){var u=String(i.value||"").trim();u&&"all"!==u.toLowerCase()?this.state.filters[l]=u:delete this.state.filters[l],this.resetViewport(),this.config.serverSide?this.loadData():(this.applyClientProcessing(),this.updateView())}}},{key:"sort",value:(L=v(f().m(function t(e){return f().w(function(t){for(;;)switch(t.n){case 0:if(this.state.sortField===e?this.state.sortDir="asc"===this.state.sortDir?"desc":"asc":(this.state.sortField=e,this.state.sortDir="asc"),this.resetViewport(),!this.config.serverSide){t.n=2;break}return t.n=1,this.loadRemote(!0,!1);case 1:t.n=3;break;case 2:this.applyClientProcessing();case 3:this.updateView();case 4:return t.a(2)}},t,this)})),function(t){return L.apply(this,arguments)})},{key:"loadData",value:(x=v(f().m(function t(){return f().w(function(t){for(;;)switch(t.n){case 0:if(!this.resolveConfiguredEndpoint()){t.n=3;break}return t.n=1,this.loadRemote(this.config.serverSide,!1);case 1:if(t.v){t.n=2;break}return this.updateView(),t.a(2);case 2:t.n=4;break;case 3:return t.n=4,this.loadLocal();case 4:if(this.hydrateFilterControls(),this.config.serverSide||this.applyClientProcessing(),this.updateView(),!this.config.serverSide||"infinite"!==this.config.mode){t.n=5;break}return t.n=5,this.prefillInfiniteViewport();case 5:return t.a(2)}},t,this)})),function(){return x.apply(this,arguments)})},{key:"loadRemote",value:(T=v(f().m(function t(){var e,n,r,i,o,a,l,s=this,c=arguments;return f().w(function(t){for(;;)switch(t.p=t.n){case 0:if(e=c.length>0&&void 0!==c[0]&&c[0],n=c.length>1&&void 0!==c[1]&&c[1],!this.remoteLoaded||e||this.config.serverSide){t.n=1;break}return t.a(2);case 1:if(r=this.buildEndpointUrl(!0)){t.n=2;break}return t.a(2,!1);case 2:return this.setRequestStatus("loading","Loading page ".concat(this.state.page,"...")),t.p=3,t.n=4,fetch(r);case 4:if((o=t.v).ok){t.n=5;break}throw new Error("HTTP ".concat(o.status));case 5:return t.n=6,o.json();case 6:i=t.v,t.n=8;break;case 7:return t.p=7,t.v,this.setRequestStatus("error","Request failed"),t.a(2,!1);case 8:if(a=Array.isArray(i.rows)?i.rows:[],this.rawRows=a,l=Array.isArray(i.headers)?i.headers.map(function(t){return s.normalizeHeaderDefinition(t)}).filter(Boolean):this.deriveHeaders(a),this.state.headers=l,this.applyChooserPoliciesForColumns(),this.state.totalPages=Number(i.totalPages)||1,this.state.totalCount=Number(i.totalCount)||a.length,!this.config.serverSide){t.n=9;break}return this.state.rows=n?[].concat(u(this.state.rows),u(a)):a,this.processedRows=u(this.state.rows),this.state.hasMore="infinite"===this.config.mode&&this.state.page<this.state.totalPages,"infinite"!==this.config.mode||this.state.hasMore?this.setRequestStatus("idle",""):this.setRequestStatus("end","No more records"),t.a(2,!0);case 9:return this.remoteLoaded=!0,this.setRequestStatus("idle",""),t.a(2,!0)}},t,this,[[3,7]])})),function(){return T.apply(this,arguments)})},{key:"loadLocal",value:(j=v(f().m(function t(){var e=this;return f().w(function(t){for(;;)switch(t.n){case 0:this.rawRows=Array.isArray(this.config.rows)?this.config.rows:[],this.state.headers=Array.isArray(this.config.headers)?this.config.headers.map(function(t){return e.normalizeHeaderDefinition(t)}).filter(Boolean):this.deriveHeaders(this.rawRows),this.applyChooserPoliciesForColumns(),this.state.totalPages=1,this.state.totalCount=this.rawRows.length;case 1:return t.a(2)}},t,this)})),function(){return j.apply(this,arguments)})},{key:"buildEndpointUrl",value:function(t){var e=this.resolveConfiguredEndpoint();if(!e)return"";if(!t)return e;var n="pagination"===this.config.mode?this.config.pageSize:"infinite"===this.config.mode?this.config.infiniteChunkSize:this.config.remoteLimit,r=new URLSearchParams(m({page:String(this.state.page),limit:String(n),sort:"".concat(this.state.sortField||"",",").concat(this.state.sortDir),q:this.state.searchTerm},this.state.filters)),i=this.resolveRequestParams();return Object.entries(i).forEach(function(t){var e=s(t,2),n=e[0],i=e[1];null!=i&&""!==i&&r.set(n,String(i))}),"".concat(e,"?").concat(r)}},{key:"deriveHeaders",value:function(t){var e=t[0];return e&&"object"===l(e)?Object.keys(e).map(function(t){return{field:t,label:t,visible:!0,pinned:null}}):[]}},{key:"normalizeRenderMode",value:function(t){return"template-clone"===String(t||"").trim().toLowerCase()?"template-clone":"programmatic"}},{key:"normalizeHeaderDefinition",value:function(t){var e,n;if(!t||"object"!==l(t))return null;var r=String(null!==(e=null!==(n=t.field)&&void 0!==n?n:t.key)&&void 0!==e?e:"").trim();return r?m(m({},t),{},{field:r,label:t.label||r,visible:!1!==t.visible,pinned:this.normalizePinnedSide(t.pinned)}):null}},{key:"normalizePinnedSide",value:function(t){if(null==t)return null;var e=String(t).trim().toLowerCase();return"left"===e||"right"===e?e:null}},{key:"applyClientProcessing",value:function(){var t=Array.isArray(this.rawRows)?u(this.rawRows):[];t=this.applyFilters(t),t=this.applySearch(t),t=this.applySort(t),this.processedRows=t,this.bumpLocalRowsVersion(),this.applyViewport(t)}},{key:"applyViewport",value:function(t){if("pagination"===this.config.mode){var e=Math.max(1,Number(this.config.pageSize)||25),n=Math.max(1,Math.ceil(t.length/e));this.state.totalPages=n,this.state.page=Math.min(Math.max(1,this.state.page),n);var r=(this.state.page-1)*e,i=r+e;return this.state.rows=t.slice(r,i),this.state.hasMore=!1,this.state.visibleStart=r,void(this.state.visibleEnd=Math.min(i,t.length))}if("infinite"===this.config.mode){var o=Math.max(1,Number(this.config.infiniteChunkSize)||25),a=this.state.page*o;return this.state.rows=t.slice(0,a),this.state.hasMore=a<t.length,this.state.totalPages=1,this.state.visibleStart=0,void(this.state.visibleEnd=Math.min(a,t.length))}this.state.rows=t,this.state.totalPages=1,this.state.hasMore=!1,this.state.visibleStart=0,this.state.visibleEnd=t.length}},{key:"applyFilters",value:function(t){var e=Object.entries(this.state.filters||{});return e.length?t.filter(function(t){return e.every(function(e){var n=s(e,2),r=n[0],i=n[1],o=null==t?void 0:t[r];return null!=o&&String(o).toLowerCase()===String(i).toLowerCase()})}):t}},{key:"applySearch",value:function(t){var e=String(this.state.searchTerm||"").trim().toLowerCase();if(!e)return t;var n=this.state.headers.map(function(t){return t.field});return t.filter(function(t){return n.some(function(n){var r=null==t?void 0:t[n];return null!=r&&String(r).toLowerCase().includes(e)})})}},{key:"applySort",value:function(t){var e=this.state.sortField;if(!e)return t;var n="desc"===this.state.sortDir?-1:1;return t.sort(function(t,r){var i=null==t?void 0:t[e],o=null==r?void 0:r[e];if(null==i&&null==o)return 0;if(null==i)return-1*n;if(null==o)return 1*n;var a=Number(i),l=Number(o);return Number.isNaN(a)||Number.isNaN(l)?String(i).localeCompare(String(o),void 0,{numeric:!0,sensitivity:"base"})*n:(a-l)*n})}},{key:"setColumnVisibility",value:function(t,e){var n=this.state.headers.find(function(e){return e.field===t});n&&(!e&&this.isMandatoryField(t)||(n.visible=e,this.state.visibleColumns=this.getOrderedVisibleColumns(),this.bumpLocalRowsVersion()))}},{key:"hydrateFilterControls",value:function(){var t,e=this,n=null===(t=this.element)||void 0===t?void 0:t.querySelectorAll("[data-filter]");null!=n&&n.length&&n.forEach(function(t){if(t instanceof HTMLSelectElement&&!(t.options.length>1)){var n=t.dataset.filter;if(n){var r=new Set;e.rawRows.forEach(function(t){null!=(null==t?void 0:t[n])&&r.add(String(t[n]))}),Array.from(r).sort(function(t,e){return t.localeCompare(e,void 0,{numeric:!0,sensitivity:"base"})}).forEach(function(e){var n=document.createElement("option");n.value=e,n.textContent=e,t.appendChild(n)})}}})}},{key:"updateView",value:function(){this.renderHeaders(),this.renderRows(),!this.config.serverSide&&this.ensureInfiniteScrollable()&&this.renderRows(),this.renderColumnChooser(),this.renderMeta(),this.renderPagination(),this.renderRequestStatus(),this.applyPinnedStyles(),this.dispatchEvent("stateupdate",this.state)}},{key:"renderHeaders",value:function(){var t=this;if(this.thead)if(this.thead.replaceChildren(),"template-clone"===this.config.renderMode&&this.headerCellTemplate)this.renderHeadersFromTemplates();else{var e=document.createElement("tr");this.state.visibleColumns.forEach(function(n){var r=document.createElement("th");r.dataset.field=n.field;var i=document.createElement("button");i.type="button",i.dataset.action="sort",i.dataset.field=n.field,i.textContent=t.getHeaderLabel(n),r.appendChild(i),e.appendChild(r)});var n=document.createElement("th");n.textContent="Actions",e.appendChild(n),this.thead.appendChild(e)}}},{key:"renderHeadersFromTemplates",value:function(){var t=this;if(this.thead){var e=document.createElement("tr");this.state.visibleColumns.forEach(function(n){var r=t.cloneFirstElementFromTemplate(t.headerCellTemplate);if(r instanceof HTMLTableCellElement){r.dataset.field=n.field;var i=r.querySelector('[data-action="sort"]');i instanceof HTMLButtonElement&&(i.dataset.field=n.field);var o=r.querySelector('[data-role="header-label"]');o?o.textContent=t.getHeaderLabel(n):r.textContent=t.getHeaderLabel(n),e.appendChild(r)}});var n=document.createElement("th");n.textContent="Actions",e.appendChild(n),this.thead.appendChild(e)}}},{key:"getHeaderLabel",value:function(t){var e=t.label||t.field;return this.state.sortField!==t.field?e:"".concat(e," ").concat("asc"===this.state.sortDir?"^":"v")}},{key:"renderRows",value:function(){var t=this;if(this.tbody)if(this.isLocalDomReuseEnabled())this.renderRowsWithLocalPool();else{if(this.tbody.replaceChildren(),!this.state.rows.length){if("template-clone"===this.config.renderMode&&this.emptyRowTemplate)return void this.renderEmptyRowFromTemplate();var e=document.createElement("tr"),n=document.createElement("td");return n.colSpan=Math.max(this.state.visibleColumns.length+1,1),n.textContent="No matching records",e.appendChild(n),void this.tbody.appendChild(e)}this.state.rows.forEach(function(e,n){var r=document.createElement("tr");"template-clone"===t.config.renderMode&&t.rowCellTemplate?t.renderRowCellsFromTemplate(r,e):t.state.visibleColumns.forEach(function(t){var n=document.createElement("td");n.dataset.field=t.field;var i=null==e?void 0:e[t.field];n.textContent=null==i?"":String(i),r.appendChild(n)});var i=t.createActionsCell(n);r.appendChild(i),t.tbody.appendChild(r)})}}},{key:"isLocalDomReuseEnabled",value:function(){return!this.config.serverSide}},{key:"bumpLocalRowsVersion",value:function(){this.localRowsVersion+=1}},{key:"renderRowsWithLocalPool",value:function(){if(this.tbody){if(!this.processedRows.length){if(this.localRowPool=[],this.localRowsRenderedVersion=this.localRowsVersion,this.tbody.replaceChildren(),"template-clone"===this.config.renderMode&&this.emptyRowTemplate)return void this.renderEmptyRowFromTemplate();var t=document.createElement("tr"),e=document.createElement("td");return e.colSpan=Math.max(this.state.visibleColumns.length+1,1),e.textContent="No matching records",t.appendChild(e),void this.tbody.appendChild(t)}this.localRowsRenderedVersion!==this.localRowsVersion?this.rebuildLocalRowPool():this.applyLocalRowVisibility()}}},{key:"rebuildLocalRowPool",value:function(){var t=this;this.tbody&&(this.tbody.replaceChildren(),this.localRowPool=[],this.processedRows.forEach(function(e,n){var r=document.createElement("tr");"template-clone"===t.config.renderMode&&t.rowCellTemplate?t.renderRowCellsFromTemplate(r,e):t.state.visibleColumns.forEach(function(t){var n=document.createElement("td");n.dataset.field=t.field;var i=null==e?void 0:e[t.field];n.textContent=null==i?"":String(i),r.appendChild(n)}),r.appendChild(t.createActionsCell(n)),t.localRowPool.push(r),t.tbody.appendChild(r)}),this.localRowsRenderedVersion=this.localRowsVersion,this.applyLocalRowVisibility())}},{key:"applyLocalRowVisibility",value:function(){var t=Math.max(0,Number(this.state.visibleStart)||0),e=Math.max(t,Number(this.state.visibleEnd)||0);if("infinite"!==this.config.mode)this.localRowPool.forEach(function(n,r){n.hidden=r<t||r>=e});else{var n=Math.max(0,e-t);this.localRowPool.forEach(function(t,e){t.hidden=e>=n})}}},{key:"renderEmptyRowFromTemplate",value:function(){var t,e=this.cloneFirstElementFromTemplate(this.emptyRowTemplate);if(e instanceof HTMLTableRowElement){var n=e.querySelector('[data-role="empty-cell"]');n instanceof HTMLTableCellElement&&(n.colSpan=Math.max(this.state.visibleColumns.length+1,1)),null===(t=this.tbody)||void 0===t||t.appendChild(e)}}},{key:"renderRowCellsFromTemplate",value:function(t,e){var n=this;this.state.visibleColumns.forEach(function(r){var i=n.cloneFirstElementFromTemplate(n.rowCellTemplate);if(i instanceof HTMLTableCellElement){i.dataset.field=r.field;var o=null==e?void 0:e[r.field];i.textContent=null==o?"":String(o),t.appendChild(i)}})}},{key:"createActionsCell",value:function(t){var e=this.cloneFirstElementFromTemplate(this.actionsCellTemplate);if(e instanceof HTMLTableCellElement)return e.classList.add("datatable-actions-cell"),e.querySelectorAll('[data-action][data-role="row-action"]').forEach(function(e){e instanceof HTMLButtonElement&&(e.dataset.rowIndex=String(t))}),e;var n=document.createElement("td");n.className="datatable-actions-cell";var r=document.createElement("button");r.type="button",r.dataset.action="view-row",r.dataset.rowIndex=String(t),r.textContent="View",n.appendChild(r);var i=document.createElement("button");return i.type="button",i.dataset.action="edit-row",i.dataset.rowIndex=String(t),i.textContent="Edit",n.appendChild(i),n}},{key:"cloneFirstElementFromTemplate",value:function(t){return t instanceof HTMLTemplateElement&&t.content.cloneNode(!0).firstElementChild||null}},{key:"renderColumnChooser",value:function(){var t=this;this.columnChooser&&(this.columnChooser.hidden=!this.state.columnChooserOpen),this.columnChooserList&&(this.columnChooserList.replaceChildren(),this.state.headers.forEach(function(e){var n=document.createElement("label");n.className="datatable-column-option";var r=document.createElement("input");r.type="checkbox",r.dataset.action="toggle-column",r.dataset.field=e.field,r.checked=!1!==e.visible,r.disabled=t.isMandatoryField(e.field);var i=document.createElement("span");i.textContent=e.label||e.field,n.appendChild(r),n.appendChild(i),t.columnChooserList.appendChild(n)}))}},{key:"renderMeta",value:function(){this.resultCount&&(this.config.serverSide?this.resultCount.textContent="".concat(this.state.rows.length," shown / ").concat(this.state.totalCount," total"):this.resultCount.textContent="".concat(this.processedRows.length," rows"))}},{key:"renderPagination",value:function(){if(this.paginationControls&&this.pageInfo)if("pagination"===this.config.mode){this.paginationControls.hidden=!1,this.pageInfo.textContent="Page ".concat(this.state.page," of ").concat(this.state.totalPages);var t=this.paginationControls.querySelector('[data-action="prev-page"]'),e=this.paginationControls.querySelector('[data-action="next-page"]');t&&(t.disabled=this.state.page<=1),e&&(e.disabled=this.state.page>=this.state.totalPages)}else this.paginationControls.hidden=!0}},{key:"gotoPage",value:(P=v(f().m(function t(e){var n;return f().w(function(t){for(;;)switch(t.n){case 0:if("pagination"===this.config.mode){t.n=1;break}return t.a(2);case 1:if(n=Math.min(Math.max(1,e),Math.max(1,this.state.totalPages)),this.state.page=n,!this.config.serverSide){t.n=4;break}return t.n=2,this.loadRemote(!0,!1);case 2:if(t.v){t.n=3;break}return this.updateView(),t.a(2);case 3:t.n=5;break;case 4:this.applyViewport(this.processedRows);case 5:this.updateView();case 6:return t.a(2)}},t,this)})),function(t){return P.apply(this,arguments)})},{key:"resolveMode",value:function(t){var e=String((null==t?void 0:t.getAttribute("data-mode"))||"").trim().toLowerCase();return"pagination"===e||"infinite"===e?e:null!=t&&t.hasAttribute("infinite-scroll")?"infinite":null!=t&&t.hasAttribute("pagination")?"pagination":"standard"}},{key:"resetViewport",value:function(){this.state.page=1,this.contentEl&&(this.contentEl.scrollTop=0)}},{key:"initScrollingMode",value:function(){var t,e=this;if("infinite"===this.config.mode&&this.contentEl){this.contentEl.classList.add("datatable-scrollable");var n=(null===(t=this.container)||void 0===t?void 0:t.getAttribute("data-scroll-height"))||"420px";this.contentEl.style.maxHeight=n,this.contentEl.style.overflowY="auto",this.contentEl.addEventListener("scroll",function(){e.handleInfiniteScroll()}),this.config.serverSide||(this.windowScrollHandler=function(){e.handleWindowInfiniteScroll()},window.addEventListener("scroll",this.windowScrollHandler,{passive:!0}))}}},{key:"handleInfiniteScroll",value:(A=v(f().m(function t(){return f().w(function(t){for(;;)switch(t.n){case 0:if("infinite"===this.config.mode&&this.contentEl&&this.state.hasMore&&!this.loadingMore){t.n=1;break}return t.a(2);case 1:if(this.contentEl.scrollTop+this.contentEl.clientHeight>=this.contentEl.scrollHeight-48){t.n=2;break}return t.a(2);case 2:if(this.loadingMore=!0,this.state.page+=1,!this.config.serverSide){t.n=5;break}return t.n=3,this.loadRemote(!0,!0);case 3:if(t.v){t.n=4;break}return this.loadingMore=!1,this.updateView(),t.a(2);case 4:t.n=6;break;case 5:this.applyViewport(this.processedRows);case 6:this.renderRows(),this.applyPinnedStyles(),this.renderMeta(),this.loadingMore=!1;case 7:return t.a(2)}},t,this)})),function(){return A.apply(this,arguments)})},{key:"handleWindowInfiniteScroll",value:(E=v(f().m(function t(){var e,n;return f().w(function(t){for(;;)switch(t.n){case 0:if("infinite"===this.config.mode&&this.state.hasMore&&!this.loadingMore){t.n=1;break}return t.a(2);case 1:if(n=null===(e=this.container)||void 0===e?void 0:e.getBoundingClientRect()){t.n=2;break}return t.a(2);case 2:if(n.bottom<=window.innerHeight+120){t.n=3;break}return t.a(2);case 3:if(this.loadingMore=!0,this.state.page+=1,!this.config.serverSide){t.n=6;break}return t.n=4,this.loadRemote(!0,!0);case 4:if(t.v){t.n=5;break}return this.loadingMore=!1,this.updateView(),t.a(2);case 5:t.n=7;break;case 6:this.applyViewport(this.processedRows);case 7:this.renderRows(),this.applyPinnedStyles(),this.renderMeta(),this.loadingMore=!1;case 8:return t.a(2)}},t,this)})),function(){return E.apply(this,arguments)})},{key:"prefillInfiniteViewport",value:(k=v(f().m(function t(){var e,n;return f().w(function(t){for(;;)switch(t.n){case 0:if(this.contentEl&&"infinite"===this.config.mode&&this.config.serverSide){t.n=1;break}return t.a(2);case 1:e=10,n=0;case 2:if(!(this.state.hasMore&&this.contentEl.scrollHeight<=this.contentEl.clientHeight&&n<e)){t.n=5;break}return this.loadingMore=!0,this.state.page+=1,t.n=3,this.loadRemote(!0,!0);case 3:if(t.v){t.n=4;break}return this.loadingMore=!1,t.a(3,5);case 4:this.renderRows(),this.applyPinnedStyles(),this.renderMeta(),this.loadingMore=!1,n+=1,t.n=2;break;case 5:return t.a(2)}},t,this)})),function(){return k.apply(this,arguments)})},{key:"ensureInfiniteScrollable",value:function(){if("infinite"!==this.config.mode||!this.contentEl||!this.state.hasMore)return!1;for(var t=0,e=!1;this.state.hasMore&&this.contentEl.scrollHeight<=this.contentEl.clientHeight&&t<10;)this.state.page+=1,this.applyViewport(this.processedRows),t+=1,e=!0;return e}},{key:"openDetailsDialog",value:(w=v(f().m(function t(e){var n,r,i,o,a=this,l=arguments;return f().w(function(t){for(;;)switch(t.n){case 0:return n=l.length>1&&void 0!==l[1]?l[1]:null,t.n=1,this.resolveDetailsRecord(e,n);case 1:r=t.v,i=this.resolveDetailFields(r),o=this.config.readonlyFields||[],this.detailsDialog.open({title:"Record",mode:e,record:r,fields:i,readonlyFields:o,onSave:function(){var t=v(f().m(function t(e,n){var r;return f().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,a.persistRecord(e,"add"===n);case 1:return r=t.v,t.n=2,a.refreshAfterMutation(r,"add"===n);case 2:return a.seedDetailsCache(r),t.a(2,r)}},t)}));return function(e,n){return t.apply(this,arguments)}}()});case 2:return t.a(2)}},t,this)})),function(t){return w.apply(this,arguments)})},{key:"resolveDetailsRecord",value:(y=v(f().m(function t(e,n){var r,i,o,a,s,u,c,d,h,p,v,y;return f().w(function(t){for(;;)switch(t.p=t.n){case 0:if("add"!==e){t.n=1;break}return t.a(2,this.createEmptyRecord());case 1:if(n&&"object"===l(n)){t.n=2;break}return t.a(2,this.createEmptyRecord());case 2:if(r=this.cloneRow(n),i=this.getRecordId(n)){t.n=3;break}return t.a(2,r);case 3:if(this.shouldFetchDetails(e)){t.n=4;break}return t.a(2,r);case 4:if(!(o=this.getCachedDetails(i))){t.n=5;break}return t.a(2,this.mergeDetailRecord(r,o));case 5:if(a=this.buildDetailsEndpoint(i,n)){t.n=6;break}return t.a(2,r);case 6:return s=!1,t.p=7,null===(u=this.detailsDialog)||void 0===u||null===(c=u.openLoading)||void 0===c||c.call(u,{title:"Record"}),s=!0,t.n=8,fetch(a,{method:"GET",credentials:"same-origin"});case 8:if((d=t.v).ok){t.n=9;break}return t.a(2,r);case 9:return t.n=10,d.json().catch(function(){return null});case 10:if(h=t.v,p=this.extractDetailsPayload(h)){t.n=11;break}return t.a(2,r);case 11:return this.setCachedDetails(i,p),t.a(2,this.mergeDetailRecord(r,p));case 12:return t.p=12,t.v,t.a(2,r);case 13:return t.p=13,s&&(null===(v=this.detailsDialog)||void 0===v||null===(y=v.close)||void 0===y||y.call(v)),t.f(13);case 14:return t.a(2)}},t,this,[[7,12,13,14]])})),function(t,e){return y.apply(this,arguments)})},{key:"shouldFetchDetails",value:function(t){return("view"===t||"edit"===t)&&!!String(this.config.detailsSource||"").trim()}},{key:"buildDetailsEndpoint",value:function(t,e){var n=String(this.config.detailsSource||"").trim();if(!n)return"";var r=n,i=String(this.config.idField||"id"),o=C({id:t},i,t);if(Object.keys(o).forEach(function(t){var e,n=encodeURIComponent(String(null!==(e=o[t])&&void 0!==e?e:""));r=r.replace(new RegExp("@\\{\\s*".concat(t,"\\s*\\}"),"g"),n)}),r.includes("@{")&&(r=r.replace(/@\{([^}]+)\}/g,function(t,n){var r=String(n||"").trim(),i=null==e?void 0:e[r];return null==i?"":encodeURIComponent(String(i))})),!/[?&](id|rowId|recordId|key)=/.test(r)&&!n.includes("@{")){var a=r.includes("?")?"&":"?";r="".concat(r).concat(a).concat(encodeURIComponent(i),"=").concat(encodeURIComponent(t))}return r}},{key:"extractDetailsPayload",value:function(t){return t&&"object"===l(t)?t.row&&"object"===l(t.row)?this.cloneRow(t.row):t.record&&"object"===l(t.record)?this.cloneRow(t.record):t.data&&"object"===l(t.data)&&!Array.isArray(t.data)?this.cloneRow(t.data):Array.isArray(t)?null:this.cloneRow(t):null}},{key:"mergeDetailRecord",value:function(t,e){var n=t&&"object"===l(t)?t:{},r=e&&"object"===l(e)?e:{};return m(m({},n),r)}},{key:"resolveDetailFields",value:function(t){var e=this,n=[],r=new Set,i=this.config.columnMetadata||{};return this.state.headers.forEach(function(o){var a=String(o.field||"").trim();if(a&&!r.has(a)){r.add(a);var s=i[a]&&"object"===l(i[a])?i[a]:{};n.push({name:a,label:s.label||o.label||a,type:s.formFieldType||s.type||e.inferFieldType(null==t?void 0:t[a]),required:s.required,optional:s.optional,readonly:s.readonly,constraints:s.constraints&&"object"===l(s.constraints)?s.constraints:{},lov:s.lov||s.options||[]})}}),Object.keys(t||{}).forEach(function(o){if(!r.has(o)){r.add(o);var a=i[o]&&"object"===l(i[o])?i[o]:{};n.push({name:o,label:a.label||o,type:a.formFieldType||a.type||e.inferFieldType(null==t?void 0:t[o]),required:a.required,optional:a.optional,readonly:a.readonly,constraints:a.constraints&&"object"===l(a.constraints)?a.constraints:{},lov:a.lov||a.options||[]})}}),n}},{key:"inferFieldType",value:function(t){return"boolean"==typeof t?"boolean":"number"==typeof t?"number":"text"}},{key:"createEmptyRecord",value:function(){var t={};return this.state.headers.forEach(function(e){t[e.field]=""}),t}},{key:"cloneRow",value:function(t){return JSON.parse(JSON.stringify(t||{}))}},{key:"getRecordId",value:function(t){if(!t||"object"!==l(t))return"";var e=t[String(this.config.idField||"id")];return null==e?"":String(e)}},{key:"getCachedDetails",value:function(t){if(!this.config.detailsCacheEnabled||!t||!this.detailsCache.has(t))return null;var e=this.detailsCache.get(t);if(!e)return null;var n=Number(this.config.detailsCacheTTL)||0;return n>0&&Date.now()-e.ts>n?(this.detailsCache.delete(t),null):(this.detailsCache.delete(t),this.detailsCache.set(t,e),this.cloneRow(e.data))}},{key:"setCachedDetails",value:function(t,e){if(this.config.detailsCacheEnabled&&t&&e&&"object"===l(e)){this.detailsCache.has(t)&&this.detailsCache.delete(t),this.detailsCache.set(t,{data:this.cloneRow(e),ts:Date.now()});for(var n=Math.max(1,Number(this.config.detailsCacheMaxSize)||100);this.detailsCache.size>n;){var r=this.detailsCache.keys().next().value;this.detailsCache.delete(r)}}}},{key:"seedDetailsCache",value:function(t){var e=this.getRecordId(t);e&&this.setCachedDetails(e,t)}},{key:"clearDetailsCache",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.detailsCache&&(null!=t?this.detailsCache.delete(String(t)):this.detailsCache.clear())}},{key:"getDetailsCacheStats",value:function(){return{size:this.detailsCache.size,max:Math.max(1,Number(this.config.detailsCacheMaxSize)||100),ttl:Number(this.config.detailsCacheTTL)||0,keys:Array.from(this.detailsCache.keys())}}},{key:"getSaveEndpoint",value:function(){return String(this.config.detailsSource||"").trim()||String(this.config.endpoint||"").trim()}},{key:"persistRecord",value:(p=v(f().m(function t(e,n){var r,i,o,a,s,u;return f().w(function(t){for(;;)switch(t.n){case 0:if((r=this.getSaveEndpoint())&&(this.config.serverSide||-1===r.indexOf(".json"))){t.n=1;break}return t.a(2,this.persistRecordLocal(e,n));case 1:return i=n?this.config.createMethod:this.config.updateMethod,o={id:this.getRecordId(e),row:e},t.n=2,fetch(r,{method:i,credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});case 2:if((a=t.v).ok){t.n=3;break}throw new Error("Save failed (".concat(a.status,")"));case 3:return t.n=4,a.json().catch(function(){return{}});case 4:return s=t.v,u=null!=s&&s.row&&"object"===l(s.row)?s.row:e,t.a(2,u)}},t,this)})),function(t,e){return p.apply(this,arguments)})},{key:"persistRecordLocal",value:function(t,e){var n=this,r=this.getRecordId(t);if(e||!r){if(!r){var i=this.getNextLocalId();t[this.config.idField]=i}return this.rawRows.unshift(this.cloneRow(t)),t}var o=this.rawRows.findIndex(function(t){return n.getRecordId(t)===r});return o>=0?this.rawRows[o]=this.cloneRow(t):this.rawRows.unshift(this.cloneRow(t)),t}},{key:"getNextLocalId",value:function(){var t=this,e=0;return this.rawRows.forEach(function(n){var r=Number(null==n?void 0:n[t.config.idField]);Number.isNaN(r)||(e=Math.max(e,r))}),e+1}},{key:"refreshAfterMutation",value:(h=v(f().m(function t(e,n){var r,i,o=this;return f().w(function(t){for(;;)switch(t.n){case 0:if(!this.config.serverSide){t.n=2;break}return this.resetViewport(),t.n=1,this.loadData();case 1:return t.a(2);case 2:n||(r=this.getRecordId(e),(i=this.rawRows.findIndex(function(t){return o.getRecordId(t)===r}))>=0&&(this.rawRows[i]=this.cloneRow(e))),this.applyClientProcessing(),this.updateView();case 3:return t.a(2)}},t,this)})),function(t,e){return h.apply(this,arguments)})},{key:"destroy",value:function(){var t,n,r,i,o,a;null===(t=this.detailsDialog)||void 0===t||null===(n=t.close)||void 0===n||n.call(t),null===(r=this.loaderState)||void 0===r||null===(i=r.destroy)||void 0===i||i.call(r),null===(o=this.stateBinding)||void 0===o||null===(a=o.disconnect)||void 0===a||a.call(o),this.onPinnedResize&&(window.removeEventListener("resize",this.onPinnedResize),this.onPinnedResize=null),this.windowScrollHandler&&(window.removeEventListener("scroll",this.windowScrollHandler),this.windowScrollHandler=null),S(e,"destroy",this,3)([])}},{key:"setRequestStatus",value:function(t,e){var n,r;this.requestState=t||"idle",this.requestMessage=e||"",null===(n=this.loaderState)||void 0===n||null===(r=n.setLoading)||void 0===r||r.call(n,"loading"===this.requestState,this.requestMessage),this.renderRequestStatus()}},{key:"renderRequestStatus",value:function(){this.requestStatus&&this.requestStatusText&&this.retryButton&&(this.requestStatus.dataset.state=this.requestState||"idle",this.requestStatusText.textContent=this.requestMessage||"",this.retryButton.hidden="error"!==this.requestState)}},{key:"retryLoad",value:(d=v(f().m(function t(){return f().w(function(t){for(;;)switch(t.n){case 0:return this.setRequestStatus("loading","Loading page ".concat(this.state.page,"...")),t.n=1,this.loadData();case 1:return t.a(2)}},t,this)})),function(){return d.apply(this,arguments)})},{key:"parseFieldListAttr",value:function(t){var e,n=String((null===(e=this.container)||void 0===e?void 0:e.getAttribute(t))||"").trim();return n?n.split(",").map(function(t){return t.trim()}).filter(Boolean):[]}},{key:"parseBooleanAttr",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null===(e=this.container)||void 0===e||!e.hasAttribute(t))return n;var r=String(this.container.getAttribute(t)||"").trim().toLowerCase();return!r||"false"!==r&&"0"!==r&&"no"!==r&&"off"!==r}},{key:"parsePositiveIntAttr",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=String((null===(e=this.container)||void 0===e?void 0:e.getAttribute(t))||"").trim();if(!r)return n;var i=Number(r);return!Number.isFinite(i)||i<0?n:Math.floor(i)}},{key:"parseMetadataAttr",value:function(t){var e,n=String((null===(e=this.container)||void 0===e?void 0:e.getAttribute(t))||"").trim();if(!n)return{};if(n.startsWith("{")&&n.endsWith("}")||n.startsWith("[")&&n.endsWith("]"))try{var r=JSON.parse(n);return r&&"object"===l(r)?r:{}}catch(t){return{}}if("undefined"!=typeof window){var i=window[n];if("function"==typeof i)try{var o=i(this.container);return o&&"object"===l(o)?o:{}}catch(t){return{}}if(i&&"object"===l(i))return i}return{}}},{key:"parseObjectAttr",value:function(t){var e,n=String((null===(e=this.container)||void 0===e?void 0:e.getAttribute(t))||"").trim();if(!n)return{};try{var r=JSON.parse(n);return r&&"object"===l(r)&&!Array.isArray(r)?r:{}}catch(t){return{}}}},{key:"resolveConfiguredEndpoint",value:function(){var t=String(this.config.endpointTemplate||this.config.endpoint||"").trim();if(!t)return this.config.endpoint="","";var e=t.includes("@{")?this.resolveTemplateString(t,this.getBindingContext()):t;return this.config.endpoint=String(e||"").trim(),this.config.endpoint}},{key:"resolveRequestParams",value:function(){var t=this,e=Object.entries(this.config.requestParams||{});if(!e.length)return{};var n={};return e.forEach(function(e){var r=s(e,2),i=r[0],o=r[1];if(i){var a=String(o||"").trim();if(a){var l=t.extractExpression(a),u=t.evaluateExpression(l,t.getBindingContext());null!=u&&""!==u&&(n[i]=u)}}}),n}},{key:"resolveConfiguredFields",value:function(t,e){if(!Array.isArray(t)||0===t.length)return[];var n=new Set(e),r=new Set,i=[];return t.forEach(function(t){n.has(t)&&!r.has(t)&&(r.add(t),i.push(t))}),i}},{key:"applyChooserPoliciesForColumns",value:function(){var t=this,e=this.state.headers.map(function(t){return t.field});this.mandatoryFieldsResolved=this.resolveConfiguredFields(this.config.mandatoryFields,e),this.priorityFieldsResolved=this.resolveConfiguredFields(this.config.priorityFields,e),this.state.headers.forEach(function(e){t.mandatoryFieldsResolved.includes(e.field)&&(e.visible=!0)}),this.state.visibleColumns=this.getOrderedVisibleColumns()}},{key:"getOrderedVisibleColumns",value:function(){var t=this,e=this.state.headers.map(function(t,e){return{header:t,index:e}}).filter(function(t){return t.header.visible});if(!this.priorityFieldsResolved.length&&!e.some(function(e){return t.resolvePinnedSide(e.header)}))return e.map(function(t){return t.header});var n=new Map;return this.priorityFieldsResolved.forEach(function(t,e){n.set(t,e)}),u(e).sort(function(e,r){var i=t.resolvePinnedSide(e.header)||"",o=t.resolvePinnedSide(r.header)||"",a="left"===i?0:"right"===i?2:1,l="left"===o?0:"right"===o?2:1;if(a!==l)return a-l;var s=n.has(e.header.field)?n.get(e.header.field):Number.MAX_SAFE_INTEGER,u=n.has(r.header.field)?n.get(r.header.field):Number.MAX_SAFE_INTEGER;return s!==u?s-u:e.index-r.index}).map(function(t){return t.header})}},{key:"isMandatoryField",value:function(t){return this.mandatoryFieldsResolved.includes(t)}},{key:"resolvePinnedSide",value:function(t){var e;if(!t||"object"!==l(t))return null;var n=this.normalizePinnedSide(t.pinned);if(n)return n;var r=null===(e=this.config.columnMetadata)||void 0===e?void 0:e[t.field];return this.normalizePinnedSide(null==r?void 0:r.pinned)}},{key:"initPinnedColumns",value:function(){var t=this,e={left:[],right:[]};this.state.visibleColumns.forEach(function(n,r){var i=t.resolvePinnedSide(n);i&&e[i].push(r)}),this.pinnedColumns=e}},{key:"applyPinnedStyles",value:function(){var t,e=this,n=null===(t=this.element)||void 0===t?void 0:t.querySelector(".datatable-table");if(n){this.initPinnedColumns();var r=this.pinnedColumns.left.length>0||this.pinnedColumns.right.length>0;if(n.classList.toggle("datatable-has-pinned-columns",r),r){var i=0;this.pinnedColumns.left.forEach(function(t){var r=e.getColumnWidth(n,t);e.getColumnCells(n,t).forEach(function(t){t.classList.add("datatable-pinned-left"),t.style.left="".concat(i,"px")}),i+=r});var o=0;u(this.pinnedColumns.right).reverse().forEach(function(t){var r=e.getColumnWidth(n,t);e.getColumnCells(n,t).forEach(function(t){t.classList.add("datatable-pinned-right"),t.style.right="".concat(o,"px")}),o+=r})}}}},{key:"getColumnCells",value:function(t,e){return Array.from(t.querySelectorAll("tr > :nth-child(".concat(e+1,")")))}},{key:"getColumnWidth",value:function(t,e){var n,r,i=null===(n=this.thead)||void 0===n?void 0:n.querySelector("tr > :nth-child(".concat(e+1,")"));if(i)return i.getBoundingClientRect().width;var o=null===(r=this.tbody)||void 0===r?void 0:r.querySelector("tr > :nth-child(".concat(e+1,")"));if(o)return o.getBoundingClientRect().width;var a=t.querySelector("tr > :nth-child(".concat(e+1,")"));return a?a.getBoundingClientRect().width:0}},{key:"resolveHeaderByReference",value:function(t){return"number"==typeof t&&Number.isInteger(t)?this.state.headers[t]||null:"string"==typeof t&&this.state.headers.find(function(e){return e.field===t})||null}},{key:"pinColumn",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"left",n=this.resolveHeaderByReference(t),r=this.normalizePinnedSide(e);return!(!n||!r||(n.pinned=r,this.state.visibleColumns=this.getOrderedVisibleColumns(),this.bumpLocalRowsVersion(),this.updateView(),0))}},{key:"unpinColumn",value:function(t){var e=this.resolveHeaderByReference(t);return!!e&&(e.pinned=null,this.state.visibleColumns=this.getOrderedVisibleColumns(),this.bumpLocalRowsVersion(),this.updateView(),!0)}},{key:"getBindableState",value:function(){return{searchTerm:this.state.searchTerm||"",sortField:this.state.sortField||null,sortDir:this.state.sortDir||"asc",filters:m({},this.state.filters||{}),page:Number(this.state.page)||1,visibleColumns:this.state.headers.filter(function(t){return!1!==t.visible}).map(function(t){return t.field})}}},{key:"getStateSnapshot",value:function(){return this.getBindableState()}},{key:"shouldDispatchPprChange",value:function(t,e,n){return!!n||["searchTerm","sortField","sortDir","filters","page","visibleColumns"].includes(t)}},{key:"refreshPpr",value:function(){this.resetViewport(),this.remoteLoaded=!1,this.resolveConfiguredEndpoint()?this.loadData():(this.applyClientProcessing(),this.updateView())}},{key:"applyBindableState",value:function(t){var e=this;if(t&&"object"===l(t)){var n=!1;if("string"==typeof t.searchTerm&&t.searchTerm!==this.state.searchTerm){var r;this.state.searchTerm=t.searchTerm;var i=null===(r=this.element)||void 0===r?void 0:r.querySelector('[data-action="search"]');i&&"value"in i&&(i.value=t.searchTerm),n=!0}if(void 0!==t.sortField){var o=null==t.sortField?null:String(t.sortField);o!==this.state.sortField&&(this.state.sortField=o,n=!0)}if("string"==typeof t.sortDir){var a="desc"===t.sortDir.toLowerCase()?"desc":"asc";a!==this.state.sortDir&&(this.state.sortDir=a,n=!0)}if(t.filters&&"object"===l(t.filters)&&(this.state.filters=m({},t.filters),n=!0),Array.isArray(t.visibleColumns)&&this.state.headers.length){var s=new Set(t.visibleColumns.map(function(t){return String(t)}));this.state.headers.forEach(function(t){t.visible=!!e.isMandatoryField(t.field)||s.has(t.field)}),this.state.visibleColumns=this.getOrderedVisibleColumns(),n=!0}if(Number.isFinite(Number(t.page))){var u=Math.max(1,Number(t.page));u!==this.state.page&&(this.state.page=u,n=!0)}n&&(this.config.serverSide?this.loadData():(this.applyClientProcessing(),this.updateView()))}}}],c=[{key:"selector",get:function(){return"datatable"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"datatable"}},{key:"normalizeArgs",value:function(t,e){if(t instanceof Element)return{container:t,config:e||{},autoInit:!0};var n=t||{};return{container:n.container,parent:n.parent,textProvider:n.textProvider||null,config:n.config||{},autoInit:n.autoInit}}}],r&&b(n.prototype,r),c&&b(n,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,c,d,h,p,y,w,k,E,A,P,j,T,x,L,I,R}(r.Component);C(P,"templateId","datatable-template"),"undefined"!=typeof window&&(window.DataTable=P)},704(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function a(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var a=r&&r.prototype instanceof u?r:u,c=Object.create(a.prototype);return l(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(l(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,l(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,l(h,"constructor",d),l(d,"constructor",c),c.displayName="GeneratorFunction",l(d,i,"GeneratorFunction"),l(h),l(h,i,"Generator"),l(h,r,function(){return this}),l(h,"toString",function(){return"[object Generator]"}),(a=function(){return{w:o,m:p}})()}function l(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}l=function(t,e,n,r){function o(e,n){l(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},l(t,e,n,r)}function s(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function u(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){s(o,r,i,a,l,"next",t)}function l(t){s(o,r,i,a,l,"throw",t)}a(void 0)})}}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,m(r.key),r)}}function d(t,e,n){return e=v(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,f()?Reflect.construct(e,n||[],v(t).constructor):e.apply(t,n))}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!t})()}function h(t,e,n,r){var i=p(v(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=v(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},p.apply(null,arguments)}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}function m(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{DialogComponent:()=>S});var b,g,w,S=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=d(this,e,[t,r])).templateId=e.templateId,n.id=n.container.getAttribute("id")||n.container.getAttribute("dialog-id")||"",n.size=n.resolveSize(n.container.getAttribute("size")||n.container.getAttribute("mode")||"medium"),n.titleText=n.container.getAttribute("title")||n.container.getAttribute("data-title")||"",n.footerMessage=n.container.getAttribute("footer-message")||n.container.getAttribute("data-footer-message")||"",n.closeOnBackdrop=!n.container.hasAttribute("no-backdrop-close"),n.returnValue="",n.isOpen=!1,n.useNative="undefined"!=typeof window&&void 0!==window.HTMLDialogElement&&!n.container.hasAttribute("no-native"),n.slotted=null,n.initialOpen=n.container.hasAttribute("open"),n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&y(t,e)}(e,t),n=e,r=[{key:"resolveSize",value:function(t){var e=String(t||"medium").trim().toLowerCase();return["mini","small","medium","large","mega"].includes(e)?e:"medium"}},{key:"captureSlottedContent",value:function(){var t=Array.from(this.container.children).filter(function(t){return!t.classList.contains("holi-dialog-root")}),e=t.find(function(t){return"header"===t.getAttribute("slot")})||null,n=t.find(function(t){return"footer"===t.getAttribute("slot")})||null,r=t.filter(function(t){var e=t.getAttribute("slot");return!e||"content"===e||"body"===e});this.slotted={header:e,footer:n,bodyNodes:r}}},{key:"init",value:(s=u(a().m(function t(){return a().w(function(t){for(;;)switch(t.n){case 0:return this.captureSlottedContent(),this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents(),this.initialOpen&&this.open();case 2:return t.a(2)}},t,this)})),function(){return s.apply(this,arguments)})},{key:"render",value:(l=u(a().m(function t(){var n,r,i,o,l,s,u,c,d,f,p;return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,h(e,"render",this,3)([]);case 1:this.root=this.container.querySelector(".holi-dialog-root"),this.nativeDialog=null===(n=this.root)||void 0===n?void 0:n.querySelector(".holi-dialog-native"),this.fallback=null===(r=this.root)||void 0===r?void 0:r.querySelector('[data-role="fallback"]'),this.overlay=null===(i=this.root)||void 0===i?void 0:i.querySelector(".holi-dialog-overlay"),this.nativeHeader=null===(o=this.root)||void 0===o?void 0:o.querySelector('[data-role="header"]'),this.nativeTitle=null===(l=this.root)||void 0===l?void 0:l.querySelector('[data-role="title"]'),this.nativeBody=null===(s=this.root)||void 0===s?void 0:s.querySelector('[data-role="body"]'),this.nativeFooter=null===(u=this.root)||void 0===u?void 0:u.querySelector('[data-role="footer"]'),this.fallbackHeader=null===(c=this.root)||void 0===c?void 0:c.querySelector('[data-role="fallback-header"]'),this.fallbackTitle=null===(d=this.root)||void 0===d?void 0:d.querySelector('[data-role="fallback-title"]'),this.fallbackBody=null===(f=this.root)||void 0===f?void 0:f.querySelector('[data-role="fallback-body"]'),this.fallbackFooter=null===(p=this.root)||void 0===p?void 0:p.querySelector('[data-role="fallback-footer"]'),this.nativeDialog&&(this.useNative?(this.nativeDialog.hidden=!1,this.nativeDialog.style.display=""):(this.nativeDialog.hidden=!0,this.nativeDialog.style.display="none",this.nativeDialog.removeAttribute("open"))),this.applyDialogContent(),this.applyLayoutState();case 2:return t.a(2)}},t,this)})),function(){return l.apply(this,arguments)})},{key:"applyDialogContent",value:function(){if(this.slotted){var t,e,n,r,o,a,l,s,u,c,d,f,h=this.slotted,p=h.header,v=h.footer,y=h.bodyNodes,m=!!this.useNative;m?(null===(t=this.nativeBody)||void 0===t||t.replaceChildren.apply(t,i(y)),null===(e=this.fallbackBody)||void 0===e||e.replaceChildren()):(null===(n=this.fallbackBody)||void 0===n||n.replaceChildren.apply(n,i(y)),null===(r=this.nativeBody)||void 0===r||r.replaceChildren()),p?m?(null===(o=this.nativeHeader)||void 0===o||o.replaceChildren(p),null===(a=this.fallbackHeader)||void 0===a||a.replaceChildren()):(null===(l=this.fallbackHeader)||void 0===l||l.replaceChildren(p),null===(s=this.nativeHeader)||void 0===s||s.replaceChildren()):(this.nativeTitle&&(this.nativeTitle.textContent=this.titleText),this.fallbackTitle&&(this.fallbackTitle.textContent=this.titleText)),v?m?(null===(u=this.nativeFooter)||void 0===u||u.replaceChildren(v),null===(c=this.fallbackFooter)||void 0===c||c.replaceChildren()):(null===(d=this.fallbackFooter)||void 0===d||d.replaceChildren(v),null===(f=this.nativeFooter)||void 0===f||f.replaceChildren()):this.footerMessage&&(this.nativeFooter&&(this.nativeFooter.textContent=this.footerMessage),this.fallbackFooter&&(this.fallbackFooter.textContent=this.footerMessage));var b=!!p||!!this.titleText,g=!!v||!!this.footerMessage;this.nativeHeader&&(this.nativeHeader.hidden=!b),this.fallbackHeader&&(this.fallbackHeader.hidden=!b),this.nativeFooter&&(this.nativeFooter.hidden=!g),this.fallbackFooter&&(this.fallbackFooter.hidden=!g)}}},{key:"applyLayoutState",value:function(){this.root&&(this.root.setAttribute("data-size",this.size),this.root.setAttribute("data-state",this.isOpen?"open":"closed"),this.nativeDialog&&this.nativeDialog.setAttribute("data-size",this.size))}},{key:"bindEvents",value:function(){var t,e,n,r,i,o=this,a=function(t){var e,n=null===(e=t.target)||void 0===e||null===(e=e.dataset)||void 0===e?void 0:e.action;if("close"!==n)"backdrop"===n&&o.closeOnBackdrop&&o.close("backdrop");else{var r=t.target.getAttribute("data-value")||"";o.close(r)}};null===(t=this.root)||void 0===t||t.addEventListener("click",a),null===(e=this.nativeDialog)||void 0===e||e.addEventListener("click",a),null===(n=this.fallback)||void 0===n||n.addEventListener("click",a),null===(r=this.nativeDialog)||void 0===r||r.addEventListener("cancel",function(t){t.preventDefault(),o.close("cancel")}),null===(i=this.nativeDialog)||void 0===i||i.addEventListener("close",function(){o.onClosed()}),this.id&&"undefined"!=typeof document&&document.addEventListener("click",function(t){var e,n,r,i;(null===(e=t.target)||void 0===e||null===(n=e.closest)||void 0===n?void 0:n.call(e,'[data-dialog-open="'.concat(o.id,'"]')))?o.open():(null===(r=t.target)||void 0===r||null===(i=r.closest)||void 0===i?void 0:i.call(r,'[data-dialog-close="'.concat(o.id,'"]')))&&o.close("trigger")})}},{key:"open",value:function(){var t;this.isOpen||(this.isOpen=!0,this.applyLayoutState(),this.useNative&&null!==(t=this.nativeDialog)&&void 0!==t&&t.showModal?(this.fallback.hidden=!0,this.nativeDialog.open||this.nativeDialog.showModal()):this.fallback&&(this.fallback.hidden=!1),this.dispatchEvent("dialogopen",{size:this.size}))}},{key:"close",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.returnValue=e,this.isOpen&&(this.isOpen=!1,this.applyLayoutState(),this.useNative&&null!==(t=this.nativeDialog)&&void 0!==t&&t.open?this.nativeDialog.close(e):this.onClosed())}},{key:"onClosed",value:function(){this.fallback&&(this.fallback.hidden=!0),this.applyLayoutState(),this.dispatchEvent("dialogclose",{size:this.size,returnValue:this.returnValue})}},{key:"toggle",value:function(){this.isOpen?this.close("toggle"):this.open()}},{key:"setSize",value:function(t){this.size=this.resolveSize(t),this.applyLayoutState()}}],o=[{key:"selector",get:function(){return"dialog"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"dialog"}}],r&&c(n.prototype,r),o&&c(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,l,s}(n(812).Component);b=S,w="dialog-template",(g=m(g="templateId"))in b?Object.defineProperty(b,g,{value:w,enumerable:!0,configurable:!0,writable:!0}):b[g]=w,"undefined"!=typeof window&&(window.DialogComponent=S)},145(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function o(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function l(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return a(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(a(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,a(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,a(h,"constructor",d),a(d,"constructor",c),c.displayName="GeneratorFunction",a(d,i,"GeneratorFunction"),a(h),a(h,i,"Generator"),a(h,r,function(){return this}),a(h,"toString",function(){return"[object Generator]"}),(o=function(){return{w:l,m:p}})()}function a(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}a=function(t,e,n,r){function o(e,n){a(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},a(t,e,n,r)}function l(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function s(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){l(o,r,i,a,s,"next",t)}function s(t){l(o,r,i,a,s,"throw",t)}a(void 0)})}}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,m(r.key),r)}}function c(t,e,n){return e=p(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,d()?Reflect.construct(e,n||[],p(t).constructor):e.apply(t,n))}function d(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(d=function(){return!!t})()}function f(t,e,n,r){var i=h(p(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function h(){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},h.apply(null,arguments)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}function y(t,e,n){return(e=m(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function m(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{DrawerComponent:()=>b});var b=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=c(this,e,[t,r])).templateId=e.templateId,n.drawerId=n.ensureDrawerId(),n.panelId=n.ensurePanelId(),n.direction=n.resolveDirection(n.container.getAttribute("direction")||n.container.getAttribute("position")||"left"),n.breakpoint=n.parseNumber(n.container.getAttribute("breakpoint"),768),n.maxSize=n.container.getAttribute("max-size")||n.defaultMaxSize(n.direction),n.maxHeight=n.container.getAttribute("max-height")||"90vh",n.showEdgeTrigger=!n.container.hasAttribute("no-edge-trigger"),n.railName=(n.container.getAttribute("rail")||"").trim(),n.triggerLabel=n.container.getAttribute("trigger-label")||n.drawerId||"Open",n.triggerIcon=n.container.getAttribute("trigger-icon")||"",n.backdropEnabled=!n.container.hasAttribute("no-backdrop"),n.closeOnOverlay=!n.container.hasAttribute("no-overlay-close"),n.closeOnEscape=!n.container.hasAttribute("no-escape-close"),n.initialOpen=n.container.hasAttribute("open"),n.isOpen=!1,n.isDesktop=!1,n.mediaQueryList=null,n.mediaQueryHandler=null,n.edgeTrigger=null,n.railElement=null,n.ownsRail=!1,n.previousFocusedElement=null,n.lastTriggerElement=null,n.documentKeydownHandler=null,n.slotted=null,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&v(t,e)}(e,t),n=e,r=[{key:"ensureDrawerId",value:function(){var t=this.container.getAttribute("id")||this.container.getAttribute("drawer-id");if(t)return t;e.idCounter+=1;var n="drawer-".concat(e.idCounter);return this.container.setAttribute("id",n),n}},{key:"ensurePanelId",value:function(){return this.container.getAttribute("panel-id")||(e.panelCounter+=1,"drawer-panel-".concat(e.panelCounter))}},{key:"parseNumber",value:function(t,e){var n=Number(t);return Number.isFinite(n)?n:e}},{key:"resolveDirection",value:function(t){var e=String(t||"left").trim().toLowerCase();return["left","right","top","bottom","center"].includes(e)?e:"left"}},{key:"defaultMaxSize",value:function(t){return"center"===t?"760px":"left"===t||"right"===t?"380px":"42vh"}},{key:"captureSlottedContent",value:function(){var t=Array.from(this.container.children).filter(function(t){return!t.classList.contains("holi-drawer-root")}),e=t.find(function(t){return"header"===t.getAttribute("slot")})||null,n=t.find(function(t){return"footer"===t.getAttribute("slot")})||null,r=t.filter(function(t){var e=t.getAttribute("slot");return!e||"content"===e||"body"===e});this.slotted={header:e,footer:n,bodyNodes:r}}},{key:"init",value:(d=s(o().m(function t(){return o().w(function(t){for(;;)switch(t.n){case 0:return this.captureSlottedContent(),this.validateStructure(),t.n=1,this.render();case 1:this.setupResponsive(),this.bindEvents(),this.initialOpen?this.open():this.close("initial");case 2:return t.a(2)}},t,this)})),function(){return d.apply(this,arguments)})},{key:"render",value:(l=s(o().m(function t(){var n,r,i;return o().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,f(e,"render",this,3)([]);case 1:this.root=this.container.querySelector(".holi-drawer-root"),this.overlay=this.container.querySelector('[data-role="overlay"]'),this.panel=this.container.querySelector('[data-role="panel"]'),this.header=this.container.querySelector('[data-role="header"]'),this.footer=this.container.querySelector('[data-role="footer"]'),this.body=this.container.querySelector('[data-role="body"]'),this.edgeTrigger=this.container.querySelector('[data-role="edge-trigger"]'),null===(n=this.root)||void 0===n||n.setAttribute("data-direction",this.direction),null===(r=this.root)||void 0===r||r.style.setProperty("--drawer-max-size",this.maxSize),null===(i=this.root)||void 0===i||i.style.setProperty("--drawer-max-height",this.maxHeight),this.panel&&(this.panel.id=this.panelId,this.panel.setAttribute("role","center"===this.direction?"dialog":"complementary"),this.panel.setAttribute("aria-hidden","true"),this.panel.setAttribute("tabindex","-1")),this.setupEdgeTrigger(),this.decorateExternalTriggers(),this.applySlotContent(),this.applyState();case 2:return t.a(2)}},t,this)})),function(){return l.apply(this,arguments)})},{key:"setupEdgeTrigger",value:function(){if(this.edgeTrigger&&this.root){if(!this.showEdgeTrigger)return this.edgeTrigger.remove(),void(this.edgeTrigger=null);var t=[this.triggerIcon,this.triggerLabel].filter(Boolean);if(this.edgeTrigger.textContent=t.join(" ").trim(),this.edgeTrigger.setAttribute("aria-label",this.triggerLabel),this.edgeTrigger.setAttribute("aria-controls",this.panelId),this.edgeTrigger.setAttribute("aria-expanded","false"),this.edgeTrigger.setAttribute("data-drawer-toggle",this.drawerId),this.railName){var n="".concat(this.direction,":").concat(this.railName),r=e.rails.get(n);r||"undefined"==typeof document||((r=document.createElement("nav")).className="holi-drawer-rail",r.setAttribute("data-rail",this.railName),r.setAttribute("data-direction",this.direction),document.body.appendChild(r),e.rails.set(n,r),this.ownsRail=!0),this.railElement=r||null,this.railElement&&(this.edgeTrigger.setAttribute("data-in-rail","true"),this.railElement.appendChild(this.edgeTrigger))}}}},{key:"decorateExternalTriggers",value:function(){var t=this;"undefined"!=typeof document&&['[data-drawer-open="'.concat(this.drawerId,'"]'),'[data-drawer-toggle="'.concat(this.drawerId,'"]'),'[data-drawer-close="'.concat(this.drawerId,'"]')].forEach(function(e){document.querySelectorAll(e).forEach(function(e){e.setAttribute("aria-controls",t.panelId),e.matches("[data-drawer-open], [data-drawer-toggle]")&&e.setAttribute("aria-expanded",t.isOpen?"true":"false")})})}},{key:"applySlotContent",value:function(){if(this.slotted){var t,e=this.slotted,n=e.header,r=e.footer,o=e.bodyNodes;this.body&&(t=this.body).replaceChildren.apply(t,function(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(o)),n&&this.header?(this.header.replaceChildren(n),this.header.hidden=!1):this.header&&(this.header.hidden=!0),r&&this.footer?(this.footer.replaceChildren(r),this.footer.hidden=!1):this.footer&&(this.footer.hidden=!0)}}},{key:"setupResponsive",value:function(){var t=this;if("undefined"!=typeof window){var e=window.matchMedia("(min-width: ".concat(this.breakpoint,"px)"));this.mediaQueryList=e,this.isDesktop=e.matches,this.mediaQueryHandler=function(e){t.isDesktop=e.matches,t.applyState()},"function"==typeof e.addEventListener?e.addEventListener("change",this.mediaQueryHandler):"function"==typeof e.addListener&&e.addListener(this.mediaQueryHandler)}}},{key:"bindEvents",value:function(){var t=this;this.container.addEventListener("click",function(e){var n,r=null===(n=e.target)||void 0===n||null===(n=n.dataset)||void 0===n?void 0:n.action;r&&("close"!==r?"backdrop"===r&&t.closeOnOverlay&&t.close("overlay"):t.close("button"))}),this.drawerId&&"undefined"!=typeof document&&document.addEventListener("click",function(e){var n,r,i,o,a,l,s=null===(n=e.target)||void 0===n||null===(r=n.closest)||void 0===r?void 0:r.call(n,'[data-drawer-open="'.concat(t.drawerId,'"]'));if(s)return e.preventDefault(),t.lastTriggerElement=s,void t.open();var u=null===(i=e.target)||void 0===i||null===(o=i.closest)||void 0===o?void 0:o.call(i,'[data-drawer-toggle="'.concat(t.drawerId,'"]'));if(u)return e.preventDefault(),t.lastTriggerElement=u,void t.toggle();var c=null===(a=e.target)||void 0===a||null===(l=a.closest)||void 0===l?void 0:l.call(a,'[data-drawer-close="'.concat(t.drawerId,'"]'));c&&(e.preventDefault(),t.lastTriggerElement=c,t.close("trigger"))}),this.closeOnEscape&&"undefined"!=typeof document&&document.addEventListener("keydown",function(e){"Escape"===e.key&&t.isOpen&&t.close("escape")}),"undefined"!=typeof document&&(this.documentKeydownHandler=function(n){t.isOpen&&e.activeInstance===t&&"Tab"===n.key&&t.trapFocus(n)},document.addEventListener("keydown",this.documentKeydownHandler))}},{key:"open",value:function(){e.activeInstance&&e.activeInstance!==this&&e.activeInstance.close("switch"),"undefined"!=typeof document&&document.activeElement instanceof HTMLElement&&(this.previousFocusedElement=document.activeElement);var t=!this.isOpen;this.setOpen(!0),e.activeInstance=this,this.focusFirstElement(),t&&this.dispatchEvent("draweropen",{id:this.drawerId,direction:this.direction})}},{key:"close",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"manual",n=this.isOpen;this.setOpen(!1),e.activeInstance===this&&(e.activeInstance=null),this.restoreFocus(t),n&&this.dispatchEvent("drawerclose",{id:this.drawerId,direction:this.direction,reason:t})}},{key:"toggle",value:function(){this.isOpen?this.close("toggle"):this.open()}},{key:"setDirection",value:function(t){var e;this.direction=this.resolveDirection(t),null===(e=this.root)||void 0===e||e.setAttribute("data-direction",this.direction)}},{key:"setMaxSize",value:function(t){var e;this.maxSize=t||this.defaultMaxSize(this.direction),null===(e=this.root)||void 0===e||e.style.setProperty("--drawer-max-size",this.maxSize)}},{key:"setOpen",value:function(t){this.isOpen=!!t,this.container.toggleAttribute("open",this.isOpen),this.edgeTrigger&&this.edgeTrigger.setAttribute("aria-expanded",this.isOpen?"true":"false"),this.updateTriggerAriaExpanded(),this.applyState()}},{key:"updateTriggerAriaExpanded",value:function(){var t=this;"undefined"!=typeof document&&['[data-drawer-open="'.concat(this.drawerId,'"]'),'[data-drawer-toggle="'.concat(this.drawerId,'"]')].forEach(function(e){document.querySelectorAll(e).forEach(function(e){e.setAttribute("aria-expanded",t.isOpen?"true":"false")})})}},{key:"applyState",value:function(){if(this.root&&this.panel){this.root.setAttribute("data-state",this.isOpen?"open":"closed"),this.root.setAttribute("data-desktop",this.isDesktop?"true":"false");var t=this.backdropEnabled&&this.isOpen&&(!this.isDesktop||"center"===this.direction);this.overlay&&(this.overlay.hidden=!t,this.overlay.setAttribute("aria-hidden",t?"false":"true")),this.panel&&(this.panel.setAttribute("aria-hidden",this.isOpen?"false":"true"),this.panel.setAttribute("aria-modal",this.isOpen&&t?"true":"false")),"undefined"!=typeof document&&(t?document.body.classList.add("holi-drawer-lock"):document.body.classList.remove("holi-drawer-lock")),this.applyInlinePanelState()}}},{key:"applyInlinePanelState",value:function(){if(this.panel){if(this.panel.style.transition="transform 220ms ease, opacity 220ms ease, border-radius 220ms ease","center"===this.direction)return this.panel.style.width="fit-content",this.panel.style.maxWidth="min(".concat(this.maxSize,", 92vw)"),this.panel.style.height="auto",this.panel.style.maxHeight=this.maxHeight,this.panel.style.transformOrigin="center center",this.panel.style.borderRadius=this.isOpen?"12px":"999px",this.panel.style.opacity=this.isOpen?"1":"0.25",void(this.panel.style.transform=this.isOpen?"translate(-50%, -50%) scale(1)":"translate(-50%, -50%) scale(0.02)");"left"===this.direction||"right"===this.direction?(this.panel.style.width="min(".concat(this.maxSize,", 92vw)"),this.panel.style.height="100dvh"):(this.panel.style.width="100vw",this.panel.style.height="min(".concat(this.maxSize,", 92vh)")),this.panel.style.maxHeight="",this.panel.style.transformOrigin="",this.panel.style.borderRadius="",this.panel.style.opacity="",this.isOpen?this.panel.style.transform="translate(0, 0)":"left"!==this.direction?"right"!==this.direction?"top"!==this.direction?this.panel.style.transform="translateY(100%)":this.panel.style.transform="translateY(-100%)":this.panel.style.transform="translateX(100%)":this.panel.style.transform="translateX(-100%)"}}},{key:"getFocusableElements",value:function(){if(!this.panel)return[];var t=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(this.panel.querySelectorAll(t)).filter(function(t){return!t.hasAttribute("hidden")&&"true"!==t.getAttribute("aria-hidden")})}},{key:"focusFirstElement",value:function(){var t=this;this.panel&&requestAnimationFrame(function(){var e;if(t.isOpen){var n=t.getFocusableElements()[0]||t.panel;null===(e=n.focus)||void 0===e||e.call(n)}})}},{key:"trapFocus",value:function(t){if(this.panel){var e=this.getFocusableElements();if(!e.length)return t.preventDefault(),void this.panel.focus();var n=e[0],r=e[e.length-1],i=document.activeElement;if(!t.shiftKey&&i===r)return t.preventDefault(),void n.focus();!t.shiftKey||i!==n&&i!==this.panel||(t.preventDefault(),r.focus())}}},{key:"restoreFocus",value:function(t){if("switch"!==t){var e=this.lastTriggerElement&&this.lastTriggerElement.isConnected?this.lastTriggerElement:this.previousFocusedElement;e&&e.isConnected&&"function"==typeof e.focus?e.focus():this.edgeTrigger&&"function"==typeof this.edgeTrigger.focus&&this.edgeTrigger.focus()}}},{key:"destroy",value:function(){if(e.activeInstance===this&&(e.activeInstance=null),this.edgeTrigger&&this.edgeTrigger.parentNode&&this.edgeTrigger.remove(),this.railElement&&this.ownsRail&&0===this.railElement.childElementCount){var t="".concat(this.direction,":").concat(this.railName);this.railElement.remove(),e.rails.delete(t)}this.mediaQueryList&&this.mediaQueryHandler&&("function"==typeof this.mediaQueryList.removeEventListener?this.mediaQueryList.removeEventListener("change",this.mediaQueryHandler):"function"==typeof this.mediaQueryList.removeListener&&this.mediaQueryList.removeListener(this.mediaQueryHandler)),this.documentKeydownHandler&&"undefined"!=typeof document&&(document.removeEventListener("keydown",this.documentKeydownHandler),this.documentKeydownHandler=null),f(e,"destroy",this,3)([])}}],a=[{key:"selector",get:function(){return"drawer"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"drawer"}}],r&&u(n.prototype,r),a&&u(n,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,a,l,d}(n(812).Component);y(b,"activeInstance",null),y(b,"rails",new Map),y(b,"idCounter",0),y(b,"panelCounter",0),y(b,"templateId","drawer-template"),"undefined"!=typeof window&&(window.DrawerComponent=b)},257(t,e,n){"use strict";n.r(e),n.d(e,{DropdownComponent:()=>P});var r=n(812),i=n(62),o=n(76),a=n(853);function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){u=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(t,e)||u(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||u(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){if(t){if("string"==typeof t)return c(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function d(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return f(u,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),u}var a={};function l(){}function s(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(f(e={},r,function(){return this}),e),h=u.prototype=l.prototype=Object.create(c);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,f(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return s.prototype=u,f(h,"constructor",u),f(u,"constructor",s),s.displayName="GeneratorFunction",f(u,i,"GeneratorFunction"),f(h),f(h,i,"Generator"),f(h,r,function(){return this}),f(h,"toString",function(){return"[object Generator]"}),(d=function(){return{w:o,m:p}})()}function f(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}f=function(t,e,n,r){function o(e,n){f(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},f(t,e,n,r)}function h(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function p(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){h(o,r,i,a,l,"next",t)}function l(t){h(o,r,i,a,l,"throw",t)}a(void 0)})}}function v(t){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v(t)}function y(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,E(r.key),r)}}function m(t,e,n){return e=S(e),function(t,e){if(e&&("object"==v(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,b()?Reflect.construct(e,n||[],S(t).constructor):e.apply(t,n))}function b(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(b=function(){return!!t})()}function g(t,e,n,r){var i=w(S(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function w(){return w="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=S(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},w.apply(null,arguments)}function S(t){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},S(t)}function k(t,e){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},k(t,e)}function E(t){var e=function(t){if("object"!=v(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=v(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==v(e)?e:e+""}var O,C,A,P=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=m(this,e,[t,r])).templateId=n.constructor.templateId||e.templateId,n.config={endpoint:n.container.getAttribute("data-source")||n.container.getAttribute("data-endpoint")||n.container.getAttribute("endpoint")||"",valueField:n.container.getAttribute("data-value-field")||"value",labelField:n.container.getAttribute("data-label-field")||"label",pageSize:Math.max(1,Number(n.container.getAttribute("data-page-size"))||30),minQueryLength:Math.max(0,Number(n.container.getAttribute("data-min-query"))||0),debounceMs:Math.max(0,Number(n.container.getAttribute("data-debounce-ms"))||200),loaderMinMs:Math.max(0,Number(n.container.getAttribute("data-loader-min-ms"))||180),autoSuggest:n.readBooleanAttr("data-auto-suggest",!0),placeholder:n.container.getAttribute("placeholder")||n.container.getAttribute("data-placeholder")||"Select...",noCache:n.readBooleanAttr("no-cache",!1),localItems:n.parseItemsAttr("data-items"),localFilterMap:n.parseObjectAttr("data-local-filter-map"),requestParams:n.parseObjectAttr("data-request-params"),clearOnPpr:n.readBooleanAttr("data-ppr-clear",!0),autoLoadOnPpr:n.readBooleanAttr("data-ppr-autoload",!0)},n.state={open:!1,loading:!1,query:"",page:1,hasMore:!1,activeIndex:-1,selected:null,items:[],allLocalItems:[],filteredLocalItems:[]},n.remoteCache=new Map,n.remoteRequestSeq=0,n.fetchTimer=null,n.boundOutsideClick=function(t){return n.handleOutsideClick(t)},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&k(t,e)}(e,t),n=e,r=[{key:"readBooleanAttr",value:function(t,e){if(!this.container.hasAttribute(t))return e;var n=String(this.container.getAttribute(t)||"").trim().toLowerCase();return!n||"false"!==n&&"0"!==n&&"no"!==n}},{key:"parseItemsAttr",value:function(t){var e=String(this.container.getAttribute(t)||"").trim();if(!e)return[];try{var n=JSON.parse(e);return Array.isArray(n)?n:[]}catch(t){return[]}}},{key:"parseObjectAttr",value:function(t){var e=String(this.container.getAttribute(t)||"").trim();if(!e)return{};try{var n=JSON.parse(e);return n&&"object"===v(n)&&!Array.isArray(n)?n:{}}catch(t){return{}}}},{key:"validateStructure",value:function(){if(g(e,"validateStructure",this,3)([]),!this.container)throw new Error("Dropdown requires a container")}},{key:"init",value:(b=p(d().m(function t(){return d().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return b.apply(this,arguments)})},{key:"render",value:(h=p(d().m(function t(){var n;return d().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,g(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-dropdown"),this.input=this.container.querySelector('[data-role="input"]'),this.valueInput=this.container.querySelector('[data-role="value"]'),this.list=this.container.querySelector('[data-role="list"]'),this.panel=this.container.querySelector('[data-role="panel"]'),this.loadingEl=this.container.querySelector('[data-role="loading"]'),this.emptyEl=this.container.querySelector('[data-role="empty"]'),this.toggleButton=this.container.querySelector('[data-action="toggle"]'),this.loaderState=(0,i.w)(this,{host:this.panel||this.element,busyTarget:this.panel||this.element,scope:"block",defaultMessage:"Loading options..."}),this.stateBinding=(0,o.x)(this,{defaultPath:"dropdown",eventName:"dropdownselect",getSnapshot:function(t){return t.getBindableState()},applySnapshot:function(t,e){return t.applyBindableState(e)}}),this.input.placeholder=this.config.placeholder,this.state.allLocalItems=this.normalizeItems(this.collectLocalItems()),this.state.filteredLocalItems=s(this.state.allLocalItems),this.state.items=s(this.state.filteredLocalItems),this.state.activeIndex=this.state.items.length?0:-1,this.state.hasMore=!1,this.renderItems(),(n=this.container.getAttribute("value")||this.container.getAttribute("data-value"))&&(this.value=n),this.bindEvents();case 2:return t.a(2)}},t,this)})),function(){return h.apply(this,arguments)})},{key:"collectLocalItems",value:function(){var t=Array.from(this.container.querySelectorAll("option")).map(function(t){return{value:t.value,label:t.textContent||t.value}});return t.length?t:this.config.localItems||[]}},{key:"normalizeItems",value:function(t){var e=this;return(t||[]).map(function(t){if(t&&"object"===v(t)){var n,r,i,o,a,l,s,u=null!==(n=null!==(r=null!==(i=null!==(o=t[e.config.valueField])&&void 0!==o?o:t.value)&&void 0!==i?i:t.id)&&void 0!==r?r:t.code)&&void 0!==n?n:"",c=null!==(a=null!==(l=null!==(s=t[e.config.labelField])&&void 0!==s?s:t.label)&&void 0!==l?l:t.name)&&void 0!==a?a:String(u||"");return{value:null==u?"":String(u),label:null==c?"":String(c),item:t}}return{value:String(null!=t?t:""),label:String(null!=t?t:""),item:t}})}},{key:"bindEvents",value:function(){var t,e,n,r=this;this.input.addEventListener("focus",function(){r.open(),r.config.endpoint&&!r.config.autoSuggest&&r.loadRemotePage(1,!1)}),this.input.addEventListener("input",function(){var t=String(r.input.value||"").trim();r.state.query=t,r.open(),r.config.endpoint?r.debounceRemoteQuery():r.applyLocalFilter()}),this.input.addEventListener("keydown",function(t){r.handleKeydown(t)}),null===(t=this.toggleButton)||void 0===t||t.addEventListener("click",function(){r.state.open?r.close():(r.open(),r.config.endpoint&&r.loadRemotePage(1,!1))}),null===(e=this.list)||void 0===e||e.addEventListener("click",function(t){var e,n,i=null===(e=t.target)||void 0===e||null===(n=e.closest)||void 0===n?void 0:n.call(e,'[data-role="item"]');if(i){var o=Number(i.getAttribute("data-index"));Number.isNaN(o)||o<0||o>=r.state.items.length||r.selectItem(r.state.items[o])}}),null===(n=this.panel)||void 0===n||n.addEventListener("scroll",function(){r.handleScrollLoad()}),document.addEventListener("click",this.boundOutsideClick)}},{key:"handleOutsideClick",value:function(t){this.container.contains(t.target)||this.close()}},{key:"debounceRemoteQuery",value:function(){var t=this;this.fetchTimer&&clearTimeout(this.fetchTimer),this.fetchTimer=setTimeout(function(){t.loadRemotePage(1,!1)},this.config.debounceMs)}},{key:"applyLocalFilter",value:function(){var t=this.resolveLocalFilterCriteria();t&&0===Object.keys(t).length?this.state.filteredLocalItems=[]:this.state.filteredLocalItems=t?this.state.allLocalItems.filter(function(e){return Object.entries(t).every(function(t){var n,r=l(t,2),i=r[0],o=r[1],a=null==e||null===(n=e.item)||void 0===n?void 0:n[i];return String(null!=a?a:"")===String(o)})}):s(this.state.allLocalItems);var e=String(this.state.query||"").trim().toLowerCase();e&&(this.state.filteredLocalItems=this.state.allLocalItems.filter(function(n){return!(!n.label.toLowerCase().includes(e)&&!n.value.toLowerCase().includes(e))&&(!t||0!==Object.keys(t).length&&Object.entries(t).every(function(t){var e,r=l(t,2),i=r[0],o=r[1],a=null==n||null===(e=n.item)||void 0===e?void 0:e[i];return String(null!=a?a:"")===String(o)}))})),this.state.items=s(this.state.filteredLocalItems),this.state.hasMore=!1,this.renderItems()}},{key:"resolveLocalFilterCriteria",value:function(){var t=Object.entries(this.config.localFilterMap||{});if(!t.length)return null;for(var e={},n=0;n<t.length;n+=1){var r=l(t[n],2),i=r[0],o=r[1];if(i){var a=String(o||"").trim();if(a){var s=this.extractExpression(a),u=this.evaluateExpression(s,this.getBindingContext());if(null==u||""===u)return{};e[i]=u}}}return Object.keys(e).length?e:null}},{key:"loadRemotePage",value:(f=p(d().m(function t(){var e,n,r,i,o,a,l,s,u,c,f,h,p=arguments;return d().w(function(t){for(;;)switch(t.p=t.n){case 0:if(e=p.length>0&&void 0!==p[0]?p[0]:1,n=p.length>1&&void 0!==p[1]&&p[1],this.config.endpoint){t.n=1;break}return t.a(2);case 1:if(!((r=String(this.state.query||"").trim()).length>0&&r.length<this.config.minQueryLength)){t.n=2;break}return t.a(2);case 2:if(i=++this.remoteRequestSeq,o=Date.now(),a="".concat(r,"|").concat(e,"|").concat(this.config.pageSize),this.config.noCache||!this.remoteCache.has(a)){t.n=3;break}return l=this.remoteCache.get(a),this.applyRemotePayload(l,n,e),t.a(2);case 3:return this.setLoading(!0),t.p=4,s=this.buildRemoteUrl(e,r),t.n=5,fetch(s,{credentials:"same-origin"});case 5:if((u=t.v).ok){t.n=6;break}throw new Error("HTTP ".concat(u.status));case 6:return t.n=7,u.json();case 7:if(c=t.v,this.config.noCache||this.remoteCache.set(a,c),i===this.remoteRequestSeq){t.n=8;break}return t.a(2);case 8:this.applyRemotePayload(c,n,e),t.n=11;break;case 9:if(t.p=9,t.v,i===this.remoteRequestSeq){t.n=10;break}return t.a(2);case 10:n||(this.state.items=[],this.state.hasMore=!1,this.renderItems());case 11:if(t.p=11,i===this.remoteRequestSeq){t.n=12;break}return t.a(2);case 12:if(f=Date.now()-o,!((h=this.config.loaderMinMs-f)>0)){t.n=13;break}return t.n=13,new Promise(function(t){return setTimeout(t,h)});case 13:return this.setLoading(!1),t.f(11);case 14:return t.a(2)}},t,this,[[4,9,11,14]])})),function(){return f.apply(this,arguments)})},{key:"buildRemoteUrl",value:function(t,e){var n=this.config.endpoint.includes("?"),r=new URLSearchParams({page:String(t),limit:String(this.config.pageSize),q:e}),i=this.resolveRequestParams();return Object.entries(i).forEach(function(t){var e=l(t,2),n=e[0],i=e[1];null!=i&&""!==i&&r.set(n,String(i))}),"".concat(this.config.endpoint).concat(n?"&":"?").concat(r.toString())}},{key:"resolveRequestParams",value:function(){var t=this,e=Object.entries(this.config.requestParams||{});if(!e.length)return{};var n={};return e.forEach(function(e){var r=l(e,2),i=r[0],o=r[1];if(i){var a=String(o||"").trim();if(a){var s=t.extractExpression(a),u=t.evaluateExpression(s,t.getBindingContext());null!=u&&""!==u&&(n[i]=u)}}}),n}},{key:"applyRemotePayload",value:function(t,e,n){var r=Array.isArray(null==t?void 0:t.rows)?t.rows:Array.isArray(null==t?void 0:t.items)?t.items:Array.isArray(null==t?void 0:t.data)?t.data:[],i=this.filterNormalizedItems(this.normalizeItems(r),this.state.query);this.state.page=n,this.state.hasMore=this.resolveHasMore(t,r.length,n),this.state.items=e?[].concat(s(this.state.items),s(i)):i,e?this.state.activeIndex<0&&this.state.items.length&&(this.state.activeIndex=0):this.state.activeIndex=this.state.items.length?0:-1,this.renderItems()}},{key:"resolveHasMore",value:function(t,e,n){if("boolean"==typeof(null==t?void 0:t.hasMore))return t.hasMore;var r=Number((null==t?void 0:t.totalPages)||0);if(r>0)return n<r;var i=Number((null==t?void 0:t.totalCount)||0);return i>0?n*this.config.pageSize<i:e>=this.config.pageSize}},{key:"filterNormalizedItems",value:function(t,e){var n=String(e||"").trim().toLowerCase();return n?t.filter(function(t){var e=String((null==t?void 0:t.label)||"").toLowerCase(),r=String((null==t?void 0:t.value)||"").toLowerCase();return e.includes(n)||r.includes(n)}):t}},{key:"handleScrollLoad",value:(c=p(d().m(function t(){return d().w(function(t){for(;;)switch(t.n){case 0:if(this.state.open&&this.state.hasMore&&!this.state.loading&&this.panel){t.n=1;break}return t.a(2);case 1:if(this.panel.scrollTop+this.panel.clientHeight>=this.panel.scrollHeight-32){t.n=2;break}return t.a(2);case 2:return t.n=3,this.loadRemotePage(this.state.page+1,!0);case 3:return t.a(2)}},t,this)})),function(){return c.apply(this,arguments)})},{key:"setLoading",value:function(t){var e,n;this.state.loading=!!t,this.loadingEl&&(this.loadingEl.hidden=!t),null===(e=this.loaderState)||void 0===e||null===(n=e.setLoading)||void 0===n||n.call(e,this.state.loading,"Loading options...")}},{key:"renderItems",value:function(){var t,e=this;if(this.list){this.list.replaceChildren();var n,r=this.list.id||"".concat(this.constructor.componentName||"dropdown","-").concat(Math.random().toString(16).slice(2));this.list.id=r,null===(t=this.input)||void 0===t||t.setAttribute("aria-controls",r),this.state.items.forEach(function(t,n){var i,o=document.createElement("li"),a="".concat(r,"-item-").concat(n);o.id=a,o.setAttribute("data-role","item"),o.setAttribute("data-index",String(n)),o.setAttribute("role","option"),o.setAttribute("data-value",t.value),o.setAttribute("aria-selected",e.state.activeIndex===n?"true":"false"),o.textContent=t.label,e.state.activeIndex===n&&(o.classList.add("is-active"),null===(i=e.input)||void 0===i||i.setAttribute("aria-activedescendant",a)),e.list.appendChild(o)}),0===this.state.items.length?(this.state.activeIndex=-1,null===(n=this.input)||void 0===n||n.removeAttribute("aria-activedescendant")):this.state.activeIndex>=this.state.items.length&&(this.state.activeIndex=this.state.items.length-1,this.updateActiveItem(!0)),this.emptyEl&&(this.emptyEl.hidden=this.state.items.length>0||this.state.loading)}}},{key:"selectItem",value:function(t){this.input&&(this.input.value=t.label),this.valueInput&&(this.valueInput.value=t.value),this.state.selected=t,this.dispatchEvent("dropdownselect",{label:t.label,value:t.value,item:t.item||null}),this.close()}},{key:"open",value:function(){this.state.open=!0,this.panel&&(this.panel.hidden=!1),this.input&&this.input.setAttribute("aria-expanded","true"),this.state.activeIndex<0&&this.state.items.length>0&&(this.state.activeIndex=0,this.updateActiveItem(!1))}},{key:"close",value:function(){this.state.open=!1,this.panel&&(this.panel.hidden=!0),this.input&&this.input.setAttribute("aria-expanded","false"),this.input&&this.input.removeAttribute("aria-activedescendant")}},{key:"handleKeydown",value:function(t){var e=t.key;if("Escape"===e)return t.preventDefault(),void this.close();if("ArrowDown"===e)return t.preventDefault(),this.state.open||this.open(),void this.moveActive(1);if("ArrowUp"===e)return t.preventDefault(),this.state.open||this.open(),void this.moveActive(-1);if("Enter"===e){if(!this.state.open)return;t.preventDefault(),this.state.activeIndex>=0&&this.state.activeIndex<this.state.items.length&&this.selectItem(this.state.items[this.state.activeIndex])}}},{key:"moveActive",value:function(t){if(this.state.items.length){var e=this.state.items.length,n=this.state.activeIndex<0?0:this.state.activeIndex;this.state.activeIndex=(n+t+e)%e,this.updateActiveItem(!0)}}},{key:"updateActiveItem",value:function(t){var e,n=this;Array.from((null===(e=this.list)||void 0===e?void 0:e.querySelectorAll('[data-role="item"]'))||[]).forEach(function(e){var r,i=Number(e.getAttribute("data-index"))===n.state.activeIndex;e.classList.toggle("is-active",i),e.setAttribute("aria-selected",i?"true":"false"),i&&(null===(r=n.input)||void 0===r||r.setAttribute("aria-activedescendant",e.id),t&&e.scrollIntoView({block:"nearest"}))})}},{key:"value",get:function(){var t;return(null===(t=this.valueInput)||void 0===t?void 0:t.value)||""},set:function(t){var e=null==t?"":String(t),n=this.state.items.find(function(t){return t.value===e})||this.state.allLocalItems.find(function(t){return t.value===e});n?this.selectItem(n):this.valueInput&&(this.valueInput.value=e)}},{key:"getBindableState",value:function(){var t;return{query:this.state.query||"",value:this.value,label:(null===(t=this.input)||void 0===t?void 0:t.value)||""}}},{key:"getStateSnapshot",value:function(){var t;return{open:!!this.state.open,value:this.value,label:(null===(t=this.input)||void 0===t?void 0:t.value)||"",selected:this.state.selected?{value:this.state.selected.value,label:this.state.selected.label}:null}}},{key:"shouldDispatchPprChange",value:function(t,e,n){return!!n||"selected"===t}},{key:"applyBindableState",value:function(t){if(t&&"object"===v(t)&&("string"==typeof t.query&&t.query!==this.state.query&&(this.state.query=t.query,this.input&&(this.input.value=t.query)),void 0!==t.value&&null!==t.value)){var e=String(t.value);e!==this.value&&(this.value=e)}}},{key:"handlePprUpdate",value:function(){this.refreshPpr()}},{key:"refreshPpr",value:function(){if(this.config.clearOnPpr&&(this.state.query="",this.state.selected=null,this.state.page=1,this.state.hasMore=!1,this.state.activeIndex=-1,this.input&&(this.input.value=""),this.valueInput&&(this.valueInput.value="")),this.config.endpoint)return this.remoteCache.clear(),this.state.items=[],this.renderItems(),void(this.config.autoLoadOnPpr&&this.loadRemotePage(1,!1));this.state.allLocalItems=this.normalizeItems(this.collectLocalItems()),this.applyLocalFilter()}},{key:"destroy",value:function(){var t,n,r,i;this.fetchTimer&&(clearTimeout(this.fetchTimer),this.fetchTimer=null),null===(t=this.loaderState)||void 0===t||null===(n=t.destroy)||void 0===n||n.call(t),null===(r=this.stateBinding)||void 0===r||null===(i=r.disconnect)||void 0===i||i.call(r),document.removeEventListener("click",this.boundOutsideClick),g(e,"destroy",this,3)([])}}],u=[{key:"selector",get:function(){return"dropdown"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"dropdown"}},{key:"getNativeSelectors",value:function(){return['select[component="dropdown"]','select[role="dropdown"]']}},{key:"prepareHost",value:function(t){if(!(t instanceof HTMLSelectElement))return t;var e=document.createElement("section");return(0,a.ts)(t,e,{exclude:["component","role"]}),e.setAttribute("component","dropdown"),e.setAttribute("data-items",JSON.stringify((0,a.NQ)(t))),e.setAttribute("value",(0,a.BD)(t)),t.replaceWith(e),e}}],r&&y(n.prototype,r),u&&y(n,u),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,u,c,f,h,b}(r.Component);O=P,A="dropdown-template",(C=E(C="templateId"))in O?Object.defineProperty(O,C,{value:A,enumerable:!0,configurable:!0,writable:!0}):O[C]=A,"undefined"!=typeof window&&(window.DropdownComponent=P)},734(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function l(n,r,i,a){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return o(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,o(h,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(h),o(h,a,"Generator"),o(h,r,function(){return this}),o(h,"toString",function(){return"[object Generator]"}),(i=function(){return{w:l,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function l(t){a(o,r,i,l,s,"next",t)}function s(t){a(o,r,i,l,s,"throw",t)}l(void 0)})}}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,v(r.key),r)}}function u(t,e,n){return e=h(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,n||[],h(t).constructor):e.apply(t,n))}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function d(t,e,n,r){var i=f(h(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},f.apply(null,arguments)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function v(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{FormComponent:()=>g});var y,m,b,g=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=u(this,e,[t,r])).templateId=e.templateId,n.config={endpoint:n.container.getAttribute("data-endpoint")||n.container.getAttribute("action")||"",method:(n.container.getAttribute("method")||"post").toLowerCase(),submitLabel:n.container.getAttribute("data-submit-label")||"Submit",resetLabel:n.container.getAttribute("data-reset-label")||"Reset"},n.state={submitError:"",submitting:!1,formInvalid:!1},n.boundSubmit=function(t){n.handleSubmit(t)},n.boundReset=function(){return n.handleReset()},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&p(t,e)}(e,t),n=e,r=[{key:"init",value:function(){this.validateStructure(),this.render()}},{key:"render",value:(c=l(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,d(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-form"),this.errorEl=this.container.querySelector('[data-role="errors"]'),this.submitBtn=this.container.querySelector('[data-role="submit"]'),this.resetBtn=this.container.querySelector('[data-role="reset"]'),this.projectSlot("fields"),this.projectSlot("actions"),this.projectSlot("errors"),this.submitBtn&&(this.submitBtn.textContent=this.config.submitLabel),this.resetBtn&&(this.resetBtn.textContent=this.config.resetLabel),this.config.endpoint&&this.element.setAttribute("action",this.config.endpoint),this.element.setAttribute("method",this.config.method),this.element.addEventListener("submit",this.boundSubmit),this.element.addEventListener("reset",this.boundReset);case 2:return t.a(2)}},t,this)})),function(){return c.apply(this,arguments)})},{key:"projectSlot",value:function(t){var e=this.container.querySelector('slot[name="'.concat(t,'"]'));if(e){var n=Array.from(this.container.querySelectorAll('[slot="'.concat(t,'"]')));if(n.length){var r=document.createDocumentFragment();n.forEach(function(t){t.removeAttribute("slot"),r.appendChild(t)}),e.replaceWith(r)}}}},{key:"collectData",value:function(){var t=new FormData(this.element);return Object.fromEntries(t.entries())}},{key:"validateChildren",value:function(){var t=this.element.querySelectorAll('holi-input, [component="input-field"], [role="input-field"], holi-select, [component="select-field"], [role="select-field"], holi-checkbox, [component="checkbox-group"], [role="checkbox-group"], holi-radio, [component="radio-group"], [role="radio-group"]'),e=!0;return t.forEach(function(t){var n=t.inputcomponent||t.selectcomponent||t.checkboxgroupcomponent||t.radiogroupcomponent;null!=n&&n.validate&&!1===n.validate()&&(e=!1)}),this.state.formInvalid=!this.element.checkValidity()||!e,!this.state.formInvalid}},{key:"setError",value:function(t){this.state.submitError=t?String(t):"",this.errorEl&&(this.errorEl.hidden=!this.state.submitError,this.errorEl.textContent=this.state.submitError)}},{key:"handleSubmit",value:(a=l(i().m(function t(e){var n,r,o,a,l,s;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(e.preventDefault(),this.element){t.n=1;break}return t.a(2);case 1:if(this.validateChildren()){t.n=2;break}return this.setError("Please fix validation errors before submitting."),t.a(2);case 2:if(this.setError(""),n={data:this.collectData()},r=new CustomEvent("formsubmit",{detail:n,cancelable:!0}),this.element.dispatchEvent(r)){t.n=3;break}return t.a(2);case 3:if(this.config.endpoint){t.n=4;break}return t.a(2);case 4:return this.state.submitting=!0,t.p=5,t.n=6,fetch(this.config.endpoint,{method:this.config.method.toUpperCase(),credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(n.data)});case 6:if((o=t.v).ok){t.n=7;break}throw new Error("HTTP ".concat(o.status));case 7:return a=null,t.p=8,t.n=9,o.json();case 9:a=t.v,t.n=11;break;case 10:t.p=10,t.v;case 11:this.element.dispatchEvent(new CustomEvent("formsuccess",{detail:{data:n.data,response:a}})),t.n=13;break;case 12:t.p=12,s=t.v,l="Form submission failed.",this.setError(l),this.element.dispatchEvent(new CustomEvent("formerror",{detail:{error:String((null==s?void 0:s.message)||s||l)}}));case 13:return t.p=13,this.state.submitting=!1,t.f(13);case 14:return t.a(2)}},t,this,[[8,10],[5,12,13,14]])})),function(t){return a.apply(this,arguments)})},{key:"handleReset",value:function(){var t;this.setError(""),this.state.formInvalid=!1,null===(t=this.element)||void 0===t||t.dispatchEvent(new CustomEvent("formreset",{detail:{}}))}},{key:"destroy",value:function(){var t,n;null===(t=this.element)||void 0===t||t.removeEventListener("submit",this.boundSubmit),null===(n=this.element)||void 0===n||n.removeEventListener("reset",this.boundReset),d(e,"destroy",this,3)([])}}],o=[{key:"selector",get:function(){return"holi-form"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"form-shell"}}],r&&s(n.prototype,r),o&&s(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,a,c}(n(812).Component);y=g,b="form-template",(m=v(m="templateId"))in y?Object.defineProperty(y,m,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[m]=b,"undefined"!=typeof window&&(window.FormComponent=g)},120(t,e,n){"use strict";n.r(e),n.d(e,{GalleryComponent:()=>A});var r=n(812);function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){u=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(t,e)||o(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){if(t){if("string"==typeof t)return a(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function l(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return s(c,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var a={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(s(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,s(h,"constructor",d),s(d,"constructor",c),c.displayName="GeneratorFunction",s(d,i,"GeneratorFunction"),s(h),s(h,i,"Generator"),s(h,r,function(){return this}),s(h,"toString",function(){return"[object Generator]"}),(l=function(){return{w:o,m:p}})()}function s(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}s=function(t,e,n,r){function o(e,n){s(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},s(t,e,n,r)}function u(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function c(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){u(o,r,i,a,l,"next",t)}function l(t){u(o,r,i,a,l,"throw",t)}a(void 0)})}}function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?d(Object(n),!0).forEach(function(e){g(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function h(t,e,n){return e=m(e),function(t,e){if(e&&("object"==w(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,p()?Reflect.construct(e,n||[],m(t).constructor):e.apply(t,n))}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(p=function(){return!!t})()}function v(t,e,n,r){var i=y(m(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function y(){return y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=m(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},y.apply(null,arguments)}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}function g(t,e,n){return(e=O(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function w(t){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},w(t)}function S(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function k(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,O(r.key),r)}}function E(t,e,n){return e&&k(t.prototype,e),n&&k(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function O(t){var e=function(t){if("object"!=w(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==w(e)?e:e+""}var C=function(){return E(function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:80;S(this,t),this.limit=Math.max(10,Number(e)||80),this.store=new Map},[{key:"touch",value:function(t){if(this.store.has(t)){var e=this.store.get(t);this.store.delete(t),this.store.set(t,e)}}},{key:"set",value:function(t,e){for(this.store.has(t)&&this.store.delete(t),this.store.set(t,e);this.store.size>this.limit;){var n=this.store.keys().next().value;this.store.delete(n)}}},{key:"preload",value:function(t){var e=this;if(!t)return Promise.resolve(null);var n=String(t),r=this.store.get(n);if(null!=r&&r.promise)return this.touch(n),r.promise;var i=new Promise(function(t,e){var r=new Image;r.onload=function(){return t(n)},r.onerror=function(){return e(new Error("Failed to preload image: ".concat(n)))},r.src=n});return this.set(n,{promise:i}),i.then(function(){return e.set(n,{state:"loaded"})}).catch(function(){return e.set(n,{state:"error"})}),i}}])}(),A=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return S(this,e),(n=h(this,e,[t,r])).templateId=e.templateId,n.dialogTitle=t.getAttribute("dialog-title")||t.getAttribute("title")||"Image Viewer",n.footerMessage=t.getAttribute("footer-message")||"Use arrows or swipe to navigate.",n.remoteSource=t.getAttribute("source")||t.getAttribute("data-source")||"",n.remoteSourceTemplate=n.remoteSource,n.requestParams=n.parseObjectAttr("data-request-params"),n.pageSize=n.parsePositive(t.getAttribute("page-size"),12),n.maxThumbHeight=n.parsePositive(t.getAttribute("thumb-height"),72),n.defaultMode=n.resolveDisplayMode(t.getAttribute("display-mode")||""),n.displayMode=n.defaultMode,n.cache=new C(n.parsePositive(t.getAttribute("cache-size"),80)),n.sourceNodes=[],n.initialInlineItems=[],n.allItems=[],n.viewItems=[],n.visibleItems=[],n.visibleStart=0,n.visibleEnd=0,n.pendingIndex=0,n.query="",n.metaQuery="",n.sortField="name",n.sortDirection="desc"===t.getAttribute("sort-direction")?"desc":"asc",n.currentPage=1,n.visibleCount=n.pageSize,n.observer=null,n.loading=!1,n.thumbnailPool=[],n.thumbnailPoolVersion=0,n.thumbnailPoolRenderedVersion=-1,n.viewSignature="",n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&b(t,e)}(e,t),E(e,[{key:"parsePositive",value:function(t,e){var n=Number(t);return Number.isFinite(n)&&n>0?n:e}},{key:"parseObjectAttr",value:function(t){var e,n=String((null===(e=this.container)||void 0===e?void 0:e.getAttribute(t))||"").trim();if(!n)return{};try{var r=JSON.parse(n);return r&&"object"===w(r)&&!Array.isArray(r)?r:{}}catch(t){return{}}}},{key:"resolveDisplayMode",value:function(t){return"infinite"===String(t||"").trim().toLowerCase()||this.container.hasAttribute("infinite-scroll")?"infinite":"paginate"}},{key:"captureSourceItems",value:function(){var t=Array.from(this.container.children).filter(function(t){return!t.classList.contains("holi-gallery-root")});return this.sourceNodes=t,t.filter(function(t){return!!t.matches("[slot]")||!!t.matches("img, figure, a")||!!t.querySelector("img")})}},{key:"parseItem",value:function(t,e){var n=t.matches("img")?t:t.querySelector("img");if(!n)return null;var r=t.matches("a")?t:t.querySelector("a"),i=t.getAttribute("data-thumb-src")||n.getAttribute("src"),o=t.getAttribute("data-full-src")||n.getAttribute("data-full-src")||(null==r?void 0:r.getAttribute("href"))||i;if(!i||!o)return null;var a=this.parseMetadata(t.getAttribute("data-meta")||n.getAttribute("data-meta")||""),l=this.extractDatasetMetadata(t,n),s=t.getAttribute("data-name")||n.getAttribute("data-name")||n.getAttribute("alt")||"Image ".concat(e+1);return{index:e,id:String(t.getAttribute("data-id")||n.getAttribute("data-id")||e),name:s,thumbSrc:i,fullSrc:o,thumbAlt:t.getAttribute("data-thumb-alt")||n.getAttribute("alt")||"Thumbnail ".concat(e+1),fullAlt:t.getAttribute("data-full-alt")||n.getAttribute("alt")||"Image ".concat(e+1),metadata:f(f({},l),a)}}},{key:"parseMetadata",value:function(t){if(!t)return{};try{var e=JSON.parse(t);return e&&"object"===w(e)?e:{}}catch(t){return{}}}},{key:"extractDatasetMetadata",value:function(){for(var t=new Set(["thumbSrc","fullSrc","thumbAlt","fullAlt","name","meta","id"]),e={},n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return r.forEach(function(n){null!=n&&n.dataset&&Object.keys(n.dataset).forEach(function(r){if(!t.has(r)){var i=n.dataset[r];null!=i&&""!==i&&(e[r]=i)}})}),e}},{key:"parseApiItem",value:function(t,e){var n;if(!t||"object"!==w(t))return null;var r=t.thumbSrc||t.thumbnail||t.thumb||t.src||"",i=t.fullSrc||t.full||t.url||t.image||r;if(!r||!i)return null;var o=f({},t.metadata&&"object"===w(t.metadata)?t.metadata:{});Object.keys(t).forEach(function(e){["id","name","title","thumbSrc","thumbnail","thumb","src","fullSrc","full","url","image","alt","thumbAlt","fullAlt","metadata"].includes(e)||(o[e]=t[e])});var a=t.name||t.title||t.alt||"Image ".concat(e+1);return{index:e,id:String(null!==(n=t.id)&&void 0!==n?n:e),name:a,thumbSrc:r,fullSrc:i,thumbAlt:t.thumbAlt||t.alt||a,fullAlt:t.fullAlt||t.alt||a,metadata:o}}},{key:"resolveItems",value:(u=c(l().m(function t(){var e,n,r,i,o,a,s,u,c=this;return l().w(function(t){for(;;)switch(t.p=t.n){case 0:if(e=this.captureSourceItems(),(n=e.map(function(t,e){return c.parseItem(t,e)}).filter(Boolean)).length&&(this.initialInlineItems=n),r=this.resolveRemoteSource()){t.n=1;break}return t.a(2,n.length?n:this.initialInlineItems);case 1:return this.setLoadingState(!0,"Loading images..."),t.p=2,t.n=3,fetch(r,{credentials:"same-origin"});case 3:if((i=t.v).ok){t.n=4;break}throw new Error("Gallery source request failed: ".concat(i.status));case 4:return t.n=5,i.json();case 5:return o=t.v,a=Array.isArray(o)?o:Array.isArray(null==o?void 0:o.items)?o.items:Array.isArray(null==o?void 0:o.rows)?o.rows:[],s=a.map(function(t,e){return c.parseApiItem(t,e)}).filter(Boolean),t.a(2,s.length?s:n.length?n:this.initialInlineItems);case 6:return t.p=6,u=t.v,this.setLoadingState(!1),this.setStateMessage("Failed to load remote gallery source. ".concat(String(u.message||u))),t.a(2,n.length?n:this.initialInlineItems);case 7:return t.p=7,this.setLoadingState(!1),t.f(7);case 8:return t.a(2)}},t,this,[[2,6,7,8]])})),function(){return u.apply(this,arguments)})},{key:"validateStructure",value:function(){v(e,"validateStructure",this,3)([]),this.hasItems=this.allItems.length>0}},{key:"init",value:(s=c(l().m(function t(){return l().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.resolveItems();case 1:return this.allItems=t.v,this.validateStructure(),t.n=2,this.render();case 2:this.bindEvents(),this.applyView(!0);case 3:return t.a(2)}},t,this)})),function(){return s.apply(this,arguments)})},{key:"render",value:(r=c(l().m(function t(){return l().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,v(e,"render",this,3)([]);case 1:this.root=this.container.querySelector(".holi-gallery-root"),this.toolbar=this.container.querySelector('[data-role="toolbar"]'),this.stateNode=this.container.querySelector('[data-role="state"]'),this.searchInput=this.container.querySelector('[data-role="search-input"]'),this.metaInput=this.container.querySelector('[data-role="meta-input"]'),this.sortFieldSelect=this.container.querySelector('[data-role="sort-field"]'),this.sortDirectionSelect=this.container.querySelector('[data-role="sort-direction"]'),this.displayModeSelect=this.container.querySelector('[data-role="display-mode"]'),this.gridWrap=this.container.querySelector('[data-role="grid-wrap"]'),this.grid=this.container.querySelector('[data-role="grid"]'),this.sentinel=this.container.querySelector('[data-role="sentinel"]'),this.pagination=this.container.querySelector('[data-role="pagination"]'),this.pageStatus=this.container.querySelector('[data-role="page-status"]'),this.dialogHost=this.container.querySelector('[data-role="dialog"]'),this.carouselHost=this.container.querySelector('[data-role="carousel"]'),this.slidesHost=this.container.querySelector('[data-role="slides"]'),this.sourceNodes.forEach(function(t){return t.remove()}),this.gridWrap&&(this.gridWrap.style.maxHeight="".concat(this.maxThumbHeight,"vh")),this.sortDirectionSelect&&(this.sortDirectionSelect.value=this.sortDirection),this.displayModeSelect&&(this.displayModeSelect.value=this.displayMode),this.renderSortOptions(),this.applyDialogConfig();case 2:return t.a(2)}},t,this)})),function(){return r.apply(this,arguments)})},{key:"renderSortOptions",value:function(){var t=this;if(this.sortFieldSelect){var e=new Set(["name"]);this.allItems.forEach(function(t){Object.keys(t.metadata||{}).forEach(function(t){return e.add(t)})}),this.sortFieldSelect.replaceChildren(),Array.from(e).forEach(function(e){var n=document.createElement("option");n.value=e,n.textContent="name"===e?"Name":"Metadata: ".concat(e),t.sortFieldSelect.appendChild(n)}),e.has(this.sortField)||(this.sortField="name"),this.sortFieldSelect.value=this.sortField}}},{key:"setLoadingState",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";this.loading=!!t,this.stateNode&&(t?(this.stateNode.hidden=!1,this.stateNode.textContent=e||"Loading..."):e||(this.stateNode.hidden=!0,this.stateNode.textContent=""))}},{key:"setStateMessage",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(this.stateNode){if(!t)return this.stateNode.hidden=!0,void(this.stateNode.textContent="");this.stateNode.hidden=!1,this.stateNode.textContent=t}}},{key:"resolveRemoteSource",value:function(){var t=String(this.remoteSourceTemplate||this.remoteSource||"").trim();if(!t)return this.remoteSource="","";var e=t.includes("@{")?this.resolveTemplateString(t,this.getBindingContext()):t,n=String(e||"").trim();if(!n)return this.remoteSource="","";var r=new URL(n,window.location.href),o=this.resolveRequestParams();return Object.entries(o).forEach(function(t){var e=i(t,2),n=e[0],o=e[1];null!=o&&""!==o&&r.searchParams.set(n,String(o))}),this.remoteSource=r.toString(),this.remoteSource}},{key:"resolveRequestParams",value:function(){var t=this,e=Object.entries(this.requestParams||{});if(!e.length)return{};var n={};return e.forEach(function(e){var r=i(e,2),o=r[0],a=r[1];if(o){var l=String(a||"").trim();if(l){var s=t.extractExpression(l),u=t.evaluateExpression(s,t.getBindingContext());null!=u&&""!==u&&(n[o]=u)}}}),n}},{key:"refreshPpr",value:(n=c(l().m(function t(){return l().w(function(t){for(;;)switch(t.n){case 0:if(!this.resolveRemoteSource()){t.n=2;break}return t.n=1,this.resolveItems();case 1:return this.allItems=t.v,this.hasItems=this.allItems.length>0,this.renderSortOptions(),this.applyView(!0),t.a(2);case 2:this.applyView(!0);case 3:return t.a(2)}},t,this)})),function(){return n.apply(this,arguments)})},{key:"normalizeText",value:function(t){return String(null!=t?t:"").trim().toLowerCase()}},{key:"matchesMetaFilter",value:function(t){var e=this.normalizeText(this.metaQuery);if(!e)return!0;var n=t.metadata||{};if(e.includes(":")){var r=i(e.split(":"),2),o=r[0],a=r[1],l=this.normalizeText(o),s=this.normalizeText(a);if(!l||!s)return!0;for(var u=Object.keys(n),c=0;c<u.length;c+=1)if(this.normalizeText(u[c])===l&&this.normalizeText(n[u[c]]).includes(s))return!0;return!1}return this.normalizeText(JSON.stringify(n)).includes(e)}},{key:"matchesSearch",value:function(t){var e=this.normalizeText(this.query);if(!e)return!0;var n=this.normalizeText(t.name),r=this.normalizeText(JSON.stringify(t.metadata||{}));return n.includes(e)||r.includes(e)}},{key:"sortItems",value:function(t){var e,n=this,r="desc"===this.sortDirection?-1:1,i=this.sortField||"name",l=function(t){if(Array.isArray(t))return a(t)}(e=t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||o(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();return l.sort(function(t,e){var o,a,l="name"===i?t.name:null===(o=t.metadata)||void 0===o?void 0:o[i],s="name"===i?e.name:null===(a=e.metadata)||void 0===a?void 0:a[i],u=Number(l),c=Number(s);if(Number.isFinite(u)&&Number.isFinite(c))return u<c?-1*r:u>c?1*r:0;var d=n.normalizeText(l),f=n.normalizeText(s);return d<f?-1*r:d>f?1*r:0}),l}},{key:"computeVisibleItems",value:function(t){if("infinite"===this.displayMode){t&&(this.visibleCount=this.pageSize);var e=Math.min(this.visibleCount,this.viewItems.length);return this.visibleStart=0,this.visibleEnd=e,void(this.visibleItems=this.viewItems.slice(0,e).map(function(t,e){return f(f({},t),{},{viewIndex:e})}))}var n=Math.max(1,Math.ceil(this.viewItems.length/this.pageSize));this.currentPage=Math.min(this.currentPage,n),t&&(this.currentPage=1);var r=(this.currentPage-1)*this.pageSize,i=r+this.pageSize;this.visibleStart=r,this.visibleEnd=Math.min(i,this.viewItems.length),this.visibleItems=this.viewItems.slice(r,i).map(function(t,e){return f(f({},t),{},{viewIndex:r+e})})}},{key:"resolveViewSignature",value:function(t){return Array.isArray(t)&&t.length?t.map(function(t){var e,n;return String(null!==(e=null!==(n=t.id)&&void 0!==n?n:t.index)&&void 0!==e?e:"")}).join("|"):""}},{key:"applyView",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.hasItems)return this.viewItems=[],this.visibleItems=[],this.visibleStart=0,this.visibleEnd=0,this.thumbnailPool=[],this.thumbnailPoolVersion+=1,this.renderThumbnails(),this.renderSlides(),this.updatePagination(),this.updateSentinel(),void this.setStateMessage("No images available. Provide inline <img> content or a valid remote source.");var n=this.allItems.filter(function(e){return t.matchesSearch(e)&&t.matchesMetaFilter(e)});this.viewItems=this.sortItems(n);var r=this.resolveViewSignature(this.viewItems),i=r!==this.viewSignature;i&&(this.viewSignature=r,this.thumbnailPoolVersion+=1),this.computeVisibleItems(e),this.renderThumbnails(),(i||e)&&this.renderSlides(),this.updatePagination(),this.updateSentinel(),this.syncNestedComponents(),this.preloadVisibleImages(),this.viewItems.length?this.loading||this.setStateMessage(""):this.setStateMessage("No images match the current filters.")}},{key:"renderThumbnails",value:function(){var t=this;if(this.grid){if(!this.viewItems.length)return this.thumbnailPool=[],this.thumbnailPoolRenderedVersion=this.thumbnailPoolVersion,void this.grid.replaceChildren();this.thumbnailPoolRenderedVersion!==this.thumbnailPoolVersion&&(this.grid.replaceChildren(),this.thumbnailPool=[],this.viewItems.forEach(function(e,n){var r=document.createElement("button");r.type="button",r.className="holi-gallery-thumb",r.setAttribute("data-gallery-index",String(n)),r.setAttribute("aria-label","Open image ".concat(e.index+1)),r.setAttribute("title",e.name||e.thumbAlt||"");var i=document.createElement("img");i.src=e.thumbSrc,i.alt=e.thumbAlt,i.loading="lazy",r.appendChild(i),t.thumbnailPool.push(r),t.grid.appendChild(r)}),this.thumbnailPoolRenderedVersion=this.thumbnailPoolVersion),this.applyThumbnailVisibility()}}},{key:"applyThumbnailVisibility",value:function(){var t=Math.max(0,Number(this.visibleStart)||0),e=Math.max(t,Number(this.visibleEnd)||0);this.thumbnailPool.forEach(function(n,r){n.hidden=r<t||r>=e})}},{key:"renderSlides",value:function(){var t=this,e=this.resolveSlidesHost();e&&(this.slidesHost=e,this.slidesHost.replaceChildren(),this.viewItems.forEach(function(e){var n=document.createElement("article");n.className="slide";var r=document.createElement("img");r.src=e.fullSrc,r.alt=e.fullAlt,n.appendChild(r),t.slidesHost.appendChild(n)}))}},{key:"resolveSlidesHost",value:function(){var t=this.getCarouselInstance();if(null!=t&&t.track&&t.track.isConnected)return t.track;for(var e=Array.from(this.container.querySelectorAll('[data-role="slides"], [data-role="track"]')),n=e.length-1;n>=0;n-=1){var r=e[n];if(r instanceof HTMLElement&&r.isConnected&&(r.matches('[data-role="track"]')||r.classList.contains("slides")))return r}return null}},{key:"applyDialogConfig",value:function(){this.dialogHost&&(this.dialogHost.setAttribute("title",this.dialogTitle),this.dialogHost.setAttribute("footer-message",this.footerMessage))}},{key:"ensureNestedComponents",value:function(){var t,e=null===(t=window.HoliApp)||void 0===t?void 0:t.HoliApp;e&&"function"==typeof e.init&&e.init(this.container)}},{key:"syncNestedComponents",value:function(){var t,e=this.getCarouselInstance();if(e){"function"==typeof e.refreshSlides&&e.refreshSlides(),"function"==typeof e.updateTrackSizing&&e.updateTrackSizing(),"function"==typeof e.renderDots&&e.renderDots();var n=Math.max((null===(t=e.getDotCount)||void 0===t?void 0:t.call(e))-1||0,0);this.pendingIndex=Math.min(this.pendingIndex,n),"function"==typeof e.goToSlide&&e.goToSlide(this.pendingIndex,!1)}else this.ensureNestedComponents()}},{key:"getDialogInstance",value:function(){var t;return(null===(t=this.dialogHost)||void 0===t?void 0:t.dialogcomponent)||null}},{key:"getCarouselInstance",value:function(){for(var t=this.container.querySelectorAll('carousel, [component="carousel"], [role="carousel"]'),e=0;e<t.length;e+=1){var n=t[e].carouselcomponent;if(n)return n}return null}},{key:"preloadVisibleImages",value:function(){var t=this;this.visibleItems.slice(0,this.pageSize).forEach(function(e){t.cache.preload(e.thumbSrc).catch(function(){})})}},{key:"syncToPendingIndex",value:function(){var t=this.getCarouselInstance();if(!t)return!1;var e=this.viewItems[this.pendingIndex];if(e){this.cache.preload(e.fullSrc).catch(function(){});var n=this.viewItems[this.pendingIndex+1],r=this.viewItems[this.pendingIndex-1];n&&this.cache.preload(n.fullSrc).catch(function(){}),r&&this.cache.preload(r.fullSrc).catch(function(){})}return t.goToSlide(this.pendingIndex,!1),!0}},{key:"openAt",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=Number(t);this.pendingIndex=Number.isFinite(r)?r:0;var i=this.getDialogInstance();if(i)i.open(),this.syncToPendingIndex()||requestAnimationFrame(function(){e.syncToPendingIndex()});else{if(this.ensureNestedComponents(),n>=8)return;requestAnimationFrame(function(){return e.openAt(e.pendingIndex,n+1)})}}},{key:"updatePagination",value:function(){if(this.pagination&&this.pageStatus){if("infinite"===this.displayMode)return this.pagination.hidden=!0,void(this.pageStatus.textContent="Showing ".concat(this.visibleItems.length," of ").concat(this.viewItems.length," images"));this.pagination.hidden=!1;var t=Math.max(1,Math.ceil(this.viewItems.length/this.pageSize)),e=this.pagination.querySelector('[data-action="prev-page"]'),n=this.pagination.querySelector('[data-action="next-page"]');e&&(e.disabled=this.currentPage<=1),n&&(n.disabled=this.currentPage>=t),this.pageStatus.textContent="Page ".concat(this.currentPage," of ").concat(t," (").concat(this.viewItems.length," images)")}}},{key:"updateSentinel",value:function(){if(this.sentinel){var t="infinite"===this.displayMode&&this.visibleItems.length<this.viewItems.length;this.sentinel.hidden=!t}}},{key:"setupInfiniteObserver",value:function(){var t=this;this.observer&&(this.observer.disconnect(),this.observer=null),"infinite"===this.displayMode&&this.sentinel&&this.gridWrap&&"undefined"!=typeof IntersectionObserver&&(this.observer=new IntersectionObserver(function(e){e.some(function(t){return t.isIntersecting})&&(t.visibleItems.length>=t.viewItems.length||(t.visibleCount+=t.pageSize,t.computeVisibleItems(!1),t.renderThumbnails(),t.updateSentinel(),t.updatePagination(),t.preloadVisibleImages()))},{root:this.gridWrap,threshold:.1}),this.observer.observe(this.sentinel))}},{key:"bindEvents",value:function(){var t,e,n,r,i,o,a,l,s=this;null===(t=this.grid)||void 0===t||t.addEventListener("click",function(t){var e=t.target.closest("[data-gallery-index]");if(e){var n=Number(e.getAttribute("data-gallery-index"));s.openAt(n)}}),null===(e=this.dialogHost)||void 0===e||e.addEventListener("dialogopen",function(){s.syncToPendingIndex()}),null===(n=this.searchInput)||void 0===n||n.addEventListener("input",function(t){s.query=t.target.value||"",s.applyView(!0)}),null===(r=this.metaInput)||void 0===r||r.addEventListener("input",function(t){s.metaQuery=t.target.value||"",s.applyView(!0)}),null===(i=this.sortFieldSelect)||void 0===i||i.addEventListener("change",function(t){s.sortField=t.target.value||"name",s.applyView(!0)}),null===(o=this.sortDirectionSelect)||void 0===o||o.addEventListener("change",function(t){s.sortDirection="desc"===t.target.value?"desc":"asc",s.applyView(!0)}),null===(a=this.displayModeSelect)||void 0===a||a.addEventListener("change",function(t){s.displayMode="infinite"===t.target.value?"infinite":"paginate",s.applyView(!0),s.setupInfiniteObserver()}),null===(l=this.pagination)||void 0===l||l.addEventListener("click",function(t){var e=t.target.closest("[data-action]");if(e&&"paginate"===s.displayMode){var n=e.getAttribute("data-action"),r=Math.max(1,Math.ceil(s.viewItems.length/s.pageSize));"prev-page"===n&&s.currentPage>1&&(s.currentPage-=1,s.applyView(!1)),"next-page"===n&&s.currentPage<r&&(s.currentPage+=1,s.applyView(!1))}}),this.setupInfiniteObserver()}},{key:"destroy",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),v(e,"destroy",this,3)([])}}],[{key:"selector",get:function(){return"gallery"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"gallery"}}]);var n,r,s,u}(r.Component);g(A,"templateId","gallery-template"),"undefined"!=typeof window&&(window.GalleryComponent=A)},390(t,e,n){"use strict";n.r(e),n.d(e,{InputComponent:()=>k});var r=n(812),i=n(573),o=n(853);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function s(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,c=Object.create(s.prototype);return u(c,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var a={};function l(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(u(e={},r,function(){return this}),e),h=d.prototype=l.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,u(h,"constructor",d),u(d,"constructor",c),c.displayName="GeneratorFunction",u(d,i,"GeneratorFunction"),u(h),u(h,i,"Generator"),u(h,r,function(){return this}),u(h,"toString",function(){return"[object Generator]"}),(s=function(){return{w:o,m:p}})()}function u(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}u=function(t,e,n,r){function o(e,n){u(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},u(t,e,n,r)}function c(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,b(r.key),r)}}function f(t,e,n){return e=y(e),function(t,e){if(e&&("object"==a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,h()?Reflect.construct(e,n||[],y(t).constructor):e.apply(t,n))}function h(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(h=function(){return!!t})()}function p(t,e,n,r){var i=v(y(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function v(){return v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=y(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},v.apply(null,arguments)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}function b(t){var e=function(t){if("object"!=a(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==a(e)?e:e+""}var g,w,S,k=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=f(this,e,[t,r])).templateId=e.templateId;var i=n.resolveControlType(),o="area"===i;return n.config={name:n.readAttr("name"),label:n.readAttr("label"),type:o?"text":i,controlType:i,isAreaMode:o,placeholder:n.readAttr("placeholder"),rows:Math.max(1,Number(n.readAttr("rows","4"))||4),cols:Math.max(1,Number(n.readAttr("cols","30"))||30),required:n.readBoolAttr("required",!1),disabled:n.readBoolAttr("disabled",!1),errorMessage:n.readAttr("error-message","Invalid value."),validators:n.parseValidators(n.readAttr("data-validator")||n.readAttr("data-validators"))},n.state={label:n.config.label,required:n.config.required,name:n.config.name,type:n.config.type,placeholder:n.config.placeholder,rows:n.config.rows,cols:n.config.cols,isAreaMode:n.config.isAreaMode,isInputMode:!n.config.isAreaMode,value:n.readAttr("value",""),invalid:!1,errorMessage:""},n.boundInput=function(t){return n.handleInput(t)},n.boundBlur=function(){return n.handleBlur()},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&m(t,e)}(e,t),n=e,r=[{key:"readAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.container.getAttribute(t);return null==n?e:String(n)}},{key:"readBoolAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.container.hasAttribute(t))return e;var n=String(this.container.getAttribute(t)||"").trim().toLowerCase();return!n||"false"!==n&&"0"!==n&&"no"!==n}},{key:"parseValidators",value:function(t){return i.D.parseList(t)}},{key:"resolveControlType",value:function(){var t=String(this.readAttr("type","text")||"text").trim().toLowerCase(),e=String(this.readAttr("role","")||"").trim().toLowerCase(),n={text:"text",email:"email",number:"number",password:"password",url:"url",tel:"tel",search:"search",textarea:"area",area:"area"};if(e&&n[e]){if("text"===t||"input"===t)return n[e];if("area"===t||"textarea"===t)return"area"}return"area"===t||"textarea"===t?"area":t||"text"}},{key:"init",value:function(){this.validateStructure(),this.render()}},{key:"render",value:(u=s().m(function t(){return s().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,p(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-input"),this.inputEl=this.container.querySelector('[data-role="control-input"]'),this.areaEl=this.container.querySelector('[data-role="control-area"]'),this.controlEl=this.areaEl||this.inputEl,this.labelEl=this.container.querySelector('[data-role="label"]'),this.errorEl=this.container.querySelector('[data-role="error"]'),this.projectSlot("label"),this.projectSlot("helper"),this.projectSlot("error"),this.applyFieldAttributes(),this.bindEvents(),this.validate(),this.updateView();case 2:return t.a(2)}},t,this)}),h=function(){var t=this,e=arguments;return new Promise(function(n,r){var i=u.apply(t,e);function o(t){c(i,n,r,o,a,"next",t)}function a(t){c(i,n,r,o,a,"throw",t)}o(void 0)})},function(){return h.apply(this,arguments)})},{key:"projectSlot",value:function(t){var e=this.container.querySelector('slot[name="'.concat(t,'"]'));if(e){var n=Array.from(this.container.querySelectorAll('[slot="'.concat(t,'"]')));if(n.length){var r=document.createDocumentFragment();n.forEach(function(t){t.removeAttribute("slot"),r.appendChild(t)}),e.replaceWith(r)}}}},{key:"applyFieldAttributes",value:function(){if(this.controlEl){this.controlEl.value=this.state.value,this.controlEl.name=this.config.name||"",this.controlEl.placeholder=this.config.placeholder||"",this.controlEl.required=!!this.config.required,this.controlEl.disabled=!!this.config.disabled,this.config.isAreaMode?(this.controlEl.rows=this.config.rows,this.controlEl.cols=this.config.cols):this.controlEl.type=this.config.type||"text";var t=this.controlEl.id||"holi-input-".concat(Math.random().toString(16).slice(2));this.controlEl.id=t,this.labelEl&&!this.labelEl.getAttribute("for")&&this.labelEl.setAttribute("for",t)}}},{key:"bindEvents",value:function(){this.controlEl&&(this.controlEl.addEventListener("input",this.boundInput),this.controlEl.addEventListener("blur",this.boundBlur))}},{key:"handleInput",value:function(t){var e;this.state.value=String((null==t||null===(e=t.target)||void 0===e?void 0:e.value)||""),this.validate(),this.updateView(),this.dispatchEvent("inputchange",{value:this.state.value,invalid:this.state.invalid})}},{key:"handleBlur",value:function(){this.validate(),this.updateView()}},{key:"validate",value:function(){var t=function(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return l(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(this.config.validators);this.config.required&&!t.includes("required")&&t.unshift("required");for(var e=0;e<t.length;e+=1){var n=t[e],r=this.runValidator(n,this.state.value);if(!r.valid)return this.state.invalid=!0,this.state.errorMessage=r.message,!1}return this.state.invalid=!1,this.state.errorMessage="",!0}},{key:"runValidator",value:function(t,e){var n=i.D.validateToken(t,e,{element:this.controlEl,component:this});return n.valid||n.message&&"Invalid value."!==n.message||(n.message=this.config.errorMessage||"Invalid value."),n}},{key:"updateView",value:function(){this.element&&this.controlEl&&(this.element.classList.toggle("is-invalid",this.state.invalid),this.controlEl.setAttribute("aria-invalid",this.state.invalid?"true":"false"),this.errorEl&&(this.errorEl.hidden=!this.state.invalid,this.errorEl.textContent=this.state.invalid?this.state.errorMessage||this.config.errorMessage:""))}},{key:"value",get:function(){var t;return(null===(t=this.controlEl)||void 0===t?void 0:t.value)||""},set:function(t){var e=null==t?"":String(t);this.state.value=e,this.controlEl&&(this.controlEl.value=e),this.validate(),this.updateView()}},{key:"destroy",value:function(){this.controlEl&&(this.controlEl.removeEventListener("input",this.boundInput),this.controlEl.removeEventListener("blur",this.boundBlur)),p(e,"destroy",this,3)([])}}],a=[{key:"selector",get:function(){return"holi-input"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"input-field"}},{key:"getNativeSelectors",value:function(){return['input[component="input"]','input[role="input"]','input[component="input-field"]','input[role="input-field"]','input[component="textarea"]','input[role="textarea"]','textarea[component="input"]','textarea[role="input"]','textarea[component="input-field"]','textarea[role="input-field"]','textarea[component="textarea"]','textarea[role="textarea"]']}},{key:"prepareHost",value:function(t){if(!(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement))return t;var e=document.createElement("section");return(0,o.ts)(t,e,{exclude:["component","role","value","type"]}),e.setAttribute("component","input-field"),e.setAttribute("type",t instanceof HTMLTextAreaElement||"textarea"===(t.getAttribute("role")||t.getAttribute("component"))?"textarea":t.getAttribute("type")||"text"),e.setAttribute("value",(0,o.BD)(t)),t.replaceWith(e),e}}],r&&d(n.prototype,r),a&&d(n,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,a,u,h}(r.Component);g=k,S="input-field-template",(w=b(w="templateId"))in g?Object.defineProperty(g,w,{value:S,enumerable:!0,configurable:!0,writable:!0}):g[w]=S,"undefined"!=typeof window&&(window.InputComponent=k)},166(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function o(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function l(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return a(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(a(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,a(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,a(h,"constructor",d),a(d,"constructor",c),c.displayName="GeneratorFunction",a(d,i,"GeneratorFunction"),a(h),a(h,i,"Generator"),a(h,r,function(){return this}),a(h,"toString",function(){return"[object Generator]"}),(o=function(){return{w:l,m:p}})()}function a(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}a=function(t,e,n,r){function o(e,n){a(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},a(t,e,n,r)}function l(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function s(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){l(o,r,i,a,s,"next",t)}function s(t){l(o,r,i,a,s,"throw",t)}a(void 0)})}}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,y(r.key),r)}}function c(t,e,n){return e=p(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,d()?Reflect.construct(e,n||[],p(t).constructor):e.apply(t,n))}function d(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(d=function(){return!!t})()}function f(t,e,n,r){var i=h(p(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function h(){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},h.apply(null,arguments)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}function y(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{LayoutComponent:()=>w});var m,b,g,w=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=c(this,e,[t,r])).templateId=e.templateId,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&v(t,e)}(e,t),n=e,r=[{key:"validateStructure",value:function(){if(f(e,"validateStructure",this,3)([]),!this.container)throw new Error("Layout requires a container")}},{key:"init",value:(d=s(o().m(function t(){return o().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return d.apply(this,arguments)})},{key:"render",value:(l=s(o().m(function t(){var n,r;return o().w(function(t){for(;;)switch(t.n){case 0:return n=Array.from(this.container.childNodes),t.n=1,f(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".holi-layout"),this.content=this.container.querySelector('[data-role="layout-content"]'),!this.content){t.n=3;break}return(r=this.content).replaceChildren.apply(r,n),t.n=2,this.createChildren();case 2:this.syncChildren();case 3:return t.a(2)}},t,this)})),function(){return l.apply(this,arguments)})}],a=[{key:"selector",get:function(){return"layout"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"layout"}},{key:"assignNamedBlocks",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Map,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=new Set;n.forEach(function(n,r){var o=e.findNamedSlot(t,r);if(o){i.add(r);var a=Array.from(o.childNodes),l=e.buildBlockFragment(n,a);o.replaceWith(l)}else{if("head"===r){var s=t.querySelector("layout-head, [data-layout-head]");if(!(s instanceof Element))return;return i.add(r),void e.applyBlockToContainer(s,n)}if("tail"===r){var u=t.querySelector("tail, [data-layout-tail]");if(!(u instanceof Element))return;i.add(r),e.applyBlockToContainer(u,n)}}}),this.resolveRemainingSlots(t,{inheritMissing:!!r.inheritMissing});var o=Array.from(n.keys()).filter(function(t){return!i.has(t)});return{usedNames:Array.from(i),unusedNames:o}}},{key:"buildBlockFragment",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=document.createDocumentFragment(),r=Array.isArray(null==t?void 0:t.contentNodes)?t.contentNodes:[];(r.length>0?r:e).forEach(function(t){n.appendChild(t)});var i=(null==t?void 0:t.regions)instanceof Map?t.regions:new Map;return i.size>0&&this.assignNamedRegions(n,i),n}},{key:"applyBlockToContainer",value:function(t,e){if(t instanceof Element){(Array.isArray(null==e?void 0:e.contentNodes)?e.contentNodes:[]).forEach(function(e){t.appendChild(e)});var n=(null==e?void 0:e.regions)instanceof Map?e.regions:new Map;n.size>0&&this.assignNamedRegions(t,n)}}},{key:"assignNamedRegions",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Map;n.forEach(function(r,o){var a=e.findNamedSlot(t,o);if(a){if(r&&r.length)return a.replaceWith.apply(a,function(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(r)),void n.delete(o);a.replaceWith(),n.delete(o)}}),this.resolveRemainingSlots(t,{inheritMissing:!1})}},{key:"resolveRemainingSlots",value:function(t){var e=!!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).inheritMissing;Array.from(t.querySelectorAll("slot")).forEach(function(t){if(e){var n=Array.from(t.childNodes);t.replaceWith.apply(t,n)}else t.replaceWith()})}},{key:"findNamedSlot",value:function(t,e){for(var n=Array.from(t.querySelectorAll("slot")),r=0;r<n.length;r+=1){var i=n[r];if(String(i.getAttribute("name")||"default").trim()===e)return i}return null}}],r&&u(n.prototype,r),a&&u(n,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,a,l,d}(n(812).Component);m=w,g="layout-template",(b=y(b="templateId"))in m?Object.defineProperty(m,b,{value:g,enumerable:!0,configurable:!0,writable:!0}):m[b]=g,"undefined"!=typeof window&&(window.LayoutComponent=w)},819(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function l(n,r,i,a){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return o(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,o(h,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(h),o(h,a,"Generator"),o(h,r,function(){return this}),o(h,"toString",function(){return"[object Generator]"}),(i=function(){return{w:l,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function l(t){a(o,r,i,l,s,"next",t)}function s(t){a(o,r,i,l,s,"throw",t)}l(void 0)})}}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,v(r.key),r)}}function u(t,e,n){return e=h(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,n||[],h(t).constructor):e.apply(t,n))}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function d(t,e,n,r){var i=f(h(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},f.apply(null,arguments)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function v(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{LoaderComponent:()=>g});var y,m,b,g=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=u(this,e,[t,r])).templateId=e.templateId,n.scope=n.resolveScope(n.readAttr("scope","inline")),n.message=n.readAttr("message","Loading..."),n.visible=n.readBooleanAttr("visible",!1),n.size=n.resolveSize(n.readAttr("size","md")),n.type=n.resolveType(n.readAttr("type",n.readAttr("shape","spinner"))),n.hostSelector=n.readAttr("host",""),n.host=null,n.appliedRelativeHost=!1,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&p(t,e)}(e,t),n=e,r=[{key:"readAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.container.getAttribute(t);if(null!=n)return String(n);var r=this.container.getAttribute("data-".concat(t));return null!=r?String(r):e}},{key:"readBooleanAttr",value:function(t,e){var n=this.readAttr(t,"");if(!n)return e;var r=n.trim().toLowerCase();return!!["true","1","yes","on"].includes(r)||!["false","0","no","off"].includes(r)&&e}},{key:"resolveScope",value:function(t){var e=String(t||"inline").trim().toLowerCase();return"page"===e||"block"===e||"inline"===e?e:"inline"}},{key:"resolveSize",value:function(t){var e=String(t||"md").trim().toLowerCase();return"sm"===e||"md"===e||"lg"===e?e:"md"}},{key:"resolveType",value:function(t){var e=String(t||"spinner").trim().toLowerCase();return"spinner"===e||"circle"===e?"spinner":"dots"===e||"dot"===e?"dots":"spinner"}},{key:"resolveHost",value:function(){if("page"===this.scope||"undefined"==typeof document)return null;if(this.hostSelector){var t=document.querySelector(this.hostSelector);if(t)return t}return this.container.parentElement||this.container}},{key:"ensureHostPositionContext",value:function(){this.host&&"page"!==this.scope&&"undefined"!=typeof window&&"static"===window.getComputedStyle(this.host).position&&(this.host.style.position="relative",this.appliedRelativeHost=!0)}},{key:"init",value:(c=l(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return c.apply(this,arguments)})},{key:"render",value:(a=l(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,d(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".holi-loader"),this.messageEl=this.container.querySelector('[data-role="loader-message"]'),this.spinnerEl=this.container.querySelector('[data-role="loader-spinner"]'),this.element&&this.messageEl){t.n=2;break}throw new Error("Loader template is missing required nodes");case 2:this.element.setAttribute("data-scope",this.scope),this.element.setAttribute("data-size",this.size),this.element.setAttribute("data-type",this.type),this.spinnerEl&&this.spinnerEl.setAttribute("data-type",this.type),"block"===this.scope?(this.host=this.resolveHost(),this.host&&this.element.parentElement!==this.host&&(this.host.appendChild(this.element),this.ensureHostPositionContext()),this.container.hidden=!0):this.container.hidden=!1,this.setMessage(this.message),this.setVisible(this.visible),void 0===this.container.loader&&Object.defineProperty(this.container,"loader",{value:this,writable:!1});case 3:return t.a(2)}},t,this)})),function(){return a.apply(this,arguments)})},{key:"setMessage",value:function(t){var e=String(t||"Loading...");this.message=e,this.messageEl&&(this.messageEl.textContent=e)}},{key:"setVisible",value:function(t){this.visible=!!t,this.element&&(this.element.hidden=!this.visible,this.element.setAttribute("aria-hidden",this.visible?"false":"true"))}},{key:"show",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";t&&this.setMessage(t),this.setVisible(!0)}},{key:"hide",value:function(){this.setVisible(!1)}},{key:"setLoading",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";t?this.show(e):this.hide()}},{key:"destroy",value:function(){this.appliedRelativeHost&&this.host&&(this.host.style.position=""),d(e,"destroy",this,3)([])}}],o=[{key:"selector",get:function(){return"loader"}},{key:"getNativeSelectors",value:function(){return["[data-loader]"]}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"loader"}}],r&&s(n.prototype,r),o&&s(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,a,c}(n(812).Component);y=g,b="loader-template",(m=v(m="templateId"))in y?Object.defineProperty(y,m,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[m]=b,"undefined"!=typeof window&&(window.LoaderComponent=g)},833(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach(function(e){m(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function a(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var a=r&&r.prototype instanceof u?r:u,c=Object.create(a.prototype);return l(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(l(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,l(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,l(h,"constructor",d),l(d,"constructor",c),c.displayName="GeneratorFunction",l(d,i,"GeneratorFunction"),l(h),l(h,i,"Generator"),l(h,r,function(){return this}),l(h,"toString",function(){return"[object Generator]"}),(a=function(){return{w:o,m:p}})()}function l(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}l=function(t,e,n,r){function o(e,n){l(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},l(t,e,n,r)}function s(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function u(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){s(o,r,i,a,l,"next",t)}function l(t){s(o,r,i,a,l,"throw",t)}a(void 0)})}}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,b(r.key),r)}}function d(t,e,n){return e=v(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,f()?Reflect.construct(e,n||[],v(t).constructor):e.apply(t,n))}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!t})()}function h(t,e,n,r){var i=p(v(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=v(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},p.apply(null,arguments)}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}function m(t,e,n){return(e=b(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function b(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{LocaleSwitcherComponent:()=>g});var g=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=d(this,e,[t,r])).templateId=e.templateId,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&y(t,e)}(e,t),n=e,r=[{key:"validateStructure",value:function(){if(h(e,"validateStructure",this,3)([]),!this.container)throw new Error("LocaleSwitcher requires a container")}},{key:"init",value:(s=u(a().m(function t(){return a().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return s.apply(this,arguments)})},{key:"getBindingContext",value:function(){var t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return h(e,"getBindingContext",this,3)([o({label:(null===(t=this.container)||void 0===t?void 0:t.getAttribute("label"))||(null===(n=this.container)||void 0===n?void 0:n.getAttribute("data-label"))||"Language"},r)])}},{key:"render",value:(l=u(a().m(function t(){var n;return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,h(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-localeswitcher"),this.select=this.container.querySelector('[data-role="locale-select"]'),this.labelEl=this.container.querySelector('[data-role="locale-label"]'),this.renderOptions(),this.applyCurrentLocale(),this.boundChange||(this.boundChange=this.handleChange.bind(this)),null===(n=this.select)||void 0===n||n.addEventListener("change",this.boundChange);case 2:return t.a(2)}},t,this)})),function(){return l.apply(this,arguments)})},{key:"getLocaleOptions",value:function(){var t,e,n;return String((null===(t=this.container)||void 0===t?void 0:t.getAttribute("locales"))||(null===(e=this.container)||void 0===e?void 0:e.getAttribute("languages"))||(null===(n=this.container)||void 0===n?void 0:n.getAttribute("data-locales"))||"en:English,fr:French,hi:Hindi").split(/[\r\n,]+/).map(function(t){return String(t||"").trim()}).filter(Boolean).map(function(t){var e=t.split(":"),n=String(e[0]||"").trim();return{value:n,label:String(e[1]||e[0]||"").trim()||n}}).filter(function(t){return t.value})}},{key:"renderOptions",value:function(){var t=this;if(this.select instanceof HTMLSelectElement){var e=this.getLocaleOptions();this.select.replaceChildren(),e.forEach(function(e){var n=document.createElement("option");n.value=e.value,n.textContent=e.label,t.select.appendChild(n)})}}},{key:"getCurrentLocale",value:function(){var t,e,n,r=String((null===(t=this.container)||void 0===t?void 0:t.getAttribute("value"))||"").trim();return r||(String((null===(e=document.documentElement)||void 0===e?void 0:e.getAttribute("lang"))||"").trim()||(null===(n=this.getLocaleOptions()[0])||void 0===n?void 0:n.value)||"")}},{key:"applyCurrentLocale",value:function(){var t=this.getCurrentLocale();t&&(this.select&&(this.select.value=t),this.applyLocale(t,{dispatch:!1}))}},{key:"handleChange",value:function(t){var e,n=String((null==t||null===(e=t.target)||void 0===e?void 0:e.value)||"").trim();n&&this.applyLocale(n,{dispatch:!0})}},{key:"applyLocale",value:function(t){var e,n,r,i,o,a,l,s,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null===(e=document.documentElement)||void 0===e||null===(n=e.setAttribute)||void 0===n||n.call(e,"lang",t),null===(r=this.container)||void 0===r||null===(i=r.setAttribute)||void 0===i||i.call(r,"value",t),!1!==u.dispatch){var c={locale:t,lang:t,language:t,component:this};null===(o=this.container)||void 0===o||null===(a=o.dispatchEvent)||void 0===a||a.call(o,new CustomEvent("localechange",{detail:c})),null===(l=this.container)||void 0===l||null===(s=l.dispatchEvent)||void 0===s||s.call(l,new CustomEvent("languagechange",{detail:c})),document.dispatchEvent(new CustomEvent("localechange",{detail:c})),document.dispatchEvent(new CustomEvent("languagechange",{detail:c}))}}},{key:"destroy",value:function(){var t;null===(t=this.select)||void 0===t||t.removeEventListener("change",this.boundChange),h(e,"destroy",this,3)([])}}],i=[{key:"selector",get:function(){return"localeswitcher"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"localeswitcher"}}],r&&c(n.prototype,r),i&&c(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i,l,s}(n(812).Component);m(g,"templateId","localeswitcher-template"),"undefined"!=typeof window&&(window.LocaleSwitcherComponent=g)},622(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function l(n,r,i,a){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return o(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,o(h,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(h),o(h,a,"Generator"),o(h,r,function(){return this}),o(h,"toString",function(){return"[object Generator]"}),(i=function(){return{w:l,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function l(t){a(o,r,i,l,s,"next",t)}function s(t){a(o,r,i,l,s,"throw",t)}l(void 0)})}}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,v(r.key),r)}}function u(t,e,n){return e=h(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,n||[],h(t).constructor):e.apply(t,n))}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function d(t,e,n,r){var i=f(h(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},f.apply(null,arguments)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function v(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{MenubarComponent:()=>g});var y,m,b,g=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=u(this,e,[t,r])).templateId=e.templateId,n.baseMode=n.resolveMode(t),n.mode=n.baseMode,n.mobileBreakpoint=n.parseNumber(t.getAttribute("mobile-breakpoint"),768),n.mobileToggleMode=n.resolveMobileToggleMode(t),n.responsiveMenuEnabled="bar"===n.baseMode&&!t.hasAttribute("disable-mobile-menu"),n.openOnClick=t.hasAttribute("open-on-click"),n.hoverCloseDelay=n.parseNumber(t.getAttribute("hover-close-delay"),150),n.isOpen=!1,n.element=null,n.menuRoot=null,n.menuHost=null,n.toggleButton=null,n.boundOutsideClick=null,n.boundViewportChange=null,n.boundContainerResize=null,n.resizeObserver=null,n.closeTimer=null,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&p(t,e)}(e,t),n=e,r=[{key:"resolveMode",value:function(t){var e=String(t.getAttribute("mode")||"").trim().toLowerCase();return"single"===e||"button"===e||t.hasAttribute("single-button")||t.hasAttribute("menu-button")?"single":"bar"}},{key:"parseNumber",value:function(t,e){var n=Number(t);return Number.isFinite(n)?n:e}},{key:"resolveMobileToggleMode",value:function(t){return"icon"===String(t.getAttribute("data-mobile-toggle")||t.getAttribute("mobile-toggle")||"button").trim().toLowerCase()?"icon":"button"}},{key:"validateStructure",value:function(){if(d(e,"validateStructure",this,3)([]),!(this.container.querySelector('[slot="menu"]')||this.container.querySelector("ul")||this.container.querySelector("ol")))throw new Error('Menubar requires menu markup in slot="menu".')}},{key:"init",value:(c=l(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents();case 2:return t.a(2)}},t,this)})),function(){return c.apply(this,arguments)})},{key:"render",value:(a=l(i().m(function t(){var n,r,o,a;return i().w(function(t){for(;;)switch(t.n){case 0:return o=this.container.querySelector('[slot="menu"]')||this.container.querySelector("ul, ol"),t.n=1,d(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-menubar"),this.menuHost=this.container.querySelector('[data-role="menu-host"]'),this.toggleButton=this.container.querySelector('[data-role="toggle"]'),null===(n=this.element)||void 0===n||n.setAttribute("data-mode",this.mode),null===(r=this.element)||void 0===r||r.setAttribute("data-open-on-click",this.openOnClick?"true":"false"),o&&this.menuHost&&this.menuHost.replaceChildren(o),(a=this.container.getAttribute("label"))&&this.toggleButton&&(this.toggleButton.textContent=a),this.prepareMenuTree(),this.applyTogglePresentation(),this.applyResponsiveMode(),this.applyMode();case 2:return t.a(2)}},t,this)})),function(){return a.apply(this,arguments)})},{key:"prepareMenuTree",value:function(){var t,e=null===(t=this.menuHost)||void 0===t?void 0:t.querySelector('ul, ol, [role="menu"]');e&&(this.menuRoot=e,this.menuRoot.classList.add("holi-menu-level","holi-menu-root"),this.menuRoot.setAttribute("role","bar"===this.mode?"menubar":"menu"),this.decorateLevel(this.menuRoot,!0),this.closeAllSubmenus())}},{key:"decorateLevel",value:function(t,e){var n=this;Array.from(t.children).filter(function(t){return"LI"===t.tagName}).forEach(function(t){t.classList.add("holi-menu-item");var r=n.getTrigger(t),i=n.getSubmenu(t);r&&(r.classList.add("holi-menu-trigger"),r.setAttribute("role","menuitem"),r.setAttribute("tabindex",e?"0":"-1"),i&&(t.classList.add("has-submenu"),i.classList.add("holi-menu-level","holi-submenu"),i.setAttribute("role","menu"),i.hidden=!0,r.setAttribute("aria-haspopup","true"),r.setAttribute("aria-expanded","false"),n.decorateLevel(i,!1)))})}},{key:"getTrigger",value:function(t){for(var e=Array.from(t.children),n=0;n<e.length;n+=1){var r=e[n],i=r.tagName;if("A"===i||"BUTTON"===i||r.hasAttribute("data-menu-trigger"))return r}return null}},{key:"getSubmenu",value:function(t){for(var e=Array.from(t.children),n=0;n<e.length;n+=1){var r=e[n],i=r.tagName;if("UL"===i||"OL"===i)return r}return null}},{key:"applyMode",value:function(){var t,e;this.toggleButton&&this.menuRoot&&(null===(t=this.element)||void 0===t||t.setAttribute("data-mode",this.mode),this.menuRoot.setAttribute("role","bar"===this.mode?"menubar":"menu"),this.isOpen=!1,null===(e=this.element)||void 0===e||e.setAttribute("data-open","false"),this.closeAllSubmenus(),this.applyTogglePresentation(),"single"===this.mode?(this.toggleButton.hidden=!1,this.toggleButton.setAttribute("aria-expanded","false"),this.menuRoot.hidden=!0,this.menuRoot.setAttribute("aria-hidden","true")):(this.toggleButton.hidden=!0,this.toggleButton.setAttribute("aria-expanded","false"),this.menuRoot.hidden=!1,this.menuRoot.setAttribute("aria-hidden","false")))}},{key:"applyTogglePresentation",value:function(){if(this.toggleButton){var t=String(this.container.getAttribute("label")||"Menu").trim()||"Menu",e=String(this.container.getAttribute("mobile-icon-label")||t).trim()||"Menu";this.toggleButton.setAttribute("data-toggle-appearance",this.mobileToggleMode),this.toggleButton.setAttribute("title","icon"===this.mobileToggleMode?e:""),this.toggleButton.setAttribute("aria-label","icon"===this.mobileToggleMode?e:t),this.toggleButton.textContent="icon"===this.mobileToggleMode?"":t}}},{key:"applyResponsiveMode",value:function(){var t,e;if(this.responsiveMenuEnabled&&this.menuRoot){var n=window.innerWidth||document.documentElement.clientWidth,r=(null===(t=(e=this.container).getBoundingClientRect)||void 0===t?void 0:t.call(e).width)||n,i=Math.min(n,r)<=this.mobileBreakpoint?"single":this.baseMode;i!==this.mode&&(this.mode=i,this.applyMode())}}},{key:"bindEvents",value:function(){var t=this;this.element&&this.menuRoot&&(this.element.addEventListener("click",function(e){if(e.target.closest('[data-role="toggle"]'))return e.preventDefault(),void t.toggleMenu();var n=e.target.closest(".holi-menu-trigger");if(n){var r=n.closest(".holi-menu-item");if(t.getSubmenu(r))return e.preventDefault(),void t.toggleSubmenu(r);"single"===t.mode?t.closeMenu():t.closeAllSubmenus()}}),this.openOnClick||this.element.addEventListener("mouseover",function(e){if("bar"===t.mode){t.cancelScheduledClose();var n=e.target.closest(".holi-menu-trigger");if(n){var r=n.closest(".holi-menu-item");t.getSubmenu(r)&&t.openSubmenuBranch(r)}}}),this.element.addEventListener("focusin",function(e){if("bar"===t.mode){t.cancelScheduledClose();var n=e.target.closest(".holi-menu-trigger");if(n){var r=n.closest(".holi-menu-item");t.getSubmenu(r)&&t.openSubmenuBranch(r)}}}),this.element.addEventListener("mouseleave",function(){"bar"===t.mode&&t.scheduleCloseAllSubmenus()}),this.element.addEventListener("mouseenter",function(){"bar"===t.mode&&t.cancelScheduledClose()}),this.element.addEventListener("keydown",function(e){return t.handleKeydown(e)}),this.boundOutsideClick=function(e){t.container.contains(e.target)||(t.closeAllSubmenus(),"single"===t.mode&&t.closeMenu())},document.addEventListener("click",this.boundOutsideClick),this.responsiveMenuEnabled&&(this.boundViewportChange=function(){return t.applyResponsiveMode()},window.addEventListener("resize",this.boundViewportChange),"undefined"!=typeof ResizeObserver&&(this.boundContainerResize=function(){return t.applyResponsiveMode()},this.resizeObserver=new ResizeObserver(this.boundContainerResize),this.resizeObserver.observe(this.container))))}},{key:"handleKeydown",value:function(t){var e=t.target.closest(".holi-menu-trigger");if(e){var n;if("Escape"===t.key)return this.closeAllSubmenus(),"single"===this.mode&&this.closeMenu(),void(null===(n=this.toggleButton)||void 0===n||n.focus());if("ArrowRight"===t.key||"ArrowLeft"===t.key){if(!e.closest(".holi-menu-root"))return;return t.preventDefault(),void this.moveTopLevelFocus(e,"ArrowRight"===t.key?1:-1)}if("ArrowDown"!==t.key){if("Enter"===t.key||" "===t.key){var r=e.closest(".holi-menu-item");if(!this.getSubmenu(r))return;t.preventDefault(),this.toggleSubmenu(r)}}else{var i=e.closest(".holi-menu-item"),o=this.getSubmenu(i);if(!o)return;t.preventDefault(),this.openSubmenuBranch(i);var a=Array.from(o.children).find(function(t){var e;return null===(e=t.classList)||void 0===e?void 0:e.contains("holi-menu-item")}),l=a?this.getTrigger(a):null;null==l||l.focus()}}else"Escape"===t.key&&(this.closeAllSubmenus(),"single"===this.mode&&this.closeMenu())}},{key:"moveTopLevelFocus",value:function(t,e){var n,r=this;if(this.menuRoot){var i=Array.from(this.menuRoot.children).filter(function(t){var e;return null===(e=t.classList)||void 0===e?void 0:e.contains("holi-menu-item")}).map(function(t){return r.getTrigger(t)}).filter(Boolean);if(i.length){var o=i.indexOf(t);o<0||null===(n=i[(o+e+i.length)%i.length])||void 0===n||n.focus()}}}},{key:"toggleMenu",value:function(){this.isOpen?this.closeMenu():this.openMenu()}},{key:"openMenu",value:function(){var t,e;"single"===this.mode&&this.menuRoot&&(this.isOpen=!0,this.menuRoot.hidden=!1,this.menuRoot.setAttribute("aria-hidden","false"),null===(t=this.toggleButton)||void 0===t||t.setAttribute("aria-expanded","true"),null===(e=this.element)||void 0===e||e.setAttribute("data-open","true"))}},{key:"closeMenu",value:function(){var t,e;"single"===this.mode&&this.menuRoot&&(this.isOpen=!1,this.closeAllSubmenus(),this.menuRoot.hidden=!0,this.menuRoot.setAttribute("aria-hidden","true"),null===(t=this.toggleButton)||void 0===t||t.setAttribute("aria-expanded","false"),null===(e=this.element)||void 0===e||e.setAttribute("data-open","false"))}},{key:"toggleSubmenu",value:function(t){var e=this.getSubmenu(t);e&&(e.hidden?this.openSubmenuBranch(t):this.closeSubmenu(t))}},{key:"openSubmenuBranch",value:function(t){var e=this,n=this.getItemPath(t);this.closeAllSubmenus(n),n.forEach(function(t){var n=e.getSubmenu(t),r=e.getTrigger(t);n&&r&&(n.hidden=!1,t.classList.add("open"),r.setAttribute("aria-expanded","true"),e.applySubmenuAlignment(t))})}},{key:"closeSubmenu",value:function(t){var e=this,n=this.getSubmenu(t),r=this.getTrigger(t);n&&r&&(Array.from(n.querySelectorAll(".holi-menu-item")).forEach(function(t){var n=e.getSubmenu(t),r=e.getTrigger(t);n&&(n.hidden=!0),r&&r.setAttribute("aria-expanded","false"),t.classList.remove("open")}),n.hidden=!0,r.setAttribute("aria-expanded","false"),t.classList.remove("open"))}},{key:"closeAllSubmenus",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(this.menuRoot){var n=new Set(e);Array.from(this.menuRoot.querySelectorAll(".holi-menu-item.has-submenu")).forEach(function(e){n.has(e)||t.closeSubmenu(e)})}}},{key:"scheduleCloseAllSubmenus",value:function(){var t=this;this.cancelScheduledClose(),this.closeTimer=setTimeout(function(){t.closeAllSubmenus()},this.hoverCloseDelay)}},{key:"cancelScheduledClose",value:function(){this.closeTimer&&(clearTimeout(this.closeTimer),this.closeTimer=null)}},{key:"applySubmenuAlignment",value:function(t){var e,n=this.getSubmenu(t);if(n){t.removeAttribute("data-submenu-align"),n.style.left="",n.style.right="";var r=t.parentElement,i=null==r||null===(e=r.classList)||void 0===e?void 0:e.contains("holi-menu-root"),o=n.getBoundingClientRect(),a=window.innerWidth||document.documentElement.clientWidth;o.right>a-8?i?t.setAttribute("data-submenu-align","viewport"):t.setAttribute("data-submenu-align","left"):o.left<8&&!i&&t.setAttribute("data-submenu-align","right")}}},{key:"getItemPath",value:function(t){for(var e=[],n=t;n&&null!==(r=n.classList)&&void 0!==r&&r.contains("holi-menu-item");){var r;this.getSubmenu(n)&&e.unshift(n);var i=n.parentElement;n=i?i.closest(".holi-menu-item"):null}return e}},{key:"destroy",value:function(){this.cancelScheduledClose(),this.boundOutsideClick&&(document.removeEventListener("click",this.boundOutsideClick),this.boundOutsideClick=null),this.boundViewportChange&&(window.removeEventListener("resize",this.boundViewportChange),this.boundViewportChange=null),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null,this.boundContainerResize=null),d(e,"destroy",this,3)([])}}],o=[{key:"selector",get:function(){return"menubar"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"menubar"}}],r&&s(n.prototype,r),o&&s(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,a,c}(n(812).Component);y=g,b="menubar-template",(m=v(m="templateId"))in y?Object.defineProperty(y,m,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[m]=b,"undefined"!=typeof window&&(window.MenubarComponent=g)},641(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function o(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function l(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return a(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(a(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,a(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,a(h,"constructor",d),a(d,"constructor",c),c.displayName="GeneratorFunction",a(d,i,"GeneratorFunction"),a(h),a(h,i,"Generator"),a(h,r,function(){return this}),a(h,"toString",function(){return"[object Generator]"}),(o=function(){return{w:l,m:p}})()}function a(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}a=function(t,e,n,r){function o(e,n){a(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},a(t,e,n,r)}function l(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function s(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){l(o,r,i,a,s,"next",t)}function s(t){l(o,r,i,a,s,"throw",t)}a(void 0)})}}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,y(r.key),r)}}function c(t,e,n){return e=p(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,d()?Reflect.construct(e,n||[],p(t).constructor):e.apply(t,n))}function d(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(d=function(){return!!t})()}function f(t,e,n,r){var i=h(p(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function h(){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},h.apply(null,arguments)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}function y(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{OfflineIndicator:()=>w});var m,b,g,w=function(t){function e(t){var n,r,i,o,a,l,s,u,d,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(d=c(this,e,[t,f])).templateId=e.templateId,d.scope=d.resolveScope(null!==(n=f.scope)&&void 0!==n?n:d.readAttr("scope","page")),d.position=d.resolvePosition(null!==(r=f.position)&&void 0!==r?r:d.readAttr("position","bottom-right")),d.hostSelector=String(null!==(i=f.hostSelector)&&void 0!==i?i:d.readAttr("host","")).trim(),d.duration=d.parseNumber(null!==(o=f.duration)&&void 0!==o?o:d.readAttr("duration","4000"),4e3),d.maxAttempts=d.parseNumber(null!==(a=f.maxAttempts)&&void 0!==a?a:d.readAttr("max-attempts","5"),5),d.heartbeatMs=d.parseNumber(null!==(l=f.heartbeatMs)&&void 0!==l?l:d.readAttr("heartbeat-ms","5000"),5e3),d.probeTimeoutMs=d.parseNumber(null!==(s=f.probeTimeoutMs)&&void 0!==s?s:d.readAttr("probe-timeout-ms","3000"),3e3),d.pingUrl=String(null!==(u=f.pingUrl)&&void 0!==u?u:d.readAttr("ping-url",d.resolveDefaultPingUrl())).trim(),d.syncQueue=[],d.reconnectAttempts=0,d.isOnline="undefined"==typeof navigator||navigator.onLine,d.heartbeatTimer=null,d.hideTimer=null,d.lastProbeSucceeded=d.isOnline,d.host=null,d.appliedRelativeHost=!1,d.boundOnline=function(){return d.evaluateConnection()},d.boundOffline=function(){return d.onOffline()},d.boundSyncAdd=function(t){return d.handleSyncAdd(t)},d.boundSyncClear=function(){return d.clearSyncQueue()},d.boundRetry=function(){return d.retryConnection()},d.init(),d}return function(t,e){if("function"!=typeof e&&null!==e)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&&v(t,e)}(e,t),n=e,r=[{key:"readAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.container.getAttribute(t);if(null!=n)return String(n);var r=this.container.getAttribute("data-".concat(t));return null!=r?String(r):e}},{key:"parseNumber",value:function(t,e){var n=Number(t);return Number.isFinite(n)?n:e}},{key:"resolveScope",value:function(t){var e=String(t||"page").trim().toLowerCase();return"inline"===e||"block"===e?e:"page"}},{key:"resolvePosition",value:function(t){var e=String(t||"bottom-right").trim().toLowerCase();return new Set(["top-left","top-right","bottom-left","bottom-right","top-center","bottom-center"]).has(e)?e:"bottom-right"}},{key:"resolveDefaultPingUrl",value:function(){return"/api/ping"}},{key:"resolveHost",value:function(){if("page"===this.scope||"undefined"==typeof document)return null;if(this.hostSelector){var t=document.querySelector(this.hostSelector);if(t)return t}return this.container.parentElement||this.container}},{key:"ensureHostPositionContext",value:function(){this.host&&"block"===this.scope&&"undefined"!=typeof window&&"static"===window.getComputedStyle(this.host).position&&(this.host.style.position="relative",this.appliedRelativeHost=!0)}},{key:"init",value:(d=s(o().m(function t(){return o().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents(),this.startNetworkWatcher(),this.checkStatus();case 2:return t.a(2)}},t,this)})),function(){return d.apply(this,arguments)})},{key:"render",value:(l=s(o().m(function t(){return o().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,f(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".holi-offline-indicator"),this.statusEl=this.container.querySelector('[data-role="status-text"]'),this.syncEl=this.container.querySelector('[data-role="sync-text"]'),this.attemptEl=this.container.querySelector('[data-role="attempt-text"]'),this.retryButton=this.container.querySelector('[data-action="retry"]'),this.element&&this.statusEl&&this.syncEl&&this.attemptEl&&this.retryButton){t.n=2;break}throw new Error("Offline template is missing required nodes");case 2:this.container.hidden=!1,this.element.setAttribute("data-scope",this.scope),this.element.setAttribute("data-position",this.position),this.updateSyncCount(),this.updateAttemptCount(),"block"===this.scope&&(this.host=this.resolveHost(),this.host&&this.element.parentElement!==this.host&&(this.host.appendChild(this.element),this.ensureHostPositionContext()),this.container.hidden=!0),this.setVisible(!this.isOnline),this.updateStatusView(),void 0===this.container.offlineIndicator&&Object.defineProperty(this.container,"offlineIndicator",{value:this,writable:!1});case 3:return t.a(2)}},t,this)})),function(){return l.apply(this,arguments)})},{key:"bindEvents",value:function(){var t;null===(t=this.retryButton)||void 0===t||t.addEventListener("click",this.boundRetry),"undefined"!=typeof window&&(window.addEventListener("online",this.boundOnline),window.addEventListener("offline",this.boundOffline)),"undefined"!=typeof document&&(document.addEventListener("sync-queue:add",this.boundSyncAdd),document.addEventListener("sync-queue:clear",this.boundSyncClear))}},{key:"startNetworkWatcher",value:function(){var t=this;"undefined"==typeof window||this.heartbeatMs<=0||(this.stopNetworkWatcher(),this.heartbeatTimer=window.setInterval(function(){t.evaluateConnection()},this.heartbeatMs))}},{key:"stopNetworkWatcher",value:function(){this.heartbeatTimer&&"undefined"!=typeof window&&window.clearInterval(this.heartbeatTimer),this.heartbeatTimer=null}},{key:"ping",value:function(){if("undefined"==typeof fetch||!this.pingUrl)return Promise.reject(new Error("Ping is unavailable"));var t=new URL(this.pingUrl,"undefined"!=typeof window?window.location.href:"http://localhost/");t.searchParams.set("_ts",String(Date.now()));var e="undefined"!=typeof AbortController?new AbortController:null,n=e&&"undefined"!=typeof window?window.setTimeout(function(){return e.abort()},Math.max(250,this.probeTimeoutMs)):null;return fetch(t.toString(),{method:"GET",cache:"no-store",keepalive:!0,signal:null==e?void 0:e.signal}).then(function(t){if(!t||!t.ok)throw new Error("Ping failed with status ".concat((null==t?void 0:t.status)||"unknown"));return t}).finally(function(){n&&"undefined"!=typeof window&&window.clearTimeout(n)})}},{key:"evaluateConnection",value:function(){var t=this;return this.ping().then(function(){return t.lastProbeSucceeded=!0,t.isOnline||t.onOnline(),!0}).catch(function(){return t.lastProbeSucceeded=!1,(t.isOnline||"undefined"!=typeof navigator&&navigator.onLine)&&t.onOffline(),!1})}},{key:"checkStatus",value:function(){"undefined"!=typeof navigator?navigator.onLine?this.evaluateConnection():this.onOffline():this.onOnline()}},{key:"handleSyncAdd",value:function(t){var e=null==t?void 0:t.detail;this.syncQueue.push(e),this.updateSyncCount()}},{key:"clearSyncQueue",value:function(){this.syncQueue=[],this.updateSyncCount()}},{key:"updateSyncCount",value:function(){if(this.syncEl){var t=this.syncQueue.length;this.syncEl.textContent="".concat(t," pending")}}},{key:"updateAttemptCount",value:function(){this.attemptEl&&(this.attemptEl.textContent="Retry ".concat(this.reconnectAttempts,"/").concat(this.maxAttempts))}},{key:"updateStatusView",value:function(){if(this.element&&this.statusEl&&this.retryButton){var t=this.isOnline?"online":"offline";this.element.setAttribute("data-status",t),this.statusEl.textContent=this.isOnline?"Back online":"Offline",this.retryButton.disabled=this.isOnline,this.updateAttemptCount()}}},{key:"setVisible",value:function(t){if(this.element){var e=!!t;this.hideTimer&&"undefined"!=typeof window&&(window.clearTimeout(this.hideTimer),this.hideTimer=null),this.element.hidden=!e,this.element.setAttribute("data-visible",e?"true":"false")}}},{key:"onOffline",value:function(){var t;this.isOnline=!1,this.reconnectAttempts=0,this.setVisible(!0),this.updateStatusView(),"undefined"!=typeof document&&(null===(t=document.body)||void 0===t||null===(t=t.classList)||void 0===t||t.add("app--offline"),document.dispatchEvent(new CustomEvent("app:offline")))}},{key:"onOnline",value:function(){var t,e=this;this.isOnline=!0,this.reconnectAttempts=0,this.updateStatusView(),"undefined"!=typeof document&&(null===(t=document.body)||void 0===t||null===(t=t.classList)||void 0===t||t.remove("app--offline")),this.syncQueue.length>0&&this.processSyncQueue(),"undefined"!=typeof window?this.hideTimer=window.setTimeout(function(){return e.setVisible(!1)},Math.max(0,this.duration)):this.setVisible(!1),"undefined"!=typeof document&&document.dispatchEvent(new CustomEvent("app:online"))}},{key:"retryConnection",value:function(){var t=this;this.reconnectAttempts+=1,this.setVisible(!0),this.statusEl.textContent="Retrying connection",this.updateAttemptCount(),this.notify("Reconnecting...");var e=Math.min(1e3*this.reconnectAttempts,1e4);"undefined"!=typeof window&&window.setTimeout(function(){t.evaluateConnection().then(function(e){if(!e){if(t.updateAttemptCount(),t.reconnectAttempts<t.maxAttempts)return t.statusEl.textContent="Still offline",void t.notify("Retry ".concat(t.reconnectAttempts,"/").concat(t.maxAttempts));t.statusEl.textContent="Connection lost",t.notify("Connection lost. Check your network.",{type:"error"})}})},e)}},{key:"processSyncQueue",value:function(){this.notify("".concat(this.syncQueue.length," items syncing...")),this.clearSyncQueue()}},{key:"notify",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=String(t||"").trim();if(r){var i="undefined"!=typeof window?null===(e=window.Q)||void 0===e?void 0:e.toast:null;"function"!=typeof i?"error"!==n.type?console.info(r):console.error(r):i(r,n)}}},{key:"simulateOffline",value:function(){this.onOffline()}},{key:"simulateOnline",value:function(){this.onOnline()}},{key:"destroy",value:function(){var t;this.stopNetworkWatcher(),"undefined"!=typeof window&&(window.removeEventListener("online",this.boundOnline),window.removeEventListener("offline",this.boundOffline),this.hideTimer&&window.clearTimeout(this.hideTimer)),"undefined"!=typeof document&&(document.removeEventListener("sync-queue:add",this.boundSyncAdd),document.removeEventListener("sync-queue:clear",this.boundSyncClear)),this.appliedRelativeHost&&this.host&&(this.host.style.position=""),null===(t=this.retryButton)||void 0===t||t.removeEventListener("click",this.boundRetry),f(e,"destroy",this,3)([])}}],a=[{key:"selector",get:function(){return"offline"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"offline"}},{key:"getNativeSelectors",value:function(){return["[data-offline]"]}},{key:"queue",value:function(t){"undefined"!=typeof document&&document.dispatchEvent(new CustomEvent("sync-queue:add",{detail:t}))}},{key:"clearQueue",value:function(){"undefined"!=typeof document&&document.dispatchEvent(new CustomEvent("sync-queue:clear"))}},{key:"create",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n="undefined"!=typeof document?document.querySelector('[data-offline], offline, [component="offline"], [role="offline"]'):null;if(null!=n&&n.offlineIndicator)return n.offlineIndicator;if(null!=n&&n.offlineindicator)return n.offlineindicator;if("undefined"==typeof document)return null;var r=document.createElement("section");return r.setAttribute("component","offline"),r.setAttribute("data-offline","true"),Object.entries(t||{}).forEach(function(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){u=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,2),n=e[0],o=e[1];null!=o&&r.setAttribute("data-".concat(n),String(o))}),document.body.appendChild(r),r.offlineIndicator||r.offlineindicator||new e(r,t)}}],r&&u(n.prototype,r),a&&u(n,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,a,l,d}(n(812).Component);m=w,g="offline-template",(b=y(b="templateId"))in m?Object.defineProperty(m,b,{value:g,enumerable:!0,configurable:!0,writable:!0}):m[b]=g,"undefined"!=typeof window&&(window.OfflineIndicator=w)},582(t,e,n){"use strict";n.r(e),n.d(e,{PageComponent:()=>j});var r=n(812),i=n(166),o=n(531);function a(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var a=r&&r.prototype instanceof u?r:u,c=Object.create(a.prototype);return l(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(l(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,l(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,l(h,"constructor",d),l(d,"constructor",c),c.displayName="GeneratorFunction",l(d,i,"GeneratorFunction"),l(h),l(h,i,"Generator"),l(h,r,function(){return this}),l(h,"toString",function(){return"[object Generator]"}),(a=function(){return{w:o,m:p}})()}function l(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}l=function(t,e,n,r){function o(e,n){l(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},l(t,e,n,r)}function s(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function u(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){s(o,r,i,a,l,"next",t)}function l(t){s(o,r,i,a,l,"throw",t)}a(void 0)})}}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,f(r.key),r)}}function f(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}var h,p,v,y=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"getGlobalConfig",value:function(){var t=window.HoliConfig;return t&&"object"===c(t)?t:{}}},{key:"normalizeBase",value:function(){var t=String((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")||"").trim();return t?t.endsWith("/")?t:"".concat(t,"/"):""}},{key:"getLayoutName",value:function(t){var e;return String((null==t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"layout"))||"").trim()}},{key:"getExplicitSource",value:function(t){var e,n;return String((null==t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"layout-src"))||(null==t||null===(n=t.getAttribute)||void 0===n?void 0:n.call(t,"layoutSrc"))||"").trim()}},{key:"getBaseCandidates",value:function(t){var e,n,r=this,i=this.getGlobalConfig();return[null==t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"layouts-base"),null==t||null===(n=t.getAttribute)||void 0===n?void 0:n.call(t,"layout-base"),i.layoutsBase,i.layoutBase,"/dist/layouts/","/layouts/"].map(function(t){return r.normalizeBase(t)}).filter(function(t,e,n){return t&&n.indexOf(t)===e})}},{key:"getCandidateUrls",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.getExplicitSource(t);if(n)return[n];var r=String(e||this.getLayoutName(t)).trim();return r?this.getBaseCandidates(t).map(function(t){return"".concat(t).concat(r,".html")}):[]}},{key:"resolve",value:(r=u(a().m(function t(e){var n,r,i,l,s,u,c,d;return a().w(function(t){for(;;)switch(t.p=t.n){case 0:if(n=this.getLayoutName(e)){t.n=1;break}throw new Error("Page layout name is required");case 1:if(!(r=o._.getLayout(n))){t.n=2;break}return t.a(2,r);case 2:return t.n=3,o._.ensureLayoutTemplates();case 3:if(!(i=o._.getLayout(n))){t.n=4;break}return t.a(2,i);case 4:if((l=this.getCandidateUrls(e,n)).length){t.n=5;break}throw new Error('No layout sources configured for "'.concat(n,'"'));case 5:s=null,u=0;case 6:if(!(u<l.length)){t.n=11;break}return c=l[u],t.p=7,t.n=8,this.loadLayout(c,n);case 8:return t.a(2,t.v);case 9:t.p=9,d=t.v,s=d;case 10:u+=1,t.n=6;break;case 11:throw s||new Error('Unable to load layout "'.concat(n,'"'));case 12:return t.a(2)}},t,this,[[7,9]])})),function(t){return r.apply(this,arguments)})},{key:"loadLayout",value:(n=u(a().m(function t(e,n){var r,i,o,l,s,c=this;return a().w(function(t){for(;;)switch(t.p=t.n){case 0:if(r="".concat(n,"::").concat(e),!this.cache.has(r)){t.n=2;break}return t.n=1,this.cache.get(r);case 1:return i=t.v,t.a(2,i.cloneNode(!0));case 2:return o=u(a().m(function t(){var r,i,o;return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,fetch(e,{credentials:"same-origin"});case 1:if((r=t.v).ok){t.n=2;break}throw new Error('Layout request failed for "'.concat(n,'" from ').concat(e));case 2:return t.n=3,r.text();case 3:if(i=t.v,(o=c.parseLayout(i,n,e))instanceof DocumentFragment){t.n=4;break}throw new Error('Layout "'.concat(n,'" from ').concat(e," did not resolve to a template fragment"));case 4:return t.a(2,o)}},t)}))(),this.cache.set(r,o),t.p=3,t.n=4,o;case 4:return l=t.v,t.a(2,l.cloneNode(!0));case 5:throw t.p=5,s=t.v,this.cache.delete(r),s;case 6:return t.a(2)}},t,this,[[3,5]])})),function(t,e){return n.apply(this,arguments)})},{key:"parseLayout",value:function(t,e){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=(new DOMParser).parseFromString(String(t||""),"text/html"),i=['template[data-layout="'.concat(e,'"]'),'template[id="page-layout-'.concat(e,'"]'),'template[id="'.concat(e,'"]')],o=0;o<i.length;o+=1){var a=r.querySelector(i[o]);if(a instanceof HTMLTemplateElement)return a.content.cloneNode(!0)}var l=r.querySelector('layout[name="'.concat(e,'"]'));if(l){var s=document.createDocumentFragment();return Array.from(l.childNodes).forEach(function(t){s.appendChild(t.cloneNode(!0))}),s}var u=r.querySelector("template");if(u instanceof HTMLTemplateElement)return u.content.cloneNode(!0);var c=document.createDocumentFragment();if(Array.from(r.body.childNodes).forEach(function(t){c.appendChild(t.cloneNode(!0))}),c.childNodes.length>0)return c;throw new Error('Layout "'.concat(e,'" not found in ').concat(n||"provided HTML"))}}],e&&d(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r}();function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function b(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return g(u,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),u}var a={};function l(){}function s(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(g(e={},r,function(){return this}),e),d=u.prototype=l.prototype=Object.create(c);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,g(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=u,g(d,"constructor",u),g(u,"constructor",s),s.displayName="GeneratorFunction",g(u,i,"GeneratorFunction"),g(d),g(d,i,"Generator"),g(d,r,function(){return this}),g(d,"toString",function(){return"[object Generator]"}),(b=function(){return{w:o,m:f}})()}function g(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}g=function(t,e,n,r){function o(e,n){g(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},g(t,e,n,r)}function w(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function S(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){w(o,r,i,a,l,"next",t)}function l(t){w(o,r,i,a,l,"throw",t)}a(void 0)})}}function k(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,E(r.key),r)}}function E(t){var e=function(t){if("object"!=m(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=m(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==m(e)?e:e+""}function O(t,e,n){return e=A(e),function(t,e){if(e&&("object"==m(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,C()?Reflect.construct(e,n||[],A(t).constructor):e.apply(t,n))}function C(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(C=function(){return!!t})()}function A(t){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},A(t)}function P(t,e){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},P(t,e)}h=y,p="cache",v=new Map,(p=f(p))in h?Object.defineProperty(h,p,{value:v,enumerable:!0,configurable:!0,writable:!0}):h[p]=v,"undefined"!=typeof window&&(window.LayoutResolver=y);var j=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=O(this,e,[t,r])).init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&P(t,e)}(e,t),function(t,e,n){return e&&k(t.prototype,e),n&&k(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"validateStructure",value:function(){if(!this.container)throw new Error("Page requires a container")}},{key:"init",value:(r=S(b().m(function t(){return b().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return r.apply(this,arguments)})},{key:"render",value:(n=S(b().m(function t(){var e,n,r,o;return b().w(function(t){for(;;)switch(t.n){case 0:if(this.element=this.container,this.markRenderStart(),this.applyDocumentMetadata(),e=String(this.container.getAttribute("layout")||"").trim()){t.n=2;break}return t.n=1,this.createChildren();case 1:return this.syncChildren(),this.markRenderComplete(),t.a(2);case 2:return n=this.collectNamedBlocks(),t.n=3,y.resolve(this.container);case 3:return r=t.v,o=i.LayoutComponent.assignNamedBlocks(r,n,{inheritMissing:this.shouldInheritMissing(this.container)}),this.reportUnusedBlocks(o.unusedNames,e),this.applyBuiltInRegions(n),this.applyHeadContent(r),this.applyTailContent(r),this.container.replaceChildren(r),this.container.setAttribute("data-page-layout",e),t.n=4,this.createChildren();case 4:this.syncChildren(),this.markRenderComplete();case 5:return t.a(2)}},t,this)})),function(){return n.apply(this,arguments)})},{key:"collectNamedBlocks",value:function(){var t=new Map,e=["block",'[component="block"]','[role="block"]'],n=["region",'[component="region"]','[role="region"]'];return Array.from(this.container.children).filter(function(t){return e.some(function(e){return t.matches(e)})}).forEach(function(e){var r=String(e.getAttribute("name")||"").trim();if(!r)throw new Error('Page blocks require a non-empty "name" attribute');if(t.has(r))throw new Error('Duplicate page block "'.concat(r,'"'));var i=[],o=new Map;Array.from(e.childNodes).forEach(function(t){if(t.nodeType!==Node.TEXT_NODE)if(t instanceof Element)if(n.some(function(e){return t.matches(e)})){var e=String(t.getAttribute("name")||"").trim();if(!e)throw new Error('Region inside block "'.concat(r,'" requires a non-empty "name" attribute'));if(o.has(e))throw new Error('Duplicate region "'.concat(e,'" inside block "').concat(r,'"'));o.set(e,Array.from(t.childNodes))}else i.push(t);else i.push(t);else String(t.textContent||"").trim()&&i.push(t)}),t.set(r,{contentNodes:i,regions:o})}),t}},{key:"shouldInheritMissing",value:function(t){var e,n,r=String((null==t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"inherit-missing"))||(null==t||null===(n=t.getAttribute)||void 0===n?void 0:n.call(t,"inherit"))||"").trim().toLowerCase();return"true"===r||"1"===r||"yes"===r}},{key:"applyDocumentMetadata",value:function(){var t,e,n,r,i,o,a,l,s,u,c=this.ensureDocumentSection("head");if(c instanceof Element){var d=String((null===(t=this.container)||void 0===t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"title"))||"").trim();if(d){document.title=d;var f=c.querySelector("title");f instanceof HTMLTitleElement||(f=document.createElement("title"),c.appendChild(f)),f.textContent=d}var h=String((null===(n=this.container)||void 0===n||null===(r=n.getAttribute)||void 0===r?void 0:r.call(n,"description"))||"").trim();h&&this.upsertMetaTag(c,"description",h);var p=String((null===(i=this.container)||void 0===i||null===(o=i.getAttribute)||void 0===o?void 0:o.call(i,"canonical"))||"").trim();p&&this.upsertLinkTag(c,"canonical",p);var v=String((null===(a=this.container)||void 0===a||null===(l=a.getAttribute)||void 0===l?void 0:l.call(a,"theme"))||"").trim();if(v){var y,m=this.ensureDocumentSection("body");null==m||null===(y=m.setAttribute)||void 0===y||y.call(m,"theme",v)}var b=String((null===(s=this.container)||void 0===s||null===(u=s.getAttribute)||void 0===u?void 0:u.call(s,"lang"))||"").trim();if(b){var g,w=document.documentElement||this.ensureDocumentRoot();null==w||null===(g=w.setAttribute)||void 0===g||g.call(w,"lang",b)}}}},{key:"upsertMetaTag",value:function(t,e,n){if(t instanceof Element&&e){var r=t.querySelector('meta[name="'.concat(e,'"]'));r instanceof HTMLMetaElement||((r=document.createElement("meta")).setAttribute("name",e),t.appendChild(r)),r.setAttribute("content",n)}}},{key:"upsertLinkTag",value:function(t,e,n){if(t instanceof Element&&e){var r=t.querySelector('link[rel="'.concat(e,'"]'));r instanceof HTMLLinkElement||((r=document.createElement("link")).setAttribute("rel",e),t.appendChild(r)),r.setAttribute("href",n)}}},{key:"ensureDocumentRoot",value:function(){var t=document.documentElement;if(t instanceof HTMLHtmlElement)return t;t=document.createElement("html");var e=document.firstChild;return e?document.insertBefore(t,e):document.appendChild(t),t}},{key:"applyBuiltInRegions",value:function(){var t,e,n=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map,i=["meta","styles","page-styles"],o=["scripts","page-scripts"],a=this.ensureDocumentSection("head"),l=this.ensureDocumentSection("body");if(a instanceof Element&&l instanceof Element){var s=String((null===(t=this.container)||void 0===t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"data-component-id"))||"").trim();r.forEach(function(t){var e=(null==t?void 0:t.regions)instanceof Map?t.regions:null;e instanceof Map&&0!==e.size&&(i.forEach(function(t){var r=e.get(t);Array.isArray(r)&&0!==r.length&&(n.appendOwnedNodes(a,r,"data-holi-page-head-owner",s),e.delete(t))}),o.forEach(function(t){var r=e.get(t);Array.isArray(r)&&0!==r.length&&(n.appendOwnedNodes(l,r,"data-holi-page-tail-owner",s),e.delete(t))}))})}}},{key:"appendOwnedNodes",value:function(t,e,n,r){t instanceof Element&&Array.isArray(e)&&e.forEach(function(e){(e.nodeType!==Node.TEXT_NODE||String(e.textContent||"").trim())&&(e instanceof Element&&r&&e.setAttribute(n,r),t.appendChild(e))})}},{key:"markRenderStart",value:function(){var t,e,n,r,i,o;null!==(t=this.container)&&void 0!==t&&null!==(e=t.getAttribute)&&void 0!==e&&e.call(t,"renderer")||null===(i=this.container)||void 0===i||null===(o=i.setAttribute)||void 0===o||o.call(i,"renderer","browser"),null===(n=this.container)||void 0===n||null===(r=n.setAttribute)||void 0===r||r.call(n,"rendered","pending")}},{key:"markRenderComplete",value:function(){var t,e,n,r;null===(t=this.container)||void 0===t||null===(e=t.removeAttribute)||void 0===e||e.call(t,"renderer"),null===(n=this.container)||void 0===n||null===(r=n.removeAttribute)||void 0===r||r.call(n,"rendered")}},{key:"applyHeadContent",value:function(t){var e,n,r=t.querySelector("layout-head, [data-layout-head]");if(r instanceof Element){var i=this.ensureDocumentSection("head");if(i instanceof Element){var o=String((null===(e=this.container)||void 0===e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"data-component-id"))||"").trim();o&&document.querySelectorAll('[data-holi-page-head-owner="'.concat(o,'"]')).forEach(function(t){return t.remove()}),Array.from(r.childNodes).forEach(function(t){if(t.nodeType!==Node.TEXT_NODE||String(t.textContent||"").trim()){var e=t.cloneNode(!0);e instanceof Element&&o&&e.setAttribute("data-holi-page-head-owner",o),i.appendChild(e)}}),r.remove()}}}},{key:"applyTailContent",value:function(t){var e,n,r=t.querySelector("tail, [data-layout-tail]");if(r instanceof Element){var i=this.ensureDocumentSection("body");if(i instanceof Element){var o=String((null===(e=this.container)||void 0===e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"data-component-id"))||"").trim();o&&document.querySelectorAll('[data-holi-page-tail-owner="'.concat(o,'"]')).forEach(function(t){return t.remove()}),Array.from(r.childNodes).forEach(function(t){if(t.nodeType!==Node.TEXT_NODE||String(t.textContent||"").trim()){var e=t.cloneNode(!0);e instanceof Element&&o&&e.setAttribute("data-holi-page-tail-owner",o),i.appendChild(e)}}),r.remove()}}}},{key:"ensureDocumentSection",value:function(t){var e=String(t||"").trim().toLowerCase();if("head"!==e&&"body"!==e)return null;if("head"===e&&document.head)return document.head;if("body"===e&&document.body)return document.body;var n=document.documentElement;n instanceof HTMLHtmlElement||(n=this.ensureDocumentRoot());var r=n.querySelector(":scope > ".concat(e));return r instanceof Element||(r=document.createElement(e),"head"===e?n.insertBefore(r,n.firstChild):n.appendChild(r)),r}},{key:"reportUnusedBlocks",value:function(t,e){Array.isArray(t)&&0!==t.length&&console.warn('Unused page blocks for layout "'.concat(e,'": ').concat(t.join(", ")),{page:this,unusedNames:t})}}],[{key:"selector",get:function(){return"page"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"page"}}]);var n,r}(r.Component);"undefined"!=typeof window&&(window.PageComponent=j)},511(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function l(n,r,i,a){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return o(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,o(h,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(h),o(h,a,"Generator"),o(h,r,function(){return this}),o(h,"toString",function(){return"[object Generator]"}),(i=function(){return{w:l,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function l(t){a(o,r,i,l,s,"next",t)}function s(t){a(o,r,i,l,s,"throw",t)}l(void 0)})}}function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach(function(e){m(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,b(r.key),r)}}function d(t,e,n){return e=v(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,f()?Reflect.construct(e,n||[],v(t).constructor):e.apply(t,n))}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!t})()}function h(t,e,n,r){var i=p(v(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=v(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},p.apply(null,arguments)}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}function m(t,e,n){return(e=b(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function b(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{PanelComponent:()=>g});var g=function(t){function e(t){var n,r,i,o,a,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(a=d(this,e,[t,l])).templateId=e.templateId,a.titleText=(null===(n=a.container)||void 0===n?void 0:n.getAttribute("title"))||(null===(r=a.container)||void 0===r?void 0:r.getAttribute("data-title"))||"",a.subtitleText=(null===(i=a.container)||void 0===i?void 0:i.getAttribute("subtitle"))||(null===(o=a.container)||void 0===o?void 0:o.getAttribute("data-subtitle"))||"",a.init(),a}return function(t,e){if("function"!=typeof e&&null!==e)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&&y(t,e)}(e,t),n=e,r=[{key:"validateStructure",value:function(){if(h(e,"validateStructure",this,3)([]),!this.container)throw new Error("Panel requires a container")}},{key:"getBindingContext",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return h(e,"getBindingContext",this,3)([u({title:this.titleText,subtitle:this.subtitleText,hasTitle:!!this.titleText,hasSubtitle:!!this.subtitleText},t)])}},{key:"init",value:(s=l(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return s.apply(this,arguments)})},{key:"render",value:(a=l(i().m(function t(){var n,r;return i().w(function(t){for(;;)switch(t.n){case 0:return n=Array.from(this.container.childNodes),t.n=1,h(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".holi-panel"),this.header=this.container.querySelector('[data-role="panel-header"]'),this.title=this.container.querySelector('[data-role="panel-title"]'),this.subtitle=this.container.querySelector('[data-role="panel-subtitle"]'),this.content=this.container.querySelector('[data-role="panel-content"]'),this.footer=this.container.querySelector('[data-role="panel-footer"]'),!this.content){t.n=3;break}return(r=this.content).replaceChildren.apply(r,n),t.n=2,this.createChildren();case 2:this.syncChildren();case 3:return this.projectSlot("header"),this.projectSlot("footer"),this.applyPanelState(),t.n=4,this.createChildren();case 4:this.syncChildren();case 5:return t.a(2)}},t,this)})),function(){return a.apply(this,arguments)})},{key:"projectSlot",value:function(t){var e=this.container.querySelector('[data-role="panel-'.concat(t,'"]'));if(e){var n=Array.from(this.container.querySelectorAll('[slot="'.concat(t,'"]')));if(n.length){var r=document.createDocumentFragment();n.forEach(function(t){t.removeAttribute("slot"),r.appendChild(t)}),e.hidden=!1,e.replaceChildren(r)}else("header"!==t||this.titleText||this.subtitleText)&&"footer"!==t||(e.hidden=!0)}}},{key:"applyPanelState",value:function(){if(this.header){var t=this.header.childNodes.length>0,e=!!this.titleText||!!this.subtitleText;this.header.hidden=!t&&!e}this.title&&(this.title.hidden=!this.titleText,this.title.textContent=this.titleText),this.subtitle&&(this.subtitle.hidden=!this.subtitleText,this.subtitle.textContent=this.subtitleText),this.footer&&0===this.footer.childNodes.length&&(this.footer.hidden=!0)}},{key:"refreshPpr",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.syncChildren();var n=!1;this.children.forEach(function(r){if(r&&!r.isDestroyed&&r!==(null==e?void 0:e.sourceComponent)&&r.container!==(null==e?void 0:e.sourceElement)){var i=u(u({},e),{},{panelComponent:t,targetElement:r.container,targetComponent:r,delegatedByPanel:!0});if("function"==typeof r.receiveDependencyUpdate)return r.receiveDependencyUpdate(i),void(n=!0);"function"==typeof r.handlePprUpdate&&(r.handlePprUpdate(i),n=!0)}}),n||this.refresh()}}],o=[{key:"selector",get:function(){return"panel"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"panel"}}],r&&c(n.prototype,r),o&&c(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,a,s}(n(812).Component);m(g,"templateId","panel-template"),"undefined"!=typeof window&&(window.PanelComponent=g)},295(){},101(t,e,n){"use strict";n.r(e),n.d(e,{RadioGroupComponent:()=>w});var r=n(812),i=n(853);function o(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function l(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return a(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(a(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,a(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,a(h,"constructor",d),a(d,"constructor",c),c.displayName="GeneratorFunction",a(d,i,"GeneratorFunction"),a(h),a(h,i,"Generator"),a(h,r,function(){return this}),a(h,"toString",function(){return"[object Generator]"}),(o=function(){return{w:l,m:p}})()}function a(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}a=function(t,e,n,r){function o(e,n){a(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},a(t,e,n,r)}function l(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,y(r.key),r)}}function c(t,e,n){return e=p(e),function(t,e){if(e&&("object"==s(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,d()?Reflect.construct(e,n||[],p(t).constructor):e.apply(t,n))}function d(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(d=function(){return!!t})()}function f(t,e,n,r){var i=h(p(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function h(){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},h.apply(null,arguments)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}function y(t){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}var m,b,g,w=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=c(this,e,[t,r])).templateId=e.templateId,n.config={legend:n.container.getAttribute("legend")||"",name:n.container.getAttribute("name")||"",required:n.readBoolAttr("required",!1),requiredMessage:n.container.getAttribute("data-required-message")||"Please select one option.",options:n.parseOptions(n.container.getAttribute("data-options"))},n.state={legend:n.config.legend,name:n.config.name,required:n.config.required,options:n.config.options,value:"",invalid:!1,errorMessage:""},n.boundChange=function(){return n.handleChange()},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&v(t,e)}(e,t),n=e,r=[{key:"readBoolAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.container.hasAttribute(t))return e;var n=String(this.container.getAttribute(t)||"").trim().toLowerCase();return!n||"false"!==n&&"0"!==n&&"no"!==n}},{key:"parseOptions",value:function(t){if(!t)return[];try{var e=JSON.parse(t);return Array.isArray(e)?e.map(function(t){return t&&"object"===s(t)?t:{value:t,label:String(t)}}):[]}catch(t){return[]}}},{key:"init",value:function(){this.validateStructure(),this.render()}},{key:"render",value:(d=o().m(function t(){var n;return o().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,f(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-radio-group"),this.optionsHost=this.container.querySelector('[data-role="options"]'),this.errorEl=this.container.querySelector('[data-role="error"]'),this.projectSlot("legend"),this.projectSlot("options"),this.projectSlot("actions"),this.applyOptionAttributes(),this.syncState(),this.validate(),null===(n=this.element)||void 0===n||n.addEventListener("change",this.boundChange);case 2:return t.a(2)}},t,this)}),h=function(){var t=this,e=arguments;return new Promise(function(n,r){var i=d.apply(t,e);function o(t){l(i,n,r,o,a,"next",t)}function a(t){l(i,n,r,o,a,"throw",t)}o(void 0)})},function(){return h.apply(this,arguments)})},{key:"projectSlot",value:function(t){var e=this.container.querySelector('slot[name="'.concat(t,'"]'));if(e){var n=Array.from(this.container.querySelectorAll('[slot="'.concat(t,'"]')));if(n.length){var r=document.createDocumentFragment();n.forEach(function(t){t.removeAttribute("slot"),r.appendChild(t)}),e.replaceWith(r)}}}},{key:"applyOptionAttributes",value:function(){var t=this;this.optionsHost&&this.optionsHost.querySelectorAll('input[type="radio"]').forEach(function(e){t.config.name&&(e.name=t.config.name),t.config.required&&(e.required=!0)})}},{key:"syncState",value:function(){if(this.optionsHost){var t=this.optionsHost.querySelector('input[type="radio"]:checked');this.state.value=(null==t?void 0:t.value)||""}}},{key:"handleChange",value:function(){this.syncState(),this.validate(),this.dispatchEvent("radiochange",{value:this.state.value})}},{key:"validate",value:function(){var t=!!this.config.required&&!this.state.value;return this.state.invalid=t,this.state.errorMessage=t?this.config.requiredMessage:"",this.element&&this.element.classList.toggle("is-invalid",t),this.errorEl&&(this.errorEl.hidden=!t,this.errorEl.textContent=this.state.errorMessage),!t}},{key:"value",get:function(){return this.state.value||""},set:function(t){var e,n=null==t?"":String(t);Array.from((null===(e=this.optionsHost)||void 0===e?void 0:e.querySelectorAll('input[type="radio"]'))||[]).forEach(function(t){t.checked=t.value===n}),this.syncState(),this.validate()}},{key:"destroy",value:function(){var t;null===(t=this.element)||void 0===t||t.removeEventListener("change",this.boundChange),f(e,"destroy",this,3)([])}}],a=[{key:"selector",get:function(){return"holi-radio"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"radio-group"}},{key:"getNativeSelectors",value:function(){return['input[type="radio"][component="radio"]','input[type="radio"][role="radio"]']}},{key:"prepareHost",value:function(t){if(!(t instanceof HTMLInputElement)||"radio"!==t.type)return t;var e=document.createElement("section");(0,i.ts)(t,e,{exclude:["component","role","type","checked","value"]}),e.setAttribute("component","radio-group");var n=t.getAttribute("id");n&&(e.setAttribute("id",n),t.removeAttribute("id"));var r=(0,i.VC)(t);return(r===t.parentElement?r:t).replaceWith(e),r&&e.appendChild(r),e}}],r&&u(n.prototype,r),a&&u(n,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,a,d,h}(r.Component);m=w,g="radio-group-template",(b=y(b="templateId"))in m?Object.defineProperty(m,b,{value:g,enumerable:!0,configurable:!0,writable:!0}):m[b]=g,"undefined"!=typeof window&&(window.RadioGroupComponent=w)},953(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function l(n,r,i,a){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return o(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,o(h,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(h),o(h,a,"Generator"),o(h,r,function(){return this}),o(h,"toString",function(){return"[object Generator]"}),(i=function(){return{w:l,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function l(t){a(o,r,i,l,s,"next",t)}function s(t){a(o,r,i,l,s,"throw",t)}l(void 0)})}}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,v(r.key),r)}}function u(t,e,n){return e=h(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,n||[],h(t).constructor):e.apply(t,n))}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function d(t,e,n,r){var i=f(h(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},f.apply(null,arguments)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function v(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{RatingComponent:()=>g});var y,m,b,g=function(t){function e(t){var n,r,i,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=u(this,e,[t,a])).templateId=e.templateId,o.type=o.resolveType(null!==(n=a.type)&&void 0!==n?n:o.readAttr("type","star")),o.grade=o.resolveGrade(null!==(r=a.grade)&&void 0!==r?r:o.readAttr("grade","5")),o.rating=o.resolveRating(null!==(i=a.value)&&void 0!==i?i:o.readAttr("value",o.readAttr("rating","0"))),o.init(),o}return function(t,e){if("function"!=typeof e&&null!==e)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&&p(t,e)}(e,t),n=e,r=[{key:"readAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.container.getAttribute(t);if(null!=n)return String(n);var r=this.container.getAttribute("data-".concat(t));return null!=r?String(r):e}},{key:"resolveType",value:function(t){return String(t||"star").trim().toLowerCase(),"star"}},{key:"resolveGrade",value:function(t){var e=Number(t);return Number.isFinite(e)?Math.max(1,Math.min(10,Math.round(e))):5}},{key:"resolveRating",value:function(t){var e=Number(t);return Number.isFinite(e)?Math.max(0,Math.min(this.grade,e)):0}},{key:"init",value:(c=l(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return c.apply(this,arguments)})},{key:"render",value:(a=l(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,d(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".rating"),this.iconTemplate=this.container.querySelector(".rating [data-value]"),this.element&&this.iconTemplate){t.n=2;break}throw new Error("Rating template is missing required nodes");case 2:this.buildIcons(),this.updateView();case 3:return t.a(2)}},t,this)})),function(){return a.apply(this,arguments)})},{key:"setRating",value:function(t){this.rating=this.resolveRating(t),this.updateView()}},{key:"setGrade",value:function(t){this.grade=this.resolveGrade(t),this.rating=this.resolveRating(this.rating),this.buildIcons(),this.updateView()}},{key:"buildIcons",value:function(){if(this.element&&this.iconTemplate){this.element.replaceChildren();for(var t=document.createDocumentFragment(),e=0;e<this.grade;e+=1){var n=this.iconTemplate.cloneNode(!0);n.setAttribute("data-value",String(e+1)),t.appendChild(n)}this.element.appendChild(t),this.icons=Array.from(this.element.querySelectorAll("[data-value]"))}}},{key:"updateView",value:function(){var t=this;this.element&&Array.isArray(this.icons)&&(this.element.setAttribute("data-type",this.type),this.element.setAttribute("data-grade",String(this.grade)),this.element.setAttribute("data-rating",String(this.rating)),this.element.setAttribute("aria-label","".concat(this.rating," out of ").concat(this.grade," stars")),this.icons.forEach(function(e,n){var r=n+1,i=t.resolveFill(r);e.className="fa ".concat(t.resolveIconClass(i)),e.setAttribute("data-value",String(r)),e.setAttribute("aria-hidden","true")}))}},{key:"resolveFill",value:function(t){return this.rating>=t?"full":this.rating>=t-.5?"half":"empty"}},{key:"resolveIconClass",value:function(t){return"full"===t?"fa-star":"half"===t?"fa-star-half-full":"fa-star-o"}}],o=[{key:"selector",get:function(){return"rating"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"rating"}}],r&&s(n.prototype,r),o&&s(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,a,c}(n(812).Component);y=g,b="rating-template",(m=v(m="templateId"))in y?Object.defineProperty(y,m,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[m]=b,"undefined"!=typeof window&&(window.RatingComponent=g)},285(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function l(n,r,i,a){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return o(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,o(h,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(h),o(h,a,"Generator"),o(h,r,function(){return this}),o(h,"toString",function(){return"[object Generator]"}),(i=function(){return{w:l,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function l(t){a(o,r,i,l,s,"next",t)}function s(t){a(o,r,i,l,s,"throw",t)}l(void 0)})}}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,v(r.key),r)}}function u(t,e,n){return e=h(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,n||[],h(t).constructor):e.apply(t,n))}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function d(t,e,n,r){var i=f(h(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},f.apply(null,arguments)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function v(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{RefreshComponent:()=>g});var y,m,b,g=function(t){function e(t){var n,r,i,o,a,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(a=u(this,e,[t,l])).templateId=e.templateId,a.threshold=a.parseNumber(null!==(n=l.threshold)&&void 0!==n?n:a.readAttr("threshold","72"),72),a.refreshThreshold=a.parseNumber(null!==(r=l.refreshThreshold)&&void 0!==r?r:a.readAttr("refresh-threshold","108"),108),a.maxPull=a.parseNumber(null!==(i=l.maxPull)&&void 0!==i?i:a.readAttr("max-pull","148"),148),a.completeDelay=a.parseNumber(null!==(o=l.completeDelay)&&void 0!==o?o:a.readAttr("complete-delay","1200"),1200),a.disabled=a.readBooleanAttr("disabled",!1),a.triggerLabel=a.readAttr("label","Pull to refresh"),a.releaseLabel=a.readAttr("release-label","Release to refresh"),a.loadingLabel=a.readAttr("loading-label","Refreshing..."),a.completeLabel=a.readAttr("complete-label","Updated just now"),a.pointerId=null,a.startY=0,a.currentY=0,a.pullDistance=0,a.isPulling=!1,a.isRefreshing=!1,a.refreshTimer=null,a.boundPointerDown=function(t){return a.onPointerDown(t)},a.boundPointerMove=function(t){return a.onPointerMove(t)},a.boundPointerUp=function(t){return a.onPointerUp(t)},a.boundKeyDown=function(t){return a.onKeyDown(t)},a.init(),a}return function(t,e){if("function"!=typeof e&&null!==e)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&&p(t,e)}(e,t),n=e,r=[{key:"readAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.container.getAttribute(t);if(null!=n)return String(n);var r=this.container.getAttribute("data-".concat(t));return null!=r?String(r):e}},{key:"readBooleanAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.container.hasAttribute(t)&&!this.container.hasAttribute("data-".concat(t)))return e;var n=this.readAttr(t,"");if(!n)return!0;var r=n.trim().toLowerCase();return!!["true","1","yes","on"].includes(r)||!["false","0","no","off"].includes(r)&&e}},{key:"parseNumber",value:function(t,e){var n=Number(t);return Number.isFinite(n)?n:e}},{key:"init",value:(c=l(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents();case 2:return t.a(2)}},t,this)})),function(){return c.apply(this,arguments)})},{key:"render",value:(a=l(i().m(function t(){var n,r,o=this;return i().w(function(t){for(;;)switch(t.n){case 0:return n=Array.from(this.container.childNodes),t.n=1,d(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".holi-refresh"),this.handleEl=this.container.querySelector('[data-role="handle"]'),this.labelEl=this.container.querySelector('[data-role="label"]'),this.progressEl=this.container.querySelector('[data-role="progress"]'),this.contentEl=this.container.querySelector('[data-role="content"]'),this.element&&this.handleEl&&this.labelEl&&this.progressEl&&this.contentEl){t.n=2;break}throw new Error("Refresh template is missing required nodes");case 2:r=this.element,n.forEach(function(t){t!==r&&o.contentEl.appendChild(t)}),this.container.hidden=!1,this.element.setAttribute("data-state",this.disabled?"disabled":"idle"),this.setPullDistance(0),this.setLabel(this.triggerLabel),void 0===this.container.refresh&&Object.defineProperty(this.container,"refresh",{value:this,writable:!1});case 3:return t.a(2)}},t,this)})),function(){return a.apply(this,arguments)})},{key:"bindEvents",value:function(){var t,e,n,r,i,o;null===(t=this.element)||void 0===t||t.addEventListener("pointerdown",this.boundPointerDown),null===(e=this.element)||void 0===e||e.addEventListener("pointermove",this.boundPointerMove),null===(n=this.element)||void 0===n||n.addEventListener("pointerup",this.boundPointerUp),null===(r=this.element)||void 0===r||r.addEventListener("pointercancel",this.boundPointerUp),null===(i=this.element)||void 0===i||i.addEventListener("lostpointercapture",this.boundPointerUp),null===(o=this.element)||void 0===o||o.addEventListener("keydown",this.boundKeyDown)}},{key:"onPointerDown",value:function(t){var e,n,r;this.disabled||this.isRefreshing||"mouse"===t.pointerType&&0!==t.button||this.canStartPull()&&(this.pointerId=t.pointerId,this.startY=t.clientY,this.currentY=t.clientY,this.pullDistance=0,this.isPulling=!0,null===(e=this.element)||void 0===e||null===(n=e.setPointerCapture)||void 0===n||n.call(e,t.pointerId),null===(r=this.element)||void 0===r||r.setAttribute("data-state","pulling"),this.setLabel(this.triggerLabel))}},{key:"onPointerMove",value:function(t){var e;if(this.isPulling&&this.pointerId===t.pointerId&&!this.isRefreshing){this.currentY=t.clientY;var n=this.currentY-this.startY;if(n<=0)return this.setPullDistance(0),void this.setLabel(this.triggerLabel);if(this.isAtTop()){var r=Math.min(this.maxPull,.62*n),i=Math.min(r/this.refreshThreshold,1);this.setPullDistance(r),null===(e=this.element)||void 0===e||e.setAttribute("data-state",i>=1?"armed":"pulling"),this.setLabel(i>=1?this.releaseLabel:this.triggerLabel),t.cancelable&&t.preventDefault()}}}},{key:"onPointerUp",value:function(t){if(this.isPulling&&(null==t.pointerId||null==this.pointerId||t.pointerId===this.pointerId)){var e=this.pullDistance>=this.refreshThreshold;this.isPulling=!1,this.pointerId=null,e?this.trigger():this.reset()}}},{key:"onKeyDown",value:function(t){this.disabled||this.isRefreshing||"r"!==t.key&&"R"!==t.key||!t.ctrlKey&&!t.metaKey||(t.preventDefault(),this.trigger())}},{key:"canStartPull",value:function(){var t=this.contentEl||this.container;return t instanceof HTMLElement?t.scrollTop<=0:this.isAtTop()}},{key:"isAtTop",value:function(){var t=this.contentEl||this.container;return t instanceof HTMLElement&&t.scrollHeight>t.clientHeight?t.scrollTop<=0:"undefined"==typeof window||(window.scrollY||window.pageYOffset||0)<=0}},{key:"setPullDistance",value:function(t){var e,n;this.pullDistance=Math.max(0,Math.min(this.maxPull,t));var r=Math.min(this.pullDistance/this.refreshThreshold,1);null===(e=this.element)||void 0===e||null===(e=e.style)||void 0===e||e.setProperty("--refresh-pull-distance","".concat(this.pullDistance,"px")),null===(n=this.progressEl)||void 0===n||null===(n=n.style)||void 0===n||n.setProperty("--refresh-progress",String(r))}},{key:"setLabel",value:function(t){this.labelEl&&(this.labelEl.textContent=String(t||""))}},{key:"trigger",value:function(){var t,e=this;if(!this.disabled&&!this.isRefreshing){this.isRefreshing=!0,null===(t=this.element)||void 0===t||t.setAttribute("data-state","refreshing"),this.setPullDistance(this.threshold),this.setLabel(this.loadingLabel);var n=!1,r=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!n){n=!0;var r=!1!==(null==t?void 0:t.success);e.finishRefresh(r,(null==t?void 0:t.message)||"")}},i=new CustomEvent("pullrefresh",{detail:{source:"pull-to-refresh",component:this,complete:r},bubbles:!0});this.container.dispatchEvent(i),this.refreshTimer=window.setTimeout(function(){return r({success:!0})},this.completeDelay)}}},{key:"finishRefresh",value:function(){var t,e=this,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";this.refreshTimer&&"undefined"!=typeof window&&window.clearTimeout(this.refreshTimer),this.refreshTimer=null,this.isRefreshing=!1,null===(t=this.element)||void 0===t||t.setAttribute("data-state",n?"complete":"idle"),this.setLabel(r||(n?this.completeLabel:this.triggerLabel)),"undefined"!=typeof window?window.setTimeout(function(){return e.reset()},n?420:0):this.reset()}},{key:"reset",value:function(){var t;this.isRefreshing=!1,this.setPullDistance(0),null===(t=this.element)||void 0===t||t.setAttribute("data-state",this.disabled?"disabled":"idle"),this.setLabel(this.triggerLabel)}},{key:"destroy",value:function(){var t,n,r,i,o,a;this.refreshTimer&&"undefined"!=typeof window&&window.clearTimeout(this.refreshTimer),null===(t=this.element)||void 0===t||t.removeEventListener("pointerdown",this.boundPointerDown),null===(n=this.element)||void 0===n||n.removeEventListener("pointermove",this.boundPointerMove),null===(r=this.element)||void 0===r||r.removeEventListener("pointerup",this.boundPointerUp),null===(i=this.element)||void 0===i||i.removeEventListener("pointercancel",this.boundPointerUp),null===(o=this.element)||void 0===o||o.removeEventListener("lostpointercapture",this.boundPointerUp),null===(a=this.element)||void 0===a||a.removeEventListener("keydown",this.boundKeyDown),d(e,"destroy",this,3)([])}}],o=[{key:"selector",get:function(){return"refresh"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"refresh"}},{key:"getNativeSelectors",value:function(){return["[data-pull-refresh]"]}},{key:"enable",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.setAttribute("data-pull-refresh","true"),t.refresh||new e(t,n)}}],r&&s(n.prototype,r),o&&s(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,a,c}(n(812).Component);y=g,b="refresh-template",(m=v(m="templateId"))in y?Object.defineProperty(y,m,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[m]=b,"undefined"!=typeof window&&(window.RefreshComponent=g)},108(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function l(n,r,i,a){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return o(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,o(h,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(h),o(h,a,"Generator"),o(h,r,function(){return this}),o(h,"toString",function(){return"[object Generator]"}),(i=function(){return{w:l,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function l(t){a(o,r,i,l,s,"next",t)}function s(t){a(o,r,i,l,s,"throw",t)}l(void 0)})}}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,v(r.key),r)}}function u(t,e,n){return e=h(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,n||[],h(t).constructor):e.apply(t,n))}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function d(t,e,n,r){var i=f(h(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},f.apply(null,arguments)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function v(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{RegionComponent:()=>g});var y,m,b,g=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=u(this,e,[t,r])).templateId=e.templateId,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&p(t,e)}(e,t),n=e,r=[{key:"validateStructure",value:function(){if(d(e,"validateStructure",this,3)([]),!this.container)throw new Error("Region requires a container")}},{key:"init",value:(c=l(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return c.apply(this,arguments)})},{key:"render",value:(a=l(i().m(function t(){var n,r;return i().w(function(t){for(;;)switch(t.n){case 0:return r=Array.from(this.container.childNodes),t.n=1,d(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-region"),this.content=this.container.querySelector('[data-role="region-content"]'),this.content&&(n=this.content).replaceChildren.apply(n,r),this.applyWidth();case 2:return t.a(2)}},t,this)})),function(){return a.apply(this,arguments)})},{key:"applyWidth",value:function(){if(this.element&&this.container){var t=Number(this.container.getAttribute("width")),e=Number.isNaN(t)||t<=0?12:Math.min(12,t);this.container.style.gridColumn="span ".concat(e),this.container.style.minWidth="0",this.element.style.setProperty("--holi-region-span",String(e))}}}],o=[{key:"selector",get:function(){return"region"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"region"}},{key:"canInitElement",value:function(t){if(!(t instanceof Element))return!0;var e=t.closest('block, [component="block"], [role="block"]');if(!(e instanceof Element))return!0;var n=e.parentElement;return!(n instanceof Element&&n.matches('page[layout], [component="page"][layout], [role="page"][layout]'))}}],r&&s(n.prototype,r),o&&s(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,a,c}(n(812).Component);y=g,b="region-template",(m=v(m="templateId"))in y?Object.defineProperty(y,m,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[m]=b,"undefined"!=typeof window&&(window.RegionComponent=g)},12(t,e,n){"use strict";n.r(e),n.d(e,{SearchComponent:()=>A});var r=n(812),i=n(62),o=n(76);function a(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||u(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){u=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(t,e)||u(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){if(t){if("string"==typeof t)return c(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function d(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return f(u,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),u}var a={};function l(){}function s(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(f(e={},r,function(){return this}),e),h=u.prototype=l.prototype=Object.create(c);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,f(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return s.prototype=u,f(h,"constructor",u),f(u,"constructor",s),s.displayName="GeneratorFunction",f(u,i,"GeneratorFunction"),f(h),f(h,i,"Generator"),f(h,r,function(){return this}),f(h,"toString",function(){return"[object Generator]"}),(d=function(){return{w:o,m:p}})()}function f(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}f=function(t,e,n,r){function o(e,n){f(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},f(t,e,n,r)}function h(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function p(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){h(o,r,i,a,l,"next",t)}function l(t){h(o,r,i,a,l,"throw",t)}a(void 0)})}}function v(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,k(r.key),r)}}function y(t,e,n){return e=w(e),function(t,e){if(e&&("object"==l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,m()?Reflect.construct(e,n||[],w(t).constructor):e.apply(t,n))}function m(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(m=function(){return!!t})()}function b(t,e,n,r){var i=g(w(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function g(){return g="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=w(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},g.apply(null,arguments)}function w(t){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},w(t)}function S(t,e){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},S(t,e)}function k(t){var e=function(t){if("object"!=l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==l(e)?e:e+""}var E,O,C,A=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=y(this,e,[t,r])).templateId=e.templateId,n.config={endpoint:n.readAttr(["data-endpoint","endpoint"],""),suggestionsEndpoint:n.readAttr(["data-suggestions-endpoint","data-suggest-endpoint","suggestions"],""),placeholder:n.readAttr(["placeholder","data-placeholder"],"Search..."),minLength:Math.max(1,Number(n.readAttr(["data-min-length","min-length"],"1"))||1),suggestionLimit:Math.max(1,Number(n.readAttr(["data-suggestion-limit","suggestion-limit"],"6"))||6),resultLimit:Math.max(1,Number(n.readAttr(["data-limit","limit"],"10"))||10),debounceMs:Math.max(0,Number(n.readAttr(["data-debounce-ms","debounce-ms"],"200"))||200)},n.state={query:"",suggestions:[],results:[],activeSuggestion:-1,open:!1,loading:!1},n.fetchSeq=0,n.debounceTimer=null,n.boundOutsideClick=function(t){return n.handleOutsideClick(t)},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&S(t,e)}(e,t),n=e,r=[{key:"readAttr",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=0;n<t.length;n+=1){var r=this.container.getAttribute(t[n]);if(null!=r&&""!==String(r).trim())return String(r).trim()}return e}},{key:"parseJsonAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=String(this.container.getAttribute(t)||"").trim();if(!n)return e;try{var r=JSON.parse(n);return Array.isArray(r)?r:e}catch(t){return e}}},{key:"init",value:(g=p(d().m(function t(){return d().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents(),this.renderSuggestions(),this.renderResults();case 2:return t.a(2)}},t,this)})),function(){return g.apply(this,arguments)})},{key:"render",value:(m=p(d().m(function t(){var n;return d().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,b(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-search"),this.input=this.container.querySelector('[data-role="input"]'),this.suggestionPanel=this.container.querySelector('[data-role="suggestions"]'),this.suggestionList=this.container.querySelector('[data-role="suggestions-list"]'),this.resultsPanel=this.container.querySelector('[data-role="results"]'),this.resultsList=this.container.querySelector('[data-role="results-list"]'),this.emptyEl=this.container.querySelector('[data-role="empty"]'),this.loadingEl=this.container.querySelector('[data-role="loading"]'),this.form=this.container.querySelector('[data-role="form"]'),this.loaderState=(0,i.w)(this,{host:this.resultsPanel||this.element,busyTarget:this.resultsPanel||this.element,scope:"block",defaultMessage:"Searching..."}),this.stateBinding=(0,o.x)(this,{defaultPath:"search",eventName:"searchchange",getSnapshot:function(t){return t.getBindableState()},applySnapshot:function(t,e){return t.applyBindableState(e)}}),this.input&&(this.input.placeholder=this.config.placeholder,this.input.setAttribute("autocomplete","off"),this.input.setAttribute("aria-expanded","false"),this.input.setAttribute("aria-autocomplete","list"),this.input.setAttribute("role","combobox"),this.input.setAttribute("aria-haspopup","listbox"),n=this.suggestionList.id||"search-suggestions-".concat(Math.random().toString(16).slice(2)),this.suggestionList.id=n,this.input.setAttribute("aria-controls",n));case 2:return t.a(2)}},t,this)})),function(){return m.apply(this,arguments)})},{key:"bindEvents",value:function(){var t,e,n,r,i,o=this;null===(t=this.input)||void 0===t||t.addEventListener("input",function(){var t=String(o.input.value||"").trim();o.state.query=t,o.state.activeSuggestion=-1,o.debounceTimer&&clearTimeout(o.debounceTimer),o.debounceTimer=setTimeout(function(){o.search(t)},o.config.debounceMs)}),null===(e=this.form)||void 0===e||e.addEventListener("submit",function(t){var e;t.preventDefault();var n=String((null===(e=o.input)||void 0===e?void 0:e.value)||"").trim();o.state.query=n,o.closeSuggestions(),o.search(n)}),null===(n=this.input)||void 0===n||n.addEventListener("keydown",function(t){return o.handleKeydown(t)}),null===(r=this.suggestionList)||void 0===r||r.addEventListener("mousedown",function(t){return t.preventDefault()}),null===(i=this.suggestionList)||void 0===i||i.addEventListener("click",function(t){return o.handleSuggestionClick(t)}),document.addEventListener("click",this.boundOutsideClick)}},{key:"handleOutsideClick",value:function(t){this.container.contains(t.target)||this.closeSuggestions()}},{key:"handleSuggestionClick",value:function(t){var e,n,r=null===(e=t.target)||void 0===e||null===(n=e.closest)||void 0===n?void 0:n.call(e,'[data-role="suggestion"]');if(r){var i=String(r.getAttribute("data-value")||"").trim();i&&this.selectSuggestion(i)}}},{key:"handleKeydown",value:function(t){if(this.state.open&&this.state.suggestions.length)if("ArrowDown"!==t.key)if("ArrowUp"!==t.key){if("Enter"!==t.key)"Escape"===t.key&&(t.preventDefault(),this.closeSuggestions());else if(this.state.activeSuggestion>=0){t.preventDefault();var e=this.state.suggestions[this.state.activeSuggestion];this.selectSuggestion((null==e?void 0:e.value)||(null==e?void 0:e.label)||"")}}else{t.preventDefault();var n=this.state.activeSuggestion<=0?this.state.suggestions.length-1:this.state.activeSuggestion-1;this.setActiveSuggestion(n)}else{t.preventDefault();var r=(this.state.activeSuggestion+1)%this.state.suggestions.length;this.setActiveSuggestion(r)}else"Escape"===t.key&&this.closeSuggestions()}},{key:"setActiveSuggestion",value:function(t){var e,n=this;this.state.activeSuggestion=t,Array.from((null===(e=this.suggestionList)||void 0===e?void 0:e.querySelectorAll('[data-role="suggestion"]'))||[]).forEach(function(e,r){var i,o=r===t;e.setAttribute("aria-selected",o?"true":"false"),e.classList.toggle("is-active",o),o&&(e.scrollIntoView({block:"nearest"}),null===(i=n.input)||void 0===i||i.setAttribute("aria-activedescendant",e.id))})}},{key:"selectSuggestion",value:function(t){this.input&&(this.input.value=t,this.state.query=t,this.state.activeSuggestion=-1,this.closeSuggestions(),this.dispatchEvent("searchsuggestselect",{suggestion:t}),this.search(t))}},{key:"search",value:(h=p(d().m(function t(e){var n,r,i,o,a,l;return d().w(function(t){for(;;)switch(t.p=t.n){case 0:if(!((n=String(e||"").trim()).length<this.config.minLength)){t.n=1;break}return this.state.suggestions=[],this.state.results=[],this.state.activeSuggestion=-1,this.closeSuggestions(),this.renderSuggestions(),this.renderResults(),t.a(2);case 1:return r=++this.fetchSeq,this.setLoading(!0),t.p=2,t.n=3,Promise.all([this.fetchSuggestions(n),this.fetchResults(n)]);case 3:if(i=t.v,o=s(i,2),a=o[0],l=o[1],r===this.fetchSeq){t.n=4;break}return t.a(2);case 4:this.state.suggestions=a,this.state.results=l,this.state.activeSuggestion=-1,this.openSuggestionsIfNeeded(),this.renderSuggestions(),this.renderResults(),this.dispatchEvent("searchchange",{query:n,suggestionCount:a.length,resultCount:l.length});case 5:return t.p=5,r===this.fetchSeq&&this.setLoading(!1),t.f(5);case 6:return t.a(2)}},t,this,[[2,,5,6]])})),function(t){return h.apply(this,arguments)})},{key:"openSuggestionsIfNeeded",value:function(){var t,e,n=this.state.suggestions.length>0&&document.activeElement===this.input;this.state.open=n,this.suggestionPanel&&(this.suggestionPanel.hidden=!n),null===(t=this.input)||void 0===t||t.setAttribute("aria-expanded",n?"true":"false"),n||null===(e=this.input)||void 0===e||e.removeAttribute("aria-activedescendant")}},{key:"closeSuggestions",value:function(){var t,e;this.state.open=!1,this.suggestionPanel&&(this.suggestionPanel.hidden=!0),null===(t=this.input)||void 0===t||t.setAttribute("aria-expanded","false"),null===(e=this.input)||void 0===e||e.removeAttribute("aria-activedescendant")}},{key:"fetchSuggestions",value:(f=p(d().m(function t(e){var n,r,i,o,a,l,s,u;return d().w(function(t){for(;;)switch(t.n){case 0:if(!this.config.suggestionsEndpoint){t.n=4;break}return(n=new URL(this.config.suggestionsEndpoint,window.location.origin)).searchParams.set("q",e),n.searchParams.set("limit",String(this.config.suggestionLimit)),t.n=1,fetch(n.toString(),{credentials:"same-origin"});case 1:if((r=t.v).ok){t.n=2;break}return t.a(2,[]);case 2:return t.n=3,r.json();case 3:return i=t.v,o=this.normalizeSuggestionList(i),a=e.toLowerCase(),t.a(2,o.filter(function(t){return t.label.toLowerCase().includes(a)}).slice(0,this.config.suggestionLimit));case 4:return l=this.parseJsonAttr("data-suggestions",[]),s=this.normalizeSuggestionList(l),u=e.toLowerCase(),t.a(2,s.filter(function(t){return t.label.toLowerCase().includes(u)}).slice(0,this.config.suggestionLimit))}},t,this)})),function(t){return f.apply(this,arguments)})},{key:"fetchResults",value:(c=p(d().m(function t(e){var n,r,i,o,a,l,s,u;return d().w(function(t){for(;;)switch(t.n){case 0:if(!this.config.endpoint){t.n=4;break}return(n=new URL(this.config.endpoint,window.location.origin)).searchParams.set("q",e),n.searchParams.set("limit",String(this.config.resultLimit)),t.n=1,fetch(n.toString(),{credentials:"same-origin"});case 1:if((r=t.v).ok){t.n=2;break}return t.a(2,[]);case 2:return t.n=3,r.json();case 3:return i=t.v,o=this.normalizeResultList(i),a=e.toLowerCase(),t.a(2,o.filter(function(t){return t.title.toLowerCase().includes(a)||t.description.toLowerCase().includes(a)||t.url.toLowerCase().includes(a)}).slice(0,this.config.resultLimit));case 4:return l=this.parseJsonAttr("data-search-data",[]),s=this.normalizeResultList(l),u=e.toLowerCase(),t.a(2,s.filter(function(t){return t.title.toLowerCase().includes(u)||t.description.toLowerCase().includes(u)||t.url.toLowerCase().includes(u)}).slice(0,this.config.resultLimit))}},t,this)})),function(t){return c.apply(this,arguments)})},{key:"normalizeSuggestionList",value:function(t){return(Array.isArray(t)?t:Array.isArray(null==t?void 0:t.items)?t.items:Array.isArray(null==t?void 0:t.rows)?t.rows:[]).map(function(t){if(t&&"object"===l(t)){var e,n,r,i,o,a=String(null!==(e=null!==(n=null!==(r=null!==(i=t.label)&&void 0!==i?i:t.name)&&void 0!==r?r:t.title)&&void 0!==n?n:t.value)&&void 0!==e?e:"").trim();return{label:a,value:String(null!==(o=t.value)&&void 0!==o?o:a).trim()}}var s=String(null!=t?t:"").trim();return{label:s,value:s}}).filter(function(t){return t.label})}},{key:"normalizeResultList",value:function(t){return(Array.isArray(t)?t:Array.isArray(null==t?void 0:t.items)?t.items:Array.isArray(null==t?void 0:t.rows)?t.rows:Array.isArray(null==t?void 0:t.data)?t.data:[]).map(function(t){var e,n,r,i,o,a,s;return t&&"object"===l(t)?{title:String(null!==(e=null!==(n=null!==(r=t.title)&&void 0!==r?r:t.name)&&void 0!==n?n:t.label)&&void 0!==e?e:"").trim(),description:String(null!==(i=null!==(o=t.description)&&void 0!==o?o:t.content)&&void 0!==i?i:"").trim(),url:String(null!==(a=null!==(s=t.url)&&void 0!==s?s:t.href)&&void 0!==a?a:"").trim(),item:t}:{title:String(null!=t?t:"").trim(),description:"",url:"",item:t}}).filter(function(t){return t.title})}},{key:"setLoading",value:function(t){var e,n;this.state.loading=!!t,this.loadingEl&&(this.loadingEl.hidden=!t),null===(e=this.loaderState)||void 0===e||null===(n=e.setLoading)||void 0===n||n.call(e,this.state.loading,"Searching...")}},{key:"getBindableState",value:function(){return{query:this.state.query||"",suggestions:a(this.state.suggestions||[]),results:a(this.state.results||[])}}},{key:"applyBindableState",value:function(t){if(t&&"object"===l(t)&&"string"==typeof t.query){var e=t.query.trim();e!==this.state.query&&(this.state.query=e,this.input&&(this.input.value=e),this.search(e))}}},{key:"renderSuggestions",value:function(){var t=this;if(this.suggestionList){this.suggestionList.replaceChildren();var e,n=this.suggestionList.id||"search-suggestions-".concat(Math.random().toString(16).slice(2));this.suggestionList.id=n,this.state.suggestions.forEach(function(e,r){var i=document.createElement("li");i.className="holi-search-suggestion-row",i.setAttribute("role","presentation");var o=document.createElement("button");o.type="button",o.className="holi-search-suggestion",o.setAttribute("data-role","suggestion"),o.setAttribute("data-value",e.value),o.setAttribute("aria-selected","false"),o.setAttribute("role","option"),o.id="".concat(n,"-item-").concat(r),o.textContent=e.label,i.appendChild(o),t.suggestionList.appendChild(i)}),this.state.open&&this.state.suggestions.length>0?(this.suggestionPanel.hidden=!1,null===(e=this.input)||void 0===e||e.setAttribute("aria-expanded","true")):this.closeSuggestions()}}},{key:"renderResults",value:function(){var t=this;if(this.resultsList&&(this.resultsList.replaceChildren(),this.state.results.forEach(function(e){var n=document.createElement("article");n.className="holi-search-result",n.setAttribute("data-role","result");var r=document.createElement(e.url?"a":"h4");if(r.className="holi-search-result-title",r.textContent=e.title,e.url&&(r.href=e.url,r.setAttribute("data-role","result-link")),n.appendChild(r),e.description){var i=document.createElement("p");i.className="holi-search-result-description",i.textContent=e.description,n.appendChild(i)}t.resultsList.appendChild(n)}),this.emptyEl)){var e=this.state.query.length>=this.config.minLength;this.emptyEl.hidden=this.state.loading||!e||this.state.results.length>0}}},{key:"destroy",value:function(){var t,n,r,i;this.debounceTimer&&clearTimeout(this.debounceTimer),null===(t=this.loaderState)||void 0===t||null===(n=t.destroy)||void 0===n||n.call(t),null===(r=this.stateBinding)||void 0===r||null===(i=r.disconnect)||void 0===i||i.call(r),document.removeEventListener("click",this.boundOutsideClick),b(e,"destroy",this,3)([])}}],u=[{key:"selector",get:function(){return"[data-search]"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"search"}}],r&&v(n.prototype,r),u&&v(n,u),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,u,c,f,h,m,g}(r.Component);E=A,C="search-template",(O=k(O="templateId"))in E?Object.defineProperty(E,O,{value:C,enumerable:!0,configurable:!0,writable:!0}):E[O]=C,"undefined"!=typeof window&&(window.SearchComponent=A)},796(t,e,n){"use strict";n.r(e),n.d(e,{SelectComponent:()=>w});var r=n(257),i=n(853);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var a=r&&r.prototype instanceof u?r:u,c=Object.create(a.prototype);return l(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(l(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,l(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,l(h,"constructor",d),l(d,"constructor",c),c.displayName="GeneratorFunction",l(d,i,"GeneratorFunction"),l(h),l(h,i,"Generator"),l(h,r,function(){return this}),l(h,"toString",function(){return"[object Generator]"}),(a=function(){return{w:o,m:p}})()}function l(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}l=function(t,e,n,r){function o(e,n){l(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},l(t,e,n,r)}function s(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach(function(e){b(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,g(r.key),r)}}function f(t,e,n){return e=y(e),function(t,e){if(e&&("object"==o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,h()?Reflect.construct(e,n||[],y(t).constructor):e.apply(t,n))}function h(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(h=function(){return!!t})()}function p(t,e,n,r){var i=v(y(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function v(){return v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=y(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},v.apply(null,arguments)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}function b(t,e,n){return(e=g(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function g(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var w=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),f(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)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&&m(t,e)}(e,t),n=e,r=[{key:"getBindingContext",value:function(){var t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return p(e,"getBindingContext",this,3)([c({label:(null===(t=this.container)||void 0===t?void 0:t.getAttribute("label"))||(null===(n=this.container)||void 0===n?void 0:n.getAttribute("data-label"))||""},r)])}},{key:"render",value:(l=a().m(function t(){var n,r=this;return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,p(e,"render",this,3)([]);case 1:this.boundBlur||(this.boundBlur=function(){return r.validate()}),this.fieldRoot=this.container.querySelector(".holi-select-field")||this.element,this.labelEl=this.container.querySelector('[data-role="label"]'),this.errorEl=this.container.querySelector('[data-role="error"]'),this.projectSlot("label"),this.projectSlot("helper"),this.projectSlot("error"),this.applyFieldAttributes(),null===(n=this.input)||void 0===n||n.addEventListener("blur",this.boundBlur),this.validate();case 2:return t.a(2)}},t,this)}),u=function(){var t=this,e=arguments;return new Promise(function(n,r){var i=l.apply(t,e);function o(t){s(i,n,r,o,a,"next",t)}function a(t){s(i,n,r,o,a,"throw",t)}o(void 0)})},function(){return u.apply(this,arguments)})},{key:"projectSlot",value:function(t){var e=this.container.querySelector('slot[name="'.concat(t,'"]'));if(e){var n=Array.from(this.container.querySelectorAll('[slot="'.concat(t,'"]')));if(n.length){var r=document.createDocumentFragment();n.forEach(function(t){t.removeAttribute("slot"),r.appendChild(t)}),e.replaceWith(r)}}}},{key:"readBoolAttr",value:function(t,n){return p(e,"readBooleanAttr",this,3)([t,n])}},{key:"applyFieldAttributes",value:function(){var t,e=this.container.getAttribute("name")||this.container.getAttribute("data-name")||"",n=this.readBoolAttr("required",!1)||this.readBoolAttr("data-required",!1),r=this.container.getAttribute("data-required-message")||"Please select an option.";this.required=n,this.requiredMessage=r,this.valueInput&&e&&(this.valueInput.name=e),this.input&&(this.input.required=n,this.input.setAttribute("aria-required",n?"true":"false"));var i=(null===(t=this.input)||void 0===t?void 0:t.id)||"holi-select-".concat(Math.random().toString(16).slice(2));this.input&&(this.input.id=i),this.labelEl&&!this.labelEl.getAttribute("for")&&this.labelEl.setAttribute("for",i);var o=this.container.getAttribute("value")||this.container.getAttribute("data-value");o&&(this.value=o)}},{key:"validate",value:function(){var t=!!this.required&&!this.value;return this.fieldRoot&&this.fieldRoot.classList.toggle("is-invalid",t),this.errorEl&&(this.errorEl.hidden=!t,this.errorEl.textContent=t?this.requiredMessage:""),this.input&&this.input.setAttribute("aria-invalid",t?"true":"false"),!t}},{key:"selectItem",value:function(t){p(e,"selectItem",this,3)([t]),this.validate()}},{key:"destroy",value:function(){var t;null===(t=this.input)||void 0===t||t.removeEventListener("blur",this.boundBlur),p(e,"destroy",this,3)([])}}],o=[{key:"selector",get:function(){return"holi-select"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"select-field"}},{key:"getNativeSelectors",value:function(){return['select[component="select"]','select[role="select"]','select[component="select-field"]','select[role="select-field"]']}},{key:"prepareHost",value:function(t){if(!(t instanceof HTMLSelectElement))return t;var e=document.createElement("section");return(0,i.ts)(t,e,{exclude:["component","role"]}),e.setAttribute("component","select-field"),e.setAttribute("data-items",JSON.stringify((0,i.NQ)(t))),e.setAttribute("value",(0,i.BD)(t)),t.replaceWith(e),e}}],r&&d(n.prototype,r),o&&d(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,l,u}(r.DropdownComponent);b(w,"templateId","select-field-template"),"undefined"!=typeof window&&(window.SelectComponent=w)},911(t,e,n){"use strict";n.r(e),n.d(e,{StatsCard:()=>S});var r=n(812),i=n(76);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var a=r&&r.prototype instanceof u?r:u,c=Object.create(a.prototype);return l(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(l(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,l(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,l(h,"constructor",d),l(d,"constructor",c),c.displayName="GeneratorFunction",l(d,i,"GeneratorFunction"),l(h),l(h,i,"Generator"),l(h,r,function(){return this}),l(h,"toString",function(){return"[object Generator]"}),(a=function(){return{w:o,m:p}})()}function l(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}l=function(t,e,n,r){function o(e,n){l(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},l(t,e,n,r)}function s(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function u(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){s(o,r,i,a,l,"next",t)}function l(t){s(o,r,i,a,l,"throw",t)}a(void 0)})}}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,m(r.key),r)}}function d(t,e,n){return e=v(e),function(t,e){if(e&&("object"==o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,f()?Reflect.construct(e,n||[],v(t).constructor):e.apply(t,n))}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!t})()}function h(t,e,n,r){var i=p(v(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=v(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},p.apply(null,arguments)}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}function m(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var b,g,w,S=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=d(this,e,[t,r])).templateId=e.templateId,n.value=n.parseNumber(r.value,t.dataset.value,0),n.label=r.label||t.dataset.label||"Metric",n.trend=n.normalizeTrend(r.trend||t.dataset.trend||"neutral"),n.change=n.parseNumber(r.change,t.dataset.change,0),n.unit=r.unit||t.dataset.unit||"",n.animate=n.parseBoolean(r.animate,t.dataset.animate,!0),n.duration=n.parseNumber(r.duration,t.dataset.duration,1200),n.icon=r.icon||t.dataset.icon||n.getDefaultIcon(n.label),n.isAnimating=!1,n.valueEl=null,n.labelEl=null,n.changeEl=null,n.trendEl=null,n.iconEl=null,n.sparklineEl=null,n.frameId=null,void 0===n.container.statsCard&&Object.defineProperty(n.container,"statsCard",{value:n,writable:!1}),n.onMouseEnter=function(){var t;null===(t=n.sparklineEl)||void 0===t||t.classList.add("spark-active")},n.onMouseLeave=function(){var t;null===(t=n.sparklineEl)||void 0===t||t.classList.remove("spark-active")},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&y(t,e)}(e,t),n=e,r=[{key:"parseNumber",value:function(){for(var t,e=(t=arguments.length-1)<0||arguments.length<=t?void 0:arguments[t],n=0;n<arguments.length-1;n+=1){var r=n<0||arguments.length<=n?void 0:arguments[n];if(null!=r&&""!==r){var i=Number(r);if(!Number.isNaN(i))return i}}return e}},{key:"parseBoolean",value:function(){for(var t,e=(t=arguments.length-1)<0||arguments.length<=t?void 0:arguments[t],n=0;n<arguments.length-1;n+=1){var r=n<0||arguments.length<=n?void 0:arguments[n];if(null!=r&&""!==r){var i=String(r).toLowerCase();if("true"===i||"1"===i||"yes"===i)return!0;if("false"===i||"0"===i||"no"===i)return!1}}return e}},{key:"normalizeTrend",value:function(t){var e=String(t||"neutral").toLowerCase();return["up","down","neutral"].includes(e)?e:"neutral"}},{key:"getDefaultIcon",value:function(t){return{revenue:"$",users:"U",orders:"O",conversion:"C",sales:"S"}[String(t||"").toLowerCase()]||"M"}},{key:"validateStructure",value:function(){if(h(e,"validateStructure",this,3)([]),this.duration<0)throw new Error("StatsCard duration must be >= 0")}},{key:"init",value:(f=u(a().m(function t(){return a().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents(),this.update({value:this.value,change:this.change,trend:this.trend,label:this.label,unit:this.unit,icon:this.icon},{animate:this.animate});case 2:return t.a(2)}},t,this)})),function(){return f.apply(this,arguments)})},{key:"render",value:(s=u(a().m(function t(){var n,r,o,l,s,u;return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,h(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".stats-card-view"),this.valueEl=null===(n=this.element)||void 0===n?void 0:n.querySelector(".stats-value"),this.labelEl=null===(r=this.element)||void 0===r?void 0:r.querySelector(".stats-label"),this.changeEl=null===(o=this.element)||void 0===o?void 0:o.querySelector(".change-value"),this.trendEl=null===(l=this.element)||void 0===l?void 0:l.querySelector(".change-trend"),this.iconEl=null===(s=this.element)||void 0===s?void 0:s.querySelector(".stats-icon"),this.sparklineEl=null===(u=this.element)||void 0===u?void 0:u.querySelector(".stats-sparkline"),this.element&&this.valueEl&&this.labelEl&&this.changeEl&&this.trendEl&&this.iconEl){t.n=2;break}throw new Error("StatsCard template is missing required nodes");case 2:this.stateBinding=(0,i.x)(this,{defaultPath:"statscard",eventName:"statsupdate",getSnapshot:function(t){return t.getBindableState()},applySnapshot:function(t,e){return t.applyBindableState(e)}});case 3:return t.a(2)}},t,this)})),function(){return s.apply(this,arguments)})},{key:"bindEvents",value:function(){this.container.addEventListener("mouseenter",this.onMouseEnter),this.container.addEventListener("mouseleave",this.onMouseLeave)}},{key:"applyStaticFields",value:function(){this.iconEl.textContent=this.icon,this.labelEl.textContent=this.label,this.changeEl.textContent="".concat(this.change>0?"+":"").concat(this.change.toFixed(1),"%"),this.trendEl.textContent=this.getTrendGlyph(this.trend),this.element.classList.remove("trend-up","trend-down","trend-neutral"),this.element.classList.add("trend-".concat(this.trend))}},{key:"getTrendGlyph",value:function(t){return"up"===t?"^":"down"===t?"v":"-"}},{key:"formatValue",value:function(t){return"$"===this.unit?"$".concat(Number(t).toLocaleString()):"%"===this.unit?"".concat(Number(t).toFixed(1),"%"):Number(t).toLocaleString()}},{key:"renderValue",value:function(t){this.valueEl.textContent=this.formatValue(t)}},{key:"animateValue",value:function(t,e){var n=this;if(!this.animate||0===this.duration)return this.renderValue(e),void(this.isAnimating=!1);this.frameId&&cancelAnimationFrame(this.frameId),this.isAnimating=!0;var r=null,i=e-t,o=function(e){null==r&&(r=e);var a=Math.min((e-r)/n.duration,1),l=1-Math.pow(1-a,3);n.renderValue(t+i*l),a<1?n.frameId=requestAnimationFrame(o):(n.frameId=null,n.isAnimating=!1)};this.frameId=requestAnimationFrame(o)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.value;void 0!==t.label&&(this.label=t.label),void 0!==t.unit&&(this.unit=t.unit),void 0!==t.icon&&(this.icon=t.icon),void 0!==t.value&&(this.value=this.parseNumber(t.value,this.value)),void 0!==t.change&&(this.change=this.parseNumber(t.change,this.change)),void 0!==t.trend&&(this.trend=this.normalizeTrend(t.trend)),this.applyStaticFields(),this.animateValue(e,this.value),this.dispatchEvent("statsupdate",{value:this.value,change:this.change,trend:this.trend,label:this.label})}},{key:"getBindableState",value:function(){return{value:this.value,change:this.change,trend:this.trend,label:this.label,unit:this.unit,icon:this.icon}}},{key:"applyBindableState",value:function(t){t&&"object"===o(t)&&this.update(t,{animate:!1})}},{key:"destroy",value:function(){var t,n;this.frameId&&(cancelAnimationFrame(this.frameId),this.frameId=null),null===(t=this.stateBinding)||void 0===t||null===(n=t.disconnect)||void 0===n||n.call(t),this.container.removeEventListener("mouseenter",this.onMouseEnter),this.container.removeEventListener("mouseleave",this.onMouseLeave),h(e,"destroy",this,3)([])}}],l=[{key:"selector",get:function(){return"[data-stats], .stats-card"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"statscard"}}],r&&c(n.prototype,r),l&&c(n,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,l,s,f}(r.Component);b=S,w="statscard",(g=m(g="templateId"))in b?Object.defineProperty(b,g,{value:w,enumerable:!0,configurable:!0,writable:!0}):b[g]=w,"undefined"!=typeof window&&(window.StatsCard=S)},396(t,e,n){"use strict";n.r(e),n.d(e,{TabsComponent:()=>g});var r=n(812),i=n(62),o=n(76);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function l(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return s(c,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var a={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(s(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,s(h,"constructor",d),s(d,"constructor",c),c.displayName="GeneratorFunction",s(d,i,"GeneratorFunction"),s(h),s(h,i,"Generator"),s(h,r,function(){return this}),s(h,"toString",function(){return"[object Generator]"}),(l=function(){return{w:o,m:p}})()}function s(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}s=function(t,e,n,r){function o(e,n){s(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},s(t,e,n,r)}function u(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function c(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){u(o,r,i,a,l,"next",t)}function l(t){u(o,r,i,a,l,"throw",t)}a(void 0)})}}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,f(r.key),r)}}function f(t){var e=function(t){if("object"!=a(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==a(e)?e:e+""}function h(t,e,n){return e=b(e),function(t,e){if(e&&("object"==a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,p()?Reflect.construct(e,n||[],b(t).constructor):e.apply(t,n))}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(p=function(){return!!t})()}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}function y(t,e,n,r){var i=m(b(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function m(){return m="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=b(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},m.apply(null,arguments)}function b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},b(t)}var g=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=h(this,e,[t,r])).templateId="tabs",n.lazyLoad=n.container.hasAttribute("lazy"),n.cacheContent=!n.container.hasAttribute("no-cache"),n.preloadCount=parseInt(n.container.dataset.preload||0,10),n.providerName=t.getAttribute("provider")||"default",n.contentProviderInstance=null,n.panelCache=new Map,n.loadingStates=new Map,n.tabs=[],n.activeIndex=-1,!1!==r.autoInit&&n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&v(t,e)}(e,t),n=e,r=[{key:"init",value:(S=c(l().m(function t(){return l().w(function(t){for(;;)switch(t.n){case 0:return y(e,"init",this,3)([]),t.n=1,this.resolveDataSource();case 1:return this.data=t.v,t.n=2,this.render();case 2:return this.bindEvents(),t.n=3,this.loadTabContent(0);case 3:return t.a(2)}},t,this)})),function(){return S.apply(this,arguments)})},{key:"render",value:(w=c(l().m(function t(){return l().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,y(e,"render",this,3)([]);case 1:return this.element=this.container.querySelector(".tabs"),this.loaderState=(0,i.w)(this,{host:this.element,busyTarget:this.element,scope:"block",defaultMessage:"Loading tab..."}),this.stateBinding=(0,o.x)(this,{defaultPath:"tabs",eventName:"tabchange",getSnapshot:function(t){return t.getBindableState()},applySnapshot:function(t,e){return t.applyBindableState(e)}}),this.renderDataTabs(),this.refreshTabs(),t.n=2,this.switchToTab(0,!1);case 2:return t.a(2)}},t,this)})),function(){return w.apply(this,arguments)})},{key:"renderDataTabs",value:function(){var t,e,n=null===(t=this.element)||void 0===t?void 0:t.querySelector(".tabbar"),r=null===(e=this.element)||void 0===e?void 0:e.querySelector(".tab_content_panels");n&&r&&(n.replaceChildren(),r.replaceChildren(),this.data.forEach(function(t,e){var i=document.createElement("li");i.className="link";var o=document.createElement("a");o.href="#",o.dataset.tab=String(e),o.textContent=(null==t?void 0:t.label)||"Tab ".concat(e+1);var a=document.createElement("span");a.className="tab-controls";var l=document.createElement("button");l.className="tab-refresh",l.title="Refresh",l.type="button",l.textContent="R";var s=document.createElement("button");s.className="close-tab",s.title="Close",s.type="button",s.textContent="X",a.append(l,s),o.appendChild(a),i.appendChild(o),n.appendChild(i);var u=document.createElement("div");u.className="tab_content_panel",u.id="tab-".concat(e);var c=document.createElement("div");c.className="tab_content",u.appendChild(c),r.appendChild(u)}))}},{key:"refreshTabs",value:function(){var t,e,n=(null===(t=this.element)||void 0===t?void 0:t.querySelectorAll("[data-tab]"))||[],r=(null===(e=this.element)||void 0===e?void 0:e.querySelectorAll(".tab_content_panel, .tab-content-panel"))||[];this.tabs=Array.from(n).map(function(t,e){return{link:t,panel:r[e]}}).filter(function(t){return t.panel})}},{key:"loadTabContent",value:(g=c(l().m(function t(e){var n,r,i,o,a,s=arguments;return l().w(function(t){for(;;)switch(t.p=t.n){case 0:if(n=s.length>1&&void 0!==s[1]&&s[1],this.refreshTabs(),r=this.tabs[e]){t.n=1;break}return t.a(2);case 1:if(i=r.panel,o="tab-".concat(e),!this.cacheContent||!this.panelCache.has(o)||n){t.n=2;break}return this.setPanelContent(i,this.panelCache.get(o)),this.updateLoaderState(e,!1),t.a(2);case 2:return this.updateLoaderState(e,!0),t.p=3,t.n=4,this.fetchTabContent(e);case 4:a=t.v,this.cacheContent&&this.panelCache.set(o,a),this.setPanelContent(i,a),this.updateLoaderState(e,!1),t.n=6;break;case 5:t.p=5,t.v,this.setPanelError(i,"Load failed"),this.updateLoaderState(e,!1);case 6:return t.a(2)}},t,this,[[3,5]])})),function(t){return g.apply(this,arguments)})},{key:"getPanelContentElement",value:function(t){return t.querySelector(".tab_content")||t.querySelector(".tab-content")}},{key:"setPanelContent",value:function(t,e){var n=this.getPanelContentElement(t);n&&(e instanceof Node?n.replaceChildren(e):n.textContent=null==e?"":String(e))}},{key:"setPanelError",value:function(t,e){var n=this.getPanelContentElement(t);if(n){var r=document.createElement("div");r.className="error",r.textContent=e,n.replaceChildren(r)}}},{key:"getContentProviders",value:function(){return this.container.contentProviders||window.contentProviders||{}}},{key:"resolveDataSource",value:(b=c(l().m(function t(){var e,n;return l().w(function(t){for(;;)switch(t.n){case 0:if(n=this.container.dataset.source){t.n=1;break}return t.a(2,[]);case 1:return t.n=2,this.ensureProviderInstance();case 2:return t.a(2,(null===(e=this.contentProviderInstance)||void 0===e?void 0:e.resolve(n))||[])}},t,this)})),function(){return b.apply(this,arguments)})},{key:"ensureProviderInstance",value:(m=c(l().m(function t(){var e,n,r,i,o;return l().w(function(t){for(;;)switch(t.n){case 0:if(!this.contentProviderInstance){t.n=1;break}return t.a(2,this.contentProviderInstance);case 1:if(e=this.getContentProviders(),n=e[this.providerName]){t.n=2;break}return console.warn('No ContentProvider "'.concat(this.providerName,'" found')),t.a(2,null);case 2:if(r=window.appState||window.pageContext||{},"function"!=typeof n){t.n=4;break}return this.contentProviderInstance=new n(r),t.n=3,null===(i=(o=this.contentProviderInstance).init)||void 0===i?void 0:i.call(o);case 3:t.n=5;break;case 4:"object"===a(n)?this.contentProviderInstance=n:this.contentProviderInstance=null;case 5:return t.a(2,this.contentProviderInstance)}},t,this)})),function(){return m.apply(this,arguments)})},{key:"updateLoaderState",value:function(t,e){var n,r="tab-".concat(t);if(this.loadingStates.set(r,e),t===this.activeIndex||this.activeIndex<0){var i,o,a,l=(null===(i=this.data)||void 0===i||null===(i=i[t])||void 0===i?void 0:i.label)||"Tab ".concat(t+1);null===(o=this.loaderState)||void 0===o||null===(a=o.setLoading)||void 0===a||a.call(o,e,"Loading ".concat(l,"..."))}(null===(n=this.element)||void 0===n?void 0:n.querySelector('[data-loader="tab-'.concat(t,'"]')))&&this.dispatchEvent("staterefresh",{path:"loadingStates['tab-".concat(t,"']"),value:e})}},{key:"fetchTabContent",value:(p=c(l().m(function t(e){var n,r,i,o,a,s;return l().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.ensureProviderInstance();case 1:if(i=this.data[e],null==(o=this.tabs[e])||null===(n=o.link)||void 0===n||!n.dataset.src){t.n=4;break}return t.n=2,fetch(o.link.dataset.src);case 2:return a=t.v,t.n=3,a.text();case 3:return t.a(2,t.v);case 4:return t.n=5,null===(r=this.contentProviderInstance)||void 0===r?void 0:r.getContent(i,e);case 5:if(s=t.v){t.n=6;break}s="";case 6:return t.a(2,s)}},t,this)})),function(t){return p.apply(this,arguments)})},{key:"bindEvents",value:function(){var t=this;this.on("click",function(){var e=c(l().m(function e(n){var r,i,o,a,s,u;return l().w(function(e){for(;;)switch(e.n){case 0:if(!(r=n.target.closest("[data-tab]"))){e.n=1;break}return n.preventDefault(),i=parseInt(r.dataset.tab,10),e.n=1,t.switchToTab(i);case 1:if(!n.target.closest(".tab-refresh")){e.n=2;break}if(!((a=parseInt((null===(o=n.target.closest("[data-tab]"))||void 0===o?void 0:o.dataset.tab)||"-1",10))>=0)){e.n=2;break}return e.n=2,t.refreshTab(a);case 2:n.target.closest(".close-tab")&&(u=parseInt((null===(s=n.target.closest("[data-tab]"))||void 0===s?void 0:s.dataset.tab)||"-1",10))>=0&&t.removeTab(u);case 3:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()),this.on("keydown",function(e){var n;e.target.closest(".tabbar")&&(null===(n=t.handleKeyboardNavigation)||void 0===n||n.call(t,e))})}},{key:"switchToTab",value:(f=c(l().m(function t(e){var n,r=arguments;return l().w(function(t){for(;;)switch(t.n){case 0:if(n=!(r.length>1&&void 0!==r[1])||r[1],this.refreshTabs(),!(e<0||e>=this.tabs.length||e===this.activeIndex)){t.n=1;break}return t.a(2);case 1:if(this.updateTabVisuals(e),this.activeIndex=e,!n){t.n=2;break}return t.n=2,this.loadTabContent(e);case 2:this.dispatchEvent("tabchange",{index:e,data:this.data[e],fromCache:this.panelCache.has("tab-".concat(e))});case 3:return t.a(2)}},t,this)})),function(t){return f.apply(this,arguments)})},{key:"updateTabVisuals",value:function(t){this.tabs.forEach(function(e,n){var r,i,o,a=n===t,l=null===(r=e.link)||void 0===r?void 0:r.parentElement;l&&(l.classList.toggle("active",a),null===(i=e.link)||void 0===i||i.setAttribute("aria-selected",String(a)),null===(o=e.link)||void 0===o||o.setAttribute("tabindex",a?"0":"-1")),e.panel.hidden=!a,e.panel.setAttribute("aria-hidden",String(!a))})}},{key:"refreshTab",value:(u=c(l().m(function t(e){return l().w(function(t){for(;;)switch(t.n){case 0:return this.panelCache.delete("tab-".concat(e)),t.n=1,this.loadTabContent(e,!0);case 1:return t.a(2)}},t,this)})),function(t){return u.apply(this,arguments)})},{key:"bindDataContext",value:function(t,n,r){var i;null===(i=y(e,"bindDataContext",this,3))||void 0===i||i([t,n,r]);var o=t.querySelector("a[data-tab]");o&&(o.dataset.tab=String(r))}},{key:"addTab",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.tabs.length,r={label:t,contentUrl:e};this.data.splice(n,0,r),this.refresh(),this.switchToTab(n)}},{key:"removeTab",value:function(t){this.refreshTabs(),this.tabs.length<=1||(this.panelCache.delete("tab-".concat(t)),this.loadingStates.delete("tab-".concat(t)),this.data.splice(t,1),this.refresh())}},{key:"clearCache",value:function(){this.panelCache.clear(),this.loadingStates.clear()}},{key:"getBindableState",value:function(){var t;return{activeIndex:this.activeIndex,label:(null===(t=this.data)||void 0===t||null===(t=t[this.activeIndex])||void 0===t?void 0:t.label)||""}}},{key:"applyBindableState",value:function(t){if(t&&"object"===a(t)){var e=Number(t.activeIndex);Number.isInteger(e)&&(e<0||e>=this.tabs.length||e!==this.activeIndex&&this.switchToTab(e,!0))}}},{key:"destroy",value:function(){var t,n,r,i;null===(t=this.loaderState)||void 0===t||null===(n=t.destroy)||void 0===n||n.call(t),null===(r=this.stateBinding)||void 0===r||null===(i=r.disconnect)||void 0===i||i.call(r),y(e,"destroy",this,3)([])}}],s=[{key:"selector",get:function(){return"tabs"}},{key:"library",get:function(){return"holi"}},{key:"matchesLibrary",value:function(t,n){return y(e,"matchesLibrary",this,2)([t,n])}}],r&&d(n.prototype,r),s&&d(n,s),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,s,u,f,p,m,b,g,w,S}(r.Component);"undefined"!=typeof window&&(window.TabsComponent=g)},618(t,e,n){"use strict";n.r(e),n.d(e,{TextAreaComponent:()=>S});var r=n(812),i=n(573);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function l(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return s(c,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var a={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(s(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,s(h,"constructor",d),s(d,"constructor",c),c.displayName="GeneratorFunction",s(d,i,"GeneratorFunction"),s(h),s(h,i,"Generator"),s(h,r,function(){return this}),s(h,"toString",function(){return"[object Generator]"}),(l=function(){return{w:o,m:p}})()}function s(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}s=function(t,e,n,r){function o(e,n){s(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},s(t,e,n,r)}function u(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,m(r.key),r)}}function d(t,e,n){return e=v(e),function(t,e){if(e&&("object"==o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,f()?Reflect.construct(e,n||[],v(t).constructor):e.apply(t,n))}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!t})()}function h(t,e,n,r){var i=p(v(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=v(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},p.apply(null,arguments)}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}function m(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var b,g,w,S=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=d(this,e,[t,r])).templateId=e.templateId,n.config={name:n.readAttr("name"),label:n.readAttr("label"),placeholder:n.readAttr("placeholder"),rows:Number(n.readAttr("rows","4"))||4,required:n.readBoolAttr("required",!1),disabled:n.readBoolAttr("disabled",!1),validators:n.parseValidators(n.readAttr("data-validator")||n.readAttr("data-validators"))},n.state={name:n.config.name,label:n.config.label,placeholder:n.config.placeholder,rows:n.config.rows,required:n.config.required,disabled:n.config.disabled,value:n.readAttr("value",""),invalid:!1,errorMessage:""},n.boundInput=function(t){return n.handleInput(t)},n.boundBlur=function(){return n.handleBlur()},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&y(t,e)}(e,t),n=e,r=[{key:"readAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.container.getAttribute(t);return null==n?e:String(n)}},{key:"readBoolAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.container.hasAttribute(t))return e;var n=String(this.container.getAttribute(t)||"").trim().toLowerCase();return!n||"false"!==n&&"0"!==n&&"no"!==n}},{key:"parseValidators",value:function(t){return i.D.parseList(t)}},{key:"init",value:function(){this.validateStructure(),this.render()}},{key:"render",value:(s=l().m(function t(){return l().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,h(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-textarea"),this.inputEl=this.container.querySelector('[data-role="control"]'),this.labelEl=this.container.querySelector('[data-role="label"]'),this.errorEl=this.container.querySelector('[data-role="error"]'),this.projectSlot("label"),this.projectSlot("helper"),this.projectSlot("error"),this.applyFieldAttributes(),this.bindEvents(),this.validate(),this.updateView();case 2:return t.a(2)}},t,this)}),f=function(){var t=this,e=arguments;return new Promise(function(n,r){var i=s.apply(t,e);function o(t){u(i,n,r,o,a,"next",t)}function a(t){u(i,n,r,o,a,"throw",t)}o(void 0)})},function(){return f.apply(this,arguments)})},{key:"projectSlot",value:function(t){var e=this.container.querySelector('slot[name="'.concat(t,'"]'));if(e){var n=Array.from(this.container.querySelectorAll('[slot="'.concat(t,'"]')));if(n.length){var r=document.createDocumentFragment();n.forEach(function(t){t.removeAttribute("slot"),r.appendChild(t)}),e.replaceWith(r)}}}},{key:"applyFieldAttributes",value:function(){if(this.inputEl){this.inputEl.value=this.state.value,this.inputEl.name=this.config.name||"",this.inputEl.placeholder=this.config.placeholder||"",this.inputEl.rows=this.config.rows,this.inputEl.required=!!this.config.required,this.inputEl.disabled=!!this.config.disabled;var t=this.inputEl.id||"holi-textarea-".concat(Math.random().toString(16).slice(2));this.inputEl.id=t,this.labelEl&&!this.labelEl.getAttribute("for")&&this.labelEl.setAttribute("for",t)}}},{key:"bindEvents",value:function(){this.inputEl&&(this.inputEl.addEventListener("input",this.boundInput),this.inputEl.addEventListener("blur",this.boundBlur))}},{key:"handleInput",value:function(t){var e;this.state.value=String((null==t||null===(e=t.target)||void 0===e?void 0:e.value)||""),this.validate(),this.updateView(),this.dispatchEvent("textareachange",{value:this.state.value,invalid:this.state.invalid})}},{key:"handleBlur",value:function(){this.validate(),this.updateView()}},{key:"validate",value:function(){var t=function(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(this.config.validators);this.config.required&&!t.includes("required")&&t.unshift("required");for(var e=0;e<t.length;e+=1){var n=t[e],r=this.runValidator(n,this.state.value);if(!r.valid)return this.state.invalid=!0,this.state.errorMessage=r.message,!1}return this.state.invalid=!1,this.state.errorMessage="",!0}},{key:"runValidator",value:function(t,e){return i.D.validateToken(t,e,{element:this.inputEl,component:this})}},{key:"updateView",value:function(){this.element&&this.inputEl&&(this.element.classList.toggle("is-invalid",this.state.invalid),this.inputEl.setAttribute("aria-invalid",this.state.invalid?"true":"false"),this.errorEl&&(this.errorEl.hidden=!this.state.invalid,this.errorEl.textContent=this.state.invalid?this.state.errorMessage:""))}},{key:"value",get:function(){var t;return(null===(t=this.inputEl)||void 0===t?void 0:t.value)||""},set:function(t){var e=null==t?"":String(t);this.state.value=e,this.inputEl&&(this.inputEl.value=e),this.validate(),this.updateView()}},{key:"destroy",value:function(){this.inputEl&&(this.inputEl.removeEventListener("input",this.boundInput),this.inputEl.removeEventListener("blur",this.boundBlur)),h(e,"destroy",this,3)([])}}],o=[{key:"selector",get:function(){return"holi-textarea"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"textarea-field"}}],r&&c(n.prototype,r),o&&c(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,s,f}(r.Component);b=S,w="textarea-field-template",(g=m(g="templateId"))in b?Object.defineProperty(b,g,{value:w,enumerable:!0,configurable:!0,writable:!0}):b[g]=w,"undefined"!=typeof window&&(window.TextAreaComponent=S)},736(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach(function(e){m(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function a(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var a=r&&r.prototype instanceof u?r:u,c=Object.create(a.prototype);return l(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(l(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,l(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,l(h,"constructor",d),l(d,"constructor",c),c.displayName="GeneratorFunction",l(d,i,"GeneratorFunction"),l(h),l(h,i,"Generator"),l(h,r,function(){return this}),l(h,"toString",function(){return"[object Generator]"}),(a=function(){return{w:o,m:p}})()}function l(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}l=function(t,e,n,r){function o(e,n){l(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},l(t,e,n,r)}function s(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function u(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){s(o,r,i,a,l,"next",t)}function l(t){s(o,r,i,a,l,"throw",t)}a(void 0)})}}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,b(r.key),r)}}function d(t,e,n){return e=v(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,f()?Reflect.construct(e,n||[],v(t).constructor):e.apply(t,n))}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!t})()}function h(t,e,n,r){var i=p(v(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=v(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},p.apply(null,arguments)}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}function m(t,e,n){return(e=b(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function b(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{ThemeSwitcherComponent:()=>g});var g=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=d(this,e,[t,r])).templateId=e.templateId,n.themeCssBase=n.readAttr("theme-css-base","/themes/"),n.themeCssExt=n.readAttr("theme-css-ext",".css"),n.loadCssOnInit=n.readBooleanAttr("load-css-on-init",!1),n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&y(t,e)}(e,t),n=e,r=[{key:"validateStructure",value:function(){if(h(e,"validateStructure",this,3)([]),!this.container)throw new Error("ThemeSwitcher requires a container")}},{key:"init",value:(s=u(a().m(function t(){return a().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return s.apply(this,arguments)})},{key:"getBindingContext",value:function(){var t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return h(e,"getBindingContext",this,3)([o({label:(null===(t=this.container)||void 0===t?void 0:t.getAttribute("label"))||(null===(n=this.container)||void 0===n?void 0:n.getAttribute("data-label"))||"Theme"},r)])}},{key:"render",value:(l=u(a().m(function t(){var n,r;return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,h(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-themeswitcher"),this.select=this.container.querySelector('[data-role="theme-select"]'),this.labelEl=this.container.querySelector('[data-role="theme-label"]'),r=this.resolveControlId(),this.select&&(this.select.id=r),this.labelEl&&this.labelEl.setAttribute("for",r),this.renderOptions(),this.applyCurrentTheme(),this.boundChange||(this.boundChange=this.handleChange.bind(this)),null===(n=this.select)||void 0===n||n.addEventListener("change",this.boundChange);case 2:return t.a(2)}},t,this)})),function(){return l.apply(this,arguments)})},{key:"readAttr",value:function(t){var e,n,r,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=null===(e=this.container)||void 0===e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,t);if(null!=a)return String(a);var l=null===(r=this.container)||void 0===r||null===(i=r.getAttribute)||void 0===i?void 0:i.call(r,"data-".concat(t));return null!=l?String(l):o}},{key:"readBooleanAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.container)return e;if(!this.container.hasAttribute(t)&&!this.container.hasAttribute("data-".concat(t)))return e;var n=this.readAttr(t,"");if(!n)return!0;var r=n.trim().toLowerCase();return!!["true","1","yes","on"].includes(r)||!["false","0","no","off"].includes(r)&&e}},{key:"resolveControlId",value:function(){var t,e,n,r=String((null===(t=this.select)||void 0===t?void 0:t.id)||"").trim();if(r)return r;var i=String((null===(e=this.container)||void 0===e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"data-component-id"))||"").trim();return i?"".concat(i,"-theme-select"):"holi-theme-switcher-".concat(Math.random().toString(16).slice(2))}},{key:"getThemeOptions",value:function(){var t,e;return String((null===(t=this.container)||void 0===t?void 0:t.getAttribute("themes"))||(null===(e=this.container)||void 0===e?void 0:e.getAttribute("data-themes"))||"presto,aurora,atlas").split(/[\r\n,]+/).map(function(t){return String(t||"").trim()}).filter(Boolean).map(function(t){var e=t.split(":"),n=String(e[0]||"").trim();return{value:n,label:String(e[1]||e[0]||"").trim()||n}}).filter(function(t){return t.value})}},{key:"renderOptions",value:function(){var t=this;if(this.select instanceof HTMLSelectElement){var e=this.getThemeOptions();this.select.replaceChildren(),e.forEach(function(e){var n=document.createElement("option");n.value=e.value,n.textContent=e.label,t.select.appendChild(n)})}}},{key:"getCurrentTheme",value:function(){var t,e,n,r=String((null===(t=this.container)||void 0===t?void 0:t.getAttribute("value"))||"").trim();return r||(String((null===(e=document.body)||void 0===e?void 0:e.getAttribute("theme"))||"").trim()||(null===(n=this.getThemeOptions()[0])||void 0===n?void 0:n.value)||"")}},{key:"applyCurrentTheme",value:function(){var t=this.getCurrentTheme();t&&(this.select&&(this.select.value=t),this.applyTheme(t,{dispatch:!1,loadCSS:this.loadCssOnInit}))}},{key:"handleChange",value:function(t){var e,n=String((null==t||null===(e=t.target)||void 0===e?void 0:e.value)||"").trim();n&&this.applyTheme(n,{dispatch:!0})}},{key:"applyTheme",value:function(t){var e,n,r,i,o,a,l,s,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=String(t||"").trim();if(c&&(null===(e=document.body)||void 0===e||null===(n=e.setAttribute)||void 0===n||n.call(e,"theme",c),null===(r=document.documentElement)||void 0===r||null===(i=r.setAttribute)||void 0===i||i.call(r,"theme-palette",c),null===(o=this.container)||void 0===o||null===(a=o.setAttribute)||void 0===a||a.call(o,"value",c),!1!==u.loadCSS&&this.loadThemeCSS(c).catch(function(t){console.warn(t)}),!1!==u.dispatch)){var d={theme:c,palette:c,component:this};null===(l=this.container)||void 0===l||null===(s=l.dispatchEvent)||void 0===s||s.call(l,new CustomEvent("themechange",{detail:d})),document.dispatchEvent(new CustomEvent("themechange",{detail:d})),document.dispatchEvent(new CustomEvent("theme-palette-change",{detail:d}))}}},{key:"destroy",value:function(){var t;null===(t=this.select)||void 0===t||t.removeEventListener("change",this.boundChange),h(e,"destroy",this,3)([])}},{key:"resolveThemeHref",value:function(t){var e=String(this.themeCssBase||"/themes/").trim(),n=e.endsWith("/")?e:"".concat(e,"/"),r=String(this.themeCssExt||".css").trim()||".css";return"".concat(n).concat(t).concat(r)}},{key:"loadThemeCSS",value:function(t){if("undefined"==typeof document)return Promise.resolve(null);var n=String(t||"").trim();if(!n)return Promise.resolve(null);var r=this.resolveThemeHref(n),i=document.querySelector("link[".concat(e.themeLinkAttr,'="true"]'));if(i&&i.getAttribute("href")===r)return i.setAttribute("data-theme",n),Promise.resolve(i);if(!r)return Promise.resolve(null);var o=document.createElement("link");return o.rel="stylesheet",o.href=r,o.setAttribute(e.themeLinkAttr,"true"),o.setAttribute("data-theme",n),new Promise(function(t,e){o.addEventListener("load",function(){i&&i.remove(),t(o)},{once:!0}),o.addEventListener("error",function(){o.remove(),e(new Error("Failed to load theme CSS: ".concat(r)))},{once:!0}),document.head.appendChild(o)})}}],i=[{key:"selector",get:function(){return"themeswitcher"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"themeswitcher"}}],r&&c(n.prototype,r),i&&c(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i,l,s}(n(812).Component);m(g,"themeLinkAttr","data-holi-theme-link"),m(g,"templateId","themeswitcher-template"),"undefined"!=typeof window&&(window.ThemeSwitcherComponent=g)},9(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function o(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function l(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return a(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(a(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,a(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,a(h,"constructor",d),a(d,"constructor",c),c.displayName="GeneratorFunction",a(d,i,"GeneratorFunction"),a(h),a(h,i,"Generator"),a(h,r,function(){return this}),a(h,"toString",function(){return"[object Generator]"}),(o=function(){return{w:l,m:p}})()}function a(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}a=function(t,e,n,r){function o(e,n){a(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},a(t,e,n,r)}function l(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function s(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){l(o,r,i,a,s,"next",t)}function s(t){l(o,r,i,a,s,"throw",t)}a(void 0)})}}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,m(r.key),r)}}function c(t,e,n){return e=p(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,d()?Reflect.construct(e,n||[],p(t).constructor):e.apply(t,n))}function d(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(d=function(){return!!t})()}function f(t,e,n,r){var i=h(p(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function h(){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},h.apply(null,arguments)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}function y(t,e,n){return(e=m(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function m(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{ToastComponent:()=>b});var b=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=c(this,e,[t,r])).templateId=e.templateId,n.toastId=n.container.getAttribute("id")||n.container.getAttribute("toast-id")||"",n.scope=n.resolveScope(n.container.getAttribute("scope")||n.container.getAttribute("data-scope")||"page"),n.blockParentSelector=n.resolveBlockParentSelector(n.container.getAttribute("block-parent")||n.container.getAttribute("data-block-parent")||""),n.position=n.resolvePosition(n.container.getAttribute("position")||n.container.getAttribute("data-position")||"top-right"),n.defaultDuration=n.parseNumber(n.container.getAttribute("duration")||n.container.getAttribute("data-duration"),4e3),n.maxItems=n.parseNumber(n.container.getAttribute("max-items")||n.container.getAttribute("data-max-items"),5),n.newestOnTop=!n.container.hasAttribute("newest-bottom"),n.blockParentEl=null,n.appliedRelativeParent=!1,n.items=[],n.counter=0,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&v(t,e)}(e,t),n=e,r=[{key:"parseNumber",value:function(t,e){var n=Number(t);return Number.isFinite(n)?n:e}},{key:"resolvePosition",value:function(t){var e=String(t||"top-right").toLowerCase();return new Set(["top-left","top-right","bottom-left","bottom-right","top-center","bottom-center"]).has(e)?e:"top-right"}},{key:"resolveScope",value:function(t){var e=String(t||"page").toLowerCase();return"inline"===e||"block"===e?e:"page"}},{key:"resolveBlockParentSelector",value:function(t){return String(t||"").trim()}},{key:"resolveBlockParent",value:function(){return"undefined"==typeof document?null:this.blockParentSelector?document.querySelector(this.blockParentSelector):this.container.parentElement||this.container}},{key:"ensureBlockParentPositionContext",value:function(){"block"===this.scope&&this.blockParentEl&&"undefined"!=typeof window&&"static"===window.getComputedStyle(this.blockParentEl).position&&(this.blockParentEl.style.position="relative",this.appliedRelativeParent=!0)}},{key:"init",value:(d=s(o().m(function t(){return o().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents();case 2:return t.a(2)}},t,this)})),function(){return d.apply(this,arguments)})},{key:"render",value:(l=s(o().m(function t(){return o().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,f(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-toast-root"),this.stackEl=this.container.querySelector('[data-role="stack"]'),this.element&&(this.element.setAttribute("data-position",this.position),this.element.setAttribute("data-scope",this.scope)),"block"===this.scope&&this.element&&(this.blockParentEl=this.resolveBlockParent(),this.blockParentEl&&this.element.parentElement!==this.blockParentEl&&(this.blockParentEl.appendChild(this.element),this.ensureBlockParentPositionContext())),this.container.hidden="block"===this.scope;case 2:return t.a(2)}},t,this)})),function(){return l.apply(this,arguments)})},{key:"bindEvents",value:function(){var t,e=this;null===(t=this.element)||void 0===t||t.addEventListener("click",function(t){var n,r,i=null===(n=t.target)||void 0===n||null===(r=n.closest)||void 0===r?void 0:r.call(n,'[data-action="dismiss"]');if(i){var o=i.closest("[data-toast-item]");o&&e.hide(o.getAttribute("data-toast-item"),"dismiss")}}),this.toastId&&"undefined"!=typeof document&&document.addEventListener("click",function(t){var n,r,i=null===(n=t.target)||void 0===n||null===(r=n.closest)||void 0===r?void 0:r.call(n,'[data-toast-target="'.concat(e.toastId,'"]'));i&&e.show({type:i.getAttribute("data-toast-type")||"info",title:i.getAttribute("data-toast-title")||"",message:i.getAttribute("data-toast-message")||"",duration:e.parseNumber(i.getAttribute("data-toast-duration"),e.defaultDuration)})})}},{key:"normalizePayload",value:function(t){if("string"==typeof t)return{message:t,type:"info",duration:this.defaultDuration};var e=t||{};return{type:String(e.type||"info").toLowerCase(),title:String(e.title||""),message:String(e.message||""),duration:this.parseNumber(e.duration,this.defaultDuration)}}},{key:"show",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.stackEl)return null;var n=this.normalizePayload(e);if(!n.message&&!n.title)return null;var r="toast-".concat(Date.now(),"-").concat(this.counter+=1),o=this.createToastNode(r,n);if(this.newestOnTop?this.stackEl.prepend(o):this.stackEl.appendChild(o),this.items.push({id:r,node:o,timer:null,duration:n.duration}),this.enforceMaxItems(),requestAnimationFrame(function(){o.setAttribute("data-state","shown")}),n.duration>0){var a=this.items.find(function(t){return t.id===r});a&&(a.timer=setTimeout(function(){return t.hide(r,"timeout")},n.duration))}return this.dispatchEvent("toastshown",function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach(function(e){y(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({id:r},n)),r}},{key:"createToastNode",value:function(t,e){var n=document.createElement("article");n.className="holi-toast-item toast-".concat(e.type),n.setAttribute("data-toast-item",t),n.setAttribute("data-state","enter"),n.setAttribute("role","error"===e.type?"alert":"status"),n.setAttribute("aria-live","error"===e.type?"assertive":"polite"),n.setAttribute("aria-atomic","true");var r=document.createElement("div");if(r.className="holi-toast-body",e.title){var i=document.createElement("strong");i.className="holi-toast-title",i.textContent=e.title,r.appendChild(i)}if(e.message){var o=document.createElement("div");o.className="holi-toast-message",o.textContent=e.message,r.appendChild(o)}var a=document.createElement("button");return a.type="button",a.className="holi-toast-close",a.setAttribute("data-action","dismiss"),a.setAttribute("aria-label","Dismiss"),a.textContent="x",n.append(r,a),n}},{key:"hide",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"manual",r=this.items.findIndex(function(e){return e.id===t});if(!(r<0)){var i=this.items[r];clearTimeout(i.timer),i.node.setAttribute("data-state","hide"),setTimeout(function(){i.node.remove(),e.items.splice(r,1),e.dispatchEvent("toasthidden",{id:t,reason:n})},180)}}},{key:"clear",value:function(){var t=this;this.items.map(function(t){return t.id}).forEach(function(e){return t.hide(e,"clear")})}},{key:"enforceMaxItems",value:function(){if(!(this.maxItems<=0))for(;this.items.length>this.maxItems;){var t=this.newestOnTop?this.items[0]:this.items[this.items.length-1];if(!t)break;this.hide(t.id,"overflow")}}},{key:"destroy",value:function(){this.appliedRelativeParent&&this.blockParentEl&&(this.blockParentEl.style.position=""),f(e,"destroy",this,3)([])}}],a=[{key:"selector",get:function(){return"toast"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"toast"}}],r&&u(n.prototype,r),a&&u(n,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,a,l,d}(n(812).Component);y(b,"templateId","toast-template"),"undefined"!=typeof window&&(window.ToastComponent=b)},648(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function l(n,r,i,a){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return o(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,o(h,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(h),o(h,a,"Generator"),o(h,r,function(){return this}),o(h,"toString",function(){return"[object Generator]"}),(i=function(){return{w:l,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function l(t){a(o,r,i,l,s,"next",t)}function s(t){a(o,r,i,l,s,"throw",t)}l(void 0)})}}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,v(r.key),r)}}function u(t,e,n){return e=h(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,n||[],h(t).constructor):e.apply(t,n))}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function d(t,e,n,r){var i=f(h(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},f.apply(null,arguments)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function v(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{TreeComponent:()=>g});var y,m,b,g=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=u(this,e,[t,r])).templateId=e.templateId,n.singleExpand=n.container.hasAttribute("single-expand"),n.loaderName=n.container.getAttribute("children-loader")||"",n.childrenLoader=n.resolveChildrenLoader(n.loaderName),n.onSelect="function"==typeof r.onSelect?r.onSelect:null,n.globalNoCache=n.container.hasAttribute("no-cache"),n.globalCacheTtl=n.parseNumber(n.container.getAttribute("cache-ttl"),3e5),n.childrenCache=new Map,n.loadingRequests=new Map,n.draggableNodes=n.container.hasAttribute("draggable-nodes"),n.reorderHandlerName=n.container.getAttribute("reorder-handler")||"",n.reorderHandler=n.resolveReorderHandler(n.reorderHandlerName),n.dragState={sourceItem:null,dropTarget:null},n.element=null,n.treeHost=null,n.treeRoot=null,n.activeTrigger=null,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&p(t,e)}(e,t),n=e,o=[{key:"resolveChildrenLoader",value:function(t){if(!t||"undefined"==typeof window)return null;var e=window[t];return"function"==typeof e?e:null}},{key:"resolveReorderHandler",value:function(t){if(!t||"undefined"==typeof window)return null;var e=window[t];return"function"==typeof e?e:null}},{key:"parseNumber",value:function(t,e){var n=Number(t);return Number.isFinite(n)?n:e}},{key:"validateStructure",value:function(){if(d(e,"validateStructure",this,3)([]),!this.container.querySelector('[slot="tree"]')&&!this.container.querySelector("ul, ol"))throw new Error('Tree requires a nested list in slot="tree".')}},{key:"init",value:(m=l(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents(),this.syncFocusTargets();case 2:return t.a(2)}},t,this)})),function(){return m.apply(this,arguments)})},{key:"render",value:(y=l(i().m(function t(){var n,r;return i().w(function(t){for(;;)switch(t.n){case 0:return r=this.container.querySelector('[slot="tree"]')||this.container.querySelector("ul, ol"),t.n=1,d(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".holi-tree"),this.treeHost=this.container.querySelector('[data-role="tree-host"]'),r&&this.treeHost&&this.treeHost.replaceChildren(r),this.treeRoot=null===(n=this.treeHost)||void 0===n?void 0:n.querySelector("ul, ol"),this.treeRoot){t.n=2;break}return t.a(2);case 2:this.treeRoot.classList.add("holi-tree-level","holi-tree-root"),this.treeRoot.setAttribute("role","tree"),this.decorateLevel(this.treeRoot,1);case 3:return t.a(2)}},t,this)})),function(){return y.apply(this,arguments)})},{key:"decorateLevel",value:function(t,e){var n=this;t.setAttribute("data-depth",String(e)),Array.from(t.children).filter(function(t){return"LI"===t.tagName}).forEach(function(t){t.classList.add("holi-tree-item"),t.setAttribute("role","treeitem"),t.setAttribute("aria-level",String(e));var r=n.ensureTrigger(t),i=n.getDirectSubmenu(t),o="true"===t.getAttribute("data-lazy")||t.hasAttribute("data-lazy"),a=!!i||o;n.ensureNodeKey(t),n.draggableNodes&&(t.setAttribute("draggable","true"),t.classList.add("is-draggable")),r&&r.classList.add("holi-tree-trigger"),a?(t.classList.add("has-children"),n.ensureExpander(t,r),t.setAttribute("aria-expanded","false"),i&&(i.classList.add("holi-tree-level","holi-tree-children"),i.setAttribute("role","group"),i.hidden=!0,n.decorateLevel(i,e+1))):t.setAttribute("aria-expanded","false")})}},{key:"ensureTrigger",value:function(t){for(var e=Array.from(t.children),n=0;n<e.length;n+=1){var r=e[n];if("BUTTON"===r.tagName||"A"===r.tagName||r.hasAttribute("data-tree-trigger"))return r}var i=this.extractItemLabel(t),o=document.createElement("button");return o.type="button",o.textContent=i||"Node",o.setAttribute("data-tree-trigger","true"),t.insertBefore(o,t.firstChild),o}},{key:"getTrigger",value:function(t){if(!t)return null;for(var e=Array.from(t.children),n=0;n<e.length;n+=1){var r,i=e[n];if(null!==(r=i.classList)&&void 0!==r&&r.contains("holi-tree-trigger"))return i;if("BUTTON"===i.tagName||"A"===i.tagName||i.hasAttribute("data-tree-trigger"))return i}return null}},{key:"ensureExpander",value:function(t,e){var n=Array.from(t.children).find(function(t){var e;return null===(e=t.classList)||void 0===e?void 0:e.contains("holi-tree-expander")});if(n)return n;var r=document.createElement("button");return r.type="button",r.className="holi-tree-expander",r.setAttribute("data-tree-expander","true"),r.setAttribute("aria-label","Toggle children"),r.textContent="+",t.insertBefore(r,e||t.firstChild),r}},{key:"extractItemLabel",value:function(t){for(var e=Array.from(t.childNodes),n=0;n<e.length;n+=1){var r=e[n];if(r.nodeType===Node.TEXT_NODE){var i=String(r.textContent||"").trim();if(i)return r.textContent="",i}}return t.getAttribute("data-label")||""}},{key:"getDirectSubmenu",value:function(t){for(var e=Array.from(t.children),n=0;n<e.length;n+=1){var r=e[n];if("UL"===r.tagName||"OL"===r.tagName)return r}return null}},{key:"getDirectExpander",value:function(t){for(var e=Array.from(t.children),n=0;n<e.length;n+=1){var r,i=e[n];if(null!==(r=i.classList)&&void 0!==r&&r.contains("holi-tree-expander"))return i}return null}},{key:"bindEvents",value:function(){var t=this;this.element&&(this.element.addEventListener("click",function(e){return t.onClick(e)}),this.element.addEventListener("keydown",function(e){return t.onKeydown(e)}),this.element.addEventListener("focusin",function(e){var n=e.target.closest(".holi-tree-trigger");n&&(t.activeTrigger=n),t.syncFocusTargets()}),this.draggableNodes&&(this.element.addEventListener("dragstart",function(e){return t.onDragStart(e)}),this.element.addEventListener("dragover",function(e){return t.onDragOver(e)}),this.element.addEventListener("dragleave",function(e){return t.onDragLeave(e)}),this.element.addEventListener("drop",function(e){return t.onDrop(e)}),this.element.addEventListener("dragend",function(){return t.onDragEnd()})))}},{key:"onClick",value:function(t){var e=t.target.closest("[data-tree-expander]"),n=t.target.closest(".holi-tree-trigger"),r=e||n;if(r){var i=r.closest(".holi-tree-item");if(i&&"true"!==i.getAttribute("data-loading")){if(e&&i.classList.contains("has-children"))return t.preventDefault(),void this.toggleItem(i);n&&t.preventDefault(),this.activeTrigger=n;var o={item:i,id:i.getAttribute("data-node-id")||null,label:this.getNodeLabel(i)};this.onSelect&&this.onSelect(o),this.dispatchEvent("treeselect",o),this.syncFocusTargets()}}}},{key:"onKeydown",value:function(t){var e=t.target.closest(".holi-tree-trigger");if(e){var n=e.closest(".holi-tree-item");if(n){var r,i,o=this.getVisibleTriggers(),a=o.indexOf(e);if("ArrowDown"===t.key&&a>=0)return t.preventDefault(),void(null===(r=o[Math.min(a+1,o.length-1)])||void 0===r||r.focus());if("ArrowUp"===t.key&&a>=0)return t.preventDefault(),void(null===(i=o[Math.max(a-1,0)])||void 0===i||i.focus());if("ArrowRight"!==t.key)if("ArrowLeft"!==t.key){if("Enter"===t.key||" "===t.key){if(!n.classList.contains("has-children"))return;t.preventDefault(),this.toggleItem(n)}}else{if(t.preventDefault(),this.isExpanded(n))return void this.collapseItem(n);var l=this.getParentItem(n),s=l?this.getTrigger(l):null;null==s||s.focus()}else{if(t.preventDefault(),!this.isExpanded(n)&&n.classList.contains("has-children"))return void this.expandItem(n);var u=this.getFirstChildTrigger(n);null==u||u.focus()}}}}},{key:"getVisibleTriggers",value:function(){var t=this;return Array.from(this.element.querySelectorAll(".holi-tree-trigger")).filter(function(e){var n=e.closest(".holi-tree-item");return t.isItemVisible(n)})}},{key:"isItemVisible",value:function(t){if(!t)return!1;for(var e=t;e;){var n=this.getParentItem(e);if(!n)return!0;var r=this.getDirectSubmenu(n);if(null!=r&&r.hidden)return!1;e=n}return!0}},{key:"getParentItem",value:function(t){var e=null==t?void 0:t.parentElement;return e?e.closest(".holi-tree-item"):null}},{key:"getFirstChildTrigger",value:function(t){var e=this.getDirectSubmenu(t);if(!e||e.hidden)return null;var n=Array.from(e.children).find(function(t){var e;return null===(e=t.classList)||void 0===e?void 0:e.contains("holi-tree-item")});return n?this.getTrigger(n):null}},{key:"isExpanded",value:function(t){return"true"===t.getAttribute("aria-expanded")}},{key:"toggleItem",value:(v=l(i().m(function t(e){return i().w(function(t){for(;;)switch(t.n){case 0:if(!this.isExpanded(e)){t.n=1;break}this.collapseItem(e),t.n=2;break;case 1:return t.n=2,this.expandItem(e);case 2:return t.a(2)}},t,this)})),function(t){return v.apply(this,arguments)})},{key:"expandItem",value:(h=l(i().m(function t(e){var n,r;return i().w(function(t){for(;;)switch(t.n){case 0:return this.singleExpand&&this.collapseSiblings(e),t.n=1,this.ensureChildrenLoaded(e);case 1:if(n=this.getDirectSubmenu(e)){t.n=2;break}return t.a(2);case 2:n.hidden=!1,e.setAttribute("aria-expanded","true"),(r=this.getDirectExpander(e))&&(r.textContent="-"),this.syncFocusTargets(),this.dispatchEvent("treeexpand",{item:e,id:e.getAttribute("data-node-id")||null});case 3:return t.a(2)}},t,this)})),function(t){return h.apply(this,arguments)})},{key:"collapseItem",value:function(t){var e=this.getDirectSubmenu(t);if(e){e.hidden=!0,t.setAttribute("aria-expanded","false");var n=this.getDirectExpander(t);n&&(n.textContent="+"),this.syncFocusTargets(),this.dispatchEvent("treecollapse",{item:t,id:t.getAttribute("data-node-id")||null})}}},{key:"collapseSiblings",value:function(t){var e=this,n=t.parentElement;n&&Array.from(n.children).forEach(function(n){var r;n!==t&&null!==(r=n.classList)&&void 0!==r&&r.contains("holi-tree-item")&&e.isExpanded(n)&&e.collapseItem(n)})}},{key:"ensureChildrenLoaded",value:(f=l(i().m(function t(e){var n,r,o,a,s,u,c,d=this;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(("true"===e.getAttribute("data-lazy")||e.hasAttribute("data-lazy"))&&this.childrenLoader){t.n=1;break}return t.a(2);case 1:if(n=this.ensureNodeKey(e),r=this.getCachePolicy(e),o=r.allowCache,a=r.ttl,s=Date.now(),!o){t.n=2;break}if(!((u=this.childrenCache.get(n))&&s-u.timestamp<=a)){t.n=2;break}return this.applyLoadedChildren(e,u.nodes),t.a(2);case 2:if(!this.loadingRequests.has(n)){t.n=4;break}return t.n=3,this.loadingRequests.get(n);case 3:case 7:return t.a(2);case 4:return c=l(i().m(function t(){var r,a,l;return i().w(function(t){for(;;)switch(t.n){case 0:return d.setNodeLoading(e,!0),r=e.getAttribute("data-node-id")||"",t.n=1,Promise.resolve(d.childrenLoader({id:r,item:e,tree:d}));case 1:a=t.v,l=Array.isArray(a)?a:[],d.applyLoadedChildren(e,l),o&&d.childrenCache.set(n,{timestamp:Date.now(),nodes:l});case 2:return t.a(2)}},t)}))(),this.loadingRequests.set(n,c),t.p=5,t.n=6,c;case 6:return t.p=6,this.loadingRequests.delete(n),this.setNodeLoading(e,!1),t.f(6)}},t,this,[[5,,6,7]])})),function(t){return f.apply(this,arguments)})},{key:"getCachePolicy",value:function(t){var e=t.hasAttribute("data-no-cache");if(this.globalNoCache||e)return{allowCache:!1,ttl:0};var n=this.parseNumber(t.getAttribute("data-cache-ttl"),this.globalCacheTtl);return{allowCache:!0,ttl:Math.max(0,n)}}},{key:"applyLoadedChildren",value:function(t,e){var n=this,r=Array.isArray(e)?e:[],i=this.getDirectSubmenu(t);i||(i=document.createElement("ul"),t.appendChild(i)),i.replaceChildren(),i.classList.add("holi-tree-level","holi-tree-children"),i.setAttribute("role","group"),i.hidden=!0,r.forEach(function(t){i.appendChild(n.createNodeFromData(t))});var o=Number(t.getAttribute("aria-level")||1);this.decorateLevel(i,o+1),t.setAttribute("data-loaded","true"),r.length||t.removeAttribute("data-lazy")}},{key:"setNodeLoading",value:function(t,e){var n=this.getTrigger(t),r=this.getDirectExpander(t);t.setAttribute("data-loading",e?"true":"false"),t.setAttribute("aria-busy",e?"true":"false"),n&&(n.disabled=!!e),r&&(r.disabled=!!e,r.textContent=e?"...":this.isExpanded(t)?"-":"+")}},{key:"createNodeFromData",value:function(t){var e=this,n=document.createElement("li");n.className="holi-tree-item",t&&"object"===r(t)&&(null!=t.id&&n.setAttribute("data-node-id",String(t.id)),t.lazy&&n.setAttribute("data-lazy","true"));var i=document.createElement("button");if(i.type="button",i.className="holi-tree-trigger",i.textContent=null!=(null==t?void 0:t.label)?String(t.label):"Node",n.appendChild(i),Array.isArray(null==t?void 0:t.children)&&t.children.length){var o=document.createElement("ul");t.children.forEach(function(t){return o.appendChild(e.createNodeFromData(t))}),n.appendChild(o)}return n}},{key:"syncFocusTargets",value:function(){if(this.element){var t=this.getVisibleTriggers();t.forEach(function(t){return t.setAttribute("tabindex","-1")}),t.length&&(this.activeTrigger&&t.includes(this.activeTrigger)?this.activeTrigger:t[0]).setAttribute("tabindex","0")}}},{key:"ensureNodeKey",value:function(t){var e=t.getAttribute("data-node-id")||t.getAttribute("data-node-key");if(e)return t.hasAttribute("data-node-key")||t.setAttribute("data-node-key",String(e)),String(e);var n="node-".concat(Math.random().toString(36).slice(2,10));return t.setAttribute("data-node-key",n),n}},{key:"getNodeLabel",value:function(t){var e=this.getTrigger(t);return e?String(e.textContent||"").trim():""}},{key:"onDragStart",value:function(t){var e=t.target.closest(".holi-tree-item");if(e){this.dragState.sourceItem=e,e.classList.add("dragging");var n=e.getAttribute("data-node-id")||this.ensureNodeKey(e);t.dataTransfer&&(t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",n)),this.dispatchEvent("treedragstart",{id:n,item:e})}}},{key:"onDragOver",value:function(t){var e=t.target.closest(".holi-tree-item");this.canDropOn(e)&&(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect="move"),this.markDropTarget(e))}},{key:"onDragLeave",value:function(t){var e=t.target.closest(".holi-tree-item");e&&(e.contains(t.relatedTarget)||e.classList.remove("drop-target"))}},{key:"onDrop",value:(c=l(i().m(function t(e){var n,r,o,a,l,s,u;return i().w(function(t){for(;;)switch(t.n){case 0:if(r=e.target.closest(".holi-tree-item"),this.canDropOn(r)){t.n=1;break}return t.a(2);case 1:if(e.preventDefault(),o=this.dragState.sourceItem,a=o.getAttribute("data-node-id")||this.ensureNodeKey(o),l=r.getAttribute("data-node-id")||this.ensureNodeKey(r),null===(n=r.parentElement)||void 0===n||n.insertBefore(o,r),s=Number(r.getAttribute("aria-level")||1),this.updateSubtreeLevels(o,s),this.syncFocusTargets(),u={source:o,target:r,fromId:a,toId:l,position:"before"},this.dispatchEvent("treereorder",u),!this.reorderHandler){t.n=2;break}return t.n=2,Promise.resolve(this.reorderHandler(u));case 2:this.onDragEnd();case 3:return t.a(2)}},t,this)})),function(t){return c.apply(this,arguments)})},{key:"onDragEnd",value:function(){var t;Array.from((null===(t=this.element)||void 0===t?void 0:t.querySelectorAll(".holi-tree-item"))||[]).forEach(function(t){return t.classList.remove("dragging","drop-target")}),this.dragState.sourceItem=null}},{key:"markDropTarget",value:function(t){this.dragState.dropTarget&&this.dragState.dropTarget!==t&&this.dragState.dropTarget.classList.remove("drop-target"),this.dragState.dropTarget=t,t.classList.add("drop-target")}},{key:"canDropOn",value:function(t){var e=this.dragState.sourceItem;return!(!e||!t||e===t||e.contains(t))}},{key:"updateSubtreeLevels",value:function(t,e){var n=this;t.setAttribute("aria-level",String(e));var r=this.getDirectSubmenu(t);r&&Array.from(r.children).filter(function(t){var e;return null===(e=t.classList)||void 0===e?void 0:e.contains("holi-tree-item")}).forEach(function(t){return n.updateSubtreeLevels(t,e+1)})}}],a=[{key:"selector",get:function(){return"tree"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"tree"}}],o&&s(n.prototype,o),a&&s(n,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o,a,c,f,h,v,y,m}(n(812).Component);y=g,b="tree-template",(m=v(m="templateId"))in y?Object.defineProperty(y,m,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[m]=b,"undefined"!=typeof window&&(window.TreeComponent=g)},712(t,e,n){"use strict";n.r(e),n.d(e,{TreePanelComponent:()=>O});var r=n(812),i=n(648);function o(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||l(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){u=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(t,e)||l(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){if(t){if("string"==typeof t)return s(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function d(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return f(u,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),u}var a={};function l(){}function s(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(f(e={},r,function(){return this}),e),h=u.prototype=l.prototype=Object.create(c);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,f(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return s.prototype=u,f(h,"constructor",u),f(u,"constructor",s),s.displayName="GeneratorFunction",f(u,i,"GeneratorFunction"),f(h),f(h,i,"Generator"),f(h,r,function(){return this}),f(h,"toString",function(){return"[object Generator]"}),(d=function(){return{w:o,m:p}})()}function f(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}f=function(t,e,n,r){function o(e,n){f(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},f(t,e,n,r)}function h(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function p(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){h(o,r,i,a,l,"next",t)}function l(t){h(o,r,i,a,l,"throw",t)}a(void 0)})}}function v(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,E(r.key),r)}}function y(t,e,n){return e=w(e),function(t,e){if(e&&("object"==c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,m()?Reflect.construct(e,n||[],w(t).constructor):e.apply(t,n))}function m(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(m=function(){return!!t})()}function b(t,e,n,r){var i=g(w(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function g(){return g="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=w(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},g.apply(null,arguments)}function w(t){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},w(t)}function S(t,e){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},S(t,e)}function k(t,e,n){return(e=E(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function E(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}var O=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=y(this,e,[t,r])).templateId=e.templateId,n.viewMode=n.resolveViewMode(t.getAttribute("detail-view")),n.loaderName=t.getAttribute("details-loader")||"",n.detailsLoader=n.resolveDetailsLoader(n.loaderName),n.detailsSource=String(t.getAttribute("data-details-source")||t.getAttribute("details-source")||"").trim(),n.detailsMethod=String(t.getAttribute("data-details-method")||"GET").toUpperCase(),n.inlineEditEnabled=n.readBooleanAttr(t,"data-inline-edit"),n.saveMethod=String(t.getAttribute("data-save-method")||"PUT").toUpperCase(),n.treeInstance=null,n.state={selectedId:null,selectedLabel:"",loading:!1,editing:!1,saving:!1},n.currentDetails=null,n.editDraft=null,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&S(t,e)}(e,t),n=e,r=[{key:"readBooleanAttr",value:function(t,e){if(!t||!e)return!1;if(!t.hasAttribute(e))return!1;var n=String(t.getAttribute(e)||"").trim().toLowerCase();return!n||"false"!==n&&"0"!==n&&"no"!==n}},{key:"resolveViewMode",value:function(t){var e=String(t||"datapanel").trim().toLowerCase();return"table"===e?"datatable":"panel"===e?"datapanel":"grid"===e?"datagrid":"datatable"===e||"datagrid"===e||"datapanel"===e?e:"datapanel"}},{key:"resolveDetailsLoader",value:function(t){if(!t||"undefined"==typeof window)return null;var e=window[t];return"function"==typeof e?e:null}},{key:"validateStructure",value:function(){if(b(e,"validateStructure",this,3)([]),!this.container.querySelector('[slot="tree"]')&&!this.container.querySelector("ul, ol"))throw new Error('TreePanel requires a nested tree list in slot="tree".')}},{key:"init",value:(g=p(d().m(function t(){return d().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents();case 2:return t.a(2)}},t,this)})),function(){return g.apply(this,arguments)})},{key:"render",value:(m=p(d().m(function t(){var n,r=this;return d().w(function(t){for(;;)switch(t.n){case 0:return n=this.container.querySelector('[slot="tree"]')||this.container.querySelector("ul, ol"),t.n=1,b(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-treepanel"),this.treeHost=this.container.querySelector('[data-role="tree-host"]'),this.titleEl=this.container.querySelector('[data-role="detail-title"]'),this.statusEl=this.container.querySelector('[data-role="detail-status"]'),this.panelBody=this.container.querySelector('[data-role="panel-body"]'),this.tableEl=this.container.querySelector('[data-role="detail-table"]'),this.tableHead=this.container.querySelector('[data-role="table-head"]'),this.tableBody=this.container.querySelector('[data-role="table-body"]'),this.gridEl=this.container.querySelector('[data-role="detail-grid"]'),this.headerDefault=this.container.querySelector('[data-role="header-default"]'),this.footerDefault=this.container.querySelector('[data-role="footer-default"]'),this.contentDefault=this.container.querySelector('[data-role="content-default"]'),this.editButton=this.container.querySelector('[data-role="edit-button"]'),this.saveButton=this.container.querySelector('[data-role="save-button"]'),this.cancelButton=this.container.querySelector('[data-role="cancel-button"]'),this.headerSlotContent=this.mountNamedSlot("header",this.headerDefault),this.footerSlotContent=this.mountNamedSlot("footer",this.footerDefault),this.contentSlotContent=this.mountNamedSlot("content",this.contentDefault),this.hasCustomContent=!!this.contentSlotContent,this.customContentMode=this.resolveCustomContentMode(),n&&this.treeHost&&this.treeHost.replaceChildren(n),["single-expand","children-loader","cache-ttl","no-cache"].forEach(function(t){r.container.hasAttribute(t)&&r.treeHost&&r.treeHost.setAttribute(t,r.container.getAttribute(t)||"")}),this.treeHost&&!this.treeHost.hasAttribute("children-loader")&&this.treeHost.setAttribute("children-loader","loadTreeChildren"),this.applyViewMode(),this.updateEditControls(),this.setLoading(!1,""),this.treeHost&&(this.treeInstance=new i.TreeComponent(this.treeHost,{onSelect:function(t){r.loadNodeDetails(t)}}));case 2:return t.a(2)}},t,this)})),function(){return m.apply(this,arguments)})},{key:"mountNamedSlot",value:function(t,e){var n=this.container.querySelector('slot[name="'.concat(t,'"]')),r=this.container.querySelector('[slot="'.concat(t,'"]'));return n?r?(e&&(e.hidden=!0),n.replaceWith(r),r):(n.remove(),null):null}},{key:"bindEvents",value:function(){var t=this;this.container.addEventListener("click",function(e){var n,r=null===(n=e.target)||void 0===n||null===(n=n.dataset)||void 0===n?void 0:n.action;if("reload-selected"!==r)return"edit-details"===r?(e.preventDefault(),void t.startEditing()):"cancel-edit"===r?(e.preventDefault(),void t.cancelEditing()):void("save-details"===r&&(e.preventDefault(),t.saveDetails()));e.preventDefault(),t.state.selectedId&&t.loadNodeDetails({id:t.state.selectedId,label:t.state.selectedLabel,item:null},!0)})}},{key:"applyViewMode",value:function(){var t=this;this.customContentMode||(this.container.querySelectorAll("[data-view]").forEach(function(e){e.hidden=e.getAttribute("data-view")!==t.viewMode}),this.hasCustomContent&&this.contentDefault&&(this.contentDefault.hidden=!0))}},{key:"loadNodeDetails",value:(h=p(d().m(function t(e){var n,r,i,o,a,l,s=arguments;return d().w(function(t){for(;;)switch(t.p=t.n){case 0:if(n=s.length>1&&void 0!==s[1]&&s[1],r=(null==e?void 0:e.id)||"",i=(null==e?void 0:e.label)||r||"Node",this.state.editing=!1,this.editDraft=null,this.state.selectedId=r,this.state.selectedLabel=i,this.updateEditControls(),this.setLoading(!0,i),t.p=1,o=null,!this.detailsLoader){t.n=3;break}return t.n=2,Promise.resolve(this.detailsLoader({id:r,label:i,item:(null==e?void 0:e.item)||null,forceReload:n}));case 2:o=t.v,t.n=5;break;case 3:if(!this.detailsSource){t.n=5;break}return t.n=4,this.fetchDetailsFromSource({id:r,label:i,item:(null==e?void 0:e.item)||null});case 4:o=t.v;case 5:a=this.normalizeDetailsPayload(o,r,i),this.renderDetails(a),t.n=7;break;case 6:t.p=6,l=t.v,this.renderDetails({title:i,fields:{error:String((null==l?void 0:l.message)||l||"Failed to load details")},columns:["field","value"],rows:[]});case 7:return t.p=7,this.setLoading(!1,i),t.f(7);case 8:return t.a(2)}},t,this,[[1,6,7,8]])})),function(t){return h.apply(this,arguments)})},{key:"fetchDetailsFromSource",value:(f=p(d().m(function t(e){var n,r,i,o;return d().w(function(t){for(;;)switch(t.n){case 0:if(n=this.buildDetailsSourceUrl(e)){t.n=1;break}return t.a(2,null);case 1:return t.n=2,fetch(n,{method:this.detailsMethod||"GET",credentials:"same-origin"});case 2:if((r=t.v).ok){t.n=3;break}throw new Error("Details request failed (".concat(r.status,")"));case 3:return t.n=4,r.json();case 4:if(!(i=t.v)||"object"!==c(i)){t.n=7;break}if(!i.detail||"object"!==c(i.detail)){t.n=5;break}return t.a(2,i.detail);case 5:if(!i.node||"object"!==c(i.node)){t.n=6;break}return t.a(2,i.node);case 6:if(!((o=i.nodes)&&"object"===c(o)&&null!=e&&e.id&&o[e.id])){t.n=7;break}return t.a(2,o[e.id]);case 7:return t.a(2,i)}},t,this)})),function(t){return f.apply(this,arguments)})},{key:"buildDetailsSourceUrl",value:function(t){var e=String(this.detailsSource||"").trim();if(!e)return"";var n=null==(null==t?void 0:t.id)?"":String(t.id),r=null==(null==t?void 0:t.label)?"":String(t.label),i={id:encodeURIComponent(n),label:encodeURIComponent(r)},o=e;if((o=(o=o.replace(/@\{id\}/g,i.id).replace(/\{id\}/g,i.id).replace(/:id\b/g,i.id)).replace(/@\{label\}/g,i.label).replace(/\{label\}/g,i.label).replace(/:label\b/g,i.label))===e&&n){var a=o.includes("?");/(?:\?|&)(?:node|id)=/i.test(o)||(o+="".concat(a?"&":"?","node=").concat(i.id))}return o}},{key:"normalizeDetailsPayload",value:function(t,e,n){var r=t&&"object"===c(t)?t:{},i=r.fields&&"object"===c(r.fields)?function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach(function(e){k(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},r.fields):{},o=[];Array.isArray(r.rows)?o=r.rows:Array.isArray(r.items)?o=r.items:Array.isArray(r.data)&&(o=r.data);var a=this.normalizeColumns(r.columns,o,i);return Object.keys(i).length||o.length||(i.id=e||"",i.label=n||""),{title:String(r.title||n||"Node Details"),fields:i,columns:a,rows:o}}},{key:"normalizeColumns",value:function(t,e,n){if(Array.isArray(t)&&t.length)return t.map(function(t){return"string"==typeof t?t:t&&"object"===c(t)?String(t.field||t.key||t.name||""):""}).filter(Boolean);if(Array.isArray(e)&&e.length){var r=e.find(function(t){return t&&"object"===c(t)});if(r)return Object.keys(r)}return n&&"object"===c(n)&&Object.keys(n).length?["field","value"]:[]}},{key:"renderDetails",value:function(t){if(this.state.editing&&t===this.editDraft||(this.currentDetails=t),this.titleEl&&(this.titleEl.textContent=t.title),this.updateFooter(t),this.dispatchEvent("detailsloaded",{id:this.state.selectedId,label:this.state.selectedLabel,mode:this.viewMode,details:t}),this.hasCustomContent)return this.customContentMode&&this.renderCustomContent(t,this.state.editing),void this.updateEditControls();this.renderPanelFields(t.fields,null,this.state.editing),this.renderTable(t.columns,t.rows,t.fields,null,null,this.state.editing),this.renderGrid(t.columns,t.rows,t.fields,null,this.state.editing),this.updateEditControls()}},{key:"resolveCustomContentMode",value:function(){if(!this.contentSlotContent)return"";var t=this.contentSlotContent.getAttribute("data-content-mode")||this.container.getAttribute("data-content-mode")||"",e=String(t).trim();return e?this.resolveViewMode(e):""}},{key:"renderCustomContent",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.contentSlotContent&&this.customContentMode){var n=this.contentSlotContent;if("datapanel"!==this.customContentMode)if("datatable"!==this.customContentMode){if("datagrid"===this.customContentMode){var r=n.querySelector('[data-role="detail-datagrid"]')||n;this.renderGrid(t.columns,t.rows,t.fields,r,e)}}else{var i=n.querySelector('[data-role="detail-datatable"]'),o=n.querySelector('[data-role="detail-table-head"]')||(null==i?void 0:i.querySelector("thead"))||n.querySelector("thead"),a=n.querySelector('[data-role="detail-table-body"]')||(null==i?void 0:i.querySelector("tbody"))||n.querySelector("tbody");this.renderTable(t.columns,t.rows,t.fields,o,a,e)}else{var l=n.querySelector('[data-role="detail-datapanel"]')||n;this.renderPanelFields(t.fields,l,e)}}}},{key:"updateFooter",value:function(t){if(this.footerDefault&&!this.footerDefault.hidden){var e=Array.isArray(t.rows)?t.rows.length:0,n=t.fields&&"object"===c(t.fields)?Object.keys(t.fields).length:0,r=document.createElement("p");r.className="treepanel-footer-summary",r.textContent="Fields: ".concat(n," | Rows: ").concat(e),this.footerDefault.replaceChildren(r)}}},{key:"renderPanelFields",value:function(t){var e=this,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:null)||this.panelBody;if(r){r.replaceChildren();var i=Object.entries(t||{});if(!i.length){var o=document.createElement("p");return o.className="treepanel-empty",o.textContent="No details available.",void r.appendChild(o)}i.forEach(function(t){var i=a(t,2),o=i[0],l=i[1],s=document.createElement("div");s.className="treepanel-field";var u=document.createElement("span");u.className="treepanel-field-key",u.textContent=String(o);var c=n?e.createEditor(l,function(t){return e.setDraftField(String(o),t)}):document.createElement("span");n?c.classList.add("treepanel-field-editor"):(c.className="treepanel-field-value",c.textContent=null==l?"":String(l)),s.append(u,c),r.appendChild(s)})}}},{key:"renderTable",value:function(t,e,n){var r=this,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,l=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:null)||this.tableHead,u=i||this.tableBody;if(s&&u){s.replaceChildren(),u.replaceChildren();var c=Array.isArray(t)?o(t):[],d=Array.isArray(e)?o(e):[];if(!c.length&&d.length&&(c=Object.keys(d[0]||{})),!c.length&&Object.keys(n||{}).length&&(c=["field","value"],d=Object.entries(n).map(function(t){var e=a(t,2);return{field:e[0],value:e[1]}})),c.length){var f=document.createElement("tr");c.forEach(function(t){var e=document.createElement("th");e.textContent=String(t),f.appendChild(e)}),s.appendChild(f),d.forEach(function(t,e){var n=document.createElement("tr");c.forEach(function(i,o){var a=document.createElement("td");if(l){var s=null==t?void 0:t[i];a.appendChild(r.createEditor(s,function(n){r.setDraftRowValue(t,i,e,n)}))}else a.textContent=null==(null==t?void 0:t[i])?"":String(t[i]);n.appendChild(a)}),u.appendChild(n)})}}}},{key:"renderGrid",value:function(t,e,n){var r=this,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:null)||this.gridEl;if(o){o.replaceChildren();var a=Array.isArray(e)?e:[];if(!a.length&&n&&"object"===c(n)&&Object.keys(n).length&&(a=[n]),!a.length){var l=document.createElement("p");return l.className="treepanel-empty",l.textContent="No details available.",void o.appendChild(l)}var s=Array.isArray(t)&&t.length?t:Object.keys(a[0]||{});a.forEach(function(t,e){var n=document.createElement("article");n.className="treepanel-grid-card",s.forEach(function(o,a){var l=document.createElement("div");l.className="treepanel-grid-field";var s=document.createElement("span");s.className="treepanel-grid-key",s.textContent=String(o);var u=i?r.createEditor(null==t?void 0:t[o],function(t){r.setDraftCell(e,o,a,t)}):document.createElement("span");i?u.classList.add("treepanel-grid-editor"):(u.className="treepanel-grid-value",u.textContent=null==(null==t?void 0:t[o])?"":String(t[o])),l.append(s,u),n.appendChild(l)}),o.appendChild(n)})}}},{key:"startEditing",value:function(){this.inlineEditEnabled&&this.currentDetails&&(this.state.editing=!0,this.editDraft=this.cloneDetails(this.currentDetails),this.renderDetails(this.editDraft))}},{key:"cancelEditing",value:function(){this.state.editing&&(this.state.editing=!1,this.editDraft=null,this.currentDetails&&this.renderDetails(this.currentDetails))}},{key:"saveDetails",value:(s=p(d().m(function t(){var e,n,r,i,o,a,l;return d().w(function(t){for(;;)switch(t.p=t.n){case 0:if(this.state.editing&&this.editDraft&&this.state.selectedId){t.n=1;break}return t.a(2);case 1:if(this.detailsSource){t.n=2;break}return this.setLoading(!1,this.state.selectedLabel||"node"),this.statusEl.textContent="Save skipped: data-details-source is not configured.",this.statusEl.setAttribute("data-state","ready"),t.a(2);case 2:return this.state.saving=!0,this.updateEditControls(),this.statusEl.textContent="Saving ".concat(this.state.selectedLabel||"details","..."),this.statusEl.setAttribute("data-state","loading"),e=this.cloneDetails(this.editDraft),n={id:this.state.selectedId,label:this.state.selectedLabel,detail:e},t.p=3,t.n=4,fetch(this.buildDetailsSourceUrl({id:this.state.selectedId,label:this.state.selectedLabel}),{method:this.saveMethod||"PUT",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});case 4:if((i=t.v).ok){t.n=5;break}throw new Error("Save failed (".concat(i.status,")"));case 5:return o=null,t.p=6,t.n=7,i.json();case 7:o=t.v,t.n=9;break;case 8:t.p=8,t.v;case 9:a=this.normalizeDetailsPayload((null===(r=o)||void 0===r?void 0:r.detail)||o||e,this.state.selectedId,this.state.selectedLabel),this.state.editing=!1,this.editDraft=null,this.currentDetails=a,this.renderDetails(a),this.statusEl.textContent="Saved details for ".concat(this.state.selectedLabel||"node"),this.statusEl.setAttribute("data-state","ready"),this.dispatchEvent("detailssaved",{id:this.state.selectedId,label:this.state.selectedLabel,details:a}),t.n=11;break;case 10:t.p=10,l=t.v,this.statusEl.textContent=String((null==l?void 0:l.message)||"Save failed"),this.statusEl.setAttribute("data-state","ready");case 11:return t.p=11,this.state.saving=!1,this.updateEditControls(),t.f(11);case 12:return t.a(2)}},t,this,[[6,8],[3,10,11,12]])})),function(){return s.apply(this,arguments)})},{key:"cloneDetails",value:function(t){return JSON.parse(JSON.stringify(t||{}))}},{key:"updateEditControls",value:function(){if(this.editButton&&this.saveButton&&this.cancelButton){var t=this.inlineEditEnabled&&!!this.currentDetails;this.editButton.hidden=!t||this.state.editing,this.saveButton.hidden=!t||!this.state.editing,this.cancelButton.hidden=!t||!this.state.editing,this.editButton.disabled=this.state.saving,this.saveButton.disabled=this.state.saving,this.cancelButton.disabled=this.state.saving}}},{key:"createEditor",value:function(t,e){var n=document.createElement("input");return n.type="text",n.className="treepanel-input",n.value=null==t?"":String(t),n.addEventListener("input",function(){"function"==typeof e&&e(n.value)}),n}},{key:"setDraftField",value:function(t,e){this.editDraft&&this.editDraft.fields&&"object"===c(this.editDraft.fields)&&(this.editDraft.fields[t]=e)}},{key:"setDraftRowValue",value:function(t,e,n,r){if(this.editDraft&&Array.isArray(this.editDraft.rows)){var i=this.editDraft.rows.findIndex(function(e){return e===t}),o=i>=0?i:Number(n);Number.isNaN(o)||o<0||o>=this.editDraft.rows.length||(this.editDraft.rows[o]&&"object"===c(this.editDraft.rows[o])||(this.editDraft.rows[o]={}),this.editDraft.rows[o][e]=r)}}},{key:"setDraftCell",value:function(t,e,n,r){if(this.editDraft&&Array.isArray(this.editDraft.rows)){var i=Number(t);Number.isNaN(i)||i<0||i>=this.editDraft.rows.length?this.setDraftRowValue(null,e,n,r):(this.editDraft.rows[i]&&"object"===c(this.editDraft.rows[i])||(this.editDraft.rows[i]={}),this.editDraft.rows[i][e]=r)}}},{key:"setLoading",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";this.state.loading=!!t,this.statusEl&&(t?(this.statusEl.textContent="Loading ".concat(e||"details","..."),this.statusEl.setAttribute("data-state","loading")):(this.statusEl.textContent=e?"Showing details for ".concat(e):"Select a node to view details.",this.statusEl.setAttribute("data-state","ready")))}}],l=[{key:"selector",get:function(){return"treepanel"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"treepanel"}}],r&&v(n.prototype,r),l&&v(n,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,l,s,f,h,m,g}(r.Component);k(O,"templateId","treepanel-template"),"undefined"!=typeof window&&(window.TreePanelComponent=O)},191(t,e,n){"use strict";n.r(e),n.d(e,{WizardComponent:()=>g});var r=n(812),i=n(62),o=n(76);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function l(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return s(c,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var a={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(s(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,s(h,"constructor",d),s(d,"constructor",c),c.displayName="GeneratorFunction",s(d,i,"GeneratorFunction"),s(h),s(h,i,"Generator"),s(h,r,function(){return this}),s(h,"toString",function(){return"[object Generator]"}),(l=function(){return{w:o,m:p}})()}function s(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}s=function(t,e,n,r){function o(e,n){s(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},s(t,e,n,r)}function u(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function c(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){u(o,r,i,a,l,"next",t)}function l(t){u(o,r,i,a,l,"throw",t)}a(void 0)})}}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,f(r.key),r)}}function f(t){var e=function(t){if("object"!=a(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==a(e)?e:e+""}function h(t,e,n){return e=m(e),function(t,e){if(e&&("object"==a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,p()?Reflect.construct(e,n||[],m(t).constructor):e.apply(t,n))}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(p=function(){return!!t})()}function v(t,e,n,r){var i=y(m(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function y(){return y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=m(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},y.apply(null,arguments)}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}var g=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=h(this,e,[t,r])).templateId="wizard",n.currentStep=0,n.steps=[],n.stepData=new Map,n.isComplete=!1,n.autoSync=t.hasAttribute("autosync"),n.lazyLoad=t.hasAttribute("lazy"),n.stepNavigationMode=n.resolveStepNavigationMode(t),n.providerName=t.getAttribute("provider")||"default",n.contentProviderInstance=null,n.loadedStepContent=new Set,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&b(t,e)}(e,t),n=e,r=[{key:"resolveStepNavigationMode",value:function(t){return"page"===String(t.getAttribute("data-step-navigation")||"inline").trim().toLowerCase()?"page":"inline"}},{key:"init",value:(I=c(l().m(function t(){var n;return l().w(function(t){for(;;)switch(t.n){case 0:return v(e,"init",this,3)([]),t.n=1,this.render();case 1:return this.bindEvents(),n=this.resolveInitialStepIndex(),t.n=2,this.loadStep(n,0,{allowPageNavigation:!1});case 2:return t.a(2)}},t,this)})),function(){return I.apply(this,arguments)})},{key:"resolveInitialStepIndex",value:function(){if(!this.steps.length)return 0;var t=String(this.container.getAttribute("data-initial-step-id")||this.container.getAttribute("initial-step-id")||"").trim();if(t){var e=this.steps.findIndex(function(e){return String(e.id)===t});if(e>=0)return e}var n=this.container.getAttribute("data-initial-step")||this.container.getAttribute("initial-step"),r=Number(n);return Number.isInteger(r)&&r>=0&&r<this.steps.length?r:0}},{key:"render",value:(L=c(l().m(function t(){return l().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,v(e,"render",this,3)([]);case 1:return this.element=this.container.querySelector(".wizard"),this.nav=this.element.querySelector(".wizard-nav"),this.content=this.element.querySelector(".wizard-content"),this.progress=this.element.querySelector(".wizard-progress"),this.footer=this.element.querySelector(".wizard-footer"),this.loaderState=(0,i.w)(this,{host:this.content||this.element,busyTarget:this.content||this.element,scope:"block",defaultMessage:"Loading step..."}),this.stateBinding=(0,o.x)(this,{defaultPath:"wizard",eventName:"stepchange",getSnapshot:function(t){return t.getBindableState()},applySnapshot:function(t,e){return t.applyBindableState(e)}}),t.n=2,this.processDataRepeats();case 2:this.updateProgress(),this.updateFooterState();case 3:return t.a(2)}},t,this)})),function(){return L.apply(this,arguments)})},{key:"processDataRepeats",value:(x=c(l().m(function t(){var e,n;return l().w(function(t){for(;;)switch(t.n){case 0:if(this.container.dataset.source){t.n=1;break}return t.a(2);case 1:return t.n=2,this.resolveDataSource();case 2:if(this.data=t.v,n=Array.isArray(this.data)?this.data:Array.isArray(null===(e=this.data)||void 0===e?void 0:e.steps)?this.data.steps:[],this.steps=n.map(function(t,e){return{id:t.id||e,name:t.name||"Step ".concat(e+1),valid:!1,dirty:!1,data:{},canSkip:t.canSkip||!1,loadContent:t.contentUrl,contentType:t.contentType||"",pageUrl:t.pageUrl||t.href||t.route||"",content:t.content||null}}),this.lazyLoad){t.n=3;break}return t.n=3,this.preloadStepContent();case 3:this.renderStepNav(),this.updateFooterState();case 4:return t.a(2)}},t,this)})),function(){return x.apply(this,arguments)})},{key:"renderStepNav",value:function(){var t=this;this.nav.replaceChildren(),this.steps.forEach(function(e,n){var r=document.createElement("button");r.className="wizard-step ".concat(n<=t.currentStep?"complete":""),r.dataset.step=String(n),r.disabled=n>t.currentStep;var i=document.createElement("span");i.className="step-number",i.textContent=String(n+1);var o=document.createElement("span");o.className="step-name",o.textContent=e.name,r.append(i,o),t.nav.appendChild(r)})}},{key:"loadStep",value:(T=c(l().m(function t(e){var n,r,i,o,a,s,u,c=arguments;return l().w(function(t){for(;;)switch(t.p=t.n){case 0:if(i=c.length>1&&void 0!==c[1]?c[1]:1,o=!1!==(c.length>2&&void 0!==c[2]?c[2]:{}).allowPageNavigation,this.steps.length){t.n=1;break}return this.renderStepContent(null),this.updateFooterState(),t.a(2,!1);case 1:if(!(e>0&&i>0)){t.n=3;break}return t.n=2,this.validateCurrentStep();case 2:if(t.v){t.n=3;break}return t.a(2,!1);case 3:return t.n=4,this.saveStepData(this.currentStep);case 4:if(this.currentStep=e,a=this.steps[e]){t.n=5;break}return t.a(2,!1);case 5:if(this.updateNavState(),this.updateProgress(),this.updateFooterState(),!o||!this.shouldNavigateToPage(a)){t.n=7;break}return t.n=6,this.navigateToStepPage(a,e,i);case 6:return t.a(2,!0);case 7:if(null===(n=this.loaderState)||void 0===n||null===(r=n.setLoading)||void 0===r||r.call(n,!0,"Loading ".concat(a.name||"Step ".concat(e+1),"...")),t.p=8,!this.shouldLoadStepContent(a)){t.n=9;break}return t.n=9,this.loadStepContent(e);case 9:this.renderStepContent(a),this.focusContent();case 10:return t.p=10,null===(s=this.loaderState)||void 0===s||null===(u=s.setLoading)||void 0===u||u.call(s,!1),t.f(10);case 11:return this.dispatchEvent("stepchange",{step:e,direction:i,stepData:a}),t.a(2,!0)}},t,this,[[8,,10,11]])})),function(t){return T.apply(this,arguments)})},{key:"shouldNavigateToPage",value:function(t){return"page"===this.stepNavigationMode&&!(null==t||!t.pageUrl)}},{key:"shouldLoadStepContent",value:function(t){return!(!t||this.shouldNavigateToPage(t)||!this.lazyLoad&&!t.loadContent&&null!=t.content)}},{key:"preloadStepContent",value:(j=c(l().m(function t(){var e,n;return l().w(function(t){for(;;)switch(t.n){case 0:e=0;case 1:if(!(e<this.steps.length)){t.n=4;break}if(n=this.steps[e],this.shouldLoadStepContent(n)){t.n=2;break}return t.a(3,3);case 2:return t.n=3,this.loadStepContent(e);case 3:e+=1,t.n=1;break;case 4:return t.a(2)}},t,this)})),function(){return j.apply(this,arguments)})},{key:"renderStepContent",value:function(t){if(!t){var e=document.createElement("div");return e.className="wizard-empty",e.textContent="No steps configured.",void this.content.replaceChildren(e)}if(t.content instanceof Node)this.content.replaceChildren(t.content);else{if("string"==typeof t.content){var n=t.content.trim();if(!n)return void this.content.replaceChildren(this.createDefaultStepForm(t));var r=document.createElement("template");return r.innerHTML=n,void this.content.replaceChildren(r.content.cloneNode(!0))}this.isJsonStepContent(t.content)?this.content.replaceChildren(this.createJsonStepForm(t,t.content)):this.content.replaceChildren(this.createDefaultStepForm(t))}}},{key:"isJsonStepContent",value:function(t){return!(!t||"object"!==a(t)||t instanceof Node)}},{key:"createDefaultStepForm",value:function(t){var e=document.createElement("form");e.dataset.step=String(t.id);var n=document.createElement("h3");n.textContent=t.name||"Step ".concat(this.currentStep+1);var r=document.createElement("p");return r.textContent="No custom content configured for this step.",e.append(n,r),e}},{key:"loadStepContent",value:(P=c(l().m(function t(e){var n,r;return l().w(function(t){for(;;)switch(t.p=t.n){case 0:if(n=this.steps[e]){t.n=1;break}return t.a(2);case 1:if(!this.loadedStepContent.has(e)){t.n=2;break}return t.a(2);case 2:return t.p=2,t.n=3,this.fetchStepContent(n);case 3:null!=(r=t.v)&&(n.content=r),this.loadedStepContent.add(e),t.n=5;break;case 4:t.p=4,t.v,this.showStepLoadError("Failed to load step");case 5:return t.a(2)}},t,this,[[2,4]])})),function(t){return P.apply(this,arguments)})},{key:"navigateToStepPage",value:(A=c(l().m(function t(e,n,r){return l().w(function(t){for(;;)switch(t.n){case 0:this.dispatchEvent("steppagenavigate",{step:n,direction:r,pageUrl:e.pageUrl,stepData:e}),window.location.assign(e.pageUrl);case 1:return t.a(2)}},t,this)})),function(t,e,n){return A.apply(this,arguments)})},{key:"showStepLoadError",value:function(t){var e=document.createElement("div");e.className="error",e.textContent=t,this.content.replaceChildren(e)}},{key:"fetchStepContent",value:(C=c(l().m(function t(e){var n,r;return l().w(function(t){for(;;)switch(t.n){case 0:if(!e.loadContent){t.n=4;break}return t.n=1,fetch(e.loadContent,{credentials:"same-origin"});case 1:if((r=t.v).ok){t.n=2;break}throw new Error("Failed to load step content: HTTP ".concat(r.status));case 2:return t.n=3,this.parseRemoteStepPayload(r,e);case 3:case 6:return t.a(2,t.v);case 4:return t.n=5,this.ensureProviderInstance();case 5:return t.n=6,null===(n=this.contentProviderInstance)||void 0===n?void 0:n.getContent(e,this.currentStep)}},t,this)})),function(t){return C.apply(this,arguments)})},{key:"parseRemoteStepPayload",value:(O=c(l().m(function t(e,n){var r,i;return l().w(function(t){for(;;)switch(t.n){case 0:if(r=String(e.headers.get("content-type")||"").toLowerCase(),"json"===String((null==n?void 0:n.contentType)||"").toLowerCase()||r.includes("application/json")||String((null==n?void 0:n.loadContent)||"").toLowerCase().endsWith(".json")){t.n=2;break}return t.n=1,e.text();case 1:return t.a(2,t.v);case 2:return t.n=3,e.json();case 3:if("string"!=typeof(i=t.v)){t.n=4;break}return t.a(2,i);case 4:if(!i||"string"!=typeof i.html){t.n=5;break}return t.a(2,i.html);case 5:return t.a(2,i)}},t)})),function(t,e){return O.apply(this,arguments)})},{key:"createJsonStepForm",value:function(t,e){var n=document.createElement("form");n.dataset.step=String(t.id);var r=document.createElement("h3");r.textContent=String((null==e?void 0:e.title)||t.name||"Step ".concat(this.currentStep+1)),n.appendChild(r);var i=String((null==e?void 0:e.description)||"").trim();if(i){var o=document.createElement("p");o.textContent=i,n.appendChild(o)}var l=Array.isArray(null==e?void 0:e.fields)?e.fields:[];if(l.length)return l.forEach(function(t,e){var r=String((null==t?void 0:t.name)||"field_".concat(e+1)),i=String((null==t?void 0:t.label)||r),o=String((null==t?void 0:t.type)||"text").toLowerCase(),l=null==(null==t?void 0:t.value)?"":String(t.value),s=null==(null==t?void 0:t.placeholder)?"":String(t.placeholder),u=!(null==t||!t.required),c=document.createElement("label");c.className="wizard-json-field";var d=document.createElement("span");d.textContent=i,c.appendChild(d);var f=null;"textarea"===o?(f=document.createElement("textarea")).value=l:"select"===o?(f=document.createElement("select"),(Array.isArray(null==t?void 0:t.options)?t.options:[]).forEach(function(t,e){var n,r,i,o,s="object"===a(t)&&t?{value:String(null!==(n=null!==(r=t.value)&&void 0!==r?r:t.label)&&void 0!==n?n:e),label:String(null!==(i=null!==(o=t.label)&&void 0!==o?o:t.value)&&void 0!==i?i:e)}:{value:String(t),label:String(t)},u=document.createElement("option");u.value=s.value,u.textContent=s.label,s.value===l&&(u.selected=!0),f.appendChild(u)})):((f=document.createElement("input")).type=o||"text",f.value=l),f.name=r,s&&"placeholder"in f&&(f.placeholder=s),u&&(f.required=!0),c.appendChild(f),n.appendChild(c)}),n;var s=e&&"object"===a(e.values)?e.values:e&&"object"===a(e.data)?e.data:null;if(s){var u=document.createElement("ul");return Object.keys(s).forEach(function(t){var e=document.createElement("li"),n=null==s[t]?"":String(s[t]);e.textContent="".concat(t,": ").concat(n),u.appendChild(e)}),n.appendChild(u),n}var c=document.createElement("p");return c.textContent="JSON step loaded (no fields declared).",n.appendChild(c),n}},{key:"validateCurrentStep",value:(E=c(l().m(function t(){var e,n;return l().w(function(t){for(;;)switch(t.n){case 0:if(e=this.extractFormData(this.content),n=this.steps[this.currentStep]){t.n=1;break}return t.a(2,!1);case 1:return t.n=2,this.validateStep(e,n);case 2:if(n.valid=t.v,n.dirty=!0,this.stepData.set(this.currentStep,{data:e,valid:n.valid}),n.valid){t.n=3;break}return this.showValidationErrors(e),t.a(2,!1);case 3:return t.a(2,!0)}},t,this)})),function(){return E.apply(this,arguments)})},{key:"saveStepData",value:(k=c(l().m(function t(e){var n;return l().w(function(t){for(;;)switch(t.n){case 0:if(!this.autoSync||!this.stepData.has(e)){t.n=2;break}return t.n=1,this.ensureProviderInstance();case 1:if(null==(n=t.v)||!n.saveStep){t.n=2;break}return t.n=2,n.saveStep(this.steps[e],this.stepData.get(e));case 2:return t.a(2)}},t,this)})),function(t){return k.apply(this,arguments)})},{key:"next",value:(S=c(l().m(function t(){var e;return l().w(function(t){for(;;)switch(t.n){case 0:if(!((e=this.currentStep+1)>=this.steps.length)){t.n=1;break}return t.a(2,this.complete());case 1:return t.n=2,this.loadStep(e,1);case 2:return t.a(2,t.v)}},t,this)})),function(){return S.apply(this,arguments)})},{key:"prev",value:(w=c(l().m(function t(){var e;return l().w(function(t){for(;;)switch(t.n){case 0:return e=Math.max(0,this.currentStep-1),t.n=1,this.loadStep(e,-1);case 1:return t.a(2,t.v)}},t,this)})),function(){return w.apply(this,arguments)})},{key:"goToStep",value:(g=c(l().m(function t(e){return l().w(function(t){for(;;)switch(t.n){case 0:if(!(e<0||e>=this.steps.length||e>this.currentStep)){t.n=1;break}return t.a(2,!1);case 1:return t.n=2,this.loadStep(e,0);case 2:return t.a(2,t.v)}},t,this)})),function(t){return g.apply(this,arguments)})},{key:"complete",value:(m=c(l().m(function t(){var e=this;return l().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.validateCurrentStep();case 1:if(t.v){t.n=2;break}return t.a(2,!1);case 2:if(!this.autoSync){t.n=3;break}return t.n=3,this.syncAllSteps();case 3:return this.isComplete=!0,this.element.classList.add("complete"),this.dispatchEvent("complete",{steps:this.steps.map(function(t,n){var r;return null===(r=e.stepData.get(n))||void 0===r?void 0:r.data})}),t.a(2,!0)}},t,this)})),function(){return m.apply(this,arguments)})},{key:"updateProgress",value:function(){var t=this.steps.length||1,e=(this.currentStep+1)/t*100;this.progress.style.width="".concat(e,"%"),this.progress.setAttribute("aria-valuenow",String(this.currentStep+1)),this.progress.setAttribute("aria-valuemax",String(t))}},{key:"updateNavState",value:function(){var t=this;this.nav.querySelectorAll(".wizard-step").forEach(function(e,n){e.classList.toggle("current",n===t.currentStep),e.classList.toggle("complete",n<=t.currentStep),e.disabled=n>t.currentStep})}},{key:"updateFooterState",value:function(){if(this.footer){var t=this.footer.querySelector('[data-action="prev"]'),e=this.footer.querySelector('[data-action="next"]'),n=this.footer.querySelector('[data-action="complete"]'),r=this.steps.length>0,i=this.currentStep<=0,o=r&&this.currentStep>=this.steps.length-1;t&&(t.disabled=!r||i),e&&(e.disabled=!r||o,e.hidden=!r||o),n&&(n.hidden=!r||!o,n.disabled=!r||!o,n.classList.toggle("hidden",!r||!o))}}},{key:"bindEvents",value:function(){var t=this;this.nav.addEventListener("click",function(){var e=c(l().m(function e(n){var r,i;return l().w(function(e){for(;;)switch(e.n){case 0:if(!(r=n.target.closest(".wizard-step"))){e.n=1;break}return i=parseInt(r.dataset.step,10),e.n=1,t.goToStep(i);case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()),this.footer.addEventListener("click",function(){var e=c(l().m(function e(n){return l().w(function(e){for(;;)switch(e.n){case 0:if(!n.target.matches('[data-action="next"]')){e.n=2;break}return e.n=1,t.next();case 1:case 3:e.n=5;break;case 2:if(!n.target.matches('[data-action="prev"]')){e.n=4;break}return e.n=3,t.prev();case 4:if(!n.target.matches('[data-action="complete"]')){e.n=5;break}return e.n=5,t.complete();case 5:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()),this.content.addEventListener("change",function(){t.steps[t.currentStep]&&(t.steps[t.currentStep].dirty=!0)})}},{key:"getContentProviders",value:function(){return this.container.contentProviders||window.contentProviders||{}}},{key:"resolveDataSource",value:(y=c(l().m(function t(){var e,n,r,i;return l().w(function(t){for(;;)switch(t.p=t.n){case 0:if(n=this.container.dataset.source){t.n=1;break}return t.a(2,[]);case 1:return t.n=2,this.ensureProviderInstance();case 2:if(null===(e=this.contentProviderInstance)||void 0===e||!e.resolve){t.n=3;break}return t.a(2,this.contentProviderInstance.resolve(n)||[]);case 3:if(!(r=String(n).trim()).startsWith("[")&&!r.startsWith("{")){t.n=6;break}return t.p=4,t.a(2,JSON.parse(r));case 5:return t.p=5,t.v,t.a(2,[]);case 6:if(!r.startsWith("/")&&!/^https?:\/\//i.test(r)){t.n=12;break}return t.p=7,t.n=8,fetch(r,{credentials:"same-origin"});case 8:if((i=t.v).ok){t.n=9;break}return t.a(2,[]);case 9:return t.n=10,i.json();case 10:return t.a(2,t.v);case 11:return t.p=11,t.v,t.a(2,[]);case 12:return t.a(2,[])}},t,this,[[7,11],[4,5]])})),function(){return y.apply(this,arguments)})},{key:"ensureProviderInstance",value:(p=c(l().m(function t(){var e,n,r,i,o;return l().w(function(t){for(;;)switch(t.n){case 0:if(!this.contentProviderInstance){t.n=1;break}return t.a(2,this.contentProviderInstance);case 1:if(r=this.getContentProviders(),i=r[this.providerName]){t.n=2;break}return t.a(2,null);case 2:return o=window.appState||window.pageContext||{},this.contentProviderInstance=new i(o),t.n=3,null===(e=(n=this.contentProviderInstance).init)||void 0===e?void 0:e.call(n);case 3:return t.a(2,this.contentProviderInstance)}},t,this)})),function(){return p.apply(this,arguments)})},{key:"extractFormData",value:function(t){var e=t.querySelector("form");if(!e)return{};var n=new FormData(e);return Object.fromEntries(n)}},{key:"focusContent",value:function(){var t,e;null===(t=(e=this.content).focus)||void 0===t||t.call(e)}},{key:"validateStep",value:(f=c(l().m(function t(e,n){return l().w(function(t){for(;;)if(0===t.n)return t.a(2,!0)},t)})),function(t,e){return f.apply(this,arguments)})},{key:"showValidationErrors",value:function(t){}},{key:"syncAllSteps",value:(u=c(l().m(function t(){var e;return l().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.ensureProviderInstance();case 1:if(null==(e=t.v)||!e.syncAllSteps){t.n=2;break}return t.n=2,e.syncAllSteps(this.steps,this.stepData);case 2:return t.a(2)}},t,this)})),function(){return u.apply(this,arguments)})},{key:"serializeStepData",value:function(){var t={};return this.stepData.forEach(function(e,n){t[String(n)]=e}),t}},{key:"getBindableState",value:function(){return{currentStep:this.currentStep,isComplete:this.isComplete,stepData:this.serializeStepData()}}},{key:"applyBindableState",value:function(t){if(t&&"object"===a(t)){var e=Number(t.currentStep);Number.isInteger(e)&&(e<0||e>=this.steps.length||e!==this.currentStep&&this.goToStep(e))}}},{key:"destroy",value:function(){var t,n,r,i;null===(t=this.loaderState)||void 0===t||null===(n=t.destroy)||void 0===n||n.call(t),null===(r=this.stateBinding)||void 0===r||null===(i=r.disconnect)||void 0===i||i.call(r),v(e,"destroy",this,3)([])}}],s=[{key:"selector",get:function(){return"wizard"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"wizard"}}],r&&d(n.prototype,r),s&&d(n,s),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,s,u,f,p,y,m,g,w,S,k,E,O,C,A,P,j,T,x,L,I}(r.Component);"undefined"!=typeof window&&(window.WizardComponent=g)},904(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,a(r.key),r)}}function o(t,e,n){return(e=a(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.d(e,{Z:()=>l});var l=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"registerLibrary",value:function(t,e){this.libraries.set(t,e)}},{key:"initAll",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.libraries.forEach(function(r,i){r.forEach(function(r){t.initLibraryComponents(r,i,e,n)})})}},{key:"registerInstance",value:function(t,e){var n;if(t instanceof Element&&e){var r=this.instances.get(t),i=r instanceof Map?r:new Map;i.set((null===(n=e.constructor)||void 0===n?void 0:n.name)||"Component",e),this.instances.set(t,i)}}},{key:"unregisterInstance",value:function(t,e){if(t instanceof Element){var n=this.instances.get(t);n instanceof Map&&(e?n.forEach(function(t,r){t===e&&n.delete(r)}):n.clear(),0!==n.size?this.instances.set(t,n):this.instances.delete(t))}}},{key:"getKnownInstanceKeys",value:function(){var t=new Set;return this.libraries.forEach(function(e){e.forEach(function(e){null!=e&&e.name&&t.add(e.name.toLowerCase())})}),Array.from(t)}},{key:"getElementInstances",value:function(t){if(!(t instanceof Element))return[];var e=new Set,n=this.instances.get(t);return n instanceof Map&&n.forEach(function(t){t&&e.add(t)}),this.getKnownInstanceKeys().forEach(function(n){var r=t[n];r&&"function"==typeof r.destroy&&e.add(r)}),Array.from(e)}},{key:"collectInstances",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(t instanceof Element)&&t!==document)return[];var r=[],i=new Set,o=function(t){t&&!i.has(t)&&(i.add(t),r.push(t))};return n&&t instanceof Element&&this.getElementInstances(t).forEach(o),t.querySelectorAll&&t.querySelectorAll("*").forEach(function(t){e.getElementInstances(t).forEach(o)}),r}},{key:"resolveComponentName",value:function(t){if(t.componentName)return String(t.componentName).toLowerCase();var e=(t.selector||"").trim();if(/^[a-z][a-z0-9-]*$/i.test(e))return e.toLowerCase();var n=(t.name||"").replace(/Component$/i,"");return n?n.toLowerCase():""}},{key:"getDiscoverySelectors",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=!1!==e.includeRoleSelectors,r=new Set,i=(t.selector||"").trim();i&&r.add(i);var o=this.resolveComponentName(t);return o&&(r.add(o),r.add('[component="'.concat(o,'"]')),n&&r.add('[role="'.concat(o,'"]'))),"function"==typeof t.getNativeSelectors&&(t.getNativeSelectors(e)||[]).forEach(function(t){var e=String(t||"").trim();e&&r.add(e)}),Array.from(r)}},{key:"shouldDeferInit",value:function(t){var e=(t.getAttribute("transform")||"").toLowerCase(),n=(t.getAttribute("lazy-transform")||t.dataset.lazyTransform||"").toLowerCase();return"lazy"===e||"true"===n||"1"===n}},{key:"initLibraryComponents",value:function(t,e,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=this.getDiscoverySelectors(t,i);if(o.length){var a=new Set;o.forEach(function(t){n instanceof Element&&n.matches(t)&&a.add(n),n.querySelectorAll(t).forEach(function(t){return a.add(t)})}),a.forEach(function(o){var a,l="function"==typeof t.prepareHost&&t.prepareHost(o)||o;if(l instanceof Element&&t.matchesLibrary(l,e)&&("function"!=typeof t.canInitElement||t.canInitElement(l,{libraryName:e,container:n,options:i}))&&!r.shouldDeferInit(l)){var s=null===(a=l.closest)||void 0===a?void 0:a.call(l,'[data-holi-component-class="'.concat(t.name,'"]'));s&&s!==l||l[t.name.toLowerCase()]||new t(l)}})}}},{key:"destroyContainerInstances",value:function(t){t instanceof Element&&this.collectInstances(t,!0).reverse().forEach(function(t){null!=t&&t.isDestroyed||"function"!=typeof t.destroy||t.destroy()})}},{key:"flushRemovedNodes",value:function(){var t=this;this.removalFlushScheduled=!1;var e=Array.from(this.pendingRemovedNodes);this.pendingRemovedNodes.clear(),e.forEach(function(e){e instanceof Element&&(e.isConnected||t.destroyContainerInstances(e))})}},{key:"scheduleRemovedFlush",value:function(){var t=this;this.removalFlushScheduled||(this.removalFlushScheduled=!0,queueMicrotask(function(){return t.flushRemovedNodes()}))}},{key:"observeLifecycle",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;if(!this.lifecycleObserver){var n=(null==e?void 0:e.documentElement)||e;(n instanceof Element||n===document)&&(this.lifecycleObserver=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){e instanceof Element&&t.initAll(e,{includeRoleSelectors:!1})}),e.removedNodes.forEach(function(e){e instanceof Element&&t.pendingRemovedNodes.add(e)})}),t.scheduleRemovedFlush()}),this.lifecycleObserver.observe(n,{childList:!0,subtree:!0}))}}}],null&&i(t.prototype,null),e&&i(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();o(l,"libraries",new Map),o(l,"instances",new WeakMap),o(l,"lifecycleObserver",null),o(l,"pendingRemovedNodes",new Set),o(l,"removalFlushScheduled",!1)},76(t,e,n){"use strict";n.d(e,{x:()=>c});var r=n(458);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function a(t,e,n){return(e=s(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,s(r.key),r)}}function s(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}var u=function(){return t=function t(e){var n,r=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.component=e,this.options=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({storeAttr:"data-state-store",pathAttr:"data-state-path",modeAttr:"data-state-sync",debounceAttr:"data-state-debounce-ms",defaultPath:i.defaultPath||(null==e||null===(n=e.constructor)||void 0===n?void 0:n.componentName)||"component",eventName:i.eventName||"stateupdate",getSnapshot:i.getSnapshot||function(){return{}},applySnapshot:i.applySnapshot||function(){}},i),this.unsubscribe=null,this.boundOnComponentEvent=function(t){return r.handleComponentEvent(t)},this.pushTimer=null,this.applyingFromStore=!1,this.pushingToStore=!1,this.lastPushedJson="",this.mode="both",this.debounceMs=0},(e=[{key:"resolveMode",value:function(t){var e=String(t||"both").trim().toLowerCase();return"in"===e||"out"===e||"both"===e?e:"none"===e||"off"===e?"none":"both"}},{key:"connect",value:function(){var t,e,n=this,i=null===(t=this.component)||void 0===t?void 0:t.container,o=null===(e=this.component)||void 0===e?void 0:e.element;if(i instanceof HTMLElement&&o instanceof HTMLElement){var a=String(i.getAttribute(this.options.storeAttr)||"").trim();if(a){var l=r.T.get(a);if(l){this.store=l,this.storeId=a,this.path=String(i.getAttribute(this.options.pathAttr)||this.options.defaultPath||"").trim(),this.mode=this.resolveMode(i.getAttribute(this.options.modeAttr)),this.debounceMs=Math.max(0,Number(i.getAttribute(this.options.debounceAttr)||0)||0);var s=this.path?r.T.getByPath(l.proxy,this.path):void 0;"none"!==this.mode&&("in"!==this.mode&&"both"!==this.mode||(this.unsubscribe=l.subscribe(function(t,e){var r=n.path;r&&null!=e&&e.path&&(e.path===r||e.path.startsWith("".concat(r,"."))||r.startsWith("".concat(e.path,".")))&&n.pullFromStore()}),this.pullFromStore()),"out"!==this.mode&&"both"!==this.mode||(o.addEventListener(this.options.eventName,this.boundOnComponentEvent),void 0===s&&this.pushToStore(this.options.getSnapshot(this.component),!0)))}}}}},{key:"cloneSerializable",value:function(t){try{return JSON.parse(JSON.stringify(t))}catch(e){return t}}},{key:"toJson",value:function(t){try{return JSON.stringify(t)}catch(t){return""}}},{key:"pullFromStore",value:function(){if(this.store&&this.path&&!this.pushingToStore){var t=r.T.getByPath(this.store.proxy,this.path);if(null!=t){var e=this.toJson(t);if(!e||e!==this.lastPushedJson){this.lastPushedJson=e,this.applyingFromStore=!0;try{this.options.applySnapshot(this.component,this.cloneSerializable(t))}finally{this.applyingFromStore=!1}}}}}},{key:"handleComponentEvent",value:function(t){var e=this;if(this.store&&this.path&&!this.applyingFromStore){var n=this.options.getSnapshot(this.component);if(this.debounceMs>0)return this.pushTimer&&clearTimeout(this.pushTimer),void(this.pushTimer=setTimeout(function(){e.pushTimer=null,e.pushToStore(n,!1)},this.debounceMs));this.pushToStore(n,!1)}}},{key:"pushToStore",value:function(t,e){if(this.store&&this.path){var n=this.cloneSerializable(t),i=this.toJson(n);if(e||!i||i!==this.lastPushedJson){this.pushingToStore=!0;try{r.T.setByPath(this.store.proxy,this.path,n),this.lastPushedJson=i}finally{this.pushingToStore=!1}}}}},{key:"disconnect",value:function(){var t,e;this.pushTimer&&(clearTimeout(this.pushTimer),this.pushTimer=null),null===(t=this.unsubscribe)||void 0===t||t.call(this),this.unsubscribe=null,null===(e=this.component)||void 0===e||null===(e=e.element)||void 0===e||e.removeEventListener(this.options.eventName,this.boundOnComponentEvent)}}])&&l(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function c(t){var e=new u(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});return e.connect(),e}},62(t,e,n){"use strict";n.d(e,{w:()=>i});var r=n(819);function i(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.host||(null==t?void 0:t.element)||(null==t?void 0:t.container)||null;if(!(n instanceof HTMLElement))return{setLoading:function(){},destroy:function(){}};var i=e.busyTarget instanceof HTMLElement?e.busyTarget:n,o=e.scope||"block",a=String(e.defaultMessage||"Loading..."),l=n.querySelector('[data-role="component-loader"]');l?l.getAttribute("scope")||l.setAttribute("scope",o):(l=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"block",e=document.createElement("section");return e.setAttribute("component","loader"),e.setAttribute("scope",t),e.hidden=!0,e}(o),l.setAttribute("data-role","component-loader"),n.appendChild(l));var s=l.loadercomponent||new r.LoaderComponent(l);return s.hide(),{setLoading:function(t){var e=!!t,n=String((arguments.length>1&&void 0!==arguments[1]?arguments[1]:"")||a||"Loading...");i.setAttribute("aria-busy",e?"true":"false"),e?s.show(n):s.hide()},destroy:function(){i.removeAttribute("aria-busy"),s.hide()}}}},853(t,e,n){"use strict";function r(t,e){if(t instanceof Element&&e instanceof Element){var n=new Set(((arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).exclude||[]).map(function(t){return String(t||"").toLowerCase()}));Array.from(t.attributes||[]).forEach(function(t){var r=String(t.name||"").toLowerCase();r&&!n.has(r)&&e.setAttribute(t.name,t.value)})}}function i(t){var e;return t instanceof HTMLTextAreaElement?t.value||t.textContent||"":t instanceof HTMLInputElement||t instanceof HTMLSelectElement?t.value||"":(null==t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"value"))||""}function o(t){return t instanceof HTMLSelectElement?Array.from(t.options||[]).map(function(t){var e={value:null==t.value?"":String(t.value),label:String(t.textContent||t.label||t.value||"")};return Array.from(t.attributes||[]).forEach(function(t){var n,r=String(t.name||"").toLowerCase();r&&"value"!==r&&"label"!==r&&"selected"!==r&&(r.startsWith("data-")?e[(n=r.slice(5),String(n||"").replace(/[-_\s]+(.)?/g,function(t,e){return e?e.toUpperCase():""}).replace(/^(.)/,function(t){return t.toLowerCase()}))]=t.value:e[r]=""===t.value||t.value)}),t.disabled&&(e.disabled=!0),e}):[]}function a(t){var e,n;if(!(t instanceof HTMLInputElement))return null;var r="label"===(null===(e=t.parentElement)||void 0===e||null===(e=e.tagName)||void 0===e?void 0:e.toLowerCase())?t.parentElement:null;if(r)return r.setAttribute("slot","options"),r;var i=function(t){if(!(t instanceof Element))return null;var e=String(t.getAttribute("id")||"").trim();if(!e)return null;var n="undefined"!=typeof CSS&&"function"==typeof CSS.escape?CSS.escape(e):e.replace(/"/g,'\\"');return document.querySelector('label[for="'.concat(n,'"]'))}(t),o=document.createElement("label");o.className="holi-native-choice",o.setAttribute("slot","options"),o.appendChild(t);var a=String((null==i?void 0:i.textContent)||t.getAttribute("label")||t.getAttribute("aria-label")||t.value||"").trim();if(a){var l=document.createElement("span");l.textContent=a,o.appendChild(l)}return null==i||null===(n=i.remove)||void 0===n||n.call(i),o}n.d(e,{BD:()=>i,NQ:()=>o,VC:()=>a,ts:()=>r})},696(t,e,n){"use strict";function r(){var t,e,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function l(n,r,o,a){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return i(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,o,a),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][o]?e(e([][o]())):(i(e={},o,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,i(t,a,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,i(h,"constructor",d),i(d,"constructor",c),c.displayName="GeneratorFunction",i(d,a,"GeneratorFunction"),i(h),i(h,a,"Generator"),i(h,o,function(){return this}),i(h,"toString",function(){return"[object Generator]"}),(r=function(){return{w:l,m:p}})()}function i(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}i=function(t,e,n,r){function a(e,n){i(t,e,function(t){return this._invoke(e,n,t)})}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},i(t,e,n,r)}function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function l(t){a(o,r,i,l,s,"next",t)}function s(t){a(o,r,i,l,s,"throw",t)}l(void 0)})}}function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach(function(e){c(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function c(t,e,n){return(e=f(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,f(r.key),r)}}function f(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}n.d(e,{q:()=>h});var h=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.overlay=null,this.keyHandler=null},e=[{key:"open",value:function(){var t=this,e=u({title:"Details",mode:"view",fields:[],record:{},readonlyFields:[],onSave:null},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});this.close();var n=this.createDialogScaffold(),i=n.fragment,a=n.overlay,s=n.header,c=n.body,d=n.footer;this.overlay=a,this.overlay.classList.add("holi-object-details-overlay"),this.overlay.addEventListener("click",function(e){e.target===t.overlay&&t.close()});var f=this.normalizeFields(e.fields,e.record,e.readonlyFields),h=this.normalizeMode(e.mode),p=this.clone(e.record||{}),v=!1,y=function(){s.replaceChildren(),c.replaceChildren(),d.replaceChildren();var n=document.createElement("h2");n.textContent="".concat("add"===h?"Add":"edit"===h?"Edit":"View"," ").concat(e.title),s.appendChild(n);var i=document.createElement("div");if(i.className="holi-object-details-header-actions","view"===h){var a=document.createElement("button");a.type="button",a.className="holi-object-details-btn",a.textContent="Edit",a.addEventListener("click",function(){h="edit",y()}),i.appendChild(a)}var u=document.createElement("button");if(u.type="button",u.className="holi-object-details-btn holi-object-details-btn-secondary",u.textContent="Close",u.addEventListener("click",function(){return t.close()}),i.appendChild(u),s.appendChild(i),"view"!==h){var m=document.createElement("p");m.className="holi-object-details-status",c.appendChild(m);var b=new Map;f.forEach(function(e){var n=document.createElement("div");n.className="holi-object-details-field";var r=document.createElement("label");r.textContent=e.label;var i=t.createControl(e,p[e.name]);i.disabled=!!e.readonly||v,e.readonly||(i.addEventListener("input",function(){var n;p[e.name]=t.readControlValue(i,e),t.setFieldError(null===(n=b.get(e.name))||void 0===n?void 0:n.errorEl,"")}),i.addEventListener("change",function(){var n;p[e.name]=t.readControlValue(i,e),t.setFieldError(null===(n=b.get(e.name))||void 0===n?void 0:n.errorEl,"")}));var o=document.createElement("p");o.className="holi-object-details-field-error",n.append(r,i,o),c.appendChild(n),b.set(e.name,{field:e,control:i,errorEl:o})});var g=document.createElement("button");g.type="button",g.className="holi-object-details-btn holi-object-details-btn-secondary",g.textContent="Cancel",g.disabled=v,g.addEventListener("click",function(){"add"!==h?(p=t.clone(e.record||{}),h="view",y()):t.close()}),d.appendChild(g);var w=document.createElement("button");w.type="button",w.className="holi-object-details-btn",w.textContent=v?"Saving...":"Save",w.disabled=v,w.addEventListener("click",l(r().m(function n(){var i;return r().w(function(n){for(;;)switch(n.p=n.n){case 0:if(!v&&"function"==typeof e.onSave){n.n=1;break}return n.a(2);case 1:if(t.validateFields(b,m)){n.n=2;break}return n.a(2);case 2:return v=!0,y(),n.p=3,n.n=4,Promise.resolve(e.onSave(t.clone(p),h));case 4:(i=n.v)&&"object"===o(i)&&(p=t.clone(i)),h="view";case 5:return n.p=5,v=!1,y(),n.f(5);case 6:return n.a(2)}},n,null,[[3,,5,6]])}))),d.appendChild(w)}else f.forEach(function(e){var n=document.createElement("div");n.className="holi-object-details-row";var r=document.createElement("strong");r.textContent=e.label;var i=document.createElement("span");i.textContent=t.stringifyValue(p[e.name]),n.append(r,i),c.appendChild(n)})};this.keyHandler=function(e){"Escape"===e.key&&t.close()},document.addEventListener("keydown",this.keyHandler),document.body.appendChild(i),y()}},{key:"openLoading",value:function(){var t=this,e=u({title:"Details"},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});this.close();var n=this.createDialogScaffold(),r=n.fragment,i=(n.overlay,n.header),o=n.body,a=document.createElement("h2");a.textContent="Loading ".concat(e.title,"..."),i.appendChild(a);var l=document.createElement("div");l.className="holi-object-details-header-actions";var s=document.createElement("button");s.type="button",s.className="holi-object-details-btn holi-object-details-btn-secondary",s.textContent="Close",s.addEventListener("click",function(){return t.close()}),l.appendChild(s),i.appendChild(l);var c=document.getElementById("object-details-skeleton-template");if(c&&c.content)o.appendChild(c.content.cloneNode(!0));else{var d=document.createElement("div");d.className="dg-skeleton";for(var f=0;f<4;f+=1){var h=document.createElement("div");h.className=0===f?"sk-line sk-title":"sk-line",d.appendChild(h)}o.appendChild(d)}this.keyHandler=function(e){"Escape"===e.key&&t.close()},document.addEventListener("keydown",this.keyHandler),document.body.appendChild(r)}},{key:"close",value:function(){this.keyHandler&&(document.removeEventListener("keydown",this.keyHandler),this.keyHandler=null),this.overlay&&(this.overlay.remove(),this.overlay=null)}},{key:"createDialogScaffold",value:function(){var t=this,e=document.getElementById("object-details-template");if(!e||!e.content)throw new Error('Template "object-details-template" not found');var n=e.content.cloneNode(!0),r=n.querySelector(".dialog-overlay"),i=n.querySelector(".dialog-header"),o=n.querySelector(".dialog-body"),a=n.querySelector(".dialog-footer");if(!(r&&i&&o&&a))throw new Error("object-details-template has invalid structure");return this.overlay=r,this.overlay.classList.add("holi-object-details-overlay"),this.overlay.addEventListener("click",function(e){e.target===t.overlay&&t.close()}),{fragment:n,overlay:r,header:i,body:o,footer:a}}},{key:"normalizeMode",value:function(t){var e=String(t||"view").trim().toLowerCase();return"add"===e||"edit"===e||"view"===e?e:"view"}},{key:"normalizeFields",value:function(t,e,n){var r=this,i=new Set((n||[]).map(function(t){return String(t)})),o=new Map;return(t||[]).forEach(function(t){var n=String((null==t?void 0:t.name)||"").trim();n&&!o.has(n)&&o.set(n,r.normalizeField(t,null==e?void 0:e[n],i))}),Object.keys(e||{}).forEach(function(t){o.has(t)||o.set(t,r.normalizeField({name:t,label:t},null==e?void 0:e[t],i))}),Array.from(o.values())}},{key:"normalizeField",value:function(t,e,n){var r=null!=t&&t.constraints&&"object"===o(t.constraints)?t.constraints:{},i=this.resolveRequired(t,r),a=this.normalizeOptions((null==t?void 0:t.lov)||(null==t?void 0:t.options)||r.lov),l=(null==t?void 0:t.formFieldType)||(null==t?void 0:t.type)||r.type||this.inferType(e),s=this.normalizeFieldType(l,a);return{name:String((null==t?void 0:t.name)||""),label:String((null==t?void 0:t.label)||(null==t?void 0:t.name)||""),type:s,required:i,readonly:!(null==t||!t.readonly)||n.has(String((null==t?void 0:t.name)||"")),min:this.resolveConstraint(t,r,"min"),max:this.resolveConstraint(t,r,"max"),step:this.resolveConstraint(t,r,"step"),minLength:this.resolveConstraint(t,r,"minLength"),maxLength:this.resolveConstraint(t,r,"maxLength"),pattern:this.resolveConstraint(t,r,"pattern"),placeholder:String((null==t?void 0:t.placeholder)||r.placeholder||""),options:a}}},{key:"resolveRequired",value:function(t,e){return"boolean"==typeof(null==t?void 0:t.required)?t.required:"boolean"==typeof(null==e?void 0:e.required)?e.required:(!0===(null==t?void 0:t.optional)||null==e||e.optional,!1)}},{key:"resolveConstraint",value:function(t,e,n){return null!=(null==t?void 0:t[n])?t[n]:null!=(null==e?void 0:e[n])?e[n]:"min"===n&&Array.isArray(null==e?void 0:e.range)?e.range[0]:"max"===n&&Array.isArray(null==e?void 0:e.range)?e.range[1]:null}},{key:"normalizeFieldType",value:function(t,e){var n=String(t||"text").trim().toLowerCase();return!e.length||"select"!==n&&"lov"!==n&&"text"!==n?"textarea"===n?"textarea":"checkbox"===n||"boolean"===n?"boolean":"number"===n||"range"===n?"number":"date"===n||"datetime-local"===n||"time"===n||"email"===n||"url"===n?n:"text":"select"}},{key:"normalizeOptions",value:function(t){return Array.isArray(t)?t.map(function(t){return t&&"object"===o(t)?{value:null!=t.value?t.value:t.id,label:null!=t.label?t.label:t.value}:{value:t,label:t}}).filter(function(t){return null!=t.value}):[]}},{key:"inferType",value:function(t){return"boolean"==typeof t?"boolean":"number"==typeof t?"number":"text"}},{key:"createControl",value:function(t,e){if("select"===t.type){var n=document.createElement("select");if(!t.required){var r=document.createElement("option");r.value="",r.textContent="-- Select --",n.appendChild(r)}return t.options.forEach(function(t){var e=document.createElement("option");e.value=null==t.value?"":String(t.value),e.textContent=null==t.label?"":String(t.label),n.appendChild(e)}),n.value=null==e?"":String(e),this.applyControlConstraints(n,t),n}if("textarea"===t.type){var i=document.createElement("textarea");return i.value=null==e?"":String(e),this.applyControlConstraints(i,t),i}var o=document.createElement("input");return"boolean"===t.type?(o.type="checkbox",o.checked=!!e):(o.type="number"===t.type?"number":t.type,o.value=null==e?"":String(e)),this.applyControlConstraints(o,t),o}},{key:"applyControlConstraints",value:function(t,e){e.required&&(t.required=!0),e.placeholder&&"placeholder"in t&&(t.placeholder=e.placeholder),null!=e.min&&"min"in t&&(t.min=String(e.min)),null!=e.max&&"max"in t&&(t.max=String(e.max)),null!=e.step&&"step"in t&&(t.step=String(e.step)),null!=e.minLength&&"minLength"in t&&(t.minLength=Number(e.minLength)),null!=e.maxLength&&"maxLength"in t&&(t.maxLength=Number(e.maxLength)),e.pattern&&"pattern"in t&&"select"!==e.type&&(t.pattern=String(e.pattern))}},{key:"readControlValue",value:function(t,e){if("boolean"===e.type)return!!t.checked;if("number"===e.type){var n=String(t.value||"").trim();if(!n)return null;var r=Number(n);return Number.isNaN(r)?null:r}return t.value}},{key:"validateFields",value:function(t,e){var n=this,r=!0;return t.forEach(function(t){var e=t.field,i=t.control,o=t.errorEl;if(n.setFieldError(o,""),!e.readonly){var a=n.readControlValue(i,e);if(e.required&&(null==a||""===a||Array.isArray(a)&&0===a.length))return r=!1,void n.setFieldError(o,"".concat(e.label," is required."));i.checkValidity()||(r=!1,n.setFieldError(o,i.validationMessage||"Invalid value for ".concat(e.label,".")))}}),e&&(e.textContent=r?"":"Please fix validation errors before saving."),r}},{key:"setFieldError",value:function(t,e){t&&(t.textContent=String(e||""))}},{key:"stringifyValue",value:function(t){return null==t?"":"boolean"==typeof t?t?"true":"false":String(t)}},{key:"clone",value:function(t){return JSON.parse(JSON.stringify(null==t?{}:t))}}],e&&d(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}()},458(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,c(r.key),r)}}function s(t,e,n){return e&&l(t.prototype,e),n&&l(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(t,e,n){return(e=c(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}n.d(e,{T:()=>d});var d=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,t),this.state=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach(function(e){u(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},e),this.listeners=new Set,this.id=n.id||"hub_".concat(t.nextId++),this.proxyCache=new WeakMap,this.proxy=this.createProxy(this.state,[]),t.stores.set(this.id,this)}return s(t,[{key:"createProxy",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(null==t||"object"!==i(t))return t;if(this.proxyCache.has(t))return this.proxyCache.get(t);var n=this,r=new Proxy(t,{get:function(t,r){var o=t[r];return null!=o&&"object"===i(o)?n.createProxy(o,e.concat(String(r))):o},set:function(t,r,i){var o=t[r];t[r]=i;var a=e.concat(String(r)).join(".");return n.notify(a,i,o),!0},deleteProperty:function(t,r){if(!(r in t))return!0;var i=t[r];delete t[r];var o=e.concat(String(r)).join(".");return n.notify(o,void 0,i),!0}});return this.proxyCache.set(t,r),r}},{key:"subscribe",value:function(t){var e=this,n={callback:t,selector:arguments.length>1&&void 0!==arguments[1]?arguments[1]:null};return this.listeners.add(n),function(){return e.listeners.delete(n)}}},{key:"notify",value:function(t,e,n){var r=this;this.listeners.forEach(function(i){var o=i.callback,a=i.selector;a&&!a(r.proxy,{path:t,value:e,oldValue:n})||o(r.proxy,{path:t,value:e,oldValue:n})})}},{key:"batch",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.entries(n).forEach(function(n){var i,o,a=(o=2,function(t){if(Array.isArray(t))return t}(i=n)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){u=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(i,o)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}(i,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=a[0],s=a[1];t.setByPath(e.proxy,l,s)})}},{key:"getSnapshot",value:function(){return JSON.parse(JSON.stringify(this.state))}}],[{key:"create",value:function(){return new t(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}},{key:"get",value:function(t){return this.stores.get(t)||null}},{key:"ensure",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.defaultStoreId,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.get(t)||this.create(e,{id:t})}},{key:"destroy",value:function(t){var e=this.get(t);return!!e&&(e.listeners.clear(),this.stores.delete(t),!0)}},{key:"parsePath",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t&&"string"==typeof t?t.replace(/\[(\w+)\]/g,".$1").split(".").map(function(t){return t.trim()}).filter(Boolean):[]}},{key:"getByPath",value:function(t,e){return(Array.isArray(e)?e:this.parsePath(e)).reduce(function(t,e){return null==t?void 0:t[e]},t)}},{key:"setByPath",value:function(t,e,n){var r=Array.isArray(e)?e:this.parsePath(e);if(!r.length)return!1;for(var o=t,a=0;a<r.length-1;a+=1){var l=r[a];null!=o[l]&&"object"===i(o[l])||(o[l]={}),o=o[l]}return o[r[r.length-1]]=n,!0}},{key:"publish",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.defaultStoreId;if(!t||"string"!=typeof t)return!1;var r=this.ensure(n);return this.setByPath(r.proxy,t,e)}}])}();u(d,"stores",new Map),u(d,"nextId",1),u(d,"defaultStoreId","global");var f=function(){return s(function t(){a(this,t)},null,[{key:"isInput",value:function(t){return"INPUT"===t.tagName||"TEXTAREA"===t.tagName||"SELECT"===t.tagName}},{key:"readBoundValue",value:function(t,e){return e?d.getByPath(t.proxy,e):t.proxy}},{key:"writeBoundValue",value:function(t,e,n){e&&d.setByPath(t.proxy,e,n)}},{key:"renderElement",value:function(t,e){if(this.isInput(t)){var n=null==e?"":String(e);t.value!==n&&(t.value=n)}else t.textContent=null==e?"":String(e)}},{key:"disconnectElement",value:function(t){var e,n=this.bindings.get(t);n&&(t.removeEventListener("input",n.onInput),null===(e=n.unsubscribe)||void 0===e||e.call(n),this.bindings.delete(t))}},{key:"connectElement",value:function(t){var e=this;this.disconnectElement(t);var n=t.dataset.state,r=t.dataset.statePath||"",i=d.get(n);if(i){var o=function(){return e.renderElement(t,e.readBoundValue(i,r))},a=function(){return e.writeBoundValue(i,r,t.value)},l=i.subscribe(function(t,e){(!r||e.path===r||e.path.startsWith("".concat(r,"."))||r.startsWith("".concat(e.path,".")))&&o()});this.isInput(t)&&t.addEventListener("input",a),this.bindings.set(t,{onInput:a,unsubscribe:l}),o()}}},{key:"connect",value:function(){var t=this;(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).querySelectorAll("[data-state]").forEach(function(e){return t.connectElement(e)})}},{key:"disconnect",value:function(){var t=this;(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).querySelectorAll("[data-state]").forEach(function(e){return t.disconnectElement(e)})}}])}();u(f,"bindings",new WeakMap),d.subscribe=function(t,e,n){if("function"==typeof t){var r="string"==typeof e?e:d.defaultStoreId;return d.ensure(r).subscribe(t)}var i=String(t||"").trim(),o=e,a="string"==typeof n?n:d.defaultStoreId;if(!i||"function"!=typeof o)return function(){};var l=d.ensure(a),s=d.getByPath(l.proxy,i);return o(s,{path:i,initial:!0}),l.subscribe(function(t,e){var n=(null==e?void 0:e.path)||"";if(n===i||n.startsWith("".concat(i,"."))||i.startsWith("".concat(n,"."))){var r=d.getByPath(t,i);o(r,e)}})},"undefined"!=typeof window&&(window.StateHub=d,window.StateConnector=f)},531(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function l(n,r,i,a){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return o(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,o(h,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(h),o(h,a,"Generator"),o(h,r,function(){return this}),o(h,"toString",function(){return"[object Generator]"}),(i=function(){return{w:l,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function l(t){a(o,r,i,l,s,"next",t)}function s(t){a(o,r,i,l,s,"throw",t)}l(void 0)})}}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,c(r.key),r)}}function u(t,e,n){return(e=c(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.d(e,{_:()=>d});var d=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"getCurrentScriptBase",value:function(){var t=document.currentScript,e=(null==t?void 0:t.getAttribute("src"))||"";return e?e.replace(/holi\.js(\?.*)?$/i,""):""}},{key:"resolveCoreUrls",value:function(){var t=this.getCurrentScriptBase(),e=new Set(["/dist/components.html","/components.html","/dist/templates.html","/templates.html","/dist/holi.html","/holi.html"]);return t&&(e.add("".concat(t,"components.html")),e.add("".concat(t,"templates.html")),e.add("".concat(t,"holi.html"))),Array.from(e)}},{key:"resolveLayoutUrls",value:function(){var t=this.getCurrentScriptBase(),e=new Set(["/dist/layouts.html","/layouts.html"]);return t&&e.add("".concat(t,"layouts.html")),Array.from(e)}},{key:"hasTemplate",value:function(t){return this.templates.has(t)||!!document.getElementById(t)}},{key:"getTemplate",value:function(t){var e=this.templates.get(t);if(e instanceof HTMLTemplateElement)return e;var n=document.getElementById(t);return n instanceof HTMLTemplateElement?n:null}},{key:"getLayout",value:function(t){var e=this.layouts.get(t);if(e instanceof HTMLTemplateElement)return e.content.cloneNode(!0);var n=document.querySelector('template[data-layout="'.concat(t,'"]'))||document.getElementById("page-layout-".concat(t))||document.getElementById(t);return n instanceof HTMLTemplateElement?n.content.cloneNode(!0):null}},{key:"registerTemplate",value:function(t){t instanceof HTMLTemplateElement&&t.id&&this.templates.set(t.id,t.cloneNode(!0))}},{key:"registerLayout",value:function(t){var e=this;if(t instanceof HTMLTemplateElement){var n=[],r=String(t.getAttribute("data-layout")||"").trim();r&&n.push(r);var i=String(t.id||"").trim().match(/^page-layout-(.+)$/);i&&i[1]&&n.push(i[1]),n.forEach(function(n){e.layouts.has(n)||e.layouts.set(n,t.cloneNode(!0))})}}},{key:"ingestHtml",value:function(t){var e=this,n=(new DOMParser).parseFromString(String(t||""),"text/html");Array.from(n.querySelectorAll("template[id], template[data-layout]")).forEach(function(t){t instanceof HTMLTemplateElement&&(e.registerTemplate(t),e.registerLayout(t))})}},{key:"loadBundle",value:(a=l(i().m(function t(e){var n,r,o,a=this,s=arguments;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(n=s.length>1&&void 0!==s[1]?s[1]:e,!this.loading.has(n)){t.n=1;break}return t.a(2,this.loading.get(n));case 1:return r=l(i().m(function t(){var n,r;return i().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,fetch(e,{credentials:"same-origin"});case 1:if((n=t.v).ok){t.n=2;break}throw new Error("Failed to load template bundle from ".concat(e));case 2:return t.n=3,n.text();case 3:r=t.v,a.ingestHtml(r);case 4:return t.a(2)}},t)}))(),this.loading.set(n,r),t.p=2,t.n=3,r;case 3:t.n=5;break;case 4:throw t.p=4,o=t.v,this.loading.delete(n),o;case 5:return t.a(2)}},t,this,[[2,4]])})),function(t){return a.apply(this,arguments)})},{key:"loadFirstAvailable",value:(o=l(i().m(function t(e,n){var r,o;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:r=0;case 1:if(!(r<e.length)){t.n=7;break}return o=e[r],t.p=2,t.n=3,this.loadBundle(o,o);case 3:if(n&&!n()){t.n=4;break}return t.a(2);case 4:t.n=6;break;case 5:t.p=5,t.v;case 6:r+=1,t.n=1;break;case 7:return t.a(2)}},t,this,[[2,5]])})),function(t,e){return o.apply(this,arguments)})},{key:"ensureCoreTemplates",value:(r=l(i().m(function t(){var e=this;return i().w(function(t){for(;;)switch(t.n){case 0:if(!this.hasTemplate("tabs")){t.n=1;break}return t.a(2);case 1:return t.n=2,this.loadFirstAvailable(this.resolveCoreUrls(),function(){return e.hasTemplate("tabs")});case 2:if(this.hasTemplate("tabs")){t.n=3;break}throw new Error("Holi template library not found (components.html)");case 3:return t.a(2)}},t,this)})),function(){return r.apply(this,arguments)})},{key:"ensureLayoutTemplates",value:(n=l(i().m(function t(){var e=this;return i().w(function(t){for(;;)switch(t.n){case 0:if(!(this.layouts.size>0)){t.n=1;break}return t.a(2);case 1:return t.n=2,this.loadFirstAvailable(this.resolveLayoutUrls(),function(){return e.layouts.size>0});case 2:return t.a(2)}},t,this)})),function(){return n.apply(this,arguments)})}],e&&s(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r,o,a}();u(d,"templates",new Map),u(d,"layouts",new Map),u(d,"loading",new Map),"undefined"!=typeof window&&(window.HoliTemplateRegistry=d)},573(t,e,n){"use strict";function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach(function(e){l(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,s(r.key),r)}}function l(t,e,n){return(e=s(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}n.d(e,{D:()=>u});var u=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"normalizeName",value:function(t){var e=String(t||"").trim().toLowerCase();return e?this.aliases.get(e)||e:""}},{key:"parseToken",value:function(t){var e=String(t||"").trim();if(!e)return{name:"",param:""};var n=e.indexOf(":");return-1===n?{name:this.normalizeName(e),param:""}:{name:this.normalizeName(e.slice(0,n)),param:e.slice(n+1).trim()}}},{key:"parseList",value:function(t){return t?Array.isArray(t)?t.map(function(t){return String(t||"").trim()}).filter(Boolean):String(t).split(/[,\s]+/g).map(function(t){return t.trim()}).filter(Boolean):[]}},{key:"resolveListFromElement",value:function(t){if(!t||!t.getAttribute)return[];var e=t.getAttribute("data-validator"),n=t.getAttribute("data-validators");return this.parseList(e||n||"")}},{key:"register",value:function(t,e){var n=this.normalizeName(t);if(!n)throw new Error("Validator name is required");if("function"!=typeof e)throw new Error("Validator must be a function");try{var r=e("test",void 0,{});if(!("boolean"==typeof r||r&&"object"===o(r)&&"boolean"==typeof r.valid))throw new Error("Validator must return boolean or { valid, message }")}catch(t){throw new Error('Invalid validator "'.concat(n,'": ').concat(t.message||t))}this.customValidators.set(n,e)}},{key:"unregister",value:function(t){var e=this.normalizeName(t);return!!e&&this.customValidators.delete(e)}},{key:"validateToken",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.parseToken(t),i=r.name,a=r.param;if(!i)return{valid:!0,message:"",token:""};var l=this.customValidators.get(i)||this.builtInValidators.get(i);if(!l)return{valid:!0,message:"",token:i};var s=this.buildValidationContext(n),u=this.resolveParam(a,s);try{var c=l(e,u,s);return"boolean"==typeof c?{valid:c,message:c?"":"Invalid value.",token:i}:c&&"object"===o(c)&&"boolean"==typeof c.valid?{valid:c.valid,message:c.valid?"":String(c.message||"Invalid value."),token:i}:{valid:!1,message:'Validator "'.concat(i,'" returned invalid result.'),token:i}}catch(t){return{valid:!1,message:'Validator "'.concat(i,'" failed.'),token:i}}}},{key:"validateValue",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.parseList(e),i=0;i<r.length;i+=1){var o=this.validateToken(r[i],t,n);if(!o.valid)return o}return{valid:!0,message:"",token:""}}},{key:"validateElement",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t||void 0===t.value)return{valid:!0,message:"",token:""};var n=this.resolveListFromElement(t),r=this.validateValue(t.value,n,i({element:t},e));return"function"==typeof t.setCustomValidity&&t.setCustomValidity(r.valid?"":r.message),t.setAttribute("aria-invalid",r.valid?"false":"true"),r.valid?t.removeAttribute("data-validation-error"):t.setAttribute("data-validation-error",r.message||"Invalid value."),r}},{key:"bindNative",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;e&&e.querySelectorAll&&e.querySelectorAll("[data-validator], [data-validators]").forEach(function(e){if(e instanceof HTMLElement&&!t.boundElements.has(e)){var n=function(){return t.validateElement(e)};e.addEventListener("input",n),e.addEventListener("change",n),e.addEventListener("blur",n),t.boundElements.add(e),n()}})}},{key:"enableAutoBind",value:function(){var t=this;if(!this.nativeValidationBound&&"undefined"!=typeof document){this.nativeValidationBound=!0;var e=function(){return t.bindNative(document)};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e,{once:!0}):e()}}},{key:"buildValidationContext",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=i(i({},"undefined"!=typeof window&&window.appState||{}),"undefined"!=typeof window&&window.pageContext||{}),r=e.element,o="undefined"!=typeof document?document:null,a=(null==r||null===(t=r.closest)||void 0===t?void 0:t.call(r,"form"))||o,l=this.readModelState(a);return i(i(i({},n),l),{},{model:l},e)}},{key:"readModelState",value:function(t){var e=this,n={};return t&&t.querySelectorAll?(t.querySelectorAll("[data-model]").forEach(function(t){var r=String(t.getAttribute("data-model")||"").trim();r&&e.setPathValue(n,r,t.value)}),n):n}},{key:"setPathValue",value:function(t,e,n){var r=String(e||"").replace(/\[(\w+)\]/g,".$1").split(".").filter(Boolean);if(r.length){for(var i=t,a=0;a<r.length-1;a+=1){var l=r[a];null!=i[l]&&"object"===o(i[l])||(i[l]={}),i=i[l]}i[r[r.length-1]]=n}}},{key:"getPathValue",value:function(t,e){if(t&&e){var n=String(e).replace(/\[(\w+)\]/g,".$1");if(/^[a-zA-Z_$][\w$]*(\.[a-zA-Z_$][\w$]*|\.\d+)*$/.test(n))return n.split(".").reduce(function(t,e){return null==t?void 0:t[e]},t)}}},{key:"resolveParam",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=String(t||"").trim();if(!n)return n;var r=n.match(/^@\{(.+)\}$/);if(r){var i=r[1].trim();try{var o="undefined"!=typeof window&&window.ELEngine||("undefined"!=typeof ELEngine?ELEngine:null);if(o)return new o(e).evaluate(i)}catch(t){}return this.getPathValue(e,i)}if(/^(true|false)$/i.test(n))return"true"===n.toLowerCase();if(/^-?\d+(\.\d+)?$/.test(n))return Number(n);if(n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))return n.slice(1,-1);if(/^[a-zA-Z_$][\w$]*(\.[a-zA-Z_$][\w$]*|\[\w+\])*$/.test(n)){var a=this.getPathValue(e,n);if(void 0!==a)return a}return n}}],null&&a(t.prototype,null),e&&a(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();l(u,"customValidators",new Map),l(u,"nativeValidationBound",!1),l(u,"boundElements",new WeakSet),l(u,"builtInValidators",new Map([["required",function(t){var e=(null==t?"":String(t)).trim().length>0;return{valid:e,message:e?"":"This field is required."}}],["email",function(t){var e=null==t?"":String(t).trim(),n=!e||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);return{valid:n,message:n?"":"Enter a valid email address."}}],["eq",function(t,e){var n=(null==t?"":String(t))===(null==e?"":String(e));return{valid:n,message:n?"":"Values do not match."}}],["minlength",function(t,e){var n=null==t?"":String(t),r=Number(e);if(!Number.isFinite(r))return{valid:!0,message:""};var i=n.length>=r;return{valid:i,message:i?"":"Minimum length is ".concat(r,".")}}],["maxlength",function(t,e){var n=null==t?"":String(t),r=Number(e);if(!Number.isFinite(r))return{valid:!0,message:""};var i=n.length<=r;return{valid:i,message:i?"":"Maximum length is ".concat(r,".")}}],["pattern",function(t,e){var n=null==t?"":String(t),r=String(e||"").trim();if(!r)return{valid:!0,message:""};try{var i=new RegExp(r).test(n);return{valid:i,message:i?"":"Value does not match expected pattern."}}catch(t){return{valid:!0,message:""}}}]])),l(u,"aliases",new Map([["required","required"],["email","email"],["eq","eq"],["equals","eq"],["pattern","pattern"],["minlength","minlength"],["min-length","minlength"],["min_length","minlength"],["maxlength","maxlength"],["max-length","maxlength"],["max_length","maxlength"]])),"undefined"!=typeof window&&(window.Validator=u)},194(t,e,n){var r={"./accordion.js":892,"./backtotop.js":951,"./block.js":935,"./breadcrumbs.js":400,"./button.js":92,"./calendar.js":110,"./carousel.js":838,"./chart.js":546,"./checkbox.js":673,"./component.js":812,"./datagrid.js":40,"./datatable.js":994,"./dialog.js":704,"./drawer.js":145,"./dropdown.js":257,"./form.js":734,"./gallery.js":120,"./input.js":390,"./layout.js":166,"./loader.js":819,"./localeswitcher.js":833,"./menubar.js":622,"./offline.js":641,"./page.js":582,"./panel.js":511,"./progress.js":295,"./radio.js":101,"./rating.js":953,"./refresh.js":285,"./region.js":108,"./search.js":12,"./select.js":796,"./statscard.js":911,"./tabs.js":396,"./textarea.js":618,"./themeswitcher.js":736,"./toast.js":9,"./tree.js":648,"./treepanel.js":712,"./wizard.js":191};function i(t){var e=o(t);return n(e)}function o(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}i.keys=function(){return Object.keys(r)},i.resolve=o,t.exports=i,i.id=194}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{"use strict";var t=n(904),e=n(396),r=n(994),i=n(40),o=n(257),a=n(796),l=n(390),s=n(673),u=n(734),c=n(101),d=n(953),f=n(92),h=n(166),p=n(819),v=n(641),y=n(285),m=n(582),b=n(935),g=n(511),w=n(108),S=n(892),k=n(110),E=n(838),O=n(400),C=n(951),A=n(546),P=n(704),j=n(9),T=n(145),x=n(120),L=n(622),I=n(648),R=n(712),N=n(12),D=n(833),M=n(736),q=n(191),_=n(911);function F(t){return F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},F(t)}function B(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return H(u,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),u}var a={};function l(){}function s(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(H(e={},r,function(){return this}),e),d=u.prototype=l.prototype=Object.create(c);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,H(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=u,H(d,"constructor",u),H(u,"constructor",s),s.displayName="GeneratorFunction",H(u,i,"GeneratorFunction"),H(d),H(d,i,"Generator"),H(d,r,function(){return this}),H(d,"toString",function(){return"[object Generator]"}),(B=function(){return{w:o,m:f}})()}function H(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}H=function(t,e,n,r){function o(e,n){H(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},H(t,e,n,r)}function G(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function V(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){G(o,r,i,a,l,"next",t)}function l(t){G(o,r,i,a,l,"throw",t)}a(void 0)})}}function z(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function U(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?z(Object(n),!0).forEach(function(e){Q(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function W(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,K(r.key),r)}}function Q(t,e,n){return(e=K(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function K(t){var e=function(t){if("object"!=F(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=F(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==F(e)?e:e+""}var $=new Set(["fetch","push","sync","periodicsync"]),J=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.cacheName=e.cacheName||"html-first-lib-v3-2026",this.offlineFallbackUrl=e.offlineFallbackUrl||"/offline.html",this.remoteHandlers=new Map,this.runtimeHandlers=new Map,this.requestQueue=[],this.responseQueue=[],this.networkProfile=this.readNetworkProfile(e.networkProfile),this.registration=null,this.started=!1,this.clientMessagingStarted=!1,this.handleMessageEvent=this.handleMessageEvent.bind(this),this.handleFetchEvent=this.handleFetchEvent.bind(this),this.handlePushEvent=this.handlePushEvent.bind(this),this.handleSyncEvent=this.handleSyncEvent.bind(this),this.handlePeriodicSyncEvent=this.handlePeriodicSyncEvent.bind(this),this.handleClientMessage=this.handleClientMessage.bind(this),this.handleConnectionChange=this.handleConnectionChange.bind(this)}return e=t,n=[{key:"isWorker",value:function(){return t.isServiceWorkerScope()}},{key:"isClient",value:function(){return t.isWindowScope()}},{key:"start",value:function(){return!this.isWorker()||this.started||(self.addEventListener("message",this.handleMessageEvent),self.addEventListener("fetch",this.handleFetchEvent),self.addEventListener("push",this.handlePushEvent),self.addEventListener("sync",this.handleSyncEvent),self.addEventListener("periodicsync",this.handlePeriodicSyncEvent),this.started=!0),this}},{key:"startClientMessaging",value:function(){return this.isClient()&&!this.clientMessagingStarted&&"serviceWorker"in navigator?(navigator.serviceWorker.addEventListener("message",this.handleClientMessage),this.observeNetworkQuality(),this.clientMessagingStarted=!0,this):this}},{key:"on",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=String(t||"").toLowerCase();if(!$.has(i))throw new Error("Unsupported service-worker event type: ".concat(i));if("function"!=typeof n)throw new Error("Service worker runtime handler must be a function");var o=this.normalizeHandler({name:e,type:i,capabilities:r.capabilities||[],handler:U(U({},r),{},{runtimeHandler:n})});return this.runtimeHandlers.set(this.toKey(o.type,o.name),o),this}},{key:"off",value:function(t,e){var n=this.toKey(t,e);return this.runtimeHandlers.delete(n),this.remoteHandlers.delete(n),this}},{key:"registerHandlers",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!this.isClient())return Promise.resolve(!1);this.startClientMessaging();var n=(Array.isArray(e)?e:[e]).map(function(e){return t.normalizeHandler(e)}).filter(Boolean);return n.length?this.postToServiceWorker({type:"REGISTER_SW_HANDLERS",handlers:n}):Promise.resolve(!1)}},{key:"unregisterHandler",value:function(t,e){return this.isClient()?this.postToServiceWorker({type:"UNREGISTER_SW_HANDLER",eventType:String(t||"").toLowerCase(),name:String(e||"")}):Promise.resolve(!1)}},{key:"clearHandlers",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return this.isClient()?this.postToServiceWorker({type:"CLEAR_SW_HANDLERS",eventType:t?String(t).toLowerCase():null}):Promise.resolve(!1)}},{key:"registerWorker",value:(k=V(B().m(function t(){var e,n,r=arguments;return B().w(function(t){for(;;)switch(t.n){case 0:if(e=r.length>0&&void 0!==r[0]?r[0]:"/sw.js",n=r.length>1&&void 0!==r[1]?r[1]:{},this.isClient()&&"serviceWorker"in navigator){t.n=1;break}return t.a(2,null);case 1:return t.n=2,navigator.serviceWorker.register(e,n);case 2:return this.registration=t.v,this.startClientMessaging(),this.sendNetworkProfile(),t.a(2,this.registration)}},t,this)})),function(){return k.apply(this,arguments)})},{key:"ready",value:(S=V(B().m(function t(){return B().w(function(t){for(;;)switch(t.n){case 0:if(this.isClient()&&"serviceWorker"in navigator){t.n=1;break}return t.a(2,null);case 1:return t.a(2,navigator.serviceWorker.ready)}},t,this)})),function(){return S.apply(this,arguments)})},{key:"postToServiceWorker",value:(w=V(B().m(function t(e){var n,r,i;return B().w(function(t){for(;;)switch(t.n){case 0:if(i=this.registration){t.n=2;break}return t.n=1,this.ready();case 1:i=t.v;case 2:if(n=i){t.n=3;break}return t.a(2,!1);case 3:if(r=navigator.serviceWorker.controller||n.active||n.waiting||n.installing){t.n=4;break}return t.a(2,!1);case 4:return r.postMessage(e),t.a(2,!0)}},t,this)})),function(t){return w.apply(this,arguments)})},{key:"registerPeriodicSync",value:(g=V(B().m(function t(e){var n,r,i,o,a=arguments;return B().w(function(t){for(;;)switch(t.n){case 0:if(r=a.length>1&&void 0!==a[1]?a[1]:{},o=this.registration){t.n=2;break}return t.n=1,this.ready();case 1:o=t.v;case 2:if(null!=(i=o)&&null!==(n=i.periodicSync)&&void 0!==n&&n.register){t.n=3;break}return t.a(2,!1);case 3:return t.n=4,i.periodicSync.register(String(e||"holi-periodic-sync"),r);case 4:return t.a(2,!0)}},t,this)})),function(t){return g.apply(this,arguments)})},{key:"queueRequest",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.isClient()?this.postToServiceWorker({type:"QUEUE_REQUEST",task:t}):Promise.resolve(!1)}},{key:"queueResponse",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.isClient()?this.postToServiceWorker({type:"QUEUE_RESPONSE",entry:t}):Promise.resolve(!1)}},{key:"flushQueues",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.isClient()?this.postToServiceWorker({type:"FLUSH_QUEUES",tag:String(t||"")}):Promise.resolve(!1)}},{key:"observeNetworkQuality",value:function(){var t,e;if(this.isClient()){var n=navigator.connection||navigator.mozConnection||navigator.webkitConnection;n&&(null===(t=n.removeEventListener)||void 0===t||t.call(n,"change",this.handleConnectionChange),null===(e=n.addEventListener)||void 0===e||e.call(n,"change",this.handleConnectionChange),this.handleConnectionChange())}}},{key:"handleConnectionChange",value:function(){this.networkProfile=this.readNetworkProfile(),this.dispatchClientEvent("network-profile",{profile:this.networkProfile}),this.sendNetworkProfile()}},{key:"sendNetworkProfile",value:function(){return this.isClient()?this.postToServiceWorker({type:"UPDATE_NETWORK_PROFILE",profile:this.networkProfile}):Promise.resolve(!1)}},{key:"handleClientMessage",value:function(t){var e=(null==t?void 0:t.data)||{};String(e.type||"").startsWith("sw:")&&this.dispatchClientEvent(String(e.type).slice(3),e.detail||{})}},{key:"dispatchClientEvent",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"undefined"!=typeof document&&document.dispatchEvent(new CustomEvent("sw:".concat(t),{detail:e}))}},{key:"handleMessageEvent",value:function(t){var e,n,r=this,i=(null==t?void 0:t.data)||{},o=i.type;if(o){if("REGISTER_SW_HANDLERS"===o)return(Array.isArray(i.handlers)?i.handlers:[]).forEach(function(t){var e=r.normalizeHandler(t);e&&r.remoteHandlers.set(r.toKey(e.type,e.name),e)}),this.emitToClients("handlers-registered",{count:this.remoteHandlers.size});if("UNREGISTER_SW_HANDLER"===o)return this.remoteHandlers.delete(this.toKey(i.eventType,i.name||i.id)),this.emitToClients("handler-unregistered",{type:i.eventType,name:i.name||i.id});if("CLEAR_SW_HANDLERS"===o)return i.eventType?Array.from(this.remoteHandlers.keys()).forEach(function(t){t.startsWith("".concat(i.eventType,":"))&&r.remoteHandlers.delete(t)}):this.remoteHandlers.clear(),this.emitToClients("handlers-cleared",{type:i.eventType||"all"});if("SKIP_WAITING"===o)return self.skipWaiting();if("UPDATE_NETWORK_PROFILE"!==o)if("QUEUE_REQUEST"!==o&&"QUEUE_SYNC_TASK"!==o){if("QUEUE_RESPONSE"!==o)return"FLUSH_QUEUES"===o?null===(e=t.waitUntil)||void 0===e?void 0:e.call(t,this.flushAllQueues(String(i.tag||""))):"SHOW_NOTIFICATION"===o?null===(n=t.waitUntil)||void 0===n?void 0:n.call(t,this.showNotificationFromPayload(i.payload||{})):void 0;i.entry&&this.enqueueResponse(i.entry)}else i.task&&this.enqueueRequest(i.task);else this.networkProfile=this.readNetworkProfile(i.profile)}}},{key:"handleFetchEvent",value:function(t){var e=this.findRuntimeHandler("fetch",t);if(e)return t.respondWith(Promise.resolve(e.handler.runtimeHandler(t,e,this)));var n=this.findRemoteHandler("fetch",t);if(n)return t.respondWith(this.executeGenericHandler(n,t));t.respondWith(this.defaultFetch(t.request))}},{key:"handlePushEvent",value:function(t){var e=this.findRuntimeHandler("push",t);if(e)return t.waitUntil(Promise.resolve(e.handler.runtimeHandler(t,e,this)));var n=this.findRemoteHandler("push",t);if(n)return t.waitUntil(this.executeGenericHandler(n,t));t.waitUntil(self.registration.showNotification("Update Available"))}},{key:"handleSyncEvent",value:function(t){var e=this.findRuntimeHandler("sync",t);if(e)return t.waitUntil(Promise.resolve(e.handler.runtimeHandler(t,e,this)));var n=this.findRemoteHandler("sync",t);n&&t.waitUntil(this.executeGenericHandler(n,t))}},{key:"handlePeriodicSyncEvent",value:function(t){var e=this.findRuntimeHandler("periodicsync",t);if(e)return t.waitUntil(Promise.resolve(e.handler.runtimeHandler(t,e,this)));var n=this.findRemoteHandler("periodicsync",t);n&&t.waitUntil(this.executeGenericHandler(n,t))}},{key:"executeGenericHandler",value:(b=V(B().m(function t(e,n){return B().w(function(t){for(;;)switch(t.n){case 0:if("fetch"!==e.type){t.n=1;break}return t.a(2,this.executeFetchHandler(e,n));case 1:if("push"!==e.type){t.n=2;break}return t.a(2,this.executePushHandler(e,n));case 2:if("sync"!==e.type){t.n=3;break}return t.a(2,this.executeSyncHandler(e,n));case 3:if("periodicsync"!==e.type){t.n=4;break}return t.a(2,this.executePeriodicSyncHandler(e,n));case 4:return t.a(2,null)}},t,this)})),function(t,e){return b.apply(this,arguments)})},{key:"executeFetchHandler",value:(m=V(B().m(function t(e,n){var r,i,o,a,l;return B().w(function(t){for(;;)switch(t.p=t.n){case 0:if(r=n.request,e.capabilitySet.has("adaptive-data-loading")&&(r=this.applyAdaptiveRequest(r,e)),!e.capabilitySet.has("network-throttling")){t.n=1;break}return t.n=1,this.applyNetworkThrottling(e);case 1:if(t.p=1,!e.capabilitySet.has("caching")){t.n=3;break}return t.n=2,this.executeCachingHandler(e,r);case 2:a=t.v,t.n=5;break;case 3:return t.n=4,this.executeFetchStrategy(e,r);case 4:a=t.v;case 5:if(i=a,!e.capabilitySet.has("response-queueing")){t.n=6;break}return t.n=6,this.captureResponseQueue(e,r,i);case 6:return t.a(2,i);case 7:if(t.p=7,l=t.v,!e.capabilitySet.has("request-queueing")){t.n=9;break}return t.n=8,this.queueFailedRequest(e,r,l);case 8:if(!(o=t.v)){t.n=9;break}return t.a(2,o);case 9:throw l;case 10:return t.a(2)}},t,this,[[1,7]])})),function(t,e){return m.apply(this,arguments)})},{key:"executePushHandler",value:function(t,e){var n,r,i,o,a,l=this.extractPushPayload(e);return this.showNotificationFromPayload({title:l.title||(null===(n=t.handler.notification)||void 0===n?void 0:n.title)||"Update Available",body:l.body||(null===(r=t.handler.notification)||void 0===r?void 0:r.body)||"",icon:l.icon||(null===(i=t.handler.notification)||void 0===i?void 0:i.icon),badge:l.badge||(null===(o=t.handler.notification)||void 0===o?void 0:o.badge),data:l.data||(null===(a=t.handler.notification)||void 0===a?void 0:a.data)})}},{key:"executeSyncHandler",value:(y=V(B().m(function t(e,n){var r,i;return B().w(function(t){for(;;)switch(t.n){case 0:if(r=n.tag||"",!e.match.tag||e.match.tag===r){t.n=1;break}return t.a(2);case 1:return t.n=2,this.flushAllQueues(r);case 2:if((i=e.handler.sync||{}).endpoint){t.n=3;break}return t.a(2);case 3:return t.n=4,fetch(i.endpoint,{method:i.method||"POST",headers:i.headers||{"Content-Type":"application/json"},body:i.body?JSON.stringify(i.body):void 0});case 4:return t.a(2)}},t,this)})),function(t,e){return y.apply(this,arguments)})},{key:"executePeriodicSyncHandler",value:(v=V(B().m(function t(e,n){var r,i,o;return B().w(function(t){for(;;)switch(t.n){case 0:if(r=e.handler.periodicSync||{},i=n.tag||"",!(o=e.match.tag||r.tag||"")||o===i){t.n=1;break}return t.a(2);case 1:if(!e.capabilitySet.has("request-queueing")){t.n=2;break}return t.n=2,this.flushRequestQueue(i);case 2:if(r.endpoint){t.n=3;break}return t.a(2);case 3:return t.n=4,fetch(r.endpoint,{method:r.method||"GET",headers:r.headers||{}});case 4:return t.a(2)}},t,this)})),function(t,e){return v.apply(this,arguments)})},{key:"executeFetchStrategy",value:(p=V(B().m(function t(e,n){var r,i,o,a,l,s,u,c,d,f,h,p=this;return B().w(function(t){for(;;)switch(t.p=t.n){case 0:if("image-optimize"!==(r=String(e.handler.strategy||e.strategy||"network-first").toLowerCase())){t.n=1;break}return t.a(2,this.optimizeImageFetch(n,e));case 1:if("cache-only"!==r){t.n=4;break}return t.n=2,caches.match(n);case 2:if(f=t.v){t.n=3;break}f=this.defaultFetch(n);case 3:return t.a(2,f);case 4:if("network-only"!==r){t.n=5;break}return t.a(2,this.fetchWithHooks(n,e));case 5:if("cache-first"!==r){t.n=10;break}return t.n=6,caches.match(n);case 6:if(!(i=t.v)){t.n=7;break}return t.a(2,i);case 7:return t.n=8,this.fetchWithHooks(n,e);case 8:return o=t.v,t.n=9,this.cacheResponse(n,o);case 9:return t.a(2,o);case 10:if("stale-while-revalidate"!==r){t.n=12;break}return t.n=11,caches.match(n);case 11:return a=t.v,l=this.fetchWithHooks(n,e).then(function(){var t=V(B().m(function t(e){return B().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,p.cacheResponse(n,e);case 1:return t.a(2,e)}},t)}));return function(e){return t.apply(this,arguments)}}()).catch(function(){return null}),t.a(2,a||l||this.defaultFetch(n));case 12:return t.p=12,t.n=13,this.fetchWithHooks(n,e);case 13:return s=t.v,t.n=14,this.cacheResponse(n,s);case 14:return t.a(2,s);case 15:return t.p=15,h=t.v,t.n=16,caches.match(n);case 16:if(!(u=t.v)){t.n=17;break}return t.a(2,u);case 17:if(!(c=e.handler.fallbackUrl||e.fallbackUrl||this.offlineFallbackUrl)){t.n=19;break}return t.n=18,caches.match(c);case 18:if(!(d=t.v)){t.n=19;break}return t.a(2,d);case 19:throw h;case 20:return t.a(2)}},t,this,[[12,15]])})),function(t,e){return p.apply(this,arguments)})},{key:"executeCachingHandler",value:(h=V(B().m(function t(e,n){var r,i,o,a,l,s,u,c,d,f,h,p,v=this;return B().w(function(t){for(;;)switch(t.p=t.n){case 0:return r=e.handler.cache||{},i=String(r.cacheName||this.cacheName).trim()||this.cacheName,o=String(r.mode||e.handler.strategy||"network-first").toLowerCase(),t.n=1,caches.open(i);case 1:return a=t.v,l=this.resolveCacheKey(n,r.cacheKey),t.n=2,a.match(l);case 2:if(s=t.v,u=Number(r.ttlMs||0),!(s&&u>0)){t.n=3;break}if(!((c=Number(s.headers.get("x-holi-cache-ts")||0))>0&&Date.now()-c>u)){t.n=3;break}return t.n=3,a.delete(l);case 3:return t.n=4,a.match(l);case 4:if(d=t.v,"cache-only"!==o){t.n=5;break}return t.a(2,d||this.defaultFetch(n));case 5:if("cache-first"!==o||!d){t.n=6;break}return t.a(2,d);case 6:if("stale-while-revalidate"!==o){t.n=7;break}return f=this.fetchWithHooks(n,e).then(function(t){return v.storeCachedResponse(a,l,t)}).catch(function(){return null}),t.a(2,d||f||this.defaultFetch(n));case 7:return t.p=7,t.n=8,this.fetchWithHooks(n,e);case 8:return h=t.v,t.a(2,this.storeCachedResponse(a,l,h));case 9:if(t.p=9,p=t.v,!d){t.n=10;break}return t.a(2,d);case 10:throw p;case 11:return t.a(2)}},t,this,[[7,9]])})),function(t,e){return h.apply(this,arguments)})},{key:"fetchWithHooks",value:function(t,e){var n=this;return this.emitToClients("fetch-start",{name:e.name,type:e.type,url:t.url}),fetch(t).then(function(r){return n.emitToClients("fetch-complete",{name:e.name,type:e.type,url:t.url,status:r.status}),r}).catch(function(r){throw n.emitToClients("fetch-error",{name:e.name,type:e.type,url:t.url,message:String((null==r?void 0:r.message)||r)}),r})}},{key:"applyNetworkThrottling",value:function(t){var e,n=Number((null===(e=t.handler.throttle)||void 0===e?void 0:e.delayMs)||0);return n>0?new Promise(function(t){return setTimeout(t,n)}):Promise.resolve()}},{key:"applyAdaptiveRequest",value:function(t,e){var n=this.networkProfile||{},r=e.handler.adaptive||{},i=new URL(t.url),o=String(n.effectiveType||"4g").toLowerCase(),a=!!n.saveData||["slow-2g","2g","3g"].includes(o);i.searchParams.set(r.qualityParam||"quality",a?"low":"high"),r.pageSizeParam&&i.searchParams.set(r.pageSizeParam,String(Number(a?r.lowPageSize||10:r.highPageSize||30)));var l=new Headers(t.headers||{});return l.set("x-network-effective-type",o),l.set("x-network-save-data",n.saveData?"true":"false"),new Request(i.toString(),{method:t.method,headers:l,body:["GET","HEAD"].includes(t.method)?void 0:t.clone().body,credentials:t.credentials,cache:t.cache,keepalive:t.keepalive,mode:t.mode,redirect:t.redirect,referrer:t.referrer,integrity:t.integrity})}},{key:"queueFailedRequest",value:(f=V(B().m(function t(e,n,r){var i,o,a,l,s,u,c,d,f,h,p,v;return B().w(function(t){for(;;)switch(t.n){case 0:if(i=e.handler.queue||{},(Array.isArray(i.methods)?i.methods:["POST","PUT","PATCH","DELETE"]).includes(String(n.method||"GET").toUpperCase())){t.n=1;break}return t.a(2,null);case 1:if(a="req-".concat(Date.now(),"-").concat(Math.random().toString(16).slice(2)),l=e.name,s=e.type,u=i.tag||e.match.tag||"",c=n.url,d=n.method,f=Object.fromEntries(n.headers.entries()),!["GET","HEAD"].includes(n.method)){t.n=2;break}h="",t.n=4;break;case 2:return t.n=3,n.clone().text();case 3:h=t.v;case 4:return p=h,v=i.hooks||{},o={id:a,name:l,type:s,tag:u,url:c,method:d,headers:f,body:p,hooks:v},this.enqueueRequest(o),this.emitToClients("queue-enqueued",{queue:"request",task:o,message:String((null==r?void 0:r.message)||r)}),t.a(2,new Response(JSON.stringify({queued:!0,id:o.id,message:"Request queued for retry"}),{status:Number(i.acceptedStatus||202),headers:{"Content-Type":"application/json"}}))}},t,this)})),function(t,e,n){return f.apply(this,arguments)})},{key:"captureResponseQueue",value:(d=V(B().m(function t(e,n,r){var i,o,a,l,s,u,c,d,f,h;return B().w(function(t){for(;;)switch(t.n){case 0:return i=e.handler.responseQueue||{},a="res-".concat(Date.now(),"-").concat(Math.random().toString(16).slice(2)),l=e.name,s=e.type,u=i.tag||"",c=n.url,d=r.status,t.n=1,r.clone().text();case 1:f=t.v,h=i.hooks||{},o={id:a,name:l,type:s,tag:u,url:c,status:d,body:f,hooks:h},this.enqueueResponse(o),this.emitToClients("response-captured",{queue:"response",entry:o});case 2:return t.a(2)}},t,this)})),function(t,e,n){return d.apply(this,arguments)})},{key:"enqueueRequest",value:function(t){this.requestQueue.push(U(U({},t),{},{method:String(t.method||"POST").toUpperCase()}))}},{key:"enqueueResponse",value:function(t){this.responseQueue.push(U({},t))}},{key:"flushAllQueues",value:(c=V(B().m(function t(){var e,n=arguments;return B().w(function(t){for(;;)switch(t.n){case 0:return e=n.length>0&&void 0!==n[0]?n[0]:"",t.n=1,this.flushRequestQueue(e);case 1:return t.n=2,this.flushResponseQueue(e);case 2:return t.a(2)}},t,this)})),function(){return c.apply(this,arguments)})},{key:"flushRequestQueue",value:(u=V(B().m(function t(){var e,n,r,i,o,a,l,s,u,c=arguments;return B().w(function(t){for(;;)switch(t.p=t.n){case 0:if(e=c.length>0&&void 0!==c[0]?c[0]:"",this.requestQueue.length){t.n=1;break}return t.a(2);case 1:n=this.requestQueue.slice(),this.requestQueue=[],r=0;case 2:if(!(r<n.length)){t.n=8;break}if(!(i=n[r]).tag||!e||i.tag===e){t.n=3;break}return this.requestQueue.push(i),t.a(3,7);case 3:return t.p=3,t.n=4,fetch(i.url,{method:i.method,headers:i.headers||{"Content-Type":"application/json"},body:["GET","HEAD"].includes(i.method)?void 0:i.body});case 4:a=t.v,this.emitQueueHook((null===(o=i.hooks)||void 0===o?void 0:o.successEvent)||"queue-item-success",{queue:"request",task:i,status:a.status}),t.n=6;break;case 5:t.p=5,u=t.v,this.requestQueue.push(i),this.emitQueueHook((null===(l=i.hooks)||void 0===l?void 0:l.failureEvent)||"queue-item-failure",{queue:"request",task:i,message:String((null==u?void 0:u.message)||u)});case 6:return t.p=6,this.emitQueueHook((null===(s=i.hooks)||void 0===s?void 0:s.completeEvent)||"queue-item-complete",{queue:"request",task:i}),t.f(6);case 7:r+=1,t.n=2;break;case 8:this.emitToClients("queue-flushed",{queue:"request",remaining:this.requestQueue.length});case 9:return t.a(2)}},t,this,[[3,5,6,7]])})),function(){return u.apply(this,arguments)})},{key:"flushResponseQueue",value:(s=V(B().m(function t(){var e,n,r=this,i=arguments;return B().w(function(t){for(;;)switch(t.n){case 0:if(e=i.length>0&&void 0!==i[0]?i[0]:"",this.responseQueue.length){t.n=1;break}return t.a(2);case 1:n=this.responseQueue.slice(),this.responseQueue=[],n.forEach(function(t){var n;t.tag&&e&&t.tag!==e?r.responseQueue.push(t):r.emitQueueHook((null===(n=t.hooks)||void 0===n?void 0:n.completeEvent)||"response-queue-complete",{queue:"response",entry:t})}),this.emitToClients("queue-flushed",{queue:"response",remaining:this.responseQueue.length});case 2:return t.a(2)}},t,this)})),function(){return s.apply(this,arguments)})},{key:"emitQueueHook",value:function(t,e){this.emitToClients(t,e)}},{key:"defaultFetch",value:(l=V(B().m(function t(e){var n,r;return B().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.n=1,caches.match(e);case 1:if(!(n=t.v)){t.n=2;break}return t.a(2,n);case 2:return t.p=2,t.n=3,fetch(e);case 3:return t.a(2,t.v);case 4:return t.p=4,t.v,t.n=5,caches.match(this.offlineFallbackUrl);case 5:return r=t.v,t.a(2,r||Response.error())}},t,this,[[2,4]])})),function(t){return l.apply(this,arguments)})},{key:"cacheResponse",value:(a=V(B().m(function t(e,n){var r;return B().w(function(t){for(;;)switch(t.n){case 0:if(null!=n&&n.ok&&"GET"===e.method){t.n=1;break}return t.a(2);case 1:return t.n=2,caches.open(this.cacheName);case 2:return r=t.v,t.n=3,r.put(e,n.clone());case 3:return t.a(2)}},t,this)})),function(t,e){return a.apply(this,arguments)})},{key:"resolveCacheKey",value:function(t,e){if(!e)return t;if(e instanceof Request)return e;var n=String(e||"").trim();return n?new Request(n,{method:"GET",headers:t.headers}):t}},{key:"storeCachedResponse",value:(o=V(B().m(function t(e,n,r){var i,o,a;return B().w(function(t){for(;;)switch(t.n){case 0:if(null!=r&&r.ok){t.n=1;break}return t.a(2,r);case 1:return(i=new Headers(r.headers||{})).set("x-holi-cache-ts",String(Date.now())),t.n=2,r.clone().blob();case 2:return o=t.v,a=new Response(o,{status:r.status,statusText:r.statusText,headers:i}),t.n=3,e.put(n,a.clone());case 3:return t.a(2,r)}},t)})),function(t,e,n){return o.apply(this,arguments)})},{key:"optimizeImageFetch",value:(i=V(B().m(function t(e,n){var r,i,o,a,l,s;return B().w(function(t){for(;;)switch(t.n){case 0:return r=new URL(e.url),i=Number(n.handler.maxWidth||1280),o=Number(n.handler.quality||75),r.searchParams.set("auto","format,compress"),r.searchParams.set("fit","max"),r.searchParams.set("w",String(i)),r.searchParams.set("q",String(o)),a=new Request(r.toString(),e),t.n=1,caches.match(a);case 1:if(!(l=t.v)){t.n=2;break}return t.a(2,l);case 2:return t.n=3,fetch(a);case 3:return s=t.v,t.n=4,this.cacheResponse(a,s);case 4:return t.a(2,s)}},t,this)})),function(t,e){return i.apply(this,arguments)})},{key:"extractPushPayload",value:function(t){try{return t.data?t.data.json():{}}catch(e){return{title:"Update Available",body:t.data?t.data.text():""}}}},{key:"showNotificationFromPayload",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return self.registration.showNotification(t.title||"Update Available",{body:t.body||"",icon:t.icon||null,badge:t.badge||null,data:t.data||null})}},{key:"findRuntimeHandler",value:function(t,e){var n=this,r=null;return this.runtimeHandlers.forEach(function(i){i.type===t&&n.matches(i.match,e)&&(!r||i.priority>r.priority)&&(r=i)}),r}},{key:"findRemoteHandler",value:function(t,e){var n=this,r=null;return this.remoteHandlers.forEach(function(i){i.type===t&&n.matches(i.match,e)&&(!r||i.priority>r.priority)&&(r=i)}),r}},{key:"matches",value:function(t,e){if(!t)return!0;if(e.request){var n=e.request,r=new URL(n.url);if(t.method&&String(t.method).toUpperCase()!==n.method)return!1;if(t.urlStartsWith&&!r.href.startsWith(String(t.urlStartsWith)))return!1;if(t.urlIncludes&&!r.href.includes(String(t.urlIncludes)))return!1;if(t.urlPattern)try{if(!new RegExp(String(t.urlPattern)).test(r.href))return!1}catch(t){return!1}}return"string"!=typeof e.tag||!t.tag||t.tag===e.tag}},{key:"normalizeHandler",value:function(t){if(!t||"object"!==F(t))return null;var e=String(t.name||t.id||"").trim(),n=String(t.type||t.eventType||"").trim().toLowerCase();if(!e||!n||!$.has(n))return null;var r=Array.isArray(t.capabilities)?t.capabilities:t.capabilities?[t.capabilities]:[],i=new Set(r.map(function(t){return String(t||"").trim().toLowerCase()}).filter(Boolean)),o=t.handler&&"object"===F(t.handler)?U({},t.handler):U({},t);return{name:e,id:e,type:n,eventType:n,priority:Number(t.priority||o.priority||0),match:o.match&&"object"===F(o.match)?U({},o.match):{},capabilities:Array.from(i),capabilitySet:i,strategy:o.strategy?String(o.strategy):null,fallbackUrl:o.fallbackUrl?String(o.fallbackUrl):null,handler:o}}},{key:"readNetworkProfile",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(t&&"object"===F(t))return{effectiveType:String(t.effectiveType||"4g"),downlink:Number(t.downlink||10),rtt:Number(t.rtt||50),saveData:!!t.saveData};if(!this.isClient())return this.networkProfile||{effectiveType:"4g",downlink:10,rtt:50,saveData:!1};var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;return{effectiveType:String((null==e?void 0:e.effectiveType)||"4g"),downlink:Number((null==e?void 0:e.downlink)||10),rtt:Number((null==e?void 0:e.rtt)||50),saveData:!(null==e||!e.saveData)}}},{key:"emitToClients",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.isWorker()?self.clients.matchAll({type:"window",includeUncontrolled:!0}).then(function(n){n.forEach(function(n){return n.postMessage({type:"".concat("sw:").concat(t),detail:e})})}):Promise.resolve()}},{key:"toKey",value:function(t,e){return"".concat(String(t||"").toLowerCase(),":").concat(String(e||"").trim())}}],r=[{key:"isServiceWorkerScope",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:globalThis;return"undefined"!=typeof ServiceWorkerGlobalScope&&t instanceof ServiceWorkerGlobalScope}},{key:"isWindowScope",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:globalThis;return"undefined"!=typeof window&&t===window}},{key:"getInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.globalInstance||(this.globalInstance=new t(e)),this.globalInstance}},{key:"create",value:function(){return new t(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}},{key:"registerHandler",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};if($.has(String(t||"").toLowerCase())&&"string"==typeof e&&!Array.isArray(n)&&"object"===F(n)&&"number"!=typeof r&&(!i||0===Object.keys(i).length)){var o=n||{};return{name:e,type:String(t).toLowerCase(),capabilities:o.capabilities||[],priority:Number(o.priority||0),handler:U({},o)}}return{name:String(t||"").trim(),type:String(e||"").trim().toLowerCase(),capabilities:Array.isArray(n)?n:n?[n]:[],priority:"number"==typeof r?r:Number((null==r?void 0:r.priority)||0),handler:U({},("number"==typeof r?i||{}:r||{})||{})}}}],n&&W(e.prototype,n),r&&W(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,r,i,o,a,l,s,u,c,d,f,h,p,v,y,m,b,g,w,S,k}();function Z(t){return Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Z(t)}function X(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Y(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?X(Object(n),!0).forEach(function(e){ot(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function tt(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return et(u,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),u}var a={};function l(){}function s(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(et(e={},r,function(){return this}),e),d=u.prototype=l.prototype=Object.create(c);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,et(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=u,et(d,"constructor",u),et(u,"constructor",s),s.displayName="GeneratorFunction",et(u,i,"GeneratorFunction"),et(d),et(d,i,"Generator"),et(d,r,function(){return this}),et(d,"toString",function(){return"[object Generator]"}),(tt=function(){return{w:o,m:f}})()}function et(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}et=function(t,e,n,r){function o(e,n){et(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},et(t,e,n,r)}function nt(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function rt(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){nt(o,r,i,a,l,"next",t)}function l(t){nt(o,r,i,a,l,"throw",t)}a(void 0)})}}function it(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,at(r.key),r)}}function ot(t,e,n){return(e=at(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function at(t){var e=function(t){if("object"!=Z(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Z(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Z(e)?e:e+""}Q(J,"globalInstance",null),J.isServiceWorkerScope()&&J.getInstance().start(),"undefined"!=typeof window&&(window.ServiceWorkerManager=J);var lt=function(){function n(){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),n.instance)return n.instance;n.instance=this}return F=n,B=[{key:"initServiceWorker",value:(Q=rt(tt().m(function t(){var e,r,i,o,a=arguments;return tt().w(function(t){for(;;)switch(t.n){case 0:return e=a.length>0&&void 0!==a[0]?a[0]:{},r=n.getServiceWorkerManager(e),i=e.scriptUrl||"/sw.js",o=e.registrationOptions||{},t.n=1,r.registerWorker(i,o);case 1:return t.a(2,r)}},t)})),function(){return Q.apply(this,arguments)})},{key:"registerSWHandlers",value:(W=rt(tt().m(function t(){var e,r,i=arguments;return tt().w(function(t){for(;;)if(0===t.n)return e=i.length>0&&void 0!==i[0]?i[0]:[],r=n.getServiceWorkerManager(),t.a(2,r.registerHandlers(e))},t)})),function(){return W.apply(this,arguments)})},{key:"clearSWHandlers",value:(U=rt(tt().m(function t(){var e,r,i=arguments;return tt().w(function(t){for(;;)if(0===t.n)return e=i.length>0&&void 0!==i[0]?i[0]:null,r=n.getServiceWorkerManager(),t.a(2,r.clearHandlers(e))},t)})),function(){return U.apply(this,arguments)})},{key:"initPWA",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n.initPWA(t)}}],H=[{key:"ensureLibraries",value:function(){if(!this.librariesRegistered){var n=[m.PageComponent,h.LayoutComponent,p.LoaderComponent,v.OfflineIndicator,y.RefreshComponent,b.BlockComponent,g.PanelComponent,w.RegionComponent,S.AccordionComponent,k.CalendarComponent,E.CarouselComponent,O.BreadCrumbsComponent,C.BackToTopComponent,A.ChartComponent,e.TabsComponent,r.DataTable,i.DataGrid,o.DropdownComponent,a.SelectComponent,l.InputComponent,s.CheckboxGroupComponent,c.RadioGroupComponent,d.RatingComponent,f.ButtonComponent,u.FormComponent,P.DialogComponent,j.ToastComponent,T.DrawerComponent,x.GalleryComponent,L.MenubarComponent,I.TreeComponent,R.TreePanelComponent,N.SearchComponent,D.LocaleSwitcherComponent,M.ThemeSwitcherComponent,q.WizardComponent,_.StatsCard].filter(Boolean);t.Z.registerLibrary("holi",n),this.librariesRegistered=!0}}},{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;this.ensureLibraries(),t.Z.initAll(e),t.Z.observeLifecycle(e)}},{key:"getServiceWorkerManager",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.swManager||(this.swManager=J.getInstance(t)),this.swManager}},{key:"initPWA",value:function(){var t,e,n,r=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("undefined"==typeof window||"undefined"==typeof document)return this.installStatus;if(this.pwaInitialized)return this.bindInstallUI(i.container||document),this.installStatus;this.pwaInitialized=!0,this.installStatus.supported="BeforeInstallPromptEvent"in window||"onbeforeinstallprompt"in window,this.installStatus.standalone=this.isStandalone(),this.installStatus.installed=this.installStatus.standalone,window.addEventListener("beforeinstallprompt",function(t){t.preventDefault(),r.installPrompt=t,r.installStatus.available=!0,r.installStatus.installed=!1,r.installStatus.standalone=r.isStandalone(),r.showInstallUI(),r.dispatchPWAEvent("pwa:installavailable",{prompt:t,status:Y({},r.installStatus)})}),window.addEventListener("appinstalled",function(){r.installPrompt=null,r.installStatus.available=!1,r.installStatus.installed=!0,r.installStatus.standalone=!0,r.hideInstallUI(),r.dispatchPWAEvent("pwa:installed",{status:Y({},r.installStatus)})});var o=null===(t=(e=window).matchMedia)||void 0===t?void 0:t.call(e,"(display-mode: standalone)");return null==o||null===(n=o.addEventListener)||void 0===n||n.call(o,"change",function(){r.installStatus.standalone=r.isStandalone(),r.syncInstallUI(document)}),this.bindInstallUI(i.container||document),!1!==i.manifest&&this.setPWAManifest(i.manifestConfig||{}),this.syncInstallUI(document),this.installStatus}},{key:"installApp",value:(z=rt(tt().m(function t(){var e,n;return tt().w(function(t){for(;;)switch(t.n){case 0:if(this.installPrompt){t.n=1;break}return t.a(2,{outcome:"unavailable"});case 1:return this.installPrompt.prompt(),t.n=2,this.installPrompt.userChoice;case 2:return e=t.v,"accepted"===(n=(null==e?void 0:e.outcome)||"dismissed")&&(this.installPrompt=null,this.installStatus.available=!1),this.syncInstallUI(document),this.dispatchPWAEvent("pwa:installresult",{outcome:n,status:Y({},this.installStatus)}),t.a(2,e||{outcome:n})}},t,this)})),function(){return z.apply(this,arguments)})},{key:"setPWAManifest",value:(V=rt(tt().m(function t(){var e,n=arguments;return tt().w(function(t){for(;;)switch(t.n){case 0:if(e=n.length>0&&void 0!==n[0]?n[0]:{},"undefined"!=typeof document){t.n=1;break}return t.a(2,null);case 1:return this.originalManifest||(this.originalManifest=document.querySelector('link[rel="manifest"]:not([data-dynamic])')),this.dynamicManifest=Y({name:"HTML First Components",short_name:"HF Components",start_url:"/",display:"standalone",background_color:"#ffffff",theme_color:"#2563eb"},e),t.a(2,this.injectDynamicManifest())}},t,this)})),function(){return V.apply(this,arguments)})},{key:"injectDynamicManifest",value:(G=rt(tt().m(function t(){var e,n,r,i;return tt().w(function(t){for(;;)switch(t.n){case 0:if("undefined"!=typeof document&&"undefined"!=typeof URL){t.n=1;break}return t.a(2,null);case 1:return(e=document.querySelector('link[rel="manifest"][data-dynamic]'))&&e.remove(),this.dynamicManifestUrl&&(URL.revokeObjectURL(this.dynamicManifestUrl),this.dynamicManifestUrl=""),n=new Blob([JSON.stringify(this.dynamicManifest,null,2)],{type:"application/json"}),r=URL.createObjectURL(n),this.dynamicManifestUrl=r,(i=document.createElement("link")).rel="manifest",i.href=r,i.dataset.dynamic="true",document.head.appendChild(i),this.dispatchPWAEvent("pwa:manifestupdated",{manifest:Y({},this.dynamicManifest)}),t.a(2,i)}},t,this)})),function(){return G.apply(this,arguments)})},{key:"bindInstallUI",value:function(){var t,e,n=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;(r instanceof Element||r===document)&&(this.boundInstallClick||(this.boundInstallClick=function(t){var e,r;(null===(e=t.target)||void 0===e||null===(r=e.closest)||void 0===r?void 0:r.call(e,"[data-pwa-install]"))&&(t.preventDefault(),n.installApp())}),null===(t=r.removeEventListener)||void 0===t||t.call(r,"click",this.boundInstallClick),null===(e=r.addEventListener)||void 0===e||e.call(r,"click",this.boundInstallClick),this.syncInstallUI(r))}},{key:"syncInstallUI",value:function(){var t,e,n=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;if("undefined"!=typeof document){var i=r===document?document:r,o=(null===(t=i.querySelectorAll)||void 0===t?void 0:t.call(i,"[data-pwa-install]"))||[],a=(null===(e=i.querySelectorAll)||void 0===e?void 0:e.call(i,"[data-pwa-install-status]"))||[],l=!!this.installPrompt&&!this.installStatus.installed,s=this.isStandalone();this.installStatus.available=l,this.installStatus.standalone=s,this.installStatus.installed=this.installStatus.installed||s,o.forEach(function(t){var e="false"!==t.getAttribute("data-pwa-install-hide");t.toggleAttribute("hidden",e&&!l),t.toggleAttribute("disabled",!l),t.setAttribute("data-pwa-install-ready",l?"true":"false"),t.getAttribute("aria-label")||t.setAttribute("aria-label","Install app")}),a.forEach(function(t){t.textContent=n.getInstallStatusText(),t.setAttribute("data-pwa-install-state",n.getInstallState())})}}},{key:"showInstallUI",value:function(){this.syncInstallUI(document)}},{key:"hideInstallUI",value:function(){this.syncInstallUI(document)}},{key:"getInstallState",value:function(){return this.installStatus.installed||this.isStandalone()?"installed":this.installPrompt?"available":"unavailable"}},{key:"getInstallStatusText",value:function(){var t=this.getInstallState();return"installed"===t?"App installed":"available"===t?"Install available":"Install unavailable"}},{key:"isStandalone",value:function(){var t,e,n;return!("undefined"==typeof window||!(null!==(t=(e=window).matchMedia)&&void 0!==t&&t.call(e,"(display-mode: standalone)").matches||null!==(n=window.navigator)&&void 0!==n&&n.standalone))}},{key:"dispatchPWAEvent",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"undefined"!=typeof document&&document.dispatchEvent(new CustomEvent(t,{detail:e}))}}],B&&it(F.prototype,B),H&&it(F,H),Object.defineProperty(F,"prototype",{writable:!1}),F;var F,B,H,G,V,z,U,W,Q}();ot(lt,"contentProviders",{}),ot(lt,"swManager",null),ot(lt,"instance",null),ot(lt,"librariesRegistered",!1),ot(lt,"installPrompt",null),ot(lt,"originalManifest",null),ot(lt,"dynamicManifest",{}),ot(lt,"dynamicManifestUrl",""),ot(lt,"pwaInitialized",!1),ot(lt,"boundInstallClick",null),ot(lt,"installStatus",{supported:"undefined"!=typeof window&&"serviceWorker"in navigator,available:!1,installed:!1,standalone:!1}),"undefined"!=typeof window&&(window.HoliAppClass=lt);var st=n(531);function ut(t){return ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ut(t)}function ct(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return dt(u,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),u}var a={};function l(){}function s(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(dt(e={},r,function(){return this}),e),d=u.prototype=l.prototype=Object.create(c);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,dt(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=u,dt(d,"constructor",u),dt(u,"constructor",s),s.displayName="GeneratorFunction",dt(u,i,"GeneratorFunction"),dt(d),dt(d,i,"Generator"),dt(d,r,function(){return this}),dt(d,"toString",function(){return"[object Generator]"}),(ct=function(){return{w:o,m:f}})()}function dt(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}dt=function(t,e,n,r){function o(e,n){dt(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},dt(t,e,n,r)}function ft(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function ht(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){ft(o,r,i,a,l,"next",t)}function l(t){ft(o,r,i,a,l,"throw",t)}a(void 0)})}}function pt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,vt(r.key),r)}}function vt(t){var e=function(t){if("object"!=ut(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ut(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ut(e)?e:e+""}var yt=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"resolve",value:function(t){throw new Error("Subclasses must implement resolve(dataSourceExpr)")}},{key:"getContent",value:(i=ht(ct().m(function t(e,n){return ct().w(function(t){for(;;)switch(t.n){case 0:throw new Error("Subclasses must implement getContent(itemData, index)");case 1:return t.a(2)}},t)})),function(t,e){return i.apply(this,arguments)})},{key:"init",value:(r=ht(ct().m(function t(){return ct().w(function(t){for(;;)if(0===t.n)return t.a(2)},t)})),function(){return r.apply(this,arguments)})},{key:"destroy",value:function(){}}],n=[{key:"name",get:function(){throw new Error("Subclasses must implement static name")}}],e&&pt(t.prototype,e),n&&pt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r,i}();function mt(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return bt(u,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),u}var a={};function l(){}function s(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(bt(e={},r,function(){return this}),e),d=u.prototype=l.prototype=Object.create(c);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,bt(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=u,bt(d,"constructor",u),bt(u,"constructor",s),s.displayName="GeneratorFunction",bt(u,i,"GeneratorFunction"),bt(d),bt(d,i,"Generator"),bt(d,r,function(){return this}),bt(d,"toString",function(){return"[object Generator]"}),(mt=function(){return{w:o,m:f}})()}function bt(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}bt=function(t,e,n,r){function o(e,n){bt(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},bt(t,e,n,r)}function gt(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function wt(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){gt(o,r,i,a,l,"next",t)}function l(t){gt(o,r,i,a,l,"throw",t)}a(void 0)})}}"undefined"!=typeof window&&(window.ContentProvider=yt),n(458),n(194),window.HoliApp={instance:lt,HoliApp:lt,ServiceWorkerManager:J},window.Holi=window.HoliApp;var St=function(){var t=wt(mt().m(function t(){return mt().w(function(t){for(;;)switch(t.n){case 0:if(!window.__holiTemplatesLoading){t.n=2;break}return t.n=1,window.__holiTemplatesLoading;case 1:case 3:return t.a(2);case 2:return window.__holiTemplatesLoading=wt(mt().m(function t(){return mt().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,st._.ensureCoreTemplates();case 1:return t.a(2)}},t)}))(),t.n=3,window.__holiTemplatesLoading}},t)}));return function(){return t.apply(this,arguments)}}(),kt=function(){var t=wt(mt().m(function t(){return mt().w(function(t){for(;;)switch(t.n){case 0:if(!1!==window.HoliAutoInit){t.n=1;break}return t.a(2);case 1:return t.n=2,St();case 2:lt.init(document);case 3:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){kt().catch(function(t){return console.error(t)})},{once:!0}):kt().catch(function(t){return console.error(t)})})()})();
2
+ (()=>{var t={6892(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function l(n,r,i,a){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return o(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,o(h,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(h),o(h,a,"Generator"),o(h,r,function(){return this}),o(h,"toString",function(){return"[object Generator]"}),(i=function(){return{w:l,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function l(t){a(o,r,i,l,s,"next",t)}function s(t){a(o,r,i,l,s,"throw",t)}l(void 0)})}}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,v(r.key),r)}}function u(t,e,n){return e=h(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,n||[],h(t).constructor):e.apply(t,n))}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function d(t,e,n,r){var i=f(h(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},f.apply(null,arguments)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function v(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{AccordionComponent:()=>g});var y,m,b,g=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=u(this,e,[t,r])).templateId=e.templateId,n.multipleOpen=n.readBooleanAttr("multiple",!1),n.initialOpenIndex=Math.max(0,Number(n.container.getAttribute("open-index"))||0),n.items=[],n.openIndexes=new Set,n.onClick=function(t){return n.handleClick(t)},n.onKeydown=function(t){return n.handleKeydown(t)},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&p(t,e)}(e,t),n=e,r=[{key:"readBooleanAttr",value:function(t,e){if(!this.container.hasAttribute(t))return e;var n=String(this.container.getAttribute(t)||"").trim().toLowerCase();return!n||"false"!==n&&"0"!==n&&"no"!==n}},{key:"validateStructure",value:function(){if(d(e,"validateStructure",this,3)([]),!this.container)throw new Error("Accordion requires a container")}},{key:"init",value:(c=l(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return c.apply(this,arguments)})},{key:"render",value:(a=l(i().m(function t(){var n;return i().w(function(t){for(;;)switch(t.n){case 0:return n=this.collectSourceItems(),t.n=1,d(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".holi-accordion"),this.list=this.container.querySelector('[data-role="accordion-list"]'),this.element&&this.list){t.n=2;break}return t.a(2);case 2:this.buildItems(n),this.bindEvents(),this.items.length&&this.openPanel(this.initialOpenIndex,!1);case 3:return t.a(2)}},t,this)})),function(){return a.apply(this,arguments)})},{key:"collectSourceItems",value:function(){var t=Array.from(this.container.querySelectorAll('[data-accordion-item], [slot="panel"]'));return t.length?t:Array.from(this.container.children).filter(function(t){return t instanceof HTMLElement&&!t.classList.contains("holi-accordion")})}},{key:"buildItems",value:function(t){var e=this;this.list.replaceChildren(),this.items=[],t.forEach(function(t,n){var r=e.extractTitle(t,n),i=e.extractContent(t),o=e.createItem(n,r,i);e.items.push(o),e.list.appendChild(o.root)})}},{key:"extractTitle",value:function(t,e){var n,r=t.getAttribute("title")||t.getAttribute("data-title")||"";if(r)return r;var i=t.querySelector('[slot="title"], [data-role="title"], h1, h2, h3, h4, h5, h6');return i&&(null===(n=i.textContent)||void 0===n?void 0:n.trim())||"Section ".concat(e+1)}},{key:"extractContent",value:function(t){var e=t.cloneNode(!0),n=e.querySelector('[slot="title"], [data-role="title"], h1, h2, h3, h4, h5, h6');return n&&n.remove(),e}},{key:"createItem",value:function(t,e,n){var r=document.createElement("article");r.className="accordion-item",r.setAttribute("data-index",String(t));var i=document.createElement("button");i.type="button",i.className="accordion-trigger",i.setAttribute("data-action","toggle"),i.setAttribute("data-index",String(t)),i.setAttribute("aria-expanded","false"),i.setAttribute("aria-controls","accordion-panel-".concat(t)),i.textContent=e;var o=document.createElement("section");return o.className="accordion-panel",o.id="accordion-panel-".concat(t),o.hidden=!0,o.setAttribute("aria-hidden","true"),o.appendChild(n),r.append(i,o),{index:t,root:r,trigger:i,panel:o}}},{key:"bindEvents",value:function(){this.element.addEventListener("click",this.onClick),this.element.addEventListener("keydown",this.onKeydown)}},{key:"handleClick",value:function(t){var e,n,r=null===(e=t.target)||void 0===e||null===(n=e.closest)||void 0===n?void 0:n.call(e,'[data-action="toggle"]');if(r){var i=Number(r.getAttribute("data-index"));Number.isNaN(i)||this.togglePanel(i)}}},{key:"handleKeydown",value:function(t){var e,n,r=null===(e=t.target)||void 0===e||null===(n=e.closest)||void 0===n?void 0:n.call(e,".accordion-trigger");if(r){var i=Number(r.getAttribute("data-index"));if(!Number.isNaN(i))if("ArrowDown"!==t.key)if("ArrowUp"!==t.key)"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.togglePanel(i));else{var o;t.preventDefault();var a=(i-1+this.items.length)%this.items.length;null===(o=this.items[a])||void 0===o||null===(o=o.trigger)||void 0===o||o.focus()}else{var l;t.preventDefault();var s=(i+1)%this.items.length;null===(l=this.items[s])||void 0===l||null===(l=l.trigger)||void 0===l||l.focus()}}}},{key:"togglePanel",value:function(t){this.items[t]&&(this.openIndexes.has(t)?this.closePanel(t):this.openPanel(t))}},{key:"openPanel",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this.items[t];r&&(this.multipleOpen||Array.from(this.openIndexes).forEach(function(n){n!==t&&e.closePanel(n,!1)}),this.openIndexes.add(t),r.root.classList.add("is-open"),r.trigger.setAttribute("aria-expanded","true"),r.panel.hidden=!1,r.panel.setAttribute("aria-hidden","false"),n&&this.dispatchEvent("accordionchange",{index:t,open:!0,multiple:this.multipleOpen,openIndexes:Array.from(this.openIndexes)}))}},{key:"closePanel",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.items[t];n&&(this.openIndexes.delete(t),n.root.classList.remove("is-open"),n.trigger.setAttribute("aria-expanded","false"),n.panel.hidden=!0,n.panel.setAttribute("aria-hidden","true"),e&&this.dispatchEvent("accordionchange",{index:t,open:!1,multiple:this.multipleOpen,openIndexes:Array.from(this.openIndexes)}))}},{key:"openAll",value:function(){var t=this;this.multipleOpen&&(this.items.forEach(function(e){return t.openPanel(e.index,!1)}),this.dispatchEvent("accordionchange",{index:-1,open:!0,multiple:!0,openIndexes:Array.from(this.openIndexes)}))}},{key:"closeAll",value:function(){var t=this;this.items.forEach(function(e){return t.closePanel(e.index,!1)}),this.dispatchEvent("accordionchange",{index:-1,open:!1,multiple:this.multipleOpen,openIndexes:[]})}},{key:"destroy",value:function(){var t,n;null===(t=this.element)||void 0===t||t.removeEventListener("click",this.onClick),null===(n=this.element)||void 0===n||n.removeEventListener("keydown",this.onKeydown),d(e,"destroy",this,3)([])}}],o=[{key:"selector",get:function(){return"accordion"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"accordion"}}],r&&s(n.prototype,r),o&&s(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,a,c}(n(8812).Component);y=g,b="accordion-template",(m=v(m="templateId"))in y?Object.defineProperty(y,m,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[m]=b,"undefined"!=typeof window&&(window.AccordionComponent=g)},2951(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function l(n,r,i,a){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return o(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,o(h,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(h),o(h,a,"Generator"),o(h,r,function(){return this}),o(h,"toString",function(){return"[object Generator]"}),(i=function(){return{w:l,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,p(r.key),r)}}function s(t,e,n){return e=f(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,u()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}function u(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(u=function(){return!!t})()}function c(t,e,n,r){var i=d(f(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function d(){return d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},d.apply(null,arguments)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}function p(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{BackToTopComponent:()=>b});var v,y,m,b=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=s(this,e,[t,r])).templateId=e.templateId,n.config={anchor:n.readAttr(["anchor","target","href","data-anchor"],""),label:n.readAttr(["label","data-label"],"Back to top"),ariaLabel:n.readAttr(["aria-label","data-aria-label"],"Back to top"),showAfter:Math.max(0,Number(n.readAttr(["show-after","data-show-after"],"240"))||240),behavior:n.readAttr(["behavior","data-behavior"],"smooth"),vertical:n.readAttr(["vertical","data-vertical"],""),alwaysVisible:n.readBoolAttr(["always-visible","data-always-visible"],!1)},n.state={label:n.config.label,ariaLabel:n.config.ariaLabel,visible:n.config.alwaysVisible},n.boundScroll=function(){return n.handleScroll()},n.boundClick=function(t){return n.handleClick(t)},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&h(t,e)}(e,t),n=e,r=[{key:"readAttr",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=0;n<t.length;n+=1){var r=this.container.getAttribute(t[n]);if(null!=r&&""!==String(r).trim())return String(r).trim()}return e}},{key:"readBoolAttr",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0;n<t.length;n+=1){var r=t[n];if(this.container.hasAttribute(r)){var i=String(this.container.getAttribute(r)||"").trim().toLowerCase();return!i||"false"!==i&&"0"!==i&&"no"!==i}}return e}},{key:"init",value:function(){this.validateStructure(),this.render()}},{key:"render",value:(u=i().m(function t(){var n;return i().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,c(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-backtotop"),this.buttonEl=this.container.querySelector('[data-role="button"]'),this.projectSlot("prefix"),this.projectSlot("label"),this.projectSlot("suffix"),this.applyPosition(),null===(n=this.buttonEl)||void 0===n||n.addEventListener("click",this.boundClick),window.addEventListener("scroll",this.boundScroll,{passive:!0}),this.handleScroll();case 2:return t.a(2)}},t,this)}),d=function(){var t=this,e=arguments;return new Promise(function(n,r){var i=u.apply(t,e);function o(t){a(i,n,r,o,l,"next",t)}function l(t){a(i,n,r,o,l,"throw",t)}o(void 0)})},function(){return d.apply(this,arguments)})},{key:"projectSlot",value:function(t){var e=this.container.querySelector('slot[name="'.concat(t,'"]'));if(e){var n=Array.from(this.container.querySelectorAll('[slot="'.concat(t,'"]')));if(n.length){var r=document.createDocumentFragment();n.forEach(function(t){t.removeAttribute("slot"),r.appendChild(t)}),e.replaceWith(r)}}}},{key:"applyPosition",value:function(){if(this.element){var t=this.resolveVertical(this.config.vertical);if(!t)return this.element.style.removeProperty("top"),void this.element.style.removeProperty("bottom");this.element.style.top=t,this.element.style.bottom="auto"}}},{key:"resolveVertical",value:function(t){var e=String(t||"").trim().toLowerCase();return e&&"bottom"!==e?"middle"===e||"center"===e?"50%":/^\d+(\.\d+)?%$/.test(e)||/^\d+(\.\d+)?px$/.test(e)?e:"":""}},{key:"handleScroll",value:function(){var t,e=this.config.alwaysVisible||window.scrollY>=this.config.showAfter;this.state.visible=e,null===(t=this.element)||void 0===t||t.classList.toggle("is-visible",e),this.element&&(this.element.hidden=!e)}},{key:"resolveAnchorTarget",value:function(){var t,e=this,n=String(this.config.anchor||"").trim();if(n){var r=n.startsWith("#")?n.slice(1):"";if(r){var i=document.getElementById(r);if(i)return i}var o=document.querySelector(n);if(o)return o}return Array.from((null===(t=document.body)||void 0===t?void 0:t.children)||[]).find(function(t){if(!(t instanceof HTMLElement))return!1;if(t===e.container)return!1;var n=t.tagName.toLowerCase();return"script"!==n&&"template"!==n})||document.documentElement}},{key:"scrollToTop",value:function(){var t=this.resolveAnchorTarget(),e="auto"===this.config.behavior?"auto":"smooth";t&&"function"==typeof t.scrollIntoView?t.scrollIntoView({behavior:e,block:"start",inline:"nearest"}):window.scrollTo({top:0,behavior:e})}},{key:"handleClick",value:function(t){t.preventDefault(),this.scrollToTop(),this.dispatchEvent("backtotopclick",{anchor:this.config.anchor||"",visible:this.state.visible})}},{key:"destroy",value:function(){var t;null===(t=this.buttonEl)||void 0===t||t.removeEventListener("click",this.boundClick),window.removeEventListener("scroll",this.boundScroll),c(e,"destroy",this,3)([])}}],o=[{key:"selector",get:function(){return"backtotop"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"backtotop"}}],r&&l(n.prototype,r),o&&l(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,u,d}(n(8812).Component);v=b,m="backtotop-template",(y=p(y="templateId"))in v?Object.defineProperty(v,y,{value:m,enumerable:!0,configurable:!0,writable:!0}):v[y]=m,"undefined"!=typeof window&&(window.BackToTopComponent=b)},935(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function l(n,r,i,a){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return o(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,o(h,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(h),o(h,a,"Generator"),o(h,r,function(){return this}),o(h,"toString",function(){return"[object Generator]"}),(i=function(){return{w:l,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function l(t){a(o,r,i,l,s,"next",t)}function s(t){a(o,r,i,l,s,"throw",t)}l(void 0)})}}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,v(r.key),r)}}function u(t,e,n){return e=h(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,n||[],h(t).constructor):e.apply(t,n))}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function d(t,e,n,r){var i=f(h(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},f.apply(null,arguments)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function v(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{BlockComponent:()=>g});var y,m,b,g=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=u(this,e,[t,r])).templateId=e.templateId,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&p(t,e)}(e,t),n=e,r=[{key:"validateStructure",value:function(){if(d(e,"validateStructure",this,3)([]),!this.container)throw new Error("Block requires a container")}},{key:"init",value:(c=l(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return c.apply(this,arguments)})},{key:"render",value:(a=l(i().m(function t(){var n,r;return i().w(function(t){for(;;)switch(t.n){case 0:return n=Array.from(this.container.childNodes),t.n=1,d(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".holi-block"),this.content=this.container.querySelector('[data-role="block-content"]'),!this.content){t.n=3;break}return(r=this.content).replaceChildren.apply(r,n),t.n=2,this.createChildren();case 2:this.syncChildren();case 3:this.applyLayoutConfig();case 4:return t.a(2)}},t,this)})),function(){return a.apply(this,arguments)})},{key:"applyLayoutConfig",value:function(){if(this.element){var t=Math.max(1,Number(this.container.getAttribute("columns"))||12),e=this.container.getAttribute("gap")||"12px";this.element.style.setProperty("--holi-block-columns",String(t)),this.element.style.setProperty("--holi-block-gap",String(e))}}}],o=[{key:"selector",get:function(){return"block"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"block"}},{key:"canInitElement",value:function(t){if(!(t instanceof Element))return!0;var e=t.parentElement;return!(e instanceof Element&&e.matches('page[layout], [component="page"][layout], [role="page"][layout]'))}}],r&&s(n.prototype,r),o&&s(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,a,c}(n(8812).Component);y=g,b="block-template",(m=v(m="templateId"))in y?Object.defineProperty(y,m,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[m]=b,"undefined"!=typeof window&&(window.BlockComponent=g)},6400(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function l(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return a(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(a(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,a(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,a(h,"constructor",d),a(d,"constructor",c),c.displayName="GeneratorFunction",a(d,i,"GeneratorFunction"),a(h),a(h,i,"Generator"),a(h,r,function(){return this}),a(h,"toString",function(){return"[object Generator]"}),(o=function(){return{w:l,m:p}})()}function a(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}a=function(t,e,n,r){function o(e,n){a(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},a(t,e,n,r)}function l(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function s(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){l(o,r,i,a,s,"next",t)}function s(t){l(o,r,i,a,s,"throw",t)}a(void 0)})}}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,y(r.key),r)}}function c(t,e,n){return e=p(e),function(t,e){if(e&&("object"==i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,d()?Reflect.construct(e,n||[],p(t).constructor):e.apply(t,n))}function d(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(d=function(){return!!t})()}function f(t,e,n,r){var i=h(p(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function h(){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},h.apply(null,arguments)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}function y(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}n.r(e),n.d(e,{BreadCrumbsComponent:()=>w});var m,b,g,w=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=c(this,e,[t,r])).templateId=e.templateId,n.separator=n.container.getAttribute("separator")||"/",n.maxItems=Math.max(0,Number(n.container.getAttribute("max-items"))||0),n.items=[],n.boundClick=function(t){return n.handleClick(t)},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&v(t,e)}(e,t),n=e,a=[{key:"validateStructure",value:function(){f(e,"validateStructure",this,3)([])}},{key:"init",value:(h=s(o().m(function t(){return o().w(function(t){for(;;)switch(t.n){case 0:return this.items=this.collectItems(),this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return h.apply(this,arguments)})},{key:"parseItemsAttr",value:function(){var t=String(this.container.getAttribute("data-items")||"").trim();if(!t)return[];try{var e=JSON.parse(t);return Array.isArray(e)?e:[]}catch(t){return[]}}},{key:"collectItems",value:function(){var t=this.parseItemsAttr();if(t.length)return this.normalizeItems(t);var e=this.container.querySelector('[slot="items"]')||this.container.querySelector("ol, ul");if(!e)return[];var n=Array.from(e.querySelectorAll(":scope > li")).map(function(t){var e=t.querySelector("a");return{label:String((null==e?void 0:e.textContent)||t.textContent||"").trim(),href:(null==e?void 0:e.getAttribute("href"))||"",current:t.hasAttribute("aria-current")||"true"===t.getAttribute("data-current")||"page"===(null==e?void 0:e.getAttribute("aria-current"))}});return e.remove(),this.normalizeItems(n)}},{key:"normalizeItems",value:function(t){var e=(t||[]).map(function(t){return t&&"object"===i(t)?{label:String(t.label||t.name||t.title||"").trim(),href:String(t.href||t.url||"").trim(),current:!!t.current}:{label:String(t||"").trim(),href:"",current:!1}}).filter(function(t){return t.label});return e.length?(e.some(function(t){return t.current})||(e[e.length-1].current=!0),e):e}},{key:"getVisibleItems",value:function(){return!this.maxItems||this.items.length<=this.maxItems?this.items:this.maxItems<3?this.items.slice(0,this.maxItems):[this.items[0],{label:"...",href:"",current:!1,ellipsis:!0}].concat(function(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(this.items.slice(this.items.length-(this.maxItems-2))))}},{key:"render",value:(d=s(o().m(function t(){return o().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,f(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".holi-breadcrumbs"),this.list=this.container.querySelector('[data-role="list"]'),this.element&&this.list){t.n=2;break}return t.a(2);case 2:this.projectSlot("prefix"),this.projectSlot("suffix"),this.applySeparator(),this.renderItems(),this.list.addEventListener("click",this.boundClick);case 3:return t.a(2)}},t,this)})),function(){return d.apply(this,arguments)})},{key:"projectSlot",value:function(t){var e=this.container.querySelector('slot[name="'.concat(t,'"]'));if(e){var n=Array.from(this.container.querySelectorAll('[slot="'.concat(t,'"]')));if(n.length){var r=document.createDocumentFragment();n.forEach(function(t){t.removeAttribute("slot"),r.appendChild(t)}),e.replaceWith(r)}}}},{key:"applySeparator",value:function(){var t=String(this.separator||"/").replace(/["\\]/g,"\\$&");this.element.style.setProperty("--holi-breadcrumb-separator",'"'.concat(t,'"'))}},{key:"renderItems",value:function(){var t=this;this.list&&(this.list.replaceChildren(),this.getVisibleItems().forEach(function(e,n){var r=document.createElement("li");if(r.className="holi-breadcrumb-item",r.setAttribute("data-index",String(n)),e.ellipsis){var i=document.createElement("span");return i.className="holi-breadcrumb-ellipsis",i.textContent=e.label,r.appendChild(i),void t.list.appendChild(r)}if(e.current||!e.href){var o=document.createElement("span");o.className="holi-breadcrumb-current",o.textContent=e.label,e.current&&o.setAttribute("aria-current","page"),r.appendChild(o)}else{var a=document.createElement("a");a.className="holi-breadcrumb-link",a.href=e.href,a.textContent=e.label,r.appendChild(a)}t.list.appendChild(r)}))}},{key:"handleClick",value:function(t){var e=t.target.closest("a.holi-breadcrumb-link");if(e){var n=e.closest(".holi-breadcrumb-item"),r=Number((null==n?void 0:n.getAttribute("data-index"))||"-1"),i=this.getVisibleItems()[r];this.dispatchEvent("breadcrumbclick",{index:r,item:i||null,href:e.getAttribute("href")||""})}}},{key:"destroy",value:function(){var t;null===(t=this.list)||void 0===t||t.removeEventListener("click",this.boundClick),f(e,"destroy",this,3)([])}}],l=[{key:"selector",get:function(){return"breadcrumbs"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"breadcrumbs"}}],a&&u(n.prototype,a),l&&u(n,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,a,l,d,h}(n(8812).Component);m=w,g="breadcrumbs-template",(b=y(b="templateId"))in m?Object.defineProperty(m,b,{value:g,enumerable:!0,configurable:!0,writable:!0}):m[b]=g,"undefined"!=typeof window&&(window.BreadCrumbsComponent=w)},9092(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function l(n,r,i,a){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return o(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,o(h,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(h),o(h,a,"Generator"),o(h,r,function(){return this}),o(h,"toString",function(){return"[object Generator]"}),(i=function(){return{w:l,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,p(r.key),r)}}function s(t,e,n){return e=f(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,u()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}function u(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(u=function(){return!!t})()}function c(t,e,n,r){var i=d(f(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function d(){return d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},d.apply(null,arguments)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}function p(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{ButtonComponent:()=>b});var v,y,m,b=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=s(this,e,[t,r])).templateId=e.templateId,n.config={label:n.readAttr("label","Button"),type:n.readAttr("type","button"),variant:n.readAttr("variant","primary"),disabled:n.readBoolAttr("disabled",!1)},n.state={label:n.config.label,type:n.config.type,disabled:n.config.disabled},n.boundClick=function(t){return n.handleClick(t)},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&h(t,e)}(e,t),n=e,r=[{key:"readAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.container.getAttribute(t);return null==n?e:String(n)}},{key:"readBoolAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.container.hasAttribute(t))return e;var n=String(this.container.getAttribute(t)||"").trim().toLowerCase();return!n||"false"!==n&&"0"!==n&&"no"!==n}},{key:"init",value:function(){this.validateStructure(),this.render()}},{key:"render",value:(u=i().m(function t(){var n;return i().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,c(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-button"),this.buttonEl=this.container.querySelector('[data-role="button"]'),this.projectSlot("prefix"),this.projectSlot("label"),this.projectSlot("suffix"),this.applyAttributes(),null===(n=this.buttonEl)||void 0===n||n.addEventListener("click",this.boundClick);case 2:return t.a(2)}},t,this)}),d=function(){var t=this,e=arguments;return new Promise(function(n,r){var i=u.apply(t,e);function o(t){a(i,n,r,o,l,"next",t)}function l(t){a(i,n,r,o,l,"throw",t)}o(void 0)})},function(){return d.apply(this,arguments)})},{key:"projectSlot",value:function(t){var e=this.container.querySelector('slot[name="'.concat(t,'"]'));if(e){var n=Array.from(this.container.querySelectorAll('[slot="'.concat(t,'"]')));if(n.length){var r=document.createDocumentFragment();n.forEach(function(t){t.removeAttribute("slot"),r.appendChild(t)}),e.replaceWith(r)}}}},{key:"applyAttributes",value:function(){this.buttonEl&&(this.buttonEl.type=this.config.type||"button",this.buttonEl.disabled=!!this.config.disabled,this.buttonEl.setAttribute("data-variant",this.config.variant||"primary"))}},{key:"handleClick",value:function(t){var e;this.dispatchEvent("buttonclick",{nativeEvent:t,type:(null===(e=this.buttonEl)||void 0===e?void 0:e.type)||"button"})}},{key:"destroy",value:function(){var t;null===(t=this.buttonEl)||void 0===t||t.removeEventListener("click",this.boundClick),c(e,"destroy",this,3)([])}}],o=[{key:"selector",get:function(){return"holi-button"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"button-control"}}],r&&l(n.prototype,r),o&&l(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,u,d}(n(8812).Component);v=b,m="button-template",(y=p(y="templateId"))in v?Object.defineProperty(v,y,{value:m,enumerable:!0,configurable:!0,writable:!0}):v[y]=m,"undefined"!=typeof window&&(window.ButtonComponent=b)},2110(t,e,n){"use strict";n.r(e),n.d(e,{CalendarComponent:()=>O});var r=n(8812);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function a(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var a=r&&r.prototype instanceof u?r:u,c=Object.create(a.prototype);return l(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(l(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,l(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,l(h,"constructor",d),l(d,"constructor",c),c.displayName="GeneratorFunction",l(d,i,"GeneratorFunction"),l(h),l(h,i,"Generator"),l(h,r,function(){return this}),l(h,"toString",function(){return"[object Generator]"}),(a=function(){return{w:o,m:p}})()}function l(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}l=function(t,e,n,r){function o(e,n){l(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},l(t,e,n,r)}function s(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function u(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){s(o,r,i,a,l,"next",t)}function l(t){s(o,r,i,a,l,"throw",t)}a(void 0)})}}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,m(r.key),r)}}function d(t,e,n){return e=v(e),function(t,e){if(e&&("object"==i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,f()?Reflect.construct(e,n||[],v(t).constructor):e.apply(t,n))}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!t})()}function h(t,e,n,r){var i=p(v(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=v(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},p.apply(null,arguments)}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}function m(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}var b=["ar","fa","he","ur"],g=new Map;function w(t,e,n){return Math.max(e,Math.min(n,t))}var S,k,E,O=function(t){function e(t){var n,r,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=d(this,e,[t,o])).templateId=e.templateId,n.locale=n.readAttr("locale",navigator.language||"en-US"),n.dir=n.readAttr("dir","auto"),n.rtl=(r=n.locale,"rtl"===(i=n.dir)||"ltr"!==i&&b.some(function(t){return String(r||"").startsWith(t)})),n.tz=n.readAttr("timezone",Intl.DateTimeFormat().resolvedOptions().timeZone),n.today=new Date,n.year=n.today.getFullYear(),n.month=n.today.getMonth()+1,n.day=null,n.hour=0,n.minute=0,n.step=Math.max(1,Number(n.readAttr("step","5"))||5),n.hour12=n.readBoolean("hour12",!1),n.validatorNames=n.parseList(n.readAttr("validators","")),n.validators=n.validatorNames.map(function(t){return g.get(t)}).filter(Boolean),n.onPrev=function(){return n.changeMonth(-1)},n.onNext=function(){return n.changeMonth(1)},n.onDayClick=function(t){return n.handleDayClick(t)},n.onToggleAmPm=function(){n.hour=(n.hour+12)%24,n.renderTime()},n.onTouchStart=function(t){return n.handleSwipe(t)},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&y(t,e)}(e,t),n=e,r=[{key:"readAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.container.getAttribute(t);if(null!=n&&""!==String(n).trim())return String(n).trim();var r=this.container.getAttribute("data-".concat(t));return null!=r&&""!==String(r).trim()?String(r).trim():e}},{key:"readBoolean",value:function(t,e){var n=this.readAttr(t,"");if(!n)return e;var r=n.toLowerCase();return!!["1","true","yes","on"].includes(r)||!["0","false","no","off"].includes(r)&&e}},{key:"parseList",value:function(t){return t?String(t).split(",").map(function(t){return t.trim()}).filter(Boolean):[]}},{key:"resolveInputElement",value:function(){var t=this.container.querySelector('[data-role="calendar-input"]');if(t instanceof HTMLInputElement)return t;var e=this.container.querySelector('input[slot="input"]');return e instanceof HTMLInputElement?e:null}},{key:"init",value:(p=u(a().m(function t(){return a().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents();case 2:return t.a(2)}},t,this)})),function(){return p.apply(this,arguments)})},{key:"render",value:(f=u(a().m(function t(){return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,h(e,"render",this,3)([]);case 1:if(this.input=this.resolveInputElement(),this.element=this.container.querySelector(".holi-calendar"),this.prevBtn=this.container.querySelector('[data-action="prev-month"]'),this.nextBtn=this.container.querySelector('[data-action="next-month"]'),this.titleEl=this.container.querySelector('[data-role="title"]'),this.thead=this.container.querySelector('[data-role="thead"]'),this.tbody=this.container.querySelector('[data-role="tbody"]'),this.timeBox=this.container.querySelector('[data-role="time"]'),this.hourInput=this.container.querySelector('[data-role="hour"]'),this.minuteInput=this.container.querySelector('[data-role="minute"]'),this.timeToggle=this.container.querySelector('[data-action="toggle-ampm"]'),this.messages=this.container.querySelector('[data-role="messages"]'),this.live=this.container.querySelector('[data-role="live"]'),this.element&&this.thead&&this.tbody&&this.prevBtn&&this.nextBtn&&this.titleEl&&this.messages&&this.live){t.n=2;break}throw new Error("Calendar template is missing required nodes");case 2:this.element.dir=this.rtl?"rtl":"ltr",this.renderCalendar();case 3:return t.a(2)}},t,this)})),function(){return f.apply(this,arguments)})},{key:"bindEvents",value:function(){var t,e,n,r,i,o,a,l=this;null===(t=this.prevBtn)||void 0===t||t.addEventListener("click",this.onPrev),null===(e=this.nextBtn)||void 0===e||e.addEventListener("click",this.onNext),null===(n=this.tbody)||void 0===n||n.addEventListener("click",this.onDayClick),null===(r=this.timeToggle)||void 0===r||r.addEventListener("click",this.onToggleAmPm),null===(i=this.element)||void 0===i||i.addEventListener("touchstart",this.onTouchStart,{passive:!0}),null===(o=this.hourInput)||void 0===o||o.addEventListener("input",function(){var t=Number(l.hourInput.value);if(Number.isFinite(t)){if(l.hour12){var e=l.hour>=12,n=w(t,1,12);l.hour=n%12+(e?12:0)}else l.hour=w(t,0,23);l.renderTime()}}),null===(a=this.minuteInput)||void 0===a||a.addEventListener("input",function(){var t=Number(l.minuteInput.value);if(Number.isFinite(t)){var e=Math.round(t/l.step)*l.step;l.minute=w(e,0,59),l.renderTime()}})}},{key:"renderCalendar",value:function(){this.renderHeader(),this.renderDays(),this.renderTime()}},{key:"renderHeader",value:function(){var t=new Intl.DateTimeFormat(this.locale,{month:"long",year:"numeric",timeZone:this.tz});this.titleEl.textContent=t.format(new Date(this.year,this.month-1,1)),this.thead.replaceChildren();var e=document.createElement("tr"),n=new Intl.DateTimeFormat(this.locale,{weekday:"short"}),r=function(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Array(7).keys()).map(function(t){return n.format(new Date(2021,7,t+1))});this.rtl&&r.reverse(),r.forEach(function(t){var n=document.createElement("th");n.textContent=t,e.appendChild(n)}),this.thead.appendChild(e)}},{key:"renderDays",value:function(){var t=this;this.tbody.replaceChildren();for(var e,n,r=new Date(this.year,this.month-1,1).getDay(),i=(e=this.year,n=this.month,new Date(e,n,0).getDate()),o=this.today.getFullYear(),a=this.today.getMonth()+1,l=this.today.getDate(),s=1-r,u=function(){for(var e=document.createElement("tr"),n=[],r=0;r<7;r+=1,s+=1){var u=document.createElement("td");u.className="holi-calendar-day",s<1||s>i?u.classList.add("is-outside"):(u.textContent=String(s),u.tabIndex=0,u.setAttribute("data-day",String(s)),t.year===o&&t.month===a&&s===l&&u.classList.add("is-today"),t.day===s&&u.classList.add("is-selected"),t.applyDateValidation(u,new Date(t.year,t.month-1,s))),n.push(u)}t.rtl&&n.reverse(),n.forEach(function(t){return e.appendChild(t)}),t.tbody.appendChild(e)},c=0;c<6;c+=1)u()}},{key:"renderTime",value:function(){this.timeBox&&this.hourInput&&this.minuteInput&&this.timeToggle&&(this.hourInput.step="1",this.minuteInput.step=String(this.step),this.hourInput.value=String(this.hour12?w(this.hour%12||12,1,12):w(this.hour,0,23)),this.minuteInput.value=String(w(this.minute,0,59)),this.timeToggle.hidden=!this.hour12,this.timeToggle.textContent=this.hour>=12?"PM":"AM")}},{key:"runValidators",value:(s=u(a().m(function t(e,n){var r,i,o,l;return a().w(function(t){for(;;)switch(t.n){case 0:r=[],i=0;case 1:if(!(i<this.validators.length)){t.n=5;break}if((o=this.validators[i])&&o.type===e){t.n=2;break}return t.a(3,4);case 2:return t.n=3,o.validate(n,this);case 3:!0!==(l=t.v)&&r.push({severity:o.severity||"error",message:"string"==typeof l?l:o.name});case 4:i+=1,t.n=1;break;case 5:return t.a(2,r)}},t,this)})),function(t,e){return s.apply(this,arguments)})},{key:"applyDateValidation",value:function(t,e){this.runValidators("date",e).then(function(e){var n=e.some(function(t){return"error"===t.severity}),r=e.find(function(t){return"warning"===t.severity});if(n){var i=e.find(function(t){return"error"===t.severity});return t.classList.add("is-invalid"),t.setAttribute("aria-disabled","true"),void(t.title=(null==i?void 0:i.message)||"Unavailable")}r&&(t.classList.add("is-warning"),t.title=r.message)})}},{key:"showIssues",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.messages&&(this.messages.replaceChildren(),e.forEach(function(e){var n=document.createElement("div");n.className="holi-calendar-message is-".concat(e.severity||"info"),n.textContent=e.message||"",t.messages.appendChild(n)}),e.length&&this.announce(e.map(function(t){return t.message}).join(". ")))}},{key:"handleDayClick",value:(l=u(a().m(function t(e){var n,r,i,o,l;return a().w(function(t){for(;;)switch(t.n){case 0:if(i=null===(n=e.target)||void 0===n||null===(r=n.closest)||void 0===r?void 0:r.call(n,"[data-day]")){t.n=1;break}return t.a(2);case 1:if(!i.classList.contains("is-invalid")&&!i.classList.contains("is-outside")){t.n=2;break}return t.a(2);case 2:if(o=Number(i.getAttribute("data-day")),Number.isFinite(o)&&!(o<=0)){t.n=3;break}return t.a(2);case 3:return this.day=o,this.renderDays(),t.n=4,this.runValidators("selection",this.getDate());case 4:if(l=t.v,this.showIssues(l),!l.some(function(t){return"error"===t.severity})){t.n=5;break}return t.a(2);case 5:this.commit();case 6:return t.a(2)}},t,this)})),function(t){return l.apply(this,arguments)})},{key:"handleSwipe",value:function(t){var e,n,r=this,i=null===(e=t.touches)||void 0===e||null===(e=e[0])||void 0===e?void 0:e.clientX;Number.isFinite(i)&&(null===(n=this.element)||void 0===n||n.addEventListener("touchmove",function(t){var e,n=null===(e=t.touches)||void 0===e||null===(e=e[0])||void 0===e?void 0:e.clientX;if(Number.isFinite(n)){var o=n-i,a=r.rtl?-1:1;o>60*a&&r.changeMonth(-1),o<-60*a&&r.changeMonth(1)}},{once:!0}))}},{key:"changeMonth",value:function(t){this.month+=t,this.month<1&&(this.month=12,this.year-=1),this.month>12&&(this.month=1,this.year+=1),this.renderCalendar()}},{key:"getDate",value:function(){var t,e=this.hour12?this.hour%12+("PM"===(null===(t=this.timeToggle)||void 0===t?void 0:t.textContent)?12:0):this.hour,n=this.day||1;return new Date(this.year,this.month-1,n,e,this.minute)}},{key:"commit",value:function(){var t,e=this.getDate();this.input&&(this.input.value=e.toISOString(),this.input.dispatchEvent(new Event("input",{bubbles:!0})),this.input.dispatchEvent(new Event("change",{bubbles:!0}))),null===(t=this.element)||void 0===t||t.dispatchEvent(new CustomEvent("calendarchange",{bubbles:!0,detail:{value:e.toISOString(),date:e}})),this.announce("Selected ".concat(e.toLocaleString(this.locale,{timeZone:this.tz})))}},{key:"announce",value:function(t){var e=this;this.live&&(this.live.textContent="",requestAnimationFrame(function(){e.live.textContent=t||""}))}},{key:"destroy",value:function(){var t,n,r,i,o;null===(t=this.prevBtn)||void 0===t||t.removeEventListener("click",this.onPrev),null===(n=this.nextBtn)||void 0===n||n.removeEventListener("click",this.onNext),null===(r=this.tbody)||void 0===r||r.removeEventListener("click",this.onDayClick),null===(i=this.timeToggle)||void 0===i||i.removeEventListener("click",this.onToggleAmPm),null===(o=this.element)||void 0===o||o.removeEventListener("touchstart",this.onTouchStart),h(e,"destroy",this,3)([])}}],i=[{key:"selector",get:function(){return"calendar"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"calendar"}},{key:"registerValidator",value:function(t){if(!t||!t.name||"function"!=typeof t.validate)throw new Error("Invalid calendar validator");g.set(t.name,t)}}],r&&c(n.prototype,r),i&&c(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i,l,s,f,p}(r.Component);S=O,E="calendar-template",(k=m(k="templateId"))in S?Object.defineProperty(S,k,{value:E,enumerable:!0,configurable:!0,writable:!0}):S[k]=E,"undefined"!=typeof window&&(window.CalendarComponent=O,window.Calendar=O,window.Calendar.registerValidator=O.registerValidator.bind(O))},4838(t,e,n){"use strict";function r(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||i(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){if(t){if("string"==typeof t)return o(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function a(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var a=r&&r.prototype instanceof u?r:u,c=Object.create(a.prototype);return l(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(l(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,l(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,l(h,"constructor",d),l(d,"constructor",c),c.displayName="GeneratorFunction",l(d,i,"GeneratorFunction"),l(h),l(h,i,"Generator"),l(h,r,function(){return this}),l(h,"toString",function(){return"[object Generator]"}),(a=function(){return{w:o,m:p}})()}function l(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}l=function(t,e,n,r){function o(e,n){l(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},l(t,e,n,r)}function s(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function u(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){s(o,r,i,a,l,"next",t)}function l(t){s(o,r,i,a,l,"throw",t)}a(void 0)})}}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,b(r.key),r)}}function f(t,e,n){return e=y(e),function(t,e){if(e&&("object"==c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,h()?Reflect.construct(e,n||[],y(t).constructor):e.apply(t,n))}function h(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(h=function(){return!!t})()}function p(t,e,n,r){var i=v(y(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function v(){return v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=y(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},v.apply(null,arguments)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}function b(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}n.r(e),n.d(e,{CarouselComponent:()=>k});var g,w,S,k=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=f(this,e,[t,r])).templateId=e.templateId,n.mode=n.resolveMode(t.getAttribute("mode")||"fade"),n.baseActiveSlides=n.parseNumber(t.getAttribute("active-slides"),1),n.baseSlidesToMove=n.parseNumber(t.getAttribute("move-slides"),1),n.activeSlides=n.baseActiveSlides,n.slidesToMove=n.baseSlidesToMove,n.loop=!t.hasAttribute("no-loop"),n.autoStart=!t.hasAttribute("no-autoplay"),n.pauseOnHover=!t.hasAttribute("no-pause-on-hover"),n.intervalMs=n.parseNumber(t.getAttribute("interval"),5e3),n.skipTarget=t.getAttribute("skip-target")||"#main-content",n.responsive=n.parseResponsiveConfig(t.getAttribute("responsive")),n.currentIndex=0,n.isPlaying=n.autoStart,n.animationFrame=null,n.progressStartedAt=0,n.boundResize=null,n.slotted=null,n.track=null,n.slideList=[],n.prevButton=null,n.nextButton=null,n.playPauseButton=null,n.loopButton=null,n.dotsContainer=null,n.progressBar=null,n.liveRegion=null,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&m(t,e)}(e,t),n=e,o=[{key:"parseNumber",value:function(t,e){var n=Number(t);return Number.isFinite(n)&&n>0?n:e}},{key:"resolveMode",value:function(t){return"slide"===String(t||"fade").trim().toLowerCase()?"slide":"fade"}},{key:"parseResponsiveConfig",value:function(t){if(!t)return{};try{var e=JSON.parse(t);return e&&"object"===c(e)?e:{}}catch(t){return{}}}},{key:"captureSlots",value:function(){var t=Array.from(this.container.children).filter(function(t){return!t.classList.contains("holi-carousel")}),e=function(e){return t.find(function(t){return t.getAttribute("slot")===e})||null},n=e("slides")||this.container.querySelector(".slides");this.slotted={skipLink:e("skip-link"),slides:n,anchors:e("anchors"),dots:e("dots"),controls:e("controls"),progress:e("progress"),liveRegion:e("live-region")}}},{key:"init",value:(h=u(a().m(function t(){return a().w(function(t){for(;;)switch(t.n){case 0:return this.captureSlots(),this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents(),this.applyResponsiveSettings(),this.goToSlide(0,!1),this.autoStart&&this.startAutoSlide();case 2:return t.a(2)}},t,this)})),function(){return h.apply(this,arguments)})},{key:"validateStructure",value:function(){var t;if(p(e,"validateStructure",this,3)([]),!(null!==(t=this.slotted)&&void 0!==t&&t.slides||this.container.querySelector('.slides, .slide, [slot="slides"]')))throw new Error('Carousel requires slides markup. Provide [slot="slides"] with .slide items.')}},{key:"render",value:(s=u(a().m(function t(){return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,p(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".holi-carousel"),this.element){t.n=2;break}return t.a(2);case 2:this.element.classList.toggle("fade","fade"===this.mode),this.element.classList.toggle("slide-mode","slide"===this.mode),this.applySlotContent(),this.track=this.container.querySelector('[data-role="track"]'),this.prevButton=this.container.querySelector('[data-action="previous"]'),this.nextButton=this.container.querySelector('[data-action="next"]'),this.playPauseButton=this.container.querySelector('[data-action="play-pause"]'),this.loopButton=this.container.querySelector('[data-action="toggle-loop"]'),this.dotsContainer=this.container.querySelector('[data-role="dots"]'),this.progressBar=this.container.querySelector('[data-role="progress-bar"]'),this.liveRegion=this.container.querySelector('[data-role="live-region"]'),this.refreshSlides(),this.updateControlLabels(),this.updateTrackSizing(),this.renderDots();case 3:return t.a(2)}},t,this)})),function(){return s.apply(this,arguments)})},{key:"applySlotContent",value:function(){var t,e,n,o,a,l,s,u,c=this;if([["skip-link",null===(t=this.slotted)||void 0===t?void 0:t.skipLink],["slides",null===(e=this.slotted)||void 0===e?void 0:e.slides],["anchors",null===(n=this.slotted)||void 0===n?void 0:n.anchors],["dots",null===(o=this.slotted)||void 0===o?void 0:o.dots],["controls",null===(a=this.slotted)||void 0===a?void 0:a.controls],["progress",null===(l=this.slotted)||void 0===l?void 0:l.progress],["live-region",null===(s=this.slotted)||void 0===s?void 0:s.liveRegion]].forEach(function(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){u=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(t,e)||i(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,2),n=e[0],r=e[1];if(r){var o=c.container.querySelector('slot[name="'.concat(n,'"]'));o&&o.replaceWith(r)}}),this.track&&null!==(u=this.slotted)&&void 0!==u&&u.slides){var d=this.slotted.slides.matches(".slides")?this.slotted.slides:this.slotted.slides.querySelector(".slides");if(d){var f;(f=this.track).replaceChildren.apply(f,r(Array.from(d.children)))}else{var h,p=Array.from(this.slotted.slides.children).filter(function(t){var e;return null===(e=t.classList)||void 0===e?void 0:e.contains("slide")});p.length&&(h=this.track).replaceChildren.apply(h,r(p))}}var v=this.container.querySelector('slot[name="slides"]');v&&v.parentElement===this.track&&v.replaceWith.apply(v,r(Array.from(v.childNodes)));var y=this.container.querySelector(".skip-link");y&&y.setAttribute("href",this.skipTarget)}},{key:"refreshSlides",value:function(){this.track&&(this.slideList=Array.from(this.track.querySelectorAll(".slide")),this.slideList.forEach(function(t,e){t.setAttribute("data-index",String(e)),t.setAttribute("aria-hidden","true"),t.classList.remove("active")}))}},{key:"bindEvents",value:function(){var t,e,n,r=this;this.element&&(this.element.addEventListener("click",function(t){var e=t.target.closest("[data-action]");if(e){var n=e.getAttribute("data-action");return"next"===n?(t.preventDefault(),void r.next()):"previous"===n?(t.preventDefault(),void r.previous()):"play-pause"===n?(t.preventDefault(),void r.togglePlayPause()):void("toggle-loop"===n&&(t.preventDefault(),r.toggleLoop()))}}),null===(t=this.dotsContainer)||void 0===t||t.addEventListener("click",function(t){var e=t.target.closest("[data-dot-index]");if(e){var n=Number(e.getAttribute("data-dot-index"));Number.isFinite(n)&&r.goToSlide(n,!0)}}),this.element.addEventListener("keydown",function(t){return r.handleKeydown(t)}),null===(e=this.track)||void 0===e||e.addEventListener("touchstart",function(t){return r.onTouchStart(t)},{passive:!0}),null===(n=this.track)||void 0===n||n.addEventListener("touchend",function(t){return r.onTouchEnd(t)},{passive:!0}),this.pauseOnHover&&(this.element.addEventListener("mouseenter",function(){return r.pauseAutoSlide(!1)}),this.element.addEventListener("mouseleave",function(){return r.resumeAutoSlide()})),"undefined"!=typeof window&&(this.boundResize=function(){return r.applyResponsiveSettings()},window.addEventListener("resize",this.boundResize)))}},{key:"applyResponsiveSettings",value:function(){var t=this,e=window.innerWidth||document.documentElement.clientWidth,n=null;Object.keys(this.responsive).map(function(t){return Number(t)}).filter(function(t){return Number.isFinite(t)}).sort(function(t,e){return t-e}).forEach(function(r){e<=r&&null==n&&(n=t.responsive[String(r)]||t.responsive[r])}),this.activeSlides=this.baseActiveSlides,this.slidesToMove=this.baseSlidesToMove,n&&"object"===c(n)&&(this.activeSlides=this.parseNumber(n.active,this.baseActiveSlides),this.slidesToMove=this.parseNumber(n.move,this.baseSlidesToMove)),this.activeSlides=Math.max(1,Math.min(this.activeSlides,this.slideList.length||1)),this.slidesToMove=Math.max(1,this.slidesToMove),this.updateTrackSizing(),this.renderDots(),this.goToSlide(Math.min(this.currentIndex,Math.max(this.getDotCount()-1,0)),!1)}},{key:"getDotCount",value:function(){return Math.max(1,Math.ceil((this.slideList.length||1)/this.slidesToMove))}},{key:"renderDots",value:function(){if(this.dotsContainer){this.dotsContainer.replaceChildren();for(var t=this.getDotCount(),e=0;e<t;e+=1){var n=document.createElement("button");n.type="button",n.className="dot",n.setAttribute("data-dot-index",String(e)),n.setAttribute("aria-label","Go to slide ".concat(e+1)),n.setAttribute("aria-pressed",e===this.currentIndex?"true":"false"),e===this.currentIndex&&n.classList.add("selected"),this.dotsContainer.appendChild(n)}}}},{key:"updateDots",value:function(){var t=this;this.dotsContainer&&this.dotsContainer.querySelectorAll("[data-dot-index]").forEach(function(e,n){var r=n===t.currentIndex;e.classList.toggle("selected",r),e.setAttribute("aria-pressed",r?"true":"false")})}},{key:"updateTrackSizing",value:function(){if(this.track&&this.slideList.length){var t=100/this.activeSlides;this.slideList.forEach(function(e){e.style.flex="0 0 ".concat(t,"%")})}}},{key:"goToSlide",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.slideList.length){var r=this.getDotCount()-1;this.currentIndex=Math.max(0,Math.min(t,r));var i=this.currentIndex*this.slidesToMove;if("slide"===this.mode){var o=i*(100/this.activeSlides);this.track&&(this.track.style.transform="translateX(-".concat(o,"%)")),this.slideList.forEach(function(t,n){var r=n>=i&&n<i+e.activeSlides;t.classList.toggle("active",r),t.setAttribute("aria-hidden",r?"false":"true")})}else this.slideList.forEach(function(t,n){var r=n>=i&&n<i+e.activeSlides;t.classList.toggle("active",r),t.setAttribute("aria-hidden",r?"false":"true")});this.updateDots(),this.announce("Slide ".concat(this.currentIndex+1," of ").concat(this.getDotCount()," is now visible")),n&&this.isPlaying&&this.startAutoSlide()}}},{key:"next",value:function(){var t=this.getDotCount()-1;if(this.currentIndex>=t){if(!this.loop)return;this.goToSlide(0)}else this.goToSlide(this.currentIndex+1)}},{key:"previous",value:function(){if(this.currentIndex<=0){if(!this.loop)return;this.goToSlide(this.getDotCount()-1)}else this.goToSlide(this.currentIndex-1)}},{key:"togglePlayPause",value:function(){this.isPlaying?this.pauseAutoSlide(!0):(this.isPlaying=!0,this.updateControlLabels(),this.announce("Carousel playing"),this.startAutoSlide())}},{key:"pauseAutoSlide",value:function(t){this.isPlaying=!1,this.animationFrame&&(cancelAnimationFrame(this.animationFrame),this.animationFrame=null),this.updateControlLabels(),t&&this.announce("Carousel paused")}},{key:"resumeAutoSlide",value:function(){this.isPlaying||(this.isPlaying=!0,this.updateControlLabels(),this.startAutoSlide())}},{key:"toggleLoop",value:function(){this.loop=!this.loop,this.updateControlLabels(),this.announce("Loop mode ".concat(this.loop?"enabled":"disabled"))}},{key:"updateControlLabels",value:function(){this.playPauseButton&&(this.playPauseButton.textContent=this.isPlaying?"Pause":"Play",this.playPauseButton.setAttribute("aria-label",this.isPlaying?"Pause auto sliding":"Resume auto sliding")),this.loopButton&&(this.loopButton.textContent=this.loop?"Disable Loop":"Enable Loop",this.loopButton.setAttribute("aria-pressed",this.loop?"true":"false"))}},{key:"startAutoSlide",value:function(){var t=this;if(this.progressBar){this.animationFrame&&cancelAnimationFrame(this.animationFrame),this.progressBar.style.width="0%",this.progressStartedAt=Date.now();var e=function(){if(t.isPlaying){var n=Date.now()-t.progressStartedAt,r=Math.min(n/t.intervalMs*100,100);t.progressBar.style.width="".concat(r,"%"),n>=t.intervalMs&&(t.next(),t.progressStartedAt=Date.now(),t.progressBar.style.width="0%"),t.animationFrame=requestAnimationFrame(e)}};this.animationFrame=requestAnimationFrame(e)}}},{key:"onTouchStart",value:function(t){var e,n;this.touchStartX=null!==(e=null===(n=t.changedTouches)||void 0===n||null===(n=n[0])||void 0===n?void 0:n.clientX)&&void 0!==e?e:0}},{key:"onTouchEnd",value:function(t){var e,n,r=(null!==(e=null===(n=t.changedTouches)||void 0===n||null===(n=n[0])||void 0===n?void 0:n.clientX)&&void 0!==e?e:0)-(this.touchStartX||0);Math.abs(r)<24||(r<0?this.next():this.previous())}},{key:"handleKeydown",value:function(t){return"ArrowRight"===t.key?(t.preventDefault(),void this.next()):"ArrowLeft"===t.key?(t.preventDefault(),void this.previous()):void(" "===t.key&&(t.preventDefault(),this.togglePlayPause()))}},{key:"announce",value:function(t){this.liveRegion&&(this.liveRegion.textContent=t)}},{key:"destroy",value:function(){this.animationFrame&&(cancelAnimationFrame(this.animationFrame),this.animationFrame=null),this.boundResize&&(window.removeEventListener("resize",this.boundResize),this.boundResize=null),p(e,"destroy",this,3)([])}}],l=[{key:"selector",get:function(){return"carousel"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"carousel"}}],o&&d(n.prototype,o),l&&d(n,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o,l,s,h}(n(8812).Component);g=k,S="carousel-template",(w=b(w="templateId"))in g?Object.defineProperty(g,w,{value:S,enumerable:!0,configurable:!0,writable:!0}):g[w]=S,"undefined"!=typeof window&&(window.CarouselComponent=k)},4546(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||o(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){if(t){if("string"==typeof t)return a(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function l(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return s(c,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var a={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(s(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,s(h,"constructor",d),s(d,"constructor",c),c.displayName="GeneratorFunction",s(d,i,"GeneratorFunction"),s(h),s(h,i,"Generator"),s(h,r,function(){return this}),s(h,"toString",function(){return"[object Generator]"}),(l=function(){return{w:o,m:p}})()}function s(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}s=function(t,e,n,r){function o(e,n){s(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},s(t,e,n,r)}function u(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function c(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){u(o,r,i,a,l,"next",t)}function l(t){u(o,r,i,a,l,"throw",t)}a(void 0)})}}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,b(r.key),r)}}function f(t,e,n){return e=y(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,h()?Reflect.construct(e,n||[],y(t).constructor):e.apply(t,n))}function h(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(h=function(){return!!t})()}function p(t,e,n,r){var i=v(y(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function v(){return v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=y(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},v.apply(null,arguments)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}function b(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{ChartComponent:()=>k});var g,w,S,k=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=f(this,e,[t,r])).templateId=e.templateId,n.type=n.resolveType(r.type||n.readAttr("type","line")),n.height=n.parseNumber(r.height,n.readAttr("height","220"),220),n.showLegend=n.parseBoolean(r.showLegend,n.readAttr("show-legend","true"),!0),n.title=String(r.title||n.readAttr("title","")).trim(),n.colors=n.resolveColors(r.colors||n.readAttr("colors","")),n.data=n.resolveData(r.data),n.element=null,n.svgEl=null,n.legendEl=null,n.emptyEl=null,n.boundClick=function(t){return n.handlePointClick(t)},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&m(t,e)}(e,t),n=e,r=[{key:"readAttr",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=this.container.getAttribute(t);return null!=r?r:null!==(e=this.container.getAttribute("data-".concat(t)))&&void 0!==e?e:n}},{key:"parseNumber",value:function(){for(var t,e=(t=arguments.length-1)<0||arguments.length<=t?void 0:arguments[t],n=0;n<arguments.length-1;n+=1){var r=n<0||arguments.length<=n?void 0:arguments[n];if(null!=r&&""!==r){var i=Number(r);if(Number.isFinite(i))return i}}return e}},{key:"parseBoolean",value:function(){for(var t,e=(t=arguments.length-1)<0||arguments.length<=t?void 0:arguments[t],n=0;n<arguments.length-1;n+=1){var r=n<0||arguments.length<=n?void 0:arguments[n];if(null!=r&&""!==r){if("boolean"==typeof r)return r;var i=String(r).trim().toLowerCase();if(["1","true","yes","on"].includes(i))return!0;if(["0","false","no","off"].includes(i))return!1}}return e}},{key:"resolveType",value:function(t){var e=String(t||"line").trim().toLowerCase();return new Set(["line","bar","area","pie","doughnut"]).has(e)?e:"line"}},{key:"resolveColors",value:function(t){if(Array.isArray(t))return t.map(function(t){return String(t).trim()}).filter(Boolean);var e=String(t||"").trim();if(!e)return["#2563eb","#10b981","#f59e0b","#ef4444","#7c3aed","#14b8a6","#f97316"];if(e.startsWith("["))try{var n=JSON.parse(e);if(Array.isArray(n))return n.map(function(t){return String(t).trim()}).filter(Boolean)}catch(t){}return e.split(",").map(function(t){return t.trim()}).filter(Boolean)}},{key:"resolveData",value:function(t){var e=this;if(Array.isArray(t))return this.normalizeData(t);var n=this.readAttr("data",this.readAttr("series",""));if(n)try{var r=JSON.parse(n);if(Array.isArray(r))return this.normalizeData(r)}catch(t){}var i=Array.from(this.container.querySelectorAll("[data-point], [data-value], li"));if(i.length){var o=i.map(function(t,n){var r;return{label:t.getAttribute("data-label")||t.getAttribute("label")||(null===(r=t.textContent)||void 0===r?void 0:r.trim())||"Item ".concat(n+1),value:e.parseNumber(t.getAttribute("data-point"),t.getAttribute("data-value"),t.getAttribute("value"),0)}});return this.normalizeData(o)}return[]}},{key:"normalizeData",value:function(t){var e=this;return(Array.isArray(t)?t:[]).map(function(t,n){var r,i,o,a=null!==(r=null!==(i=null!==(o=null==t?void 0:t.label)&&void 0!==o?o:null==t?void 0:t.name)&&void 0!==i?i:null==t?void 0:t.x)&&void 0!==r?r:"Item ".concat(n+1),l=e.parseNumber(null==t?void 0:t.value,null==t?void 0:t.y,null==t?void 0:t.amount,0);return{label:String(a),value:Math.max(0,Number(l)||0)}})}},{key:"init",value:(u=c(l().m(function t(){return l().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents();case 2:return t.a(2)}},t,this)})),function(){return u.apply(this,arguments)})},{key:"render",value:(s=c(l().m(function t(){return l().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,p(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".holi-chart"),this.svgEl=this.container.querySelector('[data-role="svg"]'),this.legendEl=this.container.querySelector('[data-role="legend"]'),this.emptyEl=this.container.querySelector('[data-role="empty"]'),this.titleEl=this.container.querySelector('[data-role="title"]'),this.element&&this.svgEl&&this.legendEl&&this.emptyEl&&this.titleEl){t.n=2;break}throw new Error("Chart template is missing required nodes");case 2:this.element.style.setProperty("--chart-height","".concat(Math.max(120,this.height),"px")),this.titleEl.textContent=this.title,this.titleEl.hidden=!this.title,this.draw();case 3:return t.a(2)}},t,this)})),function(){return s.apply(this,arguments)})},{key:"bindEvents",value:function(){var t;null===(t=this.svgEl)||void 0===t||t.addEventListener("click",this.boundClick)}},{key:"handlePointClick",value:function(t){var e,n,r=null===(e=t.target)||void 0===e||null===(n=e.closest)||void 0===n?void 0:n.call(e,"[data-point-index]");if(r){var i=Number(r.getAttribute("data-point-index"));!Number.isFinite(i)||i<0||i>=this.data.length||this.dispatchEvent("chartpointselect",{index:i,item:this.data[i],type:this.type})}}},{key:"draw",value:function(){if(this.svgEl&&this.legendEl&&this.emptyEl){this.svgEl.replaceChildren(),this.legendEl.replaceChildren();var t=this.normalizeData(this.data);this.data=t;var e=t.length>0&&t.some(function(t){return t.value>0});this.emptyEl.hidden=e,this.svgEl.hidden=!e,this.legendEl.hidden=!e||!this.showLegend,e&&(this.svgEl.setAttribute("viewBox","0 0 100 100"),this.svgEl.setAttribute("aria-label","Chart (".concat(this.type,")")),this.svgEl.setAttribute("preserveAspectRatio","pie"===this.type||"doughnut"===this.type?"xMidYMid meet":"none"),"bar"===this.type?this.drawBars(t):"pie"===this.type||"doughnut"===this.type?this.drawPie(t,"doughnut"===this.type):this.drawLine(t,"area"===this.type),this.showLegend&&this.drawLegend(t))}}},{key:"drawLine",value:function(t){for(var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.calculateCartesianPoints(t),o=this.createSvgNode("g",{class:"holi-chart-grid"}),a=0;a<=4;a+=1){var l=10+20*a;o.appendChild(this.createSvgNode("line",{x1:8,y1:l,x2:96,y2:l}))}if(this.svgEl.appendChild(o),n){var s=r[0],u=r[r.length-1],c=["M ".concat(s.x," 90")].concat(i(r.map(function(t,e){return"".concat("L"," ").concat(t.x," ").concat(t.y)})),["L ".concat(u.x," 90 Z")]).join(" ");this.svgEl.appendChild(this.createSvgNode("path",{d:c,class:"holi-chart-area"}))}var d=r.map(function(t,e){return"".concat(0===e?"M":"L"," ").concat(t.x," ").concat(t.y)}).join(" ");this.svgEl.appendChild(this.createSvgNode("path",{d,class:"holi-chart-line",stroke:this.resolveColor(0)})),r.forEach(function(t){var n=e.createSvgNode("circle",{cx:t.x,cy:t.y,r:2.2,class:"holi-chart-dot",fill:e.resolveColor(t.index),"data-point-index":t.index});e.svgEl.appendChild(n)})}},{key:"drawBars",value:function(t){var e=this,n=Math.max.apply(Math,i(t.map(function(t){return t.value})).concat([1])),r=Math.max(4,(88-2*(t.length-1))/t.length);t.forEach(function(t,i){var o=t.value/n*72,a=8+i*(r+2),l=90-o;e.svgEl.appendChild(e.createSvgNode("rect",{x:a,y:l,width:r,height:o,rx:1.5,fill:e.resolveColor(i),class:"holi-chart-bar","data-point-index":i}))})}},{key:"drawPie",value:function(t,e){var n=this,r=t.reduce(function(t,e){return t+e.value},0);if(!(r<=0)){var i=-Math.PI/2;t.forEach(function(t,e){var o=t.value/r*Math.PI*2,a=i+o,l=n.describeArc(50,50,36,i,a);n.svgEl.appendChild(n.createSvgNode("path",{d:l,fill:n.resolveColor(e),class:"holi-chart-slice","data-point-index":e})),i=a}),e&&this.svgEl.appendChild(this.createSvgNode("circle",{cx:50,cy:50,r:19,class:"holi-chart-hole"}))}}},{key:"calculateCartesianPoints",value:function(t){var e=Math.max.apply(Math,i(t.map(function(t){return t.value})).concat([1])),n=t.length>1?84/(t.length-1):0;return t.map(function(t,r){return{x:10+r*n,y:90-t.value/e*76,index:r}})}},{key:"describeArc",value:function(t,e,n,r,i){var o=t+n*Math.cos(r),a=e+n*Math.sin(r),l=t+n*Math.cos(i),s=e+n*Math.sin(i),u=i-r>Math.PI?1:0;return"M ".concat(t," ").concat(e," L ").concat(o," ").concat(a," A ").concat(n," ").concat(n," 0 ").concat(u," 1 ").concat(l," ").concat(s," Z")}},{key:"drawLegend",value:function(t){var e=this;t.forEach(function(t,n){var r=document.createElement("li");r.className="holi-chart-legend-item",r.setAttribute("data-point-index",String(n));var i=document.createElement("span");i.className="holi-chart-legend-swatch",i.style.backgroundColor=e.resolveColor(n);var o=document.createElement("span");o.className="holi-chart-legend-label",o.textContent="".concat(t.label," (").concat(t.value,")"),r.append(i,o),e.legendEl.appendChild(r)})}},{key:"createSvgNode",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=document.createElementNS("http://www.w3.org/2000/svg",t);return Object.entries(e).forEach(function(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){u=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(t,e)||o(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,2),r=e[0],i=e[1];null!=i&&n.setAttribute(r,String(i))}),n}},{key:"resolveColor",value:function(t){return this.colors.length?this.colors[t%this.colors.length]:"#2563eb"}},{key:"setType",value:function(t){this.type=this.resolveType(t),this.draw()}},{key:"update",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n.type&&(this.type=this.resolveType(n.type)),null!=n.height&&(this.height=this.parseNumber(n.height,this.height),null===(t=this.element)||void 0===t||t.style.setProperty("--chart-height","".concat(Math.max(120,this.height),"px"))),n.colors&&(this.colors=this.resolveColors(n.colors)),null!=n.title&&(this.title=String(n.title||"").trim(),this.titleEl&&(this.titleEl.textContent=this.title,this.titleEl.hidden=!this.title)),null!=n.showLegend&&(this.showLegend=this.parseBoolean(n.showLegend,this.showLegend)),this.data=this.normalizeData(e),this.draw(),this.dispatchEvent("chartupdate",{type:this.type,count:this.data.length})}},{key:"destroy",value:function(){var t;null===(t=this.svgEl)||void 0===t||t.removeEventListener("click",this.boundClick),p(e,"destroy",this,3)([])}}],a=[{key:"selector",get:function(){return"chart"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"chart"}}],r&&d(n.prototype,r),a&&d(n,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,a,s,u}(n(8812).Component);g=k,S="chart-template",(w=b(w="templateId"))in g?Object.defineProperty(g,w,{value:S,enumerable:!0,configurable:!0,writable:!0}):g[w]=S,"undefined"!=typeof window&&(window.ChartComponent=k)},9673(t,e,n){"use strict";n.r(e),n.d(e,{CheckboxGroupComponent:()=>k});var r=n(8812),i=n(853);function o(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function s(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,c=Object.create(s.prototype);return u(c,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var a={};function l(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(u(e={},r,function(){return this}),e),h=d.prototype=l.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,u(h,"constructor",d),u(d,"constructor",c),c.displayName="GeneratorFunction",u(d,i,"GeneratorFunction"),u(h),u(h,i,"Generator"),u(h,r,function(){return this}),u(h,"toString",function(){return"[object Generator]"}),(s=function(){return{w:o,m:p}})()}function u(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}u=function(t,e,n,r){function o(e,n){u(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},u(t,e,n,r)}function c(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,b(r.key),r)}}function f(t,e,n){return e=y(e),function(t,e){if(e&&("object"==l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,h()?Reflect.construct(e,n||[],y(t).constructor):e.apply(t,n))}function h(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(h=function(){return!!t})()}function p(t,e,n,r){var i=v(y(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function v(){return v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=y(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},v.apply(null,arguments)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}function b(t){var e=function(t){if("object"!=l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==l(e)?e:e+""}var g,w,S,k=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=f(this,e,[t,r])).templateId=e.templateId,n.config={legend:n.container.getAttribute("legend")||"",name:n.container.getAttribute("name")||"",type:n.container.getAttribute("type")||"checkbox",options:n.parseOptions(n.container.getAttribute("data-options"))},n.state={legend:n.config.legend,name:n.config.name,type:n.config.type,options:n.config.options,values:[]},n.boundChange=function(){return n.syncState()},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&m(t,e)}(e,t),n=e,r=[{key:"parseOptions",value:function(t){if(!t)return[];try{var e=JSON.parse(t);return Array.isArray(e)?e:[]}catch(t){return[]}}},{key:"init",value:function(){this.validateStructure(),this.render()}},{key:"render",value:(u=s().m(function t(){var n,r;return s().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,p(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-checkbox-group"),this.optionsHost=this.container.querySelector('[data-role="options"]'),this.projectSlot("legend"),this.projectSlot("options"),this.projectSlot("actions"),!(null===(n=this.optionsHost)||void 0===n?void 0:n.querySelector('input[type="checkbox"], input[type="radio"]'))&&this.config.options.length>0&&this.renderConfiguredOptions(),this.applyNameToInputs(),this.syncState(),null===(r=this.element)||void 0===r||r.addEventListener("change",this.boundChange);case 2:return t.a(2)}},t,this)}),h=function(){var t=this,e=arguments;return new Promise(function(n,r){var i=u.apply(t,e);function o(t){c(i,n,r,o,a,"next",t)}function a(t){c(i,n,r,o,a,"throw",t)}o(void 0)})},function(){return h.apply(this,arguments)})},{key:"projectSlot",value:function(t){var e=this.container.querySelector('slot[name="'.concat(t,'"]'));if(e){var n=Array.from(this.container.querySelectorAll('[slot="'.concat(t,'"]')));if(n.length){var r=document.createDocumentFragment();n.forEach(function(t){t.removeAttribute("slot"),r.appendChild(t)}),e.replaceWith(r)}}}},{key:"renderConfiguredOptions",value:function(){var t=this;if(this.optionsHost){var e=document.createDocumentFragment();this.config.options.forEach(function(n,r){var i=n&&"object"===l(n)?n:{value:n,label:String(n)},o=document.createElement("label");o.className="holi-checkbox-option";var a=document.createElement("input");a.type="radio"===t.config.type?"radio":"checkbox",a.value=null==i.value?"":String(i.value),a.checked=!!i.checked,a.name=t.config.name||"holi-checkbox-".concat(r);var s=document.createElement("span");s.textContent=null==i.label?String(i.value||""):String(i.label),o.append(a,s),e.appendChild(o)}),this.optionsHost.appendChild(e)}}},{key:"applyNameToInputs",value:function(){var t=this;this.optionsHost&&this.config.name&&this.optionsHost.querySelectorAll('input[type="checkbox"], input[type="radio"]').forEach(function(e){e.name||(e.name=t.config.name)})}},{key:"syncState",value:function(){if(this.optionsHost){var t=Array.from(this.optionsHost.querySelectorAll('input[type="checkbox"], input[type="radio"]')).filter(function(t){return t.checked}).map(function(t){return t.value});this.state.values=t,this.dispatchEvent("checkboxchange",{values:o(this.state.values)})}}},{key:"value",get:function(){return o(this.state.values)}},{key:"validate",value:function(){return!0}},{key:"destroy",value:function(){var t;null===(t=this.element)||void 0===t||t.removeEventListener("change",this.boundChange),p(e,"destroy",this,3)([])}}],a=[{key:"selector",get:function(){return"holi-checkbox"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"checkbox-group"}},{key:"getNativeSelectors",value:function(){return['input[type="checkbox"][component="checkbox"]','input[type="checkbox"][role="checkbox"]']}},{key:"prepareHost",value:function(t){if(!(t instanceof HTMLInputElement)||"checkbox"!==t.type)return t;var e=document.createElement("section");(0,i.ts)(t,e,{exclude:["component","role","type","checked","value"]}),e.setAttribute("component","checkbox-group"),e.setAttribute("type","checkbox");var n=t.getAttribute("id");n&&(e.setAttribute("id",n),t.removeAttribute("id"));var r=(0,i.VC)(t);return(r===t.parentElement?r:t).replaceWith(e),r&&e.appendChild(r),e}}],r&&d(n.prototype,r),a&&d(n,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,a,u,h}(r.Component);g=k,S="checkbox-group-template",(w=b(w="templateId"))in g?Object.defineProperty(g,w,{value:S,enumerable:!0,configurable:!0,writable:!0}):g[w]=S,"undefined"!=typeof window&&(window.CheckboxGroupComponent=k)},8812(t,e,n){"use strict";n.r(e),n.d(e,{Component:()=>M});var r=n(1904),i=n(3573),o=n(7458);function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach(function(e){s(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function s(t,e,n){return(e=h(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){u=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return c(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,h(r.key),r)}}function h(t){var e=function(t){if("object"!=d(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==d(e)?e:e+""}var p=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.component=e,this.container=(null==e?void 0:e.container)||null,this.stateKey=this.resolveStateKey(),this.stateStoreId=this.resolveStateStoreId(),this.stateMap={},this.stateHydratedFromAttr=!1,this.stateInternal={},this.isPublishingState=!1,this.isApplyingExternalState=!1,this.isApplyingMappedState=!1,this.stateUnsubscribe=null,this.stateMapUnsubscribers=[],this.stateProxyCache=new WeakMap},e=[{key:"resolveStateKey",value:function(){var t,e,n,r,i,o,a,l,s,u=null===(t=this.container)||void 0===t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"data-state-key");if(u)return String(u).trim();var c,d,f,h=(null===(n=this.container)||void 0===n||null===(r=n.getAttribute)||void 0===r?void 0:r.call(n,"component"))||(null===(i=this.container)||void 0===i||null===(o=i.getAttribute)||void 0===o?void 0:o.call(i,"role"))||((f=String((null===(c=this.container)||void 0===c?void 0:c.tagName)||"").toLowerCase()).startsWith("holi-")?f.slice(5):f||((null===(d=this.component)||void 0===d||null===(d=d.constructor)||void 0===d?void 0:d.name)||"component").replace(/component$/i,"").toLowerCase()),p=(null===(a=this.container)||void 0===a||null===(l=a.getAttribute)||void 0===l?void 0:l.call(a,"data-component-id"))||(null===(s=this.container)||void 0===s?void 0:s.id)||"component";return"".concat(String(h||"component").trim().toLowerCase(),".").concat(String(p).trim())}},{key:"resolveStateStoreId",value:function(){var t,e,n=null===(t=this.container)||void 0===t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"data-state-store");return n?String(n).trim():o.T.defaultStoreId}},{key:"install",value:function(){var t=this;this.container&&(this.stateMap=this.resolveStateMap(),Object.defineProperty(this.component,"state",{get:function(){return t.stateInternal},set:function(e){var n=e&&"object"===d(e)?e:{};t.stateInternal=t.createStateProxy(n),t.hydrateStateFromAttribute(),t.publishStateSnapshot()},configurable:!0,enumerable:!0}),this.component.state={},this.stateUnsubscribe=o.T.subscribe(this.stateKey,function(e){if(!t.isPublishingState&&!t.isApplyingExternalState&&e&&"object"===d(e)){t.isApplyingExternalState=!0;try{Object.keys(e).forEach(function(n){t.stateInternal[n]=e[n]})}finally{t.isApplyingExternalState=!1}}},this.stateStoreId),this.bindMappedStateSubscriptions())}},{key:"uninstall",value:function(){var t;null===(t=this.stateUnsubscribe)||void 0===t||t.call(this),this.stateUnsubscribe=null,this.stateMapUnsubscribers.forEach(function(t){return null==t?void 0:t()}),this.stateMapUnsubscribers=[]}},{key:"resolveStateMap",value:function(){var t,e,n=null===(t=this.container)||void 0===t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"data-state-map");if(!n)return{};try{var r=JSON.parse(n);if(!r||"object"!==d(r))return{};var i={};return Object.keys(r).forEach(function(t){var e=String(t||"").trim(),n=String(r[t]||"").trim();e&&n&&(i[e]=n)}),i}catch(t){return{}}}},{key:"bindMappedStateSubscriptions",value:function(){var t=this;this.stateMapUnsubscribers.forEach(function(t){return null==t?void 0:t()}),this.stateMapUnsubscribers=[],Object.entries(this.stateMap).forEach(function(e){var n=u(e,2),r=n[0],i=n[1],a=o.T.subscribe(i,function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(t.isPublishingState||t.isApplyingExternalState||t.isApplyingMappedState||void 0===e&&null!=n&&n.initial)){t.isApplyingMappedState=!0;try{t.setStatePath(r,e)}finally{t.isApplyingMappedState=!1}}},t.stateStoreId);t.stateMapUnsubscribers.push(a)})}},{key:"hydrateStateFromAttribute",value:function(){var t,e,n=this;if(!this.stateHydratedFromAttr){this.stateHydratedFromAttr=!0;var r=null===(t=this.container)||void 0===t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"state");if(r)try{var i=JSON.parse(r);if(!i||"object"!==d(i))return;var o=this.resolveStateExpressions(i);Object.keys(o).forEach(function(t){n.stateInternal[t]=o[t]})}catch(t){}}}},{key:"resolveStateExpressions",value:function(t){var e=this;if(Array.isArray(t))return t.map(function(t){return e.resolveStateExpressions(t)});if(t&&"object"===d(t)){var n={};return Object.keys(t).forEach(function(r){n[r]=e.resolveStateExpressions(t[r])}),n}if("string"!=typeof t)return t;var r=t.trim().match(/^@\{(.+)\}$/);if(!r)return t;var i=r[1].trim(),o=l(l(l({},"undefined"!=typeof window&&window.appState||{}),"undefined"!=typeof window&&window.pageContext||{}),this.stateInternal);try{var a;if("function"==typeof(null===(a=this.component)||void 0===a?void 0:a.evaluateExpression))return this.component.evaluateExpression(i,o)}catch(t){}return t}},{key:"createStateProxy",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(null==t||"object"!==d(t))return t;if(this.stateProxyCache.has(t))return this.stateProxyCache.get(t);var r=new Proxy(t,{get:function(t,r){var i=t[r];return null!=i&&"object"===d(i)?e.createStateProxy(i,n.concat(String(r))):i},set:function(t,r,i){t[r]=i;var o=n.concat(String(r)).join(".");return e.reflectStateValue(o,i),e.isApplyingExternalState||e.isApplyingMappedState||e.publishStateChange(o,i),!0},deleteProperty:function(t,r){if(!(r in t))return!0;delete t[r];var i=n.concat(String(r)).join(".");return e.isApplyingExternalState||e.isApplyingMappedState||e.publishStateChange(i,void 0),!0}});return this.stateProxyCache.set(t,r),r}},{key:"setStatePath",value:function(t,e){var n=String(t||"").replace(/\[(\w+)\]/g,".$1").split(".").filter(Boolean);if(n.length){for(var r=this.stateInternal,i=0;i<n.length-1;i+=1){var o=n[i];null!=r[o]&&"object"===d(r[o])||(r[o]={}),r=r[o]}r[n[n.length-1]]=e}}},{key:"getStatePath",value:function(t){return String(t||"").replace(/\[(\w+)\]/g,".$1").split(".").filter(Boolean).reduce(function(t,e){return null==t?void 0:t[e]},this.stateInternal)}},{key:"resolveMappedPath",value:function(t){var e=String(t||"").trim();if(!e)return"";for(var n=Object.entries(this.stateMap),r=0;r<n.length;r+=1){var i=u(n[r],2),o=i[0],a=i[1];if(e===o)return a;if(e.startsWith("".concat(o,"."))){var l=e.slice(o.length);return"".concat(a).concat(l)}}return""}},{key:"cloneSerializable",value:function(t){return this.snapshotValue(t)}},{key:"snapshotValue",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new WeakSet;if(null==t||"object"!==d(t))return t;if(n.has(t))return null;if(n.add(t),Array.isArray(t))return t.map(function(t){return e.snapshotValue(t,n)});var r={};return Object.keys(t).forEach(function(i){r[i]=e.snapshotValue(t[i],n)}),r}},{key:"toKebabCase",value:function(t){return String(t||"").replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[_\s]+/g,"-").toLowerCase()}},{key:"reflectStateValue",value:function(t,e){var n,r=String(t||"").trim();if(r&&!r.includes(".")){var i,o,a=this.toKebabCase(r);if(null==e)null===(i=this.container)||void 0===i||null===(o=i.removeAttribute)||void 0===o||o.call(i,a);else if("object"!==d(e)){var l,s;null===(l=this.container)||void 0===l||null===(s=l.setAttribute)||void 0===s||s.call(l,a,String(e))}r in this.component&&"function"!=typeof this.component[r]&&(this.component[r]=e),"function"==typeof(null===(n=this.component)||void 0===n?void 0:n.onStateReflect)&&this.component.onStateReflect(r,e)}}},{key:"publishStateSnapshot",value:function(){var t=this,e=this.cloneSerializable(this.stateInternal||{});this.shouldDispatchPpr("",e,!0)&&this.dispatchPprChange("",e,!0),this.isPublishingState=!0;try{o.T.publish(this.stateKey,e,this.stateStoreId),Object.entries(this.stateMap).forEach(function(e){var n=u(e,2),r=n[0],i=n[1],a=t.cloneSerializable(t.getStatePath(r));void 0!==a&&o.T.publish(i,a,t.stateStoreId)})}finally{this.isPublishingState=!1}}},{key:"publishStateChange",value:function(t,e){var n=String(t||"").trim();if(n){this.shouldDispatchPpr(n,e,!1)&&this.dispatchPprChange(n,e,!1),this.isPublishingState=!0;try{o.T.publish("".concat(this.stateKey,".").concat(n),this.cloneSerializable(e),this.stateStoreId);var r=this.resolveMappedPath(n);r&&o.T.publish(r,this.cloneSerializable(e),this.stateStoreId)}finally{this.isPublishingState=!1}}else this.publishStateSnapshot()}},{key:"dispatchPprChange",value:function(t,e,n){this.container instanceof Element&&this.container.dispatchEvent(new CustomEvent("holi:ppr-change",{detail:{component:this.component,path:t,value:this.cloneSerializable(e),initial:!!n},bubbles:!0}))}},{key:"shouldDispatchPpr",value:function(t,e,n){var r,i;return!(null!==(r=this.component)&&void 0!==r&&r.isApplyingDependencyUpdate||"function"==typeof(null===(i=this.component)||void 0===i?void 0:i.shouldDispatchPprChange)&&!1===this.component.shouldDispatchPprChange(t,e,n))}}],e&&f(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function v(t){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v(t)}function y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function m(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?y(Object(n),!0).forEach(function(e){g(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function b(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,w(r.key),r)}}function g(t,e,n){return(e=w(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function w(t){var e=function(t){if("object"!=v(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=v(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==v(e)?e:e+""}var S=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.component=e,this.container=(null==e?void 0:e.container)||null,this.boundDocumentChange=function(t){return n.handleDocumentChange(t)},this.boundOwnChange=function(t){return n.handleOwnChange(t)},this.initialSyncTimer=null}return e=t,(n=[{key:"install",value:function(){this.container instanceof Element&&(this.ensureComponentId(),this.hasInboundSubscriptions()&&(document.addEventListener("holi:ppr-change",this.boundDocumentChange),this.scheduleInitialSync()),this.hasOutboundTargets()&&this.container.addEventListener("holi:ppr-change",this.boundOwnChange))}},{key:"uninstall",value:function(){var t;this.initialSyncTimer&&(clearTimeout(this.initialSyncTimer),this.initialSyncTimer=null),document.removeEventListener("holi:ppr-change",this.boundDocumentChange),null===(t=this.container)||void 0===t||t.removeEventListener("holi:ppr-change",this.boundOwnChange)}},{key:"ensureComponentId",value:function(){this.container&&!this.container.getAttribute("data-component-id")&&this.container.setAttribute("data-component-id","holi-".concat(t.nextAutoId++))}},{key:"scheduleInitialSync",value:function(){var t=this;this.initialSyncTimer&&clearTimeout(this.initialSyncTimer),this.initialSyncTimer=setTimeout(function(){t.initialSyncTimer=null,t.performInitialSync()},0)}},{key:"performInitialSync",value:function(){var e=this;if(this.container instanceof Element){var n=this.readFirstAttr(t.sourceAttrNames);this.resolveElements(n).forEach(function(t){if(t instanceof Element&&t!==e.container){var n=r.Z.getElementInstances(t)[0]||null,i="function"==typeof(null==n?void 0:n.getStateSnapshot)?n.getStateSnapshot():{};e.applyInboundUpdate({sourceElement:t,sourceComponent:n,path:"",value:i,snapshot:i,initial:!0})}})}}},{key:"hasInboundSubscriptions",value:function(){return!!this.readFirstAttr(t.sourceAttrNames)}},{key:"hasOutboundTargets",value:function(){return!!this.readFirstAttr(t.targetAttrNames)}},{key:"readFirstAttr",value:function(t){for(var e=0;e<t.length;e+=1){var n,r,i=null===(n=this.container)||void 0===n||null===(r=n.getAttribute)||void 0===r?void 0:r.call(n,t[e]);if(i&&String(i).trim())return String(i).trim()}return""}},{key:"handleDocumentChange",value:function(t){var e=t.target;if(e instanceof Element&&e!==this.container&&this.matchesInboundSource(e)){var n=t.detail||{},i=r.Z.getElementInstances(e),o=n.component||i[0]||null,a="function"==typeof(null==o?void 0:o.getStateSnapshot)?o.getStateSnapshot():{};this.applyInboundUpdate({sourceElement:e,sourceComponent:o,path:n.path||"",value:n.value,snapshot:a,initial:!1})}}},{key:"handleOwnChange",value:function(e){var n;if(e.target===this.container){var r=e.detail||{};this.applyTargets(this.readFirstAttr(t.targetAttrNames),{sourceElement:this.container,sourceComponent:this.component,path:r.path||"",value:r.value,snapshot:"function"==typeof(null===(n=this.component)||void 0===n?void 0:n.getStateSnapshot)?this.component.getStateSnapshot():{},initial:!!r.initial})}}},{key:"matchesInboundSource",value:function(e){var n=this.readFirstAttr(t.sourceAttrNames);return this.resolveElements(n).includes(e)}},{key:"applyInboundUpdate",value:function(e){var n,r;null===(n=this.component)||void 0===n||null===(r=n.recordDependencySnapshot)||void 0===r||r.call(n,e);var i=this.readFirstAttr(t.targetAttrNames)||"@this";this.applyTargets(i,e)}},{key:"getElementAliases",value:function(t){if(!(t instanceof Element))return[];var e=[];return[String(t.id||"").trim(),String(t.getAttribute("data-ppr-id")||"").trim(),String(t.getAttribute("data-component-id")||"").trim(),String(t.getAttribute("component")||t.getAttribute("role")||t.getAttribute("data-holi-component-class")||t.tagName).trim().toLowerCase()].forEach(function(t){t&&!e.includes(t)&&e.push(t)}),e}},{key:"applyTargets",value:function(t,e){var n=this,r=this.resolveElements(t),i=new Set;r.forEach(function(t){t instanceof Element&&!i.has(t)&&(i.add(t),n.updateTarget(t,e))})}},{key:"updateTarget",value:function(t,e){var n=r.Z.getElementInstances(t)[0]||null,i=m(m({},e),{},{targetElement:t,targetComponent:n,subscriberComponent:this.component});t.dispatchEvent(new CustomEvent("holi:ppr-update",{detail:i,bubbles:!0})),n&&!n.isDestroyed&&("function"!=typeof n.receiveDependencyUpdate?"function"==typeof n.handlePprUpdate&&n.handlePprUpdate(i):n.receiveDependencyUpdate(i))}},{key:"resolveElements",value:function(t){var e=this,n=this.tokenize(t),r=[],i=new Set;return n.forEach(function(t){e.resolveToken(t).forEach(function(t){t instanceof Element&&!i.has(t)&&(i.add(t),r.push(t))})}),r}},{key:"tokenize",value:function(t){return String(t||"").split(/[\s,]+/).map(function(t){return t.trim()}).filter(Boolean)}},{key:"resolveToken",value:function(t){if(!t||"@none"===t)return[];if(!(this.container instanceof Element))return[];if("@this"===t)return[this.container];if("@parent"===t){var e=this.findClosestComponentHost(this.container.parentElement);return e?[e]:[]}if("@form"===t){var n=this.container.closest('form, holi-form, [component="form-shell"], [role="form-shell"]');return n?[n]:[]}if("@all"===t)return r.Z.collectInstances(document).map(function(t){return null==t?void 0:t.container}).filter(function(t){return t instanceof Element});if("@root"===t)return[document.documentElement];if(t.startsWith("#")){var i=document.querySelector(t);return i?[i]:[]}var o=document.getElementById(t);if(o)return[o];var a=document.querySelector('[data-component-id="'.concat(t,'"], [data-ppr-id="').concat(t,'"]'));if(a)return[a];var l=this.container.closest("[data-component-id], form, body")||document;if(l.querySelectorAll){var s=Array.from(l.querySelectorAll('[id="'.concat(t,'"], [data-component-id="').concat(t,'"], [data-ppr-id="').concat(t,'"]')));if(s.length)return s}return[]}},{key:"findClosestComponentHost",value:function(t){for(var e=t;e instanceof Element;){if(this.isComponentHost(e))return e;e=e.parentElement}return null}},{key:"isComponentHost",value:function(e){return e instanceof Element&&(r.Z.getElementInstances(e).length>0||e.matches(t.componentSelectors))}}])&&b(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();g(S,"nextAutoId",1),g(S,"sourceAttrNames",["data-ppr-listen","data-ppr-source"]),g(S,"targetAttrNames",["data-ppr-render","data-ppr-update","render","update"]),g(S,"componentSelectors",["[data-holi-component-class]","[component]","[role]","dropdown","region","tabs","holi-form","holi-input","holi-select"].join(", "));var k=n(4531);function E(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function O(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return C(u,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),u}var a={};function l(){}function s(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(C(e={},r,function(){return this}),e),d=u.prototype=l.prototype=Object.create(c);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,C(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=u,C(d,"constructor",u),C(u,"constructor",s),s.displayName="GeneratorFunction",C(u,i,"GeneratorFunction"),C(d),C(d,i,"Generator"),C(d,r,function(){return this}),C(d,"toString",function(){return"[object Generator]"}),(O=function(){return{w:o,m:f}})()}function C(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}C=function(t,e,n,r){function o(e,n){C(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},C(t,e,n,r)}function A(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function j(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){A(o,r,i,a,l,"next",t)}function l(t){A(o,r,i,a,l,"throw",t)}a(void 0)})}}function P(t){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},P(t)}function T(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function x(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?T(Object(n),!0).forEach(function(e){N(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function L(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,R(r.key),r)}}function I(){return I="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=D(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},I.apply(null,arguments)}function D(t){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},D(t)}function N(t,e,n){return(e=R(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function R(t){var e=function(t){if("object"!=P(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=P(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==P(e)?e:e+""}var M=function(){function t(e){var n,i,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.element=null,this.container=e,this.children=new Map,this.isDestroyed=!1,this.ppr={},this.pprMeta={},Object.assign(this,a),this.container instanceof Element&&!this.container.getAttribute("data-component-id")&&this.container.setAttribute("data-component-id","holi-".concat(t.nextComponentId++)),this.instanceKey=this.constructor.name.toLowerCase(),this.instanceClassAttr="data-holi-component-class",null===(n=this.container)||void 0===n||null===(i=n.setAttribute)||void 0===i||i.call(n,this.instanceClassAttr,this.constructor.name);var l=null===(o=this.container)||void 0===o?void 0:o[this.instanceKey];if(l&&l!==this)try{delete this.container[this.instanceKey]}catch(t){}Object.defineProperty(this.container,this.instanceKey,{value:this,writable:!1,configurable:!0}),this.stateBridge=new p(this),this.stateBridge.install(),this.pprBridge=new S(this),this.pprBridge.install(),r.Z.registerInstance(this.container,this)}return e=t,n=[{key:"init",value:function(){var e;if(!this.initializing){this.initializing=!0;var n,r,i,o=performance.now();null===(n=t,r=this,e="function"==typeof(i=I(D(1&3?n.prototype:n),"init",r))?function(t){return i.apply(r,t)}:i)||void 0===e||e([]),this.validateStructure(),performance.now()-o>100&&console.warn("Component init slow:",this.constructor.name),this.initializing=!1}}},{key:"parseValidators",value:function(t){return i.D.parseList(t)}},{key:"runValidator",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return i.D.validateToken(t,e,x({component:this},n))}},{key:"toCamelCase",value:function(t){return String(t||"").replace(/[-_\s]+(.)?/g,function(t,e){return e?e.toUpperCase():""}).replace(/^(.)/,function(t){return t.toLowerCase()})}},{key:"onStateReflect",value:function(t,e){var n=String(t||"").trim();if(n&&!n.includes(".")&&!this.isReflectingState){this.isReflectingState=!0;try{var r=this.toCamelCase(n),i="".concat(r,"Text");if(r in this&&"function"!=typeof this[r]&&(this[r]=e),i in this&&"function"!=typeof this[i]&&(this[i]=null==e?"":String(e)),this.config&&"object"===P(this.config)&&(Object.prototype.hasOwnProperty.call(this.config,n)?this.config[n]=e:Object.prototype.hasOwnProperty.call(this.config,r)&&(this.config[r]=e)),"function"==typeof this.applyStateUpdate)return void this.applyStateUpdate(r,e);"function"==typeof this.applyLayoutState&&this.applyLayoutState(),"function"==typeof this.applyDialogContent&&this.applyDialogContent(),"function"==typeof this.updateView&&this.updateView()}finally{this.isReflectingState=!1}}}},{key:"render",value:(l=j(O().m(function t(){var e;return O().w(function(t){for(;;)switch(t.n){case 0:if((e=k._.getTemplate(this.templateId))&&e.content){t.n=1;break}throw new Error('Template "'.concat(this.templateId,'" not found'));case 1:return this.fragment=e.content.cloneNode(!0),this.populateSlots(this.fragment),this.bindAttributes(this.fragment),this.container.appendChild(this.fragment),t.n=2,this.createChildren();case 2:this.syncChildren();case 3:return t.a(2)}},t,this)})),function(){return l.apply(this,arguments)})},{key:"populateSlots",value:function(t){var e=this;t.querySelectorAll("[slot]").forEach(function(t){var n=e.container.querySelector('[slot="'.concat(t.name,'"]'));n&&t.appendChild(n)})}},{key:"bindAttributes",value:function(t){var e=this.getBindingContext();this.applyBindings(t,e)}},{key:"refresh",value:function(){this.refreshChildren()}},{key:"handlePprUpdate",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.resolvePprHandler();return e?(e(t),!0):(this.reportMissingPprContract(t),!1)}},{key:"receiveDependencyUpdate",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.recordDependencySnapshot(t),this.isApplyingDependencyUpdate=!0;try{return this.handlePprUpdate(t)}finally{this.isApplyingDependencyUpdate=!1}}},{key:"recordDependencySnapshot",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=null==e?void 0:e.sourceElement,r=null==e?void 0:e.snapshot;if(n instanceof Element){this.ppr&&"object"===P(this.ppr)||(this.ppr={});var i=this.resolveDependencyAliases(n);i.forEach(function(e){t.ppr[e]=r}),this.pprMeta={source:i[0]||"",path:(null==e?void 0:e.path)||"",initial:!(null==e||!e.initial)}}}},{key:"resolveDependencyAliases",value:function(t){if(!(t instanceof Element))return[];var e=[];return[t.id,t.getAttribute("data-ppr-id"),t.getAttribute("data-component-id"),t.getAttribute("component"),t.getAttribute("role"),t.getAttribute("data-holi-component-class"),String(t.tagName||"").toLowerCase()].forEach(function(t){var n=String(t||"").trim(),r=n.toLowerCase();[n,r].forEach(function(t){t&&!e.includes(t)&&e.push(t)})}),e}},{key:"resolvePprHandler",value:function(){for(var e,n=Array.isArray(null===(e=this.constructor)||void 0===e?void 0:e.pprHookNames)?this.constructor.pprHookNames:t.pprHookNames,r=0;r<n.length;r+=1){var i=this[n[r]];if("function"==typeof i)return i.bind(this)}return null}},{key:"getPprMissingHookPolicy",value:function(){var t,e,n=null===(t=this.container)||void 0===t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"data-ppr-missing-hook-policy"),r="undefined"!=typeof window?window.HoliPprMissingHookPolicy:"",i=String(n||r||"warn").trim().toLowerCase();return"throw"===i||"ignore"===i?i:"warn"}},{key:"reportMissingPprContract",value:function(){var e,n,r,i,o,a,l,s,u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=this.getPprMissingHookPolicy();if("ignore"!==c){var d=(null===(e=this.container)||void 0===e?void 0:e.id)||(null===(n=this.container)||void 0===n||null===(r=n.getAttribute)||void 0===r?void 0:r.call(n,"data-component-id"))||(null===(i=this.constructor)||void 0===i?void 0:i.name)||"component",f=(null==u||null===(o=u.sourceElement)||void 0===o?void 0:o.id)||(null==u||null===(a=u.sourceElement)||void 0===a||null===(l=a.getAttribute)||void 0===l?void 0:l.call(a,"data-component-id"))||(null==u||null===(s=u.sourceComponent)||void 0===s||null===(s=s.constructor)||void 0===s?void 0:s.name)||"unknown-source",h='PPR target "'.concat(d,'" cannot handle updates from "').concat(f,'". Implement one of: ').concat(t.pprHookNames.join(", "));if("throw"===c)throw new Error(h);console.warn(h,{component:this,payload:u})}}},{key:"createChildren",value:(a=j(O().m(function t(){var e;return O().w(function(t){for(;;)switch(t.n){case 0:if((e=this.element||this.container)instanceof Element){t.n=1;break}return t.a(2);case 1:r.Z.initAll(e,{includeRoleSelectors:!1});case 2:return t.a(2)}},t,this)})),function(){return a.apply(this,arguments)})},{key:"syncChildren",value:function(){var t=this,e=this.element||this.container;if(e instanceof Element){var n=r.Z.collectInstances(e,!0).filter(function(e){return e&&e!==t&&!e.isDestroyed});this.children.clear(),n.forEach(function(e,n){var r,i,o=e.container,a=(null==o?void 0:o.id)||(null==o||null===(r=o.getAttribute)||void 0===r?void 0:r.call(o,"data-component-id"))||"child-".concat(n),l="".concat((null===(i=e.constructor)||void 0===i?void 0:i.name)||"Component",":").concat(a,":").concat(n);t.children.set(l,e)})}}},{key:"refreshChildren",value:function(){this.syncChildren(),this.children.forEach(function(t){"function"==typeof t.refresh&&t.refresh()})}},{key:"destroy",value:function(){var t,e,n,i,o,a,l;if(null===(t=this.pprBridge)||void 0===t||null===(e=t.uninstall)||void 0===e||e.call(t),null===(n=this.stateBridge)||void 0===n||null===(i=n.uninstall)||void 0===i||i.call(n),this.children.forEach(function(t){return t.destroy()}),this.children.clear(),null===(o=this.element)||void 0===o||o.remove(),this.isDestroyed=!0,this.dispatchEvent("destroy",{component:this}),r.Z.unregisterInstance(this.container,this),(null===(a=this.container)||void 0===a||null===(l=a.getAttribute)||void 0===l?void 0:l.call(a,this.instanceClassAttr))===this.constructor.name&&this.container.removeAttribute(this.instanceClassAttr),this.container&&this.instanceKey&&this.container[this.instanceKey]===this)try{delete this.container[this.instanceKey]}catch(t){}}},{key:"registerChild",value:function(t,e){var n=this;this.children.set(t,e),e.on("destroy",function(){return n.children.delete(t)})}},{key:"on",value:function(t,e){var n;null===(n=this.element)||void 0===n||n.addEventListener(t,e)}},{key:"dispatchEvent",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};null===(e=this.element)||void 0===e||e.dispatchEvent(new CustomEvent(t,{detail:n}))}},{key:"validateStructure",value:function(){if(!this.templateId)throw new Error("".concat(this.constructor.name," must define templateId"))}},{key:"getBindingContext",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return x(x(x(x(x({},window.appState||{}),window.pageContext||{}),this),this.state||{}),{},{data:this.data,ppr:this.ppr||{},pprMeta:this.pprMeta||{}},t)}},{key:"getStateSnapshot",value:function(){if(this.stateBridge&&"function"==typeof this.stateBridge.cloneSerializable)return this.stateBridge.cloneSerializable(this.state||{});try{return JSON.parse(JSON.stringify(this.state||{}))}catch(t){return this.state||{}}}},{key:"applyBindings",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.processRepeats(t,e),this.processConditionals(t,e),this.processTextInterpolation(t,e),this.processAttributeInterpolation(t,e)}},{key:"processRepeats",value:function(t,e){var n=this;Array.from(t.querySelectorAll("[data-repeat]")).forEach(function(t){if(t.parentNode){var r=n.extractExpression(t.getAttribute("data-repeat")),i=n.evaluateExpression(r,e),o=Array.isArray(i)?i:[],a=t.getAttribute("data-for")||"item";o.forEach(function(r,i){var o=t.cloneNode(!0);o.removeAttribute("data-repeat"),o.removeAttribute("data-for");var l=n.getBindingContext(x(x({},e),{},N(N(N({},a,r),"item",r),"index",i)));n.applyBindings(o,l),t.parentNode.insertBefore(o,t)}),t.remove()}})}},{key:"processConditionals",value:function(t,e){var n=this;Array.from(t.querySelectorAll("[data-if], [data-show], [data-open], [visible]")).forEach(function(t){if(t.hasAttribute("data-if")){var r=n.extractExpression(t.getAttribute("data-if"));if(!n.evaluateExpression(r,e))return void t.remove()}if(t.hasAttribute("data-show")){var i=n.extractExpression(t.getAttribute("data-show")),o=!!n.evaluateExpression(i,e);t.hidden=!o}if(t.hasAttribute("visible")){var a=n.extractExpression(t.getAttribute("visible")),l=!!n.evaluateExpression(a,e);t.hidden=!l}if(t.hasAttribute("data-open")){var s=n.extractExpression(t.getAttribute("data-open"));n.evaluateExpression(s,e)?t.setAttribute("open",""):t.removeAttribute("open")}})}},{key:"processTextInterpolation",value:function(t,e){for(var n=this,r=document.createTreeWalker(t,NodeFilter.SHOW_TEXT),i=[],o=r.nextNode();o;)i.push(o),o=r.nextNode();i.forEach(function(t){var r=t.textContent;if(r&&-1!==r.indexOf("@{")){var i=n.resolveTemplateString(r,e);t.textContent=null==i?"":String(i)}})}},{key:"processAttributeInterpolation",value:function(t,e){var n=this,r=[];t.nodeType===Node.ELEMENT_NODE&&r.push(t),r.push.apply(r,function(t){return function(t){if(Array.isArray(t))return E(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return E(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t.querySelectorAll("*"))),r.forEach(function(t){Array.from(t.attributes).forEach(function(r){if(r.value&&-1!==r.value.indexOf("@{")){var i=n.resolveAttributeValue(r.value,e);n.setBoundAttribute(t,r.name,i)}})})}},{key:"setBoundAttribute",value:function(t,e,n){new Set(["checked","disabled","selected","readonly","required","open","hidden"]).has(e)?n?(t.setAttribute(e,""),e in t&&(t[e]=!0)):(t.removeAttribute(e),e in t&&(t[e]=!1)):"data-slot"!==e?t.setAttribute(e,null==n?"":String(n)):null==n||""===n?t.removeAttribute("slot"):t.setAttribute("slot",String(n))}},{key:"resolveAttributeValue",value:function(t,e){var n=t.match(/^\s*@\{([^}]+)\}\s*$/);return n?this.evaluateExpression(n[1].trim(),e):this.resolveTemplateString(t,e)}},{key:"resolveTemplateString",value:function(t,e){var n=this;return t.replace(/@\{([^}]+)\}/g,function(t,r){var i=n.evaluateExpression(r.trim(),e);return null==i?"":String(i)})}},{key:"extractExpression",value:function(t){if(!t)return"";var e=String(t).trim().match(/^@\{([^}]+)\}$/);return e?e[1].trim():String(t).trim()}},{key:"evaluateExpression",value:function(t,e){if(t){var n=this.normalizeExpression(t);try{var r=window.ELEngine||("undefined"!=typeof ELEngine?ELEngine:null);if(r)return new r(e).evaluate(n)}catch(t){}return this.getPathValue(e,n)}}},{key:"normalizeExpression",value:function(t){return String(t).replace(/\s*===\s*/g," eq ").replace(/\s*!==\s*/g," ne ").replace(/\s*>=\s*/g," gteq ").replace(/\s*<=\s*/g," lteq ").replace(/\s*>\s*/g," gt ").replace(/\s*<\s*/g," lt ").replace(/\s*&&\s*/g," and ").replace(/\s*\|\|\s*/g," or ").trim()}},{key:"getPathValue",value:function(t,e){if(t&&e){var n=String(e).replace(/\[(\w+)\]/g,".$1");if(/^[a-zA-Z_$][\w$]*(\.[a-zA-Z_$][\w$]*|\.\d+)*$/.test(n))return n.split(".").reduce(function(t,e){return null==t?void 0:t[e]},t)}}}],o=[{key:"selector",get:function(){return null}},{key:"library",get:function(){return"default"}},{key:"matchesLibrary",value:function(t,e){var n=t.getAttribute("library");return!n||n===e}},{key:"registerValidator",value:function(t,e){i.D.register(t,e)}},{key:"unregisterValidator",value:function(t){return i.D.unregister(t)}},{key:"parseValidators",value:function(t){return i.D.parseList(t)}}],n&&L(e.prototype,n),o&&L(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,o,a,l}();N(M,"nextComponentId",1),N(M,"pprHookNames",["refreshPpr","refresh","updateView"]),"undefined"!=typeof window&&(window.Component=M,i.D.enableAutoBind())},5040(t,e,n){"use strict";n.r(e),n.d(e,{DataGrid:()=>j});var r=n(8812),i=n(8696),o=n(9062),a=n(3076);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){u=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(t,e)||c(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||c(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){if(t){if("string"==typeof t)return d(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(t,e):void 0}}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function f(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return h(u,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),u}var a={};function l(){}function s(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(h(e={},r,function(){return this}),e),d=u.prototype=l.prototype=Object.create(c);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,h(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=u,h(d,"constructor",u),h(u,"constructor",s),s.displayName="GeneratorFunction",h(u,i,"GeneratorFunction"),h(d),h(d,i,"Generator"),h(d,r,function(){return this}),h(d,"toString",function(){return"[object Generator]"}),(f=function(){return{w:o,m:p}})()}function h(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}h=function(t,e,n,r){function o(e,n){h(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},h(t,e,n,r)}function p(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function v(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){p(o,r,i,a,l,"next",t)}function l(t){p(o,r,i,a,l,"throw",t)}a(void 0)})}}function y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function m(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?y(Object(n),!0).forEach(function(e){C(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function b(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,A(r.key),r)}}function g(t,e,n){return e=E(e),function(t,e){if(e&&("object"==l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,w()?Reflect.construct(e,n||[],E(t).constructor):e.apply(t,n))}function w(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(w=function(){return!!t})()}function S(t,e,n,r){var i=k(E(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function k(){return k="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=E(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},k.apply(null,arguments)}function E(t){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},E(t)}function O(t,e){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},O(t,e)}function C(t,e,n){return(e=A(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function A(t){var e=function(t){if("object"!=l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==l(e)?e:e+""}var j=function(t){function e(t){var n,r,o,a,l,s,u,c,d,f,h,p,v,y,b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var w=e.normalizeArgs(t,b);return(y=g(this,e,[w.container,w.config])).templateId=e.templateId,y.parent=w.parent,y.textProvider=w.textProvider,y.config=m({localLimit:1e4,remoteLimit:50,endpoint:(null===(n=y.container)||void 0===n?void 0:n.getAttribute("data-endpoint"))||(null===(r=y.container)||void 0===r?void 0:r.getAttribute("endpoint"))||null,serverSide:(null===(o=y.container)||void 0===o?void 0:o.hasAttribute("server-side"))||!1,mode:y.resolveMode(y.container),pageSize:Number(null===(a=y.container)||void 0===a?void 0:a.getAttribute("data-page-size"))||24,infiniteChunkSize:Number(null===(l=y.container)||void 0===l?void 0:l.getAttribute("data-infinite-chunk"))||24,titleField:(null===(s=y.container)||void 0===s?void 0:s.getAttribute("data-title-field"))||null,iconField:(null===(u=y.container)||void 0===u?void 0:u.getAttribute("data-icon-field"))||null,avatarField:(null===(c=y.container)||void 0===c?void 0:c.getAttribute("data-avatar-field"))||null,mandatoryFields:y.parseFieldListAttr("data-mandatory-fields"),priorityFields:y.parseFieldListAttr("data-priority-fields"),readonlyFields:y.parseFieldListAttr("data-readonly-fields"),fieldMetadata:y.parseMetadataAttr("data-field-metadata"),idField:String((null===(d=y.container)||void 0===d?void 0:d.getAttribute("data-id-field"))||"id"),detailsSource:(null===(f=y.container)||void 0===f?void 0:f.getAttribute("data-details-source"))||(null===(h=y.container)||void 0===h?void 0:h.getAttribute("details-source"))||"",detailsCacheEnabled:y.parseBooleanAttr("data-details-cache",!0),detailsCacheMaxSize:y.parsePositiveIntAttr("data-details-cache-size",100),detailsCacheTTL:y.parsePositiveIntAttr("data-details-cache-ttl",0),createMethod:String((null===(p=y.container)||void 0===p?void 0:p.getAttribute("data-create-method"))||"POST").toUpperCase(),updateMethod:String((null===(v=y.container)||void 0===v?void 0:v.getAttribute("data-update-method"))||"PUT").toUpperCase(),rows:[],headers:[],visibleFields:[]},w.config),y.config.endpointTemplate=y.config.endpoint,y.config.requestParams=y.parseObjectAttr("data-request-params"),y.rawRows=[],y.processedRows=[],y.remoteLoaded=!1,y.loadingMore=!1,y.windowScrollHandler=null,y.localCardPool=[],y.localCardsVersion=0,y.localCardsRenderedVersion=-1,y.state={rows:[],headers:[],page:1,totalPages:1,totalCount:0,sortField:null,sortDir:"asc",searchTerm:"",filters:{},visibleFields:[],fieldChooserOpen:!1,hasMore:!1,visibleStart:0,visibleEnd:0},y.mandatoryFieldsResolved=[],y.priorityFieldsResolved=[],y.detailsDialog=new i.q,y.detailsCache=new Map,!1!==w.autoInit&&y.init(),y}return function(t,e){if("function"!=typeof e&&null!==e)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&&O(t,e)}(e,t),n=e,r=[{key:"validateStructure",value:function(){if(S(e,"validateStructure",this,3)([]),!this.container)throw new Error("DataGrid requires a container element")}},{key:"init",value:(I=v(f().m(function t(){return f().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return I.apply(this,arguments)})},{key:"render",value:(L=v(f().m(function t(){var n,r,i,l,s,u,c,d,h,p,v,y;return f().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,S(e,"render",this,3)([]);case 1:return this.element=this.container.querySelector(".holi-datagrid"),this.contentEl=null===(n=this.element)||void 0===n?void 0:n.querySelector(".datagrid-content"),this.cardsHost=null===(r=this.element)||void 0===r?void 0:r.querySelector('[data-role="cards"]'),this.fieldChooser=null===(i=this.element)||void 0===i?void 0:i.querySelector('[data-role="field-chooser"]'),this.fieldChooserList=null===(l=this.element)||void 0===l?void 0:l.querySelector('[data-role="field-chooser-list"]'),this.resultCount=null===(s=this.element)||void 0===s?void 0:s.querySelector('[data-role="result-count"]'),this.pageInfo=null===(u=this.element)||void 0===u?void 0:u.querySelector('[data-role="page-info"]'),this.paginationControls=null===(c=this.element)||void 0===c?void 0:c.querySelector('[data-role="pagination-controls"]'),this.sortFieldSelect=null===(d=this.element)||void 0===d?void 0:d.querySelector('[data-action="sort-field"]'),this.sortDirectionButton=null===(h=this.element)||void 0===h?void 0:h.querySelector('[data-action="sort-direction"]'),this.requestStatus=null===(p=this.element)||void 0===p?void 0:p.querySelector('[data-role="request-status"]'),this.requestStatusText=null===(v=this.element)||void 0===v?void 0:v.querySelector('[data-role="request-status-text"]'),this.retryButton=null===(y=this.element)||void 0===y?void 0:y.querySelector('[data-action="retry-load"]'),this.loaderState=(0,o.w)(this,{host:this.element,busyTarget:this.contentEl||this.element,scope:"block",defaultMessage:"Loading data..."}),this.stateBinding=(0,a.x)(this,{defaultPath:"datagrid",eventName:"stateupdate",getSnapshot:function(t){return t.getBindableState()},applySnapshot:function(t,e){return t.applyBindableState(e)}}),this.initEventDelegation(),this.initScrollingMode(),t.n=2,this.loadData();case 2:return t.a(2)}},t,this)})),function(){return L.apply(this,arguments)})},{key:"initEventDelegation",value:function(){var t=this;this.element&&(this.element.addEventListener("click",function(e){return t.handleAction(e)}),this.element.addEventListener("input",function(e){return t.handleInput(e)}),this.element.addEventListener("change",function(e){return t.handleChange(e)}))}},{key:"handleAction",value:function(t){var e,n,r,i=null===(e=t.target)||void 0===e||null===(n=e.closest)||void 0===n?void 0:n.call(e,"[data-action]"),o=null==i||null===(r=i.dataset)||void 0===r?void 0:r.action;if(o){if("toggle-fields"===o)return this.state.fieldChooserOpen=!this.state.fieldChooserOpen,void this.renderFieldChooser();if("add-row"!==o)if("view-row"!==o&&"edit-row"!==o){if("sort-direction"===o)return this.state.sortDir="asc"===this.state.sortDir?"desc":"asc",this.resetViewport(),void(this.config.serverSide?this.loadData():(this.applyClientProcessing(),this.updateView()));"prev-page"!==o?"next-page"!==o?"retry-load"===o&&this.retryLoad():this.gotoPage(this.state.page+1):this.gotoPage(this.state.page-1)}else{var a,l=Number(null==i||null===(a=i.dataset)||void 0===a?void 0:a.rowIndex);if(Number.isNaN(l)||l<0)return;var s=this.isLocalDomReuseEnabled()?this.processedRows:this.state.rows;if(l>=s.length)return;var u=s[l];this.openDetailsDialog("edit-row"===o?"edit":"view",u)}else this.openDetailsDialog("add")}}},{key:"handleInput",value:function(t){var e;"search"===(null===(e=t.target)||void 0===e||null===(e=e.dataset)||void 0===e?void 0:e.action)&&(this.state.searchTerm=t.target.value||"",this.resetViewport(),this.config.serverSide?this.loadData():(this.applyClientProcessing(),this.updateView()))}},{key:"handleChange",value:function(t){var e,n,r,i=t.target,o=null==i||null===(e=i.dataset)||void 0===e?void 0:e.action,a=null==i||null===(n=i.dataset)||void 0===n?void 0:n.field,l=null==i||null===(r=i.dataset)||void 0===r?void 0:r.filter;if("toggle-field"===o&&a)return this.setFieldVisibility(a,!!i.checked),void this.updateView();if("sort-field"===o){var s=String(i.value||"").trim();return this.state.sortField=s||null,this.resetViewport(),void(this.config.serverSide?this.loadData():(this.applyClientProcessing(),this.updateView()))}if(l){var u=String(i.value||"").trim();u&&"all"!==u.toLowerCase()?this.state.filters[l]=u:delete this.state.filters[l],this.resetViewport(),this.config.serverSide?this.loadData():(this.applyClientProcessing(),this.updateView())}}},{key:"loadData",value:(x=v(f().m(function t(){return f().w(function(t){for(;;)switch(t.n){case 0:if(!this.resolveConfiguredEndpoint()){t.n=3;break}return t.n=1,this.loadRemote(this.config.serverSide,!1);case 1:if(t.v){t.n=2;break}return this.updateView(),t.a(2);case 2:t.n=4;break;case 3:return t.n=4,this.loadLocal();case 4:if(this.hydrateFilterControls(),this.hydrateSortControls(),this.config.serverSide||this.applyClientProcessing(),this.updateView(),!this.config.serverSide||"infinite"!==this.config.mode){t.n=5;break}return t.n=5,this.prefillInfiniteViewport();case 5:return t.a(2)}},t,this)})),function(){return x.apply(this,arguments)})},{key:"loadRemote",value:(T=v(f().m(function t(){var e,n,r,i,o,a,l,s=arguments;return f().w(function(t){for(;;)switch(t.p=t.n){case 0:if(e=s.length>0&&void 0!==s[0]&&s[0],n=s.length>1&&void 0!==s[1]&&s[1],!this.remoteLoaded||e||this.config.serverSide){t.n=1;break}return t.a(2,!0);case 1:if(this.setRequestStatus("loading","Loading page ".concat(this.state.page,"...")),r=this.buildEndpointUrl(!0)){t.n=2;break}return t.a(2,!1);case 2:return t.p=2,t.n=3,fetch(r);case 3:if((o=t.v).ok){t.n=4;break}throw new Error("HTTP ".concat(o.status));case 4:return t.n=5,o.json();case 5:i=t.v,t.n=7;break;case 6:return t.p=6,t.v,this.setRequestStatus("error","Request failed"),t.a(2,!1);case 7:if(a=Array.isArray(i.rows)?i.rows:[],this.rawRows=a,l=Array.isArray(i.headers)?i.headers.map(function(t){return m(m({},t),{},{visible:!1!==t.visible})}):this.deriveHeaders(a),this.state.headers=l,this.state.totalPages=Number(i.totalPages)||1,this.state.totalCount=Number(i.totalCount)||a.length,0===this.state.visibleFields.length&&(Array.isArray(i.visibleFields)&&i.visibleFields.length?this.state.visibleFields=u(i.visibleFields):this.state.visibleFields=l.filter(function(t){return t.visible}).map(function(t){return t.field})),this.applyChooserPoliciesForFields(),!this.config.serverSide){t.n=8;break}return this.state.rows=n?[].concat(u(this.state.rows),u(a)):a,this.processedRows=u(this.state.rows),this.state.hasMore="infinite"===this.config.mode&&this.state.page<this.state.totalPages,"infinite"!==this.config.mode||this.state.hasMore?this.setRequestStatus("idle",""):this.setRequestStatus("end","No more records"),t.a(2,!0);case 8:return this.remoteLoaded=!0,this.setRequestStatus("idle",""),t.a(2,!0)}},t,this,[[2,6]])})),function(){return T.apply(this,arguments)})},{key:"loadLocal",value:(P=v(f().m(function t(){return f().w(function(t){for(;;)switch(t.n){case 0:this.rawRows=Array.isArray(this.config.rows)?this.config.rows:[],this.state.headers=Array.isArray(this.config.headers)?this.config.headers.map(function(t){return m(m({},t),{},{visible:!1!==t.visible})}):this.deriveHeaders(this.rawRows),this.state.totalPages=1,this.state.totalCount=this.rawRows.length,Array.isArray(this.config.visibleFields)&&this.config.visibleFields.length?this.state.visibleFields=u(this.config.visibleFields):this.state.visibleFields=this.state.headers.filter(function(t){return t.visible}).map(function(t){return t.field}),this.applyChooserPoliciesForFields();case 1:return t.a(2)}},t,this)})),function(){return P.apply(this,arguments)})},{key:"buildEndpointUrl",value:function(t){var e=this.resolveConfiguredEndpoint();if(!e)return"";if(!t)return e;var n="pagination"===this.config.mode?this.config.pageSize:"infinite"===this.config.mode?this.config.infiniteChunkSize:this.config.remoteLimit,r=new URLSearchParams(m({page:String(this.state.page),limit:String(n),sort:"".concat(this.state.sortField||"",",").concat(this.state.sortDir),q:this.state.searchTerm},this.state.filters)),i=this.resolveRequestParams();return Object.entries(i).forEach(function(t){var e=s(t,2),n=e[0],i=e[1];null!=i&&""!==i&&r.set(n,String(i))}),"".concat(e,"?").concat(r)}},{key:"deriveHeaders",value:function(t){var e=t[0];return e&&"object"===l(e)?Object.keys(e).map(function(t){return{field:t,label:t,visible:!0}}):[]}},{key:"applyClientProcessing",value:function(){var t=Array.isArray(this.rawRows)?u(this.rawRows):[];t=this.applyFilters(t),t=this.applySearch(t),t=this.applySort(t),this.processedRows=t,this.bumpLocalCardsVersion(),this.applyViewport(t)}},{key:"applyViewport",value:function(t){if("pagination"===this.config.mode){var e=Math.max(1,Number(this.config.pageSize)||24),n=Math.max(1,Math.ceil(t.length/e));this.state.totalPages=n,this.state.page=Math.min(Math.max(1,this.state.page),n);var r=(this.state.page-1)*e;return this.state.rows=t.slice(r,r+e),this.state.hasMore=!1,this.state.visibleStart=r,void(this.state.visibleEnd=Math.min(r+e,t.length))}if("infinite"===this.config.mode){var i=Math.max(1,Number(this.config.infiniteChunkSize)||24),o=this.state.page*i;return this.state.rows=t.slice(0,o),this.state.hasMore=o<t.length,this.state.totalPages=1,this.state.visibleStart=0,void(this.state.visibleEnd=Math.min(o,t.length))}this.state.rows=t,this.state.totalPages=1,this.state.hasMore=!1,this.state.visibleStart=0,this.state.visibleEnd=t.length}},{key:"applyFilters",value:function(t){var e=Object.entries(this.state.filters||{});return e.length?t.filter(function(t){return e.every(function(e){var n=s(e,2),r=n[0],i=n[1],o=null==t?void 0:t[r];return null!=o&&String(o).toLowerCase()===String(i).toLowerCase()})}):t}},{key:"applySearch",value:function(t){var e=String(this.state.searchTerm||"").trim().toLowerCase();if(!e)return t;var n=this.state.headers.map(function(t){return t.field});return t.filter(function(t){return n.some(function(n){var r=null==t?void 0:t[n];return null!=r&&String(r).toLowerCase().includes(e)})})}},{key:"applySort",value:function(t){var e=this.state.sortField;if(!e)return t;var n="desc"===this.state.sortDir?-1:1;return t.sort(function(t,r){var i=null==t?void 0:t[e],o=null==r?void 0:r[e];if(null==i&&null==o)return 0;if(null==i)return-1*n;if(null==o)return 1*n;var a=Number(i),l=Number(o);return Number.isNaN(a)||Number.isNaN(l)?String(i).localeCompare(String(o),void 0,{numeric:!0,sensitivity:"base"})*n:(a-l)*n})}},{key:"setFieldVisibility",value:function(t,e){if(e)this.state.visibleFields.includes(t)||this.state.visibleFields.push(t);else{if(this.isMandatoryField(t))return;this.state.visibleFields=this.state.visibleFields.filter(function(e){return e!==t})}this.state.visibleFields=this.getOrderedVisibleFields(this.state.visibleFields),this.bumpLocalCardsVersion()}},{key:"hydrateFilterControls",value:function(){var t,e=this,n=null===(t=this.element)||void 0===t?void 0:t.querySelectorAll("[data-filter]");null!=n&&n.length&&n.forEach(function(t){if(t instanceof HTMLSelectElement&&!(t.options.length>1)){var n=t.dataset.filter;if(n){var r=new Set;e.rawRows.forEach(function(t){null!=(null==t?void 0:t[n])&&r.add(String(t[n]))}),Array.from(r).sort(function(t,e){return t.localeCompare(e,void 0,{numeric:!0,sensitivity:"base"})}).forEach(function(e){var n=document.createElement("option");n.value=e,n.textContent=e,t.appendChild(n)})}}})}},{key:"hydrateSortControls",value:function(){var t=this;this.sortFieldSelect instanceof HTMLSelectElement&&(this.sortFieldSelect.options.length>1||this.state.headers.forEach(function(e){var n=document.createElement("option");n.value=e.field,n.textContent=e.label||e.field,t.sortFieldSelect.appendChild(n)}))}},{key:"updateView",value:function(){this.renderCards(),!this.config.serverSide&&this.ensureInfiniteScrollable()&&this.renderCards(),this.renderFieldChooser(),this.renderSortControls(),this.renderMeta(),this.renderPagination(),this.renderRequestStatus(),this.dispatchEvent("stateupdate",this.state)}},{key:"renderCards",value:function(){var t=this;if(this.cardsHost)if(this.isLocalDomReuseEnabled())this.renderCardsWithLocalPool();else{if(this.cardsHost.replaceChildren(),!this.state.rows.length){var e=document.createElement("div");return e.className="datagrid-empty",e.textContent="No matching records",void this.cardsHost.appendChild(e)}this.state.rows.forEach(function(e,n){t.cardsHost.appendChild(t.createCard(e,n))})}}},{key:"isLocalDomReuseEnabled",value:function(){return!this.config.serverSide}},{key:"bumpLocalCardsVersion",value:function(){this.localCardsVersion+=1}},{key:"renderCardsWithLocalPool",value:function(){if(this.cardsHost){if(!this.processedRows.length){this.localCardPool=[],this.localCardsRenderedVersion=this.localCardsVersion,this.cardsHost.replaceChildren();var t=document.createElement("div");return t.className="datagrid-empty",t.textContent="No matching records",void this.cardsHost.appendChild(t)}this.localCardsRenderedVersion!==this.localCardsVersion?this.rebuildLocalCardPool():this.applyLocalCardVisibility()}}},{key:"rebuildLocalCardPool",value:function(){var t=this;this.cardsHost&&(this.cardsHost.replaceChildren(),this.localCardPool=[],this.processedRows.forEach(function(e,n){var r=t.createCard(e,n);t.localCardPool.push(r),t.cardsHost.appendChild(r)}),this.localCardsRenderedVersion=this.localCardsVersion,this.applyLocalCardVisibility())}},{key:"applyLocalCardVisibility",value:function(){var t=Math.max(0,Number(this.state.visibleStart)||0),e=Math.max(t,Number(this.state.visibleEnd)||0);this.localCardPool.forEach(function(n,r){n.hidden=r<t||r>=e})}},{key:"createCard",value:function(t,e){var n=document.createElement("article");n.className="datagrid-card";var r=this.resolveProminentFields(t),i=r.titleField&&this.state.visibleFields.includes(r.titleField),o=r.iconField&&this.state.visibleFields.includes(r.iconField),a=r.avatarField&&this.state.visibleFields.includes(r.avatarField);if(i||o||a){var l=document.createElement("header");if(l.className="datagrid-card-head",a){var s=document.createElement("img");s.className="datagrid-card-avatar",s.src=String(t[r.avatarField]||""),s.alt=i?String(t[r.titleField]||""):"Avatar",l.appendChild(s)}else if(o){var u=document.createElement("span");u.className="datagrid-card-icon",u.textContent=String(t[r.iconField]||""),l.appendChild(u)}if(i){var c=document.createElement("h3");c.className="datagrid-card-title",c.textContent=String(t[r.titleField]||""),l.appendChild(c)}n.appendChild(l)}var d=document.createElement("div");d.className="datagrid-card-body";var f=this.buildFieldLabelMap();this.state.visibleFields.forEach(function(e){if(e!==r.titleField&&e!==r.iconField&&e!==r.avatarField){var n=document.createElement("div");n.className="datagrid-field";var i=document.createElement("span");i.className="datagrid-field-label",i.textContent=f.get(e)||e;var o=document.createElement("span");o.className="datagrid-field-value",o.textContent=null==(null==t?void 0:t[e])?"":String(t[e]),n.append(i,o),d.appendChild(n)}}),n.appendChild(d);var h=document.createElement("footer");h.className="datagrid-card-actions";var p=document.createElement("button");p.type="button",p.dataset.action="view-row",p.dataset.rowIndex=String(e),p.textContent="View",h.appendChild(p);var v=document.createElement("button");return v.type="button",v.dataset.action="edit-row",v.dataset.rowIndex=String(e),v.textContent="Edit",h.appendChild(v),n.appendChild(h),n}},{key:"buildFieldLabelMap",value:function(){var t=new Map;return this.state.headers.forEach(function(e){t.set(e.field,e.label||e.field)}),t}},{key:"resolveProminentFields",value:function(t){var e=this.state.headers.map(function(t){return t.field}),n=function(t,n){return t&&e.includes(t)?t:n.find(function(t){return e.includes(t)})||null},r=n(this.config.titleField,["title","name","customer","orderNo","id"]),i=n(this.config.iconField,["icon"]),o=n(this.config.avatarField,["avatar","avatarUrl","photo","image"]);return o&&null==(null==t?void 0:t[o])?{titleField:r,iconField:i,avatarField:null}:{titleField:r,iconField:i,avatarField:o}}},{key:"renderFieldChooser",value:function(){var t=this;this.fieldChooser&&(this.fieldChooser.hidden=!this.state.fieldChooserOpen),this.fieldChooserList&&(this.fieldChooserList.replaceChildren(),this.state.headers.forEach(function(e){var n=document.createElement("label");n.className="datagrid-field-option";var r=document.createElement("input");r.type="checkbox",r.dataset.action="toggle-field",r.dataset.field=e.field,r.checked=t.state.visibleFields.includes(e.field),r.disabled=t.isMandatoryField(e.field);var i=document.createElement("span");i.textContent=e.label||e.field,n.append(r,i),t.fieldChooserList.appendChild(n)}))}},{key:"renderSortControls",value:function(){this.sortDirectionButton&&(this.sortDirectionButton.textContent="asc"===this.state.sortDir?"Asc":"Desc"),this.sortFieldSelect instanceof HTMLSelectElement&&(this.sortFieldSelect.value=this.state.sortField||"")}},{key:"renderMeta",value:function(){this.resultCount&&(this.config.serverSide?this.resultCount.textContent="".concat(this.state.rows.length," shown / ").concat(this.state.totalCount," total"):this.resultCount.textContent="".concat(this.processedRows.length," rows"))}},{key:"renderPagination",value:function(){if(this.paginationControls&&this.pageInfo)if("pagination"===this.config.mode){this.paginationControls.hidden=!1,this.pageInfo.textContent="Page ".concat(this.state.page," of ").concat(this.state.totalPages);var t=this.paginationControls.querySelector('[data-action="prev-page"]'),e=this.paginationControls.querySelector('[data-action="next-page"]');t&&(t.disabled=this.state.page<=1),e&&(e.disabled=this.state.page>=this.state.totalPages)}else this.paginationControls.hidden=!0}},{key:"gotoPage",value:(j=v(f().m(function t(e){var n;return f().w(function(t){for(;;)switch(t.n){case 0:if("pagination"===this.config.mode){t.n=1;break}return t.a(2);case 1:if(n=Math.min(Math.max(1,e),Math.max(1,this.state.totalPages)),this.state.page=n,!this.config.serverSide){t.n=4;break}return t.n=2,this.loadRemote(!0,!1);case 2:if(t.v){t.n=3;break}return this.updateView(),t.a(2);case 3:t.n=5;break;case 4:this.applyViewport(this.processedRows);case 5:this.updateView();case 6:return t.a(2)}},t,this)})),function(t){return j.apply(this,arguments)})},{key:"resolveMode",value:function(t){var e=String((null==t?void 0:t.getAttribute("data-mode"))||"").trim().toLowerCase();return"pagination"===e||"infinite"===e?e:null!=t&&t.hasAttribute("infinite-scroll")?"infinite":null!=t&&t.hasAttribute("pagination")?"pagination":"standard"}},{key:"resetViewport",value:function(){this.state.page=1,this.contentEl&&(this.contentEl.scrollTop=0)}},{key:"initScrollingMode",value:function(){var t,e=this;if("infinite"===this.config.mode&&this.contentEl){this.contentEl.classList.add("datagrid-scrollable");var n=(null===(t=this.container)||void 0===t?void 0:t.getAttribute("data-scroll-height"))||"500px";this.contentEl.style.maxHeight=n,this.contentEl.style.overflowY="auto",this.contentEl.addEventListener("scroll",function(){e.handleInfiniteScroll()}),this.config.serverSide||(this.windowScrollHandler=function(){e.handleWindowInfiniteScroll()},window.addEventListener("scroll",this.windowScrollHandler,{passive:!0}))}}},{key:"handleInfiniteScroll",value:(A=v(f().m(function t(){return f().w(function(t){for(;;)switch(t.n){case 0:if("infinite"===this.config.mode&&this.contentEl&&this.state.hasMore&&!this.loadingMore){t.n=1;break}return t.a(2);case 1:if(this.contentEl.scrollTop+this.contentEl.clientHeight>=this.contentEl.scrollHeight-48){t.n=2;break}return t.a(2);case 2:if(this.loadingMore=!0,this.state.page+=1,!this.config.serverSide){t.n=5;break}return t.n=3,this.loadRemote(!0,!0);case 3:if(t.v){t.n=4;break}return this.loadingMore=!1,this.updateView(),t.a(2);case 4:t.n=6;break;case 5:this.applyViewport(this.processedRows);case 6:this.renderCards(),this.renderMeta(),this.loadingMore=!1;case 7:return t.a(2)}},t,this)})),function(){return A.apply(this,arguments)})},{key:"handleWindowInfiniteScroll",value:(E=v(f().m(function t(){var e,n;return f().w(function(t){for(;;)switch(t.n){case 0:if("infinite"===this.config.mode&&this.state.hasMore&&!this.loadingMore){t.n=1;break}return t.a(2);case 1:if(n=null===(e=this.container)||void 0===e?void 0:e.getBoundingClientRect()){t.n=2;break}return t.a(2);case 2:if(n.bottom<=window.innerHeight+120){t.n=3;break}return t.a(2);case 3:if(this.loadingMore=!0,this.state.page+=1,!this.config.serverSide){t.n=6;break}return t.n=4,this.loadRemote(!0,!0);case 4:if(t.v){t.n=5;break}return this.loadingMore=!1,this.updateView(),t.a(2);case 5:t.n=7;break;case 6:this.applyViewport(this.processedRows);case 7:this.renderCards(),this.renderMeta(),this.loadingMore=!1;case 8:return t.a(2)}},t,this)})),function(){return E.apply(this,arguments)})},{key:"prefillInfiniteViewport",value:(k=v(f().m(function t(){var e,n;return f().w(function(t){for(;;)switch(t.n){case 0:if(this.contentEl&&"infinite"===this.config.mode&&this.config.serverSide){t.n=1;break}return t.a(2);case 1:e=10,n=0;case 2:if(!(this.state.hasMore&&this.contentEl.scrollHeight<=this.contentEl.clientHeight&&n<e)){t.n=5;break}return this.loadingMore=!0,this.state.page+=1,t.n=3,this.loadRemote(!0,!0);case 3:if(t.v){t.n=4;break}return this.loadingMore=!1,t.a(3,5);case 4:this.renderCards(),this.renderMeta(),this.loadingMore=!1,n+=1,t.n=2;break;case 5:return t.a(2)}},t,this)})),function(){return k.apply(this,arguments)})},{key:"ensureInfiniteScrollable",value:function(){if("infinite"!==this.config.mode||!this.contentEl||!this.state.hasMore)return!1;for(var t=0,e=!1;this.state.hasMore&&this.contentEl.scrollHeight<=this.contentEl.clientHeight&&t<10;)this.state.page+=1,this.applyViewport(this.processedRows),t+=1,e=!0;return e}},{key:"openDetailsDialog",value:(w=v(f().m(function t(e){var n,r,i,o,a=this,l=arguments;return f().w(function(t){for(;;)switch(t.n){case 0:return n=l.length>1&&void 0!==l[1]?l[1]:null,t.n=1,this.resolveDetailsRecord(e,n);case 1:r=t.v,i=this.resolveDetailFields(r),o=this.config.readonlyFields||[],this.detailsDialog.open({title:"Record",mode:e,record:r,fields:i,readonlyFields:o,onSave:function(){var t=v(f().m(function t(e,n){var r;return f().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,a.persistRecord(e,"add"===n);case 1:return r=t.v,t.n=2,a.refreshAfterMutation(r,"add"===n);case 2:return a.seedDetailsCache(r),t.a(2,r)}},t)}));return function(e,n){return t.apply(this,arguments)}}()});case 2:return t.a(2)}},t,this)})),function(t){return w.apply(this,arguments)})},{key:"resolveDetailsRecord",value:(y=v(f().m(function t(e,n){var r,i,o,a,s,u,c,d,h,p,v,y;return f().w(function(t){for(;;)switch(t.p=t.n){case 0:if("add"!==e){t.n=1;break}return t.a(2,this.createEmptyRecord());case 1:if(n&&"object"===l(n)){t.n=2;break}return t.a(2,this.createEmptyRecord());case 2:if(r=this.cloneRow(n),i=this.getRecordId(n)){t.n=3;break}return t.a(2,r);case 3:if(this.shouldFetchDetails(e)){t.n=4;break}return t.a(2,r);case 4:if(!(o=this.getCachedDetails(i))){t.n=5;break}return t.a(2,this.mergeDetailRecord(r,o));case 5:if(a=this.buildDetailsEndpoint(i,n)){t.n=6;break}return t.a(2,r);case 6:return s=!1,t.p=7,null===(u=this.detailsDialog)||void 0===u||null===(c=u.openLoading)||void 0===c||c.call(u,{title:"Record"}),s=!0,t.n=8,fetch(a,{method:"GET",credentials:"same-origin"});case 8:if((d=t.v).ok){t.n=9;break}return t.a(2,r);case 9:return t.n=10,d.json().catch(function(){return null});case 10:if(h=t.v,p=this.extractDetailsPayload(h)){t.n=11;break}return t.a(2,r);case 11:return this.setCachedDetails(i,p),t.a(2,this.mergeDetailRecord(r,p));case 12:return t.p=12,t.v,t.a(2,r);case 13:return t.p=13,s&&(null===(v=this.detailsDialog)||void 0===v||null===(y=v.close)||void 0===y||y.call(v)),t.f(13);case 14:return t.a(2)}},t,this,[[7,12,13,14]])})),function(t,e){return y.apply(this,arguments)})},{key:"shouldFetchDetails",value:function(t){return("view"===t||"edit"===t)&&!!String(this.config.detailsSource||"").trim()}},{key:"buildDetailsEndpoint",value:function(t,e){var n=String(this.config.detailsSource||"").trim();if(!n)return"";var r=n,i=String(this.config.idField||"id"),o=C({id:t},i,t);if(Object.keys(o).forEach(function(t){var e,n=encodeURIComponent(String(null!==(e=o[t])&&void 0!==e?e:""));r=r.replace(new RegExp("@\\{\\s*".concat(t,"\\s*\\}"),"g"),n)}),r.includes("@{")&&(r=r.replace(/@\{([^}]+)\}/g,function(t,n){var r=String(n||"").trim(),i=null==e?void 0:e[r];return null==i?"":encodeURIComponent(String(i))})),!/[?&](id|rowId|recordId|key)=/.test(r)&&!n.includes("@{")){var a=r.includes("?")?"&":"?";r="".concat(r).concat(a).concat(encodeURIComponent(i),"=").concat(encodeURIComponent(t))}return r}},{key:"extractDetailsPayload",value:function(t){return t&&"object"===l(t)?t.row&&"object"===l(t.row)?this.cloneRow(t.row):t.record&&"object"===l(t.record)?this.cloneRow(t.record):t.data&&"object"===l(t.data)&&!Array.isArray(t.data)?this.cloneRow(t.data):Array.isArray(t)?null:this.cloneRow(t):null}},{key:"mergeDetailRecord",value:function(t,e){var n=t&&"object"===l(t)?t:{},r=e&&"object"===l(e)?e:{};return m(m({},n),r)}},{key:"resolveDetailFields",value:function(t){var e=this,n=[],r=new Set,i=this.config.fieldMetadata||{};return this.state.headers.forEach(function(o){var a=String(o.field||"").trim();if(a&&!r.has(a)){r.add(a);var s=i[a]&&"object"===l(i[a])?i[a]:{};n.push({name:a,label:s.label||o.label||a,type:s.formFieldType||s.type||e.inferFieldType(null==t?void 0:t[a]),required:s.required,optional:s.optional,readonly:s.readonly,constraints:s.constraints&&"object"===l(s.constraints)?s.constraints:{},lov:s.lov||s.options||[]})}}),Object.keys(t||{}).forEach(function(o){if(!r.has(o)){r.add(o);var a=i[o]&&"object"===l(i[o])?i[o]:{};n.push({name:o,label:a.label||o,type:a.formFieldType||a.type||e.inferFieldType(null==t?void 0:t[o]),required:a.required,optional:a.optional,readonly:a.readonly,constraints:a.constraints&&"object"===l(a.constraints)?a.constraints:{},lov:a.lov||a.options||[]})}}),n}},{key:"inferFieldType",value:function(t){return"boolean"==typeof t?"boolean":"number"==typeof t?"number":"text"}},{key:"createEmptyRecord",value:function(){var t={};return this.state.headers.forEach(function(e){t[e.field]=""}),t}},{key:"cloneRow",value:function(t){return JSON.parse(JSON.stringify(t||{}))}},{key:"getRecordId",value:function(t){if(!t||"object"!==l(t))return"";var e=t[String(this.config.idField||"id")];return null==e?"":String(e)}},{key:"getCachedDetails",value:function(t){if(!this.config.detailsCacheEnabled||!t||!this.detailsCache.has(t))return null;var e=this.detailsCache.get(t);if(!e)return null;var n=Number(this.config.detailsCacheTTL)||0;return n>0&&Date.now()-e.ts>n?(this.detailsCache.delete(t),null):(this.detailsCache.delete(t),this.detailsCache.set(t,e),this.cloneRow(e.data))}},{key:"setCachedDetails",value:function(t,e){if(this.config.detailsCacheEnabled&&t&&e&&"object"===l(e)){this.detailsCache.has(t)&&this.detailsCache.delete(t),this.detailsCache.set(t,{data:this.cloneRow(e),ts:Date.now()});for(var n=Math.max(1,Number(this.config.detailsCacheMaxSize)||100);this.detailsCache.size>n;){var r=this.detailsCache.keys().next().value;this.detailsCache.delete(r)}}}},{key:"seedDetailsCache",value:function(t){var e=this.getRecordId(t);e&&this.setCachedDetails(e,t)}},{key:"clearDetailsCache",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.detailsCache&&(null!=t?this.detailsCache.delete(String(t)):this.detailsCache.clear())}},{key:"getDetailsCacheStats",value:function(){return{size:this.detailsCache.size,max:Math.max(1,Number(this.config.detailsCacheMaxSize)||100),ttl:Number(this.config.detailsCacheTTL)||0,keys:Array.from(this.detailsCache.keys())}}},{key:"getSaveEndpoint",value:function(){return String(this.config.detailsSource||"").trim()||String(this.config.endpoint||"").trim()}},{key:"persistRecord",value:(p=v(f().m(function t(e,n){var r,i,o,a,s,u;return f().w(function(t){for(;;)switch(t.n){case 0:if((r=this.getSaveEndpoint())&&(this.config.serverSide||-1===r.indexOf(".json"))){t.n=1;break}return t.a(2,this.persistRecordLocal(e,n));case 1:return i=n?this.config.createMethod:this.config.updateMethod,o={id:this.getRecordId(e),row:e},t.n=2,fetch(r,{method:i,credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});case 2:if((a=t.v).ok){t.n=3;break}throw new Error("Save failed (".concat(a.status,")"));case 3:return t.n=4,a.json().catch(function(){return{}});case 4:return s=t.v,u=null!=s&&s.row&&"object"===l(s.row)?s.row:e,t.a(2,u)}},t,this)})),function(t,e){return p.apply(this,arguments)})},{key:"persistRecordLocal",value:function(t,e){var n=this,r=this.getRecordId(t);if(e||!r){if(!r){var i=this.getNextLocalId();t[this.config.idField]=i}return this.rawRows.unshift(this.cloneRow(t)),t}var o=this.rawRows.findIndex(function(t){return n.getRecordId(t)===r});return o>=0?this.rawRows[o]=this.cloneRow(t):this.rawRows.unshift(this.cloneRow(t)),t}},{key:"getNextLocalId",value:function(){var t=this,e=0;return this.rawRows.forEach(function(n){var r=Number(null==n?void 0:n[t.config.idField]);Number.isNaN(r)||(e=Math.max(e,r))}),e+1}},{key:"refreshAfterMutation",value:(h=v(f().m(function t(e,n){var r,i,o=this;return f().w(function(t){for(;;)switch(t.n){case 0:if(!this.config.serverSide){t.n=2;break}return this.resetViewport(),t.n=1,this.loadData();case 1:return t.a(2);case 2:n||(r=this.getRecordId(e),(i=this.rawRows.findIndex(function(t){return o.getRecordId(t)===r}))>=0&&(this.rawRows[i]=this.cloneRow(e))),this.applyClientProcessing(),this.updateView();case 3:return t.a(2)}},t,this)})),function(t,e){return h.apply(this,arguments)})},{key:"setRequestStatus",value:function(t,e){var n,r;this.requestState=t||"idle",this.requestMessage=e||"",null===(n=this.loaderState)||void 0===n||null===(r=n.setLoading)||void 0===r||r.call(n,"loading"===this.requestState,this.requestMessage),this.renderRequestStatus()}},{key:"renderRequestStatus",value:function(){this.requestStatus&&this.requestStatusText&&this.retryButton&&(this.requestStatus.dataset.state=this.requestState||"idle",this.requestStatusText.textContent=this.requestMessage||"",this.retryButton.hidden="error"!==this.requestState)}},{key:"retryLoad",value:(d=v(f().m(function t(){return f().w(function(t){for(;;)switch(t.n){case 0:return this.setRequestStatus("loading","Loading page ".concat(this.state.page,"...")),t.n=1,this.loadData();case 1:return t.a(2)}},t,this)})),function(){return d.apply(this,arguments)})},{key:"parseFieldListAttr",value:function(t){var e,n=String((null===(e=this.container)||void 0===e?void 0:e.getAttribute(t))||"").trim();return n?n.split(",").map(function(t){return t.trim()}).filter(Boolean):[]}},{key:"parseBooleanAttr",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null===(e=this.container)||void 0===e||!e.hasAttribute(t))return n;var r=String(this.container.getAttribute(t)||"").trim().toLowerCase();return!r||"false"!==r&&"0"!==r&&"no"!==r&&"off"!==r}},{key:"parsePositiveIntAttr",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=String((null===(e=this.container)||void 0===e?void 0:e.getAttribute(t))||"").trim();if(!r)return n;var i=Number(r);return!Number.isFinite(i)||i<0?n:Math.floor(i)}},{key:"parseMetadataAttr",value:function(t){var e,n=String((null===(e=this.container)||void 0===e?void 0:e.getAttribute(t))||"").trim();if(!n)return{};if(n.startsWith("{")&&n.endsWith("}")||n.startsWith("[")&&n.endsWith("]"))try{var r=JSON.parse(n);return r&&"object"===l(r)?r:{}}catch(t){return{}}if("undefined"!=typeof window){var i=window[n];if("function"==typeof i)try{var o=i(this.container);return o&&"object"===l(o)?o:{}}catch(t){return{}}if(i&&"object"===l(i))return i}return{}}},{key:"parseObjectAttr",value:function(t){var e,n=String((null===(e=this.container)||void 0===e?void 0:e.getAttribute(t))||"").trim();if(!n)return{};try{var r=JSON.parse(n);return r&&"object"===l(r)&&!Array.isArray(r)?r:{}}catch(t){return{}}}},{key:"resolveConfiguredEndpoint",value:function(){var t=String(this.config.endpointTemplate||this.config.endpoint||"").trim();if(!t)return this.config.endpoint="","";var e=t.includes("@{")?this.resolveTemplateString(t,this.getBindingContext()):t;return this.config.endpoint=String(e||"").trim(),this.config.endpoint}},{key:"resolveRequestParams",value:function(){var t=this,e=Object.entries(this.config.requestParams||{});if(!e.length)return{};var n={};return e.forEach(function(e){var r=s(e,2),i=r[0],o=r[1];if(i){var a=String(o||"").trim();if(a){var l=t.extractExpression(a),u=t.evaluateExpression(l,t.getBindingContext());null!=u&&""!==u&&(n[i]=u)}}}),n}},{key:"resolveConfiguredFields",value:function(t,e){if(!Array.isArray(t)||0===t.length)return[];var n=new Set(e),r=new Set,i=[];return t.forEach(function(t){n.has(t)&&!r.has(t)&&(r.add(t),i.push(t))}),i}},{key:"applyChooserPoliciesForFields",value:function(){var t=this.state.headers.map(function(t){return t.field});this.mandatoryFieldsResolved=this.resolveConfiguredFields(this.config.mandatoryFields,t),this.priorityFieldsResolved=this.resolveConfiguredFields(this.config.priorityFields,t);var e=Array.isArray(this.state.visibleFields)?this.state.visibleFields.filter(function(e){return t.includes(e)}):[];e.length||(e=this.state.headers.filter(function(t){return t.visible}).map(function(t){return t.field})),this.mandatoryFieldsResolved.forEach(function(t){e.includes(t)||e.push(t)}),this.state.visibleFields=this.getOrderedVisibleFields(e)}},{key:"getOrderedVisibleFields",value:function(t){var e=new Set(this.state.headers.map(function(t){return t.field})),n=[],r=new Set;if(t.forEach(function(t){e.has(t)&&!r.has(t)&&(r.add(t),n.push(t))}),!this.priorityFieldsResolved.length)return n;var i=new Map;return this.priorityFieldsResolved.forEach(function(t,e){i.set(t,e)}),[].concat(n).sort(function(t,e){var n=i.has(t)?i.get(t):Number.MAX_SAFE_INTEGER,r=i.has(e)?i.get(e):Number.MAX_SAFE_INTEGER;return n!==r?n-r:0})}},{key:"isMandatoryField",value:function(t){return this.mandatoryFieldsResolved.includes(t)}},{key:"getBindableState",value:function(){return{searchTerm:this.state.searchTerm||"",sortField:this.state.sortField||null,sortDir:this.state.sortDir||"asc",filters:m({},this.state.filters||{}),page:Number(this.state.page)||1,visibleFields:u(this.state.visibleFields||[])}}},{key:"getStateSnapshot",value:function(){return this.getBindableState()}},{key:"shouldDispatchPprChange",value:function(t,e,n){return!!n||["searchTerm","sortField","sortDir","filters","page","visibleFields"].includes(t)}},{key:"refreshPpr",value:function(){this.resetViewport(),this.remoteLoaded=!1,this.resolveConfiguredEndpoint()?this.loadData():(this.applyClientProcessing(),this.updateView())}},{key:"applyBindableState",value:function(t){var e=this;if(t&&"object"===l(t)){var n=!1;if("string"==typeof t.searchTerm&&t.searchTerm!==this.state.searchTerm){var r;this.state.searchTerm=t.searchTerm;var i=null===(r=this.element)||void 0===r?void 0:r.querySelector('[data-action="search"]');i&&"value"in i&&(i.value=t.searchTerm),n=!0}if(void 0!==t.sortField){var o=null==t.sortField?null:String(t.sortField);o!==this.state.sortField&&(this.state.sortField=o,n=!0)}if("string"==typeof t.sortDir){var a="desc"===t.sortDir.toLowerCase()?"desc":"asc";a!==this.state.sortDir&&(this.state.sortDir=a,n=!0)}if(t.filters&&"object"===l(t.filters)&&(this.state.filters=m({},t.filters),n=!0),Array.isArray(t.visibleFields)&&this.state.headers.length){var s=new Set(t.visibleFields.map(function(t){return String(t)})),u=this.state.headers.map(function(t){return t.field}).filter(function(t){return e.isMandatoryField(t)||s.has(t)});u.length||(u=this.state.headers.filter(function(t){return!1!==t.visible}).map(function(t){return t.field})),this.state.visibleFields=this.getOrderedVisibleFields(u),n=!0}if(Number.isFinite(Number(t.page))){var c=Math.max(1,Number(t.page));c!==this.state.page&&(this.state.page=c,n=!0)}n&&(this.config.serverSide?this.loadData():(this.applyClientProcessing(),this.updateView()))}}},{key:"destroy",value:function(){var t,n,r,i,o,a;null===(t=this.detailsDialog)||void 0===t||null===(n=t.close)||void 0===n||n.call(t),null===(r=this.loaderState)||void 0===r||null===(i=r.destroy)||void 0===i||i.call(r),null===(o=this.stateBinding)||void 0===o||null===(a=o.disconnect)||void 0===a||a.call(o),this.windowScrollHandler&&(window.removeEventListener("scroll",this.windowScrollHandler),this.windowScrollHandler=null),S(e,"destroy",this,3)([])}}],c=[{key:"selector",get:function(){return"datagrid"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"datagrid"}},{key:"normalizeArgs",value:function(t,e){if(t instanceof Element)return{container:t,config:e||{},autoInit:!0};var n=t||{};return{container:n.container,parent:n.parent,textProvider:n.textProvider||null,config:n.config||{},autoInit:n.autoInit}}}],r&&b(n.prototype,r),c&&b(n,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,c,d,h,p,y,w,k,E,A,j,P,T,x,L,I}(r.Component);C(j,"templateId","datagrid-template"),"undefined"!=typeof window&&(window.DataGrid=j)},2994(t,e,n){"use strict";n.r(e),n.d(e,{DataTable:()=>j});var r=n(8812),i=n(8696),o=n(9062),a=n(3076);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){u=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(t,e)||c(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||c(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){if(t){if("string"==typeof t)return d(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(t,e):void 0}}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function f(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return h(u,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),u}var a={};function l(){}function s(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(h(e={},r,function(){return this}),e),d=u.prototype=l.prototype=Object.create(c);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,h(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=u,h(d,"constructor",u),h(u,"constructor",s),s.displayName="GeneratorFunction",h(u,i,"GeneratorFunction"),h(d),h(d,i,"Generator"),h(d,r,function(){return this}),h(d,"toString",function(){return"[object Generator]"}),(f=function(){return{w:o,m:p}})()}function h(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}h=function(t,e,n,r){function o(e,n){h(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},h(t,e,n,r)}function p(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function v(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){p(o,r,i,a,l,"next",t)}function l(t){p(o,r,i,a,l,"throw",t)}a(void 0)})}}function y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function m(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?y(Object(n),!0).forEach(function(e){C(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function b(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,A(r.key),r)}}function g(t,e,n){return e=E(e),function(t,e){if(e&&("object"==l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,w()?Reflect.construct(e,n||[],E(t).constructor):e.apply(t,n))}function w(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(w=function(){return!!t})()}function S(t,e,n,r){var i=k(E(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function k(){return k="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=E(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},k.apply(null,arguments)}function E(t){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},E(t)}function O(t,e){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},O(t,e)}function C(t,e,n){return(e=A(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function A(t){var e=function(t){if("object"!=l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==l(e)?e:e+""}var j=function(t){function e(t){var n,r,o,a,l,s,u,c,d,f,h,p,v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var y=e.normalizeArgs(t,v);return(p=g(this,e,[y.container,y.config])).templateId=e.templateId,p.parent=y.parent,p.textProvider=y.textProvider,p.config=m({localLimit:1e4,remoteLimit:50,endpoint:(null===(n=p.container)||void 0===n?void 0:n.getAttribute("data-endpoint"))||(null===(r=p.container)||void 0===r?void 0:r.getAttribute("endpoint"))||null,serverSide:(null===(o=p.container)||void 0===o?void 0:o.hasAttribute("server-side"))||!1,mode:p.resolveMode(p.container),pageSize:Number(null===(a=p.container)||void 0===a?void 0:a.getAttribute("data-page-size"))||25,infiniteChunkSize:Number(null===(l=p.container)||void 0===l?void 0:l.getAttribute("data-infinite-chunk"))||25,mandatoryFields:p.parseFieldListAttr("data-mandatory-fields"),priorityFields:p.parseFieldListAttr("data-priority-fields"),readonlyFields:p.parseFieldListAttr("data-readonly-fields"),columnMetadata:p.parseMetadataAttr("data-column-metadata"),idField:String((null===(s=p.container)||void 0===s?void 0:s.getAttribute("data-id-field"))||"id"),detailsSource:(null===(u=p.container)||void 0===u?void 0:u.getAttribute("data-details-source"))||(null===(c=p.container)||void 0===c?void 0:c.getAttribute("details-source"))||"",detailsCacheEnabled:p.parseBooleanAttr("data-details-cache",!0),detailsCacheMaxSize:p.parsePositiveIntAttr("data-details-cache-size",100),detailsCacheTTL:p.parsePositiveIntAttr("data-details-cache-ttl",0),createMethod:String((null===(d=p.container)||void 0===d?void 0:d.getAttribute("data-create-method"))||"POST").toUpperCase(),updateMethod:String((null===(f=p.container)||void 0===f?void 0:f.getAttribute("data-update-method"))||"PUT").toUpperCase(),renderMode:p.normalizeRenderMode(null===(h=p.container)||void 0===h?void 0:h.getAttribute("data-render-mode")),rows:[],headers:[]},y.config),p.config.endpointTemplate=p.config.endpoint,p.config.requestParams=p.parseObjectAttr("data-request-params"),p.rawRows=[],p.processedRows=[],p.remoteLoaded=!1,p.loadingMore=!1,p.windowScrollHandler=null,p.pinnedColumns={left:[],right:[]},p.onPinnedResize=null,p.localRowPool=[],p.localRowsVersion=0,p.localRowsRenderedVersion=-1,p.state={rows:[],headers:[],page:1,totalPages:1,totalCount:0,sortField:null,sortDir:"asc",searchTerm:"",filters:{},visibleColumns:[],columnChooserOpen:!1,hasMore:!1,visibleStart:0,visibleEnd:0},p.mandatoryFieldsResolved=[],p.priorityFieldsResolved=[],p.detailsDialog=new i.q,p.detailsCache=new Map,!1!==y.autoInit&&p.init(),p}return function(t,e){if("function"!=typeof e&&null!==e)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&&O(t,e)}(e,t),n=e,r=[{key:"validateStructure",value:function(){if(S(e,"validateStructure",this,3)([]),!this.container)throw new Error("DataTable requires a container element")}},{key:"init",value:(D=v(f().m(function t(){return f().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return D.apply(this,arguments)})},{key:"render",value:(I=v(f().m(function t(){var n,r,i,l,s,u,c,d,h,p,v,y,m,b,g,w=this;return f().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,S(e,"render",this,3)([]);case 1:return this.element=this.container.querySelector(".holi-datatable"),this.contentEl=null===(n=this.element)||void 0===n?void 0:n.querySelector(".datatable-content"),this.thead=null===(r=this.element)||void 0===r?void 0:r.querySelector('[data-role="thead"]'),this.tbody=null===(i=this.element)||void 0===i?void 0:i.querySelector('[data-role="tbody"]'),this.columnChooser=null===(l=this.element)||void 0===l?void 0:l.querySelector('[data-role="column-chooser"]'),this.columnChooserList=null===(s=this.element)||void 0===s?void 0:s.querySelector('[data-role="column-chooser-list"]'),this.resultCount=null===(u=this.element)||void 0===u?void 0:u.querySelector('[data-role="result-count"]'),this.pageInfo=null===(c=this.element)||void 0===c?void 0:c.querySelector('[data-role="page-info"]'),this.paginationControls=null===(d=this.element)||void 0===d?void 0:d.querySelector('[data-role="pagination-controls"]'),this.requestStatus=null===(h=this.element)||void 0===h?void 0:h.querySelector('[data-role="request-status"]'),this.requestStatusText=null===(p=this.element)||void 0===p?void 0:p.querySelector('[data-role="request-status-text"]'),this.retryButton=null===(v=this.element)||void 0===v?void 0:v.querySelector('[data-action="retry-load"]'),this.headerCellTemplate=null===(y=this.element)||void 0===y?void 0:y.querySelector('template[data-role="header-cell-template"]'),this.rowCellTemplate=null===(m=this.element)||void 0===m?void 0:m.querySelector('template[data-role="row-cell-template"]'),this.actionsCellTemplate=null===(b=this.element)||void 0===b?void 0:b.querySelector('template[data-role="actions-cell-template"]'),this.emptyRowTemplate=null===(g=this.element)||void 0===g?void 0:g.querySelector('template[data-role="empty-row-template"]'),this.loaderState=(0,o.w)(this,{host:this.element,busyTarget:this.contentEl||this.element,scope:"block",defaultMessage:"Loading data..."}),this.stateBinding=(0,a.x)(this,{defaultPath:"datatable",eventName:"stateupdate",getSnapshot:function(t){return t.getBindableState()},applySnapshot:function(t,e){return t.applyBindableState(e)}}),this.initEventDelegation(),this.initScrollingMode(),this.onPinnedResize=function(){return w.applyPinnedStyles()},window.addEventListener("resize",this.onPinnedResize),t.n=2,this.loadData();case 2:return t.a(2)}},t,this)})),function(){return I.apply(this,arguments)})},{key:"initEventDelegation",value:function(){var t=this;this.element&&(this.element.addEventListener("click",function(e){return t.handleAction(e)}),this.element.addEventListener("input",function(e){return t.handleInput(e)}),this.element.addEventListener("change",function(e){return t.handleChange(e)}))}},{key:"handleAction",value:function(t){var e,n,r,i,o=null===(e=t.target)||void 0===e||null===(n=e.closest)||void 0===n?void 0:n.call(e,"[data-action]"),a=null==o||null===(r=o.dataset)||void 0===r?void 0:r.action,l=null==o||null===(i=o.dataset)||void 0===i?void 0:i.field;if("sort"===a&&l)this.sort(l);else{if("toggle-columns"===a)return this.state.columnChooserOpen=!this.state.columnChooserOpen,void this.renderColumnChooser();if("add-row"!==a)if("view-row"!==a&&"edit-row"!==a)"prev-page"!==a?"next-page"!==a?"retry-load"===a&&this.retryLoad():this.gotoPage(this.state.page+1):this.gotoPage(this.state.page-1);else{var s,u=Number(null==o||null===(s=o.dataset)||void 0===s?void 0:s.rowIndex);if(Number.isNaN(u)||u<0)return;var c=this.isLocalDomReuseEnabled()?this.processedRows:this.state.rows;if(u>=c.length)return;var d=c[u];this.openDetailsDialog("edit-row"===a?"edit":"view",d)}else this.openDetailsDialog("add")}}},{key:"handleInput",value:function(t){var e;"search"===(null===(e=t.target)||void 0===e||null===(e=e.dataset)||void 0===e?void 0:e.action)&&(this.state.searchTerm=t.target.value||"",this.resetViewport(),this.config.serverSide?this.loadData():(this.applyClientProcessing(),this.updateView()))}},{key:"handleChange",value:function(t){var e,n,r,i=t.target,o=null==i||null===(e=i.dataset)||void 0===e?void 0:e.action,a=null==i||null===(n=i.dataset)||void 0===n?void 0:n.field,l=null==i||null===(r=i.dataset)||void 0===r?void 0:r.filter;if("toggle-column"===o&&a){var s=!!i.checked;return this.setColumnVisibility(a,s),void this.updateView()}if(l){var u=String(i.value||"").trim();u&&"all"!==u.toLowerCase()?this.state.filters[l]=u:delete this.state.filters[l],this.resetViewport(),this.config.serverSide?this.loadData():(this.applyClientProcessing(),this.updateView())}}},{key:"sort",value:(L=v(f().m(function t(e){return f().w(function(t){for(;;)switch(t.n){case 0:if(this.state.sortField===e?this.state.sortDir="asc"===this.state.sortDir?"desc":"asc":(this.state.sortField=e,this.state.sortDir="asc"),this.resetViewport(),!this.config.serverSide){t.n=2;break}return t.n=1,this.loadRemote(!0,!1);case 1:t.n=3;break;case 2:this.applyClientProcessing();case 3:this.updateView();case 4:return t.a(2)}},t,this)})),function(t){return L.apply(this,arguments)})},{key:"loadData",value:(x=v(f().m(function t(){return f().w(function(t){for(;;)switch(t.n){case 0:if(!this.resolveConfiguredEndpoint()){t.n=3;break}return t.n=1,this.loadRemote(this.config.serverSide,!1);case 1:if(t.v){t.n=2;break}return this.updateView(),t.a(2);case 2:t.n=4;break;case 3:return t.n=4,this.loadLocal();case 4:if(this.hydrateFilterControls(),this.config.serverSide||this.applyClientProcessing(),this.updateView(),!this.config.serverSide||"infinite"!==this.config.mode){t.n=5;break}return t.n=5,this.prefillInfiniteViewport();case 5:return t.a(2)}},t,this)})),function(){return x.apply(this,arguments)})},{key:"loadRemote",value:(T=v(f().m(function t(){var e,n,r,i,o,a,l,s=this,c=arguments;return f().w(function(t){for(;;)switch(t.p=t.n){case 0:if(e=c.length>0&&void 0!==c[0]&&c[0],n=c.length>1&&void 0!==c[1]&&c[1],!this.remoteLoaded||e||this.config.serverSide){t.n=1;break}return t.a(2);case 1:if(r=this.buildEndpointUrl(!0)){t.n=2;break}return t.a(2,!1);case 2:return this.setRequestStatus("loading","Loading page ".concat(this.state.page,"...")),t.p=3,t.n=4,fetch(r);case 4:if((o=t.v).ok){t.n=5;break}throw new Error("HTTP ".concat(o.status));case 5:return t.n=6,o.json();case 6:i=t.v,t.n=8;break;case 7:return t.p=7,t.v,this.setRequestStatus("error","Request failed"),t.a(2,!1);case 8:if(a=Array.isArray(i.rows)?i.rows:[],this.rawRows=a,l=Array.isArray(i.headers)?i.headers.map(function(t){return s.normalizeHeaderDefinition(t)}).filter(Boolean):this.deriveHeaders(a),this.state.headers=l,this.applyChooserPoliciesForColumns(),this.state.totalPages=Number(i.totalPages)||1,this.state.totalCount=Number(i.totalCount)||a.length,!this.config.serverSide){t.n=9;break}return this.state.rows=n?[].concat(u(this.state.rows),u(a)):a,this.processedRows=u(this.state.rows),this.state.hasMore="infinite"===this.config.mode&&this.state.page<this.state.totalPages,"infinite"!==this.config.mode||this.state.hasMore?this.setRequestStatus("idle",""):this.setRequestStatus("end","No more records"),t.a(2,!0);case 9:return this.remoteLoaded=!0,this.setRequestStatus("idle",""),t.a(2,!0)}},t,this,[[3,7]])})),function(){return T.apply(this,arguments)})},{key:"loadLocal",value:(P=v(f().m(function t(){var e=this;return f().w(function(t){for(;;)switch(t.n){case 0:this.rawRows=Array.isArray(this.config.rows)?this.config.rows:[],this.state.headers=Array.isArray(this.config.headers)?this.config.headers.map(function(t){return e.normalizeHeaderDefinition(t)}).filter(Boolean):this.deriveHeaders(this.rawRows),this.applyChooserPoliciesForColumns(),this.state.totalPages=1,this.state.totalCount=this.rawRows.length;case 1:return t.a(2)}},t,this)})),function(){return P.apply(this,arguments)})},{key:"buildEndpointUrl",value:function(t){var e=this.resolveConfiguredEndpoint();if(!e)return"";if(!t)return e;var n="pagination"===this.config.mode?this.config.pageSize:"infinite"===this.config.mode?this.config.infiniteChunkSize:this.config.remoteLimit,r=new URLSearchParams(m({page:String(this.state.page),limit:String(n),sort:"".concat(this.state.sortField||"",",").concat(this.state.sortDir),q:this.state.searchTerm},this.state.filters)),i=this.resolveRequestParams();return Object.entries(i).forEach(function(t){var e=s(t,2),n=e[0],i=e[1];null!=i&&""!==i&&r.set(n,String(i))}),"".concat(e,"?").concat(r)}},{key:"deriveHeaders",value:function(t){var e=t[0];return e&&"object"===l(e)?Object.keys(e).map(function(t){return{field:t,label:t,visible:!0,pinned:null}}):[]}},{key:"normalizeRenderMode",value:function(t){return"template-clone"===String(t||"").trim().toLowerCase()?"template-clone":"programmatic"}},{key:"normalizeHeaderDefinition",value:function(t){var e,n;if(!t||"object"!==l(t))return null;var r=String(null!==(e=null!==(n=t.field)&&void 0!==n?n:t.key)&&void 0!==e?e:"").trim();return r?m(m({},t),{},{field:r,label:t.label||r,visible:!1!==t.visible,pinned:this.normalizePinnedSide(t.pinned)}):null}},{key:"normalizePinnedSide",value:function(t){if(null==t)return null;var e=String(t).trim().toLowerCase();return"left"===e||"right"===e?e:null}},{key:"applyClientProcessing",value:function(){var t=Array.isArray(this.rawRows)?u(this.rawRows):[];t=this.applyFilters(t),t=this.applySearch(t),t=this.applySort(t),this.processedRows=t,this.bumpLocalRowsVersion(),this.applyViewport(t)}},{key:"applyViewport",value:function(t){if("pagination"===this.config.mode){var e=Math.max(1,Number(this.config.pageSize)||25),n=Math.max(1,Math.ceil(t.length/e));this.state.totalPages=n,this.state.page=Math.min(Math.max(1,this.state.page),n);var r=(this.state.page-1)*e,i=r+e;return this.state.rows=t.slice(r,i),this.state.hasMore=!1,this.state.visibleStart=r,void(this.state.visibleEnd=Math.min(i,t.length))}if("infinite"===this.config.mode){var o=Math.max(1,Number(this.config.infiniteChunkSize)||25),a=this.state.page*o;return this.state.rows=t.slice(0,a),this.state.hasMore=a<t.length,this.state.totalPages=1,this.state.visibleStart=0,void(this.state.visibleEnd=Math.min(a,t.length))}this.state.rows=t,this.state.totalPages=1,this.state.hasMore=!1,this.state.visibleStart=0,this.state.visibleEnd=t.length}},{key:"applyFilters",value:function(t){var e=Object.entries(this.state.filters||{});return e.length?t.filter(function(t){return e.every(function(e){var n=s(e,2),r=n[0],i=n[1],o=null==t?void 0:t[r];return null!=o&&String(o).toLowerCase()===String(i).toLowerCase()})}):t}},{key:"applySearch",value:function(t){var e=String(this.state.searchTerm||"").trim().toLowerCase();if(!e)return t;var n=this.state.headers.map(function(t){return t.field});return t.filter(function(t){return n.some(function(n){var r=null==t?void 0:t[n];return null!=r&&String(r).toLowerCase().includes(e)})})}},{key:"applySort",value:function(t){var e=this.state.sortField;if(!e)return t;var n="desc"===this.state.sortDir?-1:1;return t.sort(function(t,r){var i=null==t?void 0:t[e],o=null==r?void 0:r[e];if(null==i&&null==o)return 0;if(null==i)return-1*n;if(null==o)return 1*n;var a=Number(i),l=Number(o);return Number.isNaN(a)||Number.isNaN(l)?String(i).localeCompare(String(o),void 0,{numeric:!0,sensitivity:"base"})*n:(a-l)*n})}},{key:"setColumnVisibility",value:function(t,e){var n=this.state.headers.find(function(e){return e.field===t});n&&(!e&&this.isMandatoryField(t)||(n.visible=e,this.state.visibleColumns=this.getOrderedVisibleColumns(),this.bumpLocalRowsVersion()))}},{key:"hydrateFilterControls",value:function(){var t,e=this,n=null===(t=this.element)||void 0===t?void 0:t.querySelectorAll("[data-filter]");null!=n&&n.length&&n.forEach(function(t){if(t instanceof HTMLSelectElement&&!(t.options.length>1)){var n=t.dataset.filter;if(n){var r=new Set;e.rawRows.forEach(function(t){null!=(null==t?void 0:t[n])&&r.add(String(t[n]))}),Array.from(r).sort(function(t,e){return t.localeCompare(e,void 0,{numeric:!0,sensitivity:"base"})}).forEach(function(e){var n=document.createElement("option");n.value=e,n.textContent=e,t.appendChild(n)})}}})}},{key:"updateView",value:function(){this.renderHeaders(),this.renderRows(),!this.config.serverSide&&this.ensureInfiniteScrollable()&&this.renderRows(),this.renderColumnChooser(),this.renderMeta(),this.renderPagination(),this.renderRequestStatus(),this.applyPinnedStyles(),this.dispatchEvent("stateupdate",this.state)}},{key:"renderHeaders",value:function(){var t=this;if(this.thead)if(this.thead.replaceChildren(),"template-clone"===this.config.renderMode&&this.headerCellTemplate)this.renderHeadersFromTemplates();else{var e=document.createElement("tr");this.state.visibleColumns.forEach(function(n){var r=document.createElement("th");r.dataset.field=n.field;var i=document.createElement("button");i.type="button",i.dataset.action="sort",i.dataset.field=n.field,i.textContent=t.getHeaderLabel(n),r.appendChild(i),e.appendChild(r)});var n=document.createElement("th");n.textContent="Actions",e.appendChild(n),this.thead.appendChild(e)}}},{key:"renderHeadersFromTemplates",value:function(){var t=this;if(this.thead){var e=document.createElement("tr");this.state.visibleColumns.forEach(function(n){var r=t.cloneFirstElementFromTemplate(t.headerCellTemplate);if(r instanceof HTMLTableCellElement){r.dataset.field=n.field;var i=r.querySelector('[data-action="sort"]');i instanceof HTMLButtonElement&&(i.dataset.field=n.field);var o=r.querySelector('[data-role="header-label"]');o?o.textContent=t.getHeaderLabel(n):r.textContent=t.getHeaderLabel(n),e.appendChild(r)}});var n=document.createElement("th");n.textContent="Actions",e.appendChild(n),this.thead.appendChild(e)}}},{key:"getHeaderLabel",value:function(t){var e=t.label||t.field;return this.state.sortField!==t.field?e:"".concat(e," ").concat("asc"===this.state.sortDir?"^":"v")}},{key:"renderRows",value:function(){var t=this;if(this.tbody)if(this.isLocalDomReuseEnabled())this.renderRowsWithLocalPool();else{if(this.tbody.replaceChildren(),!this.state.rows.length){if("template-clone"===this.config.renderMode&&this.emptyRowTemplate)return void this.renderEmptyRowFromTemplate();var e=document.createElement("tr"),n=document.createElement("td");return n.colSpan=Math.max(this.state.visibleColumns.length+1,1),n.textContent="No matching records",e.appendChild(n),void this.tbody.appendChild(e)}this.state.rows.forEach(function(e,n){var r=document.createElement("tr");"template-clone"===t.config.renderMode&&t.rowCellTemplate?t.renderRowCellsFromTemplate(r,e):t.state.visibleColumns.forEach(function(t){var n=document.createElement("td");n.dataset.field=t.field;var i=null==e?void 0:e[t.field];n.textContent=null==i?"":String(i),r.appendChild(n)});var i=t.createActionsCell(n);r.appendChild(i),t.tbody.appendChild(r)})}}},{key:"isLocalDomReuseEnabled",value:function(){return!this.config.serverSide}},{key:"bumpLocalRowsVersion",value:function(){this.localRowsVersion+=1}},{key:"renderRowsWithLocalPool",value:function(){if(this.tbody){if(!this.processedRows.length){if(this.localRowPool=[],this.localRowsRenderedVersion=this.localRowsVersion,this.tbody.replaceChildren(),"template-clone"===this.config.renderMode&&this.emptyRowTemplate)return void this.renderEmptyRowFromTemplate();var t=document.createElement("tr"),e=document.createElement("td");return e.colSpan=Math.max(this.state.visibleColumns.length+1,1),e.textContent="No matching records",t.appendChild(e),void this.tbody.appendChild(t)}this.localRowsRenderedVersion!==this.localRowsVersion?this.rebuildLocalRowPool():this.applyLocalRowVisibility()}}},{key:"rebuildLocalRowPool",value:function(){var t=this;this.tbody&&(this.tbody.replaceChildren(),this.localRowPool=[],this.processedRows.forEach(function(e,n){var r=document.createElement("tr");"template-clone"===t.config.renderMode&&t.rowCellTemplate?t.renderRowCellsFromTemplate(r,e):t.state.visibleColumns.forEach(function(t){var n=document.createElement("td");n.dataset.field=t.field;var i=null==e?void 0:e[t.field];n.textContent=null==i?"":String(i),r.appendChild(n)}),r.appendChild(t.createActionsCell(n)),t.localRowPool.push(r),t.tbody.appendChild(r)}),this.localRowsRenderedVersion=this.localRowsVersion,this.applyLocalRowVisibility())}},{key:"applyLocalRowVisibility",value:function(){var t=Math.max(0,Number(this.state.visibleStart)||0),e=Math.max(t,Number(this.state.visibleEnd)||0);if("infinite"!==this.config.mode)this.localRowPool.forEach(function(n,r){n.hidden=r<t||r>=e});else{var n=Math.max(0,e-t);this.localRowPool.forEach(function(t,e){t.hidden=e>=n})}}},{key:"renderEmptyRowFromTemplate",value:function(){var t,e=this.cloneFirstElementFromTemplate(this.emptyRowTemplate);if(e instanceof HTMLTableRowElement){var n=e.querySelector('[data-role="empty-cell"]');n instanceof HTMLTableCellElement&&(n.colSpan=Math.max(this.state.visibleColumns.length+1,1)),null===(t=this.tbody)||void 0===t||t.appendChild(e)}}},{key:"renderRowCellsFromTemplate",value:function(t,e){var n=this;this.state.visibleColumns.forEach(function(r){var i=n.cloneFirstElementFromTemplate(n.rowCellTemplate);if(i instanceof HTMLTableCellElement){i.dataset.field=r.field;var o=null==e?void 0:e[r.field];i.textContent=null==o?"":String(o),t.appendChild(i)}})}},{key:"createActionsCell",value:function(t){var e=this.cloneFirstElementFromTemplate(this.actionsCellTemplate);if(e instanceof HTMLTableCellElement)return e.classList.add("datatable-actions-cell"),e.querySelectorAll('[data-action][data-role="row-action"]').forEach(function(e){e instanceof HTMLButtonElement&&(e.dataset.rowIndex=String(t))}),e;var n=document.createElement("td");n.className="datatable-actions-cell";var r=document.createElement("button");r.type="button",r.dataset.action="view-row",r.dataset.rowIndex=String(t),r.textContent="View",n.appendChild(r);var i=document.createElement("button");return i.type="button",i.dataset.action="edit-row",i.dataset.rowIndex=String(t),i.textContent="Edit",n.appendChild(i),n}},{key:"cloneFirstElementFromTemplate",value:function(t){return t instanceof HTMLTemplateElement&&t.content.cloneNode(!0).firstElementChild||null}},{key:"renderColumnChooser",value:function(){var t=this;this.columnChooser&&(this.columnChooser.hidden=!this.state.columnChooserOpen),this.columnChooserList&&(this.columnChooserList.replaceChildren(),this.state.headers.forEach(function(e){var n=document.createElement("label");n.className="datatable-column-option";var r=document.createElement("input");r.type="checkbox",r.dataset.action="toggle-column",r.dataset.field=e.field,r.checked=!1!==e.visible,r.disabled=t.isMandatoryField(e.field);var i=document.createElement("span");i.textContent=e.label||e.field,n.appendChild(r),n.appendChild(i),t.columnChooserList.appendChild(n)}))}},{key:"renderMeta",value:function(){this.resultCount&&(this.config.serverSide?this.resultCount.textContent="".concat(this.state.rows.length," shown / ").concat(this.state.totalCount," total"):this.resultCount.textContent="".concat(this.processedRows.length," rows"))}},{key:"renderPagination",value:function(){if(this.paginationControls&&this.pageInfo)if("pagination"===this.config.mode){this.paginationControls.hidden=!1,this.pageInfo.textContent="Page ".concat(this.state.page," of ").concat(this.state.totalPages);var t=this.paginationControls.querySelector('[data-action="prev-page"]'),e=this.paginationControls.querySelector('[data-action="next-page"]');t&&(t.disabled=this.state.page<=1),e&&(e.disabled=this.state.page>=this.state.totalPages)}else this.paginationControls.hidden=!0}},{key:"gotoPage",value:(j=v(f().m(function t(e){var n;return f().w(function(t){for(;;)switch(t.n){case 0:if("pagination"===this.config.mode){t.n=1;break}return t.a(2);case 1:if(n=Math.min(Math.max(1,e),Math.max(1,this.state.totalPages)),this.state.page=n,!this.config.serverSide){t.n=4;break}return t.n=2,this.loadRemote(!0,!1);case 2:if(t.v){t.n=3;break}return this.updateView(),t.a(2);case 3:t.n=5;break;case 4:this.applyViewport(this.processedRows);case 5:this.updateView();case 6:return t.a(2)}},t,this)})),function(t){return j.apply(this,arguments)})},{key:"resolveMode",value:function(t){var e=String((null==t?void 0:t.getAttribute("data-mode"))||"").trim().toLowerCase();return"pagination"===e||"infinite"===e?e:null!=t&&t.hasAttribute("infinite-scroll")?"infinite":null!=t&&t.hasAttribute("pagination")?"pagination":"standard"}},{key:"resetViewport",value:function(){this.state.page=1,this.contentEl&&(this.contentEl.scrollTop=0)}},{key:"initScrollingMode",value:function(){var t,e=this;if("infinite"===this.config.mode&&this.contentEl){this.contentEl.classList.add("datatable-scrollable");var n=(null===(t=this.container)||void 0===t?void 0:t.getAttribute("data-scroll-height"))||"420px";this.contentEl.style.maxHeight=n,this.contentEl.style.overflowY="auto",this.contentEl.addEventListener("scroll",function(){e.handleInfiniteScroll()}),this.config.serverSide||(this.windowScrollHandler=function(){e.handleWindowInfiniteScroll()},window.addEventListener("scroll",this.windowScrollHandler,{passive:!0}))}}},{key:"handleInfiniteScroll",value:(A=v(f().m(function t(){return f().w(function(t){for(;;)switch(t.n){case 0:if("infinite"===this.config.mode&&this.contentEl&&this.state.hasMore&&!this.loadingMore){t.n=1;break}return t.a(2);case 1:if(this.contentEl.scrollTop+this.contentEl.clientHeight>=this.contentEl.scrollHeight-48){t.n=2;break}return t.a(2);case 2:if(this.loadingMore=!0,this.state.page+=1,!this.config.serverSide){t.n=5;break}return t.n=3,this.loadRemote(!0,!0);case 3:if(t.v){t.n=4;break}return this.loadingMore=!1,this.updateView(),t.a(2);case 4:t.n=6;break;case 5:this.applyViewport(this.processedRows);case 6:this.renderRows(),this.applyPinnedStyles(),this.renderMeta(),this.loadingMore=!1;case 7:return t.a(2)}},t,this)})),function(){return A.apply(this,arguments)})},{key:"handleWindowInfiniteScroll",value:(E=v(f().m(function t(){var e,n;return f().w(function(t){for(;;)switch(t.n){case 0:if("infinite"===this.config.mode&&this.state.hasMore&&!this.loadingMore){t.n=1;break}return t.a(2);case 1:if(n=null===(e=this.container)||void 0===e?void 0:e.getBoundingClientRect()){t.n=2;break}return t.a(2);case 2:if(n.bottom<=window.innerHeight+120){t.n=3;break}return t.a(2);case 3:if(this.loadingMore=!0,this.state.page+=1,!this.config.serverSide){t.n=6;break}return t.n=4,this.loadRemote(!0,!0);case 4:if(t.v){t.n=5;break}return this.loadingMore=!1,this.updateView(),t.a(2);case 5:t.n=7;break;case 6:this.applyViewport(this.processedRows);case 7:this.renderRows(),this.applyPinnedStyles(),this.renderMeta(),this.loadingMore=!1;case 8:return t.a(2)}},t,this)})),function(){return E.apply(this,arguments)})},{key:"prefillInfiniteViewport",value:(k=v(f().m(function t(){var e,n;return f().w(function(t){for(;;)switch(t.n){case 0:if(this.contentEl&&"infinite"===this.config.mode&&this.config.serverSide){t.n=1;break}return t.a(2);case 1:e=10,n=0;case 2:if(!(this.state.hasMore&&this.contentEl.scrollHeight<=this.contentEl.clientHeight&&n<e)){t.n=5;break}return this.loadingMore=!0,this.state.page+=1,t.n=3,this.loadRemote(!0,!0);case 3:if(t.v){t.n=4;break}return this.loadingMore=!1,t.a(3,5);case 4:this.renderRows(),this.applyPinnedStyles(),this.renderMeta(),this.loadingMore=!1,n+=1,t.n=2;break;case 5:return t.a(2)}},t,this)})),function(){return k.apply(this,arguments)})},{key:"ensureInfiniteScrollable",value:function(){if("infinite"!==this.config.mode||!this.contentEl||!this.state.hasMore)return!1;for(var t=0,e=!1;this.state.hasMore&&this.contentEl.scrollHeight<=this.contentEl.clientHeight&&t<10;)this.state.page+=1,this.applyViewport(this.processedRows),t+=1,e=!0;return e}},{key:"openDetailsDialog",value:(w=v(f().m(function t(e){var n,r,i,o,a=this,l=arguments;return f().w(function(t){for(;;)switch(t.n){case 0:return n=l.length>1&&void 0!==l[1]?l[1]:null,t.n=1,this.resolveDetailsRecord(e,n);case 1:r=t.v,i=this.resolveDetailFields(r),o=this.config.readonlyFields||[],this.detailsDialog.open({title:"Record",mode:e,record:r,fields:i,readonlyFields:o,onSave:function(){var t=v(f().m(function t(e,n){var r;return f().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,a.persistRecord(e,"add"===n);case 1:return r=t.v,t.n=2,a.refreshAfterMutation(r,"add"===n);case 2:return a.seedDetailsCache(r),t.a(2,r)}},t)}));return function(e,n){return t.apply(this,arguments)}}()});case 2:return t.a(2)}},t,this)})),function(t){return w.apply(this,arguments)})},{key:"resolveDetailsRecord",value:(y=v(f().m(function t(e,n){var r,i,o,a,s,u,c,d,h,p,v,y;return f().w(function(t){for(;;)switch(t.p=t.n){case 0:if("add"!==e){t.n=1;break}return t.a(2,this.createEmptyRecord());case 1:if(n&&"object"===l(n)){t.n=2;break}return t.a(2,this.createEmptyRecord());case 2:if(r=this.cloneRow(n),i=this.getRecordId(n)){t.n=3;break}return t.a(2,r);case 3:if(this.shouldFetchDetails(e)){t.n=4;break}return t.a(2,r);case 4:if(!(o=this.getCachedDetails(i))){t.n=5;break}return t.a(2,this.mergeDetailRecord(r,o));case 5:if(a=this.buildDetailsEndpoint(i,n)){t.n=6;break}return t.a(2,r);case 6:return s=!1,t.p=7,null===(u=this.detailsDialog)||void 0===u||null===(c=u.openLoading)||void 0===c||c.call(u,{title:"Record"}),s=!0,t.n=8,fetch(a,{method:"GET",credentials:"same-origin"});case 8:if((d=t.v).ok){t.n=9;break}return t.a(2,r);case 9:return t.n=10,d.json().catch(function(){return null});case 10:if(h=t.v,p=this.extractDetailsPayload(h)){t.n=11;break}return t.a(2,r);case 11:return this.setCachedDetails(i,p),t.a(2,this.mergeDetailRecord(r,p));case 12:return t.p=12,t.v,t.a(2,r);case 13:return t.p=13,s&&(null===(v=this.detailsDialog)||void 0===v||null===(y=v.close)||void 0===y||y.call(v)),t.f(13);case 14:return t.a(2)}},t,this,[[7,12,13,14]])})),function(t,e){return y.apply(this,arguments)})},{key:"shouldFetchDetails",value:function(t){return("view"===t||"edit"===t)&&!!String(this.config.detailsSource||"").trim()}},{key:"buildDetailsEndpoint",value:function(t,e){var n=String(this.config.detailsSource||"").trim();if(!n)return"";var r=n,i=String(this.config.idField||"id"),o=C({id:t},i,t);if(Object.keys(o).forEach(function(t){var e,n=encodeURIComponent(String(null!==(e=o[t])&&void 0!==e?e:""));r=r.replace(new RegExp("@\\{\\s*".concat(t,"\\s*\\}"),"g"),n)}),r.includes("@{")&&(r=r.replace(/@\{([^}]+)\}/g,function(t,n){var r=String(n||"").trim(),i=null==e?void 0:e[r];return null==i?"":encodeURIComponent(String(i))})),!/[?&](id|rowId|recordId|key)=/.test(r)&&!n.includes("@{")){var a=r.includes("?")?"&":"?";r="".concat(r).concat(a).concat(encodeURIComponent(i),"=").concat(encodeURIComponent(t))}return r}},{key:"extractDetailsPayload",value:function(t){return t&&"object"===l(t)?t.row&&"object"===l(t.row)?this.cloneRow(t.row):t.record&&"object"===l(t.record)?this.cloneRow(t.record):t.data&&"object"===l(t.data)&&!Array.isArray(t.data)?this.cloneRow(t.data):Array.isArray(t)?null:this.cloneRow(t):null}},{key:"mergeDetailRecord",value:function(t,e){var n=t&&"object"===l(t)?t:{},r=e&&"object"===l(e)?e:{};return m(m({},n),r)}},{key:"resolveDetailFields",value:function(t){var e=this,n=[],r=new Set,i=this.config.columnMetadata||{};return this.state.headers.forEach(function(o){var a=String(o.field||"").trim();if(a&&!r.has(a)){r.add(a);var s=i[a]&&"object"===l(i[a])?i[a]:{};n.push({name:a,label:s.label||o.label||a,type:s.formFieldType||s.type||e.inferFieldType(null==t?void 0:t[a]),required:s.required,optional:s.optional,readonly:s.readonly,constraints:s.constraints&&"object"===l(s.constraints)?s.constraints:{},lov:s.lov||s.options||[]})}}),Object.keys(t||{}).forEach(function(o){if(!r.has(o)){r.add(o);var a=i[o]&&"object"===l(i[o])?i[o]:{};n.push({name:o,label:a.label||o,type:a.formFieldType||a.type||e.inferFieldType(null==t?void 0:t[o]),required:a.required,optional:a.optional,readonly:a.readonly,constraints:a.constraints&&"object"===l(a.constraints)?a.constraints:{},lov:a.lov||a.options||[]})}}),n}},{key:"inferFieldType",value:function(t){return"boolean"==typeof t?"boolean":"number"==typeof t?"number":"text"}},{key:"createEmptyRecord",value:function(){var t={};return this.state.headers.forEach(function(e){t[e.field]=""}),t}},{key:"cloneRow",value:function(t){return JSON.parse(JSON.stringify(t||{}))}},{key:"getRecordId",value:function(t){if(!t||"object"!==l(t))return"";var e=t[String(this.config.idField||"id")];return null==e?"":String(e)}},{key:"getCachedDetails",value:function(t){if(!this.config.detailsCacheEnabled||!t||!this.detailsCache.has(t))return null;var e=this.detailsCache.get(t);if(!e)return null;var n=Number(this.config.detailsCacheTTL)||0;return n>0&&Date.now()-e.ts>n?(this.detailsCache.delete(t),null):(this.detailsCache.delete(t),this.detailsCache.set(t,e),this.cloneRow(e.data))}},{key:"setCachedDetails",value:function(t,e){if(this.config.detailsCacheEnabled&&t&&e&&"object"===l(e)){this.detailsCache.has(t)&&this.detailsCache.delete(t),this.detailsCache.set(t,{data:this.cloneRow(e),ts:Date.now()});for(var n=Math.max(1,Number(this.config.detailsCacheMaxSize)||100);this.detailsCache.size>n;){var r=this.detailsCache.keys().next().value;this.detailsCache.delete(r)}}}},{key:"seedDetailsCache",value:function(t){var e=this.getRecordId(t);e&&this.setCachedDetails(e,t)}},{key:"clearDetailsCache",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.detailsCache&&(null!=t?this.detailsCache.delete(String(t)):this.detailsCache.clear())}},{key:"getDetailsCacheStats",value:function(){return{size:this.detailsCache.size,max:Math.max(1,Number(this.config.detailsCacheMaxSize)||100),ttl:Number(this.config.detailsCacheTTL)||0,keys:Array.from(this.detailsCache.keys())}}},{key:"getSaveEndpoint",value:function(){return String(this.config.detailsSource||"").trim()||String(this.config.endpoint||"").trim()}},{key:"persistRecord",value:(p=v(f().m(function t(e,n){var r,i,o,a,s,u;return f().w(function(t){for(;;)switch(t.n){case 0:if((r=this.getSaveEndpoint())&&(this.config.serverSide||-1===r.indexOf(".json"))){t.n=1;break}return t.a(2,this.persistRecordLocal(e,n));case 1:return i=n?this.config.createMethod:this.config.updateMethod,o={id:this.getRecordId(e),row:e},t.n=2,fetch(r,{method:i,credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});case 2:if((a=t.v).ok){t.n=3;break}throw new Error("Save failed (".concat(a.status,")"));case 3:return t.n=4,a.json().catch(function(){return{}});case 4:return s=t.v,u=null!=s&&s.row&&"object"===l(s.row)?s.row:e,t.a(2,u)}},t,this)})),function(t,e){return p.apply(this,arguments)})},{key:"persistRecordLocal",value:function(t,e){var n=this,r=this.getRecordId(t);if(e||!r){if(!r){var i=this.getNextLocalId();t[this.config.idField]=i}return this.rawRows.unshift(this.cloneRow(t)),t}var o=this.rawRows.findIndex(function(t){return n.getRecordId(t)===r});return o>=0?this.rawRows[o]=this.cloneRow(t):this.rawRows.unshift(this.cloneRow(t)),t}},{key:"getNextLocalId",value:function(){var t=this,e=0;return this.rawRows.forEach(function(n){var r=Number(null==n?void 0:n[t.config.idField]);Number.isNaN(r)||(e=Math.max(e,r))}),e+1}},{key:"refreshAfterMutation",value:(h=v(f().m(function t(e,n){var r,i,o=this;return f().w(function(t){for(;;)switch(t.n){case 0:if(!this.config.serverSide){t.n=2;break}return this.resetViewport(),t.n=1,this.loadData();case 1:return t.a(2);case 2:n||(r=this.getRecordId(e),(i=this.rawRows.findIndex(function(t){return o.getRecordId(t)===r}))>=0&&(this.rawRows[i]=this.cloneRow(e))),this.applyClientProcessing(),this.updateView();case 3:return t.a(2)}},t,this)})),function(t,e){return h.apply(this,arguments)})},{key:"destroy",value:function(){var t,n,r,i,o,a;null===(t=this.detailsDialog)||void 0===t||null===(n=t.close)||void 0===n||n.call(t),null===(r=this.loaderState)||void 0===r||null===(i=r.destroy)||void 0===i||i.call(r),null===(o=this.stateBinding)||void 0===o||null===(a=o.disconnect)||void 0===a||a.call(o),this.onPinnedResize&&(window.removeEventListener("resize",this.onPinnedResize),this.onPinnedResize=null),this.windowScrollHandler&&(window.removeEventListener("scroll",this.windowScrollHandler),this.windowScrollHandler=null),S(e,"destroy",this,3)([])}},{key:"setRequestStatus",value:function(t,e){var n,r;this.requestState=t||"idle",this.requestMessage=e||"",null===(n=this.loaderState)||void 0===n||null===(r=n.setLoading)||void 0===r||r.call(n,"loading"===this.requestState,this.requestMessage),this.renderRequestStatus()}},{key:"renderRequestStatus",value:function(){this.requestStatus&&this.requestStatusText&&this.retryButton&&(this.requestStatus.dataset.state=this.requestState||"idle",this.requestStatusText.textContent=this.requestMessage||"",this.retryButton.hidden="error"!==this.requestState)}},{key:"retryLoad",value:(d=v(f().m(function t(){return f().w(function(t){for(;;)switch(t.n){case 0:return this.setRequestStatus("loading","Loading page ".concat(this.state.page,"...")),t.n=1,this.loadData();case 1:return t.a(2)}},t,this)})),function(){return d.apply(this,arguments)})},{key:"parseFieldListAttr",value:function(t){var e,n=String((null===(e=this.container)||void 0===e?void 0:e.getAttribute(t))||"").trim();return n?n.split(",").map(function(t){return t.trim()}).filter(Boolean):[]}},{key:"parseBooleanAttr",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null===(e=this.container)||void 0===e||!e.hasAttribute(t))return n;var r=String(this.container.getAttribute(t)||"").trim().toLowerCase();return!r||"false"!==r&&"0"!==r&&"no"!==r&&"off"!==r}},{key:"parsePositiveIntAttr",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=String((null===(e=this.container)||void 0===e?void 0:e.getAttribute(t))||"").trim();if(!r)return n;var i=Number(r);return!Number.isFinite(i)||i<0?n:Math.floor(i)}},{key:"parseMetadataAttr",value:function(t){var e,n=String((null===(e=this.container)||void 0===e?void 0:e.getAttribute(t))||"").trim();if(!n)return{};if(n.startsWith("{")&&n.endsWith("}")||n.startsWith("[")&&n.endsWith("]"))try{var r=JSON.parse(n);return r&&"object"===l(r)?r:{}}catch(t){return{}}if("undefined"!=typeof window){var i=window[n];if("function"==typeof i)try{var o=i(this.container);return o&&"object"===l(o)?o:{}}catch(t){return{}}if(i&&"object"===l(i))return i}return{}}},{key:"parseObjectAttr",value:function(t){var e,n=String((null===(e=this.container)||void 0===e?void 0:e.getAttribute(t))||"").trim();if(!n)return{};try{var r=JSON.parse(n);return r&&"object"===l(r)&&!Array.isArray(r)?r:{}}catch(t){return{}}}},{key:"resolveConfiguredEndpoint",value:function(){var t=String(this.config.endpointTemplate||this.config.endpoint||"").trim();if(!t)return this.config.endpoint="","";var e=t.includes("@{")?this.resolveTemplateString(t,this.getBindingContext()):t;return this.config.endpoint=String(e||"").trim(),this.config.endpoint}},{key:"resolveRequestParams",value:function(){var t=this,e=Object.entries(this.config.requestParams||{});if(!e.length)return{};var n={};return e.forEach(function(e){var r=s(e,2),i=r[0],o=r[1];if(i){var a=String(o||"").trim();if(a){var l=t.extractExpression(a),u=t.evaluateExpression(l,t.getBindingContext());null!=u&&""!==u&&(n[i]=u)}}}),n}},{key:"resolveConfiguredFields",value:function(t,e){if(!Array.isArray(t)||0===t.length)return[];var n=new Set(e),r=new Set,i=[];return t.forEach(function(t){n.has(t)&&!r.has(t)&&(r.add(t),i.push(t))}),i}},{key:"applyChooserPoliciesForColumns",value:function(){var t=this,e=this.state.headers.map(function(t){return t.field});this.mandatoryFieldsResolved=this.resolveConfiguredFields(this.config.mandatoryFields,e),this.priorityFieldsResolved=this.resolveConfiguredFields(this.config.priorityFields,e),this.state.headers.forEach(function(e){t.mandatoryFieldsResolved.includes(e.field)&&(e.visible=!0)}),this.state.visibleColumns=this.getOrderedVisibleColumns()}},{key:"getOrderedVisibleColumns",value:function(){var t=this,e=this.state.headers.map(function(t,e){return{header:t,index:e}}).filter(function(t){return t.header.visible});if(!this.priorityFieldsResolved.length&&!e.some(function(e){return t.resolvePinnedSide(e.header)}))return e.map(function(t){return t.header});var n=new Map;return this.priorityFieldsResolved.forEach(function(t,e){n.set(t,e)}),u(e).sort(function(e,r){var i=t.resolvePinnedSide(e.header)||"",o=t.resolvePinnedSide(r.header)||"",a="left"===i?0:"right"===i?2:1,l="left"===o?0:"right"===o?2:1;if(a!==l)return a-l;var s=n.has(e.header.field)?n.get(e.header.field):Number.MAX_SAFE_INTEGER,u=n.has(r.header.field)?n.get(r.header.field):Number.MAX_SAFE_INTEGER;return s!==u?s-u:e.index-r.index}).map(function(t){return t.header})}},{key:"isMandatoryField",value:function(t){return this.mandatoryFieldsResolved.includes(t)}},{key:"resolvePinnedSide",value:function(t){var e;if(!t||"object"!==l(t))return null;var n=this.normalizePinnedSide(t.pinned);if(n)return n;var r=null===(e=this.config.columnMetadata)||void 0===e?void 0:e[t.field];return this.normalizePinnedSide(null==r?void 0:r.pinned)}},{key:"initPinnedColumns",value:function(){var t=this,e={left:[],right:[]};this.state.visibleColumns.forEach(function(n,r){var i=t.resolvePinnedSide(n);i&&e[i].push(r)}),this.pinnedColumns=e}},{key:"applyPinnedStyles",value:function(){var t,e=this,n=null===(t=this.element)||void 0===t?void 0:t.querySelector(".datatable-table");if(n){this.initPinnedColumns();var r=this.pinnedColumns.left.length>0||this.pinnedColumns.right.length>0;if(n.classList.toggle("datatable-has-pinned-columns",r),r){var i=0;this.pinnedColumns.left.forEach(function(t){var r=e.getColumnWidth(n,t);e.getColumnCells(n,t).forEach(function(t){t.classList.add("datatable-pinned-left"),t.style.left="".concat(i,"px")}),i+=r});var o=0;u(this.pinnedColumns.right).reverse().forEach(function(t){var r=e.getColumnWidth(n,t);e.getColumnCells(n,t).forEach(function(t){t.classList.add("datatable-pinned-right"),t.style.right="".concat(o,"px")}),o+=r})}}}},{key:"getColumnCells",value:function(t,e){return Array.from(t.querySelectorAll("tr > :nth-child(".concat(e+1,")")))}},{key:"getColumnWidth",value:function(t,e){var n,r,i=null===(n=this.thead)||void 0===n?void 0:n.querySelector("tr > :nth-child(".concat(e+1,")"));if(i)return i.getBoundingClientRect().width;var o=null===(r=this.tbody)||void 0===r?void 0:r.querySelector("tr > :nth-child(".concat(e+1,")"));if(o)return o.getBoundingClientRect().width;var a=t.querySelector("tr > :nth-child(".concat(e+1,")"));return a?a.getBoundingClientRect().width:0}},{key:"resolveHeaderByReference",value:function(t){return"number"==typeof t&&Number.isInteger(t)?this.state.headers[t]||null:"string"==typeof t&&this.state.headers.find(function(e){return e.field===t})||null}},{key:"pinColumn",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"left",n=this.resolveHeaderByReference(t),r=this.normalizePinnedSide(e);return!(!n||!r||(n.pinned=r,this.state.visibleColumns=this.getOrderedVisibleColumns(),this.bumpLocalRowsVersion(),this.updateView(),0))}},{key:"unpinColumn",value:function(t){var e=this.resolveHeaderByReference(t);return!!e&&(e.pinned=null,this.state.visibleColumns=this.getOrderedVisibleColumns(),this.bumpLocalRowsVersion(),this.updateView(),!0)}},{key:"getBindableState",value:function(){return{searchTerm:this.state.searchTerm||"",sortField:this.state.sortField||null,sortDir:this.state.sortDir||"asc",filters:m({},this.state.filters||{}),page:Number(this.state.page)||1,visibleColumns:this.state.headers.filter(function(t){return!1!==t.visible}).map(function(t){return t.field})}}},{key:"getStateSnapshot",value:function(){return this.getBindableState()}},{key:"shouldDispatchPprChange",value:function(t,e,n){return!!n||["searchTerm","sortField","sortDir","filters","page","visibleColumns"].includes(t)}},{key:"refreshPpr",value:function(){this.resetViewport(),this.remoteLoaded=!1,this.resolveConfiguredEndpoint()?this.loadData():(this.applyClientProcessing(),this.updateView())}},{key:"applyBindableState",value:function(t){var e=this;if(t&&"object"===l(t)){var n=!1;if("string"==typeof t.searchTerm&&t.searchTerm!==this.state.searchTerm){var r;this.state.searchTerm=t.searchTerm;var i=null===(r=this.element)||void 0===r?void 0:r.querySelector('[data-action="search"]');i&&"value"in i&&(i.value=t.searchTerm),n=!0}if(void 0!==t.sortField){var o=null==t.sortField?null:String(t.sortField);o!==this.state.sortField&&(this.state.sortField=o,n=!0)}if("string"==typeof t.sortDir){var a="desc"===t.sortDir.toLowerCase()?"desc":"asc";a!==this.state.sortDir&&(this.state.sortDir=a,n=!0)}if(t.filters&&"object"===l(t.filters)&&(this.state.filters=m({},t.filters),n=!0),Array.isArray(t.visibleColumns)&&this.state.headers.length){var s=new Set(t.visibleColumns.map(function(t){return String(t)}));this.state.headers.forEach(function(t){t.visible=!!e.isMandatoryField(t.field)||s.has(t.field)}),this.state.visibleColumns=this.getOrderedVisibleColumns(),n=!0}if(Number.isFinite(Number(t.page))){var u=Math.max(1,Number(t.page));u!==this.state.page&&(this.state.page=u,n=!0)}n&&(this.config.serverSide?this.loadData():(this.applyClientProcessing(),this.updateView()))}}}],c=[{key:"selector",get:function(){return"datatable"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"datatable"}},{key:"normalizeArgs",value:function(t,e){if(t instanceof Element)return{container:t,config:e||{},autoInit:!0};var n=t||{};return{container:n.container,parent:n.parent,textProvider:n.textProvider||null,config:n.config||{},autoInit:n.autoInit}}}],r&&b(n.prototype,r),c&&b(n,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,c,d,h,p,y,w,k,E,A,j,P,T,x,L,I,D}(r.Component);C(j,"templateId","datatable-template"),"undefined"!=typeof window&&(window.DataTable=j)},2704(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function a(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var a=r&&r.prototype instanceof u?r:u,c=Object.create(a.prototype);return l(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(l(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,l(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,l(h,"constructor",d),l(d,"constructor",c),c.displayName="GeneratorFunction",l(d,i,"GeneratorFunction"),l(h),l(h,i,"Generator"),l(h,r,function(){return this}),l(h,"toString",function(){return"[object Generator]"}),(a=function(){return{w:o,m:p}})()}function l(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}l=function(t,e,n,r){function o(e,n){l(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},l(t,e,n,r)}function s(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function u(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){s(o,r,i,a,l,"next",t)}function l(t){s(o,r,i,a,l,"throw",t)}a(void 0)})}}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,m(r.key),r)}}function d(t,e,n){return e=v(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,f()?Reflect.construct(e,n||[],v(t).constructor):e.apply(t,n))}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!t})()}function h(t,e,n,r){var i=p(v(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=v(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},p.apply(null,arguments)}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}function m(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{DialogComponent:()=>S});var b,g,w,S=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=d(this,e,[t,r])).templateId=e.templateId,n.id=n.container.getAttribute("id")||n.container.getAttribute("dialog-id")||"",n.size=n.resolveSize(n.container.getAttribute("size")||n.container.getAttribute("mode")||"medium"),n.titleText=n.container.getAttribute("title")||n.container.getAttribute("data-title")||"",n.footerMessage=n.container.getAttribute("footer-message")||n.container.getAttribute("data-footer-message")||"",n.closeOnBackdrop=!n.container.hasAttribute("no-backdrop-close"),n.returnValue="",n.isOpen=!1,n.useNative="undefined"!=typeof window&&void 0!==window.HTMLDialogElement&&!n.container.hasAttribute("no-native"),n.slotted=null,n.initialOpen=n.container.hasAttribute("open"),n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&y(t,e)}(e,t),n=e,r=[{key:"resolveSize",value:function(t){var e=String(t||"medium").trim().toLowerCase();return["mini","small","medium","large","mega"].includes(e)?e:"medium"}},{key:"captureSlottedContent",value:function(){var t=Array.from(this.container.children).filter(function(t){return!t.classList.contains("holi-dialog-root")}),e=t.find(function(t){return"header"===t.getAttribute("slot")})||null,n=t.find(function(t){return"footer"===t.getAttribute("slot")})||null,r=t.filter(function(t){var e=t.getAttribute("slot");return!e||"content"===e||"body"===e});this.slotted={header:e,footer:n,bodyNodes:r}}},{key:"init",value:(s=u(a().m(function t(){return a().w(function(t){for(;;)switch(t.n){case 0:return this.captureSlottedContent(),this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents(),this.initialOpen&&this.open();case 2:return t.a(2)}},t,this)})),function(){return s.apply(this,arguments)})},{key:"render",value:(l=u(a().m(function t(){var n,r,i,o,l,s,u,c,d,f,p;return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,h(e,"render",this,3)([]);case 1:this.root=this.container.querySelector(".holi-dialog-root"),this.nativeDialog=null===(n=this.root)||void 0===n?void 0:n.querySelector(".holi-dialog-native"),this.fallback=null===(r=this.root)||void 0===r?void 0:r.querySelector('[data-role="fallback"]'),this.overlay=null===(i=this.root)||void 0===i?void 0:i.querySelector(".holi-dialog-overlay"),this.nativeHeader=null===(o=this.root)||void 0===o?void 0:o.querySelector('[data-role="header"]'),this.nativeTitle=null===(l=this.root)||void 0===l?void 0:l.querySelector('[data-role="title"]'),this.nativeBody=null===(s=this.root)||void 0===s?void 0:s.querySelector('[data-role="body"]'),this.nativeFooter=null===(u=this.root)||void 0===u?void 0:u.querySelector('[data-role="footer"]'),this.fallbackHeader=null===(c=this.root)||void 0===c?void 0:c.querySelector('[data-role="fallback-header"]'),this.fallbackTitle=null===(d=this.root)||void 0===d?void 0:d.querySelector('[data-role="fallback-title"]'),this.fallbackBody=null===(f=this.root)||void 0===f?void 0:f.querySelector('[data-role="fallback-body"]'),this.fallbackFooter=null===(p=this.root)||void 0===p?void 0:p.querySelector('[data-role="fallback-footer"]'),this.nativeDialog&&(this.useNative?(this.nativeDialog.hidden=!1,this.nativeDialog.style.display=""):(this.nativeDialog.hidden=!0,this.nativeDialog.style.display="none",this.nativeDialog.removeAttribute("open"))),this.applyDialogContent(),this.applyLayoutState();case 2:return t.a(2)}},t,this)})),function(){return l.apply(this,arguments)})},{key:"applyDialogContent",value:function(){if(this.slotted){var t,e,n,r,o,a,l,s,u,c,d,f,h=this.slotted,p=h.header,v=h.footer,y=h.bodyNodes,m=!!this.useNative;m?(null===(t=this.nativeBody)||void 0===t||t.replaceChildren.apply(t,i(y)),null===(e=this.fallbackBody)||void 0===e||e.replaceChildren()):(null===(n=this.fallbackBody)||void 0===n||n.replaceChildren.apply(n,i(y)),null===(r=this.nativeBody)||void 0===r||r.replaceChildren()),p?m?(null===(o=this.nativeHeader)||void 0===o||o.replaceChildren(p),null===(a=this.fallbackHeader)||void 0===a||a.replaceChildren()):(null===(l=this.fallbackHeader)||void 0===l||l.replaceChildren(p),null===(s=this.nativeHeader)||void 0===s||s.replaceChildren()):(this.nativeTitle&&(this.nativeTitle.textContent=this.titleText),this.fallbackTitle&&(this.fallbackTitle.textContent=this.titleText)),v?m?(null===(u=this.nativeFooter)||void 0===u||u.replaceChildren(v),null===(c=this.fallbackFooter)||void 0===c||c.replaceChildren()):(null===(d=this.fallbackFooter)||void 0===d||d.replaceChildren(v),null===(f=this.nativeFooter)||void 0===f||f.replaceChildren()):this.footerMessage&&(this.nativeFooter&&(this.nativeFooter.textContent=this.footerMessage),this.fallbackFooter&&(this.fallbackFooter.textContent=this.footerMessage));var b=!!p||!!this.titleText,g=!!v||!!this.footerMessage;this.nativeHeader&&(this.nativeHeader.hidden=!b),this.fallbackHeader&&(this.fallbackHeader.hidden=!b),this.nativeFooter&&(this.nativeFooter.hidden=!g),this.fallbackFooter&&(this.fallbackFooter.hidden=!g)}}},{key:"applyLayoutState",value:function(){this.root&&(this.root.setAttribute("data-size",this.size),this.root.setAttribute("data-state",this.isOpen?"open":"closed"),this.nativeDialog&&this.nativeDialog.setAttribute("data-size",this.size))}},{key:"bindEvents",value:function(){var t,e,n,r,i,o=this,a=function(t){var e,n=null===(e=t.target)||void 0===e||null===(e=e.dataset)||void 0===e?void 0:e.action;if("close"!==n)"backdrop"===n&&o.closeOnBackdrop&&o.close("backdrop");else{var r=t.target.getAttribute("data-value")||"";o.close(r)}};null===(t=this.root)||void 0===t||t.addEventListener("click",a),null===(e=this.nativeDialog)||void 0===e||e.addEventListener("click",a),null===(n=this.fallback)||void 0===n||n.addEventListener("click",a),null===(r=this.nativeDialog)||void 0===r||r.addEventListener("cancel",function(t){t.preventDefault(),o.close("cancel")}),null===(i=this.nativeDialog)||void 0===i||i.addEventListener("close",function(){o.onClosed()}),this.id&&"undefined"!=typeof document&&document.addEventListener("click",function(t){var e,n,r,i;(null===(e=t.target)||void 0===e||null===(n=e.closest)||void 0===n?void 0:n.call(e,'[data-dialog-open="'.concat(o.id,'"]')))?o.open():(null===(r=t.target)||void 0===r||null===(i=r.closest)||void 0===i?void 0:i.call(r,'[data-dialog-close="'.concat(o.id,'"]')))&&o.close("trigger")})}},{key:"open",value:function(){var t;this.isOpen||(this.isOpen=!0,this.applyLayoutState(),this.useNative&&null!==(t=this.nativeDialog)&&void 0!==t&&t.showModal?(this.fallback.hidden=!0,this.nativeDialog.open||this.nativeDialog.showModal()):this.fallback&&(this.fallback.hidden=!1),this.dispatchEvent("dialogopen",{size:this.size}))}},{key:"close",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.returnValue=e,this.isOpen&&(this.isOpen=!1,this.applyLayoutState(),this.useNative&&null!==(t=this.nativeDialog)&&void 0!==t&&t.open?this.nativeDialog.close(e):this.onClosed())}},{key:"onClosed",value:function(){this.fallback&&(this.fallback.hidden=!0),this.applyLayoutState(),this.dispatchEvent("dialogclose",{size:this.size,returnValue:this.returnValue})}},{key:"toggle",value:function(){this.isOpen?this.close("toggle"):this.open()}},{key:"setSize",value:function(t){this.size=this.resolveSize(t),this.applyLayoutState()}}],o=[{key:"selector",get:function(){return"dialog"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"dialog"}}],r&&c(n.prototype,r),o&&c(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,l,s}(n(8812).Component);b=S,w="dialog-template",(g=m(g="templateId"))in b?Object.defineProperty(b,g,{value:w,enumerable:!0,configurable:!0,writable:!0}):b[g]=w,"undefined"!=typeof window&&(window.DialogComponent=S)},145(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function o(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function l(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return a(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(a(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,a(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,a(h,"constructor",d),a(d,"constructor",c),c.displayName="GeneratorFunction",a(d,i,"GeneratorFunction"),a(h),a(h,i,"Generator"),a(h,r,function(){return this}),a(h,"toString",function(){return"[object Generator]"}),(o=function(){return{w:l,m:p}})()}function a(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}a=function(t,e,n,r){function o(e,n){a(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},a(t,e,n,r)}function l(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function s(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){l(o,r,i,a,s,"next",t)}function s(t){l(o,r,i,a,s,"throw",t)}a(void 0)})}}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,m(r.key),r)}}function c(t,e,n){return e=p(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,d()?Reflect.construct(e,n||[],p(t).constructor):e.apply(t,n))}function d(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(d=function(){return!!t})()}function f(t,e,n,r){var i=h(p(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function h(){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},h.apply(null,arguments)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}function y(t,e,n){return(e=m(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function m(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{DrawerComponent:()=>b});var b=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=c(this,e,[t,r])).templateId=e.templateId,n.drawerId=n.ensureDrawerId(),n.panelId=n.ensurePanelId(),n.direction=n.resolveDirection(n.container.getAttribute("direction")||n.container.getAttribute("position")||"left"),n.breakpoint=n.parseNumber(n.container.getAttribute("breakpoint"),768),n.maxSize=n.container.getAttribute("max-size")||n.defaultMaxSize(n.direction),n.maxHeight=n.container.getAttribute("max-height")||"90vh",n.showEdgeTrigger=!n.container.hasAttribute("no-edge-trigger"),n.railName=(n.container.getAttribute("rail")||"").trim(),n.triggerLabel=n.container.getAttribute("trigger-label")||n.drawerId||"Open",n.triggerIcon=n.container.getAttribute("trigger-icon")||"",n.backdropEnabled=!n.container.hasAttribute("no-backdrop"),n.closeOnOverlay=!n.container.hasAttribute("no-overlay-close"),n.closeOnEscape=!n.container.hasAttribute("no-escape-close"),n.initialOpen=n.container.hasAttribute("open"),n.isOpen=!1,n.isDesktop=!1,n.mediaQueryList=null,n.mediaQueryHandler=null,n.edgeTrigger=null,n.railElement=null,n.ownsRail=!1,n.previousFocusedElement=null,n.lastTriggerElement=null,n.documentKeydownHandler=null,n.slotted=null,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&v(t,e)}(e,t),n=e,r=[{key:"ensureDrawerId",value:function(){var t=this.container.getAttribute("id")||this.container.getAttribute("drawer-id");if(t)return t;e.idCounter+=1;var n="drawer-".concat(e.idCounter);return this.container.setAttribute("id",n),n}},{key:"ensurePanelId",value:function(){return this.container.getAttribute("panel-id")||(e.panelCounter+=1,"drawer-panel-".concat(e.panelCounter))}},{key:"parseNumber",value:function(t,e){var n=Number(t);return Number.isFinite(n)?n:e}},{key:"resolveDirection",value:function(t){var e=String(t||"left").trim().toLowerCase();return["left","right","top","bottom","center"].includes(e)?e:"left"}},{key:"defaultMaxSize",value:function(t){return"center"===t?"760px":"left"===t||"right"===t?"380px":"42vh"}},{key:"captureSlottedContent",value:function(){var t=Array.from(this.container.children).filter(function(t){return!t.classList.contains("holi-drawer-root")}),e=t.find(function(t){return"header"===t.getAttribute("slot")})||null,n=t.find(function(t){return"footer"===t.getAttribute("slot")})||null,r=t.filter(function(t){var e=t.getAttribute("slot");return!e||"content"===e||"body"===e});this.slotted={header:e,footer:n,bodyNodes:r}}},{key:"init",value:(d=s(o().m(function t(){return o().w(function(t){for(;;)switch(t.n){case 0:return this.captureSlottedContent(),this.validateStructure(),t.n=1,this.render();case 1:this.setupResponsive(),this.bindEvents(),this.initialOpen?this.open():this.close("initial");case 2:return t.a(2)}},t,this)})),function(){return d.apply(this,arguments)})},{key:"render",value:(l=s(o().m(function t(){var n,r,i;return o().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,f(e,"render",this,3)([]);case 1:this.root=this.container.querySelector(".holi-drawer-root"),this.overlay=this.container.querySelector('[data-role="overlay"]'),this.panel=this.container.querySelector('[data-role="panel"]'),this.header=this.container.querySelector('[data-role="header"]'),this.footer=this.container.querySelector('[data-role="footer"]'),this.body=this.container.querySelector('[data-role="body"]'),this.edgeTrigger=this.container.querySelector('[data-role="edge-trigger"]'),null===(n=this.root)||void 0===n||n.setAttribute("data-direction",this.direction),null===(r=this.root)||void 0===r||r.style.setProperty("--drawer-max-size",this.maxSize),null===(i=this.root)||void 0===i||i.style.setProperty("--drawer-max-height",this.maxHeight),this.panel&&(this.panel.id=this.panelId,this.panel.setAttribute("role","center"===this.direction?"dialog":"complementary"),this.panel.setAttribute("aria-hidden","true"),this.panel.setAttribute("tabindex","-1")),this.setupEdgeTrigger(),this.decorateExternalTriggers(),this.applySlotContent(),this.applyState();case 2:return t.a(2)}},t,this)})),function(){return l.apply(this,arguments)})},{key:"setupEdgeTrigger",value:function(){if(this.edgeTrigger&&this.root){if(!this.showEdgeTrigger)return this.edgeTrigger.remove(),void(this.edgeTrigger=null);var t=[this.triggerIcon,this.triggerLabel].filter(Boolean);if(this.edgeTrigger.textContent=t.join(" ").trim(),this.edgeTrigger.setAttribute("aria-label",this.triggerLabel),this.edgeTrigger.setAttribute("aria-controls",this.panelId),this.edgeTrigger.setAttribute("aria-expanded","false"),this.edgeTrigger.setAttribute("data-drawer-toggle",this.drawerId),this.railName){var n="".concat(this.direction,":").concat(this.railName),r=e.rails.get(n);r||"undefined"==typeof document||((r=document.createElement("nav")).className="holi-drawer-rail",r.setAttribute("data-rail",this.railName),r.setAttribute("data-direction",this.direction),document.body.appendChild(r),e.rails.set(n,r),this.ownsRail=!0),this.railElement=r||null,this.railElement&&(this.edgeTrigger.setAttribute("data-in-rail","true"),this.railElement.appendChild(this.edgeTrigger))}}}},{key:"decorateExternalTriggers",value:function(){var t=this;"undefined"!=typeof document&&['[data-drawer-open="'.concat(this.drawerId,'"]'),'[data-drawer-toggle="'.concat(this.drawerId,'"]'),'[data-drawer-close="'.concat(this.drawerId,'"]')].forEach(function(e){document.querySelectorAll(e).forEach(function(e){e.setAttribute("aria-controls",t.panelId),e.matches("[data-drawer-open], [data-drawer-toggle]")&&e.setAttribute("aria-expanded",t.isOpen?"true":"false")})})}},{key:"applySlotContent",value:function(){if(this.slotted){var t,e=this.slotted,n=e.header,r=e.footer,o=e.bodyNodes;this.body&&(t=this.body).replaceChildren.apply(t,function(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(o)),n&&this.header?(this.header.replaceChildren(n),this.header.hidden=!1):this.header&&(this.header.hidden=!0),r&&this.footer?(this.footer.replaceChildren(r),this.footer.hidden=!1):this.footer&&(this.footer.hidden=!0)}}},{key:"setupResponsive",value:function(){var t=this;if("undefined"!=typeof window){var e=window.matchMedia("(min-width: ".concat(this.breakpoint,"px)"));this.mediaQueryList=e,this.isDesktop=e.matches,this.mediaQueryHandler=function(e){t.isDesktop=e.matches,t.applyState()},"function"==typeof e.addEventListener?e.addEventListener("change",this.mediaQueryHandler):"function"==typeof e.addListener&&e.addListener(this.mediaQueryHandler)}}},{key:"bindEvents",value:function(){var t=this;this.container.addEventListener("click",function(e){var n,r=null===(n=e.target)||void 0===n||null===(n=n.dataset)||void 0===n?void 0:n.action;r&&("close"!==r?"backdrop"===r&&t.closeOnOverlay&&t.close("overlay"):t.close("button"))}),this.drawerId&&"undefined"!=typeof document&&document.addEventListener("click",function(e){var n,r,i,o,a,l,s=null===(n=e.target)||void 0===n||null===(r=n.closest)||void 0===r?void 0:r.call(n,'[data-drawer-open="'.concat(t.drawerId,'"]'));if(s)return e.preventDefault(),t.lastTriggerElement=s,void t.open();var u=null===(i=e.target)||void 0===i||null===(o=i.closest)||void 0===o?void 0:o.call(i,'[data-drawer-toggle="'.concat(t.drawerId,'"]'));if(u)return e.preventDefault(),t.lastTriggerElement=u,void t.toggle();var c=null===(a=e.target)||void 0===a||null===(l=a.closest)||void 0===l?void 0:l.call(a,'[data-drawer-close="'.concat(t.drawerId,'"]'));c&&(e.preventDefault(),t.lastTriggerElement=c,t.close("trigger"))}),this.closeOnEscape&&"undefined"!=typeof document&&document.addEventListener("keydown",function(e){"Escape"===e.key&&t.isOpen&&t.close("escape")}),"undefined"!=typeof document&&(this.documentKeydownHandler=function(n){t.isOpen&&e.activeInstance===t&&"Tab"===n.key&&t.trapFocus(n)},document.addEventListener("keydown",this.documentKeydownHandler))}},{key:"open",value:function(){e.activeInstance&&e.activeInstance!==this&&e.activeInstance.close("switch"),"undefined"!=typeof document&&document.activeElement instanceof HTMLElement&&(this.previousFocusedElement=document.activeElement);var t=!this.isOpen;this.setOpen(!0),e.activeInstance=this,this.focusFirstElement(),t&&this.dispatchEvent("draweropen",{id:this.drawerId,direction:this.direction})}},{key:"close",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"manual",n=this.isOpen;this.setOpen(!1),e.activeInstance===this&&(e.activeInstance=null),this.restoreFocus(t),n&&this.dispatchEvent("drawerclose",{id:this.drawerId,direction:this.direction,reason:t})}},{key:"toggle",value:function(){this.isOpen?this.close("toggle"):this.open()}},{key:"setDirection",value:function(t){var e;this.direction=this.resolveDirection(t),null===(e=this.root)||void 0===e||e.setAttribute("data-direction",this.direction)}},{key:"setMaxSize",value:function(t){var e;this.maxSize=t||this.defaultMaxSize(this.direction),null===(e=this.root)||void 0===e||e.style.setProperty("--drawer-max-size",this.maxSize)}},{key:"setOpen",value:function(t){this.isOpen=!!t,this.container.toggleAttribute("open",this.isOpen),this.edgeTrigger&&this.edgeTrigger.setAttribute("aria-expanded",this.isOpen?"true":"false"),this.updateTriggerAriaExpanded(),this.applyState()}},{key:"updateTriggerAriaExpanded",value:function(){var t=this;"undefined"!=typeof document&&['[data-drawer-open="'.concat(this.drawerId,'"]'),'[data-drawer-toggle="'.concat(this.drawerId,'"]')].forEach(function(e){document.querySelectorAll(e).forEach(function(e){e.setAttribute("aria-expanded",t.isOpen?"true":"false")})})}},{key:"applyState",value:function(){if(this.root&&this.panel){this.root.setAttribute("data-state",this.isOpen?"open":"closed"),this.root.setAttribute("data-desktop",this.isDesktop?"true":"false");var t=this.backdropEnabled&&this.isOpen&&(!this.isDesktop||"center"===this.direction);this.overlay&&(this.overlay.hidden=!t,this.overlay.setAttribute("aria-hidden",t?"false":"true")),this.panel&&(this.panel.setAttribute("aria-hidden",this.isOpen?"false":"true"),this.panel.setAttribute("aria-modal",this.isOpen&&t?"true":"false")),"undefined"!=typeof document&&(t?document.body.classList.add("holi-drawer-lock"):document.body.classList.remove("holi-drawer-lock")),this.applyInlinePanelState()}}},{key:"applyInlinePanelState",value:function(){if(this.panel){if(this.panel.style.transition="transform 220ms ease, opacity 220ms ease, border-radius 220ms ease","center"===this.direction)return this.panel.style.width="fit-content",this.panel.style.maxWidth="min(".concat(this.maxSize,", 92vw)"),this.panel.style.height="auto",this.panel.style.maxHeight=this.maxHeight,this.panel.style.transformOrigin="center center",this.panel.style.borderRadius=this.isOpen?"12px":"999px",this.panel.style.opacity=this.isOpen?"1":"0.25",void(this.panel.style.transform=this.isOpen?"translate(-50%, -50%) scale(1)":"translate(-50%, -50%) scale(0.02)");"left"===this.direction||"right"===this.direction?(this.panel.style.width="min(".concat(this.maxSize,", 92vw)"),this.panel.style.height="100dvh"):(this.panel.style.width="100vw",this.panel.style.height="min(".concat(this.maxSize,", 92vh)")),this.panel.style.maxHeight="",this.panel.style.transformOrigin="",this.panel.style.borderRadius="",this.panel.style.opacity="",this.isOpen?this.panel.style.transform="translate(0, 0)":"left"!==this.direction?"right"!==this.direction?"top"!==this.direction?this.panel.style.transform="translateY(100%)":this.panel.style.transform="translateY(-100%)":this.panel.style.transform="translateX(100%)":this.panel.style.transform="translateX(-100%)"}}},{key:"getFocusableElements",value:function(){if(!this.panel)return[];var t=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(this.panel.querySelectorAll(t)).filter(function(t){return!t.hasAttribute("hidden")&&"true"!==t.getAttribute("aria-hidden")})}},{key:"focusFirstElement",value:function(){var t=this;this.panel&&requestAnimationFrame(function(){var e;if(t.isOpen){var n=t.getFocusableElements()[0]||t.panel;null===(e=n.focus)||void 0===e||e.call(n)}})}},{key:"trapFocus",value:function(t){if(this.panel){var e=this.getFocusableElements();if(!e.length)return t.preventDefault(),void this.panel.focus();var n=e[0],r=e[e.length-1],i=document.activeElement;if(!t.shiftKey&&i===r)return t.preventDefault(),void n.focus();!t.shiftKey||i!==n&&i!==this.panel||(t.preventDefault(),r.focus())}}},{key:"restoreFocus",value:function(t){if("switch"!==t){var e=this.lastTriggerElement&&this.lastTriggerElement.isConnected?this.lastTriggerElement:this.previousFocusedElement;e&&e.isConnected&&"function"==typeof e.focus?e.focus():this.edgeTrigger&&"function"==typeof this.edgeTrigger.focus&&this.edgeTrigger.focus()}}},{key:"destroy",value:function(){if(e.activeInstance===this&&(e.activeInstance=null),this.edgeTrigger&&this.edgeTrigger.parentNode&&this.edgeTrigger.remove(),this.railElement&&this.ownsRail&&0===this.railElement.childElementCount){var t="".concat(this.direction,":").concat(this.railName);this.railElement.remove(),e.rails.delete(t)}this.mediaQueryList&&this.mediaQueryHandler&&("function"==typeof this.mediaQueryList.removeEventListener?this.mediaQueryList.removeEventListener("change",this.mediaQueryHandler):"function"==typeof this.mediaQueryList.removeListener&&this.mediaQueryList.removeListener(this.mediaQueryHandler)),this.documentKeydownHandler&&"undefined"!=typeof document&&(document.removeEventListener("keydown",this.documentKeydownHandler),this.documentKeydownHandler=null),f(e,"destroy",this,3)([])}}],a=[{key:"selector",get:function(){return"drawer"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"drawer"}}],r&&u(n.prototype,r),a&&u(n,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,a,l,d}(n(8812).Component);y(b,"activeInstance",null),y(b,"rails",new Map),y(b,"idCounter",0),y(b,"panelCounter",0),y(b,"templateId","drawer-template"),"undefined"!=typeof window&&(window.DrawerComponent=b)},1257(t,e,n){"use strict";n.r(e),n.d(e,{DropdownComponent:()=>j});var r=n(8812),i=n(9062),o=n(3076),a=n(853);function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){u=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(t,e)||u(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||u(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){if(t){if("string"==typeof t)return c(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function d(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return f(u,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),u}var a={};function l(){}function s(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(f(e={},r,function(){return this}),e),h=u.prototype=l.prototype=Object.create(c);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,f(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return s.prototype=u,f(h,"constructor",u),f(u,"constructor",s),s.displayName="GeneratorFunction",f(u,i,"GeneratorFunction"),f(h),f(h,i,"Generator"),f(h,r,function(){return this}),f(h,"toString",function(){return"[object Generator]"}),(d=function(){return{w:o,m:p}})()}function f(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}f=function(t,e,n,r){function o(e,n){f(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},f(t,e,n,r)}function h(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function p(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){h(o,r,i,a,l,"next",t)}function l(t){h(o,r,i,a,l,"throw",t)}a(void 0)})}}function v(t){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v(t)}function y(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,E(r.key),r)}}function m(t,e,n){return e=S(e),function(t,e){if(e&&("object"==v(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,b()?Reflect.construct(e,n||[],S(t).constructor):e.apply(t,n))}function b(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(b=function(){return!!t})()}function g(t,e,n,r){var i=w(S(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function w(){return w="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=S(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},w.apply(null,arguments)}function S(t){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},S(t)}function k(t,e){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},k(t,e)}function E(t){var e=function(t){if("object"!=v(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=v(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==v(e)?e:e+""}var O,C,A,j=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=m(this,e,[t,r])).templateId=n.constructor.templateId||e.templateId,n.config={endpoint:n.container.getAttribute("data-source")||n.container.getAttribute("data-endpoint")||n.container.getAttribute("endpoint")||"",valueField:n.container.getAttribute("data-value-field")||"value",labelField:n.container.getAttribute("data-label-field")||"label",pageSize:Math.max(1,Number(n.container.getAttribute("data-page-size"))||30),minQueryLength:Math.max(0,Number(n.container.getAttribute("data-min-query"))||0),debounceMs:Math.max(0,Number(n.container.getAttribute("data-debounce-ms"))||200),loaderMinMs:Math.max(0,Number(n.container.getAttribute("data-loader-min-ms"))||180),autoSuggest:n.readBooleanAttr("data-auto-suggest",!0),placeholder:n.container.getAttribute("placeholder")||n.container.getAttribute("data-placeholder")||"Select...",noCache:n.readBooleanAttr("no-cache",!1),localItems:n.parseItemsAttr("data-items"),localFilterMap:n.parseObjectAttr("data-local-filter-map"),requestParams:n.parseObjectAttr("data-request-params"),clearOnPpr:n.readBooleanAttr("data-ppr-clear",!0),autoLoadOnPpr:n.readBooleanAttr("data-ppr-autoload",!0)},n.state={open:!1,loading:!1,query:"",page:1,hasMore:!1,activeIndex:-1,selected:null,items:[],allLocalItems:[],filteredLocalItems:[]},n.remoteCache=new Map,n.remoteRequestSeq=0,n.fetchTimer=null,n.boundOutsideClick=function(t){return n.handleOutsideClick(t)},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&k(t,e)}(e,t),n=e,r=[{key:"readBooleanAttr",value:function(t,e){if(!this.container.hasAttribute(t))return e;var n=String(this.container.getAttribute(t)||"").trim().toLowerCase();return!n||"false"!==n&&"0"!==n&&"no"!==n}},{key:"parseItemsAttr",value:function(t){var e=String(this.container.getAttribute(t)||"").trim();if(!e)return[];try{var n=JSON.parse(e);return Array.isArray(n)?n:[]}catch(t){return[]}}},{key:"parseObjectAttr",value:function(t){var e=String(this.container.getAttribute(t)||"").trim();if(!e)return{};try{var n=JSON.parse(e);return n&&"object"===v(n)&&!Array.isArray(n)?n:{}}catch(t){return{}}}},{key:"validateStructure",value:function(){if(g(e,"validateStructure",this,3)([]),!this.container)throw new Error("Dropdown requires a container")}},{key:"init",value:(b=p(d().m(function t(){return d().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return b.apply(this,arguments)})},{key:"render",value:(h=p(d().m(function t(){var n;return d().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,g(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-dropdown"),this.input=this.container.querySelector('[data-role="input"]'),this.valueInput=this.container.querySelector('[data-role="value"]'),this.list=this.container.querySelector('[data-role="list"]'),this.panel=this.container.querySelector('[data-role="panel"]'),this.loadingEl=this.container.querySelector('[data-role="loading"]'),this.emptyEl=this.container.querySelector('[data-role="empty"]'),this.toggleButton=this.container.querySelector('[data-action="toggle"]'),this.loaderState=(0,i.w)(this,{host:this.panel||this.element,busyTarget:this.panel||this.element,scope:"block",defaultMessage:"Loading options..."}),this.stateBinding=(0,o.x)(this,{defaultPath:"dropdown",eventName:"dropdownselect",getSnapshot:function(t){return t.getBindableState()},applySnapshot:function(t,e){return t.applyBindableState(e)}}),this.input.placeholder=this.config.placeholder,this.state.allLocalItems=this.normalizeItems(this.collectLocalItems()),this.state.filteredLocalItems=s(this.state.allLocalItems),this.state.items=s(this.state.filteredLocalItems),this.state.activeIndex=this.state.items.length?0:-1,this.state.hasMore=!1,this.renderItems(),(n=this.container.getAttribute("value")||this.container.getAttribute("data-value"))&&(this.value=n),this.bindEvents();case 2:return t.a(2)}},t,this)})),function(){return h.apply(this,arguments)})},{key:"collectLocalItems",value:function(){var t=Array.from(this.container.querySelectorAll("option")).map(function(t){return{value:t.value,label:t.textContent||t.value}});return t.length?t:this.config.localItems||[]}},{key:"normalizeItems",value:function(t){var e=this;return(t||[]).map(function(t){if(t&&"object"===v(t)){var n,r,i,o,a,l,s,u=null!==(n=null!==(r=null!==(i=null!==(o=t[e.config.valueField])&&void 0!==o?o:t.value)&&void 0!==i?i:t.id)&&void 0!==r?r:t.code)&&void 0!==n?n:"",c=null!==(a=null!==(l=null!==(s=t[e.config.labelField])&&void 0!==s?s:t.label)&&void 0!==l?l:t.name)&&void 0!==a?a:String(u||"");return{value:null==u?"":String(u),label:null==c?"":String(c),item:t}}return{value:String(null!=t?t:""),label:String(null!=t?t:""),item:t}})}},{key:"bindEvents",value:function(){var t,e,n,r=this;this.input.addEventListener("focus",function(){r.open(),r.config.endpoint&&!r.config.autoSuggest&&r.loadRemotePage(1,!1)}),this.input.addEventListener("input",function(){var t=String(r.input.value||"").trim();r.state.query=t,r.open(),r.config.endpoint?r.debounceRemoteQuery():r.applyLocalFilter()}),this.input.addEventListener("keydown",function(t){r.handleKeydown(t)}),null===(t=this.toggleButton)||void 0===t||t.addEventListener("click",function(){r.state.open?r.close():(r.open(),r.config.endpoint&&r.loadRemotePage(1,!1))}),null===(e=this.list)||void 0===e||e.addEventListener("click",function(t){var e,n,i=null===(e=t.target)||void 0===e||null===(n=e.closest)||void 0===n?void 0:n.call(e,'[data-role="item"]');if(i){var o=Number(i.getAttribute("data-index"));Number.isNaN(o)||o<0||o>=r.state.items.length||r.selectItem(r.state.items[o])}}),null===(n=this.panel)||void 0===n||n.addEventListener("scroll",function(){r.handleScrollLoad()}),document.addEventListener("click",this.boundOutsideClick)}},{key:"handleOutsideClick",value:function(t){this.container.contains(t.target)||this.close()}},{key:"debounceRemoteQuery",value:function(){var t=this;this.fetchTimer&&clearTimeout(this.fetchTimer),this.fetchTimer=setTimeout(function(){t.loadRemotePage(1,!1)},this.config.debounceMs)}},{key:"applyLocalFilter",value:function(){var t=this.resolveLocalFilterCriteria();t&&0===Object.keys(t).length?this.state.filteredLocalItems=[]:this.state.filteredLocalItems=t?this.state.allLocalItems.filter(function(e){return Object.entries(t).every(function(t){var n,r=l(t,2),i=r[0],o=r[1],a=null==e||null===(n=e.item)||void 0===n?void 0:n[i];return String(null!=a?a:"")===String(o)})}):s(this.state.allLocalItems);var e=String(this.state.query||"").trim().toLowerCase();e&&(this.state.filteredLocalItems=this.state.allLocalItems.filter(function(n){return!(!n.label.toLowerCase().includes(e)&&!n.value.toLowerCase().includes(e))&&(!t||0!==Object.keys(t).length&&Object.entries(t).every(function(t){var e,r=l(t,2),i=r[0],o=r[1],a=null==n||null===(e=n.item)||void 0===e?void 0:e[i];return String(null!=a?a:"")===String(o)}))})),this.state.items=s(this.state.filteredLocalItems),this.state.hasMore=!1,this.renderItems()}},{key:"resolveLocalFilterCriteria",value:function(){var t=Object.entries(this.config.localFilterMap||{});if(!t.length)return null;for(var e={},n=0;n<t.length;n+=1){var r=l(t[n],2),i=r[0],o=r[1];if(i){var a=String(o||"").trim();if(a){var s=this.extractExpression(a),u=this.evaluateExpression(s,this.getBindingContext());if(null==u||""===u)return{};e[i]=u}}}return Object.keys(e).length?e:null}},{key:"loadRemotePage",value:(f=p(d().m(function t(){var e,n,r,i,o,a,l,s,u,c,f,h,p=arguments;return d().w(function(t){for(;;)switch(t.p=t.n){case 0:if(e=p.length>0&&void 0!==p[0]?p[0]:1,n=p.length>1&&void 0!==p[1]&&p[1],this.config.endpoint){t.n=1;break}return t.a(2);case 1:if(!((r=String(this.state.query||"").trim()).length>0&&r.length<this.config.minQueryLength)){t.n=2;break}return t.a(2);case 2:if(i=++this.remoteRequestSeq,o=Date.now(),a="".concat(r,"|").concat(e,"|").concat(this.config.pageSize),this.config.noCache||!this.remoteCache.has(a)){t.n=3;break}return l=this.remoteCache.get(a),this.applyRemotePayload(l,n,e),t.a(2);case 3:return this.setLoading(!0),t.p=4,s=this.buildRemoteUrl(e,r),t.n=5,fetch(s,{credentials:"same-origin"});case 5:if((u=t.v).ok){t.n=6;break}throw new Error("HTTP ".concat(u.status));case 6:return t.n=7,u.json();case 7:if(c=t.v,this.config.noCache||this.remoteCache.set(a,c),i===this.remoteRequestSeq){t.n=8;break}return t.a(2);case 8:this.applyRemotePayload(c,n,e),t.n=11;break;case 9:if(t.p=9,t.v,i===this.remoteRequestSeq){t.n=10;break}return t.a(2);case 10:n||(this.state.items=[],this.state.hasMore=!1,this.renderItems());case 11:if(t.p=11,i===this.remoteRequestSeq){t.n=12;break}return t.a(2);case 12:if(f=Date.now()-o,!((h=this.config.loaderMinMs-f)>0)){t.n=13;break}return t.n=13,new Promise(function(t){return setTimeout(t,h)});case 13:return this.setLoading(!1),t.f(11);case 14:return t.a(2)}},t,this,[[4,9,11,14]])})),function(){return f.apply(this,arguments)})},{key:"buildRemoteUrl",value:function(t,e){var n=this.config.endpoint.includes("?"),r=new URLSearchParams({page:String(t),limit:String(this.config.pageSize),q:e}),i=this.resolveRequestParams();return Object.entries(i).forEach(function(t){var e=l(t,2),n=e[0],i=e[1];null!=i&&""!==i&&r.set(n,String(i))}),"".concat(this.config.endpoint).concat(n?"&":"?").concat(r.toString())}},{key:"resolveRequestParams",value:function(){var t=this,e=Object.entries(this.config.requestParams||{});if(!e.length)return{};var n={};return e.forEach(function(e){var r=l(e,2),i=r[0],o=r[1];if(i){var a=String(o||"").trim();if(a){var s=t.extractExpression(a),u=t.evaluateExpression(s,t.getBindingContext());null!=u&&""!==u&&(n[i]=u)}}}),n}},{key:"applyRemotePayload",value:function(t,e,n){var r=Array.isArray(null==t?void 0:t.rows)?t.rows:Array.isArray(null==t?void 0:t.items)?t.items:Array.isArray(null==t?void 0:t.data)?t.data:[],i=this.filterNormalizedItems(this.normalizeItems(r),this.state.query);this.state.page=n,this.state.hasMore=this.resolveHasMore(t,r.length,n),this.state.items=e?[].concat(s(this.state.items),s(i)):i,e?this.state.activeIndex<0&&this.state.items.length&&(this.state.activeIndex=0):this.state.activeIndex=this.state.items.length?0:-1,this.renderItems()}},{key:"resolveHasMore",value:function(t,e,n){if("boolean"==typeof(null==t?void 0:t.hasMore))return t.hasMore;var r=Number((null==t?void 0:t.totalPages)||0);if(r>0)return n<r;var i=Number((null==t?void 0:t.totalCount)||0);return i>0?n*this.config.pageSize<i:e>=this.config.pageSize}},{key:"filterNormalizedItems",value:function(t,e){var n=String(e||"").trim().toLowerCase();return n?t.filter(function(t){var e=String((null==t?void 0:t.label)||"").toLowerCase(),r=String((null==t?void 0:t.value)||"").toLowerCase();return e.includes(n)||r.includes(n)}):t}},{key:"handleScrollLoad",value:(c=p(d().m(function t(){return d().w(function(t){for(;;)switch(t.n){case 0:if(this.state.open&&this.state.hasMore&&!this.state.loading&&this.panel){t.n=1;break}return t.a(2);case 1:if(this.panel.scrollTop+this.panel.clientHeight>=this.panel.scrollHeight-32){t.n=2;break}return t.a(2);case 2:return t.n=3,this.loadRemotePage(this.state.page+1,!0);case 3:return t.a(2)}},t,this)})),function(){return c.apply(this,arguments)})},{key:"setLoading",value:function(t){var e,n;this.state.loading=!!t,this.loadingEl&&(this.loadingEl.hidden=!t),null===(e=this.loaderState)||void 0===e||null===(n=e.setLoading)||void 0===n||n.call(e,this.state.loading,"Loading options...")}},{key:"renderItems",value:function(){var t,e=this;if(this.list){this.list.replaceChildren();var n,r=this.list.id||"".concat(this.constructor.componentName||"dropdown","-").concat(Math.random().toString(16).slice(2));this.list.id=r,null===(t=this.input)||void 0===t||t.setAttribute("aria-controls",r),this.state.items.forEach(function(t,n){var i,o=document.createElement("li"),a="".concat(r,"-item-").concat(n);o.id=a,o.setAttribute("data-role","item"),o.setAttribute("data-index",String(n)),o.setAttribute("role","option"),o.setAttribute("data-value",t.value),o.setAttribute("aria-selected",e.state.activeIndex===n?"true":"false"),o.textContent=t.label,e.state.activeIndex===n&&(o.classList.add("is-active"),null===(i=e.input)||void 0===i||i.setAttribute("aria-activedescendant",a)),e.list.appendChild(o)}),0===this.state.items.length?(this.state.activeIndex=-1,null===(n=this.input)||void 0===n||n.removeAttribute("aria-activedescendant")):this.state.activeIndex>=this.state.items.length&&(this.state.activeIndex=this.state.items.length-1,this.updateActiveItem(!0)),this.emptyEl&&(this.emptyEl.hidden=this.state.items.length>0||this.state.loading)}}},{key:"selectItem",value:function(t){this.input&&(this.input.value=t.label),this.valueInput&&(this.valueInput.value=t.value),this.state.selected=t,this.dispatchEvent("dropdownselect",{label:t.label,value:t.value,item:t.item||null}),this.close()}},{key:"open",value:function(){this.state.open=!0,this.panel&&(this.panel.hidden=!1),this.input&&this.input.setAttribute("aria-expanded","true"),this.state.activeIndex<0&&this.state.items.length>0&&(this.state.activeIndex=0,this.updateActiveItem(!1))}},{key:"close",value:function(){this.state.open=!1,this.panel&&(this.panel.hidden=!0),this.input&&this.input.setAttribute("aria-expanded","false"),this.input&&this.input.removeAttribute("aria-activedescendant")}},{key:"handleKeydown",value:function(t){var e=t.key;if("Escape"===e)return t.preventDefault(),void this.close();if("ArrowDown"===e)return t.preventDefault(),this.state.open||this.open(),void this.moveActive(1);if("ArrowUp"===e)return t.preventDefault(),this.state.open||this.open(),void this.moveActive(-1);if("Enter"===e){if(!this.state.open)return;t.preventDefault(),this.state.activeIndex>=0&&this.state.activeIndex<this.state.items.length&&this.selectItem(this.state.items[this.state.activeIndex])}}},{key:"moveActive",value:function(t){if(this.state.items.length){var e=this.state.items.length,n=this.state.activeIndex<0?0:this.state.activeIndex;this.state.activeIndex=(n+t+e)%e,this.updateActiveItem(!0)}}},{key:"updateActiveItem",value:function(t){var e,n=this;Array.from((null===(e=this.list)||void 0===e?void 0:e.querySelectorAll('[data-role="item"]'))||[]).forEach(function(e){var r,i=Number(e.getAttribute("data-index"))===n.state.activeIndex;e.classList.toggle("is-active",i),e.setAttribute("aria-selected",i?"true":"false"),i&&(null===(r=n.input)||void 0===r||r.setAttribute("aria-activedescendant",e.id),t&&e.scrollIntoView({block:"nearest"}))})}},{key:"value",get:function(){var t;return(null===(t=this.valueInput)||void 0===t?void 0:t.value)||""},set:function(t){var e=null==t?"":String(t),n=this.state.items.find(function(t){return t.value===e})||this.state.allLocalItems.find(function(t){return t.value===e});n?this.selectItem(n):this.valueInput&&(this.valueInput.value=e)}},{key:"getBindableState",value:function(){var t;return{query:this.state.query||"",value:this.value,label:(null===(t=this.input)||void 0===t?void 0:t.value)||""}}},{key:"getStateSnapshot",value:function(){var t;return{open:!!this.state.open,value:this.value,label:(null===(t=this.input)||void 0===t?void 0:t.value)||"",selected:this.state.selected?{value:this.state.selected.value,label:this.state.selected.label}:null}}},{key:"shouldDispatchPprChange",value:function(t,e,n){return!!n||"selected"===t}},{key:"applyBindableState",value:function(t){if(t&&"object"===v(t)&&("string"==typeof t.query&&t.query!==this.state.query&&(this.state.query=t.query,this.input&&(this.input.value=t.query)),void 0!==t.value&&null!==t.value)){var e=String(t.value);e!==this.value&&(this.value=e)}}},{key:"handlePprUpdate",value:function(){this.refreshPpr()}},{key:"refreshPpr",value:function(){if(this.config.clearOnPpr&&(this.state.query="",this.state.selected=null,this.state.page=1,this.state.hasMore=!1,this.state.activeIndex=-1,this.input&&(this.input.value=""),this.valueInput&&(this.valueInput.value="")),this.config.endpoint)return this.remoteCache.clear(),this.state.items=[],this.renderItems(),void(this.config.autoLoadOnPpr&&this.loadRemotePage(1,!1));this.state.allLocalItems=this.normalizeItems(this.collectLocalItems()),this.applyLocalFilter()}},{key:"destroy",value:function(){var t,n,r,i;this.fetchTimer&&(clearTimeout(this.fetchTimer),this.fetchTimer=null),null===(t=this.loaderState)||void 0===t||null===(n=t.destroy)||void 0===n||n.call(t),null===(r=this.stateBinding)||void 0===r||null===(i=r.disconnect)||void 0===i||i.call(r),document.removeEventListener("click",this.boundOutsideClick),g(e,"destroy",this,3)([])}}],u=[{key:"selector",get:function(){return"dropdown"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"dropdown"}},{key:"getNativeSelectors",value:function(){return['select[component="dropdown"]','select[role="dropdown"]']}},{key:"prepareHost",value:function(t){if(!(t instanceof HTMLSelectElement))return t;var e=document.createElement("section");return(0,a.ts)(t,e,{exclude:["component","role"]}),e.setAttribute("component","dropdown"),e.setAttribute("data-items",JSON.stringify((0,a.NQ)(t))),e.setAttribute("value",(0,a.BD)(t)),t.replaceWith(e),e}}],r&&y(n.prototype,r),u&&y(n,u),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,u,c,f,h,b}(r.Component);O=j,A="dropdown-template",(C=E(C="templateId"))in O?Object.defineProperty(O,C,{value:A,enumerable:!0,configurable:!0,writable:!0}):O[C]=A,"undefined"!=typeof window&&(window.DropdownComponent=j)},8734(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function l(n,r,i,a){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return o(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,o(h,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(h),o(h,a,"Generator"),o(h,r,function(){return this}),o(h,"toString",function(){return"[object Generator]"}),(i=function(){return{w:l,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function l(t){a(o,r,i,l,s,"next",t)}function s(t){a(o,r,i,l,s,"throw",t)}l(void 0)})}}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,v(r.key),r)}}function u(t,e,n){return e=h(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,n||[],h(t).constructor):e.apply(t,n))}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function d(t,e,n,r){var i=f(h(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},f.apply(null,arguments)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function v(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{FormComponent:()=>g});var y,m,b,g=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=u(this,e,[t,r])).templateId=e.templateId,n.config={endpoint:n.container.getAttribute("data-endpoint")||n.container.getAttribute("action")||"",method:(n.container.getAttribute("method")||"post").toLowerCase(),submitLabel:n.container.getAttribute("data-submit-label")||"Submit",resetLabel:n.container.getAttribute("data-reset-label")||"Reset"},n.state={submitError:"",submitting:!1,formInvalid:!1},n.boundSubmit=function(t){n.handleSubmit(t)},n.boundReset=function(){return n.handleReset()},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&p(t,e)}(e,t),n=e,r=[{key:"init",value:function(){this.validateStructure(),this.render()}},{key:"render",value:(c=l(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,d(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-form"),this.errorEl=this.container.querySelector('[data-role="errors"]'),this.submitBtn=this.container.querySelector('[data-role="submit"]'),this.resetBtn=this.container.querySelector('[data-role="reset"]'),this.projectSlot("fields"),this.projectSlot("actions"),this.projectSlot("errors"),this.submitBtn&&(this.submitBtn.textContent=this.config.submitLabel),this.resetBtn&&(this.resetBtn.textContent=this.config.resetLabel),this.config.endpoint&&this.element.setAttribute("action",this.config.endpoint),this.element.setAttribute("method",this.config.method),this.element.addEventListener("submit",this.boundSubmit),this.element.addEventListener("reset",this.boundReset);case 2:return t.a(2)}},t,this)})),function(){return c.apply(this,arguments)})},{key:"projectSlot",value:function(t){var e=this.container.querySelector('slot[name="'.concat(t,'"]'));if(e){var n=Array.from(this.container.querySelectorAll('[slot="'.concat(t,'"]')));if(n.length){var r=document.createDocumentFragment();n.forEach(function(t){t.removeAttribute("slot"),r.appendChild(t)}),e.replaceWith(r)}}}},{key:"collectData",value:function(){var t=new FormData(this.element);return Object.fromEntries(t.entries())}},{key:"validateChildren",value:function(){var t=this.element.querySelectorAll('holi-input, [component="input-field"], [role="input-field"], holi-select, [component="select-field"], [role="select-field"], holi-checkbox, [component="checkbox-group"], [role="checkbox-group"], holi-radio, [component="radio-group"], [role="radio-group"]'),e=!0;return t.forEach(function(t){var n=t.inputcomponent||t.selectcomponent||t.checkboxgroupcomponent||t.radiogroupcomponent;null!=n&&n.validate&&!1===n.validate()&&(e=!1)}),this.state.formInvalid=!this.element.checkValidity()||!e,!this.state.formInvalid}},{key:"setError",value:function(t){this.state.submitError=t?String(t):"",this.errorEl&&(this.errorEl.hidden=!this.state.submitError,this.errorEl.textContent=this.state.submitError)}},{key:"handleSubmit",value:(a=l(i().m(function t(e){var n,r,o,a,l,s;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(e.preventDefault(),this.element){t.n=1;break}return t.a(2);case 1:if(this.validateChildren()){t.n=2;break}return this.setError("Please fix validation errors before submitting."),t.a(2);case 2:if(this.setError(""),n={data:this.collectData()},r=new CustomEvent("formsubmit",{detail:n,cancelable:!0}),this.element.dispatchEvent(r)){t.n=3;break}return t.a(2);case 3:if(this.config.endpoint){t.n=4;break}return t.a(2);case 4:return this.state.submitting=!0,t.p=5,t.n=6,fetch(this.config.endpoint,{method:this.config.method.toUpperCase(),credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(n.data)});case 6:if((o=t.v).ok){t.n=7;break}throw new Error("HTTP ".concat(o.status));case 7:return a=null,t.p=8,t.n=9,o.json();case 9:a=t.v,t.n=11;break;case 10:t.p=10,t.v;case 11:this.element.dispatchEvent(new CustomEvent("formsuccess",{detail:{data:n.data,response:a}})),t.n=13;break;case 12:t.p=12,s=t.v,l="Form submission failed.",this.setError(l),this.element.dispatchEvent(new CustomEvent("formerror",{detail:{error:String((null==s?void 0:s.message)||s||l)}}));case 13:return t.p=13,this.state.submitting=!1,t.f(13);case 14:return t.a(2)}},t,this,[[8,10],[5,12,13,14]])})),function(t){return a.apply(this,arguments)})},{key:"handleReset",value:function(){var t;this.setError(""),this.state.formInvalid=!1,null===(t=this.element)||void 0===t||t.dispatchEvent(new CustomEvent("formreset",{detail:{}}))}},{key:"destroy",value:function(){var t,n;null===(t=this.element)||void 0===t||t.removeEventListener("submit",this.boundSubmit),null===(n=this.element)||void 0===n||n.removeEventListener("reset",this.boundReset),d(e,"destroy",this,3)([])}}],o=[{key:"selector",get:function(){return"holi-form"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"form-shell"}}],r&&s(n.prototype,r),o&&s(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,a,c}(n(8812).Component);y=g,b="form-template",(m=v(m="templateId"))in y?Object.defineProperty(y,m,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[m]=b,"undefined"!=typeof window&&(window.FormComponent=g)},1120(t,e,n){"use strict";n.r(e),n.d(e,{GalleryComponent:()=>A});var r=n(8812);function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){u=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(t,e)||o(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){if(t){if("string"==typeof t)return a(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function l(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return s(c,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var a={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(s(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,s(h,"constructor",d),s(d,"constructor",c),c.displayName="GeneratorFunction",s(d,i,"GeneratorFunction"),s(h),s(h,i,"Generator"),s(h,r,function(){return this}),s(h,"toString",function(){return"[object Generator]"}),(l=function(){return{w:o,m:p}})()}function s(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}s=function(t,e,n,r){function o(e,n){s(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},s(t,e,n,r)}function u(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function c(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){u(o,r,i,a,l,"next",t)}function l(t){u(o,r,i,a,l,"throw",t)}a(void 0)})}}function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?d(Object(n),!0).forEach(function(e){g(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function h(t,e,n){return e=m(e),function(t,e){if(e&&("object"==w(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,p()?Reflect.construct(e,n||[],m(t).constructor):e.apply(t,n))}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(p=function(){return!!t})()}function v(t,e,n,r){var i=y(m(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function y(){return y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=m(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},y.apply(null,arguments)}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}function g(t,e,n){return(e=O(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function w(t){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},w(t)}function S(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function k(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,O(r.key),r)}}function E(t,e,n){return e&&k(t.prototype,e),n&&k(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function O(t){var e=function(t){if("object"!=w(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==w(e)?e:e+""}var C=function(){return E(function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:80;S(this,t),this.limit=Math.max(10,Number(e)||80),this.store=new Map},[{key:"touch",value:function(t){if(this.store.has(t)){var e=this.store.get(t);this.store.delete(t),this.store.set(t,e)}}},{key:"set",value:function(t,e){for(this.store.has(t)&&this.store.delete(t),this.store.set(t,e);this.store.size>this.limit;){var n=this.store.keys().next().value;this.store.delete(n)}}},{key:"preload",value:function(t){var e=this;if(!t)return Promise.resolve(null);var n=String(t),r=this.store.get(n);if(null!=r&&r.promise)return this.touch(n),r.promise;var i=new Promise(function(t,e){var r=new Image;r.onload=function(){return t(n)},r.onerror=function(){return e(new Error("Failed to preload image: ".concat(n)))},r.src=n});return this.set(n,{promise:i}),i.then(function(){return e.set(n,{state:"loaded"})}).catch(function(){return e.set(n,{state:"error"})}),i}}])}(),A=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return S(this,e),(n=h(this,e,[t,r])).templateId=e.templateId,n.dialogTitle=t.getAttribute("dialog-title")||t.getAttribute("title")||"Image Viewer",n.footerMessage=t.getAttribute("footer-message")||"Use arrows or swipe to navigate.",n.remoteSource=t.getAttribute("source")||t.getAttribute("data-source")||"",n.remoteSourceTemplate=n.remoteSource,n.requestParams=n.parseObjectAttr("data-request-params"),n.pageSize=n.parsePositive(t.getAttribute("page-size"),12),n.maxThumbHeight=n.parsePositive(t.getAttribute("thumb-height"),72),n.defaultMode=n.resolveDisplayMode(t.getAttribute("display-mode")||""),n.displayMode=n.defaultMode,n.cache=new C(n.parsePositive(t.getAttribute("cache-size"),80)),n.sourceNodes=[],n.initialInlineItems=[],n.allItems=[],n.viewItems=[],n.visibleItems=[],n.visibleStart=0,n.visibleEnd=0,n.pendingIndex=0,n.query="",n.metaQuery="",n.sortField="name",n.sortDirection="desc"===t.getAttribute("sort-direction")?"desc":"asc",n.currentPage=1,n.visibleCount=n.pageSize,n.observer=null,n.loading=!1,n.thumbnailPool=[],n.thumbnailPoolVersion=0,n.thumbnailPoolRenderedVersion=-1,n.viewSignature="",n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&b(t,e)}(e,t),E(e,[{key:"parsePositive",value:function(t,e){var n=Number(t);return Number.isFinite(n)&&n>0?n:e}},{key:"parseObjectAttr",value:function(t){var e,n=String((null===(e=this.container)||void 0===e?void 0:e.getAttribute(t))||"").trim();if(!n)return{};try{var r=JSON.parse(n);return r&&"object"===w(r)&&!Array.isArray(r)?r:{}}catch(t){return{}}}},{key:"resolveDisplayMode",value:function(t){return"infinite"===String(t||"").trim().toLowerCase()||this.container.hasAttribute("infinite-scroll")?"infinite":"paginate"}},{key:"captureSourceItems",value:function(){var t=Array.from(this.container.children).filter(function(t){return!t.classList.contains("holi-gallery-root")});return this.sourceNodes=t,t.filter(function(t){return!!t.matches("[slot]")||!!t.matches("img, figure, a")||!!t.querySelector("img")})}},{key:"parseItem",value:function(t,e){var n=t.matches("img")?t:t.querySelector("img");if(!n)return null;var r=t.matches("a")?t:t.querySelector("a"),i=t.getAttribute("data-thumb-src")||n.getAttribute("src"),o=t.getAttribute("data-full-src")||n.getAttribute("data-full-src")||(null==r?void 0:r.getAttribute("href"))||i;if(!i||!o)return null;var a=this.parseMetadata(t.getAttribute("data-meta")||n.getAttribute("data-meta")||""),l=this.extractDatasetMetadata(t,n),s=t.getAttribute("data-name")||n.getAttribute("data-name")||n.getAttribute("alt")||"Image ".concat(e+1);return{index:e,id:String(t.getAttribute("data-id")||n.getAttribute("data-id")||e),name:s,thumbSrc:i,fullSrc:o,thumbAlt:t.getAttribute("data-thumb-alt")||n.getAttribute("alt")||"Thumbnail ".concat(e+1),fullAlt:t.getAttribute("data-full-alt")||n.getAttribute("alt")||"Image ".concat(e+1),metadata:f(f({},l),a)}}},{key:"parseMetadata",value:function(t){if(!t)return{};try{var e=JSON.parse(t);return e&&"object"===w(e)?e:{}}catch(t){return{}}}},{key:"extractDatasetMetadata",value:function(){for(var t=new Set(["thumbSrc","fullSrc","thumbAlt","fullAlt","name","meta","id"]),e={},n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return r.forEach(function(n){null!=n&&n.dataset&&Object.keys(n.dataset).forEach(function(r){if(!t.has(r)){var i=n.dataset[r];null!=i&&""!==i&&(e[r]=i)}})}),e}},{key:"parseApiItem",value:function(t,e){var n;if(!t||"object"!==w(t))return null;var r=t.thumbSrc||t.thumbnail||t.thumb||t.src||"",i=t.fullSrc||t.full||t.url||t.image||r;if(!r||!i)return null;var o=f({},t.metadata&&"object"===w(t.metadata)?t.metadata:{});Object.keys(t).forEach(function(e){["id","name","title","thumbSrc","thumbnail","thumb","src","fullSrc","full","url","image","alt","thumbAlt","fullAlt","metadata"].includes(e)||(o[e]=t[e])});var a=t.name||t.title||t.alt||"Image ".concat(e+1);return{index:e,id:String(null!==(n=t.id)&&void 0!==n?n:e),name:a,thumbSrc:r,fullSrc:i,thumbAlt:t.thumbAlt||t.alt||a,fullAlt:t.fullAlt||t.alt||a,metadata:o}}},{key:"resolveItems",value:(u=c(l().m(function t(){var e,n,r,i,o,a,s,u,c=this;return l().w(function(t){for(;;)switch(t.p=t.n){case 0:if(e=this.captureSourceItems(),(n=e.map(function(t,e){return c.parseItem(t,e)}).filter(Boolean)).length&&(this.initialInlineItems=n),r=this.resolveRemoteSource()){t.n=1;break}return t.a(2,n.length?n:this.initialInlineItems);case 1:return this.setLoadingState(!0,"Loading images..."),t.p=2,t.n=3,fetch(r,{credentials:"same-origin"});case 3:if((i=t.v).ok){t.n=4;break}throw new Error("Gallery source request failed: ".concat(i.status));case 4:return t.n=5,i.json();case 5:return o=t.v,a=Array.isArray(o)?o:Array.isArray(null==o?void 0:o.items)?o.items:Array.isArray(null==o?void 0:o.rows)?o.rows:[],s=a.map(function(t,e){return c.parseApiItem(t,e)}).filter(Boolean),t.a(2,s.length?s:n.length?n:this.initialInlineItems);case 6:return t.p=6,u=t.v,this.setLoadingState(!1),this.setStateMessage("Failed to load remote gallery source. ".concat(String(u.message||u))),t.a(2,n.length?n:this.initialInlineItems);case 7:return t.p=7,this.setLoadingState(!1),t.f(7);case 8:return t.a(2)}},t,this,[[2,6,7,8]])})),function(){return u.apply(this,arguments)})},{key:"validateStructure",value:function(){v(e,"validateStructure",this,3)([]),this.hasItems=this.allItems.length>0}},{key:"init",value:(s=c(l().m(function t(){return l().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.resolveItems();case 1:return this.allItems=t.v,this.validateStructure(),t.n=2,this.render();case 2:this.bindEvents(),this.applyView(!0);case 3:return t.a(2)}},t,this)})),function(){return s.apply(this,arguments)})},{key:"render",value:(r=c(l().m(function t(){return l().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,v(e,"render",this,3)([]);case 1:this.root=this.container.querySelector(".holi-gallery-root"),this.toolbar=this.container.querySelector('[data-role="toolbar"]'),this.stateNode=this.container.querySelector('[data-role="state"]'),this.searchInput=this.container.querySelector('[data-role="search-input"]'),this.metaInput=this.container.querySelector('[data-role="meta-input"]'),this.sortFieldSelect=this.container.querySelector('[data-role="sort-field"]'),this.sortDirectionSelect=this.container.querySelector('[data-role="sort-direction"]'),this.displayModeSelect=this.container.querySelector('[data-role="display-mode"]'),this.gridWrap=this.container.querySelector('[data-role="grid-wrap"]'),this.grid=this.container.querySelector('[data-role="grid"]'),this.sentinel=this.container.querySelector('[data-role="sentinel"]'),this.pagination=this.container.querySelector('[data-role="pagination"]'),this.pageStatus=this.container.querySelector('[data-role="page-status"]'),this.dialogHost=this.container.querySelector('[data-role="dialog"]'),this.carouselHost=this.container.querySelector('[data-role="carousel"]'),this.slidesHost=this.container.querySelector('[data-role="slides"]'),this.sourceNodes.forEach(function(t){return t.remove()}),this.gridWrap&&(this.gridWrap.style.maxHeight="".concat(this.maxThumbHeight,"vh")),this.sortDirectionSelect&&(this.sortDirectionSelect.value=this.sortDirection),this.displayModeSelect&&(this.displayModeSelect.value=this.displayMode),this.renderSortOptions(),this.applyDialogConfig();case 2:return t.a(2)}},t,this)})),function(){return r.apply(this,arguments)})},{key:"renderSortOptions",value:function(){var t=this;if(this.sortFieldSelect){var e=new Set(["name"]);this.allItems.forEach(function(t){Object.keys(t.metadata||{}).forEach(function(t){return e.add(t)})}),this.sortFieldSelect.replaceChildren(),Array.from(e).forEach(function(e){var n=document.createElement("option");n.value=e,n.textContent="name"===e?"Name":"Metadata: ".concat(e),t.sortFieldSelect.appendChild(n)}),e.has(this.sortField)||(this.sortField="name"),this.sortFieldSelect.value=this.sortField}}},{key:"setLoadingState",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";this.loading=!!t,this.stateNode&&(t?(this.stateNode.hidden=!1,this.stateNode.textContent=e||"Loading..."):e||(this.stateNode.hidden=!0,this.stateNode.textContent=""))}},{key:"setStateMessage",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(this.stateNode){if(!t)return this.stateNode.hidden=!0,void(this.stateNode.textContent="");this.stateNode.hidden=!1,this.stateNode.textContent=t}}},{key:"resolveRemoteSource",value:function(){var t=String(this.remoteSourceTemplate||this.remoteSource||"").trim();if(!t)return this.remoteSource="","";var e=t.includes("@{")?this.resolveTemplateString(t,this.getBindingContext()):t,n=String(e||"").trim();if(!n)return this.remoteSource="","";var r=new URL(n,window.location.href),o=this.resolveRequestParams();return Object.entries(o).forEach(function(t){var e=i(t,2),n=e[0],o=e[1];null!=o&&""!==o&&r.searchParams.set(n,String(o))}),this.remoteSource=r.toString(),this.remoteSource}},{key:"resolveRequestParams",value:function(){var t=this,e=Object.entries(this.requestParams||{});if(!e.length)return{};var n={};return e.forEach(function(e){var r=i(e,2),o=r[0],a=r[1];if(o){var l=String(a||"").trim();if(l){var s=t.extractExpression(l),u=t.evaluateExpression(s,t.getBindingContext());null!=u&&""!==u&&(n[o]=u)}}}),n}},{key:"refreshPpr",value:(n=c(l().m(function t(){return l().w(function(t){for(;;)switch(t.n){case 0:if(!this.resolveRemoteSource()){t.n=2;break}return t.n=1,this.resolveItems();case 1:return this.allItems=t.v,this.hasItems=this.allItems.length>0,this.renderSortOptions(),this.applyView(!0),t.a(2);case 2:this.applyView(!0);case 3:return t.a(2)}},t,this)})),function(){return n.apply(this,arguments)})},{key:"normalizeText",value:function(t){return String(null!=t?t:"").trim().toLowerCase()}},{key:"matchesMetaFilter",value:function(t){var e=this.normalizeText(this.metaQuery);if(!e)return!0;var n=t.metadata||{};if(e.includes(":")){var r=i(e.split(":"),2),o=r[0],a=r[1],l=this.normalizeText(o),s=this.normalizeText(a);if(!l||!s)return!0;for(var u=Object.keys(n),c=0;c<u.length;c+=1)if(this.normalizeText(u[c])===l&&this.normalizeText(n[u[c]]).includes(s))return!0;return!1}return this.normalizeText(JSON.stringify(n)).includes(e)}},{key:"matchesSearch",value:function(t){var e=this.normalizeText(this.query);if(!e)return!0;var n=this.normalizeText(t.name),r=this.normalizeText(JSON.stringify(t.metadata||{}));return n.includes(e)||r.includes(e)}},{key:"sortItems",value:function(t){var e,n=this,r="desc"===this.sortDirection?-1:1,i=this.sortField||"name",l=function(t){if(Array.isArray(t))return a(t)}(e=t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||o(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();return l.sort(function(t,e){var o,a,l="name"===i?t.name:null===(o=t.metadata)||void 0===o?void 0:o[i],s="name"===i?e.name:null===(a=e.metadata)||void 0===a?void 0:a[i],u=Number(l),c=Number(s);if(Number.isFinite(u)&&Number.isFinite(c))return u<c?-1*r:u>c?1*r:0;var d=n.normalizeText(l),f=n.normalizeText(s);return d<f?-1*r:d>f?1*r:0}),l}},{key:"computeVisibleItems",value:function(t){if("infinite"===this.displayMode){t&&(this.visibleCount=this.pageSize);var e=Math.min(this.visibleCount,this.viewItems.length);return this.visibleStart=0,this.visibleEnd=e,void(this.visibleItems=this.viewItems.slice(0,e).map(function(t,e){return f(f({},t),{},{viewIndex:e})}))}var n=Math.max(1,Math.ceil(this.viewItems.length/this.pageSize));this.currentPage=Math.min(this.currentPage,n),t&&(this.currentPage=1);var r=(this.currentPage-1)*this.pageSize,i=r+this.pageSize;this.visibleStart=r,this.visibleEnd=Math.min(i,this.viewItems.length),this.visibleItems=this.viewItems.slice(r,i).map(function(t,e){return f(f({},t),{},{viewIndex:r+e})})}},{key:"resolveViewSignature",value:function(t){return Array.isArray(t)&&t.length?t.map(function(t){var e,n;return String(null!==(e=null!==(n=t.id)&&void 0!==n?n:t.index)&&void 0!==e?e:"")}).join("|"):""}},{key:"applyView",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.hasItems)return this.viewItems=[],this.visibleItems=[],this.visibleStart=0,this.visibleEnd=0,this.thumbnailPool=[],this.thumbnailPoolVersion+=1,this.renderThumbnails(),this.renderSlides(),this.updatePagination(),this.updateSentinel(),void this.setStateMessage("No images available. Provide inline <img> content or a valid remote source.");var n=this.allItems.filter(function(e){return t.matchesSearch(e)&&t.matchesMetaFilter(e)});this.viewItems=this.sortItems(n);var r=this.resolveViewSignature(this.viewItems),i=r!==this.viewSignature;i&&(this.viewSignature=r,this.thumbnailPoolVersion+=1),this.computeVisibleItems(e),this.renderThumbnails(),(i||e)&&this.renderSlides(),this.updatePagination(),this.updateSentinel(),this.syncNestedComponents(),this.preloadVisibleImages(),this.viewItems.length?this.loading||this.setStateMessage(""):this.setStateMessage("No images match the current filters.")}},{key:"renderThumbnails",value:function(){var t=this;if(this.grid){if(!this.viewItems.length)return this.thumbnailPool=[],this.thumbnailPoolRenderedVersion=this.thumbnailPoolVersion,void this.grid.replaceChildren();this.thumbnailPoolRenderedVersion!==this.thumbnailPoolVersion&&(this.grid.replaceChildren(),this.thumbnailPool=[],this.viewItems.forEach(function(e,n){var r=document.createElement("button");r.type="button",r.className="holi-gallery-thumb",r.setAttribute("data-gallery-index",String(n)),r.setAttribute("aria-label","Open image ".concat(e.index+1)),r.setAttribute("title",e.name||e.thumbAlt||"");var i=document.createElement("img");i.src=e.thumbSrc,i.alt=e.thumbAlt,i.loading="lazy",r.appendChild(i),t.thumbnailPool.push(r),t.grid.appendChild(r)}),this.thumbnailPoolRenderedVersion=this.thumbnailPoolVersion),this.applyThumbnailVisibility()}}},{key:"applyThumbnailVisibility",value:function(){var t=Math.max(0,Number(this.visibleStart)||0),e=Math.max(t,Number(this.visibleEnd)||0);this.thumbnailPool.forEach(function(n,r){n.hidden=r<t||r>=e})}},{key:"renderSlides",value:function(){var t=this,e=this.resolveSlidesHost();e&&(this.slidesHost=e,this.slidesHost.replaceChildren(),this.viewItems.forEach(function(e){var n=document.createElement("article");n.className="slide";var r=document.createElement("img");r.src=e.fullSrc,r.alt=e.fullAlt,n.appendChild(r),t.slidesHost.appendChild(n)}))}},{key:"resolveSlidesHost",value:function(){var t=this.getCarouselInstance();if(null!=t&&t.track&&t.track.isConnected)return t.track;for(var e=Array.from(this.container.querySelectorAll('[data-role="slides"], [data-role="track"]')),n=e.length-1;n>=0;n-=1){var r=e[n];if(r instanceof HTMLElement&&r.isConnected&&(r.matches('[data-role="track"]')||r.classList.contains("slides")))return r}return null}},{key:"applyDialogConfig",value:function(){this.dialogHost&&(this.dialogHost.setAttribute("title",this.dialogTitle),this.dialogHost.setAttribute("footer-message",this.footerMessage))}},{key:"ensureNestedComponents",value:function(){var t,e=null===(t=window.HoliApp)||void 0===t?void 0:t.HoliApp;e&&"function"==typeof e.init&&e.init(this.container)}},{key:"syncNestedComponents",value:function(){var t,e=this.getCarouselInstance();if(e){"function"==typeof e.refreshSlides&&e.refreshSlides(),"function"==typeof e.updateTrackSizing&&e.updateTrackSizing(),"function"==typeof e.renderDots&&e.renderDots();var n=Math.max((null===(t=e.getDotCount)||void 0===t?void 0:t.call(e))-1||0,0);this.pendingIndex=Math.min(this.pendingIndex,n),"function"==typeof e.goToSlide&&e.goToSlide(this.pendingIndex,!1)}else this.ensureNestedComponents()}},{key:"getDialogInstance",value:function(){var t;return(null===(t=this.dialogHost)||void 0===t?void 0:t.dialogcomponent)||null}},{key:"getCarouselInstance",value:function(){for(var t=this.container.querySelectorAll('carousel, [component="carousel"], [role="carousel"]'),e=0;e<t.length;e+=1){var n=t[e].carouselcomponent;if(n)return n}return null}},{key:"preloadVisibleImages",value:function(){var t=this;this.visibleItems.slice(0,this.pageSize).forEach(function(e){t.cache.preload(e.thumbSrc).catch(function(){})})}},{key:"syncToPendingIndex",value:function(){var t=this.getCarouselInstance();if(!t)return!1;var e=this.viewItems[this.pendingIndex];if(e){this.cache.preload(e.fullSrc).catch(function(){});var n=this.viewItems[this.pendingIndex+1],r=this.viewItems[this.pendingIndex-1];n&&this.cache.preload(n.fullSrc).catch(function(){}),r&&this.cache.preload(r.fullSrc).catch(function(){})}return t.goToSlide(this.pendingIndex,!1),!0}},{key:"openAt",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=Number(t);this.pendingIndex=Number.isFinite(r)?r:0;var i=this.getDialogInstance();if(i)i.open(),this.syncToPendingIndex()||requestAnimationFrame(function(){e.syncToPendingIndex()});else{if(this.ensureNestedComponents(),n>=8)return;requestAnimationFrame(function(){return e.openAt(e.pendingIndex,n+1)})}}},{key:"updatePagination",value:function(){if(this.pagination&&this.pageStatus){if("infinite"===this.displayMode)return this.pagination.hidden=!0,void(this.pageStatus.textContent="Showing ".concat(this.visibleItems.length," of ").concat(this.viewItems.length," images"));this.pagination.hidden=!1;var t=Math.max(1,Math.ceil(this.viewItems.length/this.pageSize)),e=this.pagination.querySelector('[data-action="prev-page"]'),n=this.pagination.querySelector('[data-action="next-page"]');e&&(e.disabled=this.currentPage<=1),n&&(n.disabled=this.currentPage>=t),this.pageStatus.textContent="Page ".concat(this.currentPage," of ").concat(t," (").concat(this.viewItems.length," images)")}}},{key:"updateSentinel",value:function(){if(this.sentinel){var t="infinite"===this.displayMode&&this.visibleItems.length<this.viewItems.length;this.sentinel.hidden=!t}}},{key:"setupInfiniteObserver",value:function(){var t=this;this.observer&&(this.observer.disconnect(),this.observer=null),"infinite"===this.displayMode&&this.sentinel&&this.gridWrap&&"undefined"!=typeof IntersectionObserver&&(this.observer=new IntersectionObserver(function(e){e.some(function(t){return t.isIntersecting})&&(t.visibleItems.length>=t.viewItems.length||(t.visibleCount+=t.pageSize,t.computeVisibleItems(!1),t.renderThumbnails(),t.updateSentinel(),t.updatePagination(),t.preloadVisibleImages()))},{root:this.gridWrap,threshold:.1}),this.observer.observe(this.sentinel))}},{key:"bindEvents",value:function(){var t,e,n,r,i,o,a,l,s=this;null===(t=this.grid)||void 0===t||t.addEventListener("click",function(t){var e=t.target.closest("[data-gallery-index]");if(e){var n=Number(e.getAttribute("data-gallery-index"));s.openAt(n)}}),null===(e=this.dialogHost)||void 0===e||e.addEventListener("dialogopen",function(){s.syncToPendingIndex()}),null===(n=this.searchInput)||void 0===n||n.addEventListener("input",function(t){s.query=t.target.value||"",s.applyView(!0)}),null===(r=this.metaInput)||void 0===r||r.addEventListener("input",function(t){s.metaQuery=t.target.value||"",s.applyView(!0)}),null===(i=this.sortFieldSelect)||void 0===i||i.addEventListener("change",function(t){s.sortField=t.target.value||"name",s.applyView(!0)}),null===(o=this.sortDirectionSelect)||void 0===o||o.addEventListener("change",function(t){s.sortDirection="desc"===t.target.value?"desc":"asc",s.applyView(!0)}),null===(a=this.displayModeSelect)||void 0===a||a.addEventListener("change",function(t){s.displayMode="infinite"===t.target.value?"infinite":"paginate",s.applyView(!0),s.setupInfiniteObserver()}),null===(l=this.pagination)||void 0===l||l.addEventListener("click",function(t){var e=t.target.closest("[data-action]");if(e&&"paginate"===s.displayMode){var n=e.getAttribute("data-action"),r=Math.max(1,Math.ceil(s.viewItems.length/s.pageSize));"prev-page"===n&&s.currentPage>1&&(s.currentPage-=1,s.applyView(!1)),"next-page"===n&&s.currentPage<r&&(s.currentPage+=1,s.applyView(!1))}}),this.setupInfiniteObserver()}},{key:"destroy",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),v(e,"destroy",this,3)([])}}],[{key:"selector",get:function(){return"gallery"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"gallery"}}]);var n,r,s,u}(r.Component);g(A,"templateId","gallery-template"),"undefined"!=typeof window&&(window.GalleryComponent=A)},2174(t,e,n){"use strict";n.r(e),n.d(e,{IncludeComponent:()=>S});var r=n(8812),i=n(1904);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var a=r&&r.prototype instanceof u?r:u,c=Object.create(a.prototype);return l(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(l(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,l(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,l(h,"constructor",d),l(d,"constructor",c),c.displayName="GeneratorFunction",l(d,i,"GeneratorFunction"),l(h),l(h,i,"Generator"),l(h,r,function(){return this}),l(h,"toString",function(){return"[object Generator]"}),(a=function(){return{w:o,m:p}})()}function l(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}l=function(t,e,n,r){function o(e,n){l(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},l(t,e,n,r)}function s(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function u(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){s(o,r,i,a,l,"next",t)}function l(t){s(o,r,i,a,l,"throw",t)}a(void 0)})}}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,m(r.key),r)}}function d(t,e,n){return e=v(e),function(t,e){if(e&&("object"==o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,f()?Reflect.construct(e,n||[],v(t).constructor):e.apply(t,n))}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!t})()}function h(t,e,n,r){var i=p(v(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=v(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},p.apply(null,arguments)}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}function m(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var b,g,w,S=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=d(this,e,[t,r])).templateId=e.templateId,n.src=n.readSource(),n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&y(t,e)}(e,t),n=e,r=[{key:"readSource",value:function(){var t,e,n,r,i=null===(t=this.container)||void 0===t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"src");if(null!=i)return String(i).trim();var o=null===(n=this.container)||void 0===n||null===(r=n.getAttribute)||void 0===r?void 0:r.call(n,"data-src");return null!=o?String(o).trim():""}},{key:"validateStructure",value:function(){if(h(e,"validateStructure",this,3)([]),!this.container)throw new Error("Include requires a container");if(!this.src)throw new Error('Include requires a non-empty "src" attribute')}},{key:"init",value:(s=u(a().m(function t(){return a().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return s.apply(this,arguments)})},{key:"resolveSourceUrl",value:function(){return new URL(this.src,document.baseURI).toString()}},{key:"render",value:(l=u(a().m(function t(){var n,r,i,o;return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,h(e,"render",this,3)([]);case 1:return t.n=2,fetch(this.resolveSourceUrl(),{credentials:"same-origin"});case 2:if((n=t.v).ok){t.n=3;break}throw new Error('Include request failed for "'.concat(this.src,'"'));case 3:return t.n=4,n.text();case 4:r=t.v,i=this.parseFragment(r),o=Array.from(i.childNodes),this.container.replaceWith(i),this.bootstrapInsertedNodes(o);case 5:return t.a(2)}},t,this)})),function(){return l.apply(this,arguments)})},{key:"parseFragment",value:function(t){var e=(new DOMParser).parseFromString(String(t||""),"text/html"),n=document.createDocumentFragment();return Array.from(e.body.childNodes).forEach(function(t){n.appendChild(t.cloneNode(!0))}),n}},{key:"bootstrapInsertedNodes",value:function(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach(function(t){t instanceof Element&&i.Z.initAll(t,{includeRoleSelectors:!1})})}}],o=[{key:"selector",get:function(){return"include"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"include"}}],r&&c(n.prototype,r),o&&c(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,l,s}(r.Component);b=S,w="include-template",(g=m(g="templateId"))in b?Object.defineProperty(b,g,{value:w,enumerable:!0,configurable:!0,writable:!0}):b[g]=w,"undefined"!=typeof window&&(window.IncludeComponent=S)},3390(t,e,n){"use strict";n.r(e),n.d(e,{InputComponent:()=>k});var r=n(8812),i=n(3573),o=n(853);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function s(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,c=Object.create(s.prototype);return u(c,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var a={};function l(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(u(e={},r,function(){return this}),e),h=d.prototype=l.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,u(h,"constructor",d),u(d,"constructor",c),c.displayName="GeneratorFunction",u(d,i,"GeneratorFunction"),u(h),u(h,i,"Generator"),u(h,r,function(){return this}),u(h,"toString",function(){return"[object Generator]"}),(s=function(){return{w:o,m:p}})()}function u(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}u=function(t,e,n,r){function o(e,n){u(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},u(t,e,n,r)}function c(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,b(r.key),r)}}function f(t,e,n){return e=y(e),function(t,e){if(e&&("object"==a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,h()?Reflect.construct(e,n||[],y(t).constructor):e.apply(t,n))}function h(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(h=function(){return!!t})()}function p(t,e,n,r){var i=v(y(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function v(){return v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=y(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},v.apply(null,arguments)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}function b(t){var e=function(t){if("object"!=a(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==a(e)?e:e+""}var g,w,S,k=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=f(this,e,[t,r])).templateId=e.templateId;var i=n.resolveControlType(),o="area"===i;return n.config={name:n.readAttr("name"),label:n.readAttr("label"),type:o?"text":i,controlType:i,isAreaMode:o,placeholder:n.readAttr("placeholder"),rows:Math.max(1,Number(n.readAttr("rows","4"))||4),cols:Math.max(1,Number(n.readAttr("cols","30"))||30),required:n.readBoolAttr("required",!1),disabled:n.readBoolAttr("disabled",!1),errorMessage:n.readAttr("error-message","Invalid value."),validators:n.parseValidators(n.readAttr("data-validator")||n.readAttr("data-validators"))},n.state={label:n.config.label,required:n.config.required,name:n.config.name,type:n.config.type,placeholder:n.config.placeholder,rows:n.config.rows,cols:n.config.cols,isAreaMode:n.config.isAreaMode,isInputMode:!n.config.isAreaMode,value:n.readAttr("value",""),invalid:!1,errorMessage:""},n.boundInput=function(t){return n.handleInput(t)},n.boundBlur=function(){return n.handleBlur()},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&m(t,e)}(e,t),n=e,r=[{key:"readAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.container.getAttribute(t);return null==n?e:String(n)}},{key:"readBoolAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.container.hasAttribute(t))return e;var n=String(this.container.getAttribute(t)||"").trim().toLowerCase();return!n||"false"!==n&&"0"!==n&&"no"!==n}},{key:"parseValidators",value:function(t){return i.D.parseList(t)}},{key:"resolveControlType",value:function(){var t=String(this.readAttr("type","text")||"text").trim().toLowerCase(),e=String(this.readAttr("role","")||"").trim().toLowerCase(),n={text:"text",email:"email",number:"number",password:"password",url:"url",tel:"tel",search:"search",textarea:"area",area:"area"};if(e&&n[e]){if("text"===t||"input"===t)return n[e];if("area"===t||"textarea"===t)return"area"}return"area"===t||"textarea"===t?"area":t||"text"}},{key:"init",value:function(){this.validateStructure(),this.render()}},{key:"render",value:(u=s().m(function t(){return s().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,p(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-input"),this.inputEl=this.container.querySelector('[data-role="control-input"]'),this.areaEl=this.container.querySelector('[data-role="control-area"]'),this.controlEl=this.areaEl||this.inputEl,this.labelEl=this.container.querySelector('[data-role="label"]'),this.errorEl=this.container.querySelector('[data-role="error"]'),this.projectSlot("label"),this.projectSlot("helper"),this.projectSlot("error"),this.applyFieldAttributes(),this.bindEvents(),this.validate(),this.updateView();case 2:return t.a(2)}},t,this)}),h=function(){var t=this,e=arguments;return new Promise(function(n,r){var i=u.apply(t,e);function o(t){c(i,n,r,o,a,"next",t)}function a(t){c(i,n,r,o,a,"throw",t)}o(void 0)})},function(){return h.apply(this,arguments)})},{key:"projectSlot",value:function(t){var e=this.container.querySelector('slot[name="'.concat(t,'"]'));if(e){var n=Array.from(this.container.querySelectorAll('[slot="'.concat(t,'"]')));if(n.length){var r=document.createDocumentFragment();n.forEach(function(t){t.removeAttribute("slot"),r.appendChild(t)}),e.replaceWith(r)}}}},{key:"applyFieldAttributes",value:function(){if(this.controlEl){this.controlEl.value=this.state.value,this.controlEl.name=this.config.name||"",this.controlEl.placeholder=this.config.placeholder||"",this.controlEl.required=!!this.config.required,this.controlEl.disabled=!!this.config.disabled,this.config.isAreaMode?(this.controlEl.rows=this.config.rows,this.controlEl.cols=this.config.cols):this.controlEl.type=this.config.type||"text";var t=this.controlEl.id||"holi-input-".concat(Math.random().toString(16).slice(2));this.controlEl.id=t,this.labelEl&&!this.labelEl.getAttribute("for")&&this.labelEl.setAttribute("for",t)}}},{key:"bindEvents",value:function(){this.controlEl&&(this.controlEl.addEventListener("input",this.boundInput),this.controlEl.addEventListener("blur",this.boundBlur))}},{key:"handleInput",value:function(t){var e;this.state.value=String((null==t||null===(e=t.target)||void 0===e?void 0:e.value)||""),this.validate(),this.updateView(),this.dispatchEvent("inputchange",{value:this.state.value,invalid:this.state.invalid})}},{key:"handleBlur",value:function(){this.validate(),this.updateView()}},{key:"validate",value:function(){var t=function(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return l(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(this.config.validators);this.config.required&&!t.includes("required")&&t.unshift("required");for(var e=0;e<t.length;e+=1){var n=t[e],r=this.runValidator(n,this.state.value);if(!r.valid)return this.state.invalid=!0,this.state.errorMessage=r.message,!1}return this.state.invalid=!1,this.state.errorMessage="",!0}},{key:"runValidator",value:function(t,e){var n=i.D.validateToken(t,e,{element:this.controlEl,component:this});return n.valid||n.message&&"Invalid value."!==n.message||(n.message=this.config.errorMessage||"Invalid value."),n}},{key:"updateView",value:function(){this.element&&this.controlEl&&(this.element.classList.toggle("is-invalid",this.state.invalid),this.controlEl.setAttribute("aria-invalid",this.state.invalid?"true":"false"),this.errorEl&&(this.errorEl.hidden=!this.state.invalid,this.errorEl.textContent=this.state.invalid?this.state.errorMessage||this.config.errorMessage:""))}},{key:"value",get:function(){var t;return(null===(t=this.controlEl)||void 0===t?void 0:t.value)||""},set:function(t){var e=null==t?"":String(t);this.state.value=e,this.controlEl&&(this.controlEl.value=e),this.validate(),this.updateView()}},{key:"destroy",value:function(){this.controlEl&&(this.controlEl.removeEventListener("input",this.boundInput),this.controlEl.removeEventListener("blur",this.boundBlur)),p(e,"destroy",this,3)([])}}],a=[{key:"selector",get:function(){return"holi-input"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"input-field"}},{key:"getNativeSelectors",value:function(){return['input[component="input"]','input[role="input"]','input[component="input-field"]','input[role="input-field"]','input[component="textarea"]','input[role="textarea"]','textarea[component="input"]','textarea[role="input"]','textarea[component="input-field"]','textarea[role="input-field"]','textarea[component="textarea"]','textarea[role="textarea"]']}},{key:"prepareHost",value:function(t){if(!(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement))return t;var e=document.createElement("section");return(0,o.ts)(t,e,{exclude:["component","role","value","type"]}),e.setAttribute("component","input-field"),e.setAttribute("type",t instanceof HTMLTextAreaElement||"textarea"===(t.getAttribute("role")||t.getAttribute("component"))?"textarea":t.getAttribute("type")||"text"),e.setAttribute("value",(0,o.BD)(t)),t.replaceWith(e),e}}],r&&d(n.prototype,r),a&&d(n,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,a,u,h}(r.Component);g=k,S="input-field-template",(w=b(w="templateId"))in g?Object.defineProperty(g,w,{value:S,enumerable:!0,configurable:!0,writable:!0}):g[w]=S,"undefined"!=typeof window&&(window.InputComponent=k)},166(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function o(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function l(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return a(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(a(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,a(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,a(h,"constructor",d),a(d,"constructor",c),c.displayName="GeneratorFunction",a(d,i,"GeneratorFunction"),a(h),a(h,i,"Generator"),a(h,r,function(){return this}),a(h,"toString",function(){return"[object Generator]"}),(o=function(){return{w:l,m:p}})()}function a(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}a=function(t,e,n,r){function o(e,n){a(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},a(t,e,n,r)}function l(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function s(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){l(o,r,i,a,s,"next",t)}function s(t){l(o,r,i,a,s,"throw",t)}a(void 0)})}}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,y(r.key),r)}}function c(t,e,n){return e=p(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,d()?Reflect.construct(e,n||[],p(t).constructor):e.apply(t,n))}function d(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(d=function(){return!!t})()}function f(t,e,n,r){var i=h(p(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function h(){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},h.apply(null,arguments)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}function y(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{LayoutComponent:()=>w});var m,b,g,w=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=c(this,e,[t,r])).templateId=e.templateId,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&v(t,e)}(e,t),n=e,r=[{key:"validateStructure",value:function(){if(f(e,"validateStructure",this,3)([]),!this.container)throw new Error("Layout requires a container")}},{key:"init",value:(d=s(o().m(function t(){return o().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return d.apply(this,arguments)})},{key:"render",value:(l=s(o().m(function t(){var n,r;return o().w(function(t){for(;;)switch(t.n){case 0:return n=Array.from(this.container.childNodes),t.n=1,f(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".holi-layout"),this.content=this.container.querySelector('[data-role="layout-content"]'),!this.content){t.n=3;break}return(r=this.content).replaceChildren.apply(r,n),t.n=2,this.createChildren();case 2:this.syncChildren();case 3:return t.a(2)}},t,this)})),function(){return l.apply(this,arguments)})}],a=[{key:"selector",get:function(){return"layout"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"layout"}},{key:"assignNamedBlocks",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Map,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=new Set;n.forEach(function(n,r){var o=e.findNamedSlot(t,r);if(o){i.add(r);var a=Array.from(o.childNodes),l=e.buildBlockFragment(n,a);o.replaceWith(l)}else{if("head"===r){var s=t.querySelector("layout-head, [data-layout-head]");if(!(s instanceof Element))return;return i.add(r),void e.applyBlockToContainer(s,n)}if("tail"===r){var u=t.querySelector("tail, [data-layout-tail]");if(!(u instanceof Element))return;i.add(r),e.applyBlockToContainer(u,n)}}}),this.resolveRemainingSlots(t,{inheritMissing:!!r.inheritMissing});var o=Array.from(n.keys()).filter(function(t){return!i.has(t)});return{usedNames:Array.from(i),unusedNames:o}}},{key:"buildBlockFragment",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=document.createDocumentFragment(),r=Array.isArray(null==t?void 0:t.contentNodes)?t.contentNodes:[];(r.length>0?r:e).forEach(function(t){n.appendChild(t)});var i=(null==t?void 0:t.regions)instanceof Map?t.regions:new Map;return i.size>0&&this.assignNamedRegions(n,i),n}},{key:"applyBlockToContainer",value:function(t,e){if(t instanceof Element){(Array.isArray(null==e?void 0:e.contentNodes)?e.contentNodes:[]).forEach(function(e){t.appendChild(e)});var n=(null==e?void 0:e.regions)instanceof Map?e.regions:new Map;n.size>0&&this.assignNamedRegions(t,n)}}},{key:"assignNamedRegions",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Map;n.forEach(function(r,o){var a=e.findNamedSlot(t,o);if(a){if(r&&r.length)return a.replaceWith.apply(a,function(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(r)),void n.delete(o);a.replaceWith(),n.delete(o)}}),this.resolveRemainingSlots(t,{inheritMissing:!1})}},{key:"resolveRemainingSlots",value:function(t){var e=!!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).inheritMissing;Array.from(t.querySelectorAll("slot")).forEach(function(t){if(e){var n=Array.from(t.childNodes);t.replaceWith.apply(t,n)}else t.replaceWith()})}},{key:"findNamedSlot",value:function(t,e){for(var n=Array.from(t.querySelectorAll("slot")),r=0;r<n.length;r+=1){var i=n[r];if(String(i.getAttribute("name")||"default").trim()===e)return i}return null}}],r&&u(n.prototype,r),a&&u(n,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,a,l,d}(n(8812).Component);m=w,g="layout-template",(b=y(b="templateId"))in m?Object.defineProperty(m,b,{value:g,enumerable:!0,configurable:!0,writable:!0}):m[b]=g,"undefined"!=typeof window&&(window.LayoutComponent=w)},2819(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function l(n,r,i,a){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return o(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,o(h,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(h),o(h,a,"Generator"),o(h,r,function(){return this}),o(h,"toString",function(){return"[object Generator]"}),(i=function(){return{w:l,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function l(t){a(o,r,i,l,s,"next",t)}function s(t){a(o,r,i,l,s,"throw",t)}l(void 0)})}}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,v(r.key),r)}}function u(t,e,n){return e=h(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,n||[],h(t).constructor):e.apply(t,n))}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function d(t,e,n,r){var i=f(h(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},f.apply(null,arguments)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function v(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{LoaderComponent:()=>g});var y,m,b,g=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=u(this,e,[t,r])).templateId=e.templateId,n.scope=n.resolveScope(n.readAttr("scope","inline")),n.message=n.readAttr("message","Loading..."),n.visible=n.readBooleanAttr("visible",!1),n.size=n.resolveSize(n.readAttr("size","md")),n.type=n.resolveType(n.readAttr("type",n.readAttr("shape","spinner"))),n.hostSelector=n.readAttr("host",""),n.host=null,n.appliedRelativeHost=!1,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&p(t,e)}(e,t),n=e,r=[{key:"readAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.container.getAttribute(t);if(null!=n)return String(n);var r=this.container.getAttribute("data-".concat(t));return null!=r?String(r):e}},{key:"readBooleanAttr",value:function(t,e){var n=this.readAttr(t,"");if(!n)return e;var r=n.trim().toLowerCase();return!!["true","1","yes","on"].includes(r)||!["false","0","no","off"].includes(r)&&e}},{key:"resolveScope",value:function(t){var e=String(t||"inline").trim().toLowerCase();return"page"===e||"block"===e||"inline"===e?e:"inline"}},{key:"resolveSize",value:function(t){var e=String(t||"md").trim().toLowerCase();return"sm"===e||"md"===e||"lg"===e?e:"md"}},{key:"resolveType",value:function(t){var e=String(t||"spinner").trim().toLowerCase();return"spinner"===e||"circle"===e?"spinner":"dots"===e||"dot"===e?"dots":"spinner"}},{key:"resolveHost",value:function(){if("page"===this.scope||"undefined"==typeof document)return null;if(this.hostSelector){var t=document.querySelector(this.hostSelector);if(t)return t}return this.container.parentElement||this.container}},{key:"ensureHostPositionContext",value:function(){this.host&&"page"!==this.scope&&"undefined"!=typeof window&&"static"===window.getComputedStyle(this.host).position&&(this.host.style.position="relative",this.appliedRelativeHost=!0)}},{key:"init",value:(c=l(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return c.apply(this,arguments)})},{key:"render",value:(a=l(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,d(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".holi-loader"),this.messageEl=this.container.querySelector('[data-role="loader-message"]'),this.spinnerEl=this.container.querySelector('[data-role="loader-spinner"]'),this.element&&this.messageEl){t.n=2;break}throw new Error("Loader template is missing required nodes");case 2:this.element.setAttribute("data-scope",this.scope),this.element.setAttribute("data-size",this.size),this.element.setAttribute("data-type",this.type),this.spinnerEl&&this.spinnerEl.setAttribute("data-type",this.type),"block"===this.scope?(this.host=this.resolveHost(),this.host&&this.element.parentElement!==this.host&&(this.host.appendChild(this.element),this.ensureHostPositionContext()),this.container.hidden=!0):this.container.hidden=!1,this.setMessage(this.message),this.setVisible(this.visible),void 0===this.container.loader&&Object.defineProperty(this.container,"loader",{value:this,writable:!1});case 3:return t.a(2)}},t,this)})),function(){return a.apply(this,arguments)})},{key:"setMessage",value:function(t){var e=String(t||"Loading...");this.message=e,this.messageEl&&(this.messageEl.textContent=e)}},{key:"setVisible",value:function(t){this.visible=!!t,this.element&&(this.element.hidden=!this.visible,this.element.setAttribute("aria-hidden",this.visible?"false":"true"))}},{key:"show",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";t&&this.setMessage(t),this.setVisible(!0)}},{key:"hide",value:function(){this.setVisible(!1)}},{key:"setLoading",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";t?this.show(e):this.hide()}},{key:"destroy",value:function(){this.appliedRelativeHost&&this.host&&(this.host.style.position=""),d(e,"destroy",this,3)([])}}],o=[{key:"selector",get:function(){return"loader"}},{key:"getNativeSelectors",value:function(){return["[data-loader]"]}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"loader"}}],r&&s(n.prototype,r),o&&s(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,a,c}(n(8812).Component);y=g,b="loader-template",(m=v(m="templateId"))in y?Object.defineProperty(y,m,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[m]=b,"undefined"!=typeof window&&(window.LoaderComponent=g)},4833(t,e,n){"use strict";n.r(e),n.d(e,{LocaleSwitcherComponent:()=>S});var r=n(8812),i=n(6595);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach(function(e){g(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function s(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,c=Object.create(s.prototype);return u(c,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var a={};function l(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(u(e={},r,function(){return this}),e),h=d.prototype=l.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,u(h,"constructor",d),u(d,"constructor",c),c.displayName="GeneratorFunction",u(d,i,"GeneratorFunction"),u(h),u(h,i,"Generator"),u(h,r,function(){return this}),u(h,"toString",function(){return"[object Generator]"}),(s=function(){return{w:o,m:p}})()}function u(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}u=function(t,e,n,r){function o(e,n){u(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},u(t,e,n,r)}function c(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function d(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){c(o,r,i,a,l,"next",t)}function l(t){c(o,r,i,a,l,"throw",t)}a(void 0)})}}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,w(r.key),r)}}function h(t,e,n){return e=m(e),function(t,e){if(e&&("object"==o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,p()?Reflect.construct(e,n||[],m(t).constructor):e.apply(t,n))}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(p=function(){return!!t})()}function v(t,e,n,r){var i=y(m(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function y(){return y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=m(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},y.apply(null,arguments)}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}function g(t,e,n){return(e=w(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function w(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var S=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=h(this,e,[t,r])).templateId=e.templateId,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&b(t,e)}(e,t),n=e,r=[{key:"validateStructure",value:function(){if(v(e,"validateStructure",this,3)([]),!this.container)throw new Error("LocaleSwitcher requires a container")}},{key:"init",value:(u=d(s().m(function t(){return s().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return u.apply(this,arguments)})},{key:"getBindingContext",value:function(){var t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return v(e,"getBindingContext",this,3)([l({label:(null===(t=this.container)||void 0===t?void 0:t.getAttribute("label"))||(null===(n=this.container)||void 0===n?void 0:n.getAttribute("data-label"))||"Language"},r)])}},{key:"render",value:(a=d(s().m(function t(){var n;return s().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,v(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-localeswitcher"),this.select=this.container.querySelector('[data-role="locale-select"]'),this.labelEl=this.container.querySelector('[data-role="locale-label"]'),this.renderOptions(),this.applyCurrentLocale(),this.boundChange||(this.boundChange=this.handleChange.bind(this)),null===(n=this.select)||void 0===n||n.addEventListener("change",this.boundChange);case 2:return t.a(2)}},t,this)})),function(){return a.apply(this,arguments)})},{key:"getLocaleOptions",value:function(){var t,e,n,r=String((null===(t=this.container)||void 0===t?void 0:t.getAttribute("locales"))||(null===(e=this.container)||void 0===e?void 0:e.getAttribute("languages"))||(null===(n=this.container)||void 0===n?void 0:n.getAttribute("data-locales"))||"");return r?r.split(/[\r\n,]+/).map(function(t){return String(t||"").trim()}).filter(Boolean).map(function(t){var e=t.split(":"),n=String(e[0]||"").trim(),r=String(e[1]||e[0]||"").trim(),o=i.G.getLocale(n)||{};return{value:n,label:r||o.label||n}}).filter(function(t){return t.value}):i.G.getLocales().map(function(t){return{value:t.code,label:t.label||t.code}})}},{key:"renderOptions",value:function(){var t=this;if(this.select instanceof HTMLSelectElement){var e=this.getLocaleOptions();this.select.replaceChildren(),e.forEach(function(e){var n=document.createElement("option");n.value=e.value,n.textContent=e.label,t.select.appendChild(n)})}}},{key:"getCurrentLocale",value:function(){var t,e,n=String((null===(t=this.container)||void 0===t?void 0:t.getAttribute("value"))||"").trim();if(n)return n;var r=i.G.getActiveLocale();return null!=r&&r.code?r.code:(null===(e=this.getLocaleOptions()[0])||void 0===e?void 0:e.value)||""}},{key:"applyCurrentLocale",value:function(){var t=this.getCurrentLocale();t&&(this.select&&(this.select.value=t),this.applyLocale(t,{dispatch:!1}))}},{key:"handleChange",value:function(t){var e,n=String((null==t||null===(e=t.target)||void 0===e?void 0:e.value)||"").trim();n&&this.applyLocale(n,{dispatch:!0})}},{key:"applyLocale",value:function(t){var e,n,r,o,a,s,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};null===(e=this.container)||void 0===e||null===(n=e.setAttribute)||void 0===n||n.call(e,"value",t);var c=i.G.applyLocale(t,{dispatch:u.dispatch,source:this});if(!1!==u.dispatch&&c){var d={locale:c.code,lang:c.code,language:c.code,definition:l({},c),component:this};null===(r=this.container)||void 0===r||null===(o=r.dispatchEvent)||void 0===o||o.call(r,new CustomEvent("localechange",{detail:d})),null===(a=this.container)||void 0===a||null===(s=a.dispatchEvent)||void 0===s||s.call(a,new CustomEvent("languagechange",{detail:d}))}}},{key:"destroy",value:function(){var t;null===(t=this.select)||void 0===t||t.removeEventListener("change",this.boundChange),v(e,"destroy",this,3)([])}}],o=[{key:"selector",get:function(){return"localeswitcher"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"localeswitcher"}}],r&&f(n.prototype,r),o&&f(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,a,u}(r.Component);g(S,"templateId","localeswitcher-template"),"undefined"!=typeof window&&(window.LocaleSwitcherComponent=S)},622(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function l(n,r,i,a){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return o(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,o(h,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(h),o(h,a,"Generator"),o(h,r,function(){return this}),o(h,"toString",function(){return"[object Generator]"}),(i=function(){return{w:l,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function l(t){a(o,r,i,l,s,"next",t)}function s(t){a(o,r,i,l,s,"throw",t)}l(void 0)})}}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,v(r.key),r)}}function u(t,e,n){return e=h(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,n||[],h(t).constructor):e.apply(t,n))}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function d(t,e,n,r){var i=f(h(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},f.apply(null,arguments)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function v(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{MenubarComponent:()=>g});var y,m,b,g=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=u(this,e,[t,r])).templateId=e.templateId,n.baseMode=n.resolveMode(t),n.mode=n.baseMode,n.mobileBreakpoint=n.parseNumber(t.getAttribute("mobile-breakpoint"),768),n.mobileToggleMode=n.resolveMobileToggleMode(t),n.responsiveMenuEnabled="bar"===n.baseMode&&!t.hasAttribute("disable-mobile-menu"),n.openOnClick=t.hasAttribute("open-on-click"),n.hoverCloseDelay=n.parseNumber(t.getAttribute("hover-close-delay"),150),n.isOpen=!1,n.element=null,n.menuRoot=null,n.menuHost=null,n.toggleButton=null,n.boundOutsideClick=null,n.boundViewportChange=null,n.boundContainerResize=null,n.resizeObserver=null,n.closeTimer=null,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&p(t,e)}(e,t),n=e,r=[{key:"resolveMode",value:function(t){var e=String(t.getAttribute("mode")||"").trim().toLowerCase();return"single"===e||"button"===e||t.hasAttribute("single-button")||t.hasAttribute("menu-button")?"single":"bar"}},{key:"parseNumber",value:function(t,e){var n=Number(t);return Number.isFinite(n)?n:e}},{key:"resolveMobileToggleMode",value:function(t){return"icon"===String(t.getAttribute("data-mobile-toggle")||t.getAttribute("mobile-toggle")||"button").trim().toLowerCase()?"icon":"button"}},{key:"validateStructure",value:function(){if(d(e,"validateStructure",this,3)([]),!(this.container.querySelector('[slot="menu"]')||this.container.querySelector("ul")||this.container.querySelector("ol")))throw new Error('Menubar requires menu markup in slot="menu".')}},{key:"init",value:(c=l(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents();case 2:return t.a(2)}},t,this)})),function(){return c.apply(this,arguments)})},{key:"render",value:(a=l(i().m(function t(){var n,r,o,a;return i().w(function(t){for(;;)switch(t.n){case 0:return o=this.container.querySelector('[slot="menu"]')||this.container.querySelector("ul, ol"),t.n=1,d(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-menubar"),this.menuHost=this.container.querySelector('[data-role="menu-host"]'),this.toggleButton=this.container.querySelector('[data-role="toggle"]'),null===(n=this.element)||void 0===n||n.setAttribute("data-mode",this.mode),null===(r=this.element)||void 0===r||r.setAttribute("data-open-on-click",this.openOnClick?"true":"false"),o&&this.menuHost&&this.menuHost.replaceChildren(o),(a=this.container.getAttribute("label"))&&this.toggleButton&&(this.toggleButton.textContent=a),this.prepareMenuTree(),this.applyTogglePresentation(),this.applyResponsiveMode(),this.applyMode();case 2:return t.a(2)}},t,this)})),function(){return a.apply(this,arguments)})},{key:"prepareMenuTree",value:function(){var t,e=null===(t=this.menuHost)||void 0===t?void 0:t.querySelector('ul, ol, [role="menu"]');e&&(this.menuRoot=e,this.menuRoot.classList.add("holi-menu-level","holi-menu-root"),this.menuRoot.setAttribute("role","bar"===this.mode?"menubar":"menu"),this.decorateLevel(this.menuRoot,!0),this.closeAllSubmenus())}},{key:"decorateLevel",value:function(t,e){var n=this;Array.from(t.children).filter(function(t){return"LI"===t.tagName}).forEach(function(t){t.classList.add("holi-menu-item");var r=n.getTrigger(t),i=n.getSubmenu(t);r&&(r.classList.add("holi-menu-trigger"),r.setAttribute("role","menuitem"),r.setAttribute("tabindex",e?"0":"-1"),i&&(t.classList.add("has-submenu"),i.classList.add("holi-menu-level","holi-submenu"),i.setAttribute("role","menu"),i.hidden=!0,r.setAttribute("aria-haspopup","true"),r.setAttribute("aria-expanded","false"),n.decorateLevel(i,!1)))})}},{key:"getTrigger",value:function(t){for(var e=Array.from(t.children),n=0;n<e.length;n+=1){var r=e[n],i=r.tagName;if("A"===i||"BUTTON"===i||r.hasAttribute("data-menu-trigger"))return r}return null}},{key:"getSubmenu",value:function(t){for(var e=Array.from(t.children),n=0;n<e.length;n+=1){var r=e[n],i=r.tagName;if("UL"===i||"OL"===i)return r}return null}},{key:"applyMode",value:function(){var t,e;this.toggleButton&&this.menuRoot&&(null===(t=this.element)||void 0===t||t.setAttribute("data-mode",this.mode),this.menuRoot.setAttribute("role","bar"===this.mode?"menubar":"menu"),this.isOpen=!1,null===(e=this.element)||void 0===e||e.setAttribute("data-open","false"),this.closeAllSubmenus(),this.applyTogglePresentation(),"single"===this.mode?(this.toggleButton.hidden=!1,this.toggleButton.setAttribute("aria-expanded","false"),this.menuRoot.hidden=!0,this.menuRoot.setAttribute("aria-hidden","true")):(this.toggleButton.hidden=!0,this.toggleButton.setAttribute("aria-expanded","false"),this.menuRoot.hidden=!1,this.menuRoot.setAttribute("aria-hidden","false")))}},{key:"applyTogglePresentation",value:function(){if(this.toggleButton){var t=String(this.container.getAttribute("label")||"Menu").trim()||"Menu",e=String(this.container.getAttribute("mobile-icon-label")||t).trim()||"Menu";this.toggleButton.setAttribute("data-toggle-appearance",this.mobileToggleMode),this.toggleButton.setAttribute("title","icon"===this.mobileToggleMode?e:""),this.toggleButton.setAttribute("aria-label","icon"===this.mobileToggleMode?e:t),this.toggleButton.textContent="icon"===this.mobileToggleMode?"":t}}},{key:"applyResponsiveMode",value:function(){var t,e;if(this.responsiveMenuEnabled&&this.menuRoot){var n=window.innerWidth||document.documentElement.clientWidth,r=(null===(t=(e=this.container).getBoundingClientRect)||void 0===t?void 0:t.call(e).width)||n,i=Math.min(n,r)<=this.mobileBreakpoint?"single":this.baseMode;i!==this.mode&&(this.mode=i,this.applyMode())}}},{key:"bindEvents",value:function(){var t=this;this.element&&this.menuRoot&&(this.element.addEventListener("click",function(e){if(e.target.closest('[data-role="toggle"]'))return e.preventDefault(),void t.toggleMenu();var n=e.target.closest(".holi-menu-trigger");if(n){var r=n.closest(".holi-menu-item");if(t.getSubmenu(r))return e.preventDefault(),void t.toggleSubmenu(r);"single"===t.mode?t.closeMenu():t.closeAllSubmenus()}}),this.openOnClick||this.element.addEventListener("mouseover",function(e){if("bar"===t.mode){t.cancelScheduledClose();var n=e.target.closest(".holi-menu-trigger");if(n){var r=n.closest(".holi-menu-item");t.getSubmenu(r)&&t.openSubmenuBranch(r)}}}),this.element.addEventListener("focusin",function(e){if("bar"===t.mode){t.cancelScheduledClose();var n=e.target.closest(".holi-menu-trigger");if(n){var r=n.closest(".holi-menu-item");t.getSubmenu(r)&&t.openSubmenuBranch(r)}}}),this.element.addEventListener("mouseleave",function(){"bar"===t.mode&&t.scheduleCloseAllSubmenus()}),this.element.addEventListener("mouseenter",function(){"bar"===t.mode&&t.cancelScheduledClose()}),this.element.addEventListener("keydown",function(e){return t.handleKeydown(e)}),this.boundOutsideClick=function(e){t.container.contains(e.target)||(t.closeAllSubmenus(),"single"===t.mode&&t.closeMenu())},document.addEventListener("click",this.boundOutsideClick),this.responsiveMenuEnabled&&(this.boundViewportChange=function(){return t.applyResponsiveMode()},window.addEventListener("resize",this.boundViewportChange),"undefined"!=typeof ResizeObserver&&(this.boundContainerResize=function(){return t.applyResponsiveMode()},this.resizeObserver=new ResizeObserver(this.boundContainerResize),this.resizeObserver.observe(this.container))))}},{key:"handleKeydown",value:function(t){var e=t.target.closest(".holi-menu-trigger");if(e){var n;if("Escape"===t.key)return this.closeAllSubmenus(),"single"===this.mode&&this.closeMenu(),void(null===(n=this.toggleButton)||void 0===n||n.focus());if("ArrowRight"===t.key||"ArrowLeft"===t.key){if(!e.closest(".holi-menu-root"))return;return t.preventDefault(),void this.moveTopLevelFocus(e,"ArrowRight"===t.key?1:-1)}if("ArrowDown"!==t.key){if("Enter"===t.key||" "===t.key){var r=e.closest(".holi-menu-item");if(!this.getSubmenu(r))return;t.preventDefault(),this.toggleSubmenu(r)}}else{var i=e.closest(".holi-menu-item"),o=this.getSubmenu(i);if(!o)return;t.preventDefault(),this.openSubmenuBranch(i);var a=Array.from(o.children).find(function(t){var e;return null===(e=t.classList)||void 0===e?void 0:e.contains("holi-menu-item")}),l=a?this.getTrigger(a):null;null==l||l.focus()}}else"Escape"===t.key&&(this.closeAllSubmenus(),"single"===this.mode&&this.closeMenu())}},{key:"moveTopLevelFocus",value:function(t,e){var n,r=this;if(this.menuRoot){var i=Array.from(this.menuRoot.children).filter(function(t){var e;return null===(e=t.classList)||void 0===e?void 0:e.contains("holi-menu-item")}).map(function(t){return r.getTrigger(t)}).filter(Boolean);if(i.length){var o=i.indexOf(t);o<0||null===(n=i[(o+e+i.length)%i.length])||void 0===n||n.focus()}}}},{key:"toggleMenu",value:function(){this.isOpen?this.closeMenu():this.openMenu()}},{key:"openMenu",value:function(){var t,e;"single"===this.mode&&this.menuRoot&&(this.isOpen=!0,this.menuRoot.hidden=!1,this.menuRoot.setAttribute("aria-hidden","false"),null===(t=this.toggleButton)||void 0===t||t.setAttribute("aria-expanded","true"),null===(e=this.element)||void 0===e||e.setAttribute("data-open","true"))}},{key:"closeMenu",value:function(){var t,e;"single"===this.mode&&this.menuRoot&&(this.isOpen=!1,this.closeAllSubmenus(),this.menuRoot.hidden=!0,this.menuRoot.setAttribute("aria-hidden","true"),null===(t=this.toggleButton)||void 0===t||t.setAttribute("aria-expanded","false"),null===(e=this.element)||void 0===e||e.setAttribute("data-open","false"))}},{key:"toggleSubmenu",value:function(t){var e=this.getSubmenu(t);e&&(e.hidden?this.openSubmenuBranch(t):this.closeSubmenu(t))}},{key:"openSubmenuBranch",value:function(t){var e=this,n=this.getItemPath(t);this.closeAllSubmenus(n),n.forEach(function(t){var n=e.getSubmenu(t),r=e.getTrigger(t);n&&r&&(n.hidden=!1,t.classList.add("open"),r.setAttribute("aria-expanded","true"),e.applySubmenuAlignment(t))})}},{key:"closeSubmenu",value:function(t){var e=this,n=this.getSubmenu(t),r=this.getTrigger(t);n&&r&&(Array.from(n.querySelectorAll(".holi-menu-item")).forEach(function(t){var n=e.getSubmenu(t),r=e.getTrigger(t);n&&(n.hidden=!0),r&&r.setAttribute("aria-expanded","false"),t.classList.remove("open")}),n.hidden=!0,r.setAttribute("aria-expanded","false"),t.classList.remove("open"))}},{key:"closeAllSubmenus",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(this.menuRoot){var n=new Set(e);Array.from(this.menuRoot.querySelectorAll(".holi-menu-item.has-submenu")).forEach(function(e){n.has(e)||t.closeSubmenu(e)})}}},{key:"scheduleCloseAllSubmenus",value:function(){var t=this;this.cancelScheduledClose(),this.closeTimer=setTimeout(function(){t.closeAllSubmenus()},this.hoverCloseDelay)}},{key:"cancelScheduledClose",value:function(){this.closeTimer&&(clearTimeout(this.closeTimer),this.closeTimer=null)}},{key:"applySubmenuAlignment",value:function(t){var e,n=this.getSubmenu(t);if(n){t.removeAttribute("data-submenu-align"),n.style.left="",n.style.right="";var r=t.parentElement,i=null==r||null===(e=r.classList)||void 0===e?void 0:e.contains("holi-menu-root"),o=n.getBoundingClientRect(),a=window.innerWidth||document.documentElement.clientWidth;o.right>a-8?i?t.setAttribute("data-submenu-align","viewport"):t.setAttribute("data-submenu-align","left"):o.left<8&&!i&&t.setAttribute("data-submenu-align","right")}}},{key:"getItemPath",value:function(t){for(var e=[],n=t;n&&null!==(r=n.classList)&&void 0!==r&&r.contains("holi-menu-item");){var r;this.getSubmenu(n)&&e.unshift(n);var i=n.parentElement;n=i?i.closest(".holi-menu-item"):null}return e}},{key:"destroy",value:function(){this.cancelScheduledClose(),this.boundOutsideClick&&(document.removeEventListener("click",this.boundOutsideClick),this.boundOutsideClick=null),this.boundViewportChange&&(window.removeEventListener("resize",this.boundViewportChange),this.boundViewportChange=null),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null,this.boundContainerResize=null),d(e,"destroy",this,3)([])}}],o=[{key:"selector",get:function(){return"menubar"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"menubar"}}],r&&s(n.prototype,r),o&&s(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,a,c}(n(8812).Component);y=g,b="menubar-template",(m=v(m="templateId"))in y?Object.defineProperty(y,m,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[m]=b,"undefined"!=typeof window&&(window.MenubarComponent=g)},6641(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function o(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function l(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return a(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(a(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,a(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,a(h,"constructor",d),a(d,"constructor",c),c.displayName="GeneratorFunction",a(d,i,"GeneratorFunction"),a(h),a(h,i,"Generator"),a(h,r,function(){return this}),a(h,"toString",function(){return"[object Generator]"}),(o=function(){return{w:l,m:p}})()}function a(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}a=function(t,e,n,r){function o(e,n){a(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},a(t,e,n,r)}function l(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function s(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){l(o,r,i,a,s,"next",t)}function s(t){l(o,r,i,a,s,"throw",t)}a(void 0)})}}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,y(r.key),r)}}function c(t,e,n){return e=p(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,d()?Reflect.construct(e,n||[],p(t).constructor):e.apply(t,n))}function d(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(d=function(){return!!t})()}function f(t,e,n,r){var i=h(p(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function h(){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},h.apply(null,arguments)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}function y(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{OfflineIndicator:()=>w});var m,b,g,w=function(t){function e(t){var n,r,i,o,a,l,s,u,d,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(d=c(this,e,[t,f])).templateId=e.templateId,d.scope=d.resolveScope(null!==(n=f.scope)&&void 0!==n?n:d.readAttr("scope","page")),d.position=d.resolvePosition(null!==(r=f.position)&&void 0!==r?r:d.readAttr("position","bottom-right")),d.hostSelector=String(null!==(i=f.hostSelector)&&void 0!==i?i:d.readAttr("host","")).trim(),d.duration=d.parseNumber(null!==(o=f.duration)&&void 0!==o?o:d.readAttr("duration","4000"),4e3),d.maxAttempts=d.parseNumber(null!==(a=f.maxAttempts)&&void 0!==a?a:d.readAttr("max-attempts","5"),5),d.heartbeatMs=d.parseNumber(null!==(l=f.heartbeatMs)&&void 0!==l?l:d.readAttr("heartbeat-ms","5000"),5e3),d.probeTimeoutMs=d.parseNumber(null!==(s=f.probeTimeoutMs)&&void 0!==s?s:d.readAttr("probe-timeout-ms","3000"),3e3),d.pingUrl=String(null!==(u=f.pingUrl)&&void 0!==u?u:d.readAttr("ping-url",d.resolveDefaultPingUrl())).trim(),d.syncQueue=[],d.reconnectAttempts=0,d.isOnline="undefined"==typeof navigator||navigator.onLine,d.heartbeatTimer=null,d.hideTimer=null,d.lastProbeSucceeded=d.isOnline,d.host=null,d.appliedRelativeHost=!1,d.boundOnline=function(){return d.evaluateConnection()},d.boundOffline=function(){return d.onOffline()},d.boundSyncAdd=function(t){return d.handleSyncAdd(t)},d.boundSyncClear=function(){return d.clearSyncQueue()},d.boundRetry=function(){return d.retryConnection()},d.init(),d}return function(t,e){if("function"!=typeof e&&null!==e)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&&v(t,e)}(e,t),n=e,r=[{key:"readAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.container.getAttribute(t);if(null!=n)return String(n);var r=this.container.getAttribute("data-".concat(t));return null!=r?String(r):e}},{key:"parseNumber",value:function(t,e){var n=Number(t);return Number.isFinite(n)?n:e}},{key:"resolveScope",value:function(t){var e=String(t||"page").trim().toLowerCase();return"inline"===e||"block"===e?e:"page"}},{key:"resolvePosition",value:function(t){var e=String(t||"bottom-right").trim().toLowerCase();return new Set(["top-left","top-right","bottom-left","bottom-right","top-center","bottom-center"]).has(e)?e:"bottom-right"}},{key:"resolveDefaultPingUrl",value:function(){return"/api/ping"}},{key:"resolveHost",value:function(){if("page"===this.scope||"undefined"==typeof document)return null;if(this.hostSelector){var t=document.querySelector(this.hostSelector);if(t)return t}return this.container.parentElement||this.container}},{key:"ensureHostPositionContext",value:function(){this.host&&"block"===this.scope&&"undefined"!=typeof window&&"static"===window.getComputedStyle(this.host).position&&(this.host.style.position="relative",this.appliedRelativeHost=!0)}},{key:"init",value:(d=s(o().m(function t(){return o().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents(),this.startNetworkWatcher(),this.checkStatus();case 2:return t.a(2)}},t,this)})),function(){return d.apply(this,arguments)})},{key:"render",value:(l=s(o().m(function t(){return o().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,f(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".holi-offline-indicator"),this.statusEl=this.container.querySelector('[data-role="status-text"]'),this.syncEl=this.container.querySelector('[data-role="sync-text"]'),this.attemptEl=this.container.querySelector('[data-role="attempt-text"]'),this.retryButton=this.container.querySelector('[data-action="retry"]'),this.element&&this.statusEl&&this.syncEl&&this.attemptEl&&this.retryButton){t.n=2;break}throw new Error("Offline template is missing required nodes");case 2:this.container.hidden=!1,this.element.setAttribute("data-scope",this.scope),this.element.setAttribute("data-position",this.position),this.updateSyncCount(),this.updateAttemptCount(),"block"===this.scope&&(this.host=this.resolveHost(),this.host&&this.element.parentElement!==this.host&&(this.host.appendChild(this.element),this.ensureHostPositionContext()),this.container.hidden=!0),this.setVisible(!this.isOnline),this.updateStatusView(),void 0===this.container.offlineIndicator&&Object.defineProperty(this.container,"offlineIndicator",{value:this,writable:!1});case 3:return t.a(2)}},t,this)})),function(){return l.apply(this,arguments)})},{key:"bindEvents",value:function(){var t;null===(t=this.retryButton)||void 0===t||t.addEventListener("click",this.boundRetry),"undefined"!=typeof window&&(window.addEventListener("online",this.boundOnline),window.addEventListener("offline",this.boundOffline)),"undefined"!=typeof document&&(document.addEventListener("sync-queue:add",this.boundSyncAdd),document.addEventListener("sync-queue:clear",this.boundSyncClear))}},{key:"startNetworkWatcher",value:function(){var t=this;"undefined"==typeof window||this.heartbeatMs<=0||(this.stopNetworkWatcher(),this.heartbeatTimer=window.setInterval(function(){t.evaluateConnection()},this.heartbeatMs))}},{key:"stopNetworkWatcher",value:function(){this.heartbeatTimer&&"undefined"!=typeof window&&window.clearInterval(this.heartbeatTimer),this.heartbeatTimer=null}},{key:"ping",value:function(){if("undefined"==typeof fetch||!this.pingUrl)return Promise.reject(new Error("Ping is unavailable"));var t=new URL(this.pingUrl,"undefined"!=typeof window?window.location.href:"http://localhost/");t.searchParams.set("_ts",String(Date.now()));var e="undefined"!=typeof AbortController?new AbortController:null,n=e&&"undefined"!=typeof window?window.setTimeout(function(){return e.abort()},Math.max(250,this.probeTimeoutMs)):null;return fetch(t.toString(),{method:"GET",cache:"no-store",keepalive:!0,signal:null==e?void 0:e.signal}).then(function(t){if(!t||!t.ok)throw new Error("Ping failed with status ".concat((null==t?void 0:t.status)||"unknown"));return t}).finally(function(){n&&"undefined"!=typeof window&&window.clearTimeout(n)})}},{key:"evaluateConnection",value:function(){var t=this;return this.ping().then(function(){return t.lastProbeSucceeded=!0,t.isOnline||t.onOnline(),!0}).catch(function(){return t.lastProbeSucceeded=!1,(t.isOnline||"undefined"!=typeof navigator&&navigator.onLine)&&t.onOffline(),!1})}},{key:"checkStatus",value:function(){"undefined"!=typeof navigator?navigator.onLine?this.evaluateConnection():this.onOffline():this.onOnline()}},{key:"handleSyncAdd",value:function(t){var e=null==t?void 0:t.detail;this.syncQueue.push(e),this.updateSyncCount()}},{key:"clearSyncQueue",value:function(){this.syncQueue=[],this.updateSyncCount()}},{key:"updateSyncCount",value:function(){if(this.syncEl){var t=this.syncQueue.length;this.syncEl.textContent="".concat(t," pending")}}},{key:"updateAttemptCount",value:function(){this.attemptEl&&(this.attemptEl.textContent="Retry ".concat(this.reconnectAttempts,"/").concat(this.maxAttempts))}},{key:"updateStatusView",value:function(){if(this.element&&this.statusEl&&this.retryButton){var t=this.isOnline?"online":"offline";this.element.setAttribute("data-status",t),this.statusEl.textContent=this.isOnline?"Back online":"Offline",this.retryButton.disabled=this.isOnline,this.updateAttemptCount()}}},{key:"setVisible",value:function(t){if(this.element){var e=!!t;this.hideTimer&&"undefined"!=typeof window&&(window.clearTimeout(this.hideTimer),this.hideTimer=null),this.element.hidden=!e,this.element.setAttribute("data-visible",e?"true":"false")}}},{key:"onOffline",value:function(){var t;this.isOnline=!1,this.reconnectAttempts=0,this.setVisible(!0),this.updateStatusView(),"undefined"!=typeof document&&(null===(t=document.body)||void 0===t||null===(t=t.classList)||void 0===t||t.add("app--offline"),document.dispatchEvent(new CustomEvent("app:offline")))}},{key:"onOnline",value:function(){var t,e=this;this.isOnline=!0,this.reconnectAttempts=0,this.updateStatusView(),"undefined"!=typeof document&&(null===(t=document.body)||void 0===t||null===(t=t.classList)||void 0===t||t.remove("app--offline")),this.syncQueue.length>0&&this.processSyncQueue(),"undefined"!=typeof window?this.hideTimer=window.setTimeout(function(){return e.setVisible(!1)},Math.max(0,this.duration)):this.setVisible(!1),"undefined"!=typeof document&&document.dispatchEvent(new CustomEvent("app:online"))}},{key:"retryConnection",value:function(){var t=this;this.reconnectAttempts+=1,this.setVisible(!0),this.statusEl.textContent="Retrying connection",this.updateAttemptCount(),this.notify("Reconnecting...");var e=Math.min(1e3*this.reconnectAttempts,1e4);"undefined"!=typeof window&&window.setTimeout(function(){t.evaluateConnection().then(function(e){if(!e){if(t.updateAttemptCount(),t.reconnectAttempts<t.maxAttempts)return t.statusEl.textContent="Still offline",void t.notify("Retry ".concat(t.reconnectAttempts,"/").concat(t.maxAttempts));t.statusEl.textContent="Connection lost",t.notify("Connection lost. Check your network.",{type:"error"})}})},e)}},{key:"processSyncQueue",value:function(){this.notify("".concat(this.syncQueue.length," items syncing...")),this.clearSyncQueue()}},{key:"notify",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=String(t||"").trim();if(r){var i="undefined"!=typeof window?null===(e=window.Q)||void 0===e?void 0:e.toast:null;"function"!=typeof i?"error"!==n.type?console.info(r):console.error(r):i(r,n)}}},{key:"simulateOffline",value:function(){this.onOffline()}},{key:"simulateOnline",value:function(){this.onOnline()}},{key:"destroy",value:function(){var t;this.stopNetworkWatcher(),"undefined"!=typeof window&&(window.removeEventListener("online",this.boundOnline),window.removeEventListener("offline",this.boundOffline),this.hideTimer&&window.clearTimeout(this.hideTimer)),"undefined"!=typeof document&&(document.removeEventListener("sync-queue:add",this.boundSyncAdd),document.removeEventListener("sync-queue:clear",this.boundSyncClear)),this.appliedRelativeHost&&this.host&&(this.host.style.position=""),null===(t=this.retryButton)||void 0===t||t.removeEventListener("click",this.boundRetry),f(e,"destroy",this,3)([])}}],a=[{key:"selector",get:function(){return"offline"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"offline"}},{key:"getNativeSelectors",value:function(){return["[data-offline]"]}},{key:"queue",value:function(t){"undefined"!=typeof document&&document.dispatchEvent(new CustomEvent("sync-queue:add",{detail:t}))}},{key:"clearQueue",value:function(){"undefined"!=typeof document&&document.dispatchEvent(new CustomEvent("sync-queue:clear"))}},{key:"create",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n="undefined"!=typeof document?document.querySelector('[data-offline], offline, [component="offline"], [role="offline"]'):null;if(null!=n&&n.offlineIndicator)return n.offlineIndicator;if(null!=n&&n.offlineindicator)return n.offlineindicator;if("undefined"==typeof document)return null;var r=document.createElement("section");return r.setAttribute("component","offline"),r.setAttribute("data-offline","true"),Object.entries(t||{}).forEach(function(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){u=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,2),n=e[0],o=e[1];null!=o&&r.setAttribute("data-".concat(n),String(o))}),document.body.appendChild(r),r.offlineIndicator||r.offlineindicator||new e(r,t)}}],r&&u(n.prototype,r),a&&u(n,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,a,l,d}(n(8812).Component);m=w,g="offline-template",(b=y(b="templateId"))in m?Object.defineProperty(m,b,{value:g,enumerable:!0,configurable:!0,writable:!0}):m[b]=g,"undefined"!=typeof window&&(window.OfflineIndicator=w)},4582(t,e,n){"use strict";n.r(e),n.d(e,{PageComponent:()=>L});var r=n(8812),i=n(166),o=n(4531);function a(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var a=r&&r.prototype instanceof u?r:u,c=Object.create(a.prototype);return l(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(l(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,l(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,l(h,"constructor",d),l(d,"constructor",c),c.displayName="GeneratorFunction",l(d,i,"GeneratorFunction"),l(h),l(h,i,"Generator"),l(h,r,function(){return this}),l(h,"toString",function(){return"[object Generator]"}),(a=function(){return{w:o,m:p}})()}function l(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}l=function(t,e,n,r){function o(e,n){l(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},l(t,e,n,r)}function s(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function u(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){s(o,r,i,a,l,"next",t)}function l(t){s(o,r,i,a,l,"throw",t)}a(void 0)})}}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,f(r.key),r)}}function f(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}var h,p,v,y=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"getGlobalConfig",value:function(){var t=window.HoliConfig;return t&&"object"===c(t)?t:{}}},{key:"normalizeBase",value:function(){var t=String((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")||"").trim();return t?t.endsWith("/")?t:"".concat(t,"/"):""}},{key:"getLayoutName",value:function(t){var e;return String((null==t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"layout"))||"").trim()}},{key:"getExplicitSource",value:function(t){var e,n;return String((null==t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"layout-src"))||(null==t||null===(n=t.getAttribute)||void 0===n?void 0:n.call(t,"layoutSrc"))||"").trim()}},{key:"getBaseCandidates",value:function(t){var e,n,r=this,i=this.getGlobalConfig();return[null==t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"layouts-base"),null==t||null===(n=t.getAttribute)||void 0===n?void 0:n.call(t,"layout-base"),i.layoutsBase,i.layoutBase,"/dist/layouts/","/layouts/"].map(function(t){return r.normalizeBase(t)}).filter(function(t,e,n){return t&&n.indexOf(t)===e})}},{key:"getCandidateUrls",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.getExplicitSource(t);if(n)return[n];var r=String(e||this.getLayoutName(t)).trim();return r?this.getBaseCandidates(t).map(function(t){return"".concat(t).concat(r,".html")}):[]}},{key:"resolve",value:(r=u(a().m(function t(e){var n,r,i,l,s,u,c,d;return a().w(function(t){for(;;)switch(t.p=t.n){case 0:if(n=this.getLayoutName(e)){t.n=1;break}throw new Error("Page layout name is required");case 1:if(!(r=o._.getLayout(n))){t.n=2;break}return t.a(2,r);case 2:return t.n=3,o._.ensureLayoutTemplates();case 3:if(!(i=o._.getLayout(n))){t.n=4;break}return t.a(2,i);case 4:if((l=this.getCandidateUrls(e,n)).length){t.n=5;break}throw new Error('No layout sources configured for "'.concat(n,'"'));case 5:s=null,u=0;case 6:if(!(u<l.length)){t.n=11;break}return c=l[u],t.p=7,t.n=8,this.loadLayout(c,n);case 8:return t.a(2,t.v);case 9:t.p=9,d=t.v,s=d;case 10:u+=1,t.n=6;break;case 11:throw s||new Error('Unable to load layout "'.concat(n,'"'));case 12:return t.a(2)}},t,this,[[7,9]])})),function(t){return r.apply(this,arguments)})},{key:"loadLayout",value:(n=u(a().m(function t(e,n){var r,i,o,l,s,c=this;return a().w(function(t){for(;;)switch(t.p=t.n){case 0:if(r="".concat(n,"::").concat(e),!this.cache.has(r)){t.n=2;break}return t.n=1,this.cache.get(r);case 1:return i=t.v,t.a(2,i.cloneNode(!0));case 2:return o=u(a().m(function t(){var r,i,o;return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,fetch(e,{credentials:"same-origin"});case 1:if((r=t.v).ok){t.n=2;break}throw new Error('Layout request failed for "'.concat(n,'" from ').concat(e));case 2:return t.n=3,r.text();case 3:if(i=t.v,(o=c.parseLayout(i,n,e))instanceof DocumentFragment){t.n=4;break}throw new Error('Layout "'.concat(n,'" from ').concat(e," did not resolve to a template fragment"));case 4:return t.a(2,o)}},t)}))(),this.cache.set(r,o),t.p=3,t.n=4,o;case 4:return l=t.v,t.a(2,l.cloneNode(!0));case 5:throw t.p=5,s=t.v,this.cache.delete(r),s;case 6:return t.a(2)}},t,this,[[3,5]])})),function(t,e){return n.apply(this,arguments)})},{key:"parseLayout",value:function(t,e){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=(new DOMParser).parseFromString(String(t||""),"text/html"),i=['template[data-layout="'.concat(e,'"]'),'template[id="page-layout-'.concat(e,'"]'),'template[id="'.concat(e,'"]')],o=0;o<i.length;o+=1){var a=r.querySelector(i[o]);if(a instanceof HTMLTemplateElement)return a.content.cloneNode(!0)}var l=r.querySelector('layout[name="'.concat(e,'"]'));if(l){var s=document.createDocumentFragment();return Array.from(l.childNodes).forEach(function(t){s.appendChild(t.cloneNode(!0))}),s}var u=r.querySelector("template");if(u instanceof HTMLTemplateElement)return u.content.cloneNode(!0);var c=document.createDocumentFragment();if(Array.from(r.body.childNodes).forEach(function(t){c.appendChild(t.cloneNode(!0))}),c.childNodes.length>0)return c;throw new Error('Layout "'.concat(e,'" not found in ').concat(n||"provided HTML"))}}],e&&d(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r}();h=y,p="cache",v=new Map,(p=f(p))in h?Object.defineProperty(h,p,{value:v,enumerable:!0,configurable:!0,writable:!0}):h[p]=v,"undefined"!=typeof window&&(window.LayoutResolver=y);var m=n(6595),b=n(4907),g=n(7322);function w(t){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},w(t)}function S(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return k(u,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),u}var a={};function l(){}function s(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(k(e={},r,function(){return this}),e),d=u.prototype=l.prototype=Object.create(c);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,k(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=u,k(d,"constructor",u),k(u,"constructor",s),s.displayName="GeneratorFunction",k(u,i,"GeneratorFunction"),k(d),k(d,i,"Generator"),k(d,r,function(){return this}),k(d,"toString",function(){return"[object Generator]"}),(S=function(){return{w:o,m:f}})()}function k(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}k=function(t,e,n,r){function o(e,n){k(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},k(t,e,n,r)}function E(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function O(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){E(o,r,i,a,l,"next",t)}function l(t){E(o,r,i,a,l,"throw",t)}a(void 0)})}}function C(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,A(r.key),r)}}function A(t){var e=function(t){if("object"!=w(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==w(e)?e:e+""}function j(t,e,n){return e=T(e),function(t,e){if(e&&("object"==w(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,P()?Reflect.construct(e,n||[],T(t).constructor):e.apply(t,n))}function P(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(P=function(){return!!t})()}function T(t){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},T(t)}function x(t,e){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},x(t,e)}var L=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=j(this,e,[t,r])).init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&x(t,e)}(e,t),function(t,e,n){return e&&C(t.prototype,e),n&&C(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"validateStructure",value:function(){if(!this.container)throw new Error("Page requires a container")}},{key:"init",value:(r=O(S().m(function t(){return S().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return r.apply(this,arguments)})},{key:"render",value:(n=O(S().m(function t(){var e,n,r,o;return S().w(function(t){for(;;)switch(t.n){case 0:if(this.element=this.container,this.markRenderStart(),this.applyDocumentMetadata(),e=String(this.container.getAttribute("layout")||"").trim()){t.n=2;break}return t.n=1,this.createChildren();case 1:return this.syncChildren(),this.markRenderComplete(),t.a(2);case 2:return n=this.collectNamedBlocks(),t.n=3,y.resolve(this.container);case 3:return r=t.v,o=i.LayoutComponent.assignNamedBlocks(r,n,{inheritMissing:this.shouldInheritMissing(this.container)}),this.reportUnusedBlocks(o.unusedNames,e),this.applyBuiltInRegions(n),this.applyHeadContent(r),this.applyTailContent(r),this.container.replaceChildren(r),this.container.setAttribute("data-page-layout",e),t.n=4,this.createChildren();case 4:this.syncChildren(),this.markRenderComplete();case 5:return t.a(2)}},t,this)})),function(){return n.apply(this,arguments)})},{key:"collectNamedBlocks",value:function(){var t=new Map,e=["block",'[component="block"]','[role="block"]'],n=["region",'[component="region"]','[role="region"]'];return Array.from(this.container.children).filter(function(t){return e.some(function(e){return t.matches(e)})}).forEach(function(e){var r=String(e.getAttribute("name")||"").trim();if(!r)throw new Error('Page blocks require a non-empty "name" attribute');if(t.has(r))throw new Error('Duplicate page block "'.concat(r,'"'));var i=[],o=new Map;Array.from(e.childNodes).forEach(function(t){if(t.nodeType!==Node.TEXT_NODE)if(t instanceof Element)if(n.some(function(e){return t.matches(e)})){var e=String(t.getAttribute("name")||"").trim();if(!e)throw new Error('Region inside block "'.concat(r,'" requires a non-empty "name" attribute'));if(o.has(e))throw new Error('Duplicate region "'.concat(e,'" inside block "').concat(r,'"'));o.set(e,Array.from(t.childNodes))}else i.push(t);else i.push(t);else String(t.textContent||"").trim()&&i.push(t)}),t.set(r,{contentNodes:i,regions:o})}),t}},{key:"shouldInheritMissing",value:function(t){var e,n,r=String((null==t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"inherit-missing"))||(null==t||null===(n=t.getAttribute)||void 0===n?void 0:n.call(t,"inherit"))||"").trim().toLowerCase();return"true"===r||"1"===r||"yes"===r}},{key:"applyDocumentMetadata",value:function(){var t,e,n,r,i,o,a,l,s,u,c=this.ensureDocumentSection("head");if(c instanceof Element){b.P.applyFromElement(this.container);var d=String((null===(t=this.container)||void 0===t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"title"))||"").trim();if(d){document.title=d;var f=c.querySelector("title");f instanceof HTMLTitleElement||(f=document.createElement("title"),c.appendChild(f)),f.textContent=d}var h=String((null===(n=this.container)||void 0===n||null===(r=n.getAttribute)||void 0===r?void 0:r.call(n,"description"))||"").trim();h&&this.upsertMetaTag(c,"description",h);var p=String((null===(i=this.container)||void 0===i||null===(o=i.getAttribute)||void 0===o?void 0:o.call(i,"canonical"))||"").trim();p&&this.upsertLinkTag(c,"canonical",p);var v=String((null===(a=this.container)||void 0===a||null===(l=a.getAttribute)||void 0===l?void 0:l.call(a,"theme"))||"").trim();v&&g.D.applyTheme(v,{dispatch:!1,loadCSS:!0});var y=String((null===(s=this.container)||void 0===s||null===(u=s.getAttribute)||void 0===u?void 0:u.call(s,"lang"))||"").trim();y&&m.G.applyLocale(y,{dispatch:!1})}}},{key:"upsertMetaTag",value:function(t,e,n){if(t instanceof Element&&e){var r=t.querySelector('meta[name="'.concat(e,'"]'));r instanceof HTMLMetaElement||((r=document.createElement("meta")).setAttribute("name",e),t.appendChild(r)),r.setAttribute("content",n)}}},{key:"upsertLinkTag",value:function(t,e,n){if(t instanceof Element&&e){var r=t.querySelector('link[rel="'.concat(e,'"]'));r instanceof HTMLLinkElement||((r=document.createElement("link")).setAttribute("rel",e),t.appendChild(r)),r.setAttribute("href",n)}}},{key:"ensureDocumentRoot",value:function(){var t=document.documentElement;if(t instanceof HTMLHtmlElement)return t;t=document.createElement("html");var e=document.firstChild;return e?document.insertBefore(t,e):document.appendChild(t),t}},{key:"applyBuiltInRegions",value:function(){var t,e,n=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map,i=["meta","styles","page-styles"],o=["scripts","page-scripts"],a=this.ensureDocumentSection("head"),l=this.ensureDocumentSection("body");if(a instanceof Element&&l instanceof Element){var s=String((null===(t=this.container)||void 0===t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"data-component-id"))||"").trim();r.forEach(function(t){var e=(null==t?void 0:t.regions)instanceof Map?t.regions:null;e instanceof Map&&0!==e.size&&(i.forEach(function(t){var r=e.get(t);Array.isArray(r)&&0!==r.length&&(n.appendOwnedNodes(a,r,"data-holi-page-head-owner",s),e.delete(t))}),o.forEach(function(t){var r=e.get(t);Array.isArray(r)&&0!==r.length&&(n.appendOwnedNodes(l,r,"data-holi-page-tail-owner",s),e.delete(t))}))})}}},{key:"appendOwnedNodes",value:function(t,e,n,r){t instanceof Element&&Array.isArray(e)&&e.forEach(function(e){(e.nodeType!==Node.TEXT_NODE||String(e.textContent||"").trim())&&(e instanceof Element&&r&&e.setAttribute(n,r),t.appendChild(e))})}},{key:"markRenderStart",value:function(){var t,e,n,r,i,o;null!==(t=this.container)&&void 0!==t&&null!==(e=t.getAttribute)&&void 0!==e&&e.call(t,"renderer")||null===(i=this.container)||void 0===i||null===(o=i.setAttribute)||void 0===o||o.call(i,"renderer","browser"),null===(n=this.container)||void 0===n||null===(r=n.setAttribute)||void 0===r||r.call(n,"rendered","pending")}},{key:"markRenderComplete",value:function(){var t,e,n,r;null===(t=this.container)||void 0===t||null===(e=t.removeAttribute)||void 0===e||e.call(t,"renderer"),null===(n=this.container)||void 0===n||null===(r=n.removeAttribute)||void 0===r||r.call(n,"rendered")}},{key:"applyHeadContent",value:function(t){var e,n,r=t.querySelector("layout-head, [data-layout-head]");if(r instanceof Element){var i=this.ensureDocumentSection("head");if(i instanceof Element){var o=String((null===(e=this.container)||void 0===e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"data-component-id"))||"").trim();o&&document.querySelectorAll('[data-holi-page-head-owner="'.concat(o,'"]')).forEach(function(t){return t.remove()}),Array.from(r.childNodes).forEach(function(t){if(t.nodeType!==Node.TEXT_NODE||String(t.textContent||"").trim()){var e=t.cloneNode(!0);e instanceof Element&&o&&e.setAttribute("data-holi-page-head-owner",o),i.appendChild(e)}}),r.remove()}}}},{key:"applyTailContent",value:function(t){var e,n,r=t.querySelector("tail, [data-layout-tail]");if(r instanceof Element){var i=this.ensureDocumentSection("body");if(i instanceof Element){var o=String((null===(e=this.container)||void 0===e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"data-component-id"))||"").trim();o&&document.querySelectorAll('[data-holi-page-tail-owner="'.concat(o,'"]')).forEach(function(t){return t.remove()}),Array.from(r.childNodes).forEach(function(t){if(t.nodeType!==Node.TEXT_NODE||String(t.textContent||"").trim()){var e=t.cloneNode(!0);e instanceof Element&&o&&e.setAttribute("data-holi-page-tail-owner",o),i.appendChild(e)}}),r.remove()}}}},{key:"ensureDocumentSection",value:function(t){var e=String(t||"").trim().toLowerCase();if("head"!==e&&"body"!==e)return null;if("head"===e&&document.head)return document.head;if("body"===e&&document.body)return document.body;var n=document.documentElement;n instanceof HTMLHtmlElement||(n=this.ensureDocumentRoot());var r=n.querySelector(":scope > ".concat(e));return r instanceof Element||(r=document.createElement(e),"head"===e?n.insertBefore(r,n.firstChild):n.appendChild(r)),r}},{key:"reportUnusedBlocks",value:function(t,e){Array.isArray(t)&&0!==t.length&&console.warn('Unused page blocks for layout "'.concat(e,'": ').concat(t.join(", ")),{page:this,unusedNames:t})}}],[{key:"selector",get:function(){return"page"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"page"}}]);var n,r}(r.Component);"undefined"!=typeof window&&(window.PageComponent=L)},5892(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function l(n,r,i,a){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return o(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,o(h,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(h),o(h,a,"Generator"),o(h,r,function(){return this}),o(h,"toString",function(){return"[object Generator]"}),(i=function(){return{w:l,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function l(t){a(o,r,i,l,s,"next",t)}function s(t){a(o,r,i,l,s,"throw",t)}l(void 0)})}}function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach(function(e){m(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,b(r.key),r)}}function d(t,e,n){return e=v(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,f()?Reflect.construct(e,n||[],v(t).constructor):e.apply(t,n))}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!t})()}function h(t,e,n,r){var i=p(v(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=v(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},p.apply(null,arguments)}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}function m(t,e,n){return(e=b(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function b(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{PanelComponent:()=>g});var g=function(t){function e(t){var n,r,i,o,a,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(a=d(this,e,[t,l])).templateId=e.templateId,a.titleText=(null===(n=a.container)||void 0===n?void 0:n.getAttribute("title"))||(null===(r=a.container)||void 0===r?void 0:r.getAttribute("data-title"))||"",a.subtitleText=(null===(i=a.container)||void 0===i?void 0:i.getAttribute("subtitle"))||(null===(o=a.container)||void 0===o?void 0:o.getAttribute("data-subtitle"))||"",a.init(),a}return function(t,e){if("function"!=typeof e&&null!==e)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&&y(t,e)}(e,t),n=e,r=[{key:"validateStructure",value:function(){if(h(e,"validateStructure",this,3)([]),!this.container)throw new Error("Panel requires a container")}},{key:"getBindingContext",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return h(e,"getBindingContext",this,3)([u({title:this.titleText,subtitle:this.subtitleText,hasTitle:!!this.titleText,hasSubtitle:!!this.subtitleText},t)])}},{key:"init",value:(s=l(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return s.apply(this,arguments)})},{key:"render",value:(a=l(i().m(function t(){var n,r;return i().w(function(t){for(;;)switch(t.n){case 0:return n=Array.from(this.container.childNodes),t.n=1,h(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".holi-panel"),this.header=this.container.querySelector('[data-role="panel-header"]'),this.title=this.container.querySelector('[data-role="panel-title"]'),this.subtitle=this.container.querySelector('[data-role="panel-subtitle"]'),this.content=this.container.querySelector('[data-role="panel-content"]'),this.footer=this.container.querySelector('[data-role="panel-footer"]'),!this.content){t.n=3;break}return(r=this.content).replaceChildren.apply(r,n),t.n=2,this.createChildren();case 2:this.syncChildren();case 3:return this.projectSlot("header"),this.projectSlot("footer"),this.applyPanelState(),t.n=4,this.createChildren();case 4:this.syncChildren();case 5:return t.a(2)}},t,this)})),function(){return a.apply(this,arguments)})},{key:"projectSlot",value:function(t){var e=this.container.querySelector('[data-role="panel-'.concat(t,'"]'));if(e){var n=Array.from(this.container.querySelectorAll('[slot="'.concat(t,'"]')));if(n.length){var r=document.createDocumentFragment();n.forEach(function(t){t.removeAttribute("slot"),r.appendChild(t)}),e.hidden=!1,e.replaceChildren(r)}else("header"!==t||this.titleText||this.subtitleText)&&"footer"!==t||(e.hidden=!0)}}},{key:"applyPanelState",value:function(){if(this.header){var t=this.header.childNodes.length>0,e=!!this.titleText||!!this.subtitleText;this.header.hidden=!t&&!e}this.title&&(this.title.hidden=!this.titleText,this.title.textContent=this.titleText),this.subtitle&&(this.subtitle.hidden=!this.subtitleText,this.subtitle.textContent=this.subtitleText),this.footer&&0===this.footer.childNodes.length&&(this.footer.hidden=!0)}},{key:"refreshPpr",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.syncChildren();var n=!1;this.children.forEach(function(r){if(r&&!r.isDestroyed&&r!==(null==e?void 0:e.sourceComponent)&&r.container!==(null==e?void 0:e.sourceElement)){var i=u(u({},e),{},{panelComponent:t,targetElement:r.container,targetComponent:r,delegatedByPanel:!0});if("function"==typeof r.receiveDependencyUpdate)return r.receiveDependencyUpdate(i),void(n=!0);"function"==typeof r.handlePprUpdate&&(r.handlePprUpdate(i),n=!0)}}),n||this.refresh()}}],o=[{key:"selector",get:function(){return"panel"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"panel"}}],r&&c(n.prototype,r),o&&c(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,a,s}(n(8812).Component);m(g,"templateId","panel-template"),"undefined"!=typeof window&&(window.PanelComponent=g)},4295(){},6101(t,e,n){"use strict";n.r(e),n.d(e,{RadioGroupComponent:()=>w});var r=n(8812),i=n(853);function o(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function l(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return a(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(a(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,a(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,a(h,"constructor",d),a(d,"constructor",c),c.displayName="GeneratorFunction",a(d,i,"GeneratorFunction"),a(h),a(h,i,"Generator"),a(h,r,function(){return this}),a(h,"toString",function(){return"[object Generator]"}),(o=function(){return{w:l,m:p}})()}function a(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}a=function(t,e,n,r){function o(e,n){a(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},a(t,e,n,r)}function l(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,y(r.key),r)}}function c(t,e,n){return e=p(e),function(t,e){if(e&&("object"==s(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,d()?Reflect.construct(e,n||[],p(t).constructor):e.apply(t,n))}function d(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(d=function(){return!!t})()}function f(t,e,n,r){var i=h(p(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function h(){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},h.apply(null,arguments)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}function y(t){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}var m,b,g,w=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=c(this,e,[t,r])).templateId=e.templateId,n.config={legend:n.container.getAttribute("legend")||"",name:n.container.getAttribute("name")||"",required:n.readBoolAttr("required",!1),requiredMessage:n.container.getAttribute("data-required-message")||"Please select one option.",options:n.parseOptions(n.container.getAttribute("data-options"))},n.state={legend:n.config.legend,name:n.config.name,required:n.config.required,options:n.config.options,value:"",invalid:!1,errorMessage:""},n.boundChange=function(){return n.handleChange()},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&v(t,e)}(e,t),n=e,r=[{key:"readBoolAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.container.hasAttribute(t))return e;var n=String(this.container.getAttribute(t)||"").trim().toLowerCase();return!n||"false"!==n&&"0"!==n&&"no"!==n}},{key:"parseOptions",value:function(t){if(!t)return[];try{var e=JSON.parse(t);return Array.isArray(e)?e.map(function(t){return t&&"object"===s(t)?t:{value:t,label:String(t)}}):[]}catch(t){return[]}}},{key:"init",value:function(){this.validateStructure(),this.render()}},{key:"render",value:(d=o().m(function t(){var n;return o().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,f(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-radio-group"),this.optionsHost=this.container.querySelector('[data-role="options"]'),this.errorEl=this.container.querySelector('[data-role="error"]'),this.projectSlot("legend"),this.projectSlot("options"),this.projectSlot("actions"),this.applyOptionAttributes(),this.syncState(),this.validate(),null===(n=this.element)||void 0===n||n.addEventListener("change",this.boundChange);case 2:return t.a(2)}},t,this)}),h=function(){var t=this,e=arguments;return new Promise(function(n,r){var i=d.apply(t,e);function o(t){l(i,n,r,o,a,"next",t)}function a(t){l(i,n,r,o,a,"throw",t)}o(void 0)})},function(){return h.apply(this,arguments)})},{key:"projectSlot",value:function(t){var e=this.container.querySelector('slot[name="'.concat(t,'"]'));if(e){var n=Array.from(this.container.querySelectorAll('[slot="'.concat(t,'"]')));if(n.length){var r=document.createDocumentFragment();n.forEach(function(t){t.removeAttribute("slot"),r.appendChild(t)}),e.replaceWith(r)}}}},{key:"applyOptionAttributes",value:function(){var t=this;this.optionsHost&&this.optionsHost.querySelectorAll('input[type="radio"]').forEach(function(e){t.config.name&&(e.name=t.config.name),t.config.required&&(e.required=!0)})}},{key:"syncState",value:function(){if(this.optionsHost){var t=this.optionsHost.querySelector('input[type="radio"]:checked');this.state.value=(null==t?void 0:t.value)||""}}},{key:"handleChange",value:function(){this.syncState(),this.validate(),this.dispatchEvent("radiochange",{value:this.state.value})}},{key:"validate",value:function(){var t=!!this.config.required&&!this.state.value;return this.state.invalid=t,this.state.errorMessage=t?this.config.requiredMessage:"",this.element&&this.element.classList.toggle("is-invalid",t),this.errorEl&&(this.errorEl.hidden=!t,this.errorEl.textContent=this.state.errorMessage),!t}},{key:"value",get:function(){return this.state.value||""},set:function(t){var e,n=null==t?"":String(t);Array.from((null===(e=this.optionsHost)||void 0===e?void 0:e.querySelectorAll('input[type="radio"]'))||[]).forEach(function(t){t.checked=t.value===n}),this.syncState(),this.validate()}},{key:"destroy",value:function(){var t;null===(t=this.element)||void 0===t||t.removeEventListener("change",this.boundChange),f(e,"destroy",this,3)([])}}],a=[{key:"selector",get:function(){return"holi-radio"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"radio-group"}},{key:"getNativeSelectors",value:function(){return['input[type="radio"][component="radio"]','input[type="radio"][role="radio"]']}},{key:"prepareHost",value:function(t){if(!(t instanceof HTMLInputElement)||"radio"!==t.type)return t;var e=document.createElement("section");(0,i.ts)(t,e,{exclude:["component","role","type","checked","value"]}),e.setAttribute("component","radio-group");var n=t.getAttribute("id");n&&(e.setAttribute("id",n),t.removeAttribute("id"));var r=(0,i.VC)(t);return(r===t.parentElement?r:t).replaceWith(e),r&&e.appendChild(r),e}}],r&&u(n.prototype,r),a&&u(n,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,a,d,h}(r.Component);m=w,g="radio-group-template",(b=y(b="templateId"))in m?Object.defineProperty(m,b,{value:g,enumerable:!0,configurable:!0,writable:!0}):m[b]=g,"undefined"!=typeof window&&(window.RadioGroupComponent=w)},3953(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function l(n,r,i,a){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return o(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,o(h,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(h),o(h,a,"Generator"),o(h,r,function(){return this}),o(h,"toString",function(){return"[object Generator]"}),(i=function(){return{w:l,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function l(t){a(o,r,i,l,s,"next",t)}function s(t){a(o,r,i,l,s,"throw",t)}l(void 0)})}}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,v(r.key),r)}}function u(t,e,n){return e=h(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,n||[],h(t).constructor):e.apply(t,n))}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function d(t,e,n,r){var i=f(h(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},f.apply(null,arguments)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function v(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{RatingComponent:()=>g});var y,m,b,g=function(t){function e(t){var n,r,i,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=u(this,e,[t,a])).templateId=e.templateId,o.type=o.resolveType(null!==(n=a.type)&&void 0!==n?n:o.readAttr("type","star")),o.grade=o.resolveGrade(null!==(r=a.grade)&&void 0!==r?r:o.readAttr("grade","5")),o.rating=o.resolveRating(null!==(i=a.value)&&void 0!==i?i:o.readAttr("value",o.readAttr("rating","0"))),o.init(),o}return function(t,e){if("function"!=typeof e&&null!==e)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&&p(t,e)}(e,t),n=e,r=[{key:"readAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.container.getAttribute(t);if(null!=n)return String(n);var r=this.container.getAttribute("data-".concat(t));return null!=r?String(r):e}},{key:"resolveType",value:function(t){return String(t||"star").trim().toLowerCase(),"star"}},{key:"resolveGrade",value:function(t){var e=Number(t);return Number.isFinite(e)?Math.max(1,Math.min(10,Math.round(e))):5}},{key:"resolveRating",value:function(t){var e=Number(t);return Number.isFinite(e)?Math.max(0,Math.min(this.grade,e)):0}},{key:"init",value:(c=l(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return c.apply(this,arguments)})},{key:"render",value:(a=l(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,d(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".rating"),this.iconTemplate=this.container.querySelector(".rating [data-value]"),this.element&&this.iconTemplate){t.n=2;break}throw new Error("Rating template is missing required nodes");case 2:this.buildIcons(),this.updateView();case 3:return t.a(2)}},t,this)})),function(){return a.apply(this,arguments)})},{key:"setRating",value:function(t){this.rating=this.resolveRating(t),this.updateView()}},{key:"setGrade",value:function(t){this.grade=this.resolveGrade(t),this.rating=this.resolveRating(this.rating),this.buildIcons(),this.updateView()}},{key:"buildIcons",value:function(){if(this.element&&this.iconTemplate){this.element.replaceChildren();for(var t=document.createDocumentFragment(),e=0;e<this.grade;e+=1){var n=this.iconTemplate.cloneNode(!0);n.setAttribute("data-value",String(e+1)),t.appendChild(n)}this.element.appendChild(t),this.icons=Array.from(this.element.querySelectorAll("[data-value]"))}}},{key:"updateView",value:function(){var t=this;this.element&&Array.isArray(this.icons)&&(this.element.setAttribute("data-type",this.type),this.element.setAttribute("data-grade",String(this.grade)),this.element.setAttribute("data-rating",String(this.rating)),this.element.setAttribute("aria-label","".concat(this.rating," out of ").concat(this.grade," stars")),this.icons.forEach(function(e,n){var r=n+1,i=t.resolveFill(r);e.className="fa ".concat(t.resolveIconClass(i)),e.setAttribute("data-value",String(r)),e.setAttribute("aria-hidden","true")}))}},{key:"resolveFill",value:function(t){return this.rating>=t?"full":this.rating>=t-.5?"half":"empty"}},{key:"resolveIconClass",value:function(t){return"full"===t?"fa-star":"half"===t?"fa-star-half-full":"fa-star-o"}}],o=[{key:"selector",get:function(){return"rating"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"rating"}}],r&&s(n.prototype,r),o&&s(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,a,c}(n(8812).Component);y=g,b="rating-template",(m=v(m="templateId"))in y?Object.defineProperty(y,m,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[m]=b,"undefined"!=typeof window&&(window.RatingComponent=g)},1285(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function l(n,r,i,a){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return o(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,o(h,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(h),o(h,a,"Generator"),o(h,r,function(){return this}),o(h,"toString",function(){return"[object Generator]"}),(i=function(){return{w:l,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function l(t){a(o,r,i,l,s,"next",t)}function s(t){a(o,r,i,l,s,"throw",t)}l(void 0)})}}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,v(r.key),r)}}function u(t,e,n){return e=h(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,n||[],h(t).constructor):e.apply(t,n))}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function d(t,e,n,r){var i=f(h(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},f.apply(null,arguments)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function v(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{RefreshComponent:()=>g});var y,m,b,g=function(t){function e(t){var n,r,i,o,a,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(a=u(this,e,[t,l])).templateId=e.templateId,a.threshold=a.parseNumber(null!==(n=l.threshold)&&void 0!==n?n:a.readAttr("threshold","72"),72),a.refreshThreshold=a.parseNumber(null!==(r=l.refreshThreshold)&&void 0!==r?r:a.readAttr("refresh-threshold","108"),108),a.maxPull=a.parseNumber(null!==(i=l.maxPull)&&void 0!==i?i:a.readAttr("max-pull","148"),148),a.completeDelay=a.parseNumber(null!==(o=l.completeDelay)&&void 0!==o?o:a.readAttr("complete-delay","1200"),1200),a.disabled=a.readBooleanAttr("disabled",!1),a.triggerLabel=a.readAttr("label","Pull to refresh"),a.releaseLabel=a.readAttr("release-label","Release to refresh"),a.loadingLabel=a.readAttr("loading-label","Refreshing..."),a.completeLabel=a.readAttr("complete-label","Updated just now"),a.pointerId=null,a.startY=0,a.currentY=0,a.pullDistance=0,a.isPulling=!1,a.isRefreshing=!1,a.refreshTimer=null,a.boundPointerDown=function(t){return a.onPointerDown(t)},a.boundPointerMove=function(t){return a.onPointerMove(t)},a.boundPointerUp=function(t){return a.onPointerUp(t)},a.boundKeyDown=function(t){return a.onKeyDown(t)},a.init(),a}return function(t,e){if("function"!=typeof e&&null!==e)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&&p(t,e)}(e,t),n=e,r=[{key:"readAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.container.getAttribute(t);if(null!=n)return String(n);var r=this.container.getAttribute("data-".concat(t));return null!=r?String(r):e}},{key:"readBooleanAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.container.hasAttribute(t)&&!this.container.hasAttribute("data-".concat(t)))return e;var n=this.readAttr(t,"");if(!n)return!0;var r=n.trim().toLowerCase();return!!["true","1","yes","on"].includes(r)||!["false","0","no","off"].includes(r)&&e}},{key:"parseNumber",value:function(t,e){var n=Number(t);return Number.isFinite(n)?n:e}},{key:"init",value:(c=l(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents();case 2:return t.a(2)}},t,this)})),function(){return c.apply(this,arguments)})},{key:"render",value:(a=l(i().m(function t(){var n,r,o=this;return i().w(function(t){for(;;)switch(t.n){case 0:return n=Array.from(this.container.childNodes),t.n=1,d(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".holi-refresh"),this.handleEl=this.container.querySelector('[data-role="handle"]'),this.labelEl=this.container.querySelector('[data-role="label"]'),this.progressEl=this.container.querySelector('[data-role="progress"]'),this.contentEl=this.container.querySelector('[data-role="content"]'),this.element&&this.handleEl&&this.labelEl&&this.progressEl&&this.contentEl){t.n=2;break}throw new Error("Refresh template is missing required nodes");case 2:r=this.element,n.forEach(function(t){t!==r&&o.contentEl.appendChild(t)}),this.container.hidden=!1,this.element.setAttribute("data-state",this.disabled?"disabled":"idle"),this.setPullDistance(0),this.setLabel(this.triggerLabel),void 0===this.container.refresh&&Object.defineProperty(this.container,"refresh",{value:this,writable:!1});case 3:return t.a(2)}},t,this)})),function(){return a.apply(this,arguments)})},{key:"bindEvents",value:function(){var t,e,n,r,i,o;null===(t=this.element)||void 0===t||t.addEventListener("pointerdown",this.boundPointerDown),null===(e=this.element)||void 0===e||e.addEventListener("pointermove",this.boundPointerMove),null===(n=this.element)||void 0===n||n.addEventListener("pointerup",this.boundPointerUp),null===(r=this.element)||void 0===r||r.addEventListener("pointercancel",this.boundPointerUp),null===(i=this.element)||void 0===i||i.addEventListener("lostpointercapture",this.boundPointerUp),null===(o=this.element)||void 0===o||o.addEventListener("keydown",this.boundKeyDown)}},{key:"onPointerDown",value:function(t){var e,n,r;this.disabled||this.isRefreshing||"mouse"===t.pointerType&&0!==t.button||this.canStartPull()&&(this.pointerId=t.pointerId,this.startY=t.clientY,this.currentY=t.clientY,this.pullDistance=0,this.isPulling=!0,null===(e=this.element)||void 0===e||null===(n=e.setPointerCapture)||void 0===n||n.call(e,t.pointerId),null===(r=this.element)||void 0===r||r.setAttribute("data-state","pulling"),this.setLabel(this.triggerLabel))}},{key:"onPointerMove",value:function(t){var e;if(this.isPulling&&this.pointerId===t.pointerId&&!this.isRefreshing){this.currentY=t.clientY;var n=this.currentY-this.startY;if(n<=0)return this.setPullDistance(0),void this.setLabel(this.triggerLabel);if(this.isAtTop()){var r=Math.min(this.maxPull,.62*n),i=Math.min(r/this.refreshThreshold,1);this.setPullDistance(r),null===(e=this.element)||void 0===e||e.setAttribute("data-state",i>=1?"armed":"pulling"),this.setLabel(i>=1?this.releaseLabel:this.triggerLabel),t.cancelable&&t.preventDefault()}}}},{key:"onPointerUp",value:function(t){if(this.isPulling&&(null==t.pointerId||null==this.pointerId||t.pointerId===this.pointerId)){var e=this.pullDistance>=this.refreshThreshold;this.isPulling=!1,this.pointerId=null,e?this.trigger():this.reset()}}},{key:"onKeyDown",value:function(t){this.disabled||this.isRefreshing||"r"!==t.key&&"R"!==t.key||!t.ctrlKey&&!t.metaKey||(t.preventDefault(),this.trigger())}},{key:"canStartPull",value:function(){var t=this.contentEl||this.container;return t instanceof HTMLElement?t.scrollTop<=0:this.isAtTop()}},{key:"isAtTop",value:function(){var t=this.contentEl||this.container;return t instanceof HTMLElement&&t.scrollHeight>t.clientHeight?t.scrollTop<=0:"undefined"==typeof window||(window.scrollY||window.pageYOffset||0)<=0}},{key:"setPullDistance",value:function(t){var e,n;this.pullDistance=Math.max(0,Math.min(this.maxPull,t));var r=Math.min(this.pullDistance/this.refreshThreshold,1);null===(e=this.element)||void 0===e||null===(e=e.style)||void 0===e||e.setProperty("--refresh-pull-distance","".concat(this.pullDistance,"px")),null===(n=this.progressEl)||void 0===n||null===(n=n.style)||void 0===n||n.setProperty("--refresh-progress",String(r))}},{key:"setLabel",value:function(t){this.labelEl&&(this.labelEl.textContent=String(t||""))}},{key:"trigger",value:function(){var t,e=this;if(!this.disabled&&!this.isRefreshing){this.isRefreshing=!0,null===(t=this.element)||void 0===t||t.setAttribute("data-state","refreshing"),this.setPullDistance(this.threshold),this.setLabel(this.loadingLabel);var n=!1,r=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!n){n=!0;var r=!1!==(null==t?void 0:t.success);e.finishRefresh(r,(null==t?void 0:t.message)||"")}},i=new CustomEvent("pullrefresh",{detail:{source:"pull-to-refresh",component:this,complete:r},bubbles:!0});this.container.dispatchEvent(i),this.refreshTimer=window.setTimeout(function(){return r({success:!0})},this.completeDelay)}}},{key:"finishRefresh",value:function(){var t,e=this,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";this.refreshTimer&&"undefined"!=typeof window&&window.clearTimeout(this.refreshTimer),this.refreshTimer=null,this.isRefreshing=!1,null===(t=this.element)||void 0===t||t.setAttribute("data-state",n?"complete":"idle"),this.setLabel(r||(n?this.completeLabel:this.triggerLabel)),"undefined"!=typeof window?window.setTimeout(function(){return e.reset()},n?420:0):this.reset()}},{key:"reset",value:function(){var t;this.isRefreshing=!1,this.setPullDistance(0),null===(t=this.element)||void 0===t||t.setAttribute("data-state",this.disabled?"disabled":"idle"),this.setLabel(this.triggerLabel)}},{key:"destroy",value:function(){var t,n,r,i,o,a;this.refreshTimer&&"undefined"!=typeof window&&window.clearTimeout(this.refreshTimer),null===(t=this.element)||void 0===t||t.removeEventListener("pointerdown",this.boundPointerDown),null===(n=this.element)||void 0===n||n.removeEventListener("pointermove",this.boundPointerMove),null===(r=this.element)||void 0===r||r.removeEventListener("pointerup",this.boundPointerUp),null===(i=this.element)||void 0===i||i.removeEventListener("pointercancel",this.boundPointerUp),null===(o=this.element)||void 0===o||o.removeEventListener("lostpointercapture",this.boundPointerUp),null===(a=this.element)||void 0===a||a.removeEventListener("keydown",this.boundKeyDown),d(e,"destroy",this,3)([])}}],o=[{key:"selector",get:function(){return"refresh"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"refresh"}},{key:"getNativeSelectors",value:function(){return["[data-pull-refresh]"]}},{key:"enable",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.setAttribute("data-pull-refresh","true"),t.refresh||new e(t,n)}}],r&&s(n.prototype,r),o&&s(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,a,c}(n(8812).Component);y=g,b="refresh-template",(m=v(m="templateId"))in y?Object.defineProperty(y,m,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[m]=b,"undefined"!=typeof window&&(window.RefreshComponent=g)},5108(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function l(n,r,i,a){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return o(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,o(h,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(h),o(h,a,"Generator"),o(h,r,function(){return this}),o(h,"toString",function(){return"[object Generator]"}),(i=function(){return{w:l,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function l(t){a(o,r,i,l,s,"next",t)}function s(t){a(o,r,i,l,s,"throw",t)}l(void 0)})}}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,v(r.key),r)}}function u(t,e,n){return e=h(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,n||[],h(t).constructor):e.apply(t,n))}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function d(t,e,n,r){var i=f(h(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},f.apply(null,arguments)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function v(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{RegionComponent:()=>g});var y,m,b,g=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=u(this,e,[t,r])).templateId=e.templateId,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&p(t,e)}(e,t),n=e,r=[{key:"validateStructure",value:function(){if(d(e,"validateStructure",this,3)([]),!this.container)throw new Error("Region requires a container")}},{key:"init",value:(c=l(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return c.apply(this,arguments)})},{key:"render",value:(a=l(i().m(function t(){var n,r;return i().w(function(t){for(;;)switch(t.n){case 0:return r=Array.from(this.container.childNodes),t.n=1,d(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-region"),this.content=this.container.querySelector('[data-role="region-content"]'),this.content&&(n=this.content).replaceChildren.apply(n,r),this.applyWidth();case 2:return t.a(2)}},t,this)})),function(){return a.apply(this,arguments)})},{key:"applyWidth",value:function(){if(this.element&&this.container){var t=Number(this.container.getAttribute("width")),e=Number.isNaN(t)||t<=0?12:Math.min(12,t);this.container.style.gridColumn="span ".concat(e),this.container.style.minWidth="0",this.element.style.setProperty("--holi-region-span",String(e))}}}],o=[{key:"selector",get:function(){return"region"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"region"}},{key:"canInitElement",value:function(t){if(!(t instanceof Element))return!0;var e=t.closest('block, [component="block"], [role="block"]');if(!(e instanceof Element))return!0;var n=e.parentElement;return!(n instanceof Element&&n.matches('page[layout], [component="page"][layout], [role="page"][layout]'))}}],r&&s(n.prototype,r),o&&s(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,a,c}(n(8812).Component);y=g,b="region-template",(m=v(m="templateId"))in y?Object.defineProperty(y,m,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[m]=b,"undefined"!=typeof window&&(window.RegionComponent=g)},7012(t,e,n){"use strict";n.r(e),n.d(e,{SearchComponent:()=>A});var r=n(8812),i=n(9062),o=n(3076);function a(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||u(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){u=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(t,e)||u(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){if(t){if("string"==typeof t)return c(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function d(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return f(u,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),u}var a={};function l(){}function s(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(f(e={},r,function(){return this}),e),h=u.prototype=l.prototype=Object.create(c);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,f(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return s.prototype=u,f(h,"constructor",u),f(u,"constructor",s),s.displayName="GeneratorFunction",f(u,i,"GeneratorFunction"),f(h),f(h,i,"Generator"),f(h,r,function(){return this}),f(h,"toString",function(){return"[object Generator]"}),(d=function(){return{w:o,m:p}})()}function f(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}f=function(t,e,n,r){function o(e,n){f(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},f(t,e,n,r)}function h(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function p(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){h(o,r,i,a,l,"next",t)}function l(t){h(o,r,i,a,l,"throw",t)}a(void 0)})}}function v(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,k(r.key),r)}}function y(t,e,n){return e=w(e),function(t,e){if(e&&("object"==l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,m()?Reflect.construct(e,n||[],w(t).constructor):e.apply(t,n))}function m(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(m=function(){return!!t})()}function b(t,e,n,r){var i=g(w(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function g(){return g="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=w(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},g.apply(null,arguments)}function w(t){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},w(t)}function S(t,e){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},S(t,e)}function k(t){var e=function(t){if("object"!=l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==l(e)?e:e+""}var E,O,C,A=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=y(this,e,[t,r])).templateId=e.templateId,n.config={endpoint:n.readAttr(["data-endpoint","endpoint"],""),suggestionsEndpoint:n.readAttr(["data-suggestions-endpoint","data-suggest-endpoint","suggestions"],""),placeholder:n.readAttr(["placeholder","data-placeholder"],"Search..."),minLength:Math.max(1,Number(n.readAttr(["data-min-length","min-length"],"1"))||1),suggestionLimit:Math.max(1,Number(n.readAttr(["data-suggestion-limit","suggestion-limit"],"6"))||6),resultLimit:Math.max(1,Number(n.readAttr(["data-limit","limit"],"10"))||10),debounceMs:Math.max(0,Number(n.readAttr(["data-debounce-ms","debounce-ms"],"200"))||200)},n.state={query:"",suggestions:[],results:[],activeSuggestion:-1,open:!1,loading:!1},n.fetchSeq=0,n.debounceTimer=null,n.boundOutsideClick=function(t){return n.handleOutsideClick(t)},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&S(t,e)}(e,t),n=e,r=[{key:"readAttr",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=0;n<t.length;n+=1){var r=this.container.getAttribute(t[n]);if(null!=r&&""!==String(r).trim())return String(r).trim()}return e}},{key:"parseJsonAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=String(this.container.getAttribute(t)||"").trim();if(!n)return e;try{var r=JSON.parse(n);return Array.isArray(r)?r:e}catch(t){return e}}},{key:"init",value:(g=p(d().m(function t(){return d().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents(),this.renderSuggestions(),this.renderResults();case 2:return t.a(2)}},t,this)})),function(){return g.apply(this,arguments)})},{key:"render",value:(m=p(d().m(function t(){var n;return d().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,b(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-search"),this.input=this.container.querySelector('[data-role="input"]'),this.suggestionPanel=this.container.querySelector('[data-role="suggestions"]'),this.suggestionList=this.container.querySelector('[data-role="suggestions-list"]'),this.resultsPanel=this.container.querySelector('[data-role="results"]'),this.resultsList=this.container.querySelector('[data-role="results-list"]'),this.emptyEl=this.container.querySelector('[data-role="empty"]'),this.loadingEl=this.container.querySelector('[data-role="loading"]'),this.form=this.container.querySelector('[data-role="form"]'),this.loaderState=(0,i.w)(this,{host:this.resultsPanel||this.element,busyTarget:this.resultsPanel||this.element,scope:"block",defaultMessage:"Searching..."}),this.stateBinding=(0,o.x)(this,{defaultPath:"search",eventName:"searchchange",getSnapshot:function(t){return t.getBindableState()},applySnapshot:function(t,e){return t.applyBindableState(e)}}),this.input&&(this.input.placeholder=this.config.placeholder,this.input.setAttribute("autocomplete","off"),this.input.setAttribute("aria-expanded","false"),this.input.setAttribute("aria-autocomplete","list"),this.input.setAttribute("role","combobox"),this.input.setAttribute("aria-haspopup","listbox"),n=this.suggestionList.id||"search-suggestions-".concat(Math.random().toString(16).slice(2)),this.suggestionList.id=n,this.input.setAttribute("aria-controls",n));case 2:return t.a(2)}},t,this)})),function(){return m.apply(this,arguments)})},{key:"bindEvents",value:function(){var t,e,n,r,i,o=this;null===(t=this.input)||void 0===t||t.addEventListener("input",function(){var t=String(o.input.value||"").trim();o.state.query=t,o.state.activeSuggestion=-1,o.debounceTimer&&clearTimeout(o.debounceTimer),o.debounceTimer=setTimeout(function(){o.search(t)},o.config.debounceMs)}),null===(e=this.form)||void 0===e||e.addEventListener("submit",function(t){var e;t.preventDefault();var n=String((null===(e=o.input)||void 0===e?void 0:e.value)||"").trim();o.state.query=n,o.closeSuggestions(),o.search(n)}),null===(n=this.input)||void 0===n||n.addEventListener("keydown",function(t){return o.handleKeydown(t)}),null===(r=this.suggestionList)||void 0===r||r.addEventListener("mousedown",function(t){return t.preventDefault()}),null===(i=this.suggestionList)||void 0===i||i.addEventListener("click",function(t){return o.handleSuggestionClick(t)}),document.addEventListener("click",this.boundOutsideClick)}},{key:"handleOutsideClick",value:function(t){this.container.contains(t.target)||this.closeSuggestions()}},{key:"handleSuggestionClick",value:function(t){var e,n,r=null===(e=t.target)||void 0===e||null===(n=e.closest)||void 0===n?void 0:n.call(e,'[data-role="suggestion"]');if(r){var i=String(r.getAttribute("data-value")||"").trim();i&&this.selectSuggestion(i)}}},{key:"handleKeydown",value:function(t){if(this.state.open&&this.state.suggestions.length)if("ArrowDown"!==t.key)if("ArrowUp"!==t.key){if("Enter"!==t.key)"Escape"===t.key&&(t.preventDefault(),this.closeSuggestions());else if(this.state.activeSuggestion>=0){t.preventDefault();var e=this.state.suggestions[this.state.activeSuggestion];this.selectSuggestion((null==e?void 0:e.value)||(null==e?void 0:e.label)||"")}}else{t.preventDefault();var n=this.state.activeSuggestion<=0?this.state.suggestions.length-1:this.state.activeSuggestion-1;this.setActiveSuggestion(n)}else{t.preventDefault();var r=(this.state.activeSuggestion+1)%this.state.suggestions.length;this.setActiveSuggestion(r)}else"Escape"===t.key&&this.closeSuggestions()}},{key:"setActiveSuggestion",value:function(t){var e,n=this;this.state.activeSuggestion=t,Array.from((null===(e=this.suggestionList)||void 0===e?void 0:e.querySelectorAll('[data-role="suggestion"]'))||[]).forEach(function(e,r){var i,o=r===t;e.setAttribute("aria-selected",o?"true":"false"),e.classList.toggle("is-active",o),o&&(e.scrollIntoView({block:"nearest"}),null===(i=n.input)||void 0===i||i.setAttribute("aria-activedescendant",e.id))})}},{key:"selectSuggestion",value:function(t){this.input&&(this.input.value=t,this.state.query=t,this.state.activeSuggestion=-1,this.closeSuggestions(),this.dispatchEvent("searchsuggestselect",{suggestion:t}),this.search(t))}},{key:"search",value:(h=p(d().m(function t(e){var n,r,i,o,a,l;return d().w(function(t){for(;;)switch(t.p=t.n){case 0:if(!((n=String(e||"").trim()).length<this.config.minLength)){t.n=1;break}return this.state.suggestions=[],this.state.results=[],this.state.activeSuggestion=-1,this.closeSuggestions(),this.renderSuggestions(),this.renderResults(),t.a(2);case 1:return r=++this.fetchSeq,this.setLoading(!0),t.p=2,t.n=3,Promise.all([this.fetchSuggestions(n),this.fetchResults(n)]);case 3:if(i=t.v,o=s(i,2),a=o[0],l=o[1],r===this.fetchSeq){t.n=4;break}return t.a(2);case 4:this.state.suggestions=a,this.state.results=l,this.state.activeSuggestion=-1,this.openSuggestionsIfNeeded(),this.renderSuggestions(),this.renderResults(),this.dispatchEvent("searchchange",{query:n,suggestionCount:a.length,resultCount:l.length});case 5:return t.p=5,r===this.fetchSeq&&this.setLoading(!1),t.f(5);case 6:return t.a(2)}},t,this,[[2,,5,6]])})),function(t){return h.apply(this,arguments)})},{key:"openSuggestionsIfNeeded",value:function(){var t,e,n=this.state.suggestions.length>0&&document.activeElement===this.input;this.state.open=n,this.suggestionPanel&&(this.suggestionPanel.hidden=!n),null===(t=this.input)||void 0===t||t.setAttribute("aria-expanded",n?"true":"false"),n||null===(e=this.input)||void 0===e||e.removeAttribute("aria-activedescendant")}},{key:"closeSuggestions",value:function(){var t,e;this.state.open=!1,this.suggestionPanel&&(this.suggestionPanel.hidden=!0),null===(t=this.input)||void 0===t||t.setAttribute("aria-expanded","false"),null===(e=this.input)||void 0===e||e.removeAttribute("aria-activedescendant")}},{key:"fetchSuggestions",value:(f=p(d().m(function t(e){var n,r,i,o,a,l,s,u;return d().w(function(t){for(;;)switch(t.n){case 0:if(!this.config.suggestionsEndpoint){t.n=4;break}return(n=new URL(this.config.suggestionsEndpoint,window.location.origin)).searchParams.set("q",e),n.searchParams.set("limit",String(this.config.suggestionLimit)),t.n=1,fetch(n.toString(),{credentials:"same-origin"});case 1:if((r=t.v).ok){t.n=2;break}return t.a(2,[]);case 2:return t.n=3,r.json();case 3:return i=t.v,o=this.normalizeSuggestionList(i),a=e.toLowerCase(),t.a(2,o.filter(function(t){return t.label.toLowerCase().includes(a)}).slice(0,this.config.suggestionLimit));case 4:return l=this.parseJsonAttr("data-suggestions",[]),s=this.normalizeSuggestionList(l),u=e.toLowerCase(),t.a(2,s.filter(function(t){return t.label.toLowerCase().includes(u)}).slice(0,this.config.suggestionLimit))}},t,this)})),function(t){return f.apply(this,arguments)})},{key:"fetchResults",value:(c=p(d().m(function t(e){var n,r,i,o,a,l,s,u;return d().w(function(t){for(;;)switch(t.n){case 0:if(!this.config.endpoint){t.n=4;break}return(n=new URL(this.config.endpoint,window.location.origin)).searchParams.set("q",e),n.searchParams.set("limit",String(this.config.resultLimit)),t.n=1,fetch(n.toString(),{credentials:"same-origin"});case 1:if((r=t.v).ok){t.n=2;break}return t.a(2,[]);case 2:return t.n=3,r.json();case 3:return i=t.v,o=this.normalizeResultList(i),a=e.toLowerCase(),t.a(2,o.filter(function(t){return t.title.toLowerCase().includes(a)||t.description.toLowerCase().includes(a)||t.url.toLowerCase().includes(a)}).slice(0,this.config.resultLimit));case 4:return l=this.parseJsonAttr("data-search-data",[]),s=this.normalizeResultList(l),u=e.toLowerCase(),t.a(2,s.filter(function(t){return t.title.toLowerCase().includes(u)||t.description.toLowerCase().includes(u)||t.url.toLowerCase().includes(u)}).slice(0,this.config.resultLimit))}},t,this)})),function(t){return c.apply(this,arguments)})},{key:"normalizeSuggestionList",value:function(t){return(Array.isArray(t)?t:Array.isArray(null==t?void 0:t.items)?t.items:Array.isArray(null==t?void 0:t.rows)?t.rows:[]).map(function(t){if(t&&"object"===l(t)){var e,n,r,i,o,a=String(null!==(e=null!==(n=null!==(r=null!==(i=t.label)&&void 0!==i?i:t.name)&&void 0!==r?r:t.title)&&void 0!==n?n:t.value)&&void 0!==e?e:"").trim();return{label:a,value:String(null!==(o=t.value)&&void 0!==o?o:a).trim()}}var s=String(null!=t?t:"").trim();return{label:s,value:s}}).filter(function(t){return t.label})}},{key:"normalizeResultList",value:function(t){return(Array.isArray(t)?t:Array.isArray(null==t?void 0:t.items)?t.items:Array.isArray(null==t?void 0:t.rows)?t.rows:Array.isArray(null==t?void 0:t.data)?t.data:[]).map(function(t){var e,n,r,i,o,a,s;return t&&"object"===l(t)?{title:String(null!==(e=null!==(n=null!==(r=t.title)&&void 0!==r?r:t.name)&&void 0!==n?n:t.label)&&void 0!==e?e:"").trim(),description:String(null!==(i=null!==(o=t.description)&&void 0!==o?o:t.content)&&void 0!==i?i:"").trim(),url:String(null!==(a=null!==(s=t.url)&&void 0!==s?s:t.href)&&void 0!==a?a:"").trim(),item:t}:{title:String(null!=t?t:"").trim(),description:"",url:"",item:t}}).filter(function(t){return t.title})}},{key:"setLoading",value:function(t){var e,n;this.state.loading=!!t,this.loadingEl&&(this.loadingEl.hidden=!t),null===(e=this.loaderState)||void 0===e||null===(n=e.setLoading)||void 0===n||n.call(e,this.state.loading,"Searching...")}},{key:"getBindableState",value:function(){return{query:this.state.query||"",suggestions:a(this.state.suggestions||[]),results:a(this.state.results||[])}}},{key:"applyBindableState",value:function(t){if(t&&"object"===l(t)&&"string"==typeof t.query){var e=t.query.trim();e!==this.state.query&&(this.state.query=e,this.input&&(this.input.value=e),this.search(e))}}},{key:"renderSuggestions",value:function(){var t=this;if(this.suggestionList){this.suggestionList.replaceChildren();var e,n=this.suggestionList.id||"search-suggestions-".concat(Math.random().toString(16).slice(2));this.suggestionList.id=n,this.state.suggestions.forEach(function(e,r){var i=document.createElement("li");i.className="holi-search-suggestion-row",i.setAttribute("role","presentation");var o=document.createElement("button");o.type="button",o.className="holi-search-suggestion",o.setAttribute("data-role","suggestion"),o.setAttribute("data-value",e.value),o.setAttribute("aria-selected","false"),o.setAttribute("role","option"),o.id="".concat(n,"-item-").concat(r),o.textContent=e.label,i.appendChild(o),t.suggestionList.appendChild(i)}),this.state.open&&this.state.suggestions.length>0?(this.suggestionPanel.hidden=!1,null===(e=this.input)||void 0===e||e.setAttribute("aria-expanded","true")):this.closeSuggestions()}}},{key:"renderResults",value:function(){var t=this;if(this.resultsList&&(this.resultsList.replaceChildren(),this.state.results.forEach(function(e){var n=document.createElement("article");n.className="holi-search-result",n.setAttribute("data-role","result");var r=document.createElement(e.url?"a":"h4");if(r.className="holi-search-result-title",r.textContent=e.title,e.url&&(r.href=e.url,r.setAttribute("data-role","result-link")),n.appendChild(r),e.description){var i=document.createElement("p");i.className="holi-search-result-description",i.textContent=e.description,n.appendChild(i)}t.resultsList.appendChild(n)}),this.emptyEl)){var e=this.state.query.length>=this.config.minLength;this.emptyEl.hidden=this.state.loading||!e||this.state.results.length>0}}},{key:"destroy",value:function(){var t,n,r,i;this.debounceTimer&&clearTimeout(this.debounceTimer),null===(t=this.loaderState)||void 0===t||null===(n=t.destroy)||void 0===n||n.call(t),null===(r=this.stateBinding)||void 0===r||null===(i=r.disconnect)||void 0===i||i.call(r),document.removeEventListener("click",this.boundOutsideClick),b(e,"destroy",this,3)([])}}],u=[{key:"selector",get:function(){return"[data-search]"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"search"}}],r&&v(n.prototype,r),u&&v(n,u),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,u,c,f,h,m,g}(r.Component);E=A,C="search-template",(O=k(O="templateId"))in E?Object.defineProperty(E,O,{value:C,enumerable:!0,configurable:!0,writable:!0}):E[O]=C,"undefined"!=typeof window&&(window.SearchComponent=A)},8796(t,e,n){"use strict";n.r(e),n.d(e,{SelectComponent:()=>w});var r=n(1257),i=n(853);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var a=r&&r.prototype instanceof u?r:u,c=Object.create(a.prototype);return l(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(l(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,l(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,l(h,"constructor",d),l(d,"constructor",c),c.displayName="GeneratorFunction",l(d,i,"GeneratorFunction"),l(h),l(h,i,"Generator"),l(h,r,function(){return this}),l(h,"toString",function(){return"[object Generator]"}),(a=function(){return{w:o,m:p}})()}function l(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}l=function(t,e,n,r){function o(e,n){l(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},l(t,e,n,r)}function s(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach(function(e){b(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,g(r.key),r)}}function f(t,e,n){return e=y(e),function(t,e){if(e&&("object"==o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,h()?Reflect.construct(e,n||[],y(t).constructor):e.apply(t,n))}function h(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(h=function(){return!!t})()}function p(t,e,n,r){var i=v(y(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function v(){return v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=y(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},v.apply(null,arguments)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}function b(t,e,n){return(e=g(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function g(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var w=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),f(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)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&&m(t,e)}(e,t),n=e,r=[{key:"getBindingContext",value:function(){var t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return p(e,"getBindingContext",this,3)([c({label:(null===(t=this.container)||void 0===t?void 0:t.getAttribute("label"))||(null===(n=this.container)||void 0===n?void 0:n.getAttribute("data-label"))||""},r)])}},{key:"render",value:(l=a().m(function t(){var n,r=this;return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,p(e,"render",this,3)([]);case 1:this.boundBlur||(this.boundBlur=function(){return r.validate()}),this.fieldRoot=this.container.querySelector(".holi-select-field")||this.element,this.labelEl=this.container.querySelector('[data-role="label"]'),this.errorEl=this.container.querySelector('[data-role="error"]'),this.projectSlot("label"),this.projectSlot("helper"),this.projectSlot("error"),this.applyFieldAttributes(),null===(n=this.input)||void 0===n||n.addEventListener("blur",this.boundBlur),this.validate();case 2:return t.a(2)}},t,this)}),u=function(){var t=this,e=arguments;return new Promise(function(n,r){var i=l.apply(t,e);function o(t){s(i,n,r,o,a,"next",t)}function a(t){s(i,n,r,o,a,"throw",t)}o(void 0)})},function(){return u.apply(this,arguments)})},{key:"projectSlot",value:function(t){var e=this.container.querySelector('slot[name="'.concat(t,'"]'));if(e){var n=Array.from(this.container.querySelectorAll('[slot="'.concat(t,'"]')));if(n.length){var r=document.createDocumentFragment();n.forEach(function(t){t.removeAttribute("slot"),r.appendChild(t)}),e.replaceWith(r)}}}},{key:"readBoolAttr",value:function(t,n){return p(e,"readBooleanAttr",this,3)([t,n])}},{key:"applyFieldAttributes",value:function(){var t,e=this.container.getAttribute("name")||this.container.getAttribute("data-name")||"",n=this.readBoolAttr("required",!1)||this.readBoolAttr("data-required",!1),r=this.container.getAttribute("data-required-message")||"Please select an option.";this.required=n,this.requiredMessage=r,this.valueInput&&e&&(this.valueInput.name=e),this.input&&(this.input.required=n,this.input.setAttribute("aria-required",n?"true":"false"));var i=(null===(t=this.input)||void 0===t?void 0:t.id)||"holi-select-".concat(Math.random().toString(16).slice(2));this.input&&(this.input.id=i),this.labelEl&&!this.labelEl.getAttribute("for")&&this.labelEl.setAttribute("for",i);var o=this.container.getAttribute("value")||this.container.getAttribute("data-value");o&&(this.value=o)}},{key:"validate",value:function(){var t=!!this.required&&!this.value;return this.fieldRoot&&this.fieldRoot.classList.toggle("is-invalid",t),this.errorEl&&(this.errorEl.hidden=!t,this.errorEl.textContent=t?this.requiredMessage:""),this.input&&this.input.setAttribute("aria-invalid",t?"true":"false"),!t}},{key:"selectItem",value:function(t){p(e,"selectItem",this,3)([t]),this.validate()}},{key:"destroy",value:function(){var t;null===(t=this.input)||void 0===t||t.removeEventListener("blur",this.boundBlur),p(e,"destroy",this,3)([])}}],o=[{key:"selector",get:function(){return"holi-select"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"select-field"}},{key:"getNativeSelectors",value:function(){return['select[component="select"]','select[role="select"]','select[component="select-field"]','select[role="select-field"]']}},{key:"prepareHost",value:function(t){if(!(t instanceof HTMLSelectElement))return t;var e=document.createElement("section");return(0,i.ts)(t,e,{exclude:["component","role"]}),e.setAttribute("component","select-field"),e.setAttribute("data-items",JSON.stringify((0,i.NQ)(t))),e.setAttribute("value",(0,i.BD)(t)),t.replaceWith(e),e}}],r&&d(n.prototype,r),o&&d(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,l,u}(r.DropdownComponent);b(w,"templateId","select-field-template"),"undefined"!=typeof window&&(window.SelectComponent=w)},3911(t,e,n){"use strict";n.r(e),n.d(e,{StatsCard:()=>S});var r=n(8812),i=n(3076);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var a=r&&r.prototype instanceof u?r:u,c=Object.create(a.prototype);return l(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(l(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,l(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,l(h,"constructor",d),l(d,"constructor",c),c.displayName="GeneratorFunction",l(d,i,"GeneratorFunction"),l(h),l(h,i,"Generator"),l(h,r,function(){return this}),l(h,"toString",function(){return"[object Generator]"}),(a=function(){return{w:o,m:p}})()}function l(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}l=function(t,e,n,r){function o(e,n){l(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},l(t,e,n,r)}function s(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function u(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){s(o,r,i,a,l,"next",t)}function l(t){s(o,r,i,a,l,"throw",t)}a(void 0)})}}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,m(r.key),r)}}function d(t,e,n){return e=v(e),function(t,e){if(e&&("object"==o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,f()?Reflect.construct(e,n||[],v(t).constructor):e.apply(t,n))}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!t})()}function h(t,e,n,r){var i=p(v(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=v(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},p.apply(null,arguments)}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}function m(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var b,g,w,S=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=d(this,e,[t,r])).templateId=e.templateId,n.value=n.parseNumber(r.value,t.dataset.value,0),n.label=r.label||t.dataset.label||"Metric",n.trend=n.normalizeTrend(r.trend||t.dataset.trend||"neutral"),n.change=n.parseNumber(r.change,t.dataset.change,0),n.unit=r.unit||t.dataset.unit||"",n.animate=n.parseBoolean(r.animate,t.dataset.animate,!0),n.duration=n.parseNumber(r.duration,t.dataset.duration,1200),n.icon=r.icon||t.dataset.icon||n.getDefaultIcon(n.label),n.isAnimating=!1,n.valueEl=null,n.labelEl=null,n.changeEl=null,n.trendEl=null,n.iconEl=null,n.sparklineEl=null,n.frameId=null,void 0===n.container.statsCard&&Object.defineProperty(n.container,"statsCard",{value:n,writable:!1}),n.onMouseEnter=function(){var t;null===(t=n.sparklineEl)||void 0===t||t.classList.add("spark-active")},n.onMouseLeave=function(){var t;null===(t=n.sparklineEl)||void 0===t||t.classList.remove("spark-active")},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&y(t,e)}(e,t),n=e,r=[{key:"parseNumber",value:function(){for(var t,e=(t=arguments.length-1)<0||arguments.length<=t?void 0:arguments[t],n=0;n<arguments.length-1;n+=1){var r=n<0||arguments.length<=n?void 0:arguments[n];if(null!=r&&""!==r){var i=Number(r);if(!Number.isNaN(i))return i}}return e}},{key:"parseBoolean",value:function(){for(var t,e=(t=arguments.length-1)<0||arguments.length<=t?void 0:arguments[t],n=0;n<arguments.length-1;n+=1){var r=n<0||arguments.length<=n?void 0:arguments[n];if(null!=r&&""!==r){var i=String(r).toLowerCase();if("true"===i||"1"===i||"yes"===i)return!0;if("false"===i||"0"===i||"no"===i)return!1}}return e}},{key:"normalizeTrend",value:function(t){var e=String(t||"neutral").toLowerCase();return["up","down","neutral"].includes(e)?e:"neutral"}},{key:"getDefaultIcon",value:function(t){return{revenue:"$",users:"U",orders:"O",conversion:"C",sales:"S"}[String(t||"").toLowerCase()]||"M"}},{key:"validateStructure",value:function(){if(h(e,"validateStructure",this,3)([]),this.duration<0)throw new Error("StatsCard duration must be >= 0")}},{key:"init",value:(f=u(a().m(function t(){return a().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents(),this.update({value:this.value,change:this.change,trend:this.trend,label:this.label,unit:this.unit,icon:this.icon},{animate:this.animate});case 2:return t.a(2)}},t,this)})),function(){return f.apply(this,arguments)})},{key:"render",value:(s=u(a().m(function t(){var n,r,o,l,s,u;return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,h(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".stats-card-view"),this.valueEl=null===(n=this.element)||void 0===n?void 0:n.querySelector(".stats-value"),this.labelEl=null===(r=this.element)||void 0===r?void 0:r.querySelector(".stats-label"),this.changeEl=null===(o=this.element)||void 0===o?void 0:o.querySelector(".change-value"),this.trendEl=null===(l=this.element)||void 0===l?void 0:l.querySelector(".change-trend"),this.iconEl=null===(s=this.element)||void 0===s?void 0:s.querySelector(".stats-icon"),this.sparklineEl=null===(u=this.element)||void 0===u?void 0:u.querySelector(".stats-sparkline"),this.element&&this.valueEl&&this.labelEl&&this.changeEl&&this.trendEl&&this.iconEl){t.n=2;break}throw new Error("StatsCard template is missing required nodes");case 2:this.stateBinding=(0,i.x)(this,{defaultPath:"statscard",eventName:"statsupdate",getSnapshot:function(t){return t.getBindableState()},applySnapshot:function(t,e){return t.applyBindableState(e)}});case 3:return t.a(2)}},t,this)})),function(){return s.apply(this,arguments)})},{key:"bindEvents",value:function(){this.container.addEventListener("mouseenter",this.onMouseEnter),this.container.addEventListener("mouseleave",this.onMouseLeave)}},{key:"applyStaticFields",value:function(){this.iconEl.textContent=this.icon,this.labelEl.textContent=this.label,this.changeEl.textContent="".concat(this.change>0?"+":"").concat(this.change.toFixed(1),"%"),this.trendEl.textContent=this.getTrendGlyph(this.trend),this.element.classList.remove("trend-up","trend-down","trend-neutral"),this.element.classList.add("trend-".concat(this.trend))}},{key:"getTrendGlyph",value:function(t){return"up"===t?"^":"down"===t?"v":"-"}},{key:"formatValue",value:function(t){return"$"===this.unit?"$".concat(Number(t).toLocaleString()):"%"===this.unit?"".concat(Number(t).toFixed(1),"%"):Number(t).toLocaleString()}},{key:"renderValue",value:function(t){this.valueEl.textContent=this.formatValue(t)}},{key:"animateValue",value:function(t,e){var n=this;if(!this.animate||0===this.duration)return this.renderValue(e),void(this.isAnimating=!1);this.frameId&&cancelAnimationFrame(this.frameId),this.isAnimating=!0;var r=null,i=e-t,o=function(e){null==r&&(r=e);var a=Math.min((e-r)/n.duration,1),l=1-Math.pow(1-a,3);n.renderValue(t+i*l),a<1?n.frameId=requestAnimationFrame(o):(n.frameId=null,n.isAnimating=!1)};this.frameId=requestAnimationFrame(o)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.value;void 0!==t.label&&(this.label=t.label),void 0!==t.unit&&(this.unit=t.unit),void 0!==t.icon&&(this.icon=t.icon),void 0!==t.value&&(this.value=this.parseNumber(t.value,this.value)),void 0!==t.change&&(this.change=this.parseNumber(t.change,this.change)),void 0!==t.trend&&(this.trend=this.normalizeTrend(t.trend)),this.applyStaticFields(),this.animateValue(e,this.value),this.dispatchEvent("statsupdate",{value:this.value,change:this.change,trend:this.trend,label:this.label})}},{key:"getBindableState",value:function(){return{value:this.value,change:this.change,trend:this.trend,label:this.label,unit:this.unit,icon:this.icon}}},{key:"applyBindableState",value:function(t){t&&"object"===o(t)&&this.update(t,{animate:!1})}},{key:"destroy",value:function(){var t,n;this.frameId&&(cancelAnimationFrame(this.frameId),this.frameId=null),null===(t=this.stateBinding)||void 0===t||null===(n=t.disconnect)||void 0===n||n.call(t),this.container.removeEventListener("mouseenter",this.onMouseEnter),this.container.removeEventListener("mouseleave",this.onMouseLeave),h(e,"destroy",this,3)([])}}],l=[{key:"selector",get:function(){return"[data-stats], .stats-card"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"statscard"}}],r&&c(n.prototype,r),l&&c(n,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,l,s,f}(r.Component);b=S,w="statscard",(g=m(g="templateId"))in b?Object.defineProperty(b,g,{value:w,enumerable:!0,configurable:!0,writable:!0}):b[g]=w,"undefined"!=typeof window&&(window.StatsCard=S)},9396(t,e,n){"use strict";n.r(e),n.d(e,{TabsComponent:()=>g});var r=n(8812),i=n(9062),o=n(3076);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function l(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return s(c,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var a={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(s(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,s(h,"constructor",d),s(d,"constructor",c),c.displayName="GeneratorFunction",s(d,i,"GeneratorFunction"),s(h),s(h,i,"Generator"),s(h,r,function(){return this}),s(h,"toString",function(){return"[object Generator]"}),(l=function(){return{w:o,m:p}})()}function s(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}s=function(t,e,n,r){function o(e,n){s(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},s(t,e,n,r)}function u(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function c(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){u(o,r,i,a,l,"next",t)}function l(t){u(o,r,i,a,l,"throw",t)}a(void 0)})}}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,f(r.key),r)}}function f(t){var e=function(t){if("object"!=a(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==a(e)?e:e+""}function h(t,e,n){return e=b(e),function(t,e){if(e&&("object"==a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,p()?Reflect.construct(e,n||[],b(t).constructor):e.apply(t,n))}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(p=function(){return!!t})()}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}function y(t,e,n,r){var i=m(b(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function m(){return m="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=b(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},m.apply(null,arguments)}function b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},b(t)}var g=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=h(this,e,[t,r])).templateId="tabs",n.lazyLoad=n.container.hasAttribute("lazy"),n.cacheContent=!n.container.hasAttribute("no-cache"),n.preloadCount=parseInt(n.container.dataset.preload||0,10),n.providerName=t.getAttribute("provider")||"default",n.contentProviderInstance=null,n.panelCache=new Map,n.loadingStates=new Map,n.tabs=[],n.activeIndex=-1,!1!==r.autoInit&&n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&v(t,e)}(e,t),n=e,r=[{key:"init",value:(S=c(l().m(function t(){return l().w(function(t){for(;;)switch(t.n){case 0:return y(e,"init",this,3)([]),t.n=1,this.resolveDataSource();case 1:return this.data=t.v,t.n=2,this.render();case 2:return this.bindEvents(),t.n=3,this.loadTabContent(0);case 3:return t.a(2)}},t,this)})),function(){return S.apply(this,arguments)})},{key:"render",value:(w=c(l().m(function t(){return l().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,y(e,"render",this,3)([]);case 1:return this.element=this.container.querySelector(".tabs"),this.loaderState=(0,i.w)(this,{host:this.element,busyTarget:this.element,scope:"block",defaultMessage:"Loading tab..."}),this.stateBinding=(0,o.x)(this,{defaultPath:"tabs",eventName:"tabchange",getSnapshot:function(t){return t.getBindableState()},applySnapshot:function(t,e){return t.applyBindableState(e)}}),this.renderDataTabs(),this.refreshTabs(),t.n=2,this.switchToTab(0,!1);case 2:return t.a(2)}},t,this)})),function(){return w.apply(this,arguments)})},{key:"renderDataTabs",value:function(){var t,e,n=null===(t=this.element)||void 0===t?void 0:t.querySelector(".tabbar"),r=null===(e=this.element)||void 0===e?void 0:e.querySelector(".tab_content_panels");n&&r&&(n.replaceChildren(),r.replaceChildren(),this.data.forEach(function(t,e){var i=document.createElement("li");i.className="link";var o=document.createElement("a");o.href="#",o.dataset.tab=String(e),o.textContent=(null==t?void 0:t.label)||"Tab ".concat(e+1);var a=document.createElement("span");a.className="tab-controls";var l=document.createElement("button");l.className="tab-refresh",l.title="Refresh",l.type="button",l.textContent="R";var s=document.createElement("button");s.className="close-tab",s.title="Close",s.type="button",s.textContent="X",a.append(l,s),o.appendChild(a),i.appendChild(o),n.appendChild(i);var u=document.createElement("div");u.className="tab_content_panel",u.id="tab-".concat(e);var c=document.createElement("div");c.className="tab_content",u.appendChild(c),r.appendChild(u)}))}},{key:"refreshTabs",value:function(){var t,e,n=(null===(t=this.element)||void 0===t?void 0:t.querySelectorAll("[data-tab]"))||[],r=(null===(e=this.element)||void 0===e?void 0:e.querySelectorAll(".tab_content_panel, .tab-content-panel"))||[];this.tabs=Array.from(n).map(function(t,e){return{link:t,panel:r[e]}}).filter(function(t){return t.panel})}},{key:"loadTabContent",value:(g=c(l().m(function t(e){var n,r,i,o,a,s=arguments;return l().w(function(t){for(;;)switch(t.p=t.n){case 0:if(n=s.length>1&&void 0!==s[1]&&s[1],this.refreshTabs(),r=this.tabs[e]){t.n=1;break}return t.a(2);case 1:if(i=r.panel,o="tab-".concat(e),!this.cacheContent||!this.panelCache.has(o)||n){t.n=2;break}return this.setPanelContent(i,this.panelCache.get(o)),this.updateLoaderState(e,!1),t.a(2);case 2:return this.updateLoaderState(e,!0),t.p=3,t.n=4,this.fetchTabContent(e);case 4:a=t.v,this.cacheContent&&this.panelCache.set(o,a),this.setPanelContent(i,a),this.updateLoaderState(e,!1),t.n=6;break;case 5:t.p=5,t.v,this.setPanelError(i,"Load failed"),this.updateLoaderState(e,!1);case 6:return t.a(2)}},t,this,[[3,5]])})),function(t){return g.apply(this,arguments)})},{key:"getPanelContentElement",value:function(t){return t.querySelector(".tab_content")||t.querySelector(".tab-content")}},{key:"setPanelContent",value:function(t,e){var n=this.getPanelContentElement(t);n&&(e instanceof Node?n.replaceChildren(e):n.textContent=null==e?"":String(e))}},{key:"setPanelError",value:function(t,e){var n=this.getPanelContentElement(t);if(n){var r=document.createElement("div");r.className="error",r.textContent=e,n.replaceChildren(r)}}},{key:"getContentProviders",value:function(){return this.container.contentProviders||window.contentProviders||{}}},{key:"resolveDataSource",value:(b=c(l().m(function t(){var e,n;return l().w(function(t){for(;;)switch(t.n){case 0:if(n=this.container.dataset.source){t.n=1;break}return t.a(2,[]);case 1:return t.n=2,this.ensureProviderInstance();case 2:return t.a(2,(null===(e=this.contentProviderInstance)||void 0===e?void 0:e.resolve(n))||[])}},t,this)})),function(){return b.apply(this,arguments)})},{key:"ensureProviderInstance",value:(m=c(l().m(function t(){var e,n,r,i,o;return l().w(function(t){for(;;)switch(t.n){case 0:if(!this.contentProviderInstance){t.n=1;break}return t.a(2,this.contentProviderInstance);case 1:if(e=this.getContentProviders(),n=e[this.providerName]){t.n=2;break}return console.warn('No ContentProvider "'.concat(this.providerName,'" found')),t.a(2,null);case 2:if(r=window.appState||window.pageContext||{},"function"!=typeof n){t.n=4;break}return this.contentProviderInstance=new n(r),t.n=3,null===(i=(o=this.contentProviderInstance).init)||void 0===i?void 0:i.call(o);case 3:t.n=5;break;case 4:"object"===a(n)?this.contentProviderInstance=n:this.contentProviderInstance=null;case 5:return t.a(2,this.contentProviderInstance)}},t,this)})),function(){return m.apply(this,arguments)})},{key:"updateLoaderState",value:function(t,e){var n,r="tab-".concat(t);if(this.loadingStates.set(r,e),t===this.activeIndex||this.activeIndex<0){var i,o,a,l=(null===(i=this.data)||void 0===i||null===(i=i[t])||void 0===i?void 0:i.label)||"Tab ".concat(t+1);null===(o=this.loaderState)||void 0===o||null===(a=o.setLoading)||void 0===a||a.call(o,e,"Loading ".concat(l,"..."))}(null===(n=this.element)||void 0===n?void 0:n.querySelector('[data-loader="tab-'.concat(t,'"]')))&&this.dispatchEvent("staterefresh",{path:"loadingStates['tab-".concat(t,"']"),value:e})}},{key:"fetchTabContent",value:(p=c(l().m(function t(e){var n,r,i,o,a,s;return l().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.ensureProviderInstance();case 1:if(i=this.data[e],null==(o=this.tabs[e])||null===(n=o.link)||void 0===n||!n.dataset.src){t.n=4;break}return t.n=2,fetch(o.link.dataset.src);case 2:return a=t.v,t.n=3,a.text();case 3:return t.a(2,t.v);case 4:return t.n=5,null===(r=this.contentProviderInstance)||void 0===r?void 0:r.getContent(i,e);case 5:if(s=t.v){t.n=6;break}s="";case 6:return t.a(2,s)}},t,this)})),function(t){return p.apply(this,arguments)})},{key:"bindEvents",value:function(){var t=this;this.on("click",function(){var e=c(l().m(function e(n){var r,i,o,a,s,u;return l().w(function(e){for(;;)switch(e.n){case 0:if(!(r=n.target.closest("[data-tab]"))){e.n=1;break}return n.preventDefault(),i=parseInt(r.dataset.tab,10),e.n=1,t.switchToTab(i);case 1:if(!n.target.closest(".tab-refresh")){e.n=2;break}if(!((a=parseInt((null===(o=n.target.closest("[data-tab]"))||void 0===o?void 0:o.dataset.tab)||"-1",10))>=0)){e.n=2;break}return e.n=2,t.refreshTab(a);case 2:n.target.closest(".close-tab")&&(u=parseInt((null===(s=n.target.closest("[data-tab]"))||void 0===s?void 0:s.dataset.tab)||"-1",10))>=0&&t.removeTab(u);case 3:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()),this.on("keydown",function(e){var n;e.target.closest(".tabbar")&&(null===(n=t.handleKeyboardNavigation)||void 0===n||n.call(t,e))})}},{key:"switchToTab",value:(f=c(l().m(function t(e){var n,r=arguments;return l().w(function(t){for(;;)switch(t.n){case 0:if(n=!(r.length>1&&void 0!==r[1])||r[1],this.refreshTabs(),!(e<0||e>=this.tabs.length||e===this.activeIndex)){t.n=1;break}return t.a(2);case 1:if(this.updateTabVisuals(e),this.activeIndex=e,!n){t.n=2;break}return t.n=2,this.loadTabContent(e);case 2:this.dispatchEvent("tabchange",{index:e,data:this.data[e],fromCache:this.panelCache.has("tab-".concat(e))});case 3:return t.a(2)}},t,this)})),function(t){return f.apply(this,arguments)})},{key:"updateTabVisuals",value:function(t){this.tabs.forEach(function(e,n){var r,i,o,a=n===t,l=null===(r=e.link)||void 0===r?void 0:r.parentElement;l&&(l.classList.toggle("active",a),null===(i=e.link)||void 0===i||i.setAttribute("aria-selected",String(a)),null===(o=e.link)||void 0===o||o.setAttribute("tabindex",a?"0":"-1")),e.panel.hidden=!a,e.panel.setAttribute("aria-hidden",String(!a))})}},{key:"refreshTab",value:(u=c(l().m(function t(e){return l().w(function(t){for(;;)switch(t.n){case 0:return this.panelCache.delete("tab-".concat(e)),t.n=1,this.loadTabContent(e,!0);case 1:return t.a(2)}},t,this)})),function(t){return u.apply(this,arguments)})},{key:"bindDataContext",value:function(t,n,r){var i;null===(i=y(e,"bindDataContext",this,3))||void 0===i||i([t,n,r]);var o=t.querySelector("a[data-tab]");o&&(o.dataset.tab=String(r))}},{key:"addTab",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.tabs.length,r={label:t,contentUrl:e};this.data.splice(n,0,r),this.refresh(),this.switchToTab(n)}},{key:"removeTab",value:function(t){this.refreshTabs(),this.tabs.length<=1||(this.panelCache.delete("tab-".concat(t)),this.loadingStates.delete("tab-".concat(t)),this.data.splice(t,1),this.refresh())}},{key:"clearCache",value:function(){this.panelCache.clear(),this.loadingStates.clear()}},{key:"getBindableState",value:function(){var t;return{activeIndex:this.activeIndex,label:(null===(t=this.data)||void 0===t||null===(t=t[this.activeIndex])||void 0===t?void 0:t.label)||""}}},{key:"applyBindableState",value:function(t){if(t&&"object"===a(t)){var e=Number(t.activeIndex);Number.isInteger(e)&&(e<0||e>=this.tabs.length||e!==this.activeIndex&&this.switchToTab(e,!0))}}},{key:"destroy",value:function(){var t,n,r,i;null===(t=this.loaderState)||void 0===t||null===(n=t.destroy)||void 0===n||n.call(t),null===(r=this.stateBinding)||void 0===r||null===(i=r.disconnect)||void 0===i||i.call(r),y(e,"destroy",this,3)([])}}],s=[{key:"selector",get:function(){return"tabs"}},{key:"library",get:function(){return"holi"}},{key:"matchesLibrary",value:function(t,n){return y(e,"matchesLibrary",this,2)([t,n])}}],r&&d(n.prototype,r),s&&d(n,s),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,s,u,f,p,m,b,g,w,S}(r.Component);"undefined"!=typeof window&&(window.TabsComponent=g)},6618(t,e,n){"use strict";n.r(e),n.d(e,{TextAreaComponent:()=>S});var r=n(8812),i=n(3573);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function l(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return s(c,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var a={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(s(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,s(h,"constructor",d),s(d,"constructor",c),c.displayName="GeneratorFunction",s(d,i,"GeneratorFunction"),s(h),s(h,i,"Generator"),s(h,r,function(){return this}),s(h,"toString",function(){return"[object Generator]"}),(l=function(){return{w:o,m:p}})()}function s(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}s=function(t,e,n,r){function o(e,n){s(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},s(t,e,n,r)}function u(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,m(r.key),r)}}function d(t,e,n){return e=v(e),function(t,e){if(e&&("object"==o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,f()?Reflect.construct(e,n||[],v(t).constructor):e.apply(t,n))}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!t})()}function h(t,e,n,r){var i=p(v(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=v(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},p.apply(null,arguments)}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}function m(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var b,g,w,S=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=d(this,e,[t,r])).templateId=e.templateId,n.config={name:n.readAttr("name"),label:n.readAttr("label"),placeholder:n.readAttr("placeholder"),rows:Number(n.readAttr("rows","4"))||4,required:n.readBoolAttr("required",!1),disabled:n.readBoolAttr("disabled",!1),validators:n.parseValidators(n.readAttr("data-validator")||n.readAttr("data-validators"))},n.state={name:n.config.name,label:n.config.label,placeholder:n.config.placeholder,rows:n.config.rows,required:n.config.required,disabled:n.config.disabled,value:n.readAttr("value",""),invalid:!1,errorMessage:""},n.boundInput=function(t){return n.handleInput(t)},n.boundBlur=function(){return n.handleBlur()},n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&y(t,e)}(e,t),n=e,r=[{key:"readAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.container.getAttribute(t);return null==n?e:String(n)}},{key:"readBoolAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.container.hasAttribute(t))return e;var n=String(this.container.getAttribute(t)||"").trim().toLowerCase();return!n||"false"!==n&&"0"!==n&&"no"!==n}},{key:"parseValidators",value:function(t){return i.D.parseList(t)}},{key:"init",value:function(){this.validateStructure(),this.render()}},{key:"render",value:(s=l().m(function t(){return l().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,h(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-textarea"),this.inputEl=this.container.querySelector('[data-role="control"]'),this.labelEl=this.container.querySelector('[data-role="label"]'),this.errorEl=this.container.querySelector('[data-role="error"]'),this.projectSlot("label"),this.projectSlot("helper"),this.projectSlot("error"),this.applyFieldAttributes(),this.bindEvents(),this.validate(),this.updateView();case 2:return t.a(2)}},t,this)}),f=function(){var t=this,e=arguments;return new Promise(function(n,r){var i=s.apply(t,e);function o(t){u(i,n,r,o,a,"next",t)}function a(t){u(i,n,r,o,a,"throw",t)}o(void 0)})},function(){return f.apply(this,arguments)})},{key:"projectSlot",value:function(t){var e=this.container.querySelector('slot[name="'.concat(t,'"]'));if(e){var n=Array.from(this.container.querySelectorAll('[slot="'.concat(t,'"]')));if(n.length){var r=document.createDocumentFragment();n.forEach(function(t){t.removeAttribute("slot"),r.appendChild(t)}),e.replaceWith(r)}}}},{key:"applyFieldAttributes",value:function(){if(this.inputEl){this.inputEl.value=this.state.value,this.inputEl.name=this.config.name||"",this.inputEl.placeholder=this.config.placeholder||"",this.inputEl.rows=this.config.rows,this.inputEl.required=!!this.config.required,this.inputEl.disabled=!!this.config.disabled;var t=this.inputEl.id||"holi-textarea-".concat(Math.random().toString(16).slice(2));this.inputEl.id=t,this.labelEl&&!this.labelEl.getAttribute("for")&&this.labelEl.setAttribute("for",t)}}},{key:"bindEvents",value:function(){this.inputEl&&(this.inputEl.addEventListener("input",this.boundInput),this.inputEl.addEventListener("blur",this.boundBlur))}},{key:"handleInput",value:function(t){var e;this.state.value=String((null==t||null===(e=t.target)||void 0===e?void 0:e.value)||""),this.validate(),this.updateView(),this.dispatchEvent("textareachange",{value:this.state.value,invalid:this.state.invalid})}},{key:"handleBlur",value:function(){this.validate(),this.updateView()}},{key:"validate",value:function(){var t=function(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(this.config.validators);this.config.required&&!t.includes("required")&&t.unshift("required");for(var e=0;e<t.length;e+=1){var n=t[e],r=this.runValidator(n,this.state.value);if(!r.valid)return this.state.invalid=!0,this.state.errorMessage=r.message,!1}return this.state.invalid=!1,this.state.errorMessage="",!0}},{key:"runValidator",value:function(t,e){return i.D.validateToken(t,e,{element:this.inputEl,component:this})}},{key:"updateView",value:function(){this.element&&this.inputEl&&(this.element.classList.toggle("is-invalid",this.state.invalid),this.inputEl.setAttribute("aria-invalid",this.state.invalid?"true":"false"),this.errorEl&&(this.errorEl.hidden=!this.state.invalid,this.errorEl.textContent=this.state.invalid?this.state.errorMessage:""))}},{key:"value",get:function(){var t;return(null===(t=this.inputEl)||void 0===t?void 0:t.value)||""},set:function(t){var e=null==t?"":String(t);this.state.value=e,this.inputEl&&(this.inputEl.value=e),this.validate(),this.updateView()}},{key:"destroy",value:function(){this.inputEl&&(this.inputEl.removeEventListener("input",this.boundInput),this.inputEl.removeEventListener("blur",this.boundBlur)),h(e,"destroy",this,3)([])}}],o=[{key:"selector",get:function(){return"holi-textarea"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"textarea-field"}}],r&&c(n.prototype,r),o&&c(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,s,f}(r.Component);b=S,w="textarea-field-template",(g=m(g="templateId"))in b?Object.defineProperty(b,g,{value:w,enumerable:!0,configurable:!0,writable:!0}):b[g]=w,"undefined"!=typeof window&&(window.TextAreaComponent=S)},8736(t,e,n){"use strict";n.r(e),n.d(e,{ThemeSwitcherComponent:()=>S});var r=n(8812),i=n(7322);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach(function(e){g(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function s(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,c=Object.create(s.prototype);return u(c,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var a={};function l(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(u(e={},r,function(){return this}),e),h=d.prototype=l.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,u(h,"constructor",d),u(d,"constructor",c),c.displayName="GeneratorFunction",u(d,i,"GeneratorFunction"),u(h),u(h,i,"Generator"),u(h,r,function(){return this}),u(h,"toString",function(){return"[object Generator]"}),(s=function(){return{w:o,m:p}})()}function u(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}u=function(t,e,n,r){function o(e,n){u(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},u(t,e,n,r)}function c(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function d(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){c(o,r,i,a,l,"next",t)}function l(t){c(o,r,i,a,l,"throw",t)}a(void 0)})}}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,w(r.key),r)}}function h(t,e,n){return e=m(e),function(t,e){if(e&&("object"==o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,p()?Reflect.construct(e,n||[],m(t).constructor):e.apply(t,n))}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(p=function(){return!!t})()}function v(t,e,n,r){var i=y(m(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function y(){return y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=m(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},y.apply(null,arguments)}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}function g(t,e,n){return(e=w(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function w(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var S=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=h(this,e,[t,r])).templateId=e.templateId,n.hasExplicitThemeCssBase=n.hasAttr("theme-css-base")||n.hasAttr("theme-css-ext"),n.themeCssBase=n.readAttr("theme-css-base","/themes/"),n.themeCssExt=n.readAttr("theme-css-ext",".css"),n.loadCssOnInit=n.readBooleanAttr("load-css-on-init",!1),n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&b(t,e)}(e,t),n=e,r=[{key:"validateStructure",value:function(){if(v(e,"validateStructure",this,3)([]),!this.container)throw new Error("ThemeSwitcher requires a container")}},{key:"init",value:(u=d(s().m(function t(){return s().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:return t.a(2)}},t,this)})),function(){return u.apply(this,arguments)})},{key:"getBindingContext",value:function(){var t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return v(e,"getBindingContext",this,3)([l({label:(null===(t=this.container)||void 0===t?void 0:t.getAttribute("label"))||(null===(n=this.container)||void 0===n?void 0:n.getAttribute("data-label"))||"Theme"},r)])}},{key:"render",value:(a=d(s().m(function t(){var n,r;return s().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,v(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-themeswitcher"),this.select=this.container.querySelector('[data-role="theme-select"]'),this.labelEl=this.container.querySelector('[data-role="theme-label"]'),r=this.resolveControlId(),this.select&&(this.select.id=r),this.labelEl&&this.labelEl.setAttribute("for",r),this.renderOptions(),this.applyCurrentTheme(),this.boundChange||(this.boundChange=this.handleChange.bind(this)),null===(n=this.select)||void 0===n||n.addEventListener("change",this.boundChange);case 2:return t.a(2)}},t,this)})),function(){return a.apply(this,arguments)})},{key:"readAttr",value:function(t){var e,n,r,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=null===(e=this.container)||void 0===e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,t);if(null!=a)return String(a);var l=null===(r=this.container)||void 0===r||null===(i=r.getAttribute)||void 0===i?void 0:i.call(r,"data-".concat(t));return null!=l?String(l):o}},{key:"readBooleanAttr",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.container)return e;if(!this.container.hasAttribute(t)&&!this.container.hasAttribute("data-".concat(t)))return e;var n=this.readAttr(t,"");if(!n)return!0;var r=n.trim().toLowerCase();return!!["true","1","yes","on"].includes(r)||!["false","0","no","off"].includes(r)&&e}},{key:"hasAttr",value:function(t){var e,n,r,i;return!!(null!==(e=this.container)&&void 0!==e&&null!==(n=e.hasAttribute)&&void 0!==n&&n.call(e,t)||null!==(r=this.container)&&void 0!==r&&null!==(i=r.hasAttribute)&&void 0!==i&&i.call(r,"data-".concat(t)))}},{key:"resolveControlId",value:function(){var t,e,n,r=String((null===(t=this.select)||void 0===t?void 0:t.id)||"").trim();if(r)return r;var i=String((null===(e=this.container)||void 0===e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"data-component-id"))||"").trim();return i?"".concat(i,"-theme-select"):"holi-theme-switcher-".concat(Math.random().toString(16).slice(2))}},{key:"getThemeOptions",value:function(){var t,e,n=this,r=String((null===(t=this.container)||void 0===t?void 0:t.getAttribute("themes"))||(null===(e=this.container)||void 0===e?void 0:e.getAttribute("data-themes"))||"");return r?r.split(/[\r\n,]+/).map(function(t){return String(t||"").trim()}).filter(Boolean).map(function(t){var e=t.split(":"),r=String(e[0]||"").trim(),o=String(e[1]||e[0]||"").trim(),a=i.D.getTheme(r)||{};return{value:r,label:o||a.label||r,href:a.href||n.resolveThemeHref(r),palette:a.palette||r}}).filter(function(t){return t.value}):i.D.getThemes().map(function(t){return{value:t.name,label:t.label||t.name,href:t.href||n.resolveThemeHref(t.name),palette:t.palette||t.name}})}},{key:"renderOptions",value:function(){var t=this;if(this.select instanceof HTMLSelectElement){var e=this.getThemeOptions();this.select.replaceChildren(),e.forEach(function(e){var n=document.createElement("option");n.value=e.value,n.textContent=e.label,t.select.appendChild(n)})}}},{key:"getCurrentTheme",value:function(){var t,e,n=String((null===(t=this.container)||void 0===t?void 0:t.getAttribute("value"))||"").trim();if(n)return n;var r=i.D.getActiveTheme();return null!=r&&r.name?r.name:(null===(e=this.getThemeOptions()[0])||void 0===e?void 0:e.value)||""}},{key:"applyCurrentTheme",value:function(){var t=this.getCurrentTheme();t&&(this.select&&(this.select.value=t),this.applyTheme(t,{dispatch:!1,loadCSS:this.loadCssOnInit}))}},{key:"handleChange",value:function(t){var e,n=String((null==t||null===(e=t.target)||void 0===e?void 0:e.value)||"").trim();n&&this.applyTheme(n,{dispatch:!0})}},{key:"applyTheme",value:function(t){var e,n,r,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=String(t||"").trim();if(s){null===(e=this.container)||void 0===e||null===(n=e.setAttribute)||void 0===n||n.call(e,"value",s);var u=!1!==a.loadCSS,c=this.getThemeOptions().find(function(t){return t.value===s}),d=i.D.applyTheme(s,{dispatch:a.dispatch,loadCSS:u,href:null==c?void 0:c.href,source:this,removeWhenMissing:!0});if(!1!==a.dispatch&&d){var f={theme:d.name,palette:d.palette||d.name,definition:l({},d),component:this};null===(r=this.container)||void 0===r||null===(o=r.dispatchEvent)||void 0===o||o.call(r,new CustomEvent("themechange",{detail:f}))}}}},{key:"destroy",value:function(){var t;null===(t=this.select)||void 0===t||t.removeEventListener("change",this.boundChange),v(e,"destroy",this,3)([])}},{key:"resolveThemeHref",value:function(t){if(!this.hasExplicitThemeCssBase)return"";var e=String(this.themeCssBase||"/themes/").trim();if(!e)return"";var n=e.endsWith("/")?e:"".concat(e,"/"),r=String(this.themeCssExt||".css").trim()||".css";return"".concat(n).concat(t).concat(r)}}],o=[{key:"selector",get:function(){return"themeswitcher"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"themeswitcher"}}],r&&f(n.prototype,r),o&&f(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o,a,u}(r.Component);g(S,"templateId","themeswitcher-template"),"undefined"!=typeof window&&(window.ThemeSwitcherComponent=S)},5009(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function o(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function l(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return a(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(a(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,a(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,a(h,"constructor",d),a(d,"constructor",c),c.displayName="GeneratorFunction",a(d,i,"GeneratorFunction"),a(h),a(h,i,"Generator"),a(h,r,function(){return this}),a(h,"toString",function(){return"[object Generator]"}),(o=function(){return{w:l,m:p}})()}function a(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}a=function(t,e,n,r){function o(e,n){a(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},a(t,e,n,r)}function l(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function s(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){l(o,r,i,a,s,"next",t)}function s(t){l(o,r,i,a,s,"throw",t)}a(void 0)})}}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,m(r.key),r)}}function c(t,e,n){return e=p(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,d()?Reflect.construct(e,n||[],p(t).constructor):e.apply(t,n))}function d(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(d=function(){return!!t})()}function f(t,e,n,r){var i=h(p(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function h(){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},h.apply(null,arguments)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}function y(t,e,n){return(e=m(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function m(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{ToastComponent:()=>b});var b=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=c(this,e,[t,r])).templateId=e.templateId,n.toastId=n.container.getAttribute("id")||n.container.getAttribute("toast-id")||"",n.scope=n.resolveScope(n.container.getAttribute("scope")||n.container.getAttribute("data-scope")||"page"),n.blockParentSelector=n.resolveBlockParentSelector(n.container.getAttribute("block-parent")||n.container.getAttribute("data-block-parent")||""),n.position=n.resolvePosition(n.container.getAttribute("position")||n.container.getAttribute("data-position")||"top-right"),n.defaultDuration=n.parseNumber(n.container.getAttribute("duration")||n.container.getAttribute("data-duration"),4e3),n.maxItems=n.parseNumber(n.container.getAttribute("max-items")||n.container.getAttribute("data-max-items"),5),n.newestOnTop=!n.container.hasAttribute("newest-bottom"),n.blockParentEl=null,n.appliedRelativeParent=!1,n.items=[],n.counter=0,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&v(t,e)}(e,t),n=e,r=[{key:"parseNumber",value:function(t,e){var n=Number(t);return Number.isFinite(n)?n:e}},{key:"resolvePosition",value:function(t){var e=String(t||"top-right").toLowerCase();return new Set(["top-left","top-right","bottom-left","bottom-right","top-center","bottom-center"]).has(e)?e:"top-right"}},{key:"resolveScope",value:function(t){var e=String(t||"page").toLowerCase();return"inline"===e||"block"===e?e:"page"}},{key:"resolveBlockParentSelector",value:function(t){return String(t||"").trim()}},{key:"resolveBlockParent",value:function(){return"undefined"==typeof document?null:this.blockParentSelector?document.querySelector(this.blockParentSelector):this.container.parentElement||this.container}},{key:"ensureBlockParentPositionContext",value:function(){"block"===this.scope&&this.blockParentEl&&"undefined"!=typeof window&&"static"===window.getComputedStyle(this.blockParentEl).position&&(this.blockParentEl.style.position="relative",this.appliedRelativeParent=!0)}},{key:"init",value:(d=s(o().m(function t(){return o().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents();case 2:return t.a(2)}},t,this)})),function(){return d.apply(this,arguments)})},{key:"render",value:(l=s(o().m(function t(){return o().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,f(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-toast-root"),this.stackEl=this.container.querySelector('[data-role="stack"]'),this.element&&(this.element.setAttribute("data-position",this.position),this.element.setAttribute("data-scope",this.scope)),"block"===this.scope&&this.element&&(this.blockParentEl=this.resolveBlockParent(),this.blockParentEl&&this.element.parentElement!==this.blockParentEl&&(this.blockParentEl.appendChild(this.element),this.ensureBlockParentPositionContext())),this.container.hidden="block"===this.scope;case 2:return t.a(2)}},t,this)})),function(){return l.apply(this,arguments)})},{key:"bindEvents",value:function(){var t,e=this;null===(t=this.element)||void 0===t||t.addEventListener("click",function(t){var n,r,i=null===(n=t.target)||void 0===n||null===(r=n.closest)||void 0===r?void 0:r.call(n,'[data-action="dismiss"]');if(i){var o=i.closest("[data-toast-item]");o&&e.hide(o.getAttribute("data-toast-item"),"dismiss")}}),this.toastId&&"undefined"!=typeof document&&document.addEventListener("click",function(t){var n,r,i=null===(n=t.target)||void 0===n||null===(r=n.closest)||void 0===r?void 0:r.call(n,'[data-toast-target="'.concat(e.toastId,'"]'));i&&e.show({type:i.getAttribute("data-toast-type")||"info",title:i.getAttribute("data-toast-title")||"",message:i.getAttribute("data-toast-message")||"",duration:e.parseNumber(i.getAttribute("data-toast-duration"),e.defaultDuration)})})}},{key:"normalizePayload",value:function(t){if("string"==typeof t)return{message:t,type:"info",duration:this.defaultDuration};var e=t||{};return{type:String(e.type||"info").toLowerCase(),title:String(e.title||""),message:String(e.message||""),duration:this.parseNumber(e.duration,this.defaultDuration)}}},{key:"show",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.stackEl)return null;var n=this.normalizePayload(e);if(!n.message&&!n.title)return null;var r="toast-".concat(Date.now(),"-").concat(this.counter+=1),o=this.createToastNode(r,n);if(this.newestOnTop?this.stackEl.prepend(o):this.stackEl.appendChild(o),this.items.push({id:r,node:o,timer:null,duration:n.duration}),this.enforceMaxItems(),requestAnimationFrame(function(){o.setAttribute("data-state","shown")}),n.duration>0){var a=this.items.find(function(t){return t.id===r});a&&(a.timer=setTimeout(function(){return t.hide(r,"timeout")},n.duration))}return this.dispatchEvent("toastshown",function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach(function(e){y(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({id:r},n)),r}},{key:"createToastNode",value:function(t,e){var n=document.createElement("article");n.className="holi-toast-item toast-".concat(e.type),n.setAttribute("data-toast-item",t),n.setAttribute("data-state","enter"),n.setAttribute("role","error"===e.type?"alert":"status"),n.setAttribute("aria-live","error"===e.type?"assertive":"polite"),n.setAttribute("aria-atomic","true");var r=document.createElement("div");if(r.className="holi-toast-body",e.title){var i=document.createElement("strong");i.className="holi-toast-title",i.textContent=e.title,r.appendChild(i)}if(e.message){var o=document.createElement("div");o.className="holi-toast-message",o.textContent=e.message,r.appendChild(o)}var a=document.createElement("button");return a.type="button",a.className="holi-toast-close",a.setAttribute("data-action","dismiss"),a.setAttribute("aria-label","Dismiss"),a.textContent="x",n.append(r,a),n}},{key:"hide",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"manual",r=this.items.findIndex(function(e){return e.id===t});if(!(r<0)){var i=this.items[r];clearTimeout(i.timer),i.node.setAttribute("data-state","hide"),setTimeout(function(){i.node.remove(),e.items.splice(r,1),e.dispatchEvent("toasthidden",{id:t,reason:n})},180)}}},{key:"clear",value:function(){var t=this;this.items.map(function(t){return t.id}).forEach(function(e){return t.hide(e,"clear")})}},{key:"enforceMaxItems",value:function(){if(!(this.maxItems<=0))for(;this.items.length>this.maxItems;){var t=this.newestOnTop?this.items[0]:this.items[this.items.length-1];if(!t)break;this.hide(t.id,"overflow")}}},{key:"destroy",value:function(){this.appliedRelativeParent&&this.blockParentEl&&(this.blockParentEl.style.position=""),f(e,"destroy",this,3)([])}}],a=[{key:"selector",get:function(){return"toast"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"toast"}}],r&&u(n.prototype,r),a&&u(n,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,a,l,d}(n(8812).Component);y(b,"templateId","toast-template"),"undefined"!=typeof window&&(window.ToastComponent=b)},1648(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function l(n,r,i,a){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return o(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,o(h,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(h),o(h,a,"Generator"),o(h,r,function(){return this}),o(h,"toString",function(){return"[object Generator]"}),(i=function(){return{w:l,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function l(t){a(o,r,i,l,s,"next",t)}function s(t){a(o,r,i,l,s,"throw",t)}l(void 0)})}}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,v(r.key),r)}}function u(t,e,n){return e=h(e),function(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,n||[],h(t).constructor):e.apply(t,n))}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function d(t,e,n,r){var i=f(h(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},f.apply(null,arguments)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function v(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.r(e),n.d(e,{TreeComponent:()=>g});var y,m,b,g=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=u(this,e,[t,r])).templateId=e.templateId,n.singleExpand=n.container.hasAttribute("single-expand"),n.loaderName=n.container.getAttribute("children-loader")||"",n.childrenLoader=n.resolveChildrenLoader(n.loaderName),n.onSelect="function"==typeof r.onSelect?r.onSelect:null,n.globalNoCache=n.container.hasAttribute("no-cache"),n.globalCacheTtl=n.parseNumber(n.container.getAttribute("cache-ttl"),3e5),n.childrenCache=new Map,n.loadingRequests=new Map,n.draggableNodes=n.container.hasAttribute("draggable-nodes"),n.reorderHandlerName=n.container.getAttribute("reorder-handler")||"",n.reorderHandler=n.resolveReorderHandler(n.reorderHandlerName),n.dragState={sourceItem:null,dropTarget:null},n.element=null,n.treeHost=null,n.treeRoot=null,n.activeTrigger=null,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&p(t,e)}(e,t),n=e,o=[{key:"resolveChildrenLoader",value:function(t){if(!t||"undefined"==typeof window)return null;var e=window[t];return"function"==typeof e?e:null}},{key:"resolveReorderHandler",value:function(t){if(!t||"undefined"==typeof window)return null;var e=window[t];return"function"==typeof e?e:null}},{key:"parseNumber",value:function(t,e){var n=Number(t);return Number.isFinite(n)?n:e}},{key:"validateStructure",value:function(){if(d(e,"validateStructure",this,3)([]),!this.container.querySelector('[slot="tree"]')&&!this.container.querySelector("ul, ol"))throw new Error('Tree requires a nested list in slot="tree".')}},{key:"init",value:(m=l(i().m(function t(){return i().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents(),this.syncFocusTargets();case 2:return t.a(2)}},t,this)})),function(){return m.apply(this,arguments)})},{key:"render",value:(y=l(i().m(function t(){var n,r;return i().w(function(t){for(;;)switch(t.n){case 0:return r=this.container.querySelector('[slot="tree"]')||this.container.querySelector("ul, ol"),t.n=1,d(e,"render",this,3)([]);case 1:if(this.element=this.container.querySelector(".holi-tree"),this.treeHost=this.container.querySelector('[data-role="tree-host"]'),r&&this.treeHost&&this.treeHost.replaceChildren(r),this.treeRoot=null===(n=this.treeHost)||void 0===n?void 0:n.querySelector("ul, ol"),this.treeRoot){t.n=2;break}return t.a(2);case 2:this.treeRoot.classList.add("holi-tree-level","holi-tree-root"),this.treeRoot.setAttribute("role","tree"),this.decorateLevel(this.treeRoot,1);case 3:return t.a(2)}},t,this)})),function(){return y.apply(this,arguments)})},{key:"decorateLevel",value:function(t,e){var n=this;t.setAttribute("data-depth",String(e)),Array.from(t.children).filter(function(t){return"LI"===t.tagName}).forEach(function(t){t.classList.add("holi-tree-item"),t.setAttribute("role","treeitem"),t.setAttribute("aria-level",String(e));var r=n.ensureTrigger(t),i=n.getDirectSubmenu(t),o="true"===t.getAttribute("data-lazy")||t.hasAttribute("data-lazy"),a=!!i||o;n.ensureNodeKey(t),n.draggableNodes&&(t.setAttribute("draggable","true"),t.classList.add("is-draggable")),r&&r.classList.add("holi-tree-trigger"),a?(t.classList.add("has-children"),n.ensureExpander(t,r),t.setAttribute("aria-expanded","false"),i&&(i.classList.add("holi-tree-level","holi-tree-children"),i.setAttribute("role","group"),i.hidden=!0,n.decorateLevel(i,e+1))):t.setAttribute("aria-expanded","false")})}},{key:"ensureTrigger",value:function(t){for(var e=Array.from(t.children),n=0;n<e.length;n+=1){var r=e[n];if("BUTTON"===r.tagName||"A"===r.tagName||r.hasAttribute("data-tree-trigger"))return r}var i=this.extractItemLabel(t),o=document.createElement("button");return o.type="button",o.textContent=i||"Node",o.setAttribute("data-tree-trigger","true"),t.insertBefore(o,t.firstChild),o}},{key:"getTrigger",value:function(t){if(!t)return null;for(var e=Array.from(t.children),n=0;n<e.length;n+=1){var r,i=e[n];if(null!==(r=i.classList)&&void 0!==r&&r.contains("holi-tree-trigger"))return i;if("BUTTON"===i.tagName||"A"===i.tagName||i.hasAttribute("data-tree-trigger"))return i}return null}},{key:"ensureExpander",value:function(t,e){var n=Array.from(t.children).find(function(t){var e;return null===(e=t.classList)||void 0===e?void 0:e.contains("holi-tree-expander")});if(n)return n;var r=document.createElement("button");return r.type="button",r.className="holi-tree-expander",r.setAttribute("data-tree-expander","true"),r.setAttribute("aria-label","Toggle children"),r.textContent="+",t.insertBefore(r,e||t.firstChild),r}},{key:"extractItemLabel",value:function(t){for(var e=Array.from(t.childNodes),n=0;n<e.length;n+=1){var r=e[n];if(r.nodeType===Node.TEXT_NODE){var i=String(r.textContent||"").trim();if(i)return r.textContent="",i}}return t.getAttribute("data-label")||""}},{key:"getDirectSubmenu",value:function(t){for(var e=Array.from(t.children),n=0;n<e.length;n+=1){var r=e[n];if("UL"===r.tagName||"OL"===r.tagName)return r}return null}},{key:"getDirectExpander",value:function(t){for(var e=Array.from(t.children),n=0;n<e.length;n+=1){var r,i=e[n];if(null!==(r=i.classList)&&void 0!==r&&r.contains("holi-tree-expander"))return i}return null}},{key:"bindEvents",value:function(){var t=this;this.element&&(this.element.addEventListener("click",function(e){return t.onClick(e)}),this.element.addEventListener("keydown",function(e){return t.onKeydown(e)}),this.element.addEventListener("focusin",function(e){var n=e.target.closest(".holi-tree-trigger");n&&(t.activeTrigger=n),t.syncFocusTargets()}),this.draggableNodes&&(this.element.addEventListener("dragstart",function(e){return t.onDragStart(e)}),this.element.addEventListener("dragover",function(e){return t.onDragOver(e)}),this.element.addEventListener("dragleave",function(e){return t.onDragLeave(e)}),this.element.addEventListener("drop",function(e){return t.onDrop(e)}),this.element.addEventListener("dragend",function(){return t.onDragEnd()})))}},{key:"onClick",value:function(t){var e=t.target.closest("[data-tree-expander]"),n=t.target.closest(".holi-tree-trigger"),r=e||n;if(r){var i=r.closest(".holi-tree-item");if(i&&"true"!==i.getAttribute("data-loading")){if(e&&i.classList.contains("has-children"))return t.preventDefault(),void this.toggleItem(i);n&&t.preventDefault(),this.activeTrigger=n;var o={item:i,id:i.getAttribute("data-node-id")||null,label:this.getNodeLabel(i)};this.onSelect&&this.onSelect(o),this.dispatchEvent("treeselect",o),this.syncFocusTargets()}}}},{key:"onKeydown",value:function(t){var e=t.target.closest(".holi-tree-trigger");if(e){var n=e.closest(".holi-tree-item");if(n){var r,i,o=this.getVisibleTriggers(),a=o.indexOf(e);if("ArrowDown"===t.key&&a>=0)return t.preventDefault(),void(null===(r=o[Math.min(a+1,o.length-1)])||void 0===r||r.focus());if("ArrowUp"===t.key&&a>=0)return t.preventDefault(),void(null===(i=o[Math.max(a-1,0)])||void 0===i||i.focus());if("ArrowRight"!==t.key)if("ArrowLeft"!==t.key){if("Enter"===t.key||" "===t.key){if(!n.classList.contains("has-children"))return;t.preventDefault(),this.toggleItem(n)}}else{if(t.preventDefault(),this.isExpanded(n))return void this.collapseItem(n);var l=this.getParentItem(n),s=l?this.getTrigger(l):null;null==s||s.focus()}else{if(t.preventDefault(),!this.isExpanded(n)&&n.classList.contains("has-children"))return void this.expandItem(n);var u=this.getFirstChildTrigger(n);null==u||u.focus()}}}}},{key:"getVisibleTriggers",value:function(){var t=this;return Array.from(this.element.querySelectorAll(".holi-tree-trigger")).filter(function(e){var n=e.closest(".holi-tree-item");return t.isItemVisible(n)})}},{key:"isItemVisible",value:function(t){if(!t)return!1;for(var e=t;e;){var n=this.getParentItem(e);if(!n)return!0;var r=this.getDirectSubmenu(n);if(null!=r&&r.hidden)return!1;e=n}return!0}},{key:"getParentItem",value:function(t){var e=null==t?void 0:t.parentElement;return e?e.closest(".holi-tree-item"):null}},{key:"getFirstChildTrigger",value:function(t){var e=this.getDirectSubmenu(t);if(!e||e.hidden)return null;var n=Array.from(e.children).find(function(t){var e;return null===(e=t.classList)||void 0===e?void 0:e.contains("holi-tree-item")});return n?this.getTrigger(n):null}},{key:"isExpanded",value:function(t){return"true"===t.getAttribute("aria-expanded")}},{key:"toggleItem",value:(v=l(i().m(function t(e){return i().w(function(t){for(;;)switch(t.n){case 0:if(!this.isExpanded(e)){t.n=1;break}this.collapseItem(e),t.n=2;break;case 1:return t.n=2,this.expandItem(e);case 2:return t.a(2)}},t,this)})),function(t){return v.apply(this,arguments)})},{key:"expandItem",value:(h=l(i().m(function t(e){var n,r;return i().w(function(t){for(;;)switch(t.n){case 0:return this.singleExpand&&this.collapseSiblings(e),t.n=1,this.ensureChildrenLoaded(e);case 1:if(n=this.getDirectSubmenu(e)){t.n=2;break}return t.a(2);case 2:n.hidden=!1,e.setAttribute("aria-expanded","true"),(r=this.getDirectExpander(e))&&(r.textContent="-"),this.syncFocusTargets(),this.dispatchEvent("treeexpand",{item:e,id:e.getAttribute("data-node-id")||null});case 3:return t.a(2)}},t,this)})),function(t){return h.apply(this,arguments)})},{key:"collapseItem",value:function(t){var e=this.getDirectSubmenu(t);if(e){e.hidden=!0,t.setAttribute("aria-expanded","false");var n=this.getDirectExpander(t);n&&(n.textContent="+"),this.syncFocusTargets(),this.dispatchEvent("treecollapse",{item:t,id:t.getAttribute("data-node-id")||null})}}},{key:"collapseSiblings",value:function(t){var e=this,n=t.parentElement;n&&Array.from(n.children).forEach(function(n){var r;n!==t&&null!==(r=n.classList)&&void 0!==r&&r.contains("holi-tree-item")&&e.isExpanded(n)&&e.collapseItem(n)})}},{key:"ensureChildrenLoaded",value:(f=l(i().m(function t(e){var n,r,o,a,s,u,c,d=this;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(("true"===e.getAttribute("data-lazy")||e.hasAttribute("data-lazy"))&&this.childrenLoader){t.n=1;break}return t.a(2);case 1:if(n=this.ensureNodeKey(e),r=this.getCachePolicy(e),o=r.allowCache,a=r.ttl,s=Date.now(),!o){t.n=2;break}if(!((u=this.childrenCache.get(n))&&s-u.timestamp<=a)){t.n=2;break}return this.applyLoadedChildren(e,u.nodes),t.a(2);case 2:if(!this.loadingRequests.has(n)){t.n=4;break}return t.n=3,this.loadingRequests.get(n);case 3:case 7:return t.a(2);case 4:return c=l(i().m(function t(){var r,a,l;return i().w(function(t){for(;;)switch(t.n){case 0:return d.setNodeLoading(e,!0),r=e.getAttribute("data-node-id")||"",t.n=1,Promise.resolve(d.childrenLoader({id:r,item:e,tree:d}));case 1:a=t.v,l=Array.isArray(a)?a:[],d.applyLoadedChildren(e,l),o&&d.childrenCache.set(n,{timestamp:Date.now(),nodes:l});case 2:return t.a(2)}},t)}))(),this.loadingRequests.set(n,c),t.p=5,t.n=6,c;case 6:return t.p=6,this.loadingRequests.delete(n),this.setNodeLoading(e,!1),t.f(6)}},t,this,[[5,,6,7]])})),function(t){return f.apply(this,arguments)})},{key:"getCachePolicy",value:function(t){var e=t.hasAttribute("data-no-cache");if(this.globalNoCache||e)return{allowCache:!1,ttl:0};var n=this.parseNumber(t.getAttribute("data-cache-ttl"),this.globalCacheTtl);return{allowCache:!0,ttl:Math.max(0,n)}}},{key:"applyLoadedChildren",value:function(t,e){var n=this,r=Array.isArray(e)?e:[],i=this.getDirectSubmenu(t);i||(i=document.createElement("ul"),t.appendChild(i)),i.replaceChildren(),i.classList.add("holi-tree-level","holi-tree-children"),i.setAttribute("role","group"),i.hidden=!0,r.forEach(function(t){i.appendChild(n.createNodeFromData(t))});var o=Number(t.getAttribute("aria-level")||1);this.decorateLevel(i,o+1),t.setAttribute("data-loaded","true"),r.length||t.removeAttribute("data-lazy")}},{key:"setNodeLoading",value:function(t,e){var n=this.getTrigger(t),r=this.getDirectExpander(t);t.setAttribute("data-loading",e?"true":"false"),t.setAttribute("aria-busy",e?"true":"false"),n&&(n.disabled=!!e),r&&(r.disabled=!!e,r.textContent=e?"...":this.isExpanded(t)?"-":"+")}},{key:"createNodeFromData",value:function(t){var e=this,n=document.createElement("li");n.className="holi-tree-item",t&&"object"===r(t)&&(null!=t.id&&n.setAttribute("data-node-id",String(t.id)),t.lazy&&n.setAttribute("data-lazy","true"));var i=document.createElement("button");if(i.type="button",i.className="holi-tree-trigger",i.textContent=null!=(null==t?void 0:t.label)?String(t.label):"Node",n.appendChild(i),Array.isArray(null==t?void 0:t.children)&&t.children.length){var o=document.createElement("ul");t.children.forEach(function(t){return o.appendChild(e.createNodeFromData(t))}),n.appendChild(o)}return n}},{key:"syncFocusTargets",value:function(){if(this.element){var t=this.getVisibleTriggers();t.forEach(function(t){return t.setAttribute("tabindex","-1")}),t.length&&(this.activeTrigger&&t.includes(this.activeTrigger)?this.activeTrigger:t[0]).setAttribute("tabindex","0")}}},{key:"ensureNodeKey",value:function(t){var e=t.getAttribute("data-node-id")||t.getAttribute("data-node-key");if(e)return t.hasAttribute("data-node-key")||t.setAttribute("data-node-key",String(e)),String(e);var n="node-".concat(Math.random().toString(36).slice(2,10));return t.setAttribute("data-node-key",n),n}},{key:"getNodeLabel",value:function(t){var e=this.getTrigger(t);return e?String(e.textContent||"").trim():""}},{key:"onDragStart",value:function(t){var e=t.target.closest(".holi-tree-item");if(e){this.dragState.sourceItem=e,e.classList.add("dragging");var n=e.getAttribute("data-node-id")||this.ensureNodeKey(e);t.dataTransfer&&(t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",n)),this.dispatchEvent("treedragstart",{id:n,item:e})}}},{key:"onDragOver",value:function(t){var e=t.target.closest(".holi-tree-item");this.canDropOn(e)&&(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect="move"),this.markDropTarget(e))}},{key:"onDragLeave",value:function(t){var e=t.target.closest(".holi-tree-item");e&&(e.contains(t.relatedTarget)||e.classList.remove("drop-target"))}},{key:"onDrop",value:(c=l(i().m(function t(e){var n,r,o,a,l,s,u;return i().w(function(t){for(;;)switch(t.n){case 0:if(r=e.target.closest(".holi-tree-item"),this.canDropOn(r)){t.n=1;break}return t.a(2);case 1:if(e.preventDefault(),o=this.dragState.sourceItem,a=o.getAttribute("data-node-id")||this.ensureNodeKey(o),l=r.getAttribute("data-node-id")||this.ensureNodeKey(r),null===(n=r.parentElement)||void 0===n||n.insertBefore(o,r),s=Number(r.getAttribute("aria-level")||1),this.updateSubtreeLevels(o,s),this.syncFocusTargets(),u={source:o,target:r,fromId:a,toId:l,position:"before"},this.dispatchEvent("treereorder",u),!this.reorderHandler){t.n=2;break}return t.n=2,Promise.resolve(this.reorderHandler(u));case 2:this.onDragEnd();case 3:return t.a(2)}},t,this)})),function(t){return c.apply(this,arguments)})},{key:"onDragEnd",value:function(){var t;Array.from((null===(t=this.element)||void 0===t?void 0:t.querySelectorAll(".holi-tree-item"))||[]).forEach(function(t){return t.classList.remove("dragging","drop-target")}),this.dragState.sourceItem=null}},{key:"markDropTarget",value:function(t){this.dragState.dropTarget&&this.dragState.dropTarget!==t&&this.dragState.dropTarget.classList.remove("drop-target"),this.dragState.dropTarget=t,t.classList.add("drop-target")}},{key:"canDropOn",value:function(t){var e=this.dragState.sourceItem;return!(!e||!t||e===t||e.contains(t))}},{key:"updateSubtreeLevels",value:function(t,e){var n=this;t.setAttribute("aria-level",String(e));var r=this.getDirectSubmenu(t);r&&Array.from(r.children).filter(function(t){var e;return null===(e=t.classList)||void 0===e?void 0:e.contains("holi-tree-item")}).forEach(function(t){return n.updateSubtreeLevels(t,e+1)})}}],a=[{key:"selector",get:function(){return"tree"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"tree"}}],o&&s(n.prototype,o),a&&s(n,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o,a,c,f,h,v,y,m}(n(8812).Component);y=g,b="tree-template",(m=v(m="templateId"))in y?Object.defineProperty(y,m,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[m]=b,"undefined"!=typeof window&&(window.TreeComponent=g)},6712(t,e,n){"use strict";n.r(e),n.d(e,{TreePanelComponent:()=>O});var r=n(8812),i=n(1648);function o(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||l(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){u=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(t,e)||l(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){if(t){if("string"==typeof t)return s(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function d(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return f(u,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),u}var a={};function l(){}function s(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(f(e={},r,function(){return this}),e),h=u.prototype=l.prototype=Object.create(c);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,f(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return s.prototype=u,f(h,"constructor",u),f(u,"constructor",s),s.displayName="GeneratorFunction",f(u,i,"GeneratorFunction"),f(h),f(h,i,"Generator"),f(h,r,function(){return this}),f(h,"toString",function(){return"[object Generator]"}),(d=function(){return{w:o,m:p}})()}function f(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}f=function(t,e,n,r){function o(e,n){f(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},f(t,e,n,r)}function h(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function p(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){h(o,r,i,a,l,"next",t)}function l(t){h(o,r,i,a,l,"throw",t)}a(void 0)})}}function v(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,E(r.key),r)}}function y(t,e,n){return e=w(e),function(t,e){if(e&&("object"==c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,m()?Reflect.construct(e,n||[],w(t).constructor):e.apply(t,n))}function m(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(m=function(){return!!t})()}function b(t,e,n,r){var i=g(w(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function g(){return g="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=w(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},g.apply(null,arguments)}function w(t){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},w(t)}function S(t,e){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},S(t,e)}function k(t,e,n){return(e=E(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function E(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}var O=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=y(this,e,[t,r])).templateId=e.templateId,n.viewMode=n.resolveViewMode(t.getAttribute("detail-view")),n.loaderName=t.getAttribute("details-loader")||"",n.detailsLoader=n.resolveDetailsLoader(n.loaderName),n.detailsSource=String(t.getAttribute("data-details-source")||t.getAttribute("details-source")||"").trim(),n.detailsMethod=String(t.getAttribute("data-details-method")||"GET").toUpperCase(),n.inlineEditEnabled=n.readBooleanAttr(t,"data-inline-edit"),n.saveMethod=String(t.getAttribute("data-save-method")||"PUT").toUpperCase(),n.treeInstance=null,n.state={selectedId:null,selectedLabel:"",loading:!1,editing:!1,saving:!1},n.currentDetails=null,n.editDraft=null,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&S(t,e)}(e,t),n=e,r=[{key:"readBooleanAttr",value:function(t,e){if(!t||!e)return!1;if(!t.hasAttribute(e))return!1;var n=String(t.getAttribute(e)||"").trim().toLowerCase();return!n||"false"!==n&&"0"!==n&&"no"!==n}},{key:"resolveViewMode",value:function(t){var e=String(t||"datapanel").trim().toLowerCase();return"table"===e?"datatable":"panel"===e?"datapanel":"grid"===e?"datagrid":"datatable"===e||"datagrid"===e||"datapanel"===e?e:"datapanel"}},{key:"resolveDetailsLoader",value:function(t){if(!t||"undefined"==typeof window)return null;var e=window[t];return"function"==typeof e?e:null}},{key:"validateStructure",value:function(){if(b(e,"validateStructure",this,3)([]),!this.container.querySelector('[slot="tree"]')&&!this.container.querySelector("ul, ol"))throw new Error('TreePanel requires a nested tree list in slot="tree".')}},{key:"init",value:(g=p(d().m(function t(){return d().w(function(t){for(;;)switch(t.n){case 0:return this.validateStructure(),t.n=1,this.render();case 1:this.bindEvents();case 2:return t.a(2)}},t,this)})),function(){return g.apply(this,arguments)})},{key:"render",value:(m=p(d().m(function t(){var n,r=this;return d().w(function(t){for(;;)switch(t.n){case 0:return n=this.container.querySelector('[slot="tree"]')||this.container.querySelector("ul, ol"),t.n=1,b(e,"render",this,3)([]);case 1:this.element=this.container.querySelector(".holi-treepanel"),this.treeHost=this.container.querySelector('[data-role="tree-host"]'),this.titleEl=this.container.querySelector('[data-role="detail-title"]'),this.statusEl=this.container.querySelector('[data-role="detail-status"]'),this.panelBody=this.container.querySelector('[data-role="panel-body"]'),this.tableEl=this.container.querySelector('[data-role="detail-table"]'),this.tableHead=this.container.querySelector('[data-role="table-head"]'),this.tableBody=this.container.querySelector('[data-role="table-body"]'),this.gridEl=this.container.querySelector('[data-role="detail-grid"]'),this.headerDefault=this.container.querySelector('[data-role="header-default"]'),this.footerDefault=this.container.querySelector('[data-role="footer-default"]'),this.contentDefault=this.container.querySelector('[data-role="content-default"]'),this.editButton=this.container.querySelector('[data-role="edit-button"]'),this.saveButton=this.container.querySelector('[data-role="save-button"]'),this.cancelButton=this.container.querySelector('[data-role="cancel-button"]'),this.headerSlotContent=this.mountNamedSlot("header",this.headerDefault),this.footerSlotContent=this.mountNamedSlot("footer",this.footerDefault),this.contentSlotContent=this.mountNamedSlot("content",this.contentDefault),this.hasCustomContent=!!this.contentSlotContent,this.customContentMode=this.resolveCustomContentMode(),n&&this.treeHost&&this.treeHost.replaceChildren(n),["single-expand","children-loader","cache-ttl","no-cache"].forEach(function(t){r.container.hasAttribute(t)&&r.treeHost&&r.treeHost.setAttribute(t,r.container.getAttribute(t)||"")}),this.treeHost&&!this.treeHost.hasAttribute("children-loader")&&this.treeHost.setAttribute("children-loader","loadTreeChildren"),this.applyViewMode(),this.updateEditControls(),this.setLoading(!1,""),this.treeHost&&(this.treeInstance=new i.TreeComponent(this.treeHost,{onSelect:function(t){r.loadNodeDetails(t)}}));case 2:return t.a(2)}},t,this)})),function(){return m.apply(this,arguments)})},{key:"mountNamedSlot",value:function(t,e){var n=this.container.querySelector('slot[name="'.concat(t,'"]')),r=this.container.querySelector('[slot="'.concat(t,'"]'));return n?r?(e&&(e.hidden=!0),n.replaceWith(r),r):(n.remove(),null):null}},{key:"bindEvents",value:function(){var t=this;this.container.addEventListener("click",function(e){var n,r=null===(n=e.target)||void 0===n||null===(n=n.dataset)||void 0===n?void 0:n.action;if("reload-selected"!==r)return"edit-details"===r?(e.preventDefault(),void t.startEditing()):"cancel-edit"===r?(e.preventDefault(),void t.cancelEditing()):void("save-details"===r&&(e.preventDefault(),t.saveDetails()));e.preventDefault(),t.state.selectedId&&t.loadNodeDetails({id:t.state.selectedId,label:t.state.selectedLabel,item:null},!0)})}},{key:"applyViewMode",value:function(){var t=this;this.customContentMode||(this.container.querySelectorAll("[data-view]").forEach(function(e){e.hidden=e.getAttribute("data-view")!==t.viewMode}),this.hasCustomContent&&this.contentDefault&&(this.contentDefault.hidden=!0))}},{key:"loadNodeDetails",value:(h=p(d().m(function t(e){var n,r,i,o,a,l,s=arguments;return d().w(function(t){for(;;)switch(t.p=t.n){case 0:if(n=s.length>1&&void 0!==s[1]&&s[1],r=(null==e?void 0:e.id)||"",i=(null==e?void 0:e.label)||r||"Node",this.state.editing=!1,this.editDraft=null,this.state.selectedId=r,this.state.selectedLabel=i,this.updateEditControls(),this.setLoading(!0,i),t.p=1,o=null,!this.detailsLoader){t.n=3;break}return t.n=2,Promise.resolve(this.detailsLoader({id:r,label:i,item:(null==e?void 0:e.item)||null,forceReload:n}));case 2:o=t.v,t.n=5;break;case 3:if(!this.detailsSource){t.n=5;break}return t.n=4,this.fetchDetailsFromSource({id:r,label:i,item:(null==e?void 0:e.item)||null});case 4:o=t.v;case 5:a=this.normalizeDetailsPayload(o,r,i),this.renderDetails(a),t.n=7;break;case 6:t.p=6,l=t.v,this.renderDetails({title:i,fields:{error:String((null==l?void 0:l.message)||l||"Failed to load details")},columns:["field","value"],rows:[]});case 7:return t.p=7,this.setLoading(!1,i),t.f(7);case 8:return t.a(2)}},t,this,[[1,6,7,8]])})),function(t){return h.apply(this,arguments)})},{key:"fetchDetailsFromSource",value:(f=p(d().m(function t(e){var n,r,i,o;return d().w(function(t){for(;;)switch(t.n){case 0:if(n=this.buildDetailsSourceUrl(e)){t.n=1;break}return t.a(2,null);case 1:return t.n=2,fetch(n,{method:this.detailsMethod||"GET",credentials:"same-origin"});case 2:if((r=t.v).ok){t.n=3;break}throw new Error("Details request failed (".concat(r.status,")"));case 3:return t.n=4,r.json();case 4:if(!(i=t.v)||"object"!==c(i)){t.n=7;break}if(!i.detail||"object"!==c(i.detail)){t.n=5;break}return t.a(2,i.detail);case 5:if(!i.node||"object"!==c(i.node)){t.n=6;break}return t.a(2,i.node);case 6:if(!((o=i.nodes)&&"object"===c(o)&&null!=e&&e.id&&o[e.id])){t.n=7;break}return t.a(2,o[e.id]);case 7:return t.a(2,i)}},t,this)})),function(t){return f.apply(this,arguments)})},{key:"buildDetailsSourceUrl",value:function(t){var e=String(this.detailsSource||"").trim();if(!e)return"";var n=null==(null==t?void 0:t.id)?"":String(t.id),r=null==(null==t?void 0:t.label)?"":String(t.label),i={id:encodeURIComponent(n),label:encodeURIComponent(r)},o=e;if((o=(o=o.replace(/@\{id\}/g,i.id).replace(/\{id\}/g,i.id).replace(/:id\b/g,i.id)).replace(/@\{label\}/g,i.label).replace(/\{label\}/g,i.label).replace(/:label\b/g,i.label))===e&&n){var a=o.includes("?");/(?:\?|&)(?:node|id)=/i.test(o)||(o+="".concat(a?"&":"?","node=").concat(i.id))}return o}},{key:"normalizeDetailsPayload",value:function(t,e,n){var r=t&&"object"===c(t)?t:{},i=r.fields&&"object"===c(r.fields)?function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach(function(e){k(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},r.fields):{},o=[];Array.isArray(r.rows)?o=r.rows:Array.isArray(r.items)?o=r.items:Array.isArray(r.data)&&(o=r.data);var a=this.normalizeColumns(r.columns,o,i);return Object.keys(i).length||o.length||(i.id=e||"",i.label=n||""),{title:String(r.title||n||"Node Details"),fields:i,columns:a,rows:o}}},{key:"normalizeColumns",value:function(t,e,n){if(Array.isArray(t)&&t.length)return t.map(function(t){return"string"==typeof t?t:t&&"object"===c(t)?String(t.field||t.key||t.name||""):""}).filter(Boolean);if(Array.isArray(e)&&e.length){var r=e.find(function(t){return t&&"object"===c(t)});if(r)return Object.keys(r)}return n&&"object"===c(n)&&Object.keys(n).length?["field","value"]:[]}},{key:"renderDetails",value:function(t){if(this.state.editing&&t===this.editDraft||(this.currentDetails=t),this.titleEl&&(this.titleEl.textContent=t.title),this.updateFooter(t),this.dispatchEvent("detailsloaded",{id:this.state.selectedId,label:this.state.selectedLabel,mode:this.viewMode,details:t}),this.hasCustomContent)return this.customContentMode&&this.renderCustomContent(t,this.state.editing),void this.updateEditControls();this.renderPanelFields(t.fields,null,this.state.editing),this.renderTable(t.columns,t.rows,t.fields,null,null,this.state.editing),this.renderGrid(t.columns,t.rows,t.fields,null,this.state.editing),this.updateEditControls()}},{key:"resolveCustomContentMode",value:function(){if(!this.contentSlotContent)return"";var t=this.contentSlotContent.getAttribute("data-content-mode")||this.container.getAttribute("data-content-mode")||"",e=String(t).trim();return e?this.resolveViewMode(e):""}},{key:"renderCustomContent",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.contentSlotContent&&this.customContentMode){var n=this.contentSlotContent;if("datapanel"!==this.customContentMode)if("datatable"!==this.customContentMode){if("datagrid"===this.customContentMode){var r=n.querySelector('[data-role="detail-datagrid"]')||n;this.renderGrid(t.columns,t.rows,t.fields,r,e)}}else{var i=n.querySelector('[data-role="detail-datatable"]'),o=n.querySelector('[data-role="detail-table-head"]')||(null==i?void 0:i.querySelector("thead"))||n.querySelector("thead"),a=n.querySelector('[data-role="detail-table-body"]')||(null==i?void 0:i.querySelector("tbody"))||n.querySelector("tbody");this.renderTable(t.columns,t.rows,t.fields,o,a,e)}else{var l=n.querySelector('[data-role="detail-datapanel"]')||n;this.renderPanelFields(t.fields,l,e)}}}},{key:"updateFooter",value:function(t){if(this.footerDefault&&!this.footerDefault.hidden){var e=Array.isArray(t.rows)?t.rows.length:0,n=t.fields&&"object"===c(t.fields)?Object.keys(t.fields).length:0,r=document.createElement("p");r.className="treepanel-footer-summary",r.textContent="Fields: ".concat(n," | Rows: ").concat(e),this.footerDefault.replaceChildren(r)}}},{key:"renderPanelFields",value:function(t){var e=this,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:null)||this.panelBody;if(r){r.replaceChildren();var i=Object.entries(t||{});if(!i.length){var o=document.createElement("p");return o.className="treepanel-empty",o.textContent="No details available.",void r.appendChild(o)}i.forEach(function(t){var i=a(t,2),o=i[0],l=i[1],s=document.createElement("div");s.className="treepanel-field";var u=document.createElement("span");u.className="treepanel-field-key",u.textContent=String(o);var c=n?e.createEditor(l,function(t){return e.setDraftField(String(o),t)}):document.createElement("span");n?c.classList.add("treepanel-field-editor"):(c.className="treepanel-field-value",c.textContent=null==l?"":String(l)),s.append(u,c),r.appendChild(s)})}}},{key:"renderTable",value:function(t,e,n){var r=this,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,l=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:null)||this.tableHead,u=i||this.tableBody;if(s&&u){s.replaceChildren(),u.replaceChildren();var c=Array.isArray(t)?o(t):[],d=Array.isArray(e)?o(e):[];if(!c.length&&d.length&&(c=Object.keys(d[0]||{})),!c.length&&Object.keys(n||{}).length&&(c=["field","value"],d=Object.entries(n).map(function(t){var e=a(t,2);return{field:e[0],value:e[1]}})),c.length){var f=document.createElement("tr");c.forEach(function(t){var e=document.createElement("th");e.textContent=String(t),f.appendChild(e)}),s.appendChild(f),d.forEach(function(t,e){var n=document.createElement("tr");c.forEach(function(i,o){var a=document.createElement("td");if(l){var s=null==t?void 0:t[i];a.appendChild(r.createEditor(s,function(n){r.setDraftRowValue(t,i,e,n)}))}else a.textContent=null==(null==t?void 0:t[i])?"":String(t[i]);n.appendChild(a)}),u.appendChild(n)})}}}},{key:"renderGrid",value:function(t,e,n){var r=this,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:null)||this.gridEl;if(o){o.replaceChildren();var a=Array.isArray(e)?e:[];if(!a.length&&n&&"object"===c(n)&&Object.keys(n).length&&(a=[n]),!a.length){var l=document.createElement("p");return l.className="treepanel-empty",l.textContent="No details available.",void o.appendChild(l)}var s=Array.isArray(t)&&t.length?t:Object.keys(a[0]||{});a.forEach(function(t,e){var n=document.createElement("article");n.className="treepanel-grid-card",s.forEach(function(o,a){var l=document.createElement("div");l.className="treepanel-grid-field";var s=document.createElement("span");s.className="treepanel-grid-key",s.textContent=String(o);var u=i?r.createEditor(null==t?void 0:t[o],function(t){r.setDraftCell(e,o,a,t)}):document.createElement("span");i?u.classList.add("treepanel-grid-editor"):(u.className="treepanel-grid-value",u.textContent=null==(null==t?void 0:t[o])?"":String(t[o])),l.append(s,u),n.appendChild(l)}),o.appendChild(n)})}}},{key:"startEditing",value:function(){this.inlineEditEnabled&&this.currentDetails&&(this.state.editing=!0,this.editDraft=this.cloneDetails(this.currentDetails),this.renderDetails(this.editDraft))}},{key:"cancelEditing",value:function(){this.state.editing&&(this.state.editing=!1,this.editDraft=null,this.currentDetails&&this.renderDetails(this.currentDetails))}},{key:"saveDetails",value:(s=p(d().m(function t(){var e,n,r,i,o,a,l;return d().w(function(t){for(;;)switch(t.p=t.n){case 0:if(this.state.editing&&this.editDraft&&this.state.selectedId){t.n=1;break}return t.a(2);case 1:if(this.detailsSource){t.n=2;break}return this.setLoading(!1,this.state.selectedLabel||"node"),this.statusEl.textContent="Save skipped: data-details-source is not configured.",this.statusEl.setAttribute("data-state","ready"),t.a(2);case 2:return this.state.saving=!0,this.updateEditControls(),this.statusEl.textContent="Saving ".concat(this.state.selectedLabel||"details","..."),this.statusEl.setAttribute("data-state","loading"),e=this.cloneDetails(this.editDraft),n={id:this.state.selectedId,label:this.state.selectedLabel,detail:e},t.p=3,t.n=4,fetch(this.buildDetailsSourceUrl({id:this.state.selectedId,label:this.state.selectedLabel}),{method:this.saveMethod||"PUT",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});case 4:if((i=t.v).ok){t.n=5;break}throw new Error("Save failed (".concat(i.status,")"));case 5:return o=null,t.p=6,t.n=7,i.json();case 7:o=t.v,t.n=9;break;case 8:t.p=8,t.v;case 9:a=this.normalizeDetailsPayload((null===(r=o)||void 0===r?void 0:r.detail)||o||e,this.state.selectedId,this.state.selectedLabel),this.state.editing=!1,this.editDraft=null,this.currentDetails=a,this.renderDetails(a),this.statusEl.textContent="Saved details for ".concat(this.state.selectedLabel||"node"),this.statusEl.setAttribute("data-state","ready"),this.dispatchEvent("detailssaved",{id:this.state.selectedId,label:this.state.selectedLabel,details:a}),t.n=11;break;case 10:t.p=10,l=t.v,this.statusEl.textContent=String((null==l?void 0:l.message)||"Save failed"),this.statusEl.setAttribute("data-state","ready");case 11:return t.p=11,this.state.saving=!1,this.updateEditControls(),t.f(11);case 12:return t.a(2)}},t,this,[[6,8],[3,10,11,12]])})),function(){return s.apply(this,arguments)})},{key:"cloneDetails",value:function(t){return JSON.parse(JSON.stringify(t||{}))}},{key:"updateEditControls",value:function(){if(this.editButton&&this.saveButton&&this.cancelButton){var t=this.inlineEditEnabled&&!!this.currentDetails;this.editButton.hidden=!t||this.state.editing,this.saveButton.hidden=!t||!this.state.editing,this.cancelButton.hidden=!t||!this.state.editing,this.editButton.disabled=this.state.saving,this.saveButton.disabled=this.state.saving,this.cancelButton.disabled=this.state.saving}}},{key:"createEditor",value:function(t,e){var n=document.createElement("input");return n.type="text",n.className="treepanel-input",n.value=null==t?"":String(t),n.addEventListener("input",function(){"function"==typeof e&&e(n.value)}),n}},{key:"setDraftField",value:function(t,e){this.editDraft&&this.editDraft.fields&&"object"===c(this.editDraft.fields)&&(this.editDraft.fields[t]=e)}},{key:"setDraftRowValue",value:function(t,e,n,r){if(this.editDraft&&Array.isArray(this.editDraft.rows)){var i=this.editDraft.rows.findIndex(function(e){return e===t}),o=i>=0?i:Number(n);Number.isNaN(o)||o<0||o>=this.editDraft.rows.length||(this.editDraft.rows[o]&&"object"===c(this.editDraft.rows[o])||(this.editDraft.rows[o]={}),this.editDraft.rows[o][e]=r)}}},{key:"setDraftCell",value:function(t,e,n,r){if(this.editDraft&&Array.isArray(this.editDraft.rows)){var i=Number(t);Number.isNaN(i)||i<0||i>=this.editDraft.rows.length?this.setDraftRowValue(null,e,n,r):(this.editDraft.rows[i]&&"object"===c(this.editDraft.rows[i])||(this.editDraft.rows[i]={}),this.editDraft.rows[i][e]=r)}}},{key:"setLoading",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";this.state.loading=!!t,this.statusEl&&(t?(this.statusEl.textContent="Loading ".concat(e||"details","..."),this.statusEl.setAttribute("data-state","loading")):(this.statusEl.textContent=e?"Showing details for ".concat(e):"Select a node to view details.",this.statusEl.setAttribute("data-state","ready")))}}],l=[{key:"selector",get:function(){return"treepanel"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"treepanel"}}],r&&v(n.prototype,r),l&&v(n,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,l,s,f,h,m,g}(r.Component);k(O,"templateId","treepanel-template"),"undefined"!=typeof window&&(window.TreePanelComponent=O)},4191(t,e,n){"use strict";n.r(e),n.d(e,{WizardComponent:()=>g});var r=n(8812),i=n(9062),o=n(3076);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function l(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return s(c,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),c}var a={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(s(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,s(h,"constructor",d),s(d,"constructor",c),c.displayName="GeneratorFunction",s(d,i,"GeneratorFunction"),s(h),s(h,i,"Generator"),s(h,r,function(){return this}),s(h,"toString",function(){return"[object Generator]"}),(l=function(){return{w:o,m:p}})()}function s(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}s=function(t,e,n,r){function o(e,n){s(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},s(t,e,n,r)}function u(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function c(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){u(o,r,i,a,l,"next",t)}function l(t){u(o,r,i,a,l,"throw",t)}a(void 0)})}}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,f(r.key),r)}}function f(t){var e=function(t){if("object"!=a(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==a(e)?e:e+""}function h(t,e,n){return e=m(e),function(t,e){if(e&&("object"==a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,p()?Reflect.construct(e,n||[],m(t).constructor):e.apply(t,n))}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(p=function(){return!!t})()}function v(t,e,n,r){var i=y(m(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function y(){return y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=m(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},y.apply(null,arguments)}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}var g=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=h(this,e,[t,r])).templateId="wizard",n.currentStep=0,n.steps=[],n.stepData=new Map,n.isComplete=!1,n.autoSync=t.hasAttribute("autosync"),n.lazyLoad=t.hasAttribute("lazy"),n.stepNavigationMode=n.resolveStepNavigationMode(t),n.providerName=t.getAttribute("provider")||"default",n.contentProviderInstance=null,n.loadedStepContent=new Set,n.init(),n}return function(t,e){if("function"!=typeof e&&null!==e)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&&b(t,e)}(e,t),n=e,r=[{key:"resolveStepNavigationMode",value:function(t){return"page"===String(t.getAttribute("data-step-navigation")||"inline").trim().toLowerCase()?"page":"inline"}},{key:"init",value:(I=c(l().m(function t(){var n;return l().w(function(t){for(;;)switch(t.n){case 0:return v(e,"init",this,3)([]),t.n=1,this.render();case 1:return this.bindEvents(),n=this.resolveInitialStepIndex(),t.n=2,this.loadStep(n,0,{allowPageNavigation:!1});case 2:return t.a(2)}},t,this)})),function(){return I.apply(this,arguments)})},{key:"resolveInitialStepIndex",value:function(){if(!this.steps.length)return 0;var t=String(this.container.getAttribute("data-initial-step-id")||this.container.getAttribute("initial-step-id")||"").trim();if(t){var e=this.steps.findIndex(function(e){return String(e.id)===t});if(e>=0)return e}var n=this.container.getAttribute("data-initial-step")||this.container.getAttribute("initial-step"),r=Number(n);return Number.isInteger(r)&&r>=0&&r<this.steps.length?r:0}},{key:"render",value:(L=c(l().m(function t(){return l().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,v(e,"render",this,3)([]);case 1:return this.element=this.container.querySelector(".wizard"),this.nav=this.element.querySelector(".wizard-nav"),this.content=this.element.querySelector(".wizard-content"),this.progress=this.element.querySelector(".wizard-progress"),this.footer=this.element.querySelector(".wizard-footer"),this.loaderState=(0,i.w)(this,{host:this.content||this.element,busyTarget:this.content||this.element,scope:"block",defaultMessage:"Loading step..."}),this.stateBinding=(0,o.x)(this,{defaultPath:"wizard",eventName:"stepchange",getSnapshot:function(t){return t.getBindableState()},applySnapshot:function(t,e){return t.applyBindableState(e)}}),t.n=2,this.processDataRepeats();case 2:this.updateProgress(),this.updateFooterState();case 3:return t.a(2)}},t,this)})),function(){return L.apply(this,arguments)})},{key:"processDataRepeats",value:(x=c(l().m(function t(){var e,n;return l().w(function(t){for(;;)switch(t.n){case 0:if(this.container.dataset.source){t.n=1;break}return t.a(2);case 1:return t.n=2,this.resolveDataSource();case 2:if(this.data=t.v,n=Array.isArray(this.data)?this.data:Array.isArray(null===(e=this.data)||void 0===e?void 0:e.steps)?this.data.steps:[],this.steps=n.map(function(t,e){return{id:t.id||e,name:t.name||"Step ".concat(e+1),valid:!1,dirty:!1,data:{},canSkip:t.canSkip||!1,loadContent:t.contentUrl,contentType:t.contentType||"",pageUrl:t.pageUrl||t.href||t.route||"",content:t.content||null}}),this.lazyLoad){t.n=3;break}return t.n=3,this.preloadStepContent();case 3:this.renderStepNav(),this.updateFooterState();case 4:return t.a(2)}},t,this)})),function(){return x.apply(this,arguments)})},{key:"renderStepNav",value:function(){var t=this;this.nav.replaceChildren(),this.steps.forEach(function(e,n){var r=document.createElement("button");r.className="wizard-step ".concat(n<=t.currentStep?"complete":""),r.dataset.step=String(n),r.disabled=n>t.currentStep;var i=document.createElement("span");i.className="step-number",i.textContent=String(n+1);var o=document.createElement("span");o.className="step-name",o.textContent=e.name,r.append(i,o),t.nav.appendChild(r)})}},{key:"loadStep",value:(T=c(l().m(function t(e){var n,r,i,o,a,s,u,c=arguments;return l().w(function(t){for(;;)switch(t.p=t.n){case 0:if(i=c.length>1&&void 0!==c[1]?c[1]:1,o=!1!==(c.length>2&&void 0!==c[2]?c[2]:{}).allowPageNavigation,this.steps.length){t.n=1;break}return this.renderStepContent(null),this.updateFooterState(),t.a(2,!1);case 1:if(!(e>0&&i>0)){t.n=3;break}return t.n=2,this.validateCurrentStep();case 2:if(t.v){t.n=3;break}return t.a(2,!1);case 3:return t.n=4,this.saveStepData(this.currentStep);case 4:if(this.currentStep=e,a=this.steps[e]){t.n=5;break}return t.a(2,!1);case 5:if(this.updateNavState(),this.updateProgress(),this.updateFooterState(),!o||!this.shouldNavigateToPage(a)){t.n=7;break}return t.n=6,this.navigateToStepPage(a,e,i);case 6:return t.a(2,!0);case 7:if(null===(n=this.loaderState)||void 0===n||null===(r=n.setLoading)||void 0===r||r.call(n,!0,"Loading ".concat(a.name||"Step ".concat(e+1),"...")),t.p=8,!this.shouldLoadStepContent(a)){t.n=9;break}return t.n=9,this.loadStepContent(e);case 9:this.renderStepContent(a),this.focusContent();case 10:return t.p=10,null===(s=this.loaderState)||void 0===s||null===(u=s.setLoading)||void 0===u||u.call(s,!1),t.f(10);case 11:return this.dispatchEvent("stepchange",{step:e,direction:i,stepData:a}),t.a(2,!0)}},t,this,[[8,,10,11]])})),function(t){return T.apply(this,arguments)})},{key:"shouldNavigateToPage",value:function(t){return"page"===this.stepNavigationMode&&!(null==t||!t.pageUrl)}},{key:"shouldLoadStepContent",value:function(t){return!(!t||this.shouldNavigateToPage(t)||!this.lazyLoad&&!t.loadContent&&null!=t.content)}},{key:"preloadStepContent",value:(P=c(l().m(function t(){var e,n;return l().w(function(t){for(;;)switch(t.n){case 0:e=0;case 1:if(!(e<this.steps.length)){t.n=4;break}if(n=this.steps[e],this.shouldLoadStepContent(n)){t.n=2;break}return t.a(3,3);case 2:return t.n=3,this.loadStepContent(e);case 3:e+=1,t.n=1;break;case 4:return t.a(2)}},t,this)})),function(){return P.apply(this,arguments)})},{key:"renderStepContent",value:function(t){if(!t){var e=document.createElement("div");return e.className="wizard-empty",e.textContent="No steps configured.",void this.content.replaceChildren(e)}if(t.content instanceof Node)this.content.replaceChildren(t.content);else{if("string"==typeof t.content){var n=t.content.trim();if(!n)return void this.content.replaceChildren(this.createDefaultStepForm(t));var r=document.createElement("template");return r.innerHTML=n,void this.content.replaceChildren(r.content.cloneNode(!0))}this.isJsonStepContent(t.content)?this.content.replaceChildren(this.createJsonStepForm(t,t.content)):this.content.replaceChildren(this.createDefaultStepForm(t))}}},{key:"isJsonStepContent",value:function(t){return!(!t||"object"!==a(t)||t instanceof Node)}},{key:"createDefaultStepForm",value:function(t){var e=document.createElement("form");e.dataset.step=String(t.id);var n=document.createElement("h3");n.textContent=t.name||"Step ".concat(this.currentStep+1);var r=document.createElement("p");return r.textContent="No custom content configured for this step.",e.append(n,r),e}},{key:"loadStepContent",value:(j=c(l().m(function t(e){var n,r;return l().w(function(t){for(;;)switch(t.p=t.n){case 0:if(n=this.steps[e]){t.n=1;break}return t.a(2);case 1:if(!this.loadedStepContent.has(e)){t.n=2;break}return t.a(2);case 2:return t.p=2,t.n=3,this.fetchStepContent(n);case 3:null!=(r=t.v)&&(n.content=r),this.loadedStepContent.add(e),t.n=5;break;case 4:t.p=4,t.v,this.showStepLoadError("Failed to load step");case 5:return t.a(2)}},t,this,[[2,4]])})),function(t){return j.apply(this,arguments)})},{key:"navigateToStepPage",value:(A=c(l().m(function t(e,n,r){return l().w(function(t){for(;;)switch(t.n){case 0:this.dispatchEvent("steppagenavigate",{step:n,direction:r,pageUrl:e.pageUrl,stepData:e}),window.location.assign(e.pageUrl);case 1:return t.a(2)}},t,this)})),function(t,e,n){return A.apply(this,arguments)})},{key:"showStepLoadError",value:function(t){var e=document.createElement("div");e.className="error",e.textContent=t,this.content.replaceChildren(e)}},{key:"fetchStepContent",value:(C=c(l().m(function t(e){var n,r;return l().w(function(t){for(;;)switch(t.n){case 0:if(!e.loadContent){t.n=4;break}return t.n=1,fetch(e.loadContent,{credentials:"same-origin"});case 1:if((r=t.v).ok){t.n=2;break}throw new Error("Failed to load step content: HTTP ".concat(r.status));case 2:return t.n=3,this.parseRemoteStepPayload(r,e);case 3:case 6:return t.a(2,t.v);case 4:return t.n=5,this.ensureProviderInstance();case 5:return t.n=6,null===(n=this.contentProviderInstance)||void 0===n?void 0:n.getContent(e,this.currentStep)}},t,this)})),function(t){return C.apply(this,arguments)})},{key:"parseRemoteStepPayload",value:(O=c(l().m(function t(e,n){var r,i;return l().w(function(t){for(;;)switch(t.n){case 0:if(r=String(e.headers.get("content-type")||"").toLowerCase(),"json"===String((null==n?void 0:n.contentType)||"").toLowerCase()||r.includes("application/json")||String((null==n?void 0:n.loadContent)||"").toLowerCase().endsWith(".json")){t.n=2;break}return t.n=1,e.text();case 1:return t.a(2,t.v);case 2:return t.n=3,e.json();case 3:if("string"!=typeof(i=t.v)){t.n=4;break}return t.a(2,i);case 4:if(!i||"string"!=typeof i.html){t.n=5;break}return t.a(2,i.html);case 5:return t.a(2,i)}},t)})),function(t,e){return O.apply(this,arguments)})},{key:"createJsonStepForm",value:function(t,e){var n=document.createElement("form");n.dataset.step=String(t.id);var r=document.createElement("h3");r.textContent=String((null==e?void 0:e.title)||t.name||"Step ".concat(this.currentStep+1)),n.appendChild(r);var i=String((null==e?void 0:e.description)||"").trim();if(i){var o=document.createElement("p");o.textContent=i,n.appendChild(o)}var l=Array.isArray(null==e?void 0:e.fields)?e.fields:[];if(l.length)return l.forEach(function(t,e){var r=String((null==t?void 0:t.name)||"field_".concat(e+1)),i=String((null==t?void 0:t.label)||r),o=String((null==t?void 0:t.type)||"text").toLowerCase(),l=null==(null==t?void 0:t.value)?"":String(t.value),s=null==(null==t?void 0:t.placeholder)?"":String(t.placeholder),u=!(null==t||!t.required),c=document.createElement("label");c.className="wizard-json-field";var d=document.createElement("span");d.textContent=i,c.appendChild(d);var f=null;"textarea"===o?(f=document.createElement("textarea")).value=l:"select"===o?(f=document.createElement("select"),(Array.isArray(null==t?void 0:t.options)?t.options:[]).forEach(function(t,e){var n,r,i,o,s="object"===a(t)&&t?{value:String(null!==(n=null!==(r=t.value)&&void 0!==r?r:t.label)&&void 0!==n?n:e),label:String(null!==(i=null!==(o=t.label)&&void 0!==o?o:t.value)&&void 0!==i?i:e)}:{value:String(t),label:String(t)},u=document.createElement("option");u.value=s.value,u.textContent=s.label,s.value===l&&(u.selected=!0),f.appendChild(u)})):((f=document.createElement("input")).type=o||"text",f.value=l),f.name=r,s&&"placeholder"in f&&(f.placeholder=s),u&&(f.required=!0),c.appendChild(f),n.appendChild(c)}),n;var s=e&&"object"===a(e.values)?e.values:e&&"object"===a(e.data)?e.data:null;if(s){var u=document.createElement("ul");return Object.keys(s).forEach(function(t){var e=document.createElement("li"),n=null==s[t]?"":String(s[t]);e.textContent="".concat(t,": ").concat(n),u.appendChild(e)}),n.appendChild(u),n}var c=document.createElement("p");return c.textContent="JSON step loaded (no fields declared).",n.appendChild(c),n}},{key:"validateCurrentStep",value:(E=c(l().m(function t(){var e,n;return l().w(function(t){for(;;)switch(t.n){case 0:if(e=this.extractFormData(this.content),n=this.steps[this.currentStep]){t.n=1;break}return t.a(2,!1);case 1:return t.n=2,this.validateStep(e,n);case 2:if(n.valid=t.v,n.dirty=!0,this.stepData.set(this.currentStep,{data:e,valid:n.valid}),n.valid){t.n=3;break}return this.showValidationErrors(e),t.a(2,!1);case 3:return t.a(2,!0)}},t,this)})),function(){return E.apply(this,arguments)})},{key:"saveStepData",value:(k=c(l().m(function t(e){var n;return l().w(function(t){for(;;)switch(t.n){case 0:if(!this.autoSync||!this.stepData.has(e)){t.n=2;break}return t.n=1,this.ensureProviderInstance();case 1:if(null==(n=t.v)||!n.saveStep){t.n=2;break}return t.n=2,n.saveStep(this.steps[e],this.stepData.get(e));case 2:return t.a(2)}},t,this)})),function(t){return k.apply(this,arguments)})},{key:"next",value:(S=c(l().m(function t(){var e;return l().w(function(t){for(;;)switch(t.n){case 0:if(!((e=this.currentStep+1)>=this.steps.length)){t.n=1;break}return t.a(2,this.complete());case 1:return t.n=2,this.loadStep(e,1);case 2:return t.a(2,t.v)}},t,this)})),function(){return S.apply(this,arguments)})},{key:"prev",value:(w=c(l().m(function t(){var e;return l().w(function(t){for(;;)switch(t.n){case 0:return e=Math.max(0,this.currentStep-1),t.n=1,this.loadStep(e,-1);case 1:return t.a(2,t.v)}},t,this)})),function(){return w.apply(this,arguments)})},{key:"goToStep",value:(g=c(l().m(function t(e){return l().w(function(t){for(;;)switch(t.n){case 0:if(!(e<0||e>=this.steps.length||e>this.currentStep)){t.n=1;break}return t.a(2,!1);case 1:return t.n=2,this.loadStep(e,0);case 2:return t.a(2,t.v)}},t,this)})),function(t){return g.apply(this,arguments)})},{key:"complete",value:(m=c(l().m(function t(){var e=this;return l().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.validateCurrentStep();case 1:if(t.v){t.n=2;break}return t.a(2,!1);case 2:if(!this.autoSync){t.n=3;break}return t.n=3,this.syncAllSteps();case 3:return this.isComplete=!0,this.element.classList.add("complete"),this.dispatchEvent("complete",{steps:this.steps.map(function(t,n){var r;return null===(r=e.stepData.get(n))||void 0===r?void 0:r.data})}),t.a(2,!0)}},t,this)})),function(){return m.apply(this,arguments)})},{key:"updateProgress",value:function(){var t=this.steps.length||1,e=(this.currentStep+1)/t*100;this.progress.style.width="".concat(e,"%"),this.progress.setAttribute("aria-valuenow",String(this.currentStep+1)),this.progress.setAttribute("aria-valuemax",String(t))}},{key:"updateNavState",value:function(){var t=this;this.nav.querySelectorAll(".wizard-step").forEach(function(e,n){e.classList.toggle("current",n===t.currentStep),e.classList.toggle("complete",n<=t.currentStep),e.disabled=n>t.currentStep})}},{key:"updateFooterState",value:function(){if(this.footer){var t=this.footer.querySelector('[data-action="prev"]'),e=this.footer.querySelector('[data-action="next"]'),n=this.footer.querySelector('[data-action="complete"]'),r=this.steps.length>0,i=this.currentStep<=0,o=r&&this.currentStep>=this.steps.length-1;t&&(t.disabled=!r||i),e&&(e.disabled=!r||o,e.hidden=!r||o),n&&(n.hidden=!r||!o,n.disabled=!r||!o,n.classList.toggle("hidden",!r||!o))}}},{key:"bindEvents",value:function(){var t=this;this.nav.addEventListener("click",function(){var e=c(l().m(function e(n){var r,i;return l().w(function(e){for(;;)switch(e.n){case 0:if(!(r=n.target.closest(".wizard-step"))){e.n=1;break}return i=parseInt(r.dataset.step,10),e.n=1,t.goToStep(i);case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()),this.footer.addEventListener("click",function(){var e=c(l().m(function e(n){return l().w(function(e){for(;;)switch(e.n){case 0:if(!n.target.matches('[data-action="next"]')){e.n=2;break}return e.n=1,t.next();case 1:case 3:e.n=5;break;case 2:if(!n.target.matches('[data-action="prev"]')){e.n=4;break}return e.n=3,t.prev();case 4:if(!n.target.matches('[data-action="complete"]')){e.n=5;break}return e.n=5,t.complete();case 5:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()),this.content.addEventListener("change",function(){t.steps[t.currentStep]&&(t.steps[t.currentStep].dirty=!0)})}},{key:"getContentProviders",value:function(){return this.container.contentProviders||window.contentProviders||{}}},{key:"resolveDataSource",value:(y=c(l().m(function t(){var e,n,r,i;return l().w(function(t){for(;;)switch(t.p=t.n){case 0:if(n=this.container.dataset.source){t.n=1;break}return t.a(2,[]);case 1:return t.n=2,this.ensureProviderInstance();case 2:if(null===(e=this.contentProviderInstance)||void 0===e||!e.resolve){t.n=3;break}return t.a(2,this.contentProviderInstance.resolve(n)||[]);case 3:if(!(r=String(n).trim()).startsWith("[")&&!r.startsWith("{")){t.n=6;break}return t.p=4,t.a(2,JSON.parse(r));case 5:return t.p=5,t.v,t.a(2,[]);case 6:if(!r.startsWith("/")&&!/^https?:\/\//i.test(r)){t.n=12;break}return t.p=7,t.n=8,fetch(r,{credentials:"same-origin"});case 8:if((i=t.v).ok){t.n=9;break}return t.a(2,[]);case 9:return t.n=10,i.json();case 10:return t.a(2,t.v);case 11:return t.p=11,t.v,t.a(2,[]);case 12:return t.a(2,[])}},t,this,[[7,11],[4,5]])})),function(){return y.apply(this,arguments)})},{key:"ensureProviderInstance",value:(p=c(l().m(function t(){var e,n,r,i,o;return l().w(function(t){for(;;)switch(t.n){case 0:if(!this.contentProviderInstance){t.n=1;break}return t.a(2,this.contentProviderInstance);case 1:if(r=this.getContentProviders(),i=r[this.providerName]){t.n=2;break}return t.a(2,null);case 2:return o=window.appState||window.pageContext||{},this.contentProviderInstance=new i(o),t.n=3,null===(e=(n=this.contentProviderInstance).init)||void 0===e?void 0:e.call(n);case 3:return t.a(2,this.contentProviderInstance)}},t,this)})),function(){return p.apply(this,arguments)})},{key:"extractFormData",value:function(t){var e=t.querySelector("form");if(!e)return{};var n=new FormData(e);return Object.fromEntries(n)}},{key:"focusContent",value:function(){var t,e;null===(t=(e=this.content).focus)||void 0===t||t.call(e)}},{key:"validateStep",value:(f=c(l().m(function t(e,n){return l().w(function(t){for(;;)if(0===t.n)return t.a(2,!0)},t)})),function(t,e){return f.apply(this,arguments)})},{key:"showValidationErrors",value:function(t){}},{key:"syncAllSteps",value:(u=c(l().m(function t(){var e;return l().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.ensureProviderInstance();case 1:if(null==(e=t.v)||!e.syncAllSteps){t.n=2;break}return t.n=2,e.syncAllSteps(this.steps,this.stepData);case 2:return t.a(2)}},t,this)})),function(){return u.apply(this,arguments)})},{key:"serializeStepData",value:function(){var t={};return this.stepData.forEach(function(e,n){t[String(n)]=e}),t}},{key:"getBindableState",value:function(){return{currentStep:this.currentStep,isComplete:this.isComplete,stepData:this.serializeStepData()}}},{key:"applyBindableState",value:function(t){if(t&&"object"===a(t)){var e=Number(t.currentStep);Number.isInteger(e)&&(e<0||e>=this.steps.length||e!==this.currentStep&&this.goToStep(e))}}},{key:"destroy",value:function(){var t,n,r,i;null===(t=this.loaderState)||void 0===t||null===(n=t.destroy)||void 0===n||n.call(t),null===(r=this.stateBinding)||void 0===r||null===(i=r.disconnect)||void 0===i||i.call(r),v(e,"destroy",this,3)([])}}],s=[{key:"selector",get:function(){return"wizard"}},{key:"library",get:function(){return"holi"}},{key:"componentName",get:function(){return"wizard"}}],r&&d(n.prototype,r),s&&d(n,s),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,s,u,f,p,y,m,g,w,S,k,E,O,C,A,j,P,T,x,L,I}(r.Component);"undefined"!=typeof window&&(window.WizardComponent=g)},1904(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,a(r.key),r)}}function o(t,e,n){return(e=a(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.d(e,{Z:()=>l});var l=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"registerLibrary",value:function(t,e){this.libraries.set(t,e)}},{key:"initAll",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.libraries.forEach(function(r,i){r.forEach(function(r){t.initLibraryComponents(r,i,e,n)})})}},{key:"registerInstance",value:function(t,e){var n;if(t instanceof Element&&e){var r=this.instances.get(t),i=r instanceof Map?r:new Map;i.set((null===(n=e.constructor)||void 0===n?void 0:n.name)||"Component",e),this.instances.set(t,i)}}},{key:"unregisterInstance",value:function(t,e){if(t instanceof Element){var n=this.instances.get(t);n instanceof Map&&(e?n.forEach(function(t,r){t===e&&n.delete(r)}):n.clear(),0!==n.size?this.instances.set(t,n):this.instances.delete(t))}}},{key:"getKnownInstanceKeys",value:function(){var t=new Set;return this.libraries.forEach(function(e){e.forEach(function(e){null!=e&&e.name&&t.add(e.name.toLowerCase())})}),Array.from(t)}},{key:"getElementInstances",value:function(t){if(!(t instanceof Element))return[];var e=new Set,n=this.instances.get(t);return n instanceof Map&&n.forEach(function(t){t&&e.add(t)}),this.getKnownInstanceKeys().forEach(function(n){var r=t[n];r&&"function"==typeof r.destroy&&e.add(r)}),Array.from(e)}},{key:"collectInstances",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(t instanceof Element)&&t!==document)return[];var r=[],i=new Set,o=function(t){t&&!i.has(t)&&(i.add(t),r.push(t))};return n&&t instanceof Element&&this.getElementInstances(t).forEach(o),t.querySelectorAll&&t.querySelectorAll("*").forEach(function(t){e.getElementInstances(t).forEach(o)}),r}},{key:"resolveComponentName",value:function(t){if(t.componentName)return String(t.componentName).toLowerCase();var e=(t.selector||"").trim();if(/^[a-z][a-z0-9-]*$/i.test(e))return e.toLowerCase();var n=(t.name||"").replace(/Component$/i,"");return n?n.toLowerCase():""}},{key:"getDiscoverySelectors",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=!1!==e.includeRoleSelectors,r=new Set,i=(t.selector||"").trim();i&&r.add(i);var o=this.resolveComponentName(t);return o&&(r.add(o),r.add('[component="'.concat(o,'"]')),n&&r.add('[role="'.concat(o,'"]'))),"function"==typeof t.getNativeSelectors&&(t.getNativeSelectors(e)||[]).forEach(function(t){var e=String(t||"").trim();e&&r.add(e)}),Array.from(r)}},{key:"shouldDeferInit",value:function(t){var e=(t.getAttribute("transform")||"").toLowerCase(),n=(t.getAttribute("lazy-transform")||t.dataset.lazyTransform||"").toLowerCase();return"lazy"===e||"true"===n||"1"===n}},{key:"initLibraryComponents",value:function(t,e,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=this.getDiscoverySelectors(t,i);if(o.length){var a=new Set;o.forEach(function(t){n instanceof Element&&n.matches(t)&&a.add(n),n.querySelectorAll(t).forEach(function(t){return a.add(t)})}),a.forEach(function(o){var a,l="function"==typeof t.prepareHost&&t.prepareHost(o)||o;if(l instanceof Element&&t.matchesLibrary(l,e)&&("function"!=typeof t.canInitElement||t.canInitElement(l,{libraryName:e,container:n,options:i}))&&!r.shouldDeferInit(l)){var s=null===(a=l.closest)||void 0===a?void 0:a.call(l,'[data-holi-component-class="'.concat(t.name,'"]'));s&&s!==l||l[t.name.toLowerCase()]||new t(l)}})}}},{key:"destroyContainerInstances",value:function(t){t instanceof Element&&this.collectInstances(t,!0).reverse().forEach(function(t){null!=t&&t.isDestroyed||"function"!=typeof t.destroy||t.destroy()})}},{key:"flushRemovedNodes",value:function(){var t=this;this.removalFlushScheduled=!1;var e=Array.from(this.pendingRemovedNodes);this.pendingRemovedNodes.clear(),e.forEach(function(e){e instanceof Element&&(e.isConnected||t.destroyContainerInstances(e))})}},{key:"scheduleRemovedFlush",value:function(){var t=this;this.removalFlushScheduled||(this.removalFlushScheduled=!0,queueMicrotask(function(){return t.flushRemovedNodes()}))}},{key:"observeLifecycle",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;if(!this.lifecycleObserver){var n=(null==e?void 0:e.documentElement)||e;(n instanceof Element||n===document)&&(this.lifecycleObserver=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){e instanceof Element&&t.initAll(e,{includeRoleSelectors:!1})}),e.removedNodes.forEach(function(e){e instanceof Element&&t.pendingRemovedNodes.add(e)})}),t.scheduleRemovedFlush()}),this.lifecycleObserver.observe(n,{childList:!0,subtree:!0}))}}}],null&&i(t.prototype,null),e&&i(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();o(l,"libraries",new Map),o(l,"instances",new WeakMap),o(l,"lifecycleObserver",null),o(l,"pendingRemovedNodes",new Set),o(l,"removalFlushScheduled",!1)},3076(t,e,n){"use strict";n.d(e,{x:()=>c});var r=n(7458);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function a(t,e,n){return(e=s(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,s(r.key),r)}}function s(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}var u=function(){return t=function t(e){var n,r=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.component=e,this.options=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({storeAttr:"data-state-store",pathAttr:"data-state-path",modeAttr:"data-state-sync",debounceAttr:"data-state-debounce-ms",defaultPath:i.defaultPath||(null==e||null===(n=e.constructor)||void 0===n?void 0:n.componentName)||"component",eventName:i.eventName||"stateupdate",getSnapshot:i.getSnapshot||function(){return{}},applySnapshot:i.applySnapshot||function(){}},i),this.unsubscribe=null,this.boundOnComponentEvent=function(t){return r.handleComponentEvent(t)},this.pushTimer=null,this.applyingFromStore=!1,this.pushingToStore=!1,this.lastPushedJson="",this.mode="both",this.debounceMs=0},(e=[{key:"resolveMode",value:function(t){var e=String(t||"both").trim().toLowerCase();return"in"===e||"out"===e||"both"===e?e:"none"===e||"off"===e?"none":"both"}},{key:"connect",value:function(){var t,e,n=this,i=null===(t=this.component)||void 0===t?void 0:t.container,o=null===(e=this.component)||void 0===e?void 0:e.element;if(i instanceof HTMLElement&&o instanceof HTMLElement){var a=String(i.getAttribute(this.options.storeAttr)||"").trim();if(a){var l=r.T.get(a);if(l){this.store=l,this.storeId=a,this.path=String(i.getAttribute(this.options.pathAttr)||this.options.defaultPath||"").trim(),this.mode=this.resolveMode(i.getAttribute(this.options.modeAttr)),this.debounceMs=Math.max(0,Number(i.getAttribute(this.options.debounceAttr)||0)||0);var s=this.path?r.T.getByPath(l.proxy,this.path):void 0;"none"!==this.mode&&("in"!==this.mode&&"both"!==this.mode||(this.unsubscribe=l.subscribe(function(t,e){var r=n.path;r&&null!=e&&e.path&&(e.path===r||e.path.startsWith("".concat(r,"."))||r.startsWith("".concat(e.path,".")))&&n.pullFromStore()}),this.pullFromStore()),"out"!==this.mode&&"both"!==this.mode||(o.addEventListener(this.options.eventName,this.boundOnComponentEvent),void 0===s&&this.pushToStore(this.options.getSnapshot(this.component),!0)))}}}}},{key:"cloneSerializable",value:function(t){try{return JSON.parse(JSON.stringify(t))}catch(e){return t}}},{key:"toJson",value:function(t){try{return JSON.stringify(t)}catch(t){return""}}},{key:"pullFromStore",value:function(){if(this.store&&this.path&&!this.pushingToStore){var t=r.T.getByPath(this.store.proxy,this.path);if(null!=t){var e=this.toJson(t);if(!e||e!==this.lastPushedJson){this.lastPushedJson=e,this.applyingFromStore=!0;try{this.options.applySnapshot(this.component,this.cloneSerializable(t))}finally{this.applyingFromStore=!1}}}}}},{key:"handleComponentEvent",value:function(t){var e=this;if(this.store&&this.path&&!this.applyingFromStore){var n=this.options.getSnapshot(this.component);if(this.debounceMs>0)return this.pushTimer&&clearTimeout(this.pushTimer),void(this.pushTimer=setTimeout(function(){e.pushTimer=null,e.pushToStore(n,!1)},this.debounceMs));this.pushToStore(n,!1)}}},{key:"pushToStore",value:function(t,e){if(this.store&&this.path){var n=this.cloneSerializable(t),i=this.toJson(n);if(e||!i||i!==this.lastPushedJson){this.pushingToStore=!0;try{r.T.setByPath(this.store.proxy,this.path,n),this.lastPushedJson=i}finally{this.pushingToStore=!1}}}}},{key:"disconnect",value:function(){var t,e;this.pushTimer&&(clearTimeout(this.pushTimer),this.pushTimer=null),null===(t=this.unsubscribe)||void 0===t||t.call(this),this.unsubscribe=null,null===(e=this.component)||void 0===e||null===(e=e.element)||void 0===e||e.removeEventListener(this.options.eventName,this.boundOnComponentEvent)}}])&&l(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function c(t){var e=new u(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});return e.connect(),e}},9062(t,e,n){"use strict";n.d(e,{w:()=>i});var r=n(2819);function i(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.host||(null==t?void 0:t.element)||(null==t?void 0:t.container)||null;if(!(n instanceof HTMLElement))return{setLoading:function(){},destroy:function(){}};var i=e.busyTarget instanceof HTMLElement?e.busyTarget:n,o=e.scope||"block",a=String(e.defaultMessage||"Loading..."),l=n.querySelector('[data-role="component-loader"]');l?l.getAttribute("scope")||l.setAttribute("scope",o):(l=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"block",e=document.createElement("section");return e.setAttribute("component","loader"),e.setAttribute("scope",t),e.hidden=!0,e}(o),l.setAttribute("data-role","component-loader"),n.appendChild(l));var s=l.loadercomponent||new r.LoaderComponent(l);return s.hide(),{setLoading:function(t){var e=!!t,n=String((arguments.length>1&&void 0!==arguments[1]?arguments[1]:"")||a||"Loading...");i.setAttribute("aria-busy",e?"true":"false"),e?s.show(n):s.hide()},destroy:function(){i.removeAttribute("aria-busy"),s.hide()}}}},6595(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach(function(e){s(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,u(r.key),r)}}function s(t,e,n){return(e=u(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}n.d(e,{G:()=>c});var c=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"normalizeLocale",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=String(t.code||t.lang||t.locale||t.value||"").trim();return e?{code:e,label:String(t.label||t.name||e).trim()||e,dir:String(t.dir||"").trim()}:null}},{key:"ensureDefaultLocale",value:function(){var t=String(this.defaultLocaleCode||"en").trim()||"en";return this.locales.has(t)||this.locales.set(t,{code:t,label:"en"===t?"English":t,dir:""}),this.locales.get(t)}},{key:"registerLocale",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.normalizeLocale(t);if(!n)return null;var r=a(a({},this.locales.get(n.code)||{}),n);return this.locales.set(r.code,r),!0===e.defaultLocale||!0===t.default?this.setDefaultLocale(r.code):this.ensureDefaultLocale(),r}},{key:"registerLocales",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n.defaultLocale?this.setDefaultLocale(n.defaultLocale):this.ensureDefaultLocale(),(Array.isArray(e)?e:[e]).map(function(e){return t.registerLocale(e)}).filter(Boolean)}},{key:"setDefaultLocale",value:function(t){var e=String(t||"").trim();return e?(this.defaultLocaleCode=e,this.registerLocale({code:e,label:"en"===e?"English":e})):this.getDefaultLocale()}},{key:"getDefaultLocale",value:function(){return this.ensureDefaultLocale()}},{key:"getLocale",value:function(t){this.ensureDefaultLocale();var e=String(t||"").trim();return e&&this.locales.get(e)||null}},{key:"getLocales",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.ensureDefaultLocale();var n=Array.from(this.locales.values()),r=Array.isArray(e.codes)?e.codes.filter(Boolean):null;return r&&0!==r.length?r.map(function(e){return t.getLocale(e)}).filter(Boolean):n}},{key:"parseDeclarationNode",value:function(t){var e=String((null==t?void 0:t.textContent)||"").trim();if(!e)return null;try{return JSON.parse(e)}catch(e){return console.warn("Invalid Holi locale declaration.",e,t),null}}},{key:"applyDeclaration",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Array.isArray(t))this.registerLocales(t);else if(t&&"object"===i(t)){t.defaultLocale||t.defaultLanguage?this.setDefaultLocale(t.defaultLocale||t.defaultLanguage):this.ensureDefaultLocale(),Array.isArray(t.locales)&&this.registerLocales(t.locales);var e=String(t.activeLocale||t.language||t.lang||"").trim();e&&!this.readHtmlLang()&&this.applyLocale(e,{dispatch:!1})}}},{key:"discover",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;if("undefined"==typeof document)return this.getLocales();var n=[],i=e===document?document:e;return i instanceof Element&&i.matches(this.declarationSelector)&&n.push(i),"function"==typeof i.querySelectorAll&&n.push.apply(n,function(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(i.querySelectorAll(this.declarationSelector))),n.forEach(function(e){if(!t.discoveredNodes.has(e)){t.discoveredNodes.add(e);var n=t.parseDeclarationNode(e);t.applyDeclaration(n)}}),this.ensureDefaultLocale(),this.getLocales()}},{key:"readHtmlLang",value:function(){var t,e;return String((null===(t=document.documentElement)||void 0===t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"lang"))||"").trim()}},{key:"getActiveLocale",value:function(){var t="undefined"!=typeof document?this.readHtmlLang():"";return t?(this.activeLocaleCode=t,this.getLocale(t)||this.registerLocale({code:t,label:t})):this.activeLocaleCode?this.getLocale(this.activeLocaleCode)||this.registerLocale({code:this.activeLocaleCode,label:this.activeLocaleCode}):this.getDefaultLocale()}},{key:"syncLocaleAttributes",value:function(t){if("undefined"!=typeof document){var e=document.documentElement;e instanceof HTMLHtmlElement&&(e.setAttribute("lang",t.code),t.dir&&e.setAttribute("dir",t.dir))}}},{key:"dispatchLocaleChange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!1!==e.dispatch&&"undefined"!=typeof document){var n={locale:t.code,lang:t.code,language:t.code,definition:a({},t),source:e.source||null};document.dispatchEvent(new CustomEvent("localechange",{detail:n})),document.dispatchEvent(new CustomEvent("languagechange",{detail:n}))}}},{key:"applyLocale",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=String(t||"").trim();if(!n)return null;var r=this.getLocale(n)||this.registerLocale({code:n,label:n});return r?(this.activeLocaleCode=r.code,this.syncLocaleAttributes(r),this.dispatchLocaleChange(r,e),a({},r)):null}},{key:"ensureActiveLocale",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;this.discover(t);var e="undefined"!=typeof document?this.readHtmlLang():"";if(e){var n=this.getLocale(e)||this.registerLocale({code:e,label:e});return this.activeLocaleCode=(null==n?void 0:n.code)||e,this.syncLocaleAttributes(n||{code:e,label:e}),n}return this.applyLocale(this.getDefaultLocale().code,{dispatch:!1})}}],null&&l(t.prototype,null),e&&l(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();s(c,"declarationSelector",'script[type="application/json"][data-holi-locales], template[data-holi-locales]'),s(c,"defaultLocaleCode","en"),s(c,"locales",new Map),s(c,"discoveredNodes",new WeakSet),s(c,"activeLocaleCode",""),"undefined"!=typeof window&&(window.LocaleRegistry=c)},853(t,e,n){"use strict";function r(t,e){if(t instanceof Element&&e instanceof Element){var n=new Set(((arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).exclude||[]).map(function(t){return String(t||"").toLowerCase()}));Array.from(t.attributes||[]).forEach(function(t){var r=String(t.name||"").toLowerCase();r&&!n.has(r)&&e.setAttribute(t.name,t.value)})}}function i(t){var e;return t instanceof HTMLTextAreaElement?t.value||t.textContent||"":t instanceof HTMLInputElement||t instanceof HTMLSelectElement?t.value||"":(null==t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"value"))||""}function o(t){return t instanceof HTMLSelectElement?Array.from(t.options||[]).map(function(t){var e={value:null==t.value?"":String(t.value),label:String(t.textContent||t.label||t.value||"")};return Array.from(t.attributes||[]).forEach(function(t){var n,r=String(t.name||"").toLowerCase();r&&"value"!==r&&"label"!==r&&"selected"!==r&&(r.startsWith("data-")?e[(n=r.slice(5),String(n||"").replace(/[-_\s]+(.)?/g,function(t,e){return e?e.toUpperCase():""}).replace(/^(.)/,function(t){return t.toLowerCase()}))]=t.value:e[r]=""===t.value||t.value)}),t.disabled&&(e.disabled=!0),e}):[]}function a(t){var e,n;if(!(t instanceof HTMLInputElement))return null;var r="label"===(null===(e=t.parentElement)||void 0===e||null===(e=e.tagName)||void 0===e?void 0:e.toLowerCase())?t.parentElement:null;if(r)return r.setAttribute("slot","options"),r;var i=function(t){if(!(t instanceof Element))return null;var e=String(t.getAttribute("id")||"").trim();if(!e)return null;var n="undefined"!=typeof CSS&&"function"==typeof CSS.escape?CSS.escape(e):e.replace(/"/g,'\\"');return document.querySelector('label[for="'.concat(n,'"]'))}(t),o=document.createElement("label");o.className="holi-native-choice",o.setAttribute("slot","options"),o.appendChild(t);var a=String((null==i?void 0:i.textContent)||t.getAttribute("label")||t.getAttribute("aria-label")||t.value||"").trim();if(a){var l=document.createElement("span");l.textContent=a,o.appendChild(l)}return null==i||null===(n=i.remove)||void 0===n||n.call(i),o}n.d(e,{BD:()=>i,NQ:()=>o,VC:()=>a,ts:()=>r})},8696(t,e,n){"use strict";function r(){var t,e,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function l(n,r,o,a){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return i(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,o,a),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][o]?e(e([][o]())):(i(e={},o,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,i(t,a,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,i(h,"constructor",d),i(d,"constructor",c),c.displayName="GeneratorFunction",i(d,a,"GeneratorFunction"),i(h),i(h,a,"Generator"),i(h,o,function(){return this}),i(h,"toString",function(){return"[object Generator]"}),(r=function(){return{w:l,m:p}})()}function i(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}i=function(t,e,n,r){function a(e,n){i(t,e,function(t){return this._invoke(e,n,t)})}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},i(t,e,n,r)}function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function l(t){a(o,r,i,l,s,"next",t)}function s(t){a(o,r,i,l,s,"throw",t)}l(void 0)})}}function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach(function(e){c(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function c(t,e,n){return(e=f(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,f(r.key),r)}}function f(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}n.d(e,{q:()=>h});var h=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.overlay=null,this.keyHandler=null},e=[{key:"open",value:function(){var t=this,e=u({title:"Details",mode:"view",fields:[],record:{},readonlyFields:[],onSave:null},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});this.close();var n=this.createDialogScaffold(),i=n.fragment,a=n.overlay,s=n.header,c=n.body,d=n.footer;this.overlay=a,this.overlay.classList.add("holi-object-details-overlay"),this.overlay.addEventListener("click",function(e){e.target===t.overlay&&t.close()});var f=this.normalizeFields(e.fields,e.record,e.readonlyFields),h=this.normalizeMode(e.mode),p=this.clone(e.record||{}),v=!1,y=function(){s.replaceChildren(),c.replaceChildren(),d.replaceChildren();var n=document.createElement("h2");n.textContent="".concat("add"===h?"Add":"edit"===h?"Edit":"View"," ").concat(e.title),s.appendChild(n);var i=document.createElement("div");if(i.className="holi-object-details-header-actions","view"===h){var a=document.createElement("button");a.type="button",a.className="holi-object-details-btn",a.textContent="Edit",a.addEventListener("click",function(){h="edit",y()}),i.appendChild(a)}var u=document.createElement("button");if(u.type="button",u.className="holi-object-details-btn holi-object-details-btn-secondary",u.textContent="Close",u.addEventListener("click",function(){return t.close()}),i.appendChild(u),s.appendChild(i),"view"!==h){var m=document.createElement("p");m.className="holi-object-details-status",c.appendChild(m);var b=new Map;f.forEach(function(e){var n=document.createElement("div");n.className="holi-object-details-field";var r=document.createElement("label");r.textContent=e.label;var i=t.createControl(e,p[e.name]);i.disabled=!!e.readonly||v,e.readonly||(i.addEventListener("input",function(){var n;p[e.name]=t.readControlValue(i,e),t.setFieldError(null===(n=b.get(e.name))||void 0===n?void 0:n.errorEl,"")}),i.addEventListener("change",function(){var n;p[e.name]=t.readControlValue(i,e),t.setFieldError(null===(n=b.get(e.name))||void 0===n?void 0:n.errorEl,"")}));var o=document.createElement("p");o.className="holi-object-details-field-error",n.append(r,i,o),c.appendChild(n),b.set(e.name,{field:e,control:i,errorEl:o})});var g=document.createElement("button");g.type="button",g.className="holi-object-details-btn holi-object-details-btn-secondary",g.textContent="Cancel",g.disabled=v,g.addEventListener("click",function(){"add"!==h?(p=t.clone(e.record||{}),h="view",y()):t.close()}),d.appendChild(g);var w=document.createElement("button");w.type="button",w.className="holi-object-details-btn",w.textContent=v?"Saving...":"Save",w.disabled=v,w.addEventListener("click",l(r().m(function n(){var i;return r().w(function(n){for(;;)switch(n.p=n.n){case 0:if(!v&&"function"==typeof e.onSave){n.n=1;break}return n.a(2);case 1:if(t.validateFields(b,m)){n.n=2;break}return n.a(2);case 2:return v=!0,y(),n.p=3,n.n=4,Promise.resolve(e.onSave(t.clone(p),h));case 4:(i=n.v)&&"object"===o(i)&&(p=t.clone(i)),h="view";case 5:return n.p=5,v=!1,y(),n.f(5);case 6:return n.a(2)}},n,null,[[3,,5,6]])}))),d.appendChild(w)}else f.forEach(function(e){var n=document.createElement("div");n.className="holi-object-details-row";var r=document.createElement("strong");r.textContent=e.label;var i=document.createElement("span");i.textContent=t.stringifyValue(p[e.name]),n.append(r,i),c.appendChild(n)})};this.keyHandler=function(e){"Escape"===e.key&&t.close()},document.addEventListener("keydown",this.keyHandler),document.body.appendChild(i),y()}},{key:"openLoading",value:function(){var t=this,e=u({title:"Details"},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});this.close();var n=this.createDialogScaffold(),r=n.fragment,i=(n.overlay,n.header),o=n.body,a=document.createElement("h2");a.textContent="Loading ".concat(e.title,"..."),i.appendChild(a);var l=document.createElement("div");l.className="holi-object-details-header-actions";var s=document.createElement("button");s.type="button",s.className="holi-object-details-btn holi-object-details-btn-secondary",s.textContent="Close",s.addEventListener("click",function(){return t.close()}),l.appendChild(s),i.appendChild(l);var c=document.getElementById("object-details-skeleton-template");if(c&&c.content)o.appendChild(c.content.cloneNode(!0));else{var d=document.createElement("div");d.className="dg-skeleton";for(var f=0;f<4;f+=1){var h=document.createElement("div");h.className=0===f?"sk-line sk-title":"sk-line",d.appendChild(h)}o.appendChild(d)}this.keyHandler=function(e){"Escape"===e.key&&t.close()},document.addEventListener("keydown",this.keyHandler),document.body.appendChild(r)}},{key:"close",value:function(){this.keyHandler&&(document.removeEventListener("keydown",this.keyHandler),this.keyHandler=null),this.overlay&&(this.overlay.remove(),this.overlay=null)}},{key:"createDialogScaffold",value:function(){var t=this,e=document.getElementById("object-details-template");if(!e||!e.content)throw new Error('Template "object-details-template" not found');var n=e.content.cloneNode(!0),r=n.querySelector(".dialog-overlay"),i=n.querySelector(".dialog-header"),o=n.querySelector(".dialog-body"),a=n.querySelector(".dialog-footer");if(!(r&&i&&o&&a))throw new Error("object-details-template has invalid structure");return this.overlay=r,this.overlay.classList.add("holi-object-details-overlay"),this.overlay.addEventListener("click",function(e){e.target===t.overlay&&t.close()}),{fragment:n,overlay:r,header:i,body:o,footer:a}}},{key:"normalizeMode",value:function(t){var e=String(t||"view").trim().toLowerCase();return"add"===e||"edit"===e||"view"===e?e:"view"}},{key:"normalizeFields",value:function(t,e,n){var r=this,i=new Set((n||[]).map(function(t){return String(t)})),o=new Map;return(t||[]).forEach(function(t){var n=String((null==t?void 0:t.name)||"").trim();n&&!o.has(n)&&o.set(n,r.normalizeField(t,null==e?void 0:e[n],i))}),Object.keys(e||{}).forEach(function(t){o.has(t)||o.set(t,r.normalizeField({name:t,label:t},null==e?void 0:e[t],i))}),Array.from(o.values())}},{key:"normalizeField",value:function(t,e,n){var r=null!=t&&t.constraints&&"object"===o(t.constraints)?t.constraints:{},i=this.resolveRequired(t,r),a=this.normalizeOptions((null==t?void 0:t.lov)||(null==t?void 0:t.options)||r.lov),l=(null==t?void 0:t.formFieldType)||(null==t?void 0:t.type)||r.type||this.inferType(e),s=this.normalizeFieldType(l,a);return{name:String((null==t?void 0:t.name)||""),label:String((null==t?void 0:t.label)||(null==t?void 0:t.name)||""),type:s,required:i,readonly:!(null==t||!t.readonly)||n.has(String((null==t?void 0:t.name)||"")),min:this.resolveConstraint(t,r,"min"),max:this.resolveConstraint(t,r,"max"),step:this.resolveConstraint(t,r,"step"),minLength:this.resolveConstraint(t,r,"minLength"),maxLength:this.resolveConstraint(t,r,"maxLength"),pattern:this.resolveConstraint(t,r,"pattern"),placeholder:String((null==t?void 0:t.placeholder)||r.placeholder||""),options:a}}},{key:"resolveRequired",value:function(t,e){return"boolean"==typeof(null==t?void 0:t.required)?t.required:"boolean"==typeof(null==e?void 0:e.required)?e.required:(!0===(null==t?void 0:t.optional)||null==e||e.optional,!1)}},{key:"resolveConstraint",value:function(t,e,n){return null!=(null==t?void 0:t[n])?t[n]:null!=(null==e?void 0:e[n])?e[n]:"min"===n&&Array.isArray(null==e?void 0:e.range)?e.range[0]:"max"===n&&Array.isArray(null==e?void 0:e.range)?e.range[1]:null}},{key:"normalizeFieldType",value:function(t,e){var n=String(t||"text").trim().toLowerCase();return!e.length||"select"!==n&&"lov"!==n&&"text"!==n?"textarea"===n?"textarea":"checkbox"===n||"boolean"===n?"boolean":"number"===n||"range"===n?"number":"date"===n||"datetime-local"===n||"time"===n||"email"===n||"url"===n?n:"text":"select"}},{key:"normalizeOptions",value:function(t){return Array.isArray(t)?t.map(function(t){return t&&"object"===o(t)?{value:null!=t.value?t.value:t.id,label:null!=t.label?t.label:t.value}:{value:t,label:t}}).filter(function(t){return null!=t.value}):[]}},{key:"inferType",value:function(t){return"boolean"==typeof t?"boolean":"number"==typeof t?"number":"text"}},{key:"createControl",value:function(t,e){if("select"===t.type){var n=document.createElement("select");if(!t.required){var r=document.createElement("option");r.value="",r.textContent="-- Select --",n.appendChild(r)}return t.options.forEach(function(t){var e=document.createElement("option");e.value=null==t.value?"":String(t.value),e.textContent=null==t.label?"":String(t.label),n.appendChild(e)}),n.value=null==e?"":String(e),this.applyControlConstraints(n,t),n}if("textarea"===t.type){var i=document.createElement("textarea");return i.value=null==e?"":String(e),this.applyControlConstraints(i,t),i}var o=document.createElement("input");return"boolean"===t.type?(o.type="checkbox",o.checked=!!e):(o.type="number"===t.type?"number":t.type,o.value=null==e?"":String(e)),this.applyControlConstraints(o,t),o}},{key:"applyControlConstraints",value:function(t,e){e.required&&(t.required=!0),e.placeholder&&"placeholder"in t&&(t.placeholder=e.placeholder),null!=e.min&&"min"in t&&(t.min=String(e.min)),null!=e.max&&"max"in t&&(t.max=String(e.max)),null!=e.step&&"step"in t&&(t.step=String(e.step)),null!=e.minLength&&"minLength"in t&&(t.minLength=Number(e.minLength)),null!=e.maxLength&&"maxLength"in t&&(t.maxLength=Number(e.maxLength)),e.pattern&&"pattern"in t&&"select"!==e.type&&(t.pattern=String(e.pattern))}},{key:"readControlValue",value:function(t,e){if("boolean"===e.type)return!!t.checked;if("number"===e.type){var n=String(t.value||"").trim();if(!n)return null;var r=Number(n);return Number.isNaN(r)?null:r}return t.value}},{key:"validateFields",value:function(t,e){var n=this,r=!0;return t.forEach(function(t){var e=t.field,i=t.control,o=t.errorEl;if(n.setFieldError(o,""),!e.readonly){var a=n.readControlValue(i,e);if(e.required&&(null==a||""===a||Array.isArray(a)&&0===a.length))return r=!1,void n.setFieldError(o,"".concat(e.label," is required."));i.checkValidity()||(r=!1,n.setFieldError(o,i.validationMessage||"Invalid value for ".concat(e.label,".")))}}),e&&(e.textContent=r?"":"Please fix validation errors before saving."),r}},{key:"setFieldError",value:function(t,e){t&&(t.textContent=String(e||""))}},{key:"stringifyValue",value:function(t){return null==t?"":"boolean"==typeof t?t?"true":"false":String(t)}},{key:"clone",value:function(t){return JSON.parse(JSON.stringify(null==t?{}:t))}}],e&&d(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}()},4907(t,e,n){"use strict";n.d(e,{P:()=>c});var r=n(4531);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){u=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,u(r.key),r)}}function s(t,e,n){return(e=u(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}var c=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"normalizeRelease",value:function(t){return String(t||"").trim().replace(/^v/i,"")}},{key:"normalizeBaseUrl",value:function(t){var e=String(t||"").trim();return e?e.endsWith("/")?e:"".concat(e,"/"):""}},{key:"resolveBaseUrl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.normalizeRelease(t.release);if(!e)return"";var n=encodeURIComponent(String(t.packageName||this.packageName).trim()||this.packageName).replace(/%2F/g,"/").replace(/%40/g,"@");return"unpkg"===String(t.provider||this.provider).trim().toLowerCase()?"https://unpkg.com/".concat(n,"@").concat(e,"/dist/"):"https://cdn.jsdelivr.net/npm/".concat(n,"@").concat(e,"/dist/")}},{key:"getReleaseConfig",value:function(t){if(!(t instanceof Element))return null;var e=String(t.getAttribute("release")||"").trim();return e?{release:e,packageName:t.getAttribute("release-package")||t.getAttribute("package")||this.packageName,provider:t.getAttribute("release-cdn")||t.getAttribute("cdn")||this.provider}:null}},{key:"registerBundleBase",value:function(t){var e,n,i=this.normalizeBaseUrl(t);return i&&"undefined"!=typeof document?(null===(e=document.documentElement)||void 0===e||null===(n=e.setAttribute)||void 0===n||n.call(e,"data-holi-bundle-base",i),r._.registerBundleBase(i),i):i}},{key:"ensureLink",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(t instanceof Element))return null;var n=String(e["data-holi-release-asset"]||"").trim(),r=String(e.href||"").trim(),i=(n?t.querySelector('link[data-holi-release-asset="'.concat(n,'"]')):null)||(r?document.querySelector('link[href="'.concat(r,'"]')):null)||("holi-css"===n?document.querySelector('link[rel="stylesheet"][href*="holi.css"]'):null)||("holi-components"===n?document.querySelector('link[rel="preload"][href*="components.html"]'):null)||("holi-layouts"===n?document.querySelector('link[rel="preload"][href*="layouts.html"]'):null),a=i instanceof HTMLLinkElement?i:document.createElement("link");return Object.entries(e).forEach(function(t){var e=o(t,2),n=e[0],r=e[1];null!=r&&""!==r&&a.setAttribute(n,String(r))}),i||t.appendChild(a),a}},{key:"ensureScript",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(t instanceof Element))return null;var n=String(e.src||"").trim();if(!n)return null;var r=document.querySelector('script[src="'.concat(n,'"]'))||document.querySelector('script[src*="holi.js"]')||t.querySelector('script[data-holi-release-asset="'.concat(e["data-holi-release-asset"]||"",'"]'));if(r instanceof HTMLScriptElement)return r;var i=document.createElement("script");return Object.entries(e).forEach(function(t){var e=o(t,2),n=e[0],r=e[1];null!=r&&""!==r&&i.setAttribute(n,String(r))}),t.appendChild(i),i}},{key:"injectAssetsForConfig",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("undefined"==typeof document)return null;var e=this.resolveBaseUrl(t);if(!e)return null;var n=this.registerBundleBase(e),r=document.head,i=document.body;return r instanceof HTMLHeadElement&&i instanceof HTMLBodyElement?(this.ensureLink(r,{rel:"stylesheet",href:"".concat(n,"holi.css"),"data-holi-release-asset":"holi-css"}),this.ensureLink(r,{rel:"preload",as:"fetch",href:"".concat(n,"components.html"),crossorigin:"anonymous","data-holi-release-asset":"holi-components"}),this.ensureLink(r,{rel:"preload",as:"fetch",href:"".concat(n,"layouts.html"),crossorigin:"anonymous","data-holi-release-asset":"holi-layouts"}),this.ensureScript(i,{src:"".concat(n,"holi.js"),defer:"defer","data-holi-release-asset":"holi-js"}),{baseUrl:n}):{baseUrl:n}}},{key:"applyFromElement",value:function(t){var e=this.getReleaseConfig(t);return e?this.injectAssetsForConfig(e):null}},{key:"prepareDocument",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;if("undefined"==typeof document)return null;var n=e===document?document:e,r=(null===(t=n.querySelector)||void 0===t?void 0:t.call(n,this.pageSelector))||(n instanceof Element&&n.matches(this.pageSelector)?n:null);return r?this.applyFromElement(r):null}}],null&&l(t.prototype,null),e&&l(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();s(c,"pageSelector",'page[release], [component="page"][release], [role="page"][release]'),s(c,"packageName","@saasira/holi"),s(c,"provider","jsdelivr"),"undefined"!=typeof window&&(window.ReleaseAssetRegistry=c)},7458(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,c(r.key),r)}}function s(t,e,n){return e&&l(t.prototype,e),n&&l(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(t,e,n){return(e=c(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}n.d(e,{T:()=>d});var d=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,t),this.state=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach(function(e){u(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},e),this.listeners=new Set,this.id=n.id||"hub_".concat(t.nextId++),this.proxyCache=new WeakMap,this.proxy=this.createProxy(this.state,[]),t.stores.set(this.id,this)}return s(t,[{key:"createProxy",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(null==t||"object"!==i(t))return t;if(this.proxyCache.has(t))return this.proxyCache.get(t);var n=this,r=new Proxy(t,{get:function(t,r){var o=t[r];return null!=o&&"object"===i(o)?n.createProxy(o,e.concat(String(r))):o},set:function(t,r,i){var o=t[r];t[r]=i;var a=e.concat(String(r)).join(".");return n.notify(a,i,o),!0},deleteProperty:function(t,r){if(!(r in t))return!0;var i=t[r];delete t[r];var o=e.concat(String(r)).join(".");return n.notify(o,void 0,i),!0}});return this.proxyCache.set(t,r),r}},{key:"subscribe",value:function(t){var e=this,n={callback:t,selector:arguments.length>1&&void 0!==arguments[1]?arguments[1]:null};return this.listeners.add(n),function(){return e.listeners.delete(n)}}},{key:"notify",value:function(t,e,n){var r=this;this.listeners.forEach(function(i){var o=i.callback,a=i.selector;a&&!a(r.proxy,{path:t,value:e,oldValue:n})||o(r.proxy,{path:t,value:e,oldValue:n})})}},{key:"batch",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.entries(n).forEach(function(n){var i,o,a=(o=2,function(t){if(Array.isArray(t))return t}(i=n)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){u=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(i,o)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}(i,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=a[0],s=a[1];t.setByPath(e.proxy,l,s)})}},{key:"getSnapshot",value:function(){return JSON.parse(JSON.stringify(this.state))}}],[{key:"create",value:function(){return new t(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}},{key:"get",value:function(t){return this.stores.get(t)||null}},{key:"ensure",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.defaultStoreId,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.get(t)||this.create(e,{id:t})}},{key:"destroy",value:function(t){var e=this.get(t);return!!e&&(e.listeners.clear(),this.stores.delete(t),!0)}},{key:"parsePath",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t&&"string"==typeof t?t.replace(/\[(\w+)\]/g,".$1").split(".").map(function(t){return t.trim()}).filter(Boolean):[]}},{key:"getByPath",value:function(t,e){return(Array.isArray(e)?e:this.parsePath(e)).reduce(function(t,e){return null==t?void 0:t[e]},t)}},{key:"setByPath",value:function(t,e,n){var r=Array.isArray(e)?e:this.parsePath(e);if(!r.length)return!1;for(var o=t,a=0;a<r.length-1;a+=1){var l=r[a];null!=o[l]&&"object"===i(o[l])||(o[l]={}),o=o[l]}return o[r[r.length-1]]=n,!0}},{key:"publish",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.defaultStoreId;if(!t||"string"!=typeof t)return!1;var r=this.ensure(n);return this.setByPath(r.proxy,t,e)}}])}();u(d,"stores",new Map),u(d,"nextId",1),u(d,"defaultStoreId","global");var f=function(){return s(function t(){a(this,t)},null,[{key:"isInput",value:function(t){return"INPUT"===t.tagName||"TEXTAREA"===t.tagName||"SELECT"===t.tagName}},{key:"readBoundValue",value:function(t,e){return e?d.getByPath(t.proxy,e):t.proxy}},{key:"writeBoundValue",value:function(t,e,n){e&&d.setByPath(t.proxy,e,n)}},{key:"renderElement",value:function(t,e){if(this.isInput(t)){var n=null==e?"":String(e);t.value!==n&&(t.value=n)}else t.textContent=null==e?"":String(e)}},{key:"disconnectElement",value:function(t){var e,n=this.bindings.get(t);n&&(t.removeEventListener("input",n.onInput),null===(e=n.unsubscribe)||void 0===e||e.call(n),this.bindings.delete(t))}},{key:"connectElement",value:function(t){var e=this;this.disconnectElement(t);var n=t.dataset.state,r=t.dataset.statePath||"",i=d.get(n);if(i){var o=function(){return e.renderElement(t,e.readBoundValue(i,r))},a=function(){return e.writeBoundValue(i,r,t.value)},l=i.subscribe(function(t,e){(!r||e.path===r||e.path.startsWith("".concat(r,"."))||r.startsWith("".concat(e.path,".")))&&o()});this.isInput(t)&&t.addEventListener("input",a),this.bindings.set(t,{onInput:a,unsubscribe:l}),o()}}},{key:"connect",value:function(){var t=this;(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).querySelectorAll("[data-state]").forEach(function(e){return t.connectElement(e)})}},{key:"disconnect",value:function(){var t=this;(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).querySelectorAll("[data-state]").forEach(function(e){return t.disconnectElement(e)})}}])}();u(f,"bindings",new WeakMap),d.subscribe=function(t,e,n){if("function"==typeof t){var r="string"==typeof e?e:d.defaultStoreId;return d.ensure(r).subscribe(t)}var i=String(t||"").trim(),o=e,a="string"==typeof n?n:d.defaultStoreId;if(!i||"function"!=typeof o)return function(){};var l=d.ensure(a),s=d.getByPath(l.proxy,i);return o(s,{path:i,initial:!0}),l.subscribe(function(t,e){var n=(null==e?void 0:e.path)||"";if(n===i||n.startsWith("".concat(i,"."))||i.startsWith("".concat(n,"."))){var r=d.getByPath(t,i);o(r,e)}})},"undefined"!=typeof window&&(window.StateHub=d,window.StateConnector=f)},4531(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function l(n,r,i,a){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return o(c,"_invoke",function(n,r,i){var o,a,l,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,a=0,l=t,f.n=n,s}};function h(n,r){for(a=n,l=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),a=c,l=p;(e=a<2?t:l)||!d;){o||(a?a<3?(a>1&&(f.n=-1),h(a,l)):f.n=l:f.v=l);try{if(u=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?l:n.call(r,f))!==s)break}catch(e){o=t,a=1,l=e}finally{u=1}}return{value:e,done:d}}}(n,i,a),!0),c}var s={};function u(){}function c(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(o(e={},r,function(){return this}),e),h=d.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,o(t,a,"GeneratorFunction")),t.prototype=Object.create(h),t}return c.prototype=d,o(h,"constructor",d),o(d,"constructor",c),c.displayName="GeneratorFunction",o(d,a,"GeneratorFunction"),o(h),o(h,a,"Generator"),o(h,r,function(){return this}),o(h,"toString",function(){return"[object Generator]"}),(i=function(){return{w:l,m:p}})()}function o(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}o=function(t,e,n,r){function a(e,n){o(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},o(t,e,n,r)}function a(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function l(t){a(o,r,i,l,s,"next",t)}function s(t){a(o,r,i,l,s,"throw",t)}l(void 0)})}}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,c(r.key),r)}}function u(t,e,n){return(e=c(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.d(e,{_:()=>d});var d=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"getCurrentScriptBase",value:function(){var t=document.currentScript,e=(null==t?void 0:t.getAttribute("src"))||"";return e?e.replace(/holi\.js(\?.*)?$/i,""):""}},{key:"resolveCoreUrls",value:function(){var t=this.getCurrentScriptBase(),e=new Set;return this.getBundleBases().forEach(function(t){e.add("".concat(t,"components.html")),e.add("".concat(t,"templates.html")),e.add("".concat(t,"holi.html"))}),e.add("/dist/components.html"),e.add("/components.html"),e.add("/dist/templates.html"),e.add("/templates.html"),e.add("/dist/holi.html"),e.add("/holi.html"),t&&(e.add("".concat(t,"components.html")),e.add("".concat(t,"templates.html")),e.add("".concat(t,"holi.html"))),Array.from(e)}},{key:"resolveLayoutUrls",value:function(){var t=this.getCurrentScriptBase(),e=new Set;return this.getBundleBases().forEach(function(t){e.add("".concat(t,"layouts.html"))}),e.add("/dist/layouts.html"),e.add("/layouts.html"),t&&e.add("".concat(t,"layouts.html")),Array.from(e)}},{key:"registerBundleBase",value:function(t){var e=String(t||"").trim();if(e){var n=e.endsWith("/")?e:"".concat(e,"/");this.bundleBases.add(n)}}},{key:"getBundleBases",value:function(){if("undefined"!=typeof document){var t,e,n=String((null===(t=document.documentElement)||void 0===t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"data-holi-bundle-base"))||"").trim();n&&this.registerBundleBase(n)}return Array.from(this.bundleBases)}},{key:"hasTemplate",value:function(t){return this.templates.has(t)||!!document.getElementById(t)}},{key:"getTemplate",value:function(t){var e=this.templates.get(t);if(e instanceof HTMLTemplateElement)return e;var n=document.getElementById(t);return n instanceof HTMLTemplateElement?n:null}},{key:"getLayout",value:function(t){var e=this.layouts.get(t);if(e instanceof HTMLTemplateElement)return e.content.cloneNode(!0);var n=document.querySelector('template[data-layout="'.concat(t,'"]'))||document.getElementById("page-layout-".concat(t))||document.getElementById(t);return n instanceof HTMLTemplateElement?n.content.cloneNode(!0):null}},{key:"registerTemplate",value:function(t){t instanceof HTMLTemplateElement&&t.id&&this.templates.set(t.id,t.cloneNode(!0))}},{key:"registerLayout",value:function(t){var e=this;if(t instanceof HTMLTemplateElement){var n=[],r=String(t.getAttribute("data-layout")||"").trim();r&&n.push(r);var i=String(t.id||"").trim().match(/^page-layout-(.+)$/);i&&i[1]&&n.push(i[1]),n.forEach(function(n){e.layouts.has(n)||e.layouts.set(n,t.cloneNode(!0))})}}},{key:"ingestHtml",value:function(t){var e=this,n=(new DOMParser).parseFromString(String(t||""),"text/html");Array.from(n.querySelectorAll("template[id], template[data-layout]")).forEach(function(t){t instanceof HTMLTemplateElement&&(e.registerTemplate(t),e.registerLayout(t))})}},{key:"loadBundle",value:(a=l(i().m(function t(e){var n,r,o,a=this,s=arguments;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:if(n=s.length>1&&void 0!==s[1]?s[1]:e,!this.loading.has(n)){t.n=1;break}return t.a(2,this.loading.get(n));case 1:return r=l(i().m(function t(){var n,r;return i().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,fetch(e,{credentials:"same-origin"});case 1:if((n=t.v).ok){t.n=2;break}throw new Error("Failed to load template bundle from ".concat(e));case 2:return t.n=3,n.text();case 3:r=t.v,a.ingestHtml(r);case 4:return t.a(2)}},t)}))(),this.loading.set(n,r),t.p=2,t.n=3,r;case 3:t.n=5;break;case 4:throw t.p=4,o=t.v,this.loading.delete(n),o;case 5:return t.a(2)}},t,this,[[2,4]])})),function(t){return a.apply(this,arguments)})},{key:"loadFirstAvailable",value:(o=l(i().m(function t(e,n){var r,o;return i().w(function(t){for(;;)switch(t.p=t.n){case 0:r=0;case 1:if(!(r<e.length)){t.n=7;break}return o=e[r],t.p=2,t.n=3,this.loadBundle(o,o);case 3:if(n&&!n()){t.n=4;break}return t.a(2);case 4:t.n=6;break;case 5:t.p=5,t.v;case 6:r+=1,t.n=1;break;case 7:return t.a(2)}},t,this,[[2,5]])})),function(t,e){return o.apply(this,arguments)})},{key:"ensureCoreTemplates",value:(r=l(i().m(function t(){var e=this;return i().w(function(t){for(;;)switch(t.n){case 0:if(!this.hasTemplate("tabs")){t.n=1;break}return t.a(2);case 1:return t.n=2,this.loadFirstAvailable(this.resolveCoreUrls(),function(){return e.hasTemplate("tabs")});case 2:if(this.hasTemplate("tabs")){t.n=3;break}throw new Error("Holi template library not found (components.html)");case 3:return t.a(2)}},t,this)})),function(){return r.apply(this,arguments)})},{key:"ensureLayoutTemplates",value:(n=l(i().m(function t(){var e=this;return i().w(function(t){for(;;)switch(t.n){case 0:if(!(this.layouts.size>0)){t.n=1;break}return t.a(2);case 1:return t.n=2,this.loadFirstAvailable(this.resolveLayoutUrls(),function(){return e.layouts.size>0});case 2:return t.a(2)}},t,this)})),function(){return n.apply(this,arguments)})}],e&&s(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r,o,a}();u(d,"templates",new Map),u(d,"layouts",new Map),u(d,"loading",new Map),u(d,"bundleBases",new Set),"undefined"!=typeof window&&(window.HoliTemplateRegistry=d)},7322(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach(function(e){s(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,u(r.key),r)}}function s(t,e,n){return(e=u(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}n.d(e,{D:()=>c});var c=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"normalizeTheme",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=String(t.name||t.value||"").trim();return e?{name:e,label:String(t.label||t.title||e).trim()||e,palette:String(t.palette||e).trim()||e,href:String(t.href||t.cssHref||t.stylesheet||"").trim(),selector:String(t.selector||"").trim(),loadCss:!1!==t.loadCss}:null}},{key:"ensureDefaultTheme",value:function(){var t=String(this.defaultThemeName||"default").trim()||"default";return this.themes.has(t)||this.themes.set(t,{name:t,label:"default"===t?"Default":t,palette:t,href:"",selector:"",loadCss:!1}),this.themes.get(t)}},{key:"registerTheme",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.normalizeTheme(t);if(!n)return null;var r=a(a({},this.themes.get(n.name)||{}),n);return this.themes.set(r.name,r),!0===e.defaultTheme||!0===t.default?this.setDefaultTheme(r.name):this.ensureDefaultTheme(),r}},{key:"registerThemes",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n.defaultTheme?this.setDefaultTheme(n.defaultTheme):this.ensureDefaultTheme(),(Array.isArray(e)?e:[e]).map(function(e){return t.registerTheme(e)}).filter(Boolean)}},{key:"setDefaultTheme",value:function(t){var e=String(t||"").trim();return e?(this.defaultThemeName=e,this.registerTheme({name:e,label:"default"===e?"Default":e,palette:e,loadCss:!1})):this.getDefaultTheme()}},{key:"getDefaultTheme",value:function(){return this.ensureDefaultTheme()}},{key:"getTheme",value:function(t){this.ensureDefaultTheme();var e=String(t||"").trim();return e&&this.themes.get(e)||null}},{key:"getThemes",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.ensureDefaultTheme();var n=Array.from(this.themes.values()),r=Array.isArray(e.names)?e.names.filter(Boolean):null;return r&&0!==r.length?r.map(function(e){return t.getTheme(e)}).filter(Boolean):n}},{key:"parseDeclarationNode",value:function(t){var e=String((null==t?void 0:t.textContent)||"").trim();if(!e)return null;try{return JSON.parse(e)}catch(e){return console.warn("Invalid Holi theme declaration.",e,t),null}}},{key:"applyDeclaration",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Array.isArray(t))this.registerThemes(t);else if(t&&"object"===i(t)){t.defaultTheme?this.setDefaultTheme(t.defaultTheme):this.ensureDefaultTheme(),Array.isArray(t.themes)&&this.registerThemes(t.themes);var e=String(t.activeTheme||t.theme||"").trim();e&&!this.readBodyTheme()&&this.applyTheme(e,{dispatch:!1,loadCSS:!0})}}},{key:"discover",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;if("undefined"==typeof document)return this.getThemes();var n=[],i=e===document?document:e;return i instanceof Element&&i.matches(this.declarationSelector)&&n.push(i),"function"==typeof i.querySelectorAll&&n.push.apply(n,function(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(i.querySelectorAll(this.declarationSelector))),n.forEach(function(e){if(!t.discoveredNodes.has(e)){t.discoveredNodes.add(e);var n=t.parseDeclarationNode(e);t.applyDeclaration(n)}}),this.ensureDefaultTheme(),this.getThemes()}},{key:"readBodyTheme",value:function(){var t,e;return String((null===(t=document.body)||void 0===t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"theme"))||"").trim()}},{key:"getActiveTheme",value:function(){var t="undefined"!=typeof document?this.readBodyTheme():"";return t?(this.activeThemeName=t,this.getTheme(t)||this.registerTheme({name:t})):this.activeThemeName?this.getTheme(this.activeThemeName)||this.registerTheme({name:this.activeThemeName}):this.getDefaultTheme()}},{key:"syncThemeAttributes",value:function(t){var e,n;if("undefined"!=typeof document){var r=document.body;r instanceof HTMLBodyElement&&r.setAttribute("theme",t.name),null===(e=document.documentElement)||void 0===e||null===(n=e.setAttribute)||void 0===n||n.call(e,"theme-palette",t.palette||t.name)}}},{key:"ensureThemeStylesheet",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("undefined"==typeof document)return Promise.resolve(null);var n=String(e.href||(null==t?void 0:t.href)||"").trim(),r=document.querySelector("link[".concat(this.themeLinkAttr,'="true"]'));if(!n)return e.removeWhenMissing&&r&&r.remove(),Promise.resolve(r||null);if(r&&r.getAttribute("href")===n)return r.setAttribute("data-theme",t.name),Promise.resolve(r);var i=document.createElement("link");return i.rel="stylesheet",i.href=n,i.setAttribute(this.themeLinkAttr,"true"),i.setAttribute("data-theme",t.name),new Promise(function(t,e){i.addEventListener("load",function(){r&&r.remove(),t(i)},{once:!0}),i.addEventListener("error",function(){i.remove(),e(new Error("Failed to load theme CSS: ".concat(n)))},{once:!0}),document.head.appendChild(i)})}},{key:"dispatchThemeChange",value:function(t){var e,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!1!==r.dispatch&&"undefined"!=typeof document){var i={theme:t.name,palette:t.palette||t.name,definition:a({},t),source:r.source||null};null===(e=document.body)||void 0===e||null===(n=e.dispatchEvent)||void 0===n||n.call(e,new CustomEvent("themechange",{detail:i})),document.dispatchEvent(new CustomEvent("themechange",{detail:i})),document.dispatchEvent(new CustomEvent("theme-palette-change",{detail:i}))}}},{key:"applyTheme",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=String(t||"").trim();if(!n)return null;var r=this.getTheme(n)||this.registerTheme({name:n});if(!r)return null;this.activeThemeName=r.name,this.syncThemeAttributes(r);var i=!1!==e.loadCSS&&!1!==r.loadCss?this.ensureThemeStylesheet(r,{href:e.href,removeWhenMissing:e.removeWhenMissing}).catch(function(t){return console.warn(t),null}):Promise.resolve(null);return this.dispatchThemeChange(r,e),a(a({},r),{},{stylesheetPromise:i})}},{key:"ensureActiveTheme",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;this.discover(t);var e="undefined"!=typeof document?this.readBodyTheme():"";if(e){var n=this.getTheme(e)||this.registerTheme({name:e});return this.activeThemeName=(null==n?void 0:n.name)||e,this.syncThemeAttributes(n||{name:e,palette:e}),n}return this.applyTheme(this.getDefaultTheme().name,{dispatch:!1,loadCSS:!1})}}],null&&l(t.prototype,null),e&&l(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();s(c,"declarationSelector",'script[type="application/json"][data-holi-themes], template[data-holi-themes]'),s(c,"themeLinkAttr","data-holi-theme-link"),s(c,"defaultThemeName","default"),s(c,"themes",new Map),s(c,"discoveredNodes",new WeakSet),s(c,"activeThemeName",""),"undefined"!=typeof window&&(window.ThemeRegistry=c)},3573(t,e,n){"use strict";function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach(function(e){l(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,s(r.key),r)}}function l(t,e,n){return(e=s(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}n.d(e,{D:()=>u});var u=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"normalizeName",value:function(t){var e=String(t||"").trim().toLowerCase();return e?this.aliases.get(e)||e:""}},{key:"parseToken",value:function(t){var e=String(t||"").trim();if(!e)return{name:"",param:""};var n=e.indexOf(":");return-1===n?{name:this.normalizeName(e),param:""}:{name:this.normalizeName(e.slice(0,n)),param:e.slice(n+1).trim()}}},{key:"parseList",value:function(t){return t?Array.isArray(t)?t.map(function(t){return String(t||"").trim()}).filter(Boolean):String(t).split(/[,\s]+/g).map(function(t){return t.trim()}).filter(Boolean):[]}},{key:"resolveListFromElement",value:function(t){if(!t||!t.getAttribute)return[];var e=t.getAttribute("data-validator"),n=t.getAttribute("data-validators");return this.parseList(e||n||"")}},{key:"register",value:function(t,e){var n=this.normalizeName(t);if(!n)throw new Error("Validator name is required");if("function"!=typeof e)throw new Error("Validator must be a function");try{var r=e("test",void 0,{});if(!("boolean"==typeof r||r&&"object"===o(r)&&"boolean"==typeof r.valid))throw new Error("Validator must return boolean or { valid, message }")}catch(t){throw new Error('Invalid validator "'.concat(n,'": ').concat(t.message||t))}this.customValidators.set(n,e)}},{key:"unregister",value:function(t){var e=this.normalizeName(t);return!!e&&this.customValidators.delete(e)}},{key:"validateToken",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.parseToken(t),i=r.name,a=r.param;if(!i)return{valid:!0,message:"",token:""};var l=this.customValidators.get(i)||this.builtInValidators.get(i);if(!l)return{valid:!0,message:"",token:i};var s=this.buildValidationContext(n),u=this.resolveParam(a,s);try{var c=l(e,u,s);return"boolean"==typeof c?{valid:c,message:c?"":"Invalid value.",token:i}:c&&"object"===o(c)&&"boolean"==typeof c.valid?{valid:c.valid,message:c.valid?"":String(c.message||"Invalid value."),token:i}:{valid:!1,message:'Validator "'.concat(i,'" returned invalid result.'),token:i}}catch(t){return{valid:!1,message:'Validator "'.concat(i,'" failed.'),token:i}}}},{key:"validateValue",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.parseList(e),i=0;i<r.length;i+=1){var o=this.validateToken(r[i],t,n);if(!o.valid)return o}return{valid:!0,message:"",token:""}}},{key:"validateElement",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t||void 0===t.value)return{valid:!0,message:"",token:""};var n=this.resolveListFromElement(t),r=this.validateValue(t.value,n,i({element:t},e));return"function"==typeof t.setCustomValidity&&t.setCustomValidity(r.valid?"":r.message),t.setAttribute("aria-invalid",r.valid?"false":"true"),r.valid?t.removeAttribute("data-validation-error"):t.setAttribute("data-validation-error",r.message||"Invalid value."),r}},{key:"bindNative",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;e&&e.querySelectorAll&&e.querySelectorAll("[data-validator], [data-validators]").forEach(function(e){if(e instanceof HTMLElement&&!t.boundElements.has(e)){var n=function(){return t.validateElement(e)};e.addEventListener("input",n),e.addEventListener("change",n),e.addEventListener("blur",n),t.boundElements.add(e),n()}})}},{key:"enableAutoBind",value:function(){var t=this;if(!this.nativeValidationBound&&"undefined"!=typeof document){this.nativeValidationBound=!0;var e=function(){return t.bindNative(document)};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e,{once:!0}):e()}}},{key:"buildValidationContext",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=i(i({},"undefined"!=typeof window&&window.appState||{}),"undefined"!=typeof window&&window.pageContext||{}),r=e.element,o="undefined"!=typeof document?document:null,a=(null==r||null===(t=r.closest)||void 0===t?void 0:t.call(r,"form"))||o,l=this.readModelState(a);return i(i(i({},n),l),{},{model:l},e)}},{key:"readModelState",value:function(t){var e=this,n={};return t&&t.querySelectorAll?(t.querySelectorAll("[data-model]").forEach(function(t){var r=String(t.getAttribute("data-model")||"").trim();r&&e.setPathValue(n,r,t.value)}),n):n}},{key:"setPathValue",value:function(t,e,n){var r=String(e||"").replace(/\[(\w+)\]/g,".$1").split(".").filter(Boolean);if(r.length){for(var i=t,a=0;a<r.length-1;a+=1){var l=r[a];null!=i[l]&&"object"===o(i[l])||(i[l]={}),i=i[l]}i[r[r.length-1]]=n}}},{key:"getPathValue",value:function(t,e){if(t&&e){var n=String(e).replace(/\[(\w+)\]/g,".$1");if(/^[a-zA-Z_$][\w$]*(\.[a-zA-Z_$][\w$]*|\.\d+)*$/.test(n))return n.split(".").reduce(function(t,e){return null==t?void 0:t[e]},t)}}},{key:"resolveParam",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=String(t||"").trim();if(!n)return n;var r=n.match(/^@\{(.+)\}$/);if(r){var i=r[1].trim();try{var o="undefined"!=typeof window&&window.ELEngine||("undefined"!=typeof ELEngine?ELEngine:null);if(o)return new o(e).evaluate(i)}catch(t){}return this.getPathValue(e,i)}if(/^(true|false)$/i.test(n))return"true"===n.toLowerCase();if(/^-?\d+(\.\d+)?$/.test(n))return Number(n);if(n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))return n.slice(1,-1);if(/^[a-zA-Z_$][\w$]*(\.[a-zA-Z_$][\w$]*|\[\w+\])*$/.test(n)){var a=this.getPathValue(e,n);if(void 0!==a)return a}return n}}],null&&a(t.prototype,null),e&&a(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();l(u,"customValidators",new Map),l(u,"nativeValidationBound",!1),l(u,"boundElements",new WeakSet),l(u,"builtInValidators",new Map([["required",function(t){var e=(null==t?"":String(t)).trim().length>0;return{valid:e,message:e?"":"This field is required."}}],["email",function(t){var e=null==t?"":String(t).trim(),n=!e||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);return{valid:n,message:n?"":"Enter a valid email address."}}],["eq",function(t,e){var n=(null==t?"":String(t))===(null==e?"":String(e));return{valid:n,message:n?"":"Values do not match."}}],["minlength",function(t,e){var n=null==t?"":String(t),r=Number(e);if(!Number.isFinite(r))return{valid:!0,message:""};var i=n.length>=r;return{valid:i,message:i?"":"Minimum length is ".concat(r,".")}}],["maxlength",function(t,e){var n=null==t?"":String(t),r=Number(e);if(!Number.isFinite(r))return{valid:!0,message:""};var i=n.length<=r;return{valid:i,message:i?"":"Maximum length is ".concat(r,".")}}],["pattern",function(t,e){var n=null==t?"":String(t),r=String(e||"").trim();if(!r)return{valid:!0,message:""};try{var i=new RegExp(r).test(n);return{valid:i,message:i?"":"Value does not match expected pattern."}}catch(t){return{valid:!0,message:""}}}]])),l(u,"aliases",new Map([["required","required"],["email","email"],["eq","eq"],["equals","eq"],["pattern","pattern"],["minlength","minlength"],["min-length","minlength"],["min_length","minlength"],["maxlength","maxlength"],["max-length","maxlength"],["max_length","maxlength"]])),"undefined"!=typeof window&&(window.Validator=u)},3194(t,e,n){var r={"./accordion.js":6892,"./backtotop.js":2951,"./block.js":935,"./breadcrumbs.js":6400,"./button.js":9092,"./calendar.js":2110,"./carousel.js":4838,"./chart.js":4546,"./checkbox.js":9673,"./component.js":8812,"./datagrid.js":5040,"./datatable.js":2994,"./dialog.js":2704,"./drawer.js":145,"./dropdown.js":1257,"./form.js":8734,"./gallery.js":1120,"./include.js":2174,"./input.js":3390,"./layout.js":166,"./loader.js":2819,"./localeswitcher.js":4833,"./menubar.js":622,"./offline.js":6641,"./page.js":4582,"./panel.js":5892,"./progress.js":4295,"./radio.js":6101,"./rating.js":3953,"./refresh.js":1285,"./region.js":5108,"./search.js":7012,"./select.js":8796,"./statscard.js":3911,"./tabs.js":9396,"./textarea.js":6618,"./themeswitcher.js":8736,"./toast.js":5009,"./tree.js":1648,"./treepanel.js":6712,"./wizard.js":4191};function i(t){var e=o(t);return n(e)}function o(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}i.keys=function(){return Object.keys(r)},i.resolve=o,t.exports=i,i.id=3194}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{"use strict";var t=n(1904),e=n(9396),r=n(2994),i=n(5040),o=n(1257),a=n(8796),l=n(3390),s=n(9673),u=n(8734),c=n(6101),d=n(3953),f=n(9092),h=n(166),p=n(2819),v=n(2174),y=n(6641),m=n(1285),b=n(4582),g=n(935),w=n(5892),S=n(5108),k=n(6892),E=n(2110),O=n(4838),C=n(6400),A=n(2951),j=n(4546),P=n(2704),T=n(5009),x=n(145),L=n(1120),I=n(622),D=n(1648),N=n(6712),R=n(7012),M=n(4833),q=n(8736),_=n(4191),F=n(3911);function B(t){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},B(t)}function H(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return G(u,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),u}var a={};function l(){}function s(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(G(e={},r,function(){return this}),e),d=u.prototype=l.prototype=Object.create(c);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,G(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=u,G(d,"constructor",u),G(u,"constructor",s),s.displayName="GeneratorFunction",G(u,i,"GeneratorFunction"),G(d),G(d,i,"Generator"),G(d,r,function(){return this}),G(d,"toString",function(){return"[object Generator]"}),(H=function(){return{w:o,m:f}})()}function G(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}G=function(t,e,n,r){function o(e,n){G(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},G(t,e,n,r)}function V(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function z(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){V(o,r,i,a,l,"next",t)}function l(t){V(o,r,i,a,l,"throw",t)}a(void 0)})}}function U(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function W(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?U(Object(n),!0).forEach(function(e){K(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):U(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Q(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,$(r.key),r)}}function K(t,e,n){return(e=$(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $(t){var e=function(t){if("object"!=B(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=B(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==B(e)?e:e+""}var J=new Set(["fetch","push","sync","periodicsync"]),Z=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.cacheName=e.cacheName||"html-first-lib-v3-2026",this.offlineFallbackUrl=e.offlineFallbackUrl||"/offline.html",this.remoteHandlers=new Map,this.runtimeHandlers=new Map,this.requestQueue=[],this.responseQueue=[],this.networkProfile=this.readNetworkProfile(e.networkProfile),this.registration=null,this.started=!1,this.clientMessagingStarted=!1,this.handleMessageEvent=this.handleMessageEvent.bind(this),this.handleFetchEvent=this.handleFetchEvent.bind(this),this.handlePushEvent=this.handlePushEvent.bind(this),this.handleSyncEvent=this.handleSyncEvent.bind(this),this.handlePeriodicSyncEvent=this.handlePeriodicSyncEvent.bind(this),this.handleClientMessage=this.handleClientMessage.bind(this),this.handleConnectionChange=this.handleConnectionChange.bind(this)}return e=t,n=[{key:"isWorker",value:function(){return t.isServiceWorkerScope()}},{key:"isClient",value:function(){return t.isWindowScope()}},{key:"start",value:function(){return!this.isWorker()||this.started||(self.addEventListener("message",this.handleMessageEvent),self.addEventListener("fetch",this.handleFetchEvent),self.addEventListener("push",this.handlePushEvent),self.addEventListener("sync",this.handleSyncEvent),self.addEventListener("periodicsync",this.handlePeriodicSyncEvent),this.started=!0),this}},{key:"startClientMessaging",value:function(){return this.isClient()&&!this.clientMessagingStarted&&"serviceWorker"in navigator?(navigator.serviceWorker.addEventListener("message",this.handleClientMessage),this.observeNetworkQuality(),this.clientMessagingStarted=!0,this):this}},{key:"on",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=String(t||"").toLowerCase();if(!J.has(i))throw new Error("Unsupported service-worker event type: ".concat(i));if("function"!=typeof n)throw new Error("Service worker runtime handler must be a function");var o=this.normalizeHandler({name:e,type:i,capabilities:r.capabilities||[],handler:W(W({},r),{},{runtimeHandler:n})});return this.runtimeHandlers.set(this.toKey(o.type,o.name),o),this}},{key:"off",value:function(t,e){var n=this.toKey(t,e);return this.runtimeHandlers.delete(n),this.remoteHandlers.delete(n),this}},{key:"registerHandlers",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!this.isClient())return Promise.resolve(!1);this.startClientMessaging();var n=(Array.isArray(e)?e:[e]).map(function(e){return t.normalizeHandler(e)}).filter(Boolean);return n.length?this.postToServiceWorker({type:"REGISTER_SW_HANDLERS",handlers:n}):Promise.resolve(!1)}},{key:"unregisterHandler",value:function(t,e){return this.isClient()?this.postToServiceWorker({type:"UNREGISTER_SW_HANDLER",eventType:String(t||"").toLowerCase(),name:String(e||"")}):Promise.resolve(!1)}},{key:"clearHandlers",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return this.isClient()?this.postToServiceWorker({type:"CLEAR_SW_HANDLERS",eventType:t?String(t).toLowerCase():null}):Promise.resolve(!1)}},{key:"registerWorker",value:(k=z(H().m(function t(){var e,n,r=arguments;return H().w(function(t){for(;;)switch(t.n){case 0:if(e=r.length>0&&void 0!==r[0]?r[0]:"/sw.js",n=r.length>1&&void 0!==r[1]?r[1]:{},this.isClient()&&"serviceWorker"in navigator){t.n=1;break}return t.a(2,null);case 1:return t.n=2,navigator.serviceWorker.register(e,n);case 2:return this.registration=t.v,this.startClientMessaging(),this.sendNetworkProfile(),t.a(2,this.registration)}},t,this)})),function(){return k.apply(this,arguments)})},{key:"ready",value:(S=z(H().m(function t(){return H().w(function(t){for(;;)switch(t.n){case 0:if(this.isClient()&&"serviceWorker"in navigator){t.n=1;break}return t.a(2,null);case 1:return t.a(2,navigator.serviceWorker.ready)}},t,this)})),function(){return S.apply(this,arguments)})},{key:"postToServiceWorker",value:(w=z(H().m(function t(e){var n,r,i;return H().w(function(t){for(;;)switch(t.n){case 0:if(i=this.registration){t.n=2;break}return t.n=1,this.ready();case 1:i=t.v;case 2:if(n=i){t.n=3;break}return t.a(2,!1);case 3:if(r=navigator.serviceWorker.controller||n.active||n.waiting||n.installing){t.n=4;break}return t.a(2,!1);case 4:return r.postMessage(e),t.a(2,!0)}},t,this)})),function(t){return w.apply(this,arguments)})},{key:"registerPeriodicSync",value:(g=z(H().m(function t(e){var n,r,i,o,a=arguments;return H().w(function(t){for(;;)switch(t.n){case 0:if(r=a.length>1&&void 0!==a[1]?a[1]:{},o=this.registration){t.n=2;break}return t.n=1,this.ready();case 1:o=t.v;case 2:if(null!=(i=o)&&null!==(n=i.periodicSync)&&void 0!==n&&n.register){t.n=3;break}return t.a(2,!1);case 3:return t.n=4,i.periodicSync.register(String(e||"holi-periodic-sync"),r);case 4:return t.a(2,!0)}},t,this)})),function(t){return g.apply(this,arguments)})},{key:"queueRequest",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.isClient()?this.postToServiceWorker({type:"QUEUE_REQUEST",task:t}):Promise.resolve(!1)}},{key:"queueResponse",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.isClient()?this.postToServiceWorker({type:"QUEUE_RESPONSE",entry:t}):Promise.resolve(!1)}},{key:"flushQueues",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.isClient()?this.postToServiceWorker({type:"FLUSH_QUEUES",tag:String(t||"")}):Promise.resolve(!1)}},{key:"observeNetworkQuality",value:function(){var t,e;if(this.isClient()){var n=navigator.connection||navigator.mozConnection||navigator.webkitConnection;n&&(null===(t=n.removeEventListener)||void 0===t||t.call(n,"change",this.handleConnectionChange),null===(e=n.addEventListener)||void 0===e||e.call(n,"change",this.handleConnectionChange),this.handleConnectionChange())}}},{key:"handleConnectionChange",value:function(){this.networkProfile=this.readNetworkProfile(),this.dispatchClientEvent("network-profile",{profile:this.networkProfile}),this.sendNetworkProfile()}},{key:"sendNetworkProfile",value:function(){return this.isClient()?this.postToServiceWorker({type:"UPDATE_NETWORK_PROFILE",profile:this.networkProfile}):Promise.resolve(!1)}},{key:"handleClientMessage",value:function(t){var e=(null==t?void 0:t.data)||{};String(e.type||"").startsWith("sw:")&&this.dispatchClientEvent(String(e.type).slice(3),e.detail||{})}},{key:"dispatchClientEvent",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"undefined"!=typeof document&&document.dispatchEvent(new CustomEvent("sw:".concat(t),{detail:e}))}},{key:"handleMessageEvent",value:function(t){var e,n,r=this,i=(null==t?void 0:t.data)||{},o=i.type;if(o){if("REGISTER_SW_HANDLERS"===o)return(Array.isArray(i.handlers)?i.handlers:[]).forEach(function(t){var e=r.normalizeHandler(t);e&&r.remoteHandlers.set(r.toKey(e.type,e.name),e)}),this.emitToClients("handlers-registered",{count:this.remoteHandlers.size});if("UNREGISTER_SW_HANDLER"===o)return this.remoteHandlers.delete(this.toKey(i.eventType,i.name||i.id)),this.emitToClients("handler-unregistered",{type:i.eventType,name:i.name||i.id});if("CLEAR_SW_HANDLERS"===o)return i.eventType?Array.from(this.remoteHandlers.keys()).forEach(function(t){t.startsWith("".concat(i.eventType,":"))&&r.remoteHandlers.delete(t)}):this.remoteHandlers.clear(),this.emitToClients("handlers-cleared",{type:i.eventType||"all"});if("SKIP_WAITING"===o)return self.skipWaiting();if("UPDATE_NETWORK_PROFILE"!==o)if("QUEUE_REQUEST"!==o&&"QUEUE_SYNC_TASK"!==o){if("QUEUE_RESPONSE"!==o)return"FLUSH_QUEUES"===o?null===(e=t.waitUntil)||void 0===e?void 0:e.call(t,this.flushAllQueues(String(i.tag||""))):"SHOW_NOTIFICATION"===o?null===(n=t.waitUntil)||void 0===n?void 0:n.call(t,this.showNotificationFromPayload(i.payload||{})):void 0;i.entry&&this.enqueueResponse(i.entry)}else i.task&&this.enqueueRequest(i.task);else this.networkProfile=this.readNetworkProfile(i.profile)}}},{key:"handleFetchEvent",value:function(t){var e=this.findRuntimeHandler("fetch",t);if(e)return t.respondWith(Promise.resolve(e.handler.runtimeHandler(t,e,this)));var n=this.findRemoteHandler("fetch",t);if(n)return t.respondWith(this.executeGenericHandler(n,t));t.respondWith(this.defaultFetch(t.request))}},{key:"handlePushEvent",value:function(t){var e=this.findRuntimeHandler("push",t);if(e)return t.waitUntil(Promise.resolve(e.handler.runtimeHandler(t,e,this)));var n=this.findRemoteHandler("push",t);if(n)return t.waitUntil(this.executeGenericHandler(n,t));t.waitUntil(self.registration.showNotification("Update Available"))}},{key:"handleSyncEvent",value:function(t){var e=this.findRuntimeHandler("sync",t);if(e)return t.waitUntil(Promise.resolve(e.handler.runtimeHandler(t,e,this)));var n=this.findRemoteHandler("sync",t);n&&t.waitUntil(this.executeGenericHandler(n,t))}},{key:"handlePeriodicSyncEvent",value:function(t){var e=this.findRuntimeHandler("periodicsync",t);if(e)return t.waitUntil(Promise.resolve(e.handler.runtimeHandler(t,e,this)));var n=this.findRemoteHandler("periodicsync",t);n&&t.waitUntil(this.executeGenericHandler(n,t))}},{key:"executeGenericHandler",value:(b=z(H().m(function t(e,n){return H().w(function(t){for(;;)switch(t.n){case 0:if("fetch"!==e.type){t.n=1;break}return t.a(2,this.executeFetchHandler(e,n));case 1:if("push"!==e.type){t.n=2;break}return t.a(2,this.executePushHandler(e,n));case 2:if("sync"!==e.type){t.n=3;break}return t.a(2,this.executeSyncHandler(e,n));case 3:if("periodicsync"!==e.type){t.n=4;break}return t.a(2,this.executePeriodicSyncHandler(e,n));case 4:return t.a(2,null)}},t,this)})),function(t,e){return b.apply(this,arguments)})},{key:"executeFetchHandler",value:(m=z(H().m(function t(e,n){var r,i,o,a,l;return H().w(function(t){for(;;)switch(t.p=t.n){case 0:if(r=n.request,e.capabilitySet.has("adaptive-data-loading")&&(r=this.applyAdaptiveRequest(r,e)),!e.capabilitySet.has("network-throttling")){t.n=1;break}return t.n=1,this.applyNetworkThrottling(e);case 1:if(t.p=1,!e.capabilitySet.has("caching")){t.n=3;break}return t.n=2,this.executeCachingHandler(e,r);case 2:a=t.v,t.n=5;break;case 3:return t.n=4,this.executeFetchStrategy(e,r);case 4:a=t.v;case 5:if(i=a,!e.capabilitySet.has("response-queueing")){t.n=6;break}return t.n=6,this.captureResponseQueue(e,r,i);case 6:return t.a(2,i);case 7:if(t.p=7,l=t.v,!e.capabilitySet.has("request-queueing")){t.n=9;break}return t.n=8,this.queueFailedRequest(e,r,l);case 8:if(!(o=t.v)){t.n=9;break}return t.a(2,o);case 9:throw l;case 10:return t.a(2)}},t,this,[[1,7]])})),function(t,e){return m.apply(this,arguments)})},{key:"executePushHandler",value:function(t,e){var n,r,i,o,a,l=this.extractPushPayload(e);return this.showNotificationFromPayload({title:l.title||(null===(n=t.handler.notification)||void 0===n?void 0:n.title)||"Update Available",body:l.body||(null===(r=t.handler.notification)||void 0===r?void 0:r.body)||"",icon:l.icon||(null===(i=t.handler.notification)||void 0===i?void 0:i.icon),badge:l.badge||(null===(o=t.handler.notification)||void 0===o?void 0:o.badge),data:l.data||(null===(a=t.handler.notification)||void 0===a?void 0:a.data)})}},{key:"executeSyncHandler",value:(y=z(H().m(function t(e,n){var r,i;return H().w(function(t){for(;;)switch(t.n){case 0:if(r=n.tag||"",!e.match.tag||e.match.tag===r){t.n=1;break}return t.a(2);case 1:return t.n=2,this.flushAllQueues(r);case 2:if((i=e.handler.sync||{}).endpoint){t.n=3;break}return t.a(2);case 3:return t.n=4,fetch(i.endpoint,{method:i.method||"POST",headers:i.headers||{"Content-Type":"application/json"},body:i.body?JSON.stringify(i.body):void 0});case 4:return t.a(2)}},t,this)})),function(t,e){return y.apply(this,arguments)})},{key:"executePeriodicSyncHandler",value:(v=z(H().m(function t(e,n){var r,i,o;return H().w(function(t){for(;;)switch(t.n){case 0:if(r=e.handler.periodicSync||{},i=n.tag||"",!(o=e.match.tag||r.tag||"")||o===i){t.n=1;break}return t.a(2);case 1:if(!e.capabilitySet.has("request-queueing")){t.n=2;break}return t.n=2,this.flushRequestQueue(i);case 2:if(r.endpoint){t.n=3;break}return t.a(2);case 3:return t.n=4,fetch(r.endpoint,{method:r.method||"GET",headers:r.headers||{}});case 4:return t.a(2)}},t,this)})),function(t,e){return v.apply(this,arguments)})},{key:"executeFetchStrategy",value:(p=z(H().m(function t(e,n){var r,i,o,a,l,s,u,c,d,f,h,p=this;return H().w(function(t){for(;;)switch(t.p=t.n){case 0:if("image-optimize"!==(r=String(e.handler.strategy||e.strategy||"network-first").toLowerCase())){t.n=1;break}return t.a(2,this.optimizeImageFetch(n,e));case 1:if("cache-only"!==r){t.n=4;break}return t.n=2,caches.match(n);case 2:if(f=t.v){t.n=3;break}f=this.defaultFetch(n);case 3:return t.a(2,f);case 4:if("network-only"!==r){t.n=5;break}return t.a(2,this.fetchWithHooks(n,e));case 5:if("cache-first"!==r){t.n=10;break}return t.n=6,caches.match(n);case 6:if(!(i=t.v)){t.n=7;break}return t.a(2,i);case 7:return t.n=8,this.fetchWithHooks(n,e);case 8:return o=t.v,t.n=9,this.cacheResponse(n,o);case 9:return t.a(2,o);case 10:if("stale-while-revalidate"!==r){t.n=12;break}return t.n=11,caches.match(n);case 11:return a=t.v,l=this.fetchWithHooks(n,e).then(function(){var t=z(H().m(function t(e){return H().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,p.cacheResponse(n,e);case 1:return t.a(2,e)}},t)}));return function(e){return t.apply(this,arguments)}}()).catch(function(){return null}),t.a(2,a||l||this.defaultFetch(n));case 12:return t.p=12,t.n=13,this.fetchWithHooks(n,e);case 13:return s=t.v,t.n=14,this.cacheResponse(n,s);case 14:return t.a(2,s);case 15:return t.p=15,h=t.v,t.n=16,caches.match(n);case 16:if(!(u=t.v)){t.n=17;break}return t.a(2,u);case 17:if(!(c=e.handler.fallbackUrl||e.fallbackUrl||this.offlineFallbackUrl)){t.n=19;break}return t.n=18,caches.match(c);case 18:if(!(d=t.v)){t.n=19;break}return t.a(2,d);case 19:throw h;case 20:return t.a(2)}},t,this,[[12,15]])})),function(t,e){return p.apply(this,arguments)})},{key:"executeCachingHandler",value:(h=z(H().m(function t(e,n){var r,i,o,a,l,s,u,c,d,f,h,p,v=this;return H().w(function(t){for(;;)switch(t.p=t.n){case 0:return r=e.handler.cache||{},i=String(r.cacheName||this.cacheName).trim()||this.cacheName,o=String(r.mode||e.handler.strategy||"network-first").toLowerCase(),t.n=1,caches.open(i);case 1:return a=t.v,l=this.resolveCacheKey(n,r.cacheKey),t.n=2,a.match(l);case 2:if(s=t.v,u=Number(r.ttlMs||0),!(s&&u>0)){t.n=3;break}if(!((c=Number(s.headers.get("x-holi-cache-ts")||0))>0&&Date.now()-c>u)){t.n=3;break}return t.n=3,a.delete(l);case 3:return t.n=4,a.match(l);case 4:if(d=t.v,"cache-only"!==o){t.n=5;break}return t.a(2,d||this.defaultFetch(n));case 5:if("cache-first"!==o||!d){t.n=6;break}return t.a(2,d);case 6:if("stale-while-revalidate"!==o){t.n=7;break}return f=this.fetchWithHooks(n,e).then(function(t){return v.storeCachedResponse(a,l,t)}).catch(function(){return null}),t.a(2,d||f||this.defaultFetch(n));case 7:return t.p=7,t.n=8,this.fetchWithHooks(n,e);case 8:return h=t.v,t.a(2,this.storeCachedResponse(a,l,h));case 9:if(t.p=9,p=t.v,!d){t.n=10;break}return t.a(2,d);case 10:throw p;case 11:return t.a(2)}},t,this,[[7,9]])})),function(t,e){return h.apply(this,arguments)})},{key:"fetchWithHooks",value:function(t,e){var n=this;return this.emitToClients("fetch-start",{name:e.name,type:e.type,url:t.url}),fetch(t).then(function(r){return n.emitToClients("fetch-complete",{name:e.name,type:e.type,url:t.url,status:r.status}),r}).catch(function(r){throw n.emitToClients("fetch-error",{name:e.name,type:e.type,url:t.url,message:String((null==r?void 0:r.message)||r)}),r})}},{key:"applyNetworkThrottling",value:function(t){var e,n=Number((null===(e=t.handler.throttle)||void 0===e?void 0:e.delayMs)||0);return n>0?new Promise(function(t){return setTimeout(t,n)}):Promise.resolve()}},{key:"applyAdaptiveRequest",value:function(t,e){var n=this.networkProfile||{},r=e.handler.adaptive||{},i=new URL(t.url),o=String(n.effectiveType||"4g").toLowerCase(),a=!!n.saveData||["slow-2g","2g","3g"].includes(o);i.searchParams.set(r.qualityParam||"quality",a?"low":"high"),r.pageSizeParam&&i.searchParams.set(r.pageSizeParam,String(Number(a?r.lowPageSize||10:r.highPageSize||30)));var l=new Headers(t.headers||{});return l.set("x-network-effective-type",o),l.set("x-network-save-data",n.saveData?"true":"false"),new Request(i.toString(),{method:t.method,headers:l,body:["GET","HEAD"].includes(t.method)?void 0:t.clone().body,credentials:t.credentials,cache:t.cache,keepalive:t.keepalive,mode:t.mode,redirect:t.redirect,referrer:t.referrer,integrity:t.integrity})}},{key:"queueFailedRequest",value:(f=z(H().m(function t(e,n,r){var i,o,a,l,s,u,c,d,f,h,p,v;return H().w(function(t){for(;;)switch(t.n){case 0:if(i=e.handler.queue||{},(Array.isArray(i.methods)?i.methods:["POST","PUT","PATCH","DELETE"]).includes(String(n.method||"GET").toUpperCase())){t.n=1;break}return t.a(2,null);case 1:if(a="req-".concat(Date.now(),"-").concat(Math.random().toString(16).slice(2)),l=e.name,s=e.type,u=i.tag||e.match.tag||"",c=n.url,d=n.method,f=Object.fromEntries(n.headers.entries()),!["GET","HEAD"].includes(n.method)){t.n=2;break}h="",t.n=4;break;case 2:return t.n=3,n.clone().text();case 3:h=t.v;case 4:return p=h,v=i.hooks||{},o={id:a,name:l,type:s,tag:u,url:c,method:d,headers:f,body:p,hooks:v},this.enqueueRequest(o),this.emitToClients("queue-enqueued",{queue:"request",task:o,message:String((null==r?void 0:r.message)||r)}),t.a(2,new Response(JSON.stringify({queued:!0,id:o.id,message:"Request queued for retry"}),{status:Number(i.acceptedStatus||202),headers:{"Content-Type":"application/json"}}))}},t,this)})),function(t,e,n){return f.apply(this,arguments)})},{key:"captureResponseQueue",value:(d=z(H().m(function t(e,n,r){var i,o,a,l,s,u,c,d,f,h;return H().w(function(t){for(;;)switch(t.n){case 0:return i=e.handler.responseQueue||{},a="res-".concat(Date.now(),"-").concat(Math.random().toString(16).slice(2)),l=e.name,s=e.type,u=i.tag||"",c=n.url,d=r.status,t.n=1,r.clone().text();case 1:f=t.v,h=i.hooks||{},o={id:a,name:l,type:s,tag:u,url:c,status:d,body:f,hooks:h},this.enqueueResponse(o),this.emitToClients("response-captured",{queue:"response",entry:o});case 2:return t.a(2)}},t,this)})),function(t,e,n){return d.apply(this,arguments)})},{key:"enqueueRequest",value:function(t){this.requestQueue.push(W(W({},t),{},{method:String(t.method||"POST").toUpperCase()}))}},{key:"enqueueResponse",value:function(t){this.responseQueue.push(W({},t))}},{key:"flushAllQueues",value:(c=z(H().m(function t(){var e,n=arguments;return H().w(function(t){for(;;)switch(t.n){case 0:return e=n.length>0&&void 0!==n[0]?n[0]:"",t.n=1,this.flushRequestQueue(e);case 1:return t.n=2,this.flushResponseQueue(e);case 2:return t.a(2)}},t,this)})),function(){return c.apply(this,arguments)})},{key:"flushRequestQueue",value:(u=z(H().m(function t(){var e,n,r,i,o,a,l,s,u,c=arguments;return H().w(function(t){for(;;)switch(t.p=t.n){case 0:if(e=c.length>0&&void 0!==c[0]?c[0]:"",this.requestQueue.length){t.n=1;break}return t.a(2);case 1:n=this.requestQueue.slice(),this.requestQueue=[],r=0;case 2:if(!(r<n.length)){t.n=8;break}if(!(i=n[r]).tag||!e||i.tag===e){t.n=3;break}return this.requestQueue.push(i),t.a(3,7);case 3:return t.p=3,t.n=4,fetch(i.url,{method:i.method,headers:i.headers||{"Content-Type":"application/json"},body:["GET","HEAD"].includes(i.method)?void 0:i.body});case 4:a=t.v,this.emitQueueHook((null===(o=i.hooks)||void 0===o?void 0:o.successEvent)||"queue-item-success",{queue:"request",task:i,status:a.status}),t.n=6;break;case 5:t.p=5,u=t.v,this.requestQueue.push(i),this.emitQueueHook((null===(l=i.hooks)||void 0===l?void 0:l.failureEvent)||"queue-item-failure",{queue:"request",task:i,message:String((null==u?void 0:u.message)||u)});case 6:return t.p=6,this.emitQueueHook((null===(s=i.hooks)||void 0===s?void 0:s.completeEvent)||"queue-item-complete",{queue:"request",task:i}),t.f(6);case 7:r+=1,t.n=2;break;case 8:this.emitToClients("queue-flushed",{queue:"request",remaining:this.requestQueue.length});case 9:return t.a(2)}},t,this,[[3,5,6,7]])})),function(){return u.apply(this,arguments)})},{key:"flushResponseQueue",value:(s=z(H().m(function t(){var e,n,r=this,i=arguments;return H().w(function(t){for(;;)switch(t.n){case 0:if(e=i.length>0&&void 0!==i[0]?i[0]:"",this.responseQueue.length){t.n=1;break}return t.a(2);case 1:n=this.responseQueue.slice(),this.responseQueue=[],n.forEach(function(t){var n;t.tag&&e&&t.tag!==e?r.responseQueue.push(t):r.emitQueueHook((null===(n=t.hooks)||void 0===n?void 0:n.completeEvent)||"response-queue-complete",{queue:"response",entry:t})}),this.emitToClients("queue-flushed",{queue:"response",remaining:this.responseQueue.length});case 2:return t.a(2)}},t,this)})),function(){return s.apply(this,arguments)})},{key:"emitQueueHook",value:function(t,e){this.emitToClients(t,e)}},{key:"defaultFetch",value:(l=z(H().m(function t(e){var n,r;return H().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.n=1,caches.match(e);case 1:if(!(n=t.v)){t.n=2;break}return t.a(2,n);case 2:return t.p=2,t.n=3,fetch(e);case 3:return t.a(2,t.v);case 4:return t.p=4,t.v,t.n=5,caches.match(this.offlineFallbackUrl);case 5:return r=t.v,t.a(2,r||Response.error())}},t,this,[[2,4]])})),function(t){return l.apply(this,arguments)})},{key:"cacheResponse",value:(a=z(H().m(function t(e,n){var r;return H().w(function(t){for(;;)switch(t.n){case 0:if(null!=n&&n.ok&&"GET"===e.method){t.n=1;break}return t.a(2);case 1:return t.n=2,caches.open(this.cacheName);case 2:return r=t.v,t.n=3,r.put(e,n.clone());case 3:return t.a(2)}},t,this)})),function(t,e){return a.apply(this,arguments)})},{key:"resolveCacheKey",value:function(t,e){if(!e)return t;if(e instanceof Request)return e;var n=String(e||"").trim();return n?new Request(n,{method:"GET",headers:t.headers}):t}},{key:"storeCachedResponse",value:(o=z(H().m(function t(e,n,r){var i,o,a;return H().w(function(t){for(;;)switch(t.n){case 0:if(null!=r&&r.ok){t.n=1;break}return t.a(2,r);case 1:return(i=new Headers(r.headers||{})).set("x-holi-cache-ts",String(Date.now())),t.n=2,r.clone().blob();case 2:return o=t.v,a=new Response(o,{status:r.status,statusText:r.statusText,headers:i}),t.n=3,e.put(n,a.clone());case 3:return t.a(2,r)}},t)})),function(t,e,n){return o.apply(this,arguments)})},{key:"optimizeImageFetch",value:(i=z(H().m(function t(e,n){var r,i,o,a,l,s;return H().w(function(t){for(;;)switch(t.n){case 0:return r=new URL(e.url),i=Number(n.handler.maxWidth||1280),o=Number(n.handler.quality||75),r.searchParams.set("auto","format,compress"),r.searchParams.set("fit","max"),r.searchParams.set("w",String(i)),r.searchParams.set("q",String(o)),a=new Request(r.toString(),e),t.n=1,caches.match(a);case 1:if(!(l=t.v)){t.n=2;break}return t.a(2,l);case 2:return t.n=3,fetch(a);case 3:return s=t.v,t.n=4,this.cacheResponse(a,s);case 4:return t.a(2,s)}},t,this)})),function(t,e){return i.apply(this,arguments)})},{key:"extractPushPayload",value:function(t){try{return t.data?t.data.json():{}}catch(e){return{title:"Update Available",body:t.data?t.data.text():""}}}},{key:"showNotificationFromPayload",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return self.registration.showNotification(t.title||"Update Available",{body:t.body||"",icon:t.icon||null,badge:t.badge||null,data:t.data||null})}},{key:"findRuntimeHandler",value:function(t,e){var n=this,r=null;return this.runtimeHandlers.forEach(function(i){i.type===t&&n.matches(i.match,e)&&(!r||i.priority>r.priority)&&(r=i)}),r}},{key:"findRemoteHandler",value:function(t,e){var n=this,r=null;return this.remoteHandlers.forEach(function(i){i.type===t&&n.matches(i.match,e)&&(!r||i.priority>r.priority)&&(r=i)}),r}},{key:"matches",value:function(t,e){if(!t)return!0;if(e.request){var n=e.request,r=new URL(n.url);if(t.method&&String(t.method).toUpperCase()!==n.method)return!1;if(t.urlStartsWith&&!r.href.startsWith(String(t.urlStartsWith)))return!1;if(t.urlIncludes&&!r.href.includes(String(t.urlIncludes)))return!1;if(t.urlPattern)try{if(!new RegExp(String(t.urlPattern)).test(r.href))return!1}catch(t){return!1}}return"string"!=typeof e.tag||!t.tag||t.tag===e.tag}},{key:"normalizeHandler",value:function(t){if(!t||"object"!==B(t))return null;var e=String(t.name||t.id||"").trim(),n=String(t.type||t.eventType||"").trim().toLowerCase();if(!e||!n||!J.has(n))return null;var r=Array.isArray(t.capabilities)?t.capabilities:t.capabilities?[t.capabilities]:[],i=new Set(r.map(function(t){return String(t||"").trim().toLowerCase()}).filter(Boolean)),o=t.handler&&"object"===B(t.handler)?W({},t.handler):W({},t);return{name:e,id:e,type:n,eventType:n,priority:Number(t.priority||o.priority||0),match:o.match&&"object"===B(o.match)?W({},o.match):{},capabilities:Array.from(i),capabilitySet:i,strategy:o.strategy?String(o.strategy):null,fallbackUrl:o.fallbackUrl?String(o.fallbackUrl):null,handler:o}}},{key:"readNetworkProfile",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(t&&"object"===B(t))return{effectiveType:String(t.effectiveType||"4g"),downlink:Number(t.downlink||10),rtt:Number(t.rtt||50),saveData:!!t.saveData};if(!this.isClient())return this.networkProfile||{effectiveType:"4g",downlink:10,rtt:50,saveData:!1};var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;return{effectiveType:String((null==e?void 0:e.effectiveType)||"4g"),downlink:Number((null==e?void 0:e.downlink)||10),rtt:Number((null==e?void 0:e.rtt)||50),saveData:!(null==e||!e.saveData)}}},{key:"emitToClients",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.isWorker()?self.clients.matchAll({type:"window",includeUncontrolled:!0}).then(function(n){n.forEach(function(n){return n.postMessage({type:"".concat("sw:").concat(t),detail:e})})}):Promise.resolve()}},{key:"toKey",value:function(t,e){return"".concat(String(t||"").toLowerCase(),":").concat(String(e||"").trim())}}],r=[{key:"isServiceWorkerScope",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:globalThis;return"undefined"!=typeof ServiceWorkerGlobalScope&&t instanceof ServiceWorkerGlobalScope}},{key:"isWindowScope",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:globalThis;return"undefined"!=typeof window&&t===window}},{key:"getInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.globalInstance||(this.globalInstance=new t(e)),this.globalInstance}},{key:"create",value:function(){return new t(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}},{key:"registerHandler",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};if(J.has(String(t||"").toLowerCase())&&"string"==typeof e&&!Array.isArray(n)&&"object"===B(n)&&"number"!=typeof r&&(!i||0===Object.keys(i).length)){var o=n||{};return{name:e,type:String(t).toLowerCase(),capabilities:o.capabilities||[],priority:Number(o.priority||0),handler:W({},o)}}return{name:String(t||"").trim(),type:String(e||"").trim().toLowerCase(),capabilities:Array.isArray(n)?n:n?[n]:[],priority:"number"==typeof r?r:Number((null==r?void 0:r.priority)||0),handler:W({},("number"==typeof r?i||{}:r||{})||{})}}}],n&&Q(e.prototype,n),r&&Q(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,r,i,o,a,l,s,u,c,d,f,h,p,v,y,m,b,g,w,S,k}();K(Z,"globalInstance",null),Z.isServiceWorkerScope()&&Z.getInstance().start(),"undefined"!=typeof window&&(window.ServiceWorkerManager=Z);var X=n(7322),Y=n(6595),tt=n(4907);function et(t){return et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},et(t)}function nt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function rt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nt(Object(n),!0).forEach(function(e){ut(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function it(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return ot(u,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),u}var a={};function l(){}function s(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(ot(e={},r,function(){return this}),e),d=u.prototype=l.prototype=Object.create(c);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,ot(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=u,ot(d,"constructor",u),ot(u,"constructor",s),s.displayName="GeneratorFunction",ot(u,i,"GeneratorFunction"),ot(d),ot(d,i,"Generator"),ot(d,r,function(){return this}),ot(d,"toString",function(){return"[object Generator]"}),(it=function(){return{w:o,m:f}})()}function ot(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}ot=function(t,e,n,r){function o(e,n){ot(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},ot(t,e,n,r)}function at(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function lt(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){at(o,r,i,a,l,"next",t)}function l(t){at(o,r,i,a,l,"throw",t)}a(void 0)})}}function st(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ct(r.key),r)}}function ut(t,e,n){return(e=ct(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ct(t){var e=function(t){if("object"!=et(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=et(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==et(e)?e:e+""}var dt=function(){function n(){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),n.instance)return n.instance;n.instance=this}return B=n,H=[{key:"initServiceWorker",value:(K=lt(it().m(function t(){var e,r,i,o,a=arguments;return it().w(function(t){for(;;)switch(t.n){case 0:return e=a.length>0&&void 0!==a[0]?a[0]:{},r=n.getServiceWorkerManager(e),i=e.scriptUrl||"/sw.js",o=e.registrationOptions||{},t.n=1,r.registerWorker(i,o);case 1:return t.a(2,r)}},t)})),function(){return K.apply(this,arguments)})},{key:"registerSWHandlers",value:(Q=lt(it().m(function t(){var e,r,i=arguments;return it().w(function(t){for(;;)if(0===t.n)return e=i.length>0&&void 0!==i[0]?i[0]:[],r=n.getServiceWorkerManager(),t.a(2,r.registerHandlers(e))},t)})),function(){return Q.apply(this,arguments)})},{key:"clearSWHandlers",value:(W=lt(it().m(function t(){var e,r,i=arguments;return it().w(function(t){for(;;)if(0===t.n)return e=i.length>0&&void 0!==i[0]?i[0]:null,r=n.getServiceWorkerManager(),t.a(2,r.clearHandlers(e))},t)})),function(){return W.apply(this,arguments)})},{key:"initPWA",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n.initPWA(t)}}],G=[{key:"ensureLibraries",value:function(){if(!this.librariesRegistered){var n=[b.PageComponent,h.LayoutComponent,p.LoaderComponent,v.IncludeComponent,y.OfflineIndicator,m.RefreshComponent,g.BlockComponent,w.PanelComponent,S.RegionComponent,k.AccordionComponent,E.CalendarComponent,O.CarouselComponent,C.BreadCrumbsComponent,A.BackToTopComponent,j.ChartComponent,e.TabsComponent,r.DataTable,i.DataGrid,o.DropdownComponent,a.SelectComponent,l.InputComponent,s.CheckboxGroupComponent,c.RadioGroupComponent,d.RatingComponent,f.ButtonComponent,u.FormComponent,P.DialogComponent,T.ToastComponent,x.DrawerComponent,L.GalleryComponent,I.MenubarComponent,D.TreeComponent,N.TreePanelComponent,R.SearchComponent,M.LocaleSwitcherComponent,q.ThemeSwitcherComponent,_.WizardComponent,F.StatsCard].filter(Boolean);t.Z.registerLibrary("holi",n),this.librariesRegistered=!0}}},{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;this.ensureLibraries(),tt.P.prepareDocument(e),Y.G.discover(e),Y.G.ensureActiveLocale(e),X.D.discover(e),X.D.ensureActiveTheme(e),t.Z.initAll(e),t.Z.observeLifecycle(e)}},{key:"registerLocale",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Y.G.registerLocale(t,e)}},{key:"registerLocales",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Y.G.registerLocales(t,e)}},{key:"discoverLocales",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return Y.G.discover(t)}},{key:"getLocale",value:function(t){return Y.G.getLocale(t)}},{key:"getLocales",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Y.G.getLocales(t)}},{key:"setDefaultLocale",value:function(t){return Y.G.setDefaultLocale(t)}},{key:"getDefaultLocale",value:function(){return Y.G.getDefaultLocale()}},{key:"getActiveLocale",value:function(){return Y.G.getActiveLocale()}},{key:"applyLocale",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Y.G.applyLocale(t,e)}},{key:"registerTheme",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return X.D.registerTheme(t,e)}},{key:"prepareDocumentAssets",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return tt.P.prepareDocument(t)}},{key:"registerThemes",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return X.D.registerThemes(t,e)}},{key:"discoverThemes",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return X.D.discover(t)}},{key:"getTheme",value:function(t){return X.D.getTheme(t)}},{key:"getThemes",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return X.D.getThemes(t)}},{key:"setDefaultTheme",value:function(t){return X.D.setDefaultTheme(t)}},{key:"getDefaultTheme",value:function(){return X.D.getDefaultTheme()}},{key:"getActiveTheme",value:function(){return X.D.getActiveTheme()}},{key:"applyTheme",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return X.D.applyTheme(t,e)}},{key:"getServiceWorkerManager",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.swManager||(this.swManager=Z.getInstance(t)),this.swManager}},{key:"initPWA",value:function(){var t,e,n,r=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("undefined"==typeof window||"undefined"==typeof document)return this.installStatus;if(this.pwaInitialized)return this.bindInstallUI(i.container||document),this.installStatus;this.pwaInitialized=!0,this.installStatus.supported="BeforeInstallPromptEvent"in window||"onbeforeinstallprompt"in window,this.installStatus.standalone=this.isStandalone(),this.installStatus.installed=this.installStatus.standalone,window.addEventListener("beforeinstallprompt",function(t){t.preventDefault(),r.installPrompt=t,r.installStatus.available=!0,r.installStatus.installed=!1,r.installStatus.standalone=r.isStandalone(),r.showInstallUI(),r.dispatchPWAEvent("pwa:installavailable",{prompt:t,status:rt({},r.installStatus)})}),window.addEventListener("appinstalled",function(){r.installPrompt=null,r.installStatus.available=!1,r.installStatus.installed=!0,r.installStatus.standalone=!0,r.hideInstallUI(),r.dispatchPWAEvent("pwa:installed",{status:rt({},r.installStatus)})});var o=null===(t=(e=window).matchMedia)||void 0===t?void 0:t.call(e,"(display-mode: standalone)");return null==o||null===(n=o.addEventListener)||void 0===n||n.call(o,"change",function(){r.installStatus.standalone=r.isStandalone(),r.syncInstallUI(document)}),this.bindInstallUI(i.container||document),!1!==i.manifest&&this.setPWAManifest(i.manifestConfig||{}),this.syncInstallUI(document),this.installStatus}},{key:"installApp",value:(U=lt(it().m(function t(){var e,n;return it().w(function(t){for(;;)switch(t.n){case 0:if(this.installPrompt){t.n=1;break}return t.a(2,{outcome:"unavailable"});case 1:return this.installPrompt.prompt(),t.n=2,this.installPrompt.userChoice;case 2:return e=t.v,"accepted"===(n=(null==e?void 0:e.outcome)||"dismissed")&&(this.installPrompt=null,this.installStatus.available=!1),this.syncInstallUI(document),this.dispatchPWAEvent("pwa:installresult",{outcome:n,status:rt({},this.installStatus)}),t.a(2,e||{outcome:n})}},t,this)})),function(){return U.apply(this,arguments)})},{key:"setPWAManifest",value:(z=lt(it().m(function t(){var e,n=arguments;return it().w(function(t){for(;;)switch(t.n){case 0:if(e=n.length>0&&void 0!==n[0]?n[0]:{},"undefined"!=typeof document){t.n=1;break}return t.a(2,null);case 1:return this.originalManifest||(this.originalManifest=document.querySelector('link[rel="manifest"]:not([data-dynamic])')),this.dynamicManifest=rt({name:"HTML First Components",short_name:"HF Components",start_url:"/",display:"standalone",background_color:"#ffffff",theme_color:"#2563eb"},e),t.a(2,this.injectDynamicManifest())}},t,this)})),function(){return z.apply(this,arguments)})},{key:"injectDynamicManifest",value:(V=lt(it().m(function t(){var e,n,r,i;return it().w(function(t){for(;;)switch(t.n){case 0:if("undefined"!=typeof document&&"undefined"!=typeof URL){t.n=1;break}return t.a(2,null);case 1:return(e=document.querySelector('link[rel="manifest"][data-dynamic]'))&&e.remove(),this.dynamicManifestUrl&&(URL.revokeObjectURL(this.dynamicManifestUrl),this.dynamicManifestUrl=""),n=new Blob([JSON.stringify(this.dynamicManifest,null,2)],{type:"application/json"}),r=URL.createObjectURL(n),this.dynamicManifestUrl=r,(i=document.createElement("link")).rel="manifest",i.href=r,i.dataset.dynamic="true",document.head.appendChild(i),this.dispatchPWAEvent("pwa:manifestupdated",{manifest:rt({},this.dynamicManifest)}),t.a(2,i)}},t,this)})),function(){return V.apply(this,arguments)})},{key:"bindInstallUI",value:function(){var t,e,n=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;(r instanceof Element||r===document)&&(this.boundInstallClick||(this.boundInstallClick=function(t){var e,r;(null===(e=t.target)||void 0===e||null===(r=e.closest)||void 0===r?void 0:r.call(e,"[data-pwa-install]"))&&(t.preventDefault(),n.installApp())}),null===(t=r.removeEventListener)||void 0===t||t.call(r,"click",this.boundInstallClick),null===(e=r.addEventListener)||void 0===e||e.call(r,"click",this.boundInstallClick),this.syncInstallUI(r))}},{key:"syncInstallUI",value:function(){var t,e,n=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;if("undefined"!=typeof document){var i=r===document?document:r,o=(null===(t=i.querySelectorAll)||void 0===t?void 0:t.call(i,"[data-pwa-install]"))||[],a=(null===(e=i.querySelectorAll)||void 0===e?void 0:e.call(i,"[data-pwa-install-status]"))||[],l=!!this.installPrompt&&!this.installStatus.installed,s=this.isStandalone();this.installStatus.available=l,this.installStatus.standalone=s,this.installStatus.installed=this.installStatus.installed||s,o.forEach(function(t){var e="false"!==t.getAttribute("data-pwa-install-hide");t.toggleAttribute("hidden",e&&!l),t.toggleAttribute("disabled",!l),t.setAttribute("data-pwa-install-ready",l?"true":"false"),t.getAttribute("aria-label")||t.setAttribute("aria-label","Install app")}),a.forEach(function(t){t.textContent=n.getInstallStatusText(),t.setAttribute("data-pwa-install-state",n.getInstallState())})}}},{key:"showInstallUI",value:function(){this.syncInstallUI(document)}},{key:"hideInstallUI",value:function(){this.syncInstallUI(document)}},{key:"getInstallState",value:function(){return this.installStatus.installed||this.isStandalone()?"installed":this.installPrompt?"available":"unavailable"}},{key:"getInstallStatusText",value:function(){var t=this.getInstallState();return"installed"===t?"App installed":"available"===t?"Install available":"Install unavailable"}},{key:"isStandalone",value:function(){var t,e,n;return!("undefined"==typeof window||!(null!==(t=(e=window).matchMedia)&&void 0!==t&&t.call(e,"(display-mode: standalone)").matches||null!==(n=window.navigator)&&void 0!==n&&n.standalone))}},{key:"dispatchPWAEvent",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"undefined"!=typeof document&&document.dispatchEvent(new CustomEvent(t,{detail:e}))}}],H&&st(B.prototype,H),G&&st(B,G),Object.defineProperty(B,"prototype",{writable:!1}),B;var B,H,G,V,z,U,W,Q,K}();ut(dt,"contentProviders",{}),ut(dt,"swManager",null),ut(dt,"instance",null),ut(dt,"librariesRegistered",!1),ut(dt,"installPrompt",null),ut(dt,"originalManifest",null),ut(dt,"dynamicManifest",{}),ut(dt,"dynamicManifestUrl",""),ut(dt,"pwaInitialized",!1),ut(dt,"boundInstallClick",null),ut(dt,"installStatus",{supported:"undefined"!=typeof window&&"serviceWorker"in navigator,available:!1,installed:!1,standalone:!1}),"undefined"!=typeof window&&(window.HoliAppClass=dt);var ft=n(4531);function ht(t){return ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ht(t)}function pt(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return vt(u,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),u}var a={};function l(){}function s(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(vt(e={},r,function(){return this}),e),d=u.prototype=l.prototype=Object.create(c);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,vt(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=u,vt(d,"constructor",u),vt(u,"constructor",s),s.displayName="GeneratorFunction",vt(u,i,"GeneratorFunction"),vt(d),vt(d,i,"Generator"),vt(d,r,function(){return this}),vt(d,"toString",function(){return"[object Generator]"}),(pt=function(){return{w:o,m:f}})()}function vt(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}vt=function(t,e,n,r){function o(e,n){vt(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},vt(t,e,n,r)}function yt(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function mt(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){yt(o,r,i,a,l,"next",t)}function l(t){yt(o,r,i,a,l,"throw",t)}a(void 0)})}}function bt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,gt(r.key),r)}}function gt(t){var e=function(t){if("object"!=ht(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ht(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ht(e)?e:e+""}var wt=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"resolve",value:function(t){throw new Error("Subclasses must implement resolve(dataSourceExpr)")}},{key:"getContent",value:(i=mt(pt().m(function t(e,n){return pt().w(function(t){for(;;)switch(t.n){case 0:throw new Error("Subclasses must implement getContent(itemData, index)");case 1:return t.a(2)}},t)})),function(t,e){return i.apply(this,arguments)})},{key:"init",value:(r=mt(pt().m(function t(){return pt().w(function(t){for(;;)if(0===t.n)return t.a(2)},t)})),function(){return r.apply(this,arguments)})},{key:"destroy",value:function(){}}],n=[{key:"name",get:function(){throw new Error("Subclasses must implement static name")}}],e&&bt(t.prototype,e),n&&bt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r,i}();function St(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return kt(u,"_invoke",function(n,r,i){var o,l,s,u=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,f.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!d&&u&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,p),l=c,s=p;(e=l<2?t:s)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,s)):f.n=s:f.v=s);try{if(u=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(e){o=t,l=1,s=e}finally{u=1}}return{value:e,done:d}}}(n,i,o),!0),u}var a={};function l(){}function s(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(kt(e={},r,function(){return this}),e),d=u.prototype=l.prototype=Object.create(c);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,kt(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=u,kt(d,"constructor",u),kt(u,"constructor",s),s.displayName="GeneratorFunction",kt(u,i,"GeneratorFunction"),kt(d),kt(d,i,"Generator"),kt(d,r,function(){return this}),kt(d,"toString",function(){return"[object Generator]"}),(St=function(){return{w:o,m:f}})()}function kt(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}kt=function(t,e,n,r){function o(e,n){kt(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},kt(t,e,n,r)}function Et(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function Ot(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){Et(o,r,i,a,l,"next",t)}function l(t){Et(o,r,i,a,l,"throw",t)}a(void 0)})}}"undefined"!=typeof window&&(window.ContentProvider=wt),n(7458),n(3194),window.HoliApp={instance:dt,HoliApp:dt,ServiceWorkerManager:Z,ThemeRegistry:X.D,LocaleRegistry:Y.G,ReleaseAssetRegistry:tt.P},window.Holi=window.HoliApp;var Ct=function(){var t=Ot(St().m(function t(){return St().w(function(t){for(;;)switch(t.n){case 0:if(!window.__holiTemplatesLoading){t.n=2;break}return t.n=1,window.__holiTemplatesLoading;case 1:case 3:return t.a(2);case 2:return window.__holiTemplatesLoading=Ot(St().m(function t(){return St().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,ft._.ensureCoreTemplates();case 1:return t.a(2)}},t)}))(),t.n=3,window.__holiTemplatesLoading}},t)}));return function(){return t.apply(this,arguments)}}(),At=function(){var t=Ot(St().m(function t(){return St().w(function(t){for(;;)switch(t.n){case 0:if(!1!==window.HoliAutoInit){t.n=1;break}return t.a(2);case 1:return dt.prepareDocumentAssets(document),t.n=2,Ct();case 2:dt.init(document);case 3:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){At().catch(function(t){return console.error(t)})},{once:!0}):At().catch(function(t){return console.error(t)})})()})();