jqx-es 1.3.2 → 1.3.4

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.
@@ -1,15 +1,15 @@
1
- var JQx=(()=>{var Se=Object.defineProperty;var ot=Object.getOwnPropertyDescriptor;var it=Object.getOwnPropertyNames;var lt=Object.prototype.hasOwnProperty;var st=(t,e)=>{for(var r in e)Se(t,r,{get:e[r],enumerable:!0})},at=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of it(e))!lt.call(t,o)&&o!==r&&Se(t,o,{get:()=>e[o],enumerable:!(n=ot(e,o))||n.enumerable});return t};var ct=t=>at(Se({},"__esModule",{value:!0}),t);var gr={};st(gr,{default:()=>mr});var{IS:a,maybe:q,$Wrap:yr,xProxy:hr,isNothing:br}=ut();function ut(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),h();let t=b(),[e,r]=[f(),A()];return r.custom(),{IS:n,maybe:t,$Wrap:e,isNothing:y,xProxy:r};function n(i,...l){if(t({trial:m=>"isTypes"in(l?.[0]??{})})){let m=l[0];return"defaultValue"in m?g(i,m):"notTypes"in m?u(i,m):n(i,...[m.isTypes].flat())}let c=typeof i=="symbol"?Symbol.isSymbol:i;return l.length>1?w(c,...l):s(i,...l)}function o(i){return i?.[Symbol.proxy]??n(i)}function s(i,...l){let{noInput:c,noShouldbe:m,compareTo:x,inputCTOR:$,isNaN:R,isInfinity:j,shouldBeFirstElementIsNothing:k}=v(i,...l);switch(l=l.length&&l[0],!0){case k:return String(i)===String(x);case(i?.[Symbol.proxy]&&m):return i[Symbol.proxy];case R:return m?"NaN":t({trial:J=>String(x)})===String(i);case j:return m?"Infinity":t({trial:J=>String(x)})===String(i);case c:return m?String(i):String(x)===String(i);case $===Boolean:return l?$===l:"Boolean";default:return p(i,l,m,d(i,$))}}function d(i,l){return i===0?Number:i===""?String:i?l:{name:String(i)}}function v(i,...l){let c=l.length<1,m=!c&&l[0],x=!c&&y(l[0]),$=i==null,R=!$&&Object.getPrototypeOf(i)?.constructor,j=t({trial:J=>String(i)})==="NaN",k=t({trial:J=>String(i)})==="Infinity";return{noInput:$,noShouldbe:c,compareTo:m,inputCTOR:R,isNaN:j,isInfinity:k,shouldBeFirstElementIsNothing:x}}function p(i,l,c,m){switch(!0){case(!c&&l===i||i?.[Symbol.proxy]&&l===Proxy):return!0;case t({trial:x=>String(l)})==="NaN":return String(i)==="NaN";case(i?.[Symbol.toStringTag]&&n(l,String)):return String(l)===i[Symbol.toStringTag];default:return l?t({trial:x=>i instanceof l})||l===m||l===Object.getPrototypeOf(m)||`${l?.name}`===m?.name:i?.[Symbol.toStringTag]&&`[object ${i?.[Symbol.toStringTag]}]`||m?.name||String(m)}}function w(i,...l){return l.some(c=>n(i,c))}function y(i,l=!1){let c=i==null;return c=l?c||n(i,1/0)||n(i,NaN):c,c}function b(){let i=(l,c)=>l?.constructor===Function?l(c):void 0;return function({trial:l,whenError:c=()=>{}}={}){try{return i(l)}catch(m){return i(c,m)}}}function f(){return function(i){return Object.freeze({get value(){return i},get[Symbol.type](){return o(i)},get type(){return o(i)},[Symbol.is](...l){return n(i,...l)},is(...l){return n(i,...l)}})}}function g(i,{defaultValue:l,isTypes:c=[void 0],notTypes:m}={}){return c=c?.constructor!==Array?[c]:c,m=m&&m?.constructor!==Array?[m]:[],m.length<1?n(i,...c)?i:l:u(i,{isTypes:c,notTypes:m})?i:l}function u(i,{isTypes:l=[void 0],notTypes:c=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,c=c?.constructor!==Array?[c]:c,n(i,...l)&&!n(i,...c)}function h(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...i){return n(this,...i)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(i){return o(i)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(i,...l){return n(i,...l)},enumerable:!1,configurable:!1}}))}function S(i){let l=String(Object.getPrototypeOf(i)?.constructor);return l.slice(l.indexOf("ion")+3,l.indexOf("(")).trim()}function L(i){let l=i.set;return i.set=(c,m,x)=>m===Symbol.proxy?c[m]=x:l(c,m,x),i}function A(){let i=Proxy;return{native(){Proxy=i},custom(){Proxy=new i(i,{construct(l,c){for(let x of c)x.set&&(x=L(x));let m=new l(...c);return m[Symbol.proxy]=`Proxy (${S(c[0])})`,m}})}}}}var Pe=mt(),z=ft(),W=dt();function ft(){return{html:Object.freeze("accept,action,align,alt,autocapitalize,autocomplete,autopictureinpicture,autoplay,background,bgcolor,border,capture,cellpadding,cellspacing,checked,cite,class,clear,contenteditable,color,cols,colspan,controls,controlslist,coords,crossorigin,datetime,decoding,default,dir,disabled,disablepictureinpicture,disableremoteplayback,download,draggable,enctype,enterkeyhint,face,for,headers,height,hidden,high,href,hreflang,id,inputmode,integrity,is,ismap,kind,label,lang,list,loading,loop,low,max,maxlength,media,method,min,minlength,multiple,muted,name,nonce,noshade,novalidate,nowrap,open,optimum,pattern,placeholder,playsinline,poster,preload,pubdate,radiogroup,readonly,rel,required,rev,reversed,role,rows,rowspan,spellcheck,scope,selected,shape,size,sizes,span,srclang,start,src,srcset,step,style,summary,tabindex,target,title,translate,type,usemap,valign,value,width,xmlns,slot".split(",")),svg:Object.freeze("accent-height,accumulate,additive,alignment-baseline,ascent,attributename,attributetype,azimuth,basefrequency,baseline-shift,begin,bias,by,class,clip,clippathunits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,cx,cy,d,dx,dy,diffuseconstant,direction,display,divisor,dur,edgemode,elevation,end,fill,fill-opacity,fill-rule,filter,filterunits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,fx,fy,g1,g2,glyph-name,glyphref,gradientunits,gradienttransform,height,href,id,image-rendering,in,in2,k,k1,k2,k3,k4,kerning,keypoints,keysplines,keytimes,lang,lengthadjust,letter-spacing,kernelmatrix,kernelunitlength,lighting-color,local,marker-end,marker-mid,marker-start,markerheight,markerunits,markerwidth,maskcontentunits,maskunits,max,mask,media,method,mode,min,name,numoctaves,offset,operator,opacity,order,orient,orientation,origin,overflow,paint-order,path,pathlength,patterncontentunits,patterntransform,patternunits,points,preservealpha,preserveaspectratio,primitiveunits,r,rx,ry,radius,refx,refy,repeatcount,repeatdur,restart,result,rotate,scale,seed,shape-rendering,specularconstant,specularexponent,spreadmethod,startoffset,stddeviation,stitchtiles,stop-color,stop-opacity,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke,stroke-width,style,surfacescale,systemlanguage,tabindex,targetx,targety,transform,text-anchor,text-decoration,text-rendering,textlength,type,u1,u2,unicode,values,viewbox,visibility,version,vert-adv-y,vert-origin-x,vert-origin-y,width,word-spacing,wrap,writing-mode,xchannelselector,ychannelselector,x,x1,x2,xmlns,y,y1,y2,z,zoomandpan".split(","))}}function dt(){return{a:!0,area:!0,audio:!1,br:!0,base:!0,body:!0,button:!0,canvas:!0,comment:!0,dl:!0,data:!0,datalist:!0,div:!0,em:!0,embed:!1,fieldset:!0,font:!0,footer:!0,form:!1,hr:!0,head:!0,header:!0,output:!0,iframe:!1,frameset:!1,img:!0,input:!0,li:!0,label:!0,legend:!0,link:!0,map:!0,mark:!0,menu:!0,media:!0,meta:!0,nav:!0,meter:!0,ol:!0,object:!1,optgroup:!0,option:!0,p:!0,param:!0,picture:!0,pre:!0,progress:!1,quote:!0,script:!1,select:!0,source:!0,span:!0,style:!0,caption:!0,td:!0,col:!0,table:!0,tr:!0,template:!1,textarea:!0,time:!0,title:!0,track:!0,details:!0,ul:!0,video:!0,del:!0,ins:!0,slot:!0,blockquote:!0,svg:!0,dialog:!0,summary:!0,main:!0,address:!0,colgroup:!0,tbody:!0,tfoot:!0,thead:!0,th:!0,dd:!0,dt:!0,figcaption:!0,figure:!0,i:!0,b:!0,code:!0,h1:!0,h2:!0,h3:!0,h4:!0,abbr:!0,bdo:!0,dfn:!0,kbd:!0,q:!0,rb:!0,rp:!0,rt:!0,ruby:!0,s:!0,strike:!0,samp:!0,small:!0,strong:!0,sup:!0,sub:!0,u:!0,var:!0,wbr:!0,nobr:!0,tt:!0,noscript:!0}}function mt(){return["::backdrop{background-color:grey;opacity:0.2;}",`#jqxPopup{overflow:hidden;background-color:transparent;outline:none;border:none;inset:0;animation:fade-out 0.5s ease-out;&[open]{display:flex;align-items:center;justify-content:center;animation:fade-in 0.5s ease;}#jqxPopupContent{background-color:white;border:solid 1px #eee;box-shadow:1px 2px 8px #999;border-radius:4px;padding:12px;vertical-align:middle;max-height:40vh;max-width:50vw;overflow:auto;margin:0 auto;div:not(#closeHandleIcon){clear:both;}@media (width <= 640px){max-width:80vw;max-height:60vh;}#closeHandleIcon{cursor:pointer;width:24px;height:24px;display:inline;position:absolute;top:4px;right:4px;justify-content:right;background-image:url("data:image/svg+xml;utf8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22iso-8859-1%22%3F%3E%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20version%3D%221.1%22%20id%3D%22Layer_1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%20128%20128%22%20style%3D%22enable-background%3Anew%200%200%20128%20128%3B%22%20xml%3Aspace%3D%22preserve%22%3E%3Crect%20x%3D%22-368%22%20y%3D%226%22%20style%3D%22display%3Anone%3Bfill%3A%23E0E0E0%3B%22%20width%3D%22866%22%20height%3D%221018%22%2F%3E%3Ccircle%20style%3D%22fill%3A%23FFFFFF%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2248%22%2F%3E%3Ccircle%20style%3D%22fill%3A%238CCFB9%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2239%22%2F%3E%3Ccircle%20style%3D%22fill%3Anone%3Bstroke%3A%23444B54%3Bstroke-width%3A6%3Bstroke-miterlimit%3A10%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2248%22%2F%3E%3Cpolyline%20style%3D%22fill%3Anone%3Bstroke%3A%23FFFFFF%3Bstroke-width%3A6%3Bstroke-linecap%3Around%3Bstroke-miterlimit%3A10%3B%22%20points%3D%2242%2C69%2055.55%2C81%20%20%2086%2C46%20%22%2F%3E%3C%2Fsvg%3E");@media (width <= 640px){background-image:none;position:relative;margin:-15px -15px 4px 0;float:right;vertical-align:middle;border:1px solid #AAA;padding:2px;border-radius:50%;width:12px;height:12px;font-size:12px;line-height:12px;font-weight:bold;text-align:center;&:after{content:'\\2714';color:green;}}}.warn{display:none;text-align:center;color:red;border-top:1px solid #999;margin-top:1em;padding-top:3px;animation:warn-fade-out 0.2s ease-out;}.warn.active{opacity:1;display:block;animation:warn-fade-in 0.2s ease-in;}}}`,"@keyframes fade-in{0%{opacity:0;transform:scale(0, 0);display:none;}100%{opacity:1;transform:scale(1, 1);display:flex;}}","@keyframes fade-out{0%{opacity:1;transform:scale(1, 1);display:flex;}100%{opacity:0;transform:scale(0, 0);display:none;}}","@keyframes warn-fade-in{0%{opacity:0;transform:scale(0, 0);display:none;}100%{opacity:1;transform:scale(1,1 );display:block;}}","@keyframes warn-fade-out{0%{opacity:1;transform:scale(1, 1);display:block;}100%{opacity:0;transform:scale(0, 0);display:none;}}"]}var Me={html:"innerHTML",text:"textContent",class:"className"},ee=gt();function gt(){let t={get(e,r){let n=String(r)?.toLowerCase();switch(!0){case n in e:return e[n];case wt(n):return Oe(e,n,r);default:return Oe(e,n,r,!0)}},enumerable:!1,configurable:!1};return new Proxy({},t)}function Oe(t,e,r,n=!1){return Object.defineProperty(t,e,{get(){return n?o=>vt(r):Lt(e)}}),t[e]}function pt(t,e,r){return e=e?.isJQx&&e.first()||e,q({trial:n=>Et(e)?t.append(e):Re(e)?t.insertAdjacentHTML("beforeend",e):t.append(e),whenError:n=>console.info(`${r} (for root ${t}) not created, reason
2
- `,n)})}function yt(t,e,...r){let n=ht(e,t);return r?.forEach(o=>pt(n,o,t)),n}function ht(t,e){switch(t=xe(e)?xt(t):t?.isJQx?t.first():t,!0){case a(t,String):return V(e,Re(t,e)?{html:t}:{text:t});case a(t,Node):return St(e,t);default:return V(e,t)}}function bt(t){return delete t.data,Object.keys(t).length<1||Object.keys(t).forEach(e=>{let r=e.toLowerCase();r in Me&&(t[Me[r]]=t[e],delete t[e])}),t}function St(t,e){let r=V(t);return r.append(e),r}function V(t,e={}){e=Ie(e,{});let r=Object.entries(e.data??{}),n=Object.assign(xe(t)?new Comment(e?.text):document.createElement(t),bt(e));return r.length&&r.forEach(([o,s])=>n.dataset[o]=String(s)),n}function Ie(t,e){return e?a(t,{isTypes:Object,notTypes:[Array,null,NaN,Proxy],defaultValue:e}):a(t,{isTypes:Object,notTypes:[Array,null,NaN,Proxy]})}function xt(t){return Ie(t)?t?.text??t?.textContent??"":String(t)}function vt(t){return V("b",{style:"color:red",text:`'${t}' is not a valid HTML-tag`})}function Re(t,e){return!xe(e)&&a(t,String)&&/<.*>|&[#|0-9a-z]+[^;];/i.test(t)}function Et(t){return t?.constructor===Comment||t?.constructor===CharacterData}function xe(t){return t?.constructor===Comment||/comment/i.test(t)}function wt(t){return!a(V(t),HTMLUnknownElement)}function Lt(t){return(e,...r)=>yt(t,e,...r)}var{IS:te,maybe:wr,$Wrap:Lr,xProxy:Fr,isNothing:Cr}=Ft();function Ft(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),h();let t=b(),[e,r]=[f(),A()];return r.custom(),{IS:n,maybe:t,$Wrap:e,isNothing:y,xProxy:r};function n(i,...l){if(t({trial:m=>"isTypes"in(l?.[0]??{})})){let m=l[0];return"defaultValue"in m?g(i,m):"notTypes"in m?u(i,m):n(i,...[m.isTypes].flat())}let c=typeof i=="symbol"?Symbol.isSymbol:i;return l.length>1?w(c,...l):s(i,...l)}function o(i){return i?.[Symbol.proxy]??n(i)}function s(i,...l){let{noInput:c,noShouldbe:m,compareTo:x,inputCTOR:$,isNaN:R,isInfinity:j,shouldBeFirstElementIsNothing:k}=v(i,...l);switch(l=l.length&&l[0],!0){case k:return String(i)===String(x);case(i?.[Symbol.proxy]&&m):return i[Symbol.proxy];case R:return m?"NaN":t({trial:J=>String(x)})===String(i);case j:return m?"Infinity":t({trial:J=>String(x)})===String(i);case c:return m?String(i):String(x)===String(i);case $===Boolean:return l?$===l:"Boolean";default:return p(i,l,m,d(i,$))}}function d(i,l){return i===0?Number:i===""?String:i?l:{name:String(i)}}function v(i,...l){let c=l.length<1,m=!c&&l[0],x=!c&&y(l[0]),$=i==null,R=!$&&Object.getPrototypeOf(i)?.constructor,j=t({trial:J=>String(i)})==="NaN",k=t({trial:J=>String(i)})==="Infinity";return{noInput:$,noShouldbe:c,compareTo:m,inputCTOR:R,isNaN:j,isInfinity:k,shouldBeFirstElementIsNothing:x}}function p(i,l,c,m){switch(!0){case(!c&&l===i||i?.[Symbol.proxy]&&l===Proxy):return!0;case t({trial:x=>String(l)})==="NaN":return String(i)==="NaN";case(i?.[Symbol.toStringTag]&&n(l,String)):return String(l)===i[Symbol.toStringTag];default:return l?t({trial:x=>i instanceof l})||l===m||l===Object.getPrototypeOf(m)||`${l?.name}`===m?.name:i?.[Symbol.toStringTag]&&`[object ${i?.[Symbol.toStringTag]}]`||m?.name||String(m)}}function w(i,...l){return l.some(c=>n(i,c))}function y(i,l=!1){let c=i==null;return c=l?c||n(i,1/0)||n(i,NaN):c,c}function b(){let i=(l,c)=>l?.constructor===Function?l(c):void 0;return function({trial:l,whenError:c=()=>{}}={}){try{return i(l)}catch(m){return i(c,m)}}}function f(){return function(i){return Object.freeze({get value(){return i},get[Symbol.type](){return o(i)},get type(){return o(i)},[Symbol.is](...l){return n(i,...l)},is(...l){return n(i,...l)}})}}function g(i,{defaultValue:l,isTypes:c=[void 0],notTypes:m}={}){return c=c?.constructor!==Array?[c]:c,m=m&&m?.constructor!==Array?[m]:[],m.length<1?n(i,...c)?i:l:u(i,{isTypes:c,notTypes:m})?i:l}function u(i,{isTypes:l=[void 0],notTypes:c=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,c=c?.constructor!==Array?[c]:c,n(i,...l)&&!n(i,...c)}function h(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...i){return n(this,...i)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(i){return o(i)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(i,...l){return n(i,...l)},enumerable:!1,configurable:!1}}))}function S(i){let l=String(Object.getPrototypeOf(i)?.constructor);return l.slice(l.indexOf("ion")+3,l.indexOf("(")).trim()}function L(i){let l=i.set;return i.set=(c,m,x)=>m===Symbol.proxy?c[m]=x:l(c,m,x),i}function A(){let i=Proxy;return{native(){Proxy=i},custom(){Proxy=new i(i,{construct(l,c){for(let x of c)x.set&&(x=L(x));let m=new l(...c);return m[Symbol.proxy]=`Proxy (${S(c[0])})`,m}})}}}}var _=Ct;function Ct({styleSheet:t,createWithId:e}={}){let{tryParseAtOrNestedRules:r,ruleExists:n,checkParams:o,sheet:s,removeRules:d,consider:v,currentSheetID:p}=Tt({styleSheet:t,createWithId:e});function w(u,h){if(u&&h.removeProperties){Object.keys(h.removeProperties).forEach(S=>u.style.removeProperty(je(S)));return}Object.entries(h).forEach(([S,L])=>{S=je(S.trim()),L=L.trim();let A;if(/!important/.test(L)&&(L=L.slice(0,L.indexOf("!important")).trim(),A="important"),!CSS.supports(S,L))return console.error(`StylingFactory ${p} error: '${S}' with value '${L}' not supported (yet)`);ke(()=>u.style.setProperty(S,L,A),`StylingFactory ${p} (setRule4Selector) failed`)})}function y(u,h,S=s){if(u=u?.trim?.(),!te(u,String)||!u.length||/[;,]$/g.test(u))return console.error(`StylingFactory ${p} (setRules): [${u||"[no selector given]"}] is not a valid selector`);if(h.removeRule)return d(u);let L=n(u,!0),A=L||S.cssRules[S.insertRule(`${u} {}`,S.cssRules.length||0)];return v(()=>w(A,h),u,L)}function b(u){let h=u.trim().split(/{/,2),S=h.shift().trim();if(!te(S,String)||!S?.trim()?.length)return console.error(`StylingFactory ${p} (doParse): no (valid) selector could be extracted from rule ${ve(u)}`);let L=Mt(h.shift());return ke(()=>y(S,L),`StylingFactory ${p} (setRules) failed`)}function f(u){let h=r(u);return h.done?h.existing:b(u)}function g(u,h){return u.trim().startsWith("@media")?f($t(u,h)):y(u,h)}return function(u,h={}){return o(u,h)&&(Object.keys(h).length?g(u,h):f(u))}}function Tt({styleSheet:t,createWithId:e}){let r="Note: The rule or some of its properties may not be supported by your browser (yet)",n=`for style#${e}`;t=e?o(e):t;function o(f){let g=document.querySelector(`#${f}`)?.sheet;if(g)return g;let u=Object.assign(document.createElement("style"),{id:f});return document.head.insertAdjacentElement("beforeend",u),u.sheet}function s(f){return console.error(`StylingFactory ${n} [rule: ${f}]
3
- => @charset, @namespace and @import are not supported here`),{done:!0}}function d(f,g){return[...t.rules].find(u=>g?Je(u.selectorText||"",f):Dt`${Ht(f)}${[..."gim"]}`.test(u.cssText))}function v(f){return/^@charset|@import|namespace/i.test(f.trim())?s(f):f.match(/}/g)?.length>1?{existing:y(f,1),done:!0}:{done:!1}}function p(f){let g=[...t.cssRules].reduce((h,S,L)=>Je(S.selectorText||"",f)&&h.concat(L)||h,[]),u=g.length;return g.forEach(h=>t.deleteRule(h)),u>0?console.info(`\u2714 Removed ${u} instance${u>1?"s":""} of selector ${f} from ${n.slice(4)}`):console.info(`\u2714 Remove rule: selector ${f} does not exist in ${n.slice(4)}`)}function w(f,g){return f&&te(f,String)&&f.trim().length>0&&te(g,Object)||(console.error(`StylingFactory ${n} called with invalid parameters`),!1)}function y(f){f=f.trim();let g=f.slice(0,f.indexOf("{")).trim(),u=!!d(g);try{return t.insertRule(`${f}`,t.cssRules.length),u}catch(h){return console.error(`StylingFactory ${n} (tryParse) ${h.name} Error:
4
- ${h.message}
1
+ var JQx=(()=>{var Se=Object.defineProperty;var it=Object.getOwnPropertyDescriptor;var lt=Object.getOwnPropertyNames;var st=Object.prototype.hasOwnProperty;var at=(t,e)=>{for(var r in e)Se(t,r,{get:e[r],enumerable:!0})},ct=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of lt(e))!st.call(t,o)&&o!==r&&Se(t,o,{get:()=>e[o],enumerable:!(n=it(e,o))||n.enumerable});return t};var ut=t=>ct(Se({},"__esModule",{value:!0}),t);var pr={};at(pr,{default:()=>gr});var{IS:a,maybe:q,$Wrap:hr,xProxy:br,isNothing:Sr}=ft();function ft(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),m();let t=S(),[e,r]=[f(),A()];return r.custom(),{IS:n,maybe:t,$Wrap:e,isNothing:y,xProxy:r};function n(i,...l){if(t({trial:d=>"isTypes"in(l?.[0]??{})})){let d=l[0];return"defaultValue"in d?h(i,d):"notTypes"in d?g(i,d):n(i,...[d.isTypes].flat())}let c=typeof i=="symbol"?Symbol.isSymbol:i;return l.length>1?L(c,...l):s(i,...l)}function o(i){return i?.[Symbol.proxy]??n(i)}function s(i,...l){let{noInput:c,noShouldbe:d,compareTo:x,inputCTOR:$,isNaN:R,isInfinity:j,shouldBeFirstElementIsNothing:k}=v(i,...l);switch(l=l.length&&l[0],!0){case k:return String(i)===String(x);case(i?.[Symbol.proxy]&&d):return i[Symbol.proxy];case R:return d?"NaN":t({trial:J=>String(x)})===String(i);case j:return d?"Infinity":t({trial:J=>String(x)})===String(i);case c:return d?String(i):String(x)===String(i);case $===Boolean:return l?$===l:"Boolean";default:return p(i,l,d,u(i,$))}}function u(i,l){return i===0?Number:i===""?String:i?l:{name:String(i)}}function v(i,...l){let c=l.length<1,d=!c&&l[0],x=!c&&y(l[0]),$=i==null,R=!$&&Object.getPrototypeOf(i)?.constructor,j=t({trial:J=>String(i)})==="NaN",k=t({trial:J=>String(i)})==="Infinity";return{noInput:$,noShouldbe:c,compareTo:d,inputCTOR:R,isNaN:j,isInfinity:k,shouldBeFirstElementIsNothing:x}}function p(i,l,c,d){switch(!0){case(!c&&l===i||i?.[Symbol.proxy]&&l===Proxy):return!0;case t({trial:x=>String(l)})==="NaN":return String(i)==="NaN";case(i?.[Symbol.toStringTag]&&n(l,String)):return String(l)===i[Symbol.toStringTag];default:return l?t({trial:x=>i instanceof l})||l===d||l===Object.getPrototypeOf(d)||`${l?.name}`===d?.name:i?.[Symbol.toStringTag]&&`[object ${i?.[Symbol.toStringTag]}]`||d?.name||String(d)}}function L(i,...l){return l.some(c=>n(i,c))}function y(i,l=!1){let c=i==null;return c=l?c||n(i,1/0)||n(i,NaN):c,c}function S(){let i=(l,c)=>l?.constructor===Function?l(c):void 0;return function({trial:l,whenError:c=()=>{}}={}){try{return i(l)}catch(d){return i(c,d)}}}function f(){return function(i){return Object.freeze({get value(){return i},get[Symbol.type](){return o(i)},get type(){return o(i)},[Symbol.is](...l){return n(i,...l)},is(...l){return n(i,...l)}})}}function h(i,{defaultValue:l,isTypes:c=[void 0],notTypes:d}={}){return c=c?.constructor!==Array?[c]:c,d=d&&d?.constructor!==Array?[d]:[],d.length<1?n(i,...c)?i:l:g(i,{isTypes:c,notTypes:d})?i:l}function g(i,{isTypes:l=[void 0],notTypes:c=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,c=c?.constructor!==Array?[c]:c,n(i,...l)&&!n(i,...c)}function m(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...i){return n(this,...i)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(i){return o(i)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(i,...l){return n(i,...l)},enumerable:!1,configurable:!1}}))}function b(i){let l=String(Object.getPrototypeOf(i)?.constructor);return l.slice(l.indexOf("ion")+3,l.indexOf("(")).trim()}function E(i){let l=i.set;return i.set=(c,d,x)=>d===Symbol.proxy?c[d]=x:l(c,d,x),i}function A(){let i=Proxy;return{native(){Proxy=i},custom(){Proxy=new i(i,{construct(l,c){for(let x of c)x.set&&(x=E(x));let d=new l(...c);return d[Symbol.proxy]=`Proxy (${b(c[0])})`,d}})}}}}var Me=gt(),z=dt(),W=mt();function dt(){return{html:Object.freeze("accept,action,align,alt,autocapitalize,autocomplete,autopictureinpicture,autoplay,background,bgcolor,border,capture,cellpadding,cellspacing,checked,cite,class,clear,contenteditable,color,cols,colspan,controls,controlslist,coords,crossorigin,datetime,decoding,default,dir,disabled,disablepictureinpicture,disableremoteplayback,download,draggable,enctype,enterkeyhint,face,for,headers,height,hidden,high,href,hreflang,id,inputmode,integrity,is,ismap,kind,label,lang,list,loading,loop,low,max,maxlength,media,method,min,minlength,multiple,muted,name,nonce,noshade,novalidate,nowrap,open,optimum,pattern,placeholder,playsinline,poster,preload,pubdate,radiogroup,readonly,rel,required,rev,reversed,role,rows,rowspan,spellcheck,scope,selected,shape,size,sizes,span,srclang,start,src,srcset,step,style,summary,tabindex,target,title,translate,type,usemap,valign,value,width,xmlns,slot".split(",")),svg:Object.freeze("accent-height,accumulate,additive,alignment-baseline,ascent,attributename,attributetype,azimuth,basefrequency,baseline-shift,begin,bias,by,class,clip,clippathunits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,cx,cy,d,dx,dy,diffuseconstant,direction,display,divisor,dur,edgemode,elevation,end,fill,fill-opacity,fill-rule,filter,filterunits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,fx,fy,g1,g2,glyph-name,glyphref,gradientunits,gradienttransform,height,href,id,image-rendering,in,in2,k,k1,k2,k3,k4,kerning,keypoints,keysplines,keytimes,lang,lengthadjust,letter-spacing,kernelmatrix,kernelunitlength,lighting-color,local,marker-end,marker-mid,marker-start,markerheight,markerunits,markerwidth,maskcontentunits,maskunits,max,mask,media,method,mode,min,name,numoctaves,offset,operator,opacity,order,orient,orientation,origin,overflow,paint-order,path,pathlength,patterncontentunits,patterntransform,patternunits,points,preservealpha,preserveaspectratio,primitiveunits,r,rx,ry,radius,refx,refy,repeatcount,repeatdur,restart,result,rotate,scale,seed,shape-rendering,specularconstant,specularexponent,spreadmethod,startoffset,stddeviation,stitchtiles,stop-color,stop-opacity,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke,stroke-width,style,surfacescale,systemlanguage,tabindex,targetx,targety,transform,text-anchor,text-decoration,text-rendering,textlength,type,u1,u2,unicode,values,viewbox,visibility,version,vert-adv-y,vert-origin-x,vert-origin-y,width,word-spacing,wrap,writing-mode,xchannelselector,ychannelselector,x,x1,x2,xmlns,y,y1,y2,z,zoomandpan".split(","))}}function mt(){return{a:!0,area:!0,audio:!1,br:!0,base:!0,body:!0,button:!0,canvas:!0,comment:!0,dl:!0,data:!0,datalist:!0,div:!0,em:!0,embed:!1,fieldset:!0,font:!0,footer:!0,form:!1,hr:!0,head:!0,header:!0,output:!0,iframe:!1,frameset:!1,img:!0,input:!0,li:!0,label:!0,legend:!0,link:!0,map:!0,mark:!0,menu:!0,media:!0,meta:!0,nav:!0,meter:!0,ol:!0,object:!1,optgroup:!0,option:!0,p:!0,param:!0,picture:!0,pre:!0,progress:!1,quote:!0,script:!1,select:!0,source:!0,span:!0,style:!0,caption:!0,td:!0,col:!0,table:!0,tr:!0,template:!1,textarea:!0,time:!0,title:!0,track:!0,details:!0,ul:!0,video:!0,del:!0,ins:!0,slot:!0,blockquote:!0,svg:!0,dialog:!0,summary:!0,main:!0,address:!0,colgroup:!0,tbody:!0,tfoot:!0,thead:!0,th:!0,dd:!0,dt:!0,figcaption:!0,figure:!0,i:!0,b:!0,code:!0,h1:!0,h2:!0,h3:!0,h4:!0,abbr:!0,bdo:!0,dfn:!0,kbd:!0,q:!0,rb:!0,rp:!0,rt:!0,ruby:!0,s:!0,strike:!0,samp:!0,small:!0,strong:!0,sup:!0,sub:!0,u:!0,var:!0,wbr:!0,nobr:!0,tt:!0,noscript:!0}}function gt(){return["::backdrop{background-color:grey;opacity:0.2;}",`#jqxPopup{overflow:hidden;background-color:transparent;outline:none;border:none;inset:0;animation:fade-out 0.5s ease-out;&[open]{display:flex;align-items:center;justify-content:center;animation:fade-in 0.5s ease;}#jqxPopupContent{background-color:white;border:solid 1px #eee;box-shadow:1px 2px 8px #999;border-radius:4px;padding:12px;vertical-align:middle;max-height:40vh;max-width:50vw;overflow:auto;margin:0 auto;div:not(#closeHandleIcon){clear:both;}@media (width <= 640px){max-width:80vw;max-height:60vh;}#closeHandleIcon{cursor:pointer;width:24px;height:24px;display:inline;position:absolute;top:4px;right:4px;justify-content:right;background-image:url("data:image/svg+xml;utf8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22iso-8859-1%22%3F%3E%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20version%3D%221.1%22%20id%3D%22Layer_1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%20128%20128%22%20style%3D%22enable-background%3Anew%200%200%20128%20128%3B%22%20xml%3Aspace%3D%22preserve%22%3E%3Crect%20x%3D%22-368%22%20y%3D%226%22%20style%3D%22display%3Anone%3Bfill%3A%23E0E0E0%3B%22%20width%3D%22866%22%20height%3D%221018%22%2F%3E%3Ccircle%20style%3D%22fill%3A%23FFFFFF%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2248%22%2F%3E%3Ccircle%20style%3D%22fill%3A%238CCFB9%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2239%22%2F%3E%3Ccircle%20style%3D%22fill%3Anone%3Bstroke%3A%23444B54%3Bstroke-width%3A6%3Bstroke-miterlimit%3A10%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2248%22%2F%3E%3Cpolyline%20style%3D%22fill%3Anone%3Bstroke%3A%23FFFFFF%3Bstroke-width%3A6%3Bstroke-linecap%3Around%3Bstroke-miterlimit%3A10%3B%22%20points%3D%2242%2C69%2055.55%2C81%20%20%2086%2C46%20%22%2F%3E%3C%2Fsvg%3E");@media (width <= 640px){background-image:none;position:relative;margin:-15px -15px 4px 0;float:right;vertical-align:middle;border:1px solid #AAA;padding:2px;border-radius:50%;width:12px;height:12px;font-size:12px;line-height:12px;font-weight:bold;text-align:center;&:after{content:'\\2714';color:green;}}}.warn{display:none;text-align:center;color:red;border-top:1px solid #999;margin-top:1em;padding-top:3px;animation:warn-fade-out 0.2s ease-out;}.warn.active{opacity:1;display:block;animation:warn-fade-in 0.2s ease-in;}}}`,"@keyframes fade-in{0%{opacity:0;transform:scale(0, 0);display:none;}100%{opacity:1;transform:scale(1, 1);display:flex;}}","@keyframes fade-out{0%{opacity:1;transform:scale(1, 1);display:flex;}100%{opacity:0;transform:scale(0, 0);display:none;}}","@keyframes warn-fade-in{0%{opacity:0;transform:scale(0, 0);display:none;}100%{opacity:1;transform:scale(1,1 );display:block;}}","@keyframes warn-fade-out{0%{opacity:1;transform:scale(1, 1);display:block;}100%{opacity:0;transform:scale(0, 0);display:none;}}"]}var Oe={html:"innerHTML",text:"textContent",class:"className"},ee=pt();function pt(){let t={get(e,r){let n=String(r)?.toLowerCase();switch(!0){case n in e:return e[n];case Lt(n):return Ie(e,n,r);default:return Ie(e,n,r,!0)}},enumerable:!1,configurable:!1};return new Proxy({},t)}function Ie(t,e,r,n=!1){return Object.defineProperty(t,e,{get(){return n?o=>Et(r):Ft(e)}}),t[e]}function yt(t,e,r){return e=e?.isJQx&&e.first()||e,q({trial:n=>wt(e)?t.append(e):je(e)?t.insertAdjacentHTML("beforeend",e):t.append(e),whenError:n=>console.info(`${r} (for root ${t}) not created, reason
2
+ `,n)})}function ht(t,e,...r){let n=bt(e,t);return r?.forEach(o=>yt(n,o,t)),n}function bt(t,e){switch(t=xe(e)?vt(t):t?.isJQx?t.first():t,!0){case a(t,String):return V(e,je(t,e)?{html:t}:{text:t});case a(t,Node):return xt(e,t);default:return V(e,t)}}function St(t){return delete t.data,Object.keys(t).length<1||Object.keys(t).forEach(e=>{let r=e.toLowerCase();r in Oe&&(t[Oe[r]]=t[e],delete t[e])}),t}function xt(t,e){let r=V(t);return r.append(e),r}function V(t,e={}){e=Re(e,{});let r=Object.entries(e.data??{}),n=Object.assign(xe(t)?new Comment(e?.text):document.createElement(t),St(e));return r.length&&r.forEach(([o,s])=>n.dataset[o]=String(s)),n}function Re(t,e){return e?a(t,{isTypes:Object,notTypes:[Array,null,NaN,Proxy],defaultValue:e}):a(t,{isTypes:Object,notTypes:[Array,null,NaN,Proxy]})}function vt(t){return Re(t)?t?.text??t?.textContent??"":String(t)}function Et(t){return V("b",{style:"color:red",text:`'${t}' is not a valid HTML-tag`})}function je(t,e){return!xe(e)&&a(t,String)&&/<.*>|&[#|0-9a-z]+[^;];/i.test(t)}function wt(t){return t?.constructor===Comment||t?.constructor===CharacterData}function xe(t){return t?.constructor===Comment||/comment/i.test(t)}function Lt(t){return!a(V(t),HTMLUnknownElement)}function Ft(t){return(e,...r)=>ht(t,e,...r)}var{IS:te,maybe:Lr,$Wrap:Fr,xProxy:Cr,isNothing:Tr}=Ct();function Ct(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),m();let t=S(),[e,r]=[f(),A()];return r.custom(),{IS:n,maybe:t,$Wrap:e,isNothing:y,xProxy:r};function n(i,...l){if(t({trial:d=>"isTypes"in(l?.[0]??{})})){let d=l[0];return"defaultValue"in d?h(i,d):"notTypes"in d?g(i,d):n(i,...[d.isTypes].flat())}let c=typeof i=="symbol"?Symbol.isSymbol:i;return l.length>1?L(c,...l):s(i,...l)}function o(i){return i?.[Symbol.proxy]??n(i)}function s(i,...l){let{noInput:c,noShouldbe:d,compareTo:x,inputCTOR:$,isNaN:R,isInfinity:j,shouldBeFirstElementIsNothing:k}=v(i,...l);switch(l=l.length&&l[0],!0){case k:return String(i)===String(x);case(i?.[Symbol.proxy]&&d):return i[Symbol.proxy];case R:return d?"NaN":t({trial:J=>String(x)})===String(i);case j:return d?"Infinity":t({trial:J=>String(x)})===String(i);case c:return d?String(i):String(x)===String(i);case $===Boolean:return l?$===l:"Boolean";default:return p(i,l,d,u(i,$))}}function u(i,l){return i===0?Number:i===""?String:i?l:{name:String(i)}}function v(i,...l){let c=l.length<1,d=!c&&l[0],x=!c&&y(l[0]),$=i==null,R=!$&&Object.getPrototypeOf(i)?.constructor,j=t({trial:J=>String(i)})==="NaN",k=t({trial:J=>String(i)})==="Infinity";return{noInput:$,noShouldbe:c,compareTo:d,inputCTOR:R,isNaN:j,isInfinity:k,shouldBeFirstElementIsNothing:x}}function p(i,l,c,d){switch(!0){case(!c&&l===i||i?.[Symbol.proxy]&&l===Proxy):return!0;case t({trial:x=>String(l)})==="NaN":return String(i)==="NaN";case(i?.[Symbol.toStringTag]&&n(l,String)):return String(l)===i[Symbol.toStringTag];default:return l?t({trial:x=>i instanceof l})||l===d||l===Object.getPrototypeOf(d)||`${l?.name}`===d?.name:i?.[Symbol.toStringTag]&&`[object ${i?.[Symbol.toStringTag]}]`||d?.name||String(d)}}function L(i,...l){return l.some(c=>n(i,c))}function y(i,l=!1){let c=i==null;return c=l?c||n(i,1/0)||n(i,NaN):c,c}function S(){let i=(l,c)=>l?.constructor===Function?l(c):void 0;return function({trial:l,whenError:c=()=>{}}={}){try{return i(l)}catch(d){return i(c,d)}}}function f(){return function(i){return Object.freeze({get value(){return i},get[Symbol.type](){return o(i)},get type(){return o(i)},[Symbol.is](...l){return n(i,...l)},is(...l){return n(i,...l)}})}}function h(i,{defaultValue:l,isTypes:c=[void 0],notTypes:d}={}){return c=c?.constructor!==Array?[c]:c,d=d&&d?.constructor!==Array?[d]:[],d.length<1?n(i,...c)?i:l:g(i,{isTypes:c,notTypes:d})?i:l}function g(i,{isTypes:l=[void 0],notTypes:c=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,c=c?.constructor!==Array?[c]:c,n(i,...l)&&!n(i,...c)}function m(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...i){return n(this,...i)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(i){return o(i)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(i,...l){return n(i,...l)},enumerable:!1,configurable:!1}}))}function b(i){let l=String(Object.getPrototypeOf(i)?.constructor);return l.slice(l.indexOf("ion")+3,l.indexOf("(")).trim()}function E(i){let l=i.set;return i.set=(c,d,x)=>d===Symbol.proxy?c[d]=x:l(c,d,x),i}function A(){let i=Proxy;return{native(){Proxy=i},custom(){Proxy=new i(i,{construct(l,c){for(let x of c)x.set&&(x=E(x));let d=new l(...c);return d[Symbol.proxy]=`Proxy (${b(c[0])})`,d}})}}}}var _=Tt;function Tt({styleSheet:t,createWithId:e}={}){let{tryParseAtOrNestedRules:r,ruleExists:n,checkParams:o,sheet:s,removeRules:u,consider:v,currentSheetID:p}=At({styleSheet:t,createWithId:e});function L(g,m){if(g&&m.removeProperties){Object.keys(m.removeProperties).forEach(b=>g.style.removeProperty(ke(b)));return}Object.entries(m).forEach(([b,E])=>{b=ke(b.trim()),E=E.trim();let A;if(/!important/.test(E)&&(E=E.slice(0,E.indexOf("!important")).trim(),A="important"),!CSS.supports(b,E))return console.error(`StylingFactory ${p} error: '${b}' with value '${E}' not supported (yet)`);Je(()=>g.style.setProperty(b,E,A),`StylingFactory ${p} (setRule4Selector) failed`)})}function y(g,m,b=s){if(g=g?.trim?.(),!te(g,String)||!g.length||/[;,]$/g.test(g))return console.error(`StylingFactory ${p} (setRules): [${g||"[no selector given]"}] is not a valid selector`);if(m.removeRule)return u(g);let E=n(g,!0),A=E||b.cssRules[b.insertRule(`${g} {}`,b.cssRules.length||0)];return v(()=>L(A,m),g,E)}function S(g){let m=g.trim().split(/{/,2),b=m.shift().trim();if(!te(b,String)||!b?.trim()?.length)return console.error(`StylingFactory ${p} (doParse): no (valid) selector could be extracted from rule ${ve(g)}`);let E=Ot(m.shift());return Je(()=>y(b,E),`StylingFactory ${p} (setRules) failed`)}function f(g){let m=r(g);return m.done?m.existing:S(g)}function h(g,m){return g.trim().startsWith("@media")?f($t(g,m)):y(g,m)}return function(g,m={}){return o(g,m)&&(Object.keys(m).length?h(g,m):f(g))}}function At({styleSheet:t,createWithId:e}){let r="Note: The rule or some of its properties may not be supported by your browser (yet)",n=`for style#${e}`;t=e?o(e):t;function o(f){let h=document.querySelector(`#${f}`)?.sheet;if(h)return h;let g=Object.assign(document.createElement("style"),{id:f});return document.head.insertAdjacentElement("beforeend",g),g.sheet}function s(f){return console.error(`StylingFactory ${n} [rule: ${f}]
3
+ => @charset, @namespace and @import are not supported here`),{done:!0}}function u(f,h){return[...t.rules].find(g=>h?Qe(g.selectorText||"",f):Nt`${Dt(f)}${[..."gim"]}`.test(g.cssText))}function v(f){return/^@charset|@import|namespace/i.test(f.trim())?s(f):f.match(/}/g)?.length>1?{existing:y(f,1),done:!0}:{done:!1}}function p(f){let h=[...t.cssRules].reduce((m,b,E)=>Qe(b.selectorText||"",f)&&m.concat(E)||m,[]),g=h.length;return h.forEach(m=>t.deleteRule(m)),g>0?console.info(`\u2714 Removed ${g} instance${g>1?"s":""} of selector ${f} from ${n.slice(4)}`):console.info(`\u2714 Remove rule: selector ${f} does not exist in ${n.slice(4)}`)}function L(f,h){return f&&te(f,String)&&f.trim().length>0&&te(h,Object)||(console.error(`StylingFactory ${n} called with invalid parameters`),!1)}function y(f){f=f.trim();let h=f.slice(0,f.indexOf("{")).trim(),g=!!u(h);try{return t.insertRule(`${f}`,t.cssRules.length),g}catch(m){return console.error(`StylingFactory ${n} (tryParse) ${m.name} Error:
4
+ ${m.message}
5
5
  Rule: ${ve(f)}
6
- ${r}`),u}}function b(f,g,u){try{return f(),u}catch(h){return console.error(`StylingFactory ${n} (tryAddOrModify) ${h.name} Error:
7
- ${h.message}
8
- Rule: ${ve(g)}
9
- ${r}`),u}}return{sheet:t,removeRules:p,tryParseAtOrNestedRules:v,ruleExists:d,checkParams:w,tryParse:y,consider:b,currentSheetID:n}}function $t(t,e){return`${t.trim()} ${Object.entries(e).map(([r,n])=>`${r}: { ${At(n)}`)}`}function ve(t){let e=(t||"NO RULE").trim().slice(0,50).replace(/\n/g,"\\n").replace(/\s{2,}/g," ");return t.length>e.length?`${e.trim()}...truncated`:e}function At(t){return Object.entries(t).map(([e,r])=>`${e}: ${r.trim()}`).join(`;
10
- `)}function Ht(t){return t.replace(/([*\[\]()-+{}.$?\\])/g,e=>`\\${e}`)}function Dt(t,...e){let r=e.length&&Array.isArray(e.slice(-1))?e.pop().join(""):"";return new RegExp((e.length&&t.raw.reduce((n,o,s)=>n.concat(e[s-1]||"").concat(o),"")||t.raw.join("")).split(`
11
- `).map(n=>n.replace(/\s|\/\/.*$/g,"").trim().replace(/(@s!)/g," ")).join(""),r)}function je(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/[^--]^-|-$/,"")}function ke(t,e){try{return t()}catch(r){console.error(`${e||"an error occured"}: ${r.message}`)}}function Nt(t){return t.replace(/\/\*.+?\*\//gm,"").replace(/[}{\r\n]/g,"").replace(/(data:.+?);/g,(e,r)=>`${r}\\3b`).split(";").map(e=>e.trim()).join(`;
6
+ ${r}`),g}}function S(f,h,g){try{return f(),g}catch(m){return console.error(`StylingFactory ${n} (tryAddOrModify) ${m.name} Error:
7
+ ${m.message}
8
+ Rule: ${ve(h)}
9
+ ${r}`),g}}return{sheet:t,removeRules:p,tryParseAtOrNestedRules:v,ruleExists:u,checkParams:L,tryParse:y,consider:S,currentSheetID:n}}function $t(t,e){return`${t.trim()} ${Object.entries(e).map(([r,n])=>`${r}: { ${Ht(n)}`)}`}function ve(t){let e=(t||"NO RULE").trim().slice(0,50).replace(/\n/g,"\\n").replace(/\s{2,}/g," ");return t.length>e.length?`${e.trim()}...truncated`:e}function Ht(t){return Object.entries(t).map(([e,r])=>`${e}: ${r.trim()}`).join(`;
10
+ `)}function Dt(t){return t.replace(/([*\[\]()-+{}.$?\\])/g,e=>`\\${e}`)}function Nt(t,...e){let r=e.length&&Array.isArray(e.slice(-1))?e.pop().join(""):"";return new RegExp((e.length&&t.raw.reduce((n,o,s)=>n.concat(e[s-1]||"").concat(o),"")||t.raw.join("")).split(`
11
+ `).map(n=>n.replace(/\s|\/\/.*$/g,"").trim().replace(/(@s!)/g," ")).join(""),r)}function ke(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/[^--]^-|-$/,"")}function Je(t,e){try{return t()}catch(r){console.error(`${e||"an error occured"}: ${r.message}`)}}function Pt(t){return t.replace(/\/\*.+?\*\//gm,"").replace(/[}{\r\n]/g,"").replace(/(data:.+?);/g,(e,r)=>`${r}\\3b`).split(";").map(e=>e.trim()).join(`;
12
12
  `).replaceAll("\\3b",";").split(`
13
- `)}function Pt(t){return t.reduce((e,r)=>{let[n,o]=[r.slice(0,r.indexOf(":")).trim(),r.slice(r.indexOf(":")+1).trim().replace(/;$|;.+(?=\/*).+\/$/,"")];return n&&o?{...e,[n]:o}:e},{})}function Mt(t){return Pt(Nt(t))}function Je(t,e){return t?.replace("::",":")===e?.replace("::",":")}var Ee=!1,Ot={on:()=>Ee=!0,off:()=>Ee=!1},P={tagsRaw:W,allowUnknownHtmlTags:Ot,isAllowed(t){if(Ee)return!0;let e=a(t,String)?t.toLowerCase():t?.nodeName.toLowerCase()||"none";return e==="#text"||!!W[e]},allowTag:t=>W[t.toLowerCase()]=!0,prohibitTag:t=>W[t.toLowerCase()]=!1};var It=!0,re={data:/data-[\-\w.\p{L}]/ui,validURL:/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,whiteSpace:/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g,notAllowedValues:/^javascript|injected|noreferrer|alert|DataURL/gi};function Rt(t){if(It&&Object.keys(t.removed).length){let e=Object.entries(t.removed).reduce((r,[n,o])=>[...r,`${O(n)} => ${o}`],[]).join("\\000A");C.error(`JQx: HTML creation error(s): ${e}`)}}function jt(t){let e=t.nodeName.toLowerCase(),r=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"];return/-/.test(e)&&!r.find(n=>n===e)||P.isAllowed(e)}function Q(t){let e={rawHTML:t?.parentElement?.getHTML()??"no html",removed:{}};return a(t,HTMLElement)&&[...t.childNodes].forEach(r=>{if(r?.children?.length&&Q(r),r?.attributes){let o=a(r,SVGElement)?z.svg:z.html;[...(r??{attributes:[]}).attributes].forEach(s=>{let d=s.name.trim().toLowerCase(),v=s.value.trim().toLowerCase().replace(re.whiteSpace,""),p=d==="href"?!re.validURL.test(v):re.notAllowedValues.test(v),w=d.startsWith("data")?!re.data.test(d):!!o[d];if(p||w){let y=ne(s.value||"none",60);y+=y.length===60?"...":"",e.removed[`${s.name}`]=`attribute/property/value not allowed, removed. Value: ${y}`,r.removeAttribute(s.name)}})}if(!(jt(r)||r.constructor===CharacterData||r.constructor===Comment)){let o=(r?.outerHTML||r?.textContent).trim(),s=ne(o,60)??"EMPTY";s+=s.length===60?"...":"",e.removed[`<${r.nodeName?.toLowerCase()}>`]=`not allowed, not rendered. Value: ${s}`,r.remove()}}),Rt(e),t}function kt(t){let e=document.createElement("div");return e.insertAdjacentHTML(T.end,t),e.childNodes.length?Q(e):void 0}function Jt(t,e,r){return a(t,Comment)?e.insertAdjacentHTML(r,`<!--${t.data}-->`):e.insertAdjacentText(r,t.data)}function B(t=[],e=document.body,r=T.BeforeEnd){return r=r||T.BeforeEnd,e=e?.isJQx?e.node:e||document.body,t.reduce((n,o)=>{let s=M(o)&&Qt(o,e,r);return s?[...n,s]:n},[])}function Qt(t,e=document.body,r=T.BeforeEnd){return r=r||T.BeforeEnd,e=e?.isJQx?e?.[0]:e,a(t,Comment,Text)?Jt(t,e,r):a(t,HTMLElement)?e.insertAdjacentElement(r,t):void 0}function H(t){if(a(t,Text,Comment))return t;let e=t?.trim(),r=e?.split(/<text>|<\/text>/i)??[];if(r?.length&&(r=r.length>1?r.filter(o=>o.length).shift():void 0),e.startsWith("<!--")&&e.endsWith("-->"))return document.createComment(t.replace(/<!--|-->$/g,""));if(r||!/^<(.+)[^>]+>/m.test(e))return document.createTextNode(r);let n=kt(t);return n.childNodes.length<1?H(`<span data-jqxcreationerror="1">${D(t,60)}</span>`):n.children[0]}function oe(t){if(t.node("#jqxPopup"))return;t.logger.log("JQx: [JQx].Popup first call. Dialog element created."),t.dialog({id:"jqxPopup"},t.div({id:"jqxPopupContent"})).render,t.editCssRules(...Pe);let[e,r]=[t("#jqxPopupContent"),t.node("#jqxPopup")],n={};return t.handle({type:"click, keydown",handlers:y,name:"genericPopupCloseHandler",capture:!0,about:"A generic handler for JQx popups"}),Object.freeze({show:o,remove:s,removeModal:w});function o(g){if(r.open)switch(!0){case d(g):return;default:return s(),setTimeout(()=>o(g),200)}n={...g};let{content:u}=n;return t.IS(u,String,HTMLElement)||u?.isJQx?v():!0}function s(){return n.modal?f(n.warnMessage):p()}function d(g){for(let[u,h]of Object.entries(n))if(h!==g[u])return!1;return!0}function v(){e.clear();let{content:g,modal:u,closeAfter:h}=n;u=t.IS(u,Boolean)?u:!1;let S=u?"":t.div({id:"closeHandleIcon"});e.append(S,t.IS(g,String)?t.div(g):g),r.showModal(),!u&&t.IS(h,Number)&&b(s,h)}function p(){if(r.close(n.returnValue),t.IS(n.callback,Function))return setTimeout(()=>n.callback(n.returnValue),200);n={}}function w({callback:g,value:u}={}){n.returnValue=u,n.modal=!1,n.callback=g||n.callback,s()}function y({evt:g}){if(!(Object.keys(n).length<1||!r.open))return g.key==="Escape"&&g.preventDefault(),n.activeTimer&&clearTimeout(n.activeTimer),(g.target.closest("#closeHandleIcon")||!g.target.closest("#jqxPopupContent"))&&s(),!0}function b(g,u){t.IS(g,Function)&&t.IS(u,Number)&&u>0&&(n.activeTimer=setTimeout(g,u*1e3))}function f(g){if(!t.IS(g,String,HTMLElement,Proxy))return;let u=e.find$(".warn");switch(!0){case u.is.empty:u=t.div({class:"warn"},g);default:e.append(u.addClass("active")),b(()=>e.find$(".warn").removeClass("active"),2)}}}function ie(t){let e={},r="anonymous_";function n(y){if(y){let{handler:b,capture:f,type:g}=y;document.addEventListener(g,b,{capture:f})}}function o(y){if(y){let{type:b,handler:f,capture:g}=y;document.removeEventListener(b,f,{capture:g})}}function s(y,b,f,g){return function(u){if(!F(b))return y({evt:u});let h=u.target.closest(b);if(h){let S=t(h);y({self:S,me:S,evt:u}),f&&p(u.type,g)}return!0}}function d(y){return e[y]=e[y]||{},e[y]}function v(y,b){return Object.entries(d(y)).find(([f])=>f===b)}function p(y,b){let f=v(y,b);f&&(o(f[1]),delete e[y][b],delete le[b],console.warn(`Removed listener [${b}] for event type [${y}].`))}function w(y){let{type:b,handler:f,name:g,capture:u,once:h,selector:S,node:L,about:A}=y;e[b]=e[b]||{};let i=we(g||f.name);if(L instanceof HTMLElement){let l=L.dataset.hid||i;L.dataset.hid=l,S=`[data-hid=${l}]`}switch(!0){case!e[b][i]:return e[b][i]={name:i,handler:s(f,S,h,i),capture:Qe(b,u),once:!!h,type:b,selector:!!S&&S||!1,about:!!A&&A||!1,unListen(){p(b,i)}},e[b][i];default:return console.error(`The name [${i}] for [${b}] exists. Use unique (function) names.`)}}return{remove(...y){return p(...y)},listen:function(y){let{type:b,handler:f}=y;if(!F(b)||!a(f,Function))return;let g=w(y);if(g)return n(g),{type:b,name:g.name,unListen(){p(b,g.name)}}},get ListenerStore(){return Object.freeze({...e})}}}var C=Wt(),Bt=["load","unload","scroll","focus","blur","DOMNodeRemovedFromDocument","DOMNodeInsertedIntoDocument","loadstart","progress","error","abort","load","loadend","pointerenter","pointerleave","readystatechange"],T=Object.freeze(new Proxy({start:"afterbegin",afterbegin:"afterbegin",end:"beforeend",beforeend:"beforeend",before:"beforebegin",beforebegin:"beforebegin",after:"afterend",afterend:"afterend"},{get(t,e){return t[String(e).toLowerCase()]??t[e]}})),zt=[...Array(26)].map((t,e)=>String.fromCharCode(e+65)).concat([...Array(26)].map((t,e)=>String.fromCharCode(e+97))).concat([...Array(10)].map((t,e)=>`${e}`)),Fe=Object.freeze({get(t,e){return t[Z(e)]||t[e]},enumerable:!1,configurable:!1}),le={};function we(t){return F(t)&&!!t&&!/^handler|handlers$/gi.test(t.trim())?t.trim():ze()}function ze(t){let e=`anonymous_${Math.random().toString(36).slice(2)}`;return le[e]?ze():(le[e]=e,e)}function Qe(t,e){return!!Bt.find(r=>r===t)||!!e}function ae(t){return t.startsWith("data")||z.html.find(e=>t.toLowerCase()===e)}function ce(t){return t&&(t.textContent="")}function U(t,e=0,r=!0){return t=t?.parentElement,e+=t?t[r?"scrollTop":"scrollLeft"]:0,t?U(t,e,r):e}function F(t,e=1){return e=a(e,Number)&&e||1,a(t,String)&&t.length>=e}function ne(t,e=120){return D(t,e).replace(/&lt;/g,"<")}function D(t,e=120){return`${t}`.trim().slice(0,e).replace(/>\s+</g,"><").replace(/</g,"&lt;").replace(/\s{2,}/g," ").replace(/\n/g,"\\n")+(t.length>e?" &hellip;":"").trim()}function O(t){switch(!0){case a(t,String):let e=document.createElement("div");return e.append(t),e.innerHTML;default:return t}}function Be(t){return a(t,String)&&Object.assign(document.createElement("textarea"),{innerHTML:t}).textContent||t}function Wt(){let t=!1,e=[],r={get on(){return t=!0,r},get off(){return t=!1,r},get backLog(){return e}};function n(...s){return e.unshift(...s.map(d=>`${Le()} \u2A3B ${Be(d)}`)),console.error(e.slice(0,s.length).join(`
14
- `)),r}function o(...s){switch(e.unshift(...s.map(d=>`${Le()} \u2714 ${Be(d)}`)),t){case!0:console.log(e.slice(0,s.length).join(`
15
- `));default:return r}}return Object.defineProperties(r,{log:{value:o,enumerable:!1},error:{value:n,enumerable:!1}}),Object.freeze(r)}function Le(){return(t=>`[${se(t.getHours())}:${se(t.getMinutes())}:${se(t.getSeconds())}.${se(t.getMilliseconds(),3)}]`)(new Date)}function Ce(t,e){if(t)for(let[r,n]of Object.entries(e)){if(r=N(r),r.startsWith("data"))return ue(t,n);a(n,String)&&ae(r)&&t.setAttribute(r,n.split(/[, ]/)?.join(" "))}}function ue(t,e){if(t&&a(e,Object))for(let[r,n]of Object.entries(e))t.setAttribute(`data-${N(r)}`,n)}function fe(t){return t?a(t,Proxy)?[t.EL]:a(t,NodeList)?[...t]:M(t)?[t]:X(t)?t:t.isJQx?t.collection:void 0:[]}function de(t,e){return t.andThen(e)}function me(t,e){return t.andThen(e,!0)}function M(t){return a(t,Text,HTMLElement,Comment)}function G(t,e){if(a(e,Object))for(let[r,n]of Object.entries(e)){let o;/!important/i.test(n)&&(n=n.slice(0,n.indexOf("!")).trim(),o="important"),t.style.setProperty(N(r),n,o)}}function I(t){let e=t.cloneNode(!0);return e.removeAttribute&&e.removeAttribute("id"),t.isConnected?t.remove():t=null,e}function We(t){if(!t)return;let e=t.style,r=getComputedStyle(t),n=[e.visibility,r.visibility].includes("hidden"),o=[e.display,r.display].includes("none"),s=t.offsetTop<0||t.offsetLeft+t.offsetWidth<0||t.offsetLeft>document.body.offsetWidth,d=+r.opacity==0||+(e.opacity||1)==0;return!(s||d||o||n)}function Ve(t){return[...t.parentNode.querySelectorAll(":is(:read-write)")].find(e=>e===t)??!1}function ge(t){return t?.filter(e=>e).reduce((e,r)=>e.concat($e(r)?`<!--${r.data}-->`:ye(r)?r.textContent:r.outerHTML),"")}function se(t,e=2){return`${t}`.padStart(e,"0")}function _e(t,e=0){return[t,e]=[Math.floor(t),Math.ceil(e)],Math.floor([...crypto.getRandomValues(new Uint32Array(1))].shift()/2**32*(t-e+1)+e)}function pe(){return`_${Vt(zt).slice(0,8).join("")}`}function Te(t){return t=a(t,String)&&/,/.test(t)?t.split(","):t,a(t,Array)?t.filter(e=>F(e)).map(e=>e.trim().toLowerCase()):a(t,String)&&t?.trim().toLowerCase()||""}function Ue(t){return[...t.parentNode.querySelectorAll(":is(:modal)")].find(e=>e===t)??!1}function Vt(t){let e=t.length;for(;e--;){let r=_e(e);[t[e],t[r]]=[t[r],t[e]]}return t}function Z(t){return a(t,String)?t.toLowerCase().split("-").map((e,r)=>r&&`${_t(e)}`||e).join(""):t}function N(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/^-|-$/,"")}function _t([t,...e]){return`${t.toUpperCase()}${e.join("")}`}function ye(t){return a(t,Comment,Text)}function $e(t){a(t,Comment)}function Ge(t){return a(t,Text)}function Y(t){return a(t,String)&&/^<|>$/.test(`${t}`.trim())}function X(t){return a(t,Array)&&!t?.find(e=>!M(e))}function he(t){return a(t,Array)&&!t?.find(e=>!Y(e))}function E(t,e){let r=t.collection.filter(n=>!ye(n));for(let n=0;n<r.length;n+=1)e(r[n],n);return t}function Ae(t,e,r){let n=e!==document.body&&a(t,String)&&t.toLowerCase()!=="body"?e:document,o;try{r.collection=[...n.querySelectorAll(t)]}catch{o=`Invalid CSS querySelector. [${a(t,String)?t:"Nothing valid given!"}]`}let s=r.collection.length;return s<1?`CSS querySelector "${t}", output: nothing`:o??`CSS querySelector "${t}", output ${s} element${s>1?"s":""}`}function Ut(t){let e=`anonymous_${Math.random().toString(36).slice(2)}`;return t.data.add({hid:e}),`[data-hid="${e}"]`}function Ze(){return{isCommentOrTextNode:ye,isNode:M,isComment:$e,isText:Ge,isHtmlString:Y,isArrayOfHtmlElements:X,isArrayOfHtmlStrings:he,ElemArray2HtmlString:ge,input2Collection:fe,setCollectionFromCssSelector:Ae,addHandlerId:Ut,cssRuleEdit:_({createWithId:"JQxStylesheet"})}}function Ye(){let e=Object.freeze({notInDOM:!0,writable:"n/a",modal:"n/a",empty:!0,open:"n/a",visible:"n/a"});return r=>{let n=r.node;return a(n,Node)?Object.freeze({get writable(){return Ve(n)},get modal(){return Ue(n)},get inDOM(){return n.isConnected},get open(){return n.open??!1},get visible(){return We(n)},get disabled(){return n.hasAttribute("readonly")||n.hasAttribute("disabled")},get empty(){return r.collection.length<1},get virtual(){return r.isVirtual}}):e}}function Xe(t,e,r,n){r&&a(e,String)&&(e={[e]:r==="-"?"":r});let o;e.className&&(o=e.className,delete e.className),o=[...t.classList].find(d=>d.startsWith("JQxClass-")||o&&d===o)||o||`JQxClass-${pe().slice(1)}`,n.editCssRule(`.${o}`,e),t.classList.add(o)}var Gt=Ye();function Ke(t){return{factoryExtensions:Zt(t),instanceExtensions:Yt(t)}}function Zt(t){return{data:e=>({get all(){return new Proxy(e[0]?.dataset??{},Fe)},set:(r={})=>{if(!e.is.empty&&a(r,Object))for(let[n,o]of Object.entries(r))e.setData({[n]:o});return e},get:(r,n)=>e.data.all[r]??n,add:(r={})=>{if(!e.is.empty&&a(r,Object))for(let[n,o]of Object.entries(r))e.setData({[n]:o});return e},remove:r=>(e[0]?.removeAttribute(`data-${N(r)}`),e)}),dimensions:e=>{if(e.is.empty)return{error:"[instance].dimensions: NO ELEMENTS"};let r=e[0],n=e.first()?.getBoundingClientRect().toJSON();return n.scrollTopDistance=U(r,0),n.scrollLeftDistance=U(r,0,!1),n},node:e=>e[0],HTML:e=>({get:(r,n)=>{if(e.is.empty)return"NO ELEMENTS IN COLLECTION";let o=r?e.outerHtml:e.html();return n?O(o):o},set:(r,n=!1,o=!1)=>{r=r.isJQx?r.HTML.get(1):r;let s=a(r,String);return r=s&&o?O(r):r,s&&(r||"").trim().length&&e.html(r,n),e},replace:(r,n=!1)=>e.HTML.set(r,!1,n),append:(r,n=!1)=>(r=a(r,HTMLElement)?t(r).HTML.get(1):r.isJQx?r.HTML.get(1):r,e.HTML.set(r,!0,n)),insert:(r,n=!1)=>(r=a(r,HTMLElement)?t(r).HTML.get(1):r.isJQx?r.HTML.get(1):r,e.HTML.set(r+e.HTML.get(),!1,n))}),is:e=>Gt(e),length:e=>e.collection.length,outerHtml:e=>(e.first()||{outerHTML:void 0}).outerHTML,parent:e=>{let r=t(e[0]?.parentNode);return r.is.empty?e:r},render:e=>(!e.is.empty&&e.toDOM()||t.log("[JQx.render]: empty collection"),e),Style:e=>({get computed(){return e.is.empty?{}:getComputedStyle(e[0])},inline:r=>e.style(r),inSheet:r=>e.css(r),valueOf:r=>e.is.empty?void 0:getComputedStyle(e[0])[N(r)],nwRule:r=>e.Style.byRule({rules:r}),byRule:({classes2Apply:r=[],rules:n=[]}={})=>{let s=a(n,String)&&!r.length?n.split("{")[0].trim():"";if(n=n&&a(n,String)?[n]:n,r=r&&a(r,String)?[r]:r,(n?.length||r?.length)&&(n?.length&&t.editCssRules(...n),r))for(let d of r)e.addClass(d);return s?.startsWith(".")&&e.addClass(s.slice(1)),s?.startsWith("#")&&!e.attr("id")&&e.prop({id:s.slice(1)}),e}})}}function Yt(t){return{addClass:(e,...r)=>E(e,n=>n&&r.forEach(o=>n.classList.add(o))),after:de,afterMe:de,andThen:(e,r,n=!1)=>{if(!r||!a(r,String,Node,Proxy))return C.log(`[JQx instance].[beforeMe | afterMe | andThen]: insufficient input [${r}]`),e;r=r?.isJQx?r.collection:a(r,Node)?t.virtual(r).collection:t.virtual(H(r)).collection;let[o,s,d]=n?[0,"before",r.concat(e.collection)]:[e.collection.length-1,"after",e.collection.concat(r)];return e[o][s](...r),e.collection=d,e},append:(e,...r)=>{if(!e.is.empty&&r.length){let n=e.length===1;for(let o of r){if(!o.isJQx&&F(o)){let s=o.trim(),v=!/^<(.+)[^>]+>$/m.test(s)?t.text(o):H(o);E(e,p=>p.append(n?v:I(v)))}M(o)&&E(e,s=>s.append(n?o:I(o))),o.isJQx&&!o.is.empty&&E(e,s=>o.collection.forEach(d=>s.append(n?d:I(d))))}}return e},appendTo:(e,r)=>(r.isJQx||(r=t(r)),r.append(e),e),attr:(e,r,n)=>{let o=e[0];if(!o)return e;if(!n&&F(r))return r=N(r),r==="class"?[...o?.classList].join(" "):o?.getAttribute(r);if(F(r)&&n)switch(r=N(r),!0){case r.startsWith("data-"):r={data:{[r.replace("data-","")]:n}};break;default:r={[r]:n}}return a(r,Object)&&!e.is.empty&&Ce(o,r),e},before:me,beforeMe:me,clear:e=>E(e,ce),closest:(e,r)=>{let n=F(r)?e[0].closest(r):null;return n?t(n):e},computedStyle:(e,r)=>e.first()&&getComputedStyle(e.first())[r],css:(e,r,n)=>E(e,o=>Xe(o,r,n,t)),duplicate:(e,r=!1,n=document.body)=>{if(e.collection.length>0){let o=e.collection[0].cloneNode(!0);return o.childNodes.forEach(s=>{s.removeAttribute&&s?.removeAttribute("id")}),r?t(o).toDOM(n):t.virtual(o)}return C.error("Duplicating an empty JQx instance is not possible"),e},each:(e,r)=>E(e,r),empty:e=>E(e,ce),find:(e,r)=>e.collection.length>0?[...e.first()?.querySelectorAll(r)]:[],find$:(e,r)=>e.collection.length>0?t(r,e):e,first:(e,r=!1)=>{if(e.collection.length>0)return r?e.single():e.collection[0]},first$:(e,r)=>e.single(r),getData:(e,r,n)=>e.first()&&e.first().dataset?.[r]||n,hasClass:(e,...r)=>{let n=e[0];return!n||!n.classList.length?!1:r.find(o=>n.classList.contains(o))&&!0||!1},hide:e=>E(e,r=>G(r,{display:"none !important"})),html:(e,r,n)=>{if(r===void 0){let o=e.node;return o?.getHTML&&o.getHTML()||""}if(!e.isEmpty()){let o=H(`<div>${r.isJQx?r.HTML.get(!0):r}</div>`);if(!a(o,Comment))return E(e,d=>(n||(d.textContent=""),d.insertAdjacentHTML(t.at.end,o.getHTML())))}return e},htmlFor:(e,r,n="",o=!1)=>{if(r&&e.collection.length){if(!r||!F(n))return e;let s=e.find$(r);if(s.length<1)return e;let d=H(`<span>${n}</span>`);s.each(v=>{o||(v.textContent=""),v.insertAdjacentHTML(t.at.end,d?.getHTML())})}return e},isEmpty:e=>e.collection.length<1,nth$:(e,r)=>e.single(r),on:(e,r,...n)=>{if(e.collection.length&&a(r,String,Array)){if(!F(r)||n.length<1)return e;t.handle({type:r,node:e.node,handler:n})}return e},once:(e,r,...n)=>{if(e.collection.length&&a(r,String,Array)){if(!F(r)||n.length<1)return e;t.handle({type:r,once:!0,node:e.node,handler:n})}return e},prepend:(e,...r)=>{if(!e.is.empty&&r){let n=e.length===1;for(let o of r){if(F(o)){o=o.trim();let d=!/^<(.+)[^>]+>$/m.test(o)?t.text(o):H(o);d=n?d:I(d),E(e,v=>v.prepend(d.cloneNode(!0)))}M(o)&&E(e,s=>s.prepend(n?o:I(o))),o.isJQx&&!o.is.empty&&(o.collection.length>1&&o.collection.reverse(),E(e,s=>E(o,d=>s.prepend(n?d:I(d)))),o.collection.reverse())}}return e},prependTo:(e,r)=>(r.isJQx||(r=t.virtual(r)),r.prepend(e),e),prop:(e,r,n)=>{if(a(r,String)&&!n)return r.startsWith("data")?e[0]?.dataset[r.slice(r.indexOf("-")+1)]:e[0]?.[r];let o=a(r,Object)?r:{[r]:n};for(let[s,d]of Object.entries(o)){if(s=s.trim(),d&&!ae(s)||!d)return!1;if(s.toLowerCase()==="id")return e[0].id=d;E(e,p=>{if(s.startsWith("data"))return p.dataset[s.slice(s.indexOf("-")+1)]=d;p[s]=d})}return e},remove:(e,r)=>{C.log(`remove ${D(e.HTML.get(1),40)}${r?` /w selector ${r}`:""}`);let n=s=>s.remove(),o=()=>e.collection=e.collection.filter(s=>document.documentElement.contains(s));if(r){let s=e.find$(r);return s.is.empty||(E(s,n),o()),e}return E(e,n),o(),e},rmAttr:(e,...r)=>{for(let n of r)e.node.removeAttribute(n);return e},removeClass:(e,...r)=>E(e,n=>{if(n)for(let o of r)n.classList.remove(o)}),renderTo:(e,r=document.body,n=t.at.end)=>(e.first$().toDOM(r,n),e),replace:(e,r,n)=>{let o=e[0];return!r||!n||!a(n,HTMLElement)&&!n.isJQx?(console.error("JQx replace: invalid replacement value"),e):(n.isJQx&&(n=n[0]),a(n,NodeList)&&(n=n[0]),o&&r&&(r=a(r,String)?o.querySelectorAll(r):r.isJQx?r.collection:r,a(r,HTMLElement,NodeList,Array)&&a(n,HTMLElement)&&(a(r,HTMLElement)?[r]:[...r]).forEach(s=>s.replaceWith(n.cloneNode(!0)))),e)},replaceClass:(e,r,...n)=>E(e,o=>{o.classList.remove(r);for(let s of n)o.classList.add(s)}),replaceMe:(e,r)=>e.replaceWith(r),replaceWith:(e,r)=>(r=a(r,Element)?r:r.isJQx?r[0]:void 0,r&&(e[0].replaceWith(r),e=t.virtual(r)),e),setData:(e,r)=>E(e,n=>ue(n,r)),show:e=>E(e,r=>G(r,{display:"revert-layer !important"})),single:(e,r)=>e.collection.length>0?a(r,String)?e.find$(r):a(r,Number)?t(e.collection[r]):t(e.collection[0]):e,style:(e,r,n)=>E(e,s=>{n&&a(r,String)&&(r={[r]:n||"none"}),G(s,r)}),text:(e,r,n=!1)=>e.isEmpty()?e:a(r,String)?E(e,s=>s.textContent=n?s.textContent+r:r):e.first().textContent,toDOM:(e,r=document.body,n=T.BeforeEnd)=>(e.isVirtual&&(e.isVirtual=!1),B(e.collection,r,n),e),toggleClass:(e,r)=>E(e,n=>n.classList.toggle(r)),toNodeList:e=>[...e.collection].map(r=>document.importNode(r,!0)),trigger:(e,r,n=Event,o={})=>{if(e.collection.length){let s=new n(r,{...o,bubbles:o.bubbles??!0});for(let d of e.collection)d.dispatchEvent(s)}return e},val:(e,r)=>{let n=e[0];return!n||!a(n,HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement)?e:r===void 0?n.value:(n.value=a(r,String)?r:"",e)}}}var He,be,{isComment:ln,isText:sn,isHtmlString:an,isArrayOfHtmlElements:cn,isArrayOfHtmlStrings:un,ElemArray2HtmlString:fn,addHandlerId:dn,cssRuleEdit:De,addFn:Xt}=Kt();function Kt(){return{...Ze(),addFn:function(t,e){return C.log(`JQx: added extension function [${t}]`),be[t]=(r,...n)=>e(r,...n)}}}function K(t){return new Proxy(t,Object.freeze({get:(e,r)=>qt(e,r,t)}))}function qe(t,e){return(...r)=>a(t,Function)&&t(K(e),...r)}function qt(t,e,r){switch(!0){case a(e,Symbol):return t;case a(+e,Number):return t.collection?.[e]||void 0;case e in He:return qe(He[e],r)();case e in be:return qe(be[e],r);default:return t[e]}}function rt(t){let e=or(t);for(let[r,n]of Object.entries(Object.getOwnPropertyDescriptors(e)))Object.defineProperty(t,r,n);return t}function er(t){return{allow:e=>{let r=/-/.test(e),n=r&&e;e=r?Z(e):e.toLowerCase(),P.allowTag(e),a(t[e],Function)||Object.defineProperties(t,Ne(e,!0,t,n))},prohibit:e=>{e=e.toLowerCase(),P.prohibitTag(e),a(t[e],Function)&&Object.defineProperties(t,Ne(e,!1,t))}}}function et(...t){if(t.length===1){let e=String(t.shift().trim());t=e.startsWith("!")?[e.slice(1,-1)]:e.split(",").map(r=>r.trim())}for(let e of t.map(r=>r.startsWith("!")?r.slice(1,-1):r))De(e,{removeRule:1})}function tr(t){return function(e,r,n){r=r?.isJQx?r?.[0]:r,n=n&&Object.values(T).find(s=>n===s);let o=t(e,document.createElement("br"));if(r&&!a(r,HTMLBRElement))for(let s of o.collection)n?r.insertAdjacentElement(n,s):r.append(s);return o}}function rr(...t){let e={};for(let r of t){let n=Object.getOwnPropertyDescriptors(r);for(let[o,s]of Object.entries(n))!(o in e)&&Object.defineProperty(e,o,{...s,enumerable:!1})}return e}function nr(t,e,r,n){return t=N(n||t.toLowerCase()),{get(){return(...o)=>e&&r.virtual(Q(ee[t](...o)))},enumerable:!1,configurable:!0}}function Ne(t,e,r,n){t=t.toLowerCase();let o=nr(t,e,r,n);return n?{[n]:o,[Z(n)]:o}:{[t]:o,[t.toUpperCase()]:o}}function or(t){return rr(Object.entries(P.tagsRaw).reduce(ir(t),{}),fr(t))}function ir(t){return function(e,[r,n]){return n&&Object.defineProperties(e,Ne(r,n,t)),e}}function lr(t){return function(e,r,...n){a(r,Function)&&(n.push(r),r=void 0),t({type:e,selector:r,handlers:n})}}function sr(t){return function(e){let{type:r,types:n,origin:o,selector:s,handler:d,handlers:v,node:p,name:w,capture:y,once:b,about:f}=e;d=v||d,r=n||r,s=o||s;let g=Te(r),u=w;d=a(d,Function)?[d]:d;let h={type:g,selector:s||o,capture:y,name:u,once:b,node:p,about:f};switch(!0){case(a(g,Array)&&g.length>0):for(let S of g)h.type=S,tt(d,h,t);break;default:return tt(d,h,t)}}}function tt(t,e,r){for(let n of t)r.listen({...e,handler:n})}function ar(t){return function(e,r){return r=F(r)&&r,e=F(e)&&e,r&&e&&t.listenerStore[e][r]}}function cr(t){return t.activePopup||Object.defineProperty(t,"activePopup",{value:oe(t),enumerable:!1}),t.activePopup}function ur(t){let e=(p,w)=>De(p,w),r=p=>_({createWithId:p||`jqx${pe()}`}),n=(...p)=>{for(let w of p)De(w)},o=er(t),s=ie(t),d=sr(s);return{editCssRule:e,createStyle:r,editCssRules:n,allowProhibit:o,handle:d,capturedHandling:d,log:(...p)=>C.on.log(...p).off,handlerWrapper:s}}function fr(t){let{factoryExtensions:e,instanceExtensions:r}=Ke(t);He=e,be=r;let{editCssRule:n,createStyle:o,editCssRules:s,allowProhibit:d,handle:v,capturedHandling:p,log:w,handlerWrapper:y}=ur(t),b=ar(t);return{log:w,editCssRules:s,createStyle:o,editStylesheet:o,editCssRule:n,escHtml:O,logger:C,text:(f,g=!1)=>g?t.comment(f):document.createTextNode(f),node:(f,g=document)=>g.querySelector(f,g),nodes:(f,g=document)=>[...g.querySelectorAll(f,g)],get getNamedListener(){return b},get virtual(){return tr(t)},get allowTag(){return d.allow},get prohibitTag(){return d.prohibit},get removeCssRule(){return et},get removeCssRules(){return et},get delegate(){return lr(p)},get delegateCaptured(){return p},get handle(){return p},get listen(){return y.listen},get at(){return T},get setStyle(){return n},get fn(){return Xt},get lenient(){return P.allowUnknownHtmlTags},get IS(){return a},get Popup(){return cr(t)},get listenerStore(){return y.ListenerStore}}}var nt=rt(dr());function dr(){return function(e,r,n=T.BeforeEnd){if(e?.isJQx)return e;let o=a(r,HTMLBRElement);r=(!o&&r&&r.isJQx?r[0]:r)||document.body,n=n&&Object.values(T).find(f=>n===f)?n:void 0;let s=Y(e),d=!s&&he(e),v=d||s,p={collection:fe(e)??[],isVirtual:o,isJQx:!0},w=X(p.collection),y=`JQx: input =&gt; ${d?`"${D(e.join(", "),70)}"`:!v&&w?`element collection [${D(p.collection.map(f=>`${a(f,Comment,Text)?"Comment|Text @":""} ${f?.outerHTML||f?.textContent}`).join(", "),70)}]`:`"${D(e,70)}"`}`;if(p.collection.length&&w)return C.log(y),o||p.collection.forEach(f=>{r.contains(f)||B([f],r,n)}),K(p);if(v){if([e].flat().forEach(f=>p.collection.push(H(f))),p.collection.length>0){let f=p.collection.filter(g=>g?.dataset?.jqxcreationerror);p.collection=p.collection.filter(g=>!g?.dataset?.jqxcreationerror),C.log(`${y}`),C.log(`JQx: created ${p.isVirtual?"VIRTUAL ":""}[${D(ge(p.collection).trim()||"sanitized: no elements remaining",70)}]`),p.isVirtual||B(p.collection,r,n)}return K(p)}let b=Ae(e,r,p);return C.log(`JQx: input => ${b}`),K(p)}}var mr=nt;return ct(gr);})();
13
+ `)}function Mt(t){return t.reduce((e,r)=>{let[n,o]=[r.slice(0,r.indexOf(":")).trim(),r.slice(r.indexOf(":")+1).trim().replace(/;$|;.+(?=\/*).+\/$/,"")];return n&&o?{...e,[n]:o}:e},{})}function Ot(t){return Mt(Pt(t))}function Qe(t,e){return t?.replace("::",":")===e?.replace("::",":")}var Ee=!1,It={on:()=>Ee=!0,off:()=>Ee=!1},P={tagsRaw:W,allowUnknownHtmlTags:It,isAllowed(t){if(Ee)return!0;let e=a(t,String)?t.toLowerCase():t?.nodeName.toLowerCase()||"none";return e==="#text"||!!W[e]},allowTag:t=>W[t.toLowerCase()]=!0,prohibitTag:t=>W[t.toLowerCase()]=!1};var Rt=!0,re={data:/data-[\-\w.\p{L}]/ui,validURL:/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,whiteSpace:/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g,notAllowedValues:/^javascript|injected|noreferrer|alert|DataURL/gi};function jt(t){if(Rt&&Object.keys(t.removed).length){let e=Object.entries(t.removed).reduce((r,[n,o])=>[...r,`${O(n)} => ${o}`],[]).join("\\000A");C.error(`JQx: HTML creation error(s): ${e}`)}}function kt(t){let e=t.nodeName.toLowerCase(),r=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"];return/-/.test(e)&&!r.find(n=>n===e)||P.isAllowed(e)}function Q(t){let e={rawHTML:t?.parentElement?.getHTML()??"no html",removed:{}};return a(t,HTMLElement)&&[...t.childNodes].forEach(r=>{if(r?.children?.length&&Q(r),r?.attributes){let o=a(r,SVGElement)?z.svg:z.html;[...(r??{attributes:[]}).attributes].forEach(s=>{let u=s.name.trim().toLowerCase(),v=s.value.trim().toLowerCase().replace(re.whiteSpace,""),p=u==="href"?!re.validURL.test(v):re.notAllowedValues.test(v),L=u.startsWith("data")?!re.data.test(u):!!o[u];if(p||L){let y=ne(s.value||"none",60);y+=y.length===60?"...":"",e.removed[`${s.name}`]=`attribute/property/value not allowed, removed. Value: ${y}`,r.removeAttribute(s.name)}})}if(!(kt(r)||r.constructor===CharacterData||r.constructor===Comment)){let o=(r?.outerHTML||r?.textContent).trim(),s=ne(o,60)??"EMPTY";s+=s.length===60?"...":"",e.removed[`<${r.nodeName?.toLowerCase()}>`]=`not allowed, not rendered. Value: ${s}`,r.remove()}}),jt(e),t}function Jt(t){let e=document.createElement("div");return e.insertAdjacentHTML(T.end,t),e.childNodes.length?Q(e):void 0}function Qt(t,e,r){return a(t,Comment)?e.insertAdjacentHTML(r,`<!--${t.data}-->`):e.insertAdjacentText(r,t.data)}function B(t=[],e=document.body,r=T.BeforeEnd){return r=r||T.BeforeEnd,e=e?.isJQx?e.node:e||document.body,t.reduce((n,o)=>{let s=M(o)&&Bt(o,e,r);return s?[...n,s]:n},[])}function Bt(t,e=document.body,r=T.BeforeEnd){return r=r||T.BeforeEnd,e=e?.isJQx?e?.[0]:e,a(t,Comment,Text)?Qt(t,e,r):a(t,HTMLElement)?e.insertAdjacentElement(r,t):void 0}function H(t){if(a(t,Text,Comment))return t;let e=t?.trim(),r=e?.split(/<text>|<\/text>/i)??[];if(r?.length&&(r=r.length>1?r.filter(o=>o.length).shift():void 0),e.startsWith("<!--")&&e.endsWith("-->"))return document.createComment(t.replace(/<!--|-->$/g,""));if(r||!/^<(.+)[^>]+>/m.test(e))return document.createTextNode(r);let n=Jt(t);return n.childNodes.length<1?H(`<span data-jqxcreationerror="1">${D(t,60)}</span>`):n.children[0]}function oe(t){if(t.node("#jqxPopup"))return;t.logger.log("JQx: [JQx].Popup first call. Dialog element created."),t.dialog({id:"jqxPopup"},t.div({id:"jqxPopupContent"})).render,t.editCssRules(...Me);let e=[],[r,n]=[t("#jqxPopupContent"),t.node("#jqxPopup")],o={};return t.handle({type:"click, keydown",handlers:f,name:"genericPopupCloseHandler",capture:!0,about:"A generic handler for JQx popups"}),Object.freeze({show:s,remove:u,removeModal:S});function s(m){if(n.open)switch(!0){case v(m):return;default:return u(),setTimeout(()=>s(m),200)}o={...m};let{content:b}=o;return t.IS(b,String,HTMLElement)||b?.isJQx?p():!0}function u(){return o.modal?g(o.warnMessage):L()}function v(m){for(let[b,E]of Object.entries(o))if(E!==m[b])return!1;return!0}function p(){r.clear();let{content:m,modal:b,closeAfter:E}=o;b=t.IS(b,Boolean)?b:!1;let A=b?"":t.div({id:"closeHandleIcon"});r.append(A,t.IS(m,String)?t.div(m):m),n.showModal(),!b&&t.IS(E,Number)&&h(u,E)}function L(){if(n.close(o.returnValue),y(),t.IS(o.callback,Function))return e.push(setTimeout(()=>o.callback(o.returnValue),200));o={}}function y(){e.forEach(m=>clearTimeout(m)),e=[]}function S({callback:m,value:b}={}){o.returnValue=b,o.modal=!1,o.callback=m||o.callback,u()}function f({evt:m}){if(!(Object.keys(o).length<1||!n.open))return m.key==="Escape"&&m.preventDefault(),o.activeTimer&&clearTimeout(o.activeTimer),(m.target.closest("#closeHandleIcon")||!m.target.closest("#jqxPopupContent"))&&u(),!0}function h(m,b){t.IS(m,Function)&&t.IS(b,Number)&&b>0&&(y(),e.push(setTimeout(m,b*1e3)))}function g(m){if(!t.IS(m,String,HTMLElement,Proxy))return;let b=r.find$(".warn");switch(!0){case b.is.empty:b=t.div({class:"warn"},m);default:r.append(b.addClass("active")),h(()=>r.find$(".warn").removeClass("active"),2)}}}function ie(t){let e={},r="anonymous_";function n(y){if(y){let{handler:S,capture:f,type:h}=y;document.addEventListener(h,S,{capture:f})}}function o(y){if(y){let{type:S,handler:f,capture:h}=y;document.removeEventListener(S,f,{capture:h})}}function s(y,S,f,h){return function(g){if(!F(S))return y({evt:g});let m=g.target.closest(S);if(m){let b=t(m);y({self:b,me:b,evt:g}),f&&p(g.type,h)}return!0}}function u(y){return e[y]=e[y]||{},e[y]}function v(y,S){return Object.entries(u(y)).find(([f])=>f===S)}function p(y,S){let f=v(y,S);f&&(o(f[1]),delete e[y][S],delete le[S],console.warn(`Removed listener [${S}] for event type [${y}].`))}function L(y){let{type:S,handler:f,name:h,capture:g,once:m,selector:b,node:E,about:A}=y;e[S]=e[S]||{};let i=we(h||f.name),l=f;if(E instanceof HTMLElement){let c=E.dataset.hid||i;E.dataset.hid=c,b=`[data-hid=${c}]`}switch(!0){case!e[S][i]:return e[S][i]={name:i,handler:s(f,b,m,i),capture:Be(S,g),once:!!m,type:S,initialHandler:l,selector:!!b&&b||!1,about:!!A&&A||!1,unListen(){p(S,i)}},e[S][i];default:return console.warn(`The listener [${i}] for [${S}] exists, it is not re-assigned.`)}}return{remove(...y){return p(...y)},listen:function(y){let{type:S,handler:f}=y;if(!F(S)||!a(f,Function))return;let h=L(y);if(h)return n(h),{type:S,name:h.name,unListen(){p(S,h.name)}}},get ListenerStore(){return Object.freeze({...e})}}}var C=Vt(),zt=["load","unload","scroll","focus","blur","DOMNodeRemovedFromDocument","DOMNodeInsertedIntoDocument","loadstart","progress","error","abort","load","loadend","pointerenter","pointerleave","readystatechange"],T=Object.freeze(new Proxy({start:"afterbegin",afterbegin:"afterbegin",end:"beforeend",beforeend:"beforeend",before:"beforebegin",beforebegin:"beforebegin",after:"afterend",afterend:"afterend"},{get(t,e){return t[String(e).toLowerCase()]??t[e]}})),Wt=[...Array(26)].map((t,e)=>String.fromCharCode(e+65)).concat([...Array(26)].map((t,e)=>String.fromCharCode(e+97))).concat([...Array(10)].map((t,e)=>`${e}`)),Fe=Object.freeze({get(t,e){return t[Z(e)]||t[e]},enumerable:!1,configurable:!1}),le={};function Ce(){let t=setTimeout(()=>{});for(;t>=0;)clearTimeout(t--)}function we(t){return F(t)&&!/^handler|handlers$/gi.test(t.trim())?t.trim():We()}function We(t){let e=`anonymous_${Math.random().toString(36).slice(2)}`;return le[e]?We():(le[e]=e,e)}function Be(t,e){return!!zt.find(r=>r===t)||!!e}function ae(t){return t.startsWith("data")||z.html.find(e=>t.toLowerCase()===e)}function ce(t){return t&&(t.textContent="")}function U(t,e=0,r=!0){return t=t?.parentElement,e+=t?t[r?"scrollTop":"scrollLeft"]:0,t?U(t,e,r):e}function F(t,e=1){return e=a(e,Number)&&e||1,a(t,String)&&t.length>=e}function ne(t,e=120){return D(t,e).replace(/&lt;/g,"<")}function D(t,e=120){return`${t}`.trim().slice(0,e).replace(/>\s+</g,"><").replace(/</g,"&lt;").replace(/\s{2,}/g," ").replace(/\n/g,"\\n")+(t.length>e?" &hellip;":"").trim()}function O(t){switch(!0){case a(t,String):let e=document.createElement("div");return e.append(t),e.innerHTML;default:return t}}function ze(t){return a(t,String)&&Object.assign(document.createElement("textarea"),{innerHTML:t}).textContent||t}function Vt(){let t=!1,e=[],r={get on(){return t=!0,r},get off(){return t=!1,r},get backLog(){return e}};function n(...s){return e.unshift(...s.map(u=>`${Le()} \u2A3B ${ze(u)}`)),console.error(e.slice(0,s.length).join(`
14
+ `)),r}function o(...s){switch(e.unshift(...s.map(u=>`${Le()} \u2714 ${ze(u)}`)),t){case!0:console.log(e.slice(0,s.length).join(`
15
+ `));default:return r}}return Object.defineProperties(r,{log:{value:o,enumerable:!1},error:{value:n,enumerable:!1}}),Object.freeze(r)}function Le(){return(t=>`[${se(t.getHours())}:${se(t.getMinutes())}:${se(t.getSeconds())}.${se(t.getMilliseconds(),3)}]`)(new Date)}function Te(t,e){if(t)for(let[r,n]of Object.entries(e)){if(r=N(r),r.startsWith("data"))return ue(t,n);a(n,String)&&ae(r)&&t.setAttribute(r,n.split(/[, ]/)?.join(" "))}}function ue(t,e){if(t&&a(e,Object))for(let[r,n]of Object.entries(e))t.setAttribute(`data-${N(r)}`,n)}function fe(t){return t?a(t,Proxy)?[t.EL]:a(t,NodeList)?[...t]:M(t)?[t]:X(t)?t:t.isJQx?t.collection:void 0:[]}function de(t,e){return t.andThen(e)}function me(t,e){return t.andThen(e,!0)}function M(t){return a(t,Text,HTMLElement,Comment)}function G(t,e){if(a(e,Object))for(let[r,n]of Object.entries(e)){let o;/!important/i.test(n)&&(n=n.slice(0,n.indexOf("!")).trim(),o="important"),t.style.setProperty(N(r),n,o)}}function I(t){let e=t.cloneNode(!0);return e.removeAttribute&&e.removeAttribute("id"),t.isConnected?t.remove():t=null,e}function Ve(t){if(!t)return;let e=t.style,r=getComputedStyle(t),n=[e.visibility,r.visibility].includes("hidden"),o=[e.display,r.display].includes("none"),s=t.offsetTop<0||t.offsetLeft+t.offsetWidth<0||t.offsetLeft>document.body.offsetWidth,u=+r.opacity==0||+(e.opacity||1)==0;return!(s||u||o||n)}function _e(t){return[...t.parentNode.querySelectorAll(":is(:read-write)")].find(e=>e===t)??!1}function ge(t){return t?.filter(e=>e).reduce((e,r)=>e.concat($e(r)?`<!--${r.data}-->`:ye(r)?r.textContent:r.outerHTML),"")}function se(t,e=2){return`${t}`.padStart(e,"0")}function Ue(t,e=0){return[t,e]=[Math.floor(t),Math.ceil(e)],Math.floor([...crypto.getRandomValues(new Uint32Array(1))].shift()/2**32*(t-e+1)+e)}function pe(){return`_${_t(Wt).slice(0,8).join("")}`}function Ae(t){return t=a(t,String)&&/,/.test(t)?t.split(","):t,a(t,Array)?t.filter(e=>F(e)).map(e=>e.trim().toLowerCase()):a(t,String)&&t?.trim().toLowerCase()||""}function Ge(t){return[...t.parentNode.querySelectorAll(":is(:modal)")].find(e=>e===t)??!1}function _t(t){let e=t.length;for(;e--;){let r=Ue(e);[t[e],t[r]]=[t[r],t[e]]}return t}function Z(t){return a(t,String)?t.toLowerCase().split("-").map((e,r)=>r&&`${Ut(e)}`||e).join(""):t}function N(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/^-|-$/,"")}function Ut([t,...e]){return`${t.toUpperCase()}${e.join("")}`}function ye(t){return a(t,Comment,Text)}function $e(t){a(t,Comment)}function Ze(t){return a(t,Text)}function Y(t){return a(t,String)&&/^<|>$/.test(`${t}`.trim())}function X(t){return a(t,Array)&&!t?.find(e=>!M(e))}function he(t){return a(t,Array)&&!t?.find(e=>!Y(e))}function w(t,e){let r=t.collection.filter(n=>!ye(n));for(let n=0;n<r.length;n+=1)e(r[n],n);return t}function He(t,e,r){let n=e!==document.body&&a(t,String)&&t.toLowerCase()!=="body"?e:document,o;try{r.collection=[...n.querySelectorAll(t)]}catch{o=`Invalid CSS querySelector. [${a(t,String)?t:"Nothing valid given!"}]`}let s=r.collection.length;return s<1?`CSS querySelector "${t}", output: nothing`:o??`CSS querySelector "${t}", output ${s} element${s>1?"s":""}`}function Gt(t){let e=`anonymous_${Math.random().toString(36).slice(2)}`;return t.data.add({hid:e}),`[data-hid="${e}"]`}function Ye(){return{isCommentOrTextNode:ye,isNode:M,isComment:$e,isText:Ze,isHtmlString:Y,isArrayOfHtmlElements:X,isArrayOfHtmlStrings:he,ElemArray2HtmlString:ge,input2Collection:fe,setCollectionFromCssSelector:He,addHandlerId:Gt,cssRuleEdit:_({createWithId:"JQxStylesheet"})}}function Xe(){let e=Object.freeze({notInDOM:!0,writable:"n/a",modal:"n/a",empty:!0,open:"n/a",visible:"n/a"});return r=>{let n=r.node;return a(n,Node)?Object.freeze({get writable(){return _e(n)},get modal(){return Ge(n)},get inDOM(){return n.isConnected},get open(){return n.open??!1},get visible(){return Ve(n)},get disabled(){return n.hasAttribute("readonly")||n.hasAttribute("disabled")},get empty(){return r.collection.length<1},get virtual(){return r.isVirtual}}):e}}function Ke(t,e,r,n){r&&a(e,String)&&(e={[e]:r==="-"?"":r});let o;e.className&&(o=e.className,delete e.className),o=[...t.classList].find(u=>u.startsWith("JQxClass-")||o&&u===o)||o||`JQxClass-${pe().slice(1)}`,n.editCssRule(`.${o}`,e),t.classList.add(o)}var Zt=Xe();function qe(t){return{factoryExtensions:Yt(t),instanceExtensions:Xt(t)}}function Yt(t){return{data:e=>({get all(){return new Proxy(e[0]?.dataset??{},Fe)},set:(r={})=>{if(!e.is.empty&&a(r,Object))for(let[n,o]of Object.entries(r))e.setData({[n]:o});return e},get:(r,n)=>e.data.all[r]??n,add:(r={})=>{if(!e.is.empty&&a(r,Object))for(let[n,o]of Object.entries(r))e.setData({[n]:o});return e},remove:r=>(e[0]?.removeAttribute(`data-${N(r)}`),e)}),dimensions:e=>{if(e.is.empty)return{error:"[instance].dimensions: NO ELEMENTS"};let r=e[0],n=e.first()?.getBoundingClientRect().toJSON();return n.scrollTopDistance=U(r,0),n.scrollLeftDistance=U(r,0,!1),n},node:e=>e[0],HTML:e=>({get:(r,n)=>{if(e.is.empty)return"NO ELEMENTS IN COLLECTION";let o=r?e.outerHtml:e.html();return n?O(o):o},set:(r,n=!1,o=!1)=>{r=r.isJQx?r.HTML.get(1):r;let s=a(r,String);return r=s&&o?O(r):r,s&&(r||"").trim().length&&e.html(r,n),e},replace:(r,n=!1)=>e.HTML.set(r,!1,n),append:(r,n=!1)=>(r=a(r,HTMLElement)?t(r).HTML.get(1):r.isJQx?r.HTML.get(1):r,e.HTML.set(r,!0,n)),insert:(r,n=!1)=>(r=a(r,HTMLElement)?t(r).HTML.get(1):r.isJQx?r.HTML.get(1):r,e.HTML.set(r+e.HTML.get(),!1,n))}),is:e=>Zt(e),length:e=>e.collection.length,outerHtml:e=>(e.first()||{outerHTML:void 0}).outerHTML,parent:e=>{let r=t(e[0]?.parentNode);return r.is.empty?e:r},render:e=>(!e.is.empty&&e.toDOM()||t.log("[JQx.render]: empty collection"),e),Style:e=>({get computed(){return e.is.empty?{}:getComputedStyle(e[0])},inline:r=>e.style(r),inSheet:r=>e.css(r),valueOf:r=>e.is.empty?void 0:getComputedStyle(e[0])[N(r)],nwRule:r=>e.Style.byRule({rules:r}),byRule:({classes2Apply:r=[],rules:n=[]}={})=>{let s=a(n,String)&&!r.length?n.split("{")[0].trim():"";if(n=n&&a(n,String)?[n]:n,r=r&&a(r,String)?[r]:r,(n?.length||r?.length)&&(n?.length&&t.editCssRules(...n),r))for(let u of r)e.addClass(u);return s?.startsWith(".")&&e.addClass(s.slice(1)),s?.startsWith("#")&&!e.attr("id")&&e.prop({id:s.slice(1)}),e}})}}function Xt(t){return{addClass:(e,...r)=>w(e,n=>n&&r.forEach(o=>n.classList.add(o))),after:de,afterMe:de,andThen:(e,r,n=!1)=>{if(!r||!a(r,String,Node,Proxy))return C.log(`[JQx instance].[beforeMe | afterMe | andThen]: insufficient input [${r}]`),e;r=r?.isJQx?r.collection:a(r,Node)?t.virtual(r).collection:t.virtual(H(r)).collection;let[o,s,u]=n?[0,"before",r.concat(e.collection)]:[e.collection.length-1,"after",e.collection.concat(r)];return e[o][s](...r),e.collection=u,e},append:(e,...r)=>{if(!e.is.empty&&r.length){let n=e.length===1;for(let o of r){if(!o.isJQx&&F(o)){let s=o.trim(),v=!/^<(.+)[^>]+>$/m.test(s)?t.text(o):H(o);w(e,p=>p.append(n?v:I(v)))}M(o)&&w(e,s=>s.append(n?o:I(o))),o.isJQx&&!o.is.empty&&w(e,s=>o.collection.forEach(u=>s.append(n?u:I(u))))}}return e},appendTo:(e,r)=>(r.isJQx||(r=t(r)),r.append(e),e),attr:(e,r,n)=>{let o=e[0];if(!o)return e;if(!n&&F(r))return r=N(r),r==="class"?[...o?.classList].join(" "):o?.getAttribute(r);if(F(r)&&n)switch(r=N(r),!0){case r.startsWith("data-"):r={data:{[r.replace("data-","")]:n}};break;default:r={[r]:n}}return a(r,Object)&&!e.is.empty&&Te(o,r),e},before:me,beforeMe:me,clear:e=>w(e,ce),closest:(e,r)=>{let n=F(r)?e[0].closest(r):null;return n?t(n):e},computedStyle:(e,r)=>e.first()&&getComputedStyle(e.first())[r],css:(e,r,n)=>w(e,o=>Ke(o,r,n,t)),duplicate:(e,r=!1,n=document.body)=>{if(e.collection.length>0){let o=e.collection[0].cloneNode(!0);return o.childNodes.forEach(s=>{s.removeAttribute&&s?.removeAttribute("id")}),r?t(o).toDOM(n):t.virtual(o)}return C.error("Duplicating an empty JQx instance is not possible"),e},each:(e,r)=>w(e,r),empty:e=>w(e,ce),find:(e,r)=>e.collection.length>0?[...e.first()?.querySelectorAll(r)]:[],find$:(e,r)=>e.collection.length>0?t(r,e):e,first:(e,r=!1)=>{if(e.collection.length>0)return r?e.single():e.collection[0]},first$:(e,r)=>e.single(r),getData:(e,r,n)=>e.first()&&e.first().dataset?.[r]||n,hasClass:(e,...r)=>{let n=e[0];return!n||!n.classList.length?!1:r.find(o=>n.classList.contains(o))&&!0||!1},hide:e=>w(e,r=>G(r,{display:"none !important"})),html:(e,r,n)=>{if(r===void 0){let o=e.node;return o?.getHTML&&o.getHTML()||""}if(!e.isEmpty()){let o=H(`<div>${r.isJQx?r.HTML.get(!0):r}</div>`);if(!a(o,Comment))return w(e,u=>(n||(u.textContent=""),u.insertAdjacentHTML(t.at.end,o.getHTML())))}return e},htmlFor:(e,r,n="",o=!1)=>{if(r&&e.collection.length){if(!r||!F(n))return e;let s=e.find$(r);if(s.length<1)return e;let u=H(`<span>${n}</span>`);s.each(v=>{o||(v.textContent=""),v.insertAdjacentHTML(t.at.end,u?.getHTML())})}return e},isEmpty:e=>e.collection.length<1,nth$:(e,r)=>e.single(r),on:(e,r,...n)=>{if(e.collection.length&&a(r,String,Array)){if(!F(r)||n.length<1)return e;t.handle({type:r,node:e.node,handler:n})}return e},once:(e,r,...n)=>{if(e.collection.length&&a(r,String,Array)){if(!F(r)||n.length<1)return e;t.handle({type:r,once:!0,node:e.node,handler:n})}return e},prepend:(e,...r)=>{if(!e.is.empty&&r){let n=e.length===1;for(let o of r){if(F(o)){o=o.trim();let u=!/^<(.+)[^>]+>$/m.test(o)?t.text(o):H(o);u=n?u:I(u),w(e,v=>v.prepend(u.cloneNode(!0)))}M(o)&&w(e,s=>s.prepend(n?o:I(o))),o.isJQx&&!o.is.empty&&(o.collection.length>1&&o.collection.reverse(),w(e,s=>w(o,u=>s.prepend(n?u:I(u)))),o.collection.reverse())}}return e},prependTo:(e,r)=>(r.isJQx||(r=t.virtual(r)),r.prepend(e),e),prop:(e,r,n)=>{if(a(r,String)&&!n)return r.startsWith("data")?e[0]?.dataset[r.slice(r.indexOf("-")+1)]:e[0]?.[r];let o=a(r,Object)?r:{[r]:n};for(let[s,u]of Object.entries(o)){if(s=s.trim(),u&&!ae(s)||!u)return!1;if(s.toLowerCase()==="id")return e[0].id=u;w(e,p=>{if(s.startsWith("data"))return p.dataset[s.slice(s.indexOf("-")+1)]=u;p[s]=u})}return e},remove:(e,r)=>{C.log(`remove ${D(e.HTML.get(1),40)}${r?` /w selector ${r}`:""}`);let n=s=>s.remove(),o=()=>e.collection=e.collection.filter(s=>document.documentElement.contains(s));if(r){let s=e.find$(r);return s.is.empty||(w(s,n),o()),e}return w(e,n),o(),e},rmAttr:(e,...r)=>{for(let n of r)e.node.removeAttribute(n);return e},removeClass:(e,...r)=>w(e,n=>{if(n)for(let o of r)n.classList.remove(o)}),renderTo:(e,r=document.body,n=t.at.end)=>(e.first$().toDOM(r,n),e),replace:(e,r,n)=>{let o=e[0];return!r||!n||!a(n,HTMLElement)&&!n.isJQx?(console.error("JQx replace: invalid replacement value"),e):(n.isJQx&&(n=n[0]),a(n,NodeList)&&(n=n[0]),o&&r&&(r=a(r,String)?o.querySelectorAll(r):r.isJQx?r.collection:r,a(r,HTMLElement,NodeList,Array)&&a(n,HTMLElement)&&(a(r,HTMLElement)?[r]:[...r]).forEach(s=>s.replaceWith(n.cloneNode(!0)))),e)},replaceClass:(e,r,...n)=>w(e,o=>{o.classList.remove(r);for(let s of n)o.classList.add(s)}),replaceMe:(e,r)=>e.replaceWith(r),replaceWith:(e,r)=>(r=a(r,Element)?r:r.isJQx?r[0]:void 0,r&&(e[0].replaceWith(r),e=t.virtual(r)),e),setData:(e,r)=>w(e,n=>ue(n,r)),show:e=>w(e,r=>G(r,{display:"revert-layer !important"})),single:(e,r)=>e.collection.length>0?a(r,String)?e.find$(r):a(r,Number)?t(e.collection[r]):t(e.collection[0]):e,style:(e,r,n)=>w(e,s=>{n&&a(r,String)&&(r={[r]:n||"none"}),G(s,r)}),text:(e,r,n=!1)=>e.isEmpty()?e:a(r,String)?w(e,s=>s.textContent=n?s.textContent+r:r):e.first().textContent,toDOM:(e,r=document.body,n=T.BeforeEnd)=>(e.isVirtual&&(e.isVirtual=!1),B(e.collection,r,n),e),toggleClass:(e,r)=>w(e,n=>n.classList.toggle(r)),toNodeList:e=>[...e.collection].map(r=>document.importNode(r,!0)),trigger:(e,r,n=Event,o={})=>{if(e.collection.length){let s=new n(r,{...o,bubbles:o.bubbles??!0});for(let u of e.collection)u.dispatchEvent(s)}return e},val:(e,r)=>{let n=e[0];return!n||!a(n,HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement)?e:r===void 0?n.value:(n.value=a(r,String)?r:"",e)}}}var De,be,{isComment:ln,isText:sn,isHtmlString:an,isArrayOfHtmlElements:cn,isArrayOfHtmlStrings:un,ElemArray2HtmlString:fn,addHandlerId:dn,cssRuleEdit:Ne,addFn:Kt}=qt();function qt(){return{...Ye(),addFn:function(t,e){return C.log(`JQx: added extension function [${t}]`),be[t]=(r,...n)=>e(r,...n)}}}function K(t){return new Proxy(t,Object.freeze({get:(e,r)=>er(e,r,t)}))}function et(t,e){return(...r)=>a(t,Function)&&t(K(e),...r)}function er(t,e,r){switch(!0){case a(e,Symbol):return t;case a(+e,Number):return t.collection?.[e]||void 0;case e in De:return et(De[e],r)();case e in be:return et(be[e],r);default:return t[e]}}function nt(t){let e=ir(t);for(let[r,n]of Object.entries(Object.getOwnPropertyDescriptors(e)))Object.defineProperty(t,r,n);return t}function tr(t){return{allow:e=>{let r=/-/.test(e),n=r&&e;e=r?Z(e):e.toLowerCase(),P.allowTag(e),a(t[e],Function)||Object.defineProperties(t,Pe(e,!0,t,n))},prohibit:e=>{e=e.toLowerCase(),P.prohibitTag(e),a(t[e],Function)&&Object.defineProperties(t,Pe(e,!1,t))}}}function tt(...t){if(t.length===1){let e=String(t.shift().trim());t=e.startsWith("!")?[e.slice(1,-1)]:e.split(",").map(r=>r.trim())}for(let e of t.map(r=>r.startsWith("!")?r.slice(1,-1):r))Ne(e,{removeRule:1})}function rr(t){return function(e,r,n){r=r?.isJQx?r?.[0]:r,n=n&&Object.values(T).find(s=>n===s);let o=t(e,document.createElement("br"));if(r&&!a(r,HTMLBRElement))for(let s of o.collection)n?r.insertAdjacentElement(n,s):r.append(s);return o}}function nr(...t){let e={};for(let r of t){let n=Object.getOwnPropertyDescriptors(r);for(let[o,s]of Object.entries(n))!(o in e)&&Object.defineProperty(e,o,{...s,enumerable:!1})}return e}function or(t,e,r,n){return t=N(n||t.toLowerCase()),{get(){return(...o)=>e&&r.virtual(Q(ee[t](...o)))},enumerable:!1,configurable:!0}}function Pe(t,e,r,n){t=t.toLowerCase();let o=or(t,e,r,n);return n?{[n]:o,[Z(n)]:o}:{[t]:o,[t.toUpperCase()]:o}}function ir(t){return nr(Object.entries(P.tagsRaw).reduce(lr(t),{}),dr(t))}function lr(t){return function(e,[r,n]){return n&&Object.defineProperties(e,Pe(r,n,t)),e}}function sr(t){return function(e,r,...n){a(r,Function)&&(n.push(r),r=void 0),t({type:e,selector:r,handlers:n})}}function ar(t){return function(e){let{type:r,types:n,origin:o,selector:s,handler:u,handlers:v,node:p,name:L,capture:y,once:S,about:f}=e;u=v||u,r=n||r,s=o||s;let h=Ae(r),g=L;u=a(u,Function)?[u]:u;let m={type:h,selector:s||o,capture:y,name:g,once:S,node:p,about:f};switch(!0){case(a(h,Array)&&h.length>0):for(let b of h)m.type=b,rt(u,m,t);break;default:return rt(u,m,t)}}}function rt(t,e,r){for(let n of t)r.listen({...e,handler:n})}function cr(t){return function(e,r){return r=F(r)&&r,e=F(e)&&e,r&&e&&t.listenerStore[e][r]}}function ur(t){return t.activePopup||Object.defineProperty(t,"activePopup",{value:oe(t),enumerable:!1}),t.activePopup}function fr(t){let e=(p,L)=>Ne(p,L),r=p=>_({createWithId:p||`jqx${pe()}`}),n=(...p)=>{for(let L of p)Ne(L)},o=tr(t),s=ie(t),u=ar(s);return{editCssRule:e,createStyle:r,editCssRules:n,allowProhibit:o,handle:u,capturedHandling:u,log:(...p)=>C.on.log(...p).off,handlerWrapper:s}}function dr(t){let{factoryExtensions:e,instanceExtensions:r}=qe(t);De=e,be=r;let{editCssRule:n,createStyle:o,editCssRules:s,allowProhibit:u,handle:v,capturedHandling:p,log:L,handlerWrapper:y}=fr(t),S=cr(t);return{log:L,editCssRules:s,createStyle:o,editStylesheet:o,editCssRule:n,escHtml:O,logger:C,text:(f,h=!1)=>h?t.comment(f):document.createTextNode(f),node:(f,h=document)=>h.querySelector(f,h),nodes:(f,h=document)=>[...h.querySelectorAll(f,h)],clearAllTimers:Ce,get getNamedListener(){return S},get virtual(){return rr(t)},get allowTag(){return u.allow},get prohibitTag(){return u.prohibit},get removeCssRule(){return tt},get removeCssRules(){return tt},get delegate(){return sr(p)},get delegateCaptured(){return p},get handle(){return p},get listen(){return y.listen},get at(){return T},get setStyle(){return n},get fn(){return Kt},get lenient(){return P.allowUnknownHtmlTags},get IS(){return a},get Popup(){return ur(t)},get listenerStore(){return y.ListenerStore}}}var ot=nt(mr());function mr(){return function(e,r,n=T.BeforeEnd){if(e?.isJQx)return e;let o=a(r,HTMLBRElement);r=(!o&&r&&r.isJQx?r[0]:r)||document.body,n=n&&Object.values(T).find(f=>n===f)?n:void 0;let s=Y(e),u=!s&&he(e),v=u||s,p={collection:fe(e)??[],isVirtual:o,isJQx:!0},L=X(p.collection),y=`JQx: input =&gt; ${u?`"${D(e.join(", "),70)}"`:!v&&L?`element collection [${D(p.collection.map(f=>`${a(f,Comment,Text)?"Comment|Text @":""} ${f?.outerHTML||f?.textContent}`).join(", "),70)}]`:`"${D(e,70)}"`}`;if(p.collection.length&&L)return C.log(y),o||p.collection.forEach(f=>{r.contains(f)||B([f],r,n)}),K(p);if(v){if([e].flat().forEach(f=>p.collection.push(H(f))),p.collection.length>0){let f=p.collection.filter(h=>h?.dataset?.jqxcreationerror);p.collection=p.collection.filter(h=>!h?.dataset?.jqxcreationerror),C.log(`${y}`),C.log(`JQx: created ${p.isVirtual?"VIRTUAL ":""}[${D(ge(p.collection).trim()||"sanitized: no elements remaining",70)}]`),p.isVirtual||B(p.collection,r,n)}return K(p)}let S=He(e,r,p);return C.log(`JQx: input => ${S}`),K(p)}}var gr=ot;return ut(pr);})();
package/Bundle/jqx.min.js CHANGED
@@ -1,15 +1,15 @@
1
- var{IS:a,maybe:q,$Wrap:lr,xProxy:sr,isNothing:ar}=nt();function nt(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),h();let t=b(),[e,r]=[f(),A()];return r.custom(),{IS:n,maybe:t,$Wrap:e,isNothing:y,xProxy:r};function n(o,...l){if(t({trial:m=>"isTypes"in(l?.[0]??{})})){let m=l[0];return"defaultValue"in m?g(o,m):"notTypes"in m?u(o,m):n(o,...[m.isTypes].flat())}let c=typeof o=="symbol"?Symbol.isSymbol:o;return l.length>1?w(c,...l):s(o,...l)}function i(o){return o?.[Symbol.proxy]??n(o)}function s(o,...l){let{noInput:c,noShouldbe:m,compareTo:x,inputCTOR:$,isNaN:R,isInfinity:j,shouldBeFirstElementIsNothing:k}=v(o,...l);switch(l=l.length&&l[0],!0){case k:return String(o)===String(x);case(o?.[Symbol.proxy]&&m):return o[Symbol.proxy];case R:return m?"NaN":t({trial:J=>String(x)})===String(o);case j:return m?"Infinity":t({trial:J=>String(x)})===String(o);case c:return m?String(o):String(x)===String(o);case $===Boolean:return l?$===l:"Boolean";default:return p(o,l,m,d(o,$))}}function d(o,l){return o===0?Number:o===""?String:o?l:{name:String(o)}}function v(o,...l){let c=l.length<1,m=!c&&l[0],x=!c&&y(l[0]),$=o==null,R=!$&&Object.getPrototypeOf(o)?.constructor,j=t({trial:J=>String(o)})==="NaN",k=t({trial:J=>String(o)})==="Infinity";return{noInput:$,noShouldbe:c,compareTo:m,inputCTOR:R,isNaN:j,isInfinity:k,shouldBeFirstElementIsNothing:x}}function p(o,l,c,m){switch(!0){case(!c&&l===o||o?.[Symbol.proxy]&&l===Proxy):return!0;case t({trial:x=>String(l)})==="NaN":return String(o)==="NaN";case(o?.[Symbol.toStringTag]&&n(l,String)):return String(l)===o[Symbol.toStringTag];default:return l?t({trial:x=>o instanceof l})||l===m||l===Object.getPrototypeOf(m)||`${l?.name}`===m?.name:o?.[Symbol.toStringTag]&&`[object ${o?.[Symbol.toStringTag]}]`||m?.name||String(m)}}function w(o,...l){return l.some(c=>n(o,c))}function y(o,l=!1){let c=o==null;return c=l?c||n(o,1/0)||n(o,NaN):c,c}function b(){let o=(l,c)=>l?.constructor===Function?l(c):void 0;return function({trial:l,whenError:c=()=>{}}={}){try{return o(l)}catch(m){return o(c,m)}}}function f(){return function(o){return Object.freeze({get value(){return o},get[Symbol.type](){return i(o)},get type(){return i(o)},[Symbol.is](...l){return n(o,...l)},is(...l){return n(o,...l)}})}}function g(o,{defaultValue:l,isTypes:c=[void 0],notTypes:m}={}){return c=c?.constructor!==Array?[c]:c,m=m&&m?.constructor!==Array?[m]:[],m.length<1?n(o,...c)?o:l:u(o,{isTypes:c,notTypes:m})?o:l}function u(o,{isTypes:l=[void 0],notTypes:c=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,c=c?.constructor!==Array?[c]:c,n(o,...l)&&!n(o,...c)}function h(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return i(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...o){return n(this,...o)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(o){return i(o)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(o,...l){return n(o,...l)},enumerable:!1,configurable:!1}}))}function S(o){let l=String(Object.getPrototypeOf(o)?.constructor);return l.slice(l.indexOf("ion")+3,l.indexOf("(")).trim()}function L(o){let l=o.set;return o.set=(c,m,x)=>m===Symbol.proxy?c[m]=x:l(c,m,x),o}function A(){let o=Proxy;return{native(){Proxy=o},custom(){Proxy=new o(o,{construct(l,c){for(let x of c)x.set&&(x=L(x));let m=new l(...c);return m[Symbol.proxy]=`Proxy (${S(c[0])})`,m}})}}}}var Ne=lt(),z=ot(),W=it();function ot(){return{html:Object.freeze("accept,action,align,alt,autocapitalize,autocomplete,autopictureinpicture,autoplay,background,bgcolor,border,capture,cellpadding,cellspacing,checked,cite,class,clear,contenteditable,color,cols,colspan,controls,controlslist,coords,crossorigin,datetime,decoding,default,dir,disabled,disablepictureinpicture,disableremoteplayback,download,draggable,enctype,enterkeyhint,face,for,headers,height,hidden,high,href,hreflang,id,inputmode,integrity,is,ismap,kind,label,lang,list,loading,loop,low,max,maxlength,media,method,min,minlength,multiple,muted,name,nonce,noshade,novalidate,nowrap,open,optimum,pattern,placeholder,playsinline,poster,preload,pubdate,radiogroup,readonly,rel,required,rev,reversed,role,rows,rowspan,spellcheck,scope,selected,shape,size,sizes,span,srclang,start,src,srcset,step,style,summary,tabindex,target,title,translate,type,usemap,valign,value,width,xmlns,slot".split(",")),svg:Object.freeze("accent-height,accumulate,additive,alignment-baseline,ascent,attributename,attributetype,azimuth,basefrequency,baseline-shift,begin,bias,by,class,clip,clippathunits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,cx,cy,d,dx,dy,diffuseconstant,direction,display,divisor,dur,edgemode,elevation,end,fill,fill-opacity,fill-rule,filter,filterunits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,fx,fy,g1,g2,glyph-name,glyphref,gradientunits,gradienttransform,height,href,id,image-rendering,in,in2,k,k1,k2,k3,k4,kerning,keypoints,keysplines,keytimes,lang,lengthadjust,letter-spacing,kernelmatrix,kernelunitlength,lighting-color,local,marker-end,marker-mid,marker-start,markerheight,markerunits,markerwidth,maskcontentunits,maskunits,max,mask,media,method,mode,min,name,numoctaves,offset,operator,opacity,order,orient,orientation,origin,overflow,paint-order,path,pathlength,patterncontentunits,patterntransform,patternunits,points,preservealpha,preserveaspectratio,primitiveunits,r,rx,ry,radius,refx,refy,repeatcount,repeatdur,restart,result,rotate,scale,seed,shape-rendering,specularconstant,specularexponent,spreadmethod,startoffset,stddeviation,stitchtiles,stop-color,stop-opacity,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke,stroke-width,style,surfacescale,systemlanguage,tabindex,targetx,targety,transform,text-anchor,text-decoration,text-rendering,textlength,type,u1,u2,unicode,values,viewbox,visibility,version,vert-adv-y,vert-origin-x,vert-origin-y,width,word-spacing,wrap,writing-mode,xchannelselector,ychannelselector,x,x1,x2,xmlns,y,y1,y2,z,zoomandpan".split(","))}}function it(){return{a:!0,area:!0,audio:!1,br:!0,base:!0,body:!0,button:!0,canvas:!0,comment:!0,dl:!0,data:!0,datalist:!0,div:!0,em:!0,embed:!1,fieldset:!0,font:!0,footer:!0,form:!1,hr:!0,head:!0,header:!0,output:!0,iframe:!1,frameset:!1,img:!0,input:!0,li:!0,label:!0,legend:!0,link:!0,map:!0,mark:!0,menu:!0,media:!0,meta:!0,nav:!0,meter:!0,ol:!0,object:!1,optgroup:!0,option:!0,p:!0,param:!0,picture:!0,pre:!0,progress:!1,quote:!0,script:!1,select:!0,source:!0,span:!0,style:!0,caption:!0,td:!0,col:!0,table:!0,tr:!0,template:!1,textarea:!0,time:!0,title:!0,track:!0,details:!0,ul:!0,video:!0,del:!0,ins:!0,slot:!0,blockquote:!0,svg:!0,dialog:!0,summary:!0,main:!0,address:!0,colgroup:!0,tbody:!0,tfoot:!0,thead:!0,th:!0,dd:!0,dt:!0,figcaption:!0,figure:!0,i:!0,b:!0,code:!0,h1:!0,h2:!0,h3:!0,h4:!0,abbr:!0,bdo:!0,dfn:!0,kbd:!0,q:!0,rb:!0,rp:!0,rt:!0,ruby:!0,s:!0,strike:!0,samp:!0,small:!0,strong:!0,sup:!0,sub:!0,u:!0,var:!0,wbr:!0,nobr:!0,tt:!0,noscript:!0}}function lt(){return["::backdrop{background-color:grey;opacity:0.2;}",`#jqxPopup{overflow:hidden;background-color:transparent;outline:none;border:none;inset:0;animation:fade-out 0.5s ease-out;&[open]{display:flex;align-items:center;justify-content:center;animation:fade-in 0.5s ease;}#jqxPopupContent{background-color:white;border:solid 1px #eee;box-shadow:1px 2px 8px #999;border-radius:4px;padding:12px;vertical-align:middle;max-height:40vh;max-width:50vw;overflow:auto;margin:0 auto;div:not(#closeHandleIcon){clear:both;}@media (width <= 640px){max-width:80vw;max-height:60vh;}#closeHandleIcon{cursor:pointer;width:24px;height:24px;display:inline;position:absolute;top:4px;right:4px;justify-content:right;background-image:url("data:image/svg+xml;utf8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22iso-8859-1%22%3F%3E%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20version%3D%221.1%22%20id%3D%22Layer_1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%20128%20128%22%20style%3D%22enable-background%3Anew%200%200%20128%20128%3B%22%20xml%3Aspace%3D%22preserve%22%3E%3Crect%20x%3D%22-368%22%20y%3D%226%22%20style%3D%22display%3Anone%3Bfill%3A%23E0E0E0%3B%22%20width%3D%22866%22%20height%3D%221018%22%2F%3E%3Ccircle%20style%3D%22fill%3A%23FFFFFF%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2248%22%2F%3E%3Ccircle%20style%3D%22fill%3A%238CCFB9%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2239%22%2F%3E%3Ccircle%20style%3D%22fill%3Anone%3Bstroke%3A%23444B54%3Bstroke-width%3A6%3Bstroke-miterlimit%3A10%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2248%22%2F%3E%3Cpolyline%20style%3D%22fill%3Anone%3Bstroke%3A%23FFFFFF%3Bstroke-width%3A6%3Bstroke-linecap%3Around%3Bstroke-miterlimit%3A10%3B%22%20points%3D%2242%2C69%2055.55%2C81%20%20%2086%2C46%20%22%2F%3E%3C%2Fsvg%3E");@media (width <= 640px){background-image:none;position:relative;margin:-15px -15px 4px 0;float:right;vertical-align:middle;border:1px solid #AAA;padding:2px;border-radius:50%;width:12px;height:12px;font-size:12px;line-height:12px;font-weight:bold;text-align:center;&:after{content:'\\2714';color:green;}}}.warn{display:none;text-align:center;color:red;border-top:1px solid #999;margin-top:1em;padding-top:3px;animation:warn-fade-out 0.2s ease-out;}.warn.active{opacity:1;display:block;animation:warn-fade-in 0.2s ease-in;}}}`,"@keyframes fade-in{0%{opacity:0;transform:scale(0, 0);display:none;}100%{opacity:1;transform:scale(1, 1);display:flex;}}","@keyframes fade-out{0%{opacity:1;transform:scale(1, 1);display:flex;}100%{opacity:0;transform:scale(0, 0);display:none;}}","@keyframes warn-fade-in{0%{opacity:0;transform:scale(0, 0);display:none;}100%{opacity:1;transform:scale(1,1 );display:block;}}","@keyframes warn-fade-out{0%{opacity:1;transform:scale(1, 1);display:block;}100%{opacity:0;transform:scale(0, 0);display:none;}}"]}var Pe={html:"innerHTML",text:"textContent",class:"className"},ee=st();function st(){let t={get(e,r){let n=String(r)?.toLowerCase();switch(!0){case n in e:return e[n];case yt(n):return Me(e,n,r);default:return Me(e,n,r,!0)}},enumerable:!1,configurable:!1};return new Proxy({},t)}function Me(t,e,r,n=!1){return Object.defineProperty(t,e,{get(){return n?i=>gt(r):ht(e)}}),t[e]}function at(t,e,r){return e=e?.isJQx&&e.first()||e,q({trial:n=>pt(e)?t.append(e):Ie(e)?t.insertAdjacentHTML("beforeend",e):t.append(e),whenError:n=>console.info(`${r} (for root ${t}) not created, reason
2
- `,n)})}function ct(t,e,...r){let n=ut(e,t);return r?.forEach(i=>at(n,i,t)),n}function ut(t,e){switch(t=Se(e)?mt(t):t?.isJQx?t.first():t,!0){case a(t,String):return V(e,Ie(t,e)?{html:t}:{text:t});case a(t,Node):return dt(e,t);default:return V(e,t)}}function ft(t){return delete t.data,Object.keys(t).length<1||Object.keys(t).forEach(e=>{let r=e.toLowerCase();r in Pe&&(t[Pe[r]]=t[e],delete t[e])}),t}function dt(t,e){let r=V(t);return r.append(e),r}function V(t,e={}){e=Oe(e,{});let r=Object.entries(e.data??{}),n=Object.assign(Se(t)?new Comment(e?.text):document.createElement(t),ft(e));return r.length&&r.forEach(([i,s])=>n.dataset[i]=String(s)),n}function Oe(t,e){return e?a(t,{isTypes:Object,notTypes:[Array,null,NaN,Proxy],defaultValue:e}):a(t,{isTypes:Object,notTypes:[Array,null,NaN,Proxy]})}function mt(t){return Oe(t)?t?.text??t?.textContent??"":String(t)}function gt(t){return V("b",{style:"color:red",text:`'${t}' is not a valid HTML-tag`})}function Ie(t,e){return!Se(e)&&a(t,String)&&/<.*>|&[#|0-9a-z]+[^;];/i.test(t)}function pt(t){return t?.constructor===Comment||t?.constructor===CharacterData}function Se(t){return t?.constructor===Comment||/comment/i.test(t)}function yt(t){return!a(V(t),HTMLUnknownElement)}function ht(t){return(e,...r)=>ct(t,e,...r)}var{IS:te,maybe:mr,$Wrap:gr,xProxy:pr,isNothing:yr}=bt();function bt(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),h();let t=b(),[e,r]=[f(),A()];return r.custom(),{IS:n,maybe:t,$Wrap:e,isNothing:y,xProxy:r};function n(o,...l){if(t({trial:m=>"isTypes"in(l?.[0]??{})})){let m=l[0];return"defaultValue"in m?g(o,m):"notTypes"in m?u(o,m):n(o,...[m.isTypes].flat())}let c=typeof o=="symbol"?Symbol.isSymbol:o;return l.length>1?w(c,...l):s(o,...l)}function i(o){return o?.[Symbol.proxy]??n(o)}function s(o,...l){let{noInput:c,noShouldbe:m,compareTo:x,inputCTOR:$,isNaN:R,isInfinity:j,shouldBeFirstElementIsNothing:k}=v(o,...l);switch(l=l.length&&l[0],!0){case k:return String(o)===String(x);case(o?.[Symbol.proxy]&&m):return o[Symbol.proxy];case R:return m?"NaN":t({trial:J=>String(x)})===String(o);case j:return m?"Infinity":t({trial:J=>String(x)})===String(o);case c:return m?String(o):String(x)===String(o);case $===Boolean:return l?$===l:"Boolean";default:return p(o,l,m,d(o,$))}}function d(o,l){return o===0?Number:o===""?String:o?l:{name:String(o)}}function v(o,...l){let c=l.length<1,m=!c&&l[0],x=!c&&y(l[0]),$=o==null,R=!$&&Object.getPrototypeOf(o)?.constructor,j=t({trial:J=>String(o)})==="NaN",k=t({trial:J=>String(o)})==="Infinity";return{noInput:$,noShouldbe:c,compareTo:m,inputCTOR:R,isNaN:j,isInfinity:k,shouldBeFirstElementIsNothing:x}}function p(o,l,c,m){switch(!0){case(!c&&l===o||o?.[Symbol.proxy]&&l===Proxy):return!0;case t({trial:x=>String(l)})==="NaN":return String(o)==="NaN";case(o?.[Symbol.toStringTag]&&n(l,String)):return String(l)===o[Symbol.toStringTag];default:return l?t({trial:x=>o instanceof l})||l===m||l===Object.getPrototypeOf(m)||`${l?.name}`===m?.name:o?.[Symbol.toStringTag]&&`[object ${o?.[Symbol.toStringTag]}]`||m?.name||String(m)}}function w(o,...l){return l.some(c=>n(o,c))}function y(o,l=!1){let c=o==null;return c=l?c||n(o,1/0)||n(o,NaN):c,c}function b(){let o=(l,c)=>l?.constructor===Function?l(c):void 0;return function({trial:l,whenError:c=()=>{}}={}){try{return o(l)}catch(m){return o(c,m)}}}function f(){return function(o){return Object.freeze({get value(){return o},get[Symbol.type](){return i(o)},get type(){return i(o)},[Symbol.is](...l){return n(o,...l)},is(...l){return n(o,...l)}})}}function g(o,{defaultValue:l,isTypes:c=[void 0],notTypes:m}={}){return c=c?.constructor!==Array?[c]:c,m=m&&m?.constructor!==Array?[m]:[],m.length<1?n(o,...c)?o:l:u(o,{isTypes:c,notTypes:m})?o:l}function u(o,{isTypes:l=[void 0],notTypes:c=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,c=c?.constructor!==Array?[c]:c,n(o,...l)&&!n(o,...c)}function h(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return i(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...o){return n(this,...o)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(o){return i(o)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(o,...l){return n(o,...l)},enumerable:!1,configurable:!1}}))}function S(o){let l=String(Object.getPrototypeOf(o)?.constructor);return l.slice(l.indexOf("ion")+3,l.indexOf("(")).trim()}function L(o){let l=o.set;return o.set=(c,m,x)=>m===Symbol.proxy?c[m]=x:l(c,m,x),o}function A(){let o=Proxy;return{native(){Proxy=o},custom(){Proxy=new o(o,{construct(l,c){for(let x of c)x.set&&(x=L(x));let m=new l(...c);return m[Symbol.proxy]=`Proxy (${S(c[0])})`,m}})}}}}var _=St;function St({styleSheet:t,createWithId:e}={}){let{tryParseAtOrNestedRules:r,ruleExists:n,checkParams:i,sheet:s,removeRules:d,consider:v,currentSheetID:p}=xt({styleSheet:t,createWithId:e});function w(u,h){if(u&&h.removeProperties){Object.keys(h.removeProperties).forEach(S=>u.style.removeProperty(Re(S)));return}Object.entries(h).forEach(([S,L])=>{S=Re(S.trim()),L=L.trim();let A;if(/!important/.test(L)&&(L=L.slice(0,L.indexOf("!important")).trim(),A="important"),!CSS.supports(S,L))return console.error(`StylingFactory ${p} error: '${S}' with value '${L}' not supported (yet)`);je(()=>u.style.setProperty(S,L,A),`StylingFactory ${p} (setRule4Selector) failed`)})}function y(u,h,S=s){if(u=u?.trim?.(),!te(u,String)||!u.length||/[;,]$/g.test(u))return console.error(`StylingFactory ${p} (setRules): [${u||"[no selector given]"}] is not a valid selector`);if(h.removeRule)return d(u);let L=n(u,!0),A=L||S.cssRules[S.insertRule(`${u} {}`,S.cssRules.length||0)];return v(()=>w(A,h),u,L)}function b(u){let h=u.trim().split(/{/,2),S=h.shift().trim();if(!te(S,String)||!S?.trim()?.length)return console.error(`StylingFactory ${p} (doParse): no (valid) selector could be extracted from rule ${xe(u)}`);let L=Tt(h.shift());return je(()=>y(S,L),`StylingFactory ${p} (setRules) failed`)}function f(u){let h=r(u);return h.done?h.existing:b(u)}function g(u,h){return u.trim().startsWith("@media")?f(vt(u,h)):y(u,h)}return function(u,h={}){return i(u,h)&&(Object.keys(h).length?g(u,h):f(u))}}function xt({styleSheet:t,createWithId:e}){let r="Note: The rule or some of its properties may not be supported by your browser (yet)",n=`for style#${e}`;t=e?i(e):t;function i(f){let g=document.querySelector(`#${f}`)?.sheet;if(g)return g;let u=Object.assign(document.createElement("style"),{id:f});return document.head.insertAdjacentElement("beforeend",u),u.sheet}function s(f){return console.error(`StylingFactory ${n} [rule: ${f}]
3
- => @charset, @namespace and @import are not supported here`),{done:!0}}function d(f,g){return[...t.rules].find(u=>g?ke(u.selectorText||"",f):Lt`${wt(f)}${[..."gim"]}`.test(u.cssText))}function v(f){return/^@charset|@import|namespace/i.test(f.trim())?s(f):f.match(/}/g)?.length>1?{existing:y(f,1),done:!0}:{done:!1}}function p(f){let g=[...t.cssRules].reduce((h,S,L)=>ke(S.selectorText||"",f)&&h.concat(L)||h,[]),u=g.length;return g.forEach(h=>t.deleteRule(h)),u>0?console.info(`\u2714 Removed ${u} instance${u>1?"s":""} of selector ${f} from ${n.slice(4)}`):console.info(`\u2714 Remove rule: selector ${f} does not exist in ${n.slice(4)}`)}function w(f,g){return f&&te(f,String)&&f.trim().length>0&&te(g,Object)||(console.error(`StylingFactory ${n} called with invalid parameters`),!1)}function y(f){f=f.trim();let g=f.slice(0,f.indexOf("{")).trim(),u=!!d(g);try{return t.insertRule(`${f}`,t.cssRules.length),u}catch(h){return console.error(`StylingFactory ${n} (tryParse) ${h.name} Error:
4
- ${h.message}
1
+ var{IS:a,maybe:q,$Wrap:sr,xProxy:ar,isNothing:cr}=ot();function ot(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),m();let t=S(),[e,r]=[f(),A()];return r.custom(),{IS:n,maybe:t,$Wrap:e,isNothing:y,xProxy:r};function n(i,...l){if(t({trial:d=>"isTypes"in(l?.[0]??{})})){let d=l[0];return"defaultValue"in d?h(i,d):"notTypes"in d?g(i,d):n(i,...[d.isTypes].flat())}let c=typeof i=="symbol"?Symbol.isSymbol:i;return l.length>1?L(c,...l):s(i,...l)}function o(i){return i?.[Symbol.proxy]??n(i)}function s(i,...l){let{noInput:c,noShouldbe:d,compareTo:x,inputCTOR:$,isNaN:R,isInfinity:j,shouldBeFirstElementIsNothing:k}=v(i,...l);switch(l=l.length&&l[0],!0){case k:return String(i)===String(x);case(i?.[Symbol.proxy]&&d):return i[Symbol.proxy];case R:return d?"NaN":t({trial:J=>String(x)})===String(i);case j:return d?"Infinity":t({trial:J=>String(x)})===String(i);case c:return d?String(i):String(x)===String(i);case $===Boolean:return l?$===l:"Boolean";default:return p(i,l,d,u(i,$))}}function u(i,l){return i===0?Number:i===""?String:i?l:{name:String(i)}}function v(i,...l){let c=l.length<1,d=!c&&l[0],x=!c&&y(l[0]),$=i==null,R=!$&&Object.getPrototypeOf(i)?.constructor,j=t({trial:J=>String(i)})==="NaN",k=t({trial:J=>String(i)})==="Infinity";return{noInput:$,noShouldbe:c,compareTo:d,inputCTOR:R,isNaN:j,isInfinity:k,shouldBeFirstElementIsNothing:x}}function p(i,l,c,d){switch(!0){case(!c&&l===i||i?.[Symbol.proxy]&&l===Proxy):return!0;case t({trial:x=>String(l)})==="NaN":return String(i)==="NaN";case(i?.[Symbol.toStringTag]&&n(l,String)):return String(l)===i[Symbol.toStringTag];default:return l?t({trial:x=>i instanceof l})||l===d||l===Object.getPrototypeOf(d)||`${l?.name}`===d?.name:i?.[Symbol.toStringTag]&&`[object ${i?.[Symbol.toStringTag]}]`||d?.name||String(d)}}function L(i,...l){return l.some(c=>n(i,c))}function y(i,l=!1){let c=i==null;return c=l?c||n(i,1/0)||n(i,NaN):c,c}function S(){let i=(l,c)=>l?.constructor===Function?l(c):void 0;return function({trial:l,whenError:c=()=>{}}={}){try{return i(l)}catch(d){return i(c,d)}}}function f(){return function(i){return Object.freeze({get value(){return i},get[Symbol.type](){return o(i)},get type(){return o(i)},[Symbol.is](...l){return n(i,...l)},is(...l){return n(i,...l)}})}}function h(i,{defaultValue:l,isTypes:c=[void 0],notTypes:d}={}){return c=c?.constructor!==Array?[c]:c,d=d&&d?.constructor!==Array?[d]:[],d.length<1?n(i,...c)?i:l:g(i,{isTypes:c,notTypes:d})?i:l}function g(i,{isTypes:l=[void 0],notTypes:c=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,c=c?.constructor!==Array?[c]:c,n(i,...l)&&!n(i,...c)}function m(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...i){return n(this,...i)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(i){return o(i)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(i,...l){return n(i,...l)},enumerable:!1,configurable:!1}}))}function b(i){let l=String(Object.getPrototypeOf(i)?.constructor);return l.slice(l.indexOf("ion")+3,l.indexOf("(")).trim()}function E(i){let l=i.set;return i.set=(c,d,x)=>d===Symbol.proxy?c[d]=x:l(c,d,x),i}function A(){let i=Proxy;return{native(){Proxy=i},custom(){Proxy=new i(i,{construct(l,c){for(let x of c)x.set&&(x=E(x));let d=new l(...c);return d[Symbol.proxy]=`Proxy (${b(c[0])})`,d}})}}}}var Pe=st(),z=it(),W=lt();function it(){return{html:Object.freeze("accept,action,align,alt,autocapitalize,autocomplete,autopictureinpicture,autoplay,background,bgcolor,border,capture,cellpadding,cellspacing,checked,cite,class,clear,contenteditable,color,cols,colspan,controls,controlslist,coords,crossorigin,datetime,decoding,default,dir,disabled,disablepictureinpicture,disableremoteplayback,download,draggable,enctype,enterkeyhint,face,for,headers,height,hidden,high,href,hreflang,id,inputmode,integrity,is,ismap,kind,label,lang,list,loading,loop,low,max,maxlength,media,method,min,minlength,multiple,muted,name,nonce,noshade,novalidate,nowrap,open,optimum,pattern,placeholder,playsinline,poster,preload,pubdate,radiogroup,readonly,rel,required,rev,reversed,role,rows,rowspan,spellcheck,scope,selected,shape,size,sizes,span,srclang,start,src,srcset,step,style,summary,tabindex,target,title,translate,type,usemap,valign,value,width,xmlns,slot".split(",")),svg:Object.freeze("accent-height,accumulate,additive,alignment-baseline,ascent,attributename,attributetype,azimuth,basefrequency,baseline-shift,begin,bias,by,class,clip,clippathunits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,cx,cy,d,dx,dy,diffuseconstant,direction,display,divisor,dur,edgemode,elevation,end,fill,fill-opacity,fill-rule,filter,filterunits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,fx,fy,g1,g2,glyph-name,glyphref,gradientunits,gradienttransform,height,href,id,image-rendering,in,in2,k,k1,k2,k3,k4,kerning,keypoints,keysplines,keytimes,lang,lengthadjust,letter-spacing,kernelmatrix,kernelunitlength,lighting-color,local,marker-end,marker-mid,marker-start,markerheight,markerunits,markerwidth,maskcontentunits,maskunits,max,mask,media,method,mode,min,name,numoctaves,offset,operator,opacity,order,orient,orientation,origin,overflow,paint-order,path,pathlength,patterncontentunits,patterntransform,patternunits,points,preservealpha,preserveaspectratio,primitiveunits,r,rx,ry,radius,refx,refy,repeatcount,repeatdur,restart,result,rotate,scale,seed,shape-rendering,specularconstant,specularexponent,spreadmethod,startoffset,stddeviation,stitchtiles,stop-color,stop-opacity,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke,stroke-width,style,surfacescale,systemlanguage,tabindex,targetx,targety,transform,text-anchor,text-decoration,text-rendering,textlength,type,u1,u2,unicode,values,viewbox,visibility,version,vert-adv-y,vert-origin-x,vert-origin-y,width,word-spacing,wrap,writing-mode,xchannelselector,ychannelselector,x,x1,x2,xmlns,y,y1,y2,z,zoomandpan".split(","))}}function lt(){return{a:!0,area:!0,audio:!1,br:!0,base:!0,body:!0,button:!0,canvas:!0,comment:!0,dl:!0,data:!0,datalist:!0,div:!0,em:!0,embed:!1,fieldset:!0,font:!0,footer:!0,form:!1,hr:!0,head:!0,header:!0,output:!0,iframe:!1,frameset:!1,img:!0,input:!0,li:!0,label:!0,legend:!0,link:!0,map:!0,mark:!0,menu:!0,media:!0,meta:!0,nav:!0,meter:!0,ol:!0,object:!1,optgroup:!0,option:!0,p:!0,param:!0,picture:!0,pre:!0,progress:!1,quote:!0,script:!1,select:!0,source:!0,span:!0,style:!0,caption:!0,td:!0,col:!0,table:!0,tr:!0,template:!1,textarea:!0,time:!0,title:!0,track:!0,details:!0,ul:!0,video:!0,del:!0,ins:!0,slot:!0,blockquote:!0,svg:!0,dialog:!0,summary:!0,main:!0,address:!0,colgroup:!0,tbody:!0,tfoot:!0,thead:!0,th:!0,dd:!0,dt:!0,figcaption:!0,figure:!0,i:!0,b:!0,code:!0,h1:!0,h2:!0,h3:!0,h4:!0,abbr:!0,bdo:!0,dfn:!0,kbd:!0,q:!0,rb:!0,rp:!0,rt:!0,ruby:!0,s:!0,strike:!0,samp:!0,small:!0,strong:!0,sup:!0,sub:!0,u:!0,var:!0,wbr:!0,nobr:!0,tt:!0,noscript:!0}}function st(){return["::backdrop{background-color:grey;opacity:0.2;}",`#jqxPopup{overflow:hidden;background-color:transparent;outline:none;border:none;inset:0;animation:fade-out 0.5s ease-out;&[open]{display:flex;align-items:center;justify-content:center;animation:fade-in 0.5s ease;}#jqxPopupContent{background-color:white;border:solid 1px #eee;box-shadow:1px 2px 8px #999;border-radius:4px;padding:12px;vertical-align:middle;max-height:40vh;max-width:50vw;overflow:auto;margin:0 auto;div:not(#closeHandleIcon){clear:both;}@media (width <= 640px){max-width:80vw;max-height:60vh;}#closeHandleIcon{cursor:pointer;width:24px;height:24px;display:inline;position:absolute;top:4px;right:4px;justify-content:right;background-image:url("data:image/svg+xml;utf8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22iso-8859-1%22%3F%3E%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20version%3D%221.1%22%20id%3D%22Layer_1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%20128%20128%22%20style%3D%22enable-background%3Anew%200%200%20128%20128%3B%22%20xml%3Aspace%3D%22preserve%22%3E%3Crect%20x%3D%22-368%22%20y%3D%226%22%20style%3D%22display%3Anone%3Bfill%3A%23E0E0E0%3B%22%20width%3D%22866%22%20height%3D%221018%22%2F%3E%3Ccircle%20style%3D%22fill%3A%23FFFFFF%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2248%22%2F%3E%3Ccircle%20style%3D%22fill%3A%238CCFB9%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2239%22%2F%3E%3Ccircle%20style%3D%22fill%3Anone%3Bstroke%3A%23444B54%3Bstroke-width%3A6%3Bstroke-miterlimit%3A10%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2248%22%2F%3E%3Cpolyline%20style%3D%22fill%3Anone%3Bstroke%3A%23FFFFFF%3Bstroke-width%3A6%3Bstroke-linecap%3Around%3Bstroke-miterlimit%3A10%3B%22%20points%3D%2242%2C69%2055.55%2C81%20%20%2086%2C46%20%22%2F%3E%3C%2Fsvg%3E");@media (width <= 640px){background-image:none;position:relative;margin:-15px -15px 4px 0;float:right;vertical-align:middle;border:1px solid #AAA;padding:2px;border-radius:50%;width:12px;height:12px;font-size:12px;line-height:12px;font-weight:bold;text-align:center;&:after{content:'\\2714';color:green;}}}.warn{display:none;text-align:center;color:red;border-top:1px solid #999;margin-top:1em;padding-top:3px;animation:warn-fade-out 0.2s ease-out;}.warn.active{opacity:1;display:block;animation:warn-fade-in 0.2s ease-in;}}}`,"@keyframes fade-in{0%{opacity:0;transform:scale(0, 0);display:none;}100%{opacity:1;transform:scale(1, 1);display:flex;}}","@keyframes fade-out{0%{opacity:1;transform:scale(1, 1);display:flex;}100%{opacity:0;transform:scale(0, 0);display:none;}}","@keyframes warn-fade-in{0%{opacity:0;transform:scale(0, 0);display:none;}100%{opacity:1;transform:scale(1,1 );display:block;}}","@keyframes warn-fade-out{0%{opacity:1;transform:scale(1, 1);display:block;}100%{opacity:0;transform:scale(0, 0);display:none;}}"]}var Me={html:"innerHTML",text:"textContent",class:"className"},ee=at();function at(){let t={get(e,r){let n=String(r)?.toLowerCase();switch(!0){case n in e:return e[n];case ht(n):return Oe(e,n,r);default:return Oe(e,n,r,!0)}},enumerable:!1,configurable:!1};return new Proxy({},t)}function Oe(t,e,r,n=!1){return Object.defineProperty(t,e,{get(){return n?o=>pt(r):bt(e)}}),t[e]}function ct(t,e,r){return e=e?.isJQx&&e.first()||e,q({trial:n=>yt(e)?t.append(e):Re(e)?t.insertAdjacentHTML("beforeend",e):t.append(e),whenError:n=>console.info(`${r} (for root ${t}) not created, reason
2
+ `,n)})}function ut(t,e,...r){let n=ft(e,t);return r?.forEach(o=>ct(n,o,t)),n}function ft(t,e){switch(t=Se(e)?gt(t):t?.isJQx?t.first():t,!0){case a(t,String):return V(e,Re(t,e)?{html:t}:{text:t});case a(t,Node):return mt(e,t);default:return V(e,t)}}function dt(t){return delete t.data,Object.keys(t).length<1||Object.keys(t).forEach(e=>{let r=e.toLowerCase();r in Me&&(t[Me[r]]=t[e],delete t[e])}),t}function mt(t,e){let r=V(t);return r.append(e),r}function V(t,e={}){e=Ie(e,{});let r=Object.entries(e.data??{}),n=Object.assign(Se(t)?new Comment(e?.text):document.createElement(t),dt(e));return r.length&&r.forEach(([o,s])=>n.dataset[o]=String(s)),n}function Ie(t,e){return e?a(t,{isTypes:Object,notTypes:[Array,null,NaN,Proxy],defaultValue:e}):a(t,{isTypes:Object,notTypes:[Array,null,NaN,Proxy]})}function gt(t){return Ie(t)?t?.text??t?.textContent??"":String(t)}function pt(t){return V("b",{style:"color:red",text:`'${t}' is not a valid HTML-tag`})}function Re(t,e){return!Se(e)&&a(t,String)&&/<.*>|&[#|0-9a-z]+[^;];/i.test(t)}function yt(t){return t?.constructor===Comment||t?.constructor===CharacterData}function Se(t){return t?.constructor===Comment||/comment/i.test(t)}function ht(t){return!a(V(t),HTMLUnknownElement)}function bt(t){return(e,...r)=>ut(t,e,...r)}var{IS:te,maybe:gr,$Wrap:pr,xProxy:yr,isNothing:hr}=St();function St(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),m();let t=S(),[e,r]=[f(),A()];return r.custom(),{IS:n,maybe:t,$Wrap:e,isNothing:y,xProxy:r};function n(i,...l){if(t({trial:d=>"isTypes"in(l?.[0]??{})})){let d=l[0];return"defaultValue"in d?h(i,d):"notTypes"in d?g(i,d):n(i,...[d.isTypes].flat())}let c=typeof i=="symbol"?Symbol.isSymbol:i;return l.length>1?L(c,...l):s(i,...l)}function o(i){return i?.[Symbol.proxy]??n(i)}function s(i,...l){let{noInput:c,noShouldbe:d,compareTo:x,inputCTOR:$,isNaN:R,isInfinity:j,shouldBeFirstElementIsNothing:k}=v(i,...l);switch(l=l.length&&l[0],!0){case k:return String(i)===String(x);case(i?.[Symbol.proxy]&&d):return i[Symbol.proxy];case R:return d?"NaN":t({trial:J=>String(x)})===String(i);case j:return d?"Infinity":t({trial:J=>String(x)})===String(i);case c:return d?String(i):String(x)===String(i);case $===Boolean:return l?$===l:"Boolean";default:return p(i,l,d,u(i,$))}}function u(i,l){return i===0?Number:i===""?String:i?l:{name:String(i)}}function v(i,...l){let c=l.length<1,d=!c&&l[0],x=!c&&y(l[0]),$=i==null,R=!$&&Object.getPrototypeOf(i)?.constructor,j=t({trial:J=>String(i)})==="NaN",k=t({trial:J=>String(i)})==="Infinity";return{noInput:$,noShouldbe:c,compareTo:d,inputCTOR:R,isNaN:j,isInfinity:k,shouldBeFirstElementIsNothing:x}}function p(i,l,c,d){switch(!0){case(!c&&l===i||i?.[Symbol.proxy]&&l===Proxy):return!0;case t({trial:x=>String(l)})==="NaN":return String(i)==="NaN";case(i?.[Symbol.toStringTag]&&n(l,String)):return String(l)===i[Symbol.toStringTag];default:return l?t({trial:x=>i instanceof l})||l===d||l===Object.getPrototypeOf(d)||`${l?.name}`===d?.name:i?.[Symbol.toStringTag]&&`[object ${i?.[Symbol.toStringTag]}]`||d?.name||String(d)}}function L(i,...l){return l.some(c=>n(i,c))}function y(i,l=!1){let c=i==null;return c=l?c||n(i,1/0)||n(i,NaN):c,c}function S(){let i=(l,c)=>l?.constructor===Function?l(c):void 0;return function({trial:l,whenError:c=()=>{}}={}){try{return i(l)}catch(d){return i(c,d)}}}function f(){return function(i){return Object.freeze({get value(){return i},get[Symbol.type](){return o(i)},get type(){return o(i)},[Symbol.is](...l){return n(i,...l)},is(...l){return n(i,...l)}})}}function h(i,{defaultValue:l,isTypes:c=[void 0],notTypes:d}={}){return c=c?.constructor!==Array?[c]:c,d=d&&d?.constructor!==Array?[d]:[],d.length<1?n(i,...c)?i:l:g(i,{isTypes:c,notTypes:d})?i:l}function g(i,{isTypes:l=[void 0],notTypes:c=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,c=c?.constructor!==Array?[c]:c,n(i,...l)&&!n(i,...c)}function m(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...i){return n(this,...i)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(i){return o(i)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(i,...l){return n(i,...l)},enumerable:!1,configurable:!1}}))}function b(i){let l=String(Object.getPrototypeOf(i)?.constructor);return l.slice(l.indexOf("ion")+3,l.indexOf("(")).trim()}function E(i){let l=i.set;return i.set=(c,d,x)=>d===Symbol.proxy?c[d]=x:l(c,d,x),i}function A(){let i=Proxy;return{native(){Proxy=i},custom(){Proxy=new i(i,{construct(l,c){for(let x of c)x.set&&(x=E(x));let d=new l(...c);return d[Symbol.proxy]=`Proxy (${b(c[0])})`,d}})}}}}var _=xt;function xt({styleSheet:t,createWithId:e}={}){let{tryParseAtOrNestedRules:r,ruleExists:n,checkParams:o,sheet:s,removeRules:u,consider:v,currentSheetID:p}=vt({styleSheet:t,createWithId:e});function L(g,m){if(g&&m.removeProperties){Object.keys(m.removeProperties).forEach(b=>g.style.removeProperty(je(b)));return}Object.entries(m).forEach(([b,E])=>{b=je(b.trim()),E=E.trim();let A;if(/!important/.test(E)&&(E=E.slice(0,E.indexOf("!important")).trim(),A="important"),!CSS.supports(b,E))return console.error(`StylingFactory ${p} error: '${b}' with value '${E}' not supported (yet)`);ke(()=>g.style.setProperty(b,E,A),`StylingFactory ${p} (setRule4Selector) failed`)})}function y(g,m,b=s){if(g=g?.trim?.(),!te(g,String)||!g.length||/[;,]$/g.test(g))return console.error(`StylingFactory ${p} (setRules): [${g||"[no selector given]"}] is not a valid selector`);if(m.removeRule)return u(g);let E=n(g,!0),A=E||b.cssRules[b.insertRule(`${g} {}`,b.cssRules.length||0)];return v(()=>L(A,m),g,E)}function S(g){let m=g.trim().split(/{/,2),b=m.shift().trim();if(!te(b,String)||!b?.trim()?.length)return console.error(`StylingFactory ${p} (doParse): no (valid) selector could be extracted from rule ${xe(g)}`);let E=At(m.shift());return ke(()=>y(b,E),`StylingFactory ${p} (setRules) failed`)}function f(g){let m=r(g);return m.done?m.existing:S(g)}function h(g,m){return g.trim().startsWith("@media")?f(Et(g,m)):y(g,m)}return function(g,m={}){return o(g,m)&&(Object.keys(m).length?h(g,m):f(g))}}function vt({styleSheet:t,createWithId:e}){let r="Note: The rule or some of its properties may not be supported by your browser (yet)",n=`for style#${e}`;t=e?o(e):t;function o(f){let h=document.querySelector(`#${f}`)?.sheet;if(h)return h;let g=Object.assign(document.createElement("style"),{id:f});return document.head.insertAdjacentElement("beforeend",g),g.sheet}function s(f){return console.error(`StylingFactory ${n} [rule: ${f}]
3
+ => @charset, @namespace and @import are not supported here`),{done:!0}}function u(f,h){return[...t.rules].find(g=>h?Je(g.selectorText||"",f):Ft`${Lt(f)}${[..."gim"]}`.test(g.cssText))}function v(f){return/^@charset|@import|namespace/i.test(f.trim())?s(f):f.match(/}/g)?.length>1?{existing:y(f,1),done:!0}:{done:!1}}function p(f){let h=[...t.cssRules].reduce((m,b,E)=>Je(b.selectorText||"",f)&&m.concat(E)||m,[]),g=h.length;return h.forEach(m=>t.deleteRule(m)),g>0?console.info(`\u2714 Removed ${g} instance${g>1?"s":""} of selector ${f} from ${n.slice(4)}`):console.info(`\u2714 Remove rule: selector ${f} does not exist in ${n.slice(4)}`)}function L(f,h){return f&&te(f,String)&&f.trim().length>0&&te(h,Object)||(console.error(`StylingFactory ${n} called with invalid parameters`),!1)}function y(f){f=f.trim();let h=f.slice(0,f.indexOf("{")).trim(),g=!!u(h);try{return t.insertRule(`${f}`,t.cssRules.length),g}catch(m){return console.error(`StylingFactory ${n} (tryParse) ${m.name} Error:
4
+ ${m.message}
5
5
  Rule: ${xe(f)}
6
- ${r}`),u}}function b(f,g,u){try{return f(),u}catch(h){return console.error(`StylingFactory ${n} (tryAddOrModify) ${h.name} Error:
7
- ${h.message}
8
- Rule: ${xe(g)}
9
- ${r}`),u}}return{sheet:t,removeRules:p,tryParseAtOrNestedRules:v,ruleExists:d,checkParams:w,tryParse:y,consider:b,currentSheetID:n}}function vt(t,e){return`${t.trim()} ${Object.entries(e).map(([r,n])=>`${r}: { ${Et(n)}`)}`}function xe(t){let e=(t||"NO RULE").trim().slice(0,50).replace(/\n/g,"\\n").replace(/\s{2,}/g," ");return t.length>e.length?`${e.trim()}...truncated`:e}function Et(t){return Object.entries(t).map(([e,r])=>`${e}: ${r.trim()}`).join(`;
10
- `)}function wt(t){return t.replace(/([*\[\]()-+{}.$?\\])/g,e=>`\\${e}`)}function Lt(t,...e){let r=e.length&&Array.isArray(e.slice(-1))?e.pop().join(""):"";return new RegExp((e.length&&t.raw.reduce((n,i,s)=>n.concat(e[s-1]||"").concat(i),"")||t.raw.join("")).split(`
11
- `).map(n=>n.replace(/\s|\/\/.*$/g,"").trim().replace(/(@s!)/g," ")).join(""),r)}function Re(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/[^--]^-|-$/,"")}function je(t,e){try{return t()}catch(r){console.error(`${e||"an error occured"}: ${r.message}`)}}function Ft(t){return t.replace(/\/\*.+?\*\//gm,"").replace(/[}{\r\n]/g,"").replace(/(data:.+?);/g,(e,r)=>`${r}\\3b`).split(";").map(e=>e.trim()).join(`;
6
+ ${r}`),g}}function S(f,h,g){try{return f(),g}catch(m){return console.error(`StylingFactory ${n} (tryAddOrModify) ${m.name} Error:
7
+ ${m.message}
8
+ Rule: ${xe(h)}
9
+ ${r}`),g}}return{sheet:t,removeRules:p,tryParseAtOrNestedRules:v,ruleExists:u,checkParams:L,tryParse:y,consider:S,currentSheetID:n}}function Et(t,e){return`${t.trim()} ${Object.entries(e).map(([r,n])=>`${r}: { ${wt(n)}`)}`}function xe(t){let e=(t||"NO RULE").trim().slice(0,50).replace(/\n/g,"\\n").replace(/\s{2,}/g," ");return t.length>e.length?`${e.trim()}...truncated`:e}function wt(t){return Object.entries(t).map(([e,r])=>`${e}: ${r.trim()}`).join(`;
10
+ `)}function Lt(t){return t.replace(/([*\[\]()-+{}.$?\\])/g,e=>`\\${e}`)}function Ft(t,...e){let r=e.length&&Array.isArray(e.slice(-1))?e.pop().join(""):"";return new RegExp((e.length&&t.raw.reduce((n,o,s)=>n.concat(e[s-1]||"").concat(o),"")||t.raw.join("")).split(`
11
+ `).map(n=>n.replace(/\s|\/\/.*$/g,"").trim().replace(/(@s!)/g," ")).join(""),r)}function je(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/[^--]^-|-$/,"")}function ke(t,e){try{return t()}catch(r){console.error(`${e||"an error occured"}: ${r.message}`)}}function Ct(t){return t.replace(/\/\*.+?\*\//gm,"").replace(/[}{\r\n]/g,"").replace(/(data:.+?);/g,(e,r)=>`${r}\\3b`).split(";").map(e=>e.trim()).join(`;
12
12
  `).replaceAll("\\3b",";").split(`
13
- `)}function Ct(t){return t.reduce((e,r)=>{let[n,i]=[r.slice(0,r.indexOf(":")).trim(),r.slice(r.indexOf(":")+1).trim().replace(/;$|;.+(?=\/*).+\/$/,"")];return n&&i?{...e,[n]:i}:e},{})}function Tt(t){return Ct(Ft(t))}function ke(t,e){return t?.replace("::",":")===e?.replace("::",":")}var ve=!1,$t={on:()=>ve=!0,off:()=>ve=!1},P={tagsRaw:W,allowUnknownHtmlTags:$t,isAllowed(t){if(ve)return!0;let e=a(t,String)?t.toLowerCase():t?.nodeName.toLowerCase()||"none";return e==="#text"||!!W[e]},allowTag:t=>W[t.toLowerCase()]=!0,prohibitTag:t=>W[t.toLowerCase()]=!1};var At=!0,re={data:/data-[\-\w.\p{L}]/ui,validURL:/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,whiteSpace:/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g,notAllowedValues:/^javascript|injected|noreferrer|alert|DataURL/gi};function Ht(t){if(At&&Object.keys(t.removed).length){let e=Object.entries(t.removed).reduce((r,[n,i])=>[...r,`${O(n)} => ${i}`],[]).join("\\000A");C.error(`JQx: HTML creation error(s): ${e}`)}}function Dt(t){let e=t.nodeName.toLowerCase(),r=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"];return/-/.test(e)&&!r.find(n=>n===e)||P.isAllowed(e)}function Q(t){let e={rawHTML:t?.parentElement?.getHTML()??"no html",removed:{}};return a(t,HTMLElement)&&[...t.childNodes].forEach(r=>{if(r?.children?.length&&Q(r),r?.attributes){let i=a(r,SVGElement)?z.svg:z.html;[...(r??{attributes:[]}).attributes].forEach(s=>{let d=s.name.trim().toLowerCase(),v=s.value.trim().toLowerCase().replace(re.whiteSpace,""),p=d==="href"?!re.validURL.test(v):re.notAllowedValues.test(v),w=d.startsWith("data")?!re.data.test(d):!!i[d];if(p||w){let y=ne(s.value||"none",60);y+=y.length===60?"...":"",e.removed[`${s.name}`]=`attribute/property/value not allowed, removed. Value: ${y}`,r.removeAttribute(s.name)}})}if(!(Dt(r)||r.constructor===CharacterData||r.constructor===Comment)){let i=(r?.outerHTML||r?.textContent).trim(),s=ne(i,60)??"EMPTY";s+=s.length===60?"...":"",e.removed[`<${r.nodeName?.toLowerCase()}>`]=`not allowed, not rendered. Value: ${s}`,r.remove()}}),Ht(e),t}function Nt(t){let e=document.createElement("div");return e.insertAdjacentHTML(T.end,t),e.childNodes.length?Q(e):void 0}function Pt(t,e,r){return a(t,Comment)?e.insertAdjacentHTML(r,`<!--${t.data}-->`):e.insertAdjacentText(r,t.data)}function B(t=[],e=document.body,r=T.BeforeEnd){return r=r||T.BeforeEnd,e=e?.isJQx?e.node:e||document.body,t.reduce((n,i)=>{let s=M(i)&&Mt(i,e,r);return s?[...n,s]:n},[])}function Mt(t,e=document.body,r=T.BeforeEnd){return r=r||T.BeforeEnd,e=e?.isJQx?e?.[0]:e,a(t,Comment,Text)?Pt(t,e,r):a(t,HTMLElement)?e.insertAdjacentElement(r,t):void 0}function H(t){if(a(t,Text,Comment))return t;let e=t?.trim(),r=e?.split(/<text>|<\/text>/i)??[];if(r?.length&&(r=r.length>1?r.filter(i=>i.length).shift():void 0),e.startsWith("<!--")&&e.endsWith("-->"))return document.createComment(t.replace(/<!--|-->$/g,""));if(r||!/^<(.+)[^>]+>/m.test(e))return document.createTextNode(r);let n=Nt(t);return n.childNodes.length<1?H(`<span data-jqxcreationerror="1">${D(t,60)}</span>`):n.children[0]}function oe(t){if(t.node("#jqxPopup"))return;t.logger.log("JQx: [JQx].Popup first call. Dialog element created."),t.dialog({id:"jqxPopup"},t.div({id:"jqxPopupContent"})).render,t.editCssRules(...Ne);let[e,r]=[t("#jqxPopupContent"),t.node("#jqxPopup")],n={};return t.handle({type:"click, keydown",handlers:y,name:"genericPopupCloseHandler",capture:!0,about:"A generic handler for JQx popups"}),Object.freeze({show:i,remove:s,removeModal:w});function i(g){if(r.open)switch(!0){case d(g):return;default:return s(),setTimeout(()=>i(g),200)}n={...g};let{content:u}=n;return t.IS(u,String,HTMLElement)||u?.isJQx?v():!0}function s(){return n.modal?f(n.warnMessage):p()}function d(g){for(let[u,h]of Object.entries(n))if(h!==g[u])return!1;return!0}function v(){e.clear();let{content:g,modal:u,closeAfter:h}=n;u=t.IS(u,Boolean)?u:!1;let S=u?"":t.div({id:"closeHandleIcon"});e.append(S,t.IS(g,String)?t.div(g):g),r.showModal(),!u&&t.IS(h,Number)&&b(s,h)}function p(){if(r.close(n.returnValue),t.IS(n.callback,Function))return setTimeout(()=>n.callback(n.returnValue),200);n={}}function w({callback:g,value:u}={}){n.returnValue=u,n.modal=!1,n.callback=g||n.callback,s()}function y({evt:g}){if(!(Object.keys(n).length<1||!r.open))return g.key==="Escape"&&g.preventDefault(),n.activeTimer&&clearTimeout(n.activeTimer),(g.target.closest("#closeHandleIcon")||!g.target.closest("#jqxPopupContent"))&&s(),!0}function b(g,u){t.IS(g,Function)&&t.IS(u,Number)&&u>0&&(n.activeTimer=setTimeout(g,u*1e3))}function f(g){if(!t.IS(g,String,HTMLElement,Proxy))return;let u=e.find$(".warn");switch(!0){case u.is.empty:u=t.div({class:"warn"},g);default:e.append(u.addClass("active")),b(()=>e.find$(".warn").removeClass("active"),2)}}}function ie(t){let e={},r="anonymous_";function n(y){if(y){let{handler:b,capture:f,type:g}=y;document.addEventListener(g,b,{capture:f})}}function i(y){if(y){let{type:b,handler:f,capture:g}=y;document.removeEventListener(b,f,{capture:g})}}function s(y,b,f,g){return function(u){if(!F(b))return y({evt:u});let h=u.target.closest(b);if(h){let S=t(h);y({self:S,me:S,evt:u}),f&&p(u.type,g)}return!0}}function d(y){return e[y]=e[y]||{},e[y]}function v(y,b){return Object.entries(d(y)).find(([f])=>f===b)}function p(y,b){let f=v(y,b);f&&(i(f[1]),delete e[y][b],delete le[b],console.warn(`Removed listener [${b}] for event type [${y}].`))}function w(y){let{type:b,handler:f,name:g,capture:u,once:h,selector:S,node:L,about:A}=y;e[b]=e[b]||{};let o=Ee(g||f.name);if(L instanceof HTMLElement){let l=L.dataset.hid||o;L.dataset.hid=l,S=`[data-hid=${l}]`}switch(!0){case!e[b][o]:return e[b][o]={name:o,handler:s(f,S,h,o),capture:Je(b,u),once:!!h,type:b,selector:!!S&&S||!1,about:!!A&&A||!1,unListen(){p(b,o)}},e[b][o];default:return console.error(`The name [${o}] for [${b}] exists. Use unique (function) names.`)}}return{remove(...y){return p(...y)},listen:function(y){let{type:b,handler:f}=y;if(!F(b)||!a(f,Function))return;let g=w(y);if(g)return n(g),{type:b,name:g.name,unListen(){p(b,g.name)}}},get ListenerStore(){return Object.freeze({...e})}}}var C=Rt(),Ot=["load","unload","scroll","focus","blur","DOMNodeRemovedFromDocument","DOMNodeInsertedIntoDocument","loadstart","progress","error","abort","load","loadend","pointerenter","pointerleave","readystatechange"],T=Object.freeze(new Proxy({start:"afterbegin",afterbegin:"afterbegin",end:"beforeend",beforeend:"beforeend",before:"beforebegin",beforebegin:"beforebegin",after:"afterend",afterend:"afterend"},{get(t,e){return t[String(e).toLowerCase()]??t[e]}})),It=[...Array(26)].map((t,e)=>String.fromCharCode(e+65)).concat([...Array(26)].map((t,e)=>String.fromCharCode(e+97))).concat([...Array(10)].map((t,e)=>`${e}`)),Le=Object.freeze({get(t,e){return t[Z(e)]||t[e]},enumerable:!1,configurable:!1}),le={};function Ee(t){return F(t)&&!!t&&!/^handler|handlers$/gi.test(t.trim())?t.trim():Be()}function Be(t){let e=`anonymous_${Math.random().toString(36).slice(2)}`;return le[e]?Be():(le[e]=e,e)}function Je(t,e){return!!Ot.find(r=>r===t)||!!e}function ae(t){return t.startsWith("data")||z.html.find(e=>t.toLowerCase()===e)}function ce(t){return t&&(t.textContent="")}function U(t,e=0,r=!0){return t=t?.parentElement,e+=t?t[r?"scrollTop":"scrollLeft"]:0,t?U(t,e,r):e}function F(t,e=1){return e=a(e,Number)&&e||1,a(t,String)&&t.length>=e}function ne(t,e=120){return D(t,e).replace(/&lt;/g,"<")}function D(t,e=120){return`${t}`.trim().slice(0,e).replace(/>\s+</g,"><").replace(/</g,"&lt;").replace(/\s{2,}/g," ").replace(/\n/g,"\\n")+(t.length>e?" &hellip;":"").trim()}function O(t){switch(!0){case a(t,String):let e=document.createElement("div");return e.append(t),e.innerHTML;default:return t}}function Qe(t){return a(t,String)&&Object.assign(document.createElement("textarea"),{innerHTML:t}).textContent||t}function Rt(){let t=!1,e=[],r={get on(){return t=!0,r},get off(){return t=!1,r},get backLog(){return e}};function n(...s){return e.unshift(...s.map(d=>`${we()} \u2A3B ${Qe(d)}`)),console.error(e.slice(0,s.length).join(`
14
- `)),r}function i(...s){switch(e.unshift(...s.map(d=>`${we()} \u2714 ${Qe(d)}`)),t){case!0:console.log(e.slice(0,s.length).join(`
15
- `));default:return r}}return Object.defineProperties(r,{log:{value:i,enumerable:!1},error:{value:n,enumerable:!1}}),Object.freeze(r)}function we(){return(t=>`[${se(t.getHours())}:${se(t.getMinutes())}:${se(t.getSeconds())}.${se(t.getMilliseconds(),3)}]`)(new Date)}function Fe(t,e){if(t)for(let[r,n]of Object.entries(e)){if(r=N(r),r.startsWith("data"))return ue(t,n);a(n,String)&&ae(r)&&t.setAttribute(r,n.split(/[, ]/)?.join(" "))}}function ue(t,e){if(t&&a(e,Object))for(let[r,n]of Object.entries(e))t.setAttribute(`data-${N(r)}`,n)}function fe(t){return t?a(t,Proxy)?[t.EL]:a(t,NodeList)?[...t]:M(t)?[t]:X(t)?t:t.isJQx?t.collection:void 0:[]}function de(t,e){return t.andThen(e)}function me(t,e){return t.andThen(e,!0)}function M(t){return a(t,Text,HTMLElement,Comment)}function G(t,e){if(a(e,Object))for(let[r,n]of Object.entries(e)){let i;/!important/i.test(n)&&(n=n.slice(0,n.indexOf("!")).trim(),i="important"),t.style.setProperty(N(r),n,i)}}function I(t){let e=t.cloneNode(!0);return e.removeAttribute&&e.removeAttribute("id"),t.isConnected?t.remove():t=null,e}function ze(t){if(!t)return;let e=t.style,r=getComputedStyle(t),n=[e.visibility,r.visibility].includes("hidden"),i=[e.display,r.display].includes("none"),s=t.offsetTop<0||t.offsetLeft+t.offsetWidth<0||t.offsetLeft>document.body.offsetWidth,d=+r.opacity==0||+(e.opacity||1)==0;return!(s||d||i||n)}function We(t){return[...t.parentNode.querySelectorAll(":is(:read-write)")].find(e=>e===t)??!1}function ge(t){return t?.filter(e=>e).reduce((e,r)=>e.concat(Te(r)?`<!--${r.data}-->`:ye(r)?r.textContent:r.outerHTML),"")}function se(t,e=2){return`${t}`.padStart(e,"0")}function Ve(t,e=0){return[t,e]=[Math.floor(t),Math.ceil(e)],Math.floor([...crypto.getRandomValues(new Uint32Array(1))].shift()/2**32*(t-e+1)+e)}function pe(){return`_${jt(It).slice(0,8).join("")}`}function Ce(t){return t=a(t,String)&&/,/.test(t)?t.split(","):t,a(t,Array)?t.filter(e=>F(e)).map(e=>e.trim().toLowerCase()):a(t,String)&&t?.trim().toLowerCase()||""}function _e(t){return[...t.parentNode.querySelectorAll(":is(:modal)")].find(e=>e===t)??!1}function jt(t){let e=t.length;for(;e--;){let r=Ve(e);[t[e],t[r]]=[t[r],t[e]]}return t}function Z(t){return a(t,String)?t.toLowerCase().split("-").map((e,r)=>r&&`${kt(e)}`||e).join(""):t}function N(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/^-|-$/,"")}function kt([t,...e]){return`${t.toUpperCase()}${e.join("")}`}function ye(t){return a(t,Comment,Text)}function Te(t){a(t,Comment)}function Ue(t){return a(t,Text)}function Y(t){return a(t,String)&&/^<|>$/.test(`${t}`.trim())}function X(t){return a(t,Array)&&!t?.find(e=>!M(e))}function he(t){return a(t,Array)&&!t?.find(e=>!Y(e))}function E(t,e){let r=t.collection.filter(n=>!ye(n));for(let n=0;n<r.length;n+=1)e(r[n],n);return t}function $e(t,e,r){let n=e!==document.body&&a(t,String)&&t.toLowerCase()!=="body"?e:document,i;try{r.collection=[...n.querySelectorAll(t)]}catch{i=`Invalid CSS querySelector. [${a(t,String)?t:"Nothing valid given!"}]`}let s=r.collection.length;return s<1?`CSS querySelector "${t}", output: nothing`:i??`CSS querySelector "${t}", output ${s} element${s>1?"s":""}`}function Jt(t){let e=`anonymous_${Math.random().toString(36).slice(2)}`;return t.data.add({hid:e}),`[data-hid="${e}"]`}function Ge(){return{isCommentOrTextNode:ye,isNode:M,isComment:Te,isText:Ue,isHtmlString:Y,isArrayOfHtmlElements:X,isArrayOfHtmlStrings:he,ElemArray2HtmlString:ge,input2Collection:fe,setCollectionFromCssSelector:$e,addHandlerId:Jt,cssRuleEdit:_({createWithId:"JQxStylesheet"})}}function Ze(){let e=Object.freeze({notInDOM:!0,writable:"n/a",modal:"n/a",empty:!0,open:"n/a",visible:"n/a"});return r=>{let n=r.node;return a(n,Node)?Object.freeze({get writable(){return We(n)},get modal(){return _e(n)},get inDOM(){return n.isConnected},get open(){return n.open??!1},get visible(){return ze(n)},get disabled(){return n.hasAttribute("readonly")||n.hasAttribute("disabled")},get empty(){return r.collection.length<1},get virtual(){return r.isVirtual}}):e}}function Ye(t,e,r,n){r&&a(e,String)&&(e={[e]:r==="-"?"":r});let i;e.className&&(i=e.className,delete e.className),i=[...t.classList].find(d=>d.startsWith("JQxClass-")||i&&d===i)||i||`JQxClass-${pe().slice(1)}`,n.editCssRule(`.${i}`,e),t.classList.add(i)}var Qt=Ze();function Xe(t){return{factoryExtensions:Bt(t),instanceExtensions:zt(t)}}function Bt(t){return{data:e=>({get all(){return new Proxy(e[0]?.dataset??{},Le)},set:(r={})=>{if(!e.is.empty&&a(r,Object))for(let[n,i]of Object.entries(r))e.setData({[n]:i});return e},get:(r,n)=>e.data.all[r]??n,add:(r={})=>{if(!e.is.empty&&a(r,Object))for(let[n,i]of Object.entries(r))e.setData({[n]:i});return e},remove:r=>(e[0]?.removeAttribute(`data-${N(r)}`),e)}),dimensions:e=>{if(e.is.empty)return{error:"[instance].dimensions: NO ELEMENTS"};let r=e[0],n=e.first()?.getBoundingClientRect().toJSON();return n.scrollTopDistance=U(r,0),n.scrollLeftDistance=U(r,0,!1),n},node:e=>e[0],HTML:e=>({get:(r,n)=>{if(e.is.empty)return"NO ELEMENTS IN COLLECTION";let i=r?e.outerHtml:e.html();return n?O(i):i},set:(r,n=!1,i=!1)=>{r=r.isJQx?r.HTML.get(1):r;let s=a(r,String);return r=s&&i?O(r):r,s&&(r||"").trim().length&&e.html(r,n),e},replace:(r,n=!1)=>e.HTML.set(r,!1,n),append:(r,n=!1)=>(r=a(r,HTMLElement)?t(r).HTML.get(1):r.isJQx?r.HTML.get(1):r,e.HTML.set(r,!0,n)),insert:(r,n=!1)=>(r=a(r,HTMLElement)?t(r).HTML.get(1):r.isJQx?r.HTML.get(1):r,e.HTML.set(r+e.HTML.get(),!1,n))}),is:e=>Qt(e),length:e=>e.collection.length,outerHtml:e=>(e.first()||{outerHTML:void 0}).outerHTML,parent:e=>{let r=t(e[0]?.parentNode);return r.is.empty?e:r},render:e=>(!e.is.empty&&e.toDOM()||t.log("[JQx.render]: empty collection"),e),Style:e=>({get computed(){return e.is.empty?{}:getComputedStyle(e[0])},inline:r=>e.style(r),inSheet:r=>e.css(r),valueOf:r=>e.is.empty?void 0:getComputedStyle(e[0])[N(r)],nwRule:r=>e.Style.byRule({rules:r}),byRule:({classes2Apply:r=[],rules:n=[]}={})=>{let s=a(n,String)&&!r.length?n.split("{")[0].trim():"";if(n=n&&a(n,String)?[n]:n,r=r&&a(r,String)?[r]:r,(n?.length||r?.length)&&(n?.length&&t.editCssRules(...n),r))for(let d of r)e.addClass(d);return s?.startsWith(".")&&e.addClass(s.slice(1)),s?.startsWith("#")&&!e.attr("id")&&e.prop({id:s.slice(1)}),e}})}}function zt(t){return{addClass:(e,...r)=>E(e,n=>n&&r.forEach(i=>n.classList.add(i))),after:de,afterMe:de,andThen:(e,r,n=!1)=>{if(!r||!a(r,String,Node,Proxy))return C.log(`[JQx instance].[beforeMe | afterMe | andThen]: insufficient input [${r}]`),e;r=r?.isJQx?r.collection:a(r,Node)?t.virtual(r).collection:t.virtual(H(r)).collection;let[i,s,d]=n?[0,"before",r.concat(e.collection)]:[e.collection.length-1,"after",e.collection.concat(r)];return e[i][s](...r),e.collection=d,e},append:(e,...r)=>{if(!e.is.empty&&r.length){let n=e.length===1;for(let i of r){if(!i.isJQx&&F(i)){let s=i.trim(),v=!/^<(.+)[^>]+>$/m.test(s)?t.text(i):H(i);E(e,p=>p.append(n?v:I(v)))}M(i)&&E(e,s=>s.append(n?i:I(i))),i.isJQx&&!i.is.empty&&E(e,s=>i.collection.forEach(d=>s.append(n?d:I(d))))}}return e},appendTo:(e,r)=>(r.isJQx||(r=t(r)),r.append(e),e),attr:(e,r,n)=>{let i=e[0];if(!i)return e;if(!n&&F(r))return r=N(r),r==="class"?[...i?.classList].join(" "):i?.getAttribute(r);if(F(r)&&n)switch(r=N(r),!0){case r.startsWith("data-"):r={data:{[r.replace("data-","")]:n}};break;default:r={[r]:n}}return a(r,Object)&&!e.is.empty&&Fe(i,r),e},before:me,beforeMe:me,clear:e=>E(e,ce),closest:(e,r)=>{let n=F(r)?e[0].closest(r):null;return n?t(n):e},computedStyle:(e,r)=>e.first()&&getComputedStyle(e.first())[r],css:(e,r,n)=>E(e,i=>Ye(i,r,n,t)),duplicate:(e,r=!1,n=document.body)=>{if(e.collection.length>0){let i=e.collection[0].cloneNode(!0);return i.childNodes.forEach(s=>{s.removeAttribute&&s?.removeAttribute("id")}),r?t(i).toDOM(n):t.virtual(i)}return C.error("Duplicating an empty JQx instance is not possible"),e},each:(e,r)=>E(e,r),empty:e=>E(e,ce),find:(e,r)=>e.collection.length>0?[...e.first()?.querySelectorAll(r)]:[],find$:(e,r)=>e.collection.length>0?t(r,e):e,first:(e,r=!1)=>{if(e.collection.length>0)return r?e.single():e.collection[0]},first$:(e,r)=>e.single(r),getData:(e,r,n)=>e.first()&&e.first().dataset?.[r]||n,hasClass:(e,...r)=>{let n=e[0];return!n||!n.classList.length?!1:r.find(i=>n.classList.contains(i))&&!0||!1},hide:e=>E(e,r=>G(r,{display:"none !important"})),html:(e,r,n)=>{if(r===void 0){let i=e.node;return i?.getHTML&&i.getHTML()||""}if(!e.isEmpty()){let i=H(`<div>${r.isJQx?r.HTML.get(!0):r}</div>`);if(!a(i,Comment))return E(e,d=>(n||(d.textContent=""),d.insertAdjacentHTML(t.at.end,i.getHTML())))}return e},htmlFor:(e,r,n="",i=!1)=>{if(r&&e.collection.length){if(!r||!F(n))return e;let s=e.find$(r);if(s.length<1)return e;let d=H(`<span>${n}</span>`);s.each(v=>{i||(v.textContent=""),v.insertAdjacentHTML(t.at.end,d?.getHTML())})}return e},isEmpty:e=>e.collection.length<1,nth$:(e,r)=>e.single(r),on:(e,r,...n)=>{if(e.collection.length&&a(r,String,Array)){if(!F(r)||n.length<1)return e;t.handle({type:r,node:e.node,handler:n})}return e},once:(e,r,...n)=>{if(e.collection.length&&a(r,String,Array)){if(!F(r)||n.length<1)return e;t.handle({type:r,once:!0,node:e.node,handler:n})}return e},prepend:(e,...r)=>{if(!e.is.empty&&r){let n=e.length===1;for(let i of r){if(F(i)){i=i.trim();let d=!/^<(.+)[^>]+>$/m.test(i)?t.text(i):H(i);d=n?d:I(d),E(e,v=>v.prepend(d.cloneNode(!0)))}M(i)&&E(e,s=>s.prepend(n?i:I(i))),i.isJQx&&!i.is.empty&&(i.collection.length>1&&i.collection.reverse(),E(e,s=>E(i,d=>s.prepend(n?d:I(d)))),i.collection.reverse())}}return e},prependTo:(e,r)=>(r.isJQx||(r=t.virtual(r)),r.prepend(e),e),prop:(e,r,n)=>{if(a(r,String)&&!n)return r.startsWith("data")?e[0]?.dataset[r.slice(r.indexOf("-")+1)]:e[0]?.[r];let i=a(r,Object)?r:{[r]:n};for(let[s,d]of Object.entries(i)){if(s=s.trim(),d&&!ae(s)||!d)return!1;if(s.toLowerCase()==="id")return e[0].id=d;E(e,p=>{if(s.startsWith("data"))return p.dataset[s.slice(s.indexOf("-")+1)]=d;p[s]=d})}return e},remove:(e,r)=>{C.log(`remove ${D(e.HTML.get(1),40)}${r?` /w selector ${r}`:""}`);let n=s=>s.remove(),i=()=>e.collection=e.collection.filter(s=>document.documentElement.contains(s));if(r){let s=e.find$(r);return s.is.empty||(E(s,n),i()),e}return E(e,n),i(),e},rmAttr:(e,...r)=>{for(let n of r)e.node.removeAttribute(n);return e},removeClass:(e,...r)=>E(e,n=>{if(n)for(let i of r)n.classList.remove(i)}),renderTo:(e,r=document.body,n=t.at.end)=>(e.first$().toDOM(r,n),e),replace:(e,r,n)=>{let i=e[0];return!r||!n||!a(n,HTMLElement)&&!n.isJQx?(console.error("JQx replace: invalid replacement value"),e):(n.isJQx&&(n=n[0]),a(n,NodeList)&&(n=n[0]),i&&r&&(r=a(r,String)?i.querySelectorAll(r):r.isJQx?r.collection:r,a(r,HTMLElement,NodeList,Array)&&a(n,HTMLElement)&&(a(r,HTMLElement)?[r]:[...r]).forEach(s=>s.replaceWith(n.cloneNode(!0)))),e)},replaceClass:(e,r,...n)=>E(e,i=>{i.classList.remove(r);for(let s of n)i.classList.add(s)}),replaceMe:(e,r)=>e.replaceWith(r),replaceWith:(e,r)=>(r=a(r,Element)?r:r.isJQx?r[0]:void 0,r&&(e[0].replaceWith(r),e=t.virtual(r)),e),setData:(e,r)=>E(e,n=>ue(n,r)),show:e=>E(e,r=>G(r,{display:"revert-layer !important"})),single:(e,r)=>e.collection.length>0?a(r,String)?e.find$(r):a(r,Number)?t(e.collection[r]):t(e.collection[0]):e,style:(e,r,n)=>E(e,s=>{n&&a(r,String)&&(r={[r]:n||"none"}),G(s,r)}),text:(e,r,n=!1)=>e.isEmpty()?e:a(r,String)?E(e,s=>s.textContent=n?s.textContent+r:r):e.first().textContent,toDOM:(e,r=document.body,n=T.BeforeEnd)=>(e.isVirtual&&(e.isVirtual=!1),B(e.collection,r,n),e),toggleClass:(e,r)=>E(e,n=>n.classList.toggle(r)),toNodeList:e=>[...e.collection].map(r=>document.importNode(r,!0)),trigger:(e,r,n=Event,i={})=>{if(e.collection.length){let s=new n(r,{...i,bubbles:i.bubbles??!0});for(let d of e.collection)d.dispatchEvent(s)}return e},val:(e,r)=>{let n=e[0];return!n||!a(n,HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement)?e:r===void 0?n.value:(n.value=a(r,String)?r:"",e)}}}var Ae,be,{isComment:Zr,isText:Yr,isHtmlString:Xr,isArrayOfHtmlElements:Kr,isArrayOfHtmlStrings:qr,ElemArray2HtmlString:en,addHandlerId:tn,cssRuleEdit:He,addFn:Wt}=Vt();function Vt(){return{...Ge(),addFn:function(t,e){return C.log(`JQx: added extension function [${t}]`),be[t]=(r,...n)=>e(r,...n)}}}function K(t){return new Proxy(t,Object.freeze({get:(e,r)=>_t(e,r,t)}))}function Ke(t,e){return(...r)=>a(t,Function)&&t(K(e),...r)}function _t(t,e,r){switch(!0){case a(e,Symbol):return t;case a(+e,Number):return t.collection?.[e]||void 0;case e in Ae:return Ke(Ae[e],r)();case e in be:return Ke(be[e],r);default:return t[e]}}function tt(t){let e=Xt(t);for(let[r,n]of Object.entries(Object.getOwnPropertyDescriptors(e)))Object.defineProperty(t,r,n);return t}function Ut(t){return{allow:e=>{let r=/-/.test(e),n=r&&e;e=r?Z(e):e.toLowerCase(),P.allowTag(e),a(t[e],Function)||Object.defineProperties(t,De(e,!0,t,n))},prohibit:e=>{e=e.toLowerCase(),P.prohibitTag(e),a(t[e],Function)&&Object.defineProperties(t,De(e,!1,t))}}}function qe(...t){if(t.length===1){let e=String(t.shift().trim());t=e.startsWith("!")?[e.slice(1,-1)]:e.split(",").map(r=>r.trim())}for(let e of t.map(r=>r.startsWith("!")?r.slice(1,-1):r))He(e,{removeRule:1})}function Gt(t){return function(e,r,n){r=r?.isJQx?r?.[0]:r,n=n&&Object.values(T).find(s=>n===s);let i=t(e,document.createElement("br"));if(r&&!a(r,HTMLBRElement))for(let s of i.collection)n?r.insertAdjacentElement(n,s):r.append(s);return i}}function Zt(...t){let e={};for(let r of t){let n=Object.getOwnPropertyDescriptors(r);for(let[i,s]of Object.entries(n))!(i in e)&&Object.defineProperty(e,i,{...s,enumerable:!1})}return e}function Yt(t,e,r,n){return t=N(n||t.toLowerCase()),{get(){return(...i)=>e&&r.virtual(Q(ee[t](...i)))},enumerable:!1,configurable:!0}}function De(t,e,r,n){t=t.toLowerCase();let i=Yt(t,e,r,n);return n?{[n]:i,[Z(n)]:i}:{[t]:i,[t.toUpperCase()]:i}}function Xt(t){return Zt(Object.entries(P.tagsRaw).reduce(Kt(t),{}),or(t))}function Kt(t){return function(e,[r,n]){return n&&Object.defineProperties(e,De(r,n,t)),e}}function qt(t){return function(e,r,...n){a(r,Function)&&(n.push(r),r=void 0),t({type:e,selector:r,handlers:n})}}function er(t){return function(e){let{type:r,types:n,origin:i,selector:s,handler:d,handlers:v,node:p,name:w,capture:y,once:b,about:f}=e;d=v||d,r=n||r,s=i||s;let g=Ce(r),u=w;d=a(d,Function)?[d]:d;let h={type:g,selector:s||i,capture:y,name:u,once:b,node:p,about:f};switch(!0){case(a(g,Array)&&g.length>0):for(let S of g)h.type=S,et(d,h,t);break;default:return et(d,h,t)}}}function et(t,e,r){for(let n of t)r.listen({...e,handler:n})}function tr(t){return function(e,r){return r=F(r)&&r,e=F(e)&&e,r&&e&&t.listenerStore[e][r]}}function rr(t){return t.activePopup||Object.defineProperty(t,"activePopup",{value:oe(t),enumerable:!1}),t.activePopup}function nr(t){let e=(p,w)=>He(p,w),r=p=>_({createWithId:p||`jqx${pe()}`}),n=(...p)=>{for(let w of p)He(w)},i=Ut(t),s=ie(t),d=er(s);return{editCssRule:e,createStyle:r,editCssRules:n,allowProhibit:i,handle:d,capturedHandling:d,log:(...p)=>C.on.log(...p).off,handlerWrapper:s}}function or(t){let{factoryExtensions:e,instanceExtensions:r}=Xe(t);Ae=e,be=r;let{editCssRule:n,createStyle:i,editCssRules:s,allowProhibit:d,handle:v,capturedHandling:p,log:w,handlerWrapper:y}=nr(t),b=tr(t);return{log:w,editCssRules:s,createStyle:i,editStylesheet:i,editCssRule:n,escHtml:O,logger:C,text:(f,g=!1)=>g?t.comment(f):document.createTextNode(f),node:(f,g=document)=>g.querySelector(f,g),nodes:(f,g=document)=>[...g.querySelectorAll(f,g)],get getNamedListener(){return b},get virtual(){return Gt(t)},get allowTag(){return d.allow},get prohibitTag(){return d.prohibit},get removeCssRule(){return qe},get removeCssRules(){return qe},get delegate(){return qt(p)},get delegateCaptured(){return p},get handle(){return p},get listen(){return y.listen},get at(){return T},get setStyle(){return n},get fn(){return Wt},get lenient(){return P.allowUnknownHtmlTags},get IS(){return a},get Popup(){return rr(t)},get listenerStore(){return y.ListenerStore}}}var rt=tt(ir());function ir(){return function(e,r,n=T.BeforeEnd){if(e?.isJQx)return e;let i=a(r,HTMLBRElement);r=(!i&&r&&r.isJQx?r[0]:r)||document.body,n=n&&Object.values(T).find(f=>n===f)?n:void 0;let s=Y(e),d=!s&&he(e),v=d||s,p={collection:fe(e)??[],isVirtual:i,isJQx:!0},w=X(p.collection),y=`JQx: input =&gt; ${d?`"${D(e.join(", "),70)}"`:!v&&w?`element collection [${D(p.collection.map(f=>`${a(f,Comment,Text)?"Comment|Text @":""} ${f?.outerHTML||f?.textContent}`).join(", "),70)}]`:`"${D(e,70)}"`}`;if(p.collection.length&&w)return C.log(y),i||p.collection.forEach(f=>{r.contains(f)||B([f],r,n)}),K(p);if(v){if([e].flat().forEach(f=>p.collection.push(H(f))),p.collection.length>0){let f=p.collection.filter(g=>g?.dataset?.jqxcreationerror);p.collection=p.collection.filter(g=>!g?.dataset?.jqxcreationerror),C.log(`${y}`),C.log(`JQx: created ${p.isVirtual?"VIRTUAL ":""}[${D(ge(p.collection).trim()||"sanitized: no elements remaining",70)}]`),p.isVirtual||B(p.collection,r,n)}return K(p)}let b=$e(e,r,p);return C.log(`JQx: input => ${b}`),K(p)}}var an=rt;export{an as default};
13
+ `)}function Tt(t){return t.reduce((e,r)=>{let[n,o]=[r.slice(0,r.indexOf(":")).trim(),r.slice(r.indexOf(":")+1).trim().replace(/;$|;.+(?=\/*).+\/$/,"")];return n&&o?{...e,[n]:o}:e},{})}function At(t){return Tt(Ct(t))}function Je(t,e){return t?.replace("::",":")===e?.replace("::",":")}var ve=!1,$t={on:()=>ve=!0,off:()=>ve=!1},P={tagsRaw:W,allowUnknownHtmlTags:$t,isAllowed(t){if(ve)return!0;let e=a(t,String)?t.toLowerCase():t?.nodeName.toLowerCase()||"none";return e==="#text"||!!W[e]},allowTag:t=>W[t.toLowerCase()]=!0,prohibitTag:t=>W[t.toLowerCase()]=!1};var Ht=!0,re={data:/data-[\-\w.\p{L}]/ui,validURL:/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,whiteSpace:/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g,notAllowedValues:/^javascript|injected|noreferrer|alert|DataURL/gi};function Dt(t){if(Ht&&Object.keys(t.removed).length){let e=Object.entries(t.removed).reduce((r,[n,o])=>[...r,`${O(n)} => ${o}`],[]).join("\\000A");C.error(`JQx: HTML creation error(s): ${e}`)}}function Nt(t){let e=t.nodeName.toLowerCase(),r=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"];return/-/.test(e)&&!r.find(n=>n===e)||P.isAllowed(e)}function Q(t){let e={rawHTML:t?.parentElement?.getHTML()??"no html",removed:{}};return a(t,HTMLElement)&&[...t.childNodes].forEach(r=>{if(r?.children?.length&&Q(r),r?.attributes){let o=a(r,SVGElement)?z.svg:z.html;[...(r??{attributes:[]}).attributes].forEach(s=>{let u=s.name.trim().toLowerCase(),v=s.value.trim().toLowerCase().replace(re.whiteSpace,""),p=u==="href"?!re.validURL.test(v):re.notAllowedValues.test(v),L=u.startsWith("data")?!re.data.test(u):!!o[u];if(p||L){let y=ne(s.value||"none",60);y+=y.length===60?"...":"",e.removed[`${s.name}`]=`attribute/property/value not allowed, removed. Value: ${y}`,r.removeAttribute(s.name)}})}if(!(Nt(r)||r.constructor===CharacterData||r.constructor===Comment)){let o=(r?.outerHTML||r?.textContent).trim(),s=ne(o,60)??"EMPTY";s+=s.length===60?"...":"",e.removed[`<${r.nodeName?.toLowerCase()}>`]=`not allowed, not rendered. Value: ${s}`,r.remove()}}),Dt(e),t}function Pt(t){let e=document.createElement("div");return e.insertAdjacentHTML(T.end,t),e.childNodes.length?Q(e):void 0}function Mt(t,e,r){return a(t,Comment)?e.insertAdjacentHTML(r,`<!--${t.data}-->`):e.insertAdjacentText(r,t.data)}function B(t=[],e=document.body,r=T.BeforeEnd){return r=r||T.BeforeEnd,e=e?.isJQx?e.node:e||document.body,t.reduce((n,o)=>{let s=M(o)&&Ot(o,e,r);return s?[...n,s]:n},[])}function Ot(t,e=document.body,r=T.BeforeEnd){return r=r||T.BeforeEnd,e=e?.isJQx?e?.[0]:e,a(t,Comment,Text)?Mt(t,e,r):a(t,HTMLElement)?e.insertAdjacentElement(r,t):void 0}function H(t){if(a(t,Text,Comment))return t;let e=t?.trim(),r=e?.split(/<text>|<\/text>/i)??[];if(r?.length&&(r=r.length>1?r.filter(o=>o.length).shift():void 0),e.startsWith("<!--")&&e.endsWith("-->"))return document.createComment(t.replace(/<!--|-->$/g,""));if(r||!/^<(.+)[^>]+>/m.test(e))return document.createTextNode(r);let n=Pt(t);return n.childNodes.length<1?H(`<span data-jqxcreationerror="1">${D(t,60)}</span>`):n.children[0]}function oe(t){if(t.node("#jqxPopup"))return;t.logger.log("JQx: [JQx].Popup first call. Dialog element created."),t.dialog({id:"jqxPopup"},t.div({id:"jqxPopupContent"})).render,t.editCssRules(...Pe);let e=[],[r,n]=[t("#jqxPopupContent"),t.node("#jqxPopup")],o={};return t.handle({type:"click, keydown",handlers:f,name:"genericPopupCloseHandler",capture:!0,about:"A generic handler for JQx popups"}),Object.freeze({show:s,remove:u,removeModal:S});function s(m){if(n.open)switch(!0){case v(m):return;default:return u(),setTimeout(()=>s(m),200)}o={...m};let{content:b}=o;return t.IS(b,String,HTMLElement)||b?.isJQx?p():!0}function u(){return o.modal?g(o.warnMessage):L()}function v(m){for(let[b,E]of Object.entries(o))if(E!==m[b])return!1;return!0}function p(){r.clear();let{content:m,modal:b,closeAfter:E}=o;b=t.IS(b,Boolean)?b:!1;let A=b?"":t.div({id:"closeHandleIcon"});r.append(A,t.IS(m,String)?t.div(m):m),n.showModal(),!b&&t.IS(E,Number)&&h(u,E)}function L(){if(n.close(o.returnValue),y(),t.IS(o.callback,Function))return e.push(setTimeout(()=>o.callback(o.returnValue),200));o={}}function y(){e.forEach(m=>clearTimeout(m)),e=[]}function S({callback:m,value:b}={}){o.returnValue=b,o.modal=!1,o.callback=m||o.callback,u()}function f({evt:m}){if(!(Object.keys(o).length<1||!n.open))return m.key==="Escape"&&m.preventDefault(),o.activeTimer&&clearTimeout(o.activeTimer),(m.target.closest("#closeHandleIcon")||!m.target.closest("#jqxPopupContent"))&&u(),!0}function h(m,b){t.IS(m,Function)&&t.IS(b,Number)&&b>0&&(y(),e.push(setTimeout(m,b*1e3)))}function g(m){if(!t.IS(m,String,HTMLElement,Proxy))return;let b=r.find$(".warn");switch(!0){case b.is.empty:b=t.div({class:"warn"},m);default:r.append(b.addClass("active")),h(()=>r.find$(".warn").removeClass("active"),2)}}}function ie(t){let e={},r="anonymous_";function n(y){if(y){let{handler:S,capture:f,type:h}=y;document.addEventListener(h,S,{capture:f})}}function o(y){if(y){let{type:S,handler:f,capture:h}=y;document.removeEventListener(S,f,{capture:h})}}function s(y,S,f,h){return function(g){if(!F(S))return y({evt:g});let m=g.target.closest(S);if(m){let b=t(m);y({self:b,me:b,evt:g}),f&&p(g.type,h)}return!0}}function u(y){return e[y]=e[y]||{},e[y]}function v(y,S){return Object.entries(u(y)).find(([f])=>f===S)}function p(y,S){let f=v(y,S);f&&(o(f[1]),delete e[y][S],delete le[S],console.warn(`Removed listener [${S}] for event type [${y}].`))}function L(y){let{type:S,handler:f,name:h,capture:g,once:m,selector:b,node:E,about:A}=y;e[S]=e[S]||{};let i=Ee(h||f.name),l=f;if(E instanceof HTMLElement){let c=E.dataset.hid||i;E.dataset.hid=c,b=`[data-hid=${c}]`}switch(!0){case!e[S][i]:return e[S][i]={name:i,handler:s(f,b,m,i),capture:Qe(S,g),once:!!m,type:S,initialHandler:l,selector:!!b&&b||!1,about:!!A&&A||!1,unListen(){p(S,i)}},e[S][i];default:return console.warn(`The listener [${i}] for [${S}] exists, it is not re-assigned.`)}}return{remove(...y){return p(...y)},listen:function(y){let{type:S,handler:f}=y;if(!F(S)||!a(f,Function))return;let h=L(y);if(h)return n(h),{type:S,name:h.name,unListen(){p(S,h.name)}}},get ListenerStore(){return Object.freeze({...e})}}}var C=jt(),It=["load","unload","scroll","focus","blur","DOMNodeRemovedFromDocument","DOMNodeInsertedIntoDocument","loadstart","progress","error","abort","load","loadend","pointerenter","pointerleave","readystatechange"],T=Object.freeze(new Proxy({start:"afterbegin",afterbegin:"afterbegin",end:"beforeend",beforeend:"beforeend",before:"beforebegin",beforebegin:"beforebegin",after:"afterend",afterend:"afterend"},{get(t,e){return t[String(e).toLowerCase()]??t[e]}})),Rt=[...Array(26)].map((t,e)=>String.fromCharCode(e+65)).concat([...Array(26)].map((t,e)=>String.fromCharCode(e+97))).concat([...Array(10)].map((t,e)=>`${e}`)),Le=Object.freeze({get(t,e){return t[Z(e)]||t[e]},enumerable:!1,configurable:!1}),le={};function Fe(){let t=setTimeout(()=>{});for(;t>=0;)clearTimeout(t--)}function Ee(t){return F(t)&&!/^handler|handlers$/gi.test(t.trim())?t.trim():ze()}function ze(t){let e=`anonymous_${Math.random().toString(36).slice(2)}`;return le[e]?ze():(le[e]=e,e)}function Qe(t,e){return!!It.find(r=>r===t)||!!e}function ae(t){return t.startsWith("data")||z.html.find(e=>t.toLowerCase()===e)}function ce(t){return t&&(t.textContent="")}function U(t,e=0,r=!0){return t=t?.parentElement,e+=t?t[r?"scrollTop":"scrollLeft"]:0,t?U(t,e,r):e}function F(t,e=1){return e=a(e,Number)&&e||1,a(t,String)&&t.length>=e}function ne(t,e=120){return D(t,e).replace(/&lt;/g,"<")}function D(t,e=120){return`${t}`.trim().slice(0,e).replace(/>\s+</g,"><").replace(/</g,"&lt;").replace(/\s{2,}/g," ").replace(/\n/g,"\\n")+(t.length>e?" &hellip;":"").trim()}function O(t){switch(!0){case a(t,String):let e=document.createElement("div");return e.append(t),e.innerHTML;default:return t}}function Be(t){return a(t,String)&&Object.assign(document.createElement("textarea"),{innerHTML:t}).textContent||t}function jt(){let t=!1,e=[],r={get on(){return t=!0,r},get off(){return t=!1,r},get backLog(){return e}};function n(...s){return e.unshift(...s.map(u=>`${we()} \u2A3B ${Be(u)}`)),console.error(e.slice(0,s.length).join(`
14
+ `)),r}function o(...s){switch(e.unshift(...s.map(u=>`${we()} \u2714 ${Be(u)}`)),t){case!0:console.log(e.slice(0,s.length).join(`
15
+ `));default:return r}}return Object.defineProperties(r,{log:{value:o,enumerable:!1},error:{value:n,enumerable:!1}}),Object.freeze(r)}function we(){return(t=>`[${se(t.getHours())}:${se(t.getMinutes())}:${se(t.getSeconds())}.${se(t.getMilliseconds(),3)}]`)(new Date)}function Ce(t,e){if(t)for(let[r,n]of Object.entries(e)){if(r=N(r),r.startsWith("data"))return ue(t,n);a(n,String)&&ae(r)&&t.setAttribute(r,n.split(/[, ]/)?.join(" "))}}function ue(t,e){if(t&&a(e,Object))for(let[r,n]of Object.entries(e))t.setAttribute(`data-${N(r)}`,n)}function fe(t){return t?a(t,Proxy)?[t.EL]:a(t,NodeList)?[...t]:M(t)?[t]:X(t)?t:t.isJQx?t.collection:void 0:[]}function de(t,e){return t.andThen(e)}function me(t,e){return t.andThen(e,!0)}function M(t){return a(t,Text,HTMLElement,Comment)}function G(t,e){if(a(e,Object))for(let[r,n]of Object.entries(e)){let o;/!important/i.test(n)&&(n=n.slice(0,n.indexOf("!")).trim(),o="important"),t.style.setProperty(N(r),n,o)}}function I(t){let e=t.cloneNode(!0);return e.removeAttribute&&e.removeAttribute("id"),t.isConnected?t.remove():t=null,e}function We(t){if(!t)return;let e=t.style,r=getComputedStyle(t),n=[e.visibility,r.visibility].includes("hidden"),o=[e.display,r.display].includes("none"),s=t.offsetTop<0||t.offsetLeft+t.offsetWidth<0||t.offsetLeft>document.body.offsetWidth,u=+r.opacity==0||+(e.opacity||1)==0;return!(s||u||o||n)}function Ve(t){return[...t.parentNode.querySelectorAll(":is(:read-write)")].find(e=>e===t)??!1}function ge(t){return t?.filter(e=>e).reduce((e,r)=>e.concat(Ae(r)?`<!--${r.data}-->`:ye(r)?r.textContent:r.outerHTML),"")}function se(t,e=2){return`${t}`.padStart(e,"0")}function _e(t,e=0){return[t,e]=[Math.floor(t),Math.ceil(e)],Math.floor([...crypto.getRandomValues(new Uint32Array(1))].shift()/2**32*(t-e+1)+e)}function pe(){return`_${kt(Rt).slice(0,8).join("")}`}function Te(t){return t=a(t,String)&&/,/.test(t)?t.split(","):t,a(t,Array)?t.filter(e=>F(e)).map(e=>e.trim().toLowerCase()):a(t,String)&&t?.trim().toLowerCase()||""}function Ue(t){return[...t.parentNode.querySelectorAll(":is(:modal)")].find(e=>e===t)??!1}function kt(t){let e=t.length;for(;e--;){let r=_e(e);[t[e],t[r]]=[t[r],t[e]]}return t}function Z(t){return a(t,String)?t.toLowerCase().split("-").map((e,r)=>r&&`${Jt(e)}`||e).join(""):t}function N(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/^-|-$/,"")}function Jt([t,...e]){return`${t.toUpperCase()}${e.join("")}`}function ye(t){return a(t,Comment,Text)}function Ae(t){a(t,Comment)}function Ge(t){return a(t,Text)}function Y(t){return a(t,String)&&/^<|>$/.test(`${t}`.trim())}function X(t){return a(t,Array)&&!t?.find(e=>!M(e))}function he(t){return a(t,Array)&&!t?.find(e=>!Y(e))}function w(t,e){let r=t.collection.filter(n=>!ye(n));for(let n=0;n<r.length;n+=1)e(r[n],n);return t}function $e(t,e,r){let n=e!==document.body&&a(t,String)&&t.toLowerCase()!=="body"?e:document,o;try{r.collection=[...n.querySelectorAll(t)]}catch{o=`Invalid CSS querySelector. [${a(t,String)?t:"Nothing valid given!"}]`}let s=r.collection.length;return s<1?`CSS querySelector "${t}", output: nothing`:o??`CSS querySelector "${t}", output ${s} element${s>1?"s":""}`}function Qt(t){let e=`anonymous_${Math.random().toString(36).slice(2)}`;return t.data.add({hid:e}),`[data-hid="${e}"]`}function Ze(){return{isCommentOrTextNode:ye,isNode:M,isComment:Ae,isText:Ge,isHtmlString:Y,isArrayOfHtmlElements:X,isArrayOfHtmlStrings:he,ElemArray2HtmlString:ge,input2Collection:fe,setCollectionFromCssSelector:$e,addHandlerId:Qt,cssRuleEdit:_({createWithId:"JQxStylesheet"})}}function Ye(){let e=Object.freeze({notInDOM:!0,writable:"n/a",modal:"n/a",empty:!0,open:"n/a",visible:"n/a"});return r=>{let n=r.node;return a(n,Node)?Object.freeze({get writable(){return Ve(n)},get modal(){return Ue(n)},get inDOM(){return n.isConnected},get open(){return n.open??!1},get visible(){return We(n)},get disabled(){return n.hasAttribute("readonly")||n.hasAttribute("disabled")},get empty(){return r.collection.length<1},get virtual(){return r.isVirtual}}):e}}function Xe(t,e,r,n){r&&a(e,String)&&(e={[e]:r==="-"?"":r});let o;e.className&&(o=e.className,delete e.className),o=[...t.classList].find(u=>u.startsWith("JQxClass-")||o&&u===o)||o||`JQxClass-${pe().slice(1)}`,n.editCssRule(`.${o}`,e),t.classList.add(o)}var Bt=Ye();function Ke(t){return{factoryExtensions:zt(t),instanceExtensions:Wt(t)}}function zt(t){return{data:e=>({get all(){return new Proxy(e[0]?.dataset??{},Le)},set:(r={})=>{if(!e.is.empty&&a(r,Object))for(let[n,o]of Object.entries(r))e.setData({[n]:o});return e},get:(r,n)=>e.data.all[r]??n,add:(r={})=>{if(!e.is.empty&&a(r,Object))for(let[n,o]of Object.entries(r))e.setData({[n]:o});return e},remove:r=>(e[0]?.removeAttribute(`data-${N(r)}`),e)}),dimensions:e=>{if(e.is.empty)return{error:"[instance].dimensions: NO ELEMENTS"};let r=e[0],n=e.first()?.getBoundingClientRect().toJSON();return n.scrollTopDistance=U(r,0),n.scrollLeftDistance=U(r,0,!1),n},node:e=>e[0],HTML:e=>({get:(r,n)=>{if(e.is.empty)return"NO ELEMENTS IN COLLECTION";let o=r?e.outerHtml:e.html();return n?O(o):o},set:(r,n=!1,o=!1)=>{r=r.isJQx?r.HTML.get(1):r;let s=a(r,String);return r=s&&o?O(r):r,s&&(r||"").trim().length&&e.html(r,n),e},replace:(r,n=!1)=>e.HTML.set(r,!1,n),append:(r,n=!1)=>(r=a(r,HTMLElement)?t(r).HTML.get(1):r.isJQx?r.HTML.get(1):r,e.HTML.set(r,!0,n)),insert:(r,n=!1)=>(r=a(r,HTMLElement)?t(r).HTML.get(1):r.isJQx?r.HTML.get(1):r,e.HTML.set(r+e.HTML.get(),!1,n))}),is:e=>Bt(e),length:e=>e.collection.length,outerHtml:e=>(e.first()||{outerHTML:void 0}).outerHTML,parent:e=>{let r=t(e[0]?.parentNode);return r.is.empty?e:r},render:e=>(!e.is.empty&&e.toDOM()||t.log("[JQx.render]: empty collection"),e),Style:e=>({get computed(){return e.is.empty?{}:getComputedStyle(e[0])},inline:r=>e.style(r),inSheet:r=>e.css(r),valueOf:r=>e.is.empty?void 0:getComputedStyle(e[0])[N(r)],nwRule:r=>e.Style.byRule({rules:r}),byRule:({classes2Apply:r=[],rules:n=[]}={})=>{let s=a(n,String)&&!r.length?n.split("{")[0].trim():"";if(n=n&&a(n,String)?[n]:n,r=r&&a(r,String)?[r]:r,(n?.length||r?.length)&&(n?.length&&t.editCssRules(...n),r))for(let u of r)e.addClass(u);return s?.startsWith(".")&&e.addClass(s.slice(1)),s?.startsWith("#")&&!e.attr("id")&&e.prop({id:s.slice(1)}),e}})}}function Wt(t){return{addClass:(e,...r)=>w(e,n=>n&&r.forEach(o=>n.classList.add(o))),after:de,afterMe:de,andThen:(e,r,n=!1)=>{if(!r||!a(r,String,Node,Proxy))return C.log(`[JQx instance].[beforeMe | afterMe | andThen]: insufficient input [${r}]`),e;r=r?.isJQx?r.collection:a(r,Node)?t.virtual(r).collection:t.virtual(H(r)).collection;let[o,s,u]=n?[0,"before",r.concat(e.collection)]:[e.collection.length-1,"after",e.collection.concat(r)];return e[o][s](...r),e.collection=u,e},append:(e,...r)=>{if(!e.is.empty&&r.length){let n=e.length===1;for(let o of r){if(!o.isJQx&&F(o)){let s=o.trim(),v=!/^<(.+)[^>]+>$/m.test(s)?t.text(o):H(o);w(e,p=>p.append(n?v:I(v)))}M(o)&&w(e,s=>s.append(n?o:I(o))),o.isJQx&&!o.is.empty&&w(e,s=>o.collection.forEach(u=>s.append(n?u:I(u))))}}return e},appendTo:(e,r)=>(r.isJQx||(r=t(r)),r.append(e),e),attr:(e,r,n)=>{let o=e[0];if(!o)return e;if(!n&&F(r))return r=N(r),r==="class"?[...o?.classList].join(" "):o?.getAttribute(r);if(F(r)&&n)switch(r=N(r),!0){case r.startsWith("data-"):r={data:{[r.replace("data-","")]:n}};break;default:r={[r]:n}}return a(r,Object)&&!e.is.empty&&Ce(o,r),e},before:me,beforeMe:me,clear:e=>w(e,ce),closest:(e,r)=>{let n=F(r)?e[0].closest(r):null;return n?t(n):e},computedStyle:(e,r)=>e.first()&&getComputedStyle(e.first())[r],css:(e,r,n)=>w(e,o=>Xe(o,r,n,t)),duplicate:(e,r=!1,n=document.body)=>{if(e.collection.length>0){let o=e.collection[0].cloneNode(!0);return o.childNodes.forEach(s=>{s.removeAttribute&&s?.removeAttribute("id")}),r?t(o).toDOM(n):t.virtual(o)}return C.error("Duplicating an empty JQx instance is not possible"),e},each:(e,r)=>w(e,r),empty:e=>w(e,ce),find:(e,r)=>e.collection.length>0?[...e.first()?.querySelectorAll(r)]:[],find$:(e,r)=>e.collection.length>0?t(r,e):e,first:(e,r=!1)=>{if(e.collection.length>0)return r?e.single():e.collection[0]},first$:(e,r)=>e.single(r),getData:(e,r,n)=>e.first()&&e.first().dataset?.[r]||n,hasClass:(e,...r)=>{let n=e[0];return!n||!n.classList.length?!1:r.find(o=>n.classList.contains(o))&&!0||!1},hide:e=>w(e,r=>G(r,{display:"none !important"})),html:(e,r,n)=>{if(r===void 0){let o=e.node;return o?.getHTML&&o.getHTML()||""}if(!e.isEmpty()){let o=H(`<div>${r.isJQx?r.HTML.get(!0):r}</div>`);if(!a(o,Comment))return w(e,u=>(n||(u.textContent=""),u.insertAdjacentHTML(t.at.end,o.getHTML())))}return e},htmlFor:(e,r,n="",o=!1)=>{if(r&&e.collection.length){if(!r||!F(n))return e;let s=e.find$(r);if(s.length<1)return e;let u=H(`<span>${n}</span>`);s.each(v=>{o||(v.textContent=""),v.insertAdjacentHTML(t.at.end,u?.getHTML())})}return e},isEmpty:e=>e.collection.length<1,nth$:(e,r)=>e.single(r),on:(e,r,...n)=>{if(e.collection.length&&a(r,String,Array)){if(!F(r)||n.length<1)return e;t.handle({type:r,node:e.node,handler:n})}return e},once:(e,r,...n)=>{if(e.collection.length&&a(r,String,Array)){if(!F(r)||n.length<1)return e;t.handle({type:r,once:!0,node:e.node,handler:n})}return e},prepend:(e,...r)=>{if(!e.is.empty&&r){let n=e.length===1;for(let o of r){if(F(o)){o=o.trim();let u=!/^<(.+)[^>]+>$/m.test(o)?t.text(o):H(o);u=n?u:I(u),w(e,v=>v.prepend(u.cloneNode(!0)))}M(o)&&w(e,s=>s.prepend(n?o:I(o))),o.isJQx&&!o.is.empty&&(o.collection.length>1&&o.collection.reverse(),w(e,s=>w(o,u=>s.prepend(n?u:I(u)))),o.collection.reverse())}}return e},prependTo:(e,r)=>(r.isJQx||(r=t.virtual(r)),r.prepend(e),e),prop:(e,r,n)=>{if(a(r,String)&&!n)return r.startsWith("data")?e[0]?.dataset[r.slice(r.indexOf("-")+1)]:e[0]?.[r];let o=a(r,Object)?r:{[r]:n};for(let[s,u]of Object.entries(o)){if(s=s.trim(),u&&!ae(s)||!u)return!1;if(s.toLowerCase()==="id")return e[0].id=u;w(e,p=>{if(s.startsWith("data"))return p.dataset[s.slice(s.indexOf("-")+1)]=u;p[s]=u})}return e},remove:(e,r)=>{C.log(`remove ${D(e.HTML.get(1),40)}${r?` /w selector ${r}`:""}`);let n=s=>s.remove(),o=()=>e.collection=e.collection.filter(s=>document.documentElement.contains(s));if(r){let s=e.find$(r);return s.is.empty||(w(s,n),o()),e}return w(e,n),o(),e},rmAttr:(e,...r)=>{for(let n of r)e.node.removeAttribute(n);return e},removeClass:(e,...r)=>w(e,n=>{if(n)for(let o of r)n.classList.remove(o)}),renderTo:(e,r=document.body,n=t.at.end)=>(e.first$().toDOM(r,n),e),replace:(e,r,n)=>{let o=e[0];return!r||!n||!a(n,HTMLElement)&&!n.isJQx?(console.error("JQx replace: invalid replacement value"),e):(n.isJQx&&(n=n[0]),a(n,NodeList)&&(n=n[0]),o&&r&&(r=a(r,String)?o.querySelectorAll(r):r.isJQx?r.collection:r,a(r,HTMLElement,NodeList,Array)&&a(n,HTMLElement)&&(a(r,HTMLElement)?[r]:[...r]).forEach(s=>s.replaceWith(n.cloneNode(!0)))),e)},replaceClass:(e,r,...n)=>w(e,o=>{o.classList.remove(r);for(let s of n)o.classList.add(s)}),replaceMe:(e,r)=>e.replaceWith(r),replaceWith:(e,r)=>(r=a(r,Element)?r:r.isJQx?r[0]:void 0,r&&(e[0].replaceWith(r),e=t.virtual(r)),e),setData:(e,r)=>w(e,n=>ue(n,r)),show:e=>w(e,r=>G(r,{display:"revert-layer !important"})),single:(e,r)=>e.collection.length>0?a(r,String)?e.find$(r):a(r,Number)?t(e.collection[r]):t(e.collection[0]):e,style:(e,r,n)=>w(e,s=>{n&&a(r,String)&&(r={[r]:n||"none"}),G(s,r)}),text:(e,r,n=!1)=>e.isEmpty()?e:a(r,String)?w(e,s=>s.textContent=n?s.textContent+r:r):e.first().textContent,toDOM:(e,r=document.body,n=T.BeforeEnd)=>(e.isVirtual&&(e.isVirtual=!1),B(e.collection,r,n),e),toggleClass:(e,r)=>w(e,n=>n.classList.toggle(r)),toNodeList:e=>[...e.collection].map(r=>document.importNode(r,!0)),trigger:(e,r,n=Event,o={})=>{if(e.collection.length){let s=new n(r,{...o,bubbles:o.bubbles??!0});for(let u of e.collection)u.dispatchEvent(s)}return e},val:(e,r)=>{let n=e[0];return!n||!a(n,HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement)?e:r===void 0?n.value:(n.value=a(r,String)?r:"",e)}}}var He,be,{isComment:Zr,isText:Yr,isHtmlString:Xr,isArrayOfHtmlElements:Kr,isArrayOfHtmlStrings:qr,ElemArray2HtmlString:en,addHandlerId:tn,cssRuleEdit:De,addFn:Vt}=_t();function _t(){return{...Ze(),addFn:function(t,e){return C.log(`JQx: added extension function [${t}]`),be[t]=(r,...n)=>e(r,...n)}}}function K(t){return new Proxy(t,Object.freeze({get:(e,r)=>Ut(e,r,t)}))}function qe(t,e){return(...r)=>a(t,Function)&&t(K(e),...r)}function Ut(t,e,r){switch(!0){case a(e,Symbol):return t;case a(+e,Number):return t.collection?.[e]||void 0;case e in He:return qe(He[e],r)();case e in be:return qe(be[e],r);default:return t[e]}}function rt(t){let e=Kt(t);for(let[r,n]of Object.entries(Object.getOwnPropertyDescriptors(e)))Object.defineProperty(t,r,n);return t}function Gt(t){return{allow:e=>{let r=/-/.test(e),n=r&&e;e=r?Z(e):e.toLowerCase(),P.allowTag(e),a(t[e],Function)||Object.defineProperties(t,Ne(e,!0,t,n))},prohibit:e=>{e=e.toLowerCase(),P.prohibitTag(e),a(t[e],Function)&&Object.defineProperties(t,Ne(e,!1,t))}}}function et(...t){if(t.length===1){let e=String(t.shift().trim());t=e.startsWith("!")?[e.slice(1,-1)]:e.split(",").map(r=>r.trim())}for(let e of t.map(r=>r.startsWith("!")?r.slice(1,-1):r))De(e,{removeRule:1})}function Zt(t){return function(e,r,n){r=r?.isJQx?r?.[0]:r,n=n&&Object.values(T).find(s=>n===s);let o=t(e,document.createElement("br"));if(r&&!a(r,HTMLBRElement))for(let s of o.collection)n?r.insertAdjacentElement(n,s):r.append(s);return o}}function Yt(...t){let e={};for(let r of t){let n=Object.getOwnPropertyDescriptors(r);for(let[o,s]of Object.entries(n))!(o in e)&&Object.defineProperty(e,o,{...s,enumerable:!1})}return e}function Xt(t,e,r,n){return t=N(n||t.toLowerCase()),{get(){return(...o)=>e&&r.virtual(Q(ee[t](...o)))},enumerable:!1,configurable:!0}}function Ne(t,e,r,n){t=t.toLowerCase();let o=Xt(t,e,r,n);return n?{[n]:o,[Z(n)]:o}:{[t]:o,[t.toUpperCase()]:o}}function Kt(t){return Yt(Object.entries(P.tagsRaw).reduce(qt(t),{}),ir(t))}function qt(t){return function(e,[r,n]){return n&&Object.defineProperties(e,Ne(r,n,t)),e}}function er(t){return function(e,r,...n){a(r,Function)&&(n.push(r),r=void 0),t({type:e,selector:r,handlers:n})}}function tr(t){return function(e){let{type:r,types:n,origin:o,selector:s,handler:u,handlers:v,node:p,name:L,capture:y,once:S,about:f}=e;u=v||u,r=n||r,s=o||s;let h=Te(r),g=L;u=a(u,Function)?[u]:u;let m={type:h,selector:s||o,capture:y,name:g,once:S,node:p,about:f};switch(!0){case(a(h,Array)&&h.length>0):for(let b of h)m.type=b,tt(u,m,t);break;default:return tt(u,m,t)}}}function tt(t,e,r){for(let n of t)r.listen({...e,handler:n})}function rr(t){return function(e,r){return r=F(r)&&r,e=F(e)&&e,r&&e&&t.listenerStore[e][r]}}function nr(t){return t.activePopup||Object.defineProperty(t,"activePopup",{value:oe(t),enumerable:!1}),t.activePopup}function or(t){let e=(p,L)=>De(p,L),r=p=>_({createWithId:p||`jqx${pe()}`}),n=(...p)=>{for(let L of p)De(L)},o=Gt(t),s=ie(t),u=tr(s);return{editCssRule:e,createStyle:r,editCssRules:n,allowProhibit:o,handle:u,capturedHandling:u,log:(...p)=>C.on.log(...p).off,handlerWrapper:s}}function ir(t){let{factoryExtensions:e,instanceExtensions:r}=Ke(t);He=e,be=r;let{editCssRule:n,createStyle:o,editCssRules:s,allowProhibit:u,handle:v,capturedHandling:p,log:L,handlerWrapper:y}=or(t),S=rr(t);return{log:L,editCssRules:s,createStyle:o,editStylesheet:o,editCssRule:n,escHtml:O,logger:C,text:(f,h=!1)=>h?t.comment(f):document.createTextNode(f),node:(f,h=document)=>h.querySelector(f,h),nodes:(f,h=document)=>[...h.querySelectorAll(f,h)],clearAllTimers:Fe,get getNamedListener(){return S},get virtual(){return Zt(t)},get allowTag(){return u.allow},get prohibitTag(){return u.prohibit},get removeCssRule(){return et},get removeCssRules(){return et},get delegate(){return er(p)},get delegateCaptured(){return p},get handle(){return p},get listen(){return y.listen},get at(){return T},get setStyle(){return n},get fn(){return Vt},get lenient(){return P.allowUnknownHtmlTags},get IS(){return a},get Popup(){return nr(t)},get listenerStore(){return y.ListenerStore}}}var nt=rt(lr());function lr(){return function(e,r,n=T.BeforeEnd){if(e?.isJQx)return e;let o=a(r,HTMLBRElement);r=(!o&&r&&r.isJQx?r[0]:r)||document.body,n=n&&Object.values(T).find(f=>n===f)?n:void 0;let s=Y(e),u=!s&&he(e),v=u||s,p={collection:fe(e)??[],isVirtual:o,isJQx:!0},L=X(p.collection),y=`JQx: input =&gt; ${u?`"${D(e.join(", "),70)}"`:!v&&L?`element collection [${D(p.collection.map(f=>`${a(f,Comment,Text)?"Comment|Text @":""} ${f?.outerHTML||f?.textContent}`).join(", "),70)}]`:`"${D(e,70)}"`}`;if(p.collection.length&&L)return C.log(y),o||p.collection.forEach(f=>{r.contains(f)||B([f],r,n)}),K(p);if(v){if([e].flat().forEach(f=>p.collection.push(H(f))),p.collection.length>0){let f=p.collection.filter(h=>h?.dataset?.jqxcreationerror);p.collection=p.collection.filter(h=>!h?.dataset?.jqxcreationerror),C.log(`${y}`),C.log(`JQx: created ${p.isVirtual?"VIRTUAL ":""}[${D(ge(p.collection).trim()||"sanitized: no elements remaining",70)}]`),p.isVirtual||B(p.collection,r,n)}return K(p)}let S=$e(e,r,p);return C.log(`JQx: input => ${S}`),K(p)}}var an=nt;export{an as default};
@@ -62,8 +62,8 @@ function HandlerFactory(jqx) {
62
62
  function storeHandler(spec) {
63
63
  let { type, handler, name, capture, once, selector, node, about } = spec;
64
64
  store[type] = store[type] || {};
65
- let handlerName = getHandlerName(name || handler.name);
66
-
65
+ const handlerName = getHandlerName(name || handler.name);
66
+ const initialHandler = handler;
67
67
  if (node instanceof HTMLElement) {
68
68
  // Note: for multiple event types dataset.hid may be defined already
69
69
  const handlerID = node.dataset.hid || handlerName;
@@ -79,16 +79,17 @@ function HandlerFactory(jqx) {
79
79
  capture: getCaptureValue(type, capture),
80
80
  once: !!once,
81
81
  type: type,
82
+ initialHandler,
82
83
  selector: !!selector && selector || false,
83
84
  about: !!about && about || false,
84
85
  unListen() { remove(type, handlerName); },
85
86
  };
86
87
  return store[type][handlerName];
87
- default: return console.error(`The name [${handlerName}] for [${
88
- type}] exists. Use unique (function) names.`);
88
+ default: return console.warn(`The listener [${handlerName}] for [${
89
+ type}] exists, it is not re-assigned.`);
89
90
  }
90
91
  }
91
-
92
+ // todo: maybe enable a custom unListen handler
92
93
  return {
93
94
  remove(...args) { return remove(...args); },
94
95
  listen: function(spec) {
@@ -5,6 +5,7 @@ export default function($) {
5
5
  $.logger.log(`JQx: [JQx].Popup first call. Dialog element created.`);
6
6
  $.dialog({id: `jqxPopup`}, $.div({ id: "jqxPopupContent" })).render;
7
7
  $.editCssRules(...styleRules);
8
+ let timers = [];
8
9
  const [popupContent, popupNode] = [$(`#jqxPopupContent`), $.node(`#jqxPopup`)];
9
10
  let currentProps = {};
10
11
  $.handle( {
@@ -44,7 +45,7 @@ export default function($) {
44
45
  }
45
46
  return true;
46
47
  }
47
-
48
+
48
49
  function showPopup() {
49
50
  popupContent.clear();
50
51
  let {content, modal, closeAfter} = currentProps;
@@ -57,11 +58,17 @@ export default function($) {
57
58
 
58
59
  function hidePopup() {
59
60
  popupNode.close(currentProps.returnValue);
61
+ clearTimers();
60
62
  if ($.IS(currentProps.callback, Function)) {
61
- return setTimeout(() => currentProps.callback(currentProps.returnValue), 200);
63
+ return timers.push(setTimeout(() => currentProps.callback(currentProps.returnValue), 200));
62
64
  }
63
65
  currentProps = {};
64
66
  }
67
+
68
+ function clearTimers() {
69
+ timers.forEach(timer => clearTimeout(timer));
70
+ timers = [];
71
+ }
65
72
 
66
73
  function removeModal({callback, value} = {}) {
67
74
  currentProps.returnValue = value;
@@ -88,7 +95,8 @@ export default function($) {
88
95
 
89
96
  function createTimer(callback, seconds) {
90
97
  if ($.IS(callback, Function) && $.IS(seconds, Number) && seconds > 0) {
91
- currentProps.activeTimer = setTimeout(callback, seconds * 1000);
98
+ clearTimers();
99
+ timers.push(setTimeout(callback, seconds * 1000));
92
100
  }
93
101
  }
94
102
 
@@ -31,18 +31,22 @@ const datasetKeyProxy = Object.freeze({
31
31
  const handlerIdCache = {};
32
32
 
33
33
  export {
34
- after, applyStyle, assignAttrValues, ATTRS, before, checkProp, cleanupHtml, cloneAndDestroy,
34
+ after, applyStyle, assignAttrValues, ATTRS, before, checkProp, cleanupHtml, clearAllTimers, cloneAndDestroy,
35
35
  createElementFromHtmlString, datasetKeyProxy, inject2DOMTree, ElemArray2HtmlString, emptyElement,
36
- escHtml, findParentScrollDistance, input2Collection, insertPositions, IS, isArrayOfHtmlElements,
37
- isArrayOfHtmlStrings, isComment, isCommentOrTextNode, isHtmlString, isModal, isNode, isNonEmptyString,
38
- isText, isVisible, isWritable, logTime, maybe, pad0, PopupFactory, randomNr, randomString,
39
- resolveEventTypeParameter, setData, styleFactory, systemLog, tagFNFactory, tagLib, toCamelcase,
40
- toDashedNotation, truncate2SingleStr, truncateHtmlStr, ucFirst, HandlerFactory, getCaptureValue,
41
- getHandlerName, handlerIdCache,
36
+ escHtml, findParentScrollDistance, getCaptureValue, getHandlerName, HandlerFactory, handlerIdCache,
37
+ input2Collection, insertPositions, IS, isArrayOfHtmlElements, isArrayOfHtmlStrings, isComment, isCommentOrTextNode,
38
+ isHtmlString, isModal, isNode, isNonEmptyString, isText, isVisible, isWritable, logTime, maybe, pad0,
39
+ PopupFactory, randomNr, randomString, resolveEventTypeParameter, setData, styleFactory, systemLog,
40
+ tagFNFactory, tagLib, toCamelcase, toDashedNotation, truncate2SingleStr, truncateHtmlStr, ucFirst,
42
41
  };
43
42
 
43
+ function clearAllTimers() {
44
+ let id = setTimeout(() => {});
45
+ while (id >= 0) { clearTimeout(id--); }
46
+ }
47
+
44
48
  function getHandlerName(name) {
45
- const validName = isNonEmptyString(name) && !!name && !/^handler|handlers$/gi.test(name.trim())
49
+ const validName = isNonEmptyString(name) && !/^handler|handlers$/gi.test(name.trim())
46
50
  return validName ? name.trim() : uniqueHandlerID();
47
51
  }
48
52
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jqx-es",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "JQuery alike with a few twists",
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  randomString, toDashedNotation, IS, tagFNFactory as $T, styleFactory, toCamelcase, systemLog,
3
3
  escHtml, isNonEmptyString, resolveEventTypeParameter, selectedFactoryHelpers, insertPositions,
4
- cleanupHtml, PopupFactory, tagLib, HandlerFactory, getHandlerName,
4
+ cleanupHtml, PopupFactory, tagLib, HandlerFactory, clearAllTimers,
5
5
  } from "./JQxUtilities.js";
6
6
  import allMethodsFactory from "./JQxInstanceMethods.js";
7
7
 
8
8
  let instanceGetters, instanceMethods;
9
9
  const {
10
10
  isComment, isText, isHtmlString, isArrayOfHtmlElements, isArrayOfHtmlStrings,
11
- ElemArray2HtmlString, addHandlerId, cssRuleEdit, addFn
11
+ ElemArray2HtmlString, addHandlerId, cssRuleEdit, addFn,
12
12
  } = selectedUtilitiesFactory();
13
13
 
14
14
  export { proxify, addJQxStaticMethods };
@@ -241,6 +241,7 @@ function staticMethodsFactory(jqx) {
241
241
  text: (str, isComment = false) => isComment ? jqx.comment(str) : document.createTextNode(str),
242
242
  node: (selector, root = document) => root.querySelector(selector, root),
243
243
  nodes: (selector, root = document) => [...root.querySelectorAll(selector, root)],
244
+ clearAllTimers,
244
245
  get getNamedListener() { return getNamedListener; },
245
246
  get virtual() { return virtualFactory(jqx); },
246
247
  get allowTag() { return allowProhibit.allow; },
@@ -5,7 +5,7 @@ import {
5
5
  isNode, isNonEmptyString, isText, isVisible, isWritable, logTime, maybe, randomNr, randomString,
6
6
  resolveEventTypeParameter, setData, styleFactory, systemLog, tagFNFactory, toCamelcase, toDashedNotation,
7
7
  truncate2SingleStr, truncateHtmlStr, createElementFromHtmlString, inject2DOMTree, cleanupHtml,
8
- PopupFactory, tagLib, HandlerFactory, getHandlerName,
8
+ PopupFactory, tagLib, HandlerFactory, getHandlerName, clearAllTimers,
9
9
  } from "../Resource/Common/Utilities.js"
10
10
 
11
11
  export {
@@ -15,7 +15,7 @@ export {
15
15
  isHtmlString, isNode, isNonEmptyString, logTime, loop, maybe, randomNr, randomString, resolveEventTypeParameter,
16
16
  selectedFactoryHelpers, setCollectionFromCssSelector, setData, styleFactory, systemLog, tagFNFactory,
17
17
  toCamelcase, toDashedNotation, truncate2SingleStr, truncateHtmlStr, createElementFromHtmlString, inject2DOMTree,
18
- cleanupHtml, PopupFactory, tagLib, HandlerFactory, getHandlerName,
18
+ cleanupHtml, PopupFactory, tagLib, HandlerFactory, getHandlerName, clearAllTimers
19
19
  };
20
20
 
21
21
  function loop(instance, callback) {