dynamic-html-helpers 1.5.1 → 1.5.2
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/htmlhelpers.min.js +15 -15
- package/Bundle/htmlhelpers.min.js.map +3 -3
- package/Bundle/htmlhelpers.script.js +858 -1012
- package/Bundle/htmlhelpers.script.js.map +3 -3
- package/Resource/Externals/jqx.min.js +13 -13
- package/Resource/Externals/jqx.min.js.map +3 -3
- package/package.json +1 -1
|
@@ -22,7 +22,7 @@ var HTMLHelpers = (() => {
|
|
|
22
22
|
// ../index.js
|
|
23
23
|
var index_exports = {};
|
|
24
24
|
__export(index_exports, {
|
|
25
|
-
$: () =>
|
|
25
|
+
$: () => yn,
|
|
26
26
|
$D: () => f,
|
|
27
27
|
logFactory: () => logFactory,
|
|
28
28
|
regexhelper: () => REHelper_default,
|
|
@@ -30,297 +30,298 @@ var HTMLHelpers = (() => {
|
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
// ../Resource/Externals/jqx.min.js
|
|
33
|
-
var { IS:
|
|
34
|
-
function
|
|
35
|
-
let { useSymbolicExtensions: e } = t, { shouldbeIsSingleObject: r, ISOneOf: n, isExcept:
|
|
36
|
-
return e &&
|
|
37
|
-
function
|
|
38
|
-
let
|
|
33
|
+
var { IS: a, maybe: P, $Wrap: Er, isNothing: ct, addSymbolicExtensions: Te, detectableProxy: G } = ut({ useSymbolicExtensions: false });
|
|
34
|
+
function ut(t = {}) {
|
|
35
|
+
let { useSymbolicExtensions: e } = t, { shouldbeIsSingleObject: r, ISOneOf: n, isExcept: o, verifyNothingness: i, determineType: u, addSymbolicExtensions: S2, maybe: p2, $Wrap: x2, detectableProxy: f2 } = ft(y, e);
|
|
36
|
+
return e && S2(), { IS: y, maybe: p2, $Wrap: x2, isNothing: i, addSymbolicExtensions: S2, detectableProxy: f2 };
|
|
37
|
+
function y(m, ...b2) {
|
|
38
|
+
let d = typeof m == "symbol" ? Symbol.isSymbol : m;
|
|
39
39
|
switch (true) {
|
|
40
|
-
case !!
|
|
41
|
-
return r(m,
|
|
40
|
+
case !!p2({ trial: (c) => "isTypes" in (b2?.[0] ?? {}) }):
|
|
41
|
+
return r(m, b2[0]);
|
|
42
42
|
default:
|
|
43
|
-
return
|
|
43
|
+
return b2.length > 1 ? n(d, ...b2) : u(m, ...b2);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
function
|
|
48
|
-
let { SymbolAndCustomProxyFactory: r, maybeFactory: n, WrapAnyFactory:
|
|
49
|
-
return Object.freeze({ shouldbeIsSingleObject: m, ISOneOf:
|
|
50
|
-
function
|
|
51
|
-
return
|
|
47
|
+
function ft(t, e) {
|
|
48
|
+
let { SymbolAndCustomProxyFactory: r, maybeFactory: n, WrapAnyFactory: o, verifyNothingness: i, determineType: u, detectableProxy: S2 } = dt(t, y), { addSymbolicExtensions: p2 } = r(t, y, e), [x2, f2] = [n(), o(t, y)];
|
|
49
|
+
return Object.freeze({ shouldbeIsSingleObject: m, ISOneOf: b2, isExcept: c, verifyNothingness: i, determineType: u, detectableProxy: S2, addSymbolicExtensions: p2, maybe: x2, $Wrap: f2 });
|
|
50
|
+
function y(s) {
|
|
51
|
+
return s?.[Symbol.proxy] || t(s);
|
|
52
52
|
}
|
|
53
|
-
function m(
|
|
53
|
+
function m(s, l) {
|
|
54
54
|
switch (true) {
|
|
55
|
-
case "defaultValue" in
|
|
56
|
-
return
|
|
57
|
-
case "notTypes" in
|
|
58
|
-
return c(
|
|
55
|
+
case "defaultValue" in l:
|
|
56
|
+
return d(s, l);
|
|
57
|
+
case "notTypes" in l:
|
|
58
|
+
return c(s, l);
|
|
59
59
|
default:
|
|
60
|
-
return t(
|
|
60
|
+
return t(s, ...[l.isTypes].flat());
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
function
|
|
64
|
-
return
|
|
63
|
+
function b2(s, ...l) {
|
|
64
|
+
return l.some((g2) => t(s, g2));
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
return
|
|
66
|
+
function d(s, { defaultValue: l, isTypes: g2 = [void 0], notTypes: h2 } = {}) {
|
|
67
|
+
return g2 = g2?.constructor !== Array ? [g2] : g2, h2 = h2 && h2?.constructor !== Array ? [h2] : [], h2.length < 1 ? t(s, ...g2) ? s : l : c(s, { isTypes: g2, notTypes: h2 }) ? s : l;
|
|
68
68
|
}
|
|
69
|
-
function c(
|
|
70
|
-
return
|
|
69
|
+
function c(s, { isTypes: l = [void 0], notTypes: g2 = [void 0] } = {}) {
|
|
70
|
+
return l = l?.constructor !== Array ? [l] : l, g2 = g2?.constructor !== Array ? [g2] : g2, t(s, ...l) && !t(s, ...g2);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
let t = { IS: "toa.is", TYPE: "toa.type", IS_SYMBOL: "toa.isASymbol", PROXY: "toa.
|
|
75
|
-
return Object.freeze({ SymbolAndCustomProxyFactory:
|
|
76
|
-
function
|
|
73
|
+
function dt() {
|
|
74
|
+
let t = { IS: "toa.is", TYPE: "toa.type", IS_SYMBOL: "toa.isASymbol", PROXY: "toa.proxyFor" }, e = { NAN: "NaN", INFINITY: "Infinity", BOOLEAN: "Boolean", OBJECT: "Object", PROXY_PREFIX: "Proxy (" }, r = n();
|
|
75
|
+
return Object.freeze({ SymbolAndCustomProxyFactory: i, maybeFactory: d, WrapAnyFactory: b2, verifyNothingness: c, determineType: p2, detectableProxy: r });
|
|
76
|
+
function n() {
|
|
77
|
+
let s = (h2) => ({ get(E3, F2) {
|
|
78
|
+
return F2 === Symbol.proxy ? `Proxy for ${h2}` : Reflect.get(E3, F2);
|
|
79
|
+
}, has(E3, F2) {
|
|
80
|
+
return F2 === Symbol.proxy ? true : F2 in E3;
|
|
81
|
+
} });
|
|
82
|
+
function l(h2) {
|
|
83
|
+
let E3 = h2.name || h2.constructor.name;
|
|
84
|
+
return new Proxy(h2, s(E3));
|
|
85
|
+
}
|
|
86
|
+
function g2(h2, E3) {
|
|
87
|
+
return E3 = a(E3, Object) ? E3 : {}, l(new Proxy(h2, E3));
|
|
88
|
+
}
|
|
89
|
+
return { wrap: l, create: g2 };
|
|
90
|
+
}
|
|
91
|
+
function o(s, l) {
|
|
77
92
|
Symbol.is || (Symbol.is = Symbol.for(t.IS), Symbol.type = Symbol.for(t.TYPE), Object.defineProperties(Object.prototype, { [Symbol.type]: { get() {
|
|
78
|
-
return
|
|
79
|
-
}, enumerable: false, configurable:
|
|
80
|
-
return
|
|
81
|
-
}, enumerable: false, configurable: false } }), Object.defineProperties(Object, { [Symbol.type]: { value(
|
|
82
|
-
return
|
|
83
|
-
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(
|
|
84
|
-
return
|
|
93
|
+
return l(this);
|
|
94
|
+
}, enumerable: false, configurable: true }, [Symbol.is]: { value: function(...g2) {
|
|
95
|
+
return s(this, ...g2);
|
|
96
|
+
}, enumerable: false, configurable: false } }), Object.defineProperties(Object, { [Symbol.type]: { value(g2) {
|
|
97
|
+
return l(g2);
|
|
98
|
+
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(g2, ...h2) {
|
|
99
|
+
return s(g2, ...h2);
|
|
85
100
|
}, enumerable: false, configurable: false } }));
|
|
86
101
|
}
|
|
87
|
-
function
|
|
88
|
-
return Symbol.isSymbol || (Symbol.isSymbol = Symbol.for(t.IS_SYMBOL)
|
|
89
|
-
}
|
|
90
|
-
function
|
|
91
|
-
return (ct(
|
|
92
|
-
}
|
|
93
|
-
function
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
function y(o, ...s) {
|
|
113
|
-
let { noInput: a, noShouldbe: p2, compareTo: E3, inputCTOR: C3, isNaN: ge2, isInfinity: pe2, shouldBeFirstElementIsNothing: ye2 } = S2(o, ...s);
|
|
114
|
-
switch (s = s.length && s[0], true) {
|
|
115
|
-
case ye2:
|
|
116
|
-
return String(o) === String(E3);
|
|
117
|
-
case (o?.[Symbol.proxy] && p2):
|
|
118
|
-
return o[Symbol.proxy];
|
|
119
|
-
case ge2:
|
|
120
|
-
return p2 ? e.NAN : String(E3) === String(o);
|
|
121
|
-
case pe2:
|
|
122
|
-
return p2 ? e.INFINITY : String(E3) === String(o);
|
|
123
|
-
case a:
|
|
124
|
-
return p2 ? String(o) : String(E3) === String(o);
|
|
125
|
-
case C3 === Boolean:
|
|
126
|
-
return p2 ? e.BOOLEAN : C3 === s;
|
|
102
|
+
function i(s, l, g2) {
|
|
103
|
+
return Symbol.isSymbol || (Symbol.isSymbol = Symbol.for(t.IS_SYMBOL), Symbol.proxy = Symbol.for(t.PROXY)), { addSymbolicExtensions: () => o(s, l) };
|
|
104
|
+
}
|
|
105
|
+
function u(s) {
|
|
106
|
+
return (ct(s, true) ? { name: "unknown" } : Object.getPrototypeOf(s)?.constructor).name;
|
|
107
|
+
}
|
|
108
|
+
function S2(s, ...l) {
|
|
109
|
+
let g2 = l.length < 1, h2 = s == null;
|
|
110
|
+
return { noInput: h2, noShouldbe: g2, compareTo: !g2 && l[0], inputCTOR: !h2 && (s?.constructor || Object.getPrototypeOf(s)?.constructor), isNaN: Number.isNaN(s) || P({ trial: (E3) => String(s) === e.NAN }), isInfinity: P({ trial: (E3) => String(s) }) === e.INFINITY, shouldBeFirstElementIsNothing: !g2 && c(l[0]) };
|
|
111
|
+
}
|
|
112
|
+
function p2(s, ...l) {
|
|
113
|
+
let { noInput: g2, noShouldbe: h2, compareTo: E3, inputCTOR: F2, isNaN: st, isInfinity: at, shouldBeFirstElementIsNothing: lt } = S2(s, ...l);
|
|
114
|
+
switch (l = l.length && l[0], true) {
|
|
115
|
+
case lt:
|
|
116
|
+
return String(s) === String(E3);
|
|
117
|
+
case (s?.[Symbol.proxy] && h2):
|
|
118
|
+
return s[Symbol.proxy];
|
|
119
|
+
case st:
|
|
120
|
+
return h2 ? e.NAN : String(E3) === String(s);
|
|
121
|
+
case at:
|
|
122
|
+
return h2 ? e.INFINITY : String(E3) === String(s);
|
|
123
|
+
case g2:
|
|
124
|
+
return h2 ? String(s) : String(E3) === String(s);
|
|
125
|
+
case F2 === Boolean:
|
|
126
|
+
return h2 ? e.BOOLEAN : F2 === l;
|
|
127
127
|
default:
|
|
128
|
-
return
|
|
128
|
+
return f2(s, l, h2, x2(s, F2));
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
function x2(
|
|
131
|
+
function x2(s, l) {
|
|
132
132
|
switch (true) {
|
|
133
|
-
case
|
|
133
|
+
case s === 0:
|
|
134
134
|
return Number;
|
|
135
|
-
case
|
|
135
|
+
case s === "":
|
|
136
136
|
return String;
|
|
137
|
-
case !
|
|
138
|
-
return { name: String(
|
|
137
|
+
case !s:
|
|
138
|
+
return { name: String(s) };
|
|
139
139
|
default:
|
|
140
|
-
return
|
|
140
|
+
return l;
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function f2(s, l, g2, h2) {
|
|
144
144
|
switch (true) {
|
|
145
|
-
case (!
|
|
145
|
+
case (!g2 && l === s || s?.[Symbol.proxy] && l === Proxy):
|
|
146
146
|
return true;
|
|
147
|
-
case String(
|
|
148
|
-
return String(
|
|
149
|
-
case (
|
|
150
|
-
return String(
|
|
147
|
+
case String(l) === e.NAN:
|
|
148
|
+
return String(s) === e.NAN;
|
|
149
|
+
case (s?.[Symbol.toStringTag] && typeof l == "string"):
|
|
150
|
+
return String(l) === s[Symbol.toStringTag];
|
|
151
151
|
default:
|
|
152
|
-
return
|
|
152
|
+
return l ? m(s, l, h2) : y(s, h2);
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
function
|
|
156
|
-
return (
|
|
155
|
+
function y(s, l) {
|
|
156
|
+
return (s?.[Symbol.toStringTag] ?? s?.prototype?.[Symbol.toStringTag]) || l?.name || String(l);
|
|
157
157
|
}
|
|
158
|
-
function m(
|
|
159
|
-
return
|
|
158
|
+
function m(s, l, g2) {
|
|
159
|
+
return P({ trial: (h2) => s instanceof l }) || l === g2 || l === Object.getPrototypeOf(g2) || `${l?.name}` === g2?.name;
|
|
160
160
|
}
|
|
161
|
-
function
|
|
162
|
-
return function(
|
|
163
|
-
let
|
|
164
|
-
return
|
|
161
|
+
function b2(s, l) {
|
|
162
|
+
return function(g2) {
|
|
163
|
+
let h2 = { get value() {
|
|
164
|
+
return g2;
|
|
165
165
|
}, is(...E3) {
|
|
166
|
-
return
|
|
166
|
+
return s(g2, ...E3);
|
|
167
167
|
}, get type() {
|
|
168
|
-
return
|
|
168
|
+
return l(g2);
|
|
169
169
|
} };
|
|
170
|
-
return Object[Symbol.type] && Object.defineProperties(
|
|
171
|
-
return
|
|
170
|
+
return Object[Symbol.type] && Object.defineProperties(h2, { [Symbol.type]: { get() {
|
|
171
|
+
return l(g2);
|
|
172
172
|
} }, [Symbol.is]: { value(...E3) {
|
|
173
|
-
return
|
|
174
|
-
} } }), Object.freeze(
|
|
173
|
+
return s(g2, ...E3);
|
|
174
|
+
} } }), Object.freeze(h2);
|
|
175
175
|
};
|
|
176
176
|
}
|
|
177
|
-
function
|
|
178
|
-
let
|
|
177
|
+
function d() {
|
|
178
|
+
let s = (l) => {
|
|
179
179
|
};
|
|
180
|
-
return function({ trial:
|
|
180
|
+
return function({ trial: l, whenError: g2 = s } = {}) {
|
|
181
181
|
try {
|
|
182
|
-
return
|
|
183
|
-
} catch (
|
|
184
|
-
return
|
|
182
|
+
return l();
|
|
183
|
+
} catch (h2) {
|
|
184
|
+
return g2(h2);
|
|
185
185
|
}
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
|
-
function c(
|
|
189
|
-
let
|
|
190
|
-
return
|
|
188
|
+
function c(s, l = false) {
|
|
189
|
+
let g2 = s == null;
|
|
190
|
+
return g2 = l ? g2 || a(s, 1 / 0) || a(s, NaN) : g2, g2;
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
|
-
var
|
|
194
|
-
var
|
|
195
|
-
var
|
|
196
|
-
function
|
|
193
|
+
var Ne = pt();
|
|
194
|
+
var I = mt();
|
|
195
|
+
var J = gt();
|
|
196
|
+
function mt() {
|
|
197
197
|
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(",")) };
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function gt() {
|
|
200
200
|
return { a: true, area: true, audio: false, br: true, base: true, body: true, button: true, canvas: true, comment: true, dl: true, data: true, datalist: true, div: true, em: true, embed: false, fieldset: true, font: true, footer: true, form: false, hr: true, head: true, header: true, output: true, iframe: false, frameset: false, img: true, input: true, li: true, label: true, legend: true, link: true, map: true, mark: true, menu: true, media: true, meta: true, nav: true, meter: true, ol: true, object: false, optgroup: true, option: true, p: true, param: true, picture: true, pre: true, progress: false, quote: true, script: false, select: true, source: true, span: true, style: true, caption: true, td: true, col: true, table: true, tr: true, template: false, textarea: true, time: true, title: true, track: true, details: true, ul: true, video: true, del: true, ins: true, slot: true, blockquote: true, svg: true, dialog: true, summary: true, main: true, address: true, colgroup: true, tbody: true, tfoot: true, thead: true, th: true, dd: true, dt: true, figcaption: true, figure: true, i: true, b: true, code: true, h1: true, h2: true, h3: true, h4: true, abbr: true, bdo: true, dfn: true, kbd: true, q: true, rb: true, rp: true, rt: true, ruby: true, s: true, strike: true, samp: true, small: true, strong: true, sup: true, sub: true, u: true, var: true, wbr: true, nobr: true, tt: true, noscript: true };
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function pt() {
|
|
203
203
|
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;}}"];
|
|
204
204
|
}
|
|
205
|
-
var
|
|
206
|
-
var
|
|
205
|
+
var Me = { html: "innerHTML", text: "textContent", class: "className" };
|
|
206
|
+
var yt = Mt();
|
|
207
|
+
var Q = {};
|
|
207
208
|
var k = {};
|
|
208
|
-
var
|
|
209
|
-
var
|
|
209
|
+
var j = Pt();
|
|
210
|
+
var De = (t) => {
|
|
210
211
|
console.error(`tinyDOM error: "${t}" is not a valid HTML tag`);
|
|
211
212
|
};
|
|
212
|
-
var z =
|
|
213
|
-
function
|
|
214
|
-
return Object.freeze(new Proxy(
|
|
213
|
+
var z = bt();
|
|
214
|
+
function bt() {
|
|
215
|
+
return Object.freeze(new Proxy(Q, Ie()));
|
|
215
216
|
}
|
|
216
|
-
function
|
|
217
|
+
function Ie() {
|
|
217
218
|
return { get(t, e) {
|
|
218
219
|
let r = String(e);
|
|
219
220
|
switch (true) {
|
|
220
221
|
case r in t:
|
|
221
222
|
return t[r];
|
|
222
|
-
case
|
|
223
|
-
return
|
|
223
|
+
case At(r):
|
|
224
|
+
return Pe({ tag: r, key: e });
|
|
224
225
|
default:
|
|
225
|
-
return
|
|
226
|
+
return Pe({ tag: r, key: e, isError: true });
|
|
226
227
|
}
|
|
227
228
|
}, set(t, e, r) {
|
|
228
|
-
return e === "setError" && typeof r == "function" && (
|
|
229
|
+
return e === "setError" && typeof r == "function" && (De = r), true;
|
|
229
230
|
}, enumerable: false, configurable: false };
|
|
230
231
|
}
|
|
231
|
-
function
|
|
232
|
-
let
|
|
233
|
-
if (
|
|
234
|
-
return (
|
|
235
|
-
} }),
|
|
232
|
+
function Pe({ tag: t, key: e, custom: r, debug: n = false, isError: o = false } = {}) {
|
|
233
|
+
let i = ht();
|
|
234
|
+
if (o) return Object.defineProperty(i, t, { get() {
|
|
235
|
+
return (u) => De(e) ?? "";
|
|
236
|
+
} }), Oe(i, t);
|
|
236
237
|
if (t.includes("-")) {
|
|
237
|
-
let [
|
|
238
|
-
|
|
238
|
+
let [u, S2] = t.includes("-") ? [t, Nt(t)] : [Tt(t), t];
|
|
239
|
+
k[u] = u, k[S2] = u, r = S2;
|
|
239
240
|
}
|
|
240
|
-
return r && Object.defineProperty(
|
|
241
|
-
return
|
|
242
|
-
} }), Object.defineProperty(
|
|
243
|
-
return
|
|
244
|
-
} }),
|
|
241
|
+
return r && Object.defineProperty(i, r, { get() {
|
|
242
|
+
return Re(t);
|
|
243
|
+
} }), Object.defineProperty(i, t, { get() {
|
|
244
|
+
return Re(t);
|
|
245
|
+
} }), Oe(i, t);
|
|
245
246
|
}
|
|
246
|
-
function
|
|
247
|
-
return
|
|
247
|
+
function Oe(t, e) {
|
|
248
|
+
return Q = Object.freeze(new Proxy(t, Ie())), Q[Symbol.for.proxy] = "Proxy (Object)", Q[e];
|
|
248
249
|
}
|
|
249
|
-
function
|
|
250
|
-
return Object.fromEntries(Object.entries(Object.getOwnPropertyDescriptors(
|
|
250
|
+
function ht() {
|
|
251
|
+
return Object.fromEntries(Object.entries(Object.getOwnPropertyDescriptors(Q)));
|
|
251
252
|
}
|
|
252
|
-
function
|
|
253
|
-
return e = e?.isJQx && e.node || (j(e, Number) ? String(e) : e),
|
|
253
|
+
function St(t, e, r) {
|
|
254
|
+
return e = e?.isJQx && e.node || (j(e, Number) ? String(e) : e), yt({ trial: (n) => je(e) ? t.insertAdjacentHTML("beforeend", e) : t.append(e), whenError: (n) => console.info(`${r} not created, reason
|
|
254
255
|
`, n) });
|
|
255
256
|
}
|
|
256
|
-
function
|
|
257
|
+
function xt(t, e, ...r) {
|
|
257
258
|
let n = wt(e, t);
|
|
258
|
-
return r?.forEach((
|
|
259
|
+
return r?.forEach((o) => St(n, o, t)), n;
|
|
259
260
|
}
|
|
260
261
|
function wt(t, e) {
|
|
261
|
-
switch (t =
|
|
262
|
+
switch (t = ge(e) ? Ft(t) : t?.isJQx ? t.node : t, true) {
|
|
262
263
|
case j(t, String):
|
|
263
|
-
return
|
|
264
|
+
return X(e, je(t, e) ? { html: t } : { text: t });
|
|
264
265
|
case t instanceof Node:
|
|
265
|
-
return
|
|
266
|
+
return Et(e, t);
|
|
266
267
|
default:
|
|
267
|
-
return
|
|
268
|
+
return X(e, t);
|
|
268
269
|
}
|
|
269
270
|
}
|
|
270
|
-
function
|
|
271
|
-
let r =
|
|
271
|
+
function Et(t, e) {
|
|
272
|
+
let r = X(t);
|
|
272
273
|
return r.append(e), r;
|
|
273
274
|
}
|
|
274
|
-
function
|
|
275
|
+
function vt(t) {
|
|
275
276
|
if (Object.keys(t).length < 1) return { assignable: {}, specials: [...Array(3)] };
|
|
276
|
-
let e =
|
|
277
|
+
let e = Lt(t);
|
|
277
278
|
return Object.keys(t).forEach((r) => {
|
|
278
279
|
let n = r.toLowerCase();
|
|
279
|
-
n in
|
|
280
|
+
n in Me && (t[Me[n]] = t[r]) && delete t[r];
|
|
280
281
|
}), { assignable: t, specials: e };
|
|
281
282
|
}
|
|
282
|
-
function
|
|
283
|
+
function Lt(t) {
|
|
283
284
|
if (t = j(t, Object) && t || void 0, !t) return Array(3);
|
|
284
|
-
let e = Object.entries(t.data ?? {}), r = Object.entries(t.attributes ?? {}), n = t.class?.split(/[ ,]/).map((
|
|
285
|
+
let e = Object.entries(t.data ?? {}), r = Object.entries(t.attributes ?? {}), n = t.class?.split(/[ ,]/).map((o) => o.trim()).filter((o) => o.length > 1);
|
|
285
286
|
return delete t.data, delete t.attributes, delete t.class, [e, r, n];
|
|
286
287
|
}
|
|
287
|
-
function
|
|
288
|
-
let [r, n,
|
|
289
|
-
r?.length && r.forEach(([
|
|
288
|
+
function Ct(t, e) {
|
|
289
|
+
let [r, n, o] = t;
|
|
290
|
+
r?.length && r.forEach(([i, u]) => e.dataset[i] = u), n?.length && n.forEach(([i, u]) => e.setAttribute(i, u)), o?.forEach((i) => e.classList.add(i));
|
|
290
291
|
}
|
|
291
|
-
function
|
|
292
|
+
function X(t, e) {
|
|
292
293
|
e = e || {};
|
|
293
|
-
let { assignable: r, specials: n } =
|
|
294
|
-
return
|
|
294
|
+
let { assignable: r, specials: n } = vt(e), o = Object.assign(ge(t) ? new Comment() : document.createElement(t), r);
|
|
295
|
+
return Ct(n, o), o;
|
|
295
296
|
}
|
|
296
|
-
function
|
|
297
|
+
function Ft(t) {
|
|
297
298
|
return t?.constructor === Comment ? t?.textContent : String(t);
|
|
298
299
|
}
|
|
299
|
-
function
|
|
300
|
-
return !
|
|
300
|
+
function je(t, e) {
|
|
301
|
+
return !ge(e) && j(t, String) && /<.*>|&[#|0-9a-z]+[^;];/i.test(t);
|
|
301
302
|
}
|
|
302
|
-
function
|
|
303
|
+
function ge(t) {
|
|
303
304
|
return /comment/i.test(t);
|
|
304
305
|
}
|
|
305
|
-
function
|
|
306
|
-
return $t(t) && (t in
|
|
306
|
+
function At(t) {
|
|
307
|
+
return $t(t) && (t in k || !j(X(t), HTMLUnknownElement));
|
|
307
308
|
}
|
|
308
309
|
function $t(t) {
|
|
309
310
|
return t = t.toLowerCase(), typeof t == "string" && t.length > 0 && /^[a-z]/.test(t) && /^[a-z0-9-]+$/gi.test(t);
|
|
310
311
|
}
|
|
311
|
-
function
|
|
312
|
-
return t = t in
|
|
312
|
+
function Re(t) {
|
|
313
|
+
return t = t in k ? k[t] : t, (e, ...r) => xt(t, e, ...r);
|
|
313
314
|
}
|
|
314
|
-
function
|
|
315
|
+
function Ht([t, ...e]) {
|
|
315
316
|
return `${t.toUpperCase()}${e.join("")}`;
|
|
316
317
|
}
|
|
317
|
-
function
|
|
318
|
+
function Tt(t) {
|
|
318
319
|
return t.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`).replace(/^-|-$/, "");
|
|
319
320
|
}
|
|
320
|
-
function
|
|
321
|
-
return j(t, String) ? t.toLowerCase().split("-").map((e, r) => r && `${
|
|
321
|
+
function Nt(t) {
|
|
322
|
+
return j(t, String) ? t.toLowerCase().split("-").map((e, r) => r && `${Ht(e)}` || e).join("") : t;
|
|
322
323
|
}
|
|
323
|
-
function
|
|
324
|
+
function Mt() {
|
|
324
325
|
let t = (e) => {
|
|
325
326
|
};
|
|
326
327
|
return function({ trial: e, whenError: r = t } = {}) {
|
|
@@ -331,565 +332,404 @@ var HTMLHelpers = (() => {
|
|
|
331
332
|
}
|
|
332
333
|
};
|
|
333
334
|
}
|
|
334
|
-
function
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
return e.slice(e.indexOf(" ") + 1, e.indexOf("("));
|
|
340
|
-
}
|
|
341
|
-
var { IS: J, maybe: he, $Wrap: Pr, isNothing: It, xProxy: Hr, addSymbolicExtensions: Mr } = Dt({ useSymbolicExtensions: false });
|
|
342
|
-
function Dt(t = {}) {
|
|
343
|
-
let { useSymbolicExtensions: e } = t, { shouldbeIsSingleObject: r, ISOneOf: n, isExcept: i, verifyNothingness: l, xProxy: f2, determineType: S2, addSymbolicExtensions: y, maybe: x2, $Wrap: d } = Rt(b2, e);
|
|
344
|
-
return e && y(), { IS: b2, maybe: x2, $Wrap: d, isNothing: l, xProxy: f2, addSymbolicExtensions: y };
|
|
345
|
-
function b2(m, ...h2) {
|
|
346
|
-
let g2 = typeof m == "symbol" ? Symbol.isSymbol : m;
|
|
347
|
-
switch (true) {
|
|
348
|
-
case !!x2({ trial: (c) => "isTypes" in (h2?.[0] ?? {}) }):
|
|
349
|
-
return r(m, h2[0]);
|
|
350
|
-
default:
|
|
351
|
-
return h2.length > 1 ? n(g2, ...h2) : S2(m, ...h2);
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
function Rt(t, e) {
|
|
356
|
-
let { SymbolAndCustomProxyFactory: r, maybeFactory: n, WrapAnyFactory: i, verifyNothingness: l, determineType: f2 } = jt(t, b2), { xProxy: S2, addSymbolicExtensions: y } = r(t, b2, e), [x2, d] = [n(), i(t, b2)];
|
|
357
|
-
return Object.freeze({ shouldbeIsSingleObject: m, ISOneOf: h2, isExcept: c, verifyNothingness: l, xProxy: S2, determineType: f2, addSymbolicExtensions: y, maybe: x2, $Wrap: d });
|
|
358
|
-
function b2(o) {
|
|
359
|
-
return o?.[Symbol.proxy] ?? t(o);
|
|
360
|
-
}
|
|
361
|
-
function m(o, s) {
|
|
362
|
-
switch (true) {
|
|
363
|
-
case "defaultValue" in s:
|
|
364
|
-
return g2(o, s);
|
|
365
|
-
case "notTypes" in s:
|
|
366
|
-
return c(o, s);
|
|
367
|
-
default:
|
|
368
|
-
return t(o, ...[s.isTypes].flat());
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
function h2(o, ...s) {
|
|
372
|
-
return s.some((a) => t(o, a));
|
|
373
|
-
}
|
|
374
|
-
function g2(o, { defaultValue: s, isTypes: a = [void 0], notTypes: p2 } = {}) {
|
|
375
|
-
return a = a?.constructor !== Array ? [a] : a, p2 = p2 && p2?.constructor !== Array ? [p2] : [], p2.length < 1 ? t(o, ...a) ? o : s : c(o, { isTypes: a, notTypes: p2 }) ? o : s;
|
|
376
|
-
}
|
|
377
|
-
function c(o, { isTypes: s = [void 0], notTypes: a = [void 0] } = {}) {
|
|
378
|
-
return s = s?.constructor !== Array ? [s] : s, a = a?.constructor !== Array ? [a] : a, t(o, ...s) && !t(o, ...a);
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
function jt() {
|
|
382
|
-
let t = { IS: "toa.is", TYPE: "toa.type", IS_SYMBOL: "toa.isASymbol", PROXY: "toa.proxy" }, e = { NAN: "NaN", INFINITY: "Infinity", BOOLEAN: "Boolean", OBJECT: "Object", PROXY_PREFIX: "Proxy (" };
|
|
383
|
-
return Object.freeze({ SymbolAndCustomProxyFactory: n, maybeFactory: g2, WrapAnyFactory: h2, verifyNothingness: c, determineType: y });
|
|
384
|
-
function r(o, s) {
|
|
385
|
-
Symbol.is || (Symbol.is = Symbol.for(t.IS), Symbol.type = Symbol.for(t.TYPE), Object.defineProperties(Object.prototype, { [Symbol.type]: { get() {
|
|
386
|
-
return s(this);
|
|
387
|
-
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(...a) {
|
|
388
|
-
return o(this, ...a);
|
|
389
|
-
}, enumerable: false, configurable: false } }), Object.defineProperties(Object, { [Symbol.type]: { value(a) {
|
|
390
|
-
return s(a);
|
|
391
|
-
}, enumerable: false, configurable: false }, [Symbol.is]: { value: function(a, ...p2) {
|
|
392
|
-
return o(a, ...p2);
|
|
393
|
-
}, enumerable: false, configurable: false } }));
|
|
394
|
-
}
|
|
395
|
-
function n(o, s, a) {
|
|
396
|
-
return Symbol.isSymbol || (Symbol.isSymbol = Symbol.for(t.IS_SYMBOL)), { xProxy: f2(), addSymbolicExtensions: () => r(o, s) };
|
|
397
|
-
}
|
|
398
|
-
function i(o) {
|
|
399
|
-
return (It(o, true) ? { name: "unknown" } : Object.getPrototypeOf(o)?.constructor).name;
|
|
400
|
-
}
|
|
401
|
-
function l(o, s) {
|
|
402
|
-
return Proxy = new o(o, { construct(a, p2) {
|
|
403
|
-
let E3 = new a(...p2);
|
|
404
|
-
return Object.defineProperty(E3, s, { value: `${e.PROXY_PREFIX}${i(p2[0])})` }), E3;
|
|
405
|
-
} }), Proxy;
|
|
406
|
-
}
|
|
407
|
-
function f2() {
|
|
408
|
-
Symbol.proxy || (Symbol.proxy = Symbol.for(t.PROXY));
|
|
409
|
-
let o = Proxy;
|
|
410
|
-
return { native() {
|
|
411
|
-
Proxy = o;
|
|
412
|
-
}, custom() {
|
|
413
|
-
Proxy = l(o, Symbol.proxy);
|
|
414
|
-
} };
|
|
415
|
-
}
|
|
416
|
-
function S2(o, ...s) {
|
|
417
|
-
let a = s.length < 1, p2 = o == null;
|
|
418
|
-
return { noInput: p2, noShouldbe: a, compareTo: !a && s[0], inputCTOR: !p2 && (o?.constructor || Object.getPrototypeOf(o)?.constructor), isNaN: Number.isNaN(o) || he({ trial: (E3) => String(o) === e.NAN }), isInfinity: he({ trial: (E3) => String(o) }) === e.INFINITY, shouldBeFirstElementIsNothing: !a && c(s[0]) };
|
|
419
|
-
}
|
|
420
|
-
function y(o, ...s) {
|
|
421
|
-
let { noInput: a, noShouldbe: p2, compareTo: E3, inputCTOR: C3, isNaN: ge2, isInfinity: pe2, shouldBeFirstElementIsNothing: ye2 } = S2(o, ...s);
|
|
422
|
-
switch (s = s.length && s[0], true) {
|
|
423
|
-
case ye2:
|
|
424
|
-
return String(o) === String(E3);
|
|
425
|
-
case (o?.[Symbol.proxy] && p2):
|
|
426
|
-
return o[Symbol.proxy];
|
|
427
|
-
case ge2:
|
|
428
|
-
return p2 ? e.NAN : String(E3) === String(o);
|
|
429
|
-
case pe2:
|
|
430
|
-
return p2 ? e.INFINITY : String(E3) === String(o);
|
|
431
|
-
case a:
|
|
432
|
-
return p2 ? String(o) : String(E3) === String(o);
|
|
433
|
-
case C3 === Boolean:
|
|
434
|
-
return p2 ? e.BOOLEAN : C3 === s;
|
|
435
|
-
default:
|
|
436
|
-
return d(o, s, p2, x2(o, C3));
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
function x2(o, s) {
|
|
440
|
-
switch (true) {
|
|
441
|
-
case o === 0:
|
|
442
|
-
return Number;
|
|
443
|
-
case o === "":
|
|
444
|
-
return String;
|
|
445
|
-
case !o:
|
|
446
|
-
return { name: String(o) };
|
|
447
|
-
default:
|
|
448
|
-
return s;
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
function d(o, s, a, p2) {
|
|
452
|
-
switch (true) {
|
|
453
|
-
case (!a && s === o || o?.[Symbol.proxy] && s === Proxy):
|
|
454
|
-
return true;
|
|
455
|
-
case String(s) === e.NAN:
|
|
456
|
-
return String(o) === e.NAN;
|
|
457
|
-
case (o?.[Symbol.toStringTag] && typeof s == "string"):
|
|
458
|
-
return String(s) === o[Symbol.toStringTag];
|
|
459
|
-
default:
|
|
460
|
-
return s ? m(o, s, p2) : b2(o, p2);
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
function b2(o, s) {
|
|
464
|
-
return (o?.[Symbol.toStringTag] ?? o?.prototype?.[Symbol.toStringTag]) || s?.name || String(s);
|
|
465
|
-
}
|
|
466
|
-
function m(o, s, a) {
|
|
467
|
-
return he({ trial: (p2) => o instanceof s }) || s === a || s === Object.getPrototypeOf(a) || `${s?.name}` === a?.name;
|
|
468
|
-
}
|
|
469
|
-
function h2(o, s) {
|
|
470
|
-
return function(a) {
|
|
471
|
-
let p2 = { get value() {
|
|
472
|
-
return a;
|
|
473
|
-
}, is(...E3) {
|
|
474
|
-
return o(a, ...E3);
|
|
475
|
-
}, get type() {
|
|
476
|
-
return s(a);
|
|
477
|
-
} };
|
|
478
|
-
return Object[Symbol.type] && Object.defineProperties(p2, { [Symbol.type]: { get() {
|
|
479
|
-
return s(a);
|
|
480
|
-
} }, [Symbol.is]: { value(...E3) {
|
|
481
|
-
return o(a, ...E3);
|
|
482
|
-
} } }), Object.freeze(p2);
|
|
483
|
-
};
|
|
484
|
-
}
|
|
485
|
-
function g2() {
|
|
486
|
-
let o = (s) => {
|
|
487
|
-
};
|
|
488
|
-
return function({ trial: s, whenError: a = o } = {}) {
|
|
489
|
-
try {
|
|
490
|
-
return s();
|
|
491
|
-
} catch (p2) {
|
|
492
|
-
return a(p2);
|
|
493
|
-
}
|
|
494
|
-
};
|
|
495
|
-
}
|
|
496
|
-
function c(o, s = false) {
|
|
497
|
-
let a = o == null;
|
|
498
|
-
return a = s ? a || J(o, 1 / 0) || J(o, NaN) : a, a;
|
|
499
|
-
}
|
|
335
|
+
function Pt() {
|
|
336
|
+
let t = new Intl.Collator("en", { sensitivity: "base" }), e = (r) => r instanceof Function ? r.name : "noCTOR";
|
|
337
|
+
return function(r, n) {
|
|
338
|
+
return t.compare(Object.prototype.toString.call(r), `[object ${e(n)}]`) === 0 || r?.name === n?.name;
|
|
339
|
+
};
|
|
500
340
|
}
|
|
501
|
-
var
|
|
502
|
-
function
|
|
503
|
-
let { tryParseAtOrNestedRules: r, ruleExists: n, checkParams:
|
|
504
|
-
function x2(
|
|
505
|
-
if (
|
|
506
|
-
Object.keys(c.removeProperties).forEach((
|
|
341
|
+
var B = Ot;
|
|
342
|
+
function Ot({ styleSheet: t, createWithId: e } = {}) {
|
|
343
|
+
let { tryParseAtOrNestedRules: r, ruleExists: n, checkParams: o, sheet: i, removeRules: u, consider: S2, currentSheetID: p2 } = Rt({ styleSheet: t, createWithId: e });
|
|
344
|
+
function x2(d, c) {
|
|
345
|
+
if (d && c.removeProperties) {
|
|
346
|
+
Object.keys(c.removeProperties).forEach((s) => d.style.removeProperty(Je(s)));
|
|
507
347
|
return;
|
|
508
348
|
}
|
|
509
|
-
Object.entries(c).forEach(([
|
|
510
|
-
|
|
511
|
-
let
|
|
512
|
-
if (/!important/.test(
|
|
513
|
-
|
|
349
|
+
Object.entries(c).forEach(([s, l]) => {
|
|
350
|
+
s = Je(s.trim()), l = l.trim();
|
|
351
|
+
let g2;
|
|
352
|
+
if (/!important/.test(l) && (l = l.slice(0, l.indexOf("!important")).trim(), g2 = "important"), !CSS.supports(s, l)) return console.error(`StylingFactory ${p2} error: '${s}' with value '${l}' not supported (yet)`);
|
|
353
|
+
Qe(() => d.style.setProperty(s, l, g2), `StylingFactory ${p2} (setRule4Selector) failed`);
|
|
514
354
|
});
|
|
515
355
|
}
|
|
516
|
-
function d
|
|
517
|
-
if (
|
|
518
|
-
if (c.removeRule) return
|
|
519
|
-
let
|
|
520
|
-
return S2(() => x2(
|
|
356
|
+
function f2(d, c, s = i) {
|
|
357
|
+
if (d = d?.trim?.(), !a(d, String) || !d.length || /[;,]$/g.test(d)) return console.error(`StylingFactory ${p2} (setRules): [${d || "[no selector given]"}] is not a valid selector`);
|
|
358
|
+
if (c.removeRule) return u(d);
|
|
359
|
+
let l = n(d, true), g2 = l || s.cssRules[s.insertRule(`${d} {}`, s.cssRules.length || 0)];
|
|
360
|
+
return S2(() => x2(g2, c), d, l);
|
|
521
361
|
}
|
|
522
|
-
function
|
|
523
|
-
let c =
|
|
524
|
-
if (!
|
|
525
|
-
let
|
|
526
|
-
return
|
|
362
|
+
function y(d) {
|
|
363
|
+
let c = d.trim().split(/{/, 2), s = c.shift().trim();
|
|
364
|
+
if (!a(s, String) || !s?.trim()?.length) return console.error(`StylingFactory ${p2} (doParse): no (valid) selector could be extracted from rule ${pe(d)}`);
|
|
365
|
+
let l = zt(c.shift());
|
|
366
|
+
return Qe(() => f2(s, l), `StylingFactory ${p2} (setRules) failed`);
|
|
527
367
|
}
|
|
528
|
-
function m(
|
|
529
|
-
let c = r(
|
|
530
|
-
return c.done ? c.existing :
|
|
368
|
+
function m(d) {
|
|
369
|
+
let c = r(d);
|
|
370
|
+
return c.done ? c.existing : y(d);
|
|
531
371
|
}
|
|
532
|
-
function
|
|
533
|
-
return
|
|
372
|
+
function b2(d, c) {
|
|
373
|
+
return d.trim().startsWith("@media") ? m(Dt(d, c)) : f2(d, c);
|
|
534
374
|
}
|
|
535
|
-
return function(
|
|
536
|
-
return
|
|
375
|
+
return function(d, c = {}) {
|
|
376
|
+
return o(d, c) && (Object.keys(c).length ? b2(d, c) : m(d));
|
|
537
377
|
};
|
|
538
378
|
}
|
|
539
|
-
function
|
|
379
|
+
function Rt({ styleSheet: t, createWithId: e }) {
|
|
540
380
|
let r = "Note: The rule or some of its properties may not be supported by your browser (yet)", n = `for style#${e}`;
|
|
541
|
-
t = e ?
|
|
542
|
-
function
|
|
543
|
-
let
|
|
544
|
-
if (
|
|
545
|
-
let
|
|
546
|
-
return document.head.insertAdjacentElement("beforeend",
|
|
381
|
+
t = e ? o(e) : t;
|
|
382
|
+
function o(m) {
|
|
383
|
+
let b2 = document.querySelector(`#${m}`)?.sheet;
|
|
384
|
+
if (b2) return b2;
|
|
385
|
+
let d = Object.assign(document.createElement("style"), { id: m });
|
|
386
|
+
return document.head.insertAdjacentElement("beforeend", d), d.sheet;
|
|
547
387
|
}
|
|
548
|
-
function
|
|
388
|
+
function i(m) {
|
|
549
389
|
return console.error(`StylingFactory ${n} [rule: ${m}]
|
|
550
390
|
=> @charset, @namespace and @import are not supported here`), { done: true };
|
|
551
391
|
}
|
|
552
|
-
function
|
|
553
|
-
return [...t.rules].find((
|
|
392
|
+
function u(m, b2) {
|
|
393
|
+
return [...t.rules].find((d) => b2 ? ke(d.selectorText || "", m) : Jt`${jt(m)}${[..."gim"]}`.test(d.cssText));
|
|
554
394
|
}
|
|
555
395
|
function S2(m) {
|
|
556
|
-
return /^@charset|@import|namespace/i.test(m.trim()) ?
|
|
396
|
+
return /^@charset|@import|namespace/i.test(m.trim()) ? i(m) : m.match(/}/g)?.length > 1 ? { existing: f2(m, 1), done: true } : { done: false };
|
|
557
397
|
}
|
|
558
|
-
function
|
|
559
|
-
let
|
|
560
|
-
return
|
|
398
|
+
function p2(m) {
|
|
399
|
+
let b2 = [...t.cssRules].reduce((c, s, l) => ke(s.selectorText || "", m) && c.concat(l) || c, []), d = b2.length;
|
|
400
|
+
return b2.forEach((c) => t.deleteRule(c)), d > 0 ? console.info(`\u2714 Removed ${d} instance${d > 1 ? "s" : ""} of selector ${m} from ${n.slice(4)}`) : console.info(`\u2714 Remove rule: selector ${m} does not exist in ${n.slice(4)}`);
|
|
561
401
|
}
|
|
562
|
-
function x2(m,
|
|
563
|
-
return m &&
|
|
402
|
+
function x2(m, b2) {
|
|
403
|
+
return m && a(m, String) && m.trim().length > 0 && a(b2, Object) || (console.error(`StylingFactory ${n} called with invalid parameters`), false);
|
|
564
404
|
}
|
|
565
|
-
function
|
|
405
|
+
function f2(m) {
|
|
566
406
|
m = m.trim();
|
|
567
|
-
let
|
|
407
|
+
let b2 = m.slice(0, m.indexOf("{")).trim(), d = !!u(b2);
|
|
568
408
|
try {
|
|
569
|
-
return t.insertRule(`${m}`, t.cssRules.length),
|
|
409
|
+
return t.insertRule(`${m}`, t.cssRules.length), d;
|
|
570
410
|
} catch (c) {
|
|
571
411
|
return console.error(`StylingFactory ${n} (tryParse) ${c.name} Error:
|
|
572
412
|
${c.message}
|
|
573
|
-
Rule: ${
|
|
574
|
-
${r}`),
|
|
413
|
+
Rule: ${pe(m)}
|
|
414
|
+
${r}`), d;
|
|
575
415
|
}
|
|
576
416
|
}
|
|
577
|
-
function
|
|
417
|
+
function y(m, b2, d) {
|
|
578
418
|
try {
|
|
579
|
-
return m(),
|
|
419
|
+
return m(), d;
|
|
580
420
|
} catch (c) {
|
|
581
421
|
return console.error(`StylingFactory ${n} (tryAddOrModify) ${c.name} Error:
|
|
582
422
|
${c.message}
|
|
583
|
-
Rule: ${
|
|
584
|
-
${r}`),
|
|
423
|
+
Rule: ${pe(b2)}
|
|
424
|
+
${r}`), d;
|
|
585
425
|
}
|
|
586
426
|
}
|
|
587
|
-
return { sheet: t, removeRules:
|
|
427
|
+
return { sheet: t, removeRules: p2, tryParseAtOrNestedRules: S2, ruleExists: u, checkParams: x2, tryParse: f2, consider: y, currentSheetID: n };
|
|
588
428
|
}
|
|
589
|
-
function
|
|
590
|
-
return `${t.trim()} ${Object.entries(e).map(([r, n]) => `${r}: { ${
|
|
429
|
+
function Dt(t, e) {
|
|
430
|
+
return `${t.trim()} ${Object.entries(e).map(([r, n]) => `${r}: { ${It(n)}`)}`;
|
|
591
431
|
}
|
|
592
|
-
function
|
|
432
|
+
function pe(t) {
|
|
593
433
|
let e = (t || "NO RULE").trim().slice(0, 50).replace(/\n/g, "\\n").replace(/\s{2,}/g, " ");
|
|
594
434
|
return t.length > e.length ? `${e.trim()}...truncated` : e;
|
|
595
435
|
}
|
|
596
|
-
function
|
|
436
|
+
function It(t) {
|
|
597
437
|
return Object.entries(t).map(([e, r]) => `${e}: ${r.trim()}`).join(`;
|
|
598
438
|
`);
|
|
599
439
|
}
|
|
600
|
-
function
|
|
440
|
+
function jt(t) {
|
|
601
441
|
return t.replace(/([*\[\]()-+{}.$?\\])/g, (e) => `\\${e}`);
|
|
602
442
|
}
|
|
603
|
-
function
|
|
443
|
+
function Jt(t, ...e) {
|
|
604
444
|
let r = e.length && Array.isArray(e.slice(-1)) ? e.pop().join("") : "";
|
|
605
|
-
return new RegExp((e.length && t.raw.reduce((n,
|
|
445
|
+
return new RegExp((e.length && t.raw.reduce((n, o, i) => n.concat(e[i - 1] || "").concat(o), "") || t.raw.join("")).split(`
|
|
606
446
|
`).map((n) => n.replace(/\s|\/\/.*$/g, "").trim().replace(/(@s!)/g, " ")).join(""), r);
|
|
607
447
|
}
|
|
608
|
-
function
|
|
448
|
+
function Je(t) {
|
|
609
449
|
return t.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`).replace(/[^--]^-|-$/, "");
|
|
610
450
|
}
|
|
611
|
-
function
|
|
451
|
+
function Qe(t, e) {
|
|
612
452
|
try {
|
|
613
453
|
return t();
|
|
614
454
|
} catch (r) {
|
|
615
455
|
console.error(`${e || "an error occured"}: ${r.message}`);
|
|
616
456
|
}
|
|
617
457
|
}
|
|
618
|
-
function
|
|
458
|
+
function Qt(t) {
|
|
619
459
|
return t.replace(/\/\*.+?\*\//gm, "").replace(/[}{\r\n]/g, "").replace(/(data:.+?);/g, (e, r) => `${r}\\3b`).split(";").map((e) => e.trim()).join(`;
|
|
620
460
|
`).replaceAll("\\3b", ";").split(`
|
|
621
461
|
`);
|
|
622
462
|
}
|
|
623
|
-
function
|
|
463
|
+
function kt(t) {
|
|
624
464
|
return t.reduce((e, r) => {
|
|
625
|
-
let [n,
|
|
626
|
-
return n &&
|
|
465
|
+
let [n, o] = [r.slice(0, r.indexOf(":")).trim(), r.slice(r.indexOf(":") + 1).trim().replace(/;$|;.+(?=\/*).+\/$/, "")];
|
|
466
|
+
return n && o ? { ...e, [n]: o } : e;
|
|
627
467
|
}, {});
|
|
628
468
|
}
|
|
629
|
-
function
|
|
630
|
-
return
|
|
469
|
+
function zt(t) {
|
|
470
|
+
return kt(Qt(t));
|
|
631
471
|
}
|
|
632
|
-
function
|
|
472
|
+
function ke(t, e) {
|
|
633
473
|
return t?.replace("::", ":") === e?.replace("::", ":");
|
|
634
474
|
}
|
|
635
|
-
var
|
|
636
|
-
var
|
|
637
|
-
var
|
|
638
|
-
if (
|
|
639
|
-
let e =
|
|
640
|
-
return e === "#text" || !!
|
|
641
|
-
}, allowTag: (t) =>
|
|
642
|
-
var
|
|
643
|
-
var
|
|
644
|
-
function
|
|
645
|
-
if (
|
|
646
|
-
let e = Object.entries(t.removed).reduce((r, [n,
|
|
475
|
+
var ye = false;
|
|
476
|
+
var Bt = { on: () => ye = true, off: () => ye = false };
|
|
477
|
+
var H = { tagsRaw: J, allowUnknownHtmlTags: Bt, isAllowed(t) {
|
|
478
|
+
if (ye) return true;
|
|
479
|
+
let e = a(t, String) ? t.toLowerCase() : t?.nodeName.toLowerCase() || "none";
|
|
480
|
+
return e === "#text" || !!J[e];
|
|
481
|
+
}, allowTag: (t) => J[t.toLowerCase()] = true, prohibitTag: (t) => J[t.toLowerCase()] = false };
|
|
482
|
+
var Wt = true;
|
|
483
|
+
var Z = { 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 };
|
|
484
|
+
function _t(t) {
|
|
485
|
+
if (Wt && Object.keys(t.removed).length) {
|
|
486
|
+
let e = Object.entries(t.removed).reduce((r, [n, o]) => [...r, `${N(n)} => ${o}`], []).join("\\000A");
|
|
647
487
|
v.error(`JQx: HTML creation error(s): ${e}`);
|
|
648
488
|
}
|
|
649
489
|
}
|
|
650
|
-
function
|
|
490
|
+
function Vt(t) {
|
|
651
491
|
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"];
|
|
652
|
-
return /-/.test(e) && !r.find((n) => n === e) ||
|
|
492
|
+
return /-/.test(e) && !r.find((n) => n === e) || H.isAllowed(e);
|
|
653
493
|
}
|
|
654
|
-
function
|
|
494
|
+
function O(t) {
|
|
655
495
|
let e = { rawHTML: t?.parentElement?.getHTML() ?? "no html", removed: {} };
|
|
656
|
-
return
|
|
657
|
-
if (r?.children?.length &&
|
|
658
|
-
let
|
|
659
|
-
[...(r ?? { attributes: [] }).attributes].forEach((
|
|
660
|
-
let
|
|
661
|
-
if (
|
|
662
|
-
let
|
|
663
|
-
|
|
496
|
+
return a(t, HTMLElement) && [...t.childNodes].forEach((r) => {
|
|
497
|
+
if (r?.children?.length && O(r), r?.attributes) {
|
|
498
|
+
let o = a(r, SVGElement) ? I.svg : I.html;
|
|
499
|
+
[...(r ?? { attributes: [] }).attributes].forEach((i) => {
|
|
500
|
+
let u = i.name.trim().toLowerCase(), S2 = i.value.trim().toLowerCase().replace(Z.whiteSpace, ""), p2 = u === "href" ? !Z.validURL.test(S2) : Z.notAllowedValues.test(S2), x2 = u.startsWith("data") ? !Z.data.test(u) : !!o[u];
|
|
501
|
+
if (p2 || x2) {
|
|
502
|
+
let f2 = K(i.value || "none", 60);
|
|
503
|
+
f2 += f2.length === 60 ? "..." : "", e.removed[`${i.name}`] = `attribute/property/value not allowed, removed. Value: ${f2}`, r.removeAttribute(i.name);
|
|
664
504
|
}
|
|
665
505
|
});
|
|
666
506
|
}
|
|
667
|
-
if (!(
|
|
668
|
-
let
|
|
669
|
-
|
|
507
|
+
if (!(Vt(r) || r.constructor === CharacterData || r.constructor === Comment)) {
|
|
508
|
+
let o = (r?.outerHTML || r?.textContent).trim(), i = K(o, 60) ?? "EMPTY";
|
|
509
|
+
i += i.length === 60 ? "..." : "", e.removed[`<${r.nodeName?.toLowerCase()}>`] = `not allowed, not rendered. Value: ${i}`, r.remove();
|
|
670
510
|
}
|
|
671
|
-
}),
|
|
511
|
+
}), _t(e), t;
|
|
672
512
|
}
|
|
673
|
-
function
|
|
513
|
+
function Ut(t) {
|
|
674
514
|
let e = document.createElement("div");
|
|
675
|
-
return e.insertAdjacentHTML(
|
|
515
|
+
return e.insertAdjacentHTML(C.end, t), e.childNodes.length ? O(e) : void 0;
|
|
676
516
|
}
|
|
677
|
-
function
|
|
517
|
+
function Yt(t, e, r) {
|
|
678
518
|
switch (true) {
|
|
679
|
-
case
|
|
519
|
+
case a(t, Comment):
|
|
680
520
|
return e.insertAdjacentHTML(r, `<!--${t.data}-->`);
|
|
681
|
-
case
|
|
521
|
+
case a(t, Text):
|
|
682
522
|
return e.insertAdjacentText(r, t.data || t.textContent);
|
|
683
523
|
default:
|
|
684
524
|
return;
|
|
685
525
|
}
|
|
686
526
|
}
|
|
687
|
-
function
|
|
688
|
-
return r = r ||
|
|
689
|
-
let
|
|
690
|
-
return
|
|
527
|
+
function R(t = [], e = document.body, r = C.BeforeEnd) {
|
|
528
|
+
return r = r || C.BeforeEnd, e = e?.isJQx ? e.node : e || document.body, t.reduce((n, o) => {
|
|
529
|
+
let i = T(o) && Gt(o, e, r);
|
|
530
|
+
return i ? [...n, i] : n;
|
|
691
531
|
}, []);
|
|
692
532
|
}
|
|
693
|
-
function
|
|
694
|
-
return r = r ||
|
|
533
|
+
function Gt(t, e = document.body, r = C.BeforeEnd) {
|
|
534
|
+
return r = r || C.BeforeEnd, e = e?.isJQx ? e?.[0] : e, a(t, Comment, Text) ? Yt(t, e, r) : a(t, HTMLElement) ? e.insertAdjacentElement(r, t) : void 0;
|
|
695
535
|
}
|
|
696
|
-
function
|
|
697
|
-
if (
|
|
536
|
+
function $(t) {
|
|
537
|
+
if (a(t, Text, Comment)) return t;
|
|
698
538
|
let e = t?.trim(), r = e?.split(/<text>|<\/text>/i) ?? [];
|
|
699
|
-
if (r?.length && (r = r.length > 1 ? r.filter((
|
|
700
|
-
if (r ||
|
|
701
|
-
let n =
|
|
702
|
-
return n.childNodes.length < 1 ?
|
|
539
|
+
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, ""));
|
|
540
|
+
if (r || a(e, String) && !/^<(.+)[^>]+>/m.test(e)) return document.createTextNode(r ?? e);
|
|
541
|
+
let n = Ut(t);
|
|
542
|
+
return n.childNodes.length < 1 ? $(`<span data-jqxcreationerror="1">${q(t, 60)}</span>`) : n.children[0];
|
|
703
543
|
}
|
|
704
|
-
function
|
|
544
|
+
function ee(t) {
|
|
705
545
|
if (t.node("#jqxPopup")) return;
|
|
706
|
-
t.logger.log("JQx: [JQx].Popup first call. Dialog element created."), t.dialog({ id: "jqxPopup" }, t.div({ id: "jqxPopupContent" })).render, t.editCssRules(...
|
|
707
|
-
let e = [], [r, n] = [t("#jqxPopupContent"), t.node("#jqxPopup")],
|
|
708
|
-
return t.handle({ type: "click, cancel", handlers: m, name: "genericPopupCloseHandler", capture: true, about: "A generic handler for JQx popups" }), Object.freeze({ show:
|
|
709
|
-
function
|
|
546
|
+
t.logger.log("JQx: [JQx].Popup first call. Dialog element created."), t.dialog({ id: "jqxPopup" }, t.div({ id: "jqxPopupContent" })).render, t.editCssRules(...Ne);
|
|
547
|
+
let e = [], [r, n] = [t("#jqxPopupContent"), t.node("#jqxPopup")], o = {};
|
|
548
|
+
return t.handle({ type: "click, cancel", handlers: m, name: "genericPopupCloseHandler", capture: true, about: "A generic handler for JQx popups" }), Object.freeze({ show: i, remove: u, removeModal: y });
|
|
549
|
+
function i(c) {
|
|
710
550
|
if (n.open) switch (true) {
|
|
711
551
|
case S2(c):
|
|
712
552
|
return;
|
|
713
553
|
default:
|
|
714
|
-
return
|
|
554
|
+
return u(), setTimeout(() => i(c), 200);
|
|
715
555
|
}
|
|
716
|
-
|
|
717
|
-
let { content:
|
|
718
|
-
return t.IS(
|
|
556
|
+
o = { ...c };
|
|
557
|
+
let { content: s } = o;
|
|
558
|
+
return t.IS(s, String, HTMLElement) || s?.isJQx ? p2() : true;
|
|
719
559
|
}
|
|
720
|
-
function
|
|
721
|
-
return
|
|
560
|
+
function u() {
|
|
561
|
+
return o.modal ? d(o.warnMessage) : x2();
|
|
722
562
|
}
|
|
723
563
|
function S2(c) {
|
|
724
|
-
for (let [
|
|
564
|
+
for (let [s, l] of Object.entries(o)) if (l !== c[s]) return false;
|
|
725
565
|
return true;
|
|
726
566
|
}
|
|
727
|
-
function
|
|
567
|
+
function p2() {
|
|
728
568
|
r.clear();
|
|
729
|
-
let { content: c, modal:
|
|
730
|
-
|
|
731
|
-
let
|
|
732
|
-
r.append(
|
|
569
|
+
let { content: c, modal: s, closeAfter: l } = o;
|
|
570
|
+
s = t.IS(s, Boolean) ? s : false;
|
|
571
|
+
let g2 = s ? "" : t.div({ id: "closeHandleIcon" });
|
|
572
|
+
r.append(g2, t.IS(c, String) ? t.div(c) : c), n.showModal(), !s && t.IS(l, Number) && b2(u, l);
|
|
733
573
|
}
|
|
734
574
|
function x2() {
|
|
735
|
-
if (n.close(
|
|
736
|
-
|
|
575
|
+
if (n.close(o.returnValue), f2(), t.IS(o.callback, Function)) return e.push(setTimeout(() => o.callback(o.returnValue), 200));
|
|
576
|
+
o = {};
|
|
737
577
|
}
|
|
738
|
-
function
|
|
578
|
+
function f2() {
|
|
739
579
|
e.forEach((c) => clearTimeout(c)), e = [];
|
|
740
580
|
}
|
|
741
|
-
function
|
|
742
|
-
|
|
581
|
+
function y({ callback: c, value: s } = {}) {
|
|
582
|
+
o.returnValue = s, o.modal = false, o.callback = c || o.callback, u();
|
|
743
583
|
}
|
|
744
584
|
function m({ evt: c }) {
|
|
745
|
-
if (!(Object.keys(
|
|
585
|
+
if (!(Object.keys(o).length < 1 || !n.open) && (c.type === "cancel" && o.modal && c.preventDefault(), c.target.closest("#closeHandleIcon") || !c.target.closest("#jqxPopupContent"))) return o.activeTimer && clearTimeout(o.activeTimer), u();
|
|
746
586
|
}
|
|
747
|
-
function
|
|
748
|
-
t.IS(c, Function) && t.IS(
|
|
587
|
+
function b2(c, s) {
|
|
588
|
+
t.IS(c, Function) && t.IS(s, Number) && s > 0 && (f2(), e.push(setTimeout(c, s * 1e3)));
|
|
749
589
|
}
|
|
750
|
-
function
|
|
751
|
-
if (!t.IS(c, String, HTMLElement
|
|
752
|
-
let
|
|
590
|
+
function d(c) {
|
|
591
|
+
if (!t.IS(c, String, HTMLElement) && !c.isJQx) return;
|
|
592
|
+
let s = r.find$(".warn");
|
|
753
593
|
switch (true) {
|
|
754
|
-
case
|
|
755
|
-
|
|
594
|
+
case s.is.empty:
|
|
595
|
+
s = t.div({ class: "warn" }, c);
|
|
756
596
|
default:
|
|
757
|
-
r.append(
|
|
597
|
+
r.append(s.addClass("active")), b2(() => r.find$(".warn").removeClass("active"), 2);
|
|
758
598
|
}
|
|
759
599
|
}
|
|
760
600
|
}
|
|
761
|
-
function
|
|
601
|
+
function te(t) {
|
|
762
602
|
let e = {}, r = "anonymous_";
|
|
763
|
-
function n(
|
|
764
|
-
if (
|
|
765
|
-
let { handler:
|
|
766
|
-
document.addEventListener(
|
|
603
|
+
function n(f2) {
|
|
604
|
+
if (f2) {
|
|
605
|
+
let { handler: y, capture: m, type: b2 } = f2;
|
|
606
|
+
document.addEventListener(b2, y, { capture: m });
|
|
767
607
|
}
|
|
768
608
|
}
|
|
769
|
-
function
|
|
770
|
-
if (
|
|
771
|
-
let { type:
|
|
772
|
-
document.removeEventListener(
|
|
609
|
+
function o(f2) {
|
|
610
|
+
if (f2) {
|
|
611
|
+
let { type: y, handler: m, capture: b2 } = f2;
|
|
612
|
+
document.removeEventListener(y, m, { capture: b2 });
|
|
773
613
|
}
|
|
774
614
|
}
|
|
775
|
-
function
|
|
776
|
-
return function(
|
|
777
|
-
if (!L(
|
|
778
|
-
let c =
|
|
615
|
+
function i(f2, y, m, b2) {
|
|
616
|
+
return function(d) {
|
|
617
|
+
if (!L(y)) return f2({ evt: d });
|
|
618
|
+
let c = d.target.closest(y);
|
|
779
619
|
if (c) {
|
|
780
|
-
let
|
|
781
|
-
|
|
620
|
+
let s = t(c);
|
|
621
|
+
f2({ self: s, me: s, evt: d }), m && p2(d.type, b2);
|
|
782
622
|
}
|
|
783
623
|
return true;
|
|
784
624
|
};
|
|
785
625
|
}
|
|
786
|
-
function f2
|
|
787
|
-
return e[
|
|
626
|
+
function u(f2) {
|
|
627
|
+
return e[f2] = e[f2] || {}, e[f2];
|
|
788
628
|
}
|
|
789
|
-
function S2(
|
|
790
|
-
return Object.entries(f2
|
|
629
|
+
function S2(f2, y) {
|
|
630
|
+
return Object.entries(u(f2)).find(([m]) => m === y);
|
|
791
631
|
}
|
|
792
|
-
function
|
|
793
|
-
let m = S2(
|
|
794
|
-
m && (
|
|
632
|
+
function p2(f2, y) {
|
|
633
|
+
let m = S2(f2, y);
|
|
634
|
+
m && (o(m[1]), delete e[f2][y], delete re[y], v.warn(`Removed listener [${y}] for event type [${f2}].`));
|
|
795
635
|
}
|
|
796
|
-
function x2(
|
|
797
|
-
let { type:
|
|
798
|
-
e[
|
|
799
|
-
let
|
|
800
|
-
if (
|
|
801
|
-
let
|
|
802
|
-
|
|
636
|
+
function x2(f2) {
|
|
637
|
+
let { type: y, handler: m, name: b2, capture: d, once: c, selector: s, node: l, about: g2 } = f2;
|
|
638
|
+
e[y] = e[y] || {};
|
|
639
|
+
let h2 = be(b2 || m.name), E3 = m;
|
|
640
|
+
if (l instanceof HTMLElement) {
|
|
641
|
+
let F2 = l.dataset.hid || h2;
|
|
642
|
+
l.dataset.hid = F2, s = `[data-hid=${F2}]`;
|
|
803
643
|
}
|
|
804
644
|
switch (true) {
|
|
805
|
-
case !e[
|
|
806
|
-
return v.log(`JQx: created listener for event type ${
|
|
807
|
-
y
|
|
808
|
-
} }, e[
|
|
645
|
+
case !e[y][h2]:
|
|
646
|
+
return v.log(`JQx: created listener for event type ${y}, with handler name ${h2}`), e[y][h2] = { name: h2, handler: i(m, s, c, h2), capture: ze(y, d), once: !!c, type: y, initialHandler: E3, selector: !!s && s || false, about: !!g2 && g2 || false, unListen() {
|
|
647
|
+
p2(y, h2);
|
|
648
|
+
} }, e[y][h2];
|
|
809
649
|
default:
|
|
810
|
-
return console.warn(`The listener [${
|
|
650
|
+
return console.warn(`The listener [${h2}] for [${y}] exists, it is not re-assigned.`);
|
|
811
651
|
}
|
|
812
652
|
}
|
|
813
|
-
return { remove(...
|
|
814
|
-
return
|
|
815
|
-
}, listen: function(
|
|
816
|
-
let { type:
|
|
817
|
-
if (!L(
|
|
818
|
-
let
|
|
819
|
-
if (
|
|
820
|
-
y
|
|
653
|
+
return { remove(...f2) {
|
|
654
|
+
return p2(...f2);
|
|
655
|
+
}, listen: function(f2) {
|
|
656
|
+
let { type: y, handler: m } = f2;
|
|
657
|
+
if (!L(y) || !a(m, Function)) return;
|
|
658
|
+
let b2 = x2(f2);
|
|
659
|
+
if (b2) return n(b2), { type: y, name: b2.name, unListen() {
|
|
660
|
+
p2(y, b2.name);
|
|
821
661
|
} };
|
|
822
662
|
}, get ListenerStore() {
|
|
823
663
|
return Object.freeze({ ...e });
|
|
824
664
|
} };
|
|
825
665
|
}
|
|
826
|
-
|
|
827
|
-
var
|
|
828
|
-
var
|
|
666
|
+
Te();
|
|
667
|
+
var v = Kt();
|
|
668
|
+
var Xt = ["load", "unload", "scroll", "focus", "blur", "DOMNodeRemovedFromDocument", "DOMNodeInsertedIntoDocument", "loadstart", "progress", "error", "abort", "load", "loadend", "pointerenter", "pointerleave", "readystatechange"];
|
|
669
|
+
var C = Object.freeze(new Proxy({ start: "afterbegin", afterbegin: "afterbegin", end: "beforeend", beforeend: "beforeend", before: "beforebegin", beforebegin: "beforebegin", after: "afterend", afterend: "afterend" }, { get(t, e) {
|
|
829
670
|
return t[String(e).toLowerCase()] ?? t[e];
|
|
830
671
|
} }));
|
|
831
|
-
var
|
|
832
|
-
var
|
|
672
|
+
var Zt = [...Array(26)].map((t, e) => String.fromCharCode(e + 65)).concat([...Array(26)].map((t, e) => String.fromCharCode(e + 97))).concat([...Array(10)].map((t, e) => `${e}`));
|
|
673
|
+
var Se = Object.freeze({ get(t, e) {
|
|
833
674
|
return t[V(e)] || t[e];
|
|
834
675
|
}, enumerable: false, configurable: false });
|
|
835
|
-
var
|
|
836
|
-
|
|
837
|
-
function Le() {
|
|
676
|
+
var re = {};
|
|
677
|
+
function xe() {
|
|
838
678
|
let t = setTimeout(() => {
|
|
839
679
|
});
|
|
840
680
|
for (; t >= 0; ) clearTimeout(t--);
|
|
841
681
|
}
|
|
842
|
-
function
|
|
843
|
-
return L(t) && !/^handler|handlers$/gi.test(t.trim()) ? t.trim() :
|
|
682
|
+
function be(t) {
|
|
683
|
+
return L(t) && !/^handler|handlers$/gi.test(t.trim()) ? t.trim() : Be();
|
|
844
684
|
}
|
|
845
|
-
function
|
|
846
|
-
let e = !!t.node && !
|
|
685
|
+
function we(t) {
|
|
686
|
+
let e = !!t.node && !a(t, Text, Comment);
|
|
847
687
|
switch (true) {
|
|
848
688
|
case e:
|
|
849
|
-
let r = t.node.dataset ? Object.keys(t.node.dataset).map((
|
|
850
|
-
return
|
|
689
|
+
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(", ") || [];
|
|
690
|
+
return o.length ? `(${o})` : "";
|
|
851
691
|
default:
|
|
852
692
|
return "";
|
|
853
693
|
}
|
|
854
694
|
}
|
|
855
|
-
function
|
|
695
|
+
function Be(t) {
|
|
856
696
|
let e = `anonymous_${Math.random().toString(36).slice(2)}`;
|
|
857
|
-
return
|
|
697
|
+
return re[e] ? Be() : (re[e] = e, e);
|
|
858
698
|
}
|
|
859
|
-
function
|
|
860
|
-
return !!
|
|
699
|
+
function ze(t, e) {
|
|
700
|
+
return !!Xt.find((r) => r === t) || !!e;
|
|
861
701
|
}
|
|
862
|
-
function
|
|
863
|
-
return t.startsWith("data") ||
|
|
702
|
+
function ie(t) {
|
|
703
|
+
return t.startsWith("data") || I.html.find((e) => t.toLowerCase() === e);
|
|
864
704
|
}
|
|
865
|
-
function
|
|
705
|
+
function se(t) {
|
|
866
706
|
return t && (t.textContent = "");
|
|
867
707
|
}
|
|
868
|
-
function
|
|
869
|
-
return t = t?.parentElement, e += t ? t[r ? "scrollTop" : "scrollLeft"] : 0, t ?
|
|
708
|
+
function W(t, e = 0, r = true) {
|
|
709
|
+
return t = t?.parentElement, e += t ? t[r ? "scrollTop" : "scrollLeft"] : 0, t ? W(t, e, r) : e;
|
|
870
710
|
}
|
|
871
711
|
function L(t, e = 1) {
|
|
872
|
-
return e =
|
|
712
|
+
return e = a(e, Number) && e || 1, a(t, String) && t.length >= e;
|
|
873
713
|
}
|
|
874
|
-
function
|
|
875
|
-
return
|
|
714
|
+
function K(t, e = 120) {
|
|
715
|
+
return q(t, e).replace(/</g, "<");
|
|
876
716
|
}
|
|
877
|
-
function
|
|
717
|
+
function q(t, e = 120) {
|
|
878
718
|
return `${t}`.trim().slice(0, e).replace(/>\s+</g, "><").replace(/</g, "<").replace(/\s{2,}/g, " ").replace(/\n/g, "\\n") + (t.length > e ? " …" : "").trim();
|
|
879
719
|
}
|
|
880
720
|
function N(t) {
|
|
881
721
|
switch (true) {
|
|
882
|
-
case
|
|
722
|
+
case a(t, String):
|
|
883
723
|
let e = document.createElement("div");
|
|
884
724
|
return e.append(t), e.innerHTML;
|
|
885
725
|
default:
|
|
886
726
|
return t;
|
|
887
727
|
}
|
|
888
728
|
}
|
|
889
|
-
function
|
|
890
|
-
return
|
|
729
|
+
function he(t) {
|
|
730
|
+
return a(t, String) && Object.assign(document.createElement("textarea"), { innerHTML: t }).textContent || t;
|
|
891
731
|
}
|
|
892
|
-
function
|
|
732
|
+
function Kt() {
|
|
893
733
|
let [t, e] = [false, true], r = [], n = { get on() {
|
|
894
734
|
return t = true, n;
|
|
895
735
|
}, get off() {
|
|
@@ -901,95 +741,95 @@ ${r}`), g2;
|
|
|
901
741
|
}, get backLog() {
|
|
902
742
|
return r;
|
|
903
743
|
} };
|
|
904
|
-
function
|
|
744
|
+
function o() {
|
|
905
745
|
e = true;
|
|
906
746
|
}
|
|
907
|
-
function
|
|
747
|
+
function i() {
|
|
908
748
|
e = false;
|
|
909
749
|
}
|
|
910
|
-
function
|
|
911
|
-
return r.unshift(...x2.map((
|
|
750
|
+
function u(...x2) {
|
|
751
|
+
return r.unshift(...x2.map((f2) => `${oe()} \u2A3B ${he(f2)}`)), console.error(r.slice(0, x2.length).join(`
|
|
912
752
|
`)), n;
|
|
913
753
|
}
|
|
914
754
|
function S2(...x2) {
|
|
915
|
-
return r.unshift(...x2.map((
|
|
755
|
+
return r.unshift(...x2.map((f2) => `${oe()} \u26A0 ${he(f2)}`)), console.warn(r.slice(0, x2.length).join(`
|
|
916
756
|
`)), n;
|
|
917
757
|
}
|
|
918
|
-
function
|
|
919
|
-
let
|
|
920
|
-
switch (!e && r.unshift(...
|
|
758
|
+
function p2(...x2) {
|
|
759
|
+
let f2 = x2.map((y) => `${oe()} \u2714 ${he(y)}`);
|
|
760
|
+
switch (!e && r.unshift(...f2), t) {
|
|
921
761
|
case true:
|
|
922
|
-
console.log(
|
|
762
|
+
console.log(f2.join(`
|
|
923
763
|
`));
|
|
924
764
|
default:
|
|
925
765
|
return n;
|
|
926
766
|
}
|
|
927
767
|
}
|
|
928
|
-
return Object.defineProperties(n, { log: { value:
|
|
768
|
+
return Object.defineProperties(n, { log: { value: p2, enumerable: false }, error: { value: u, enumerable: false }, warn: { value: S2, enumerable: false } }), Object.freeze(n);
|
|
929
769
|
}
|
|
930
|
-
function
|
|
931
|
-
return ((t) => `[${
|
|
770
|
+
function oe() {
|
|
771
|
+
return ((t) => `[${ne(t.getHours())}:${ne(t.getMinutes())}:${ne(t.getSeconds())}.${ne(t.getMilliseconds(), 3)}]`)(/* @__PURE__ */ new Date());
|
|
932
772
|
}
|
|
933
|
-
function
|
|
773
|
+
function Ee(t, e) {
|
|
934
774
|
if (t) for (let [r, n] of Object.entries(e)) {
|
|
935
775
|
if (r = A(r), r.startsWith("data")) return ae(t, n);
|
|
936
|
-
|
|
776
|
+
a(n, String) && ie(r) && t.setAttribute(r, n.split(/[, ]/)?.join(" "));
|
|
937
777
|
}
|
|
938
778
|
}
|
|
939
779
|
function ae(t, e) {
|
|
940
|
-
if (t &&
|
|
780
|
+
if (t && a(e, Object)) for (let [r, n] of Object.entries(e)) t.setAttribute(`data-${A(r)}`, n);
|
|
941
781
|
}
|
|
942
|
-
function
|
|
943
|
-
return t ?
|
|
782
|
+
function le(t) {
|
|
783
|
+
return t ? t.EL ? [t.EL] : a(t, NodeList) ? [...t] : T(t) ? [t] : Y(t) ? t : t.isJQx ? t.collection : void 0 : [];
|
|
944
784
|
}
|
|
945
785
|
function D(t, e, r = true, ...n) {
|
|
946
786
|
if (t.is.empty) return v.log("[JQx instance].[before(Me) | after(Me) | andThen]: instance is empty."), t;
|
|
947
|
-
if (n = n.map((
|
|
948
|
-
let
|
|
949
|
-
return v.log(`[JQx instance].[${
|
|
787
|
+
if (n = n.map((i) => i.isJQx ? i.node : a(i, String) ? e(i).node ?? i : i), n.find((i) => !a(i, String, Element))) {
|
|
788
|
+
let i = r ? "after" : "before";
|
|
789
|
+
return v.log(`[JQx instance].[${i}(Me)]: invalid/-sufficient input.`), t;
|
|
950
790
|
}
|
|
951
791
|
return t.node[r ? "after" : "before"](...n), t;
|
|
952
792
|
}
|
|
953
|
-
function
|
|
954
|
-
return
|
|
793
|
+
function T(t) {
|
|
794
|
+
return a(t, Text, HTMLElement, Comment);
|
|
955
795
|
}
|
|
956
796
|
function _(t, e) {
|
|
957
|
-
if (
|
|
958
|
-
let
|
|
959
|
-
/!important/i.test(n) && (n = n.slice(0, n.indexOf("!")).trim(),
|
|
797
|
+
if (a(e, Object)) for (let [r, n] of Object.entries(e)) {
|
|
798
|
+
let o;
|
|
799
|
+
/!important/i.test(n) && (n = n.slice(0, n.indexOf("!")).trim(), o = "important"), t.style.setProperty(A(r), n, o);
|
|
960
800
|
}
|
|
961
801
|
}
|
|
962
|
-
function
|
|
802
|
+
function M(t) {
|
|
963
803
|
let e = t.cloneNode(true);
|
|
964
804
|
return e.removeAttribute && e.removeAttribute("id"), t.isConnected ? t.remove() : t = null, e;
|
|
965
805
|
}
|
|
966
|
-
function
|
|
967
|
-
if (!
|
|
968
|
-
let e = t.style, r = getComputedStyle(t), n = !![e.visibility, r.visibility].includes("hidden"),
|
|
969
|
-
return !(
|
|
806
|
+
function We(t) {
|
|
807
|
+
if (!a(t, HTMLElement)) return;
|
|
808
|
+
let e = t.style, r = getComputedStyle(t), n = !![e.visibility, r.visibility].includes("hidden"), o = !![e.display, r.display].includes("none"), i = !!t.hidden, u = parseInt(r.height) < 1 || parseInt(r.width) < 1, S2 = t.offsetTop < 0 || t.offsetLeft + t.offsetWidth < 0 || t.offsetLeft > document.body.offsetWidth, p2 = +r.opacity == 0 || +(e.opacity || 1) == 0;
|
|
809
|
+
return !(i || S2 || p2 || o || n || u);
|
|
970
810
|
}
|
|
971
|
-
function
|
|
811
|
+
function _e(t) {
|
|
972
812
|
return t?.isConnected ? !![...document.querySelectorAll(":is(:read-write)")].find((e) => e === t) : false;
|
|
973
813
|
}
|
|
974
|
-
function
|
|
975
|
-
return t?.filter((e) => e).reduce((e, r) => e.concat(
|
|
814
|
+
function Ve(t) {
|
|
815
|
+
return t?.filter((e) => e).reduce((e, r) => e.concat(Ce(r) ? `<!--${r.data}-->` : ue(r) ? r.textContent : r.outerHTML), "");
|
|
976
816
|
}
|
|
977
|
-
function
|
|
817
|
+
function ne(t, e = 2) {
|
|
978
818
|
return `${t}`.padStart(e, "0");
|
|
979
819
|
}
|
|
980
|
-
function
|
|
820
|
+
function Ue(t, e = 0) {
|
|
981
821
|
return [t, e] = [Math.floor(t), Math.ceil(e)], Math.floor([...crypto.getRandomValues(new Uint32Array(1))].shift() / 2 ** 32 * (t - e + 1) + e);
|
|
982
822
|
}
|
|
983
823
|
function ce() {
|
|
984
|
-
return `_${
|
|
824
|
+
return `_${qt(Zt).slice(0, 8).join("")}`;
|
|
985
825
|
}
|
|
986
|
-
function
|
|
987
|
-
return t =
|
|
826
|
+
function ve(t) {
|
|
827
|
+
return t = a(t, String) && /,/.test(t) ? t.split(",").map((e) => e.trim().toLowerCase()).filter((e) => e.length > 0) : t, a(t, Array) ? t : a(t, String) && t?.trim().toLowerCase() || "";
|
|
988
828
|
}
|
|
989
|
-
function
|
|
829
|
+
function Ye(t) {
|
|
990
830
|
return t?.isConnected ? !![...document.querySelectorAll(":is(:modal)")].find((e) => e === t) : false;
|
|
991
831
|
}
|
|
992
|
-
function
|
|
832
|
+
function Le(t, e) {
|
|
993
833
|
switch (t = String(t).trim(), true) {
|
|
994
834
|
case /^(0|false|f)$/i.test(t):
|
|
995
835
|
return false;
|
|
@@ -999,74 +839,74 @@ ${r}`), g2;
|
|
|
999
839
|
return e;
|
|
1000
840
|
}
|
|
1001
841
|
}
|
|
1002
|
-
function
|
|
842
|
+
function qt(t) {
|
|
1003
843
|
let e = t.length;
|
|
1004
844
|
for (; e--; ) {
|
|
1005
|
-
let r =
|
|
845
|
+
let r = Ue(e);
|
|
1006
846
|
[t[e], t[r]] = [t[r], t[e]];
|
|
1007
847
|
}
|
|
1008
848
|
return t;
|
|
1009
849
|
}
|
|
1010
850
|
function V(t) {
|
|
1011
|
-
return
|
|
851
|
+
return a(t, String) ? t.toLowerCase().split("-").map((e, r) => r && `${er(e)}` || e).join("") : t;
|
|
1012
852
|
}
|
|
1013
853
|
function A(t) {
|
|
1014
854
|
return t.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`).replace(/^-|-$/, "");
|
|
1015
855
|
}
|
|
1016
|
-
function
|
|
856
|
+
function er([t, ...e]) {
|
|
1017
857
|
return `${t.toUpperCase()}${e.join("")}`;
|
|
1018
858
|
}
|
|
1019
|
-
function
|
|
1020
|
-
return
|
|
859
|
+
function ue(t) {
|
|
860
|
+
return a(t, Comment, Text);
|
|
1021
861
|
}
|
|
1022
|
-
function
|
|
1023
|
-
|
|
862
|
+
function Ce(t) {
|
|
863
|
+
a(t, Comment);
|
|
1024
864
|
}
|
|
1025
|
-
function
|
|
1026
|
-
return
|
|
865
|
+
function Ge(t) {
|
|
866
|
+
return a(t, Text);
|
|
1027
867
|
}
|
|
1028
868
|
function U(t) {
|
|
1029
|
-
return
|
|
869
|
+
return a(t, String) && /^<|>$/.test(`${t}`.trim());
|
|
1030
870
|
}
|
|
1031
|
-
function
|
|
1032
|
-
return
|
|
871
|
+
function Y(t) {
|
|
872
|
+
return a(t, Array) && !t?.find((e) => !T(e));
|
|
1033
873
|
}
|
|
1034
|
-
function
|
|
1035
|
-
return
|
|
874
|
+
function fe(t) {
|
|
875
|
+
return a(t, Array) && !t?.find((e) => !U(e));
|
|
1036
876
|
}
|
|
1037
877
|
function w(t, e) {
|
|
1038
|
-
let r = t.collection.filter((n) => !
|
|
878
|
+
let r = t.collection.filter((n) => !ue(n));
|
|
1039
879
|
for (let n = 0; n < r.length; n += 1) e(r[n], n);
|
|
1040
880
|
return t;
|
|
1041
881
|
}
|
|
1042
|
-
function
|
|
1043
|
-
return t.node ?
|
|
882
|
+
function Xe(t) {
|
|
883
|
+
return t.node ? a(t.node, Comment) ? `<!--${t.node.textContent}-->` : t.HTML.get(1).split(">")[0] + ">..." : "";
|
|
1044
884
|
}
|
|
1045
|
-
function
|
|
1046
|
-
let n = e !== document.body &&
|
|
1047
|
-
try {
|
|
885
|
+
function Fe(t, e, r) {
|
|
886
|
+
let n = e !== document.body && a(t, String) && t.toLowerCase() !== "body" ? e : document;
|
|
887
|
+
if (!(!a(t, String) || t.trim().length < 1)) try {
|
|
1048
888
|
r.collection = [...n.querySelectorAll(t)];
|
|
1049
889
|
} catch {
|
|
1050
|
-
v.warn(`JQx: Invalid CSS querySelector. [${
|
|
890
|
+
v.warn(`JQx: Invalid CSS querySelector. [${a(t, String) ? t : "Not a string!"}]`);
|
|
1051
891
|
}
|
|
1052
892
|
}
|
|
1053
|
-
function
|
|
1054
|
-
return { isCommentOrTextNode:
|
|
893
|
+
function Ze() {
|
|
894
|
+
return { isCommentOrTextNode: ue, isNode: T, isComment: Ce, isText: Ge, isHtmlString: U, isArrayOfHtmlElements: Y, isArrayOfHtmlStrings: fe, ElemArray2HtmlString: Ve, input2Collection: le, setCollectionFromCssSelector: Fe, cssRuleEdit: B({ createWithId: "JQxStylesheet" }) };
|
|
1055
895
|
}
|
|
1056
|
-
function
|
|
896
|
+
function Ke() {
|
|
1057
897
|
let e = Object.freeze({ notInDOM: "n/a", writable: "n/a", modal: "n/a", empty: true, open: "n/a", visible: "n/a" });
|
|
1058
898
|
return (r) => {
|
|
1059
899
|
let n = r.node;
|
|
1060
|
-
return
|
|
1061
|
-
return
|
|
900
|
+
return a(n, Node) ? Object.freeze({ get writable() {
|
|
901
|
+
return _e(n);
|
|
1062
902
|
}, get modal() {
|
|
1063
|
-
return
|
|
903
|
+
return Ye(n);
|
|
1064
904
|
}, get inDOM() {
|
|
1065
905
|
return n.isConnected;
|
|
1066
906
|
}, get open() {
|
|
1067
907
|
return n.open ?? false;
|
|
1068
908
|
}, get visible() {
|
|
1069
|
-
return
|
|
909
|
+
return We(n);
|
|
1070
910
|
}, get disabled() {
|
|
1071
911
|
return n.hasAttribute("readonly") || n.hasAttribute("disabled");
|
|
1072
912
|
}, get empty() {
|
|
@@ -1076,26 +916,26 @@ ${r}`), g2;
|
|
|
1076
916
|
} }) : e;
|
|
1077
917
|
};
|
|
1078
918
|
}
|
|
1079
|
-
function
|
|
1080
|
-
r &&
|
|
1081
|
-
let
|
|
1082
|
-
e.className && (
|
|
919
|
+
function qe(t, e, r, n) {
|
|
920
|
+
r && a(e, String) && (e = { [e]: r === "-" ? "" : r });
|
|
921
|
+
let o;
|
|
922
|
+
e.className && (o = e.className, delete e.className), o = [...t.classList].find((u) => u.startsWith("JQxClass-") || o && u === o) || o || `JQxClass-${ce().slice(1)}`, n.editCssRule(`.${o}`, e), t.classList.add(o);
|
|
1083
923
|
}
|
|
1084
|
-
var
|
|
1085
|
-
function
|
|
1086
|
-
return { factoryExtensions:
|
|
924
|
+
var tr = Ke();
|
|
925
|
+
function et(t) {
|
|
926
|
+
return { factoryExtensions: rr(t), instanceExtensions: nr(t) };
|
|
1087
927
|
}
|
|
1088
|
-
function
|
|
928
|
+
function rr(t) {
|
|
1089
929
|
return { data(e) {
|
|
1090
930
|
return { get all() {
|
|
1091
|
-
return new Proxy(e[0]?.dataset ?? {},
|
|
931
|
+
return new Proxy(e[0]?.dataset ?? {}, Se);
|
|
1092
932
|
}, set(r = {}) {
|
|
1093
|
-
if (!e.is.empty &&
|
|
933
|
+
if (!e.is.empty && a(r, Object)) for (let [n, o] of Object.entries(r)) e.setData({ [n]: o });
|
|
1094
934
|
return e;
|
|
1095
935
|
}, get(r, n) {
|
|
1096
936
|
return e.data.all[r] ?? n;
|
|
1097
937
|
}, add(r = {}) {
|
|
1098
|
-
if (!e.is.empty &&
|
|
938
|
+
if (!e.is.empty && a(r, Object)) for (let [n, o] of Object.entries(r)) e.setData({ [n]: o });
|
|
1099
939
|
return e;
|
|
1100
940
|
}, remove(r) {
|
|
1101
941
|
return e[0]?.removeAttribute(`data-${A(r)}`), e;
|
|
@@ -1103,27 +943,27 @@ ${r}`), g2;
|
|
|
1103
943
|
}, dimensions(e) {
|
|
1104
944
|
if (e.is.empty) return v.error("[JQx instance].dimensions called on empty instance"), { error: "[JQx instance].dimensions: NO ELEMENTS" };
|
|
1105
945
|
let { node: r } = e, n = r.getBoundingClientRect().toJSON();
|
|
1106
|
-
return n.scrollTopDistance =
|
|
946
|
+
return n.scrollTopDistance = W(r, 0), n.scrollLeftDistance = W(r, 0, false), n;
|
|
1107
947
|
}, node(e) {
|
|
1108
948
|
return e[0];
|
|
1109
949
|
}, HTML(e) {
|
|
1110
950
|
return { get(r, n) {
|
|
1111
951
|
if (e.is.empty) return "NO ELEMENTS IN COLLECTION";
|
|
1112
|
-
let
|
|
1113
|
-
return n ? N(
|
|
1114
|
-
}, set(r, n = false,
|
|
952
|
+
let o = r ? e.outerHtml : e.html();
|
|
953
|
+
return n ? N(o) : o;
|
|
954
|
+
}, set(r, n = false, o = false) {
|
|
1115
955
|
r = r.isJQx ? r.HTML.get(1) : r;
|
|
1116
|
-
let
|
|
1117
|
-
return r =
|
|
956
|
+
let i = a(r, String);
|
|
957
|
+
return r = i && o ? N(r) : r, i && (r || "").trim().length && e.html(r, n), e;
|
|
1118
958
|
}, replace(r, n = false) {
|
|
1119
959
|
return e.HTML.set(r, false, n);
|
|
1120
960
|
}, append(r, n = false) {
|
|
1121
|
-
return r =
|
|
961
|
+
return r = a(r, HTMLElement) ? t(r).HTML.get(1) : r.isJQx ? r.HTML.get(1) : r, e.HTML.set(r, true, n);
|
|
1122
962
|
}, insert(r, n = false) {
|
|
1123
|
-
return r =
|
|
963
|
+
return r = a(r, HTMLElement) ? t(r).HTML.get(1) : r.isJQx ? r.HTML.get(1) : r, e.HTML.set(r + e.HTML.get(), false, n);
|
|
1124
964
|
} };
|
|
1125
965
|
}, is(e) {
|
|
1126
|
-
return
|
|
966
|
+
return tr(e);
|
|
1127
967
|
}, length(e) {
|
|
1128
968
|
return e.collection.length;
|
|
1129
969
|
}, outerHtml(e) {
|
|
@@ -1150,15 +990,15 @@ ${r}`), g2;
|
|
|
1150
990
|
}, nwRule(r) {
|
|
1151
991
|
return e.Style.byRule({ rules: r });
|
|
1152
992
|
}, byRule({ classes2Apply: r = [], rules: n = [] } = {}) {
|
|
1153
|
-
let
|
|
1154
|
-
if (n = n &&
|
|
1155
|
-
return
|
|
993
|
+
let i = a(n, String) && !r.length ? n.split("{")[0].trim() : "";
|
|
994
|
+
if (n = n && a(n, String) ? [n] : n, r = r && a(r, String) ? [r] : r, (n?.length || r?.length) && (n?.length && t.editCssRules(...n), r)) for (let u of r) e.addClass(u);
|
|
995
|
+
return i?.startsWith(".") && e.addClass(i.slice(1)), i?.startsWith("#") && !e.attr("id") && e.prop({ id: i.slice(1) }), e;
|
|
1156
996
|
} };
|
|
1157
997
|
} };
|
|
1158
998
|
}
|
|
1159
|
-
function
|
|
999
|
+
function nr(t) {
|
|
1160
1000
|
return { addClass(e, ...r) {
|
|
1161
|
-
return w(e, (n) => n && r.forEach((
|
|
1001
|
+
return w(e, (n) => n && r.forEach((o) => n.classList.add(o)));
|
|
1162
1002
|
}, after(e, ...r) {
|
|
1163
1003
|
return D(e, t, true, ...r);
|
|
1164
1004
|
}, afterMe(e, ...r) {
|
|
@@ -1168,23 +1008,23 @@ ${r}`), g2;
|
|
|
1168
1008
|
}, append(e, ...r) {
|
|
1169
1009
|
if (e.is.empty || r.length < 1) return e;
|
|
1170
1010
|
let n = e.length === 1;
|
|
1171
|
-
for (let
|
|
1172
|
-
if (!
|
|
1173
|
-
let
|
|
1174
|
-
w(e, (
|
|
1011
|
+
for (let o of r) {
|
|
1012
|
+
if (!o.isJQx && L(o)) {
|
|
1013
|
+
let i = o.trim(), S2 = !/^<(.+)[^>]+>$/m.test(i) ? t.text(o) : $(o);
|
|
1014
|
+
w(e, (p2) => p2.append(n ? S2 : M(S2)));
|
|
1175
1015
|
}
|
|
1176
|
-
|
|
1016
|
+
T(o) && w(e, (i) => i.append(n ? o : M(o))), o.isJQx && !o.is.empty && w(e, (i) => o.collection.forEach((u) => i.append(n ? u : M(u))));
|
|
1177
1017
|
}
|
|
1178
1018
|
return e;
|
|
1179
1019
|
}, appendTo(e, r) {
|
|
1180
1020
|
switch (r = typeof r == "string" ? t(r) : r, true) {
|
|
1181
|
-
case (!r?.isJQx && !
|
|
1021
|
+
case (!r?.isJQx && !a(r, HTMLElement) || r?.collection?.length < 1):
|
|
1182
1022
|
return t.warn("[JQx instance].appendTo: invalid input"), e;
|
|
1183
1023
|
default:
|
|
1184
1024
|
return (r.isJQx ? r : t(r)).append(e), e;
|
|
1185
1025
|
}
|
|
1186
1026
|
}, attr(e, r, n) {
|
|
1187
|
-
if (!e.node ||
|
|
1027
|
+
if (!e.node || a(e.node, Text, Comment)) return e;
|
|
1188
1028
|
if (!n && L(r)) return r = A(r), r === "class" ? [...e.node.classList].join(" ") : e.node.getAttribute(r);
|
|
1189
1029
|
if (L(r) && n) switch (r = A(r), true) {
|
|
1190
1030
|
case r.startsWith("data-"):
|
|
@@ -1193,13 +1033,13 @@ ${r}`), g2;
|
|
|
1193
1033
|
default:
|
|
1194
1034
|
r = { [r]: n };
|
|
1195
1035
|
}
|
|
1196
|
-
return
|
|
1036
|
+
return a(r, Object) && !e.is.empty && Ee(e.node, r), e;
|
|
1197
1037
|
}, before(e, ...r) {
|
|
1198
1038
|
return D(e, t, false, ...r);
|
|
1199
1039
|
}, beforeMe(e, ...r) {
|
|
1200
1040
|
D(e, t, false, ...r);
|
|
1201
1041
|
}, clear(e) {
|
|
1202
|
-
return w(e,
|
|
1042
|
+
return w(e, se);
|
|
1203
1043
|
}, closest(e, r) {
|
|
1204
1044
|
let n = L(r) ? e.node?.closest(r) : void 0;
|
|
1205
1045
|
return n ? t(n) : e;
|
|
@@ -1207,21 +1047,21 @@ ${r}`), g2;
|
|
|
1207
1047
|
let { node: n } = e;
|
|
1208
1048
|
return n && getComputedStyle(n)[r];
|
|
1209
1049
|
}, css(e, r, n) {
|
|
1210
|
-
return w(e, (
|
|
1050
|
+
return w(e, (o) => qe(o, r, n, t));
|
|
1211
1051
|
}, duplicate(e, r = false, n = document.body) {
|
|
1212
1052
|
switch (true) {
|
|
1213
1053
|
case e.is.empty:
|
|
1214
1054
|
return v.error("Duplicating an empty JQx instance is not possible"), e;
|
|
1215
1055
|
default:
|
|
1216
|
-
let
|
|
1217
|
-
return
|
|
1218
|
-
|
|
1219
|
-
}), r ? t(
|
|
1056
|
+
let o = e.collection[0].cloneNode(true);
|
|
1057
|
+
return o.childNodes.forEach((i) => {
|
|
1058
|
+
i.removeAttribute && i?.removeAttribute("id");
|
|
1059
|
+
}), r ? t(o).toDOM(n) : t.virtual(o);
|
|
1220
1060
|
}
|
|
1221
1061
|
}, each(e, r) {
|
|
1222
1062
|
return w(e, r);
|
|
1223
1063
|
}, empty(e) {
|
|
1224
|
-
return w(e,
|
|
1064
|
+
return w(e, se);
|
|
1225
1065
|
}, find(e, r) {
|
|
1226
1066
|
return e.collection.length > 0 ? [...e.first()?.querySelectorAll(r)] : [];
|
|
1227
1067
|
}, find$(e, r) {
|
|
@@ -1243,16 +1083,16 @@ ${r}`), g2;
|
|
|
1243
1083
|
case !L(r):
|
|
1244
1084
|
return e.node?.getHTML() ?? "";
|
|
1245
1085
|
default:
|
|
1246
|
-
let
|
|
1247
|
-
return w(e, (
|
|
1086
|
+
let o = $(`<div>${r.isJQx ? r.HTML.get(true) : r}</div>`);
|
|
1087
|
+
return w(e, (u) => (u.textContent = n ? u.textContent : "", u.insertAdjacentHTML(t.at.end, o.getHTML())));
|
|
1248
1088
|
}
|
|
1249
|
-
}, htmlFor(e, r, n = "",
|
|
1089
|
+
}, htmlFor(e, r, n = "", o = false) {
|
|
1250
1090
|
if (e.is.empty || !L(r) || !L(n)) return e;
|
|
1251
|
-
let
|
|
1252
|
-
if (
|
|
1253
|
-
let
|
|
1254
|
-
return
|
|
1255
|
-
|
|
1091
|
+
let i = e.find$(r);
|
|
1092
|
+
if (i.length < 1) return e;
|
|
1093
|
+
let u = $(`<span>${n}</span>`);
|
|
1094
|
+
return i.each((S2) => {
|
|
1095
|
+
o || (S2.textContent = ""), S2.insertAdjacentHTML(t.at.end, u?.getHTML());
|
|
1256
1096
|
}), e;
|
|
1257
1097
|
}, isEmpty(e) {
|
|
1258
1098
|
return !e.node;
|
|
@@ -1260,14 +1100,14 @@ ${r}`), g2;
|
|
|
1260
1100
|
return e.single(r);
|
|
1261
1101
|
}, on(e, r, ...n) {
|
|
1262
1102
|
switch (true) {
|
|
1263
|
-
case (e.is.empty || !
|
|
1103
|
+
case (e.is.empty || !a(r, String, Array) || !L(r) || n.length < 1):
|
|
1264
1104
|
return e;
|
|
1265
1105
|
default:
|
|
1266
1106
|
return t.handle({ type: r, node: e.node, handler: n }), e;
|
|
1267
1107
|
}
|
|
1268
1108
|
}, once(e, r, ...n) {
|
|
1269
1109
|
switch (true) {
|
|
1270
|
-
case (e.is.empty || !
|
|
1110
|
+
case (e.is.empty || !a(r, String, Array) || !L(r) || n.length < 1):
|
|
1271
1111
|
return e;
|
|
1272
1112
|
default:
|
|
1273
1113
|
return t.handle({ type: r, once: true, node: e.node, handler: n }), e;
|
|
@@ -1275,62 +1115,62 @@ ${r}`), g2;
|
|
|
1275
1115
|
}, prepend(e, ...r) {
|
|
1276
1116
|
if (e.is.empty || !r) return;
|
|
1277
1117
|
let n = e.length === 1;
|
|
1278
|
-
for (let
|
|
1279
|
-
if (L(
|
|
1280
|
-
|
|
1281
|
-
let
|
|
1282
|
-
|
|
1118
|
+
for (let o of r) {
|
|
1119
|
+
if (L(o)) {
|
|
1120
|
+
o = o.trim();
|
|
1121
|
+
let u = !/^<(.+)[^>]+>$/m.test(o) ? t.text(o) : $(o);
|
|
1122
|
+
u = n ? u : M(u), w(e, (S2) => S2.prepend(u.cloneNode(true)));
|
|
1283
1123
|
}
|
|
1284
|
-
|
|
1124
|
+
T(o) && w(e, (i) => i.prepend(n ? o : M(o))), o.isJQx && !o.is.empty && (o.collection.length > 1 && o.collection.reverse(), w(e, (i) => w(o, (u) => i.prepend(n ? u : M(u)))), o.collection.reverse());
|
|
1285
1125
|
}
|
|
1286
1126
|
return e;
|
|
1287
1127
|
}, prependTo(e, r) {
|
|
1288
1128
|
switch (r = typeof r == "string" ? t(r) : r, true) {
|
|
1289
|
-
case (!r?.isJQx && !
|
|
1129
|
+
case (!r?.isJQx && !a(r, HTMLElement) || r?.collection?.length < 1):
|
|
1290
1130
|
return t.warn("[JQx instance].appendTo: invalid input"), e;
|
|
1291
1131
|
default:
|
|
1292
1132
|
return (r.isJQx ? r : t(r)).prepend(e), e;
|
|
1293
1133
|
}
|
|
1294
1134
|
}, prop(e, r, n) {
|
|
1295
|
-
if (
|
|
1296
|
-
let
|
|
1297
|
-
for (let [
|
|
1298
|
-
if (
|
|
1299
|
-
if (
|
|
1300
|
-
w(e, (
|
|
1301
|
-
if (
|
|
1302
|
-
|
|
1135
|
+
if (a(r, String) && !n) return r.startsWith("data") ? e[0]?.dataset[r.slice(r.indexOf("-") + 1)] : e[0]?.[r];
|
|
1136
|
+
let o = a(r, Object) ? r : { [r]: n };
|
|
1137
|
+
for (let [i, u] of Object.entries(o)) {
|
|
1138
|
+
if (i = i.trim(), u && !ie(i) || !u) return false;
|
|
1139
|
+
if (i.toLowerCase() === "id") return e[0].id = u;
|
|
1140
|
+
w(e, (p2) => {
|
|
1141
|
+
if (i.startsWith("data")) return p2.dataset[i.slice(i.indexOf("-") + 1)] = u;
|
|
1142
|
+
p2[i] = u;
|
|
1303
1143
|
});
|
|
1304
1144
|
}
|
|
1305
1145
|
return e;
|
|
1306
1146
|
}, remove(e, r) {
|
|
1307
|
-
let n = (
|
|
1147
|
+
let n = (i) => i.remove(), o = () => e.collection = e.collection.filter((i) => document.documentElement.contains(i));
|
|
1308
1148
|
if (r) {
|
|
1309
|
-
let
|
|
1310
|
-
return
|
|
1149
|
+
let i = e.find$(r);
|
|
1150
|
+
return i.is.empty || (w(i, n), o()), e;
|
|
1311
1151
|
}
|
|
1312
|
-
return w(e, n),
|
|
1152
|
+
return w(e, n), o(), e;
|
|
1313
1153
|
}, rmAttr(e, ...r) {
|
|
1314
1154
|
for (let n of r) e.node.removeAttribute(n);
|
|
1315
1155
|
return e;
|
|
1316
1156
|
}, removeClass(e, ...r) {
|
|
1317
1157
|
return w(e, (n) => {
|
|
1318
|
-
if (n) for (let
|
|
1158
|
+
if (n) for (let o of r) n.classList.remove(o);
|
|
1319
1159
|
});
|
|
1320
1160
|
}, renderTo(e, r, n) {
|
|
1321
|
-
return r =
|
|
1161
|
+
return r = a(r, HTMLElement) || r.isJQx ? r : document.body, n = a(n, String) && t.at[n] ? n : t.at.end, e.first$().toDOM(r, n), e;
|
|
1322
1162
|
}, replace(e, r, n) {
|
|
1323
|
-
let
|
|
1324
|
-
return !r || !
|
|
1163
|
+
let o = e.node;
|
|
1164
|
+
return !r || !a(n, HTMLElement) && !n?.isJQx ? (t.logger.error("JQx replace: invalid replacement value"), e) : ((n.isJQx || a(n, NodeList)) && (n = n[0]), o && r && (r = a(r, String) ? o.querySelectorAll(r) : r.isJQx ? r.collection : r, a(r, HTMLElement, NodeList, Array) && a(n, HTMLElement) && (a(r, HTMLElement) ? [r] : [...r]).forEach((i) => i.replaceWith(n.cloneNode(true)))), e);
|
|
1325
1165
|
}, replaceClass(e, r, ...n) {
|
|
1326
|
-
return w(e, (
|
|
1327
|
-
|
|
1328
|
-
for (let
|
|
1166
|
+
return w(e, (o) => {
|
|
1167
|
+
o.classList.remove(r);
|
|
1168
|
+
for (let i of n) o.classList.add(i);
|
|
1329
1169
|
});
|
|
1330
1170
|
}, replaceMe(e, r) {
|
|
1331
1171
|
return e.replaceWith(r);
|
|
1332
1172
|
}, replaceWith(e, r) {
|
|
1333
|
-
return r =
|
|
1173
|
+
return r = a(r, Element) ? r : r.isJQx ? r[0] : void 0, r && (e[0].replaceWith(r), e = t.virtual(r)), e;
|
|
1334
1174
|
}, setData(e, r) {
|
|
1335
1175
|
return w(e, (n) => ae(n, r));
|
|
1336
1176
|
}, show(e) {
|
|
@@ -1338,9 +1178,9 @@ ${r}`), g2;
|
|
|
1338
1178
|
}, single(e, r) {
|
|
1339
1179
|
let n = e.collection.length > 0;
|
|
1340
1180
|
switch (r = r ?? 0, true) {
|
|
1341
|
-
case (n &&
|
|
1181
|
+
case (n && a(r, String)):
|
|
1342
1182
|
return e.find$(r);
|
|
1343
|
-
case (n &&
|
|
1183
|
+
case (n && a(r, Number)):
|
|
1344
1184
|
return t(e.collection[r]);
|
|
1345
1185
|
case n:
|
|
1346
1186
|
return e.collection[0];
|
|
@@ -1348,267 +1188,273 @@ ${r}`), g2;
|
|
|
1348
1188
|
return e;
|
|
1349
1189
|
}
|
|
1350
1190
|
}, style(e, r, n) {
|
|
1351
|
-
return w(e, (
|
|
1352
|
-
n &&
|
|
1191
|
+
return w(e, (i) => {
|
|
1192
|
+
n && a(r, String) && (r = { [r]: n || "none" }), _(i, r);
|
|
1353
1193
|
});
|
|
1354
1194
|
}, text(e, r, n = false) {
|
|
1355
1195
|
switch (true) {
|
|
1356
1196
|
case e.isEmpty():
|
|
1357
1197
|
return e;
|
|
1358
|
-
case !
|
|
1198
|
+
case !a(r, String):
|
|
1359
1199
|
return e.node.textContent;
|
|
1360
1200
|
default:
|
|
1361
|
-
return w(e, (
|
|
1201
|
+
return w(e, (o) => o.textContent = n ? o.textContent + r : r);
|
|
1362
1202
|
}
|
|
1363
|
-
}, toDOM(e, r = document.body, n =
|
|
1364
|
-
return e.isVirtual = false,
|
|
1203
|
+
}, toDOM(e, r = document.body, n = C.BeforeEnd) {
|
|
1204
|
+
return e.isVirtual = false, R(e.collection, r, n), e;
|
|
1365
1205
|
}, toggleClass(e, r) {
|
|
1366
1206
|
return w(e, (n) => n.classList.toggle(r));
|
|
1367
1207
|
}, toNodeList(e) {
|
|
1368
1208
|
return [...e.collection].map((r) => document.importNode(r, true));
|
|
1369
|
-
}, trigger(e, r, n,
|
|
1370
|
-
n =
|
|
1371
|
-
let
|
|
1372
|
-
return e.is.empty || e.each((
|
|
1209
|
+
}, trigger(e, r, n, o) {
|
|
1210
|
+
n = a(n, Function) ? n : Event, o = a(o, Object) ? { ...o, bubbles: o.bubbles ?? true } : { bubbles: true };
|
|
1211
|
+
let i = new n(r, o);
|
|
1212
|
+
return e.is.empty || e.each((u) => u.dispatchEvent(i)), e;
|
|
1373
1213
|
}, val(e, r) {
|
|
1374
1214
|
switch (true) {
|
|
1375
|
-
case (e.is.empty || !
|
|
1215
|
+
case (e.is.empty || !a(e.node, HTMLInputElement, HTMLSelectElement, HTMLTextAreaElement)):
|
|
1376
1216
|
return e;
|
|
1377
|
-
case !
|
|
1217
|
+
case !a(r, String):
|
|
1378
1218
|
return e.node.value;
|
|
1379
1219
|
default:
|
|
1380
|
-
return e.node.value =
|
|
1220
|
+
return e.node.value = a(r, String) ? r : "", e;
|
|
1381
1221
|
}
|
|
1382
1222
|
} };
|
|
1383
1223
|
}
|
|
1384
|
-
var
|
|
1385
|
-
var
|
|
1386
|
-
var { isComment:
|
|
1387
|
-
function
|
|
1388
|
-
return { ...
|
|
1224
|
+
var Ae;
|
|
1225
|
+
var de;
|
|
1226
|
+
var { isComment: on, isText: sn, isHtmlString: an, isArrayOfHtmlElements: ln, isArrayOfHtmlStrings: cn, ElemArray2HtmlString: un, cssRuleEdit: $e, addFn: or } = ir();
|
|
1227
|
+
function ir() {
|
|
1228
|
+
return { ...Ze(), addFn: sr };
|
|
1389
1229
|
}
|
|
1390
|
-
function
|
|
1391
|
-
return t = t?.trim(), !L(t) || !
|
|
1230
|
+
function sr(t, e) {
|
|
1231
|
+
return t = t?.trim(), !L(t) || !a(e, Function) ? v.error("JQx.fn: method invalid parameter(s)") : (de[t] = (r, ...n) => e(r, ...n), v.log(`JQx: added extension function [${t}]`));
|
|
1392
1232
|
}
|
|
1393
|
-
function
|
|
1233
|
+
function ar(t) {
|
|
1394
1234
|
return function(e, r, n) {
|
|
1395
|
-
if (e = e?.trim(), !L(e) || !
|
|
1396
|
-
let
|
|
1235
|
+
if (e = e?.trim(), !L(e) || !a(r, Function)) return t.error("JQx.staticFn: invalid parameter(s)");
|
|
1236
|
+
let o = n ? { get() {
|
|
1397
1237
|
return r();
|
|
1398
|
-
} } : { value(...
|
|
1399
|
-
return r(...
|
|
1238
|
+
} } : { value(...i) {
|
|
1239
|
+
return r(...i);
|
|
1400
1240
|
} };
|
|
1401
1241
|
try {
|
|
1402
|
-
Object.defineProperty(t, e,
|
|
1242
|
+
Object.defineProperty(t, e, o);
|
|
1403
1243
|
} catch {
|
|
1404
1244
|
return t.warn(`JQx.staticFn: extension [${e}] already exists`);
|
|
1405
1245
|
}
|
|
1406
1246
|
return v.log(`JQx: added static extension function [${e}]`);
|
|
1407
1247
|
};
|
|
1408
1248
|
}
|
|
1409
|
-
function
|
|
1410
|
-
return new Proxy(t, Object.freeze({ get: (e, r) =>
|
|
1249
|
+
function me(t) {
|
|
1250
|
+
return new Proxy(t, Object.freeze({ get: (e, r) => lr(e, r, t) }));
|
|
1411
1251
|
}
|
|
1412
|
-
function
|
|
1413
|
-
return (...r) =>
|
|
1252
|
+
function tt(t, e) {
|
|
1253
|
+
return (...r) => e = typeof t == "function" ? t(me(e), ...r) : e;
|
|
1414
1254
|
}
|
|
1415
|
-
function
|
|
1255
|
+
function lr(t, e, r) {
|
|
1416
1256
|
switch (true) {
|
|
1417
|
-
case
|
|
1418
|
-
return
|
|
1419
|
-
case
|
|
1257
|
+
case (e === Symbol.proxy || e === Symbol.type):
|
|
1258
|
+
return "JQx instance proxy";
|
|
1259
|
+
case typeof e == "symbol":
|
|
1260
|
+
return P({ trial: () => t[e], whenError: () => t });
|
|
1261
|
+
case (!Number.isNaN(+e) && typeof +e == "number"):
|
|
1420
1262
|
return t.collection?.[e] || void 0;
|
|
1421
|
-
case e in
|
|
1422
|
-
return
|
|
1423
|
-
case e in
|
|
1424
|
-
return
|
|
1263
|
+
case e in Ae:
|
|
1264
|
+
return tt(Ae[e], r)();
|
|
1265
|
+
case e in de:
|
|
1266
|
+
return tt(de[e], r);
|
|
1425
1267
|
default:
|
|
1426
|
-
return t
|
|
1268
|
+
return Reflect.get(t, e);
|
|
1427
1269
|
}
|
|
1428
1270
|
}
|
|
1429
|
-
function
|
|
1430
|
-
let e =
|
|
1271
|
+
function ot(t) {
|
|
1272
|
+
let e = mr(t);
|
|
1431
1273
|
for (let [r, n] of Object.entries(Object.getOwnPropertyDescriptors(e))) Object.defineProperty(t, r, n);
|
|
1432
1274
|
return t;
|
|
1433
1275
|
}
|
|
1434
|
-
function
|
|
1276
|
+
function cr(t) {
|
|
1435
1277
|
return { allow(e) {
|
|
1436
1278
|
let r = /-/.test(e), n = r && e;
|
|
1437
|
-
e = r ? V(e) : e.toLowerCase(),
|
|
1279
|
+
e = r ? V(e) : e.toLowerCase(), H.allowTag(e), Object.defineProperties(t, He(e, true, t, n));
|
|
1438
1280
|
}, prohibit(e) {
|
|
1439
|
-
e = e.toLowerCase(),
|
|
1281
|
+
e = e.toLowerCase(), H.prohibitTag(e), Object.defineProperties(t, He(e, false, t));
|
|
1440
1282
|
} };
|
|
1441
1283
|
}
|
|
1442
|
-
function
|
|
1284
|
+
function rt(...t) {
|
|
1443
1285
|
if (t.length === 1) {
|
|
1444
1286
|
let e = String(t.shift().trim());
|
|
1445
1287
|
t = e.startsWith("!") ? [e.slice(1, -1)] : e.split(",").map((r) => r.trim());
|
|
1446
1288
|
}
|
|
1447
|
-
for (let e of t.map((r) => r.startsWith("!") ? r.slice(1, -1) : r))
|
|
1289
|
+
for (let e of t.map((r) => r.startsWith("!") ? r.slice(1, -1) : r)) $e(e, { removeRule: 1 });
|
|
1448
1290
|
}
|
|
1449
|
-
function
|
|
1291
|
+
function ur(t) {
|
|
1450
1292
|
return function(e, r, n) {
|
|
1451
|
-
r = r?.isJQx ? r?.[0] : r, n = n && Object.values(
|
|
1452
|
-
let
|
|
1453
|
-
if (r && !
|
|
1454
|
-
return
|
|
1293
|
+
r = r?.isJQx ? r?.[0] : r, n = n && Object.values(C).find((i) => n === i);
|
|
1294
|
+
let o = t(e, document.createElement("br"));
|
|
1295
|
+
if (r && !a(r, HTMLBRElement)) for (let i of o.collection) n ? r.insertAdjacentElement(n, i) : r.append(i);
|
|
1296
|
+
return o;
|
|
1455
1297
|
};
|
|
1456
1298
|
}
|
|
1457
|
-
function
|
|
1299
|
+
function fr(...t) {
|
|
1458
1300
|
let e = {};
|
|
1459
1301
|
for (let r of t) {
|
|
1460
1302
|
let n = Object.getOwnPropertyDescriptors(r);
|
|
1461
|
-
for (let [
|
|
1303
|
+
for (let [o, i] of Object.entries(n)) !(o in e) && Object.defineProperty(e, o, { ...i, enumerable: false });
|
|
1462
1304
|
}
|
|
1463
1305
|
return e;
|
|
1464
1306
|
}
|
|
1465
|
-
function
|
|
1307
|
+
function dr(t, e, r, n) {
|
|
1466
1308
|
return t = A(n || t.toLowerCase()), { get() {
|
|
1467
|
-
return (...
|
|
1468
|
-
let
|
|
1469
|
-
return v.log(e ? `JQx: created (virtual) instance from [JQx].${t} ${S2}` : `JQx: ${t.toUpperCase()} is prohibited. Use [JQx].allowTag if necessary.`),
|
|
1309
|
+
return (...o) => {
|
|
1310
|
+
let i = e && r.virtual(O(z[t](...o))) || void 0, S2 = !a(i?.node, Comment, Text, void 0) ? we(i) : "";
|
|
1311
|
+
return v.log(e ? `JQx: created (virtual) instance from [JQx].${t} ${S2}` : `JQx: ${t.toUpperCase()} is prohibited. Use [JQx].allowTag if necessary.`), i;
|
|
1470
1312
|
};
|
|
1471
1313
|
}, enumerable: false, configurable: true };
|
|
1472
1314
|
}
|
|
1473
1315
|
function He(t, e, r, n) {
|
|
1474
1316
|
t = t.toLowerCase();
|
|
1475
|
-
let
|
|
1476
|
-
return n ? { [n]:
|
|
1317
|
+
let o = dr(t, e, r, n);
|
|
1318
|
+
return n ? { [n]: o, [V(n)]: o } : { [t]: o, [t.toUpperCase()]: o };
|
|
1477
1319
|
}
|
|
1478
|
-
function
|
|
1479
|
-
return
|
|
1320
|
+
function mr(t) {
|
|
1321
|
+
return fr(Object.entries(H.tagsRaw).reduce(gr(t), {}), xr(t));
|
|
1480
1322
|
}
|
|
1481
|
-
function
|
|
1323
|
+
function gr(t) {
|
|
1482
1324
|
return function(e, [r, n]) {
|
|
1483
1325
|
return Object.defineProperties(e, He(r, n, t)), e;
|
|
1484
1326
|
};
|
|
1485
1327
|
}
|
|
1486
|
-
function
|
|
1328
|
+
function pr(t) {
|
|
1487
1329
|
return function(e, r, ...n) {
|
|
1488
|
-
|
|
1330
|
+
a(r, Function) && (n.push(r), r = void 0), t({ type: e, selector: r, handlers: n });
|
|
1489
1331
|
};
|
|
1490
1332
|
}
|
|
1491
|
-
function
|
|
1333
|
+
function yr(t) {
|
|
1492
1334
|
return function(e) {
|
|
1493
|
-
let { type: r, types: n, origin:
|
|
1494
|
-
|
|
1495
|
-
let
|
|
1496
|
-
|
|
1497
|
-
let c = { type:
|
|
1335
|
+
let { type: r, types: n, origin: o, selector: i, handler: u, handlers: S2, node: p2, name: x2, capture: f2, once: y, about: m } = e;
|
|
1336
|
+
u = S2 || u, r = n || r, i = o || i;
|
|
1337
|
+
let b2 = ve(r), d = x2;
|
|
1338
|
+
u = a(u, Function) ? [u] : u;
|
|
1339
|
+
let c = { type: b2, selector: i || o, capture: f2, name: d, once: y, node: p2, about: m };
|
|
1498
1340
|
switch (true) {
|
|
1499
|
-
case (
|
|
1500
|
-
for (let
|
|
1341
|
+
case (a(b2, Array) && b2.length > 0):
|
|
1342
|
+
for (let s of b2) c.type = s, nt(u, c, t);
|
|
1501
1343
|
break;
|
|
1502
1344
|
default:
|
|
1503
|
-
return
|
|
1345
|
+
return nt(u, c, t);
|
|
1504
1346
|
}
|
|
1505
1347
|
};
|
|
1506
1348
|
}
|
|
1507
|
-
function
|
|
1349
|
+
function nt(t, e, r) {
|
|
1508
1350
|
for (let n of t) r.listen({ ...e, handler: n });
|
|
1509
1351
|
}
|
|
1510
|
-
function
|
|
1352
|
+
function br(t) {
|
|
1511
1353
|
return function(e, r) {
|
|
1512
1354
|
return r = L(r) && r, e = L(e) && e, r && e && t.listenerStore[e][r];
|
|
1513
1355
|
};
|
|
1514
1356
|
}
|
|
1515
|
-
function
|
|
1516
|
-
return t.activePopup || Object.defineProperty(t, "activePopup", { value:
|
|
1517
|
-
}
|
|
1518
|
-
function
|
|
1519
|
-
let e = (
|
|
1520
|
-
return
|
|
1521
|
-
}, n = function(...
|
|
1522
|
-
for (let
|
|
1523
|
-
},
|
|
1524
|
-
return { editCssRule: e, createStyle: r, editCssRules: n, allowProhibit:
|
|
1525
|
-
}
|
|
1526
|
-
function
|
|
1527
|
-
let { factoryExtensions: e, instanceExtensions: r } =
|
|
1528
|
-
|
|
1529
|
-
let { editCssRule: n, createStyle:
|
|
1530
|
-
return z.setError = (c) => (
|
|
1531
|
-
return
|
|
1532
|
-
}, node(c,
|
|
1533
|
-
return
|
|
1534
|
-
}, nodes(c,
|
|
1535
|
-
return [...
|
|
1536
|
-
}, clearAllTimers:
|
|
1537
|
-
return function(c,
|
|
1538
|
-
return
|
|
1357
|
+
function hr(t) {
|
|
1358
|
+
return t.activePopup || Object.defineProperty(t, "activePopup", { value: ee(t), enumerable: false }), t.activePopup;
|
|
1359
|
+
}
|
|
1360
|
+
function Sr(t) {
|
|
1361
|
+
let e = (f2, y) => $e(f2, y), r = function(f2) {
|
|
1362
|
+
return B({ createWithId: f2 || `jqx${ce()}` });
|
|
1363
|
+
}, n = function(...f2) {
|
|
1364
|
+
for (let y of f2) $e(y);
|
|
1365
|
+
}, o = cr(t), i = te(t), u = yr(i);
|
|
1366
|
+
return { editCssRule: e, createStyle: r, editCssRules: n, allowProhibit: o, handle: u, capturedHandling: u, log: (...f2) => v.on.log(...f2).off, warn: (...f2) => v.on.warn(...f2).off, error: (...f2) => v.on.error(...f2).off, handlerWrapper: i };
|
|
1367
|
+
}
|
|
1368
|
+
function xr(t) {
|
|
1369
|
+
let { factoryExtensions: e, instanceExtensions: r } = et(t);
|
|
1370
|
+
Ae = e, de = r;
|
|
1371
|
+
let { editCssRule: n, createStyle: o, editCssRules: i, allowProhibit: u, handle: S2, capturedHandling: p2, log: x2, warn: f2, error: y, handlerWrapper: m } = Sr(t), b2 = br(t), d = ar(t);
|
|
1372
|
+
return z.setError = (c) => (y(`JQx direct element creation error: [${c}] is not a valid tag`), t.br()), { log: x2, warn: f2, error: y, editCssRules: i, createStyle: o, editStylesheet: o, editCssRule: n, escHtml: N, logger: v, proxyWrapper: G, text(c, s = false) {
|
|
1373
|
+
return s ? t.comment(c) : document.createTextNode(c);
|
|
1374
|
+
}, node(c, s = document) {
|
|
1375
|
+
return s.querySelector(c, s);
|
|
1376
|
+
}, nodes(c, s = document) {
|
|
1377
|
+
return [...s.querySelectorAll(c, s)];
|
|
1378
|
+
}, clearAllTimers: xe, get staticFn() {
|
|
1379
|
+
return function(c, s, l) {
|
|
1380
|
+
return d(c, s, l);
|
|
1539
1381
|
};
|
|
1540
1382
|
}, get toBool() {
|
|
1541
|
-
return
|
|
1383
|
+
return Le;
|
|
1542
1384
|
}, get getNamedListener() {
|
|
1543
|
-
return
|
|
1385
|
+
return b2;
|
|
1544
1386
|
}, get virtual() {
|
|
1545
|
-
return
|
|
1387
|
+
return ur(t);
|
|
1546
1388
|
}, get allowTag() {
|
|
1547
|
-
return
|
|
1389
|
+
return u.allow;
|
|
1548
1390
|
}, get prohibitTag() {
|
|
1549
|
-
return
|
|
1391
|
+
return u.prohibit;
|
|
1550
1392
|
}, get removeCssRule() {
|
|
1551
|
-
return
|
|
1393
|
+
return rt;
|
|
1552
1394
|
}, get removeCssRules() {
|
|
1553
|
-
return
|
|
1395
|
+
return rt;
|
|
1554
1396
|
}, get delegate() {
|
|
1555
|
-
return
|
|
1397
|
+
return pr(p2);
|
|
1556
1398
|
}, get delegateCaptured() {
|
|
1557
|
-
return
|
|
1399
|
+
return p2;
|
|
1558
1400
|
}, get handle() {
|
|
1559
|
-
return
|
|
1401
|
+
return p2;
|
|
1560
1402
|
}, get listen() {
|
|
1561
1403
|
return m.listen;
|
|
1562
1404
|
}, get at() {
|
|
1563
|
-
return
|
|
1405
|
+
return C;
|
|
1564
1406
|
}, get setStyle() {
|
|
1565
1407
|
return n;
|
|
1566
1408
|
}, get fn() {
|
|
1567
|
-
return
|
|
1409
|
+
return or;
|
|
1568
1410
|
}, get lenient() {
|
|
1569
|
-
return
|
|
1411
|
+
return H.allowUnknownHtmlTags;
|
|
1570
1412
|
}, get IS() {
|
|
1571
|
-
return
|
|
1413
|
+
return a;
|
|
1572
1414
|
}, get Popup() {
|
|
1573
|
-
return
|
|
1415
|
+
return hr(t);
|
|
1574
1416
|
}, get listenerStore() {
|
|
1575
1417
|
return m.ListenerStore;
|
|
1576
1418
|
} };
|
|
1577
1419
|
}
|
|
1578
|
-
var
|
|
1579
|
-
function
|
|
1580
|
-
return function(e, r, n =
|
|
1420
|
+
var it = ot(wr());
|
|
1421
|
+
function wr() {
|
|
1422
|
+
return function(e, r, n = C.BeforeEnd) {
|
|
1581
1423
|
if (e?.isJQx) return e;
|
|
1582
|
-
let
|
|
1583
|
-
r = (!
|
|
1584
|
-
let
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
let
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1424
|
+
let o = a(r, HTMLBRElement);
|
|
1425
|
+
r = (!o && r && r.isJQx ? r[0] : r) || document.body, n = n && Object.values(C).find((f2) => n === f2) ? n : void 0;
|
|
1426
|
+
let i = U(e), S2 = !i && fe(e) || i, p2 = { collection: le(e) ?? [], isVirtual: o, isJQx: true }, x2 = Y(p2.collection);
|
|
1427
|
+
switch (true) {
|
|
1428
|
+
case (p2.collection.length && x2 && !o):
|
|
1429
|
+
for (let f2 of p2.collection) r.contains(f2) || R([f2], r, n);
|
|
1430
|
+
break;
|
|
1431
|
+
case S2:
|
|
1432
|
+
for (let f2 of [e].flat()) p2.collection.push($(f2));
|
|
1433
|
+
if (p2.collection.length > 0) {
|
|
1434
|
+
let f2 = p2.collection.filter((d) => d?.dataset?.jqxcreationerror);
|
|
1435
|
+
p2.collection = p2.collection.filter((d) => !d?.dataset?.jqxcreationerror);
|
|
1436
|
+
let m = p2.collection.map((d) => `${String(d.constructor).split(/function|\(/)[1].trim()}`).length > 1;
|
|
1437
|
+
p2 = me(p2);
|
|
1438
|
+
let b2 = p2.collection.length > 0 ? Xe(p2) : "sanitized: no elements remaining";
|
|
1439
|
+
v.log(`JQx: created ${p2.isVirtual ? "(virtual)" : ""} instance from ${m ? "array of " : ""}HTML string${m ? "s" : ""} ${b2}`), p2.isVirtual || R(p2.collection, r, n);
|
|
1440
|
+
}
|
|
1441
|
+
break;
|
|
1442
|
+
default:
|
|
1443
|
+
Fe(e, r, p2);
|
|
1598
1444
|
}
|
|
1599
|
-
return
|
|
1445
|
+
return me(p2);
|
|
1600
1446
|
};
|
|
1601
1447
|
}
|
|
1602
|
-
var
|
|
1448
|
+
var yn = it;
|
|
1603
1449
|
|
|
1604
1450
|
// ../Resource/Externals/ticktock.min.js
|
|
1605
1451
|
var M2 = ke2();
|
|
1606
1452
|
function ke2() {
|
|
1607
|
-
let [e, r, n, t] = ["2-digit", "numeric", "long", "short"],
|
|
1453
|
+
let [e, r, n, t] = ["2-digit", "numeric", "long", "short"], a2 = { fixed: { MM: { month: n }, M: { month: t }, m: { month: r }, mm: { month: e }, yyyy: { year: r }, yy: { year: e }, WD: { weekday: n }, wd: { weekday: t }, d: { day: r }, dd: { day: e }, h: { hour: r }, hh: { hour: e }, mi: { minute: r }, mmi: { minute: e }, s: { second: r }, ss: { second: e }, ms: { fractionalSecondDigits: 3 }, tz: { timeZoneName: "shortOffset" }, dl: { locale: "default" }, h12: { hour12: false }, yn: { yearName: "" }, ry: { relatedYear: true }, msp: { fractionalSecond: true } }, dynamic: { tzn: (l) => ({ timeZoneName: l.slice(4) }), hrc: (l) => ({ hourCycle: `h${l.slice(4)}` }), ds: (l) => ({ dateStyle: l.slice(3) }), ts: (l) => ({ timeStyle: l.slice(3) }), tz: (l) => ({ timeZone: l.slice(3) }), e: (l) => ({ era: l.slice(2) }), l: (l) => ({ locale: l.slice(2) }) } }, o = { ...a2, retrieveDyn(l) {
|
|
1608
1454
|
let y = l?.slice(0, l.indexOf(":"));
|
|
1609
|
-
return
|
|
1455
|
+
return a2.dynamic[y] && a2.dynamic[y](l);
|
|
1610
1456
|
}, get re() {
|
|
1611
|
-
return new RegExp(`\\b(${Object.keys(
|
|
1457
|
+
return new RegExp(`\\b(${Object.keys(a2.fixed).join("|")})\\b`, "g");
|
|
1612
1458
|
} }, s = (l = "dtf", y = 0) => {
|
|
1613
1459
|
let h2 = ` ${l.replace(/(?<=\{)(.+?)(?=})/g, (d) => `[${y++}]`).replace(/[{}]/g, "").trim()} `, D2 = l.match(/(?<=\{)(.+?)(?=})/g) || [];
|
|
1614
1460
|
return { get texts() {
|
|
@@ -1624,70 +1470,70 @@ ${r}`), g2;
|
|
|
1624
1470
|
}, finalize(d = "", Z2 = "", b2 = "", $3 = "") {
|
|
1625
1471
|
return h2.replace(/~([\d+]?)/g, "$1").replace(/dtf/, d).replace(/era/, b2).replace(/dp\b|~dp\b/, Z2).replace(/yn\b/, $3).replace(/\[(\d+?)]/g, (w3, Fe2) => D2[Fe2].trim()).trim();
|
|
1626
1472
|
} };
|
|
1627
|
-
},
|
|
1628
|
-
let D2 = c(...
|
|
1473
|
+
}, u = (l) => l.replace(/\s+/g, ""), c = (...l) => l?.reduce((y, h2) => ({ ...y, ...o.retrieveDyn(h2) || o.fixed[h2] }), o.fixed.dl), i = (l, y, h2) => {
|
|
1474
|
+
let D2 = c(...u(h2).split(",")), d = Intl.DateTimeFormat(D2.locale, D2).format(l);
|
|
1629
1475
|
return y.finalize(d);
|
|
1630
1476
|
}, m = (l, y, h2, D2) => l.toLocaleString(y, { timeZone: h2, month: D2 ? t : n }), T3 = (l, y, h2) => {
|
|
1631
|
-
let D2 = c(...y.units.concat(
|
|
1477
|
+
let D2 = c(...y.units.concat(u(h2).split(",")).flat()), d = { ...o.fixed }, Z2 = ($3, w3) => D2[$3] === "numeric" && w3.startsWith("0") ? w3.slice(1) : w3, b2 = Intl.DateTimeFormat(D2.locale, D2).formatToParts(l).reduce(($3, w3) => w3.type === "literal" && /[ ,/-]/.test(w3.value) ? $3 : { ...$3, [w3.type]: Z2(w3.type, w3.value) }, {});
|
|
1632
1478
|
return d.ms = D2.fractionalSecondDigits ? d.msp : d.ms, d.yyyy = b2.relatedYear ? d.ry : d.yyyy, y.formatStr = y.formatStr.replace(o.re, ($3) => /^(M|MM)$/.test($3) ? m(l, D2.locale, D2.timeZone, /^M$/.test($3)) : b2[Object.keys(d[$3]).shift()] || $3), y.finalize(void 0, b2.dayPeriod, b2.era, b2.yearName);
|
|
1633
1479
|
};
|
|
1634
1480
|
return (l, y, h2 = "l:default") => /ds:|ts:/.test(h2) ? i(l, s(void 0), h2) : T3(l, s(y || void 0), h2);
|
|
1635
1481
|
}
|
|
1636
1482
|
var le2 = Ce2;
|
|
1637
1483
|
function Ce2() {
|
|
1638
|
-
let e = (t,
|
|
1639
|
-
let o = isNaN(new Date(t)), s = isNaN(new Date(
|
|
1484
|
+
let e = (t, a2) => {
|
|
1485
|
+
let o = isNaN(new Date(t)), s = isNaN(new Date(a2));
|
|
1640
1486
|
if (s) {
|
|
1641
|
-
let [
|
|
1642
|
-
return { error: true, message:
|
|
1487
|
+
let [u, c, i] = Array(3).fill("end date not valid");
|
|
1488
|
+
return { error: true, message: u, full: c, clean: i };
|
|
1643
1489
|
}
|
|
1644
1490
|
if (o) {
|
|
1645
|
-
let [
|
|
1646
|
-
return { error: true, message:
|
|
1491
|
+
let [u, c, i] = Array(3).fill("start date not valid");
|
|
1492
|
+
return { error: true, message: u, full: c, clean: i };
|
|
1647
1493
|
}
|
|
1648
1494
|
if (o && !s) {
|
|
1649
|
-
let [
|
|
1650
|
-
return { error: true, message:
|
|
1495
|
+
let [u, c, i] = Array(3).fill("start- and/or end date are not valid");
|
|
1496
|
+
return { error: true, message: u, full: c, clean: i };
|
|
1651
1497
|
}
|
|
1652
1498
|
return { error: false };
|
|
1653
1499
|
}, r = n();
|
|
1654
|
-
return function({ start: t, end:
|
|
1655
|
-
let s = e(t,
|
|
1500
|
+
return function({ start: t, end: a2, diffs: o = {} } = {}) {
|
|
1501
|
+
let s = e(t, a2), u = a2 > t ? "+" : "-";
|
|
1656
1502
|
if (s.error) return s;
|
|
1657
|
-
let c = Math.abs(t -
|
|
1658
|
-
o = { ...o, fromUTC: t, toUTC:
|
|
1503
|
+
let c = Math.abs(t - a2), i = new Date(c), m = i.getUTCFullYear() - 1970, T3 = i.getUTCMonth(), l = i.getUTCDate() - 1, y = l % 7, h2 = Math.floor(l / 7), D2 = i.getUTCHours(), d = i.getUTCMinutes(), Z2 = i.getUTCSeconds(), b2 = i.getUTCMilliseconds(), $3 = Math.floor(c / 864e5);
|
|
1504
|
+
o = { ...o, fromUTC: t, toUTC: a2, sign: "", years: m, months: T3, days: l, hours: D2, minutes: d, seconds: Z2, milliseconds: b2, diffInDays: $3 }, o.full = r({ values: o, full: true }), o.clean = r({ values: o }), o.equalDates = o.clean === "Dates are equal";
|
|
1659
1505
|
let w3 = D2 + d + Z2 > 0 ? "T" : "";
|
|
1660
|
-
return o.clean !== "Dates are equal" && (o.sign =
|
|
1506
|
+
return o.clean !== "Dates are equal" && (o.sign = u, o.jsPeriod = `${u}P${m > 0 ? `${m}Y` : ""}${T3 > 0 ? `${T3}M` : ""}${h2 > 0 ? `${h2}W` : ""}${y > 0 ? `${y}D` : ""}${w3}${D2 > 0 ? `${D2}H` : ""}${d > 0 ? `${d}M` : ""}${Z2 > 0 ? `${Z2}S` : ""}`, o.ISOPeriod = `P${m > 0 ? `${m}Y` : ""}${T3 > 0 ? `${T3}M` : ""}${l > 0 ? `${l}D` : ""}${w3}${D2 > 0 ? `${D2}H` : ""}${d > 0 ? `${d}M` : ""}${Z2 > 0 ? `${Z2}S` : ""}`), o;
|
|
1661
1507
|
};
|
|
1662
1508
|
function n() {
|
|
1663
|
-
let t = (...i) => (m) => i.reduce((T3, l) => l(T3), m),
|
|
1664
|
-
return t(({ values: i, full: m }) => [Object.entries(i).filter(([T3]) => /^(years|month|days|hours|minutes|seconds)/i.test(T3)), m], ([i, m]) => m ? i : i.filter(([, T3]) => m ? +T3 : T3 > 0), (i) => i.reduce((m, [T3, l]) => [...m, `${l} ${
|
|
1509
|
+
let t = (...i) => (m) => i.reduce((T3, l) => l(T3), m), a2 = (i, m) => i === 1 ? m.slice(0, -1) : m;
|
|
1510
|
+
return t(({ values: i, full: m }) => [Object.entries(i).filter(([T3]) => /^(years|month|days|hours|minutes|seconds)/i.test(T3)), m], ([i, m]) => m ? i : i.filter(([, T3]) => m ? +T3 : T3 > 0), (i) => i.reduce((m, [T3, l]) => [...m, `${l} ${a2(l, T3)}`], []), (i) => i.length < 1 ? "Dates are equal" : `${i.slice(0, -1).join(", ")}${i.length > 1 ? " and " : ""}${i.slice(-1).shift()}`);
|
|
1665
1511
|
}
|
|
1666
1512
|
}
|
|
1667
1513
|
var ie2 = Ae2;
|
|
1668
1514
|
function Ae2() {
|
|
1669
|
-
let e = Object.entries({ year: "FullYear", month: "Month", date: "Date", day: "Date", hour: "Hours", minute: "Minutes", second: "Seconds", millisecond: "Milliseconds" }).reduce((t, [
|
|
1670
|
-
let
|
|
1671
|
-
return r = t[0].trim().startsWith("subtract,"), r && (t =
|
|
1515
|
+
let e = Object.entries({ year: "FullYear", month: "Month", date: "Date", day: "Date", hour: "Hours", minute: "Minutes", second: "Seconds", millisecond: "Milliseconds" }).reduce((t, [a2, o]) => ({ ...t, [a2]: o, [`${a2}s`]: o }), {}), r = false, n = function(...t) {
|
|
1516
|
+
let a2 = t.length === 1;
|
|
1517
|
+
return r = t[0].trim().startsWith("subtract,"), r && (t = a2 ? t[0].trim().replace(/^subtract,/i, "").split(",").map((o) => o.trim()) : t.filter((o) => !o.startsWith("subtract"))), a2 && !r && (t = t[0].split(",").map((o) => o.trim())), t.map(function(o) {
|
|
1672
1518
|
if (!o) return false;
|
|
1673
1519
|
let s = o.toLowerCase().split(/ {1,}/);
|
|
1674
|
-
return s.length < 2 ? false : s.map((
|
|
1675
|
-
|
|
1676
|
-
let c = parseInt(
|
|
1677
|
-
return Number.isNaN(c) ?
|
|
1520
|
+
return s.length < 2 ? false : s.map((u) => {
|
|
1521
|
+
u = `${u}`.trim().replace(/[^a-z0-9-+]/g, "");
|
|
1522
|
+
let c = parseInt(u, 10);
|
|
1523
|
+
return Number.isNaN(c) ? u : r ? -c : +c;
|
|
1678
1524
|
});
|
|
1679
1525
|
}).filter((o) => o);
|
|
1680
1526
|
};
|
|
1681
|
-
return function(t, ...
|
|
1682
|
-
if (
|
|
1683
|
-
let o = n(...
|
|
1684
|
-
return o.length && o.forEach(([s,
|
|
1685
|
-
|
|
1527
|
+
return function(t, ...a2) {
|
|
1528
|
+
if (a2.length < 1) return t;
|
|
1529
|
+
let o = n(...a2);
|
|
1530
|
+
return o.length && o.forEach(([s, u]) => {
|
|
1531
|
+
u = u, u = e[u], s && u && t[`set${u}`](t[`get${u}`]() + s);
|
|
1686
1532
|
}), t;
|
|
1687
1533
|
};
|
|
1688
1534
|
}
|
|
1689
|
-
var
|
|
1690
|
-
var
|
|
1535
|
+
var ge2 = le2();
|
|
1536
|
+
var ye2 = Ye2();
|
|
1691
1537
|
var N2 = ie2();
|
|
1692
1538
|
var We2 = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
|
|
1693
1539
|
var he2 = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"];
|
|
@@ -1702,11 +1548,11 @@ ${r}`), g2;
|
|
|
1702
1548
|
}
|
|
1703
1549
|
function De2(e, r = false) {
|
|
1704
1550
|
let n = Q2(e.clone, { sunday: r }), t = [n];
|
|
1705
|
-
return { weekStart: n.format("WD", "l:en-GB"), inputDate: e, dates: t.concat([...Array(6)].map((
|
|
1551
|
+
return { weekStart: n.format("WD", "l:en-GB"), inputDate: e, dates: t.concat([...Array(6)].map((a2, o) => n.clone.addDays(o + 1))) };
|
|
1706
1552
|
}
|
|
1707
|
-
function W2(e, { start: r, end: n, future: t, past:
|
|
1553
|
+
function W2(e, { start: r, end: n, future: t, past: a2, include: o = { start: false, end: false } } = {}) {
|
|
1708
1554
|
let s = e.clone.UTC;
|
|
1709
|
-
return r = r?.value || r?.constructor === Date ? f(r?.value || r).UTC : f.now.UTC, n = n && n?.value || n?.constructor === Date ? f(n?.value || n).UTC : f.now.UTC, s.milliseconds = 0, r.milliseconds = 0, n.milliseconds = 0, t ? r > n :
|
|
1555
|
+
return r = r?.value || r?.constructor === Date ? f(r?.value || r).UTC : f.now.UTC, n = n && n?.value || n?.constructor === Date ? f(n?.value || n).UTC : f.now.UTC, s.milliseconds = 0, r.milliseconds = 0, n.milliseconds = 0, t ? r > n : a2 ? r < n : (o.start ? +s >= +r : +s > +r) && (o.end ? +s <= +n : +s < +n);
|
|
1710
1556
|
}
|
|
1711
1557
|
function _2(e, { zoneTime: r = false, formatStr: n, moreOptions: t } = {}) {
|
|
1712
1558
|
return t = r ? e.localeInfo.formatOptions + (t ? `,${t}` : "") : g.formatOptions + (t ? `,${t}` : ""), r ? (e.localeInfo || (e.localeInfo = g), M2(e, n, t)) : Ue2(e, n, t);
|
|
@@ -1716,26 +1562,26 @@ ${r}`), g2;
|
|
|
1716
1562
|
return n = (n || "").startsWith("+") ? `${t.localeInfo.formatOptions},${n.slice(1)}` : n || t.localeInfo.formatOptions, M2(t, r, n);
|
|
1717
1563
|
}
|
|
1718
1564
|
function Te2(e, r) {
|
|
1719
|
-
let n =
|
|
1565
|
+
let n = ge2({ start: e, end: r || e });
|
|
1720
1566
|
return parseInt(`${n.sign}${n.diffInDays}`);
|
|
1721
1567
|
}
|
|
1722
1568
|
function G2(e, r = false) {
|
|
1723
|
-
let { locale: n, timeZone: t } = r ? e.localeInfo : g,
|
|
1569
|
+
let { locale: n, timeZone: t } = r ? e.localeInfo : g, a2 = se2(n, t), o = e.format("MM|WD", a2).split("|");
|
|
1724
1570
|
return { locale: n, timeZone: t, monthName: o[0], dayName: o[1], dayNames: ae2(n), monthNames: Y2(n) };
|
|
1725
1571
|
}
|
|
1726
1572
|
function B2(e, r = false) {
|
|
1727
|
-
let [n, t,
|
|
1728
|
-
return Object.freeze(
|
|
1573
|
+
let [n, t, a2, o] = U2(e, r), u = { values4Timezone: r ? g.timeZone : e.timeZone, hours: n, minutes: t, seconds: a2, milliseconds: o };
|
|
1574
|
+
return Object.freeze(u);
|
|
1729
1575
|
}
|
|
1730
1576
|
function U2(e, r = false) {
|
|
1731
1577
|
let t = `l:en-CA,${r ? `tz:${g.timeZone}` : `tz:${e.timeZone}`},hrc:23,ts:medium`;
|
|
1732
1578
|
return e.format("", t).split(/:/).map(Number).concat(e.getMilliseconds());
|
|
1733
1579
|
}
|
|
1734
1580
|
function J2(e, r) {
|
|
1735
|
-
let n = r ? `tz:${g.timeZone}` : `,tz:${e.timeZone}`, [t,
|
|
1736
|
-
|
|
1581
|
+
let n = r ? `tz:${g.timeZone}` : `,tz:${e.timeZone}`, [t, a2, o] = e.format("yyyy-mm-dd", n).split(/-/).map(Number);
|
|
1582
|
+
a2 -= 1;
|
|
1737
1583
|
let s = r ? g.timeZone : e.timeZone;
|
|
1738
|
-
return Object.freeze({ values4Timezone: s, year: t, month:
|
|
1584
|
+
return Object.freeze({ values4Timezone: s, year: t, month: a2, date: o });
|
|
1739
1585
|
}
|
|
1740
1586
|
function K2(e, r = true) {
|
|
1741
1587
|
if (r) return [e.getFullYear(), e.getMonth(), e.getDate()];
|
|
@@ -1752,12 +1598,12 @@ ${r}`), g2;
|
|
|
1752
1598
|
}
|
|
1753
1599
|
function xe2(e, r) {
|
|
1754
1600
|
let n = e.toString().match(/GMT([+-])\d+/)?.[0]?.slice(3) ?? "+0000", t = r.toString().match(/GMT([+-])\d+/)?.[0]?.slice(3) ?? "+0000";
|
|
1755
|
-
return n = A2(n.slice(0, 3) + ":" + n.slice(-2), true), t = A2(t.slice(0, 3) + ":" + t.slice(-2), true), [-n[0] + t[0], -n[1] + t[1]].map((
|
|
1601
|
+
return n = A2(n.slice(0, 3) + ":" + n.slice(-2), true), t = A2(t.slice(0, 3) + ":" + t.slice(-2), true), [-n[0] + t[0], -n[1] + t[1]].map((a2) => n[0] < 0 ? -a2 : a2);
|
|
1756
1602
|
}
|
|
1757
1603
|
function R2({ start: e, end: r } = {}) {
|
|
1758
1604
|
r || (r = e.clone), r?.clone || (r = f(r, { timeZone: e.timeZone })), e = f(fe2(e, e.timeZone), { timeZone: e.timeZone }), r = f(fe2(r, r.timeZone), { timeZone: r.timeZone });
|
|
1759
|
-
let n =
|
|
1760
|
-
return n.timeZonesOffsetDifference = n.sign.length < 1 || o + s === 0 ? `Offsets of ${e.timeZone} and ${r.timeZone} are equal` : `${e.timeZone} is ${
|
|
1605
|
+
let n = ge2({ start: e, end: r, diffs: { timeZoneStart: e.timeZone, timeZoneEnd: r.timeZone } }), t = xe2(r, e), a2 = n.sign.startsWith("-") ? "ahead of" : "behind", [o, s] = t.map((i) => Math.abs(i)), [u, c] = [`${o} ${C2(o, "hour")}`, `${s} ${C2(s, "minute")}`];
|
|
1606
|
+
return n.timeZonesOffsetDifference = n.sign.length < 1 || o + s === 0 ? `Offsets of ${e.timeZone} and ${r.timeZone} are equal` : `${e.timeZone} is ${u}${s > 0 ? ` and ${c}` : ""} ${a2} ${r.timeZone}`, n;
|
|
1761
1607
|
}
|
|
1762
1608
|
function X2(e, r) {
|
|
1763
1609
|
r = String(r).toLowerCase() === "utc" || r.timeZone === "UTC" ? e.clone.relocate({ timeZone: "UTC" }) : f(e.value, { timeZone: r.timeZone || g.timeZone });
|
|
@@ -1767,29 +1613,29 @@ ${r}`), g2;
|
|
|
1767
1613
|
function ce2(e, r = 2) {
|
|
1768
1614
|
return `${e}`.padStart(r, "0");
|
|
1769
1615
|
}
|
|
1770
|
-
function
|
|
1616
|
+
function C2(e, r) {
|
|
1771
1617
|
return `${r}${e > 1 || e === 0 ? "s" : ""}`;
|
|
1772
1618
|
}
|
|
1773
1619
|
function je2(e) {
|
|
1774
1620
|
if (/00:00/.test(e)) return "no time diffence to";
|
|
1775
|
-
let r = e.slice(1).split(":").map(Number), [n, t] = r,
|
|
1776
|
-
return t > 0 ? `${n} ${
|
|
1621
|
+
let r = e.slice(1).split(":").map(Number), [n, t] = r, a2 = C2(n, "hour"), o = C2(t, "minute"), s = e.startsWith("+");
|
|
1622
|
+
return t > 0 ? `${n} ${a2} and ${t} ${o} ${s ? "ahead of" : "behind"}` : `${n} ${a2} ${s ? "ahead of" : "behind"}`;
|
|
1777
1623
|
}
|
|
1778
1624
|
function me2(e, r, n) {
|
|
1779
1625
|
return e.clone.format(r, n || e.localeInfo.formatOptions);
|
|
1780
1626
|
}
|
|
1781
|
-
function
|
|
1627
|
+
function pe2(e, { withFormat: r, withFormatOptions: n, local: t = false } = {}) {
|
|
1782
1628
|
if (r) return t ? me2(e, r, $D.localeInformation.formatOptions) : me2(e, r, n);
|
|
1783
|
-
let
|
|
1784
|
-
return
|
|
1629
|
+
let a2 = e.clone.relocate({ locale: "en" }), o = t ? g.formatOptions : a2.localeInfo.formatOptions, u = `wd M dd yyyy hh:mmi:ss ${a2.format("tz", o + ",tzn:longOffset").replace(":", "")} (tz)`;
|
|
1630
|
+
return a2.format(u, o + ",tzn:long, hrc:23");
|
|
1785
1631
|
}
|
|
1786
1632
|
function ee2(e, r = false) {
|
|
1787
1633
|
let n = Intl.DateTimeFormat("en", { timeZone: r ? e.timeZone : g.timeZone, weekday: "short" });
|
|
1788
|
-
return
|
|
1634
|
+
return ye2(n.format(e));
|
|
1789
1635
|
}
|
|
1790
1636
|
function $e2(e) {
|
|
1791
|
-
let r = g, n = e.localeInfo, t = e.clone.relocate({ locale: r.locale, timeZone: r.timeZone }),
|
|
1792
|
-
return n.timeZone !== r.timeZone && (m.locales.remote = { locale:
|
|
1637
|
+
let r = g, n = e.localeInfo, t = e.clone.relocate({ locale: r.locale, timeZone: r.timeZone }), a2 = e.offsetFrom(t), o = t.offsetFrom(e), s = r, u = n, c = e.format("hh:mmi:ss dp", `hrc:12,tz:${e.timeZone}`), i = t.format("hh:mmi:ss dp", `hrc:12,tz:${t.timeZone}`), m = { note: "'user' are values for your locale/timeZone, 'remote' (if applicable) idem for the instance", locales: { user: { locale: s.locale, timeZone: s.timeZone } }, dateTime: { user: { ...e.dateTime, monthName: t.monthName, weekdayNr: t.day, weekdayName: t.dayName, dayPeriodTime: i, hasDST: t.hasDST, DSTActive: t.DSTActive, offsetFromRemote: a2.offset, string: t.toString() } }, offset: { fromUTC: e.UTC.offsetFrom(e).offsetText } };
|
|
1638
|
+
return n.timeZone !== r.timeZone && (m.locales.remote = { locale: u.locale, timeZone: u.timeZone }, m.dateTime.remote = { ...e.zoneDateTime, monthName: e.zoneNames.monthName, weekdayNr: ee2(e, true), weekdayName: e.zoneNames.dayName, dayPeriodTime: c, hasDST: e.hasDST, DSTActive: e.DSTActive, offsetFromUser: o.offset, string: e.toString() }, m.offset.fromUserTime = o.offsetText), m;
|
|
1793
1639
|
}
|
|
1794
1640
|
function O2(e, r = true) {
|
|
1795
1641
|
if (r) return [e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()];
|
|
@@ -1802,29 +1648,29 @@ ${r}`), g2;
|
|
|
1802
1648
|
function L2(e, r) {
|
|
1803
1649
|
r = p({ locale: r || e.localeInfo.locale }).locale;
|
|
1804
1650
|
let n = e.clone.relocate({ locale: r });
|
|
1805
|
-
return n.date = { date: 1 }, [n].concat([...Array(te2(n) - 1)].map((t,
|
|
1651
|
+
return n.date = { date: 1 }, [n].concat([...Array(te2(n) - 1)].map((t, a2) => n.clone.add(`${a2 + 1} days`)));
|
|
1806
1652
|
}
|
|
1807
1653
|
function x(e, { day: r, next: n = false, preserveTodayWhenEqual: t = false } = {}) {
|
|
1808
1654
|
r = r?.toLowerCase() || "-";
|
|
1809
|
-
let
|
|
1810
|
-
if (
|
|
1655
|
+
let a2 = ye2(r);
|
|
1656
|
+
if (a2 < 0) return console.error(`[TickTock instance].next/previous invalid day value ${r}`), e.clone;
|
|
1811
1657
|
let o = n ? 1 : -1, s = f(new Date(...e.dateTimeValues), e.localeInfo);
|
|
1812
|
-
return t &&
|
|
1658
|
+
return t && a2 === s.day ? s : Pe2(s.addDays(n ? 1 : -1), a2, o);
|
|
1813
1659
|
}
|
|
1814
1660
|
function Pe2(e, r, n) {
|
|
1815
|
-
function t(
|
|
1661
|
+
function t(a2) {
|
|
1816
1662
|
switch (true) {
|
|
1817
|
-
case
|
|
1818
|
-
return
|
|
1663
|
+
case a2.day === r:
|
|
1664
|
+
return a2;
|
|
1819
1665
|
default:
|
|
1820
|
-
return t(
|
|
1666
|
+
return t(a2.add(`${n} days`));
|
|
1821
1667
|
}
|
|
1822
1668
|
}
|
|
1823
1669
|
return t(e);
|
|
1824
1670
|
}
|
|
1825
|
-
function
|
|
1826
|
-
let { locale: t, timeZone:
|
|
1827
|
-
return r ? new Date(e).toLocaleDateString(t, { timeZone:
|
|
1671
|
+
function F(e, { dateOnly: r = false, timeOnly: n = false } = {}) {
|
|
1672
|
+
let { locale: t, timeZone: a2 } = e.localeInfo;
|
|
1673
|
+
return r ? new Date(e).toLocaleDateString(t, { timeZone: a2 }) : n ? new Date(e).toLocaleTimeString(t, { timeZone: a2 }) : new Date(e).toLocaleString(t, { timeZone: a2 });
|
|
1828
1674
|
}
|
|
1829
1675
|
function fe2(e, r) {
|
|
1830
1676
|
let n = { timeZone: r, hourCycle: "h23" };
|
|
@@ -1833,8 +1679,8 @@ ${r}`), g2;
|
|
|
1833
1679
|
function v2(e, { year: r, month: n, date: t } = {}) {
|
|
1834
1680
|
return S(r) && e.setFullYear(parseInt(r)), S(t) && e.setDate(parseInt(t)), S(n) && e.setMonth(parseInt(n)), e;
|
|
1835
1681
|
}
|
|
1836
|
-
function I2(e, { hours: r, minutes: n, seconds: t, milliseconds:
|
|
1837
|
-
return S(r) && e.setHours(parseInt(r)), S(n) && e.setMinutes(parseInt(n)), S(t) && e.setSeconds(parseInt(t)), S(
|
|
1682
|
+
function I2(e, { hours: r, minutes: n, seconds: t, milliseconds: a2 } = {}) {
|
|
1683
|
+
return S(r) && e.setHours(parseInt(r)), S(n) && e.setMinutes(parseInt(n)), S(t) && e.setSeconds(parseInt(t)), S(a2) && e.setMilliseconds(parseInt(a2)), e;
|
|
1838
1684
|
}
|
|
1839
1685
|
function we2(e) {
|
|
1840
1686
|
return e?.constructor === Date || e?.value;
|
|
@@ -1861,14 +1707,14 @@ ${r}`), g2;
|
|
|
1861
1707
|
}
|
|
1862
1708
|
function j2(e, r) {
|
|
1863
1709
|
r = r || e?.timeZone || g.timeZone, e = e?.value ? e : e?.constructor === Date ? f(e, { timeZone: r }) : f({ timeZone: r });
|
|
1864
|
-
let n = e.year || e.getFullYear(), t = de2(new Date(n, 0, 1), r),
|
|
1865
|
-
return t !==
|
|
1710
|
+
let n = e.year || e.getFullYear(), t = de2(new Date(n, 0, 1), r), a2 = de2(new Date(n, 5, 1), r);
|
|
1711
|
+
return t !== a2;
|
|
1866
1712
|
}
|
|
1867
1713
|
function P2(e, r) {
|
|
1868
1714
|
return r = r || e?.timeZone || g.timeZone, e = e?.hasDST ? e : e?.constructor === Date ? f(e, { timeZone: r }) : f({ timeZone: r }), e.hasDST ? !/standard/i.test(e.toString()) : false;
|
|
1869
1715
|
}
|
|
1870
|
-
function Ze2(e, { locale: r, timeZone: n, l: t, tz:
|
|
1871
|
-
return e.localeInfo = p({ locale: t || r || e.l || e.locale, timeZone:
|
|
1716
|
+
function Ze2(e, { locale: r, timeZone: n, l: t, tz: a2 } = {}) {
|
|
1717
|
+
return e.localeInfo = p({ locale: t || r || e.l || e.locale, timeZone: a2 || n || e.tz || e.timeZone }), e;
|
|
1872
1718
|
}
|
|
1873
1719
|
function be2(e, r) {
|
|
1874
1720
|
return we2(r) && (e = f(r.value || r, r.localeInfo || e.localeInfo)), e;
|
|
@@ -1900,10 +1746,10 @@ ${r}`), g2;
|
|
|
1900
1746
|
}
|
|
1901
1747
|
var E = Ee2;
|
|
1902
1748
|
function Ee2({ localeInfo: e, customMethods: r, dateValue: n } = {}) {
|
|
1903
|
-
let t,
|
|
1749
|
+
let t, a2 = { add(...o) {
|
|
1904
1750
|
return H2(t, ...o);
|
|
1905
|
-
}, between({ start: o, end: s, include:
|
|
1906
|
-
return W2(t, { start: o, end: s, include:
|
|
1751
|
+
}, between({ start: o, end: s, include: u } = {}) {
|
|
1752
|
+
return W2(t, { start: o, end: s, include: u });
|
|
1907
1753
|
}, cloneWith(o) {
|
|
1908
1754
|
return re2(t, o);
|
|
1909
1755
|
}, daysUntil(o) {
|
|
@@ -1930,32 +1776,32 @@ ${r}`), g2;
|
|
|
1930
1776
|
return X2(t, o);
|
|
1931
1777
|
}, previous(o, s) {
|
|
1932
1778
|
return x(t, { day: o, next: false, preserveTodayWhenEqual: !!s });
|
|
1933
|
-
}, relocate({ locale: o, timeZone: s, l:
|
|
1934
|
-
return Ze2(t, { locale: o, timeZone: s, l:
|
|
1779
|
+
}, relocate({ locale: o, timeZone: s, l: u, tz: c } = {}) {
|
|
1780
|
+
return Ze2(t, { locale: o, timeZone: s, l: u, tz: c });
|
|
1935
1781
|
}, revalue(o) {
|
|
1936
1782
|
return t = be2(t, o), t;
|
|
1937
|
-
}, setDateValues({ year: o, month: s, date:
|
|
1938
|
-
return v2(t, { year: o, month: s, date:
|
|
1939
|
-
}, setTimeValues({ hours: o, minutes: s, seconds:
|
|
1940
|
-
return I2(t, { hours: o, minutes: s, seconds:
|
|
1783
|
+
}, setDateValues({ year: o, month: s, date: u } = {}) {
|
|
1784
|
+
return v2(t, { year: o, month: s, date: u });
|
|
1785
|
+
}, setTimeValues({ hours: o, minutes: s, seconds: u, milliseconds: c } = {}) {
|
|
1786
|
+
return I2(t, { hours: o, minutes: s, seconds: u, milliseconds: c });
|
|
1941
1787
|
}, subtract(...o) {
|
|
1942
1788
|
return H2(t, "subtract," + o.join(","));
|
|
1943
1789
|
}, toArray(o = false) {
|
|
1944
1790
|
return O2(t, o);
|
|
1945
|
-
}, toString({ template: o, formatOptions: s, local:
|
|
1946
|
-
return
|
|
1791
|
+
}, toString({ template: o, formatOptions: s, local: u } = {}) {
|
|
1792
|
+
return pe2(t, { withFormat: o, withFormatOptions: s, local: u });
|
|
1947
1793
|
}, values(o = false) {
|
|
1948
1794
|
return o ? t.dateTime : t.zoneDateTime;
|
|
1949
1795
|
}, zoneFormat(o, s) {
|
|
1950
1796
|
return _2(t, { zoneTime: true, formatStr: o, moreOptions: s });
|
|
1951
|
-
}, set date({ year: o, month: s, date:
|
|
1952
|
-
v2(t, { year: o, month: s, date:
|
|
1797
|
+
}, set date({ year: o, month: s, date: u }) {
|
|
1798
|
+
v2(t, { year: o, month: s, date: u });
|
|
1953
1799
|
}, set dateNr(o) {
|
|
1954
1800
|
v2(t, { date: o });
|
|
1955
1801
|
}, set hours(o) {
|
|
1956
1802
|
I2(t, { hours: o });
|
|
1957
|
-
}, set localeInfo({ locale: o, timeZone: s, l:
|
|
1958
|
-
e = z2({ locale: o, timeZone: s, l:
|
|
1803
|
+
}, set localeInfo({ locale: o, timeZone: s, l: u, tz: c }) {
|
|
1804
|
+
e = z2({ locale: o, timeZone: s, l: u, tz: c });
|
|
1959
1805
|
}, set milliseconds(o) {
|
|
1960
1806
|
I2(t, { milliseconds: `${o}` });
|
|
1961
1807
|
}, set minutes(o) {
|
|
@@ -1964,8 +1810,8 @@ ${r}`), g2;
|
|
|
1964
1810
|
v2(t, { month: o });
|
|
1965
1811
|
}, set seconds(o) {
|
|
1966
1812
|
I2(t, { seconds: o });
|
|
1967
|
-
}, set time({ hours: o, minutes: s, seconds:
|
|
1968
|
-
I2(t, { hours: o, minutes: s, seconds:
|
|
1813
|
+
}, set time({ hours: o, minutes: s, seconds: u, milliseconds: c }) {
|
|
1814
|
+
I2(t, { hours: o, minutes: s, seconds: u, milliseconds: c });
|
|
1969
1815
|
}, set year(o) {
|
|
1970
1816
|
v2(t, { year: o });
|
|
1971
1817
|
}, get age() {
|
|
@@ -2003,17 +1849,17 @@ ${r}`), g2;
|
|
|
2003
1849
|
}, get ISO() {
|
|
2004
1850
|
return t.toISOString();
|
|
2005
1851
|
}, get local() {
|
|
2006
|
-
return
|
|
1852
|
+
return F(t);
|
|
2007
1853
|
}, get localDate() {
|
|
2008
|
-
return
|
|
1854
|
+
return F(t, { dateOnly: true });
|
|
2009
1855
|
}, get locale() {
|
|
2010
1856
|
return (e || z2()).locale;
|
|
2011
1857
|
}, get localeInfo() {
|
|
2012
1858
|
return e;
|
|
2013
1859
|
}, get localeString() {
|
|
2014
|
-
return
|
|
1860
|
+
return F(t);
|
|
2015
1861
|
}, get localTime() {
|
|
2016
|
-
return
|
|
1862
|
+
return F(t, { timeOnly: true });
|
|
2017
1863
|
}, get milliseconds() {
|
|
2018
1864
|
return t.getMilliseconds();
|
|
2019
1865
|
}, get minutes() {
|
|
@@ -2091,7 +1937,7 @@ ${r}`), g2;
|
|
|
2091
1937
|
}, get zoneArray() {
|
|
2092
1938
|
return O2(t, false);
|
|
2093
1939
|
} };
|
|
2094
|
-
return !e && !n ?
|
|
1940
|
+
return !e && !n ? a2 : (a2.localeInfo = e || z2(), t = new Proxy(n, Ve2(a2)), Object.entries(Object.getOwnPropertyDescriptors(ue2(t, r))).forEach(([o, s]) => Object.defineProperty(a2, o, s)), Object.freeze(t));
|
|
2095
1941
|
}
|
|
2096
1942
|
function Ve2(e) {
|
|
2097
1943
|
return { get(r, n) {
|
|
@@ -2110,10 +1956,10 @@ ${r}`), g2;
|
|
|
2110
1956
|
}
|
|
2111
1957
|
function He2({ year: e, locale: r } = {}) {
|
|
2112
1958
|
e = S(e) ? parseInt(e) : (/* @__PURE__ */ new Date()).getFullYear();
|
|
2113
|
-
let n = { year: e, calendar: {} }, t = Y2().long.map((
|
|
2114
|
-
for (let
|
|
2115
|
-
let o = f.from(e,
|
|
2116
|
-
n.calendar[t[
|
|
1959
|
+
let n = { year: e, calendar: {} }, t = Y2().long.map((a2) => a2.toLowerCase());
|
|
1960
|
+
for (let a2 = 0; a2 < 12; a2 += 1) {
|
|
1961
|
+
let o = f.from(e, a2, 1);
|
|
1962
|
+
n.calendar[t[a2]] = L2(o, r);
|
|
2117
1963
|
}
|
|
2118
1964
|
return n;
|
|
2119
1965
|
}
|
|
@@ -2168,8 +2014,8 @@ ${r}`), g2;
|
|
|
2168
2014
|
}
|
|
2169
2015
|
}
|
|
2170
2016
|
function Ge2({ timeZoneDate: e, timeZoneID: r, userTimeZoneID: n } = {}) {
|
|
2171
|
-
let t = { timeZone: p({ timeZone: r }).timeZone },
|
|
2172
|
-
return { remoteTimezone: t.timeZone, userTimezone:
|
|
2017
|
+
let t = { timeZone: p({ timeZone: r }).timeZone }, a2 = { timeZone: p({ timeZone: n || "" }).timeZone }, o = f(e, t), s = f(e, a2), u = s.differenceTo(o), c = o.offsetFrom(s).offset, [i, m] = A2(c, true), T3 = s.clone.add(`${i} hours, ${m} minutes`), y = u.equalDates ? "No difference" : `Time offset ${c}: ${a2.timeZone} is ${u.clean} ${i < 0 ? "behind" : "ahead of"} ${t.timeZone}`;
|
|
2018
|
+
return { remoteTimezone: t.timeZone, userTimezone: a2.timeZone, timeDifference: y, result: { [t.timeZone.replace(/\//, "_")]: f(e).toString({ template: "yyyy/mm/dd hh:mmi:ss", formatOptions: "hrc:23" }), [a2.timeZone.replace(/\//, "_")]: T3.toString({ template: "yyyy/mm/dd hh:mmi:ss", formatOptions: "hrc:23" }) } };
|
|
2173
2019
|
}
|
|
2174
2020
|
function S(e) {
|
|
2175
2021
|
return !Number.isNaN(parseInt(e));
|
|
@@ -2210,11 +2056,11 @@ ${r}`), g2;
|
|
|
2210
2056
|
}
|
|
2211
2057
|
function ue2(e, r) {
|
|
2212
2058
|
let n = Be2(e);
|
|
2213
|
-
for (let [t,
|
|
2214
|
-
let o =
|
|
2215
|
-
return
|
|
2216
|
-
}, enumerable: o } : { value(...
|
|
2217
|
-
return
|
|
2059
|
+
for (let [t, a2] of Object.entries(r || {})) {
|
|
2060
|
+
let o = a2.enumerable, s = a2.isGetter ? { get() {
|
|
2061
|
+
return a2.method(e);
|
|
2062
|
+
}, enumerable: o } : { value(...u) {
|
|
2063
|
+
return a2.method(e, ...u);
|
|
2218
2064
|
}, enumerable: o };
|
|
2219
2065
|
Object.defineProperty(n, t, s);
|
|
2220
2066
|
}
|
|
@@ -2235,27 +2081,27 @@ ${r}`), g2;
|
|
|
2235
2081
|
return e(n);
|
|
2236
2082
|
} }, fromUxTS: { value(n, t) {
|
|
2237
2083
|
n = S(n) ? parseInt(n) * 1e3 : void 0;
|
|
2238
|
-
let
|
|
2239
|
-
return f(
|
|
2084
|
+
let a2 = n ? new Date(n) : /* @__PURE__ */ new Date();
|
|
2085
|
+
return f(a2, t || g);
|
|
2240
2086
|
} }, hasDST: { value({ date: n, timeZone: t } = {}) {
|
|
2241
2087
|
return j2(n, t);
|
|
2242
2088
|
} }, DSTActive: { value({ date: n, timeZone: t } = {}) {
|
|
2243
2089
|
return P2(n, t);
|
|
2244
2090
|
} }, values: { value({ date: n, timeZone: t } = {}) {
|
|
2245
2091
|
n = n || n?.value || /* @__PURE__ */ new Date();
|
|
2246
|
-
let
|
|
2247
|
-
return
|
|
2248
|
-
} }, format: { value({ date: n, template: t, timeZone:
|
|
2092
|
+
let a2 = M2(n, "yyyy-m-d-h-mi-s", p({ timeZone: t }).formatOptions.concat(",hrc:23")).split("-").map(Number).concat(n.getMilliseconds());
|
|
2093
|
+
return a2[1] -= 1, a2;
|
|
2094
|
+
} }, format: { value({ date: n, template: t, timeZone: a2, locale: o, opts: s } = {}) {
|
|
2249
2095
|
n = n || n?.value || /* @__PURE__ */ new Date(), t = t?.constructor === String ? t : "yyyy/mm/dd hh:mmi:ss dp";
|
|
2250
|
-
let
|
|
2251
|
-
return
|
|
2252
|
-
} }, addCustom: { value({ name: n, method: t, enumerable:
|
|
2253
|
-
n?.constructor === String && t?.constructor === Function && t.length > 0 && (r[n] = { method: t, enumerable:
|
|
2096
|
+
let u = p({ timeZone: a2, locale: o }).formatOptions;
|
|
2097
|
+
return u += s ? `,${s}` : "", M2(n, t, u);
|
|
2098
|
+
} }, addCustom: { value({ name: n, method: t, enumerable: a2 = false, isGetter: o = false } = {}) {
|
|
2099
|
+
n?.constructor === String && t?.constructor === Function && t.length > 0 && (r[n] = { method: t, enumerable: a2, isGetter: o });
|
|
2254
2100
|
} }, validateLocaleInformation: { value: p }, timeAcrossZones: { value: Ge2 }, weeksInYear: { value(n) {
|
|
2255
2101
|
return k2(n, 31);
|
|
2256
2102
|
} }, keys: { get() {
|
|
2257
|
-
let n = Object.fromEntries(Object.entries(r).filter(([
|
|
2258
|
-
return [...Object.keys(E()), ...Object.keys(ue2()), ...Object.keys(n)].sort((
|
|
2103
|
+
let n = Object.fromEntries(Object.entries(r).filter(([a2, o]) => o.enumerable === true));
|
|
2104
|
+
return [...Object.keys(E()), ...Object.keys(ue2()), ...Object.keys(n)].sort((a2, o) => a2.localeCompare(o));
|
|
2259
2105
|
} } }), e;
|
|
2260
2106
|
}
|
|
2261
2107
|
var Oe2 = {};
|
|
@@ -2275,7 +2121,7 @@ ${r}`), g2;
|
|
|
2275
2121
|
);
|
|
2276
2122
|
}
|
|
2277
2123
|
function createRegExpStringFromInput(regExStr, ...cleanedArgs) {
|
|
2278
|
-
return !hasLength(cleanedArgs) ? regExStr.raw.join(``) : regExStr.raw.reduce((
|
|
2124
|
+
return !hasLength(cleanedArgs) ? regExStr.raw.join(``) : regExStr.raw.reduce((a2, v3, i) => a2.concat(cleanedArgs[i - 1] || ``).concat(v3), ``);
|
|
2279
2125
|
}
|
|
2280
2126
|
function maybeFlags(...args) {
|
|
2281
2127
|
const flags = cleanupFlags(getFlags(args.at(-1)));
|
|
@@ -2356,31 +2202,31 @@ ${r}`), g2;
|
|
|
2356
2202
|
case !!RegExp.escape:
|
|
2357
2203
|
return RegExp.escape(string2Escape);
|
|
2358
2204
|
default:
|
|
2359
|
-
return (`\\x${string2Escape.at(0)}` + string2Escape.slice(1).replace(/\p{S}|\p{P}/gu, (
|
|
2205
|
+
return (`\\x${string2Escape.at(0)}` + string2Escape.slice(1).replace(/\p{S}|\p{P}/gu, (a2) => `\\${a2}`)).replace(/ |\\x /g, `\\x20`);
|
|
2360
2206
|
}
|
|
2361
2207
|
}
|
|
2362
2208
|
function cleanup(str) {
|
|
2363
|
-
return str.replace(/\/\*(?:[^*]|\*+[^*\/])*\*+\/|(?<!:|\\\|')\/\/.*/gm, ``).replace(/\s/g, ``).trim().replace(/<!([^>]\d+)>/g, (
|
|
2209
|
+
return str.replace(/\/\*(?:[^*]|\*+[^*\/])*\*+\/|(?<!:|\\\|')\/\/.*/gm, ``).replace(/\s/g, ``).trim().replace(/<!([^>]\d+)>/g, (a2, b2) => String.fromCharCode(+b2) ?? a2);
|
|
2364
2210
|
}
|
|
2365
2211
|
|
|
2366
2212
|
// ../Resource/Externals/splat.min.js
|
|
2367
2213
|
var { IS: b, maybe: E2, $Wrap: X3, isNothing: j3, xProxy: h, addSymbolicExtensions: T2 } = Y3({ useSymbolicExtensions: false });
|
|
2368
2214
|
function Y3(i = {}) {
|
|
2369
|
-
let { useSymbolicExtensions:
|
|
2370
|
-
return
|
|
2371
|
-
function e(c, ...
|
|
2215
|
+
let { useSymbolicExtensions: a2 } = i, { shouldbeIsSingleObject: m, ISOneOf: g2, isExcept: P3, verifyNothingness: d, xProxy: x2, determineType: N3, addSymbolicExtensions: y, maybe: S2, $Wrap: O3 } = _3(e, a2);
|
|
2216
|
+
return a2 && y(), { IS: e, maybe: S2, $Wrap: O3, isNothing: d, xProxy: x2, addSymbolicExtensions: y };
|
|
2217
|
+
function e(c, ...u) {
|
|
2372
2218
|
let l = typeof c == "symbol" ? Symbol.isSymbol : c;
|
|
2373
2219
|
switch (true) {
|
|
2374
|
-
case !!S2({ trial: (f2) => "isTypes" in (
|
|
2375
|
-
return m(c,
|
|
2220
|
+
case !!S2({ trial: (f2) => "isTypes" in (u?.[0] ?? {}) }):
|
|
2221
|
+
return m(c, u[0]);
|
|
2376
2222
|
default:
|
|
2377
|
-
return
|
|
2223
|
+
return u.length > 1 ? g2(l, ...u) : N3(c, ...u);
|
|
2378
2224
|
}
|
|
2379
2225
|
}
|
|
2380
2226
|
}
|
|
2381
|
-
function _3(i,
|
|
2382
|
-
let { SymbolAndCustomProxyFactory: m, maybeFactory: g2, WrapAnyFactory: P3, verifyNothingness: d, determineType: x2 } = w2(i, e), { xProxy: N3, addSymbolicExtensions: y } = m(i, e,
|
|
2383
|
-
return Object.freeze({ shouldbeIsSingleObject: c, ISOneOf:
|
|
2227
|
+
function _3(i, a2) {
|
|
2228
|
+
let { SymbolAndCustomProxyFactory: m, maybeFactory: g2, WrapAnyFactory: P3, verifyNothingness: d, determineType: x2 } = w2(i, e), { xProxy: N3, addSymbolicExtensions: y } = m(i, e, a2), [S2, O3] = [g2(), P3(i, e)];
|
|
2229
|
+
return Object.freeze({ shouldbeIsSingleObject: c, ISOneOf: u, isExcept: f2, verifyNothingness: d, xProxy: N3, determineType: x2, addSymbolicExtensions: y, maybe: S2, $Wrap: O3 });
|
|
2384
2230
|
function e(r) {
|
|
2385
2231
|
return r?.[Symbol.proxy] ?? i(r);
|
|
2386
2232
|
}
|
|
@@ -2394,7 +2240,7 @@ ${r}`), g2;
|
|
|
2394
2240
|
return i(r, ...[t.isTypes].flat());
|
|
2395
2241
|
}
|
|
2396
2242
|
}
|
|
2397
|
-
function
|
|
2243
|
+
function u(r, ...t) {
|
|
2398
2244
|
return t.some((n) => i(r, n));
|
|
2399
2245
|
}
|
|
2400
2246
|
function l(r, { defaultValue: t, isTypes: n = [void 0], notTypes: o } = {}) {
|
|
@@ -2405,8 +2251,8 @@ ${r}`), g2;
|
|
|
2405
2251
|
}
|
|
2406
2252
|
}
|
|
2407
2253
|
function w2() {
|
|
2408
|
-
let i = { IS: "toa.is", TYPE: "toa.type", IS_SYMBOL: "toa.isASymbol", PROXY: "toa.proxy" },
|
|
2409
|
-
return Object.freeze({ SymbolAndCustomProxyFactory: g2, maybeFactory: l, WrapAnyFactory:
|
|
2254
|
+
let i = { IS: "toa.is", TYPE: "toa.type", IS_SYMBOL: "toa.isASymbol", PROXY: "toa.proxy" }, a2 = { NAN: "NaN", INFINITY: "Infinity", BOOLEAN: "Boolean", OBJECT: "Object", PROXY_PREFIX: "Proxy (" };
|
|
2255
|
+
return Object.freeze({ SymbolAndCustomProxyFactory: g2, maybeFactory: l, WrapAnyFactory: u, verifyNothingness: f2, determineType: y });
|
|
2410
2256
|
function m(r, t) {
|
|
2411
2257
|
Symbol.is || (Symbol.is = Symbol.for(i.IS), Symbol.type = Symbol.for(i.TYPE), Object.defineProperties(Object.prototype, { [Symbol.type]: { get() {
|
|
2412
2258
|
return t(this);
|
|
@@ -2427,7 +2273,7 @@ ${r}`), g2;
|
|
|
2427
2273
|
function d(r, t) {
|
|
2428
2274
|
return Proxy = new r(r, { construct(n, o) {
|
|
2429
2275
|
let s = new n(...o);
|
|
2430
|
-
return Object.defineProperty(s, t, { value: `${
|
|
2276
|
+
return Object.defineProperty(s, t, { value: `${a2.PROXY_PREFIX}${P3(o[0])})` }), s;
|
|
2431
2277
|
} }), Proxy;
|
|
2432
2278
|
}
|
|
2433
2279
|
function x2() {
|
|
@@ -2441,23 +2287,23 @@ ${r}`), g2;
|
|
|
2441
2287
|
}
|
|
2442
2288
|
function N3(r, ...t) {
|
|
2443
2289
|
let n = t.length < 1, o = r == null;
|
|
2444
|
-
return { noInput: o, noShouldbe: n, compareTo: !n && t[0], inputCTOR: !o && (r?.constructor || Object.getPrototypeOf(r)?.constructor), isNaN: Number.isNaN(r) || E2({ trial: (s) => String(r) ===
|
|
2290
|
+
return { noInput: o, noShouldbe: n, compareTo: !n && t[0], inputCTOR: !o && (r?.constructor || Object.getPrototypeOf(r)?.constructor), isNaN: Number.isNaN(r) || E2({ trial: (s) => String(r) === a2.NAN }), isInfinity: E2({ trial: (s) => String(r) }) === a2.INFINITY, shouldBeFirstElementIsNothing: !n && f2(t[0]) };
|
|
2445
2291
|
}
|
|
2446
2292
|
function y(r, ...t) {
|
|
2447
|
-
let { noInput: n, noShouldbe: o, compareTo: s, inputCTOR: A3, isNaN:
|
|
2293
|
+
let { noInput: n, noShouldbe: o, compareTo: s, inputCTOR: A3, isNaN: F2, isInfinity: v3, shouldBeFirstElementIsNothing: p2 } = N3(r, ...t);
|
|
2448
2294
|
switch (t = t.length && t[0], true) {
|
|
2449
2295
|
case p2:
|
|
2450
2296
|
return String(r) === String(s);
|
|
2451
2297
|
case (r?.[Symbol.proxy] && o):
|
|
2452
2298
|
return r[Symbol.proxy];
|
|
2453
|
-
case
|
|
2454
|
-
return o ?
|
|
2299
|
+
case F2:
|
|
2300
|
+
return o ? a2.NAN : String(s) === String(r);
|
|
2455
2301
|
case v3:
|
|
2456
|
-
return o ?
|
|
2302
|
+
return o ? a2.INFINITY : String(s) === String(r);
|
|
2457
2303
|
case n:
|
|
2458
2304
|
return o ? String(r) : String(s) === String(r);
|
|
2459
2305
|
case A3 === Boolean:
|
|
2460
|
-
return o ?
|
|
2306
|
+
return o ? a2.BOOLEAN : A3 === t;
|
|
2461
2307
|
default:
|
|
2462
2308
|
return O3(r, t, o, S2(r, A3));
|
|
2463
2309
|
}
|
|
@@ -2478,8 +2324,8 @@ ${r}`), g2;
|
|
|
2478
2324
|
switch (true) {
|
|
2479
2325
|
case (!n && t === r || r?.[Symbol.proxy] && t === Proxy):
|
|
2480
2326
|
return true;
|
|
2481
|
-
case String(t) ===
|
|
2482
|
-
return String(r) ===
|
|
2327
|
+
case String(t) === a2.NAN:
|
|
2328
|
+
return String(r) === a2.NAN;
|
|
2483
2329
|
case (r?.[Symbol.toStringTag] && typeof t == "string"):
|
|
2484
2330
|
return String(t) === r[Symbol.toStringTag];
|
|
2485
2331
|
default:
|
|
@@ -2492,7 +2338,7 @@ ${r}`), g2;
|
|
|
2492
2338
|
function c(r, t, n) {
|
|
2493
2339
|
return E2({ trial: (o) => r instanceof t }) || t === n || t === Object.getPrototypeOf(n) || `${t?.name}` === n?.name;
|
|
2494
2340
|
}
|
|
2495
|
-
function
|
|
2341
|
+
function u(r, t) {
|
|
2496
2342
|
return function(n) {
|
|
2497
2343
|
let o = { get value() {
|
|
2498
2344
|
return n;
|
|
@@ -2524,10 +2370,10 @@ ${r}`), g2;
|
|
|
2524
2370
|
return n = t ? n || b(r, 1 / 0) || b(r, NaN) : n, n;
|
|
2525
2371
|
}
|
|
2526
2372
|
}
|
|
2527
|
-
var
|
|
2373
|
+
var C3 = I3();
|
|
2528
2374
|
var $2 = I3("");
|
|
2529
|
-
function I3(i,
|
|
2530
|
-
let { useSymbolicExtensions: m } =
|
|
2375
|
+
function I3(i, a2 = {}) {
|
|
2376
|
+
let { useSymbolicExtensions: m } = a2;
|
|
2531
2377
|
return i = b(i, String, Number) ? String(i) : void 0, m && L3(), function(e, ...c) {
|
|
2532
2378
|
return O3(e, S2(c));
|
|
2533
2379
|
};
|
|
@@ -2535,13 +2381,13 @@ ${r}`), g2;
|
|
|
2535
2381
|
return c && b(i, String, Number) ? String(i) : `{${e}}`;
|
|
2536
2382
|
}
|
|
2537
2383
|
function P3(e, c) {
|
|
2538
|
-
let
|
|
2539
|
-
return
|
|
2384
|
+
let u = e in c;
|
|
2385
|
+
return u && b(c[e], String, Number) ? String(c[e]) : g2(e, u);
|
|
2540
2386
|
}
|
|
2541
2387
|
function d(e) {
|
|
2542
2388
|
return (...c) => {
|
|
2543
|
-
let
|
|
2544
|
-
return P3(
|
|
2389
|
+
let u = c.find((l) => l.key);
|
|
2390
|
+
return P3(u ? u.key : "_", e);
|
|
2545
2391
|
};
|
|
2546
2392
|
}
|
|
2547
2393
|
function x2(e, c) {
|
|
@@ -2549,8 +2395,8 @@ ${r}`), g2;
|
|
|
2549
2395
|
}
|
|
2550
2396
|
function N3(e) {
|
|
2551
2397
|
let c = [];
|
|
2552
|
-
return Object.entries(e).forEach(([
|
|
2553
|
-
l.forEach((f2, r) => (c[r] ??= {}, c[r][
|
|
2398
|
+
return Object.entries(e).forEach(([u, l]) => {
|
|
2399
|
+
l.forEach((f2, r) => (c[r] ??= {}, c[r][u] = f2));
|
|
2554
2400
|
}), c;
|
|
2555
2401
|
}
|
|
2556
2402
|
function y(e) {
|
|
@@ -2560,13 +2406,13 @@ ${r}`), g2;
|
|
|
2560
2406
|
return y(e) ? N3(e[0]) : e;
|
|
2561
2407
|
}
|
|
2562
2408
|
function O3(e, c) {
|
|
2563
|
-
let
|
|
2564
|
-
return b(i, void 0) ?
|
|
2409
|
+
let u = c?.length ? c.filter((l) => b(l, Object)).map((l, f2) => x2(e, { ...l, index: f2 + 1 })).join("") : e;
|
|
2410
|
+
return b(i, void 0) ? u : u.replace(/\{[a-z_\d].+\}/gim, String(i));
|
|
2565
2411
|
}
|
|
2566
2412
|
}
|
|
2567
2413
|
function L3() {
|
|
2568
2414
|
return String.prototype[Symbol.for("interpolate")] || Object.defineProperties(String.prototype, { [Symbol.for("interpolate")]: { value(...i) {
|
|
2569
|
-
return
|
|
2415
|
+
return C3(this, ...i);
|
|
2570
2416
|
} }, [Symbol.for("interpolate$")]: { value(...i) {
|
|
2571
2417
|
return $2(this, ...i);
|
|
2572
2418
|
} } }), [Symbol.for("interpolate"), Symbol.for("interpolate$")];
|
|
@@ -2575,7 +2421,7 @@ ${r}`), g2;
|
|
|
2575
2421
|
// ../index.js
|
|
2576
2422
|
setDefaultStyling();
|
|
2577
2423
|
fixSBLinks2TopProblem();
|
|
2578
|
-
var splatModule = { interpolate:
|
|
2424
|
+
var splatModule = { interpolate: C3, interpolateClear: $2, addSymbolicStringExtensions: L3 };
|
|
2579
2425
|
function fixSBLinks2TopProblem() {
|
|
2580
2426
|
/stackblitz/i.test(location.href) && console.info(`\u2714 Stackblitz rewrites links to _top. The 'stackblitzhelpers' module fixed it.`);
|
|
2581
2427
|
document.addEventListener(`click`, (evt) => {
|
|
@@ -2589,20 +2435,20 @@ ${r}`), g2;
|
|
|
2589
2435
|
});
|
|
2590
2436
|
}
|
|
2591
2437
|
function logFactory(formatJSON = true) {
|
|
2592
|
-
const logContainer =
|
|
2438
|
+
const logContainer = yn(`<ul id="log2screen">`).first();
|
|
2593
2439
|
function logItem(top2 = false) {
|
|
2594
|
-
const where2PutIt = top2 ?
|
|
2440
|
+
const where2PutIt = top2 ? yn.at.start : yn.at.end;
|
|
2595
2441
|
return (content) => {
|
|
2596
2442
|
if (content?.isJQx) {
|
|
2597
|
-
return
|
|
2443
|
+
return yn.li(
|
|
2598
2444
|
content.data.get(`header`) ? { class: `head` } : ``,
|
|
2599
2445
|
content
|
|
2600
2446
|
).renderTo(logContainer, where2PutIt);
|
|
2601
2447
|
}
|
|
2602
|
-
content = !
|
|
2448
|
+
content = !yn.IS(content, String, Number, Symbol) ? tryJSON(content, formatJSON) : String(content);
|
|
2603
2449
|
const isHead = content.startsWith(`!!`);
|
|
2604
2450
|
content = isHead ? content.slice(2) : content;
|
|
2605
|
-
|
|
2451
|
+
yn.li(isHead ? { class: `head` } : ``, content).renderTo(logContainer, where2PutIt);
|
|
2606
2452
|
};
|
|
2607
2453
|
}
|
|
2608
2454
|
const [logLamda, logTopLambda] = [logItem(), logItem(true)];
|
|
@@ -2619,7 +2465,7 @@ ${r}`), g2;
|
|
|
2619
2465
|
}
|
|
2620
2466
|
}
|
|
2621
2467
|
function setDefaultStyling() {
|
|
2622
|
-
|
|
2468
|
+
yn.editCssRules(`li::marker{vertical-align:top;}`, `code{color:green;background-color:#eee;padding:2px;font-family:monospace;}`, `code.codeblock{display:block;padding:6px;border:1px solid #999;margin:0.5rem 0;background-color:#eee;white-space:pre-wrap;}`, `h3{marginTop:1.5rem;}`, `.thickBorder{border:5px solid green;borderWidth:5px;padding:0.5rem;display:inline-block;}`, `a.ExternalLink{text-decoration:none;color:rgb(0,0,238);background-color:#EEE;padding:3px;font-weight:bold;}`, `.cmmt{color:#888;}`, `.hidden{display:none;}`, `.attention{color:red; font-size:1.2em; font-weight:bold;}`, `#log2screen li{listStyle:'\\2713';paddingLeft:6px;margin:0.5rem 0 0 -1.2rem;font-family:monospace}`, `#log2screen li.head{list-style-type:none;font-weight:bold;margin-top:0.8rem;margin-bottom:-0.2rem;font-family:revert;}`, `.err{fontStyle:italic; color:red; }`, `a{text-decoration:none; font-weight:bold;}`, `a:hover{text-decoration:underline;}`, `a[target]:before,a.internalLink:before,a.externalLink:before{color:rgba(0,0,238,0.7);font-size:1.1rem;padding-right:2px;vertical-align:baseline;}`, `a[target="_blank"]:before,a.externalLink:before{content:'\\2197';}`, `a[data-top]:before,a.internalLink:before,a[target="_top"]:before{content:'\\21BA';}`);
|
|
2623
2469
|
}
|
|
2624
2470
|
return __toCommonJS(index_exports);
|
|
2625
2471
|
})();
|