jqx-es 1.5.8 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Bundle/jqx.browser.min.js +15 -15
- package/Bundle/jqx.min.js +15 -15
- package/Resource/Common/TypeofAnything.js +19 -14
- package/package.json +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
var JQx=(()=>{var xe=Object.defineProperty;var dt=Object.getOwnPropertyDescriptor;var mt=Object.getOwnPropertyNames;var gt=Object.prototype.hasOwnProperty;var pt=(t,e)=>{for(var r in e)xe(t,r,{get:e[r],enumerable:!0})},yt=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of mt(e))!gt.call(t,o)&&o!==r&&xe(t,o,{get:()=>e[o],enumerable:!(n=dt(e,o))||n.enumerable});return t};var bt=t=>yt(xe({},"__esModule",{value:!0}),t);var Cr={};pt(Cr,{default:()=>Er});var{IS:l,maybe:z,$Wrap:Tr,isNothing:$r,xProxy:Fr,addSymbolicExtensions:Ar}=ht({useSymbolicExtensions:!1});function ht(t={}){let{useSymbolicExtensions:e}=t,{xProxy:r,addSymbolicExtensions:n}=St(a,p,e),o=L(),[i]=[P()];return r.custom(),e&&n(),{IS:a,maybe:o,$Wrap:i,isNothing:b,xProxy:r,addSymbolicExtensions:n};function a(s,...d){let w=typeof s=="symbol"?Symbol.isSymbol:s;switch(!0){case!!o({trial:T=>"isTypes"in(d?.[0]??{})}):return S(s,d[0]);default:return d.length>1?c(w,...d):C(s,...d)}}function S(s,d){switch(!0){case"defaultValue"in d:return u(s,d);case"notTypes"in d:return g(s,d);default:return a(s,...[d.isTypes].flat())}}function p(s){return s?.[Symbol.proxy]??a(s)}function C(s,...d){let{noInput:w,noShouldbe:T,compareTo:M,inputCTOR:Q,isNaN:ut,isInfinity:ct,shouldBeFirstElementIsNothing:ft}=f(s,...d);switch(d=d.length&&d[0],!0){case ft:return String(s)===String(M);case(s?.[Symbol.proxy]&&T):return s[Symbol.proxy];case ut:return T?"NaN":String(M)===String(s);case ct:return T?"Infinity":String(M)===String(s);case w:return T?String(s):String(M)===String(s);case Q===Boolean:return d?Q===d:"Boolean";default:return y(s,d,T,h(s,Q))}}function f(s,...d){let w=d.length<1,T=s==null;return{noInput:T,noShouldbe:w,compareTo:!w&&d[0],inputCTOR:!T&&Object.getPrototypeOf(s)?.constructor,isNaN:Number.isNaN(s)||o({trial:M=>String(s)==="NaN"}),isInfinity:o({trial:M=>String(s)})==="Infinity",shouldBeFirstElementIsNothing:!w&&b(d[0])}}function h(s,d){switch(!0){case s===0:return Number;case s==="":return String;case!s:return{name:String(s)};default:return d}}function y(s,d,w,T){switch(!0){case(!w&&d===s||s?.[Symbol.proxy]&&d===Proxy):return!0;case String(d)==="NaN":return String(s)==="NaN";case(s?.[Symbol.toStringTag]&&a(d,String)):return String(d)===s[Symbol.toStringTag];default:return d?m(s,d,T):x(s,T)}}function x(s,d){return s?.[Symbol.toStringTag]&&`[object ${s?.[Symbol.toStringTag]}]`||d?.name||String(d)}function m(s,d,w){return o({trial:T=>s instanceof d})||d===w||d===Object.getPrototypeOf(w)||`${d?.name}`===w?.name}function c(s,...d){return d.some(w=>a(s,w))}function b(s,d=!1){let w=s==null;return w=d?w||a(s,1/0)||a(s,NaN):w,w}function L(){let s=d=>{};return function({trial:d,whenError:w=s}={}){try{return d()}catch(T){return w(T)}}}function P(){return function(s){return Object.freeze({get value(){return s},get[Symbol.type](){return p(s)},get type(){return p(s)},[Symbol.is](...d){return a(s,...d)},is(...d){return a(s,...d)}})}}function u(s,{defaultValue:d,isTypes:w=[void 0],notTypes:T}={}){return w=w?.constructor!==Array?[w]:w,T=T&&T?.constructor!==Array?[T]:[],T.length<1?a(s,...w)?s:d:g(s,{isTypes:w,notTypes:T})?s:d}function g(s,{isTypes:d=[void 0],notTypes:w=[void 0]}={}){return d=d?.constructor!==Array?[d]:d,w=w?.constructor!==Array?[w]:w,a(s,...d)&&!a(s,...w)}function v(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return p(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...s){return a(this,...s)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(s){return p(s)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(s,...d){return a(s,...d)},enumerable:!1,configurable:!1}}))}function E(s){let d=s.set;return s.set=(w,T,M)=>T===Symbol.proxy?w[T]=M:d(w,T,M),s}}function St(t,e,r){return Symbol.isSymbol||(Symbol.isSymbol=Symbol.for("toa.isASymbol")),{xProxy:a(),addSymbolicExtensions:n};function n(){Symbol.is||(Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type")),Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return e(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...S){return t(this,...S)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(S){return e(S)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(S,...p){return t(S,...p)},enumerable:!1,configurable:!1}}))}function o(S){return Object.getPrototypeOf(S)?.constructor?.name||"Object"}function i(S){return Proxy=new S(S,{construct(p,C){for(let h of C)h.set&&(h=modifySetter(h));let f=new p(...C);return f[Symbol.proxy]=`Proxy (${o(C[0])})`,f}}),Proxy}function a(){Symbol.proxy||(Symbol.proxy=Symbol.for("toa.proxy"));let S=Proxy;return{native(){Proxy=S},custom(){Proxy=i(S)}}}}var je=wt(),B=xt(),V=vt();function xt(){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 vt(){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 wt(){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=Et();function Et(){let t={get(e,r){let n=String(r)?.toLowerCase();switch(!0){case n in e:return e[n];case Pt(n):return Je(e,n,r);default:return Je(e,n,r,!0)}},enumerable:!1,configurable:!1};return new Proxy({},t)}function Je(t,e,r,n=!1){return Object.defineProperty(t,e,{get(){return n?o=>Ht(r):Mt(e)}}),t[e]}function Ct(t,e,r){return e=e?.isJQx&&e.first()||e,z({trial:n=>Nt(e)?t.append(e):ke(e)?t.insertAdjacentHTML("beforeend",e):t.append(e),whenError:n=>console.info(`${r} (for root ${t}) not created, reason
|
|
2
|
-
`,n)})}function
|
|
3
|
-
=> @charset, @namespace and @import are not supported here`),{done:!0}}function a(
|
|
4
|
-
${
|
|
5
|
-
Rule: ${we(
|
|
6
|
-
${r}`),
|
|
7
|
-
${
|
|
8
|
-
Rule: ${we(
|
|
9
|
-
${r}`),
|
|
10
|
-
`)}function
|
|
11
|
-
`).map(n=>n.replace(/\s|\/\/.*$/g,"").trim().replace(/(@s!)/g," ")).join(""),r)}function We(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/[^--]^-|-$/,"")}function ze(t,e){try{return t()}catch(r){console.error(`${e||"an error occured"}: ${r.message}`)}}function
|
|
1
|
+
var JQx=(()=>{var xe=Object.defineProperty;var ft=Object.getOwnPropertyDescriptor;var dt=Object.getOwnPropertyNames;var mt=Object.prototype.hasOwnProperty;var gt=(t,e)=>{for(var r in e)xe(t,r,{get:e[r],enumerable:!0})},pt=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of dt(e))!mt.call(t,o)&&o!==r&&xe(t,o,{get:()=>e[o],enumerable:!(n=ft(e,o))||n.enumerable});return t};var yt=t=>pt(xe({},"__esModule",{value:!0}),t);var Er={};gt(Er,{default:()=>wr});var{IS:s,maybe:W,$Wrap:Lr,isNothing:Tr,xProxy:Fr,addSymbolicExtensions:$r}=bt({useSymbolicExtensions:!1});function bt(t={}){let{useSymbolicExtensions:e}=t,{xProxy:r,addSymbolicExtensions:n}=ht(a,f,e),o=C(),[i]=[N()];return r.custom(),e&&n(),{IS:a,maybe:o,$Wrap:i,isNothing:b,xProxy:r,addSymbolicExtensions:n};function a(l,...d){let v=typeof l=="symbol"?Symbol.isSymbol:l;switch(!0){case!!o({trial:L=>"isTypes"in(d?.[0]??{})}):return w(l,d[0]);default:return d.length>1?m(v,...d):E(l,...d)}}function w(l,d){switch(!0){case"defaultValue"in d:return u(l,d);case"notTypes"in d:return y(l,d);default:return a(l,...[d.isTypes].flat())}}function f(l){return l?.[Symbol.proxy]??a(l)}function E(l,...d){let{noInput:v,noShouldbe:L,compareTo:O,inputCTOR:J,isNaN:B,isInfinity:ut,shouldBeFirstElementIsNothing:ct}=c(l,...d);switch(d=d.length&&d[0],!0){case ct:return String(l)===String(O);case(l?.[Symbol.proxy]&&L):return l[Symbol.proxy];case B:return L?"NaN":String(O)===String(l);case ut:return L?"Infinity":String(O)===String(l);case v:return L?String(l):String(O)===String(l);case J===Boolean:return d?J===d:"Boolean";default:return g(l,d,L,h(l,J))}}function c(l,...d){let v=d.length<1,L=l==null;return{noInput:L,noShouldbe:v,compareTo:!v&&d[0],inputCTOR:!L&&Object.getPrototypeOf(l)?.constructor,isNaN:Number.isNaN(l)||o({trial:O=>String(l)==="NaN"}),isInfinity:o({trial:O=>String(l)})==="Infinity",shouldBeFirstElementIsNothing:!v&&b(d[0])}}function h(l,d){switch(!0){case l===0:return Number;case l==="":return String;case!l:return{name:String(l)};default:return d}}function g(l,d,v,L){switch(!0){case(!v&&d===l||l?.[Symbol.proxy]&&d===Proxy):return!0;case String(d)==="NaN":return String(l)==="NaN";case(l?.[Symbol.toStringTag]&&typeof d=="string"):return String(d)===l[Symbol.toStringTag];default:return d?p(l,d,L):S(l,L)}}function S(l,d){return(l?.[Symbol.toStringTag]??l?.prototype?.[Symbol.toStringTag])||d?.name||String(d)}function p(l,d,v){return o({trial:L=>l instanceof d})||d===v||d===Object.getPrototypeOf(v)||`${d?.name}`===v?.name}function m(l,...d){return d.some(v=>a(l,v))}function b(l,d=!1){let v=l==null;return v=d?v||a(l,1/0)||a(l,NaN):v,v}function C(){let l=d=>{};return function({trial:d,whenError:v=l}={}){try{return d()}catch(L){return v(L)}}}function N(){return function(l){return Object.freeze({get value(){return l},get[Symbol.type](){return f(l)},get type(){return f(l)},[Symbol.is](...d){return a(l,...d)},is(...d){return a(l,...d)}})}}function u(l,{defaultValue:d,isTypes:v=[void 0],notTypes:L}={}){return v=v?.constructor!==Array?[v]:v,L=L&&L?.constructor!==Array?[L]:[],L.length<1?a(l,...v)?l:d:y(l,{isTypes:v,notTypes:L})?l:d}function y(l,{isTypes:d=[void 0],notTypes:v=[void 0]}={}){return d=d?.constructor!==Array?[d]:d,v=v?.constructor!==Array?[v]:v,a(l,...d)&&!a(l,...v)}function x(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return f(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...l){return a(this,...l)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(l){return f(l)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(l,...d){return a(l,...d)},enumerable:!1,configurable:!1}}))}}function ht(t,e,r){return Symbol.isSymbol||(Symbol.isSymbol=Symbol.for("toa.isASymbol")),{xProxy:w(),addSymbolicExtensions:n};function n(){Symbol.is||(Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type")),Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return e(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...f){return t(this,...f)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(f){return e(f)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(f,...E){return t(f,...E)},enumerable:!1,configurable:!1}}))}function o(f){let E=f.set;return f.set=(c,h,g)=>h===Symbol.proxy?c[h]=g:E(c,h,g),f}function i(f){return Object.getPrototypeOf(f)?.constructor?.name||"Object"}function a(f){return Proxy=new f(f,{construct(E,c){for(let g of c)g.set&&(g=o(g));let h=new E(...c);return h[Symbol.proxy]=`Proxy (${i(c[0])})`,h}}),Proxy}function w(){Symbol.proxy||(Symbol.proxy=Symbol.for("toa.proxy"));let f=Proxy;return{native(){Proxy=f},custom(){Proxy=a(f)}}}}var je=vt(),z=St(),V=xt();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 xt(){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 vt(){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=wt();function wt(){let t={get(e,r){let n=String(r)?.toLowerCase();switch(!0){case n in e:return e[n];case Nt(n):return Je(e,n,r);default:return Je(e,n,r,!0)}},enumerable:!1,configurable:!1};return new Proxy({},t)}function Je(t,e,r,n=!1){return Object.defineProperty(t,e,{get(){return n?o=>At(r):Pt(e)}}),t[e]}function Et(t,e,r){return e=e?.isJQx&&e.first()||e,W({trial:n=>Ht(e)?t.append(e):ke(e)?t.insertAdjacentHTML("beforeend",e):t.append(e),whenError:n=>console.info(`${r} (for root ${t}) not created, reason
|
|
2
|
+
`,n)})}function Ct(t,e,...r){let n=Lt(e,t);return r?.forEach(o=>Et(n,o,t)),n}function Lt(t,e){switch(t=ve(e)?$t(t):t?.isJQx?t.first():t,!0){case s(t,String):return U(e,ke(t,e)?{html:t}:{text:t});case s(t,Node):return Ft(e,t);default:return U(e,t)}}function Tt(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 Ft(t,e){let r=U(t);return r.append(e),r}function U(t,e={}){e=Qe(e,{});let r=Object.entries(e.data??{}),n=Object.assign(ve(t)?new Comment(e?.text):document.createElement(t),Tt(e));return r.length&&r.forEach(([o,i])=>n.dataset[o]=String(i)),n}function Qe(t,e){return e?s(t,{isTypes:Object,notTypes:[Array,null,NaN,Proxy],defaultValue:e}):s(t,{isTypes:Object,notTypes:[Array,null,NaN,Proxy]})}function $t(t){return Qe(t)?t?.text??t?.textContent??"":String(t)}function At(t){return U("b",{style:"color:red",text:`'${t}' is not a valid HTML-tag`})}function ke(t,e){return!ve(e)&&s(t,String)&&/<.*>|&[#|0-9a-z]+[^;];/i.test(t)}function Ht(t){return t?.constructor===Comment||t?.constructor===CharacterData}function ve(t){return t?.constructor===Comment||/comment/i.test(t)}function Nt(t){return!s(U(t),HTMLUnknownElement)}function Pt(t){return(e,...r)=>Ct(t,e,...r)}var{IS:te,maybe:Mr,$Wrap:Or,xProxy:Dr,isNothing:Ir}=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"),m();let t=h(),[e,r]=[g(),N()];return r.custom(),{IS:n,maybe:t,$Wrap:e,isNothing:c,xProxy:r};function n(u,...y){if(t({trial:l=>"isTypes"in(y?.[0]??{})})){let l=y[0];return"defaultValue"in l?S(u,l):"notTypes"in l?p(u,l):n(u,...[l.isTypes].flat())}let x=typeof u=="symbol"?Symbol.isSymbol:u;return y.length>1?E(x,...y):i(u,...y)}function o(u){return u?.[Symbol.proxy]??n(u)}function i(u,...y){let{noInput:x,noShouldbe:l,compareTo:d,inputCTOR:v,isNaN:L,isInfinity:O,shouldBeFirstElementIsNothing:J}=w(u,...y);switch(y=y.length&&y[0],!0){case J:return String(u)===String(d);case(u?.[Symbol.proxy]&&l):return u[Symbol.proxy];case L:return l?"NaN":t({trial:B=>String(d)})===String(u);case O:return l?"Infinity":t({trial:B=>String(d)})===String(u);case x:return l?String(u):String(d)===String(u);case v===Boolean:return y?v===y:"Boolean";default:return f(u,y,l,a(u,v))}}function a(u,y){return u===0?Number:u===""?String:u?y:{name:String(u)}}function w(u,...y){let x=y.length<1,l=!x&&y[0],d=!x&&c(y[0]),v=u==null,L=!v&&Object.getPrototypeOf(u)?.constructor,O=t({trial:B=>String(u)})==="NaN",J=t({trial:B=>String(u)})==="Infinity";return{noInput:v,noShouldbe:x,compareTo:l,inputCTOR:L,isNaN:O,isInfinity:J,shouldBeFirstElementIsNothing:d}}function f(u,y,x,l){switch(!0){case(!x&&y===u||u?.[Symbol.proxy]&&y===Proxy):return!0;case t({trial:d=>String(y)})==="NaN":return String(u)==="NaN";case(u?.[Symbol.toStringTag]&&n(y,String)):return String(y)===u[Symbol.toStringTag];default:return y?t({trial:d=>u instanceof y})||y===l||y===Object.getPrototypeOf(l)||`${y?.name}`===l?.name:u?.[Symbol.toStringTag]&&`[object ${u?.[Symbol.toStringTag]}]`||l?.name||String(l)}}function E(u,...y){return y.some(x=>n(u,x))}function c(u,y=!1){let x=u==null;return x=y?x||n(u,1/0)||n(u,NaN):x,x}function h(){let u=(y,x)=>y?.constructor===Function?y(x):void 0;return function({trial:y,whenError:x=()=>{}}={}){try{return u(y)}catch(l){return u(x,l)}}}function g(){return function(u){return Object.freeze({get value(){return u},get[Symbol.type](){return o(u)},get type(){return o(u)},[Symbol.is](...y){return n(u,...y)},is(...y){return n(u,...y)}})}}function S(u,{defaultValue:y,isTypes:x=[void 0],notTypes:l}={}){return x=x?.constructor!==Array?[x]:x,l=l&&l?.constructor!==Array?[l]:[],l.length<1?n(u,...x)?u:y:p(u,{isTypes:x,notTypes:l})?u:y}function p(u,{isTypes:y=[void 0],notTypes:x=[void 0]}={}){return y=y?.constructor!==Array?[y]:y,x=x?.constructor!==Array?[x]:x,n(u,...y)&&!n(u,...x)}function m(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...u){return n(this,...u)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(u){return o(u)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(u,...y){return n(u,...y)},enumerable:!1,configurable:!1}}))}function b(u){let y=String(Object.getPrototypeOf(u)?.constructor);return y.slice(y.indexOf("ion")+3,y.indexOf("(")).trim()}function C(u){let y=u.set;return u.set=(x,l,d)=>l===Symbol.proxy?x[l]=d:y(x,l,d),u}function N(){let u=Proxy;return{native(){Proxy=u},custom(){Proxy=new u(u,{construct(y,x){for(let d of x)d.set&&(d=C(d));let l=new y(...x);return l[Symbol.proxy]=`Proxy (${b(x[0])})`,l}})}}}}var _=Ot;function Ot({styleSheet:t,createWithId:e}={}){let{tryParseAtOrNestedRules:r,ruleExists:n,checkParams:o,sheet:i,removeRules:a,consider:w,currentSheetID:f}=Dt({styleSheet:t,createWithId:e});function E(p,m){if(p&&m.removeProperties){Object.keys(m.removeProperties).forEach(b=>p.style.removeProperty(We(b)));return}Object.entries(m).forEach(([b,C])=>{b=We(b.trim()),C=C.trim();let N;if(/!important/.test(C)&&(C=C.slice(0,C.indexOf("!important")).trim(),N="important"),!CSS.supports(b,C))return console.error(`StylingFactory ${f} error: '${b}' with value '${C}' not supported (yet)`);ze(()=>p.style.setProperty(b,C,N),`StylingFactory ${f} (setRule4Selector) failed`)})}function c(p,m,b=i){if(p=p?.trim?.(),!te(p,String)||!p.length||/[;,]$/g.test(p))return console.error(`StylingFactory ${f} (setRules): [${p||"[no selector given]"}] is not a valid selector`);if(m.removeRule)return a(p);let C=n(p,!0),N=C||b.cssRules[b.insertRule(`${p} {}`,b.cssRules.length||0)];return w(()=>E(N,m),p,C)}function h(p){let m=p.trim().split(/{/,2),b=m.shift().trim();if(!te(b,String)||!b?.trim()?.length)return console.error(`StylingFactory ${f} (doParse): no (valid) selector could be extracted from rule ${we(p)}`);let C=Wt(m.shift());return ze(()=>c(b,C),`StylingFactory ${f} (setRules) failed`)}function g(p){let m=r(p);return m.done?m.existing:h(p)}function S(p,m){return p.trim().startsWith("@media")?g(It(p,m)):c(p,m)}return function(p,m={}){return o(p,m)&&(Object.keys(m).length?S(p,m):g(p))}}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 p=Object.assign(document.createElement("style"),{id:g});return document.head.insertAdjacentElement("beforeend",p),p.sheet}function i(g){return console.error(`StylingFactory ${n} [rule: ${g}]
|
|
3
|
+
=> @charset, @namespace and @import are not supported here`),{done:!0}}function a(g,S){return[...t.rules].find(p=>S?Be(p.selectorText||"",g):Jt`${Rt(g)}${[..."gim"]}`.test(p.cssText))}function w(g){return/^@charset|@import|namespace/i.test(g.trim())?i(g):g.match(/}/g)?.length>1?{existing:c(g,1),done:!0}:{done:!1}}function f(g){let S=[...t.cssRules].reduce((m,b,C)=>Be(b.selectorText||"",g)&&m.concat(C)||m,[]),p=S.length;return S.forEach(m=>t.deleteRule(m)),p>0?console.info(`\u2714 Removed ${p} instance${p>1?"s":""} of selector ${g} from ${n.slice(4)}`):console.info(`\u2714 Remove rule: selector ${g} does not exist in ${n.slice(4)}`)}function E(g,S){return g&&te(g,String)&&g.trim().length>0&&te(S,Object)||(console.error(`StylingFactory ${n} called with invalid parameters`),!1)}function c(g){g=g.trim();let S=g.slice(0,g.indexOf("{")).trim(),p=!!a(S);try{return t.insertRule(`${g}`,t.cssRules.length),p}catch(m){return console.error(`StylingFactory ${n} (tryParse) ${m.name} Error:
|
|
4
|
+
${m.message}
|
|
5
|
+
Rule: ${we(g)}
|
|
6
|
+
${r}`),p}}function h(g,S,p){try{return g(),p}catch(m){return console.error(`StylingFactory ${n} (tryAddOrModify) ${m.name} Error:
|
|
7
|
+
${m.message}
|
|
8
|
+
Rule: ${we(S)}
|
|
9
|
+
${r}`),p}}return{sheet:t,removeRules:f,tryParseAtOrNestedRules:w,ruleExists:a,checkParams:E,tryParse:c,consider:h,currentSheetID:n}}function It(t,e){return`${t.trim()} ${Object.entries(e).map(([r,n])=>`${r}: { ${jt(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 jt(t){return Object.entries(t).map(([e,r])=>`${e}: ${r.trim()}`).join(`;
|
|
10
|
+
`)}function Rt(t){return t.replace(/([*\[\]()-+{}.$?\\])/g,e=>`\\${e}`)}function Jt(t,...e){let r=e.length&&Array.isArray(e.slice(-1))?e.pop().join(""):"";return new RegExp((e.length&&t.raw.reduce((n,o,i)=>n.concat(e[i-1]||"").concat(o),"")||t.raw.join("")).split(`
|
|
11
|
+
`).map(n=>n.replace(/\s|\/\/.*$/g,"").trim().replace(/(@s!)/g," ")).join(""),r)}function We(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/[^--]^-|-$/,"")}function ze(t,e){try{return t()}catch(r){console.error(`${e||"an error occured"}: ${r.message}`)}}function Qt(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
|
|
14
|
-
`)),n}function
|
|
15
|
-
`)),n}function
|
|
16
|
-
`));default:return n}}return Object.defineProperties(n,{log:{value:p,enumerable:!1},error:{value:a,enumerable:!1},warn:{value:S,enumerable:!1}}),Object.freeze(n)}function ue(){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=D(r),r.startsWith("data"))return de(t,n);l(n,String)&&ce(r)&&t.setAttribute(r,n.split(/[, ]/)?.join(" "))}}function de(t,e){if(t&&l(e,Object))for(let[r,n]of Object.entries(e))t.setAttribute(`data-${D(r)}`,n)}function me(t){return t?l(t,Proxy)?[t.EL]:l(t,NodeList)?[...t]:j(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 j(t){return l(t,Text,HTMLElement,Comment)}function Z(t,e){if(l(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(D(r),n,o)}}function J(t){let e=t.cloneNode(!0);return e.removeAttribute&&e.removeAttribute("id"),t.isConnected?t.remove():t=null,e}function _e(t){if(!l(t,HTMLElement))return;let e=t.style,r=getComputedStyle(t),n=!![e.visibility,r.visibility].includes("hidden"),o=!![e.display,r.display].includes("none"),i=!!t.hidden,a=parseInt(r.height)<1||parseInt(r.width)<1,S=t.offsetTop<0||t.offsetLeft+t.offsetWidth<0||t.offsetLeft>document.body.offsetWidth,p=+r.opacity==0||+(e.opacity||1)==0;return!(i||S||p||o||n||a)}function Ge(t){return t?.isConnected?!![...document.querySelectorAll(":is(:read-write)")].find(e=>e===t):!1}function Ze(t){return t?.filter(e=>e).reduce((e,r)=>e.concat(Pe(r)?`<!--${r.data}-->`:be(r)?r.textContent:r.outerHTML),"")}function ae(t,e=2){return`${t}`.padStart(e,"0")}function Ye(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`_${er(Kt).slice(0,8).join("")}`}function He(t){return t=l(t,String)&&/,/.test(t)?t.split(",").map(e=>e.trim().toLowerCase()).filter(e=>e.length>0):t,l(t,Array)?t:l(t,String)&&t?.trim().toLowerCase()||""}function Xe(t){return t?.isConnected?!![...document.querySelectorAll(":is(:modal)")].find(e=>e===t):!1}function Ne(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 er(t){let e=t.length;for(;e--;){let r=Ye(e);[t[e],t[r]]=[t[r],t[e]]}return t}function Y(t){return l(t,String)?t.toLowerCase().split("-").map((e,r)=>r&&`${tr(e)}`||e).join(""):t}function D(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/^-|-$/,"")}function tr([t,...e]){return`${t.toUpperCase()}${e.join("")}`}function be(t){return l(t,Comment,Text)}function Pe(t){l(t,Comment)}function Ke(t){return l(t,Text)}function X(t){return l(t,String)&&/^<|>$/.test(`${t}`.trim())}function K(t){return l(t,Array)&&!t?.find(e=>!j(e))}function he(t){return l(t,Array)&&!t?.find(e=>!X(e))}function F(t,e){let r=t.collection.filter(n=>!be(n));for(let n=0;n<r.length;n+=1)e(r[n],n);return t}function qe(t){return t.node?l(t.node,Comment)?`<!--${t.node.textContent}-->`:t.HTML.get(1).split(">")[0]+">...":""}function Me(t,e,r){let n=e!==document.body&&l(t,String)&&t.toLowerCase()!=="body"?e:document;try{r.collection=[...n.querySelectorAll(t)]}catch{A.warn(`JQx: Invalid CSS querySelector. [${l(t,String)?t:"Not a string!"}]`)}}function et(){return{isCommentOrTextNode:be,isNode:j,isComment:Pe,isText:Ke,isHtmlString:X,isArrayOfHtmlElements:K,isArrayOfHtmlStrings:he,ElemArray2HtmlString:Ze,input2Collection:me,setCollectionFromCssSelector:Me,cssRuleEdit:_({createWithId:"JQxStylesheet"})}}function tt(){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 l(n,Node)?Object.freeze({get writable(){return Ge(n)},get modal(){return Xe(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 rt(t,e,r,n){r&&l(e,String)&&(e={[e]:r==="-"?"":r});let o;e.className&&(o=e.className,delete e.className),o=[...t.classList].find(a=>a.startsWith("JQxClass-")||o&&a===o)||o||`JQxClass-${ye().slice(1)}`,n.editCssRule(`.${o}`,e),t.classList.add(o)}var rr=tt();function nt(t){return{factoryExtensions:nr(t),instanceExtensions:or(t)}}function nr(t){return{data(e){return{get all(){return new Proxy(e[0]?.dataset??{},Te)},set(r={}){if(!e.is.empty&&l(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&&l(r,Object))for(let[n,o]of Object.entries(r))e.setData({[n]:o});return e},remove(r){return e[0]?.removeAttribute(`data-${D(r)}`),e}}},dimensions(e){if(e.is.empty)return A.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?R(o):o},set(r,n=!1,o=!1){r=r.isJQx?r.HTML.get(1):r;let i=l(r,String);return r=i&&o?R(r):r,i&&(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=l(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=l(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 rr(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])[D(r)]},nwRule(r){return e.Style.byRule({rules:r})},byRule({classes2Apply:r=[],rules:n=[]}={}){let i=l(n,String)&&!r.length?n.split("{")[0].trim():"";if(n=n&&l(n,String)?[n]:n,r=r&&l(r,String)?[r]:r,(n?.length||r?.length)&&(n?.length&&t.editCssRules(...n),r))for(let a of r)e.addClass(a);return i?.startsWith(".")&&e.addClass(i.slice(1)),i?.startsWith("#")&&!e.attr("id")&&e.prop({id:i.slice(1)}),e}}}}}function or(t){return{addClass(e,...r){return F(e,n=>n&&r.forEach(o=>n.classList.add(o)))},after:ge,afterMe:ge,andThen(e,r,n=!1){if(!r||!l(r,String,Node,Proxy))return A.log("[JQx instance].[before(Me) | after(Me) | andThen]: invalid/-sufficient input."),e;r=r?.isJQx?r:l(r,Node)?t.virtual(r):t.virtual(O(r));let[o,i,a]=n?[0,"before",r.collection.concat(e.collection)]:[e.collection.length-1,"after",e.collection.concat(r.collection)];return e[o][i](...r.collection),e.collection=a,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&&H(o)){let i=o.trim(),S=!/^<(.+)[^>]+>$/m.test(i)?t.text(o):O(o);F(e,p=>p.append(n?S:J(S)))}j(o)&&F(e,i=>i.append(n?o:J(o))),o.isJQx&&!o.is.empty&&F(e,i=>o.collection.forEach(a=>i.append(n?a:J(a))))}return e},appendTo(e,r){switch(!0){case(!r.isJQx&&!l(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||l(e.node,Text,Comment))return e;if(!n&&H(r))return r=D(r),r==="class"?[...e.node.classList].join(" "):e.node.getAttribute(r);if(H(r)&&n)switch(r=D(r),!0){case r.startsWith("data-"):r={data:{[r.replace("data-","")]:n}};break;default:r={[r]:n}}return l(r,Object)&&!e.is.empty&&Ae(e.node,r),e},before:pe,beforeMe:pe,clear(e){return F(e,fe)},closest(e,r){let n=H(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 F(e,o=>rt(o,r,n,t))},duplicate(e,r=!1,n=document.body){switch(!0){case e.is.empty:return A.error("Duplicating an empty JQx instance is not possible"),e;default:let o=e.collection[0].cloneNode(!0);return o.childNodes.forEach(i=>{i.removeAttribute&&i?.removeAttribute("id")}),r?t(o).toDOM(n):t.virtual(o)}},each(e,r){return F(e,r)},empty(e){return F(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 F(e,r=>Z(r,{display:"none !important"}))},html(e,r,n){switch(!0){case(e.is.empty&&!H(r)):return"";case!H(r):return e.node?.getHTML()??"";default:let o=O(`<div>${r.isJQx?r.HTML.get(!0):r}</div>`);return F(e,a=>(a.textContent=n?a.textContent:"",a.insertAdjacentHTML(t.at.end,o.getHTML())))}},htmlFor(e,r,n="",o=!1){if(e.is.empty||!H(r)||!H(n))return e;let i=e.find$(r);if(i.length<1)return e;let a=O(`<span>${n}</span>`);return i.each(S=>{o||(S.textContent=""),S.insertAdjacentHTML(t.at.end,a?.getHTML())}),e},isEmpty(e){return!e.node},nth$(e,r){return e.single(r)},on(e,r,...n){switch(!0){case(e.is.empty||!l(r,String,Array)||!H(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||!l(r,String,Array)||!H(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(H(o)){o=o.trim();let a=!/^<(.+)[^>]+>$/m.test(o)?t.text(o):O(o);a=n?a:J(a),F(e,S=>S.prepend(a.cloneNode(!0)))}j(o)&&F(e,i=>i.prepend(n?o:J(o))),o.isJQx&&!o.is.empty&&(o.collection.length>1&&o.collection.reverse(),F(e,i=>F(o,a=>i.prepend(n?a:J(a)))),o.collection.reverse())}return e},prependTo(e,r){return r.isJQx||(r=t.virtual(r)),r.prepend(e),e},prop(e,r,n){if(l(r,String)&&!n)return r.startsWith("data")?e[0]?.dataset[r.slice(r.indexOf("-")+1)]:e[0]?.[r];let o=l(r,Object)?r:{[r]:n};for(let[i,a]of Object.entries(o)){if(i=i.trim(),a&&!ce(i)||!a)return!1;if(i.toLowerCase()==="id")return e[0].id=a;F(e,p=>{if(i.startsWith("data"))return p.dataset[i.slice(i.indexOf("-")+1)]=a;p[i]=a})}return e},remove(e,r){let n=i=>i.remove(),o=()=>e.collection=e.collection.filter(i=>document.documentElement.contains(i));if(r){let i=e.find$(r);return i.is.empty||(F(i,n),o()),e}return F(e,n),o(),e},rmAttr(e,...r){for(let n of r)e.node.removeAttribute(n);return e},removeClass(e,...r){return F(e,n=>{if(n)for(let o of r)n.classList.remove(o)})},renderTo(e,r,n){return r=l(r,HTMLElement)||r.isJQx?r:document.body,n=l(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||!l(n,HTMLElement)&&!n?.isJQx?(t.logger.error("JQx replace: invalid replacement value"),e):((n.isJQx||l(n,NodeList))&&(n=n[0]),o&&r&&(r=l(r,String)?o.querySelectorAll(r):r.isJQx?r.collection:r,l(r,HTMLElement,NodeList,Array)&&l(n,HTMLElement)&&(l(r,HTMLElement)?[r]:[...r]).forEach(i=>i.replaceWith(n.cloneNode(!0)))),e)},replaceClass(e,r,...n){return F(e,o=>{o.classList.remove(r);for(let i of n)o.classList.add(i)})},replaceMe(e,r){return e.replaceWith(r)},replaceWith(e,r){return r=l(r,Element)?r:r.isJQx?r[0]:void 0,r&&(e[0].replaceWith(r),e=t.virtual(r)),e},setData(e,r){return F(e,n=>de(n,r))},show(e){return F(e,r=>Z(r,{display:"revert-layer !important"}))},single(e,r){let n=e.collection.length>0;switch(r=r??0,!0){case(n&&l(r,String)):return e.find$(r);case(n&&l(r,Number)):return t(e.collection[r]);case n:return e.collection[0];default:return e}},style(e,r,n){return F(e,i=>{n&&l(r,String)&&(r={[r]:n||"none"}),Z(i,r)})},text(e,r,n=!1){switch(!0){case e.isEmpty():return e;case!l(r,String):return e.node.textContent;default:return F(e,o=>o.textContent=n?o.textContent+r:r)}},toDOM(e,r=document.body,n=N.BeforeEnd){return e.isVirtual=!1,W(e.collection,r,n),e},toggleClass(e,r){return F(e,n=>n.classList.toggle(r))},toNodeList(e){return[...e.collection].map(r=>document.importNode(r,!0))},trigger(e,r,n,o){n=l(n,Function)?n:Event,o=l(o,Object)?{...o,bubbles:o.bubbles??!0}:{bubbles:!0};let i=new n(r,o);return e.is.empty||e.each(a=>a.dispatchEvent(i)),e},val(e,r){switch(!0){case(e.is.empty||!l(e.node,HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement)):return e;case!l(r,String):return e.node.value;default:return e.node.value=l(r,String)?r:"",e}}}}var Oe,Se,{isComment:pn,isText:yn,isHtmlString:bn,isArrayOfHtmlElements:hn,isArrayOfHtmlStrings:Sn,ElemArray2HtmlString:xn,cssRuleEdit:De,addFn:ir}=lr();function lr(){return{...et(),addFn:sr}}function sr(t,e){return t=t?.trim(),!H(t)||!l(e,Function)?A.error("JQx.fn: method invalid parameter(s)"):Se[t]=(r,...n)=>e(r,...n)}function ar(t){return function(e,r,n){if(e=e?.trim(),!H(e)||!l(r,Function))return t.error("JQx.staticFn: invalid parameter(s)");let o=n?{get(){return r()}}:{value(...i){return r(...i)}};try{Object.defineProperty(t,e,o)}catch{return t.warn(`JQx.staticFn: extension [${e}] already exists`)}return A.log(`JQx: added static extension function [${e}]`)}}function q(t){return new Proxy(t,Object.freeze({get:(e,r)=>ur(e,r,t)}))}function ot(t,e){return(...r)=>l(t,Function)&&t(q(e),...r)}function ur(t,e,r){switch(!0){case l(e,Symbol):return z({trial:()=>t[e],whenError:()=>t});case l(+e,Number):return t.collection?.[e]||void 0;case e in Oe:return ot(Oe[e],r)();case e in Se:return ot(Se[e],r);default:return t[e]}}function st(t){let e=gr(t);for(let[r,n]of Object.entries(Object.getOwnPropertyDescriptors(e)))Object.defineProperty(t,r,n);return t}function cr(t){return{allow(e){let r=/-/.test(e),n=r&&e;e=r?Y(e):e.toLowerCase(),I.allowTag(e),Object.defineProperties(t,Ie(e,!0,t,n))},prohibit(e){e=e.toLowerCase(),I.prohibitTag(e),Object.defineProperties(t,Ie(e,!1,t))}}}function it(...t){if(t.length===1){let e=String(t.shift().trim());t=e.startsWith("!")?[e.slice(1,-1)]:e.split(",").map(r=>r.trim())}for(let e of t.map(r=>r.startsWith("!")?r.slice(1,-1):r))De(e,{removeRule:1})}function fr(t){return function(e,r,n){r=r?.isJQx?r?.[0]:r,n=n&&Object.values(N).find(i=>n===i);let o=t(e,document.createElement("br"));if(r&&!l(r,HTMLBRElement))for(let i of o.collection)n?r.insertAdjacentElement(n,i):r.append(i);return o}}function dr(...t){let e={};for(let r of t){let n=Object.getOwnPropertyDescriptors(r);for(let[o,i]of Object.entries(n))!(o in e)&&Object.defineProperty(e,o,{...i,enumerable:!1})}return e}function mr(t,e,r,n){return t=D(n||t.toLowerCase()),{get(){return(...o)=>{let i=e&&r.virtual(k(ee[t](...o)))||void 0,S=!l(i?.node,Comment,Text,void 0)?Fe(i):"";return A.log(e?`JQx: created (virtual) instance from [JQx].${t} ${S}`:`JQx: ${t.toUpperCase()} is prohibited. Use [JQx].allowTag if necessary.`),i}},enumerable:!1,configurable:!0}}function Ie(t,e,r,n){t=t.toLowerCase();let o=mr(t,e,r,n);return n?{[n]:o,[Y(n)]:o}:{[t]:o,[t.toUpperCase()]:o}}function gr(t){return dr(Object.entries(I.tagsRaw).reduce(pr(t),{}),vr(t))}function pr(t){return function(e,[r,n]){return Object.defineProperties(e,Ie(r,n,t)),e}}function yr(t){return function(e,r,...n){l(r,Function)&&(n.push(r),r=void 0),t({type:e,selector:r,handlers:n})}}function br(t){return function(e){let{type:r,types:n,origin:o,selector:i,handler:a,handlers:S,node:p,name:C,capture:f,once:h,about:y}=e;a=S||a,r=n||r,i=o||i;let x=He(r),m=C;a=l(a,Function)?[a]:a;let c={type:x,selector:i||o,capture:f,name:m,once:h,node:p,about:y};switch(!0){case(l(x,Array)&&x.length>0):for(let b of x)c.type=b,lt(a,c,t);break;default:return lt(a,c,t)}}}function lt(t,e,r){for(let n of t)r.listen({...e,handler:n})}function hr(t){return function(e,r){return r=H(r)&&r,e=H(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 xr(t){let e=(f,h)=>De(f,h),r=function(f){return _({createWithId:f||`jqx${ye()}`})},n=function(...f){for(let h of f)De(h)},o=cr(t),i=le(t),a=br(i);return{editCssRule:e,createStyle:r,editCssRules:n,allowProhibit:o,handle:a,capturedHandling:a,log:(...f)=>A.on.log(...f).off,warn:(...f)=>A.on.warn(...f).off,error:(...f)=>A.on.error(...f).off,handlerWrapper:i}}function vr(t){let{factoryExtensions:e,instanceExtensions:r}=nt(t);Oe=e,Se=r;let{editCssRule:n,createStyle:o,editCssRules:i,allowProhibit:a,handle:S,capturedHandling:p,log:C,warn:f,error:h,handlerWrapper:y}=xr(t),x=hr(t),m=ar(t);return{log:C,warn:f,error:h,editCssRules:i,createStyle:o,editStylesheet:o,editCssRule:n,escHtml:R,logger:A,text(c,b=!1){return b?t.comment(c):document.createTextNode(c)},node(c,b=document){return b.querySelector(c,b)},nodes(c,b=document){return[...b.querySelectorAll(c,b)]},clearAllTimers:$e,get staticFn(){return function(c,b,L){return m(c,b,L)}},get toBool(){return Ne},get getNamedListener(){return x},get virtual(){return fr(t)},get allowTag(){return a.allow},get prohibitTag(){return a.prohibit},get removeCssRule(){return it},get removeCssRules(){return it},get delegate(){return yr(p)},get delegateCaptured(){return p},get handle(){return p},get listen(){return y.listen},get at(){return N},get setStyle(){return n},get fn(){return ir},get lenient(){return I.allowUnknownHtmlTags},get IS(){return l},get Popup(){return Sr(t)},get listenerStore(){return y.ListenerStore}}}var at=st(wr());function wr(){return function(e,r,n=N.BeforeEnd){if(e?.isJQx)return e;let o=l(r,HTMLBRElement);r=(!o&&r&&r.isJQx?r[0]:r)||document.body,n=n&&Object.values(N).find(f=>n===f)?n:void 0;let i=X(e),S=!i&&he(e)||i,p={collection:me(e)??[],isVirtual:o,isJQx:!0},C=K(p.collection);if(p.collection.length&&C)return o||p.collection.forEach(f=>{r.contains(f)||W([f],r,n)}),q(p);if(S){if([e].flat().forEach(f=>p.collection.push(O(f))),p.collection.length>0){let f=p.collection.filter(m=>m?.dataset?.jqxcreationerror);p.collection=p.collection.filter(m=>!m?.dataset?.jqxcreationerror);let y=p.collection.map(m=>`${String(m.constructor).split(/function|\(/)[1].trim()}`).length>1;p=q(p);let x=p.collection.length>0?qe(p):"sanitized: no elements remaining";A.log(`JQx: created ${p.isVirtual?"(virtual)":""} instance from ${y?"array of ":""}HTML string${y?"s":""} ${x}`),p.isVirtual||W(p.collection,r,n)}return p}return Me(e,r,p),q(p)}}var Er=at;return bt(Cr);})();
|
|
13
|
+
`)}function kt(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 Wt(t){return kt(Qt(t))}function Be(t,e){return t?.replace("::",":")===e?.replace("::",":")}var Ee=!1,zt={on:()=>Ee=!0,off:()=>Ee=!1},D={tagsRaw:V,allowUnknownHtmlTags:zt,isAllowed(t){if(Ee)return!0;let e=s(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 Bt=!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 Vt(t){if(Bt&&Object.keys(t.removed).length){let e=Object.entries(t.removed).reduce((r,[n,o])=>[...r,`${j(n)} => ${o}`],[]).join("\\000A");F.error(`JQx: HTML creation error(s): ${e}`)}}function Ut(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)||D.isAllowed(e)}function Q(t){let e={rawHTML:t?.parentElement?.getHTML()??"no html",removed:{}};return s(t,HTMLElement)&&[...t.childNodes].forEach(r=>{if(r?.children?.length&&Q(r),r?.attributes){let o=s(r,SVGElement)?z.svg:z.html;[...(r??{attributes:[]}).attributes].forEach(i=>{let a=i.name.trim().toLowerCase(),w=i.value.trim().toLowerCase().replace(re.whiteSpace,""),f=a==="href"?!re.validURL.test(w):re.notAllowedValues.test(w),E=a.startsWith("data")?!re.data.test(a):!!o[a];if(f||E){let c=ne(i.value||"none",60);c+=c.length===60?"...":"",e.removed[`${i.name}`]=`attribute/property/value not allowed, removed. Value: ${c}`,r.removeAttribute(i.name)}})}if(!(Ut(r)||r.constructor===CharacterData||r.constructor===Comment)){let o=(r?.outerHTML||r?.textContent).trim(),i=ne(o,60)??"EMPTY";i+=i.length===60?"...":"",e.removed[`<${r.nodeName?.toLowerCase()}>`]=`not allowed, not rendered. Value: ${i}`,r.remove()}}),Vt(e),t}function _t(t){let e=document.createElement("div");return e.insertAdjacentHTML(H.end,t),e.childNodes.length?Q(e):void 0}function Gt(t,e,r){switch(!0){case s(t,Comment):return e.insertAdjacentHTML(r,`<!--${t.data}-->`);case s(t,Text):return e.insertAdjacentText(r,t.data||t.textContent);default:return}}function k(t=[],e=document.body,r=H.BeforeEnd){return r=r||H.BeforeEnd,e=e?.isJQx?e.node:e||document.body,t.reduce((n,o)=>{let i=I(o)&&Zt(o,e,r);return i?[...n,i]:n},[])}function Zt(t,e=document.body,r=H.BeforeEnd){return r=r||H.BeforeEnd,e=e?.isJQx?e?.[0]:e,s(t,Comment,Text)?Gt(t,e,r):s(t,HTMLElement)?e.insertAdjacentElement(r,t):void 0}function P(t){if(s(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||s(e,String)&&!/^<(.+)[^>]+>/m.test(e))return document.createTextNode(r??e);let n=_t(t);return n.childNodes.length<1?P(`<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(...je);let e=[],[r,n]=[t("#jqxPopupContent"),t.node("#jqxPopup")],o={};return t.handle({type:"click, cancel",handlers:g,name:"genericPopupCloseHandler",capture:!0,about:"A generic handler for JQx popups"}),Object.freeze({show:i,remove:a,removeModal:h});function i(m){if(n.open)switch(!0){case w(m):return;default:return a(),setTimeout(()=>i(m),200)}o={...m};let{content:b}=o;return t.IS(b,String,HTMLElement)||b?.isJQx?f():!0}function a(){return o.modal?p(o.warnMessage):E()}function w(m){for(let[b,C]of Object.entries(o))if(C!==m[b])return!1;return!0}function f(){r.clear();let{content:m,modal:b,closeAfter:C}=o;b=t.IS(b,Boolean)?b:!1;let N=b?"":t.div({id:"closeHandleIcon"});r.append(N,t.IS(m,String)?t.div(m):m),n.showModal(),!b&&t.IS(C,Number)&&S(a,C)}function E(){if(n.close(o.returnValue),c(),t.IS(o.callback,Function))return e.push(setTimeout(()=>o.callback(o.returnValue),200));o={}}function c(){e.forEach(m=>clearTimeout(m)),e=[]}function h({callback:m,value:b}={}){o.returnValue=b,o.modal=!1,o.callback=m||o.callback,a()}function g({evt:m}){if(!(Object.keys(o).length<1||!n.open)&&(m.type==="cancel"&&o.modal&&m.preventDefault(),m.target.closest("#closeHandleIcon")||!m.target.closest("#jqxPopupContent")))return o.activeTimer&&clearTimeout(o.activeTimer),a()}function S(m,b){t.IS(m,Function)&&t.IS(b,Number)&&b>0&&(c(),e.push(setTimeout(m,b*1e3)))}function p(m){if(!t.IS(m,String,HTMLElement,Proxy))return;let b=r.find$(".warn");switch(!0){case b.is.empty:b=t.div({class:"warn"},m);default:r.append(b.addClass("active")),S(()=>r.find$(".warn").removeClass("active"),2)}}}function le(t){let e={},r="anonymous_";function n(c){if(c){let{handler:h,capture:g,type:S}=c;document.addEventListener(S,h,{capture:g})}}function o(c){if(c){let{type:h,handler:g,capture:S}=c;document.removeEventListener(h,g,{capture:S})}}function i(c,h,g,S){return function(p){if(!A(h))return c({evt:p});let m=p.target.closest(h);if(m){let b=t(m);c({self:b,me:b,evt:p}),g&&f(p.type,S)}return!0}}function a(c){return e[c]=e[c]||{},e[c]}function w(c,h){return Object.entries(a(c)).find(([g])=>g===h)}function f(c,h){let g=w(c,h);g&&(o(g[1]),delete e[c][h],delete se[h],F.warn(`Removed listener [${h}] for event type [${c}].`))}function E(c){let{type:h,handler:g,name:S,capture:p,once:m,selector:b,node:C,about:N}=c;e[h]=e[h]||{};let u=Ce(S||g.name),y=g;if(C instanceof HTMLElement){let x=C.dataset.hid||u;C.dataset.hid=x,b=`[data-hid=${x}]`}switch(!0){case!e[h][u]:return F.log(`JQx: created listener for event type ${h}, with handler name ${u}`),e[h][u]={name:u,handler:i(g,b,m,u),capture:Ve(h,p),once:!!m,type:h,initialHandler:y,selector:!!b&&b||!1,about:!!N&&N||!1,unListen(){f(h,u)}},e[h][u];default:return console.warn(`The listener [${u}] for [${h}] exists, it is not re-assigned.`)}}return{remove(...c){return f(...c)},listen:function(c){let{type:h,handler:g}=c;if(!A(h)||!s(g,Function))return;let S=E(c);if(S)return n(S),{type:h,name:S.name,unListen(){f(h,S.name)}}},get ListenerStore(){return Object.freeze({...e})}}}var F=Kt(),Yt=["load","unload","scroll","focus","blur","DOMNodeRemovedFromDocument","DOMNodeInsertedIntoDocument","loadstart","progress","error","abort","load","loadend","pointerenter","pointerleave","readystatechange"],H=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]}})),Xt=[...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}`)),Te=Object.freeze({get(t,e){return t[Y(e)]||t[e]},enumerable:!1,configurable:!1}),se={};function Fe(){let t=setTimeout(()=>{});for(;t>=0;)clearTimeout(t--)}function Ce(t){return A(t)&&!/^handler|handlers$/gi.test(t.trim())?t.trim():Ue()}function $e(t){let e=!!t.node&&!s(t,Text,Comment);switch(!0){case e:let r=t.node.dataset?Object.keys(t.node.dataset).map(i=>`[data-${i}]`):[],o=[t.attr("id")&&`#${t?.attr("id")}`||void 0,t.attr("class")&&t?.attr("class").split(" ").map(i=>`.${i}`).join(", ")||void 0,r.length>0&&r.join(", ")||void 0].filter(i=>!!i).join(", ")||[];return o.length?`(${o})`:"";default:return""}}function Ue(t){let e=`anonymous_${Math.random().toString(36).slice(2)}`;return se[e]?Ue():(se[e]=e,e)}function Ve(t,e){return!!Yt.find(r=>r===t)||!!e}function ce(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 A(t,e=1){return e=s(e,Number)&&e||1,s(t,String)&&t.length>=e}function ne(t,e=120){return oe(t,e).replace(/</g,"<")}function oe(t,e=120){return`${t}`.trim().slice(0,e).replace(/>\s+</g,"><").replace(/</g,"<").replace(/\s{2,}/g," ").replace(/\n/g,"\\n")+(t.length>e?" …":"").trim()}function j(t){switch(!0){case s(t,String):let e=document.createElement("div");return e.append(t),e.innerHTML;default:return t}}function Le(t){return s(t,String)&&Object.assign(document.createElement("textarea"),{innerHTML:t}).textContent||t}function Kt(){let[t,e]=[!1,!0],r=[],n={get on(){return t=!0,n},get off(){return t=!1,n},get disable(){return e=!0,n},get enable(){return e=!1,n},get backLog(){return r}};function o(){e=!0}function i(){e=!1}function a(...E){return r.unshift(...E.map(c=>`${ue()} \u2A3B ${Le(c)}`)),console.error(r.slice(0,E.length).join(`
|
|
14
|
+
`)),n}function w(...E){return r.unshift(...E.map(c=>`${ue()} \u26A0 ${Le(c)}`)),console.warn(r.slice(0,E.length).join(`
|
|
15
|
+
`)),n}function f(...E){let c=E.map(h=>`${ue()} \u2714 ${Le(h)}`);switch(!e&&r.unshift(...c),t){case!0:console.log(c.join(`
|
|
16
|
+
`));default:return n}}return Object.defineProperties(n,{log:{value:f,enumerable:!1},error:{value:a,enumerable:!1},warn:{value:w,enumerable:!1}}),Object.freeze(n)}function ue(){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=M(r),r.startsWith("data"))return de(t,n);s(n,String)&&ce(r)&&t.setAttribute(r,n.split(/[, ]/)?.join(" "))}}function de(t,e){if(t&&s(e,Object))for(let[r,n]of Object.entries(e))t.setAttribute(`data-${M(r)}`,n)}function me(t){return t?s(t,Proxy)?[t.EL]:s(t,NodeList)?[...t]:I(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 I(t){return s(t,Text,HTMLElement,Comment)}function Z(t,e){if(s(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(M(r),n,o)}}function R(t){let e=t.cloneNode(!0);return e.removeAttribute&&e.removeAttribute("id"),t.isConnected?t.remove():t=null,e}function _e(t){if(!s(t,HTMLElement))return;let e=t.style,r=getComputedStyle(t),n=!![e.visibility,r.visibility].includes("hidden"),o=!![e.display,r.display].includes("none"),i=!!t.hidden,a=parseInt(r.height)<1||parseInt(r.width)<1,w=t.offsetTop<0||t.offsetLeft+t.offsetWidth<0||t.offsetLeft>document.body.offsetWidth,f=+r.opacity==0||+(e.opacity||1)==0;return!(i||w||f||o||n||a)}function Ge(t){return t?.isConnected?!![...document.querySelectorAll(":is(:read-write)")].find(e=>e===t):!1}function Ze(t){return t?.filter(e=>e).reduce((e,r)=>e.concat(Pe(r)?`<!--${r.data}-->`:be(r)?r.textContent:r.outerHTML),"")}function ae(t,e=2){return`${t}`.padStart(e,"0")}function Ye(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(Xt).slice(0,8).join("")}`}function He(t){return t=s(t,String)&&/,/.test(t)?t.split(",").map(e=>e.trim().toLowerCase()).filter(e=>e.length>0):t,s(t,Array)?t:s(t,String)&&t?.trim().toLowerCase()||""}function Xe(t){return t?.isConnected?!![...document.querySelectorAll(":is(:modal)")].find(e=>e===t):!1}function Ne(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=Ye(e);[t[e],t[r]]=[t[r],t[e]]}return t}function Y(t){return s(t,String)?t.toLowerCase().split("-").map((e,r)=>r&&`${er(e)}`||e).join(""):t}function M(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/^-|-$/,"")}function er([t,...e]){return`${t.toUpperCase()}${e.join("")}`}function be(t){return s(t,Comment,Text)}function Pe(t){s(t,Comment)}function Ke(t){return s(t,Text)}function X(t){return s(t,String)&&/^<|>$/.test(`${t}`.trim())}function K(t){return s(t,Array)&&!t?.find(e=>!I(e))}function he(t){return s(t,Array)&&!t?.find(e=>!X(e))}function T(t,e){let r=t.collection.filter(n=>!be(n));for(let n=0;n<r.length;n+=1)e(r[n],n);return t}function qe(t){return t.node?s(t.node,Comment)?`<!--${t.node.textContent}-->`:t.HTML.get(1).split(">")[0]+">...":""}function Me(t,e,r){let n=e!==document.body&&s(t,String)&&t.toLowerCase()!=="body"?e:document;try{r.collection=[...n.querySelectorAll(t)]}catch{F.warn(`JQx: Invalid CSS querySelector. [${s(t,String)?t:"Not a string!"}]`)}}function et(){return{isCommentOrTextNode:be,isNode:I,isComment:Pe,isText:Ke,isHtmlString:X,isArrayOfHtmlElements:K,isArrayOfHtmlStrings:he,ElemArray2HtmlString:Ze,input2Collection:me,setCollectionFromCssSelector:Me,cssRuleEdit:_({createWithId:"JQxStylesheet"})}}function tt(){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 s(n,Node)?Object.freeze({get writable(){return Ge(n)},get modal(){return Xe(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 rt(t,e,r,n){r&&s(e,String)&&(e={[e]:r==="-"?"":r});let o;e.className&&(o=e.className,delete e.className),o=[...t.classList].find(a=>a.startsWith("JQxClass-")||o&&a===o)||o||`JQxClass-${ye().slice(1)}`,n.editCssRule(`.${o}`,e),t.classList.add(o)}var tr=tt();function nt(t){return{factoryExtensions:rr(t),instanceExtensions:nr(t)}}function rr(t){return{data(e){return{get all(){return new Proxy(e[0]?.dataset??{},Te)},set(r={}){if(!e.is.empty&&s(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&&s(r,Object))for(let[n,o]of Object.entries(r))e.setData({[n]:o});return e},remove(r){return e[0]?.removeAttribute(`data-${M(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=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?j(o):o},set(r,n=!1,o=!1){r=r.isJQx?r.HTML.get(1):r;let i=s(r,String);return r=i&&o?j(r):r,i&&(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=s(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=s(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 tr(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])[M(r)]},nwRule(r){return e.Style.byRule({rules:r})},byRule({classes2Apply:r=[],rules:n=[]}={}){let i=s(n,String)&&!r.length?n.split("{")[0].trim():"";if(n=n&&s(n,String)?[n]:n,r=r&&s(r,String)?[r]:r,(n?.length||r?.length)&&(n?.length&&t.editCssRules(...n),r))for(let a of r)e.addClass(a);return i?.startsWith(".")&&e.addClass(i.slice(1)),i?.startsWith("#")&&!e.attr("id")&&e.prop({id:i.slice(1)}),e}}}}}function nr(t){return{addClass(e,...r){return T(e,n=>n&&r.forEach(o=>n.classList.add(o)))},after:ge,afterMe:ge,andThen(e,r,n=!1){if(!r||!s(r,String,Node,Proxy))return F.log("[JQx instance].[before(Me) | after(Me) | andThen]: invalid/-sufficient input."),e;r=r?.isJQx?r:s(r,Node)?t.virtual(r):t.virtual(P(r));let[o,i,a]=n?[0,"before",r.collection.concat(e.collection)]:[e.collection.length-1,"after",e.collection.concat(r.collection)];return e[o][i](...r.collection),e.collection=a,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&&A(o)){let i=o.trim(),w=!/^<(.+)[^>]+>$/m.test(i)?t.text(o):P(o);T(e,f=>f.append(n?w:R(w)))}I(o)&&T(e,i=>i.append(n?o:R(o))),o.isJQx&&!o.is.empty&&T(e,i=>o.collection.forEach(a=>i.append(n?a:R(a))))}return e},appendTo(e,r){switch(!0){case(!r.isJQx&&!s(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||s(e.node,Text,Comment))return e;if(!n&&A(r))return r=M(r),r==="class"?[...e.node.classList].join(" "):e.node.getAttribute(r);if(A(r)&&n)switch(r=M(r),!0){case r.startsWith("data-"):r={data:{[r.replace("data-","")]:n}};break;default:r={[r]:n}}return s(r,Object)&&!e.is.empty&&Ae(e.node,r),e},before:pe,beforeMe:pe,clear(e){return T(e,fe)},closest(e,r){let n=A(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 T(e,o=>rt(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(i=>{i.removeAttribute&&i?.removeAttribute("id")}),r?t(o).toDOM(n):t.virtual(o)}},each(e,r){return T(e,r)},empty(e){return T(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 T(e,r=>Z(r,{display:"none !important"}))},html(e,r,n){switch(!0){case(e.is.empty&&!A(r)):return"";case!A(r):return e.node?.getHTML()??"";default:let o=P(`<div>${r.isJQx?r.HTML.get(!0):r}</div>`);return T(e,a=>(a.textContent=n?a.textContent:"",a.insertAdjacentHTML(t.at.end,o.getHTML())))}},htmlFor(e,r,n="",o=!1){if(e.is.empty||!A(r)||!A(n))return e;let i=e.find$(r);if(i.length<1)return e;let a=P(`<span>${n}</span>`);return i.each(w=>{o||(w.textContent=""),w.insertAdjacentHTML(t.at.end,a?.getHTML())}),e},isEmpty(e){return!e.node},nth$(e,r){return e.single(r)},on(e,r,...n){switch(!0){case(e.is.empty||!s(r,String,Array)||!A(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||!s(r,String,Array)||!A(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(A(o)){o=o.trim();let a=!/^<(.+)[^>]+>$/m.test(o)?t.text(o):P(o);a=n?a:R(a),T(e,w=>w.prepend(a.cloneNode(!0)))}I(o)&&T(e,i=>i.prepend(n?o:R(o))),o.isJQx&&!o.is.empty&&(o.collection.length>1&&o.collection.reverse(),T(e,i=>T(o,a=>i.prepend(n?a:R(a)))),o.collection.reverse())}return e},prependTo(e,r){return r.isJQx||(r=t.virtual(r)),r.prepend(e),e},prop(e,r,n){if(s(r,String)&&!n)return r.startsWith("data")?e[0]?.dataset[r.slice(r.indexOf("-")+1)]:e[0]?.[r];let o=s(r,Object)?r:{[r]:n};for(let[i,a]of Object.entries(o)){if(i=i.trim(),a&&!ce(i)||!a)return!1;if(i.toLowerCase()==="id")return e[0].id=a;T(e,f=>{if(i.startsWith("data"))return f.dataset[i.slice(i.indexOf("-")+1)]=a;f[i]=a})}return e},remove(e,r){let n=i=>i.remove(),o=()=>e.collection=e.collection.filter(i=>document.documentElement.contains(i));if(r){let i=e.find$(r);return i.is.empty||(T(i,n),o()),e}return T(e,n),o(),e},rmAttr(e,...r){for(let n of r)e.node.removeAttribute(n);return e},removeClass(e,...r){return T(e,n=>{if(n)for(let o of r)n.classList.remove(o)})},renderTo(e,r,n){return r=s(r,HTMLElement)||r.isJQx?r:document.body,n=s(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||!s(n,HTMLElement)&&!n?.isJQx?(t.logger.error("JQx replace: invalid replacement value"),e):((n.isJQx||s(n,NodeList))&&(n=n[0]),o&&r&&(r=s(r,String)?o.querySelectorAll(r):r.isJQx?r.collection:r,s(r,HTMLElement,NodeList,Array)&&s(n,HTMLElement)&&(s(r,HTMLElement)?[r]:[...r]).forEach(i=>i.replaceWith(n.cloneNode(!0)))),e)},replaceClass(e,r,...n){return T(e,o=>{o.classList.remove(r);for(let i of n)o.classList.add(i)})},replaceMe(e,r){return e.replaceWith(r)},replaceWith(e,r){return r=s(r,Element)?r:r.isJQx?r[0]:void 0,r&&(e[0].replaceWith(r),e=t.virtual(r)),e},setData(e,r){return T(e,n=>de(n,r))},show(e){return T(e,r=>Z(r,{display:"revert-layer !important"}))},single(e,r){let n=e.collection.length>0;switch(r=r??0,!0){case(n&&s(r,String)):return e.find$(r);case(n&&s(r,Number)):return t(e.collection[r]);case n:return e.collection[0];default:return e}},style(e,r,n){return T(e,i=>{n&&s(r,String)&&(r={[r]:n||"none"}),Z(i,r)})},text(e,r,n=!1){switch(!0){case e.isEmpty():return e;case!s(r,String):return e.node.textContent;default:return T(e,o=>o.textContent=n?o.textContent+r:r)}},toDOM(e,r=document.body,n=H.BeforeEnd){return e.isVirtual=!1,k(e.collection,r,n),e},toggleClass(e,r){return T(e,n=>n.classList.toggle(r))},toNodeList(e){return[...e.collection].map(r=>document.importNode(r,!0))},trigger(e,r,n,o){n=s(n,Function)?n:Event,o=s(o,Object)?{...o,bubbles:o.bubbles??!0}:{bubbles:!0};let i=new n(r,o);return e.is.empty||e.each(a=>a.dispatchEvent(i)),e},val(e,r){switch(!0){case(e.is.empty||!s(e.node,HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement)):return e;case!s(r,String):return e.node.value;default:return e.node.value=s(r,String)?r:"",e}}}}var Oe,Se,{isComment:gn,isText:pn,isHtmlString:yn,isArrayOfHtmlElements:bn,isArrayOfHtmlStrings:hn,ElemArray2HtmlString:Sn,cssRuleEdit:De,addFn:or}=ir();function ir(){return{...et(),addFn:lr}}function lr(t,e){return t=t?.trim(),!A(t)||!s(e,Function)?F.error("JQx.fn: method invalid parameter(s)"):Se[t]=(r,...n)=>e(r,...n)}function sr(t){return function(e,r,n){if(e=e?.trim(),!A(e)||!s(r,Function))return t.error("JQx.staticFn: invalid parameter(s)");let o=n?{get(){return r()}}:{value(...i){return r(...i)}};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 q(t){return new Proxy(t,Object.freeze({get:(e,r)=>ar(e,r,t)}))}function ot(t,e){return(...r)=>s(t,Function)&&t(q(e),...r)}function ar(t,e,r){switch(!0){case s(e,Symbol):return W({trial:()=>t[e],whenError:()=>t});case s(+e,Number):return t.collection?.[e]||void 0;case e in Oe:return ot(Oe[e],r)();case e in Se:return ot(Se[e],r);default:return t[e]}}function st(t){let e=mr(t);for(let[r,n]of Object.entries(Object.getOwnPropertyDescriptors(e)))Object.defineProperty(t,r,n);return t}function ur(t){return{allow(e){let r=/-/.test(e),n=r&&e;e=r?Y(e):e.toLowerCase(),D.allowTag(e),Object.defineProperties(t,Ie(e,!0,t,n))},prohibit(e){e=e.toLowerCase(),D.prohibitTag(e),Object.defineProperties(t,Ie(e,!1,t))}}}function it(...t){if(t.length===1){let e=String(t.shift().trim());t=e.startsWith("!")?[e.slice(1,-1)]:e.split(",").map(r=>r.trim())}for(let e of t.map(r=>r.startsWith("!")?r.slice(1,-1):r))De(e,{removeRule:1})}function cr(t){return function(e,r,n){r=r?.isJQx?r?.[0]:r,n=n&&Object.values(H).find(i=>n===i);let o=t(e,document.createElement("br"));if(r&&!s(r,HTMLBRElement))for(let i of o.collection)n?r.insertAdjacentElement(n,i):r.append(i);return o}}function fr(...t){let e={};for(let r of t){let n=Object.getOwnPropertyDescriptors(r);for(let[o,i]of Object.entries(n))!(o in e)&&Object.defineProperty(e,o,{...i,enumerable:!1})}return e}function dr(t,e,r,n){return t=M(n||t.toLowerCase()),{get(){return(...o)=>{let i=e&&r.virtual(Q(ee[t](...o)))||void 0,w=!s(i?.node,Comment,Text,void 0)?$e(i):"";return F.log(e?`JQx: created (virtual) instance from [JQx].${t} ${w}`:`JQx: ${t.toUpperCase()} is prohibited. Use [JQx].allowTag if necessary.`),i}},enumerable:!1,configurable:!0}}function Ie(t,e,r,n){t=t.toLowerCase();let o=dr(t,e,r,n);return n?{[n]:o,[Y(n)]:o}:{[t]:o,[t.toUpperCase()]:o}}function mr(t){return fr(Object.entries(D.tagsRaw).reduce(gr(t),{}),xr(t))}function gr(t){return function(e,[r,n]){return Object.defineProperties(e,Ie(r,n,t)),e}}function pr(t){return function(e,r,...n){s(r,Function)&&(n.push(r),r=void 0),t({type:e,selector:r,handlers:n})}}function yr(t){return function(e){let{type:r,types:n,origin:o,selector:i,handler:a,handlers:w,node:f,name:E,capture:c,once:h,about:g}=e;a=w||a,r=n||r,i=o||i;let S=He(r),p=E;a=s(a,Function)?[a]:a;let m={type:S,selector:i||o,capture:c,name:p,once:h,node:f,about:g};switch(!0){case(s(S,Array)&&S.length>0):for(let b of S)m.type=b,lt(a,m,t);break;default:return lt(a,m,t)}}}function lt(t,e,r){for(let n of t)r.listen({...e,handler:n})}function br(t){return function(e,r){return r=A(r)&&r,e=A(e)&&e,r&&e&&t.listenerStore[e][r]}}function hr(t){return t.activePopup||Object.defineProperty(t,"activePopup",{value:ie(t),enumerable:!1}),t.activePopup}function Sr(t){let e=(c,h)=>De(c,h),r=function(c){return _({createWithId:c||`jqx${ye()}`})},n=function(...c){for(let h of c)De(h)},o=ur(t),i=le(t),a=yr(i);return{editCssRule:e,createStyle:r,editCssRules:n,allowProhibit:o,handle:a,capturedHandling:a,log:(...c)=>F.on.log(...c).off,warn:(...c)=>F.on.warn(...c).off,error:(...c)=>F.on.error(...c).off,handlerWrapper:i}}function xr(t){let{factoryExtensions:e,instanceExtensions:r}=nt(t);Oe=e,Se=r;let{editCssRule:n,createStyle:o,editCssRules:i,allowProhibit:a,handle:w,capturedHandling:f,log:E,warn:c,error:h,handlerWrapper:g}=Sr(t),S=br(t),p=sr(t);return{log:E,warn:c,error:h,editCssRules:i,createStyle:o,editStylesheet:o,editCssRule:n,escHtml:j,logger:F,text(m,b=!1){return b?t.comment(m):document.createTextNode(m)},node(m,b=document){return b.querySelector(m,b)},nodes(m,b=document){return[...b.querySelectorAll(m,b)]},clearAllTimers:Fe,get staticFn(){return function(m,b,C){return p(m,b,C)}},get toBool(){return Ne},get getNamedListener(){return S},get virtual(){return cr(t)},get allowTag(){return a.allow},get prohibitTag(){return a.prohibit},get removeCssRule(){return it},get removeCssRules(){return it},get delegate(){return pr(f)},get delegateCaptured(){return f},get handle(){return f},get listen(){return g.listen},get at(){return H},get setStyle(){return n},get fn(){return or},get lenient(){return D.allowUnknownHtmlTags},get IS(){return s},get Popup(){return hr(t)},get listenerStore(){return g.ListenerStore}}}var at=st(vr());function vr(){return function(e,r,n=H.BeforeEnd){if(e?.isJQx)return e;let o=s(r,HTMLBRElement);r=(!o&&r&&r.isJQx?r[0]:r)||document.body,n=n&&Object.values(H).find(c=>n===c)?n:void 0;let i=X(e),w=!i&&he(e)||i,f={collection:me(e)??[],isVirtual:o,isJQx:!0},E=K(f.collection);if(f.collection.length&&E)return o||f.collection.forEach(c=>{r.contains(c)||k([c],r,n)}),q(f);if(w){if([e].flat().forEach(c=>f.collection.push(P(c))),f.collection.length>0){let c=f.collection.filter(p=>p?.dataset?.jqxcreationerror);f.collection=f.collection.filter(p=>!p?.dataset?.jqxcreationerror);let g=f.collection.map(p=>`${String(p.constructor).split(/function|\(/)[1].trim()}`).length>1;f=q(f);let S=f.collection.length>0?qe(f):"sanitized: no elements remaining";F.log(`JQx: created ${f.isVirtual?"(virtual)":""} instance from ${g?"array of ":""}HTML string${g?"s":""} ${S}`),f.isVirtual||k(f.collection,r,n)}return f}return Me(e,r,f),q(f)}}var wr=at;return yt(Er);})();
|
package/Bundle/jqx.min.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
var{IS:l,maybe:z,$Wrap:yr,isNothing:br,xProxy:hr,addSymbolicExtensions:Sr}=ft({useSymbolicExtensions:!1});function ft(t={}){let{useSymbolicExtensions:e}=t,{xProxy:r,addSymbolicExtensions:n}=dt(a,p,e),o=L(),[i]=[P()];return r.custom(),e&&n(),{IS:a,maybe:o,$Wrap:i,isNothing:b,xProxy:r,addSymbolicExtensions:n};function a(s,...d){let w=typeof s=="symbol"?Symbol.isSymbol:s;switch(!0){case!!o({trial:T=>"isTypes"in(d?.[0]??{})}):return S(s,d[0]);default:return d.length>1?c(w,...d):C(s,...d)}}function S(s,d){switch(!0){case"defaultValue"in d:return u(s,d);case"notTypes"in d:return g(s,d);default:return a(s,...[d.isTypes].flat())}}function p(s){return s?.[Symbol.proxy]??a(s)}function C(s,...d){let{noInput:w,noShouldbe:T,compareTo:M,inputCTOR:Q,isNaN:at,isInfinity:ut,shouldBeFirstElementIsNothing:ct}=f(s,...d);switch(d=d.length&&d[0],!0){case ct:return String(s)===String(M);case(s?.[Symbol.proxy]&&T):return s[Symbol.proxy];case at:return T?"NaN":String(M)===String(s);case ut:return T?"Infinity":String(M)===String(s);case w:return T?String(s):String(M)===String(s);case Q===Boolean:return d?Q===d:"Boolean";default:return y(s,d,T,h(s,Q))}}function f(s,...d){let w=d.length<1,T=s==null;return{noInput:T,noShouldbe:w,compareTo:!w&&d[0],inputCTOR:!T&&Object.getPrototypeOf(s)?.constructor,isNaN:Number.isNaN(s)||o({trial:M=>String(s)==="NaN"}),isInfinity:o({trial:M=>String(s)})==="Infinity",shouldBeFirstElementIsNothing:!w&&b(d[0])}}function h(s,d){switch(!0){case s===0:return Number;case s==="":return String;case!s:return{name:String(s)};default:return d}}function y(s,d,w,T){switch(!0){case(!w&&d===s||s?.[Symbol.proxy]&&d===Proxy):return!0;case String(d)==="NaN":return String(s)==="NaN";case(s?.[Symbol.toStringTag]&&a(d,String)):return String(d)===s[Symbol.toStringTag];default:return d?m(s,d,T):x(s,T)}}function x(s,d){return s?.[Symbol.toStringTag]&&`[object ${s?.[Symbol.toStringTag]}]`||d?.name||String(d)}function m(s,d,w){return o({trial:T=>s instanceof d})||d===w||d===Object.getPrototypeOf(w)||`${d?.name}`===w?.name}function c(s,...d){return d.some(w=>a(s,w))}function b(s,d=!1){let w=s==null;return w=d?w||a(s,1/0)||a(s,NaN):w,w}function L(){let s=d=>{};return function({trial:d,whenError:w=s}={}){try{return d()}catch(T){return w(T)}}}function P(){return function(s){return Object.freeze({get value(){return s},get[Symbol.type](){return p(s)},get type(){return p(s)},[Symbol.is](...d){return a(s,...d)},is(...d){return a(s,...d)}})}}function u(s,{defaultValue:d,isTypes:w=[void 0],notTypes:T}={}){return w=w?.constructor!==Array?[w]:w,T=T&&T?.constructor!==Array?[T]:[],T.length<1?a(s,...w)?s:d:g(s,{isTypes:w,notTypes:T})?s:d}function g(s,{isTypes:d=[void 0],notTypes:w=[void 0]}={}){return d=d?.constructor!==Array?[d]:d,w=w?.constructor!==Array?[w]:w,a(s,...d)&&!a(s,...w)}function v(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return p(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...s){return a(this,...s)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(s){return p(s)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(s,...d){return a(s,...d)},enumerable:!1,configurable:!1}}))}function E(s){let d=s.set;return s.set=(w,T,M)=>T===Symbol.proxy?w[T]=M:d(w,T,M),s}}function dt(t,e,r){return Symbol.isSymbol||(Symbol.isSymbol=Symbol.for("toa.isASymbol")),{xProxy:a(),addSymbolicExtensions:n};function n(){Symbol.is||(Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type")),Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return e(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...S){return t(this,...S)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(S){return e(S)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(S,...p){return t(S,...p)},enumerable:!1,configurable:!1}}))}function o(S){return Object.getPrototypeOf(S)?.constructor?.name||"Object"}function i(S){return Proxy=new S(S,{construct(p,C){for(let h of C)h.set&&(h=modifySetter(h));let f=new p(...C);return f[Symbol.proxy]=`Proxy (${o(C[0])})`,f}}),Proxy}function a(){Symbol.proxy||(Symbol.proxy=Symbol.for("toa.proxy"));let S=Proxy;return{native(){Proxy=S},custom(){Proxy=i(S)}}}}var Ie=pt(),B=mt(),V=gt();function mt(){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 gt(){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 pt(){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 je={html:"innerHTML",text:"textContent",class:"className"},ee=yt();function yt(){let t={get(e,r){let n=String(r)?.toLowerCase();switch(!0){case n in e:return e[n];case Lt(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=>Et(r):Tt(e)}}),t[e]}function bt(t,e,r){return e=e?.isJQx&&e.first()||e,z({trial:n=>Ct(e)?t.append(e):Qe(e)?t.insertAdjacentHTML("beforeend",e):t.append(e),whenError:n=>console.info(`${r} (for root ${t}) not created, reason
|
|
2
|
-
`,n)})}function
|
|
3
|
-
=> @charset, @namespace and @import are not supported here`),{done:!0}}function a(
|
|
4
|
-
${
|
|
5
|
-
Rule: ${ve(
|
|
6
|
-
${r}`),
|
|
7
|
-
${
|
|
8
|
-
Rule: ${ve(
|
|
9
|
-
${r}`),
|
|
10
|
-
`)}function
|
|
11
|
-
`).map(n=>n.replace(/\s|\/\/.*$/g,"").trim().replace(/(@s!)/g," ")).join(""),r)}function ke(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/[^--]^-|-$/,"")}function We(t,e){try{return t()}catch(r){console.error(`${e||"an error occured"}: ${r.message}`)}}function
|
|
1
|
+
var{IS:s,maybe:W,$Wrap:pr,isNothing:yr,xProxy:br,addSymbolicExtensions:hr}=ct({useSymbolicExtensions:!1});function ct(t={}){let{useSymbolicExtensions:e}=t,{xProxy:r,addSymbolicExtensions:n}=ft(a,f,e),o=C(),[i]=[N()];return r.custom(),e&&n(),{IS:a,maybe:o,$Wrap:i,isNothing:b,xProxy:r,addSymbolicExtensions:n};function a(l,...d){let v=typeof l=="symbol"?Symbol.isSymbol:l;switch(!0){case!!o({trial:L=>"isTypes"in(d?.[0]??{})}):return w(l,d[0]);default:return d.length>1?m(v,...d):E(l,...d)}}function w(l,d){switch(!0){case"defaultValue"in d:return u(l,d);case"notTypes"in d:return y(l,d);default:return a(l,...[d.isTypes].flat())}}function f(l){return l?.[Symbol.proxy]??a(l)}function E(l,...d){let{noInput:v,noShouldbe:L,compareTo:O,inputCTOR:J,isNaN:B,isInfinity:at,shouldBeFirstElementIsNothing:ut}=c(l,...d);switch(d=d.length&&d[0],!0){case ut:return String(l)===String(O);case(l?.[Symbol.proxy]&&L):return l[Symbol.proxy];case B:return L?"NaN":String(O)===String(l);case at:return L?"Infinity":String(O)===String(l);case v:return L?String(l):String(O)===String(l);case J===Boolean:return d?J===d:"Boolean";default:return g(l,d,L,h(l,J))}}function c(l,...d){let v=d.length<1,L=l==null;return{noInput:L,noShouldbe:v,compareTo:!v&&d[0],inputCTOR:!L&&Object.getPrototypeOf(l)?.constructor,isNaN:Number.isNaN(l)||o({trial:O=>String(l)==="NaN"}),isInfinity:o({trial:O=>String(l)})==="Infinity",shouldBeFirstElementIsNothing:!v&&b(d[0])}}function h(l,d){switch(!0){case l===0:return Number;case l==="":return String;case!l:return{name:String(l)};default:return d}}function g(l,d,v,L){switch(!0){case(!v&&d===l||l?.[Symbol.proxy]&&d===Proxy):return!0;case String(d)==="NaN":return String(l)==="NaN";case(l?.[Symbol.toStringTag]&&typeof d=="string"):return String(d)===l[Symbol.toStringTag];default:return d?p(l,d,L):S(l,L)}}function S(l,d){return(l?.[Symbol.toStringTag]??l?.prototype?.[Symbol.toStringTag])||d?.name||String(d)}function p(l,d,v){return o({trial:L=>l instanceof d})||d===v||d===Object.getPrototypeOf(v)||`${d?.name}`===v?.name}function m(l,...d){return d.some(v=>a(l,v))}function b(l,d=!1){let v=l==null;return v=d?v||a(l,1/0)||a(l,NaN):v,v}function C(){let l=d=>{};return function({trial:d,whenError:v=l}={}){try{return d()}catch(L){return v(L)}}}function N(){return function(l){return Object.freeze({get value(){return l},get[Symbol.type](){return f(l)},get type(){return f(l)},[Symbol.is](...d){return a(l,...d)},is(...d){return a(l,...d)}})}}function u(l,{defaultValue:d,isTypes:v=[void 0],notTypes:L}={}){return v=v?.constructor!==Array?[v]:v,L=L&&L?.constructor!==Array?[L]:[],L.length<1?a(l,...v)?l:d:y(l,{isTypes:v,notTypes:L})?l:d}function y(l,{isTypes:d=[void 0],notTypes:v=[void 0]}={}){return d=d?.constructor!==Array?[d]:d,v=v?.constructor!==Array?[v]:v,a(l,...d)&&!a(l,...v)}function x(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return f(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...l){return a(this,...l)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(l){return f(l)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(l,...d){return a(l,...d)},enumerable:!1,configurable:!1}}))}}function ft(t,e,r){return Symbol.isSymbol||(Symbol.isSymbol=Symbol.for("toa.isASymbol")),{xProxy:w(),addSymbolicExtensions:n};function n(){Symbol.is||(Symbol.is=Symbol.for("toa.is"),Symbol.type=Symbol.for("toa.type")),Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return e(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...f){return t(this,...f)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(f){return e(f)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(f,...E){return t(f,...E)},enumerable:!1,configurable:!1}}))}function o(f){let E=f.set;return f.set=(c,h,g)=>h===Symbol.proxy?c[h]=g:E(c,h,g),f}function i(f){return Object.getPrototypeOf(f)?.constructor?.name||"Object"}function a(f){return Proxy=new f(f,{construct(E,c){for(let g of c)g.set&&(g=o(g));let h=new E(...c);return h[Symbol.proxy]=`Proxy (${i(c[0])})`,h}}),Proxy}function w(){Symbol.proxy||(Symbol.proxy=Symbol.for("toa.proxy"));let f=Proxy;return{native(){Proxy=f},custom(){Proxy=a(f)}}}}var Ie=gt(),z=dt(),V=mt();function dt(){return{html:Object.freeze("accept,action,align,alt,autocapitalize,autocomplete,autopictureinpicture,autoplay,background,bgcolor,border,capture,cellpadding,cellspacing,checked,cite,class,clear,contenteditable,color,cols,colspan,controls,controlslist,coords,crossorigin,datetime,decoding,default,dir,disabled,disablepictureinpicture,disableremoteplayback,download,draggable,enctype,enterkeyhint,face,for,headers,height,hidden,high,href,hreflang,id,inputmode,integrity,is,ismap,kind,label,lang,list,loading,loop,low,max,maxlength,media,method,min,minlength,multiple,muted,name,nonce,noshade,novalidate,nowrap,open,optimum,pattern,placeholder,playsinline,poster,preload,pubdate,radiogroup,readonly,rel,required,rev,reversed,role,rows,rowspan,spellcheck,scope,selected,shape,size,sizes,span,srclang,start,src,srcset,step,style,summary,tabindex,target,title,translate,type,usemap,valign,value,width,xmlns,slot".split(",")),svg:Object.freeze("accent-height,accumulate,additive,alignment-baseline,ascent,attributename,attributetype,azimuth,basefrequency,baseline-shift,begin,bias,by,class,clip,clippathunits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,cx,cy,d,dx,dy,diffuseconstant,direction,display,divisor,dur,edgemode,elevation,end,fill,fill-opacity,fill-rule,filter,filterunits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,fx,fy,g1,g2,glyph-name,glyphref,gradientunits,gradienttransform,height,href,id,image-rendering,in,in2,k,k1,k2,k3,k4,kerning,keypoints,keysplines,keytimes,lang,lengthadjust,letter-spacing,kernelmatrix,kernelunitlength,lighting-color,local,marker-end,marker-mid,marker-start,markerheight,markerunits,markerwidth,maskcontentunits,maskunits,max,mask,media,method,mode,min,name,numoctaves,offset,operator,opacity,order,orient,orientation,origin,overflow,paint-order,path,pathlength,patterncontentunits,patterntransform,patternunits,points,preservealpha,preserveaspectratio,primitiveunits,r,rx,ry,radius,refx,refy,repeatcount,repeatdur,restart,result,rotate,scale,seed,shape-rendering,specularconstant,specularexponent,spreadmethod,startoffset,stddeviation,stitchtiles,stop-color,stop-opacity,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke,stroke-width,style,surfacescale,systemlanguage,tabindex,targetx,targety,transform,text-anchor,text-decoration,text-rendering,textlength,type,u1,u2,unicode,values,viewbox,visibility,version,vert-adv-y,vert-origin-x,vert-origin-y,width,word-spacing,wrap,writing-mode,xchannelselector,ychannelselector,x,x1,x2,xmlns,y,y1,y2,z,zoomandpan".split(","))}}function mt(){return{a:!0,area:!0,audio:!1,br:!0,base:!0,body:!0,button:!0,canvas:!0,comment:!0,dl:!0,data:!0,datalist:!0,div:!0,em:!0,embed:!1,fieldset:!0,font:!0,footer:!0,form:!1,hr:!0,head:!0,header:!0,output:!0,iframe:!1,frameset:!1,img:!0,input:!0,li:!0,label:!0,legend:!0,link:!0,map:!0,mark:!0,menu:!0,media:!0,meta:!0,nav:!0,meter:!0,ol:!0,object:!1,optgroup:!0,option:!0,p:!0,param:!0,picture:!0,pre:!0,progress:!1,quote:!0,script:!1,select:!0,source:!0,span:!0,style:!0,caption:!0,td:!0,col:!0,table:!0,tr:!0,template:!1,textarea:!0,time:!0,title:!0,track:!0,details:!0,ul:!0,video:!0,del:!0,ins:!0,slot:!0,blockquote:!0,svg:!0,dialog:!0,summary:!0,main:!0,address:!0,colgroup:!0,tbody:!0,tfoot:!0,thead:!0,th:!0,dd:!0,dt:!0,figcaption:!0,figure:!0,i:!0,b:!0,code:!0,h1:!0,h2:!0,h3:!0,h4:!0,abbr:!0,bdo:!0,dfn:!0,kbd:!0,q:!0,rb:!0,rp:!0,rt:!0,ruby:!0,s:!0,strike:!0,samp:!0,small:!0,strong:!0,sup:!0,sub:!0,u:!0,var:!0,wbr:!0,nobr:!0,tt:!0,noscript:!0}}function gt(){return["::backdrop{background-color:grey;opacity:0.2;}",`#jqxPopup{overflow:hidden;background-color:transparent;outline:none;border:none;inset:0;animation:fade-out 0.5s ease-out;&[open]{display:flex;align-items:center;justify-content:center;animation:fade-in 0.5s ease;}#jqxPopupContent{background-color:white;border:solid 1px #eee;box-shadow:1px 2px 8px #999;border-radius:4px;padding:12px;vertical-align:middle;max-height:40vh;max-width:50vw;overflow:auto;margin:0 auto;div:not(#closeHandleIcon){clear:both;}@media (width <= 640px){max-width:80vw;max-height:60vh;}#closeHandleIcon{cursor:pointer;width:24px;height:24px;display:inline;position:absolute;top:4px;right:4px;justify-content:right;background-image:url("data:image/svg+xml;utf8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22iso-8859-1%22%3F%3E%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20version%3D%221.1%22%20id%3D%22Layer_1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%20128%20128%22%20style%3D%22enable-background%3Anew%200%200%20128%20128%3B%22%20xml%3Aspace%3D%22preserve%22%3E%3Crect%20x%3D%22-368%22%20y%3D%226%22%20style%3D%22display%3Anone%3Bfill%3A%23E0E0E0%3B%22%20width%3D%22866%22%20height%3D%221018%22%2F%3E%3Ccircle%20style%3D%22fill%3A%23FFFFFF%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2248%22%2F%3E%3Ccircle%20style%3D%22fill%3A%238CCFB9%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2239%22%2F%3E%3Ccircle%20style%3D%22fill%3Anone%3Bstroke%3A%23444B54%3Bstroke-width%3A6%3Bstroke-miterlimit%3A10%3B%22%20cx%3D%2264%22%20cy%3D%2264%22%20r%3D%2248%22%2F%3E%3Cpolyline%20style%3D%22fill%3Anone%3Bstroke%3A%23FFFFFF%3Bstroke-width%3A6%3Bstroke-linecap%3Around%3Bstroke-miterlimit%3A10%3B%22%20points%3D%2242%2C69%2055.55%2C81%20%20%2086%2C46%20%22%2F%3E%3C%2Fsvg%3E");@media (width <= 640px){background-image:none;position:relative;margin:-15px -15px 4px 0;float:right;vertical-align:middle;border:1px solid #AAA;padding:2px;border-radius:50%;width:12px;height:12px;font-size:12px;line-height:12px;font-weight:bold;text-align:center;&:after{content:'\\2714';color:green;}}}.warn{display:none;text-align:center;color:red;border-top:1px solid #999;margin-top:1em;padding-top:3px;animation:warn-fade-out 0.2s ease-out;}.warn.active{opacity:1;display:block;animation:warn-fade-in 0.2s ease-in;}}}`,"@keyframes fade-in{0%{opacity:0;transform:scale(0, 0);display:none;}100%{opacity:1;transform:scale(1, 1);display:flex;}}","@keyframes fade-out{0%{opacity:1;transform:scale(1, 1);display:flex;}100%{opacity:0;transform:scale(0, 0);display:none;}}","@keyframes warn-fade-in{0%{opacity:0;transform:scale(0, 0);display:none;}100%{opacity:1;transform:scale(1,1 );display:block;}}","@keyframes warn-fade-out{0%{opacity:1;transform:scale(1, 1);display:block;}100%{opacity:0;transform:scale(0, 0);display:none;}}"]}var je={html:"innerHTML",text:"textContent",class:"className"},ee=pt();function pt(){let t={get(e,r){let n=String(r)?.toLowerCase();switch(!0){case n in e:return e[n];case Ct(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=>wt(r):Lt(e)}}),t[e]}function yt(t,e,r){return e=e?.isJQx&&e.first()||e,W({trial:n=>Et(e)?t.append(e):Qe(e)?t.insertAdjacentHTML("beforeend",e):t.append(e),whenError:n=>console.info(`${r} (for root ${t}) not created, reason
|
|
2
|
+
`,n)})}function bt(t,e,...r){let n=ht(e,t);return r?.forEach(o=>yt(n,o,t)),n}function ht(t,e){switch(t=xe(e)?vt(t):t?.isJQx?t.first():t,!0){case s(t,String):return U(e,Qe(t,e)?{html:t}:{text:t});case s(t,Node):return xt(e,t);default:return U(e,t)}}function St(t){return delete t.data,Object.keys(t).length<1||Object.keys(t).forEach(e=>{let r=e.toLowerCase();r in je&&(t[je[r]]=t[e],delete t[e])}),t}function xt(t,e){let r=U(t);return r.append(e),r}function U(t,e={}){e=Je(e,{});let r=Object.entries(e.data??{}),n=Object.assign(xe(t)?new Comment(e?.text):document.createElement(t),St(e));return r.length&&r.forEach(([o,i])=>n.dataset[o]=String(i)),n}function Je(t,e){return e?s(t,{isTypes:Object,notTypes:[Array,null,NaN,Proxy],defaultValue:e}):s(t,{isTypes:Object,notTypes:[Array,null,NaN,Proxy]})}function vt(t){return Je(t)?t?.text??t?.textContent??"":String(t)}function wt(t){return U("b",{style:"color:red",text:`'${t}' is not a valid HTML-tag`})}function Qe(t,e){return!xe(e)&&s(t,String)&&/<.*>|&[#|0-9a-z]+[^;];/i.test(t)}function Et(t){return t?.constructor===Comment||t?.constructor===CharacterData}function xe(t){return t?.constructor===Comment||/comment/i.test(t)}function Ct(t){return!s(U(t),HTMLUnknownElement)}function Lt(t){return(e,...r)=>bt(t,e,...r)}var{IS:te,maybe:Er,$Wrap:Cr,xProxy:Lr,isNothing:Tr}=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"),m();let t=h(),[e,r]=[g(),N()];return r.custom(),{IS:n,maybe:t,$Wrap:e,isNothing:c,xProxy:r};function n(u,...y){if(t({trial:l=>"isTypes"in(y?.[0]??{})})){let l=y[0];return"defaultValue"in l?S(u,l):"notTypes"in l?p(u,l):n(u,...[l.isTypes].flat())}let x=typeof u=="symbol"?Symbol.isSymbol:u;return y.length>1?E(x,...y):i(u,...y)}function o(u){return u?.[Symbol.proxy]??n(u)}function i(u,...y){let{noInput:x,noShouldbe:l,compareTo:d,inputCTOR:v,isNaN:L,isInfinity:O,shouldBeFirstElementIsNothing:J}=w(u,...y);switch(y=y.length&&y[0],!0){case J:return String(u)===String(d);case(u?.[Symbol.proxy]&&l):return u[Symbol.proxy];case L:return l?"NaN":t({trial:B=>String(d)})===String(u);case O:return l?"Infinity":t({trial:B=>String(d)})===String(u);case x:return l?String(u):String(d)===String(u);case v===Boolean:return y?v===y:"Boolean";default:return f(u,y,l,a(u,v))}}function a(u,y){return u===0?Number:u===""?String:u?y:{name:String(u)}}function w(u,...y){let x=y.length<1,l=!x&&y[0],d=!x&&c(y[0]),v=u==null,L=!v&&Object.getPrototypeOf(u)?.constructor,O=t({trial:B=>String(u)})==="NaN",J=t({trial:B=>String(u)})==="Infinity";return{noInput:v,noShouldbe:x,compareTo:l,inputCTOR:L,isNaN:O,isInfinity:J,shouldBeFirstElementIsNothing:d}}function f(u,y,x,l){switch(!0){case(!x&&y===u||u?.[Symbol.proxy]&&y===Proxy):return!0;case t({trial:d=>String(y)})==="NaN":return String(u)==="NaN";case(u?.[Symbol.toStringTag]&&n(y,String)):return String(y)===u[Symbol.toStringTag];default:return y?t({trial:d=>u instanceof y})||y===l||y===Object.getPrototypeOf(l)||`${y?.name}`===l?.name:u?.[Symbol.toStringTag]&&`[object ${u?.[Symbol.toStringTag]}]`||l?.name||String(l)}}function E(u,...y){return y.some(x=>n(u,x))}function c(u,y=!1){let x=u==null;return x=y?x||n(u,1/0)||n(u,NaN):x,x}function h(){let u=(y,x)=>y?.constructor===Function?y(x):void 0;return function({trial:y,whenError:x=()=>{}}={}){try{return u(y)}catch(l){return u(x,l)}}}function g(){return function(u){return Object.freeze({get value(){return u},get[Symbol.type](){return o(u)},get type(){return o(u)},[Symbol.is](...y){return n(u,...y)},is(...y){return n(u,...y)}})}}function S(u,{defaultValue:y,isTypes:x=[void 0],notTypes:l}={}){return x=x?.constructor!==Array?[x]:x,l=l&&l?.constructor!==Array?[l]:[],l.length<1?n(u,...x)?u:y:p(u,{isTypes:x,notTypes:l})?u:y}function p(u,{isTypes:y=[void 0],notTypes:x=[void 0]}={}){return y=y?.constructor!==Array?[y]:y,x=x?.constructor!==Array?[x]:x,n(u,...y)&&!n(u,...x)}function m(){Object.getOwnPropertyDescriptors(Object.prototype)[Symbol.is]||(Object.defineProperties(Object.prototype,{[Symbol.type]:{get(){return o(this)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(...u){return n(this,...u)},enumerable:!1,configurable:!1}}),Object.defineProperties(Object,{[Symbol.type]:{value(u){return o(u)},enumerable:!1,configurable:!1},[Symbol.is]:{value:function(u,...y){return n(u,...y)},enumerable:!1,configurable:!1}}))}function b(u){let y=String(Object.getPrototypeOf(u)?.constructor);return y.slice(y.indexOf("ion")+3,y.indexOf("(")).trim()}function C(u){let y=u.set;return u.set=(x,l,d)=>l===Symbol.proxy?x[l]=d:y(x,l,d),u}function N(){let u=Proxy;return{native(){Proxy=u},custom(){Proxy=new u(u,{construct(y,x){for(let d of x)d.set&&(d=C(d));let l=new y(...x);return l[Symbol.proxy]=`Proxy (${b(x[0])})`,l}})}}}}var _=Ft;function Ft({styleSheet:t,createWithId:e}={}){let{tryParseAtOrNestedRules:r,ruleExists:n,checkParams:o,sheet:i,removeRules:a,consider:w,currentSheetID:f}=$t({styleSheet:t,createWithId:e});function E(p,m){if(p&&m.removeProperties){Object.keys(m.removeProperties).forEach(b=>p.style.removeProperty(ke(b)));return}Object.entries(m).forEach(([b,C])=>{b=ke(b.trim()),C=C.trim();let N;if(/!important/.test(C)&&(C=C.slice(0,C.indexOf("!important")).trim(),N="important"),!CSS.supports(b,C))return console.error(`StylingFactory ${f} error: '${b}' with value '${C}' not supported (yet)`);We(()=>p.style.setProperty(b,C,N),`StylingFactory ${f} (setRule4Selector) failed`)})}function c(p,m,b=i){if(p=p?.trim?.(),!te(p,String)||!p.length||/[;,]$/g.test(p))return console.error(`StylingFactory ${f} (setRules): [${p||"[no selector given]"}] is not a valid selector`);if(m.removeRule)return a(p);let C=n(p,!0),N=C||b.cssRules[b.insertRule(`${p} {}`,b.cssRules.length||0)];return w(()=>E(N,m),p,C)}function h(p){let m=p.trim().split(/{/,2),b=m.shift().trim();if(!te(b,String)||!b?.trim()?.length)return console.error(`StylingFactory ${f} (doParse): no (valid) selector could be extracted from rule ${ve(p)}`);let C=Dt(m.shift());return We(()=>c(b,C),`StylingFactory ${f} (setRules) failed`)}function g(p){let m=r(p);return m.done?m.existing:h(p)}function S(p,m){return p.trim().startsWith("@media")?g(At(p,m)):c(p,m)}return function(p,m={}){return o(p,m)&&(Object.keys(m).length?S(p,m):g(p))}}function $t({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 p=Object.assign(document.createElement("style"),{id:g});return document.head.insertAdjacentElement("beforeend",p),p.sheet}function i(g){return console.error(`StylingFactory ${n} [rule: ${g}]
|
|
3
|
+
=> @charset, @namespace and @import are not supported here`),{done:!0}}function a(g,S){return[...t.rules].find(p=>S?ze(p.selectorText||"",g):Pt`${Nt(g)}${[..."gim"]}`.test(p.cssText))}function w(g){return/^@charset|@import|namespace/i.test(g.trim())?i(g):g.match(/}/g)?.length>1?{existing:c(g,1),done:!0}:{done:!1}}function f(g){let S=[...t.cssRules].reduce((m,b,C)=>ze(b.selectorText||"",g)&&m.concat(C)||m,[]),p=S.length;return S.forEach(m=>t.deleteRule(m)),p>0?console.info(`\u2714 Removed ${p} instance${p>1?"s":""} of selector ${g} from ${n.slice(4)}`):console.info(`\u2714 Remove rule: selector ${g} does not exist in ${n.slice(4)}`)}function E(g,S){return g&&te(g,String)&&g.trim().length>0&&te(S,Object)||(console.error(`StylingFactory ${n} called with invalid parameters`),!1)}function c(g){g=g.trim();let S=g.slice(0,g.indexOf("{")).trim(),p=!!a(S);try{return t.insertRule(`${g}`,t.cssRules.length),p}catch(m){return console.error(`StylingFactory ${n} (tryParse) ${m.name} Error:
|
|
4
|
+
${m.message}
|
|
5
|
+
Rule: ${ve(g)}
|
|
6
|
+
${r}`),p}}function h(g,S,p){try{return g(),p}catch(m){return console.error(`StylingFactory ${n} (tryAddOrModify) ${m.name} Error:
|
|
7
|
+
${m.message}
|
|
8
|
+
Rule: ${ve(S)}
|
|
9
|
+
${r}`),p}}return{sheet:t,removeRules:f,tryParseAtOrNestedRules:w,ruleExists:a,checkParams:E,tryParse:c,consider:h,currentSheetID:n}}function At(t,e){return`${t.trim()} ${Object.entries(e).map(([r,n])=>`${r}: { ${Ht(n)}`)}`}function ve(t){let e=(t||"NO RULE").trim().slice(0,50).replace(/\n/g,"\\n").replace(/\s{2,}/g," ");return t.length>e.length?`${e.trim()}...truncated`:e}function Ht(t){return Object.entries(t).map(([e,r])=>`${e}: ${r.trim()}`).join(`;
|
|
10
|
+
`)}function Nt(t){return t.replace(/([*\[\]()-+{}.$?\\])/g,e=>`\\${e}`)}function Pt(t,...e){let r=e.length&&Array.isArray(e.slice(-1))?e.pop().join(""):"";return new RegExp((e.length&&t.raw.reduce((n,o,i)=>n.concat(e[i-1]||"").concat(o),"")||t.raw.join("")).split(`
|
|
11
|
+
`).map(n=>n.replace(/\s|\/\/.*$/g,"").trim().replace(/(@s!)/g," ")).join(""),r)}function ke(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/[^--]^-|-$/,"")}function We(t,e){try{return t()}catch(r){console.error(`${e||"an error occured"}: ${r.message}`)}}function Mt(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
|
|
14
|
-
`)),n}function
|
|
15
|
-
`)),n}function
|
|
16
|
-
`));default:return n}}return Object.defineProperties(n,{log:{value:p,enumerable:!1},error:{value:a,enumerable:!1},warn:{value:S,enumerable:!1}}),Object.freeze(n)}function ue(){return(t=>`[${ae(t.getHours())}:${ae(t.getMinutes())}:${ae(t.getSeconds())}.${ae(t.getMilliseconds(),3)}]`)(new Date)}function Fe(t,e){if(t)for(let[r,n]of Object.entries(e)){if(r=D(r),r.startsWith("data"))return de(t,n);l(n,String)&&ce(r)&&t.setAttribute(r,n.split(/[, ]/)?.join(" "))}}function de(t,e){if(t&&l(e,Object))for(let[r,n]of Object.entries(e))t.setAttribute(`data-${D(r)}`,n)}function me(t){return t?l(t,Proxy)?[t.EL]:l(t,NodeList)?[...t]:j(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 j(t){return l(t,Text,HTMLElement,Comment)}function Z(t,e){if(l(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(D(r),n,o)}}function J(t){let e=t.cloneNode(!0);return e.removeAttribute&&e.removeAttribute("id"),t.isConnected?t.remove():t=null,e}function Ue(t){if(!l(t,HTMLElement))return;let e=t.style,r=getComputedStyle(t),n=!![e.visibility,r.visibility].includes("hidden"),o=!![e.display,r.display].includes("none"),i=!!t.hidden,a=parseInt(r.height)<1||parseInt(r.width)<1,S=t.offsetTop<0||t.offsetLeft+t.offsetWidth<0||t.offsetLeft>document.body.offsetWidth,p=+r.opacity==0||+(e.opacity||1)==0;return!(i||S||p||o||n||a)}function _e(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(Ne(r)?`<!--${r.data}-->`:be(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`_${_t(Vt).slice(0,8).join("")}`}function Ae(t){return t=l(t,String)&&/,/.test(t)?t.split(",").map(e=>e.trim().toLowerCase()).filter(e=>e.length>0):t,l(t,Array)?t:l(t,String)&&t?.trim().toLowerCase()||""}function Ye(t){return t?.isConnected?!![...document.querySelectorAll(":is(:modal)")].find(e=>e===t):!1}function He(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 _t(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 l(t,String)?t.toLowerCase().split("-").map((e,r)=>r&&`${Gt(e)}`||e).join(""):t}function D(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/^-|-$/,"")}function Gt([t,...e]){return`${t.toUpperCase()}${e.join("")}`}function be(t){return l(t,Comment,Text)}function Ne(t){l(t,Comment)}function Xe(t){return l(t,Text)}function X(t){return l(t,String)&&/^<|>$/.test(`${t}`.trim())}function K(t){return l(t,Array)&&!t?.find(e=>!j(e))}function he(t){return l(t,Array)&&!t?.find(e=>!X(e))}function F(t,e){let r=t.collection.filter(n=>!be(n));for(let n=0;n<r.length;n+=1)e(r[n],n);return t}function Ke(t){return t.node?l(t.node,Comment)?`<!--${t.node.textContent}-->`:t.HTML.get(1).split(">")[0]+">...":""}function Pe(t,e,r){let n=e!==document.body&&l(t,String)&&t.toLowerCase()!=="body"?e:document;try{r.collection=[...n.querySelectorAll(t)]}catch{A.warn(`JQx: Invalid CSS querySelector. [${l(t,String)?t:"Not a string!"}]`)}}function qe(){return{isCommentOrTextNode:be,isNode:j,isComment:Ne,isText:Xe,isHtmlString:X,isArrayOfHtmlElements:K,isArrayOfHtmlStrings:he,ElemArray2HtmlString:Ge,input2Collection:me,setCollectionFromCssSelector:Pe,cssRuleEdit:_({createWithId:"JQxStylesheet"})}}function et(){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 l(n,Node)?Object.freeze({get writable(){return _e(n)},get modal(){return Ye(n)},get inDOM(){return n.isConnected},get open(){return n.open??!1},get visible(){return Ue(n)},get disabled(){return n.hasAttribute("readonly")||n.hasAttribute("disabled")},get empty(){return r.collection.length<1},get virtual(){return r.isVirtual}}):e}}function tt(t,e,r,n){r&&l(e,String)&&(e={[e]:r==="-"?"":r});let o;e.className&&(o=e.className,delete e.className),o=[...t.classList].find(a=>a.startsWith("JQxClass-")||o&&a===o)||o||`JQxClass-${ye().slice(1)}`,n.editCssRule(`.${o}`,e),t.classList.add(o)}var Zt=et();function rt(t){return{factoryExtensions:Yt(t),instanceExtensions:Xt(t)}}function Yt(t){return{data(e){return{get all(){return new Proxy(e[0]?.dataset??{},Le)},set(r={}){if(!e.is.empty&&l(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&&l(r,Object))for(let[n,o]of Object.entries(r))e.setData({[n]:o});return e},remove(r){return e[0]?.removeAttribute(`data-${D(r)}`),e}}},dimensions(e){if(e.is.empty)return A.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?R(o):o},set(r,n=!1,o=!1){r=r.isJQx?r.HTML.get(1):r;let i=l(r,String);return r=i&&o?R(r):r,i&&(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=l(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=l(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])[D(r)]},nwRule(r){return e.Style.byRule({rules:r})},byRule({classes2Apply:r=[],rules:n=[]}={}){let i=l(n,String)&&!r.length?n.split("{")[0].trim():"";if(n=n&&l(n,String)?[n]:n,r=r&&l(r,String)?[r]:r,(n?.length||r?.length)&&(n?.length&&t.editCssRules(...n),r))for(let a of r)e.addClass(a);return i?.startsWith(".")&&e.addClass(i.slice(1)),i?.startsWith("#")&&!e.attr("id")&&e.prop({id:i.slice(1)}),e}}}}}function Xt(t){return{addClass(e,...r){return F(e,n=>n&&r.forEach(o=>n.classList.add(o)))},after:ge,afterMe:ge,andThen(e,r,n=!1){if(!r||!l(r,String,Node,Proxy))return A.log("[JQx instance].[before(Me) | after(Me) | andThen]: invalid/-sufficient input."),e;r=r?.isJQx?r:l(r,Node)?t.virtual(r):t.virtual(O(r));let[o,i,a]=n?[0,"before",r.collection.concat(e.collection)]:[e.collection.length-1,"after",e.collection.concat(r.collection)];return e[o][i](...r.collection),e.collection=a,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&&H(o)){let i=o.trim(),S=!/^<(.+)[^>]+>$/m.test(i)?t.text(o):O(o);F(e,p=>p.append(n?S:J(S)))}j(o)&&F(e,i=>i.append(n?o:J(o))),o.isJQx&&!o.is.empty&&F(e,i=>o.collection.forEach(a=>i.append(n?a:J(a))))}return e},appendTo(e,r){switch(!0){case(!r.isJQx&&!l(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||l(e.node,Text,Comment))return e;if(!n&&H(r))return r=D(r),r==="class"?[...e.node.classList].join(" "):e.node.getAttribute(r);if(H(r)&&n)switch(r=D(r),!0){case r.startsWith("data-"):r={data:{[r.replace("data-","")]:n}};break;default:r={[r]:n}}return l(r,Object)&&!e.is.empty&&Fe(e.node,r),e},before:pe,beforeMe:pe,clear(e){return F(e,fe)},closest(e,r){let n=H(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 F(e,o=>tt(o,r,n,t))},duplicate(e,r=!1,n=document.body){switch(!0){case e.is.empty:return A.error("Duplicating an empty JQx instance is not possible"),e;default:let o=e.collection[0].cloneNode(!0);return o.childNodes.forEach(i=>{i.removeAttribute&&i?.removeAttribute("id")}),r?t(o).toDOM(n):t.virtual(o)}},each(e,r){return F(e,r)},empty(e){return F(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 F(e,r=>Z(r,{display:"none !important"}))},html(e,r,n){switch(!0){case(e.is.empty&&!H(r)):return"";case!H(r):return e.node?.getHTML()??"";default:let o=O(`<div>${r.isJQx?r.HTML.get(!0):r}</div>`);return F(e,a=>(a.textContent=n?a.textContent:"",a.insertAdjacentHTML(t.at.end,o.getHTML())))}},htmlFor(e,r,n="",o=!1){if(e.is.empty||!H(r)||!H(n))return e;let i=e.find$(r);if(i.length<1)return e;let a=O(`<span>${n}</span>`);return i.each(S=>{o||(S.textContent=""),S.insertAdjacentHTML(t.at.end,a?.getHTML())}),e},isEmpty(e){return!e.node},nth$(e,r){return e.single(r)},on(e,r,...n){switch(!0){case(e.is.empty||!l(r,String,Array)||!H(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||!l(r,String,Array)||!H(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(H(o)){o=o.trim();let a=!/^<(.+)[^>]+>$/m.test(o)?t.text(o):O(o);a=n?a:J(a),F(e,S=>S.prepend(a.cloneNode(!0)))}j(o)&&F(e,i=>i.prepend(n?o:J(o))),o.isJQx&&!o.is.empty&&(o.collection.length>1&&o.collection.reverse(),F(e,i=>F(o,a=>i.prepend(n?a:J(a)))),o.collection.reverse())}return e},prependTo(e,r){return r.isJQx||(r=t.virtual(r)),r.prepend(e),e},prop(e,r,n){if(l(r,String)&&!n)return r.startsWith("data")?e[0]?.dataset[r.slice(r.indexOf("-")+1)]:e[0]?.[r];let o=l(r,Object)?r:{[r]:n};for(let[i,a]of Object.entries(o)){if(i=i.trim(),a&&!ce(i)||!a)return!1;if(i.toLowerCase()==="id")return e[0].id=a;F(e,p=>{if(i.startsWith("data"))return p.dataset[i.slice(i.indexOf("-")+1)]=a;p[i]=a})}return e},remove(e,r){let n=i=>i.remove(),o=()=>e.collection=e.collection.filter(i=>document.documentElement.contains(i));if(r){let i=e.find$(r);return i.is.empty||(F(i,n),o()),e}return F(e,n),o(),e},rmAttr(e,...r){for(let n of r)e.node.removeAttribute(n);return e},removeClass(e,...r){return F(e,n=>{if(n)for(let o of r)n.classList.remove(o)})},renderTo(e,r,n){return r=l(r,HTMLElement)||r.isJQx?r:document.body,n=l(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||!l(n,HTMLElement)&&!n?.isJQx?(t.logger.error("JQx replace: invalid replacement value"),e):((n.isJQx||l(n,NodeList))&&(n=n[0]),o&&r&&(r=l(r,String)?o.querySelectorAll(r):r.isJQx?r.collection:r,l(r,HTMLElement,NodeList,Array)&&l(n,HTMLElement)&&(l(r,HTMLElement)?[r]:[...r]).forEach(i=>i.replaceWith(n.cloneNode(!0)))),e)},replaceClass(e,r,...n){return F(e,o=>{o.classList.remove(r);for(let i of n)o.classList.add(i)})},replaceMe(e,r){return e.replaceWith(r)},replaceWith(e,r){return r=l(r,Element)?r:r.isJQx?r[0]:void 0,r&&(e[0].replaceWith(r),e=t.virtual(r)),e},setData(e,r){return F(e,n=>de(n,r))},show(e){return F(e,r=>Z(r,{display:"revert-layer !important"}))},single(e,r){let n=e.collection.length>0;switch(r=r??0,!0){case(n&&l(r,String)):return e.find$(r);case(n&&l(r,Number)):return t(e.collection[r]);case n:return e.collection[0];default:return e}},style(e,r,n){return F(e,i=>{n&&l(r,String)&&(r={[r]:n||"none"}),Z(i,r)})},text(e,r,n=!1){switch(!0){case e.isEmpty():return e;case!l(r,String):return e.node.textContent;default:return F(e,o=>o.textContent=n?o.textContent+r:r)}},toDOM(e,r=document.body,n=N.BeforeEnd){return e.isVirtual=!1,W(e.collection,r,n),e},toggleClass(e,r){return F(e,n=>n.classList.toggle(r))},toNodeList(e){return[...e.collection].map(r=>document.importNode(r,!0))},trigger(e,r,n,o){n=l(n,Function)?n:Event,o=l(o,Object)?{...o,bubbles:o.bubbles??!0}:{bubbles:!0};let i=new n(r,o);return e.is.empty||e.each(a=>a.dispatchEvent(i)),e},val(e,r){switch(!0){case(e.is.empty||!l(e.node,HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement)):return e;case!l(r,String):return e.node.value;default:return e.node.value=l(r,String)?r:"",e}}}}var Me,Se,{isComment:on,isText:ln,isHtmlString:sn,isArrayOfHtmlElements:an,isArrayOfHtmlStrings:un,ElemArray2HtmlString:cn,cssRuleEdit:Oe,addFn:Kt}=qt();function qt(){return{...qe(),addFn:er}}function er(t,e){return t=t?.trim(),!H(t)||!l(e,Function)?A.error("JQx.fn: method invalid parameter(s)"):Se[t]=(r,...n)=>e(r,...n)}function tr(t){return function(e,r,n){if(e=e?.trim(),!H(e)||!l(r,Function))return t.error("JQx.staticFn: invalid parameter(s)");let o=n?{get(){return r()}}:{value(...i){return r(...i)}};try{Object.defineProperty(t,e,o)}catch{return t.warn(`JQx.staticFn: extension [${e}] already exists`)}return A.log(`JQx: added static extension function [${e}]`)}}function q(t){return new Proxy(t,Object.freeze({get:(e,r)=>rr(e,r,t)}))}function nt(t,e){return(...r)=>l(t,Function)&&t(q(e),...r)}function rr(t,e,r){switch(!0){case l(e,Symbol):return z({trial:()=>t[e],whenError:()=>t});case l(+e,Number):return t.collection?.[e]||void 0;case e in Me:return nt(Me[e],r)();case e in Se:return nt(Se[e],r);default:return t[e]}}function lt(t){let e=sr(t);for(let[r,n]of Object.entries(Object.getOwnPropertyDescriptors(e)))Object.defineProperty(t,r,n);return t}function nr(t){return{allow(e){let r=/-/.test(e),n=r&&e;e=r?Y(e):e.toLowerCase(),I.allowTag(e),Object.defineProperties(t,De(e,!0,t,n))},prohibit(e){e=e.toLowerCase(),I.prohibitTag(e),Object.defineProperties(t,De(e,!1,t))}}}function ot(...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))Oe(e,{removeRule:1})}function or(t){return function(e,r,n){r=r?.isJQx?r?.[0]:r,n=n&&Object.values(N).find(i=>n===i);let o=t(e,document.createElement("br"));if(r&&!l(r,HTMLBRElement))for(let i of o.collection)n?r.insertAdjacentElement(n,i):r.append(i);return o}}function ir(...t){let e={};for(let r of t){let n=Object.getOwnPropertyDescriptors(r);for(let[o,i]of Object.entries(n))!(o in e)&&Object.defineProperty(e,o,{...i,enumerable:!1})}return e}function lr(t,e,r,n){return t=D(n||t.toLowerCase()),{get(){return(...o)=>{let i=e&&r.virtual(k(ee[t](...o)))||void 0,S=!l(i?.node,Comment,Text,void 0)?$e(i):"";return A.log(e?`JQx: created (virtual) instance from [JQx].${t} ${S}`:`JQx: ${t.toUpperCase()} is prohibited. Use [JQx].allowTag if necessary.`),i}},enumerable:!1,configurable:!0}}function De(t,e,r,n){t=t.toLowerCase();let o=lr(t,e,r,n);return n?{[n]:o,[Y(n)]:o}:{[t]:o,[t.toUpperCase()]:o}}function sr(t){return ir(Object.entries(I.tagsRaw).reduce(ar(t),{}),gr(t))}function ar(t){return function(e,[r,n]){return Object.defineProperties(e,De(r,n,t)),e}}function ur(t){return function(e,r,...n){l(r,Function)&&(n.push(r),r=void 0),t({type:e,selector:r,handlers:n})}}function cr(t){return function(e){let{type:r,types:n,origin:o,selector:i,handler:a,handlers:S,node:p,name:C,capture:f,once:h,about:y}=e;a=S||a,r=n||r,i=o||i;let x=Ae(r),m=C;a=l(a,Function)?[a]:a;let c={type:x,selector:i||o,capture:f,name:m,once:h,node:p,about:y};switch(!0){case(l(x,Array)&&x.length>0):for(let b of x)c.type=b,it(a,c,t);break;default:return it(a,c,t)}}}function it(t,e,r){for(let n of t)r.listen({...e,handler:n})}function fr(t){return function(e,r){return r=H(r)&&r,e=H(e)&&e,r&&e&&t.listenerStore[e][r]}}function dr(t){return t.activePopup||Object.defineProperty(t,"activePopup",{value:ie(t),enumerable:!1}),t.activePopup}function mr(t){let e=(f,h)=>Oe(f,h),r=function(f){return _({createWithId:f||`jqx${ye()}`})},n=function(...f){for(let h of f)Oe(h)},o=nr(t),i=le(t),a=cr(i);return{editCssRule:e,createStyle:r,editCssRules:n,allowProhibit:o,handle:a,capturedHandling:a,log:(...f)=>A.on.log(...f).off,warn:(...f)=>A.on.warn(...f).off,error:(...f)=>A.on.error(...f).off,handlerWrapper:i}}function gr(t){let{factoryExtensions:e,instanceExtensions:r}=rt(t);Me=e,Se=r;let{editCssRule:n,createStyle:o,editCssRules:i,allowProhibit:a,handle:S,capturedHandling:p,log:C,warn:f,error:h,handlerWrapper:y}=mr(t),x=fr(t),m=tr(t);return{log:C,warn:f,error:h,editCssRules:i,createStyle:o,editStylesheet:o,editCssRule:n,escHtml:R,logger:A,text(c,b=!1){return b?t.comment(c):document.createTextNode(c)},node(c,b=document){return b.querySelector(c,b)},nodes(c,b=document){return[...b.querySelectorAll(c,b)]},clearAllTimers:Te,get staticFn(){return function(c,b,L){return m(c,b,L)}},get toBool(){return He},get getNamedListener(){return x},get virtual(){return or(t)},get allowTag(){return a.allow},get prohibitTag(){return a.prohibit},get removeCssRule(){return ot},get removeCssRules(){return ot},get delegate(){return ur(p)},get delegateCaptured(){return p},get handle(){return p},get listen(){return y.listen},get at(){return N},get setStyle(){return n},get fn(){return Kt},get lenient(){return I.allowUnknownHtmlTags},get IS(){return l},get Popup(){return dr(t)},get listenerStore(){return y.ListenerStore}}}var st=lt(pr());function pr(){return function(e,r,n=N.BeforeEnd){if(e?.isJQx)return e;let o=l(r,HTMLBRElement);r=(!o&&r&&r.isJQx?r[0]:r)||document.body,n=n&&Object.values(N).find(f=>n===f)?n:void 0;let i=X(e),S=!i&&he(e)||i,p={collection:me(e)??[],isVirtual:o,isJQx:!0},C=K(p.collection);if(p.collection.length&&C)return o||p.collection.forEach(f=>{r.contains(f)||W([f],r,n)}),q(p);if(S){if([e].flat().forEach(f=>p.collection.push(O(f))),p.collection.length>0){let f=p.collection.filter(m=>m?.dataset?.jqxcreationerror);p.collection=p.collection.filter(m=>!m?.dataset?.jqxcreationerror);let y=p.collection.map(m=>`${String(m.constructor).split(/function|\(/)[1].trim()}`).length>1;p=q(p);let x=p.collection.length>0?Ke(p):"sanitized: no elements remaining";A.log(`JQx: created ${p.isVirtual?"(virtual)":""} instance from ${y?"array of ":""}HTML string${y?"s":""} ${x}`),p.isVirtual||W(p.collection,r,n)}return p}return Pe(e,r,p),q(p)}}var yn=st;export{yn as default};
|
|
13
|
+
`)}function Ot(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 Ot(Mt(t))}function ze(t,e){return t?.replace("::",":")===e?.replace("::",":")}var we=!1,It={on:()=>we=!0,off:()=>we=!1},D={tagsRaw:V,allowUnknownHtmlTags:It,isAllowed(t){if(we)return!0;let e=s(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,re={data:/data-[\-\w.\p{L}]/ui,validURL:/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,whiteSpace:/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g,notAllowedValues:/^javascript|injected|noreferrer|alert|DataURL/gi};function Rt(t){if(jt&&Object.keys(t.removed).length){let e=Object.entries(t.removed).reduce((r,[n,o])=>[...r,`${j(n)} => ${o}`],[]).join("\\000A");F.error(`JQx: HTML creation error(s): ${e}`)}}function Jt(t){let e=t.nodeName.toLowerCase(),r=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"];return/-/.test(e)&&!r.find(n=>n===e)||D.isAllowed(e)}function Q(t){let e={rawHTML:t?.parentElement?.getHTML()??"no html",removed:{}};return s(t,HTMLElement)&&[...t.childNodes].forEach(r=>{if(r?.children?.length&&Q(r),r?.attributes){let o=s(r,SVGElement)?z.svg:z.html;[...(r??{attributes:[]}).attributes].forEach(i=>{let a=i.name.trim().toLowerCase(),w=i.value.trim().toLowerCase().replace(re.whiteSpace,""),f=a==="href"?!re.validURL.test(w):re.notAllowedValues.test(w),E=a.startsWith("data")?!re.data.test(a):!!o[a];if(f||E){let c=ne(i.value||"none",60);c+=c.length===60?"...":"",e.removed[`${i.name}`]=`attribute/property/value not allowed, removed. Value: ${c}`,r.removeAttribute(i.name)}})}if(!(Jt(r)||r.constructor===CharacterData||r.constructor===Comment)){let o=(r?.outerHTML||r?.textContent).trim(),i=ne(o,60)??"EMPTY";i+=i.length===60?"...":"",e.removed[`<${r.nodeName?.toLowerCase()}>`]=`not allowed, not rendered. Value: ${i}`,r.remove()}}),Rt(e),t}function Qt(t){let e=document.createElement("div");return e.insertAdjacentHTML(H.end,t),e.childNodes.length?Q(e):void 0}function kt(t,e,r){switch(!0){case s(t,Comment):return e.insertAdjacentHTML(r,`<!--${t.data}-->`);case s(t,Text):return e.insertAdjacentText(r,t.data||t.textContent);default:return}}function k(t=[],e=document.body,r=H.BeforeEnd){return r=r||H.BeforeEnd,e=e?.isJQx?e.node:e||document.body,t.reduce((n,o)=>{let i=I(o)&&Wt(o,e,r);return i?[...n,i]:n},[])}function Wt(t,e=document.body,r=H.BeforeEnd){return r=r||H.BeforeEnd,e=e?.isJQx?e?.[0]:e,s(t,Comment,Text)?kt(t,e,r):s(t,HTMLElement)?e.insertAdjacentElement(r,t):void 0}function P(t){if(s(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||s(e,String)&&!/^<(.+)[^>]+>/m.test(e))return document.createTextNode(r??e);let n=Qt(t);return n.childNodes.length<1?P(`<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, cancel",handlers:g,name:"genericPopupCloseHandler",capture:!0,about:"A generic handler for JQx popups"}),Object.freeze({show:i,remove:a,removeModal:h});function i(m){if(n.open)switch(!0){case w(m):return;default:return a(),setTimeout(()=>i(m),200)}o={...m};let{content:b}=o;return t.IS(b,String,HTMLElement)||b?.isJQx?f():!0}function a(){return o.modal?p(o.warnMessage):E()}function w(m){for(let[b,C]of Object.entries(o))if(C!==m[b])return!1;return!0}function f(){r.clear();let{content:m,modal:b,closeAfter:C}=o;b=t.IS(b,Boolean)?b:!1;let N=b?"":t.div({id:"closeHandleIcon"});r.append(N,t.IS(m,String)?t.div(m):m),n.showModal(),!b&&t.IS(C,Number)&&S(a,C)}function E(){if(n.close(o.returnValue),c(),t.IS(o.callback,Function))return e.push(setTimeout(()=>o.callback(o.returnValue),200));o={}}function c(){e.forEach(m=>clearTimeout(m)),e=[]}function h({callback:m,value:b}={}){o.returnValue=b,o.modal=!1,o.callback=m||o.callback,a()}function g({evt:m}){if(!(Object.keys(o).length<1||!n.open)&&(m.type==="cancel"&&o.modal&&m.preventDefault(),m.target.closest("#closeHandleIcon")||!m.target.closest("#jqxPopupContent")))return o.activeTimer&&clearTimeout(o.activeTimer),a()}function S(m,b){t.IS(m,Function)&&t.IS(b,Number)&&b>0&&(c(),e.push(setTimeout(m,b*1e3)))}function p(m){if(!t.IS(m,String,HTMLElement,Proxy))return;let b=r.find$(".warn");switch(!0){case b.is.empty:b=t.div({class:"warn"},m);default:r.append(b.addClass("active")),S(()=>r.find$(".warn").removeClass("active"),2)}}}function le(t){let e={},r="anonymous_";function n(c){if(c){let{handler:h,capture:g,type:S}=c;document.addEventListener(S,h,{capture:g})}}function o(c){if(c){let{type:h,handler:g,capture:S}=c;document.removeEventListener(h,g,{capture:S})}}function i(c,h,g,S){return function(p){if(!A(h))return c({evt:p});let m=p.target.closest(h);if(m){let b=t(m);c({self:b,me:b,evt:p}),g&&f(p.type,S)}return!0}}function a(c){return e[c]=e[c]||{},e[c]}function w(c,h){return Object.entries(a(c)).find(([g])=>g===h)}function f(c,h){let g=w(c,h);g&&(o(g[1]),delete e[c][h],delete se[h],F.warn(`Removed listener [${h}] for event type [${c}].`))}function E(c){let{type:h,handler:g,name:S,capture:p,once:m,selector:b,node:C,about:N}=c;e[h]=e[h]||{};let u=Ee(S||g.name),y=g;if(C instanceof HTMLElement){let x=C.dataset.hid||u;C.dataset.hid=x,b=`[data-hid=${x}]`}switch(!0){case!e[h][u]:return F.log(`JQx: created listener for event type ${h}, with handler name ${u}`),e[h][u]={name:u,handler:i(g,b,m,u),capture:Be(h,p),once:!!m,type:h,initialHandler:y,selector:!!b&&b||!1,about:!!N&&N||!1,unListen(){f(h,u)}},e[h][u];default:return console.warn(`The listener [${u}] for [${h}] exists, it is not re-assigned.`)}}return{remove(...c){return f(...c)},listen:function(c){let{type:h,handler:g}=c;if(!A(h)||!s(g,Function))return;let S=E(c);if(S)return n(S),{type:h,name:S.name,unListen(){f(h,S.name)}}},get ListenerStore(){return Object.freeze({...e})}}}var F=Vt(),zt=["load","unload","scroll","focus","blur","DOMNodeRemovedFromDocument","DOMNodeInsertedIntoDocument","loadstart","progress","error","abort","load","loadend","pointerenter","pointerleave","readystatechange"],H=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]}})),Bt=[...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 Ee(t){return A(t)&&!/^handler|handlers$/gi.test(t.trim())?t.trim():Ve()}function Fe(t){let e=!!t.node&&!s(t,Text,Comment);switch(!0){case e:let r=t.node.dataset?Object.keys(t.node.dataset).map(i=>`[data-${i}]`):[],o=[t.attr("id")&&`#${t?.attr("id")}`||void 0,t.attr("class")&&t?.attr("class").split(" ").map(i=>`.${i}`).join(", ")||void 0,r.length>0&&r.join(", ")||void 0].filter(i=>!!i).join(", ")||[];return o.length?`(${o})`:"";default:return""}}function Ve(t){let e=`anonymous_${Math.random().toString(36).slice(2)}`;return se[e]?Ve():(se[e]=e,e)}function Be(t,e){return!!zt.find(r=>r===t)||!!e}function ce(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 A(t,e=1){return e=s(e,Number)&&e||1,s(t,String)&&t.length>=e}function ne(t,e=120){return oe(t,e).replace(/</g,"<")}function oe(t,e=120){return`${t}`.trim().slice(0,e).replace(/>\s+</g,"><").replace(/</g,"<").replace(/\s{2,}/g," ").replace(/\n/g,"\\n")+(t.length>e?" …":"").trim()}function j(t){switch(!0){case s(t,String):let e=document.createElement("div");return e.append(t),e.innerHTML;default:return t}}function Ce(t){return s(t,String)&&Object.assign(document.createElement("textarea"),{innerHTML:t}).textContent||t}function Vt(){let[t,e]=[!1,!0],r=[],n={get on(){return t=!0,n},get off(){return t=!1,n},get disable(){return e=!0,n},get enable(){return e=!1,n},get backLog(){return r}};function o(){e=!0}function i(){e=!1}function a(...E){return r.unshift(...E.map(c=>`${ue()} \u2A3B ${Ce(c)}`)),console.error(r.slice(0,E.length).join(`
|
|
14
|
+
`)),n}function w(...E){return r.unshift(...E.map(c=>`${ue()} \u26A0 ${Ce(c)}`)),console.warn(r.slice(0,E.length).join(`
|
|
15
|
+
`)),n}function f(...E){let c=E.map(h=>`${ue()} \u2714 ${Ce(h)}`);switch(!e&&r.unshift(...c),t){case!0:console.log(c.join(`
|
|
16
|
+
`));default:return n}}return Object.defineProperties(n,{log:{value:f,enumerable:!1},error:{value:a,enumerable:!1},warn:{value:w,enumerable:!1}}),Object.freeze(n)}function ue(){return(t=>`[${ae(t.getHours())}:${ae(t.getMinutes())}:${ae(t.getSeconds())}.${ae(t.getMilliseconds(),3)}]`)(new Date)}function $e(t,e){if(t)for(let[r,n]of Object.entries(e)){if(r=M(r),r.startsWith("data"))return de(t,n);s(n,String)&&ce(r)&&t.setAttribute(r,n.split(/[, ]/)?.join(" "))}}function de(t,e){if(t&&s(e,Object))for(let[r,n]of Object.entries(e))t.setAttribute(`data-${M(r)}`,n)}function me(t){return t?s(t,Proxy)?[t.EL]:s(t,NodeList)?[...t]:I(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 I(t){return s(t,Text,HTMLElement,Comment)}function Z(t,e){if(s(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(M(r),n,o)}}function R(t){let e=t.cloneNode(!0);return e.removeAttribute&&e.removeAttribute("id"),t.isConnected?t.remove():t=null,e}function Ue(t){if(!s(t,HTMLElement))return;let e=t.style,r=getComputedStyle(t),n=!![e.visibility,r.visibility].includes("hidden"),o=!![e.display,r.display].includes("none"),i=!!t.hidden,a=parseInt(r.height)<1||parseInt(r.width)<1,w=t.offsetTop<0||t.offsetLeft+t.offsetWidth<0||t.offsetLeft>document.body.offsetWidth,f=+r.opacity==0||+(e.opacity||1)==0;return!(i||w||f||o||n||a)}function _e(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(Ne(r)?`<!--${r.data}-->`:be(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`_${Ut(Bt).slice(0,8).join("")}`}function Ae(t){return t=s(t,String)&&/,/.test(t)?t.split(",").map(e=>e.trim().toLowerCase()).filter(e=>e.length>0):t,s(t,Array)?t:s(t,String)&&t?.trim().toLowerCase()||""}function Ye(t){return t?.isConnected?!![...document.querySelectorAll(":is(:modal)")].find(e=>e===t):!1}function He(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 Ut(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 s(t,String)?t.toLowerCase().split("-").map((e,r)=>r&&`${_t(e)}`||e).join(""):t}function M(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`).replace(/^-|-$/,"")}function _t([t,...e]){return`${t.toUpperCase()}${e.join("")}`}function be(t){return s(t,Comment,Text)}function Ne(t){s(t,Comment)}function Xe(t){return s(t,Text)}function X(t){return s(t,String)&&/^<|>$/.test(`${t}`.trim())}function K(t){return s(t,Array)&&!t?.find(e=>!I(e))}function he(t){return s(t,Array)&&!t?.find(e=>!X(e))}function T(t,e){let r=t.collection.filter(n=>!be(n));for(let n=0;n<r.length;n+=1)e(r[n],n);return t}function Ke(t){return t.node?s(t.node,Comment)?`<!--${t.node.textContent}-->`:t.HTML.get(1).split(">")[0]+">...":""}function Pe(t,e,r){let n=e!==document.body&&s(t,String)&&t.toLowerCase()!=="body"?e:document;try{r.collection=[...n.querySelectorAll(t)]}catch{F.warn(`JQx: Invalid CSS querySelector. [${s(t,String)?t:"Not a string!"}]`)}}function qe(){return{isCommentOrTextNode:be,isNode:I,isComment:Ne,isText:Xe,isHtmlString:X,isArrayOfHtmlElements:K,isArrayOfHtmlStrings:he,ElemArray2HtmlString:Ge,input2Collection:me,setCollectionFromCssSelector:Pe,cssRuleEdit:_({createWithId:"JQxStylesheet"})}}function et(){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 s(n,Node)?Object.freeze({get writable(){return _e(n)},get modal(){return Ye(n)},get inDOM(){return n.isConnected},get open(){return n.open??!1},get visible(){return Ue(n)},get disabled(){return n.hasAttribute("readonly")||n.hasAttribute("disabled")},get empty(){return r.collection.length<1},get virtual(){return r.isVirtual}}):e}}function tt(t,e,r,n){r&&s(e,String)&&(e={[e]:r==="-"?"":r});let o;e.className&&(o=e.className,delete e.className),o=[...t.classList].find(a=>a.startsWith("JQxClass-")||o&&a===o)||o||`JQxClass-${ye().slice(1)}`,n.editCssRule(`.${o}`,e),t.classList.add(o)}var Gt=et();function rt(t){return{factoryExtensions:Zt(t),instanceExtensions:Yt(t)}}function Zt(t){return{data(e){return{get all(){return new Proxy(e[0]?.dataset??{},Le)},set(r={}){if(!e.is.empty&&s(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&&s(r,Object))for(let[n,o]of Object.entries(r))e.setData({[n]:o});return e},remove(r){return e[0]?.removeAttribute(`data-${M(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=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?j(o):o},set(r,n=!1,o=!1){r=r.isJQx?r.HTML.get(1):r;let i=s(r,String);return r=i&&o?j(r):r,i&&(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=s(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=s(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 Gt(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])[M(r)]},nwRule(r){return e.Style.byRule({rules:r})},byRule({classes2Apply:r=[],rules:n=[]}={}){let i=s(n,String)&&!r.length?n.split("{")[0].trim():"";if(n=n&&s(n,String)?[n]:n,r=r&&s(r,String)?[r]:r,(n?.length||r?.length)&&(n?.length&&t.editCssRules(...n),r))for(let a of r)e.addClass(a);return i?.startsWith(".")&&e.addClass(i.slice(1)),i?.startsWith("#")&&!e.attr("id")&&e.prop({id:i.slice(1)}),e}}}}}function Yt(t){return{addClass(e,...r){return T(e,n=>n&&r.forEach(o=>n.classList.add(o)))},after:ge,afterMe:ge,andThen(e,r,n=!1){if(!r||!s(r,String,Node,Proxy))return F.log("[JQx instance].[before(Me) | after(Me) | andThen]: invalid/-sufficient input."),e;r=r?.isJQx?r:s(r,Node)?t.virtual(r):t.virtual(P(r));let[o,i,a]=n?[0,"before",r.collection.concat(e.collection)]:[e.collection.length-1,"after",e.collection.concat(r.collection)];return e[o][i](...r.collection),e.collection=a,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&&A(o)){let i=o.trim(),w=!/^<(.+)[^>]+>$/m.test(i)?t.text(o):P(o);T(e,f=>f.append(n?w:R(w)))}I(o)&&T(e,i=>i.append(n?o:R(o))),o.isJQx&&!o.is.empty&&T(e,i=>o.collection.forEach(a=>i.append(n?a:R(a))))}return e},appendTo(e,r){switch(!0){case(!r.isJQx&&!s(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||s(e.node,Text,Comment))return e;if(!n&&A(r))return r=M(r),r==="class"?[...e.node.classList].join(" "):e.node.getAttribute(r);if(A(r)&&n)switch(r=M(r),!0){case r.startsWith("data-"):r={data:{[r.replace("data-","")]:n}};break;default:r={[r]:n}}return s(r,Object)&&!e.is.empty&&$e(e.node,r),e},before:pe,beforeMe:pe,clear(e){return T(e,fe)},closest(e,r){let n=A(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 T(e,o=>tt(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(i=>{i.removeAttribute&&i?.removeAttribute("id")}),r?t(o).toDOM(n):t.virtual(o)}},each(e,r){return T(e,r)},empty(e){return T(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 T(e,r=>Z(r,{display:"none !important"}))},html(e,r,n){switch(!0){case(e.is.empty&&!A(r)):return"";case!A(r):return e.node?.getHTML()??"";default:let o=P(`<div>${r.isJQx?r.HTML.get(!0):r}</div>`);return T(e,a=>(a.textContent=n?a.textContent:"",a.insertAdjacentHTML(t.at.end,o.getHTML())))}},htmlFor(e,r,n="",o=!1){if(e.is.empty||!A(r)||!A(n))return e;let i=e.find$(r);if(i.length<1)return e;let a=P(`<span>${n}</span>`);return i.each(w=>{o||(w.textContent=""),w.insertAdjacentHTML(t.at.end,a?.getHTML())}),e},isEmpty(e){return!e.node},nth$(e,r){return e.single(r)},on(e,r,...n){switch(!0){case(e.is.empty||!s(r,String,Array)||!A(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||!s(r,String,Array)||!A(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(A(o)){o=o.trim();let a=!/^<(.+)[^>]+>$/m.test(o)?t.text(o):P(o);a=n?a:R(a),T(e,w=>w.prepend(a.cloneNode(!0)))}I(o)&&T(e,i=>i.prepend(n?o:R(o))),o.isJQx&&!o.is.empty&&(o.collection.length>1&&o.collection.reverse(),T(e,i=>T(o,a=>i.prepend(n?a:R(a)))),o.collection.reverse())}return e},prependTo(e,r){return r.isJQx||(r=t.virtual(r)),r.prepend(e),e},prop(e,r,n){if(s(r,String)&&!n)return r.startsWith("data")?e[0]?.dataset[r.slice(r.indexOf("-")+1)]:e[0]?.[r];let o=s(r,Object)?r:{[r]:n};for(let[i,a]of Object.entries(o)){if(i=i.trim(),a&&!ce(i)||!a)return!1;if(i.toLowerCase()==="id")return e[0].id=a;T(e,f=>{if(i.startsWith("data"))return f.dataset[i.slice(i.indexOf("-")+1)]=a;f[i]=a})}return e},remove(e,r){let n=i=>i.remove(),o=()=>e.collection=e.collection.filter(i=>document.documentElement.contains(i));if(r){let i=e.find$(r);return i.is.empty||(T(i,n),o()),e}return T(e,n),o(),e},rmAttr(e,...r){for(let n of r)e.node.removeAttribute(n);return e},removeClass(e,...r){return T(e,n=>{if(n)for(let o of r)n.classList.remove(o)})},renderTo(e,r,n){return r=s(r,HTMLElement)||r.isJQx?r:document.body,n=s(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||!s(n,HTMLElement)&&!n?.isJQx?(t.logger.error("JQx replace: invalid replacement value"),e):((n.isJQx||s(n,NodeList))&&(n=n[0]),o&&r&&(r=s(r,String)?o.querySelectorAll(r):r.isJQx?r.collection:r,s(r,HTMLElement,NodeList,Array)&&s(n,HTMLElement)&&(s(r,HTMLElement)?[r]:[...r]).forEach(i=>i.replaceWith(n.cloneNode(!0)))),e)},replaceClass(e,r,...n){return T(e,o=>{o.classList.remove(r);for(let i of n)o.classList.add(i)})},replaceMe(e,r){return e.replaceWith(r)},replaceWith(e,r){return r=s(r,Element)?r:r.isJQx?r[0]:void 0,r&&(e[0].replaceWith(r),e=t.virtual(r)),e},setData(e,r){return T(e,n=>de(n,r))},show(e){return T(e,r=>Z(r,{display:"revert-layer !important"}))},single(e,r){let n=e.collection.length>0;switch(r=r??0,!0){case(n&&s(r,String)):return e.find$(r);case(n&&s(r,Number)):return t(e.collection[r]);case n:return e.collection[0];default:return e}},style(e,r,n){return T(e,i=>{n&&s(r,String)&&(r={[r]:n||"none"}),Z(i,r)})},text(e,r,n=!1){switch(!0){case e.isEmpty():return e;case!s(r,String):return e.node.textContent;default:return T(e,o=>o.textContent=n?o.textContent+r:r)}},toDOM(e,r=document.body,n=H.BeforeEnd){return e.isVirtual=!1,k(e.collection,r,n),e},toggleClass(e,r){return T(e,n=>n.classList.toggle(r))},toNodeList(e){return[...e.collection].map(r=>document.importNode(r,!0))},trigger(e,r,n,o){n=s(n,Function)?n:Event,o=s(o,Object)?{...o,bubbles:o.bubbles??!0}:{bubbles:!0};let i=new n(r,o);return e.is.empty||e.each(a=>a.dispatchEvent(i)),e},val(e,r){switch(!0){case(e.is.empty||!s(e.node,HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement)):return e;case!s(r,String):return e.node.value;default:return e.node.value=s(r,String)?r:"",e}}}}var Me,Se,{isComment:nn,isText:on,isHtmlString:ln,isArrayOfHtmlElements:sn,isArrayOfHtmlStrings:an,ElemArray2HtmlString:un,cssRuleEdit:Oe,addFn:Xt}=Kt();function Kt(){return{...qe(),addFn:qt}}function qt(t,e){return t=t?.trim(),!A(t)||!s(e,Function)?F.error("JQx.fn: method invalid parameter(s)"):Se[t]=(r,...n)=>e(r,...n)}function er(t){return function(e,r,n){if(e=e?.trim(),!A(e)||!s(r,Function))return t.error("JQx.staticFn: invalid parameter(s)");let o=n?{get(){return r()}}:{value(...i){return r(...i)}};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 q(t){return new Proxy(t,Object.freeze({get:(e,r)=>tr(e,r,t)}))}function nt(t,e){return(...r)=>s(t,Function)&&t(q(e),...r)}function tr(t,e,r){switch(!0){case s(e,Symbol):return W({trial:()=>t[e],whenError:()=>t});case s(+e,Number):return t.collection?.[e]||void 0;case e in Me:return nt(Me[e],r)();case e in Se:return nt(Se[e],r);default:return t[e]}}function lt(t){let e=lr(t);for(let[r,n]of Object.entries(Object.getOwnPropertyDescriptors(e)))Object.defineProperty(t,r,n);return t}function rr(t){return{allow(e){let r=/-/.test(e),n=r&&e;e=r?Y(e):e.toLowerCase(),D.allowTag(e),Object.defineProperties(t,De(e,!0,t,n))},prohibit(e){e=e.toLowerCase(),D.prohibitTag(e),Object.defineProperties(t,De(e,!1,t))}}}function ot(...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))Oe(e,{removeRule:1})}function nr(t){return function(e,r,n){r=r?.isJQx?r?.[0]:r,n=n&&Object.values(H).find(i=>n===i);let o=t(e,document.createElement("br"));if(r&&!s(r,HTMLBRElement))for(let i of o.collection)n?r.insertAdjacentElement(n,i):r.append(i);return o}}function or(...t){let e={};for(let r of t){let n=Object.getOwnPropertyDescriptors(r);for(let[o,i]of Object.entries(n))!(o in e)&&Object.defineProperty(e,o,{...i,enumerable:!1})}return e}function ir(t,e,r,n){return t=M(n||t.toLowerCase()),{get(){return(...o)=>{let i=e&&r.virtual(Q(ee[t](...o)))||void 0,w=!s(i?.node,Comment,Text,void 0)?Fe(i):"";return F.log(e?`JQx: created (virtual) instance from [JQx].${t} ${w}`:`JQx: ${t.toUpperCase()} is prohibited. Use [JQx].allowTag if necessary.`),i}},enumerable:!1,configurable:!0}}function De(t,e,r,n){t=t.toLowerCase();let o=ir(t,e,r,n);return n?{[n]:o,[Y(n)]:o}:{[t]:o,[t.toUpperCase()]:o}}function lr(t){return or(Object.entries(D.tagsRaw).reduce(sr(t),{}),mr(t))}function sr(t){return function(e,[r,n]){return Object.defineProperties(e,De(r,n,t)),e}}function ar(t){return function(e,r,...n){s(r,Function)&&(n.push(r),r=void 0),t({type:e,selector:r,handlers:n})}}function ur(t){return function(e){let{type:r,types:n,origin:o,selector:i,handler:a,handlers:w,node:f,name:E,capture:c,once:h,about:g}=e;a=w||a,r=n||r,i=o||i;let S=Ae(r),p=E;a=s(a,Function)?[a]:a;let m={type:S,selector:i||o,capture:c,name:p,once:h,node:f,about:g};switch(!0){case(s(S,Array)&&S.length>0):for(let b of S)m.type=b,it(a,m,t);break;default:return it(a,m,t)}}}function it(t,e,r){for(let n of t)r.listen({...e,handler:n})}function cr(t){return function(e,r){return r=A(r)&&r,e=A(e)&&e,r&&e&&t.listenerStore[e][r]}}function fr(t){return t.activePopup||Object.defineProperty(t,"activePopup",{value:ie(t),enumerable:!1}),t.activePopup}function dr(t){let e=(c,h)=>Oe(c,h),r=function(c){return _({createWithId:c||`jqx${ye()}`})},n=function(...c){for(let h of c)Oe(h)},o=rr(t),i=le(t),a=ur(i);return{editCssRule:e,createStyle:r,editCssRules:n,allowProhibit:o,handle:a,capturedHandling:a,log:(...c)=>F.on.log(...c).off,warn:(...c)=>F.on.warn(...c).off,error:(...c)=>F.on.error(...c).off,handlerWrapper:i}}function mr(t){let{factoryExtensions:e,instanceExtensions:r}=rt(t);Me=e,Se=r;let{editCssRule:n,createStyle:o,editCssRules:i,allowProhibit:a,handle:w,capturedHandling:f,log:E,warn:c,error:h,handlerWrapper:g}=dr(t),S=cr(t),p=er(t);return{log:E,warn:c,error:h,editCssRules:i,createStyle:o,editStylesheet:o,editCssRule:n,escHtml:j,logger:F,text(m,b=!1){return b?t.comment(m):document.createTextNode(m)},node(m,b=document){return b.querySelector(m,b)},nodes(m,b=document){return[...b.querySelectorAll(m,b)]},clearAllTimers:Te,get staticFn(){return function(m,b,C){return p(m,b,C)}},get toBool(){return He},get getNamedListener(){return S},get virtual(){return nr(t)},get allowTag(){return a.allow},get prohibitTag(){return a.prohibit},get removeCssRule(){return ot},get removeCssRules(){return ot},get delegate(){return ar(f)},get delegateCaptured(){return f},get handle(){return f},get listen(){return g.listen},get at(){return H},get setStyle(){return n},get fn(){return Xt},get lenient(){return D.allowUnknownHtmlTags},get IS(){return s},get Popup(){return fr(t)},get listenerStore(){return g.ListenerStore}}}var st=lt(gr());function gr(){return function(e,r,n=H.BeforeEnd){if(e?.isJQx)return e;let o=s(r,HTMLBRElement);r=(!o&&r&&r.isJQx?r[0]:r)||document.body,n=n&&Object.values(H).find(c=>n===c)?n:void 0;let i=X(e),w=!i&&he(e)||i,f={collection:me(e)??[],isVirtual:o,isJQx:!0},E=K(f.collection);if(f.collection.length&&E)return o||f.collection.forEach(c=>{r.contains(c)||k([c],r,n)}),q(f);if(w){if([e].flat().forEach(c=>f.collection.push(P(c))),f.collection.length>0){let c=f.collection.filter(p=>p?.dataset?.jqxcreationerror);f.collection=f.collection.filter(p=>!p?.dataset?.jqxcreationerror);let g=f.collection.map(p=>`${String(p.constructor).split(/function|\(/)[1].trim()}`).length>1;f=q(f);let S=f.collection.length>0?Ke(f):"sanitized: no elements remaining";F.log(`JQx: created ${f.isVirtual?"(virtual)":""} instance from ${g?"array of ":""}HTML string${g?"s":""} ${S}`),f.isVirtual||k(f.collection,r,n)}return f}return Pe(e,r,f),q(f)}}var pn=st;export{pn as default};
|
|
@@ -76,18 +76,23 @@ function TOAFactory(specs = {}) {
|
|
|
76
76
|
switch(true) {
|
|
77
77
|
case (!noShouldbe && compareWith === input) || (input?.[Symbol.proxy] && compareWith === Proxy): return true;
|
|
78
78
|
case String(compareWith) === `NaN`: return String(input) === `NaN`;
|
|
79
|
-
case input?.[Symbol.toStringTag] &&
|
|
79
|
+
case input?.[Symbol.toStringTag] && typeof compareWith === `string`:
|
|
80
|
+
return String(compareWith) === input[Symbol.toStringTag];
|
|
80
81
|
default: return compareWith ? resultWithComparison(input, compareWith, me) : resultWithoutComparison(input, me);
|
|
81
82
|
}
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
function resultWithoutComparison(input, me) {
|
|
85
|
-
|
|
86
|
+
const toStringTag = input?.[Symbol.toStringTag] ?? input?.prototype?.[Symbol.toStringTag];
|
|
87
|
+
return toStringTag || me?.name || String(me);
|
|
86
88
|
}
|
|
87
89
|
|
|
88
90
|
function resultWithComparison(input, compareWith, me) {
|
|
89
|
-
return maybe({trial: _ =>
|
|
90
|
-
|
|
91
|
+
return maybe({trial: _ =>
|
|
92
|
+
input instanceof compareWith}) ||
|
|
93
|
+
compareWith === me ||
|
|
94
|
+
compareWith === Object.getPrototypeOf(me) ||
|
|
95
|
+
`${compareWith?.name}` === me?.name;
|
|
91
96
|
}
|
|
92
97
|
|
|
93
98
|
function ISOneOf(obj, ...params) {
|
|
@@ -145,16 +150,6 @@ function TOAFactory(specs = {}) {
|
|
|
145
150
|
});
|
|
146
151
|
}
|
|
147
152
|
}
|
|
148
|
-
|
|
149
|
-
function modifySetter(setterMethod2Modify) {
|
|
150
|
-
const oldSetter = setterMethod2Modify.set;
|
|
151
|
-
setterMethod2Modify.set = (target, key, value) => {
|
|
152
|
-
if (key === Symbol.proxy) { return target[key] = value; }
|
|
153
|
-
return oldSetter(target, key, value);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
return setterMethod2Modify;
|
|
157
|
-
}
|
|
158
153
|
}
|
|
159
154
|
|
|
160
155
|
function SymbolAndCustomProxyFactory(IS, typeOf, useSymbolicExtension) {
|
|
@@ -180,6 +175,16 @@ function SymbolAndCustomProxyFactory(IS, typeOf, useSymbolicExtension) {
|
|
|
180
175
|
}
|
|
181
176
|
}
|
|
182
177
|
|
|
178
|
+
function modifySetter(setterMethod2Modify) {
|
|
179
|
+
const oldSetter = setterMethod2Modify.set;
|
|
180
|
+
setterMethod2Modify.set = (target, key, value) => {
|
|
181
|
+
if (key === Symbol.proxy) { return target[key] = value; }
|
|
182
|
+
return oldSetter(target, key, value);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
return setterMethod2Modify;
|
|
186
|
+
}
|
|
187
|
+
|
|
183
188
|
function ctor2String(obj) {
|
|
184
189
|
const ctor = Object.getPrototypeOf(obj)?.constructor;
|
|
185
190
|
return ctor?.name || `Object`;
|