jqx-es 1.4.3 → 1.4.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,16 +1,16 @@
1
- var JQx=(()=>{var xe=Object.defineProperty;var st=Object.getOwnPropertyDescriptor;var at=Object.getOwnPropertyNames;var ct=Object.prototype.hasOwnProperty;var ut=(t,e)=>{for(var r in e)xe(t,r,{get:e[r],enumerable:!0})},ft=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of at(e))!ct.call(t,o)&&o!==r&&xe(t,o,{get:()=>e[o],enumerable:!(n=st(e,o))||n.enumerable});return t};var dt=t=>ft(xe({},"__esModule",{value:!0}),t);var Sr={};ut(Sr,{default:()=>br});var{IS:a,maybe:ee,$Wrap:vr,xProxy:wr,isNothing:Er}=mt();function mt(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),f();let t=h(),[e,r]=[p(),A()];return r.custom(),{IS:n,maybe:t,$Wrap:e,isNothing:g,xProxy:r};function n(i,...l){if(t({trial:d=>"isTypes"in(l?.[0]??{})})){let d=l[0];return"defaultValue"in d?S(i,d):"notTypes"in d?m(i,d):n(i,...[d.isTypes].flat())}let c=typeof i=="symbol"?Symbol.isSymbol:i;return l.length>1?C(c,...l):s(i,...l)}function o(i){return i?.[Symbol.proxy]??n(i)}function s(i,...l){let{noInput:c,noShouldbe:d,compareTo:w,inputCTOR:D,isNaN:R,isInfinity:k,shouldBeFirstElementIsNothing:j}=x(i,...l);switch(l=l.length&&l[0],!0){case j:return String(i)===String(w);case(i?.[Symbol.proxy]&&d):return i[Symbol.proxy];case R:return d?"NaN":t({trial:J=>String(w)})===String(i);case k:return d?"Infinity":t({trial:J=>String(w)})===String(i);case c:return d?String(i):String(w)===String(i);case D===Boolean:return l?D===l:"Boolean";default:return b(i,l,d,u(i,D))}}function u(i,l){return i===0?Number:i===""?String:i?l:{name:String(i)}}function x(i,...l){let c=l.length<1,d=!c&&l[0],w=!c&&g(l[0]),D=i==null,R=!D&&Object.getPrototypeOf(i)?.constructor,k=t({trial:J=>String(i)})==="NaN",j=t({trial:J=>String(i)})==="Infinity";return{noInput:D,noShouldbe:c,compareTo:d,inputCTOR:R,isNaN:k,isInfinity:j,shouldBeFirstElementIsNothing:w}}function b(i,l,c,d){switch(!0){case(!c&&l===i||i?.[Symbol.proxy]&&l===Proxy):return!0;case t({trial:w=>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:w=>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 C(i,...l){return l.some(c=>n(i,c))}function g(i,l=!1){let c=i==null;return c=l?c||n(i,1/0)||n(i,NaN):c,c}function h(){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 p(){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 S(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:m(i,{isTypes:c,notTypes:d})?i:l}function m(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 f(){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 y(i){let l=String(Object.getPrototypeOf(i)?.constructor);return l.slice(l.indexOf("ion")+3,l.indexOf("(")).trim()}function v(i){let l=i.set;return i.set=(c,d,w)=>d===Symbol.proxy?c[d]=w:l(c,d,w),i}function A(){let i=Proxy;return{native(){Proxy=i},custom(){Proxy=new i(i,{construct(l,c){for(let w of c)w.set&&(w=v(w));let d=new l(...c);return d[Symbol.proxy]=`Proxy (${y(c[0])})`,d}})}}}}var Ie=yt(),z=gt(),V=pt();function gt(){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 pt(){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 yt(){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 Re={html:"innerHTML",text:"textContent",class:"className"},te=ht();function ht(){let t={get(e,r){let n=String(r)?.toLowerCase();switch(!0){case n in e:return e[n];case Lt(n):return ke(e,n,r);default:return ke(e,n,r,!0)}},enumerable:!1,configurable:!1};return new Proxy({},t)}function ke(t,e,r,n=!1){return Object.defineProperty(t,e,{get(){return n?o=>Ft(r):Tt(e)}}),t[e]}function bt(t,e,r){return e=e?.isJQx&&e.first()||e,ee({trial:n=>Ct(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 St(t,e,...r){let n=xt(e,t);return r?.forEach(o=>bt(n,o,t)),n}function xt(t,e){switch(t=ve(e)?Et(t):t?.isJQx?t.first():t,!0){case a(t,String):return _(e,Je(t,e)?{html:t}:{text:t});case a(t,Node):return wt(e,t);default:return _(e,t)}}function vt(t){return delete t.data,Object.keys(t).length<1||Object.keys(t).forEach(e=>{let r=e.toLowerCase();r in Re&&(t[Re[r]]=t[e],delete t[e])}),t}function wt(t,e){let r=_(t);return r.append(e),r}function _(t,e={}){e=je(e,{});let r=Object.entries(e.data??{}),n=Object.assign(ve(t)?new Comment(e?.text):document.createElement(t),vt(e));return r.length&&r.forEach(([o,s])=>n.dataset[o]=String(s)),n}function je(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 Et(t){return je(t)?t?.text??t?.textContent??"":String(t)}function Ft(t){return _("b",{style:"color:red",text:`'${t}' is not a valid HTML-tag`})}function Je(t,e){return!ve(e)&&a(t,String)&&/<.*>|&[#|0-9a-z]+[^;];/i.test(t)}function Ct(t){return t?.constructor===Comment||t?.constructor===CharacterData}function ve(t){return t?.constructor===Comment||/comment/i.test(t)}function Lt(t){return!a(_(t),HTMLUnknownElement)}function Tt(t){return(e,...r)=>St(t,e,...r)}var{IS:re,maybe:Ar,$Wrap:$r,xProxy:Dr,isNothing:Hr}=At();function At(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),f();let t=h(),[e,r]=[p(),A()];return r.custom(),{IS:n,maybe:t,$Wrap:e,isNothing:g,xProxy:r};function n(i,...l){if(t({trial:d=>"isTypes"in(l?.[0]??{})})){let d=l[0];return"defaultValue"in d?S(i,d):"notTypes"in d?m(i,d):n(i,...[d.isTypes].flat())}let c=typeof i=="symbol"?Symbol.isSymbol:i;return l.length>1?C(c,...l):s(i,...l)}function o(i){return i?.[Symbol.proxy]??n(i)}function s(i,...l){let{noInput:c,noShouldbe:d,compareTo:w,inputCTOR:D,isNaN:R,isInfinity:k,shouldBeFirstElementIsNothing:j}=x(i,...l);switch(l=l.length&&l[0],!0){case j:return String(i)===String(w);case(i?.[Symbol.proxy]&&d):return i[Symbol.proxy];case R:return d?"NaN":t({trial:J=>String(w)})===String(i);case k:return d?"Infinity":t({trial:J=>String(w)})===String(i);case c:return d?String(i):String(w)===String(i);case D===Boolean:return l?D===l:"Boolean";default:return b(i,l,d,u(i,D))}}function u(i,l){return i===0?Number:i===""?String:i?l:{name:String(i)}}function x(i,...l){let c=l.length<1,d=!c&&l[0],w=!c&&g(l[0]),D=i==null,R=!D&&Object.getPrototypeOf(i)?.constructor,k=t({trial:J=>String(i)})==="NaN",j=t({trial:J=>String(i)})==="Infinity";return{noInput:D,noShouldbe:c,compareTo:d,inputCTOR:R,isNaN:k,isInfinity:j,shouldBeFirstElementIsNothing:w}}function b(i,l,c,d){switch(!0){case(!c&&l===i||i?.[Symbol.proxy]&&l===Proxy):return!0;case t({trial:w=>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:w=>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 C(i,...l){return l.some(c=>n(i,c))}function g(i,l=!1){let c=i==null;return c=l?c||n(i,1/0)||n(i,NaN):c,c}function h(){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 p(){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 S(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:m(i,{isTypes:c,notTypes:d})?i:l}function m(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 f(){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 y(i){let l=String(Object.getPrototypeOf(i)?.constructor);return l.slice(l.indexOf("ion")+3,l.indexOf("(")).trim()}function v(i){let l=i.set;return i.set=(c,d,w)=>d===Symbol.proxy?c[d]=w:l(c,d,w),i}function A(){let i=Proxy;return{native(){Proxy=i},custom(){Proxy=new i(i,{construct(l,c){for(let w of c)w.set&&(w=v(w));let d=new l(...c);return d[Symbol.proxy]=`Proxy (${y(c[0])})`,d}})}}}}var U=$t;function $t({styleSheet:t,createWithId:e}={}){let{tryParseAtOrNestedRules:r,ruleExists:n,checkParams:o,sheet:s,removeRules:u,consider:x,currentSheetID:b}=Dt({styleSheet:t,createWithId:e});function C(m,f){if(m&&f.removeProperties){Object.keys(f.removeProperties).forEach(y=>m.style.removeProperty(Qe(y)));return}Object.entries(f).forEach(([y,v])=>{y=Qe(y.trim()),v=v.trim();let A;if(/!important/.test(v)&&(v=v.slice(0,v.indexOf("!important")).trim(),A="important"),!CSS.supports(y,v))return console.error(`StylingFactory ${b} error: '${y}' with value '${v}' not supported (yet)`);Be(()=>m.style.setProperty(y,v,A),`StylingFactory ${b} (setRule4Selector) failed`)})}function g(m,f,y=s){if(m=m?.trim?.(),!re(m,String)||!m.length||/[;,]$/g.test(m))return console.error(`StylingFactory ${b} (setRules): [${m||"[no selector given]"}] is not a valid selector`);if(f.removeRule)return u(m);let v=n(m,!0),A=v||y.cssRules[y.insertRule(`${m} {}`,y.cssRules.length||0)];return x(()=>C(A,f),m,v)}function h(m){let f=m.trim().split(/{/,2),y=f.shift().trim();if(!re(y,String)||!y?.trim()?.length)return console.error(`StylingFactory ${b} (doParse): no (valid) selector could be extracted from rule ${we(m)}`);let v=Rt(f.shift());return Be(()=>g(y,v),`StylingFactory ${b} (setRules) failed`)}function p(m){let f=r(m);return f.done?f.existing:h(m)}function S(m,f){return m.trim().startsWith("@media")?p(Ht(m,f)):g(m,f)}return function(m,f={}){return o(m,f)&&(Object.keys(f).length?S(m,f):p(m))}}function Dt({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(p){let S=document.querySelector(`#${p}`)?.sheet;if(S)return S;let m=Object.assign(document.createElement("style"),{id:p});return document.head.insertAdjacentElement("beforeend",m),m.sheet}function s(p){return console.error(`StylingFactory ${n} [rule: ${p}]
3
- => @charset, @namespace and @import are not supported here`),{done:!0}}function u(p,S){return[...t.rules].find(m=>S?ze(m.selectorText||"",p):Mt`${Pt(p)}${[..."gim"]}`.test(m.cssText))}function x(p){return/^@charset|@import|namespace/i.test(p.trim())?s(p):p.match(/}/g)?.length>1?{existing:g(p,1),done:!0}:{done:!1}}function b(p){let S=[...t.cssRules].reduce((f,y,v)=>ze(y.selectorText||"",p)&&f.concat(v)||f,[]),m=S.length;return S.forEach(f=>t.deleteRule(f)),m>0?console.info(`\u2714 Removed ${m} instance${m>1?"s":""} of selector ${p} from ${n.slice(4)}`):console.info(`\u2714 Remove rule: selector ${p} does not exist in ${n.slice(4)}`)}function C(p,S){return p&&re(p,String)&&p.trim().length>0&&re(S,Object)||(console.error(`StylingFactory ${n} called with invalid parameters`),!1)}function g(p){p=p.trim();let S=p.slice(0,p.indexOf("{")).trim(),m=!!u(S);try{return t.insertRule(`${p}`,t.cssRules.length),m}catch(f){return console.error(`StylingFactory ${n} (tryParse) ${f.name} Error:
4
- ${f.message}
5
- Rule: ${we(p)}
6
- ${r}`),m}}function h(p,S,m){try{return p(),m}catch(f){return console.error(`StylingFactory ${n} (tryAddOrModify) ${f.name} Error:
7
- ${f.message}
8
- Rule: ${we(S)}
9
- ${r}`),m}}return{sheet:t,removeRules:b,tryParseAtOrNestedRules:x,ruleExists:u,checkParams:C,tryParse:g,consider:h,currentSheetID:n}}function Ht(t,e){return`${t.trim()} ${Object.entries(e).map(([r,n])=>`${r}: { ${Nt(n)}`)}`}function we(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 Nt(t){return Object.entries(t).map(([e,r])=>`${e}: ${r.trim()}`).join(`;
1
+ var JQx=(()=>{var xe=Object.defineProperty;var st=Object.getOwnPropertyDescriptor;var at=Object.getOwnPropertyNames;var ct=Object.prototype.hasOwnProperty;var ut=(t,e)=>{for(var r in e)xe(t,r,{get:e[r],enumerable:!0})},ft=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of at(e))!ct.call(t,o)&&o!==r&&xe(t,o,{get:()=>e[o],enumerable:!(n=st(e,o))||n.enumerable});return t};var dt=t=>ft(xe({},"__esModule",{value:!0}),t);var br={};ut(br,{default:()=>hr});var{IS:a,maybe:q,$Wrap:xr,xProxy:wr,isNothing:vr}=mt();function mt(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),c();let t=h(),[e,r]=[g(),T()];return r.custom(),{IS:n,maybe:t,$Wrap:e,isNothing:p,xProxy:r};function n(i,...l){if(t({trial:d=>"isTypes"in(l?.[0]??{})})){let d=l[0];return"defaultValue"in d?S(i,d):"notTypes"in d?m(i,d):n(i,...[d.isTypes].flat())}let u=typeof i=="symbol"?Symbol.isSymbol:i;return l.length>1?L(u,...l):s(i,...l)}function o(i){return i?.[Symbol.proxy]??n(i)}function s(i,...l){let{noInput:u,noShouldbe:d,compareTo:v,inputCTOR:D,isNaN:R,isInfinity:k,shouldBeFirstElementIsNothing:j}=x(i,...l);switch(l=l.length&&l[0],!0){case j:return String(i)===String(v);case(i?.[Symbol.proxy]&&d):return i[Symbol.proxy];case R:return d?"NaN":t({trial:J=>String(v)})===String(i);case k:return d?"Infinity":t({trial:J=>String(v)})===String(i);case u:return d?String(i):String(v)===String(i);case D===Boolean:return l?D===l:"Boolean";default:return b(i,l,d,f(i,D))}}function f(i,l){return i===0?Number:i===""?String:i?l:{name:String(i)}}function x(i,...l){let u=l.length<1,d=!u&&l[0],v=!u&&p(l[0]),D=i==null,R=!D&&Object.getPrototypeOf(i)?.constructor,k=t({trial:J=>String(i)})==="NaN",j=t({trial:J=>String(i)})==="Infinity";return{noInput:D,noShouldbe:u,compareTo:d,inputCTOR:R,isNaN:k,isInfinity:j,shouldBeFirstElementIsNothing:v}}function b(i,l,u,d){switch(!0){case(!u&&l===i||i?.[Symbol.proxy]&&l===Proxy):return!0;case t({trial:v=>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:v=>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(u=>n(i,u))}function p(i,l=!1){let u=i==null;return u=l?u||n(i,1/0)||n(i,NaN):u,u}function h(){let i=(l,u)=>l?.constructor===Function?l(u):void 0;return function({trial:l,whenError:u=()=>{}}={}){try{return i(l)}catch(d){return i(u,d)}}}function g(){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 S(i,{defaultValue:l,isTypes:u=[void 0],notTypes:d}={}){return u=u?.constructor!==Array?[u]:u,d=d&&d?.constructor!==Array?[d]:[],d.length<1?n(i,...u)?i:l:m(i,{isTypes:u,notTypes:d})?i:l}function m(i,{isTypes:l=[void 0],notTypes:u=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,u=u?.constructor!==Array?[u]:u,n(i,...l)&&!n(i,...u)}function c(){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 y(i){let l=String(Object.getPrototypeOf(i)?.constructor);return l.slice(l.indexOf("ion")+3,l.indexOf("(")).trim()}function w(i){let l=i.set;return i.set=(u,d,v)=>d===Symbol.proxy?u[d]=v:l(u,d,v),i}function T(){let i=Proxy;return{native(){Proxy=i},custom(){Proxy=new i(i,{construct(l,u){for(let v of u)v.set&&(v=w(v));let d=new l(...u);return d[Symbol.proxy]=`Proxy (${y(u[0])})`,d}})}}}}var Ie=yt(),z=gt(),W=pt();function gt(){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 pt(){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 yt(){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 Re={html:"innerHTML",text:"textContent",class:"className"},ee=ht();function ht(){let t={get(e,r){let n=String(r)?.toLowerCase();switch(!0){case n in e:return e[n];case Lt(n):return ke(e,n,r);default:return ke(e,n,r,!0)}},enumerable:!1,configurable:!1};return new Proxy({},t)}function ke(t,e,r,n=!1){return Object.defineProperty(t,e,{get(){return n?o=>Ft(r):At(e)}}),t[e]}function bt(t,e,r){return e=e?.isJQx&&e.first()||e,q({trial:n=>Ct(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 St(t,e,...r){let n=xt(e,t);return r?.forEach(o=>bt(n,o,t)),n}function xt(t,e){switch(t=we(e)?Et(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 vt(e,t);default:return V(e,t)}}function wt(t){return delete t.data,Object.keys(t).length<1||Object.keys(t).forEach(e=>{let r=e.toLowerCase();r in Re&&(t[Re[r]]=t[e],delete t[e])}),t}function vt(t,e){let r=V(t);return r.append(e),r}function V(t,e={}){e=je(e,{});let r=Object.entries(e.data??{}),n=Object.assign(we(t)?new Comment(e?.text):document.createElement(t),wt(e));return r.length&&r.forEach(([o,s])=>n.dataset[o]=String(s)),n}function je(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 Et(t){return je(t)?t?.text??t?.textContent??"":String(t)}function Ft(t){return V("b",{style:"color:red",text:`'${t}' is not a valid HTML-tag`})}function Je(t,e){return!we(e)&&a(t,String)&&/<.*>|&[#|0-9a-z]+[^;];/i.test(t)}function Ct(t){return t?.constructor===Comment||t?.constructor===CharacterData}function we(t){return t?.constructor===Comment||/comment/i.test(t)}function Lt(t){return!a(V(t),HTMLUnknownElement)}function At(t){return(e,...r)=>St(t,e,...r)}var{IS:te,maybe:Ar,$Wrap:Tr,xProxy:$r,isNothing:Dr}=Tt();function Tt(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),c();let t=h(),[e,r]=[g(),T()];return r.custom(),{IS:n,maybe:t,$Wrap:e,isNothing:p,xProxy:r};function n(i,...l){if(t({trial:d=>"isTypes"in(l?.[0]??{})})){let d=l[0];return"defaultValue"in d?S(i,d):"notTypes"in d?m(i,d):n(i,...[d.isTypes].flat())}let u=typeof i=="symbol"?Symbol.isSymbol:i;return l.length>1?L(u,...l):s(i,...l)}function o(i){return i?.[Symbol.proxy]??n(i)}function s(i,...l){let{noInput:u,noShouldbe:d,compareTo:v,inputCTOR:D,isNaN:R,isInfinity:k,shouldBeFirstElementIsNothing:j}=x(i,...l);switch(l=l.length&&l[0],!0){case j:return String(i)===String(v);case(i?.[Symbol.proxy]&&d):return i[Symbol.proxy];case R:return d?"NaN":t({trial:J=>String(v)})===String(i);case k:return d?"Infinity":t({trial:J=>String(v)})===String(i);case u:return d?String(i):String(v)===String(i);case D===Boolean:return l?D===l:"Boolean";default:return b(i,l,d,f(i,D))}}function f(i,l){return i===0?Number:i===""?String:i?l:{name:String(i)}}function x(i,...l){let u=l.length<1,d=!u&&l[0],v=!u&&p(l[0]),D=i==null,R=!D&&Object.getPrototypeOf(i)?.constructor,k=t({trial:J=>String(i)})==="NaN",j=t({trial:J=>String(i)})==="Infinity";return{noInput:D,noShouldbe:u,compareTo:d,inputCTOR:R,isNaN:k,isInfinity:j,shouldBeFirstElementIsNothing:v}}function b(i,l,u,d){switch(!0){case(!u&&l===i||i?.[Symbol.proxy]&&l===Proxy):return!0;case t({trial:v=>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:v=>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(u=>n(i,u))}function p(i,l=!1){let u=i==null;return u=l?u||n(i,1/0)||n(i,NaN):u,u}function h(){let i=(l,u)=>l?.constructor===Function?l(u):void 0;return function({trial:l,whenError:u=()=>{}}={}){try{return i(l)}catch(d){return i(u,d)}}}function g(){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 S(i,{defaultValue:l,isTypes:u=[void 0],notTypes:d}={}){return u=u?.constructor!==Array?[u]:u,d=d&&d?.constructor!==Array?[d]:[],d.length<1?n(i,...u)?i:l:m(i,{isTypes:u,notTypes:d})?i:l}function m(i,{isTypes:l=[void 0],notTypes:u=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,u=u?.constructor!==Array?[u]:u,n(i,...l)&&!n(i,...u)}function c(){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 y(i){let l=String(Object.getPrototypeOf(i)?.constructor);return l.slice(l.indexOf("ion")+3,l.indexOf("(")).trim()}function w(i){let l=i.set;return i.set=(u,d,v)=>d===Symbol.proxy?u[d]=v:l(u,d,v),i}function T(){let i=Proxy;return{native(){Proxy=i},custom(){Proxy=new i(i,{construct(l,u){for(let v of u)v.set&&(v=w(v));let d=new l(...u);return d[Symbol.proxy]=`Proxy (${y(u[0])})`,d}})}}}}var _=$t;function $t({styleSheet:t,createWithId:e}={}){let{tryParseAtOrNestedRules:r,ruleExists:n,checkParams:o,sheet:s,removeRules:f,consider:x,currentSheetID:b}=Dt({styleSheet:t,createWithId:e});function L(m,c){if(m&&c.removeProperties){Object.keys(c.removeProperties).forEach(y=>m.style.removeProperty(Qe(y)));return}Object.entries(c).forEach(([y,w])=>{y=Qe(y.trim()),w=w.trim();let T;if(/!important/.test(w)&&(w=w.slice(0,w.indexOf("!important")).trim(),T="important"),!CSS.supports(y,w))return console.error(`StylingFactory ${b} error: '${y}' with value '${w}' not supported (yet)`);Be(()=>m.style.setProperty(y,w,T),`StylingFactory ${b} (setRule4Selector) failed`)})}function p(m,c,y=s){if(m=m?.trim?.(),!te(m,String)||!m.length||/[;,]$/g.test(m))return console.error(`StylingFactory ${b} (setRules): [${m||"[no selector given]"}] is not a valid selector`);if(c.removeRule)return f(m);let w=n(m,!0),T=w||y.cssRules[y.insertRule(`${m} {}`,y.cssRules.length||0)];return x(()=>L(T,c),m,w)}function h(m){let c=m.trim().split(/{/,2),y=c.shift().trim();if(!te(y,String)||!y?.trim()?.length)return console.error(`StylingFactory ${b} (doParse): no (valid) selector could be extracted from rule ${ve(m)}`);let w=Rt(c.shift());return Be(()=>p(y,w),`StylingFactory ${b} (setRules) failed`)}function g(m){let c=r(m);return c.done?c.existing:h(m)}function S(m,c){return m.trim().startsWith("@media")?g(Ht(m,c)):p(m,c)}return function(m,c={}){return o(m,c)&&(Object.keys(c).length?S(m,c):g(m))}}function Dt({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(g){let S=document.querySelector(`#${g}`)?.sheet;if(S)return S;let m=Object.assign(document.createElement("style"),{id:g});return document.head.insertAdjacentElement("beforeend",m),m.sheet}function s(g){return console.error(`StylingFactory ${n} [rule: ${g}]
3
+ => @charset, @namespace and @import are not supported here`),{done:!0}}function f(g,S){return[...t.rules].find(m=>S?ze(m.selectorText||"",g):Mt`${Pt(g)}${[..."gim"]}`.test(m.cssText))}function x(g){return/^@charset|@import|namespace/i.test(g.trim())?s(g):g.match(/}/g)?.length>1?{existing:p(g,1),done:!0}:{done:!1}}function b(g){let S=[...t.cssRules].reduce((c,y,w)=>ze(y.selectorText||"",g)&&c.concat(w)||c,[]),m=S.length;return S.forEach(c=>t.deleteRule(c)),m>0?console.info(`\u2714 Removed ${m} instance${m>1?"s":""} of selector ${g} from ${n.slice(4)}`):console.info(`\u2714 Remove rule: selector ${g} does not exist in ${n.slice(4)}`)}function L(g,S){return g&&te(g,String)&&g.trim().length>0&&te(S,Object)||(console.error(`StylingFactory ${n} called with invalid parameters`),!1)}function p(g){g=g.trim();let S=g.slice(0,g.indexOf("{")).trim(),m=!!f(S);try{return t.insertRule(`${g}`,t.cssRules.length),m}catch(c){return console.error(`StylingFactory ${n} (tryParse) ${c.name} Error:
4
+ ${c.message}
5
+ Rule: ${ve(g)}
6
+ ${r}`),m}}function h(g,S,m){try{return g(),m}catch(c){return console.error(`StylingFactory ${n} (tryAddOrModify) ${c.name} Error:
7
+ ${c.message}
8
+ Rule: ${ve(S)}
9
+ ${r}`),m}}return{sheet:t,removeRules:b,tryParseAtOrNestedRules:x,ruleExists:f,checkParams:L,tryParse:p,consider:h,currentSheetID:n}}function Ht(t,e){return`${t.trim()} ${Object.entries(e).map(([r,n])=>`${r}: { ${Nt(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 Nt(t){return Object.entries(t).map(([e,r])=>`${e}: ${r.trim()}`).join(`;
10
10
  `)}function Pt(t){return t.replace(/([*\[\]()-+{}.$?\\])/g,e=>`\\${e}`)}function Mt(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
11
  `).map(n=>n.replace(/\s|\/\/.*$/g,"").trim().replace(/(@s!)/g," ")).join(""),r)}function Qe(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/[^--]^-|-$/,"")}function Be(t,e){try{return t()}catch(r){console.error(`${e||"an error occured"}: ${r.message}`)}}function Ot(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 It(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 Rt(t){return It(Ot(t))}function ze(t,e){return t?.replace("::",":")===e?.replace("::",":")}var Ee=!1,kt={on:()=>Ee=!0,off:()=>Ee=!1},P={tagsRaw:V,allowUnknownHtmlTags:kt,isAllowed(t){if(Ee)return!0;let e=a(t,String)?t.toLowerCase():t?.nodeName.toLowerCase()||"none";return e==="#text"||!!V[e]},allowTag:t=>V[t.toLowerCase()]=!0,prohibitTag:t=>V[t.toLowerCase()]=!1};var jt=!0,ne={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(jt&&Object.keys(t.removed).length){let e=Object.entries(t.removed).reduce((r,[n,o])=>[...r,`${O(n)} => ${o}`],[]).join("\\000A");L.error(`JQx: HTML creation error(s): ${e}`)}}function Qt(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(),x=s.value.trim().toLowerCase().replace(ne.whiteSpace,""),b=u==="href"?!ne.validURL.test(x):ne.notAllowedValues.test(x),C=u.startsWith("data")?!ne.data.test(u):!!o[u];if(b||C){let g=oe(s.value||"none",60);g+=g.length===60?"...":"",e.removed[`${s.name}`]=`attribute/property/value not allowed, removed. Value: ${g}`,r.removeAttribute(s.name)}})}if(!(Qt(r)||r.constructor===CharacterData||r.constructor===Comment)){let o=(r?.outerHTML||r?.textContent).trim(),s=oe(o,60)??"EMPTY";s+=s.length===60?"...":"",e.removed[`<${r.nodeName?.toLowerCase()}>`]=`not allowed, not rendered. Value: ${s}`,r.remove()}}),Jt(e),t}function Bt(t){let e=document.createElement("div");return e.insertAdjacentHTML(T.end,t),e.childNodes.length?Q(e):void 0}function zt(t,e,r){switch(!0){case a(t,Comment):return e.insertAdjacentHTML(r,`<!--${t.data}-->`);case a(t,Text):return e.insertAdjacentText(r,t.data||t.textContent);default:return}}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)&&Wt(o,e,r);return s?[...n,s]:n},[])}function Wt(t,e=document.body,r=T.BeforeEnd){return r=r||T.BeforeEnd,e=e?.isJQx?e?.[0]:e,a(t,Comment,Text)?zt(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||a(e,String)&&!/^<(.+)[^>]+>/m.test(e))return document.createTextNode(r??e);let n=Bt(t);return n.childNodes.length<1?H(`<span data-jqxcreationerror="1">${W(t,60)}</span>`):n.children[0]}function ie(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(...Ie);let e=[],[r,n]=[t("#jqxPopupContent"),t.node("#jqxPopup")],o={};return t.handle({type:"click, keydown",handlers:p,capture:!0,about:"A generic handler for JQx popups"}),Object.freeze({show:s,remove:u,removeModal:h});function s(f){if(n.open)switch(!0){case x(f):return;default:return u(),setTimeout(()=>s(f),200)}o={...f};let{content:y}=o;return t.IS(y,String,HTMLElement)||y?.isJQx?b():!0}function u(){return o.modal?m(o.warnMessage):C()}function x(f){for(let[y,v]of Object.entries(o))if(v!==f[y])return!1;return!0}function b(){r.clear();let{content:f,modal:y,closeAfter:v}=o;y=t.IS(y,Boolean)?y:!1;let A=y?"":t.div({id:"closeHandleIcon"});r.append(A,t.IS(f,String)?t.div(f):f),n.showModal(),!y&&t.IS(v,Number)&&S(u,v)}function C(){if(n.close(o.returnValue),g(),t.IS(o.callback,Function))return e.push(setTimeout(()=>o.callback(o.returnValue),200));o={}}function g(){e.forEach(f=>clearTimeout(f)),e=[]}function h({callback:f,value:y}={}){o.returnValue=y,o.modal=!1,o.callback=f||o.callback,u()}function p({evt:f}){if(!(Object.keys(o).length<1||!n.open||f.type==="keydown"&&f.key!=="Escape")&&(f.key==="Escape"&&o.modal&&f.preventDefault(),f.target.closest("#closeHandleIcon")||!f.target.closest("#jqxPopupContent")))return o.activeTimer&&clearTimeout(o.activeTimer),u()}function S(f,y){t.IS(f,Function)&&t.IS(y,Number)&&y>0&&(g(),e.push(setTimeout(f,y*1e3)))}function m(f){if(!t.IS(f,String,HTMLElement,Proxy))return;let y=r.find$(".warn");switch(!0){case y.is.empty:y=t.div({class:"warn"},f);default:r.append(y.addClass("active")),S(()=>r.find$(".warn").removeClass("active"),2)}}}function le(t){let e={},r="anonymous_";function n(g){if(g){let{handler:h,capture:p,type:S}=g;document.addEventListener(S,h,{capture:p})}}function o(g){if(g){let{type:h,handler:p,capture:S}=g;document.removeEventListener(h,p,{capture:S})}}function s(g,h,p,S){return function(m){if(!F(h))return g({evt:m});let f=m.target.closest(h);if(f){let y=t(f);g({self:y,me:y,evt:m}),p&&b(m.type,S)}return!0}}function u(g){return e[g]=e[g]||{},e[g]}function x(g,h){return Object.entries(u(g)).find(([p])=>p===h)}function b(g,h){let p=x(g,h);p&&(o(p[1]),delete e[g][h],delete se[h],console.warn(`Removed listener [${h}] for event type [${g}].`))}function C(g){let{type:h,handler:p,name:S,capture:m,once:f,selector:y,node:v,about:A}=g;e[h]=e[h]||{};let i=Fe(S||p.name),l=p;if(v instanceof HTMLElement){let c=v.dataset.hid||i;v.dataset.hid=c,y=`[data-hid=${c}]`}switch(!0){case!e[h][i]:return e[h][i]={name:i,handler:s(p,y,f,i),capture:We(h,m),once:!!f,type:h,initialHandler:l,selector:!!y&&y||!1,about:!!A&&A||!1,unListen(){b(h,i)}},e[h][i];default:return console.warn(`The listener [${i}] for [${h}] exists, it is not re-assigned.`)}}return{remove(...g){return b(...g)},listen:function(g){let{type:h,handler:p}=g;if(!F(h)||!a(p,Function))return;let S=C(g);if(S)return n(S),{type:h,name:S.name,unListen(){b(h,S.name)}}},get ListenerStore(){return Object.freeze({...e})}}}var L=Ut(),Vt=["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]}})),_t=[...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[Y(e)]||t[e]},enumerable:!1,configurable:!1}),se={};function Te(){let t=setTimeout(()=>{});for(;t>=0;)clearTimeout(t--)}function Fe(t){return F(t)&&!/^handler|handlers$/gi.test(t.trim())?t.trim():Ve()}function Ve(t){let e=`anonymous_${Math.random().toString(36).slice(2)}`;return se[e]?Ve():(se[e]=e,e)}function We(t,e){return!!Vt.find(r=>r===t)||!!e}function ue(t){return t.startsWith("data")||z.html.find(e=>t.toLowerCase()===e)}function fe(t){return t&&(t.textContent="")}function G(t,e=0,r=!0){return t=t?.parentElement,e+=t?t[r?"scrollTop":"scrollLeft"]:0,t?G(t,e,r):e}function F(t,e=1){return e=a(e,Number)&&e||1,a(t,String)&&t.length>=e}function oe(t,e=120){return W(t,e).replace(/&lt;/g,"<")}function W(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 Ce(t){return a(t,String)&&Object.assign(document.createElement("textarea"),{innerHTML:t}).textContent||t}function Ut(){let t=!1,e=[],r={get on(){return t=!0,r},get off(){return t=!1,r},get backLog(){return e}};function n(...u){return e.unshift(...u.map(x=>`${ce()} \u2A3B ${Ce(x)}`)),console.error(e.slice(0,u.length).join(`
14
- `)),r}function o(...u){return e.unshift(...u.map(x=>`${ce()} \u26A0 ${Ce(x)}`)),console.warn(e.slice(0,u.length).join(`
15
- `)),r}function s(...u){switch(e.unshift(...u.map(x=>`${ce()} \u2714 ${Ce(x)}`)),t){case!0:console.log(e.slice(0,u.length).join(`
16
- `));default:return r}}return Object.defineProperties(r,{log:{value:s,enumerable:!1},error:{value:n,enumerable:!1},warn:{value:o,enumerable:!1}}),Object.freeze(r)}function ce(){return(t=>`[${ae(t.getHours())}:${ae(t.getMinutes())}:${ae(t.getSeconds())}.${ae(t.getMilliseconds(),3)}]`)(new Date)}function Ae(t,e){if(t)for(let[r,n]of Object.entries(e)){if(r=N(r),r.startsWith("data"))return de(t,n);a(n,String)&&ue(r)&&t.setAttribute(r,n.split(/[, ]/)?.join(" "))}}function de(t,e){if(t&&a(e,Object))for(let[r,n]of Object.entries(e))t.setAttribute(`data-${N(r)}`,n)}function me(t){return t?a(t,Proxy)?[t.EL]:a(t,NodeList)?[...t]:M(t)?[t]:K(t)?t:t.isJQx?t.collection:void 0:[]}function ge(t,e){return t.andThen(e)}function pe(t,e){return t.andThen(e,!0)}function M(t){return a(t,Text,HTMLElement,Comment)}function Z(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 _e(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.hidden,u=t.offsetTop<0||t.offsetLeft+t.offsetWidth<0||t.offsetLeft>document.body.offsetWidth,x=+r.opacity==0||+(e.opacity||1)==0;return!(s||u||x||o||n)}function Ue(t){return t?.isConnected?!![...document.querySelectorAll(":is(:read-write)")].find(e=>e===t):!1}function Ge(t){return t?.filter(e=>e).reduce((e,r)=>e.concat(He(r)?`<!--${r.data}-->`:he(r)?r.textContent:r.outerHTML),"")}function ae(t,e=2){return`${t}`.padStart(e,"0")}function Ze(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 ye(){return`_${Gt(_t).slice(0,8).join("")}`}function $e(t){return t=a(t,String)&&/,/.test(t)?t.split(",").map(e=>e.trim().toLowerCase()).filter(e=>e.length>0):t,a(t,Array)?t:a(t,String)&&t?.trim().toLowerCase()||""}function Ye(t){return t?.isConnected?!![...document.querySelectorAll(":is(:modal)")].find(e=>e===t):!1}function De(t,e){switch(t=String(t).trim(),!0){case/^(0|false|f)$/i.test(t):return!1;case/^(1|true|t)$/i.test(t):return!0;default:return e}}function Gt(t){let e=t.length;for(;e--;){let r=Ze(e);[t[e],t[r]]=[t[r],t[e]]}return t}function Y(t){return a(t,String)?t.toLowerCase().split("-").map((e,r)=>r&&`${Zt(e)}`||e).join(""):t}function N(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/^-|-$/,"")}function Zt([t,...e]){return`${t.toUpperCase()}${e.join("")}`}function he(t){return a(t,Comment,Text)}function He(t){a(t,Comment)}function Xe(t){return a(t,Text)}function X(t){return a(t,String)&&/^<|>$/.test(`${t}`.trim())}function K(t){return a(t,Array)&&!t?.find(e=>!M(e))}function be(t){return a(t,Array)&&!t?.find(e=>!X(e))}function E(t,e){let r=t.collection.filter(n=>!he(n));for(let n=0;n<r.length;n+=1)e(r[n],n);return t}function Ne(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 Yt(t){let e=`anonymous_${Math.random().toString(36).slice(2)}`;return t.data.add({hid:e}),`[data-hid="${e}"]`}function Ke(){return{isCommentOrTextNode:he,isNode:M,isComment:He,isText:Xe,isHtmlString:X,isArrayOfHtmlElements:K,isArrayOfHtmlStrings:be,ElemArray2HtmlString:Ge,input2Collection:me,setCollectionFromCssSelector:Ne,addHandlerId:Yt,cssRuleEdit:U({createWithId:"JQxStylesheet"})}}function qe(){let e=Object.freeze({notInDOM:"n/a",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 Ue(n)},get modal(){return Ye(n)},get inDOM(){return n.isConnected},get open(){return n.open??!1},get visible(){return _e(n)},get disabled(){return n.hasAttribute("readonly")||n.hasAttribute("disabled")},get empty(){return r.collection.length<1},get virtual(){return r.isVirtual}}):e}}function et(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-${ye().slice(1)}`,n.editCssRule(`.${o}`,e),t.classList.add(o)}var Xt=qe();function tt(t){return{factoryExtensions:Kt(t),instanceExtensions:qt(t)}}function Kt(t){return{data(e){return{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){return 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){return e[0]?.removeAttribute(`data-${N(r)}`),e}}},dimensions(e){if(e.is.empty)return L.error("[JQx instance].dimensions called on empty instance"),{error:"[JQx instance].dimensions: NO ELEMENTS"};let{node:r}=e,n=r.getBoundingClientRect().toJSON();return n.scrollTopDistance=G(r,0),n.scrollLeftDistance=G(r,0,!1),n},node(e){return e[0]},HTML(e){return{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){return e.HTML.set(r,!1,n)},append(r,n=!1){return 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){return 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){return Xt(e)},length(e){return e.collection.length},outerHtml(e){return(e.first()||{outerHTML:void 0}).outerHTML},parent(e){let r=t(e[0]?.parentNode);return r.is.empty?e:r},render(e){switch(!0){case!e.is.empty:return e.toDOM();default:return t.logger.warn("[JQx.render]: empty collection"),e}},Style(e){return{get computed(){return e.is.empty?{}:getComputedStyle(e[0])},inline(r){return e.style(r)},inSheet(r){return e.css(r)},valueOf(r){return e.is.empty?void 0:getComputedStyle(e[0])[N(r)]},nwRule(r){return 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 qt(t){return{addClass(e,...r){return E(e,n=>n&&r.forEach(o=>n.classList.add(o)))},after:ge,afterMe:ge,andThen(e,r,n=!1){if(!r||!a(r,String,Node,Proxy))return L.log("[JQx instance].[before(Me) | after(Me) | andThen]: invalid/-sufficient input."),e;r=r?.isJQx?r:a(r,Node)?t.virtual(r):t.virtual(H(r));let[o,s,u]=n?[0,"before",r.collection.concat(e.collection)]:[e.collection.length-1,"after",e.collection.concat(r.collection)];return e[o][s](...r.collection),e.collection=u,e},append(e,...r){if(e.is.empty||r.length<1)return e;let n=e.length===1;for(let o of r){if(!o.isJQx&&F(o)){let s=o.trim(),x=!/^<(.+)[^>]+>$/m.test(s)?t.text(o):H(o);E(e,b=>b.append(n?x:I(x)))}M(o)&&E(e,s=>s.append(n?o:I(o))),o.isJQx&&!o.is.empty&&E(e,s=>o.collection.forEach(u=>s.append(n?u:I(u))))}return e},appendTo(e,r){switch(!0){case(!r.isJQx&&!a(r,HTMLElement)):return $.warn("[JQx instance].appendTo: invalid input"),e;default:return(r.isJQx?r:t(r)).append(e),e}},attr(e,r,n){if(!e.node)return e;if(!n&&F(r))return r=N(r),r==="class"?[...e.node.classList].join(" "):e.node.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&&Ae(e.node,r),e},before:pe,beforeMe:pe,clear(e){return E(e,fe)},closest(e,r){let n=F(r)?e.node?.closest(r):void 0;return n?t(n):e},computedStyle(e,r){let{node:n}=e;return n&&getComputedStyle(n)[r]},css(e,r,n){return E(e,o=>et(o,r,n,t))},duplicate(e,r=!1,n=document.body){switch(!0){case e.is.empty:return L.error("Duplicating an empty JQx instance is not possible"),e;default: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)}},each(e,r){return E(e,r)},empty(e){return E(e,fe)},find(e,r){return e.collection.length>0?[...e.first()?.querySelectorAll(r)]:[]},find$(e,r){return e.collection.length>0?t(r,e):e},first(e,r=!1){return e.collection.length>0?r?e.single():e.collection[0]:void 0},first$(e,r){return e.single(r)},getData(e,r,n){return e.node?.dataset?.[r]||n},hasClass(e,...r){return e.is.empty||!e.node.classList.length?!1:r.find(n=>e.node.classList.contains(n))&&!0||!1},hide(e){return E(e,r=>Z(r,{display:"none !important"}))},html(e,r,n){switch(!0){case(e.is.empty&&!F(r)):return"";case!F(r):return e.node?.getHTML()??"";default:let o=H(`<div>${r.isJQx?r.HTML.get(!0):r}</div>`);return E(e,u=>(u.textContent=n?u.textContent:"",u.insertAdjacentHTML(t.at.end,o.getHTML())))}},htmlFor(e,r,n="",o=!1){if(e.is.empty||!F(r)||!F(n))return e;let s=e.find$(r);if(s.length<1)return e;let u=H(`<span>${n}</span>`);return s.each(x=>{o||(x.textContent=""),x.insertAdjacentHTML(t.at.end,u?.getHTML())}),e},isEmpty(e){return!e.node},nth$(e,r){return e.single(r)},on(e,r,...n){switch(!0){case(e.is.empty||!a(r,String,Array)||!F(r)||n.length<1):return e;default:return t.handle({type:r,node:e.node,handler:n}),e}},once(e,r,...n){switch(!0){case(e.is.empty||!a(r,String,Array)||!F(r)||n.length<1):return e;default:return t.handle({type:r,once:!0,node:e.node,handler:n}),e}},prepend(e,...r){if(e.is.empty||!r)return;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),E(e,x=>x.prepend(u.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,u=>s.prepend(n?u:I(u)))),o.collection.reverse())}return e},prependTo(e,r){return 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&&!ue(s)||!u)return!1;if(s.toLowerCase()==="id")return e[0].id=u;E(e,b=>{if(s.startsWith("data"))return b.dataset[s.slice(s.indexOf("-")+1)]=u;b[s]=u})}return e},remove(e,r){L.log(`remove ${W(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){return E(e,n=>{if(n)for(let o of r)n.classList.remove(o)})},renderTo(e,r,n){return r=a(r,HTMLElement)||r.isJQx?r:document.body,n=a(n,String)&&t.at[n]?n:t.at.end,e.first$().toDOM(r,n),e},replace(e,r,n){let o=e.node;return!r||!a(n,HTMLElement)&&!n?.isJQx?(t.logger.error("JQx replace: invalid replacement value"),e):((n.isJQx||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){return E(e,o=>{o.classList.remove(r);for(let s of n)o.classList.add(s)})},replaceMe(e,r){return e.replaceWith(r)},replaceWith(e,r){return r=a(r,Element)?r:r.isJQx?r[0]:void 0,r&&(e[0].replaceWith(r),e=t.virtual(r)),e},setData(e,r){return E(e,n=>de(n,r))},show(e){return E(e,r=>Z(r,{display:"revert-layer !important"}))},single(e,r){let n=e.collection.length>0;switch(r=r??0,!0){case(n&&a(r,String)):return e.find$(r);case(n&&a(r,Number)):return t(e.collection[r]);case n:return e.collection[0];default:return e}},style(e,r,n){return E(e,s=>{n&&a(r,String)&&(r={[r]:n||"none"}),Z(s,r)})},text(e,r,n=!1){switch(!0){case e.isEmpty():return e;case!a(r,String):return e.node.textContent;default:return E(e,o=>o.textContent=n?o.textContent+r:r)}},toDOM(e,r=document.body,n=T.BeforeEnd){return e.isVirtual=!1,B(e.collection,r,n),e},toggleClass(e,r){return E(e,n=>n.classList.toggle(r))},toNodeList(e){return[...e.collection].map(r=>document.importNode(r,!0))},trigger(e,r,n,o){if(n=/Event\]$/.test(a(n))?n:Event,o=a(o,Object)?{...o,bubbles:o.bubbles??!0}:{bubbles:!0},!e.is.empty){let s=new n(r,o);e.each(u=>u.dispatchEvent(s))}return e},val(e,r){switch(!0){case(e.is.empty||!a(e.node,HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement)):return e;case!a(r,String):return e.node.value;default:return e.node.value=a(r,String)?r:"",e}}}}var Pe,Se,{isComment:cn,isText:un,isHtmlString:fn,isArrayOfHtmlElements:dn,isArrayOfHtmlStrings:mn,ElemArray2HtmlString:gn,addHandlerId:pn,cssRuleEdit:Me,addFn:er}=tr();function tr(){return{...Ke(),addFn:rr}}function rr(t,e){return t=t?.trim(),!F(t)||!a(e,Function)?L.error("JQx.fn: method invalid parameter(s)"):Se[t]=(r,...n)=>e(r,...n)}function nr(t){return function(e,r,n){if(e=e?.trim(),!F(e)||!a(r,Function))return t.error("JQx.staticFn: invalid parameter(s)");let o=n?{get(){return r()}}:{value(...s){return r(...s)}};try{Object.defineProperty(t,e,o)}catch{return t.warn(`JQx.staticFn: extension [${e}] already exists`)}return L.log(`JQx: added static extension function [${e}]`)}}function q(t){return new Proxy(t,Object.freeze({get:(e,r)=>or(e,r,t)}))}function rt(t,e){return(...r)=>a(t,Function)&&t(q(e),...r)}function or(t,e,r){switch(!0){case a(e,Symbol):return t;case a(+e,Number):return t.collection?.[e]||void 0;case e in Pe:return rt(Pe[e],r)();case e in Se:return rt(Se[e],r);default:return t[e]}}function it(t){let e=cr(t);for(let[r,n]of Object.entries(Object.getOwnPropertyDescriptors(e)))Object.defineProperty(t,r,n);return t}function ir(t){return{allow(e){let r=/-/.test(e),n=r&&e;e=r?Y(e):e.toLowerCase(),P.allowTag(e),a(t[e],Function)||Object.defineProperties(t,Oe(e,!0,t,n))},prohibit(e){e=e.toLowerCase(),P.prohibitTag(e),a(t[e],Function)&&Object.defineProperties(t,Oe(e,!1,t))}}}function nt(...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))Me(e,{removeRule:1})}function lr(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 sr(...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 ar(t,e,r,n){return t=N(n||t.toLowerCase()),{get(){return(...o)=>(L.log(e?`JQx: created (virtual) instance from [JQx].${t}`:`Could not create instance from [JQx].${t}`),e&&r.virtual(Q(te[t](...o))))},enumerable:!1,configurable:!0}}function Oe(t,e,r,n){t=t.toLowerCase();let o=ar(t,e,r,n);return n?{[n]:o,[Y(n)]:o}:{[t]:o,[t.toUpperCase()]:o}}function cr(t){return sr(Object.entries(P.tagsRaw).reduce(ur(t),{}),yr(t))}function ur(t){return function(e,[r,n]){return n&&Object.defineProperties(e,Oe(r,n,t)),e}}function fr(t){return function(e,r,...n){a(r,Function)&&(n.push(r),r=void 0),t({type:e,selector:r,handlers:n})}}function dr(t){return function(e){let{type:r,types:n,origin:o,selector:s,handler:u,handlers:x,node:b,name:C,capture:g,once:h,about:p}=e;u=x||u,r=n||r,s=o||s;let S=$e(r),m=C;u=a(u,Function)?[u]:u;let f={type:S,selector:s||o,capture:g,name:m,once:h,node:b,about:p};switch(!0){case(a(S,Array)&&S.length>0):for(let y of S)f.type=y,ot(u,f,t);break;default:return ot(u,f,t)}}}function ot(t,e,r){for(let n of t)r.listen({...e,handler:n})}function mr(t){return function(e,r){return r=F(r)&&r,e=F(e)&&e,r&&e&&t.listenerStore[e][r]}}function gr(t){return t.activePopup||Object.defineProperty(t,"activePopup",{value:ie(t),enumerable:!1}),t.activePopup}function pr(t){let e=(g,h)=>Me(g,h),r=function(g){return U({createWithId:g||`jqx${ye()}`})},n=function(...g){for(let h of g)Me(h)},o=ir(t),s=le(t),u=dr(s);return{editCssRule:e,createStyle:r,editCssRules:n,allowProhibit:o,handle:u,capturedHandling:u,log:(...g)=>L.on.log(...g).off,warn:(...g)=>L.on.warn(...g).off,error:(...g)=>L.on.error(...g).off,handlerWrapper:s}}function yr(t){let{factoryExtensions:e,instanceExtensions:r}=tt(t);Pe=e,Se=r;let{editCssRule:n,createStyle:o,editCssRules:s,allowProhibit:u,handle:x,capturedHandling:b,log:C,warn:g,error:h,handlerWrapper:p}=pr(t),S=mr(t),m=nr(t);return{log:C,warn:g,error:h,editCssRules:s,createStyle:o,editStylesheet:o,editCssRule:n,escHtml:O,logger:L,text(f,y=!1){return y?t.comment(f):document.createTextNode(f)},node(f,y=document){return y.querySelector(f,y)},nodes(f,y=document){return[...y.querySelectorAll(f,y)]},clearAllTimers:Te,get staticFn(){return function(f,y,v){return m(f,y,v)}},get toBool(){return De},get getNamedListener(){return S},get virtual(){return lr(t)},get allowTag(){return u.allow},get prohibitTag(){return u.prohibit},get removeCssRule(){return nt},get removeCssRules(){return nt},get delegate(){return fr(b)},get delegateCaptured(){return b},get handle(){return b},get listen(){return p.listen},get at(){return T},get setStyle(){return n},get fn(){return er},get lenient(){return P.allowUnknownHtmlTags},get IS(){return a},get Popup(){return gr(t)},get listenerStore(){return p.ListenerStore}}}var lt=it(hr());function hr(){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(h=>n===h)?n:void 0;let s=X(e),x=!s&&be(e)||s,b={collection:me(e)??[],isVirtual:o,isJQx:!0},C=K(b.collection);if(b.collection.length&&C)return o||b.collection.forEach(h=>{r.contains(h)||B([h],r,n)}),q(b);if(x){if([e].flat().forEach(h=>b.collection.push(H(h))),b.collection.length>0){let h=b.collection.filter(S=>S?.dataset?.jqxcreationerror);b.collection=b.collection.filter(S=>!S?.dataset?.jqxcreationerror);let p=b.collection.length?b.collection.map(S=>`${String(S.constructor).split(/function|\(/)[1].trim()}`).join(" | "):"sanitized: no elements remaining";L.log(`JQx: created ${b.isVirtual?"(virtual)":""} instance from HTML string ([${p}])`),b.isVirtual||B(b.collection,r,n)}return q(b)}let g=Ne(e,r,b);return e!==null&&L.log(`JQx: input => ${g}`),q(b)}}var br=lt;return dt(Sr);})();
13
+ `)}function It(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 Rt(t){return It(Ot(t))}function ze(t,e){return t?.replace("::",":")===e?.replace("::",":")}var Ee=!1,kt={on:()=>Ee=!0,off:()=>Ee=!1},P={tagsRaw:W,allowUnknownHtmlTags:kt,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 jt=!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(jt&&Object.keys(t.removed).length){let e=Object.entries(t.removed).reduce((r,[n,o])=>[...r,`${O(n)} => ${o}`],[]).join("\\000A");F.error(`JQx: HTML creation error(s): ${e}`)}}function Qt(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 f=s.name.trim().toLowerCase(),x=s.value.trim().toLowerCase().replace(re.whiteSpace,""),b=f==="href"?!re.validURL.test(x):re.notAllowedValues.test(x),L=f.startsWith("data")?!re.data.test(f):!!o[f];if(b||L){let p=ne(s.value||"none",60);p+=p.length===60?"...":"",e.removed[`${s.name}`]=`attribute/property/value not allowed, removed. Value: ${p}`,r.removeAttribute(s.name)}})}if(!(Qt(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 Bt(t){let e=document.createElement("div");return e.insertAdjacentHTML(A.end,t),e.childNodes.length?Q(e):void 0}function zt(t,e,r){switch(!0){case a(t,Comment):return e.insertAdjacentHTML(r,`<!--${t.data}-->`);case a(t,Text):return e.insertAdjacentText(r,t.data||t.textContent);default:return}}function B(t=[],e=document.body,r=A.BeforeEnd){return r=r||A.BeforeEnd,e=e?.isJQx?e.node:e||document.body,t.reduce((n,o)=>{let s=M(o)&&Wt(o,e,r);return s?[...n,s]:n},[])}function Wt(t,e=document.body,r=A.BeforeEnd){return r=r||A.BeforeEnd,e=e?.isJQx?e?.[0]:e,a(t,Comment,Text)?zt(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||a(e,String)&&!/^<(.+)[^>]+>/m.test(e))return document.createTextNode(r??e);let n=Bt(t);return n.childNodes.length<1?H(`<span data-jqxcreationerror="1">${oe(t,60)}</span>`):n.children[0]}function ie(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(...Ie);let e=[],[r,n]=[t("#jqxPopupContent"),t.node("#jqxPopup")],o={};return t.handle({type:"click, keydown",handlers:g,capture:!0,about:"A generic handler for JQx popups"}),Object.freeze({show:s,remove:f,removeModal:h});function s(c){if(n.open)switch(!0){case x(c):return;default:return f(),setTimeout(()=>s(c),200)}o={...c};let{content:y}=o;return t.IS(y,String,HTMLElement)||y?.isJQx?b():!0}function f(){return o.modal?m(o.warnMessage):L()}function x(c){for(let[y,w]of Object.entries(o))if(w!==c[y])return!1;return!0}function b(){r.clear();let{content:c,modal:y,closeAfter:w}=o;y=t.IS(y,Boolean)?y:!1;let T=y?"":t.div({id:"closeHandleIcon"});r.append(T,t.IS(c,String)?t.div(c):c),n.showModal(),!y&&t.IS(w,Number)&&S(f,w)}function L(){if(n.close(o.returnValue),p(),t.IS(o.callback,Function))return e.push(setTimeout(()=>o.callback(o.returnValue),200));o={}}function p(){e.forEach(c=>clearTimeout(c)),e=[]}function h({callback:c,value:y}={}){o.returnValue=y,o.modal=!1,o.callback=c||o.callback,f()}function g({evt:c}){if(!(Object.keys(o).length<1||!n.open||c.type==="keydown"&&c.key!=="Escape")&&(c.key==="Escape"&&o.modal&&c.preventDefault(),c.target.closest("#closeHandleIcon")||!c.target.closest("#jqxPopupContent")))return o.activeTimer&&clearTimeout(o.activeTimer),f()}function S(c,y){t.IS(c,Function)&&t.IS(y,Number)&&y>0&&(p(),e.push(setTimeout(c,y*1e3)))}function m(c){if(!t.IS(c,String,HTMLElement,Proxy))return;let y=r.find$(".warn");switch(!0){case y.is.empty:y=t.div({class:"warn"},c);default:r.append(y.addClass("active")),S(()=>r.find$(".warn").removeClass("active"),2)}}}function le(t){let e={},r="anonymous_";function n(p){if(p){let{handler:h,capture:g,type:S}=p;document.addEventListener(S,h,{capture:g})}}function o(p){if(p){let{type:h,handler:g,capture:S}=p;document.removeEventListener(h,g,{capture:S})}}function s(p,h,g,S){return function(m){if(!C(h))return p({evt:m});let c=m.target.closest(h);if(c){let y=t(c);p({self:y,me:y,evt:m}),g&&b(m.type,S)}return!0}}function f(p){return e[p]=e[p]||{},e[p]}function x(p,h){return Object.entries(f(p)).find(([g])=>g===h)}function b(p,h){let g=x(p,h);g&&(o(g[1]),delete e[p][h],delete se[h],F.warn(`Removed listener [${h}] for event type [${p}].`))}function L(p){let{type:h,handler:g,name:S,capture:m,once:c,selector:y,node:w,about:T}=p;e[h]=e[h]||{};let i=Fe(S||g.name),l=g;if(w instanceof HTMLElement){let u=w.dataset.hid||i;w.dataset.hid=u,y=`[data-hid=${u}]`}switch(!0){case!e[h][i]:return F.log(`JQx: created listener for event type ${h}, with handler name ${i}`),e[h][i]={name:i,handler:s(g,y,c,i),capture:We(h,m),once:!!c,type:h,initialHandler:l,selector:!!y&&y||!1,about:!!T&&T||!1,unListen(){b(h,i)}},e[h][i];default:return console.warn(`The listener [${i}] for [${h}] exists, it is not re-assigned.`)}}return{remove(...p){return b(...p)},listen:function(p){let{type:h,handler:g}=p;if(!C(h)||!a(g,Function))return;let S=L(p);if(S)return n(S),{type:h,name:S.name,unListen(){b(h,S.name)}}},get ListenerStore(){return Object.freeze({...e})}}}var F=Ut(),Vt=["load","unload","scroll","focus","blur","DOMNodeRemovedFromDocument","DOMNodeInsertedIntoDocument","loadstart","progress","error","abort","load","loadend","pointerenter","pointerleave","readystatechange"],A=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]}})),_t=[...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}),se={};function Ae(){let t=setTimeout(()=>{});for(;t>=0;)clearTimeout(t--)}function Fe(t){return C(t)&&!/^handler|handlers$/gi.test(t.trim())?t.trim():Ve()}function Ve(t){let e=`anonymous_${Math.random().toString(36).slice(2)}`;return se[e]?Ve():(se[e]=e,e)}function We(t,e){return!!Vt.find(r=>r===t)||!!e}function ue(t){return t.startsWith("data")||z.html.find(e=>t.toLowerCase()===e)}function fe(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 C(t,e=1){return e=a(e,Number)&&e||1,a(t,String)&&t.length>=e}function ne(t,e=120){return oe(t,e).replace(/&lt;/g,"<")}function oe(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 Ce(t){return a(t,String)&&Object.assign(document.createElement("textarea"),{innerHTML:t}).textContent||t}function Ut(){let t=!1,e=[],r={get on(){return t=!0,r},get off(){return t=!1,r},get backLog(){return e}};function n(...f){return e.unshift(...f.map(x=>`${ce()} \u2A3B ${Ce(x)}`)),console.error(e.slice(0,f.length).join(`
14
+ `)),r}function o(...f){return e.unshift(...f.map(x=>`${ce()} \u26A0 ${Ce(x)}`)),console.warn(e.slice(0,f.length).join(`
15
+ `)),r}function s(...f){switch(e.unshift(...f.map(x=>`${ce()} \u2714 ${Ce(x)}`)),t){case!0:console.log(e.slice(0,f.length).join(`
16
+ `));default:return r}}return Object.defineProperties(r,{log:{value:s,enumerable:!1},error:{value:n,enumerable:!1},warn:{value:o,enumerable:!1}}),Object.freeze(r)}function ce(){return(t=>`[${ae(t.getHours())}:${ae(t.getMinutes())}:${ae(t.getSeconds())}.${ae(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 de(t,n);a(n,String)&&ue(r)&&t.setAttribute(r,n.split(/[, ]/)?.join(" "))}}function de(t,e){if(t&&a(e,Object))for(let[r,n]of Object.entries(e))t.setAttribute(`data-${N(r)}`,n)}function me(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 ge(t,e){return t.andThen(e)}function pe(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 _e(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.hidden,f=t.offsetTop<0||t.offsetLeft+t.offsetWidth<0||t.offsetLeft>document.body.offsetWidth,x=+r.opacity==0||+(e.opacity||1)==0;return!(s||f||x||o||n)}function Ue(t){return t?.isConnected?!![...document.querySelectorAll(":is(:read-write)")].find(e=>e===t):!1}function Ge(t){return t?.filter(e=>e).reduce((e,r)=>e.concat(He(r)?`<!--${r.data}-->`:he(r)?r.textContent:r.outerHTML),"")}function ae(t,e=2){return`${t}`.padStart(e,"0")}function Ze(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 ye(){return`_${Gt(_t).slice(0,8).join("")}`}function $e(t){return t=a(t,String)&&/,/.test(t)?t.split(",").map(e=>e.trim().toLowerCase()).filter(e=>e.length>0):t,a(t,Array)?t:a(t,String)&&t?.trim().toLowerCase()||""}function Ye(t){return t?.isConnected?!![...document.querySelectorAll(":is(:modal)")].find(e=>e===t):!1}function De(t,e){switch(t=String(t).trim(),!0){case/^(0|false|f)$/i.test(t):return!1;case/^(1|true|t)$/i.test(t):return!0;default:return e}}function Gt(t){let e=t.length;for(;e--;){let r=Ze(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&&`${Zt(e)}`||e).join(""):t}function N(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/^-|-$/,"")}function Zt([t,...e]){return`${t.toUpperCase()}${e.join("")}`}function he(t){return a(t,Comment,Text)}function He(t){a(t,Comment)}function Xe(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 be(t){return a(t,Array)&&!t?.find(e=>!Y(e))}function E(t,e){let r=t.collection.filter(n=>!he(n));for(let n=0;n<r.length;n+=1)e(r[n],n);return t}function Ne(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=`JQx: Invalid CSS querySelector. [${a(t,String)?t:"Not a string!"}]`}let s=r.collection.length;return s<1?`CSS querySelector "${t}", output: nothing`:o??`CSS querySelector "${t}", output ${s} element${s>1?"s":""}`}function Ke(){return{isCommentOrTextNode:he,isNode:M,isComment:He,isText:Xe,isHtmlString:Y,isArrayOfHtmlElements:X,isArrayOfHtmlStrings:be,ElemArray2HtmlString:Ge,input2Collection:me,setCollectionFromCssSelector:Ne,cssRuleEdit:_({createWithId:"JQxStylesheet"})}}function qe(){let e=Object.freeze({notInDOM:"n/a",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 Ue(n)},get modal(){return Ye(n)},get inDOM(){return n.isConnected},get open(){return n.open??!1},get visible(){return _e(n)},get disabled(){return n.hasAttribute("readonly")||n.hasAttribute("disabled")},get empty(){return r.collection.length<1},get virtual(){return r.isVirtual}}):e}}function et(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(f=>f.startsWith("JQxClass-")||o&&f===o)||o||`JQxClass-${ye().slice(1)}`,n.editCssRule(`.${o}`,e),t.classList.add(o)}var Yt=qe();function tt(t){return{factoryExtensions:Xt(t),instanceExtensions:Kt(t)}}function Xt(t){return{data(e){return{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){return 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){return e[0]?.removeAttribute(`data-${N(r)}`),e}}},dimensions(e){if(e.is.empty)return F.error("[JQx instance].dimensions called on empty instance"),{error:"[JQx instance].dimensions: NO ELEMENTS"};let{node:r}=e,n=r.getBoundingClientRect().toJSON();return n.scrollTopDistance=U(r,0),n.scrollLeftDistance=U(r,0,!1),n},node(e){return e[0]},HTML(e){return{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){return e.HTML.set(r,!1,n)},append(r,n=!1){return 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){return 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){return Yt(e)},length(e){return e.collection.length},outerHtml(e){return(e.first()||{outerHTML:void 0}).outerHTML},parent(e){let r=t(e[0]?.parentNode);return r.is.empty?e:r},render(e){switch(!0){case!e.is.empty:return e.toDOM();default:return t.logger.warn("[JQx.render]: empty collection"),e}},Style(e){return{get computed(){return e.is.empty?{}:getComputedStyle(e[0])},inline(r){return e.style(r)},inSheet(r){return e.css(r)},valueOf(r){return e.is.empty?void 0:getComputedStyle(e[0])[N(r)]},nwRule(r){return 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 f of r)e.addClass(f);return s?.startsWith(".")&&e.addClass(s.slice(1)),s?.startsWith("#")&&!e.attr("id")&&e.prop({id:s.slice(1)}),e}}}}}function Kt(t){return{addClass(e,...r){return E(e,n=>n&&r.forEach(o=>n.classList.add(o)))},after:ge,afterMe:ge,andThen(e,r,n=!1){if(!r||!a(r,String,Node,Proxy))return F.log("[JQx instance].[before(Me) | after(Me) | andThen]: invalid/-sufficient input."),e;r=r?.isJQx?r:a(r,Node)?t.virtual(r):t.virtual(H(r));let[o,s,f]=n?[0,"before",r.collection.concat(e.collection)]:[e.collection.length-1,"after",e.collection.concat(r.collection)];return e[o][s](...r.collection),e.collection=f,e},append(e,...r){if(e.is.empty||r.length<1)return e;let n=e.length===1;for(let o of r){if(!o.isJQx&&C(o)){let s=o.trim(),x=!/^<(.+)[^>]+>$/m.test(s)?t.text(o):H(o);E(e,b=>b.append(n?x:I(x)))}M(o)&&E(e,s=>s.append(n?o:I(o))),o.isJQx&&!o.is.empty&&E(e,s=>o.collection.forEach(f=>s.append(n?f:I(f))))}return e},appendTo(e,r){switch(!0){case(!r.isJQx&&!a(r,HTMLElement)):return $.warn("[JQx instance].appendTo: invalid input"),e;default:return(r.isJQx?r:t(r)).append(e),e}},attr(e,r,n){if(!e.node)return e;if(!n&&C(r))return r=N(r),r==="class"?[...e.node.classList].join(" "):e.node.getAttribute(r);if(C(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(e.node,r),e},before:pe,beforeMe:pe,clear(e){return E(e,fe)},closest(e,r){let n=C(r)?e.node?.closest(r):void 0;return n?t(n):e},computedStyle(e,r){let{node:n}=e;return n&&getComputedStyle(n)[r]},css(e,r,n){return E(e,o=>et(o,r,n,t))},duplicate(e,r=!1,n=document.body){switch(!0){case e.is.empty:return F.error("Duplicating an empty JQx instance is not possible"),e;default: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)}},each(e,r){return E(e,r)},empty(e){return E(e,fe)},find(e,r){return e.collection.length>0?[...e.first()?.querySelectorAll(r)]:[]},find$(e,r){return e.collection.length>0?t(r,e):e},first(e,r=!1){return e.collection.length>0?r?e.single():e.collection[0]:void 0},first$(e,r){return e.single(r)},getData(e,r,n){return e.node?.dataset?.[r]||n},hasClass(e,...r){return e.is.empty||!e.node.classList.length?!1:r.find(n=>e.node.classList.contains(n))&&!0||!1},hide(e){return E(e,r=>G(r,{display:"none !important"}))},html(e,r,n){switch(!0){case(e.is.empty&&!C(r)):return"";case!C(r):return e.node?.getHTML()??"";default:let o=H(`<div>${r.isJQx?r.HTML.get(!0):r}</div>`);return E(e,f=>(f.textContent=n?f.textContent:"",f.insertAdjacentHTML(t.at.end,o.getHTML())))}},htmlFor(e,r,n="",o=!1){if(e.is.empty||!C(r)||!C(n))return e;let s=e.find$(r);if(s.length<1)return e;let f=H(`<span>${n}</span>`);return s.each(x=>{o||(x.textContent=""),x.insertAdjacentHTML(t.at.end,f?.getHTML())}),e},isEmpty(e){return!e.node},nth$(e,r){return e.single(r)},on(e,r,...n){switch(!0){case(e.is.empty||!a(r,String,Array)||!C(r)||n.length<1):return e;default:return t.handle({type:r,node:e.node,handler:n}),e}},once(e,r,...n){switch(!0){case(e.is.empty||!a(r,String,Array)||!C(r)||n.length<1):return e;default:return t.handle({type:r,once:!0,node:e.node,handler:n}),e}},prepend(e,...r){if(e.is.empty||!r)return;let n=e.length===1;for(let o of r){if(C(o)){o=o.trim();let f=!/^<(.+)[^>]+>$/m.test(o)?t.text(o):H(o);f=n?f:I(f),E(e,x=>x.prepend(f.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,f=>s.prepend(n?f:I(f)))),o.collection.reverse())}return e},prependTo(e,r){return 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,f]of Object.entries(o)){if(s=s.trim(),f&&!ue(s)||!f)return!1;if(s.toLowerCase()==="id")return e[0].id=f;E(e,b=>{if(s.startsWith("data"))return b.dataset[s.slice(s.indexOf("-")+1)]=f;b[s]=f})}return e},remove(e,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){return E(e,n=>{if(n)for(let o of r)n.classList.remove(o)})},renderTo(e,r,n){return r=a(r,HTMLElement)||r.isJQx?r:document.body,n=a(n,String)&&t.at[n]?n:t.at.end,e.first$().toDOM(r,n),e},replace(e,r,n){let o=e.node;return!r||!a(n,HTMLElement)&&!n?.isJQx?(t.logger.error("JQx replace: invalid replacement value"),e):((n.isJQx||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){return E(e,o=>{o.classList.remove(r);for(let s of n)o.classList.add(s)})},replaceMe(e,r){return e.replaceWith(r)},replaceWith(e,r){return r=a(r,Element)?r:r.isJQx?r[0]:void 0,r&&(e[0].replaceWith(r),e=t.virtual(r)),e},setData(e,r){return E(e,n=>de(n,r))},show(e){return E(e,r=>G(r,{display:"revert-layer !important"}))},single(e,r){let n=e.collection.length>0;switch(r=r??0,!0){case(n&&a(r,String)):return e.find$(r);case(n&&a(r,Number)):return t(e.collection[r]);case n:return e.collection[0];default:return e}},style(e,r,n){return E(e,s=>{n&&a(r,String)&&(r={[r]:n||"none"}),G(s,r)})},text(e,r,n=!1){switch(!0){case e.isEmpty():return e;case!a(r,String):return e.node.textContent;default:return E(e,o=>o.textContent=n?o.textContent+r:r)}},toDOM(e,r=document.body,n=A.BeforeEnd){return e.isVirtual=!1,B(e.collection,r,n),e},toggleClass(e,r){return E(e,n=>n.classList.toggle(r))},toNodeList(e){return[...e.collection].map(r=>document.importNode(r,!0))},trigger(e,r,n,o){if(n=/Event\]$/.test(a(n))?n:Event,o=a(o,Object)?{...o,bubbles:o.bubbles??!0}:{bubbles:!0},!e.is.empty){let s=new n(r,o);e.each(f=>f.dispatchEvent(s))}return e},val(e,r){switch(!0){case(e.is.empty||!a(e.node,HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement)):return e;case!a(r,String):return e.node.value;default:return e.node.value=a(r,String)?r:"",e}}}}var Pe,Se,{isComment:cn,isText:un,isHtmlString:fn,isArrayOfHtmlElements:dn,isArrayOfHtmlStrings:mn,ElemArray2HtmlString:gn,cssRuleEdit:Me,addFn:qt}=er();function er(){return{...Ke(),addFn:tr}}function tr(t,e){return t=t?.trim(),!C(t)||!a(e,Function)?F.error("JQx.fn: method invalid parameter(s)"):Se[t]=(r,...n)=>e(r,...n)}function rr(t){return function(e,r,n){if(e=e?.trim(),!C(e)||!a(r,Function))return t.error("JQx.staticFn: invalid parameter(s)");let o=n?{get(){return r()}}:{value(...s){return r(...s)}};try{Object.defineProperty(t,e,o)}catch{return t.warn(`JQx.staticFn: extension [${e}] already exists`)}return F.log(`JQx: added static extension function [${e}]`)}}function K(t){return new Proxy(t,Object.freeze({get:(e,r)=>nr(e,r,t)}))}function rt(t,e){return(...r)=>a(t,Function)&&t(K(e),...r)}function nr(t,e,r){switch(!0){case a(e,Symbol):return t;case a(+e,Number):return t.collection?.[e]||void 0;case e in Pe:return rt(Pe[e],r)();case e in Se:return rt(Se[e],r);default:return t[e]}}function it(t){let e=ar(t);for(let[r,n]of Object.entries(Object.getOwnPropertyDescriptors(e)))Object.defineProperty(t,r,n);return t}function or(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,Oe(e,!0,t,n))},prohibit(e){e=e.toLowerCase(),P.prohibitTag(e),a(t[e],Function)&&Object.defineProperties(t,Oe(e,!1,t))}}}function nt(...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))Me(e,{removeRule:1})}function ir(t){return function(e,r,n){r=r?.isJQx?r?.[0]:r,n=n&&Object.values(A).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 lr(...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 sr(t,e,r,n){return t=N(n||t.toLowerCase()),{get(){return(...o)=>(F.log(e?`JQx: created (virtual) instance from [JQx].${t}`:`Could not create instance from [JQx].${t}`),e&&r.virtual(Q(ee[t](...o))))},enumerable:!1,configurable:!0}}function Oe(t,e,r,n){t=t.toLowerCase();let o=sr(t,e,r,n);return n?{[n]:o,[Z(n)]:o}:{[t]:o,[t.toUpperCase()]:o}}function ar(t){return lr(Object.entries(P.tagsRaw).reduce(cr(t),{}),pr(t))}function cr(t){return function(e,[r,n]){return n&&Object.defineProperties(e,Oe(r,n,t)),e}}function ur(t){return function(e,r,...n){a(r,Function)&&(n.push(r),r=void 0),t({type:e,selector:r,handlers:n})}}function fr(t){return function(e){let{type:r,types:n,origin:o,selector:s,handler:f,handlers:x,node:b,name:L,capture:p,once:h,about:g}=e;f=x||f,r=n||r,s=o||s;let S=$e(r),m=L;f=a(f,Function)?[f]:f;let c={type:S,selector:s||o,capture:p,name:m,once:h,node:b,about:g};switch(!0){case(a(S,Array)&&S.length>0):for(let y of S)c.type=y,ot(f,c,t);break;default:return ot(f,c,t)}}}function ot(t,e,r){for(let n of t)r.listen({...e,handler:n})}function dr(t){return function(e,r){return r=C(r)&&r,e=C(e)&&e,r&&e&&t.listenerStore[e][r]}}function mr(t){return t.activePopup||Object.defineProperty(t,"activePopup",{value:ie(t),enumerable:!1}),t.activePopup}function gr(t){let e=(p,h)=>Me(p,h),r=function(p){return _({createWithId:p||`jqx${ye()}`})},n=function(...p){for(let h of p)Me(h)},o=or(t),s=le(t),f=fr(s);return{editCssRule:e,createStyle:r,editCssRules:n,allowProhibit:o,handle:f,capturedHandling:f,log:(...p)=>F.on.log(...p).off,warn:(...p)=>F.on.warn(...p).off,error:(...p)=>F.on.error(...p).off,handlerWrapper:s}}function pr(t){let{factoryExtensions:e,instanceExtensions:r}=tt(t);Pe=e,Se=r;let{editCssRule:n,createStyle:o,editCssRules:s,allowProhibit:f,handle:x,capturedHandling:b,log:L,warn:p,error:h,handlerWrapper:g}=gr(t),S=dr(t),m=rr(t);return{log:L,warn:p,error:h,editCssRules:s,createStyle:o,editStylesheet:o,editCssRule:n,escHtml:O,logger:F,text(c,y=!1){return y?t.comment(c):document.createTextNode(c)},node(c,y=document){return y.querySelector(c,y)},nodes(c,y=document){return[...y.querySelectorAll(c,y)]},clearAllTimers:Ae,get staticFn(){return function(c,y,w){return m(c,y,w)}},get toBool(){return De},get getNamedListener(){return S},get virtual(){return ir(t)},get allowTag(){return f.allow},get prohibitTag(){return f.prohibit},get removeCssRule(){return nt},get removeCssRules(){return nt},get delegate(){return ur(b)},get delegateCaptured(){return b},get handle(){return b},get listen(){return g.listen},get at(){return A},get setStyle(){return n},get fn(){return qt},get lenient(){return P.allowUnknownHtmlTags},get IS(){return a},get Popup(){return mr(t)},get listenerStore(){return g.ListenerStore}}}var lt=it(yr());function yr(){return function(e,r,n=A.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(A).find(h=>n===h)?n:void 0;let s=Y(e),x=!s&&be(e)||s,b={collection:me(e)??[],isVirtual:o,isJQx:!0},L=X(b.collection);if(b.collection.length&&L)return o||b.collection.forEach(h=>{r.contains(h)||B([h],r,n)}),K(b);if(x){if([e].flat().forEach(h=>b.collection.push(H(h))),b.collection.length>0){let h=b.collection.filter(c=>c?.dataset?.jqxcreationerror);b.collection=b.collection.filter(c=>!c?.dataset?.jqxcreationerror);let g=b.collection.map(c=>`${String(c.constructor).split(/function|\(/)[1].trim()}`),S=g.length>1,m=b.collection.length?g.join(", "):"sanitized: no elements remaining";F.log(`JQx: created ${b.isVirtual?"(virtual)":""} instance from ${S?"array of ":""}HTML string${S?"s":""} (${m})`),b.isVirtual||B(b.collection,r,n)}return K(b)}let p=Ne(e,r,b);return e!==null&&F.log(`JQx: input => ${p}`),K(b)}}var hr=lt;return dt(br);})();
package/Bundle/jqx.min.js CHANGED
@@ -1,16 +1,16 @@
1
- var{IS:a,maybe:ee,$Wrap:fr,xProxy:dr,isNothing:mr}=lt();function lt(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),f();let t=h(),[e,r]=[p(),A()];return r.custom(),{IS:n,maybe:t,$Wrap:e,isNothing:g,xProxy:r};function n(i,...l){if(t({trial:d=>"isTypes"in(l?.[0]??{})})){let d=l[0];return"defaultValue"in d?S(i,d):"notTypes"in d?m(i,d):n(i,...[d.isTypes].flat())}let c=typeof i=="symbol"?Symbol.isSymbol:i;return l.length>1?C(c,...l):s(i,...l)}function o(i){return i?.[Symbol.proxy]??n(i)}function s(i,...l){let{noInput:c,noShouldbe:d,compareTo:w,inputCTOR:D,isNaN:R,isInfinity:k,shouldBeFirstElementIsNothing:j}=x(i,...l);switch(l=l.length&&l[0],!0){case j:return String(i)===String(w);case(i?.[Symbol.proxy]&&d):return i[Symbol.proxy];case R:return d?"NaN":t({trial:J=>String(w)})===String(i);case k:return d?"Infinity":t({trial:J=>String(w)})===String(i);case c:return d?String(i):String(w)===String(i);case D===Boolean:return l?D===l:"Boolean";default:return b(i,l,d,u(i,D))}}function u(i,l){return i===0?Number:i===""?String:i?l:{name:String(i)}}function x(i,...l){let c=l.length<1,d=!c&&l[0],w=!c&&g(l[0]),D=i==null,R=!D&&Object.getPrototypeOf(i)?.constructor,k=t({trial:J=>String(i)})==="NaN",j=t({trial:J=>String(i)})==="Infinity";return{noInput:D,noShouldbe:c,compareTo:d,inputCTOR:R,isNaN:k,isInfinity:j,shouldBeFirstElementIsNothing:w}}function b(i,l,c,d){switch(!0){case(!c&&l===i||i?.[Symbol.proxy]&&l===Proxy):return!0;case t({trial:w=>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:w=>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 C(i,...l){return l.some(c=>n(i,c))}function g(i,l=!1){let c=i==null;return c=l?c||n(i,1/0)||n(i,NaN):c,c}function h(){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 p(){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 S(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:m(i,{isTypes:c,notTypes:d})?i:l}function m(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 f(){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 y(i){let l=String(Object.getPrototypeOf(i)?.constructor);return l.slice(l.indexOf("ion")+3,l.indexOf("(")).trim()}function v(i){let l=i.set;return i.set=(c,d,w)=>d===Symbol.proxy?c[d]=w:l(c,d,w),i}function A(){let i=Proxy;return{native(){Proxy=i},custom(){Proxy=new i(i,{construct(l,c){for(let w of c)w.set&&(w=v(w));let d=new l(...c);return d[Symbol.proxy]=`Proxy (${y(c[0])})`,d}})}}}}var Oe=ct(),z=st(),V=at();function st(){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 at(){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 ct(){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 Ie={html:"innerHTML",text:"textContent",class:"className"},te=ut();function ut(){let t={get(e,r){let n=String(r)?.toLowerCase();switch(!0){case n in e:return e[n];case St(n):return Re(e,n,r);default:return Re(e,n,r,!0)}},enumerable:!1,configurable:!1};return new Proxy({},t)}function Re(t,e,r,n=!1){return Object.defineProperty(t,e,{get(){return n?o=>ht(r):xt(e)}}),t[e]}function ft(t,e,r){return e=e?.isJQx&&e.first()||e,ee({trial:n=>bt(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 dt(t,e,...r){let n=mt(e,t);return r?.forEach(o=>ft(n,o,t)),n}function mt(t,e){switch(t=xe(e)?yt(t):t?.isJQx?t.first():t,!0){case a(t,String):return _(e,je(t,e)?{html:t}:{text:t});case a(t,Node):return pt(e,t);default:return _(e,t)}}function gt(t){return delete t.data,Object.keys(t).length<1||Object.keys(t).forEach(e=>{let r=e.toLowerCase();r in Ie&&(t[Ie[r]]=t[e],delete t[e])}),t}function pt(t,e){let r=_(t);return r.append(e),r}function _(t,e={}){e=ke(e,{});let r=Object.entries(e.data??{}),n=Object.assign(xe(t)?new Comment(e?.text):document.createElement(t),gt(e));return r.length&&r.forEach(([o,s])=>n.dataset[o]=String(s)),n}function ke(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 yt(t){return ke(t)?t?.text??t?.textContent??"":String(t)}function ht(t){return _("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 bt(t){return t?.constructor===Comment||t?.constructor===CharacterData}function xe(t){return t?.constructor===Comment||/comment/i.test(t)}function St(t){return!a(_(t),HTMLUnknownElement)}function xt(t){return(e,...r)=>dt(t,e,...r)}var{IS:re,maybe:br,$Wrap:Sr,xProxy:xr,isNothing:vr}=vt();function vt(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),f();let t=h(),[e,r]=[p(),A()];return r.custom(),{IS:n,maybe:t,$Wrap:e,isNothing:g,xProxy:r};function n(i,...l){if(t({trial:d=>"isTypes"in(l?.[0]??{})})){let d=l[0];return"defaultValue"in d?S(i,d):"notTypes"in d?m(i,d):n(i,...[d.isTypes].flat())}let c=typeof i=="symbol"?Symbol.isSymbol:i;return l.length>1?C(c,...l):s(i,...l)}function o(i){return i?.[Symbol.proxy]??n(i)}function s(i,...l){let{noInput:c,noShouldbe:d,compareTo:w,inputCTOR:D,isNaN:R,isInfinity:k,shouldBeFirstElementIsNothing:j}=x(i,...l);switch(l=l.length&&l[0],!0){case j:return String(i)===String(w);case(i?.[Symbol.proxy]&&d):return i[Symbol.proxy];case R:return d?"NaN":t({trial:J=>String(w)})===String(i);case k:return d?"Infinity":t({trial:J=>String(w)})===String(i);case c:return d?String(i):String(w)===String(i);case D===Boolean:return l?D===l:"Boolean";default:return b(i,l,d,u(i,D))}}function u(i,l){return i===0?Number:i===""?String:i?l:{name:String(i)}}function x(i,...l){let c=l.length<1,d=!c&&l[0],w=!c&&g(l[0]),D=i==null,R=!D&&Object.getPrototypeOf(i)?.constructor,k=t({trial:J=>String(i)})==="NaN",j=t({trial:J=>String(i)})==="Infinity";return{noInput:D,noShouldbe:c,compareTo:d,inputCTOR:R,isNaN:k,isInfinity:j,shouldBeFirstElementIsNothing:w}}function b(i,l,c,d){switch(!0){case(!c&&l===i||i?.[Symbol.proxy]&&l===Proxy):return!0;case t({trial:w=>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:w=>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 C(i,...l){return l.some(c=>n(i,c))}function g(i,l=!1){let c=i==null;return c=l?c||n(i,1/0)||n(i,NaN):c,c}function h(){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 p(){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 S(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:m(i,{isTypes:c,notTypes:d})?i:l}function m(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 f(){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 y(i){let l=String(Object.getPrototypeOf(i)?.constructor);return l.slice(l.indexOf("ion")+3,l.indexOf("(")).trim()}function v(i){let l=i.set;return i.set=(c,d,w)=>d===Symbol.proxy?c[d]=w:l(c,d,w),i}function A(){let i=Proxy;return{native(){Proxy=i},custom(){Proxy=new i(i,{construct(l,c){for(let w of c)w.set&&(w=v(w));let d=new l(...c);return d[Symbol.proxy]=`Proxy (${y(c[0])})`,d}})}}}}var U=wt;function wt({styleSheet:t,createWithId:e}={}){let{tryParseAtOrNestedRules:r,ruleExists:n,checkParams:o,sheet:s,removeRules:u,consider:x,currentSheetID:b}=Et({styleSheet:t,createWithId:e});function C(m,f){if(m&&f.removeProperties){Object.keys(f.removeProperties).forEach(y=>m.style.removeProperty(Je(y)));return}Object.entries(f).forEach(([y,v])=>{y=Je(y.trim()),v=v.trim();let A;if(/!important/.test(v)&&(v=v.slice(0,v.indexOf("!important")).trim(),A="important"),!CSS.supports(y,v))return console.error(`StylingFactory ${b} error: '${y}' with value '${v}' not supported (yet)`);Qe(()=>m.style.setProperty(y,v,A),`StylingFactory ${b} (setRule4Selector) failed`)})}function g(m,f,y=s){if(m=m?.trim?.(),!re(m,String)||!m.length||/[;,]$/g.test(m))return console.error(`StylingFactory ${b} (setRules): [${m||"[no selector given]"}] is not a valid selector`);if(f.removeRule)return u(m);let v=n(m,!0),A=v||y.cssRules[y.insertRule(`${m} {}`,y.cssRules.length||0)];return x(()=>C(A,f),m,v)}function h(m){let f=m.trim().split(/{/,2),y=f.shift().trim();if(!re(y,String)||!y?.trim()?.length)return console.error(`StylingFactory ${b} (doParse): no (valid) selector could be extracted from rule ${ve(m)}`);let v=Dt(f.shift());return Qe(()=>g(y,v),`StylingFactory ${b} (setRules) failed`)}function p(m){let f=r(m);return f.done?f.existing:h(m)}function S(m,f){return m.trim().startsWith("@media")?p(Ft(m,f)):g(m,f)}return function(m,f={}){return o(m,f)&&(Object.keys(f).length?S(m,f):p(m))}}function Et({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(p){let S=document.querySelector(`#${p}`)?.sheet;if(S)return S;let m=Object.assign(document.createElement("style"),{id:p});return document.head.insertAdjacentElement("beforeend",m),m.sheet}function s(p){return console.error(`StylingFactory ${n} [rule: ${p}]
3
- => @charset, @namespace and @import are not supported here`),{done:!0}}function u(p,S){return[...t.rules].find(m=>S?Be(m.selectorText||"",p):Tt`${Lt(p)}${[..."gim"]}`.test(m.cssText))}function x(p){return/^@charset|@import|namespace/i.test(p.trim())?s(p):p.match(/}/g)?.length>1?{existing:g(p,1),done:!0}:{done:!1}}function b(p){let S=[...t.cssRules].reduce((f,y,v)=>Be(y.selectorText||"",p)&&f.concat(v)||f,[]),m=S.length;return S.forEach(f=>t.deleteRule(f)),m>0?console.info(`\u2714 Removed ${m} instance${m>1?"s":""} of selector ${p} from ${n.slice(4)}`):console.info(`\u2714 Remove rule: selector ${p} does not exist in ${n.slice(4)}`)}function C(p,S){return p&&re(p,String)&&p.trim().length>0&&re(S,Object)||(console.error(`StylingFactory ${n} called with invalid parameters`),!1)}function g(p){p=p.trim();let S=p.slice(0,p.indexOf("{")).trim(),m=!!u(S);try{return t.insertRule(`${p}`,t.cssRules.length),m}catch(f){return console.error(`StylingFactory ${n} (tryParse) ${f.name} Error:
4
- ${f.message}
5
- Rule: ${ve(p)}
6
- ${r}`),m}}function h(p,S,m){try{return p(),m}catch(f){return console.error(`StylingFactory ${n} (tryAddOrModify) ${f.name} Error:
7
- ${f.message}
8
- Rule: ${ve(S)}
9
- ${r}`),m}}return{sheet:t,removeRules:b,tryParseAtOrNestedRules:x,ruleExists:u,checkParams:C,tryParse:g,consider:h,currentSheetID:n}}function Ft(t,e){return`${t.trim()} ${Object.entries(e).map(([r,n])=>`${r}: { ${Ct(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 Ct(t){return Object.entries(t).map(([e,r])=>`${e}: ${r.trim()}`).join(`;
10
- `)}function Lt(t){return t.replace(/([*\[\]()-+{}.$?\\])/g,e=>`\\${e}`)}function Tt(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 Qe(t,e){try{return t()}catch(r){console.error(`${e||"an error occured"}: ${r.message}`)}}function At(t){return t.replace(/\/\*.+?\*\//gm,"").replace(/[}{\r\n]/g,"").replace(/(data:.+?);/g,(e,r)=>`${r}\\3b`).split(";").map(e=>e.trim()).join(`;
1
+ var{IS:a,maybe:q,$Wrap:ur,xProxy:fr,isNothing:dr}=lt();function lt(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),c();let t=h(),[e,r]=[g(),T()];return r.custom(),{IS:n,maybe:t,$Wrap:e,isNothing:p,xProxy:r};function n(i,...l){if(t({trial:d=>"isTypes"in(l?.[0]??{})})){let d=l[0];return"defaultValue"in d?S(i,d):"notTypes"in d?m(i,d):n(i,...[d.isTypes].flat())}let u=typeof i=="symbol"?Symbol.isSymbol:i;return l.length>1?L(u,...l):s(i,...l)}function o(i){return i?.[Symbol.proxy]??n(i)}function s(i,...l){let{noInput:u,noShouldbe:d,compareTo:v,inputCTOR:D,isNaN:R,isInfinity:k,shouldBeFirstElementIsNothing:j}=x(i,...l);switch(l=l.length&&l[0],!0){case j:return String(i)===String(v);case(i?.[Symbol.proxy]&&d):return i[Symbol.proxy];case R:return d?"NaN":t({trial:J=>String(v)})===String(i);case k:return d?"Infinity":t({trial:J=>String(v)})===String(i);case u:return d?String(i):String(v)===String(i);case D===Boolean:return l?D===l:"Boolean";default:return b(i,l,d,f(i,D))}}function f(i,l){return i===0?Number:i===""?String:i?l:{name:String(i)}}function x(i,...l){let u=l.length<1,d=!u&&l[0],v=!u&&p(l[0]),D=i==null,R=!D&&Object.getPrototypeOf(i)?.constructor,k=t({trial:J=>String(i)})==="NaN",j=t({trial:J=>String(i)})==="Infinity";return{noInput:D,noShouldbe:u,compareTo:d,inputCTOR:R,isNaN:k,isInfinity:j,shouldBeFirstElementIsNothing:v}}function b(i,l,u,d){switch(!0){case(!u&&l===i||i?.[Symbol.proxy]&&l===Proxy):return!0;case t({trial:v=>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:v=>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(u=>n(i,u))}function p(i,l=!1){let u=i==null;return u=l?u||n(i,1/0)||n(i,NaN):u,u}function h(){let i=(l,u)=>l?.constructor===Function?l(u):void 0;return function({trial:l,whenError:u=()=>{}}={}){try{return i(l)}catch(d){return i(u,d)}}}function g(){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 S(i,{defaultValue:l,isTypes:u=[void 0],notTypes:d}={}){return u=u?.constructor!==Array?[u]:u,d=d&&d?.constructor!==Array?[d]:[],d.length<1?n(i,...u)?i:l:m(i,{isTypes:u,notTypes:d})?i:l}function m(i,{isTypes:l=[void 0],notTypes:u=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,u=u?.constructor!==Array?[u]:u,n(i,...l)&&!n(i,...u)}function c(){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 y(i){let l=String(Object.getPrototypeOf(i)?.constructor);return l.slice(l.indexOf("ion")+3,l.indexOf("(")).trim()}function w(i){let l=i.set;return i.set=(u,d,v)=>d===Symbol.proxy?u[d]=v:l(u,d,v),i}function T(){let i=Proxy;return{native(){Proxy=i},custom(){Proxy=new i(i,{construct(l,u){for(let v of u)v.set&&(v=w(v));let d=new l(...u);return d[Symbol.proxy]=`Proxy (${y(u[0])})`,d}})}}}}var Oe=ct(),z=st(),W=at();function st(){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 at(){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 ct(){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 Ie={html:"innerHTML",text:"textContent",class:"className"},ee=ut();function ut(){let t={get(e,r){let n=String(r)?.toLowerCase();switch(!0){case n in e:return e[n];case St(n):return Re(e,n,r);default:return Re(e,n,r,!0)}},enumerable:!1,configurable:!1};return new Proxy({},t)}function Re(t,e,r,n=!1){return Object.defineProperty(t,e,{get(){return n?o=>ht(r):xt(e)}}),t[e]}function ft(t,e,r){return e=e?.isJQx&&e.first()||e,q({trial:n=>bt(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 dt(t,e,...r){let n=mt(e,t);return r?.forEach(o=>ft(n,o,t)),n}function mt(t,e){switch(t=xe(e)?yt(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 pt(e,t);default:return V(e,t)}}function gt(t){return delete t.data,Object.keys(t).length<1||Object.keys(t).forEach(e=>{let r=e.toLowerCase();r in Ie&&(t[Ie[r]]=t[e],delete t[e])}),t}function pt(t,e){let r=V(t);return r.append(e),r}function V(t,e={}){e=ke(e,{});let r=Object.entries(e.data??{}),n=Object.assign(xe(t)?new Comment(e?.text):document.createElement(t),gt(e));return r.length&&r.forEach(([o,s])=>n.dataset[o]=String(s)),n}function ke(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 yt(t){return ke(t)?t?.text??t?.textContent??"":String(t)}function ht(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 bt(t){return t?.constructor===Comment||t?.constructor===CharacterData}function xe(t){return t?.constructor===Comment||/comment/i.test(t)}function St(t){return!a(V(t),HTMLUnknownElement)}function xt(t){return(e,...r)=>dt(t,e,...r)}var{IS:te,maybe:hr,$Wrap:br,xProxy:Sr,isNothing:xr}=wt();function wt(){Symbol.proxy=Symbol.for("toa.proxy"),Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type"),Symbol.isSymbol=Symbol.for("toa.isASymbol"),c();let t=h(),[e,r]=[g(),T()];return r.custom(),{IS:n,maybe:t,$Wrap:e,isNothing:p,xProxy:r};function n(i,...l){if(t({trial:d=>"isTypes"in(l?.[0]??{})})){let d=l[0];return"defaultValue"in d?S(i,d):"notTypes"in d?m(i,d):n(i,...[d.isTypes].flat())}let u=typeof i=="symbol"?Symbol.isSymbol:i;return l.length>1?L(u,...l):s(i,...l)}function o(i){return i?.[Symbol.proxy]??n(i)}function s(i,...l){let{noInput:u,noShouldbe:d,compareTo:v,inputCTOR:D,isNaN:R,isInfinity:k,shouldBeFirstElementIsNothing:j}=x(i,...l);switch(l=l.length&&l[0],!0){case j:return String(i)===String(v);case(i?.[Symbol.proxy]&&d):return i[Symbol.proxy];case R:return d?"NaN":t({trial:J=>String(v)})===String(i);case k:return d?"Infinity":t({trial:J=>String(v)})===String(i);case u:return d?String(i):String(v)===String(i);case D===Boolean:return l?D===l:"Boolean";default:return b(i,l,d,f(i,D))}}function f(i,l){return i===0?Number:i===""?String:i?l:{name:String(i)}}function x(i,...l){let u=l.length<1,d=!u&&l[0],v=!u&&p(l[0]),D=i==null,R=!D&&Object.getPrototypeOf(i)?.constructor,k=t({trial:J=>String(i)})==="NaN",j=t({trial:J=>String(i)})==="Infinity";return{noInput:D,noShouldbe:u,compareTo:d,inputCTOR:R,isNaN:k,isInfinity:j,shouldBeFirstElementIsNothing:v}}function b(i,l,u,d){switch(!0){case(!u&&l===i||i?.[Symbol.proxy]&&l===Proxy):return!0;case t({trial:v=>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:v=>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(u=>n(i,u))}function p(i,l=!1){let u=i==null;return u=l?u||n(i,1/0)||n(i,NaN):u,u}function h(){let i=(l,u)=>l?.constructor===Function?l(u):void 0;return function({trial:l,whenError:u=()=>{}}={}){try{return i(l)}catch(d){return i(u,d)}}}function g(){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 S(i,{defaultValue:l,isTypes:u=[void 0],notTypes:d}={}){return u=u?.constructor!==Array?[u]:u,d=d&&d?.constructor!==Array?[d]:[],d.length<1?n(i,...u)?i:l:m(i,{isTypes:u,notTypes:d})?i:l}function m(i,{isTypes:l=[void 0],notTypes:u=[void 0]}={}){return l=l?.constructor!==Array?[l]:l,u=u?.constructor!==Array?[u]:u,n(i,...l)&&!n(i,...u)}function c(){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 y(i){let l=String(Object.getPrototypeOf(i)?.constructor);return l.slice(l.indexOf("ion")+3,l.indexOf("(")).trim()}function w(i){let l=i.set;return i.set=(u,d,v)=>d===Symbol.proxy?u[d]=v:l(u,d,v),i}function T(){let i=Proxy;return{native(){Proxy=i},custom(){Proxy=new i(i,{construct(l,u){for(let v of u)v.set&&(v=w(v));let d=new l(...u);return d[Symbol.proxy]=`Proxy (${y(u[0])})`,d}})}}}}var _=vt;function vt({styleSheet:t,createWithId:e}={}){let{tryParseAtOrNestedRules:r,ruleExists:n,checkParams:o,sheet:s,removeRules:f,consider:x,currentSheetID:b}=Et({styleSheet:t,createWithId:e});function L(m,c){if(m&&c.removeProperties){Object.keys(c.removeProperties).forEach(y=>m.style.removeProperty(Je(y)));return}Object.entries(c).forEach(([y,w])=>{y=Je(y.trim()),w=w.trim();let T;if(/!important/.test(w)&&(w=w.slice(0,w.indexOf("!important")).trim(),T="important"),!CSS.supports(y,w))return console.error(`StylingFactory ${b} error: '${y}' with value '${w}' not supported (yet)`);Qe(()=>m.style.setProperty(y,w,T),`StylingFactory ${b} (setRule4Selector) failed`)})}function p(m,c,y=s){if(m=m?.trim?.(),!te(m,String)||!m.length||/[;,]$/g.test(m))return console.error(`StylingFactory ${b} (setRules): [${m||"[no selector given]"}] is not a valid selector`);if(c.removeRule)return f(m);let w=n(m,!0),T=w||y.cssRules[y.insertRule(`${m} {}`,y.cssRules.length||0)];return x(()=>L(T,c),m,w)}function h(m){let c=m.trim().split(/{/,2),y=c.shift().trim();if(!te(y,String)||!y?.trim()?.length)return console.error(`StylingFactory ${b} (doParse): no (valid) selector could be extracted from rule ${we(m)}`);let w=Dt(c.shift());return Qe(()=>p(y,w),`StylingFactory ${b} (setRules) failed`)}function g(m){let c=r(m);return c.done?c.existing:h(m)}function S(m,c){return m.trim().startsWith("@media")?g(Ft(m,c)):p(m,c)}return function(m,c={}){return o(m,c)&&(Object.keys(c).length?S(m,c):g(m))}}function Et({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(g){let S=document.querySelector(`#${g}`)?.sheet;if(S)return S;let m=Object.assign(document.createElement("style"),{id:g});return document.head.insertAdjacentElement("beforeend",m),m.sheet}function s(g){return console.error(`StylingFactory ${n} [rule: ${g}]
3
+ => @charset, @namespace and @import are not supported here`),{done:!0}}function f(g,S){return[...t.rules].find(m=>S?Be(m.selectorText||"",g):At`${Lt(g)}${[..."gim"]}`.test(m.cssText))}function x(g){return/^@charset|@import|namespace/i.test(g.trim())?s(g):g.match(/}/g)?.length>1?{existing:p(g,1),done:!0}:{done:!1}}function b(g){let S=[...t.cssRules].reduce((c,y,w)=>Be(y.selectorText||"",g)&&c.concat(w)||c,[]),m=S.length;return S.forEach(c=>t.deleteRule(c)),m>0?console.info(`\u2714 Removed ${m} instance${m>1?"s":""} of selector ${g} from ${n.slice(4)}`):console.info(`\u2714 Remove rule: selector ${g} does not exist in ${n.slice(4)}`)}function L(g,S){return g&&te(g,String)&&g.trim().length>0&&te(S,Object)||(console.error(`StylingFactory ${n} called with invalid parameters`),!1)}function p(g){g=g.trim();let S=g.slice(0,g.indexOf("{")).trim(),m=!!f(S);try{return t.insertRule(`${g}`,t.cssRules.length),m}catch(c){return console.error(`StylingFactory ${n} (tryParse) ${c.name} Error:
4
+ ${c.message}
5
+ Rule: ${we(g)}
6
+ ${r}`),m}}function h(g,S,m){try{return g(),m}catch(c){return console.error(`StylingFactory ${n} (tryAddOrModify) ${c.name} Error:
7
+ ${c.message}
8
+ Rule: ${we(S)}
9
+ ${r}`),m}}return{sheet:t,removeRules:b,tryParseAtOrNestedRules:x,ruleExists:f,checkParams:L,tryParse:p,consider:h,currentSheetID:n}}function Ft(t,e){return`${t.trim()} ${Object.entries(e).map(([r,n])=>`${r}: { ${Ct(n)}`)}`}function we(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 Ct(t){return Object.entries(t).map(([e,r])=>`${e}: ${r.trim()}`).join(`;
10
+ `)}function Lt(t){return t.replace(/([*\[\]()-+{}.$?\\])/g,e=>`\\${e}`)}function At(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 Qe(t,e){try{return t()}catch(r){console.error(`${e||"an error occured"}: ${r.message}`)}}function Tt(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 $t(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 Dt(t){return $t(At(t))}function Be(t,e){return t?.replace("::",":")===e?.replace("::",":")}var we=!1,Ht={on:()=>we=!0,off:()=>we=!1},P={tagsRaw:V,allowUnknownHtmlTags:Ht,isAllowed(t){if(we)return!0;let e=a(t,String)?t.toLowerCase():t?.nodeName.toLowerCase()||"none";return e==="#text"||!!V[e]},allowTag:t=>V[t.toLowerCase()]=!0,prohibitTag:t=>V[t.toLowerCase()]=!1};var Nt=!0,ne={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 Pt(t){if(Nt&&Object.keys(t.removed).length){let e=Object.entries(t.removed).reduce((r,[n,o])=>[...r,`${O(n)} => ${o}`],[]).join("\\000A");L.error(`JQx: HTML creation error(s): ${e}`)}}function Mt(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(),x=s.value.trim().toLowerCase().replace(ne.whiteSpace,""),b=u==="href"?!ne.validURL.test(x):ne.notAllowedValues.test(x),C=u.startsWith("data")?!ne.data.test(u):!!o[u];if(b||C){let g=oe(s.value||"none",60);g+=g.length===60?"...":"",e.removed[`${s.name}`]=`attribute/property/value not allowed, removed. Value: ${g}`,r.removeAttribute(s.name)}})}if(!(Mt(r)||r.constructor===CharacterData||r.constructor===Comment)){let o=(r?.outerHTML||r?.textContent).trim(),s=oe(o,60)??"EMPTY";s+=s.length===60?"...":"",e.removed[`<${r.nodeName?.toLowerCase()}>`]=`not allowed, not rendered. Value: ${s}`,r.remove()}}),Pt(e),t}function Ot(t){let e=document.createElement("div");return e.insertAdjacentHTML(T.end,t),e.childNodes.length?Q(e):void 0}function It(t,e,r){switch(!0){case a(t,Comment):return e.insertAdjacentHTML(r,`<!--${t.data}-->`);case a(t,Text):return e.insertAdjacentText(r,t.data||t.textContent);default:return}}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)&&Rt(o,e,r);return s?[...n,s]:n},[])}function Rt(t,e=document.body,r=T.BeforeEnd){return r=r||T.BeforeEnd,e=e?.isJQx?e?.[0]:e,a(t,Comment,Text)?It(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||a(e,String)&&!/^<(.+)[^>]+>/m.test(e))return document.createTextNode(r??e);let n=Ot(t);return n.childNodes.length<1?H(`<span data-jqxcreationerror="1">${W(t,60)}</span>`):n.children[0]}function ie(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(...Oe);let e=[],[r,n]=[t("#jqxPopupContent"),t.node("#jqxPopup")],o={};return t.handle({type:"click, keydown",handlers:p,capture:!0,about:"A generic handler for JQx popups"}),Object.freeze({show:s,remove:u,removeModal:h});function s(f){if(n.open)switch(!0){case x(f):return;default:return u(),setTimeout(()=>s(f),200)}o={...f};let{content:y}=o;return t.IS(y,String,HTMLElement)||y?.isJQx?b():!0}function u(){return o.modal?m(o.warnMessage):C()}function x(f){for(let[y,v]of Object.entries(o))if(v!==f[y])return!1;return!0}function b(){r.clear();let{content:f,modal:y,closeAfter:v}=o;y=t.IS(y,Boolean)?y:!1;let A=y?"":t.div({id:"closeHandleIcon"});r.append(A,t.IS(f,String)?t.div(f):f),n.showModal(),!y&&t.IS(v,Number)&&S(u,v)}function C(){if(n.close(o.returnValue),g(),t.IS(o.callback,Function))return e.push(setTimeout(()=>o.callback(o.returnValue),200));o={}}function g(){e.forEach(f=>clearTimeout(f)),e=[]}function h({callback:f,value:y}={}){o.returnValue=y,o.modal=!1,o.callback=f||o.callback,u()}function p({evt:f}){if(!(Object.keys(o).length<1||!n.open||f.type==="keydown"&&f.key!=="Escape")&&(f.key==="Escape"&&o.modal&&f.preventDefault(),f.target.closest("#closeHandleIcon")||!f.target.closest("#jqxPopupContent")))return o.activeTimer&&clearTimeout(o.activeTimer),u()}function S(f,y){t.IS(f,Function)&&t.IS(y,Number)&&y>0&&(g(),e.push(setTimeout(f,y*1e3)))}function m(f){if(!t.IS(f,String,HTMLElement,Proxy))return;let y=r.find$(".warn");switch(!0){case y.is.empty:y=t.div({class:"warn"},f);default:r.append(y.addClass("active")),S(()=>r.find$(".warn").removeClass("active"),2)}}}function le(t){let e={},r="anonymous_";function n(g){if(g){let{handler:h,capture:p,type:S}=g;document.addEventListener(S,h,{capture:p})}}function o(g){if(g){let{type:h,handler:p,capture:S}=g;document.removeEventListener(h,p,{capture:S})}}function s(g,h,p,S){return function(m){if(!F(h))return g({evt:m});let f=m.target.closest(h);if(f){let y=t(f);g({self:y,me:y,evt:m}),p&&b(m.type,S)}return!0}}function u(g){return e[g]=e[g]||{},e[g]}function x(g,h){return Object.entries(u(g)).find(([p])=>p===h)}function b(g,h){let p=x(g,h);p&&(o(p[1]),delete e[g][h],delete se[h],console.warn(`Removed listener [${h}] for event type [${g}].`))}function C(g){let{type:h,handler:p,name:S,capture:m,once:f,selector:y,node:v,about:A}=g;e[h]=e[h]||{};let i=Ee(S||p.name),l=p;if(v instanceof HTMLElement){let c=v.dataset.hid||i;v.dataset.hid=c,y=`[data-hid=${c}]`}switch(!0){case!e[h][i]:return e[h][i]={name:i,handler:s(p,y,f,i),capture:ze(h,m),once:!!f,type:h,initialHandler:l,selector:!!y&&y||!1,about:!!A&&A||!1,unListen(){b(h,i)}},e[h][i];default:return console.warn(`The listener [${i}] for [${h}] exists, it is not re-assigned.`)}}return{remove(...g){return b(...g)},listen:function(g){let{type:h,handler:p}=g;if(!F(h)||!a(p,Function))return;let S=C(g);if(S)return n(S),{type:h,name:S.name,unListen(){b(h,S.name)}}},get ListenerStore(){return Object.freeze({...e})}}}var L=Jt(),kt=["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]}})),jt=[...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}`)),Ce=Object.freeze({get(t,e){return t[Y(e)]||t[e]},enumerable:!1,configurable:!1}),se={};function Le(){let t=setTimeout(()=>{});for(;t>=0;)clearTimeout(t--)}function Ee(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 se[e]?We():(se[e]=e,e)}function ze(t,e){return!!kt.find(r=>r===t)||!!e}function ue(t){return t.startsWith("data")||z.html.find(e=>t.toLowerCase()===e)}function fe(t){return t&&(t.textContent="")}function G(t,e=0,r=!0){return t=t?.parentElement,e+=t?t[r?"scrollTop":"scrollLeft"]:0,t?G(t,e,r):e}function F(t,e=1){return e=a(e,Number)&&e||1,a(t,String)&&t.length>=e}function oe(t,e=120){return W(t,e).replace(/&lt;/g,"<")}function W(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 Fe(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(...u){return e.unshift(...u.map(x=>`${ce()} \u2A3B ${Fe(x)}`)),console.error(e.slice(0,u.length).join(`
14
- `)),r}function o(...u){return e.unshift(...u.map(x=>`${ce()} \u26A0 ${Fe(x)}`)),console.warn(e.slice(0,u.length).join(`
15
- `)),r}function s(...u){switch(e.unshift(...u.map(x=>`${ce()} \u2714 ${Fe(x)}`)),t){case!0:console.log(e.slice(0,u.length).join(`
16
- `));default:return r}}return Object.defineProperties(r,{log:{value:s,enumerable:!1},error:{value:n,enumerable:!1},warn:{value:o,enumerable:!1}}),Object.freeze(r)}function ce(){return(t=>`[${ae(t.getHours())}:${ae(t.getMinutes())}:${ae(t.getSeconds())}.${ae(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 de(t,n);a(n,String)&&ue(r)&&t.setAttribute(r,n.split(/[, ]/)?.join(" "))}}function de(t,e){if(t&&a(e,Object))for(let[r,n]of Object.entries(e))t.setAttribute(`data-${N(r)}`,n)}function me(t){return t?a(t,Proxy)?[t.EL]:a(t,NodeList)?[...t]:M(t)?[t]:K(t)?t:t.isJQx?t.collection:void 0:[]}function ge(t,e){return t.andThen(e)}function pe(t,e){return t.andThen(e,!0)}function M(t){return a(t,Text,HTMLElement,Comment)}function Z(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.hidden,u=t.offsetTop<0||t.offsetLeft+t.offsetWidth<0||t.offsetLeft>document.body.offsetWidth,x=+r.opacity==0||+(e.opacity||1)==0;return!(s||u||x||o||n)}function _e(t){return t?.isConnected?!![...document.querySelectorAll(":is(:read-write)")].find(e=>e===t):!1}function Ue(t){return t?.filter(e=>e).reduce((e,r)=>e.concat(De(r)?`<!--${r.data}-->`:he(r)?r.textContent:r.outerHTML),"")}function ae(t,e=2){return`${t}`.padStart(e,"0")}function Ge(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 ye(){return`_${Qt(jt).slice(0,8).join("")}`}function Ae(t){return t=a(t,String)&&/,/.test(t)?t.split(",").map(e=>e.trim().toLowerCase()).filter(e=>e.length>0):t,a(t,Array)?t:a(t,String)&&t?.trim().toLowerCase()||""}function Ze(t){return t?.isConnected?!![...document.querySelectorAll(":is(:modal)")].find(e=>e===t):!1}function $e(t,e){switch(t=String(t).trim(),!0){case/^(0|false|f)$/i.test(t):return!1;case/^(1|true|t)$/i.test(t):return!0;default:return e}}function Qt(t){let e=t.length;for(;e--;){let r=Ge(e);[t[e],t[r]]=[t[r],t[e]]}return t}function Y(t){return a(t,String)?t.toLowerCase().split("-").map((e,r)=>r&&`${Bt(e)}`||e).join(""):t}function N(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/^-|-$/,"")}function Bt([t,...e]){return`${t.toUpperCase()}${e.join("")}`}function he(t){return a(t,Comment,Text)}function De(t){a(t,Comment)}function Ye(t){return a(t,Text)}function X(t){return a(t,String)&&/^<|>$/.test(`${t}`.trim())}function K(t){return a(t,Array)&&!t?.find(e=>!M(e))}function be(t){return a(t,Array)&&!t?.find(e=>!X(e))}function E(t,e){let r=t.collection.filter(n=>!he(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 zt(t){let e=`anonymous_${Math.random().toString(36).slice(2)}`;return t.data.add({hid:e}),`[data-hid="${e}"]`}function Xe(){return{isCommentOrTextNode:he,isNode:M,isComment:De,isText:Ye,isHtmlString:X,isArrayOfHtmlElements:K,isArrayOfHtmlStrings:be,ElemArray2HtmlString:Ue,input2Collection:me,setCollectionFromCssSelector:He,addHandlerId:zt,cssRuleEdit:U({createWithId:"JQxStylesheet"})}}function Ke(){let e=Object.freeze({notInDOM:"n/a",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 Ze(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 qe(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-${ye().slice(1)}`,n.editCssRule(`.${o}`,e),t.classList.add(o)}var Wt=Ke();function et(t){return{factoryExtensions:Vt(t),instanceExtensions:_t(t)}}function Vt(t){return{data(e){return{get all(){return new Proxy(e[0]?.dataset??{},Ce)},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){return 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){return e[0]?.removeAttribute(`data-${N(r)}`),e}}},dimensions(e){if(e.is.empty)return L.error("[JQx instance].dimensions called on empty instance"),{error:"[JQx instance].dimensions: NO ELEMENTS"};let{node:r}=e,n=r.getBoundingClientRect().toJSON();return n.scrollTopDistance=G(r,0),n.scrollLeftDistance=G(r,0,!1),n},node(e){return e[0]},HTML(e){return{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){return e.HTML.set(r,!1,n)},append(r,n=!1){return 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){return 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){return Wt(e)},length(e){return e.collection.length},outerHtml(e){return(e.first()||{outerHTML:void 0}).outerHTML},parent(e){let r=t(e[0]?.parentNode);return r.is.empty?e:r},render(e){switch(!0){case!e.is.empty:return e.toDOM();default:return t.logger.warn("[JQx.render]: empty collection"),e}},Style(e){return{get computed(){return e.is.empty?{}:getComputedStyle(e[0])},inline(r){return e.style(r)},inSheet(r){return e.css(r)},valueOf(r){return e.is.empty?void 0:getComputedStyle(e[0])[N(r)]},nwRule(r){return 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 _t(t){return{addClass(e,...r){return E(e,n=>n&&r.forEach(o=>n.classList.add(o)))},after:ge,afterMe:ge,andThen(e,r,n=!1){if(!r||!a(r,String,Node,Proxy))return L.log("[JQx instance].[before(Me) | after(Me) | andThen]: invalid/-sufficient input."),e;r=r?.isJQx?r:a(r,Node)?t.virtual(r):t.virtual(H(r));let[o,s,u]=n?[0,"before",r.collection.concat(e.collection)]:[e.collection.length-1,"after",e.collection.concat(r.collection)];return e[o][s](...r.collection),e.collection=u,e},append(e,...r){if(e.is.empty||r.length<1)return e;let n=e.length===1;for(let o of r){if(!o.isJQx&&F(o)){let s=o.trim(),x=!/^<(.+)[^>]+>$/m.test(s)?t.text(o):H(o);E(e,b=>b.append(n?x:I(x)))}M(o)&&E(e,s=>s.append(n?o:I(o))),o.isJQx&&!o.is.empty&&E(e,s=>o.collection.forEach(u=>s.append(n?u:I(u))))}return e},appendTo(e,r){switch(!0){case(!r.isJQx&&!a(r,HTMLElement)):return $.warn("[JQx instance].appendTo: invalid input"),e;default:return(r.isJQx?r:t(r)).append(e),e}},attr(e,r,n){if(!e.node)return e;if(!n&&F(r))return r=N(r),r==="class"?[...e.node.classList].join(" "):e.node.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(e.node,r),e},before:pe,beforeMe:pe,clear(e){return E(e,fe)},closest(e,r){let n=F(r)?e.node?.closest(r):void 0;return n?t(n):e},computedStyle(e,r){let{node:n}=e;return n&&getComputedStyle(n)[r]},css(e,r,n){return E(e,o=>qe(o,r,n,t))},duplicate(e,r=!1,n=document.body){switch(!0){case e.is.empty:return L.error("Duplicating an empty JQx instance is not possible"),e;default: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)}},each(e,r){return E(e,r)},empty(e){return E(e,fe)},find(e,r){return e.collection.length>0?[...e.first()?.querySelectorAll(r)]:[]},find$(e,r){return e.collection.length>0?t(r,e):e},first(e,r=!1){return e.collection.length>0?r?e.single():e.collection[0]:void 0},first$(e,r){return e.single(r)},getData(e,r,n){return e.node?.dataset?.[r]||n},hasClass(e,...r){return e.is.empty||!e.node.classList.length?!1:r.find(n=>e.node.classList.contains(n))&&!0||!1},hide(e){return E(e,r=>Z(r,{display:"none !important"}))},html(e,r,n){switch(!0){case(e.is.empty&&!F(r)):return"";case!F(r):return e.node?.getHTML()??"";default:let o=H(`<div>${r.isJQx?r.HTML.get(!0):r}</div>`);return E(e,u=>(u.textContent=n?u.textContent:"",u.insertAdjacentHTML(t.at.end,o.getHTML())))}},htmlFor(e,r,n="",o=!1){if(e.is.empty||!F(r)||!F(n))return e;let s=e.find$(r);if(s.length<1)return e;let u=H(`<span>${n}</span>`);return s.each(x=>{o||(x.textContent=""),x.insertAdjacentHTML(t.at.end,u?.getHTML())}),e},isEmpty(e){return!e.node},nth$(e,r){return e.single(r)},on(e,r,...n){switch(!0){case(e.is.empty||!a(r,String,Array)||!F(r)||n.length<1):return e;default:return t.handle({type:r,node:e.node,handler:n}),e}},once(e,r,...n){switch(!0){case(e.is.empty||!a(r,String,Array)||!F(r)||n.length<1):return e;default:return t.handle({type:r,once:!0,node:e.node,handler:n}),e}},prepend(e,...r){if(e.is.empty||!r)return;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),E(e,x=>x.prepend(u.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,u=>s.prepend(n?u:I(u)))),o.collection.reverse())}return e},prependTo(e,r){return 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&&!ue(s)||!u)return!1;if(s.toLowerCase()==="id")return e[0].id=u;E(e,b=>{if(s.startsWith("data"))return b.dataset[s.slice(s.indexOf("-")+1)]=u;b[s]=u})}return e},remove(e,r){L.log(`remove ${W(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){return E(e,n=>{if(n)for(let o of r)n.classList.remove(o)})},renderTo(e,r,n){return r=a(r,HTMLElement)||r.isJQx?r:document.body,n=a(n,String)&&t.at[n]?n:t.at.end,e.first$().toDOM(r,n),e},replace(e,r,n){let o=e.node;return!r||!a(n,HTMLElement)&&!n?.isJQx?(t.logger.error("JQx replace: invalid replacement value"),e):((n.isJQx||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){return E(e,o=>{o.classList.remove(r);for(let s of n)o.classList.add(s)})},replaceMe(e,r){return e.replaceWith(r)},replaceWith(e,r){return r=a(r,Element)?r:r.isJQx?r[0]:void 0,r&&(e[0].replaceWith(r),e=t.virtual(r)),e},setData(e,r){return E(e,n=>de(n,r))},show(e){return E(e,r=>Z(r,{display:"revert-layer !important"}))},single(e,r){let n=e.collection.length>0;switch(r=r??0,!0){case(n&&a(r,String)):return e.find$(r);case(n&&a(r,Number)):return t(e.collection[r]);case n:return e.collection[0];default:return e}},style(e,r,n){return E(e,s=>{n&&a(r,String)&&(r={[r]:n||"none"}),Z(s,r)})},text(e,r,n=!1){switch(!0){case e.isEmpty():return e;case!a(r,String):return e.node.textContent;default:return E(e,o=>o.textContent=n?o.textContent+r:r)}},toDOM(e,r=document.body,n=T.BeforeEnd){return e.isVirtual=!1,B(e.collection,r,n),e},toggleClass(e,r){return E(e,n=>n.classList.toggle(r))},toNodeList(e){return[...e.collection].map(r=>document.importNode(r,!0))},trigger(e,r,n,o){if(n=/Event\]$/.test(a(n))?n:Event,o=a(o,Object)?{...o,bubbles:o.bubbles??!0}:{bubbles:!0},!e.is.empty){let s=new n(r,o);e.each(u=>u.dispatchEvent(s))}return e},val(e,r){switch(!0){case(e.is.empty||!a(e.node,HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement)):return e;case!a(r,String):return e.node.value;default:return e.node.value=a(r,String)?r:"",e}}}}var Ne,Se,{isComment:Kr,isText:qr,isHtmlString:en,isArrayOfHtmlElements:tn,isArrayOfHtmlStrings:rn,ElemArray2HtmlString:nn,addHandlerId:on,cssRuleEdit:Pe,addFn:Ut}=Gt();function Gt(){return{...Xe(),addFn:Zt}}function Zt(t,e){return t=t?.trim(),!F(t)||!a(e,Function)?L.error("JQx.fn: method invalid parameter(s)"):Se[t]=(r,...n)=>e(r,...n)}function Yt(t){return function(e,r,n){if(e=e?.trim(),!F(e)||!a(r,Function))return t.error("JQx.staticFn: invalid parameter(s)");let o=n?{get(){return r()}}:{value(...s){return r(...s)}};try{Object.defineProperty(t,e,o)}catch{return t.warn(`JQx.staticFn: extension [${e}] already exists`)}return L.log(`JQx: added static extension function [${e}]`)}}function q(t){return new Proxy(t,Object.freeze({get:(e,r)=>Xt(e,r,t)}))}function tt(t,e){return(...r)=>a(t,Function)&&t(q(e),...r)}function Xt(t,e,r){switch(!0){case a(e,Symbol):return t;case a(+e,Number):return t.collection?.[e]||void 0;case e in Ne:return tt(Ne[e],r)();case e in Se:return tt(Se[e],r);default:return t[e]}}function ot(t){let e=rr(t);for(let[r,n]of Object.entries(Object.getOwnPropertyDescriptors(e)))Object.defineProperty(t,r,n);return t}function Kt(t){return{allow(e){let r=/-/.test(e),n=r&&e;e=r?Y(e):e.toLowerCase(),P.allowTag(e),a(t[e],Function)||Object.defineProperties(t,Me(e,!0,t,n))},prohibit(e){e=e.toLowerCase(),P.prohibitTag(e),a(t[e],Function)&&Object.defineProperties(t,Me(e,!1,t))}}}function rt(...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))Pe(e,{removeRule:1})}function qt(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 er(...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 tr(t,e,r,n){return t=N(n||t.toLowerCase()),{get(){return(...o)=>(L.log(e?`JQx: created (virtual) instance from [JQx].${t}`:`Could not create instance from [JQx].${t}`),e&&r.virtual(Q(te[t](...o))))},enumerable:!1,configurable:!0}}function Me(t,e,r,n){t=t.toLowerCase();let o=tr(t,e,r,n);return n?{[n]:o,[Y(n)]:o}:{[t]:o,[t.toUpperCase()]:o}}function rr(t){return er(Object.entries(P.tagsRaw).reduce(nr(t),{}),cr(t))}function nr(t){return function(e,[r,n]){return n&&Object.defineProperties(e,Me(r,n,t)),e}}function or(t){return function(e,r,...n){a(r,Function)&&(n.push(r),r=void 0),t({type:e,selector:r,handlers:n})}}function ir(t){return function(e){let{type:r,types:n,origin:o,selector:s,handler:u,handlers:x,node:b,name:C,capture:g,once:h,about:p}=e;u=x||u,r=n||r,s=o||s;let S=Ae(r),m=C;u=a(u,Function)?[u]:u;let f={type:S,selector:s||o,capture:g,name:m,once:h,node:b,about:p};switch(!0){case(a(S,Array)&&S.length>0):for(let y of S)f.type=y,nt(u,f,t);break;default:return nt(u,f,t)}}}function nt(t,e,r){for(let n of t)r.listen({...e,handler:n})}function lr(t){return function(e,r){return r=F(r)&&r,e=F(e)&&e,r&&e&&t.listenerStore[e][r]}}function sr(t){return t.activePopup||Object.defineProperty(t,"activePopup",{value:ie(t),enumerable:!1}),t.activePopup}function ar(t){let e=(g,h)=>Pe(g,h),r=function(g){return U({createWithId:g||`jqx${ye()}`})},n=function(...g){for(let h of g)Pe(h)},o=Kt(t),s=le(t),u=ir(s);return{editCssRule:e,createStyle:r,editCssRules:n,allowProhibit:o,handle:u,capturedHandling:u,log:(...g)=>L.on.log(...g).off,warn:(...g)=>L.on.warn(...g).off,error:(...g)=>L.on.error(...g).off,handlerWrapper:s}}function cr(t){let{factoryExtensions:e,instanceExtensions:r}=et(t);Ne=e,Se=r;let{editCssRule:n,createStyle:o,editCssRules:s,allowProhibit:u,handle:x,capturedHandling:b,log:C,warn:g,error:h,handlerWrapper:p}=ar(t),S=lr(t),m=Yt(t);return{log:C,warn:g,error:h,editCssRules:s,createStyle:o,editStylesheet:o,editCssRule:n,escHtml:O,logger:L,text(f,y=!1){return y?t.comment(f):document.createTextNode(f)},node(f,y=document){return y.querySelector(f,y)},nodes(f,y=document){return[...y.querySelectorAll(f,y)]},clearAllTimers:Le,get staticFn(){return function(f,y,v){return m(f,y,v)}},get toBool(){return $e},get getNamedListener(){return S},get virtual(){return qt(t)},get allowTag(){return u.allow},get prohibitTag(){return u.prohibit},get removeCssRule(){return rt},get removeCssRules(){return rt},get delegate(){return or(b)},get delegateCaptured(){return b},get handle(){return b},get listen(){return p.listen},get at(){return T},get setStyle(){return n},get fn(){return Ut},get lenient(){return P.allowUnknownHtmlTags},get IS(){return a},get Popup(){return sr(t)},get listenerStore(){return p.ListenerStore}}}var it=ot(ur());function ur(){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(h=>n===h)?n:void 0;let s=X(e),x=!s&&be(e)||s,b={collection:me(e)??[],isVirtual:o,isJQx:!0},C=K(b.collection);if(b.collection.length&&C)return o||b.collection.forEach(h=>{r.contains(h)||B([h],r,n)}),q(b);if(x){if([e].flat().forEach(h=>b.collection.push(H(h))),b.collection.length>0){let h=b.collection.filter(S=>S?.dataset?.jqxcreationerror);b.collection=b.collection.filter(S=>!S?.dataset?.jqxcreationerror);let p=b.collection.length?b.collection.map(S=>`${String(S.constructor).split(/function|\(/)[1].trim()}`).join(" | "):"sanitized: no elements remaining";L.log(`JQx: created ${b.isVirtual?"(virtual)":""} instance from HTML string ([${p}])`),b.isVirtual||B(b.collection,r,n)}return q(b)}let g=He(e,r,b);return e!==null&&L.log(`JQx: input => ${g}`),q(b)}}var fn=it;export{fn as default};
13
+ `)}function $t(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 Dt(t){return $t(Tt(t))}function Be(t,e){return t?.replace("::",":")===e?.replace("::",":")}var ve=!1,Ht={on:()=>ve=!0,off:()=>ve=!1},P={tagsRaw:W,allowUnknownHtmlTags:Ht,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 Nt=!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 Pt(t){if(Nt&&Object.keys(t.removed).length){let e=Object.entries(t.removed).reduce((r,[n,o])=>[...r,`${O(n)} => ${o}`],[]).join("\\000A");F.error(`JQx: HTML creation error(s): ${e}`)}}function Mt(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 f=s.name.trim().toLowerCase(),x=s.value.trim().toLowerCase().replace(re.whiteSpace,""),b=f==="href"?!re.validURL.test(x):re.notAllowedValues.test(x),L=f.startsWith("data")?!re.data.test(f):!!o[f];if(b||L){let p=ne(s.value||"none",60);p+=p.length===60?"...":"",e.removed[`${s.name}`]=`attribute/property/value not allowed, removed. Value: ${p}`,r.removeAttribute(s.name)}})}if(!(Mt(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()}}),Pt(e),t}function Ot(t){let e=document.createElement("div");return e.insertAdjacentHTML(A.end,t),e.childNodes.length?Q(e):void 0}function It(t,e,r){switch(!0){case a(t,Comment):return e.insertAdjacentHTML(r,`<!--${t.data}-->`);case a(t,Text):return e.insertAdjacentText(r,t.data||t.textContent);default:return}}function B(t=[],e=document.body,r=A.BeforeEnd){return r=r||A.BeforeEnd,e=e?.isJQx?e.node:e||document.body,t.reduce((n,o)=>{let s=M(o)&&Rt(o,e,r);return s?[...n,s]:n},[])}function Rt(t,e=document.body,r=A.BeforeEnd){return r=r||A.BeforeEnd,e=e?.isJQx?e?.[0]:e,a(t,Comment,Text)?It(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||a(e,String)&&!/^<(.+)[^>]+>/m.test(e))return document.createTextNode(r??e);let n=Ot(t);return n.childNodes.length<1?H(`<span data-jqxcreationerror="1">${oe(t,60)}</span>`):n.children[0]}function ie(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(...Oe);let e=[],[r,n]=[t("#jqxPopupContent"),t.node("#jqxPopup")],o={};return t.handle({type:"click, keydown",handlers:g,capture:!0,about:"A generic handler for JQx popups"}),Object.freeze({show:s,remove:f,removeModal:h});function s(c){if(n.open)switch(!0){case x(c):return;default:return f(),setTimeout(()=>s(c),200)}o={...c};let{content:y}=o;return t.IS(y,String,HTMLElement)||y?.isJQx?b():!0}function f(){return o.modal?m(o.warnMessage):L()}function x(c){for(let[y,w]of Object.entries(o))if(w!==c[y])return!1;return!0}function b(){r.clear();let{content:c,modal:y,closeAfter:w}=o;y=t.IS(y,Boolean)?y:!1;let T=y?"":t.div({id:"closeHandleIcon"});r.append(T,t.IS(c,String)?t.div(c):c),n.showModal(),!y&&t.IS(w,Number)&&S(f,w)}function L(){if(n.close(o.returnValue),p(),t.IS(o.callback,Function))return e.push(setTimeout(()=>o.callback(o.returnValue),200));o={}}function p(){e.forEach(c=>clearTimeout(c)),e=[]}function h({callback:c,value:y}={}){o.returnValue=y,o.modal=!1,o.callback=c||o.callback,f()}function g({evt:c}){if(!(Object.keys(o).length<1||!n.open||c.type==="keydown"&&c.key!=="Escape")&&(c.key==="Escape"&&o.modal&&c.preventDefault(),c.target.closest("#closeHandleIcon")||!c.target.closest("#jqxPopupContent")))return o.activeTimer&&clearTimeout(o.activeTimer),f()}function S(c,y){t.IS(c,Function)&&t.IS(y,Number)&&y>0&&(p(),e.push(setTimeout(c,y*1e3)))}function m(c){if(!t.IS(c,String,HTMLElement,Proxy))return;let y=r.find$(".warn");switch(!0){case y.is.empty:y=t.div({class:"warn"},c);default:r.append(y.addClass("active")),S(()=>r.find$(".warn").removeClass("active"),2)}}}function le(t){let e={},r="anonymous_";function n(p){if(p){let{handler:h,capture:g,type:S}=p;document.addEventListener(S,h,{capture:g})}}function o(p){if(p){let{type:h,handler:g,capture:S}=p;document.removeEventListener(h,g,{capture:S})}}function s(p,h,g,S){return function(m){if(!C(h))return p({evt:m});let c=m.target.closest(h);if(c){let y=t(c);p({self:y,me:y,evt:m}),g&&b(m.type,S)}return!0}}function f(p){return e[p]=e[p]||{},e[p]}function x(p,h){return Object.entries(f(p)).find(([g])=>g===h)}function b(p,h){let g=x(p,h);g&&(o(g[1]),delete e[p][h],delete se[h],F.warn(`Removed listener [${h}] for event type [${p}].`))}function L(p){let{type:h,handler:g,name:S,capture:m,once:c,selector:y,node:w,about:T}=p;e[h]=e[h]||{};let i=Ee(S||g.name),l=g;if(w instanceof HTMLElement){let u=w.dataset.hid||i;w.dataset.hid=u,y=`[data-hid=${u}]`}switch(!0){case!e[h][i]:return F.log(`JQx: created listener for event type ${h}, with handler name ${i}`),e[h][i]={name:i,handler:s(g,y,c,i),capture:ze(h,m),once:!!c,type:h,initialHandler:l,selector:!!y&&y||!1,about:!!T&&T||!1,unListen(){b(h,i)}},e[h][i];default:return console.warn(`The listener [${i}] for [${h}] exists, it is not re-assigned.`)}}return{remove(...p){return b(...p)},listen:function(p){let{type:h,handler:g}=p;if(!C(h)||!a(g,Function))return;let S=L(p);if(S)return n(S),{type:h,name:S.name,unListen(){b(h,S.name)}}},get ListenerStore(){return Object.freeze({...e})}}}var F=Jt(),kt=["load","unload","scroll","focus","blur","DOMNodeRemovedFromDocument","DOMNodeInsertedIntoDocument","loadstart","progress","error","abort","load","loadend","pointerenter","pointerleave","readystatechange"],A=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]}})),jt=[...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}`)),Ce=Object.freeze({get(t,e){return t[Z(e)]||t[e]},enumerable:!1,configurable:!1}),se={};function Le(){let t=setTimeout(()=>{});for(;t>=0;)clearTimeout(t--)}function Ee(t){return C(t)&&!/^handler|handlers$/gi.test(t.trim())?t.trim():We()}function We(t){let e=`anonymous_${Math.random().toString(36).slice(2)}`;return se[e]?We():(se[e]=e,e)}function ze(t,e){return!!kt.find(r=>r===t)||!!e}function ue(t){return t.startsWith("data")||z.html.find(e=>t.toLowerCase()===e)}function fe(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 C(t,e=1){return e=a(e,Number)&&e||1,a(t,String)&&t.length>=e}function ne(t,e=120){return oe(t,e).replace(/&lt;/g,"<")}function oe(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 Fe(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(...f){return e.unshift(...f.map(x=>`${ce()} \u2A3B ${Fe(x)}`)),console.error(e.slice(0,f.length).join(`
14
+ `)),r}function o(...f){return e.unshift(...f.map(x=>`${ce()} \u26A0 ${Fe(x)}`)),console.warn(e.slice(0,f.length).join(`
15
+ `)),r}function s(...f){switch(e.unshift(...f.map(x=>`${ce()} \u2714 ${Fe(x)}`)),t){case!0:console.log(e.slice(0,f.length).join(`
16
+ `));default:return r}}return Object.defineProperties(r,{log:{value:s,enumerable:!1},error:{value:n,enumerable:!1},warn:{value:o,enumerable:!1}}),Object.freeze(r)}function ce(){return(t=>`[${ae(t.getHours())}:${ae(t.getMinutes())}:${ae(t.getSeconds())}.${ae(t.getMilliseconds(),3)}]`)(new Date)}function Ae(t,e){if(t)for(let[r,n]of Object.entries(e)){if(r=N(r),r.startsWith("data"))return de(t,n);a(n,String)&&ue(r)&&t.setAttribute(r,n.split(/[, ]/)?.join(" "))}}function de(t,e){if(t&&a(e,Object))for(let[r,n]of Object.entries(e))t.setAttribute(`data-${N(r)}`,n)}function me(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 ge(t,e){return t.andThen(e)}function pe(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.hidden,f=t.offsetTop<0||t.offsetLeft+t.offsetWidth<0||t.offsetLeft>document.body.offsetWidth,x=+r.opacity==0||+(e.opacity||1)==0;return!(s||f||x||o||n)}function _e(t){return t?.isConnected?!![...document.querySelectorAll(":is(:read-write)")].find(e=>e===t):!1}function Ue(t){return t?.filter(e=>e).reduce((e,r)=>e.concat(De(r)?`<!--${r.data}-->`:he(r)?r.textContent:r.outerHTML),"")}function ae(t,e=2){return`${t}`.padStart(e,"0")}function Ge(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 ye(){return`_${Qt(jt).slice(0,8).join("")}`}function Te(t){return t=a(t,String)&&/,/.test(t)?t.split(",").map(e=>e.trim().toLowerCase()).filter(e=>e.length>0):t,a(t,Array)?t:a(t,String)&&t?.trim().toLowerCase()||""}function Ze(t){return t?.isConnected?!![...document.querySelectorAll(":is(:modal)")].find(e=>e===t):!1}function $e(t,e){switch(t=String(t).trim(),!0){case/^(0|false|f)$/i.test(t):return!1;case/^(1|true|t)$/i.test(t):return!0;default:return e}}function Qt(t){let e=t.length;for(;e--;){let r=Ge(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&&`${Bt(e)}`||e).join(""):t}function N(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/^-|-$/,"")}function Bt([t,...e]){return`${t.toUpperCase()}${e.join("")}`}function he(t){return a(t,Comment,Text)}function De(t){a(t,Comment)}function Ye(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 be(t){return a(t,Array)&&!t?.find(e=>!Y(e))}function E(t,e){let r=t.collection.filter(n=>!he(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=`JQx: Invalid CSS querySelector. [${a(t,String)?t:"Not a string!"}]`}let s=r.collection.length;return s<1?`CSS querySelector "${t}", output: nothing`:o??`CSS querySelector "${t}", output ${s} element${s>1?"s":""}`}function Xe(){return{isCommentOrTextNode:he,isNode:M,isComment:De,isText:Ye,isHtmlString:Y,isArrayOfHtmlElements:X,isArrayOfHtmlStrings:be,ElemArray2HtmlString:Ue,input2Collection:me,setCollectionFromCssSelector:He,cssRuleEdit:_({createWithId:"JQxStylesheet"})}}function Ke(){let e=Object.freeze({notInDOM:"n/a",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 Ze(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 qe(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(f=>f.startsWith("JQxClass-")||o&&f===o)||o||`JQxClass-${ye().slice(1)}`,n.editCssRule(`.${o}`,e),t.classList.add(o)}var zt=Ke();function et(t){return{factoryExtensions:Wt(t),instanceExtensions:Vt(t)}}function Wt(t){return{data(e){return{get all(){return new Proxy(e[0]?.dataset??{},Ce)},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){return 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){return e[0]?.removeAttribute(`data-${N(r)}`),e}}},dimensions(e){if(e.is.empty)return F.error("[JQx instance].dimensions called on empty instance"),{error:"[JQx instance].dimensions: NO ELEMENTS"};let{node:r}=e,n=r.getBoundingClientRect().toJSON();return n.scrollTopDistance=U(r,0),n.scrollLeftDistance=U(r,0,!1),n},node(e){return e[0]},HTML(e){return{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){return e.HTML.set(r,!1,n)},append(r,n=!1){return 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){return 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){return zt(e)},length(e){return e.collection.length},outerHtml(e){return(e.first()||{outerHTML:void 0}).outerHTML},parent(e){let r=t(e[0]?.parentNode);return r.is.empty?e:r},render(e){switch(!0){case!e.is.empty:return e.toDOM();default:return t.logger.warn("[JQx.render]: empty collection"),e}},Style(e){return{get computed(){return e.is.empty?{}:getComputedStyle(e[0])},inline(r){return e.style(r)},inSheet(r){return e.css(r)},valueOf(r){return e.is.empty?void 0:getComputedStyle(e[0])[N(r)]},nwRule(r){return 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 f of r)e.addClass(f);return s?.startsWith(".")&&e.addClass(s.slice(1)),s?.startsWith("#")&&!e.attr("id")&&e.prop({id:s.slice(1)}),e}}}}}function Vt(t){return{addClass(e,...r){return E(e,n=>n&&r.forEach(o=>n.classList.add(o)))},after:ge,afterMe:ge,andThen(e,r,n=!1){if(!r||!a(r,String,Node,Proxy))return F.log("[JQx instance].[before(Me) | after(Me) | andThen]: invalid/-sufficient input."),e;r=r?.isJQx?r:a(r,Node)?t.virtual(r):t.virtual(H(r));let[o,s,f]=n?[0,"before",r.collection.concat(e.collection)]:[e.collection.length-1,"after",e.collection.concat(r.collection)];return e[o][s](...r.collection),e.collection=f,e},append(e,...r){if(e.is.empty||r.length<1)return e;let n=e.length===1;for(let o of r){if(!o.isJQx&&C(o)){let s=o.trim(),x=!/^<(.+)[^>]+>$/m.test(s)?t.text(o):H(o);E(e,b=>b.append(n?x:I(x)))}M(o)&&E(e,s=>s.append(n?o:I(o))),o.isJQx&&!o.is.empty&&E(e,s=>o.collection.forEach(f=>s.append(n?f:I(f))))}return e},appendTo(e,r){switch(!0){case(!r.isJQx&&!a(r,HTMLElement)):return $.warn("[JQx instance].appendTo: invalid input"),e;default:return(r.isJQx?r:t(r)).append(e),e}},attr(e,r,n){if(!e.node)return e;if(!n&&C(r))return r=N(r),r==="class"?[...e.node.classList].join(" "):e.node.getAttribute(r);if(C(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&&Ae(e.node,r),e},before:pe,beforeMe:pe,clear(e){return E(e,fe)},closest(e,r){let n=C(r)?e.node?.closest(r):void 0;return n?t(n):e},computedStyle(e,r){let{node:n}=e;return n&&getComputedStyle(n)[r]},css(e,r,n){return E(e,o=>qe(o,r,n,t))},duplicate(e,r=!1,n=document.body){switch(!0){case e.is.empty:return F.error("Duplicating an empty JQx instance is not possible"),e;default: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)}},each(e,r){return E(e,r)},empty(e){return E(e,fe)},find(e,r){return e.collection.length>0?[...e.first()?.querySelectorAll(r)]:[]},find$(e,r){return e.collection.length>0?t(r,e):e},first(e,r=!1){return e.collection.length>0?r?e.single():e.collection[0]:void 0},first$(e,r){return e.single(r)},getData(e,r,n){return e.node?.dataset?.[r]||n},hasClass(e,...r){return e.is.empty||!e.node.classList.length?!1:r.find(n=>e.node.classList.contains(n))&&!0||!1},hide(e){return E(e,r=>G(r,{display:"none !important"}))},html(e,r,n){switch(!0){case(e.is.empty&&!C(r)):return"";case!C(r):return e.node?.getHTML()??"";default:let o=H(`<div>${r.isJQx?r.HTML.get(!0):r}</div>`);return E(e,f=>(f.textContent=n?f.textContent:"",f.insertAdjacentHTML(t.at.end,o.getHTML())))}},htmlFor(e,r,n="",o=!1){if(e.is.empty||!C(r)||!C(n))return e;let s=e.find$(r);if(s.length<1)return e;let f=H(`<span>${n}</span>`);return s.each(x=>{o||(x.textContent=""),x.insertAdjacentHTML(t.at.end,f?.getHTML())}),e},isEmpty(e){return!e.node},nth$(e,r){return e.single(r)},on(e,r,...n){switch(!0){case(e.is.empty||!a(r,String,Array)||!C(r)||n.length<1):return e;default:return t.handle({type:r,node:e.node,handler:n}),e}},once(e,r,...n){switch(!0){case(e.is.empty||!a(r,String,Array)||!C(r)||n.length<1):return e;default:return t.handle({type:r,once:!0,node:e.node,handler:n}),e}},prepend(e,...r){if(e.is.empty||!r)return;let n=e.length===1;for(let o of r){if(C(o)){o=o.trim();let f=!/^<(.+)[^>]+>$/m.test(o)?t.text(o):H(o);f=n?f:I(f),E(e,x=>x.prepend(f.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,f=>s.prepend(n?f:I(f)))),o.collection.reverse())}return e},prependTo(e,r){return 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,f]of Object.entries(o)){if(s=s.trim(),f&&!ue(s)||!f)return!1;if(s.toLowerCase()==="id")return e[0].id=f;E(e,b=>{if(s.startsWith("data"))return b.dataset[s.slice(s.indexOf("-")+1)]=f;b[s]=f})}return e},remove(e,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){return E(e,n=>{if(n)for(let o of r)n.classList.remove(o)})},renderTo(e,r,n){return r=a(r,HTMLElement)||r.isJQx?r:document.body,n=a(n,String)&&t.at[n]?n:t.at.end,e.first$().toDOM(r,n),e},replace(e,r,n){let o=e.node;return!r||!a(n,HTMLElement)&&!n?.isJQx?(t.logger.error("JQx replace: invalid replacement value"),e):((n.isJQx||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){return E(e,o=>{o.classList.remove(r);for(let s of n)o.classList.add(s)})},replaceMe(e,r){return e.replaceWith(r)},replaceWith(e,r){return r=a(r,Element)?r:r.isJQx?r[0]:void 0,r&&(e[0].replaceWith(r),e=t.virtual(r)),e},setData(e,r){return E(e,n=>de(n,r))},show(e){return E(e,r=>G(r,{display:"revert-layer !important"}))},single(e,r){let n=e.collection.length>0;switch(r=r??0,!0){case(n&&a(r,String)):return e.find$(r);case(n&&a(r,Number)):return t(e.collection[r]);case n:return e.collection[0];default:return e}},style(e,r,n){return E(e,s=>{n&&a(r,String)&&(r={[r]:n||"none"}),G(s,r)})},text(e,r,n=!1){switch(!0){case e.isEmpty():return e;case!a(r,String):return e.node.textContent;default:return E(e,o=>o.textContent=n?o.textContent+r:r)}},toDOM(e,r=document.body,n=A.BeforeEnd){return e.isVirtual=!1,B(e.collection,r,n),e},toggleClass(e,r){return E(e,n=>n.classList.toggle(r))},toNodeList(e){return[...e.collection].map(r=>document.importNode(r,!0))},trigger(e,r,n,o){if(n=/Event\]$/.test(a(n))?n:Event,o=a(o,Object)?{...o,bubbles:o.bubbles??!0}:{bubbles:!0},!e.is.empty){let s=new n(r,o);e.each(f=>f.dispatchEvent(s))}return e},val(e,r){switch(!0){case(e.is.empty||!a(e.node,HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement)):return e;case!a(r,String):return e.node.value;default:return e.node.value=a(r,String)?r:"",e}}}}var Ne,Se,{isComment:Kr,isText:qr,isHtmlString:en,isArrayOfHtmlElements:tn,isArrayOfHtmlStrings:rn,ElemArray2HtmlString:nn,cssRuleEdit:Pe,addFn:_t}=Ut();function Ut(){return{...Xe(),addFn:Gt}}function Gt(t,e){return t=t?.trim(),!C(t)||!a(e,Function)?F.error("JQx.fn: method invalid parameter(s)"):Se[t]=(r,...n)=>e(r,...n)}function Zt(t){return function(e,r,n){if(e=e?.trim(),!C(e)||!a(r,Function))return t.error("JQx.staticFn: invalid parameter(s)");let o=n?{get(){return r()}}:{value(...s){return r(...s)}};try{Object.defineProperty(t,e,o)}catch{return t.warn(`JQx.staticFn: extension [${e}] already exists`)}return F.log(`JQx: added static extension function [${e}]`)}}function K(t){return new Proxy(t,Object.freeze({get:(e,r)=>Yt(e,r,t)}))}function tt(t,e){return(...r)=>a(t,Function)&&t(K(e),...r)}function Yt(t,e,r){switch(!0){case a(e,Symbol):return t;case a(+e,Number):return t.collection?.[e]||void 0;case e in Ne:return tt(Ne[e],r)();case e in Se:return tt(Se[e],r);default:return t[e]}}function ot(t){let e=tr(t);for(let[r,n]of Object.entries(Object.getOwnPropertyDescriptors(e)))Object.defineProperty(t,r,n);return t}function Xt(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,Me(e,!0,t,n))},prohibit(e){e=e.toLowerCase(),P.prohibitTag(e),a(t[e],Function)&&Object.defineProperties(t,Me(e,!1,t))}}}function rt(...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))Pe(e,{removeRule:1})}function Kt(t){return function(e,r,n){r=r?.isJQx?r?.[0]:r,n=n&&Object.values(A).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 qt(...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 er(t,e,r,n){return t=N(n||t.toLowerCase()),{get(){return(...o)=>(F.log(e?`JQx: created (virtual) instance from [JQx].${t}`:`Could not create instance from [JQx].${t}`),e&&r.virtual(Q(ee[t](...o))))},enumerable:!1,configurable:!0}}function Me(t,e,r,n){t=t.toLowerCase();let o=er(t,e,r,n);return n?{[n]:o,[Z(n)]:o}:{[t]:o,[t.toUpperCase()]:o}}function tr(t){return qt(Object.entries(P.tagsRaw).reduce(rr(t),{}),ar(t))}function rr(t){return function(e,[r,n]){return n&&Object.defineProperties(e,Me(r,n,t)),e}}function nr(t){return function(e,r,...n){a(r,Function)&&(n.push(r),r=void 0),t({type:e,selector:r,handlers:n})}}function or(t){return function(e){let{type:r,types:n,origin:o,selector:s,handler:f,handlers:x,node:b,name:L,capture:p,once:h,about:g}=e;f=x||f,r=n||r,s=o||s;let S=Te(r),m=L;f=a(f,Function)?[f]:f;let c={type:S,selector:s||o,capture:p,name:m,once:h,node:b,about:g};switch(!0){case(a(S,Array)&&S.length>0):for(let y of S)c.type=y,nt(f,c,t);break;default:return nt(f,c,t)}}}function nt(t,e,r){for(let n of t)r.listen({...e,handler:n})}function ir(t){return function(e,r){return r=C(r)&&r,e=C(e)&&e,r&&e&&t.listenerStore[e][r]}}function lr(t){return t.activePopup||Object.defineProperty(t,"activePopup",{value:ie(t),enumerable:!1}),t.activePopup}function sr(t){let e=(p,h)=>Pe(p,h),r=function(p){return _({createWithId:p||`jqx${ye()}`})},n=function(...p){for(let h of p)Pe(h)},o=Xt(t),s=le(t),f=or(s);return{editCssRule:e,createStyle:r,editCssRules:n,allowProhibit:o,handle:f,capturedHandling:f,log:(...p)=>F.on.log(...p).off,warn:(...p)=>F.on.warn(...p).off,error:(...p)=>F.on.error(...p).off,handlerWrapper:s}}function ar(t){let{factoryExtensions:e,instanceExtensions:r}=et(t);Ne=e,Se=r;let{editCssRule:n,createStyle:o,editCssRules:s,allowProhibit:f,handle:x,capturedHandling:b,log:L,warn:p,error:h,handlerWrapper:g}=sr(t),S=ir(t),m=Zt(t);return{log:L,warn:p,error:h,editCssRules:s,createStyle:o,editStylesheet:o,editCssRule:n,escHtml:O,logger:F,text(c,y=!1){return y?t.comment(c):document.createTextNode(c)},node(c,y=document){return y.querySelector(c,y)},nodes(c,y=document){return[...y.querySelectorAll(c,y)]},clearAllTimers:Le,get staticFn(){return function(c,y,w){return m(c,y,w)}},get toBool(){return $e},get getNamedListener(){return S},get virtual(){return Kt(t)},get allowTag(){return f.allow},get prohibitTag(){return f.prohibit},get removeCssRule(){return rt},get removeCssRules(){return rt},get delegate(){return nr(b)},get delegateCaptured(){return b},get handle(){return b},get listen(){return g.listen},get at(){return A},get setStyle(){return n},get fn(){return _t},get lenient(){return P.allowUnknownHtmlTags},get IS(){return a},get Popup(){return lr(t)},get listenerStore(){return g.ListenerStore}}}var it=ot(cr());function cr(){return function(e,r,n=A.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(A).find(h=>n===h)?n:void 0;let s=Y(e),x=!s&&be(e)||s,b={collection:me(e)??[],isVirtual:o,isJQx:!0},L=X(b.collection);if(b.collection.length&&L)return o||b.collection.forEach(h=>{r.contains(h)||B([h],r,n)}),K(b);if(x){if([e].flat().forEach(h=>b.collection.push(H(h))),b.collection.length>0){let h=b.collection.filter(c=>c?.dataset?.jqxcreationerror);b.collection=b.collection.filter(c=>!c?.dataset?.jqxcreationerror);let g=b.collection.map(c=>`${String(c.constructor).split(/function|\(/)[1].trim()}`),S=g.length>1,m=b.collection.length?g.join(", "):"sanitized: no elements remaining";F.log(`JQx: created ${b.isVirtual?"(virtual)":""} instance from ${S?"array of ":""}HTML string${S?"s":""} (${m})`),b.isVirtual||B(b.collection,r,n)}return K(b)}let p=He(e,r,b);return e!==null&&F.log(`JQx: input => ${p}`),K(b)}}var un=it;export{un as default};
@@ -1,4 +1,4 @@
1
- import { IS, isNonEmptyString, getCaptureValue, getHandlerName, handlerIdCache } from "./Utilities.js";
1
+ import {IS, isNonEmptyString, getCaptureValue, getHandlerName, handlerIdCache, systemLog} from "./Utilities.js";
2
2
 
3
3
  export { HandlerFactory };
4
4
 
@@ -55,7 +55,7 @@ function HandlerFactory(jqx) {
55
55
  delete store[eventType][name];
56
56
  delete handlerIdCache[name];
57
57
 
58
- console.warn(`Removed listener [${name}] for event type [${eventType}].`);
58
+ systemLog.warn(`Removed listener [${name}] for event type [${eventType}].`);
59
59
  }
60
60
  }
61
61
 
@@ -73,6 +73,7 @@ function HandlerFactory(jqx) {
73
73
 
74
74
  switch(true) {
75
75
  case !store[type][handlerName]:
76
+ systemLog.log(`JQx: created listener for event type ${type}, with handler name ${handlerName}`);
76
77
  store[type][handlerName] = {
77
78
  name: handlerName,
78
79
  handler: wrapFn4Selector(handler, selector, once, handlerName),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jqx-es",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "JQuery alike with a few twists",
@@ -46,11 +46,14 @@ function JQxMainFactory() {
46
46
  if (instance.collection.length > 0) {
47
47
  const errors = instance.collection.filter( el => el?.dataset?.jqxcreationerror );
48
48
  instance.collection = instance.collection.filter(el => !el?.dataset?.jqxcreationerror);
49
+ const elemsCreated = instance.collection.map(el => `${String(el.constructor).split(/function|\(/)[1].trim()}`);
50
+ const multiple = elemsCreated.length > 1;
49
51
  const collectionLog = instance.collection.length
50
- ? instance.collection.map(el => `${String(el.constructor).split(/function|\(/)[1].trim()}`).join(` | `)
52
+ ? elemsCreated.join(`, `)
51
53
  : "sanitized: no elements remaining";
52
54
 
53
- systemLog.log(`JQx: created ${instance.isVirtual ? `(virtual)` : ``} instance from HTML string ([${collectionLog}])`);
55
+ systemLog.log(`JQx: created ${instance.isVirtual ? `(virtual)` : ``} instance from ` +
56
+ `${multiple ? `array of ` : ``}HTML string${multiple ? `s` : ``} (${collectionLog})`);
54
57
 
55
58
  if (!instance.isVirtual) {
56
59
  inject2DOMTree(instance.collection, root, position);
@@ -8,7 +8,7 @@ import allMethodsFactory from "./JQxInstanceMethods.js";
8
8
  let instanceGetters, instanceMethods;
9
9
  const {
10
10
  isComment, isText, isHtmlString, isArrayOfHtmlElements, isArrayOfHtmlStrings,
11
- ElemArray2HtmlString, addHandlerId, cssRuleEdit, addFn
11
+ ElemArray2HtmlString, cssRuleEdit, addFn
12
12
  } = selectedUtilitiesFactory();
13
13
 
14
14
  export { proxify, addJQxStaticMethods };
@@ -400,7 +400,6 @@ function instanceExtensionsFactory(jqx) {
400
400
  return instance;
401
401
  },
402
402
  remove(instance, selector) {
403
- systemLog.log(`remove ${truncateHtmlStr(instance.HTML.get(1), 40)}${selector ? ` /w selector ${selector}` : ``}`);
404
403
  const remover = el => el.remove();
405
404
  const removeFromCollection = () =>
406
405
  instance.collection = instance.collection.filter(el => document.documentElement.contains(el));
@@ -9,7 +9,7 @@ import {
9
9
  } from "../Resource/Common/Utilities.js"
10
10
 
11
11
  export {
12
- addHandlerId, after, applyStyle, assignAttrValues, before, checkProp, cleanupHtml, clearAllTimers, cloneAndDestroy,
12
+ after, applyStyle, assignAttrValues, before, checkProp, cleanupHtml, clearAllTimers, cloneAndDestroy,
13
13
  convert2Bool, createElementFromHtmlString, css, datasetKeyProxy, ElemArray2HtmlString, emptyElement, escHtml,
14
14
  ExamineElementFeatureFactory, findParentScrollDistance, getHandlerName, HandlerFactory, inject2DOMTree,
15
15
  input2Collection, insertPositions, IS, isArrayOfHtmlElements, isArrayOfHtmlStrings, isCommentOrTextNode,
@@ -32,24 +32,18 @@ function setCollectionFromCssSelector(input, root, self) {
32
32
  let errorStr = undefined;
33
33
 
34
34
  try { self.collection = [...selectorRoot.querySelectorAll(input)]; }
35
- catch (err) { errorStr = `Invalid CSS querySelector. [${!IS(input, String) ? `Nothing valid given!` : input}]`; }
35
+ catch (err) { errorStr = `JQx: Invalid CSS querySelector. [${!IS(input, String) ? `Not a string!` : input}]`; }
36
36
  const collectionLen = self.collection.length;
37
37
  return collectionLen < 1
38
38
  ? `CSS querySelector "${input}", output: nothing`
39
39
  : errorStr ?? `CSS querySelector "${input}", output ${collectionLen} element${collectionLen > 1 ? `s` : ``}`;
40
40
  }
41
41
 
42
- function addHandlerId(instance) {
43
- const handleId = `anonymous_${Math.random().toString(36).slice(2)}`;
44
- instance.data.add({hid: handleId});
45
- return `[data-hid="${handleId}"]`;
46
- }
47
-
48
42
  function selectedFactoryHelpers() {
49
43
  return {
50
44
  isCommentOrTextNode, isNode, isComment, isText, isHtmlString, isArrayOfHtmlElements,
51
45
  isArrayOfHtmlStrings, ElemArray2HtmlString, input2Collection, setCollectionFromCssSelector,
52
- addHandlerId, cssRuleEdit: styleFactory({createWithId: `JQxStylesheet`}) };
46
+ cssRuleEdit: styleFactory({createWithId: `JQxStylesheet`}) };
53
47
  }
54
48
 
55
49
  function ExamineElementFeatureFactory() {