smart-webcomponents-community
Version:
Web Components & Custom Elements Community Version
20 lines (12 loc) • 179 kB
JavaScript
/* Smart UI v26.0.0 (2026-05-07)
Copyright (c) 2011-2026 jQWidgets.
License: https://htmlelements.com/license/ */ //
(function(){ if (typeof document === 'undefined') { return; }
/* Smart UI v26.0.0 (2026-May)
Copyright (c) 2011-2026 jQWidgets.
License: https://htmlelements.com/license/ */
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ 6321:
/***/ (() => {
(()=>{var __webpack_exports__={};(function(){if(void 0===typeof window)return;const Version="26.0.0",templates=[],LICENSE_CACHE_KEY="smart_license_cache",LICENSE_CACHE_TTL=2592e6;let namespace="Smart";if(window[namespace]&&window[namespace].Version){if(window[namespace].Version===Version)return;if(window[namespace].Version!==Version)namespace+=Version;else{let e=2;for(;window[namespace];)namespace+=e.toString(),e++}}const isEdge=navigator.userAgent.indexOf("Edge")>-1&&navigator.appVersion.indexOf("Edge")>-1;function Import(e,t){let n=0;const r=function(e,t){return new Promise((n=>{const r=document.createElement("script");r.src=e,r.onload=n;for(let e=0;e<document.head.children.length;e++){const r=document.head.children[e];if(r.src&&r.src.toString().indexOf(t)>=0)return void n()}document.head.appendChild(r)}))};return new Promise((i=>{const s=Utilities.Core.getScriptLocation(),o=function(t){if(!e[t])return;const a=s+"/"+e[t];r(a,e[t]).then((function(){n++,n===e.length&&i(),o(t+1)}))};if(t)for(let t=0;t<e.length;t++){const o=s+"/"+e[t];r(o,e[t]).then((function(){n++,n===e.length&&i()}))}else o(0)}))}document.elementsFromPoint||(document.elementsFromPoint=document.msElementsFromPoint);class Types{static isBoolean(e){return"boolean"==typeof e}static isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)}static isArray(e){return Array.isArray(e)}static isObject(e){return e&&("object"==typeof e||this.isFunction(e))||!1}static isDate(e){return e instanceof Date}static isString(e){return"string"==typeof e}static isNumber(e){return"number"==typeof e}static getType(e){const t=this,n=["Boolean","Number","String","Function","Array","Date","Object"].find((n=>{if(t["is"+n](e))return n}));return n?n.toLowerCase():void 0}}class Ripple{static animate(e,t,n,r){const i=e;if(!i||i instanceof HTMLElement==!1)return;if(0===i.getElementsByClassName("smart-ripple").length){const e=document.createElement("span");e.classList.add("smart-ripple"),e.setAttribute("role","presentation");let t=!0,n=null;if(window[namespace].EnableShadowDOM&&i.enableShadowDOM&&!0!==i.isInShadowDOM){for(let e=0;e<i.shadowRoot.host.shadowRoot.children.length;e++)"link"!==i.shadowRoot.host.shadowRoot.children[e].tagName.toLowerCase()&&(n=i.shadowRoot.host.shadowRoot.children[e]);i.shadowRoot.host.shadowRoot.querySelector(".smart-ripple")&&(t=!1)}else n=i.firstElementChild;t&&(n&&!n.noRipple&&n.offsetHeight>0?n.appendChild(e):i.appendChild(e))}let s=null;if(s=window[namespace].EnableShadowDOM&&i.shadowRoot?i.shadowRoot.host.shadowRoot.querySelector(".smart-ripple"):i.getElementsByClassName("smart-ripple")[0],!s)return;s.innerHTML="",s.classList.remove("smart-animate"),s.style.height=s.style.width=Math.max(i.offsetHeight,i.offsetWidth)+"px";const o=window.getComputedStyle(s.parentElement),a=parseInt(o.borderLeftWidth)||0,l=parseInt(o.borderTopWidth)||0,d=i.getBoundingClientRect(),c=t-(d.left+window.pageXOffset)-s.offsetWidth/2-a,p=n-(d.top+window.pageYOffset)-s.offsetHeight/2-l;s.style.left=c+"px",s.style.top=p+"px",s.classList.add("smart-animate"),s.addEventListener("animationend",(function e(){s.parentElement&&s.parentElement.removeChild(s),r&&r(),s.removeEventListener("animationend",e),s.removeEventListener("animationcancel",e)})),s.addEventListener("animationcancel",(function e(){s.parentElement&&s.parentElement.removeChild(s),r&&r(),s.removeEventListener("animationcancel",e),s.removeEventListener("animationend",e)}))}}class Core{static get isMobile(){const e=/(iphone|ipod|ipad|android|iemobile|blackberry|bada)/.test(window.navigator.userAgent.toLowerCase());return e||(["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document)}static get Browser(){let e;const t=function(t){let n=t.indexOf(e);if(-1===n)return;const r=t.indexOf("rv:");return"Trident"===e&&-1!==r?parseFloat(t.substring(r+3)):parseFloat(t.substring(n+e.length+1))};let n={};return n[function(){const t=[{string:navigator.userAgent,subString:"Edge",identity:"Edge"},{string:navigator.userAgent,subString:"MSIE",identity:"IE"},{string:navigator.userAgent,subString:"Trident",identity:"IE"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.userAgent,subString:"Opera",identity:"Opera"},{string:navigator.userAgent,subString:"OPR",identity:"Opera"},{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.userAgent,subString:"Safari",identity:"Safari"}];for(let n=0;n<t.length;n++){let r=t[n].string;if(e=t[n].subString,-1!==r.indexOf(t[n].subString))return t[n].identity}return"Other"}()]=!0,n.version=t(navigator.userAgent)||t(navigator.appVersion)||"Unknown",n}static toCamelCase(e){return e.replace(/-([a-z])/g,(function(e){return e[1].toUpperCase()}))}static toDash(e){return e.split(/(?=[A-Z])/).join("-").toLowerCase()}static unescapeHTML(e){return(new DOMParser).parseFromString(e,"text/html").documentElement.textContent}static escapeHTML(e){const t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(e).replace(/[&<>"'`=\/]/g,(e=>t[e]))}static sanitizeHTML(e){if(e&&(e.indexOf("onclick")>=0||e.indexOf("onload")>=0||e.indexOf("onerror")>=0))return this.escapeHTML(e);const t=new RegExp("<s*(applet|audio|base|bgsound|embed|form|iframe|isindex|keygen|layout|link|meta|object|script|svg|style|template|video)[^>]*>(.*?)<s*/s*(applet|audio|base|bgsound|embed|form|iframe|isindex|keygen|layout|link|meta|object|script|svg|style|template|video)>","ig");return String(e).replace(t,(e=>this.escapeHTML(e)))}static createGUID(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}static getScriptLocation(){if("./"!==window[namespace].BaseUrl)return window[namespace].BaseUrl;return function(){if(document.currentScript){let e=document.currentScript.src,t=e.lastIndexOf("/");return e=e.substring(0,t),e}const e=new Error;let t="(",n=")";if(Smart.Utilities.Core.Browser.Safari&&(t="@",n="\n"),e.fileName)return e.fileName.replace("/smart.element.js","");let r=e.stack.split(t);return r=r[1],r=r.split(n)[0],r=r.split(":"),r.splice(-2,2),r=r.join(":"),r.replace("/smart.element.js","")}()}static assign(e,t){const n=e=>e&&"object"==typeof e&&!Array.isArray(e)&&null!==e;let r=Object.assign({},e);return n(e)&&n(t)&&Object.keys(t).forEach((i=>{n(t[i])?i in e?r[i]=this.assign(e[i],t[i]):Object.assign(r,{[i]:t[i]}):Object.assign(r,{[i]:t[i]})})),r}static html(e,t){const n=this;let r="",i=e.childNodes;if(!t){for(let e,t=0,s=i.length;t<s&&(e=i[t]);t++){const t=["strong"];if(e instanceof HTMLElement||e.tagName&&t.indexOf(e.tagName.toLowerCase())>=0){const t=e.tagName.toLowerCase(),i=e.attributes;let s="<"+t;for(let e,t=0;e=i[t];t++)s+=" "+e.name+'="'+e.value.replace(/[&\u00A0"]/g,Utilities.Core.escapeHTML)+'"';s+=">";["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"][t]&&(r+=s),r=r+s+n.html(e)+"</"+t+">"}else{if(8===e.nodeType)continue;r+=e.textContent.replace(/[&\u00A0<>]/g,Utilities.Core.escapeHTML)}}return r}{const n=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi;e.innerHTML=t.replace(n,"<$1></$2>")}}}let styleObservedElements=[];class StyleObserver{static watch(e){switch(e.nodeName.toLowerCase()){case"smart-grid":case"smart-kanban":case"smart-table":case"smart-pivot-table":case"smart-scheduler":case"smart-tabs":case"smart-card-view":case"smart-list-box":case"smart-combo-box":case"smart-drop-down-list":case"smart-calendar":case"smart-gauge":case"smart-numeric-text-box":case"smart-menu":case"smart-tree":styleObservedElements.push(e);break;default:return}StyleObserver.start()}static start(){StyleObserver.isStarted||(StyleObserver.isStarted=!0,StyleObserver.interval&&clearInterval(StyleObserver.interval),0===styleObservedElements.length||document.hidden?StyleObserver.isStarted=!1:StyleObserver.interval=setInterval((function(){StyleObserver.observe()}),100))}static stop(){StyleObserver.isStarted=!1,StyleObserver.interval&&clearInterval(StyleObserver.interval)}static observeElement(e){const t=e;if("test"===window.Smart.Mode||document.hidden)return void(StyleObserver.interval&&clearInterval(StyleObserver.interval));let n=e._computedStyle||"resize"!==t.hasStyleObserver?document.defaultView.getComputedStyle(t,null):{},r=!0,i="resize"!==t.hasStyleObserver?["paddingLeft","paddingRight","paddingTop","paddingBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth","display","visibility","font-size","font-family","font-style","font-weight","max-height","min-height","max-width","min-width","overflow","overflow-x","overflow-y"]:[];if(e.styleProperties&&(i=i.concat(e.styleProperties)),e.observableStyleProperties&&(i=e.observableStyleProperties),!t._styleInfo){t._styleInfo=[];for(let e=0;e<i.length;e++){const r=i[e],s=r.startsWith("--")?n.getPropertyValue(r):n[r];t._styleInfo[r]=s}return}if(e.isHidden||"none"!==n.display&&(0!==e.offsetWidth&&0!==e.offsetHeight||(e.isHidden=!0)),e.isHidden){if(e.visibilityChangedHandler(),e.isHidden)return;r=!1}let s=[];for(let e=0;e<i.length;e++){const r=i[e],o=r.startsWith("--")?n.getPropertyValue(r):n[r];t._styleInfo[r]!==o&&(s[r]={oldValue:t._styleInfo[r],value:o},s.length++),t._styleInfo[r]=o}s.length>0&&(t.$.fireEvent("styleChanged",{styleProperties:s},{bubbles:!1,cancelable:!0}),s.display&&r&&t.$.fireEvent("resize",t,{bubbles:!1,cancelable:!0}))}static observe(){for(let e=0;e<styleObservedElements.length;e++){const t=styleObservedElements[e];this.observeElement(t)}}static unwatch(e){StyleObserver.stop();const t=styleObservedElements.indexOf(e);-1!==t&&styleObservedElements.splice(t,1),StyleObserver.start()}}let dataContextInfo=[];const data=[],inputEventTypes=["resize","down","up","move","tap","taphold","swipeleft","swiperight","swipetop","swipebottom"];class InputEvents{constructor(e){const t=this;t.target=e,t.$target=new Extend(e),t.$document=e.$document?e.$document:new Extend(document),t.id=(Date.now().toString(36)+Math.random().toString(36).substr(2,5)).toUpperCase();let n={handlers:{},boundEventTypes:[],listen:t.listen.bind(t),unlisten:t.unlisten.bind(t)};return t.tapHoldDelay=750,t.swipeMin=10,t.swipeMax=5e3,t.swipeDelay=1e3,t.tapHoldDelay=750,t.inputEventProperties=["clientX","clientY","pageX","pageY","screenX","screenY"],inputEventTypes.forEach((e=>{n[e]=t=>{n.handlers[e]=t},t[e]=e=>{if(!n.handlers[e.type]){if(("mousemove"===e.type||"pointermove"===e.type||"touchmove"===e.type)&&n.handlers.move){const r=t.createEvent(e,"move");n.handlers.move(r)}return!0}return n.handlers[e.type](e)}})),t.listen(),t.handlers=n.handlers,n}listen(e){const t=this;if("resize"===e&&t.target!==document&&t.target!==window&&!1!==t.target.hasResizeObserver)if(Smart.Utilities.Core.Browser.Firefox){if(!t.target.resizeObserver){let e,n,r,i=!1,s=t.target.offsetWidth,o=t.target.offsetHeight;const a=new ResizeObserver((()=>{if(!i)return void(i=!0);const a=new CustomEvent("resize",{bubbles:!1,cancelable:!0});n=t.target.offsetWidth,r=t.target.offsetHeight,e=n!==s||r!==o,t.target.requiresLayout&&(e=!0),e&&(t.resize(a),t.target.requiresLayout=!1,s=n,o=r)}));a.observe(t.target),t.target.resizeObserver=a}}else if(!t.target.resizeTrigger){const e=document.createElement("div");e.className="smart-resize-trigger-container",e.innerHTML='<div class="smart-resize-trigger-container"><div class="smart-resize-trigger"></div></div><div class="smart-resize-trigger-container"><div class="smart-resize-trigger-shrink"></div></div>',e.setAttribute("aria-hidden",!0),window[namespace].EnableShadowDOM&&t.target.shadowRoot?t.target.shadowRoot.appendChild(e):t.target.appendChild(e),t.target.resizeTrigger=e;const n=e.childNodes[0],r=n.childNodes[0],i=e.childNodes[1],s=function(){r.style.width="100000px",r.style.height="100000px",n.scrollLeft=1e5,n.scrollTop=1e5,i.scrollLeft=1e5,i.scrollTop=1e5};let o,a,l,d,c=t.target.offsetWidth,p=t.target.offsetHeight;if(0===c||0===p){const e=function(){s(),t.target.removeEventListener("resize",e)};t.target.addEventListener("resize",e),s()}else s();t.target.resizeHandler=function(){a||(a=requestAnimationFrame((function(){if(a=0,l=t.target.offsetWidth,d=t.target.offsetHeight,o=l!==c||d!==p,t.target.requiresLayout&&(o=!0),!o)return;c=l,p=d;const e=new CustomEvent("resize",{bubbles:!1,cancelable:!0});t.resize(e),t.target.requiresLayout=!1}))),s()},n.addEventListener("scroll",t.target.resizeHandler),i.addEventListener("scroll",t.target.resizeHandler)}if(!t.isListening){if(t.isListening=!0,t.isPressed=!1,t.isReleased=!1,t.isInBounds=!1,window.PointerEvent)t.$target.listen("pointerdown.inputEvents"+t.id,t.pointerDown.bind(t)),t.$target.listen("pointerup.inputEvents"+t.id,t.pointerUp.bind(t)),t.$target.listen("pointermove.inputEvents"+t.id,t.pointerMove.bind(t)),t.$target.listen("pointercancel.inputEvents"+t.id,t.pointerCancel.bind(t));else{"ontouchstart"in window&&(t.$target.listen("touchmove.inputEvents"+t.id,t.touchMove.bind(t)),t.$target.listen("touchstart.inputEvents"+t.id,t.touchStart.bind(t)),t.$target.listen("touchend.inputEvents"+t.id,t.touchEnd.bind(t)),t.$target.listen("touchcancel.inputEvents"+t.id,t.touchCancel.bind(t))),t.$target.listen("mousedown.inputEvents"+t.id,t.mouseDown.bind(t)),t.$target.listen("mouseup.inputEvents"+t.id,t.mouseUp.bind(t)),t.$target.listen("mousemove.inputEvents"+t.id,t.mouseMove.bind(t)),t.$target.listen("mouseleave.inputEvents"+t.id,t.mouseLeave.bind(t))}t.target._handleDocumentUp||(t.target._handleDocumentUp=t.handleDocumentUp.bind(t),t.target._handleDocumentUpId=t.id,t.$document.listen("mouseup.inputEvents"+t.target._handleDocumentUpId,t.target._handleDocumentUp))}}unlisten(e){const t=this;if(t.isListening=!1,window.PointerEvent)t.$target.unlisten("pointerdown.inputEvents"+t.id),t.$target.unlisten("pointerup.inputEvents"+t.id),t.$target.unlisten("pointermove.inputEvents"+t.id),t.$target.unlisten("pointercancel.inputEvents"+t.id);else{"ontouchstart"in window&&(t.$target.unlisten("touchstart.inputEvents"+t.id),t.$target.unlisten("touchmove.inputEvents"+t.id),t.$target.unlisten("touchend.inputEvents"+t.id),t.$target.unlisten("touchcancel.inputEvents"+t.id)),t.$target.unlisten("mousedown.inputEvents"+t.id),t.$target.unlisten("mouseup.inputEvents"+t.id),t.$target.unlisten("mousemove.inputEvents"+t.id),t.$target.unlisten("mouseleave.inputEvents"+t.id)}if(t.target._handleDocumentUp&&(t.$document.unlisten("mouseup.inputEvents"+t.target._handleDocumentUpId,t.target._handleDocumentUp),delete t.target._handleDocumentUp,delete t.target._handleDocumentUpId),"resize"===e)if(Smart.Utilities.Core.Browser.Firefox)t.target.resizeObserver&&(t.target.resizeObserver.unobserve(t.target),delete t.target.resizeObserver);else if(t.target.resizeTrigger){const e=t.target.resizeTrigger,n=e.childNodes[0],r=e.childNodes[1];n.removeEventListener("scroll",t.target.resizeHandler),r.removeEventListener("scroll",t.target.resizeHandler),t.target.resizeHandler=null,e.parentNode.removeChild(e),delete t.target.resizeTrigger}}handleDocumentUp(e){const t=this;t.isPressed=!1,t.isReleased=!1,t.resetSwipe(e)}createEvent(e,t){const n=this,r=e.touches,i=e.changedTouches,s=r&&r.length?r[0]:i&&i.length?i[0]:void 0,o=new CustomEvent(t,{bubbles:!0,cancelable:!0,composed:void 0!==n.$target.element.getRootNode().host});if(o.originalEvent=e,s){for(let e=0;e<n.inputEventProperties.length;e++){const t=n.inputEventProperties[e];o[t]=s[t]}return o}for(let t in e)t in o||(o[t]=e[t]);return o}fireTap(e){const t=this;if(clearTimeout(this.tapHoldTimeout),!this.tapHoldFired&&this.isInBounds){const n=t.createEvent(e,"tap");t.tap(n)}}initTap(e){const t=this;t.isInBounds=!0,t.tapHoldFired=!1,t.tapHoldTimeout=setTimeout((function(){if(t.isInBounds){t.tapHoldFired=!0;const n=t.createEvent(e,"taphold");t.taphold(n)}}),t.tapHoldDelay)}pointerDown(e){return this.handleDown(e)}mouseDown(e){const t=this;if(!(t.isPressed||t.touchStartTime&&new Date-t.touchStartTime<500))return t.handleDown(e)}touchStart(e){const t=this;return t.touchStartTime=new Date,t.isTouchMoved=!0,t.handleDown(e)}mouseUp(e){const t=this;if(!(t.isReleased||t.touchEndTime&&new Date-t.touchEndTime<500))return t.handleUp(e)}handleDown(e){const t=this;t.isReleased=!1,t.isPressed=!0;const n=t.createEvent(e,"down");return(t.handlers.tap||t.handlers.taphold)&&t.initTap(n),(t.handlers.swipeleft||t.handlers.swiperight||t.handlers.swipetop||t.handlers.swipebottom)&&t.initSwipe(n),t.down(n)}handleUp(e){const t=this;t.isReleased=!0,t.isPressed=!1;const n=t.createEvent(e,"up"),r=t.up(n);return(t.handlers.tap||t.handlers.taphold)&&t.fireTap(n),t.resetSwipe(n),r}handleMove(e){const t=this;let n=t.move(e);return t.isPressed&&(t._maxSwipeVerticalDistance=Math.max(t._maxSwipeVerticalDistance,Math.abs(t._startY-e.pageY)),t._maxSwipeHorizontalDistance=Math.max(t._maxSwipeHorizontalDistance,Math.abs(t._startX-e.pageX)),n=t.handleSwipeEvents(e)),n}touchEnd(e){return this.touchEndTime=new Date,this.handleUp(e)}pointerUp(e){return this.handleUp(e)}pointerCancel(e){this.pointerUp(e)}touchCancel(e){this.touchEnd(e)}mouseLeave(){this.isInBounds=!1}mouseMove(e){if(!this.isTouchMoved)return this.handleMove(e)}pointerMove(e){return this.handleMove(e)}touchMove(e){const t=this,n=e.touches,r=e.changedTouches,i=n&&n.length?n[0]:r&&r.length?r[0]:void 0;for(let n=0;n<t.inputEventProperties.length;n++){const r=t.inputEventProperties[n];void 0===e[r]&&(e[r]=i[r])}return t.isTouchMoved=!0,t.handleMove(e)}handleSwipeEvents(e){const t=this;let n=!0;return(t.handlers.swipetop||t.handlers.swipebottom)&&(n=this.handleVerticalSwipeEvents(e)),!1===n||(t.handlers.swipeleft||t.handlers.swiperight)&&(n=this.handleHorizontalSwipeEvents(e)),n}handleVerticalSwipeEvents(e){let t,n;return t=e.pageY,n=t-this._startY,this.swiped(e,n,"vertical")}handleHorizontalSwipeEvents(e){let t,n;return t=e.pageX,n=t-this._startX,this.swiped(e,n,"horizontal")}swiped(e,t,n){const r=this;if(n=n||0,Math.abs(t)>=r.swipeMin&&!r._swipeEvent&&!r._swipeLocked){let i=t<0?"swipeleft":"swiperight";if("horizontal"===n?r._swipeEvent=r.createEvent(e,i):(i=t<0?"swipetop":"swipebottom",r._swipeEvent=r.createEvent(e,t<0?"swipetop":"swipebottom")),r[i]&&(r[i](this._swipeEvent),Math.abs(t)<=this.swipeMax))return e.stopImmediatePropagation(),!1}return!0}resetSwipe(){this._swipeEvent=null,clearTimeout(this._swipeTimeout)}initSwipe(e){const t=this;t._maxSwipeVerticalDistance=0,t._maxSwipeHorizontalDistance=0,t._startX=e.pageX,t._startY=e.pageY,t._swipeLocked=!1,t._swipeEvent=null,t._swipeTimeout=setTimeout((function(){t._swipeLocked=!0}),t.swipeDelay)}}class Extend{constructor(e){this.events={},this.handlers={},this.element=e}hasClass(e){const t=this,n=e.split(" ");for(let e=0;e<n.length;e++){if(!t.element.classList.contains(n[e]))return!1}return!0}addClass(e){const t=this;if(t.hasClass(e))return;const n=e.split(" ");for(let e=0;e<n.length;e++)t.element.classList.add(n[e]);t.isNativeElement||StyleObserver.observeElement(t.element)}removeClass(e){const t=this;if(0===arguments.length)return void t.element.removeAttribute("class");const n=e.split(" ");for(let e=0;e<n.length;e++)t.element.classList.remove(n[e]);""===t.element.className&&t.element.removeAttribute("class"),t.isNativeElement||StyleObserver.observeElement(t.element)}get isCustomElement(){const e=this;return!!e.element.tagName.startsWith(namespace)||(e.element instanceof window[namespace].BaseElement==!0||"DIV"!==e.element.tagName&&"SPAN"!==e.element.tagName&&"BUTTON"!==e.element.tagName&&"INPUT"!==e.element.tagName&&"UL"!==e.element.tagName&&"LI"!==e.element.tagName&&document.createElement(e.element.nodeName)instanceof window[namespace].BaseElement==!0)}get isNativeElement(){return!this.isCustomElement}dispatch(e){const t=this,n=t.events[e.type];let r=!1;if(n.length>1)for(let e=0;e<n.length;e++){const t=n[e];if(t.namespace&&t.namespace.indexOf("_")>=0){r=!0;break}}r&&n.sort((function(e,t){let n=e.namespace,r=t.namespace;return n=-1===n.indexOf("_")?0:parseInt(n.substring(n.indexOf("_")+1)),r=-1===r.indexOf("_")?0:parseInt(r.substring(r.indexOf("_")+1)),n<r?-1:n>r?1:0}));for(let r=0;r<n.length;r++){const i=n[r];if(e.namespace=i.namespace,e.context=i.context,e.defaultPrevented)break;const s=i.handler.apply(t.element,[e]);if(void 0!==s&&(e.result=s,!1===s)){e.preventDefault(),e.stopPropagation();break}}return e.result}fireEvent(e,t,n){const r=this;n||(n={bubbles:!0,cancelable:!0,composed:null!==r.element.getRootNode().host}),n.detail=t||{};const i=new CustomEvent(e,n);if(i.originalStopPropagation=i.stopPropagation,i.stopPropagation=function(){return i.isPropagationStopped=!0,i.originalStopPropagation()},r.dispatchEvent(i),window[namespace].isVue){const t=Utilities.Core.toDash(e);if(t!==e){const e=new CustomEvent(t,n);e.originalStopPropagation=i.stopPropagation,e.stopPropagation=function(){return e.isPropagationStopped=!0,e.originalStopPropagation()},r.dispatchEvent(e)}}return i}get isPassiveSupported(){const e=this;if(void 0!==e.supportsPassive)return e.supportsPassive;e.supportsPassive=!1;try{let t=Object.defineProperty({},"passive",{get:function(){e.supportsPassive=!0}});window.addEventListener("testPassive",null,t),window.removeEventListener("testPassive",null,t)}catch(e){}return e.supportsPassive}dispatchEvent(e){const t=this,n=e.type,r=t.element.context,i=n.substring(0,1).toUpperCase()+n.substring(1);t.element.context=document,t.element["on"+i]?t.element["on"+i](e):t.element["on"+n.toLowerCase()]?t.element["on"+n.toLowerCase()](e):t.element.dispatchEvent(e),t.element.context=r}listen(e,t){const n=this,r=e.split("."),i=r.slice(1).join("."),s=r[0];n.events[s]||(n.events[s]=[]);const o={type:s,handler:t,context:n.element,namespace:i};inputEventTypes.indexOf(s)>=0&&(n.inputEvents||(n.inputEvents=new InputEvents(n.element)),n.inputEvents[s]((function(e){n.dispatchEvent(e)})),n.inputEvents.boundEventTypes.push(s),n.inputEvents.listen(s)),0===n.events[s].length&&(n.handlers[s]=n.dispatch.bind(n),"wheel"===s?n.element.addEventListener("wheel",n.handlers[s],!!n.isPassiveSupported&&{passive:!1}):"touchmove"===s||"touchstart"===s||"touchend"===s?n.element.addEventListener(s,n.handlers[s],!!n.isPassiveSupported&&{passive:!1}):n.element.addEventListener(s,n.handlers[s],!1)),n.events[s].push(o)}unlisten(e){const t=this,n=e.split("."),r=n.slice(1).join("."),i=n[0];let s=t.events[i];if(t.inputEvents&&t.inputEvents.boundEventTypes.indexOf(i)>=0&&(t.inputEvents.boundEventTypes.splice(t.inputEvents.boundEventTypes.indexOf(i),1),0===t.inputEvents.boundEventTypes.length&&t.inputEvents.unlisten(i)),s){for(let e=0;e<s.length;e++){if(""!==r){let e=s.findIndex((e=>e.namespace===r));s.splice(e,1);break}s=[]}0===s.length&&(t.element.removeEventListener(i,t.handlers[i]),t.events[i]=[],delete t.handlers[i])}}getAttributeValue(e,t){const n=this,r=n.element.getAttribute(e);if(n.isNativeElement)return n.deserialize(r,t);const i=n.element.propertyByAttributeName[e];return void 0===i.deserialize?n.deserialize(r,t,i.nullable):n.element[i.deserialize](r)}setAttributeValue(e,t,n){const r=this;let i,s=!1;if(r.isNativeElement){if(i=r.serialize(t,n),"boolean"===n){if(["checked","selected","async","autofocus","autoplay","controls","defer","disabled","hidden","ismap","loop","multiple","open","readonly","required","scoped"].indexOf(e)>=0)return void(t?r.element.setAttribute(e,""):r.element.removeAttribute(e))}}else{const o=r.element.propertyByAttributeName[e];s=!o||o.nullable,i=o&&o.serialize?r.element[o.serialize](t):r.serialize(t,n,s)}"array"!==n&&"object"!==n||"[]"!==i&&"{}"!==i?void 0===i?(r.element.removeAttribute(e),r.element.shadowRoot&&r.element.$.root&&r.element.$.root.removeAttribute(e)):(r.element.setAttribute(e,i),r.element.shadowRoot&&r.element.$.root&&r.element.$.root.setAttribute(e,i)):r.element.removeAttribute(e)}serialize(e,t,n){if(void 0===t&&(t=Utilities.Types.getType(e)),void 0===e||!n&&null===e)return;if(n&&null===e)return"null";if("string"===t)return e;if("boolean"===t||"bool"===t){if(!0===e||"true"===e||1===e||"1"===e)return"";if(!1===e||"false"===e||0===e||"0"===e)return}if("array"===t)return JSON.stringify(e);return["string","number","int","integer","float","date","any","function"].indexOf(t)>=0?e.toString():"object"===t?JSON.stringify(e):void 0}deserialize(e,t,n){const r="null"===e;if(void 0!==e&&(!r||n)){if(r&&n)return null;if("boolean"===t||"bool"===t)return null!==e;if("number"===t||"float"===t)return"NaN"===e?NaN:"Infinity"===e?1/0:"-Infinity"===e?-1/0:parseFloat(e);if("int"===t||"integer"===t)return"NaN"===e?NaN:"Infinity"===e?1/0:"-Infinity"===e?-1/0:parseInt(e);if("string"===t)return e;if("any"===t)return e;if("date"===t)return new Date(e);if("function"===t){if("function"==typeof window[e])return window[e]}else if("array"===t||"object"===t)try{const t=JSON.parse(e);if(t)return t}catch(n){if(window[e]&&"object"==typeof window[e])return window[e];if("object"===t&&e.indexOf("{")>=0){let t=(e=e.replace(/{/gi,"").replace(/}/gi,"").replace("[","").replace("]","").replace(/'/gi,"").replace(/"/gi,"").trim()).trim().split(","),n={};for(let e=0;e<t.length;e++){const r=t[e].split(":")[0].trim(),i=t[e].split(":")[1].trim();n[r]=i}return n}if("array"===t&&e.indexOf("[")>=0){if(e.indexOf("{")>=0){let t=e.replace(/{/gi,"").replace("[","").replace("]","").replace(/'/gi,"").replace(/"/gi,"").trim();t=t.split("},");for(let e=0;e<t.length;e++){let n={},r=t[e].trim().split(",");for(let e=0;e<r.length;e++){const t=r[e].split(":")[0].trim(),i=r[e].split(":")[1].trim();n[t]=i}t[e]=n}return t}return e.replace("[","").replace("]","").replace(/'/gi,"").replace(/"/gi,"").trim().split(",")}}}}}class Animation{static get Ripple(){return Ripple}}class Utilities{static get Types(){return Types}static get Core(){return Core}static get Animation(){return Animation}static get InputEvents(){return InputEvents}static Extend(e){return new Extend(e)}static Assign(e,t){if(e.indexOf(".")>=0){const n=e.split(".");return Utilities[n[0]]||(Utilities[n[0]]={}),void(Utilities[n[0]][n[1]]=t)}Utilities[e]=t}}const $document=Utilities.Extend(document);let observerTimer=null;document.addEventListener("click",(()=>{StyleObserver.start(),observerTimer&&clearTimeout(observerTimer),observerTimer=setTimeout((()=>{StyleObserver.stop()}),1e4)})),document.addEventListener("mouseenter",(()=>{StyleObserver.start()})),document.addEventListener("mouseleave",(()=>{StyleObserver.stop()}));class BindingModule{}BindingModule.cache={};class BaseElement extends HTMLElement{static get properties(){return{appendTo:{value:"",type:"string"},animation:{value:"advanced",type:"string",allowedValues:["none","simple","advanced"]},unfocusable:{value:!1,type:"boolean"},disabled:{value:!1,type:"boolean"},dataContext:{value:null,reflectToAttribute:!1,type:"any"},debugMode:{value:!0,type:"boolean",reflectToAttribute:!1},unlockKey:{value:"",type:"string",reflectToAttribute:!1},locale:{value:"en",type:"string",reflectToAttribute:!1},localizeFormatFunction:{value:null,type:"any",reflectToAttribute:!1},messages:{value:{en:{propertyUnknownName:"Invalid property name: '{{name}}'!",propertyUnknownType:"'{{name}}' property is with undefined 'type' member!",propertyInvalidValue:"Invalid '{{name}}' property value! Actual value: '{{actualValue}}', Expected value: '{{value}}'!",propertyInvalidValueType:"Invalid '{{name}}' property value type! Actual type: '{{actualType}}', Expected type: '{{type}}'!",methodInvalidValueType:"Invalid '{{name}}' method argument value type! Actual type: '{{actualType}}', Expected type: '{{type}}' for argument with index: '{{argumentIndex}}'!",methodInvalidArgumentsCount:"Invalid '{{name}}' method arguments count! Actual arguments count: '{{actualArgumentsCount}}', Expected at least: '{{argumentsCount}}' argument(s)!",methodInvalidReturnType:"Invalid '{{name}}' method return type! Actual type: '{{actualType}}', Expected type: '{{type}}'!",elementNotInDOM:"Element does not exist in DOM! Please, add the element to the DOM, before invoking a method.",moduleUndefined:"Module is undefined.",missingReference:"{{elementType}}: Missing reference to '{{files}}'.",htmlTemplateNotSuported:"{{elementType}}: Web Browser doesn't support HTMLTemplate elements.",invalidTemplate:"{{elementType}}: '{{property}}' property accepts a string that must match the id of an HTMLTemplate element from the DOM."}},reflectToAttribute:!1,inherit:!0,type:"object"},props:{value:null,reflectToAttribute:!1,isHierarchicalProperty:!0,type:"any"},readonly:{value:!1,type:"boolean"},renderMode:{value:"auto",type:"string",reflectToAttribute:!1,allowedValues:["auto","manual"]},rightToLeft:{value:!1,type:"boolean"},rethrowError:{value:!0,type:"boolean",reflectToAttribute:!1},theme:{value:window[namespace].Theme,type:"string"},visibility:{value:"visible",allowedValues:["visible","collapsed","hidden"],type:"string"},wait:{value:!1,type:"boolean"}}}getBindings(e,t){const n=this;let r=0,i={},s=(e=>{if(e instanceof HTMLElement)return n.parseAttributes(e);{let t=n.parseProperty(e.data?e.data.trim():null,"textContent",e);if(t)return n&&e.parentNode===n.$.content&&(t.value=""!==n.$.html?n.$.html:void 0,n.innerHTML=""),{textContent:t}}})(e);s&&(i.data=s),t||(i.mapping=[],t=i),e.getAttribute&&(i.nodeId=e.getAttribute("smart-id"),t&&s&&(t.mapping[i.nodeId]=s)),i.node=e,e.firstChild&&(i.children={});for(let s=e.firstChild;s;s=s.nextSibling)i.children[r++]=n.getBindings(s,t);return i}_addRemovePropertyBinding(e,t,n,r,i){if(!e||!t||!n)return;const s=this,o=s.bindings,a=n.getAttribute("smart-id"),l=e.indexOf("{{")>=0;let d=!1;(e=e.replace("{{","").replace("}}","").replace("[[","").replace("]]","")).indexOf("!")>=0&&(e=e.replace("!",""),d=!0);const c=s._properties[e],p={name:e,reflectToAttribute:c.reflectToAttribute,twoWay:l,type:c.type,not:d};if(i&&!r){const n={},r={name:e,targetPropertyName:t,reflectToAttribute:c.reflectToAttribute,twoWay:l,type:c.type,not:d};n[e]=r,o.mapping[a]=n}const u=function(e){for(let i in e){const o=e[i];if(o.nodeId===a){o.data||(o.data={}),r?(o.data[t]=null,delete o.data[t]):o.data[t]=p;break}if(o.children)u(o.children);else if(o.node&&o.node.children&&o.node===n.parentElement){const e=o.node;if(!e.firstChild)continue;o.children={};let t=0;for(let n=e.firstChild;n;n=n.nextSibling)o.children[t++]=s.getBindings(n);u(o.children)}}};u(o.children),r?delete s.boundProperties[e]:s.boundProperties[e]=!0,s.updateBoundNodes(e)}addPropertyBinding(e,t,n,r){this._addRemovePropertyBinding(e,t,n,!1,r)}removePropertyBinding(e,t,n,r){this._addRemovePropertyBinding(e,t,n,!0,r)}parseAttributes(e){const t=this;let n;for(let r=0;r<e.attributes.length;r++){const i=e.attributes[r],s=i.name,o=i.value;BindingModule.cache["toCamelCase"+s]||(BindingModule.cache["toCamelCase"+s]=Utilities.Core.toCamelCase(s));const a=BindingModule.cache["toCamelCase"+s];if(s.indexOf("(")>=0){let r=s.substring(1,s.length-1);if(t&&!t.dataContext){t.templateListeners[e.getAttribute("smart-id")+"."+r]=o,e.removeAttribute(s);continue}{n||(n={});const e=o.substring(0,o.indexOf("("));n[a]={isEvent:!0,name:r,value:e};continue}}let l=t.parseProperty(o,s,e);l&&(n||(n={}),n[a]=l)}return n}parseProperty(e,t){if(!e||!e.length)return;const n=this;let r,i=e.length,s=0,o=0,a=0,l=!0;for(;o<i;){s=e.indexOf("{{",o);let t=e.indexOf("[[",o),n="}}";if(t>=0&&(s<0||t<s)&&(s=t,l=!1,n="]]"),a=s<0?-1:e.indexOf(n,s+2),a<0)return;r=r||{};let i=e.slice(s+2,a).trim();r.name=i,o=a+2}const d=r.name,c=n?n._properties[d]:null;if(r.twoWay=l,r.ready=!1,n&&(d.indexOf("::")>=0?n.boundProperties[d.substring(0,d.indexOf("::"))]=!0:n.boundProperties[d]=!0),c)r.type=c.type,r.reflectToAttribute=c.reflectToAttribute;else{["checked","selected","async","autofocus","autoplay","controls","defer","disabled","hidden","ismap","loop","multiple","open","readonly","required","scoped"].indexOf(t)>=0?r.type="boolean":r.type="string",r.reflectToAttribute=!0}return r}updateTextNodes(){const e=this;e.updateTextNode(e.shadowRoot||e,e.bindings,e)}updateTextNode(e,t,n){const r=this;if(!t)return;let i=0;for(let s=e.firstChild;s&&t.children;s=s.nextSibling)r.updateTextNode(s,t.children[i++],n);if(t&&t.data)for(let e in t.data){const r=t.data[e],i=r.name;"textContent"===e&&r.twoWay&&!r.updating&&void 0!==r.value&&(n[i]=r.value)}}updateBoundProperty(e,t){if(t.updating)return;const n=this;t.updating=!0,n[e]=t.value,t.updating=!1}updateBoundNodes(e){const t=this;if(t.updateBoundNode(t.shadowRoot||t,t.bindings,t,e),t.detachedChildren.length>0)for(let n=0;n<t.detachedChildren.length;n++){const r=t.detachedChildren[n],i=r.getAttribute("smart-id"),s=function(e){if(e.nodeId===i)return e;for(let t in e.children){const n=e.children[t];if((n.getAttribute?n.getAttribute("smart-id"):"")===i)return e;if(n.children){const e=s(n);if(e)return e}}return null},o=s(t.bindings);if(o)t.updateBoundNode(r,o,t,e,!0);else if(r.getAttribute&&t.bindings.mapping){const n=t,r=t.bindings;if(r)for(let i in r.mapping){const s=n.querySelector('[smart-id="'+i+'"]');if(s){const o=r.mapping[i];t.updateBoundData(s,o,n,e)}}}}}updateBoundMappedNodes(){const e=this,t=e.bindings,n=e;if(t.mapping)for(let r in t.mapping){let i=n.querySelector('[smart-id="'+r+'"]');if(n.shadowRoot&&(i=n.querySelector('[id="'+r+'"]'),i||(i=n.shadowRoot.querySelector('[id="'+r+'"]')||n.shadowRoot.querySelector('[smart-id="'+r+'"]'))),i){const s=t.mapping[r];e.updateBoundData(i,s,n)}else if(n.getAttribute("aria-controls")){let s=document.getElementById(n.getAttribute("aria-controls"));if(!s&&n.shadowRoot&&(s=n.shadowRoot.getElementById(n.getAttribute("aria-controls"))),i=s.querySelector('[smart-id="'+r+'"]'),i){const s=t.mapping[r];e.updateBoundData(i,s,n)}}}}updateBoundNode(e,t,n,r,i){const s=this;if(!t)return;let o=0;if(i){if(i&&!t.data)for(let a=e.firstChild;a&&t.children;a=a.nextSibling)if(a.getAttribute){const e=a.getAttribute("smart-id"),i=function(){for(let n in t.children)if(t.children[n].nodeId===e)return t.children[n]}();s.updateBoundNode(a,i,n,r),o++}else s.updateBoundNode(a,t.children[o++],n,r,i)}else for(let i=e.firstChild;i&&t.children;i=i.nextSibling)if(i.getAttribute){const e=i.getAttribute("smart-id"),a=function(){for(let n in t.children)if(t.children[n].nodeId===e)return t.children[n]}();s.updateBoundNode(i,a,n,r),o++}else s.updateBoundNode(i,t.children[o++],n,r);if(!t||!t.data)return;const a=t.data;s.updateBoundData(e,a,n,r)}updateBoundData(e,t,n,r){const i=this;for(let s in t){const o=t[s];let a=o.name;if(!o.updating&&(a.indexOf("::")>=0&&(a=a.substring(0,a.indexOf("::"))),void 0===r||r===a)){if(a.indexOf("(")>=0){let e=a.substring(a.indexOf("("));const t=a.substring(0,a.indexOf("("));if(e=e.substring(1,e.length-1),e=e.replace(/ /gi,""),e=e.split(","),e.length>0&&""!==e[0]){let r=[];for(let t=0;t<e.length;t++)r.push(n[e[t]]);o.value=n[t].apply(n,r)}else o.value=n[t]();o.type=typeof o.value}else o.value=n[a];if("innerHTML"===a){if(e[s].toString().trim()!==n[a].toString().trim()){if(window.smartBlazor&&e[s].indexOf("\x3c!--")>=0){(o.ready||n._properties[a].defaultValue!==o.value)&&(e[s]=o.value.toString());continue}(o.ready||n._properties[a].defaultValue!==o.value)&&(e[s]=o.value.toString().trim())}}else o.not?(e[s]=!o.value,o.targetPropertyName&&(e[o.targetPropertyName]=!o.value)):(e[s]=o.value,o.targetPropertyName&&(e[o.targetPropertyName]=o.value));if(e.$&&e.$.isNativeElement){BindingModule.cache["toDash"+s]||(BindingModule.cache["toDash"+s]=Utilities.Core.toDash(s));const t=BindingModule.cache["toDash"+s],n=e.$.getAttributeValue(t,o.type);!o.reflectToAttribute||n===o.value&&o.ready||e.$.setAttributeValue(t,o.value,o.type),o.reflectToAttribute||e.$.setAttributeValue(t,null,o.type)}if(!o.ready){if(e.$&&e.$.isCustomElement){BindingModule.cache["toDash"+s]||(BindingModule.cache["toDash"+s]=Utilities.Core.toDash(s));const t=BindingModule.cache["toDash"+s];e._properties||(e._beforeCreatedProperties=e._properties=e.propertyByAttributeName=[]),e._properties[s]||(e._properties[s]={attributeName:t},e._beforeCreatedProperties&&(e._beforeCreatedProperties[s]=e._properties[s]),e.propertyByAttributeName[t]=e._properties[s]);const n=e._properties[s];n.isUpdating=!0,o.reflectToAttribute&&(o.not?e.$.setAttributeValue(n.attributeName,!o.value,o.type):e.$.setAttributeValue(n.attributeName,o.value,o.type)),o.reflectToAttribute||e.$.setAttributeValue(n.attributeName,null,o.type),n.isUpdating=!1}if(o.twoWay){const t=function(t){if(o.value=t,e.$&&e.$.isNativeElement){BindingModule.cache["toDash"+s]||(BindingModule.cache["toDash"+s]=Utilities.Core.toDash(s));const t=BindingModule.cache["toDash"+s],n=e.$.getAttributeValue(t,o.type);o.reflectToAttribute&&n!==o.value&&e.$.setAttributeValue(t,o.value,o.type),o.reflectToAttribute||e.$.setAttributeValue(t,null,o.type)}};if(o.name.indexOf("::")>=0){const n=o.name.indexOf("::"),r=o.name.substring(n+2);i["$"+e.getAttribute("smart-id")].listen(r,(function(){t(e[s]);const n=o.name.substring(0,o.name.indexOf("::"));i.updateBoundProperty(n,o)}))}if(e.$&&e.$.isCustomElement){e._properties[s]&&(e._properties[s].notify=!0),BindingModule.cache["toDash"+s]||(BindingModule.cache["toDash"+s]=Utilities.Core.toDash(s));const n=BindingModule.cache["toDash"+s];i["$"+e.getAttribute("smart-id")].listen(n+"-changed",(function(e){let n=e.detail;t(n.value);const r=i.context;e.context!==document&&(i.context=i),i.updateBoundProperty(o.name,o),i.context=r}))}}}o.ready=!0}}}static clearCache(){this.cache={}}addMessages(e,t){Object.assign(this.messages[e],t)}setLocale(e,t){const n=this;n.messages=n.messages||{},n.messages[e]={...n.messages[e]||{},...t},n.locale=e}localize(e,t){const n=this;if(!n.messages||!n.messages[n.locale])return;let r=n.messages[n.locale][e];if(""===r)return"";if(!r){const r=n.messages.en;if(r){let n=r[e];if(n){for(let e in t){let r=t[e];n=n.replace(new RegExp("{{"+e+"}}","g"),r)}return n}return e}}const i=r;for(let e in t){let n=t[e];r=r.replace(new RegExp("{{"+e+"}}","g"),n)}if(n.localizeFormatFunction){const s=n.localizeFormatFunction(i,r,t,e);if(void 0!==s)return s}return r}static get requires(){return{}}static get listeners(){return{"theme-changed":function(e){this.theme=e.detail.newValue}}}static get methods(){return{}}get classNamesMap(){return{animation:"smart-animate",rippleAnimation:"smart-ripple"}}get hasAnimation(){return"none"!==this.animation}get hasRippleAnimation(){return"none"!==this.animation&&"advanced"===this.animation}static get modules(){return window[namespace].Modules}get properties(){const e=this;return e._properties||(e._properties=[]),e._properties}get parents(){const e=this;let t=[],n=e.parentNode;for(;n&&9!==n.nodeType;)n instanceof HTMLElement==!0&&t.push(n),n=n.parentNode;const r=e.getRootNode();if(r.host){const e=e=>{let t=[e],n=e.parentNode;for(;n&&9!==n.nodeType;)n instanceof HTMLElement==!0&&t.push(n),n=n.parentNode;return t};t=t.concat(e(r.host))}return window[namespace].EnableShadowDOM&&e.isInShadowDOM&&e.shadowParent&&(t=t.concat(e.shadowParent.parents)),t}log(e){this._logger("log",e)}warn(e){this._logger("warn",e)}error(e){this._logger("error",e)}_logger(e,t){if(this.debugMode){const n=t instanceof Error?t.message:t.toString();console[e](n)}if(this.rethrowError&&"error"===e)throw t}get focused(){return this.contains(document.activeElement)}template(){return"<div></div>"}registered(){const e=this;e.onRegistered&&e.onRegistered()}created(){const e=this;e.isReady=!1,e._initElement(e),e._setModuleState("created"),e.onCreated&&e.onCreated()}completed(){const e=this;e.isCompleted=!0,e._onCompleted&&e._onCompleted(),e.onCompleted&&e.onCompleted()}whenReady(e){const t=this;t.isCompleted?e():(t.whenReadyCallbacks||(t.whenReadyCallbacks=[]),t.whenReadyCallbacks.push(e))}whenRendered(e){const t=this;if(e){if(t.isRendered)return void e();t.whenRenderedCallbacks||(t.whenRenderedCallbacks=[]),t.whenRenderedCallbacks.push(e)}return new Promise((e=>{t.isRendered?e():(t.whenRenderedCallbacks||(t.whenRenderedCallbacks=[]),t.whenRenderedCallbacks.push(e))}))}addThemeClass(){const e=this;""!==e.theme&&e.classList.add("smart-"+e.theme)}addDefaultClass(){const e=this;e.classList.add(namespace.toLowerCase()+"-element"),e.classList.add(e.nodeName.toLowerCase())}_renderShadowRoot(){const e=this;if(e.shadowRoot){e.$.root.classList.add(e.nodeName.toLowerCase());for(let t=0;t<e.attributes.length;t++){const n=e.attributes[t];"class"===n.name||"id"===n.name||"style"===n.name||"tabindex"===n.name||n.name.indexOf("aria")>=0||e.$.root.setAttribute(n.name,n.value)}for(let t=0;t<e.classList.length;t++){const n=e.classList[t];"smart-element-init"!==n&&"smart-element"!==n&&"smart-hidden"!==n&&"smart-visibility-hidden"!==n&&e.$.root.classList.add(n)}}}render(){const e=this;if(!e.isRendered&&(e.isRendered=!0,e.isRendering=!1,e.context=document,e._renderShadowRoot(),e.whenRenderedCallbacks)){for(let t=0;t<e.whenRenderedCallbacks.length;t++)e.whenRenderedCallbacks[t]();e.whenRenderedCallbacks=[]}e.onRender&&e.onRender(),e.disabled&&e.setAttribute("aria-disabled",!0),e.readonly&&-1!==["checkbox","combobox","grid","gridcell","listbox","radiogroup","slider","spinbutton","textbox"].indexOf(e.getAttribute("role"))&&e.setAttribute("aria-readonly",!0)}addEventListener(e,t,n){const r=this;if("ready"!==e||!r.isRendered)return super.addEventListener(e,t,n);Promise.resolve().then((()=>{t.call(r,new CustomEvent(e,{target:r}))}))}ready(){const e=this;if(e._setId(),e.addThemeClass(),e.addDefaultClass(),"collapsed"===e.visibility?e.classList.add("smart-hidden"):"hidden"===e.visibility&&e.classList.add("smart-visibility-hidden"),e.dataContext&&e.applyDataContext(),e.onReady&&e.onReady(),e.shadowRoot&&Smart(e._selector)){if(Smart(e._selector).styleUrls){const t=Smart(e._selector).styleUrls;for(let n=0;n<t.length;n++)e.importStyle(t[n])}if(Smart(e._selector).styles){const t=document.createElement("style");t.innerHTML=Smart(e._selector).styles,e.shadowRoot.insertBefore(t,e.shadowRoot.firstChild)}}Smart(e._selector)&&Smart(e._selector).ready&&Smart(e._selector).ready()}_setId(){const e=this;if(!e.id){const t=e.elementName;e.id=t.slice(0,1).toLowerCase()+t.slice(1)+Math.floor(65536*(1+Math.random())).toString(16).substring(1)}}loadLicenseCache(){try{const e=localStorage.getItem(LICENSE_CACHE_KEY);return e?JSON.parse(e):null}catch{return null}}saveLicenseCache(e){try{localStorage.setItem(LICENSE_CACHE_KEY,JSON.stringify({...e,checkedAt:Date.now()}))}catch{}}isCacheValid(e){let t=LICENSE_CACHE_TTL;return e&&e.licenseType&&-1===e.licenseType.toLowerCase().indexOf("monthly")&&(t=12*LICENSE_CACHE_TTL),e&&Date.now()-e.checkedAt<t}async validateLicenseOnline(e){const t=this;if(!("undefined"==typeof navigator||!1!==navigator.onLine))return null;if(window.localStorage.getItem("smart_license_check")){const e=parseInt(window.localStorage.getItem("smart_license_check"),10),t=864e5;if(Date.now()-e<t)return null}window.localStorage.setItem("smart_license_check",Date.now().toString());const n=await fetch("https://jqwidgets.com/portal/validate.php",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({guid:e})}),r=await n.text();let i;try{i=JSON.parse(r),i&&t.saveLicenseCache(i)}catch{console.log("Invalid License. Please, contact support@jqwidgets.com for assistance.")}return i}async checkLicense(){const e=this;if(-1===window.location.hostname.indexOf("htmlelements")){const t="9B3C72B9-D78F-5E17-8D07-0CBC0E1EDC29",n=new Date(2026,2,25);if(e.unlockKey&&(window[namespace].License=e.unlockKey),document.body.hasAttribute("smart-license")){const e=document.body.getAttribute("smart-license");window[namespace].License=e}if("Evaluation"!==window[namespace].License&&window[namespace].License!==t){const r=e.loadLicenseCache();let i=null;if(e.isCacheValid(r))i=r;else{try{i=await e.validateLicenseOnline(window[namespace].License)}catch(e){console.warn("License online check failed",e)}!i&&r&&(i=r)}if(i&&i.valid)window[namespace].License=t;else if(i&&!i.valid&&i.validUntil){const e=i.validUntil,r=i.licenseType,[s,o,a]=e.split("-").map(Number);n<new Date(s,o-1,a)&&(window[namespace].License=t,-1===(""+r).toLowerCase().indexOf("subscription")&&(window[namespace].License=t))}}if(window[namespace].License!==t){if(e.unlockKey===t)return;if(document.body.hasAttribute("smart-license")){if(document.body.getAttribute("smart-license")===t)return void(window[namespace].License=t)}e.logWatermark(),e.logLicense(),e.logGithub(),window[namespace].License=t}}}logWatermark(){const e="smart-watermark";if(document.getElementById(e))return;let t;const n=document.createElement("a");n.id=e,n.href="https://htmlelements.com/license/",n.target="_blank",n.rel="noopener";const r=document.createElement("span");function i(){t=setTimeout((()=>{n.style.opacity="0",n.style.transform="translateY(6px) scale(.98)",setTimeout((()=>n.remove()),400)}),1e4)}r.textContent="https://htmlelements.com/license/",n.appendChild(r),n.style.position="fixed",n.style.right="16px",n.style.bottom="16px",n.style.padding="12px 18px",n.style.borderRadius="999px",n.style.background="linear-gradient(135deg, #0C3D78, #1565C0)",n.style.color="#fff",n.style.fontSize="14px",n.style.fontWeight="600",n.style.fontFamily="system-ui, -apple-system, Segoe UI, Roboto, sans-serif",n.style.textDecoration="none",n.style.boxShadow="0 10px 25px rgba(12,61,120,.35)",n.style.backdropFilter="blur(6px)",n.style.opacity="0",n.style.transform="translateY(6px) scale(.98)",n.style.transition="opacity 400ms ease, transform 400ms cubic-bezier(.2,.8,.2,1), box-shadow 200ms ease",n.style.zIndex="999999",n.addEventListener("mouseenter",(()=>{clearTimeout(t),n.style.transform="translateY(0) scale(1.03)",n.style.boxShadow="0 16px 40px rgba(12,61,120,.45)"})),n.addEventListener("mouseleave",(()=>{n.style.transform="translateY(0) scale(1)",i()})),setTimeout((()=>{document.getElementById(e)||(document.body.appendChild(n),requestAnimationFrame((()=>{n.style.opacity="1",n.style.transform="translateY(0) scale(1)"})),i())}),800)}logGithub(){const e="smart-github-rate";if(document.getElementById(e))return;let t;const n=document.createElement("a");n.id=e,n.href="https://github.com/htmlelements/smart-webcomponents",n.target="_blank",n.rel="noopener";const r=document.createElement("span");r.textContent="★",r.style.display="inline-flex",r.style.alignItems="center",r.style.justifyContent="center",r.style.width="18px",r.style.height="18px",r.style.borderRadius="50%",r.style.background="#4FC3F7",r.style.marginRight="10px",r.style.boxShadow="0 0 0 3px rgba(79,195,247,.25)",r.style.fontSize="12px",r.style.lineHeight="1";const i=document.createElement("span");function s(){t=setTimeout((()=>{n.style.opacity="0",n.style.transform="translateY(6px) scale(.98)",setTimeout((()=>n.remove()),400)}),1e4)}i.textContent="Rate us on GitHub",n.appendChild(r),n.appendChild(i),n.style.position="fixed",n.style.left="16px",n.style.bottom="16px",n.style.padding="12px 18px",n.style.borderRadius="999px",n.style.background="linear-gradient(135deg, #0C3D78, #1565C0)",n.style.color="#fff",n.style.fontSize="14px",n.style.fontWeight="600",n.style.fontFamily="system-ui, -apple-system, Segoe UI, Roboto, sans-serif",n.style.textDecoration="none",n.style.boxShadow="0 10px 25px rgba(12,61,120,.35)",n.style.backdropFilter="blur(6px)",n.style.opacity="0",n.style.transform="translateY(6px) scale(.98)",n.style.transition="opacity 400ms ease, transform 400ms cubic-bezier(.2,.8,.2,1), box-shadow 200ms ease",n.style.zIndex="999999",n.addEventListener("mouseenter",(()=>{clearTimeout(t),n.style.transform="translateY(0) scale(1.03)",n.style.boxShadow="0 16px 40px rgba(12,61,120,.45)"})),n.addEventListener("mouseleave",(()=>{n.style.transform="translateY(0) scale(1)",s()})),setTimeout((()=>{document.getElementById(e)||(document.body.appendChild(n),requestAnimationFrame((()=>{n.style.opacity="1",n.style.transform="translateY(0) scale(1)"})),s())}),800)}logLicense(){console.log("****************************************************************************************************************"),console.log("****************************************************************************************************************"),console.log("****************************************************************************************************************"),console.log("*⚠ jQWidgets License Key Not Found."),console.log("*This is an EVALUATION only Version, it is NOT Licensed for software projects intended for PRODUCTION."),console.log("*if you want to hide this message, please send an email to: sales@jqwidgets.com for a license."),console.log("****************************************************************************************************************"),console.log("****************************************************************************************************************"),console.log("****************************************************************************************************************")}get _selector(){const e=this;return e.id?"#"+e.id:e.classList.length>0?"."+e.classList[0]:""}static get version(){return window[namespace].Version}initProperties(){const that=this;if(Smart(that._selector)&&Smart(that._selector).properties&&(that._initProperties=Smart(that._selector).properties),that.hasAttribute("props")&&!that.props){const resolveProps=()=>{const propsAttr=that.getAttribute("props");let propsValue;if(!propsAttr)return{};try{if(propsAttr.trim().startsWith("{")||propsAttr.trim().startsWith("["))propsValue=JSON.parse(propsAttr);else{const localResolver=()=>eval(propsAttr);propsValue=localResolver()}}catch(e){console.warn(`Could not resolve props "${propsAttr}"`,e),propsValue={}}if("function"==typeof propsValue)try{propsValue