japhy-custom-elements 1.0.13 → 1.0.15

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.
@@ -0,0 +1,435 @@
1
+ import { w as _, n as $, c as p, t as C, h as d, a as I, e as M, d as H, i as u, b as U, f as j, g as z, j as L, k as g, l as K, m as B, o as W, p as F, N as q, q as G } from "./index-DvApzQ7V.mjs";
2
+ import { C as Nt, a9 as wt, F as At, aa as Pt, S as Rt, T as Ot, r as Tt, s as yt, u as xt, v as Dt, x as Vt, y as Mt, z as Lt, A as Bt, B as $t, ab as It, D as Ht, E as Ut, G as jt, H as zt, ac as Kt, ad as Wt, ae as Ft, af as qt, I as Gt, ag as Xt, J as Jt, ah as Qt, K as Yt, ap as Zt, aq as kt, L as te, M as ee, O as se, P as ie, Q as oe, R as ne, U as re, V as ae, W as ce, X as le, Y as fe, Z as de, _ as he, $ as ue, ai as pe, a0 as me, aj as _e, ak as be, a1 as Se, a2 as ge, a3 as Ee, al as Ce, am as ve, a4 as Ne, ar as we, an as Ae, ao as Pe, a5 as Re, a6 as Oe, a7 as Te, a8 as ye } from "./index-DvApzQ7V.mjs";
3
+ var f = {};
4
+ const X = "http://www.w3.org/2000/svg", J = "http://www.w3.org/1998/Math/MathML", l = typeof document < "u" ? document : null, v = l && /* @__PURE__ */ l.createElement("template"), Q = {
5
+ insert: (e, t, s) => {
6
+ t.insertBefore(e, s || null);
7
+ },
8
+ remove: (e) => {
9
+ const t = e.parentNode;
10
+ t && t.removeChild(e);
11
+ },
12
+ createElement: (e, t, s, i) => {
13
+ const o = t === "svg" ? l.createElementNS(X, e) : t === "mathml" ? l.createElementNS(J, e) : s ? l.createElement(e, { is: s }) : l.createElement(e);
14
+ return e === "select" && i && i.multiple != null && o.setAttribute("multiple", i.multiple), o;
15
+ },
16
+ createText: (e) => l.createTextNode(e),
17
+ createComment: (e) => l.createComment(e),
18
+ setText: (e, t) => {
19
+ e.nodeValue = t;
20
+ },
21
+ setElementText: (e, t) => {
22
+ e.textContent = t;
23
+ },
24
+ parentNode: (e) => e.parentNode,
25
+ nextSibling: (e) => e.nextSibling,
26
+ querySelector: (e) => l.querySelector(e),
27
+ setScopeId(e, t) {
28
+ e.setAttribute(t, "");
29
+ },
30
+ // __UNSAFE__
31
+ // Reason: innerHTML.
32
+ // Static content here can only come from compiled templates.
33
+ // As long as the user only uses trusted templates, this is safe.
34
+ insertStaticContent(e, t, s, i, o, r) {
35
+ const n = s ? s.previousSibling : t.lastChild;
36
+ if (o && (o === r || o.nextSibling))
37
+ for (; t.insertBefore(o.cloneNode(!0), s), !(o === r || !(o = o.nextSibling)); )
38
+ ;
39
+ else {
40
+ v.innerHTML = i === "svg" ? `<svg>${e}</svg>` : i === "mathml" ? `<math>${e}</math>` : e;
41
+ const a = v.content;
42
+ if (i === "svg" || i === "mathml") {
43
+ const c = a.firstChild;
44
+ for (; c.firstChild; )
45
+ a.appendChild(c.firstChild);
46
+ a.removeChild(c);
47
+ }
48
+ t.insertBefore(a, s);
49
+ }
50
+ return [
51
+ // first
52
+ n ? n.nextSibling : t.firstChild,
53
+ // last
54
+ s ? s.previousSibling : t.lastChild
55
+ ];
56
+ }
57
+ }, Y = Symbol("_vtc");
58
+ function Z(e, t, s) {
59
+ const i = e[Y];
60
+ i && (t = (t ? [t, ...i] : [...i]).join(" ")), t == null ? e.removeAttribute("class") : s ? e.setAttribute("class", t) : e.className = t;
61
+ }
62
+ const N = Symbol("_vod"), k = Symbol("_vsh"), tt = Symbol(f.NODE_ENV !== "production" ? "CSS_VAR_TEXT" : ""), et = /(^|;)\s*display\s*:/;
63
+ function st(e, t, s) {
64
+ const i = e.style, o = g(s);
65
+ let r = !1;
66
+ if (s && !o) {
67
+ if (t)
68
+ if (g(t))
69
+ for (const n of t.split(";")) {
70
+ const a = n.slice(0, n.indexOf(":")).trim();
71
+ s[a] == null && m(i, a, "");
72
+ }
73
+ else
74
+ for (const n in t)
75
+ s[n] == null && m(i, n, "");
76
+ for (const n in s)
77
+ n === "display" && (r = !0), m(i, n, s[n]);
78
+ } else if (o) {
79
+ if (t !== s) {
80
+ const n = i[tt];
81
+ n && (s += ";" + n), i.cssText = s, r = et.test(s);
82
+ }
83
+ } else t && e.removeAttribute("style");
84
+ N in e && (e[N] = r ? i.display : "", e[k] && (i.display = "none"));
85
+ }
86
+ const it = /[^\\];\s*$/, w = /\s*!important$/;
87
+ function m(e, t, s) {
88
+ if (u(s))
89
+ s.forEach((i) => m(e, t, i));
90
+ else if (s == null && (s = ""), f.NODE_ENV !== "production" && it.test(s) && _(
91
+ `Unexpected semicolon at the end of '${t}' style value: '${s}'`
92
+ ), t.startsWith("--"))
93
+ e.setProperty(t, s);
94
+ else {
95
+ const i = ot(e, t);
96
+ w.test(s) ? e.setProperty(
97
+ d(i),
98
+ s.replace(w, ""),
99
+ "important"
100
+ ) : e[i] = s;
101
+ }
102
+ }
103
+ const A = ["Webkit", "Moz", "ms"], b = {};
104
+ function ot(e, t) {
105
+ const s = b[t];
106
+ if (s)
107
+ return s;
108
+ let i = p(t);
109
+ if (i !== "filter" && i in e)
110
+ return b[t] = i;
111
+ i = K(i);
112
+ for (let o = 0; o < A.length; o++) {
113
+ const r = A[o] + i;
114
+ if (r in e)
115
+ return b[t] = r;
116
+ }
117
+ return t;
118
+ }
119
+ const P = "http://www.w3.org/1999/xlink";
120
+ function R(e, t, s, i, o, r = F(t)) {
121
+ i && t.startsWith("xlink:") ? s == null ? e.removeAttributeNS(P, t.slice(6, t.length)) : e.setAttributeNS(P, t, s) : s == null || r && !B(s) ? e.removeAttribute(t) : e.setAttribute(
122
+ t,
123
+ r ? "" : W(s) ? String(s) : s
124
+ );
125
+ }
126
+ function nt(e, t, s, i) {
127
+ if (t === "innerHTML" || t === "textContent") {
128
+ if (s == null) return;
129
+ e[t] = s;
130
+ return;
131
+ }
132
+ const o = e.tagName;
133
+ if (t === "value" && o !== "PROGRESS" && // custom elements may use _value internally
134
+ !o.includes("-")) {
135
+ const n = o === "OPTION" ? e.getAttribute("value") || "" : e.value, a = s == null ? "" : String(s);
136
+ (n !== a || !("_value" in e)) && (e.value = a), s == null && e.removeAttribute(t), e._value = s;
137
+ return;
138
+ }
139
+ let r = !1;
140
+ if (s === "" || s == null) {
141
+ const n = typeof e[t];
142
+ n === "boolean" ? s = B(s) : s == null && n === "string" ? (s = "", r = !0) : n === "number" && (s = 0, r = !0);
143
+ }
144
+ try {
145
+ e[t] = s;
146
+ } catch (n) {
147
+ f.NODE_ENV !== "production" && !r && _(
148
+ `Failed setting prop "${t}" on <${o.toLowerCase()}>: value ${s} is invalid.`,
149
+ n
150
+ );
151
+ }
152
+ r && e.removeAttribute(t);
153
+ }
154
+ function rt(e, t, s, i) {
155
+ e.addEventListener(t, s, i);
156
+ }
157
+ function at(e, t, s, i) {
158
+ e.removeEventListener(t, s, i);
159
+ }
160
+ const O = Symbol("_vei");
161
+ function ct(e, t, s, i, o = null) {
162
+ const r = e[O] || (e[O] = {}), n = r[t];
163
+ if (i && n)
164
+ n.value = f.NODE_ENV !== "production" ? y(i, t) : i;
165
+ else {
166
+ const [a, c] = lt(t);
167
+ if (i) {
168
+ const h = r[t] = ht(
169
+ f.NODE_ENV !== "production" ? y(i, t) : i,
170
+ o
171
+ );
172
+ rt(e, a, h, c);
173
+ } else n && (at(e, a, n, c), r[t] = void 0);
174
+ }
175
+ }
176
+ const T = /(?:Once|Passive|Capture)$/;
177
+ function lt(e) {
178
+ let t;
179
+ if (T.test(e)) {
180
+ t = {};
181
+ let i;
182
+ for (; i = e.match(T); )
183
+ e = e.slice(0, e.length - i[0].length), t[i[0].toLowerCase()] = !0;
184
+ }
185
+ return [e[2] === ":" ? e.slice(3) : d(e.slice(2)), t];
186
+ }
187
+ let S = 0;
188
+ const ft = /* @__PURE__ */ Promise.resolve(), dt = () => S || (ft.then(() => S = 0), S = Date.now());
189
+ function ht(e, t) {
190
+ const s = (i) => {
191
+ if (!i._vts)
192
+ i._vts = Date.now();
193
+ else if (i._vts <= s.attached)
194
+ return;
195
+ G(
196
+ ut(i, s.value),
197
+ t,
198
+ 5,
199
+ [i]
200
+ );
201
+ };
202
+ return s.value = e, s.attached = dt(), s;
203
+ }
204
+ function y(e, t) {
205
+ return L(e) || u(e) ? e : (_(
206
+ `Wrong type passed as event handler to ${t} - did you forget @ or : in front of your prop?
207
+ Expected function or array of functions, received type ${typeof e}.`
208
+ ), q);
209
+ }
210
+ function ut(e, t) {
211
+ if (u(t)) {
212
+ const s = e.stopImmediatePropagation;
213
+ return e.stopImmediatePropagation = () => {
214
+ s.call(e), e._stopped = !0;
215
+ }, t.map(
216
+ (i) => (o) => !o._stopped && i && i(o)
217
+ );
218
+ } else
219
+ return t;
220
+ }
221
+ const x = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && // lowercase letter
222
+ e.charCodeAt(2) > 96 && e.charCodeAt(2) < 123, pt = (e, t, s, i, o, r) => {
223
+ const n = o === "svg";
224
+ t === "class" ? Z(e, i, n) : t === "style" ? st(e, s, i) : j(t) ? z(t) || ct(e, t, s, i, r) : (t[0] === "." ? (t = t.slice(1), !0) : t[0] === "^" ? (t = t.slice(1), !1) : mt(e, t, i, n)) ? (nt(e, t, i), !e.tagName.includes("-") && (t === "value" || t === "checked" || t === "selected") && R(e, t, i, n, r, t !== "value")) : (t === "true-value" ? e._trueValue = i : t === "false-value" && (e._falseValue = i), R(e, t, i, n));
225
+ };
226
+ function mt(e, t, s, i) {
227
+ if (i)
228
+ return !!(t === "innerHTML" || t === "textContent" || t in e && x(t) && L(s));
229
+ if (t === "spellcheck" || t === "draggable" || t === "translate" || t === "form" || t === "list" && e.tagName === "INPUT" || t === "type" && e.tagName === "TEXTAREA")
230
+ return !1;
231
+ if (t === "width" || t === "height") {
232
+ const o = e.tagName;
233
+ if (o === "IMG" || o === "VIDEO" || o === "CANVAS" || o === "SOURCE")
234
+ return !1;
235
+ }
236
+ return x(t) && g(s) ? !1 : t in e;
237
+ }
238
+ /*! #__NO_SIDE_EFFECTS__ */
239
+ // @__NO_SIDE_EFFECTS__
240
+ function Et(e, t, s) {
241
+ const i = H(e, t);
242
+ class o extends E {
243
+ constructor(n) {
244
+ super(i, n, s);
245
+ }
246
+ }
247
+ return o.def = i, o;
248
+ }
249
+ const _t = typeof HTMLElement < "u" ? HTMLElement : class {
250
+ };
251
+ class E extends _t {
252
+ constructor(t, s = {}, i) {
253
+ super(), this._def = t, this._props = s, this._instance = null, this._connected = !1, this._resolved = !1, this._numberProps = null, this._ob = null, this.shadowRoot && i ? i(this._createVNode(), this.shadowRoot) : (f.NODE_ENV !== "production" && this.shadowRoot && _(
254
+ "Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use `defineSSRCustomElement`."
255
+ ), this.attachShadow({ mode: "open" }), this._def.__asyncLoader || this._resolveProps(this._def));
256
+ }
257
+ connectedCallback() {
258
+ this._connected = !0, this._instance || (this._resolved ? this._update() : this._resolveDef());
259
+ }
260
+ disconnectedCallback() {
261
+ this._connected = !1, $(() => {
262
+ this._connected || (this._ob && (this._ob.disconnect(), this._ob = null), V(null, this.shadowRoot), this._instance = null);
263
+ });
264
+ }
265
+ /**
266
+ * resolve inner component definition (handle possible async component)
267
+ */
268
+ _resolveDef() {
269
+ this._resolved = !0;
270
+ for (let i = 0; i < this.attributes.length; i++)
271
+ this._setAttr(this.attributes[i].name);
272
+ this._ob = new MutationObserver((i) => {
273
+ for (const o of i)
274
+ this._setAttr(o.attributeName);
275
+ }), this._ob.observe(this, { attributes: !0 });
276
+ const t = (i, o = !1) => {
277
+ const { props: r, styles: n } = i;
278
+ let a;
279
+ if (r && !u(r))
280
+ for (const c in r) {
281
+ const h = r[c];
282
+ (h === Number || h && h.type === Number) && (c in this._props && (this._props[c] = C(this._props[c])), (a || (a = /* @__PURE__ */ Object.create(null)))[p(c)] = !0);
283
+ }
284
+ this._numberProps = a, o && this._resolveProps(i), this._applyStyles(n), this._update();
285
+ }, s = this._def.__asyncLoader;
286
+ s ? s().then((i) => t(i, !0)) : t(this._def);
287
+ }
288
+ _resolveProps(t) {
289
+ const { props: s } = t, i = u(s) ? s : Object.keys(s || {});
290
+ for (const o of Object.keys(this))
291
+ o[0] !== "_" && i.includes(o) && this._setProp(o, this[o], !0, !1);
292
+ for (const o of i.map(p))
293
+ Object.defineProperty(this, o, {
294
+ get() {
295
+ return this._getProp(o);
296
+ },
297
+ set(r) {
298
+ this._setProp(o, r);
299
+ }
300
+ });
301
+ }
302
+ _setAttr(t) {
303
+ let s = this.hasAttribute(t) ? this.getAttribute(t) : void 0;
304
+ const i = p(t);
305
+ this._numberProps && this._numberProps[i] && (s = C(s)), this._setProp(i, s, !1);
306
+ }
307
+ /**
308
+ * @internal
309
+ */
310
+ _getProp(t) {
311
+ return this._props[t];
312
+ }
313
+ /**
314
+ * @internal
315
+ */
316
+ _setProp(t, s, i = !0, o = !0) {
317
+ s !== this._props[t] && (this._props[t] = s, o && this._instance && this._update(), i && (s === !0 ? this.setAttribute(d(t), "") : typeof s == "string" || typeof s == "number" ? this.setAttribute(d(t), s + "") : s || this.removeAttribute(d(t))));
318
+ }
319
+ _update() {
320
+ V(this._createVNode(), this.shadowRoot);
321
+ }
322
+ _createVNode() {
323
+ const t = I(this._def, M({}, this._props));
324
+ return this._instance || (t.ce = (s) => {
325
+ this._instance = s, s.isCE = !0, f.NODE_ENV !== "production" && (s.ceReload = (r) => {
326
+ this._styles && (this._styles.forEach((n) => this.shadowRoot.removeChild(n)), this._styles.length = 0), this._applyStyles(r), this._instance = null, this._update();
327
+ });
328
+ const i = (r, n) => {
329
+ this.dispatchEvent(
330
+ new CustomEvent(r, {
331
+ detail: n
332
+ })
333
+ );
334
+ };
335
+ s.emit = (r, ...n) => {
336
+ i(r, n), d(r) !== r && i(d(r), n);
337
+ };
338
+ let o = this;
339
+ for (; o = o && (o.parentNode || o.host); )
340
+ if (o instanceof E) {
341
+ s.parent = o._instance, s.provides = o._instance.provides;
342
+ break;
343
+ }
344
+ }), t;
345
+ }
346
+ _applyStyles(t) {
347
+ t && t.forEach((s) => {
348
+ const i = document.createElement("style");
349
+ i.textContent = s, this.shadowRoot.appendChild(i), f.NODE_ENV !== "production" && (this._styles || (this._styles = [])).push(i);
350
+ });
351
+ }
352
+ }
353
+ const bt = /* @__PURE__ */ M({ patchProp: pt }, Q);
354
+ let D;
355
+ function St() {
356
+ return D || (D = U(bt));
357
+ }
358
+ const V = (...e) => {
359
+ St().render(...e);
360
+ };
361
+ export {
362
+ Nt as Comment,
363
+ wt as EffectScope,
364
+ At as Fragment,
365
+ Pt as ReactiveEffect,
366
+ Rt as Static,
367
+ Ot as Text,
368
+ E as VueElement,
369
+ G as callWithAsyncErrorHandling,
370
+ Tt as callWithErrorHandling,
371
+ p as camelize,
372
+ K as capitalize,
373
+ yt as cloneVNode,
374
+ xt as computed,
375
+ Dt as createBlock,
376
+ Vt as createElementBlock,
377
+ Mt as createElementVNode,
378
+ U as createRenderer,
379
+ Lt as createStaticVNode,
380
+ Bt as createTextVNode,
381
+ I as createVNode,
382
+ H as defineComponent,
383
+ Et as defineCustomElement,
384
+ $t as getCurrentInstance,
385
+ It as getCurrentScope,
386
+ Ht as guardReactiveProps,
387
+ Ut as handleError,
388
+ jt as initCustomFormatter,
389
+ zt as inject,
390
+ Kt as isProxy,
391
+ Wt as isReactive,
392
+ Ft as isReadonly,
393
+ qt as isRef,
394
+ Gt as isRuntimeOnly,
395
+ Xt as isShallow,
396
+ Jt as isVNode,
397
+ Qt as markRaw,
398
+ Yt as mergeProps,
399
+ $ as nextTick,
400
+ Zt as normalizeClass,
401
+ kt as normalizeStyle,
402
+ te as onActivated,
403
+ ee as onBeforeMount,
404
+ se as onBeforeUnmount,
405
+ ie as onBeforeUpdate,
406
+ oe as onDeactivated,
407
+ ne as onErrorCaptured,
408
+ re as onMounted,
409
+ ae as onRenderTracked,
410
+ ce as onRenderTriggered,
411
+ le as onServerPrefetch,
412
+ fe as onUnmounted,
413
+ de as onUpdated,
414
+ he as openBlock,
415
+ ue as provide,
416
+ pe as proxyRefs,
417
+ me as queuePostFlushCb,
418
+ _e as reactive,
419
+ be as readonly,
420
+ V as render,
421
+ Se as renderSlot,
422
+ ge as setBlockTracking,
423
+ Ee as setTransitionHooks,
424
+ Ce as shallowReactive,
425
+ ve as shallowReadonly,
426
+ Ne as ssrContextKey,
427
+ we as toHandlerKey,
428
+ Ae as toRaw,
429
+ Pe as unref,
430
+ Re as useSSRContext,
431
+ Oe as version,
432
+ _ as warn,
433
+ Te as watch,
434
+ ye as withCtx
435
+ };