@epam/ai-dial-share 1.0.0-rc.7
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/components/AccessControl/AccessControl.d.ts +43 -0
- package/components/AccessControl/AccessControl.d.ts.map +1 -0
- package/components/LinkView/LinkView.d.ts +24 -0
- package/components/LinkView/LinkView.d.ts.map +1 -0
- package/components/QrCode/QrCode.d.ts +32 -0
- package/components/QrCode/QrCode.d.ts.map +1 -0
- package/components/SharePopover/LoadingSkeleton.d.ts +12 -0
- package/components/SharePopover/LoadingSkeleton.d.ts.map +1 -0
- package/components/SharePopover/SharePopover.d.ts +4 -0
- package/components/SharePopover/SharePopover.d.ts.map +1 -0
- package/components/SharePopover/SharePopoverHeader.d.ts +25 -0
- package/components/SharePopover/SharePopoverHeader.d.ts.map +1 -0
- package/index.css +2 -0
- package/index.d.ts +7 -0
- package/index.d.ts.map +1 -0
- package/index.js +3105 -0
- package/models/share-link-data.d.ts +11 -0
- package/models/share-link-data.d.ts.map +1 -0
- package/models/share-popover-props.d.ts +131 -0
- package/models/share-popover-props.d.ts.map +1 -0
- package/package.json +30 -0
- package/test-setup.d.ts +1 -0
- package/test-setup.d.ts.map +1 -0
- package/types/share.d.ts +11 -0
- package/types/share.d.ts.map +1 -0
- package/utils/focus.d.ts +8 -0
- package/utils/focus.d.ts.map +1 -0
package/index.js
ADDED
|
@@ -0,0 +1,3105 @@
|
|
|
1
|
+
import { CopyButton as e, buildCssVars as t, mergeClasses as n, useCodeCopy as r } from "@epam/ai-dial-chat-shared";
|
|
2
|
+
import i, { forwardRef as a, memo as o, useEffect as s, useRef as c, useState as l } from "react";
|
|
3
|
+
import { DIAL_ICON_SIZE as u, Dropdown as d, GhostButton as f, Input as p, Skeleton as m, SkeletonVariant as h } from "@epam/ai-dial-ui-kit";
|
|
4
|
+
import { IconCheck as g, IconChevronDown as _, IconLink as v, IconQrcode as y, IconWorld as b } from "@tabler/icons-react";
|
|
5
|
+
import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
6
|
+
//#region \0rolldown/runtime.js
|
|
7
|
+
var w = Object.create, T = Object.defineProperty, E = Object.getOwnPropertyDescriptor, D = Object.getOwnPropertyNames, O = Object.getPrototypeOf, k = Object.prototype.hasOwnProperty, A = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), j = (e, t, n, r) => {
|
|
8
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = D(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !k.call(e, s) && s !== n && T(e, s, {
|
|
9
|
+
get: ((e) => t[e]).bind(null, s),
|
|
10
|
+
enumerable: !(r = E(t, s)) || r.enumerable
|
|
11
|
+
});
|
|
12
|
+
return e;
|
|
13
|
+
}, M = (e, t, n) => (n = e == null ? {} : w(O(e)), j(t || !e || !e.__esModule ? T(n, "default", {
|
|
14
|
+
value: e,
|
|
15
|
+
enumerable: !0
|
|
16
|
+
}) : n, e)), N = /* @__PURE__ */ function(e) {
|
|
17
|
+
return e.View = "view", e.Edit = "edit", e;
|
|
18
|
+
}({}), P = /* @__PURE__ */ function(e) {
|
|
19
|
+
return e.Link = "link", e.Qr = "qr", e;
|
|
20
|
+
}({}), F = "button:not(:disabled), input:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", ee = (e) => Array.from(e?.querySelectorAll(F) ?? []), I = (e) => {
|
|
21
|
+
let [t] = ee(e);
|
|
22
|
+
(t ?? e)?.focus();
|
|
23
|
+
}, L = {
|
|
24
|
+
skeletonColor: "var(--shp-skeleton-color, var(--bg-layer-sunken, #eef1f7))",
|
|
25
|
+
accessTriggerBtn: "_accessTriggerBtn_86ja7_2",
|
|
26
|
+
accessTriggerBtnOpen: "_accessTriggerBtnOpen_86ja7_26",
|
|
27
|
+
accessTriggerLabel: "_accessTriggerLabel_86ja7_30",
|
|
28
|
+
title: "_title_86ja7_34",
|
|
29
|
+
linkIconBadge: "_linkIconBadge_86ja7_38",
|
|
30
|
+
anyoneWithLinkTitle: "_anyoneWithLinkTitle_86ja7_43",
|
|
31
|
+
anyoneWithLinkSubtitle: "_anyoneWithLinkSubtitle_86ja7_47",
|
|
32
|
+
accessTriggerChevron: "_accessTriggerChevron_86ja7_51",
|
|
33
|
+
accessMenuItem: "_accessMenuItem_86ja7_62",
|
|
34
|
+
accessMenuItemChecked: "_accessMenuItemChecked_86ja7_75",
|
|
35
|
+
accessMenuItemLabel: "_accessMenuItemLabel_86ja7_84",
|
|
36
|
+
accessMenuItemCheck: "_accessMenuItemCheck_86ja7_75",
|
|
37
|
+
sectionLabel: "_sectionLabel_86ja7_92",
|
|
38
|
+
errorText: "_errorText_86ja7_96",
|
|
39
|
+
note: "_note_86ja7_100",
|
|
40
|
+
divider: "_divider_86ja7_104"
|
|
41
|
+
}, te = ({ anyoneWithLinkTitle: e, anyoneWithLinkSubtitle: t, access: r, canEditAccess: i, accessViewLabel: a, accessEditLabel: o, accessAriaLabel: s, isOpen: c, onOpenChange: l, onAccessChange: f, onMenuKeyDown: p, triggerRef: m, menuRef: h, titleClassName: v = "dial-small-semi-text", subtitleClassName: y = "dial-tiny-text", accessTriggerLabelClassName: x = "dial-small-semi-text", accessMenuItemLabelClassName: w = "dial-small-text" }) => {
|
|
42
|
+
let T = [{
|
|
43
|
+
value: N.View,
|
|
44
|
+
label: a
|
|
45
|
+
}, {
|
|
46
|
+
value: N.Edit,
|
|
47
|
+
label: o
|
|
48
|
+
}], E = r.includes(N.Edit) ? N.Edit : N.View;
|
|
49
|
+
return /* @__PURE__ */ C("div", {
|
|
50
|
+
className: "flex items-center gap-2.5",
|
|
51
|
+
children: [
|
|
52
|
+
/* @__PURE__ */ S("span", {
|
|
53
|
+
className: n("flex size-8 shrink-0 items-center justify-center rounded-full", L.linkIconBadge),
|
|
54
|
+
children: /* @__PURE__ */ S(b, {
|
|
55
|
+
size: u.MD,
|
|
56
|
+
"aria-hidden": !0
|
|
57
|
+
})
|
|
58
|
+
}),
|
|
59
|
+
/* @__PURE__ */ C("div", {
|
|
60
|
+
className: "min-w-0 flex-1",
|
|
61
|
+
children: [/* @__PURE__ */ S("p", {
|
|
62
|
+
className: n(v, "truncate", L.anyoneWithLinkTitle),
|
|
63
|
+
children: e
|
|
64
|
+
}), /* @__PURE__ */ S("p", {
|
|
65
|
+
className: n(y, L.anyoneWithLinkSubtitle),
|
|
66
|
+
children: t
|
|
67
|
+
})]
|
|
68
|
+
}),
|
|
69
|
+
i ? /* @__PURE__ */ S(d, {
|
|
70
|
+
matchReferenceWidth: !1,
|
|
71
|
+
placement: "bottom-end",
|
|
72
|
+
open: c,
|
|
73
|
+
onOpenChange: l,
|
|
74
|
+
renderOverlay: () => /* @__PURE__ */ S("div", {
|
|
75
|
+
ref: h,
|
|
76
|
+
role: "menu",
|
|
77
|
+
"aria-label": s,
|
|
78
|
+
tabIndex: -1,
|
|
79
|
+
className: "min-w-[160px]",
|
|
80
|
+
onKeyDown: p,
|
|
81
|
+
children: T.map((e) => {
|
|
82
|
+
let t = E === e.value;
|
|
83
|
+
return /* @__PURE__ */ C("button", {
|
|
84
|
+
type: "button",
|
|
85
|
+
role: "menuitemradio",
|
|
86
|
+
"aria-checked": t,
|
|
87
|
+
className: n("flex w-full cursor-pointer select-none items-center justify-between gap-2 rounded-lg px-2.5 py-2 text-start outline-none", L.accessMenuItem, t && L.accessMenuItemChecked),
|
|
88
|
+
onClick: () => {
|
|
89
|
+
f(e.value === N.Edit ? [N.View, N.Edit] : [N.View]), l(!1);
|
|
90
|
+
},
|
|
91
|
+
children: [/* @__PURE__ */ S("span", {
|
|
92
|
+
className: n(w, L.accessMenuItemLabel),
|
|
93
|
+
children: e.label
|
|
94
|
+
}), t && /* @__PURE__ */ S(g, {
|
|
95
|
+
size: u.SM,
|
|
96
|
+
stroke: 2,
|
|
97
|
+
className: L.accessMenuItemCheck,
|
|
98
|
+
"aria-hidden": !0
|
|
99
|
+
})]
|
|
100
|
+
}, e.value);
|
|
101
|
+
})
|
|
102
|
+
}),
|
|
103
|
+
children: /* @__PURE__ */ C("button", {
|
|
104
|
+
ref: m,
|
|
105
|
+
type: "button",
|
|
106
|
+
"aria-haspopup": "menu",
|
|
107
|
+
"aria-expanded": c,
|
|
108
|
+
className: n("flex h-9 shrink-0 cursor-pointer items-center gap-1.5 whitespace-nowrap rounded-lg border px-2.5 outline-none", L.accessTriggerBtn, c && L.accessTriggerBtnOpen),
|
|
109
|
+
children: [/* @__PURE__ */ S("span", {
|
|
110
|
+
className: n(L.accessTriggerLabel, x),
|
|
111
|
+
children: T.find((e) => e.value === E)?.label
|
|
112
|
+
}), /* @__PURE__ */ S(_, {
|
|
113
|
+
size: 14,
|
|
114
|
+
strokeWidth: 2.2,
|
|
115
|
+
className: n("shrink-0 transition-transform duration-150 rtl:scale-x-[-1]", L.accessTriggerChevron, c && "rotate-180"),
|
|
116
|
+
"aria-hidden": !0
|
|
117
|
+
})]
|
|
118
|
+
})
|
|
119
|
+
}) : /* @__PURE__ */ S("span", {
|
|
120
|
+
"aria-label": s,
|
|
121
|
+
className: n("flex h-9 shrink-0 items-center whitespace-nowrap rounded-lg px-2.5", L.accessTriggerBtn),
|
|
122
|
+
children: /* @__PURE__ */ S("span", {
|
|
123
|
+
className: n(L.accessTriggerLabel, x),
|
|
124
|
+
children: a
|
|
125
|
+
})
|
|
126
|
+
})
|
|
127
|
+
]
|
|
128
|
+
});
|
|
129
|
+
}, ne = ({ url: t, linkLabel: r, linkAriaLabel: i, isCopied: a, copyButtonLabel: o, copiedButtonLabel: s, onCopy: c, sectionLabelClassName: l = "dial-tiny-lead-semi-text" }) => /* @__PURE__ */ C(x, { children: [
|
|
130
|
+
/* @__PURE__ */ S("p", {
|
|
131
|
+
className: n(l, "mt-3", L.sectionLabel),
|
|
132
|
+
children: r
|
|
133
|
+
}),
|
|
134
|
+
/* @__PURE__ */ C("div", {
|
|
135
|
+
className: n("flex items-center gap-2", L.sectionLabel),
|
|
136
|
+
children: [/* @__PURE__ */ S(p, {
|
|
137
|
+
readOnly: !0,
|
|
138
|
+
value: t,
|
|
139
|
+
"aria-label": i,
|
|
140
|
+
containerClassName: "min-w-0 flex-1"
|
|
141
|
+
}), /* @__PURE__ */ S(e, {
|
|
142
|
+
copiedLabel: s,
|
|
143
|
+
copyLabel: o,
|
|
144
|
+
isCopied: a,
|
|
145
|
+
onClick: c
|
|
146
|
+
})]
|
|
147
|
+
}),
|
|
148
|
+
/* @__PURE__ */ S("span", {
|
|
149
|
+
role: "status",
|
|
150
|
+
"aria-live": "polite",
|
|
151
|
+
className: "sr-only",
|
|
152
|
+
children: a ? s : ""
|
|
153
|
+
})
|
|
154
|
+
] }), re = /* @__PURE__ */ A(((e) => {
|
|
155
|
+
var t = typeof Symbol == "function" && Symbol.for, n = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, i = t ? Symbol.for("react.fragment") : 60107, a = t ? Symbol.for("react.strict_mode") : 60108, o = t ? Symbol.for("react.profiler") : 60114, s = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, l = t ? Symbol.for("react.async_mode") : 60111, u = t ? Symbol.for("react.concurrent_mode") : 60111, d = t ? Symbol.for("react.forward_ref") : 60112, f = t ? Symbol.for("react.suspense") : 60113, p = t ? Symbol.for("react.suspense_list") : 60120, m = t ? Symbol.for("react.memo") : 60115, h = t ? Symbol.for("react.lazy") : 60116, g = t ? Symbol.for("react.block") : 60121, _ = t ? Symbol.for("react.fundamental") : 60117, v = t ? Symbol.for("react.responder") : 60118, y = t ? Symbol.for("react.scope") : 60119;
|
|
156
|
+
function b(e) {
|
|
157
|
+
if (typeof e == "object" && e) {
|
|
158
|
+
var t = e.$$typeof;
|
|
159
|
+
switch (t) {
|
|
160
|
+
case n: switch (e = e.type, e) {
|
|
161
|
+
case l:
|
|
162
|
+
case u:
|
|
163
|
+
case i:
|
|
164
|
+
case o:
|
|
165
|
+
case a:
|
|
166
|
+
case f: return e;
|
|
167
|
+
default: switch (e &&= e.$$typeof, e) {
|
|
168
|
+
case c:
|
|
169
|
+
case d:
|
|
170
|
+
case h:
|
|
171
|
+
case m:
|
|
172
|
+
case s: return e;
|
|
173
|
+
default: return t;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
case r: return t;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
function x(e) {
|
|
181
|
+
return b(e) === u;
|
|
182
|
+
}
|
|
183
|
+
e.AsyncMode = l, e.ConcurrentMode = u, e.ContextConsumer = c, e.ContextProvider = s, e.Element = n, e.ForwardRef = d, e.Fragment = i, e.Lazy = h, e.Memo = m, e.Portal = r, e.Profiler = o, e.StrictMode = a, e.Suspense = f, e.isAsyncMode = function(e) {
|
|
184
|
+
return x(e) || b(e) === l;
|
|
185
|
+
}, e.isConcurrentMode = x, e.isContextConsumer = function(e) {
|
|
186
|
+
return b(e) === c;
|
|
187
|
+
}, e.isContextProvider = function(e) {
|
|
188
|
+
return b(e) === s;
|
|
189
|
+
}, e.isElement = function(e) {
|
|
190
|
+
return typeof e == "object" && !!e && e.$$typeof === n;
|
|
191
|
+
}, e.isForwardRef = function(e) {
|
|
192
|
+
return b(e) === d;
|
|
193
|
+
}, e.isFragment = function(e) {
|
|
194
|
+
return b(e) === i;
|
|
195
|
+
}, e.isLazy = function(e) {
|
|
196
|
+
return b(e) === h;
|
|
197
|
+
}, e.isMemo = function(e) {
|
|
198
|
+
return b(e) === m;
|
|
199
|
+
}, e.isPortal = function(e) {
|
|
200
|
+
return b(e) === r;
|
|
201
|
+
}, e.isProfiler = function(e) {
|
|
202
|
+
return b(e) === o;
|
|
203
|
+
}, e.isStrictMode = function(e) {
|
|
204
|
+
return b(e) === a;
|
|
205
|
+
}, e.isSuspense = function(e) {
|
|
206
|
+
return b(e) === f;
|
|
207
|
+
}, e.isValidElementType = function(e) {
|
|
208
|
+
return typeof e == "string" || typeof e == "function" || e === i || e === u || e === o || e === a || e === f || e === p || typeof e == "object" && !!e && (e.$$typeof === h || e.$$typeof === m || e.$$typeof === s || e.$$typeof === c || e.$$typeof === d || e.$$typeof === _ || e.$$typeof === v || e.$$typeof === y || e.$$typeof === g);
|
|
209
|
+
}, e.typeOf = b;
|
|
210
|
+
})), R = /* @__PURE__ */ A(((e) => {
|
|
211
|
+
process.env.NODE_ENV !== "production" && (function() {
|
|
212
|
+
var t = typeof Symbol == "function" && Symbol.for, n = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, i = t ? Symbol.for("react.fragment") : 60107, a = t ? Symbol.for("react.strict_mode") : 60108, o = t ? Symbol.for("react.profiler") : 60114, s = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, l = t ? Symbol.for("react.async_mode") : 60111, u = t ? Symbol.for("react.concurrent_mode") : 60111, d = t ? Symbol.for("react.forward_ref") : 60112, f = t ? Symbol.for("react.suspense") : 60113, p = t ? Symbol.for("react.suspense_list") : 60120, m = t ? Symbol.for("react.memo") : 60115, h = t ? Symbol.for("react.lazy") : 60116, g = t ? Symbol.for("react.block") : 60121, _ = t ? Symbol.for("react.fundamental") : 60117, v = t ? Symbol.for("react.responder") : 60118, y = t ? Symbol.for("react.scope") : 60119;
|
|
213
|
+
function b(e) {
|
|
214
|
+
return typeof e == "string" || typeof e == "function" || e === i || e === u || e === o || e === a || e === f || e === p || typeof e == "object" && !!e && (e.$$typeof === h || e.$$typeof === m || e.$$typeof === s || e.$$typeof === c || e.$$typeof === d || e.$$typeof === _ || e.$$typeof === v || e.$$typeof === y || e.$$typeof === g);
|
|
215
|
+
}
|
|
216
|
+
function x(e) {
|
|
217
|
+
if (typeof e == "object" && e) {
|
|
218
|
+
var t = e.$$typeof;
|
|
219
|
+
switch (t) {
|
|
220
|
+
case n:
|
|
221
|
+
var p = e.type;
|
|
222
|
+
switch (p) {
|
|
223
|
+
case l:
|
|
224
|
+
case u:
|
|
225
|
+
case i:
|
|
226
|
+
case o:
|
|
227
|
+
case a:
|
|
228
|
+
case f: return p;
|
|
229
|
+
default:
|
|
230
|
+
var g = p && p.$$typeof;
|
|
231
|
+
switch (g) {
|
|
232
|
+
case c:
|
|
233
|
+
case d:
|
|
234
|
+
case h:
|
|
235
|
+
case m:
|
|
236
|
+
case s: return g;
|
|
237
|
+
default: return t;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
case r: return t;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
var S = l, C = u, w = c, T = s, E = n, D = d, O = i, k = h, A = m, j = r, M = o, N = a, P = f, F = !1;
|
|
245
|
+
function ee(e) {
|
|
246
|
+
return F || (F = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), I(e) || x(e) === l;
|
|
247
|
+
}
|
|
248
|
+
function I(e) {
|
|
249
|
+
return x(e) === u;
|
|
250
|
+
}
|
|
251
|
+
function L(e) {
|
|
252
|
+
return x(e) === c;
|
|
253
|
+
}
|
|
254
|
+
function te(e) {
|
|
255
|
+
return x(e) === s;
|
|
256
|
+
}
|
|
257
|
+
function ne(e) {
|
|
258
|
+
return typeof e == "object" && !!e && e.$$typeof === n;
|
|
259
|
+
}
|
|
260
|
+
function re(e) {
|
|
261
|
+
return x(e) === d;
|
|
262
|
+
}
|
|
263
|
+
function R(e) {
|
|
264
|
+
return x(e) === i;
|
|
265
|
+
}
|
|
266
|
+
function z(e) {
|
|
267
|
+
return x(e) === h;
|
|
268
|
+
}
|
|
269
|
+
function ie(e) {
|
|
270
|
+
return x(e) === m;
|
|
271
|
+
}
|
|
272
|
+
function B(e) {
|
|
273
|
+
return x(e) === r;
|
|
274
|
+
}
|
|
275
|
+
function V(e) {
|
|
276
|
+
return x(e) === o;
|
|
277
|
+
}
|
|
278
|
+
function H(e) {
|
|
279
|
+
return x(e) === a;
|
|
280
|
+
}
|
|
281
|
+
function U(e) {
|
|
282
|
+
return x(e) === f;
|
|
283
|
+
}
|
|
284
|
+
e.AsyncMode = S, e.ConcurrentMode = C, e.ContextConsumer = w, e.ContextProvider = T, e.Element = E, e.ForwardRef = D, e.Fragment = O, e.Lazy = k, e.Memo = A, e.Portal = j, e.Profiler = M, e.StrictMode = N, e.Suspense = P, e.isAsyncMode = ee, e.isConcurrentMode = I, e.isContextConsumer = L, e.isContextProvider = te, e.isElement = ne, e.isForwardRef = re, e.isFragment = R, e.isLazy = z, e.isMemo = ie, e.isPortal = B, e.isProfiler = V, e.isStrictMode = H, e.isSuspense = U, e.isValidElementType = b, e.typeOf = x;
|
|
285
|
+
})();
|
|
286
|
+
})), z = /* @__PURE__ */ A(((e, t) => {
|
|
287
|
+
process.env.NODE_ENV === "production" ? t.exports = re() : t.exports = R();
|
|
288
|
+
})), ie = /* @__PURE__ */ A(((e, t) => {
|
|
289
|
+
var n = Object.getOwnPropertySymbols, r = Object.prototype.hasOwnProperty, i = Object.prototype.propertyIsEnumerable;
|
|
290
|
+
function a(e) {
|
|
291
|
+
if (e == null) throw TypeError("Object.assign cannot be called with null or undefined");
|
|
292
|
+
return Object(e);
|
|
293
|
+
}
|
|
294
|
+
function o() {
|
|
295
|
+
try {
|
|
296
|
+
if (!Object.assign) return !1;
|
|
297
|
+
var e = /* @__PURE__ */ new String("abc");
|
|
298
|
+
if (e[5] = "de", Object.getOwnPropertyNames(e)[0] === "5") return !1;
|
|
299
|
+
for (var t = {}, n = 0; n < 10; n++) t["_" + String.fromCharCode(n)] = n;
|
|
300
|
+
if (Object.getOwnPropertyNames(t).map(function(e) {
|
|
301
|
+
return t[e];
|
|
302
|
+
}).join("") !== "0123456789") return !1;
|
|
303
|
+
var r = {};
|
|
304
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(e) {
|
|
305
|
+
r[e] = e;
|
|
306
|
+
}), Object.keys(Object.assign({}, r)).join("") === "abcdefghijklmnopqrst";
|
|
307
|
+
} catch {
|
|
308
|
+
return !1;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
t.exports = o() ? Object.assign : function(e, t) {
|
|
312
|
+
for (var o, s = a(e), c, l = 1; l < arguments.length; l++) {
|
|
313
|
+
for (var u in o = Object(arguments[l]), o) r.call(o, u) && (s[u] = o[u]);
|
|
314
|
+
if (n) {
|
|
315
|
+
c = n(o);
|
|
316
|
+
for (var d = 0; d < c.length; d++) i.call(o, c[d]) && (s[c[d]] = o[c[d]]);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
return s;
|
|
320
|
+
};
|
|
321
|
+
})), B = /* @__PURE__ */ A(((e, t) => {
|
|
322
|
+
t.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
323
|
+
})), V = /* @__PURE__ */ A(((e, t) => {
|
|
324
|
+
t.exports = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
325
|
+
})), H = /* @__PURE__ */ A(((e, t) => {
|
|
326
|
+
var n = function() {};
|
|
327
|
+
if (process.env.NODE_ENV !== "production") {
|
|
328
|
+
var r = B(), i = {}, a = V();
|
|
329
|
+
n = function(e) {
|
|
330
|
+
var t = "Warning: " + e;
|
|
331
|
+
typeof console < "u" && console.error(t);
|
|
332
|
+
try {
|
|
333
|
+
throw Error(t);
|
|
334
|
+
} catch {}
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
function o(e, t, o, s, c) {
|
|
338
|
+
if (process.env.NODE_ENV !== "production") {
|
|
339
|
+
for (var l in e) if (a(e, l)) {
|
|
340
|
+
var u;
|
|
341
|
+
try {
|
|
342
|
+
if (typeof e[l] != "function") {
|
|
343
|
+
var d = Error((s || "React class") + ": " + o + " type `" + l + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[l] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
344
|
+
throw d.name = "Invariant Violation", d;
|
|
345
|
+
}
|
|
346
|
+
u = e[l](t, l, s, o, null, r);
|
|
347
|
+
} catch (e) {
|
|
348
|
+
u = e;
|
|
349
|
+
}
|
|
350
|
+
if (u && !(u instanceof Error) && n((s || "React class") + ": type specification of " + o + " `" + l + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof u + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."), u instanceof Error && !(u.message in i)) {
|
|
351
|
+
i[u.message] = !0;
|
|
352
|
+
var f = c ? c() : "";
|
|
353
|
+
n("Failed " + o + " type: " + u.message + (f ?? ""));
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
o.resetWarningCache = function() {
|
|
359
|
+
process.env.NODE_ENV !== "production" && (i = {});
|
|
360
|
+
}, t.exports = o;
|
|
361
|
+
})), U = /* @__PURE__ */ A(((e, t) => {
|
|
362
|
+
var n = z(), r = ie(), i = B(), a = V(), o = H(), s = function() {};
|
|
363
|
+
process.env.NODE_ENV !== "production" && (s = function(e) {
|
|
364
|
+
var t = "Warning: " + e;
|
|
365
|
+
typeof console < "u" && console.error(t);
|
|
366
|
+
try {
|
|
367
|
+
throw Error(t);
|
|
368
|
+
} catch {}
|
|
369
|
+
});
|
|
370
|
+
function c() {
|
|
371
|
+
return null;
|
|
372
|
+
}
|
|
373
|
+
t.exports = function(e, t) {
|
|
374
|
+
var l = typeof Symbol == "function" && Symbol.iterator, u = "@@iterator";
|
|
375
|
+
function d(e) {
|
|
376
|
+
var t = e && (l && e[l] || e[u]);
|
|
377
|
+
if (typeof t == "function") return t;
|
|
378
|
+
}
|
|
379
|
+
var f = "<<anonymous>>", p = {
|
|
380
|
+
array: _("array"),
|
|
381
|
+
bigint: _("bigint"),
|
|
382
|
+
bool: _("boolean"),
|
|
383
|
+
func: _("function"),
|
|
384
|
+
number: _("number"),
|
|
385
|
+
object: _("object"),
|
|
386
|
+
string: _("string"),
|
|
387
|
+
symbol: _("symbol"),
|
|
388
|
+
any: v(),
|
|
389
|
+
arrayOf: y,
|
|
390
|
+
element: b(),
|
|
391
|
+
elementType: x(),
|
|
392
|
+
instanceOf: S,
|
|
393
|
+
node: E(),
|
|
394
|
+
objectOf: w,
|
|
395
|
+
oneOf: C,
|
|
396
|
+
oneOfType: T,
|
|
397
|
+
shape: O,
|
|
398
|
+
exact: k
|
|
399
|
+
};
|
|
400
|
+
function m(e, t) {
|
|
401
|
+
return e === t ? e !== 0 || 1 / e == 1 / t : e !== e && t !== t;
|
|
402
|
+
}
|
|
403
|
+
function h(e, t) {
|
|
404
|
+
this.message = e, this.data = t && typeof t == "object" ? t : {}, this.stack = "";
|
|
405
|
+
}
|
|
406
|
+
h.prototype = Error.prototype;
|
|
407
|
+
function g(e) {
|
|
408
|
+
if (process.env.NODE_ENV !== "production") var n = {}, r = 0;
|
|
409
|
+
function a(a, o, c, l, u, d, p) {
|
|
410
|
+
if (l ||= f, d ||= c, p !== i) {
|
|
411
|
+
if (t) {
|
|
412
|
+
var m = /* @__PURE__ */ Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");
|
|
413
|
+
throw m.name = "Invariant Violation", m;
|
|
414
|
+
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
415
|
+
var g = l + ":" + c;
|
|
416
|
+
!n[g] && r < 3 && (s("You are manually calling a React.PropTypes validation function for the `" + d + "` prop on `" + l + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."), n[g] = !0, r++);
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
return o[c] == null ? a ? o[c] === null ? new h("The " + u + " `" + d + "` is marked as required " + ("in `" + l + "`, but its value is `null`.")) : new h("The " + u + " `" + d + "` is marked as required in " + ("`" + l + "`, but its value is `undefined`.")) : null : e(o, c, l, u, d);
|
|
420
|
+
}
|
|
421
|
+
var o = a.bind(null, !1);
|
|
422
|
+
return o.isRequired = a.bind(null, !0), o;
|
|
423
|
+
}
|
|
424
|
+
function _(e) {
|
|
425
|
+
function t(t, n, r, i, a, o) {
|
|
426
|
+
var s = t[n];
|
|
427
|
+
if (M(s) !== e) {
|
|
428
|
+
var c = N(s);
|
|
429
|
+
return new h("Invalid " + i + " `" + a + "` of type " + ("`" + c + "` supplied to `" + r + "`, expected ") + ("`" + e + "`."), { expectedType: e });
|
|
430
|
+
}
|
|
431
|
+
return null;
|
|
432
|
+
}
|
|
433
|
+
return g(t);
|
|
434
|
+
}
|
|
435
|
+
function v() {
|
|
436
|
+
return g(c);
|
|
437
|
+
}
|
|
438
|
+
function y(e) {
|
|
439
|
+
function t(t, n, r, a, o) {
|
|
440
|
+
if (typeof e != "function") return new h("Property `" + o + "` of component `" + r + "` has invalid PropType notation inside arrayOf.");
|
|
441
|
+
var s = t[n];
|
|
442
|
+
if (!Array.isArray(s)) {
|
|
443
|
+
var c = M(s);
|
|
444
|
+
return new h("Invalid " + a + " `" + o + "` of type " + ("`" + c + "` supplied to `" + r + "`, expected an array."));
|
|
445
|
+
}
|
|
446
|
+
for (var l = 0; l < s.length; l++) {
|
|
447
|
+
var u = e(s, l, r, a, o + "[" + l + "]", i);
|
|
448
|
+
if (u instanceof Error) return u;
|
|
449
|
+
}
|
|
450
|
+
return null;
|
|
451
|
+
}
|
|
452
|
+
return g(t);
|
|
453
|
+
}
|
|
454
|
+
function b() {
|
|
455
|
+
function t(t, n, r, i, a) {
|
|
456
|
+
var o = t[n];
|
|
457
|
+
if (!e(o)) {
|
|
458
|
+
var s = M(o);
|
|
459
|
+
return new h("Invalid " + i + " `" + a + "` of type " + ("`" + s + "` supplied to `" + r + "`, expected a single ReactElement."));
|
|
460
|
+
}
|
|
461
|
+
return null;
|
|
462
|
+
}
|
|
463
|
+
return g(t);
|
|
464
|
+
}
|
|
465
|
+
function x() {
|
|
466
|
+
function e(e, t, r, i, a) {
|
|
467
|
+
var o = e[t];
|
|
468
|
+
if (!n.isValidElementType(o)) {
|
|
469
|
+
var s = M(o);
|
|
470
|
+
return new h("Invalid " + i + " `" + a + "` of type " + ("`" + s + "` supplied to `" + r + "`, expected a single ReactElement type."));
|
|
471
|
+
}
|
|
472
|
+
return null;
|
|
473
|
+
}
|
|
474
|
+
return g(e);
|
|
475
|
+
}
|
|
476
|
+
function S(e) {
|
|
477
|
+
function t(t, n, r, i, a) {
|
|
478
|
+
if (!(t[n] instanceof e)) {
|
|
479
|
+
var o = e.name || f, s = F(t[n]);
|
|
480
|
+
return new h("Invalid " + i + " `" + a + "` of type " + ("`" + s + "` supplied to `" + r + "`, expected ") + ("instance of `" + o + "`."));
|
|
481
|
+
}
|
|
482
|
+
return null;
|
|
483
|
+
}
|
|
484
|
+
return g(t);
|
|
485
|
+
}
|
|
486
|
+
function C(e) {
|
|
487
|
+
if (!Array.isArray(e)) return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? s("Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).") : s("Invalid argument supplied to oneOf, expected an array.")), c;
|
|
488
|
+
function t(t, n, r, i, a) {
|
|
489
|
+
for (var o = t[n], s = 0; s < e.length; s++) if (m(o, e[s])) return null;
|
|
490
|
+
var c = JSON.stringify(e, function(e, t) {
|
|
491
|
+
return N(t) === "symbol" ? String(t) : t;
|
|
492
|
+
});
|
|
493
|
+
return new h("Invalid " + i + " `" + a + "` of value `" + String(o) + "` " + ("supplied to `" + r + "`, expected one of " + c + "."));
|
|
494
|
+
}
|
|
495
|
+
return g(t);
|
|
496
|
+
}
|
|
497
|
+
function w(e) {
|
|
498
|
+
function t(t, n, r, o, s) {
|
|
499
|
+
if (typeof e != "function") return new h("Property `" + s + "` of component `" + r + "` has invalid PropType notation inside objectOf.");
|
|
500
|
+
var c = t[n], l = M(c);
|
|
501
|
+
if (l !== "object") return new h("Invalid " + o + " `" + s + "` of type " + ("`" + l + "` supplied to `" + r + "`, expected an object."));
|
|
502
|
+
for (var u in c) if (a(c, u)) {
|
|
503
|
+
var d = e(c, u, r, o, s + "." + u, i);
|
|
504
|
+
if (d instanceof Error) return d;
|
|
505
|
+
}
|
|
506
|
+
return null;
|
|
507
|
+
}
|
|
508
|
+
return g(t);
|
|
509
|
+
}
|
|
510
|
+
function T(e) {
|
|
511
|
+
if (!Array.isArray(e)) return process.env.NODE_ENV !== "production" && s("Invalid argument supplied to oneOfType, expected an instance of array."), c;
|
|
512
|
+
for (var t = 0; t < e.length; t++) {
|
|
513
|
+
var n = e[t];
|
|
514
|
+
if (typeof n != "function") return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + P(n) + " at index " + t + "."), c;
|
|
515
|
+
}
|
|
516
|
+
function r(t, n, r, o, s) {
|
|
517
|
+
for (var c = [], l = 0; l < e.length; l++) {
|
|
518
|
+
var u = e[l], d = u(t, n, r, o, s, i);
|
|
519
|
+
if (d == null) return null;
|
|
520
|
+
d.data && a(d.data, "expectedType") && c.push(d.data.expectedType);
|
|
521
|
+
}
|
|
522
|
+
var f = c.length > 0 ? ", expected one of type [" + c.join(", ") + "]" : "";
|
|
523
|
+
return new h("Invalid " + o + " `" + s + "` supplied to " + ("`" + r + "`" + f + "."));
|
|
524
|
+
}
|
|
525
|
+
return g(r);
|
|
526
|
+
}
|
|
527
|
+
function E() {
|
|
528
|
+
function e(e, t, n, r, i) {
|
|
529
|
+
return A(e[t]) ? null : new h("Invalid " + r + " `" + i + "` supplied to " + ("`" + n + "`, expected a ReactNode."));
|
|
530
|
+
}
|
|
531
|
+
return g(e);
|
|
532
|
+
}
|
|
533
|
+
function D(e, t, n, r, i) {
|
|
534
|
+
return new h((e || "React class") + ": " + t + " type `" + n + "." + r + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + i + "`.");
|
|
535
|
+
}
|
|
536
|
+
function O(e) {
|
|
537
|
+
function t(t, n, r, a, o) {
|
|
538
|
+
var s = t[n], c = M(s);
|
|
539
|
+
if (c !== "object") return new h("Invalid " + a + " `" + o + "` of type `" + c + "` " + ("supplied to `" + r + "`, expected `object`."));
|
|
540
|
+
for (var l in e) {
|
|
541
|
+
var u = e[l];
|
|
542
|
+
if (typeof u != "function") return D(r, a, o, l, N(u));
|
|
543
|
+
var d = u(s, l, r, a, o + "." + l, i);
|
|
544
|
+
if (d) return d;
|
|
545
|
+
}
|
|
546
|
+
return null;
|
|
547
|
+
}
|
|
548
|
+
return g(t);
|
|
549
|
+
}
|
|
550
|
+
function k(e) {
|
|
551
|
+
function t(t, n, o, s, c) {
|
|
552
|
+
var l = t[n], u = M(l);
|
|
553
|
+
if (u !== "object") return new h("Invalid " + s + " `" + c + "` of type `" + u + "` " + ("supplied to `" + o + "`, expected `object`."));
|
|
554
|
+
for (var d in r({}, t[n], e)) {
|
|
555
|
+
var f = e[d];
|
|
556
|
+
if (a(e, d) && typeof f != "function") return D(o, s, c, d, N(f));
|
|
557
|
+
if (!f) return new h("Invalid " + s + " `" + c + "` key `" + d + "` supplied to `" + o + "`.\nBad object: " + JSON.stringify(t[n], null, " ") + "\nValid keys: " + JSON.stringify(Object.keys(e), null, " "));
|
|
558
|
+
var p = f(l, d, o, s, c + "." + d, i);
|
|
559
|
+
if (p) return p;
|
|
560
|
+
}
|
|
561
|
+
return null;
|
|
562
|
+
}
|
|
563
|
+
return g(t);
|
|
564
|
+
}
|
|
565
|
+
function A(t) {
|
|
566
|
+
switch (typeof t) {
|
|
567
|
+
case "number":
|
|
568
|
+
case "string":
|
|
569
|
+
case "undefined": return !0;
|
|
570
|
+
case "boolean": return !t;
|
|
571
|
+
case "object":
|
|
572
|
+
if (Array.isArray(t)) return t.every(A);
|
|
573
|
+
if (t === null || e(t)) return !0;
|
|
574
|
+
var n = d(t);
|
|
575
|
+
if (n) {
|
|
576
|
+
var r = n.call(t), i;
|
|
577
|
+
if (n !== t.entries) {
|
|
578
|
+
for (; !(i = r.next()).done;) if (!A(i.value)) return !1;
|
|
579
|
+
} else for (; !(i = r.next()).done;) {
|
|
580
|
+
var a = i.value;
|
|
581
|
+
if (a && !A(a[1])) return !1;
|
|
582
|
+
}
|
|
583
|
+
} else return !1;
|
|
584
|
+
return !0;
|
|
585
|
+
default: return !1;
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
function j(e, t) {
|
|
589
|
+
return e === "symbol" ? !0 : t ? t["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && t instanceof Symbol : !1;
|
|
590
|
+
}
|
|
591
|
+
function M(e) {
|
|
592
|
+
var t = typeof e;
|
|
593
|
+
return Array.isArray(e) ? "array" : e instanceof RegExp ? "object" : j(t, e) ? "symbol" : t;
|
|
594
|
+
}
|
|
595
|
+
function N(e) {
|
|
596
|
+
if (e == null) return "" + e;
|
|
597
|
+
var t = M(e);
|
|
598
|
+
if (t === "object") {
|
|
599
|
+
if (e instanceof Date) return "date";
|
|
600
|
+
if (e instanceof RegExp) return "regexp";
|
|
601
|
+
}
|
|
602
|
+
return t;
|
|
603
|
+
}
|
|
604
|
+
function P(e) {
|
|
605
|
+
var t = N(e);
|
|
606
|
+
switch (t) {
|
|
607
|
+
case "array":
|
|
608
|
+
case "object": return "an " + t;
|
|
609
|
+
case "boolean":
|
|
610
|
+
case "date":
|
|
611
|
+
case "regexp": return "a " + t;
|
|
612
|
+
default: return t;
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
function F(e) {
|
|
616
|
+
return !e.constructor || !e.constructor.name ? f : e.constructor.name;
|
|
617
|
+
}
|
|
618
|
+
return p.checkPropTypes = o, p.resetWarningCache = o.resetWarningCache, p.PropTypes = p, p;
|
|
619
|
+
};
|
|
620
|
+
})), ae = /* @__PURE__ */ A(((e, t) => {
|
|
621
|
+
var n = B();
|
|
622
|
+
function r() {}
|
|
623
|
+
function i() {}
|
|
624
|
+
i.resetWarningCache = r, t.exports = function() {
|
|
625
|
+
function e(e, t, r, i, a, o) {
|
|
626
|
+
if (o !== n) {
|
|
627
|
+
var s = /* @__PURE__ */ Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");
|
|
628
|
+
throw s.name = "Invariant Violation", s;
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
e.isRequired = e;
|
|
632
|
+
function t() {
|
|
633
|
+
return e;
|
|
634
|
+
}
|
|
635
|
+
var a = {
|
|
636
|
+
array: e,
|
|
637
|
+
bigint: e,
|
|
638
|
+
bool: e,
|
|
639
|
+
func: e,
|
|
640
|
+
number: e,
|
|
641
|
+
object: e,
|
|
642
|
+
string: e,
|
|
643
|
+
symbol: e,
|
|
644
|
+
any: e,
|
|
645
|
+
arrayOf: t,
|
|
646
|
+
element: e,
|
|
647
|
+
elementType: e,
|
|
648
|
+
instanceOf: t,
|
|
649
|
+
node: e,
|
|
650
|
+
objectOf: t,
|
|
651
|
+
oneOf: t,
|
|
652
|
+
oneOfType: t,
|
|
653
|
+
shape: t,
|
|
654
|
+
exact: t,
|
|
655
|
+
checkPropTypes: i,
|
|
656
|
+
resetWarningCache: r
|
|
657
|
+
};
|
|
658
|
+
return a.PropTypes = a, a;
|
|
659
|
+
};
|
|
660
|
+
})), W = /* @__PURE__ */ M((/* @__PURE__ */ A(((e, t) => {
|
|
661
|
+
if (process.env.NODE_ENV !== "production") {
|
|
662
|
+
var n = z();
|
|
663
|
+
t.exports = U()(n.isElement, !0);
|
|
664
|
+
} else t.exports = ae()();
|
|
665
|
+
})))(), 1), G = function(e, t) {
|
|
666
|
+
let n = e, r = q[t], i = null, a = 0, o = null, s = [], c = {}, l = function(e, t) {
|
|
667
|
+
a = n * 4 + 17, i = function(e) {
|
|
668
|
+
let t = Array(e);
|
|
669
|
+
for (let n = 0; n < e; n += 1) {
|
|
670
|
+
t[n] = Array(e);
|
|
671
|
+
for (let r = 0; r < e; r += 1) t[n][r] = null;
|
|
672
|
+
}
|
|
673
|
+
return t;
|
|
674
|
+
}(a), u(0, 0), u(a - 7, 0), u(0, a - 7), p(), f(), h(e, t), n >= 7 && m(e), o ??= v(n, r, s), g(o, t);
|
|
675
|
+
}, u = function(e, t) {
|
|
676
|
+
for (let n = -1; n <= 7; n += 1) if (!(e + n <= -1 || a <= e + n)) for (let r = -1; r <= 7; r += 1) t + r <= -1 || a <= t + r || (0 <= n && n <= 6 && (r == 0 || r == 6) || 0 <= r && r <= 6 && (n == 0 || n == 6) || 2 <= n && n <= 4 && 2 <= r && r <= 4 ? i[e + n][t + r] = !0 : i[e + n][t + r] = !1);
|
|
677
|
+
}, d = function() {
|
|
678
|
+
let e = 0, t = 0;
|
|
679
|
+
for (let n = 0; n < 8; n += 1) {
|
|
680
|
+
l(!0, n);
|
|
681
|
+
let r = Y.getLostPoint(c);
|
|
682
|
+
(n == 0 || e > r) && (e = r, t = n);
|
|
683
|
+
}
|
|
684
|
+
return t;
|
|
685
|
+
}, f = function() {
|
|
686
|
+
for (let e = 8; e < a - 8; e += 1) i[e][6] ?? (i[e][6] = e % 2 == 0);
|
|
687
|
+
for (let e = 8; e < a - 8; e += 1) i[6][e] ?? (i[6][e] = e % 2 == 0);
|
|
688
|
+
}, p = function() {
|
|
689
|
+
let e = Y.getPatternPosition(n);
|
|
690
|
+
for (let t = 0; t < e.length; t += 1) for (let n = 0; n < e.length; n += 1) {
|
|
691
|
+
let r = e[t], a = e[n];
|
|
692
|
+
if (i[r][a] == null) for (let e = -2; e <= 2; e += 1) for (let t = -2; t <= 2; t += 1) e == -2 || e == 2 || t == -2 || t == 2 || e == 0 && t == 0 ? i[r + e][a + t] = !0 : i[r + e][a + t] = !1;
|
|
693
|
+
}
|
|
694
|
+
}, m = function(e) {
|
|
695
|
+
let t = Y.getBCHTypeNumber(n);
|
|
696
|
+
for (let n = 0; n < 18; n += 1) {
|
|
697
|
+
let r = !e && (t >> n & 1) == 1;
|
|
698
|
+
i[Math.floor(n / 3)][n % 3 + a - 8 - 3] = r;
|
|
699
|
+
}
|
|
700
|
+
for (let n = 0; n < 18; n += 1) {
|
|
701
|
+
let r = !e && (t >> n & 1) == 1;
|
|
702
|
+
i[n % 3 + a - 8 - 3][Math.floor(n / 3)] = r;
|
|
703
|
+
}
|
|
704
|
+
}, h = function(e, t) {
|
|
705
|
+
let n = r << 3 | t, o = Y.getBCHTypeInfo(n);
|
|
706
|
+
for (let t = 0; t < 15; t += 1) {
|
|
707
|
+
let n = !e && (o >> t & 1) == 1;
|
|
708
|
+
t < 6 ? i[t][8] = n : t < 8 ? i[t + 1][8] = n : i[a - 15 + t][8] = n;
|
|
709
|
+
}
|
|
710
|
+
for (let t = 0; t < 15; t += 1) {
|
|
711
|
+
let n = !e && (o >> t & 1) == 1;
|
|
712
|
+
t < 8 ? i[8][a - t - 1] = n : t < 9 ? i[8][15 - t - 1 + 1] = n : i[8][15 - t - 1] = n;
|
|
713
|
+
}
|
|
714
|
+
i[a - 8][8] = !e;
|
|
715
|
+
}, g = function(e, t) {
|
|
716
|
+
let n = -1, r = a - 1, o = 7, s = 0, c = Y.getMaskFunction(t);
|
|
717
|
+
for (let t = a - 1; t > 0; t -= 2) for (t == 6 && --t;;) {
|
|
718
|
+
for (let n = 0; n < 2; n += 1) if (i[r][t - n] == null) {
|
|
719
|
+
let a = !1;
|
|
720
|
+
s < e.length && (a = (e[s] >>> o & 1) == 1), c(r, t - n) && (a = !a), i[r][t - n] = a, --o, o == -1 && (s += 1, o = 7);
|
|
721
|
+
}
|
|
722
|
+
if (r += n, r < 0 || a <= r) {
|
|
723
|
+
r -= n, n = -n;
|
|
724
|
+
break;
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
}, _ = function(e, t) {
|
|
728
|
+
let n = 0, r = 0, i = 0, a = Array(t.length), o = Array(t.length);
|
|
729
|
+
for (let s = 0; s < t.length; s += 1) {
|
|
730
|
+
let c = t[s].dataCount, l = t[s].totalCount - c;
|
|
731
|
+
r = Math.max(r, c), i = Math.max(i, l), a[s] = Array(c);
|
|
732
|
+
for (let t = 0; t < a[s].length; t += 1) a[s][t] = 255 & e.getBuffer()[t + n];
|
|
733
|
+
n += c;
|
|
734
|
+
let u = Y.getErrorCorrectPolynomial(l), d = Z(a[s], u.getLength() - 1).mod(u);
|
|
735
|
+
o[s] = Array(u.getLength() - 1);
|
|
736
|
+
for (let e = 0; e < o[s].length; e += 1) {
|
|
737
|
+
let t = e + d.getLength() - o[s].length;
|
|
738
|
+
o[s][e] = t >= 0 ? d.getAt(t) : 0;
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
let s = 0;
|
|
742
|
+
for (let e = 0; e < t.length; e += 1) s += t[e].totalCount;
|
|
743
|
+
let c = Array(s), l = 0;
|
|
744
|
+
for (let e = 0; e < r; e += 1) for (let n = 0; n < t.length; n += 1) e < a[n].length && (c[l] = a[n][e], l += 1);
|
|
745
|
+
for (let e = 0; e < i; e += 1) for (let n = 0; n < t.length; n += 1) e < o[n].length && (c[l] = o[n][e], l += 1);
|
|
746
|
+
return c;
|
|
747
|
+
}, v = function(e, t, n) {
|
|
748
|
+
let r = oe.getRSBlocks(e, t), i = se();
|
|
749
|
+
for (let t = 0; t < n.length; t += 1) {
|
|
750
|
+
let r = n[t];
|
|
751
|
+
i.put(r.getMode(), 4), i.put(r.getLength(), Y.getLengthInBits(r.getMode(), e)), r.write(i);
|
|
752
|
+
}
|
|
753
|
+
let a = 0;
|
|
754
|
+
for (let e = 0; e < r.length; e += 1) a += r[e].dataCount;
|
|
755
|
+
if (i.getLengthInBits() > a * 8) throw "code length overflow. (" + i.getLengthInBits() + ">" + a * 8 + ")";
|
|
756
|
+
for (i.getLengthInBits() + 4 <= a * 8 && i.put(0, 4); i.getLengthInBits() % 8 != 0;) i.putBit(!1);
|
|
757
|
+
for (; !(i.getLengthInBits() >= a * 8 || (i.put(236, 8), i.getLengthInBits() >= a * 8));) i.put(17, 8);
|
|
758
|
+
return _(i, r);
|
|
759
|
+
};
|
|
760
|
+
c.addData = function(e, t) {
|
|
761
|
+
t ||= "Byte";
|
|
762
|
+
let n = null;
|
|
763
|
+
switch (t) {
|
|
764
|
+
case "Numeric":
|
|
765
|
+
n = ce(e);
|
|
766
|
+
break;
|
|
767
|
+
case "Alphanumeric":
|
|
768
|
+
n = le(e);
|
|
769
|
+
break;
|
|
770
|
+
case "Byte":
|
|
771
|
+
n = ue(e);
|
|
772
|
+
break;
|
|
773
|
+
case "Kanji":
|
|
774
|
+
n = de(e);
|
|
775
|
+
break;
|
|
776
|
+
default: throw "mode:" + t;
|
|
777
|
+
}
|
|
778
|
+
s.push(n), o = null;
|
|
779
|
+
}, c.isDark = function(e, t) {
|
|
780
|
+
if (e < 0 || a <= e || t < 0 || a <= t) throw e + "," + t;
|
|
781
|
+
return i[e][t];
|
|
782
|
+
}, c.getModuleCount = function() {
|
|
783
|
+
return a;
|
|
784
|
+
}, c.make = function() {
|
|
785
|
+
if (n < 1) {
|
|
786
|
+
let e = 1;
|
|
787
|
+
for (; e < 40; e++) {
|
|
788
|
+
let t = oe.getRSBlocks(e, r), n = se();
|
|
789
|
+
for (let t = 0; t < s.length; t++) {
|
|
790
|
+
let r = s[t];
|
|
791
|
+
n.put(r.getMode(), 4), n.put(r.getLength(), Y.getLengthInBits(r.getMode(), e)), r.write(n);
|
|
792
|
+
}
|
|
793
|
+
let i = 0;
|
|
794
|
+
for (let e = 0; e < t.length; e++) i += t[e].dataCount;
|
|
795
|
+
if (n.getLengthInBits() <= i * 8) break;
|
|
796
|
+
}
|
|
797
|
+
n = e;
|
|
798
|
+
}
|
|
799
|
+
l(!1, d());
|
|
800
|
+
}, c.createTableTag = function(e, t) {
|
|
801
|
+
e ||= 2, t = t === void 0 ? e * 4 : t;
|
|
802
|
+
let n = "";
|
|
803
|
+
n += "<table style=\"", n += " border-width: 0px; border-style: none;", n += " border-collapse: collapse;", n += " padding: 0px; margin: " + t + "px;", n += "\">", n += "<tbody>";
|
|
804
|
+
for (let t = 0; t < c.getModuleCount(); t += 1) {
|
|
805
|
+
n += "<tr>";
|
|
806
|
+
for (let r = 0; r < c.getModuleCount(); r += 1) n += "<td style=\"", n += " border-width: 0px; border-style: none;", n += " border-collapse: collapse;", n += " padding: 0px; margin: 0px;", n += " width: " + e + "px;", n += " height: " + e + "px;", n += " background-color: ", n += c.isDark(t, r) ? "#000000" : "#ffffff", n += ";", n += "\"/>";
|
|
807
|
+
n += "</tr>";
|
|
808
|
+
}
|
|
809
|
+
return n += "</tbody>", n += "</table>", n;
|
|
810
|
+
}, c.createSvgTag = function(e, t, n, r) {
|
|
811
|
+
let i = {};
|
|
812
|
+
typeof arguments[0] == "object" && (i = arguments[0], e = i.cellSize, t = i.margin, n = i.alt, r = i.title), e ||= 2, t = t === void 0 ? e * 4 : t, n = typeof n == "string" ? { text: n } : n || {}, n.text = n.text || null, n.id = n.text ? n.id || "qrcode-description" : null, r = typeof r == "string" ? { text: r } : r || {}, r.text = r.text || null, r.id = r.text ? r.id || "qrcode-title" : null;
|
|
813
|
+
let a = c.getModuleCount() * e + t * 2, o, s, l, u, d = "", f;
|
|
814
|
+
for (f = "l" + e + ",0 0," + e + " -" + e + ",0 0,-" + e + "z ", d += "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"", d += i.scalable ? "" : " width=\"" + a + "px\" height=\"" + a + "px\"", d += " viewBox=\"0 0 " + a + " " + a + "\" ", d += " preserveAspectRatio=\"xMinYMin meet\"", d += r.text || n.text ? " role=\"img\" aria-labelledby=\"" + y([r.id, n.id].join(" ").trim()) + "\"" : "", d += ">", d += r.text ? "<title id=\"" + y(r.id) + "\">" + y(r.text) + "</title>" : "", d += n.text ? "<description id=\"" + y(n.id) + "\">" + y(n.text) + "</description>" : "", d += "<rect width=\"100%\" height=\"100%\" fill=\"white\" cx=\"0\" cy=\"0\"/>", d += "<path d=\"", l = 0; l < c.getModuleCount(); l += 1) for (u = l * e + t, o = 0; o < c.getModuleCount(); o += 1) c.isDark(l, o) && (s = o * e + t, d += "M" + s + "," + u + f);
|
|
815
|
+
return d += "\" stroke=\"transparent\" fill=\"black\"/>", d += "</svg>", d;
|
|
816
|
+
}, c.createDataURL = function(e, t) {
|
|
817
|
+
e ||= 2, t = t === void 0 ? e * 4 : t;
|
|
818
|
+
let n = c.getModuleCount() * e + t * 2, r = t, i = n - t;
|
|
819
|
+
return ge(n, n, function(t, n) {
|
|
820
|
+
if (r <= t && t < i && r <= n && n < i) {
|
|
821
|
+
let i = Math.floor((t - r) / e), a = Math.floor((n - r) / e);
|
|
822
|
+
return +!c.isDark(a, i);
|
|
823
|
+
} else return 1;
|
|
824
|
+
});
|
|
825
|
+
}, c.createImgTag = function(e, t, n) {
|
|
826
|
+
e ||= 2, t = t === void 0 ? e * 4 : t;
|
|
827
|
+
let r = c.getModuleCount() * e + t * 2, i = "";
|
|
828
|
+
return i += "<img", i += " src=\"", i += c.createDataURL(e, t), i += "\"", i += " width=\"", i += r, i += "\"", i += " height=\"", i += r, i += "\"", n && (i += " alt=\"", i += y(n), i += "\""), i += "/>", i;
|
|
829
|
+
};
|
|
830
|
+
let y = function(e) {
|
|
831
|
+
let t = "";
|
|
832
|
+
for (let n = 0; n < e.length; n += 1) {
|
|
833
|
+
let r = e.charAt(n);
|
|
834
|
+
switch (r) {
|
|
835
|
+
case "<":
|
|
836
|
+
t += "<";
|
|
837
|
+
break;
|
|
838
|
+
case ">":
|
|
839
|
+
t += ">";
|
|
840
|
+
break;
|
|
841
|
+
case "&":
|
|
842
|
+
t += "&";
|
|
843
|
+
break;
|
|
844
|
+
case "\"":
|
|
845
|
+
t += """;
|
|
846
|
+
break;
|
|
847
|
+
default:
|
|
848
|
+
t += r;
|
|
849
|
+
break;
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
return t;
|
|
853
|
+
}, b = function(e) {
|
|
854
|
+
e = e === void 0 ? 2 : e;
|
|
855
|
+
let t = c.getModuleCount() * 1 + e * 2, n = e, r = t - e, i, a, o, s, l, u = {
|
|
856
|
+
"██": "█",
|
|
857
|
+
"█ ": "▀",
|
|
858
|
+
" █": "▄",
|
|
859
|
+
" ": " "
|
|
860
|
+
}, d = {
|
|
861
|
+
"██": "▀",
|
|
862
|
+
"█ ": "▀",
|
|
863
|
+
" █": " ",
|
|
864
|
+
" ": " "
|
|
865
|
+
}, f = "";
|
|
866
|
+
for (i = 0; i < t; i += 2) {
|
|
867
|
+
for (o = Math.floor((i - n) / 1), s = Math.floor((i + 1 - n) / 1), a = 0; a < t; a += 1) l = "█", n <= a && a < r && n <= i && i < r && c.isDark(o, Math.floor((a - n) / 1)) && (l = " "), n <= a && a < r && n <= i + 1 && i + 1 < r && c.isDark(s, Math.floor((a - n) / 1)) ? l += " " : l += "█", f += e < 1 && i + 1 >= r ? d[l] : u[l];
|
|
868
|
+
f += "\n";
|
|
869
|
+
}
|
|
870
|
+
return t % 2 && e > 0 ? f.substring(0, f.length - t - 1) + Array(t + 1).join("▀") : f.substring(0, f.length - 1);
|
|
871
|
+
};
|
|
872
|
+
return c.createASCII = function(e, t) {
|
|
873
|
+
if (e ||= 1, e < 2) return b(t);
|
|
874
|
+
--e, t = t === void 0 ? e * 2 : t;
|
|
875
|
+
let n = c.getModuleCount() * e + t * 2, r = t, i = n - t, a, o, s, l, u = Array(e + 1).join("██"), d = Array(e + 1).join(" "), f = "", p = "";
|
|
876
|
+
for (a = 0; a < n; a += 1) {
|
|
877
|
+
for (s = Math.floor((a - r) / e), p = "", o = 0; o < n; o += 1) l = 1, r <= o && o < i && r <= a && a < i && c.isDark(s, Math.floor((o - r) / e)) && (l = 0), p += l ? u : d;
|
|
878
|
+
for (s = 0; s < e; s += 1) f += p + "\n";
|
|
879
|
+
}
|
|
880
|
+
return f.substring(0, f.length - 1);
|
|
881
|
+
}, c.renderTo2dContext = function(e, t) {
|
|
882
|
+
t ||= 2;
|
|
883
|
+
let n = c.getModuleCount();
|
|
884
|
+
for (let r = 0; r < n; r++) for (let i = 0; i < n; i++) e.fillStyle = c.isDark(r, i) ? "black" : "white", e.fillRect(i * t, r * t, t, t);
|
|
885
|
+
}, c;
|
|
886
|
+
};
|
|
887
|
+
G.stringToBytes = function(e) {
|
|
888
|
+
let t = [];
|
|
889
|
+
for (let n = 0; n < e.length; n += 1) {
|
|
890
|
+
let r = e.charCodeAt(n);
|
|
891
|
+
t.push(r & 255);
|
|
892
|
+
}
|
|
893
|
+
return t;
|
|
894
|
+
}, G.createStringToBytes = function(e, t) {
|
|
895
|
+
let n = function() {
|
|
896
|
+
let n = me(e), r = function() {
|
|
897
|
+
let e = n.read();
|
|
898
|
+
if (e == -1) throw "eof";
|
|
899
|
+
return e;
|
|
900
|
+
}, i = 0, a = {};
|
|
901
|
+
for (;;) {
|
|
902
|
+
let e = n.read();
|
|
903
|
+
if (e == -1) break;
|
|
904
|
+
let t = r(), o = r(), s = r(), c = String.fromCharCode(e << 8 | t);
|
|
905
|
+
a[c] = o << 8 | s, i += 1;
|
|
906
|
+
}
|
|
907
|
+
if (i != t) throw i + " != " + t;
|
|
908
|
+
return a;
|
|
909
|
+
}();
|
|
910
|
+
return function(e) {
|
|
911
|
+
let t = [];
|
|
912
|
+
for (let r = 0; r < e.length; r += 1) {
|
|
913
|
+
let i = e.charCodeAt(r);
|
|
914
|
+
if (i < 128) t.push(i);
|
|
915
|
+
else {
|
|
916
|
+
let i = n[e.charAt(r)];
|
|
917
|
+
typeof i == "number" ? (i & 255) == i ? t.push(i) : (t.push(i >>> 8), t.push(i & 255)) : t.push(63);
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
return t;
|
|
921
|
+
};
|
|
922
|
+
};
|
|
923
|
+
var K = {
|
|
924
|
+
MODE_NUMBER: 1,
|
|
925
|
+
MODE_ALPHA_NUM: 2,
|
|
926
|
+
MODE_8BIT_BYTE: 4,
|
|
927
|
+
MODE_KANJI: 8
|
|
928
|
+
}, q = {
|
|
929
|
+
L: 1,
|
|
930
|
+
M: 0,
|
|
931
|
+
Q: 3,
|
|
932
|
+
H: 2
|
|
933
|
+
}, J = {
|
|
934
|
+
PATTERN000: 0,
|
|
935
|
+
PATTERN001: 1,
|
|
936
|
+
PATTERN010: 2,
|
|
937
|
+
PATTERN011: 3,
|
|
938
|
+
PATTERN100: 4,
|
|
939
|
+
PATTERN101: 5,
|
|
940
|
+
PATTERN110: 6,
|
|
941
|
+
PATTERN111: 7
|
|
942
|
+
}, Y = function() {
|
|
943
|
+
let e = [
|
|
944
|
+
[],
|
|
945
|
+
[6, 18],
|
|
946
|
+
[6, 22],
|
|
947
|
+
[6, 26],
|
|
948
|
+
[6, 30],
|
|
949
|
+
[6, 34],
|
|
950
|
+
[
|
|
951
|
+
6,
|
|
952
|
+
22,
|
|
953
|
+
38
|
|
954
|
+
],
|
|
955
|
+
[
|
|
956
|
+
6,
|
|
957
|
+
24,
|
|
958
|
+
42
|
|
959
|
+
],
|
|
960
|
+
[
|
|
961
|
+
6,
|
|
962
|
+
26,
|
|
963
|
+
46
|
|
964
|
+
],
|
|
965
|
+
[
|
|
966
|
+
6,
|
|
967
|
+
28,
|
|
968
|
+
50
|
|
969
|
+
],
|
|
970
|
+
[
|
|
971
|
+
6,
|
|
972
|
+
30,
|
|
973
|
+
54
|
|
974
|
+
],
|
|
975
|
+
[
|
|
976
|
+
6,
|
|
977
|
+
32,
|
|
978
|
+
58
|
|
979
|
+
],
|
|
980
|
+
[
|
|
981
|
+
6,
|
|
982
|
+
34,
|
|
983
|
+
62
|
|
984
|
+
],
|
|
985
|
+
[
|
|
986
|
+
6,
|
|
987
|
+
26,
|
|
988
|
+
46,
|
|
989
|
+
66
|
|
990
|
+
],
|
|
991
|
+
[
|
|
992
|
+
6,
|
|
993
|
+
26,
|
|
994
|
+
48,
|
|
995
|
+
70
|
|
996
|
+
],
|
|
997
|
+
[
|
|
998
|
+
6,
|
|
999
|
+
26,
|
|
1000
|
+
50,
|
|
1001
|
+
74
|
|
1002
|
+
],
|
|
1003
|
+
[
|
|
1004
|
+
6,
|
|
1005
|
+
30,
|
|
1006
|
+
54,
|
|
1007
|
+
78
|
|
1008
|
+
],
|
|
1009
|
+
[
|
|
1010
|
+
6,
|
|
1011
|
+
30,
|
|
1012
|
+
56,
|
|
1013
|
+
82
|
|
1014
|
+
],
|
|
1015
|
+
[
|
|
1016
|
+
6,
|
|
1017
|
+
30,
|
|
1018
|
+
58,
|
|
1019
|
+
86
|
|
1020
|
+
],
|
|
1021
|
+
[
|
|
1022
|
+
6,
|
|
1023
|
+
34,
|
|
1024
|
+
62,
|
|
1025
|
+
90
|
|
1026
|
+
],
|
|
1027
|
+
[
|
|
1028
|
+
6,
|
|
1029
|
+
28,
|
|
1030
|
+
50,
|
|
1031
|
+
72,
|
|
1032
|
+
94
|
|
1033
|
+
],
|
|
1034
|
+
[
|
|
1035
|
+
6,
|
|
1036
|
+
26,
|
|
1037
|
+
50,
|
|
1038
|
+
74,
|
|
1039
|
+
98
|
|
1040
|
+
],
|
|
1041
|
+
[
|
|
1042
|
+
6,
|
|
1043
|
+
30,
|
|
1044
|
+
54,
|
|
1045
|
+
78,
|
|
1046
|
+
102
|
|
1047
|
+
],
|
|
1048
|
+
[
|
|
1049
|
+
6,
|
|
1050
|
+
28,
|
|
1051
|
+
54,
|
|
1052
|
+
80,
|
|
1053
|
+
106
|
|
1054
|
+
],
|
|
1055
|
+
[
|
|
1056
|
+
6,
|
|
1057
|
+
32,
|
|
1058
|
+
58,
|
|
1059
|
+
84,
|
|
1060
|
+
110
|
|
1061
|
+
],
|
|
1062
|
+
[
|
|
1063
|
+
6,
|
|
1064
|
+
30,
|
|
1065
|
+
58,
|
|
1066
|
+
86,
|
|
1067
|
+
114
|
|
1068
|
+
],
|
|
1069
|
+
[
|
|
1070
|
+
6,
|
|
1071
|
+
34,
|
|
1072
|
+
62,
|
|
1073
|
+
90,
|
|
1074
|
+
118
|
|
1075
|
+
],
|
|
1076
|
+
[
|
|
1077
|
+
6,
|
|
1078
|
+
26,
|
|
1079
|
+
50,
|
|
1080
|
+
74,
|
|
1081
|
+
98,
|
|
1082
|
+
122
|
|
1083
|
+
],
|
|
1084
|
+
[
|
|
1085
|
+
6,
|
|
1086
|
+
30,
|
|
1087
|
+
54,
|
|
1088
|
+
78,
|
|
1089
|
+
102,
|
|
1090
|
+
126
|
|
1091
|
+
],
|
|
1092
|
+
[
|
|
1093
|
+
6,
|
|
1094
|
+
26,
|
|
1095
|
+
52,
|
|
1096
|
+
78,
|
|
1097
|
+
104,
|
|
1098
|
+
130
|
|
1099
|
+
],
|
|
1100
|
+
[
|
|
1101
|
+
6,
|
|
1102
|
+
30,
|
|
1103
|
+
56,
|
|
1104
|
+
82,
|
|
1105
|
+
108,
|
|
1106
|
+
134
|
|
1107
|
+
],
|
|
1108
|
+
[
|
|
1109
|
+
6,
|
|
1110
|
+
34,
|
|
1111
|
+
60,
|
|
1112
|
+
86,
|
|
1113
|
+
112,
|
|
1114
|
+
138
|
|
1115
|
+
],
|
|
1116
|
+
[
|
|
1117
|
+
6,
|
|
1118
|
+
30,
|
|
1119
|
+
58,
|
|
1120
|
+
86,
|
|
1121
|
+
114,
|
|
1122
|
+
142
|
|
1123
|
+
],
|
|
1124
|
+
[
|
|
1125
|
+
6,
|
|
1126
|
+
34,
|
|
1127
|
+
62,
|
|
1128
|
+
90,
|
|
1129
|
+
118,
|
|
1130
|
+
146
|
|
1131
|
+
],
|
|
1132
|
+
[
|
|
1133
|
+
6,
|
|
1134
|
+
30,
|
|
1135
|
+
54,
|
|
1136
|
+
78,
|
|
1137
|
+
102,
|
|
1138
|
+
126,
|
|
1139
|
+
150
|
|
1140
|
+
],
|
|
1141
|
+
[
|
|
1142
|
+
6,
|
|
1143
|
+
24,
|
|
1144
|
+
50,
|
|
1145
|
+
76,
|
|
1146
|
+
102,
|
|
1147
|
+
128,
|
|
1148
|
+
154
|
|
1149
|
+
],
|
|
1150
|
+
[
|
|
1151
|
+
6,
|
|
1152
|
+
28,
|
|
1153
|
+
54,
|
|
1154
|
+
80,
|
|
1155
|
+
106,
|
|
1156
|
+
132,
|
|
1157
|
+
158
|
|
1158
|
+
],
|
|
1159
|
+
[
|
|
1160
|
+
6,
|
|
1161
|
+
32,
|
|
1162
|
+
58,
|
|
1163
|
+
84,
|
|
1164
|
+
110,
|
|
1165
|
+
136,
|
|
1166
|
+
162
|
|
1167
|
+
],
|
|
1168
|
+
[
|
|
1169
|
+
6,
|
|
1170
|
+
26,
|
|
1171
|
+
54,
|
|
1172
|
+
82,
|
|
1173
|
+
110,
|
|
1174
|
+
138,
|
|
1175
|
+
166
|
|
1176
|
+
],
|
|
1177
|
+
[
|
|
1178
|
+
6,
|
|
1179
|
+
30,
|
|
1180
|
+
58,
|
|
1181
|
+
86,
|
|
1182
|
+
114,
|
|
1183
|
+
142,
|
|
1184
|
+
170
|
|
1185
|
+
]
|
|
1186
|
+
], t = 1335, n = 7973, r = {}, i = function(e) {
|
|
1187
|
+
let t = 0;
|
|
1188
|
+
for (; e != 0;) t += 1, e >>>= 1;
|
|
1189
|
+
return t;
|
|
1190
|
+
};
|
|
1191
|
+
return r.getBCHTypeInfo = function(e) {
|
|
1192
|
+
let n = e << 10;
|
|
1193
|
+
for (; i(n) - i(t) >= 0;) n ^= t << i(n) - i(t);
|
|
1194
|
+
return (e << 10 | n) ^ 21522;
|
|
1195
|
+
}, r.getBCHTypeNumber = function(e) {
|
|
1196
|
+
let t = e << 12;
|
|
1197
|
+
for (; i(t) - i(n) >= 0;) t ^= n << i(t) - i(n);
|
|
1198
|
+
return e << 12 | t;
|
|
1199
|
+
}, r.getPatternPosition = function(t) {
|
|
1200
|
+
return e[t - 1];
|
|
1201
|
+
}, r.getMaskFunction = function(e) {
|
|
1202
|
+
switch (e) {
|
|
1203
|
+
case J.PATTERN000: return function(e, t) {
|
|
1204
|
+
return (e + t) % 2 == 0;
|
|
1205
|
+
};
|
|
1206
|
+
case J.PATTERN001: return function(e, t) {
|
|
1207
|
+
return e % 2 == 0;
|
|
1208
|
+
};
|
|
1209
|
+
case J.PATTERN010: return function(e, t) {
|
|
1210
|
+
return t % 3 == 0;
|
|
1211
|
+
};
|
|
1212
|
+
case J.PATTERN011: return function(e, t) {
|
|
1213
|
+
return (e + t) % 3 == 0;
|
|
1214
|
+
};
|
|
1215
|
+
case J.PATTERN100: return function(e, t) {
|
|
1216
|
+
return (Math.floor(e / 2) + Math.floor(t / 3)) % 2 == 0;
|
|
1217
|
+
};
|
|
1218
|
+
case J.PATTERN101: return function(e, t) {
|
|
1219
|
+
return e * t % 2 + e * t % 3 == 0;
|
|
1220
|
+
};
|
|
1221
|
+
case J.PATTERN110: return function(e, t) {
|
|
1222
|
+
return (e * t % 2 + e * t % 3) % 2 == 0;
|
|
1223
|
+
};
|
|
1224
|
+
case J.PATTERN111: return function(e, t) {
|
|
1225
|
+
return (e * t % 3 + (e + t) % 2) % 2 == 0;
|
|
1226
|
+
};
|
|
1227
|
+
default: throw "bad maskPattern:" + e;
|
|
1228
|
+
}
|
|
1229
|
+
}, r.getErrorCorrectPolynomial = function(e) {
|
|
1230
|
+
let t = Z([1], 0);
|
|
1231
|
+
for (let n = 0; n < e; n += 1) t = t.multiply(Z([1, X.gexp(n)], 0));
|
|
1232
|
+
return t;
|
|
1233
|
+
}, r.getLengthInBits = function(e, t) {
|
|
1234
|
+
if (1 <= t && t < 10) switch (e) {
|
|
1235
|
+
case K.MODE_NUMBER: return 10;
|
|
1236
|
+
case K.MODE_ALPHA_NUM: return 9;
|
|
1237
|
+
case K.MODE_8BIT_BYTE: return 8;
|
|
1238
|
+
case K.MODE_KANJI: return 8;
|
|
1239
|
+
default: throw "mode:" + e;
|
|
1240
|
+
}
|
|
1241
|
+
else if (t < 27) switch (e) {
|
|
1242
|
+
case K.MODE_NUMBER: return 12;
|
|
1243
|
+
case K.MODE_ALPHA_NUM: return 11;
|
|
1244
|
+
case K.MODE_8BIT_BYTE: return 16;
|
|
1245
|
+
case K.MODE_KANJI: return 10;
|
|
1246
|
+
default: throw "mode:" + e;
|
|
1247
|
+
}
|
|
1248
|
+
else if (t < 41) switch (e) {
|
|
1249
|
+
case K.MODE_NUMBER: return 14;
|
|
1250
|
+
case K.MODE_ALPHA_NUM: return 13;
|
|
1251
|
+
case K.MODE_8BIT_BYTE: return 16;
|
|
1252
|
+
case K.MODE_KANJI: return 12;
|
|
1253
|
+
default: throw "mode:" + e;
|
|
1254
|
+
}
|
|
1255
|
+
else throw "type:" + t;
|
|
1256
|
+
}, r.getLostPoint = function(e) {
|
|
1257
|
+
let t = e.getModuleCount(), n = 0;
|
|
1258
|
+
for (let r = 0; r < t; r += 1) for (let i = 0; i < t; i += 1) {
|
|
1259
|
+
let a = 0, o = e.isDark(r, i);
|
|
1260
|
+
for (let n = -1; n <= 1; n += 1) if (!(r + n < 0 || t <= r + n)) for (let s = -1; s <= 1; s += 1) i + s < 0 || t <= i + s || n == 0 && s == 0 || o == e.isDark(r + n, i + s) && (a += 1);
|
|
1261
|
+
a > 5 && (n += 3 + a - 5);
|
|
1262
|
+
}
|
|
1263
|
+
for (let r = 0; r < t - 1; r += 1) for (let i = 0; i < t - 1; i += 1) {
|
|
1264
|
+
let t = 0;
|
|
1265
|
+
e.isDark(r, i) && (t += 1), e.isDark(r + 1, i) && (t += 1), e.isDark(r, i + 1) && (t += 1), e.isDark(r + 1, i + 1) && (t += 1), (t == 0 || t == 4) && (n += 3);
|
|
1266
|
+
}
|
|
1267
|
+
for (let r = 0; r < t; r += 1) for (let i = 0; i < t - 6; i += 1) e.isDark(r, i) && !e.isDark(r, i + 1) && e.isDark(r, i + 2) && e.isDark(r, i + 3) && e.isDark(r, i + 4) && !e.isDark(r, i + 5) && e.isDark(r, i + 6) && (n += 40);
|
|
1268
|
+
for (let r = 0; r < t; r += 1) for (let i = 0; i < t - 6; i += 1) e.isDark(i, r) && !e.isDark(i + 1, r) && e.isDark(i + 2, r) && e.isDark(i + 3, r) && e.isDark(i + 4, r) && !e.isDark(i + 5, r) && e.isDark(i + 6, r) && (n += 40);
|
|
1269
|
+
let r = 0;
|
|
1270
|
+
for (let n = 0; n < t; n += 1) for (let i = 0; i < t; i += 1) e.isDark(i, n) && (r += 1);
|
|
1271
|
+
let i = Math.abs(100 * r / t / t - 50) / 5;
|
|
1272
|
+
return n += i * 10, n;
|
|
1273
|
+
}, r;
|
|
1274
|
+
}(), X = function() {
|
|
1275
|
+
let e = Array(256), t = Array(256);
|
|
1276
|
+
for (let t = 0; t < 8; t += 1) e[t] = 1 << t;
|
|
1277
|
+
for (let t = 8; t < 256; t += 1) e[t] = e[t - 4] ^ e[t - 5] ^ e[t - 6] ^ e[t - 8];
|
|
1278
|
+
for (let n = 0; n < 255; n += 1) t[e[n]] = n;
|
|
1279
|
+
let n = {};
|
|
1280
|
+
return n.glog = function(e) {
|
|
1281
|
+
if (e < 1) throw "glog(" + e + ")";
|
|
1282
|
+
return t[e];
|
|
1283
|
+
}, n.gexp = function(t) {
|
|
1284
|
+
for (; t < 0;) t += 255;
|
|
1285
|
+
for (; t >= 256;) t -= 255;
|
|
1286
|
+
return e[t];
|
|
1287
|
+
}, n;
|
|
1288
|
+
}(), Z = function(e, t) {
|
|
1289
|
+
if (e.length === void 0) throw e.length + "/" + t;
|
|
1290
|
+
let n = function() {
|
|
1291
|
+
let n = 0;
|
|
1292
|
+
for (; n < e.length && e[n] == 0;) n += 1;
|
|
1293
|
+
let r = Array(e.length - n + t);
|
|
1294
|
+
for (let t = 0; t < e.length - n; t += 1) r[t] = e[t + n];
|
|
1295
|
+
return r;
|
|
1296
|
+
}(), r = {};
|
|
1297
|
+
return r.getAt = function(e) {
|
|
1298
|
+
return n[e];
|
|
1299
|
+
}, r.getLength = function() {
|
|
1300
|
+
return n.length;
|
|
1301
|
+
}, r.multiply = function(e) {
|
|
1302
|
+
let t = Array(r.getLength() + e.getLength() - 1);
|
|
1303
|
+
for (let n = 0; n < r.getLength(); n += 1) for (let i = 0; i < e.getLength(); i += 1) t[n + i] ^= X.gexp(X.glog(r.getAt(n)) + X.glog(e.getAt(i)));
|
|
1304
|
+
return Z(t, 0);
|
|
1305
|
+
}, r.mod = function(e) {
|
|
1306
|
+
if (r.getLength() - e.getLength() < 0) return r;
|
|
1307
|
+
let t = X.glog(r.getAt(0)) - X.glog(e.getAt(0)), n = Array(r.getLength());
|
|
1308
|
+
for (let e = 0; e < r.getLength(); e += 1) n[e] = r.getAt(e);
|
|
1309
|
+
for (let r = 0; r < e.getLength(); r += 1) n[r] ^= X.gexp(X.glog(e.getAt(r)) + t);
|
|
1310
|
+
return Z(n, 0).mod(e);
|
|
1311
|
+
}, r;
|
|
1312
|
+
}, oe = function() {
|
|
1313
|
+
let e = [
|
|
1314
|
+
[
|
|
1315
|
+
1,
|
|
1316
|
+
26,
|
|
1317
|
+
19
|
|
1318
|
+
],
|
|
1319
|
+
[
|
|
1320
|
+
1,
|
|
1321
|
+
26,
|
|
1322
|
+
16
|
|
1323
|
+
],
|
|
1324
|
+
[
|
|
1325
|
+
1,
|
|
1326
|
+
26,
|
|
1327
|
+
13
|
|
1328
|
+
],
|
|
1329
|
+
[
|
|
1330
|
+
1,
|
|
1331
|
+
26,
|
|
1332
|
+
9
|
|
1333
|
+
],
|
|
1334
|
+
[
|
|
1335
|
+
1,
|
|
1336
|
+
44,
|
|
1337
|
+
34
|
|
1338
|
+
],
|
|
1339
|
+
[
|
|
1340
|
+
1,
|
|
1341
|
+
44,
|
|
1342
|
+
28
|
|
1343
|
+
],
|
|
1344
|
+
[
|
|
1345
|
+
1,
|
|
1346
|
+
44,
|
|
1347
|
+
22
|
|
1348
|
+
],
|
|
1349
|
+
[
|
|
1350
|
+
1,
|
|
1351
|
+
44,
|
|
1352
|
+
16
|
|
1353
|
+
],
|
|
1354
|
+
[
|
|
1355
|
+
1,
|
|
1356
|
+
70,
|
|
1357
|
+
55
|
|
1358
|
+
],
|
|
1359
|
+
[
|
|
1360
|
+
1,
|
|
1361
|
+
70,
|
|
1362
|
+
44
|
|
1363
|
+
],
|
|
1364
|
+
[
|
|
1365
|
+
2,
|
|
1366
|
+
35,
|
|
1367
|
+
17
|
|
1368
|
+
],
|
|
1369
|
+
[
|
|
1370
|
+
2,
|
|
1371
|
+
35,
|
|
1372
|
+
13
|
|
1373
|
+
],
|
|
1374
|
+
[
|
|
1375
|
+
1,
|
|
1376
|
+
100,
|
|
1377
|
+
80
|
|
1378
|
+
],
|
|
1379
|
+
[
|
|
1380
|
+
2,
|
|
1381
|
+
50,
|
|
1382
|
+
32
|
|
1383
|
+
],
|
|
1384
|
+
[
|
|
1385
|
+
2,
|
|
1386
|
+
50,
|
|
1387
|
+
24
|
|
1388
|
+
],
|
|
1389
|
+
[
|
|
1390
|
+
4,
|
|
1391
|
+
25,
|
|
1392
|
+
9
|
|
1393
|
+
],
|
|
1394
|
+
[
|
|
1395
|
+
1,
|
|
1396
|
+
134,
|
|
1397
|
+
108
|
|
1398
|
+
],
|
|
1399
|
+
[
|
|
1400
|
+
2,
|
|
1401
|
+
67,
|
|
1402
|
+
43
|
|
1403
|
+
],
|
|
1404
|
+
[
|
|
1405
|
+
2,
|
|
1406
|
+
33,
|
|
1407
|
+
15,
|
|
1408
|
+
2,
|
|
1409
|
+
34,
|
|
1410
|
+
16
|
|
1411
|
+
],
|
|
1412
|
+
[
|
|
1413
|
+
2,
|
|
1414
|
+
33,
|
|
1415
|
+
11,
|
|
1416
|
+
2,
|
|
1417
|
+
34,
|
|
1418
|
+
12
|
|
1419
|
+
],
|
|
1420
|
+
[
|
|
1421
|
+
2,
|
|
1422
|
+
86,
|
|
1423
|
+
68
|
|
1424
|
+
],
|
|
1425
|
+
[
|
|
1426
|
+
4,
|
|
1427
|
+
43,
|
|
1428
|
+
27
|
|
1429
|
+
],
|
|
1430
|
+
[
|
|
1431
|
+
4,
|
|
1432
|
+
43,
|
|
1433
|
+
19
|
|
1434
|
+
],
|
|
1435
|
+
[
|
|
1436
|
+
4,
|
|
1437
|
+
43,
|
|
1438
|
+
15
|
|
1439
|
+
],
|
|
1440
|
+
[
|
|
1441
|
+
2,
|
|
1442
|
+
98,
|
|
1443
|
+
78
|
|
1444
|
+
],
|
|
1445
|
+
[
|
|
1446
|
+
4,
|
|
1447
|
+
49,
|
|
1448
|
+
31
|
|
1449
|
+
],
|
|
1450
|
+
[
|
|
1451
|
+
2,
|
|
1452
|
+
32,
|
|
1453
|
+
14,
|
|
1454
|
+
4,
|
|
1455
|
+
33,
|
|
1456
|
+
15
|
|
1457
|
+
],
|
|
1458
|
+
[
|
|
1459
|
+
4,
|
|
1460
|
+
39,
|
|
1461
|
+
13,
|
|
1462
|
+
1,
|
|
1463
|
+
40,
|
|
1464
|
+
14
|
|
1465
|
+
],
|
|
1466
|
+
[
|
|
1467
|
+
2,
|
|
1468
|
+
121,
|
|
1469
|
+
97
|
|
1470
|
+
],
|
|
1471
|
+
[
|
|
1472
|
+
2,
|
|
1473
|
+
60,
|
|
1474
|
+
38,
|
|
1475
|
+
2,
|
|
1476
|
+
61,
|
|
1477
|
+
39
|
|
1478
|
+
],
|
|
1479
|
+
[
|
|
1480
|
+
4,
|
|
1481
|
+
40,
|
|
1482
|
+
18,
|
|
1483
|
+
2,
|
|
1484
|
+
41,
|
|
1485
|
+
19
|
|
1486
|
+
],
|
|
1487
|
+
[
|
|
1488
|
+
4,
|
|
1489
|
+
40,
|
|
1490
|
+
14,
|
|
1491
|
+
2,
|
|
1492
|
+
41,
|
|
1493
|
+
15
|
|
1494
|
+
],
|
|
1495
|
+
[
|
|
1496
|
+
2,
|
|
1497
|
+
146,
|
|
1498
|
+
116
|
|
1499
|
+
],
|
|
1500
|
+
[
|
|
1501
|
+
3,
|
|
1502
|
+
58,
|
|
1503
|
+
36,
|
|
1504
|
+
2,
|
|
1505
|
+
59,
|
|
1506
|
+
37
|
|
1507
|
+
],
|
|
1508
|
+
[
|
|
1509
|
+
4,
|
|
1510
|
+
36,
|
|
1511
|
+
16,
|
|
1512
|
+
4,
|
|
1513
|
+
37,
|
|
1514
|
+
17
|
|
1515
|
+
],
|
|
1516
|
+
[
|
|
1517
|
+
4,
|
|
1518
|
+
36,
|
|
1519
|
+
12,
|
|
1520
|
+
4,
|
|
1521
|
+
37,
|
|
1522
|
+
13
|
|
1523
|
+
],
|
|
1524
|
+
[
|
|
1525
|
+
2,
|
|
1526
|
+
86,
|
|
1527
|
+
68,
|
|
1528
|
+
2,
|
|
1529
|
+
87,
|
|
1530
|
+
69
|
|
1531
|
+
],
|
|
1532
|
+
[
|
|
1533
|
+
4,
|
|
1534
|
+
69,
|
|
1535
|
+
43,
|
|
1536
|
+
1,
|
|
1537
|
+
70,
|
|
1538
|
+
44
|
|
1539
|
+
],
|
|
1540
|
+
[
|
|
1541
|
+
6,
|
|
1542
|
+
43,
|
|
1543
|
+
19,
|
|
1544
|
+
2,
|
|
1545
|
+
44,
|
|
1546
|
+
20
|
|
1547
|
+
],
|
|
1548
|
+
[
|
|
1549
|
+
6,
|
|
1550
|
+
43,
|
|
1551
|
+
15,
|
|
1552
|
+
2,
|
|
1553
|
+
44,
|
|
1554
|
+
16
|
|
1555
|
+
],
|
|
1556
|
+
[
|
|
1557
|
+
4,
|
|
1558
|
+
101,
|
|
1559
|
+
81
|
|
1560
|
+
],
|
|
1561
|
+
[
|
|
1562
|
+
1,
|
|
1563
|
+
80,
|
|
1564
|
+
50,
|
|
1565
|
+
4,
|
|
1566
|
+
81,
|
|
1567
|
+
51
|
|
1568
|
+
],
|
|
1569
|
+
[
|
|
1570
|
+
4,
|
|
1571
|
+
50,
|
|
1572
|
+
22,
|
|
1573
|
+
4,
|
|
1574
|
+
51,
|
|
1575
|
+
23
|
|
1576
|
+
],
|
|
1577
|
+
[
|
|
1578
|
+
3,
|
|
1579
|
+
36,
|
|
1580
|
+
12,
|
|
1581
|
+
8,
|
|
1582
|
+
37,
|
|
1583
|
+
13
|
|
1584
|
+
],
|
|
1585
|
+
[
|
|
1586
|
+
2,
|
|
1587
|
+
116,
|
|
1588
|
+
92,
|
|
1589
|
+
2,
|
|
1590
|
+
117,
|
|
1591
|
+
93
|
|
1592
|
+
],
|
|
1593
|
+
[
|
|
1594
|
+
6,
|
|
1595
|
+
58,
|
|
1596
|
+
36,
|
|
1597
|
+
2,
|
|
1598
|
+
59,
|
|
1599
|
+
37
|
|
1600
|
+
],
|
|
1601
|
+
[
|
|
1602
|
+
4,
|
|
1603
|
+
46,
|
|
1604
|
+
20,
|
|
1605
|
+
6,
|
|
1606
|
+
47,
|
|
1607
|
+
21
|
|
1608
|
+
],
|
|
1609
|
+
[
|
|
1610
|
+
7,
|
|
1611
|
+
42,
|
|
1612
|
+
14,
|
|
1613
|
+
4,
|
|
1614
|
+
43,
|
|
1615
|
+
15
|
|
1616
|
+
],
|
|
1617
|
+
[
|
|
1618
|
+
4,
|
|
1619
|
+
133,
|
|
1620
|
+
107
|
|
1621
|
+
],
|
|
1622
|
+
[
|
|
1623
|
+
8,
|
|
1624
|
+
59,
|
|
1625
|
+
37,
|
|
1626
|
+
1,
|
|
1627
|
+
60,
|
|
1628
|
+
38
|
|
1629
|
+
],
|
|
1630
|
+
[
|
|
1631
|
+
8,
|
|
1632
|
+
44,
|
|
1633
|
+
20,
|
|
1634
|
+
4,
|
|
1635
|
+
45,
|
|
1636
|
+
21
|
|
1637
|
+
],
|
|
1638
|
+
[
|
|
1639
|
+
12,
|
|
1640
|
+
33,
|
|
1641
|
+
11,
|
|
1642
|
+
4,
|
|
1643
|
+
34,
|
|
1644
|
+
12
|
|
1645
|
+
],
|
|
1646
|
+
[
|
|
1647
|
+
3,
|
|
1648
|
+
145,
|
|
1649
|
+
115,
|
|
1650
|
+
1,
|
|
1651
|
+
146,
|
|
1652
|
+
116
|
|
1653
|
+
],
|
|
1654
|
+
[
|
|
1655
|
+
4,
|
|
1656
|
+
64,
|
|
1657
|
+
40,
|
|
1658
|
+
5,
|
|
1659
|
+
65,
|
|
1660
|
+
41
|
|
1661
|
+
],
|
|
1662
|
+
[
|
|
1663
|
+
11,
|
|
1664
|
+
36,
|
|
1665
|
+
16,
|
|
1666
|
+
5,
|
|
1667
|
+
37,
|
|
1668
|
+
17
|
|
1669
|
+
],
|
|
1670
|
+
[
|
|
1671
|
+
11,
|
|
1672
|
+
36,
|
|
1673
|
+
12,
|
|
1674
|
+
5,
|
|
1675
|
+
37,
|
|
1676
|
+
13
|
|
1677
|
+
],
|
|
1678
|
+
[
|
|
1679
|
+
5,
|
|
1680
|
+
109,
|
|
1681
|
+
87,
|
|
1682
|
+
1,
|
|
1683
|
+
110,
|
|
1684
|
+
88
|
|
1685
|
+
],
|
|
1686
|
+
[
|
|
1687
|
+
5,
|
|
1688
|
+
65,
|
|
1689
|
+
41,
|
|
1690
|
+
5,
|
|
1691
|
+
66,
|
|
1692
|
+
42
|
|
1693
|
+
],
|
|
1694
|
+
[
|
|
1695
|
+
5,
|
|
1696
|
+
54,
|
|
1697
|
+
24,
|
|
1698
|
+
7,
|
|
1699
|
+
55,
|
|
1700
|
+
25
|
|
1701
|
+
],
|
|
1702
|
+
[
|
|
1703
|
+
11,
|
|
1704
|
+
36,
|
|
1705
|
+
12,
|
|
1706
|
+
7,
|
|
1707
|
+
37,
|
|
1708
|
+
13
|
|
1709
|
+
],
|
|
1710
|
+
[
|
|
1711
|
+
5,
|
|
1712
|
+
122,
|
|
1713
|
+
98,
|
|
1714
|
+
1,
|
|
1715
|
+
123,
|
|
1716
|
+
99
|
|
1717
|
+
],
|
|
1718
|
+
[
|
|
1719
|
+
7,
|
|
1720
|
+
73,
|
|
1721
|
+
45,
|
|
1722
|
+
3,
|
|
1723
|
+
74,
|
|
1724
|
+
46
|
|
1725
|
+
],
|
|
1726
|
+
[
|
|
1727
|
+
15,
|
|
1728
|
+
43,
|
|
1729
|
+
19,
|
|
1730
|
+
2,
|
|
1731
|
+
44,
|
|
1732
|
+
20
|
|
1733
|
+
],
|
|
1734
|
+
[
|
|
1735
|
+
3,
|
|
1736
|
+
45,
|
|
1737
|
+
15,
|
|
1738
|
+
13,
|
|
1739
|
+
46,
|
|
1740
|
+
16
|
|
1741
|
+
],
|
|
1742
|
+
[
|
|
1743
|
+
1,
|
|
1744
|
+
135,
|
|
1745
|
+
107,
|
|
1746
|
+
5,
|
|
1747
|
+
136,
|
|
1748
|
+
108
|
|
1749
|
+
],
|
|
1750
|
+
[
|
|
1751
|
+
10,
|
|
1752
|
+
74,
|
|
1753
|
+
46,
|
|
1754
|
+
1,
|
|
1755
|
+
75,
|
|
1756
|
+
47
|
|
1757
|
+
],
|
|
1758
|
+
[
|
|
1759
|
+
1,
|
|
1760
|
+
50,
|
|
1761
|
+
22,
|
|
1762
|
+
15,
|
|
1763
|
+
51,
|
|
1764
|
+
23
|
|
1765
|
+
],
|
|
1766
|
+
[
|
|
1767
|
+
2,
|
|
1768
|
+
42,
|
|
1769
|
+
14,
|
|
1770
|
+
17,
|
|
1771
|
+
43,
|
|
1772
|
+
15
|
|
1773
|
+
],
|
|
1774
|
+
[
|
|
1775
|
+
5,
|
|
1776
|
+
150,
|
|
1777
|
+
120,
|
|
1778
|
+
1,
|
|
1779
|
+
151,
|
|
1780
|
+
121
|
|
1781
|
+
],
|
|
1782
|
+
[
|
|
1783
|
+
9,
|
|
1784
|
+
69,
|
|
1785
|
+
43,
|
|
1786
|
+
4,
|
|
1787
|
+
70,
|
|
1788
|
+
44
|
|
1789
|
+
],
|
|
1790
|
+
[
|
|
1791
|
+
17,
|
|
1792
|
+
50,
|
|
1793
|
+
22,
|
|
1794
|
+
1,
|
|
1795
|
+
51,
|
|
1796
|
+
23
|
|
1797
|
+
],
|
|
1798
|
+
[
|
|
1799
|
+
2,
|
|
1800
|
+
42,
|
|
1801
|
+
14,
|
|
1802
|
+
19,
|
|
1803
|
+
43,
|
|
1804
|
+
15
|
|
1805
|
+
],
|
|
1806
|
+
[
|
|
1807
|
+
3,
|
|
1808
|
+
141,
|
|
1809
|
+
113,
|
|
1810
|
+
4,
|
|
1811
|
+
142,
|
|
1812
|
+
114
|
|
1813
|
+
],
|
|
1814
|
+
[
|
|
1815
|
+
3,
|
|
1816
|
+
70,
|
|
1817
|
+
44,
|
|
1818
|
+
11,
|
|
1819
|
+
71,
|
|
1820
|
+
45
|
|
1821
|
+
],
|
|
1822
|
+
[
|
|
1823
|
+
17,
|
|
1824
|
+
47,
|
|
1825
|
+
21,
|
|
1826
|
+
4,
|
|
1827
|
+
48,
|
|
1828
|
+
22
|
|
1829
|
+
],
|
|
1830
|
+
[
|
|
1831
|
+
9,
|
|
1832
|
+
39,
|
|
1833
|
+
13,
|
|
1834
|
+
16,
|
|
1835
|
+
40,
|
|
1836
|
+
14
|
|
1837
|
+
],
|
|
1838
|
+
[
|
|
1839
|
+
3,
|
|
1840
|
+
135,
|
|
1841
|
+
107,
|
|
1842
|
+
5,
|
|
1843
|
+
136,
|
|
1844
|
+
108
|
|
1845
|
+
],
|
|
1846
|
+
[
|
|
1847
|
+
3,
|
|
1848
|
+
67,
|
|
1849
|
+
41,
|
|
1850
|
+
13,
|
|
1851
|
+
68,
|
|
1852
|
+
42
|
|
1853
|
+
],
|
|
1854
|
+
[
|
|
1855
|
+
15,
|
|
1856
|
+
54,
|
|
1857
|
+
24,
|
|
1858
|
+
5,
|
|
1859
|
+
55,
|
|
1860
|
+
25
|
|
1861
|
+
],
|
|
1862
|
+
[
|
|
1863
|
+
15,
|
|
1864
|
+
43,
|
|
1865
|
+
15,
|
|
1866
|
+
10,
|
|
1867
|
+
44,
|
|
1868
|
+
16
|
|
1869
|
+
],
|
|
1870
|
+
[
|
|
1871
|
+
4,
|
|
1872
|
+
144,
|
|
1873
|
+
116,
|
|
1874
|
+
4,
|
|
1875
|
+
145,
|
|
1876
|
+
117
|
|
1877
|
+
],
|
|
1878
|
+
[
|
|
1879
|
+
17,
|
|
1880
|
+
68,
|
|
1881
|
+
42
|
|
1882
|
+
],
|
|
1883
|
+
[
|
|
1884
|
+
17,
|
|
1885
|
+
50,
|
|
1886
|
+
22,
|
|
1887
|
+
6,
|
|
1888
|
+
51,
|
|
1889
|
+
23
|
|
1890
|
+
],
|
|
1891
|
+
[
|
|
1892
|
+
19,
|
|
1893
|
+
46,
|
|
1894
|
+
16,
|
|
1895
|
+
6,
|
|
1896
|
+
47,
|
|
1897
|
+
17
|
|
1898
|
+
],
|
|
1899
|
+
[
|
|
1900
|
+
2,
|
|
1901
|
+
139,
|
|
1902
|
+
111,
|
|
1903
|
+
7,
|
|
1904
|
+
140,
|
|
1905
|
+
112
|
|
1906
|
+
],
|
|
1907
|
+
[
|
|
1908
|
+
17,
|
|
1909
|
+
74,
|
|
1910
|
+
46
|
|
1911
|
+
],
|
|
1912
|
+
[
|
|
1913
|
+
7,
|
|
1914
|
+
54,
|
|
1915
|
+
24,
|
|
1916
|
+
16,
|
|
1917
|
+
55,
|
|
1918
|
+
25
|
|
1919
|
+
],
|
|
1920
|
+
[
|
|
1921
|
+
34,
|
|
1922
|
+
37,
|
|
1923
|
+
13
|
|
1924
|
+
],
|
|
1925
|
+
[
|
|
1926
|
+
4,
|
|
1927
|
+
151,
|
|
1928
|
+
121,
|
|
1929
|
+
5,
|
|
1930
|
+
152,
|
|
1931
|
+
122
|
|
1932
|
+
],
|
|
1933
|
+
[
|
|
1934
|
+
4,
|
|
1935
|
+
75,
|
|
1936
|
+
47,
|
|
1937
|
+
14,
|
|
1938
|
+
76,
|
|
1939
|
+
48
|
|
1940
|
+
],
|
|
1941
|
+
[
|
|
1942
|
+
11,
|
|
1943
|
+
54,
|
|
1944
|
+
24,
|
|
1945
|
+
14,
|
|
1946
|
+
55,
|
|
1947
|
+
25
|
|
1948
|
+
],
|
|
1949
|
+
[
|
|
1950
|
+
16,
|
|
1951
|
+
45,
|
|
1952
|
+
15,
|
|
1953
|
+
14,
|
|
1954
|
+
46,
|
|
1955
|
+
16
|
|
1956
|
+
],
|
|
1957
|
+
[
|
|
1958
|
+
6,
|
|
1959
|
+
147,
|
|
1960
|
+
117,
|
|
1961
|
+
4,
|
|
1962
|
+
148,
|
|
1963
|
+
118
|
|
1964
|
+
],
|
|
1965
|
+
[
|
|
1966
|
+
6,
|
|
1967
|
+
73,
|
|
1968
|
+
45,
|
|
1969
|
+
14,
|
|
1970
|
+
74,
|
|
1971
|
+
46
|
|
1972
|
+
],
|
|
1973
|
+
[
|
|
1974
|
+
11,
|
|
1975
|
+
54,
|
|
1976
|
+
24,
|
|
1977
|
+
16,
|
|
1978
|
+
55,
|
|
1979
|
+
25
|
|
1980
|
+
],
|
|
1981
|
+
[
|
|
1982
|
+
30,
|
|
1983
|
+
46,
|
|
1984
|
+
16,
|
|
1985
|
+
2,
|
|
1986
|
+
47,
|
|
1987
|
+
17
|
|
1988
|
+
],
|
|
1989
|
+
[
|
|
1990
|
+
8,
|
|
1991
|
+
132,
|
|
1992
|
+
106,
|
|
1993
|
+
4,
|
|
1994
|
+
133,
|
|
1995
|
+
107
|
|
1996
|
+
],
|
|
1997
|
+
[
|
|
1998
|
+
8,
|
|
1999
|
+
75,
|
|
2000
|
+
47,
|
|
2001
|
+
13,
|
|
2002
|
+
76,
|
|
2003
|
+
48
|
|
2004
|
+
],
|
|
2005
|
+
[
|
|
2006
|
+
7,
|
|
2007
|
+
54,
|
|
2008
|
+
24,
|
|
2009
|
+
22,
|
|
2010
|
+
55,
|
|
2011
|
+
25
|
|
2012
|
+
],
|
|
2013
|
+
[
|
|
2014
|
+
22,
|
|
2015
|
+
45,
|
|
2016
|
+
15,
|
|
2017
|
+
13,
|
|
2018
|
+
46,
|
|
2019
|
+
16
|
|
2020
|
+
],
|
|
2021
|
+
[
|
|
2022
|
+
10,
|
|
2023
|
+
142,
|
|
2024
|
+
114,
|
|
2025
|
+
2,
|
|
2026
|
+
143,
|
|
2027
|
+
115
|
|
2028
|
+
],
|
|
2029
|
+
[
|
|
2030
|
+
19,
|
|
2031
|
+
74,
|
|
2032
|
+
46,
|
|
2033
|
+
4,
|
|
2034
|
+
75,
|
|
2035
|
+
47
|
|
2036
|
+
],
|
|
2037
|
+
[
|
|
2038
|
+
28,
|
|
2039
|
+
50,
|
|
2040
|
+
22,
|
|
2041
|
+
6,
|
|
2042
|
+
51,
|
|
2043
|
+
23
|
|
2044
|
+
],
|
|
2045
|
+
[
|
|
2046
|
+
33,
|
|
2047
|
+
46,
|
|
2048
|
+
16,
|
|
2049
|
+
4,
|
|
2050
|
+
47,
|
|
2051
|
+
17
|
|
2052
|
+
],
|
|
2053
|
+
[
|
|
2054
|
+
8,
|
|
2055
|
+
152,
|
|
2056
|
+
122,
|
|
2057
|
+
4,
|
|
2058
|
+
153,
|
|
2059
|
+
123
|
|
2060
|
+
],
|
|
2061
|
+
[
|
|
2062
|
+
22,
|
|
2063
|
+
73,
|
|
2064
|
+
45,
|
|
2065
|
+
3,
|
|
2066
|
+
74,
|
|
2067
|
+
46
|
|
2068
|
+
],
|
|
2069
|
+
[
|
|
2070
|
+
8,
|
|
2071
|
+
53,
|
|
2072
|
+
23,
|
|
2073
|
+
26,
|
|
2074
|
+
54,
|
|
2075
|
+
24
|
|
2076
|
+
],
|
|
2077
|
+
[
|
|
2078
|
+
12,
|
|
2079
|
+
45,
|
|
2080
|
+
15,
|
|
2081
|
+
28,
|
|
2082
|
+
46,
|
|
2083
|
+
16
|
|
2084
|
+
],
|
|
2085
|
+
[
|
|
2086
|
+
3,
|
|
2087
|
+
147,
|
|
2088
|
+
117,
|
|
2089
|
+
10,
|
|
2090
|
+
148,
|
|
2091
|
+
118
|
|
2092
|
+
],
|
|
2093
|
+
[
|
|
2094
|
+
3,
|
|
2095
|
+
73,
|
|
2096
|
+
45,
|
|
2097
|
+
23,
|
|
2098
|
+
74,
|
|
2099
|
+
46
|
|
2100
|
+
],
|
|
2101
|
+
[
|
|
2102
|
+
4,
|
|
2103
|
+
54,
|
|
2104
|
+
24,
|
|
2105
|
+
31,
|
|
2106
|
+
55,
|
|
2107
|
+
25
|
|
2108
|
+
],
|
|
2109
|
+
[
|
|
2110
|
+
11,
|
|
2111
|
+
45,
|
|
2112
|
+
15,
|
|
2113
|
+
31,
|
|
2114
|
+
46,
|
|
2115
|
+
16
|
|
2116
|
+
],
|
|
2117
|
+
[
|
|
2118
|
+
7,
|
|
2119
|
+
146,
|
|
2120
|
+
116,
|
|
2121
|
+
7,
|
|
2122
|
+
147,
|
|
2123
|
+
117
|
|
2124
|
+
],
|
|
2125
|
+
[
|
|
2126
|
+
21,
|
|
2127
|
+
73,
|
|
2128
|
+
45,
|
|
2129
|
+
7,
|
|
2130
|
+
74,
|
|
2131
|
+
46
|
|
2132
|
+
],
|
|
2133
|
+
[
|
|
2134
|
+
1,
|
|
2135
|
+
53,
|
|
2136
|
+
23,
|
|
2137
|
+
37,
|
|
2138
|
+
54,
|
|
2139
|
+
24
|
|
2140
|
+
],
|
|
2141
|
+
[
|
|
2142
|
+
19,
|
|
2143
|
+
45,
|
|
2144
|
+
15,
|
|
2145
|
+
26,
|
|
2146
|
+
46,
|
|
2147
|
+
16
|
|
2148
|
+
],
|
|
2149
|
+
[
|
|
2150
|
+
5,
|
|
2151
|
+
145,
|
|
2152
|
+
115,
|
|
2153
|
+
10,
|
|
2154
|
+
146,
|
|
2155
|
+
116
|
|
2156
|
+
],
|
|
2157
|
+
[
|
|
2158
|
+
19,
|
|
2159
|
+
75,
|
|
2160
|
+
47,
|
|
2161
|
+
10,
|
|
2162
|
+
76,
|
|
2163
|
+
48
|
|
2164
|
+
],
|
|
2165
|
+
[
|
|
2166
|
+
15,
|
|
2167
|
+
54,
|
|
2168
|
+
24,
|
|
2169
|
+
25,
|
|
2170
|
+
55,
|
|
2171
|
+
25
|
|
2172
|
+
],
|
|
2173
|
+
[
|
|
2174
|
+
23,
|
|
2175
|
+
45,
|
|
2176
|
+
15,
|
|
2177
|
+
25,
|
|
2178
|
+
46,
|
|
2179
|
+
16
|
|
2180
|
+
],
|
|
2181
|
+
[
|
|
2182
|
+
13,
|
|
2183
|
+
145,
|
|
2184
|
+
115,
|
|
2185
|
+
3,
|
|
2186
|
+
146,
|
|
2187
|
+
116
|
|
2188
|
+
],
|
|
2189
|
+
[
|
|
2190
|
+
2,
|
|
2191
|
+
74,
|
|
2192
|
+
46,
|
|
2193
|
+
29,
|
|
2194
|
+
75,
|
|
2195
|
+
47
|
|
2196
|
+
],
|
|
2197
|
+
[
|
|
2198
|
+
42,
|
|
2199
|
+
54,
|
|
2200
|
+
24,
|
|
2201
|
+
1,
|
|
2202
|
+
55,
|
|
2203
|
+
25
|
|
2204
|
+
],
|
|
2205
|
+
[
|
|
2206
|
+
23,
|
|
2207
|
+
45,
|
|
2208
|
+
15,
|
|
2209
|
+
28,
|
|
2210
|
+
46,
|
|
2211
|
+
16
|
|
2212
|
+
],
|
|
2213
|
+
[
|
|
2214
|
+
17,
|
|
2215
|
+
145,
|
|
2216
|
+
115
|
|
2217
|
+
],
|
|
2218
|
+
[
|
|
2219
|
+
10,
|
|
2220
|
+
74,
|
|
2221
|
+
46,
|
|
2222
|
+
23,
|
|
2223
|
+
75,
|
|
2224
|
+
47
|
|
2225
|
+
],
|
|
2226
|
+
[
|
|
2227
|
+
10,
|
|
2228
|
+
54,
|
|
2229
|
+
24,
|
|
2230
|
+
35,
|
|
2231
|
+
55,
|
|
2232
|
+
25
|
|
2233
|
+
],
|
|
2234
|
+
[
|
|
2235
|
+
19,
|
|
2236
|
+
45,
|
|
2237
|
+
15,
|
|
2238
|
+
35,
|
|
2239
|
+
46,
|
|
2240
|
+
16
|
|
2241
|
+
],
|
|
2242
|
+
[
|
|
2243
|
+
17,
|
|
2244
|
+
145,
|
|
2245
|
+
115,
|
|
2246
|
+
1,
|
|
2247
|
+
146,
|
|
2248
|
+
116
|
|
2249
|
+
],
|
|
2250
|
+
[
|
|
2251
|
+
14,
|
|
2252
|
+
74,
|
|
2253
|
+
46,
|
|
2254
|
+
21,
|
|
2255
|
+
75,
|
|
2256
|
+
47
|
|
2257
|
+
],
|
|
2258
|
+
[
|
|
2259
|
+
29,
|
|
2260
|
+
54,
|
|
2261
|
+
24,
|
|
2262
|
+
19,
|
|
2263
|
+
55,
|
|
2264
|
+
25
|
|
2265
|
+
],
|
|
2266
|
+
[
|
|
2267
|
+
11,
|
|
2268
|
+
45,
|
|
2269
|
+
15,
|
|
2270
|
+
46,
|
|
2271
|
+
46,
|
|
2272
|
+
16
|
|
2273
|
+
],
|
|
2274
|
+
[
|
|
2275
|
+
13,
|
|
2276
|
+
145,
|
|
2277
|
+
115,
|
|
2278
|
+
6,
|
|
2279
|
+
146,
|
|
2280
|
+
116
|
|
2281
|
+
],
|
|
2282
|
+
[
|
|
2283
|
+
14,
|
|
2284
|
+
74,
|
|
2285
|
+
46,
|
|
2286
|
+
23,
|
|
2287
|
+
75,
|
|
2288
|
+
47
|
|
2289
|
+
],
|
|
2290
|
+
[
|
|
2291
|
+
44,
|
|
2292
|
+
54,
|
|
2293
|
+
24,
|
|
2294
|
+
7,
|
|
2295
|
+
55,
|
|
2296
|
+
25
|
|
2297
|
+
],
|
|
2298
|
+
[
|
|
2299
|
+
59,
|
|
2300
|
+
46,
|
|
2301
|
+
16,
|
|
2302
|
+
1,
|
|
2303
|
+
47,
|
|
2304
|
+
17
|
|
2305
|
+
],
|
|
2306
|
+
[
|
|
2307
|
+
12,
|
|
2308
|
+
151,
|
|
2309
|
+
121,
|
|
2310
|
+
7,
|
|
2311
|
+
152,
|
|
2312
|
+
122
|
|
2313
|
+
],
|
|
2314
|
+
[
|
|
2315
|
+
12,
|
|
2316
|
+
75,
|
|
2317
|
+
47,
|
|
2318
|
+
26,
|
|
2319
|
+
76,
|
|
2320
|
+
48
|
|
2321
|
+
],
|
|
2322
|
+
[
|
|
2323
|
+
39,
|
|
2324
|
+
54,
|
|
2325
|
+
24,
|
|
2326
|
+
14,
|
|
2327
|
+
55,
|
|
2328
|
+
25
|
|
2329
|
+
],
|
|
2330
|
+
[
|
|
2331
|
+
22,
|
|
2332
|
+
45,
|
|
2333
|
+
15,
|
|
2334
|
+
41,
|
|
2335
|
+
46,
|
|
2336
|
+
16
|
|
2337
|
+
],
|
|
2338
|
+
[
|
|
2339
|
+
6,
|
|
2340
|
+
151,
|
|
2341
|
+
121,
|
|
2342
|
+
14,
|
|
2343
|
+
152,
|
|
2344
|
+
122
|
|
2345
|
+
],
|
|
2346
|
+
[
|
|
2347
|
+
6,
|
|
2348
|
+
75,
|
|
2349
|
+
47,
|
|
2350
|
+
34,
|
|
2351
|
+
76,
|
|
2352
|
+
48
|
|
2353
|
+
],
|
|
2354
|
+
[
|
|
2355
|
+
46,
|
|
2356
|
+
54,
|
|
2357
|
+
24,
|
|
2358
|
+
10,
|
|
2359
|
+
55,
|
|
2360
|
+
25
|
|
2361
|
+
],
|
|
2362
|
+
[
|
|
2363
|
+
2,
|
|
2364
|
+
45,
|
|
2365
|
+
15,
|
|
2366
|
+
64,
|
|
2367
|
+
46,
|
|
2368
|
+
16
|
|
2369
|
+
],
|
|
2370
|
+
[
|
|
2371
|
+
17,
|
|
2372
|
+
152,
|
|
2373
|
+
122,
|
|
2374
|
+
4,
|
|
2375
|
+
153,
|
|
2376
|
+
123
|
|
2377
|
+
],
|
|
2378
|
+
[
|
|
2379
|
+
29,
|
|
2380
|
+
74,
|
|
2381
|
+
46,
|
|
2382
|
+
14,
|
|
2383
|
+
75,
|
|
2384
|
+
47
|
|
2385
|
+
],
|
|
2386
|
+
[
|
|
2387
|
+
49,
|
|
2388
|
+
54,
|
|
2389
|
+
24,
|
|
2390
|
+
10,
|
|
2391
|
+
55,
|
|
2392
|
+
25
|
|
2393
|
+
],
|
|
2394
|
+
[
|
|
2395
|
+
24,
|
|
2396
|
+
45,
|
|
2397
|
+
15,
|
|
2398
|
+
46,
|
|
2399
|
+
46,
|
|
2400
|
+
16
|
|
2401
|
+
],
|
|
2402
|
+
[
|
|
2403
|
+
4,
|
|
2404
|
+
152,
|
|
2405
|
+
122,
|
|
2406
|
+
18,
|
|
2407
|
+
153,
|
|
2408
|
+
123
|
|
2409
|
+
],
|
|
2410
|
+
[
|
|
2411
|
+
13,
|
|
2412
|
+
74,
|
|
2413
|
+
46,
|
|
2414
|
+
32,
|
|
2415
|
+
75,
|
|
2416
|
+
47
|
|
2417
|
+
],
|
|
2418
|
+
[
|
|
2419
|
+
48,
|
|
2420
|
+
54,
|
|
2421
|
+
24,
|
|
2422
|
+
14,
|
|
2423
|
+
55,
|
|
2424
|
+
25
|
|
2425
|
+
],
|
|
2426
|
+
[
|
|
2427
|
+
42,
|
|
2428
|
+
45,
|
|
2429
|
+
15,
|
|
2430
|
+
32,
|
|
2431
|
+
46,
|
|
2432
|
+
16
|
|
2433
|
+
],
|
|
2434
|
+
[
|
|
2435
|
+
20,
|
|
2436
|
+
147,
|
|
2437
|
+
117,
|
|
2438
|
+
4,
|
|
2439
|
+
148,
|
|
2440
|
+
118
|
|
2441
|
+
],
|
|
2442
|
+
[
|
|
2443
|
+
40,
|
|
2444
|
+
75,
|
|
2445
|
+
47,
|
|
2446
|
+
7,
|
|
2447
|
+
76,
|
|
2448
|
+
48
|
|
2449
|
+
],
|
|
2450
|
+
[
|
|
2451
|
+
43,
|
|
2452
|
+
54,
|
|
2453
|
+
24,
|
|
2454
|
+
22,
|
|
2455
|
+
55,
|
|
2456
|
+
25
|
|
2457
|
+
],
|
|
2458
|
+
[
|
|
2459
|
+
10,
|
|
2460
|
+
45,
|
|
2461
|
+
15,
|
|
2462
|
+
67,
|
|
2463
|
+
46,
|
|
2464
|
+
16
|
|
2465
|
+
],
|
|
2466
|
+
[
|
|
2467
|
+
19,
|
|
2468
|
+
148,
|
|
2469
|
+
118,
|
|
2470
|
+
6,
|
|
2471
|
+
149,
|
|
2472
|
+
119
|
|
2473
|
+
],
|
|
2474
|
+
[
|
|
2475
|
+
18,
|
|
2476
|
+
75,
|
|
2477
|
+
47,
|
|
2478
|
+
31,
|
|
2479
|
+
76,
|
|
2480
|
+
48
|
|
2481
|
+
],
|
|
2482
|
+
[
|
|
2483
|
+
34,
|
|
2484
|
+
54,
|
|
2485
|
+
24,
|
|
2486
|
+
34,
|
|
2487
|
+
55,
|
|
2488
|
+
25
|
|
2489
|
+
],
|
|
2490
|
+
[
|
|
2491
|
+
20,
|
|
2492
|
+
45,
|
|
2493
|
+
15,
|
|
2494
|
+
61,
|
|
2495
|
+
46,
|
|
2496
|
+
16
|
|
2497
|
+
]
|
|
2498
|
+
], t = function(e, t) {
|
|
2499
|
+
let n = {};
|
|
2500
|
+
return n.totalCount = e, n.dataCount = t, n;
|
|
2501
|
+
}, n = {}, r = function(t, n) {
|
|
2502
|
+
switch (n) {
|
|
2503
|
+
case q.L: return e[(t - 1) * 4 + 0];
|
|
2504
|
+
case q.M: return e[(t - 1) * 4 + 1];
|
|
2505
|
+
case q.Q: return e[(t - 1) * 4 + 2];
|
|
2506
|
+
case q.H: return e[(t - 1) * 4 + 3];
|
|
2507
|
+
default: return;
|
|
2508
|
+
}
|
|
2509
|
+
};
|
|
2510
|
+
return n.getRSBlocks = function(e, n) {
|
|
2511
|
+
let i = r(e, n);
|
|
2512
|
+
if (i === void 0) throw "bad rs block @ typeNumber:" + e + "/errorCorrectionLevel:" + n;
|
|
2513
|
+
let a = i.length / 3, o = [];
|
|
2514
|
+
for (let e = 0; e < a; e += 1) {
|
|
2515
|
+
let n = i[e * 3 + 0], r = i[e * 3 + 1], a = i[e * 3 + 2];
|
|
2516
|
+
for (let e = 0; e < n; e += 1) o.push(t(r, a));
|
|
2517
|
+
}
|
|
2518
|
+
return o;
|
|
2519
|
+
}, n;
|
|
2520
|
+
}(), se = function() {
|
|
2521
|
+
let e = [], t = 0, n = {};
|
|
2522
|
+
return n.getBuffer = function() {
|
|
2523
|
+
return e;
|
|
2524
|
+
}, n.getAt = function(t) {
|
|
2525
|
+
return (e[Math.floor(t / 8)] >>> 7 - t % 8 & 1) == 1;
|
|
2526
|
+
}, n.put = function(e, t) {
|
|
2527
|
+
for (let r = 0; r < t; r += 1) n.putBit((e >>> t - r - 1 & 1) == 1);
|
|
2528
|
+
}, n.getLengthInBits = function() {
|
|
2529
|
+
return t;
|
|
2530
|
+
}, n.putBit = function(n) {
|
|
2531
|
+
let r = Math.floor(t / 8);
|
|
2532
|
+
e.length <= r && e.push(0), n && (e[r] |= 128 >>> t % 8), t += 1;
|
|
2533
|
+
}, n;
|
|
2534
|
+
}, ce = function(e) {
|
|
2535
|
+
let t = K.MODE_NUMBER, n = e, r = {};
|
|
2536
|
+
r.getMode = function() {
|
|
2537
|
+
return t;
|
|
2538
|
+
}, r.getLength = function(e) {
|
|
2539
|
+
return n.length;
|
|
2540
|
+
}, r.write = function(e) {
|
|
2541
|
+
let t = n, r = 0;
|
|
2542
|
+
for (; r + 2 < t.length;) e.put(i(t.substring(r, r + 3)), 10), r += 3;
|
|
2543
|
+
r < t.length && (t.length - r == 1 ? e.put(i(t.substring(r, r + 1)), 4) : t.length - r == 2 && e.put(i(t.substring(r, r + 2)), 7));
|
|
2544
|
+
};
|
|
2545
|
+
let i = function(e) {
|
|
2546
|
+
let t = 0;
|
|
2547
|
+
for (let n = 0; n < e.length; n += 1) t = t * 10 + a(e.charAt(n));
|
|
2548
|
+
return t;
|
|
2549
|
+
}, a = function(e) {
|
|
2550
|
+
if ("0" <= e && e <= "9") return e.charCodeAt(0) - 48;
|
|
2551
|
+
throw "illegal char :" + e;
|
|
2552
|
+
};
|
|
2553
|
+
return r;
|
|
2554
|
+
}, le = function(e) {
|
|
2555
|
+
let t = K.MODE_ALPHA_NUM, n = e, r = {};
|
|
2556
|
+
r.getMode = function() {
|
|
2557
|
+
return t;
|
|
2558
|
+
}, r.getLength = function(e) {
|
|
2559
|
+
return n.length;
|
|
2560
|
+
}, r.write = function(e) {
|
|
2561
|
+
let t = n, r = 0;
|
|
2562
|
+
for (; r + 1 < t.length;) e.put(i(t.charAt(r)) * 45 + i(t.charAt(r + 1)), 11), r += 2;
|
|
2563
|
+
r < t.length && e.put(i(t.charAt(r)), 6);
|
|
2564
|
+
};
|
|
2565
|
+
let i = function(e) {
|
|
2566
|
+
if ("0" <= e && e <= "9") return e.charCodeAt(0) - 48;
|
|
2567
|
+
if ("A" <= e && e <= "Z") return e.charCodeAt(0) - 65 + 10;
|
|
2568
|
+
switch (e) {
|
|
2569
|
+
case " ": return 36;
|
|
2570
|
+
case "$": return 37;
|
|
2571
|
+
case "%": return 38;
|
|
2572
|
+
case "*": return 39;
|
|
2573
|
+
case "+": return 40;
|
|
2574
|
+
case "-": return 41;
|
|
2575
|
+
case ".": return 42;
|
|
2576
|
+
case "/": return 43;
|
|
2577
|
+
case ":": return 44;
|
|
2578
|
+
default: throw "illegal char :" + e;
|
|
2579
|
+
}
|
|
2580
|
+
};
|
|
2581
|
+
return r;
|
|
2582
|
+
}, ue = function(e) {
|
|
2583
|
+
let t = K.MODE_8BIT_BYTE, n = G.stringToBytes(e), r = {};
|
|
2584
|
+
return r.getMode = function() {
|
|
2585
|
+
return t;
|
|
2586
|
+
}, r.getLength = function(e) {
|
|
2587
|
+
return n.length;
|
|
2588
|
+
}, r.write = function(e) {
|
|
2589
|
+
for (let t = 0; t < n.length; t += 1) e.put(n[t], 8);
|
|
2590
|
+
}, r;
|
|
2591
|
+
}, de = function(e) {
|
|
2592
|
+
let t = K.MODE_KANJI, n = G.stringToBytes;
|
|
2593
|
+
(function(e, t) {
|
|
2594
|
+
let r = n(e);
|
|
2595
|
+
if (r.length != 2 || (r[0] << 8 | r[1]) != t) throw "sjis not supported.";
|
|
2596
|
+
})("友", 38726);
|
|
2597
|
+
let r = n(e), i = {};
|
|
2598
|
+
return i.getMode = function() {
|
|
2599
|
+
return t;
|
|
2600
|
+
}, i.getLength = function(e) {
|
|
2601
|
+
return ~~(r.length / 2);
|
|
2602
|
+
}, i.write = function(e) {
|
|
2603
|
+
let t = r, n = 0;
|
|
2604
|
+
for (; n + 1 < t.length;) {
|
|
2605
|
+
let r = (255 & t[n]) << 8 | 255 & t[n + 1];
|
|
2606
|
+
if (33088 <= r && r <= 40956) r -= 33088;
|
|
2607
|
+
else if (57408 <= r && r <= 60351) r -= 49472;
|
|
2608
|
+
else throw "illegal char at " + (n + 1) + "/" + r;
|
|
2609
|
+
r = (r >>> 8 & 255) * 192 + (r & 255), e.put(r, 13), n += 2;
|
|
2610
|
+
}
|
|
2611
|
+
if (n < t.length) throw "illegal char at " + (n + 1);
|
|
2612
|
+
}, i;
|
|
2613
|
+
}, fe = function() {
|
|
2614
|
+
let e = [], t = {};
|
|
2615
|
+
return t.writeByte = function(t) {
|
|
2616
|
+
e.push(t & 255);
|
|
2617
|
+
}, t.writeShort = function(e) {
|
|
2618
|
+
t.writeByte(e), t.writeByte(e >>> 8);
|
|
2619
|
+
}, t.writeBytes = function(e, n, r) {
|
|
2620
|
+
n ||= 0, r ||= e.length;
|
|
2621
|
+
for (let i = 0; i < r; i += 1) t.writeByte(e[i + n]);
|
|
2622
|
+
}, t.writeString = function(e) {
|
|
2623
|
+
for (let n = 0; n < e.length; n += 1) t.writeByte(e.charCodeAt(n));
|
|
2624
|
+
}, t.toByteArray = function() {
|
|
2625
|
+
return e;
|
|
2626
|
+
}, t.toString = function() {
|
|
2627
|
+
let t = "";
|
|
2628
|
+
t += "[";
|
|
2629
|
+
for (let n = 0; n < e.length; n += 1) n > 0 && (t += ","), t += e[n];
|
|
2630
|
+
return t += "]", t;
|
|
2631
|
+
}, t;
|
|
2632
|
+
}, pe = function() {
|
|
2633
|
+
let e = 0, t = 0, n = 0, r = "", i = {}, a = function(e) {
|
|
2634
|
+
r += String.fromCharCode(o(e & 63));
|
|
2635
|
+
}, o = function(e) {
|
|
2636
|
+
if (e < 0) throw "n:" + e;
|
|
2637
|
+
if (e < 26) return 65 + e;
|
|
2638
|
+
if (e < 52) return 97 + (e - 26);
|
|
2639
|
+
if (e < 62) return 48 + (e - 52);
|
|
2640
|
+
if (e == 62) return 43;
|
|
2641
|
+
if (e == 63) return 47;
|
|
2642
|
+
throw "n:" + e;
|
|
2643
|
+
};
|
|
2644
|
+
return i.writeByte = function(r) {
|
|
2645
|
+
for (e = e << 8 | r & 255, t += 8, n += 1; t >= 6;) a(e >>> t - 6), t -= 6;
|
|
2646
|
+
}, i.flush = function() {
|
|
2647
|
+
if (t > 0 && (a(e << 6 - t), e = 0, t = 0), n % 3 != 0) {
|
|
2648
|
+
let e = 3 - n % 3;
|
|
2649
|
+
for (let t = 0; t < e; t += 1) r += "=";
|
|
2650
|
+
}
|
|
2651
|
+
}, i.toString = function() {
|
|
2652
|
+
return r;
|
|
2653
|
+
}, i;
|
|
2654
|
+
}, me = function(e) {
|
|
2655
|
+
let t = e, n = 0, r = 0, i = 0, a = {};
|
|
2656
|
+
a.read = function() {
|
|
2657
|
+
for (; i < 8;) {
|
|
2658
|
+
if (n >= t.length) {
|
|
2659
|
+
if (i == 0) return -1;
|
|
2660
|
+
throw "unexpected end of file./" + i;
|
|
2661
|
+
}
|
|
2662
|
+
let e = t.charAt(n);
|
|
2663
|
+
if (n += 1, e == "=") return i = 0, -1;
|
|
2664
|
+
e.match(/^\s$/) || (r = r << 6 | o(e.charCodeAt(0)), i += 6);
|
|
2665
|
+
}
|
|
2666
|
+
let e = r >>> i - 8 & 255;
|
|
2667
|
+
return i -= 8, e;
|
|
2668
|
+
};
|
|
2669
|
+
let o = function(e) {
|
|
2670
|
+
if (65 <= e && e <= 90) return e - 65;
|
|
2671
|
+
if (97 <= e && e <= 122) return e - 97 + 26;
|
|
2672
|
+
if (48 <= e && e <= 57) return e - 48 + 52;
|
|
2673
|
+
if (e == 43) return 62;
|
|
2674
|
+
if (e == 47) return 63;
|
|
2675
|
+
throw "c:" + e;
|
|
2676
|
+
};
|
|
2677
|
+
return a;
|
|
2678
|
+
}, he = function(e, t) {
|
|
2679
|
+
let n = e, r = t, i = Array(e * t), a = {};
|
|
2680
|
+
a.setPixel = function(e, t, r) {
|
|
2681
|
+
i[t * n + e] = r;
|
|
2682
|
+
}, a.write = function(e) {
|
|
2683
|
+
e.writeString("GIF87a"), e.writeShort(n), e.writeShort(r), e.writeByte(128), e.writeByte(0), e.writeByte(0), e.writeByte(0), e.writeByte(0), e.writeByte(0), e.writeByte(255), e.writeByte(255), e.writeByte(255), e.writeString(","), e.writeShort(0), e.writeShort(0), e.writeShort(n), e.writeShort(r), e.writeByte(0);
|
|
2684
|
+
let t = s(2);
|
|
2685
|
+
e.writeByte(2);
|
|
2686
|
+
let i = 0;
|
|
2687
|
+
for (; t.length - i > 255;) e.writeByte(255), e.writeBytes(t, i, 255), i += 255;
|
|
2688
|
+
e.writeByte(t.length - i), e.writeBytes(t, i, t.length - i), e.writeByte(0), e.writeString(";");
|
|
2689
|
+
};
|
|
2690
|
+
let o = function(e) {
|
|
2691
|
+
let t = e, n = 0, r = 0, i = {};
|
|
2692
|
+
return i.write = function(e, i) {
|
|
2693
|
+
if (e >>> i) throw "length over";
|
|
2694
|
+
for (; n + i >= 8;) t.writeByte(255 & (e << n | r)), i -= 8 - n, e >>>= 8 - n, r = 0, n = 0;
|
|
2695
|
+
r = e << n | r, n += i;
|
|
2696
|
+
}, i.flush = function() {
|
|
2697
|
+
n > 0 && t.writeByte(r);
|
|
2698
|
+
}, i;
|
|
2699
|
+
}, s = function(e) {
|
|
2700
|
+
let t = 1 << e, n = (1 << e) + 1, r = e + 1, a = c();
|
|
2701
|
+
for (let e = 0; e < t; e += 1) a.add(String.fromCharCode(e));
|
|
2702
|
+
a.add(String.fromCharCode(t)), a.add(String.fromCharCode(n));
|
|
2703
|
+
let s = fe(), l = o(s);
|
|
2704
|
+
l.write(t, r);
|
|
2705
|
+
let u = 0, d = String.fromCharCode(i[u]);
|
|
2706
|
+
for (u += 1; u < i.length;) {
|
|
2707
|
+
let e = String.fromCharCode(i[u]);
|
|
2708
|
+
u += 1, a.contains(d + e) ? d += e : (l.write(a.indexOf(d), r), a.size() < 4095 && (a.size() == 1 << r && (r += 1), a.add(d + e)), d = e);
|
|
2709
|
+
}
|
|
2710
|
+
return l.write(a.indexOf(d), r), l.write(n, r), l.flush(), s.toByteArray();
|
|
2711
|
+
}, c = function() {
|
|
2712
|
+
let e = {}, t = 0, n = {};
|
|
2713
|
+
return n.add = function(r) {
|
|
2714
|
+
if (n.contains(r)) throw "dup key:" + r;
|
|
2715
|
+
e[r] = t, t += 1;
|
|
2716
|
+
}, n.size = function() {
|
|
2717
|
+
return t;
|
|
2718
|
+
}, n.indexOf = function(t) {
|
|
2719
|
+
return e[t];
|
|
2720
|
+
}, n.contains = function(t) {
|
|
2721
|
+
return e[t] !== void 0;
|
|
2722
|
+
}, n;
|
|
2723
|
+
};
|
|
2724
|
+
return a;
|
|
2725
|
+
}, ge = function(e, t, n) {
|
|
2726
|
+
let r = he(e, t);
|
|
2727
|
+
for (let i = 0; i < t; i += 1) for (let t = 0; t < e; t += 1) r.setPixel(t, i, n(t, i));
|
|
2728
|
+
let i = fe();
|
|
2729
|
+
r.write(i);
|
|
2730
|
+
let a = pe(), o = i.toByteArray();
|
|
2731
|
+
for (let e = 0; e < o.length; e += 1) a.writeByte(o[e]);
|
|
2732
|
+
return a.flush(), "data:image/gif;base64," + a;
|
|
2733
|
+
};
|
|
2734
|
+
G.stringToBytes;
|
|
2735
|
+
//#endregion
|
|
2736
|
+
//#region ../../node_modules/react-qr-code/lib/index.mjs
|
|
2737
|
+
function Q() {
|
|
2738
|
+
return Q = Object.assign ? Object.assign.bind() : function(e) {
|
|
2739
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
2740
|
+
var n = arguments[t];
|
|
2741
|
+
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
2742
|
+
}
|
|
2743
|
+
return e;
|
|
2744
|
+
}, Q.apply(null, arguments);
|
|
2745
|
+
}
|
|
2746
|
+
function _e(e, t) {
|
|
2747
|
+
if (e == null) return {};
|
|
2748
|
+
var n, r, i = ve(e, t);
|
|
2749
|
+
if (Object.getOwnPropertySymbols) {
|
|
2750
|
+
var a = Object.getOwnPropertySymbols(e);
|
|
2751
|
+
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
|
|
2752
|
+
}
|
|
2753
|
+
return i;
|
|
2754
|
+
}
|
|
2755
|
+
function ve(e, t) {
|
|
2756
|
+
if (e == null) return {};
|
|
2757
|
+
var n = {};
|
|
2758
|
+
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
|
|
2759
|
+
if (t.indexOf(r) !== -1) continue;
|
|
2760
|
+
n[r] = e[r];
|
|
2761
|
+
}
|
|
2762
|
+
return n;
|
|
2763
|
+
}
|
|
2764
|
+
var ye = [
|
|
2765
|
+
"bgColor",
|
|
2766
|
+
"bgD",
|
|
2767
|
+
"fgD",
|
|
2768
|
+
"fgColor",
|
|
2769
|
+
"size",
|
|
2770
|
+
"title",
|
|
2771
|
+
"viewBoxSize",
|
|
2772
|
+
"xmlns"
|
|
2773
|
+
], be = {
|
|
2774
|
+
bgColor: W.default.oneOfType([W.default.object, W.default.string]).isRequired,
|
|
2775
|
+
bgD: W.default.string.isRequired,
|
|
2776
|
+
fgColor: W.default.oneOfType([W.default.object, W.default.string]).isRequired,
|
|
2777
|
+
fgD: W.default.string.isRequired,
|
|
2778
|
+
size: W.default.number.isRequired,
|
|
2779
|
+
title: W.default.string,
|
|
2780
|
+
viewBoxSize: W.default.number.isRequired,
|
|
2781
|
+
xmlns: W.default.string
|
|
2782
|
+
}, $ = /*#__PURE__*/ a(function(e, t) {
|
|
2783
|
+
var n = e.bgColor, r = e.bgD, a = e.fgD, o = e.fgColor, s = e.size, c = e.title, l = e.viewBoxSize, u = e.xmlns, d = u === void 0 ? "http://www.w3.org/2000/svg" : u, f = _e(e, ye);
|
|
2784
|
+
return /*#__PURE__*/ i.createElement("svg", Q({}, f, {
|
|
2785
|
+
height: s,
|
|
2786
|
+
ref: t,
|
|
2787
|
+
viewBox: `0 0 ${l} ${l}`,
|
|
2788
|
+
width: s,
|
|
2789
|
+
xmlns: d
|
|
2790
|
+
}), c ? /*#__PURE__*/ i.createElement("title", null, c) : null, /*#__PURE__*/ i.createElement("path", {
|
|
2791
|
+
d: r,
|
|
2792
|
+
fill: n
|
|
2793
|
+
}), /*#__PURE__*/ i.createElement("path", {
|
|
2794
|
+
d: a,
|
|
2795
|
+
fill: o
|
|
2796
|
+
}));
|
|
2797
|
+
});
|
|
2798
|
+
$.displayName = "QRCodeSvg", $.propTypes = be;
|
|
2799
|
+
var xe = [
|
|
2800
|
+
"bgColor",
|
|
2801
|
+
"fgColor",
|
|
2802
|
+
"level",
|
|
2803
|
+
"size",
|
|
2804
|
+
"value"
|
|
2805
|
+
];
|
|
2806
|
+
G.stringToBytes = function(e) {
|
|
2807
|
+
return Array.from(new TextEncoder().encode(e));
|
|
2808
|
+
};
|
|
2809
|
+
var Se = {
|
|
2810
|
+
bgColor: W.default.oneOfType([W.default.object, W.default.string]),
|
|
2811
|
+
fgColor: W.default.oneOfType([W.default.object, W.default.string]),
|
|
2812
|
+
level: W.default.string,
|
|
2813
|
+
size: W.default.number,
|
|
2814
|
+
value: W.default.string.isRequired
|
|
2815
|
+
}, Ce = /*#__PURE__*/ a(function(e, t) {
|
|
2816
|
+
var n = e.bgColor, r = n === void 0 ? "#FFFFFF" : n, a = e.fgColor, o = a === void 0 ? "#000000" : a, s = e.level, c = s === void 0 ? "L" : s, l = e.size, u = l === void 0 ? 256 : l, d = e.value, f = _e(e, xe), p = G(0, c);
|
|
2817
|
+
p.addData(d), p.make();
|
|
2818
|
+
var m = p.getModuleCount(), h = Array.from({ length: m }, function(e, t) {
|
|
2819
|
+
return Array.from({ length: m }, function(e, n) {
|
|
2820
|
+
return p.isDark(t, n);
|
|
2821
|
+
});
|
|
2822
|
+
});
|
|
2823
|
+
return /*#__PURE__*/ i.createElement($, Q({}, f, {
|
|
2824
|
+
bgColor: r,
|
|
2825
|
+
bgD: h.map(function(e, t) {
|
|
2826
|
+
return e.map(function(e, n) {
|
|
2827
|
+
return e ? "" : `M ${n} ${t} l 1 0 0 1 -1 0 Z`;
|
|
2828
|
+
}).join(" ");
|
|
2829
|
+
}).join(" "),
|
|
2830
|
+
fgColor: o,
|
|
2831
|
+
fgD: h.map(function(e, t) {
|
|
2832
|
+
return e.map(function(e, n) {
|
|
2833
|
+
return e ? `M ${n} ${t} l 1 0 0 1 -1 0 Z` : "";
|
|
2834
|
+
}).join(" ");
|
|
2835
|
+
}).join(" "),
|
|
2836
|
+
ref: t,
|
|
2837
|
+
size: u,
|
|
2838
|
+
viewBoxSize: m
|
|
2839
|
+
}));
|
|
2840
|
+
});
|
|
2841
|
+
Ce.displayName = "QRCode", Ce.propTypes = Se;
|
|
2842
|
+
var we = {
|
|
2843
|
+
container: "_container_hzzl6_1",
|
|
2844
|
+
qrColor: "_qrColor_hzzl6_6"
|
|
2845
|
+
}, Te = ({ value: e, labels: r, styles: i }) => {
|
|
2846
|
+
let { colors: a } = i ?? {}, o = t({
|
|
2847
|
+
"--qr-border": a?.borderColor,
|
|
2848
|
+
"--qr-bg": a?.backgroundColor,
|
|
2849
|
+
"--qr-color": a?.fillColor
|
|
2850
|
+
});
|
|
2851
|
+
return /* @__PURE__ */ S("div", {
|
|
2852
|
+
role: "img",
|
|
2853
|
+
"aria-label": r.ariaLabel,
|
|
2854
|
+
style: o,
|
|
2855
|
+
className: n("flex size-40 items-center justify-center self-center rounded-lg border p-3", we.container),
|
|
2856
|
+
children: /* @__PURE__ */ S(Ce, {
|
|
2857
|
+
value: e,
|
|
2858
|
+
size: 128,
|
|
2859
|
+
bgColor: "transparent",
|
|
2860
|
+
fgColor: "currentColor",
|
|
2861
|
+
"aria-hidden": !0,
|
|
2862
|
+
className: n("size-full", we.qrColor)
|
|
2863
|
+
})
|
|
2864
|
+
});
|
|
2865
|
+
}, Ee = ({ ariaLabel: e, skeletonColor: t = L.skeletonColor }) => /* @__PURE__ */ C("div", {
|
|
2866
|
+
role: "status",
|
|
2867
|
+
"aria-label": e,
|
|
2868
|
+
className: "flex flex-col gap-3",
|
|
2869
|
+
children: [
|
|
2870
|
+
/* @__PURE__ */ C("div", {
|
|
2871
|
+
"aria-hidden": !0,
|
|
2872
|
+
className: "flex items-center gap-2.5",
|
|
2873
|
+
children: [
|
|
2874
|
+
/* @__PURE__ */ S(m, {
|
|
2875
|
+
variant: h.Circular,
|
|
2876
|
+
width: 32,
|
|
2877
|
+
height: 32,
|
|
2878
|
+
color: t
|
|
2879
|
+
}),
|
|
2880
|
+
/* @__PURE__ */ C("div", {
|
|
2881
|
+
className: "flex min-w-0 flex-1 flex-col gap-1.5",
|
|
2882
|
+
children: [/* @__PURE__ */ S(m, {
|
|
2883
|
+
variant: h.Text,
|
|
2884
|
+
width: "70%",
|
|
2885
|
+
height: 16,
|
|
2886
|
+
color: t
|
|
2887
|
+
}), /* @__PURE__ */ S(m, {
|
|
2888
|
+
variant: h.Text,
|
|
2889
|
+
width: "45%",
|
|
2890
|
+
height: 12,
|
|
2891
|
+
color: t
|
|
2892
|
+
})]
|
|
2893
|
+
}),
|
|
2894
|
+
/* @__PURE__ */ S(m, {
|
|
2895
|
+
variant: h.Rectangular,
|
|
2896
|
+
width: 92,
|
|
2897
|
+
height: 30,
|
|
2898
|
+
color: t
|
|
2899
|
+
})
|
|
2900
|
+
]
|
|
2901
|
+
}),
|
|
2902
|
+
/* @__PURE__ */ C("div", {
|
|
2903
|
+
"aria-hidden": !0,
|
|
2904
|
+
className: "flex flex-col gap-1.5",
|
|
2905
|
+
children: [/* @__PURE__ */ S(m, {
|
|
2906
|
+
variant: h.Text,
|
|
2907
|
+
width: "100%",
|
|
2908
|
+
height: 12,
|
|
2909
|
+
color: t
|
|
2910
|
+
}), /* @__PURE__ */ S(m, {
|
|
2911
|
+
variant: h.Text,
|
|
2912
|
+
width: "60%",
|
|
2913
|
+
height: 12,
|
|
2914
|
+
color: t
|
|
2915
|
+
})]
|
|
2916
|
+
}),
|
|
2917
|
+
/* @__PURE__ */ S(m, {
|
|
2918
|
+
"aria-hidden": !0,
|
|
2919
|
+
variant: h.Rectangular,
|
|
2920
|
+
width: "100%",
|
|
2921
|
+
height: 40,
|
|
2922
|
+
color: t
|
|
2923
|
+
}),
|
|
2924
|
+
/* @__PURE__ */ S(m, {
|
|
2925
|
+
"aria-hidden": !0,
|
|
2926
|
+
variant: h.Text,
|
|
2927
|
+
width: "50%",
|
|
2928
|
+
height: 12,
|
|
2929
|
+
color: t
|
|
2930
|
+
})
|
|
2931
|
+
]
|
|
2932
|
+
}), De = "share-popover-qr-button", Oe = "share-popover-back-button", ke = ({ title: e, view: t, qrButtonLabel: r, linkLabel: i, onViewChange: a, titleClassName: o = "dial-small-semi-text" }) => /* @__PURE__ */ C("div", {
|
|
2933
|
+
className: "flex items-center gap-2 px-4 py-3",
|
|
2934
|
+
children: [/* @__PURE__ */ S("span", {
|
|
2935
|
+
className: n(o, L.title),
|
|
2936
|
+
children: e
|
|
2937
|
+
}), t === P.Link ? /* @__PURE__ */ S(f, {
|
|
2938
|
+
id: De,
|
|
2939
|
+
label: r,
|
|
2940
|
+
iconBefore: /* @__PURE__ */ S(y, {
|
|
2941
|
+
size: u.SM,
|
|
2942
|
+
"aria-hidden": !0
|
|
2943
|
+
}),
|
|
2944
|
+
className: "ms-auto",
|
|
2945
|
+
onClick: () => a(P.Qr)
|
|
2946
|
+
}) : /* @__PURE__ */ S(f, {
|
|
2947
|
+
id: Oe,
|
|
2948
|
+
label: i,
|
|
2949
|
+
iconBefore: /* @__PURE__ */ S(v, {
|
|
2950
|
+
size: u.SM,
|
|
2951
|
+
"aria-hidden": !0
|
|
2952
|
+
}),
|
|
2953
|
+
className: "ms-auto",
|
|
2954
|
+
onClick: () => a(P.Link)
|
|
2955
|
+
})]
|
|
2956
|
+
}), Ae = o(({ url: e, isLoading: i, error: a, access: o, canEditAccess: u, onAccessChange: d, onClose: f, labels: p, className: m, styles: h }) => {
|
|
2957
|
+
let g = h?.colors, _ = h?.typography, v = t({
|
|
2958
|
+
"--shp-access-trigger-bg": g?.accessTriggerBackground,
|
|
2959
|
+
"--shp-access-trigger-border": g?.accessTriggerBorder,
|
|
2960
|
+
"--shp-access-trigger-border-hover": g?.accessTriggerBorderHover,
|
|
2961
|
+
"--shp-access-trigger-border-focus": g?.accessTriggerBorderFocus,
|
|
2962
|
+
"--shp-access-trigger-text": g?.accessTriggerText,
|
|
2963
|
+
"--shp-title-text": g?.titleText,
|
|
2964
|
+
"--shp-link-icon-bg": g?.linkIconBackground,
|
|
2965
|
+
"--shp-link-icon-text": g?.linkIconText,
|
|
2966
|
+
"--shp-anyone-title": g?.anyoneTitle,
|
|
2967
|
+
"--shp-anyone-subtitle": g?.anyoneSubtitle,
|
|
2968
|
+
"--shp-access-chevron": g?.accessChevron,
|
|
2969
|
+
"--shp-menu-item-hover": g?.menuItemHover,
|
|
2970
|
+
"--shp-menu-item-focus-shadow": g?.menuItemFocusShadow,
|
|
2971
|
+
"--shp-menu-item-checked-bg": g?.menuItemCheckedBackground,
|
|
2972
|
+
"--shp-menu-item-label": g?.menuItemLabel,
|
|
2973
|
+
"--shp-menu-item-check": g?.menuItemCheck,
|
|
2974
|
+
"--shp-section-label": g?.sectionLabel,
|
|
2975
|
+
"--shp-error-text": g?.errorText,
|
|
2976
|
+
"--shp-note-text": g?.noteText,
|
|
2977
|
+
"--shp-divider": g?.divider,
|
|
2978
|
+
"--shp-skeleton-color": g?.skeletonColor
|
|
2979
|
+
}), { title: y = "Share", qrButtonLabel: b = "QR", linkLabel: w = "Link", anyoneWithLinkTitle: T = "Anyone with the link", anyoneWithLinkSubtitle: E = "in your organization", accessAriaLabel: D = "Link access level", accessViewLabel: O = "Can view", accessEditLabel: k = "Can edit", visibilityNote: A = "This deployment and its updates will be visible to users with the link.", visibilityNoteEdit: j = "Anyone with the link will be able to view and edit this deployment.", copyButtonLabel: M = "Copy", copiedButtonLabel: F = "Copied", linkAriaLabel: re = "Share link", expiryNote: R, qrCodeAriaLabel: z = "QR code for the share link", loadingLabel: ie = "Creating share link…", errorTitle: B = "Couldn’t create the share link. Please try again.", nestedItemsNote: V } = p ?? {}, [H, U] = l(P.Link), { isCopied: ae, copy: W } = r(e ?? ""), [G, K] = l(!1), q = c(null), J = c(null), Y = (e) => {
|
|
2980
|
+
K(e), e || q.current?.focus();
|
|
2981
|
+
};
|
|
2982
|
+
s(() => {
|
|
2983
|
+
G && J.current?.querySelector("[aria-checked=\"true\"]")?.focus();
|
|
2984
|
+
}, [G]);
|
|
2985
|
+
let X = c(null);
|
|
2986
|
+
s(() => {
|
|
2987
|
+
I(X.current);
|
|
2988
|
+
let e = setTimeout(() => {
|
|
2989
|
+
X.current?.contains(document.activeElement) || I(X.current);
|
|
2990
|
+
}, 0);
|
|
2991
|
+
return () => clearTimeout(e);
|
|
2992
|
+
}, []);
|
|
2993
|
+
let Z = c(!0);
|
|
2994
|
+
s(() => {
|
|
2995
|
+
if (Z.current) {
|
|
2996
|
+
Z.current = !1;
|
|
2997
|
+
return;
|
|
2998
|
+
}
|
|
2999
|
+
let e = H === P.Qr ? Oe : De;
|
|
3000
|
+
document.getElementById(e)?.focus();
|
|
3001
|
+
}, [H]);
|
|
3002
|
+
let oe = (e) => {
|
|
3003
|
+
let t = G ? Array.from(J.current?.querySelectorAll("[role=\"menuitemradio\"]") ?? []) : ee(X.current);
|
|
3004
|
+
if (t.length === 0) return;
|
|
3005
|
+
e.preventDefault();
|
|
3006
|
+
let n = t.indexOf(document.activeElement), r = e.shiftKey ? -1 : 1;
|
|
3007
|
+
t[n === -1 ? 0 : (n + r + t.length) % t.length]?.focus();
|
|
3008
|
+
};
|
|
3009
|
+
return /* @__PURE__ */ C("div", {
|
|
3010
|
+
ref: X,
|
|
3011
|
+
role: "dialog",
|
|
3012
|
+
"aria-label": y,
|
|
3013
|
+
tabIndex: -1,
|
|
3014
|
+
style: v,
|
|
3015
|
+
className: n("flex w-[344px] flex-col outline-none", m),
|
|
3016
|
+
onKeyDownCapture: (e) => {
|
|
3017
|
+
if (e.key === "Tab") {
|
|
3018
|
+
oe(e);
|
|
3019
|
+
return;
|
|
3020
|
+
}
|
|
3021
|
+
if (e.key === "Escape") {
|
|
3022
|
+
if (e.stopPropagation(), G) {
|
|
3023
|
+
e.preventDefault(), Y(!1);
|
|
3024
|
+
return;
|
|
3025
|
+
}
|
|
3026
|
+
H === P.Qr ? (e.preventDefault(), U(P.Link)) : f();
|
|
3027
|
+
}
|
|
3028
|
+
},
|
|
3029
|
+
children: [
|
|
3030
|
+
/* @__PURE__ */ S(ke, {
|
|
3031
|
+
title: y,
|
|
3032
|
+
view: H,
|
|
3033
|
+
qrButtonLabel: b,
|
|
3034
|
+
linkLabel: w,
|
|
3035
|
+
onViewChange: U
|
|
3036
|
+
}),
|
|
3037
|
+
/* @__PURE__ */ S("div", { className: n("mx-4 h-px", L.divider) }),
|
|
3038
|
+
/* @__PURE__ */ C("div", {
|
|
3039
|
+
className: "flex flex-col gap-3 px-4 py-3.5",
|
|
3040
|
+
children: [
|
|
3041
|
+
i && /* @__PURE__ */ S(Ee, {
|
|
3042
|
+
ariaLabel: ie,
|
|
3043
|
+
skeletonColor: g?.skeletonColor
|
|
3044
|
+
}),
|
|
3045
|
+
!i && a != null && /* @__PURE__ */ S("p", {
|
|
3046
|
+
role: "alert",
|
|
3047
|
+
className: n(_?.errorClassName ?? "dial-tiny-text", "py-6 text-center", L.errorText),
|
|
3048
|
+
children: B
|
|
3049
|
+
}),
|
|
3050
|
+
!i && a == null && e != null && /* @__PURE__ */ C(x, { children: [
|
|
3051
|
+
/* @__PURE__ */ S(te, {
|
|
3052
|
+
anyoneWithLinkTitle: T,
|
|
3053
|
+
anyoneWithLinkSubtitle: E,
|
|
3054
|
+
access: o,
|
|
3055
|
+
canEditAccess: u,
|
|
3056
|
+
accessViewLabel: O,
|
|
3057
|
+
accessEditLabel: k,
|
|
3058
|
+
accessAriaLabel: D,
|
|
3059
|
+
isOpen: G,
|
|
3060
|
+
onOpenChange: Y,
|
|
3061
|
+
onAccessChange: d,
|
|
3062
|
+
onMenuKeyDown: (e) => {
|
|
3063
|
+
if (e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
|
|
3064
|
+
e.preventDefault();
|
|
3065
|
+
let t = Array.from(J.current?.querySelectorAll("[role=\"menuitemradio\"]") ?? []);
|
|
3066
|
+
t.length !== 0 && t[(t.indexOf(document.activeElement) + (e.key === "ArrowDown" ? 1 : -1) + t.length) % t.length]?.focus();
|
|
3067
|
+
},
|
|
3068
|
+
triggerRef: q,
|
|
3069
|
+
menuRef: J,
|
|
3070
|
+
titleClassName: _?.anyoneTitleClassName,
|
|
3071
|
+
subtitleClassName: _?.anyoneSubtitleClassName,
|
|
3072
|
+
accessTriggerLabelClassName: _?.accessTriggerLabelClassName
|
|
3073
|
+
}),
|
|
3074
|
+
/* @__PURE__ */ S("p", {
|
|
3075
|
+
className: n(_?.noteClassName ?? "dial-tiny-text", L.note),
|
|
3076
|
+
children: u && o.includes(N.Edit) ? j : A
|
|
3077
|
+
}),
|
|
3078
|
+
V != null && /* @__PURE__ */ S("p", {
|
|
3079
|
+
className: n(_?.nestedItemsNoteClassName ?? "dial-tiny-semi-text", L.note),
|
|
3080
|
+
children: V
|
|
3081
|
+
}),
|
|
3082
|
+
H === P.Qr ? /* @__PURE__ */ S(Te, {
|
|
3083
|
+
value: e,
|
|
3084
|
+
labels: { ariaLabel: z }
|
|
3085
|
+
}) : /* @__PURE__ */ S(ne, {
|
|
3086
|
+
url: e,
|
|
3087
|
+
linkLabel: w,
|
|
3088
|
+
linkAriaLabel: re,
|
|
3089
|
+
isCopied: ae,
|
|
3090
|
+
copyButtonLabel: M,
|
|
3091
|
+
copiedButtonLabel: F,
|
|
3092
|
+
onCopy: W
|
|
3093
|
+
}),
|
|
3094
|
+
R != null && /* @__PURE__ */ S("p", {
|
|
3095
|
+
className: n(_?.noteClassName ?? "dial-tiny-text", L.note),
|
|
3096
|
+
children: R
|
|
3097
|
+
})
|
|
3098
|
+
] })
|
|
3099
|
+
]
|
|
3100
|
+
})
|
|
3101
|
+
]
|
|
3102
|
+
});
|
|
3103
|
+
});
|
|
3104
|
+
//#endregion
|
|
3105
|
+
export { Te as QrCode, N as ShareLinkAccess, Ae as SharePopover, P as SharePopoverView };
|