oasis-editor 0.0.30 → 0.0.32
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/dist/{OasisEditorApp-Bvkbr1KZ.js → OasisEditorApp-D6NxTc6l.js} +603 -307
- package/dist/app/services/indexedDbPersistence.d.ts +20 -0
- package/dist/assets/{importDocxWorker-DVvaVtgj.js → importDocxWorker-xRrspiYv.js} +1 -1
- package/dist/core/editorState.d.ts +7 -1
- package/dist/core/endnotes.d.ts +0 -2
- package/dist/core/footnotes.d.ts +0 -2
- package/dist/core/model/index.d.ts +1 -0
- package/dist/core/model/listNumbering.d.ts +5 -0
- package/dist/core/model/types/primitives.d.ts +10 -0
- package/dist/export/docx/docxTypes.d.ts +10 -3
- package/dist/export/pdf/draw/drawBlockList.d.ts +1 -1
- package/dist/export/pdf/draw/drawParagraph.d.ts +1 -1
- package/dist/export/pdf/draw/drawTable.d.ts +1 -1
- package/dist/export/pdf/draw/lists.d.ts +2 -2
- package/dist/i18n/I18nContext.d.ts +9 -0
- package/dist/i18n/index.d.ts +7 -3
- package/dist/import/docx/numbering.d.ts +19 -28
- package/dist/{index-BVAzjJsg.js → index-CDi9hs5T.js} +1264 -1540
- package/dist/index.d.ts +1 -1
- package/dist/oasis-editor.js +54 -54
- package/dist/oasis-editor.umd.cjs +4 -4
- package/dist/ui/OasisEditorAppProps.d.ts +6 -0
- package/dist/ui/app/useEditorContextMenuClipboard.d.ts +2 -0
- package/dist/ui/app/useEditorRuntimeBootstrap.d.ts +1 -0
- package/dist/ui/app/useEditorRuntimePlugins.d.ts +2 -0
- package/dist/ui/canvas/listNumbering.d.ts +2 -1
- package/dist/ui/components/Menubar/Menubar.d.ts +1 -1
- package/dist/ui/components/Menubar/menuRegistry.d.ts +0 -1
- package/dist/ui/components/Toolbar/presets/defaultToolbar.d.ts +2 -1
- package/dist/ui/components/Toolbar/ribbon/ribbonModel.d.ts +4 -3
- package/dist/ui/components/Toolbar/state/createToolbarApi.d.ts +2 -1
- package/dist/ui/textMeasurement/indentation.d.ts +2 -0
- package/package.json +1 -1
- package/dist/app/services/PersistenceService.d.ts +0 -11
|
@@ -138,6 +138,18 @@ function runWithOwner(o, fn) {
|
|
|
138
138
|
Listener = prevListener;
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
+
function createContext(defaultValue, options) {
|
|
142
|
+
const id = Symbol("context");
|
|
143
|
+
return {
|
|
144
|
+
id,
|
|
145
|
+
Provider: createProvider(id),
|
|
146
|
+
defaultValue
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
function useContext(context2) {
|
|
150
|
+
let value;
|
|
151
|
+
return Owner && Owner.context && (value = Owner.context[context2.id]) !== void 0 ? value : context2.defaultValue;
|
|
152
|
+
}
|
|
141
153
|
function children$1(fn) {
|
|
142
154
|
const children2 = createMemo(fn);
|
|
143
155
|
const memo2 = createMemo(() => resolveChildren(children2()));
|
|
@@ -392,6 +404,19 @@ function resolveChildren(children2) {
|
|
|
392
404
|
}
|
|
393
405
|
return children2;
|
|
394
406
|
}
|
|
407
|
+
function createProvider(id, options) {
|
|
408
|
+
return function provider(props) {
|
|
409
|
+
let res;
|
|
410
|
+
createRenderEffect(() => res = untrack(() => {
|
|
411
|
+
Owner.context = {
|
|
412
|
+
...Owner.context,
|
|
413
|
+
[id]: props.value
|
|
414
|
+
};
|
|
415
|
+
return children$1(() => props.children);
|
|
416
|
+
}), void 0);
|
|
417
|
+
return res;
|
|
418
|
+
};
|
|
419
|
+
}
|
|
395
420
|
const FALLBACK = Symbol("fallback");
|
|
396
421
|
function dispose(d) {
|
|
397
422
|
for (let i = 0; i < d.length; i++) d[i]();
|
|
@@ -1006,9 +1031,9 @@ function reconcileArrays(parentNode, a, b) {
|
|
|
1006
1031
|
const index = map.get(a[aStart]);
|
|
1007
1032
|
if (index != null) {
|
|
1008
1033
|
if (bStart < index && index < bEnd) {
|
|
1009
|
-
let i = aStart, sequence = 1,
|
|
1034
|
+
let i = aStart, sequence = 1, t;
|
|
1010
1035
|
while (++i < aEnd && i < bEnd) {
|
|
1011
|
-
if ((
|
|
1036
|
+
if ((t = map.get(a[i])) == null || t !== index + sequence) break;
|
|
1012
1037
|
sequence++;
|
|
1013
1038
|
}
|
|
1014
1039
|
if (sequence > index - bStart) {
|
|
@@ -1035,9 +1060,9 @@ function render(code2, element, init, options = {}) {
|
|
|
1035
1060
|
function template(html, isImportNode, isSVG, isMathML) {
|
|
1036
1061
|
let node;
|
|
1037
1062
|
const create = () => {
|
|
1038
|
-
const
|
|
1039
|
-
|
|
1040
|
-
return isSVG ?
|
|
1063
|
+
const t = isMathML ? document.createElementNS("http://www.w3.org/1998/Math/MathML", "template") : document.createElement("template");
|
|
1064
|
+
t.innerHTML = html;
|
|
1065
|
+
return isSVG ? t.content.firstChild.firstChild : isMathML ? t.firstChild : t.content.firstChild;
|
|
1041
1066
|
};
|
|
1042
1067
|
const fn = isImportNode ? () => untrack(() => document.importNode(node || (node = create()), true)) : () => (node || (node = create())).cloneNode(true);
|
|
1043
1068
|
fn.cloneNode = fn;
|
|
@@ -1254,10 +1279,10 @@ function eventHandler(e) {
|
|
|
1254
1279
|
function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
1255
1280
|
while (typeof current === "function") current = current();
|
|
1256
1281
|
if (value === current) return current;
|
|
1257
|
-
const
|
|
1282
|
+
const t = typeof value, multi = marker !== void 0;
|
|
1258
1283
|
parent = multi && current[0] && current[0].parentNode || parent;
|
|
1259
|
-
if (
|
|
1260
|
-
if (
|
|
1284
|
+
if (t === "string" || t === "number") {
|
|
1285
|
+
if (t === "number") {
|
|
1261
1286
|
value = value.toString();
|
|
1262
1287
|
if (value === current) return current;
|
|
1263
1288
|
}
|
|
@@ -1272,9 +1297,9 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
|
1272
1297
|
current = parent.firstChild.data = value;
|
|
1273
1298
|
} else current = parent.textContent = value;
|
|
1274
1299
|
}
|
|
1275
|
-
} else if (value == null ||
|
|
1300
|
+
} else if (value == null || t === "boolean") {
|
|
1276
1301
|
current = cleanChildren(parent, current, marker);
|
|
1277
|
-
} else if (
|
|
1302
|
+
} else if (t === "function") {
|
|
1278
1303
|
createRenderEffect(() => {
|
|
1279
1304
|
let v = value();
|
|
1280
1305
|
while (typeof v === "function") v = v();
|
|
@@ -1314,13 +1339,13 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
|
1314
1339
|
function normalizeIncomingArray(normalized, array, current, unwrap2) {
|
|
1315
1340
|
let dynamic = false;
|
|
1316
1341
|
for (let i = 0, len = array.length; i < len; i++) {
|
|
1317
|
-
let item = array[i], prev = current && current[normalized.length],
|
|
1342
|
+
let item = array[i], prev = current && current[normalized.length], t;
|
|
1318
1343
|
if (item == null || item === true || item === false) ;
|
|
1319
|
-
else if ((
|
|
1344
|
+
else if ((t = typeof item) === "object" && item.nodeType) {
|
|
1320
1345
|
normalized.push(item);
|
|
1321
1346
|
} else if (Array.isArray(item)) {
|
|
1322
1347
|
dynamic = normalizeIncomingArray(normalized, item, prev) || dynamic;
|
|
1323
|
-
} else if (
|
|
1348
|
+
} else if (t === "function") {
|
|
1324
1349
|
if (unwrap2) {
|
|
1325
1350
|
while (typeof item === "function") item = item();
|
|
1326
1351
|
dynamic = normalizeIncomingArray(normalized, Array.isArray(item) ? item : [item], Array.isArray(prev) ? prev : [prev]) || dynamic;
|
|
@@ -2333,17 +2358,30 @@ const locales = {
|
|
|
2333
2358
|
en,
|
|
2334
2359
|
"pt-BR": ptBR
|
|
2335
2360
|
};
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2361
|
+
function createTranslator(getLocale) {
|
|
2362
|
+
return (key, params = []) => {
|
|
2363
|
+
const localeStrings = locales[getLocale()] || locales["en"];
|
|
2364
|
+
let template2 = localeStrings[key] || en[key] || key;
|
|
2365
|
+
params.forEach((param, index) => {
|
|
2366
|
+
template2 = template2.replace(`{${index}}`, String(param));
|
|
2367
|
+
});
|
|
2368
|
+
return template2;
|
|
2369
|
+
};
|
|
2370
|
+
}
|
|
2371
|
+
const defaultTranslator = createTranslator(() => "pt-BR");
|
|
2372
|
+
const I18nContext = createContext(defaultTranslator);
|
|
2373
|
+
function useI18n() {
|
|
2374
|
+
return useContext(I18nContext);
|
|
2375
|
+
}
|
|
2376
|
+
function I18nProvider(props) {
|
|
2377
|
+
return createComponent(I18nContext.Provider, {
|
|
2378
|
+
get value() {
|
|
2379
|
+
return props.translator;
|
|
2380
|
+
},
|
|
2381
|
+
get children() {
|
|
2382
|
+
return props.children;
|
|
2383
|
+
}
|
|
2345
2384
|
});
|
|
2346
|
-
return template2;
|
|
2347
2385
|
}
|
|
2348
2386
|
const oasisMarkBase64 = "UklGRmQXAABXRUJQVlA4IFgXAACwWwCdASrAAAABPjEWiUMiISESyL50IAMEswHYDxjW/947Oi5/a/7H+1P90/ar5n65/UvwH+Q/QZm27Sf5n9r/I/5m/2n/p+wv9E/9j3AP07/0X92/HLuKeYL+mf4r/zf3f3tf9x+rnvH/z/qAfzf/J/9/sM/QX/bv02P28+Fb9s/2s+B39h//51gH//6yfrV/QO1z/CdMx6vl0OAGqD8Z+4X6H+9/up8b/6vvP+IeoL+Lfyr/CflxwuoAPz7+0/7T1iPk/9p6R/zXqAflpxyVAX8y+hD/5/6f0W/UX7UfAl/Ov75/zOxr6SR2HAT+kJLsdULBbdVn3b+sl8uZdjuThjIe3NwBwjfGz5SniiBN2m7i7b0hA/wxE1PuC+4EcbOyjUkU3CDDghPY1Va4tpUped9TFa05Qb1z7O+Ye73ccvEl10Sgdj6Hhy71hb/XpA23GjXBN/obAlaswz9gKwvW9d9npbC69rQeTm6DEr/cjrNngjQaHgFGjh4uVY1bY9Q+/iG037f80w0bLlYIe7smzz4tG1kC8r/KyWvzd3IXXrR2bKmhoB3Md69ltbERYFBI/2f+w7Jcsw+aUOGSwP6v6jv3tvwprg/7n5tto40/iRIKwEHQ5H/G5c0tpJ2pwREanIK3qHinjvovnkmuTw0mV2bumYqdc7he7hG0hpvBna8vIRpKYe6K1v3F8trOEtYUwr7w8e6j3nviknKtsFMtPtxZzn0YnhgtOn9inBlwqyEGR+wk7X1KHxOekXCA1UVbmLwGx1NqbI6r2WBOwQdpmpTg85DMOjwzW/JHUmfxKTDfhoXLi9gBMP/+Et6inspdrW1CHkZVLkDll2JyiPvClnvGv9m00oYce3evtpMlDhY3kVYGwfkoCHHyEv9iiN45NFE7+dQ9TacuQ00bHMa8LEFkEgXlbIOOqb/luSgpqPeYJ0te0XOAoIimL6iiPpVwptKTVTYOwRlXsxXOf6TT46ZEkHgAAP7+0P2gKmTluueuNY+U4/vkDd2VmNHsmMNJl1HfoY2poF8/1uoa8CZHpva1s8naGtGSLZnoeinjMs+G3jkzDzxHqqcgkZTAfFgipQReV3vRrkjzfzIdcMA7B4tu1cAg89SYeju2MC8Y/CWafba+MGbhAEzmu3dW8//l1pJrMLCd2MlJ8YLX6EM772du7VOeyFBLhim1VpOzXrWZWlYFTm3pF38p3oH1j5l0JRFlx08AdxScjS2p+L43pSzH9irNn8ow+YlvoXypCXVyQ9DllXxuTiMV7Tw7WkiyBb4a0io2XARXIzAbjnigXygR4j0M4GnhxdRzombgaZd6jiUTORiHX8BIV0fE+8nOv/uleXINQ2JNHrP4IfqDiefxTYTJHXey6xszVKKbcgzzA9VjuS59jQjkZVktrpdXls0pskU+x3iAoGSQxoL3YUs8B9JbG69Vh5VQfRWkjpvjgA+VeqeUoRD1h/PctddTT2eA31zbvwS+0HxGGL7afgwAeSZIDnSqmHLVUc7cH9uA0qf6foiwypxLOe6BLv7FNIwMYXLlkOnCSsiYZmhjpZmUZykMqPtNOPR2teBpziedYDQV2aBZFMP+Guq5u2WRWvvGZ+KNDuQaa4vKl+YbRCwZAaLr6bcL+XjTayKSzz561sUKrzDSPUjEf0cVkTci8SXA+guLEDFEtHATgLEEQD/xiDXvconSzB8CqX0Pys7GniN2V5lI76qUO1knbcPftDFB9DRHcuv4NM/c+9zeyj3iLi2uJhkGEW8MtSZUygLogIc+c43IPKXQXAs9YgZ8Uumypd4xdsgzr5POVy0w0rzP8LhLPiqzL8Nc50JyRi8bvEZraXy3DSHQmuVX39HaRgREI7uqi1sUiL+b0qe/fR53FfE+uCPvVxaWqgr0UicQoWPAXArLgJ6RjGyIgbrq+cv0gBkp65ZH05itLicbTkIWprWJ1pLomPqQZkAYruygNlcmmGct1IJ0OzNjAJQFkVGbwLkeHB/TDbV0Tq/U7ge2Ciaj3HYIMmREQzhx1gk+i2Kwb3DmEaetvzetIiB0nhbRWIMtfOKNM25GU22XNDiHpZiFfMCR04TIoM/jq5qRJ8zukISn5EQJGUSLd1nraQHhAJTkrpt/x6kq5R9er3yXQiOw25imi3mzDte/kbW6ENgYqf3RC1zKdnGEieTDnu+Mfr1L5ORPGTyS4LO2eDcgcd7uKCXNyWLRHYNtj0swtWjA0ia7ezJCwTRrpoU7kY+lL02zDFu+teWU4dda1jD7f0khwFd6lu1ESotG4fSQX/+N6f2n3mwu/NRGflR35gBlCarCAqTnEvPSSAoGg5H65qwNYU4i/xtQET6QIf0wJ9SWoybdwZkdByMBLVM+zWXM09/ZywvcFSeDiQH1mB/LN9o/9kigWXMDCmJ40GdbJriO6LyFd3ZPHE9Mu3cpzAHodpgbNY2L5de3n7cWaFs31Ua4V7IZwif5EJ6RgL52zgWt5THlnmij4W/+o5sga3qHqbIr2R4+KthbXaFSBHLt/MP3sfxs7UyonNA/yO9VDpaR/87nlPJ+486zuaZ6QF6hVZMPFdPUSXrhJYcQn8MarTFxjYFzcGKE5JIdnqU8wrv95YUP2/Vq42hW+eYj3Olg9EpjiSMkrFiYBsyWSOqbJQbpV64E7yVXFNVHUnkvRhUHFSP+YLr+DAyGpc6IIx+dS13PDFTHLAPtK0K8U5nwtn07jExCX4zca4HtBYAPSyMs/rGL+kEh29/08ahsm/8lEASeDKao1fY2pqUMr/GXUf+wwieLDHhs4/785VR9Jg6ZYzV6W8gxpyHNPw/s6/V2XW/PRn+l8MCGPTSDU0H7S/engMTa3XFjmfN+HkF3VBNtsTRv5m/dvtiEW4KJnN3UT1BiuO19GYLvxC553JAMaKnwwtW3q4UUnQwjrRum4luWqFQbWSfFaM0C+nAHkShu+7jB74XTnWfZUljWJrxnV/xRqtBnlio9SHJn93hzCH3c7Z4NGiHUfRlNZeY0GTth7SIjPPNF8uq0Dlon7EpI0JQWPHjAajWRH6+z6HGdnkF6b6ZW5nwveXsbtGl77y181pnrXB8eKRZVF6mnjlOWfzt2DgyrR8KXcfQxdtJ14hmYNbWmVt6oo0syImVWF2VaCy4iac47Xle5VTGAzTK+y4ineIkhp2WUDrKBHpaXNu05EunDhMbGU4OSsDum31/gAk0cpuqbGJmD+AEf+PEyj7okPwWnzbx/Dc+TOUJIq0qPYVLHQs3x5763EiV05ZPV0giHExJHA4tpsZdLBBimjc4jbBcDloQWRyHMa5ZCOsLcAxxe/JUT31Gmy8EeIIJH8oybFtgVsxUB9bTxUCjQ5BTUwGzCI3zFYNmqhwcQx7IRJEaBHnQH0Reiqh7QJu3rZ+1xNRDeUPgc9c3VKwkZhaSS+wB/AQUgUVHzL0w86fefFqaqXbei8E6aCU4PPwLtpC/kphJCHMSQ1y6Z1kN1ztzIcN6EYF0diUBtS0ycH+8OT5Pu7SBn9paZxcr0abOrM0WedcPsmgRTng89PAD7unuoL+34FYNzXeVc2oxzRQ4ukk+O/zYyxVW2bfacfF176N/actMCjkMiZsIzUpK8q9a7xKWWoNNPFKd/zbyQaWPY9NhfWS2yDjBtmYh6SZRBJJRhZFY1ZCKIs4q8Z+hznOqVSPsm9sddQNfg5cn1gdtuZP/HZJqu6YN6Scn2f4RdBhb2iZGyNt/oDFIqQwJHMNiQUeemjv8t+p4Ijz0tCKNPLGmDeuhrplcBQ8LZgSPE3yyXmuIgd31d23LHj43kzNoMc0niaEAXRfvuA7sxLpbzV5x0bNTFYZ7XGX8CpL1m0/X2c9nFxxk1kALcLsOT9VadXCJ5jG+ANfI+RJ24AFfCTjK7mQuWDirqt9FD8ksAvzPM8677h/YcmEfwyrUBm8ZPOjhnMH7I85GVoQjN7zHFN3VXmaMRZMq5uBc5Z3Fhr6JbsBSl8W/hAQAriIBINIylKxSh7iRa2S2MlXJb/uIosUdKoreXYKD3A4xcf5DGnjxfCVm9L9WabGP5Wj/yoRo/h1hEaaHZVjrot+YELnMYMn/gLTHm1w/m5KMKXbqNdB1DZhPOx+vA7WCozWCfqDlJDczg6SQybB1KsP7lk/9gqHS58eVInTlny7MxP6jbCKE5KI1A9uu+rFuO+6iYHCP4xcdPNT6RsYjpSLhjyKHBcCldrMjQzo8IpwYkSyaPxonVxhSjxfBySfPIljfNy/1nL3KyMcXzzR2QnDRABDumnTqfDqAL0PMuLeZ3iBgVlN4j8tdBD+uPIvDjHpXAwFAY1R03QMWGtS84kEElzP0qPlpg1b0zw3KK1daqJC2rmaGE0r0y3Js8W0CVI+e6HMozZ2tAh17caaGjcnbK8WK+l9swvUSc6GaI1mrlnhAHU80EFIql72S66mllwDtIJhkpDfu1xVON+kiZAU8ao6sj+9oN38QZ0orGVOCnj7R9/Qg/VozV+Odtx1nres4cVUpgBpj8Fc+n52K+kkDCl80yVaPS7ZsvtS33mn3xeTn74mvTWcVftb8+e+vFLo6GS5kPRskekS0ViI/hAhQeCFZV7MBwI/jS+B68+YiWv/+9tG7qPNKLsjTR97ead+3YrvlBM3MyRlIpIMcYYgLiiZZ42RJGG2Ip3kPxsx8s3N+SkvM8qLTw3dWhActwY3Xz0O9Crxtfr93PHhfQI71MIUEmX2dnbKTxnqYbLB1kCdS4H9sz6wW02aXo9fzaQo090DuxABjsamN0leUN7a1L24Eev/B75RhLXYXy9SvKxvd0H+KlepkD4doBKROwuwFu7PMog7jmqvAGBHtSF7dE3jwhE60Rjtt95WkgqQDoRO7W57G3tJgdlPverdlAi0zSDFEkBxXTDZ3xheftVoAhRj365OpFIzFBNN+iYfp2eJwBwI7oc5KylPx5/H3NNMcBvx+EOdEu4pkFlpPnmglJKvsNeCyUWhTIvPi308dnqSoifrrilNHk3UeUXSoaVKxQPIBpbiVLPedkJBQjvuOnOriN/V80+Rk9AE7iRMl/Rvc33Lge1jnRC7AFnJbw9ufG8JgbB4RBnyB1xuIUiCfkvBPoNNfbfuc3mrI7pJYLknAXGSG1Nfuo5DtXqw1JfHGlIDRVbootSqBVrEHXnCvvXOPqpNXe5W4fPhMVYwyJoE1qWZVIYo549dcG50Bz6qQo/YwChUIKCG+vkwiJ+kZd1to35s+aGK1HBP60TOjMYwioPiB0J3/M3JbQ7KSXz1mVcAd73cGnyHgB9vEfSEVf3IjVdd3IYtAZ0/87Pzbeu0m9oZpOhzngr2neJbn+1l5AiNG6RK0dNNmmTQI1DnDmM3hW8Yw0TiGX3oNDtv0X6NXbNna7b0YLh3bAB72PiqadyVxVYPRoHY2vCjRrBQzTNTdRIQuw5d0XhFJ4uazuvp5RMF0d9LLckV+iqel5ldUdQ2m5ZxGNPxoABOhV5MznFqE9GLr4EYDl064VOcFjJBkFaei+XN+H1oaqG8qkntUti9NdXEphwxgKW16MEeWuQ/7T8DCeC8+5nyPVF3kG8ZDYZP0AJtv5/WFPn9DWTo7gQTAt0U3JZVcudQ7i7PfvqWa52Qrpy6zQFVTesAyrq995z6UGiHzqiHGDjelUG8bnN+m5+3MMELQAU+rvc4UFgNJ/Qa1DnWJdkMZSUMq+HBoj5ggFBwlL6yDEiRk34idtLXmIy8cMNrjXG0Lu7Reg/CY07ZYRp4eTLUIrFnr8aknQBWq0xHLQwYmjqO/TT6sz+lPCJRE4+FXSaZVynttWJv1H9gEFDgs5dOMCTkwh1ax9dpwLEsm8QPU2G2v6l5zxrcvc1FWtDlcIfQDWNecuvM7bX+STamlHfN4HA0tSPrgMy10RwE79X37FlpC3eESfEmUU5Sn2Lgz9uBA4NH7R9EMNz8KGVeA5rJ7RFnPlwx9M2vGnChVaxeoKI4N9YVr0sWj8Y/GiCB7I+8JW6gxzc0+15MDOLlvzNhS2ZMRENKhrvs2OGvvIyx6PWlYFTgAfxWyDonD1mngwHu6h40bGM3xDeOv7Fy818u6uTUWm/qnaGrSKdrU1BiGP2+T/qtxeK7EQpceSmVbFgnCFJX4knNvrYC+qhU6emMJiCuIjFxiK/W+tgtp++f9TRhfaX2Nn3oisrMYTXHKcxa6Im1QTRMZLyba1njRXKhNQzygEEkCTaQ8NrCaYQ+6QrvlnuYPzQn9OzFNrFgJg+Kuz73CQU6z3r/jsgZ+AkeDDESoMXDRetY1NclRIMGRy8NB9dur+YrXdNDM3vHq9YjXkOx8QgJCFTV06fUmxBrqgoIb5ZaoiWv8mhOuta+5AztMbzxtggvULoILvLB3E95cabrHIgIIxZOGf5bAP9ltq3Yg6Vo4PnZkOd9Ln2vP3vpB0P0ELJDRwUpey+k7bpQF7VfEqg4k28587tqFvrX2ZbQADLJGKhERGVFehFRuqfS8SaXmWVLB4HriwYl4r8k7NMZwbp/xZM7xBrCXt8bEC2wku5PDUb9PyPcQBnoKnstlLSSwJXS2RBFI87PYgEYHNzmYt8y6z1nNB6PBFxJo3NKrprYK77FMfyPAelQnBc4VstXvPnsZRp8NY97NvtRq6GTKOlwuAtFLIMxZ3pu1wxBNRxH9OfiymV6ahDsAF+F4EmS/fmuLxqRCborsgMUTSlcbZCycyfeLgL9FsLfIadOCee++KvLi4ST9ZHhj7tCBhgayemDhSzcFgeFnsyDkGS9qLs7rnySZzxzAwfjlpsYyjkYpuxXbbWuTIqD39mD6NQpuJDKt2Q9x/OKymV3BMjQ/0F4boL/NdfYS24AFVtW/OIFU+AGkN2d5wNbdGC5NrLUrp3q+mjXtg54TBgW2gp8fUOCTxdPzlDp2baT4Q6uAqCfDg3D4V/4VdxkVSlLbiWEpOTl4VtDlNMNSSXmFf/1tPGphwWKj0Agbbd5QjFulttla8pgAAA/Wf+9Td+Oo61eaZLa3tUfTeOXGCKwWJFXCMqaNfIyBue31jEIGX1TddpAj4QyCopCfwrKjKoRX5n4UwcfwADHiInAdeqVgyLiABR8P6u+q5XYOLFlS5rZ1Kpe7uqoHg6rIvAN/gVp/JR0jDVURc9CTdVvWQNne/upBb3VgGGhdLlbcfVEjHw5HwHeOjIx3HP/lXoWaUdTbiLB7DDLQD+VOaVqCh9An7btAcCd6RzgEW165Hqx2ZXLlq8OLCczkDlN8rCAtz8O+4AzSyPK8grVM8ObUU+qc6ZGcCgxaVvvbiTPP2kb765qIU5/Dj+q60L9YPOU6t+1FP6od8x4iXUpAtBsclYfJhOrwv66P13ocoB3LV1x09Eb5wq33vepBq3qYQJQyOHbj/jl4eLRUxXLQgLorpnB4HNs4v40tGGosw2Ka6eDt5K6P8DQK5ozy56BizczJenDjZ5DYx1Xu3YLmI/quRSR8ORIJqwhWFwM+Q8/gNfUL/YgQHlHmfhYi5vjU0TzsgnLyhP/kOFSnR9zjJkIMcYAFB/Ft1tfks1aQiBMtgP4sabdMsauWXINaIyR9ClOZLdIZQVGHUgLjxKW6YiFUs72zTJmKtf/RovsidqZlmEXrWGZ3UuGplChFUtjEkvwi2XxICgc0grD+9/tRt47usAAADGbVjPUInsKZHILQ8Tdvbj09q/9k2Mg7uynD2e+HudOmr+jOK+SyWmKsSZ4pH89FUSffyxPKUMVNp8o1m1apG/WDvwhmHllHVfELy0BgfyAIevaAuIOzl4NX3ayQnv+tsCnIGxjvF1IwPLyoflKFrL2OBFh3pJ57ChDdzSC9IDKqpaycKVMm2mWUPGBLK2cpD+b4VPleMoNCtKZz4AileaHHtk77gduJB8sihmMPR1lV1Vba4pOywdJgGueqt4IcTd2RJFxeSRNjuzHcR4tYGdli66ijJZC20ODhr8miT+cauMIflgiAAAAA=";
|
|
2349
2387
|
var _tmpl$$S = /* @__PURE__ */ template(`<img alt aria-hidden=true>`);
|
|
@@ -2372,6 +2410,7 @@ function OasisBrandMark(props) {
|
|
|
2372
2410
|
}
|
|
2373
2411
|
var _tmpl$$R = /* @__PURE__ */ template(`<div class=oasis-editor-import-progress-label>`), _tmpl$2$z = /* @__PURE__ */ template(`<div role=status aria-live=polite><div class=oasis-editor-import-card><div class=oasis-editor-import-title></div><div class=oasis-editor-import-progress-track><div>`), _tmpl$3$m = /* @__PURE__ */ template(`<span class=oasis-editor-import-done-icon>Done`);
|
|
2374
2412
|
function OasisEditorLoading(props) {
|
|
2413
|
+
const t = useI18n();
|
|
2375
2414
|
const variant = () => props.variant ?? "overlay";
|
|
2376
2415
|
const pct = () => {
|
|
2377
2416
|
const p = props.progress;
|
|
@@ -2419,13 +2458,15 @@ function OasisEditorLoading(props) {
|
|
|
2419
2458
|
})();
|
|
2420
2459
|
}
|
|
2421
2460
|
function OasisEditorAppLazy(props = {}) {
|
|
2422
|
-
|
|
2423
|
-
|
|
2461
|
+
const translator = createTranslator(() => {
|
|
2462
|
+
var _a;
|
|
2463
|
+
return ((_a = props.ui) == null ? void 0 : _a.locale) ?? "pt-BR";
|
|
2464
|
+
});
|
|
2424
2465
|
const [progress, setProgress] = createSignal(0);
|
|
2425
2466
|
const [App, setApp] = createSignal(null);
|
|
2426
2467
|
const loadingOptions = () => {
|
|
2427
|
-
var
|
|
2428
|
-
const value = (
|
|
2468
|
+
var _a;
|
|
2469
|
+
const value = (_a = props.ui) == null ? void 0 : _a.loading;
|
|
2429
2470
|
return typeof value === "object" && value !== null ? value : void 0;
|
|
2430
2471
|
};
|
|
2431
2472
|
onMount(() => {
|
|
@@ -2442,7 +2483,7 @@ function OasisEditorAppLazy(props = {}) {
|
|
|
2442
2483
|
onCleanup(() => {
|
|
2443
2484
|
cancelled = true;
|
|
2444
2485
|
});
|
|
2445
|
-
import("./OasisEditorApp-
|
|
2486
|
+
import("./OasisEditorApp-D6NxTc6l.js").then((m) => {
|
|
2446
2487
|
cancelled = true;
|
|
2447
2488
|
setProgress(1);
|
|
2448
2489
|
setTimeout(() => setApp(() => m.OasisEditorApp), 180);
|
|
@@ -2450,33 +2491,38 @@ function OasisEditorAppLazy(props = {}) {
|
|
|
2450
2491
|
cancelled = true;
|
|
2451
2492
|
});
|
|
2452
2493
|
});
|
|
2453
|
-
return createComponent(
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
variant: "fill",
|
|
2460
|
-
get progress() {
|
|
2461
|
-
return progress();
|
|
2462
|
-
},
|
|
2463
|
-
get label() {
|
|
2464
|
-
var _a2;
|
|
2465
|
-
return (_a2 = loadingOptions()) == null ? void 0 : _a2.label;
|
|
2494
|
+
return createComponent(I18nProvider, {
|
|
2495
|
+
translator,
|
|
2496
|
+
get children() {
|
|
2497
|
+
return createComponent(Show, {
|
|
2498
|
+
get when() {
|
|
2499
|
+
return App();
|
|
2466
2500
|
},
|
|
2467
|
-
get
|
|
2468
|
-
|
|
2469
|
-
|
|
2501
|
+
get fallback() {
|
|
2502
|
+
return createComponent(OasisEditorLoading, {
|
|
2503
|
+
variant: "fill",
|
|
2504
|
+
get progress() {
|
|
2505
|
+
return progress();
|
|
2506
|
+
},
|
|
2507
|
+
get label() {
|
|
2508
|
+
var _a;
|
|
2509
|
+
return (_a = loadingOptions()) == null ? void 0 : _a.label;
|
|
2510
|
+
},
|
|
2511
|
+
get ["class"]() {
|
|
2512
|
+
var _a;
|
|
2513
|
+
return (_a = loadingOptions()) == null ? void 0 : _a.class;
|
|
2514
|
+
},
|
|
2515
|
+
get style() {
|
|
2516
|
+
var _a;
|
|
2517
|
+
return (_a = loadingOptions()) == null ? void 0 : _a.style;
|
|
2518
|
+
}
|
|
2519
|
+
});
|
|
2470
2520
|
},
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
return (
|
|
2521
|
+
children: (getApp) => {
|
|
2522
|
+
const C = getApp();
|
|
2523
|
+
return createComponent(C, props);
|
|
2474
2524
|
}
|
|
2475
2525
|
});
|
|
2476
|
-
},
|
|
2477
|
-
children: (getApp) => {
|
|
2478
|
-
const C = getApp();
|
|
2479
|
-
return createComponent(C, props);
|
|
2480
2526
|
}
|
|
2481
2527
|
});
|
|
2482
2528
|
}
|
|
@@ -3486,6 +3532,148 @@ function findParagraphTableLocation(document2, paragraphId, activeSectionIndex =
|
|
|
3486
3532
|
}
|
|
3487
3533
|
return { ...entry.tableLocation, zone: entry.location.zone };
|
|
3488
3534
|
}
|
|
3535
|
+
const BULLET_GLYPHS = ["•", "○", "▪", "•", "○", "▪"];
|
|
3536
|
+
const ORDERED_DEFAULT_FORMATS = [
|
|
3537
|
+
"decimal",
|
|
3538
|
+
"lowerLetter",
|
|
3539
|
+
"lowerRoman",
|
|
3540
|
+
"decimal",
|
|
3541
|
+
"lowerLetter",
|
|
3542
|
+
"lowerRoman"
|
|
3543
|
+
];
|
|
3544
|
+
const PUA_BULLET_MAP = {
|
|
3545
|
+
61623: "•",
|
|
3546
|
+
61548: "·",
|
|
3547
|
+
61607: "▪",
|
|
3548
|
+
61656: "➢",
|
|
3549
|
+
61559: "✓",
|
|
3550
|
+
61692: "✓",
|
|
3551
|
+
61671: "⚡",
|
|
3552
|
+
61472: " "
|
|
3553
|
+
};
|
|
3554
|
+
function toAlpha(value) {
|
|
3555
|
+
if (value <= 0) return String(value);
|
|
3556
|
+
let remaining = value;
|
|
3557
|
+
let output = "";
|
|
3558
|
+
while (remaining > 0) {
|
|
3559
|
+
output = String.fromCharCode(65 + (remaining - 1) % 26) + output;
|
|
3560
|
+
remaining = Math.floor((remaining - 1) / 26);
|
|
3561
|
+
}
|
|
3562
|
+
return output;
|
|
3563
|
+
}
|
|
3564
|
+
function toRoman$1(value) {
|
|
3565
|
+
if (value <= 0 || value >= 4e3) return String(value);
|
|
3566
|
+
const numerals = [
|
|
3567
|
+
[1e3, "M"],
|
|
3568
|
+
[900, "CM"],
|
|
3569
|
+
[500, "D"],
|
|
3570
|
+
[400, "CD"],
|
|
3571
|
+
[100, "C"],
|
|
3572
|
+
[90, "XC"],
|
|
3573
|
+
[50, "L"],
|
|
3574
|
+
[40, "XL"],
|
|
3575
|
+
[10, "X"],
|
|
3576
|
+
[9, "IX"],
|
|
3577
|
+
[5, "V"],
|
|
3578
|
+
[4, "IV"],
|
|
3579
|
+
[1, "I"]
|
|
3580
|
+
];
|
|
3581
|
+
let remaining = value;
|
|
3582
|
+
let output = "";
|
|
3583
|
+
for (const [amount, text] of numerals) {
|
|
3584
|
+
while (remaining >= amount) {
|
|
3585
|
+
output += text;
|
|
3586
|
+
remaining -= amount;
|
|
3587
|
+
}
|
|
3588
|
+
}
|
|
3589
|
+
return output;
|
|
3590
|
+
}
|
|
3591
|
+
function formatOrdinal(value, format) {
|
|
3592
|
+
switch (format) {
|
|
3593
|
+
case "lowerLetter":
|
|
3594
|
+
return toAlpha(value).toLowerCase();
|
|
3595
|
+
case "upperLetter":
|
|
3596
|
+
return toAlpha(value).toUpperCase();
|
|
3597
|
+
case "lowerRoman":
|
|
3598
|
+
return toRoman$1(value).toLowerCase();
|
|
3599
|
+
case "upperRoman":
|
|
3600
|
+
return toRoman$1(value).toUpperCase();
|
|
3601
|
+
default:
|
|
3602
|
+
return String(value);
|
|
3603
|
+
}
|
|
3604
|
+
}
|
|
3605
|
+
function normalizeBulletGlyph(glyph) {
|
|
3606
|
+
const code2 = glyph.codePointAt(0);
|
|
3607
|
+
return code2 !== void 0 && code2 >= 57344 && code2 <= 63743 ? PUA_BULLET_MAP[code2] ?? "•" : glyph;
|
|
3608
|
+
}
|
|
3609
|
+
function collectNumberingParagraphs(document2) {
|
|
3610
|
+
const result = [];
|
|
3611
|
+
const collectTextBoxes = (paragraph) => {
|
|
3612
|
+
for (const run of paragraph.runs) {
|
|
3613
|
+
if (run.textBox) collectBlocks2(run.textBox.blocks);
|
|
3614
|
+
}
|
|
3615
|
+
};
|
|
3616
|
+
const collectBlocks2 = (blocks) => {
|
|
3617
|
+
for (const block of blocks) {
|
|
3618
|
+
if (block.type === "paragraph") {
|
|
3619
|
+
result.push(block);
|
|
3620
|
+
collectTextBoxes(block);
|
|
3621
|
+
} else {
|
|
3622
|
+
for (const row of block.rows) {
|
|
3623
|
+
for (const cell of row.cells) collectBlocks2(cell.blocks);
|
|
3624
|
+
}
|
|
3625
|
+
}
|
|
3626
|
+
}
|
|
3627
|
+
};
|
|
3628
|
+
for (const paragraph of getDocumentParagraphs(document2)) {
|
|
3629
|
+
result.push(paragraph);
|
|
3630
|
+
collectTextBoxes(paragraph);
|
|
3631
|
+
}
|
|
3632
|
+
return result;
|
|
3633
|
+
}
|
|
3634
|
+
function buildListLabels(document2) {
|
|
3635
|
+
const labels = /* @__PURE__ */ new Map();
|
|
3636
|
+
const states = /* @__PURE__ */ new Map();
|
|
3637
|
+
for (const paragraph of collectNumberingParagraphs(document2)) {
|
|
3638
|
+
const list = paragraph.list;
|
|
3639
|
+
if (!list) continue;
|
|
3640
|
+
const level = Math.max(0, list.level ?? 0);
|
|
3641
|
+
if (list.kind === "bullet") {
|
|
3642
|
+
labels.set(
|
|
3643
|
+
paragraph.id,
|
|
3644
|
+
list.bulletGlyph ? normalizeBulletGlyph(list.bulletGlyph) : BULLET_GLYPHS[level % BULLET_GLYPHS.length]
|
|
3645
|
+
);
|
|
3646
|
+
continue;
|
|
3647
|
+
}
|
|
3648
|
+
const key = list.instanceId ? `instance:${list.instanceId}` : "legacy";
|
|
3649
|
+
const state = states.get(key) ?? { counters: [], formats: [] };
|
|
3650
|
+
states.set(key, state);
|
|
3651
|
+
while (state.counters.length <= level) state.counters.push(0);
|
|
3652
|
+
state.counters.length = level + 1;
|
|
3653
|
+
if (list.levelFormats) {
|
|
3654
|
+
list.levelFormats.forEach((format, index) => {
|
|
3655
|
+
state.formats[index] = format;
|
|
3656
|
+
});
|
|
3657
|
+
}
|
|
3658
|
+
state.formats[level] = list.format ?? ORDERED_DEFAULT_FORMATS[level % ORDERED_DEFAULT_FORMATS.length];
|
|
3659
|
+
state.counters[level] = typeof list.startAt === "number" ? list.startAt : state.counters[level] === 0 ? 1 : state.counters[level] + 1;
|
|
3660
|
+
const pattern = list.levelText ?? `%${level + 1}.`;
|
|
3661
|
+
labels.set(
|
|
3662
|
+
paragraph.id,
|
|
3663
|
+
pattern.replace(/%([1-9])/g, (token, rawLevel) => {
|
|
3664
|
+
const referencedLevel = Number(rawLevel) - 1;
|
|
3665
|
+
const value = state.counters[referencedLevel];
|
|
3666
|
+
if (value === void 0) return token;
|
|
3667
|
+
const format = list.legal ? "decimal" : state.formats[referencedLevel] ?? "decimal";
|
|
3668
|
+
return formatOrdinal(value, format);
|
|
3669
|
+
})
|
|
3670
|
+
);
|
|
3671
|
+
}
|
|
3672
|
+
return labels;
|
|
3673
|
+
}
|
|
3674
|
+
function resolveListLabel(paragraph, labels) {
|
|
3675
|
+
return labels.get(paragraph.id) ?? "";
|
|
3676
|
+
}
|
|
3489
3677
|
function getActiveSectionIndex(state) {
|
|
3490
3678
|
return state.activeSectionIndex ?? 0;
|
|
3491
3679
|
}
|
|
@@ -3580,31 +3768,20 @@ function normalizeSelection(state, providedParagraphs) {
|
|
|
3580
3768
|
isCollapsed: comparison === 0
|
|
3581
3769
|
};
|
|
3582
3770
|
}
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
let nextTableId = 1;
|
|
3587
|
-
let nextTableRowId = 1;
|
|
3588
|
-
let nextTableCellId = 1;
|
|
3589
|
-
let nextFootnoteId = 1;
|
|
3590
|
-
let nextBookmarkId = 1;
|
|
3591
|
-
let nextCommentId = 1;
|
|
3771
|
+
function createEditorNodeId(kind) {
|
|
3772
|
+
return `${kind}:${crypto.randomUUID()}`;
|
|
3773
|
+
}
|
|
3592
3774
|
function createEditorBookmarkId() {
|
|
3593
|
-
|
|
3594
|
-
nextBookmarkId += 1;
|
|
3595
|
-
return id;
|
|
3775
|
+
return createEditorNodeId("bookmark");
|
|
3596
3776
|
}
|
|
3597
3777
|
function createEditorCommentId() {
|
|
3598
|
-
|
|
3599
|
-
nextCommentId += 1;
|
|
3600
|
-
return id;
|
|
3778
|
+
return createEditorNodeId("comment");
|
|
3601
3779
|
}
|
|
3602
3780
|
function createEditorRun(text = "") {
|
|
3603
3781
|
const run = {
|
|
3604
|
-
id:
|
|
3782
|
+
id: createEditorNodeId("run"),
|
|
3605
3783
|
text
|
|
3606
3784
|
};
|
|
3607
|
-
nextRunId += 1;
|
|
3608
3785
|
return run;
|
|
3609
3786
|
}
|
|
3610
3787
|
function createEditorStyledRun(text = "", styles, image, textBox) {
|
|
@@ -3622,27 +3799,25 @@ function createEditorStyledRun(text = "", styles, image, textBox) {
|
|
|
3622
3799
|
}
|
|
3623
3800
|
function createEditorParagraph(text = "") {
|
|
3624
3801
|
const paragraph = {
|
|
3625
|
-
id:
|
|
3802
|
+
id: createEditorNodeId("paragraph"),
|
|
3626
3803
|
type: "paragraph",
|
|
3627
3804
|
runs: [createEditorRun(text)]
|
|
3628
3805
|
};
|
|
3629
|
-
nextParagraphId += 1;
|
|
3630
3806
|
return paragraph;
|
|
3631
3807
|
}
|
|
3632
3808
|
function createEditorParagraphFromRuns(runs) {
|
|
3633
3809
|
const paragraph = {
|
|
3634
|
-
id:
|
|
3810
|
+
id: createEditorNodeId("paragraph"),
|
|
3635
3811
|
type: "paragraph",
|
|
3636
3812
|
runs: runs.length > 0 ? runs.map(
|
|
3637
3813
|
(run) => createEditorStyledRun(run.text, run.styles, run.image, run.textBox)
|
|
3638
3814
|
) : [createEditorRun("")]
|
|
3639
3815
|
};
|
|
3640
|
-
nextParagraphId += 1;
|
|
3641
3816
|
return paragraph;
|
|
3642
3817
|
}
|
|
3643
3818
|
function createEditorTableCell(paragraphs, colSpan = 1, options) {
|
|
3644
3819
|
const cell = {
|
|
3645
|
-
id:
|
|
3820
|
+
id: createEditorNodeId("table-cell"),
|
|
3646
3821
|
blocks: paragraphs.length > 0 ? paragraphs : [createEditorParagraph("")]
|
|
3647
3822
|
};
|
|
3648
3823
|
if (colSpan > 1) {
|
|
@@ -3654,34 +3829,29 @@ function createEditorTableCell(paragraphs, colSpan = 1, options) {
|
|
|
3654
3829
|
if (options == null ? void 0 : options.vMerge) {
|
|
3655
3830
|
cell.vMerge = options.vMerge;
|
|
3656
3831
|
}
|
|
3657
|
-
nextTableCellId += 1;
|
|
3658
3832
|
return cell;
|
|
3659
3833
|
}
|
|
3660
3834
|
function createEditorTableRow(cells, options) {
|
|
3661
3835
|
const row = {
|
|
3662
|
-
id:
|
|
3836
|
+
id: createEditorNodeId("table-row"),
|
|
3663
3837
|
cells
|
|
3664
3838
|
};
|
|
3665
3839
|
if (options == null ? void 0 : options.isHeader) {
|
|
3666
3840
|
row.isHeader = true;
|
|
3667
3841
|
}
|
|
3668
|
-
nextTableRowId += 1;
|
|
3669
3842
|
return row;
|
|
3670
3843
|
}
|
|
3671
3844
|
function createEditorTable(rows, gridCols) {
|
|
3672
3845
|
const table = {
|
|
3673
|
-
id:
|
|
3846
|
+
id: createEditorNodeId("table"),
|
|
3674
3847
|
type: "table",
|
|
3675
3848
|
rows,
|
|
3676
3849
|
gridCols
|
|
3677
3850
|
};
|
|
3678
|
-
nextTableId += 1;
|
|
3679
3851
|
return table;
|
|
3680
3852
|
}
|
|
3681
3853
|
function createEditorFootnoteId() {
|
|
3682
|
-
|
|
3683
|
-
nextFootnoteId += 1;
|
|
3684
|
-
return id;
|
|
3854
|
+
return createEditorNodeId("footnote");
|
|
3685
3855
|
}
|
|
3686
3856
|
function createEditorFootnote(blocks) {
|
|
3687
3857
|
const initialBlocks = [createEditorParagraphWithStyle("", { styleId: "footnoteText" })];
|
|
@@ -3848,7 +4018,7 @@ function createEditorDocument(blocks, pageSettings, sections, styles, metadata,
|
|
|
3848
4018
|
}
|
|
3849
4019
|
);
|
|
3850
4020
|
const document2 = {
|
|
3851
|
-
id:
|
|
4021
|
+
id: createEditorNodeId("document"),
|
|
3852
4022
|
pageSettings: normalizedPageSettings,
|
|
3853
4023
|
sections: sections ?? [
|
|
3854
4024
|
{
|
|
@@ -3865,7 +4035,6 @@ function createEditorDocument(blocks, pageSettings, sections, styles, metadata,
|
|
|
3865
4035
|
// "asset:img-1" as a URL.
|
|
3866
4036
|
assets: assets ?? void 0
|
|
3867
4037
|
};
|
|
3868
|
-
nextDocumentId += 1;
|
|
3869
4038
|
return document2;
|
|
3870
4039
|
}
|
|
3871
4040
|
function getDocumentCharacterCount(document2) {
|
|
@@ -4494,29 +4663,6 @@ function mount(target, props = {}) {
|
|
|
4494
4663
|
unmount: () => client.dispose()
|
|
4495
4664
|
});
|
|
4496
4665
|
}
|
|
4497
|
-
class MenuRegistry {
|
|
4498
|
-
constructor() {
|
|
4499
|
-
__publicField(this, "items", []);
|
|
4500
|
-
}
|
|
4501
|
-
register(item) {
|
|
4502
|
-
const existingIndex = this.items.findIndex((entry) => entry.id === item.id);
|
|
4503
|
-
if (existingIndex >= 0) {
|
|
4504
|
-
this.items[existingIndex] = item;
|
|
4505
|
-
} else {
|
|
4506
|
-
this.items.push(item);
|
|
4507
|
-
}
|
|
4508
|
-
this.items.sort(
|
|
4509
|
-
(a, b) => (a.order ?? Number.MAX_SAFE_INTEGER) - (b.order ?? Number.MAX_SAFE_INTEGER)
|
|
4510
|
-
);
|
|
4511
|
-
}
|
|
4512
|
-
unregister(id) {
|
|
4513
|
-
this.items = this.items.filter((i) => i.id !== id);
|
|
4514
|
-
}
|
|
4515
|
-
getItems() {
|
|
4516
|
-
return [...this.items];
|
|
4517
|
-
}
|
|
4518
|
-
}
|
|
4519
|
-
const defaultMenuRegistry = new MenuRegistry();
|
|
4520
4666
|
var _tmpl$$Q = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg width=24 height=24 viewBox="0 0 24 24"fill=none aria-hidden=true><text x=2 y=18 font-family="'Segoe UI', Arial, sans-serif"font-size=14 font-weight=700 fill=currentColor>ab</text><text x=15.5 y=11 font-family="'Segoe UI', Arial, sans-serif"font-size=10 font-weight=700 fill=#c00000>1`), _tmpl$2$y = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg width=24 height=24 viewBox="0 0 24 24"aria-hidden=true><g fill=currentColor><path d="M3.375 4.875 L7.125 8.625 L3.375 12.375 L2.25 11.25 L4.875 8.625 L2.25 6 Z"></path><rect x=10.125 y=6 width=9 height=1.6875 rx=0.25></rect><rect x=5.625 y=10.875 width=13.5 height=1.6875 rx=0.25></rect><rect x=5.625 y=15.75 width=13.5 height=1.6875 rx=0.25>`), _tmpl$3$l = /* @__PURE__ */ template(`<i>`);
|
|
4521
4667
|
const FootnoteIcon = () => _tmpl$$Q();
|
|
4522
4668
|
const SpecialIndentFirstLineIcon = () => _tmpl$2$y();
|
|
@@ -4542,366 +4688,11 @@ function ToolIcon(props) {
|
|
|
4542
4688
|
children: (render2) => render2()()
|
|
4543
4689
|
});
|
|
4544
4690
|
}
|
|
4545
|
-
const defaultMenuItems = [
|
|
4546
|
-
// File
|
|
4547
|
-
{
|
|
4548
|
-
id: "file_new",
|
|
4549
|
-
path: "File/New",
|
|
4550
|
-
labelKey: "menu.file.new",
|
|
4551
|
-
shortcut: "Ctrl+N",
|
|
4552
|
-
hidden: true,
|
|
4553
|
-
icon: "file-plus"
|
|
4554
|
-
},
|
|
4555
|
-
{
|
|
4556
|
-
id: "file_import",
|
|
4557
|
-
path: "File/Import",
|
|
4558
|
-
labelKey: "toolbar.import",
|
|
4559
|
-
shortcut: "Ctrl+O",
|
|
4560
|
-
command: "importDocument",
|
|
4561
|
-
icon: "upload"
|
|
4562
|
-
},
|
|
4563
|
-
{
|
|
4564
|
-
id: "file_save",
|
|
4565
|
-
path: "File/Save",
|
|
4566
|
-
labelKey: "generic.save",
|
|
4567
|
-
shortcut: "Ctrl+S",
|
|
4568
|
-
hidden: true,
|
|
4569
|
-
icon: "save"
|
|
4570
|
-
},
|
|
4571
|
-
{
|
|
4572
|
-
id: "file_export",
|
|
4573
|
-
path: "File/Export",
|
|
4574
|
-
labelKey: "menu.file.export",
|
|
4575
|
-
icon: "download"
|
|
4576
|
-
},
|
|
4577
|
-
{
|
|
4578
|
-
id: "file_export_pdf",
|
|
4579
|
-
path: "File/Export/PDF",
|
|
4580
|
-
command: "exportPdf",
|
|
4581
|
-
icon: "file-down"
|
|
4582
|
-
},
|
|
4583
|
-
{
|
|
4584
|
-
id: "file_export_docx",
|
|
4585
|
-
path: "File/Export/DOCX",
|
|
4586
|
-
command: "exportDocx",
|
|
4587
|
-
icon: "file-text"
|
|
4588
|
-
},
|
|
4589
|
-
{ id: "file_export_html", path: "File/Export/HTML", hidden: true },
|
|
4590
|
-
{ id: "file_export_md", path: "File/Export/MD", hidden: true },
|
|
4591
|
-
{
|
|
4592
|
-
id: "file_print",
|
|
4593
|
-
path: "File/Print",
|
|
4594
|
-
labelKey: "menu.file.print",
|
|
4595
|
-
shortcut: "Ctrl+P",
|
|
4596
|
-
command: "print",
|
|
4597
|
-
icon: "printer"
|
|
4598
|
-
},
|
|
4599
|
-
// Edit
|
|
4600
|
-
{
|
|
4601
|
-
id: "edit_undo",
|
|
4602
|
-
path: "Edit/Undo",
|
|
4603
|
-
labelKey: "toolbar.undo",
|
|
4604
|
-
shortcut: "Ctrl+Z",
|
|
4605
|
-
command: "undo",
|
|
4606
|
-
icon: "undo-2"
|
|
4607
|
-
},
|
|
4608
|
-
{
|
|
4609
|
-
id: "edit_redo",
|
|
4610
|
-
path: "Edit/Redo",
|
|
4611
|
-
labelKey: "toolbar.redo",
|
|
4612
|
-
shortcut: "Ctrl+Y",
|
|
4613
|
-
command: "redo",
|
|
4614
|
-
icon: "redo-2"
|
|
4615
|
-
},
|
|
4616
|
-
{
|
|
4617
|
-
id: "edit_cut",
|
|
4618
|
-
path: "Edit/Cut",
|
|
4619
|
-
labelKey: "menu.edit.cut",
|
|
4620
|
-
shortcut: "Ctrl+X",
|
|
4621
|
-
hidden: true
|
|
4622
|
-
},
|
|
4623
|
-
{
|
|
4624
|
-
id: "edit_copy",
|
|
4625
|
-
path: "Edit/Copy",
|
|
4626
|
-
labelKey: "menu.edit.copy",
|
|
4627
|
-
shortcut: "Ctrl+C",
|
|
4628
|
-
command: "copy",
|
|
4629
|
-
icon: "copy"
|
|
4630
|
-
},
|
|
4631
|
-
{
|
|
4632
|
-
id: "edit_paste",
|
|
4633
|
-
path: "Edit/Paste",
|
|
4634
|
-
labelKey: "menu.edit.paste",
|
|
4635
|
-
shortcut: "Ctrl+V",
|
|
4636
|
-
hidden: true
|
|
4637
|
-
},
|
|
4638
|
-
{
|
|
4639
|
-
id: "edit_find",
|
|
4640
|
-
path: "Edit/Find & Replace",
|
|
4641
|
-
labelKey: "find.title",
|
|
4642
|
-
shortcut: "Ctrl+F",
|
|
4643
|
-
command: "find",
|
|
4644
|
-
icon: "search"
|
|
4645
|
-
},
|
|
4646
|
-
{
|
|
4647
|
-
id: "edit_selectAll",
|
|
4648
|
-
path: "Edit/Select All",
|
|
4649
|
-
labelKey: "menu.edit.selectAll",
|
|
4650
|
-
shortcut: "Ctrl+A",
|
|
4651
|
-
hidden: true
|
|
4652
|
-
},
|
|
4653
|
-
// View
|
|
4654
|
-
{
|
|
4655
|
-
id: "view_outline",
|
|
4656
|
-
path: "View/Show Outline",
|
|
4657
|
-
labelKey: "menu.view.outline",
|
|
4658
|
-
hidden: true
|
|
4659
|
-
},
|
|
4660
|
-
{ id: "view_ruler", path: "View/Show Ruler", hidden: true },
|
|
4661
|
-
{
|
|
4662
|
-
id: "view_margins",
|
|
4663
|
-
path: "View/Show Margins",
|
|
4664
|
-
labelKey: "menu.view.margins",
|
|
4665
|
-
command: "toggleShowMargins",
|
|
4666
|
-
icon: (host) => host.commands.state("toggleShowMargins").isActive ? "check-square" : "square"
|
|
4667
|
-
},
|
|
4668
|
-
{
|
|
4669
|
-
id: "view_paragraph_marks",
|
|
4670
|
-
path: "View/Show Paragraph Marks",
|
|
4671
|
-
labelKey: "menu.view.paragraphMarks",
|
|
4672
|
-
command: "toggleShowParagraphMarks",
|
|
4673
|
-
icon: (host) => host.commands.state("toggleShowParagraphMarks").isActive ? "check-square" : "square"
|
|
4674
|
-
},
|
|
4675
|
-
{
|
|
4676
|
-
id: "view_precise_fonts",
|
|
4677
|
-
path: "View/Precise Fonts",
|
|
4678
|
-
labelKey: "menu.view.preciseFonts",
|
|
4679
|
-
command: "togglePreciseFonts",
|
|
4680
|
-
icon: (host) => host.commands.state("togglePreciseFonts").isActive ? "check-square" : "square"
|
|
4681
|
-
},
|
|
4682
|
-
{
|
|
4683
|
-
id: "view_fullscreen",
|
|
4684
|
-
path: "View/Full Screen",
|
|
4685
|
-
labelKey: "menu.view.fullscreen",
|
|
4686
|
-
hidden: true
|
|
4687
|
-
},
|
|
4688
|
-
{ id: "view_zoom", path: "View/Zoom", labelKey: "status.zoom", hidden: true },
|
|
4689
|
-
{ id: "view_zoom_50", path: "View/Zoom/50%", hidden: true },
|
|
4690
|
-
{ id: "view_zoom_75", path: "View/Zoom/75%", hidden: true },
|
|
4691
|
-
{ id: "view_zoom_100", path: "View/Zoom/100%", hidden: true },
|
|
4692
|
-
{ id: "view_zoom_125", path: "View/Zoom/125%", hidden: true },
|
|
4693
|
-
{ id: "view_zoom_150", path: "View/Zoom/150%", hidden: true },
|
|
4694
|
-
{ id: "view_zoom_200", path: "View/Zoom/200%", hidden: true },
|
|
4695
|
-
// Insert
|
|
4696
|
-
{
|
|
4697
|
-
id: "insert_image",
|
|
4698
|
-
path: "Insert/Image",
|
|
4699
|
-
labelKey: "toolbar.image",
|
|
4700
|
-
command: "insertImage",
|
|
4701
|
-
icon: "image"
|
|
4702
|
-
},
|
|
4703
|
-
{
|
|
4704
|
-
id: "insert_image_caption",
|
|
4705
|
-
path: "Insert/Image Caption",
|
|
4706
|
-
labelKey: "toolbar.imageCaption",
|
|
4707
|
-
command: "insertImageCaption",
|
|
4708
|
-
icon: "subtitles"
|
|
4709
|
-
},
|
|
4710
|
-
{
|
|
4711
|
-
id: "insert_table",
|
|
4712
|
-
path: "Insert/Table",
|
|
4713
|
-
labelKey: "toolbar.table",
|
|
4714
|
-
command: { name: "insertTable", payload: { rows: 3, cols: 3 } },
|
|
4715
|
-
icon: "table"
|
|
4716
|
-
},
|
|
4717
|
-
{
|
|
4718
|
-
id: "insert_link",
|
|
4719
|
-
path: "Insert/Link",
|
|
4720
|
-
labelKey: "toolbar.link",
|
|
4721
|
-
command: "link",
|
|
4722
|
-
icon: "link"
|
|
4723
|
-
},
|
|
4724
|
-
{
|
|
4725
|
-
id: "insert_footnote",
|
|
4726
|
-
path: "Insert/Footnote",
|
|
4727
|
-
labelKey: "toolbar.footnote",
|
|
4728
|
-
shortcut: "Ctrl+Alt+F",
|
|
4729
|
-
command: "insertFootnote",
|
|
4730
|
-
icon: "footnote"
|
|
4731
|
-
},
|
|
4732
|
-
{
|
|
4733
|
-
id: "insert_toc",
|
|
4734
|
-
path: "Insert/Table of Contents",
|
|
4735
|
-
labelKey: "menu.insert.toc",
|
|
4736
|
-
command: "insertTableOfContents",
|
|
4737
|
-
icon: "list"
|
|
4738
|
-
},
|
|
4739
|
-
{
|
|
4740
|
-
id: "insert_toc_update",
|
|
4741
|
-
path: "Insert/Update Table of Contents",
|
|
4742
|
-
labelKey: "menu.insert.updateToc",
|
|
4743
|
-
command: "updateTableOfContents",
|
|
4744
|
-
icon: "refresh-cw"
|
|
4745
|
-
},
|
|
4746
|
-
{ id: "insert_hr", path: "Insert/Horizontal Rule", hidden: true },
|
|
4747
|
-
{
|
|
4748
|
-
id: "insert_pageBreak",
|
|
4749
|
-
path: "Insert/Page Break",
|
|
4750
|
-
labelKey: "metric.pageBreak",
|
|
4751
|
-
command: "pageBreak",
|
|
4752
|
-
icon: "file-minus"
|
|
4753
|
-
},
|
|
4754
|
-
{ id: "insert_specialChar", path: "Insert/Special Character", hidden: true },
|
|
4755
|
-
{ id: "insert_comment", path: "Insert/Comment", hidden: true },
|
|
4756
|
-
// Format
|
|
4757
|
-
{
|
|
4758
|
-
id: "format_text",
|
|
4759
|
-
path: "Format/Text",
|
|
4760
|
-
labelKey: "menu.format.text",
|
|
4761
|
-
icon: "type"
|
|
4762
|
-
},
|
|
4763
|
-
{
|
|
4764
|
-
id: "format_text_bold",
|
|
4765
|
-
path: "Format/Text/Bold",
|
|
4766
|
-
labelKey: "toolbar.bold",
|
|
4767
|
-
shortcut: "Ctrl+B",
|
|
4768
|
-
command: "bold",
|
|
4769
|
-
icon: "bold"
|
|
4770
|
-
},
|
|
4771
|
-
{
|
|
4772
|
-
id: "format_text_italic",
|
|
4773
|
-
path: "Format/Text/Italic",
|
|
4774
|
-
labelKey: "toolbar.italic",
|
|
4775
|
-
shortcut: "Ctrl+I",
|
|
4776
|
-
command: "italic",
|
|
4777
|
-
icon: "italic"
|
|
4778
|
-
},
|
|
4779
|
-
{
|
|
4780
|
-
id: "format_text_underline",
|
|
4781
|
-
path: "Format/Text/Underline",
|
|
4782
|
-
labelKey: "toolbar.underline",
|
|
4783
|
-
shortcut: "Ctrl+U",
|
|
4784
|
-
command: "underline",
|
|
4785
|
-
icon: "underline"
|
|
4786
|
-
},
|
|
4787
|
-
{
|
|
4788
|
-
id: "format_text_strike",
|
|
4789
|
-
path: "Format/Text/Strikethrough",
|
|
4790
|
-
labelKey: "toolbar.strike",
|
|
4791
|
-
command: "strike",
|
|
4792
|
-
icon: "strikethrough"
|
|
4793
|
-
},
|
|
4794
|
-
{
|
|
4795
|
-
id: "format_paragraphStyles",
|
|
4796
|
-
path: "Format/Paragraph styles",
|
|
4797
|
-
labelKey: "toolbar.style",
|
|
4798
|
-
hidden: true
|
|
4799
|
-
},
|
|
4800
|
-
{
|
|
4801
|
-
id: "format_align",
|
|
4802
|
-
path: "Format/Align",
|
|
4803
|
-
labelKey: "menu.format.align",
|
|
4804
|
-
icon: "align-left"
|
|
4805
|
-
},
|
|
4806
|
-
{
|
|
4807
|
-
id: "format_align_left",
|
|
4808
|
-
path: "Format/Align/Left",
|
|
4809
|
-
labelKey: "toolbar.alignLeft",
|
|
4810
|
-
command: "alignLeft",
|
|
4811
|
-
icon: "align-left"
|
|
4812
|
-
},
|
|
4813
|
-
{
|
|
4814
|
-
id: "format_align_center",
|
|
4815
|
-
path: "Format/Align/Center",
|
|
4816
|
-
labelKey: "toolbar.alignCenter",
|
|
4817
|
-
command: "alignCenter",
|
|
4818
|
-
icon: "align-center"
|
|
4819
|
-
},
|
|
4820
|
-
{
|
|
4821
|
-
id: "format_align_right",
|
|
4822
|
-
path: "Format/Align/Right",
|
|
4823
|
-
labelKey: "toolbar.alignRight",
|
|
4824
|
-
command: "alignRight",
|
|
4825
|
-
icon: "align-right"
|
|
4826
|
-
},
|
|
4827
|
-
{
|
|
4828
|
-
id: "format_align_justify",
|
|
4829
|
-
path: "Format/Align/Justify",
|
|
4830
|
-
labelKey: "toolbar.justify",
|
|
4831
|
-
command: "alignJustify",
|
|
4832
|
-
icon: "align-justify"
|
|
4833
|
-
},
|
|
4834
|
-
{ id: "format_lineSpacing", path: "Format/Line spacing", hidden: true },
|
|
4835
|
-
{
|
|
4836
|
-
id: "format_lists",
|
|
4837
|
-
path: "Format/Lists",
|
|
4838
|
-
labelKey: "menu.format.lists",
|
|
4839
|
-
icon: "list"
|
|
4840
|
-
},
|
|
4841
|
-
{
|
|
4842
|
-
id: "format_lists_bullet",
|
|
4843
|
-
path: "Format/Lists/Bullet List",
|
|
4844
|
-
labelKey: "toolbar.bulletList",
|
|
4845
|
-
command: "bulletList",
|
|
4846
|
-
icon: "list"
|
|
4847
|
-
},
|
|
4848
|
-
{
|
|
4849
|
-
id: "format_lists_numbered",
|
|
4850
|
-
path: "Format/Lists/Numbered List",
|
|
4851
|
-
labelKey: "toolbar.numberedList",
|
|
4852
|
-
command: "orderedList",
|
|
4853
|
-
icon: "list-ordered"
|
|
4854
|
-
},
|
|
4855
|
-
{ id: "format_clear", path: "Format/Clear formatting", hidden: true },
|
|
4856
|
-
// Layout
|
|
4857
|
-
{
|
|
4858
|
-
id: "layout_orientation",
|
|
4859
|
-
path: "Layout/Orientation",
|
|
4860
|
-
labelKey: "section.orientation",
|
|
4861
|
-
icon: "layout"
|
|
4862
|
-
},
|
|
4863
|
-
{
|
|
4864
|
-
id: "layout_orientation_portrait",
|
|
4865
|
-
path: "Layout/Orientation/Portrait",
|
|
4866
|
-
labelKey: "section.portrait",
|
|
4867
|
-
command: { name: "setOrientation", payload: "portrait" },
|
|
4868
|
-
icon: (host) => host.commands.state("toggleOrientation").isActive ? "" : "check"
|
|
4869
|
-
},
|
|
4870
|
-
{
|
|
4871
|
-
id: "layout_orientation_landscape",
|
|
4872
|
-
path: "Layout/Orientation/Landscape",
|
|
4873
|
-
labelKey: "section.landscape",
|
|
4874
|
-
command: { name: "setOrientation", payload: "landscape" },
|
|
4875
|
-
icon: (host) => host.commands.state("toggleOrientation").isActive ? "check" : ""
|
|
4876
|
-
},
|
|
4877
|
-
// Tools
|
|
4878
|
-
{
|
|
4879
|
-
id: "tools_wordcount",
|
|
4880
|
-
path: "Tools/Word count",
|
|
4881
|
-
labelKey: "menu.tools.wordcount",
|
|
4882
|
-
hidden: true
|
|
4883
|
-
},
|
|
4884
|
-
{ id: "tools_spelling", hidden: true, path: "Tools/Spelling" },
|
|
4885
|
-
{ id: "tools_preferences", path: "Tools/Preferences", hidden: true },
|
|
4886
|
-
// Help
|
|
4887
|
-
{
|
|
4888
|
-
id: "help_shortcuts",
|
|
4889
|
-
path: "Help/Keyboard shortcuts",
|
|
4890
|
-
labelKey: "menu.help.shortcuts",
|
|
4891
|
-
hidden: true
|
|
4892
|
-
},
|
|
4893
|
-
{
|
|
4894
|
-
id: "help_about",
|
|
4895
|
-
path: "Help/About",
|
|
4896
|
-
labelKey: "menu.help.about",
|
|
4897
|
-
hidden: true
|
|
4898
|
-
}
|
|
4899
|
-
];
|
|
4900
|
-
defaultMenuItems.forEach((item) => defaultMenuRegistry.register(item));
|
|
4901
4691
|
var _tmpl$$P = /* @__PURE__ */ template(`<div class=oasis-menubar role=menubar>`), _tmpl$2$x = /* @__PURE__ */ template(`<div class=oasis-menubar-dropdown role=menu>`), _tmpl$3$k = /* @__PURE__ */ template(`<div class=oasis-menubar-menu><div class=oasis-menubar-button role=menuitem aria-haspopup=true>`), _tmpl$4$f = /* @__PURE__ */ template(`<div class=oasis-menubar-separator role=separator>`), _tmpl$5$e = /* @__PURE__ */ template(`<span class=oasis-menubar-item-icon aria-hidden=true>`), _tmpl$6$7 = /* @__PURE__ */ template(`<span class=oasis-menubar-shortcut>`), _tmpl$7$3 = /* @__PURE__ */ template(`<i class=oasis-menubar-submenu-icon data-lucide=chevron-right>`), _tmpl$8$2 = /* @__PURE__ */ template(`<div class=oasis-menubar-submenu role=menu>`), _tmpl$9$1 = /* @__PURE__ */ template(`<div class=oasis-menubar-item role=menuitem><span class=oasis-menubar-item-main><span>`);
|
|
4902
4692
|
function Menubar(props) {
|
|
4693
|
+
const t = useI18n();
|
|
4903
4694
|
const [activeMenu, setActiveMenu] = createSignal(null);
|
|
4904
|
-
const menuItems = () =>
|
|
4695
|
+
const menuItems = () => props.registry.getItems();
|
|
4905
4696
|
const visibleMenuItems = () => menuItems().filter((item) => !item.hidden);
|
|
4906
4697
|
const itemByPath = () => new Map(visibleMenuItems().map((item) => [item.path, item]));
|
|
4907
4698
|
const menuTree = () => {
|
|
@@ -5024,6 +4815,7 @@ function Menubar(props) {
|
|
|
5024
4815
|
}
|
|
5025
4816
|
function MenuNode(props) {
|
|
5026
4817
|
var _a, _b, _c;
|
|
4818
|
+
const t = useI18n();
|
|
5027
4819
|
const {
|
|
5028
4820
|
node,
|
|
5029
4821
|
onClose
|
|
@@ -7973,8 +7765,8 @@ function requireTransform() {
|
|
|
7973
7765
|
transform.transformDictionaryWord = function(dst, idx, word, len, transform2) {
|
|
7974
7766
|
var prefix2 = kTransforms[transform2].prefix;
|
|
7975
7767
|
var suffix = kTransforms[transform2].suffix;
|
|
7976
|
-
var
|
|
7977
|
-
var skip =
|
|
7768
|
+
var t = kTransforms[transform2].transform;
|
|
7769
|
+
var skip = t < kOmitFirst1 ? 0 : t - (kOmitFirst1 - 1);
|
|
7978
7770
|
var i = 0;
|
|
7979
7771
|
var start_idx = idx;
|
|
7980
7772
|
var uppercase;
|
|
@@ -7987,16 +7779,16 @@ function requireTransform() {
|
|
|
7987
7779
|
}
|
|
7988
7780
|
word += skip;
|
|
7989
7781
|
len -= skip;
|
|
7990
|
-
if (
|
|
7991
|
-
len -=
|
|
7782
|
+
if (t <= kOmitLast9) {
|
|
7783
|
+
len -= t;
|
|
7992
7784
|
}
|
|
7993
7785
|
for (i = 0; i < len; i++) {
|
|
7994
7786
|
dst[idx++] = BrotliDictionary.dictionary[word + i];
|
|
7995
7787
|
}
|
|
7996
7788
|
uppercase = idx - len;
|
|
7997
|
-
if (
|
|
7789
|
+
if (t === kUppercaseFirst) {
|
|
7998
7790
|
ToUpperCase(dst, uppercase);
|
|
7999
|
-
} else if (
|
|
7791
|
+
} else if (t === kUppercaseAll) {
|
|
8000
7792
|
while (len > 0) {
|
|
8001
7793
|
var step = ToUpperCase(dst, uppercase);
|
|
8002
7794
|
uppercase += step;
|
|
@@ -9651,7 +9443,7 @@ function createDefaultTransformers() {
|
|
|
9651
9443
|
}
|
|
9652
9444
|
function rebuildFont(header, transformed, deps) {
|
|
9653
9445
|
const tableMap = /* @__PURE__ */ new Map();
|
|
9654
|
-
const tablesByTag = new Map(header.tables.map((
|
|
9446
|
+
const tablesByTag = new Map(header.tables.map((t) => [t.tag, t]));
|
|
9655
9447
|
const state = { glyfInfo: null, numHMetrics: 0 };
|
|
9656
9448
|
const context2 = { header, tableMap, tablesByTag, state };
|
|
9657
9449
|
const transformers = deps.transformers;
|
|
@@ -11078,6 +10870,19 @@ function getListLabelInset(paragraph, styles) {
|
|
|
11078
10870
|
const baseInset = (paragraphStyle.indentLeft ?? 0) + resolveListGutterPx(paragraph, paragraphStyle);
|
|
11079
10871
|
return baseInset - Math.abs(paragraphStyle.indentHanging ?? 0);
|
|
11080
10872
|
}
|
|
10873
|
+
function getAlignedListLabelInset(paragraph, styles, textStart, labelWidth) {
|
|
10874
|
+
var _a;
|
|
10875
|
+
const start = Math.max(0, getListLabelInset(paragraph, styles));
|
|
10876
|
+
const width = Math.max(0, textStart - start);
|
|
10877
|
+
switch ((_a = paragraph.list) == null ? void 0 : _a.alignment) {
|
|
10878
|
+
case "center":
|
|
10879
|
+
return start + Math.max(0, (width - labelWidth) / 2);
|
|
10880
|
+
case "right":
|
|
10881
|
+
return start + Math.max(0, width - labelWidth);
|
|
10882
|
+
default:
|
|
10883
|
+
return start;
|
|
10884
|
+
}
|
|
10885
|
+
}
|
|
11081
10886
|
function getAvailableWidth(paragraph, styles, contentWidth, isFirstLine) {
|
|
11082
10887
|
const paragraphStyle = resolveEffectiveParagraphStyle(
|
|
11083
10888
|
paragraph.style,
|
|
@@ -11397,8 +11202,8 @@ function coveredIntervalsAtScanline(polygon2, y) {
|
|
|
11397
11202
|
const b = polygon2[(i + 1) % polygon2.length];
|
|
11398
11203
|
const crosses = a.y <= y && b.y > y || b.y <= y && a.y > y;
|
|
11399
11204
|
if (!crosses) continue;
|
|
11400
|
-
const
|
|
11401
|
-
xs.push(a.x +
|
|
11205
|
+
const t = (y - a.y) / (b.y - a.y);
|
|
11206
|
+
xs.push(a.x + t * (b.x - a.x));
|
|
11402
11207
|
}
|
|
11403
11208
|
xs.sort((p, q) => p - q);
|
|
11404
11209
|
const intervals = [];
|
|
@@ -11898,7 +11703,7 @@ function installGlobalReport() {
|
|
|
11898
11703
|
const layoutP = computePercentiles(layoutDurations);
|
|
11899
11704
|
const inputToLayoutP = computePercentiles(inputToLayout);
|
|
11900
11705
|
const inputTextP = computePercentiles(inputText);
|
|
11901
|
-
const longtaskDurations = longTasks.map((
|
|
11706
|
+
const longtaskDurations = longTasks.map((t) => t.duration);
|
|
11902
11707
|
const longtaskP = computePercentiles(longtaskDurations);
|
|
11903
11708
|
console.group("%c[perf] Summary", "color: #f59e0b; font-weight: bold;");
|
|
11904
11709
|
console.info(
|
|
@@ -14106,7 +13911,7 @@ const ROMAN_NUMERALS = [
|
|
|
14106
13911
|
[4, "iv"],
|
|
14107
13912
|
[1, "i"]
|
|
14108
13913
|
];
|
|
14109
|
-
function toRoman
|
|
13914
|
+
function toRoman(value) {
|
|
14110
13915
|
if (value <= 0) return String(value);
|
|
14111
13916
|
let remaining = value;
|
|
14112
13917
|
let result = "";
|
|
@@ -14133,9 +13938,9 @@ const SYMBOL_MARKS = ["*", "†", "‡", "§", "¶", "#"];
|
|
|
14133
13938
|
function getFootnoteDisplayMarker(oneBasedIndex, format = "decimal") {
|
|
14134
13939
|
switch (format) {
|
|
14135
13940
|
case "lowerRoman":
|
|
14136
|
-
return toRoman
|
|
13941
|
+
return toRoman(oneBasedIndex);
|
|
14137
13942
|
case "upperRoman":
|
|
14138
|
-
return toRoman
|
|
13943
|
+
return toRoman(oneBasedIndex).toUpperCase();
|
|
14139
13944
|
case "lowerLetter":
|
|
14140
13945
|
return toLetters(oneBasedIndex);
|
|
14141
13946
|
case "upperLetter":
|
|
@@ -14581,125 +14386,14 @@ function getCachedCanvasImage(src, onUpdate) {
|
|
|
14581
14386
|
imageCache.set(src, img);
|
|
14582
14387
|
return img;
|
|
14583
14388
|
}
|
|
14584
|
-
const
|
|
14585
|
-
function getListOrdinals(document2) {
|
|
14586
|
-
const cached = listOrdinalsCache.get(document2);
|
|
14587
|
-
if (cached) return cached;
|
|
14588
|
-
const result = /* @__PURE__ */ new Map();
|
|
14589
|
-
const paragraphs = getDocumentParagraphs(document2);
|
|
14590
|
-
const counters = /* @__PURE__ */ new Map();
|
|
14591
|
-
for (const paragraph of paragraphs) {
|
|
14592
|
-
const list = paragraph.list;
|
|
14593
|
-
if (!list || list.kind !== "ordered") {
|
|
14594
|
-
continue;
|
|
14595
|
-
}
|
|
14596
|
-
const level = list.level ?? 0;
|
|
14597
|
-
const prev = counters.get(level);
|
|
14598
|
-
const next = prev !== void 0 ? prev + 1 : list.startAt ?? 1;
|
|
14599
|
-
counters.set(level, next);
|
|
14600
|
-
result.set(paragraph.id, next);
|
|
14601
|
-
}
|
|
14602
|
-
listOrdinalsCache.set(document2, result);
|
|
14603
|
-
return result;
|
|
14604
|
-
}
|
|
14605
|
-
function formatOrdinal(value, format) {
|
|
14606
|
-
switch (format) {
|
|
14607
|
-
case "lowerLetter":
|
|
14608
|
-
return toAlpha(value).toLowerCase();
|
|
14609
|
-
case "upperLetter":
|
|
14610
|
-
return toAlpha(value).toUpperCase();
|
|
14611
|
-
case "lowerRoman":
|
|
14612
|
-
return toRoman(value).toLowerCase();
|
|
14613
|
-
case "upperRoman":
|
|
14614
|
-
return toRoman(value).toUpperCase();
|
|
14615
|
-
case "decimal":
|
|
14616
|
-
default:
|
|
14617
|
-
return String(value);
|
|
14618
|
-
}
|
|
14619
|
-
}
|
|
14620
|
-
function toAlpha(value) {
|
|
14621
|
-
if (value <= 0) return String(value);
|
|
14622
|
-
let n = value;
|
|
14623
|
-
let out = "";
|
|
14624
|
-
while (n > 0) {
|
|
14625
|
-
const rem = (n - 1) % 26;
|
|
14626
|
-
out = String.fromCharCode(65 + rem) + out;
|
|
14627
|
-
n = Math.floor((n - 1) / 26);
|
|
14628
|
-
}
|
|
14629
|
-
return out;
|
|
14630
|
-
}
|
|
14631
|
-
function toRoman(value) {
|
|
14632
|
-
if (value <= 0 || value >= 4e3) return String(value);
|
|
14633
|
-
const map = [
|
|
14634
|
-
[1e3, "M"],
|
|
14635
|
-
[900, "CM"],
|
|
14636
|
-
[500, "D"],
|
|
14637
|
-
[400, "CD"],
|
|
14638
|
-
[100, "C"],
|
|
14639
|
-
[90, "XC"],
|
|
14640
|
-
[50, "L"],
|
|
14641
|
-
[40, "XL"],
|
|
14642
|
-
[10, "X"],
|
|
14643
|
-
[9, "IX"],
|
|
14644
|
-
[5, "V"],
|
|
14645
|
-
[4, "IV"],
|
|
14646
|
-
[1, "I"]
|
|
14647
|
-
];
|
|
14648
|
-
let n = value;
|
|
14649
|
-
let out = "";
|
|
14650
|
-
for (const [v, s] of map) {
|
|
14651
|
-
while (n >= v) {
|
|
14652
|
-
out += s;
|
|
14653
|
-
n -= v;
|
|
14654
|
-
}
|
|
14655
|
-
}
|
|
14656
|
-
return out;
|
|
14657
|
-
}
|
|
14658
|
-
const PUA_BULLET_MAP = {
|
|
14659
|
-
61623: "•",
|
|
14660
|
-
// Symbol: filled circle bullet
|
|
14661
|
-
61548: "·",
|
|
14662
|
-
// Wingdings: medium bullet
|
|
14663
|
-
61607: "▪",
|
|
14664
|
-
// Wingdings 2: black small square
|
|
14665
|
-
61656: "➢",
|
|
14666
|
-
// Wingdings: arrowhead
|
|
14667
|
-
61559: "✓",
|
|
14668
|
-
// Wingdings: check mark
|
|
14669
|
-
61692: "✓",
|
|
14670
|
-
// Wingdings: check mark (alt)
|
|
14671
|
-
61671: "⚡",
|
|
14672
|
-
// Wingdings: lightning
|
|
14673
|
-
61472: " "
|
|
14674
|
-
// Symbol/Wingdings: space
|
|
14675
|
-
};
|
|
14676
|
-
function normalizeBulletGlyph(glyph) {
|
|
14677
|
-
const code2 = glyph.codePointAt(0);
|
|
14678
|
-
if (code2 !== void 0 && code2 >= 57344 && code2 <= 63743) {
|
|
14679
|
-
return PUA_BULLET_MAP[code2] ?? "•";
|
|
14680
|
-
}
|
|
14681
|
-
return glyph;
|
|
14682
|
-
}
|
|
14683
|
-
const BULLET_GLYPHS = ["•", "○", "▪", "•", "○", "▪"];
|
|
14684
|
-
const ORDERED_DEFAULT_FORMATS = [
|
|
14685
|
-
"decimal",
|
|
14686
|
-
"lowerLetter",
|
|
14687
|
-
"lowerRoman",
|
|
14688
|
-
"decimal",
|
|
14689
|
-
"lowerLetter",
|
|
14690
|
-
"lowerRoman"
|
|
14691
|
-
];
|
|
14389
|
+
const listLabelsCache = /* @__PURE__ */ new WeakMap();
|
|
14692
14390
|
function resolveListPrefix(paragraph, document2) {
|
|
14693
|
-
|
|
14694
|
-
|
|
14695
|
-
|
|
14696
|
-
|
|
14697
|
-
if (raw) return normalizeBulletGlyph(raw);
|
|
14698
|
-
return BULLET_GLYPHS[level % BULLET_GLYPHS.length] ?? "•";
|
|
14391
|
+
let labels = listLabelsCache.get(document2);
|
|
14392
|
+
if (!labels) {
|
|
14393
|
+
labels = buildListLabels(document2);
|
|
14394
|
+
listLabelsCache.set(document2, labels);
|
|
14699
14395
|
}
|
|
14700
|
-
|
|
14701
|
-
const format = paragraph.list.format && paragraph.list.format !== "bullet" ? paragraph.list.format : ORDERED_DEFAULT_FORMATS[level % ORDERED_DEFAULT_FORMATS.length] ?? "decimal";
|
|
14702
|
-
return `${formatOrdinal(ordinal, format)}.`;
|
|
14396
|
+
return resolveListLabel(paragraph, labels);
|
|
14703
14397
|
}
|
|
14704
14398
|
function drawEdge(ctx, border, x1, y1, x2, y2) {
|
|
14705
14399
|
if (!border || border.type === "none" || border.width <= 0) {
|
|
@@ -16909,7 +16603,13 @@ function drawParagraph(ctx, paragraph, lines, state, originX, originY, onUpdate,
|
|
|
16909
16603
|
const gap = ctx.measureText(`${listPrefix} `).width;
|
|
16910
16604
|
const labelInset = getListLabelInset(paragraph, state.document.styles);
|
|
16911
16605
|
const labelWidth = ctx.measureText(listPrefix).width;
|
|
16912
|
-
const
|
|
16606
|
+
const alignedLeft = getAlignedListLabelInset(
|
|
16607
|
+
paragraph,
|
|
16608
|
+
state.document.styles,
|
|
16609
|
+
(first == null ? void 0 : first.left) ?? labelInset + labelWidth,
|
|
16610
|
+
labelWidth
|
|
16611
|
+
);
|
|
16612
|
+
const left = first !== void 0 && labelInset + labelWidth > first.left ? Math.max(0, first.left - gap) : alignedLeft;
|
|
16913
16613
|
ctx.fillText(listPrefix, originX + left, baselineY);
|
|
16914
16614
|
ctx.restore();
|
|
16915
16615
|
}
|
|
@@ -18546,6 +18246,7 @@ function getCaretRectFromSnapshot(snapshot, position2, paragraphOffset) {
|
|
|
18546
18246
|
}
|
|
18547
18247
|
var _tmpl$$N = /* @__PURE__ */ template(`<span class=oasis-outline-title>`), _tmpl$2$w = /* @__PURE__ */ template(`<div class=oasis-outline-list>`), _tmpl$3$j = /* @__PURE__ */ template(`<div class=oasis-outline-panel><div class=oasis-outline-header><button class=oasis-outline-toggle><i>`), _tmpl$4$e = /* @__PURE__ */ template(`<div class=oasis-outline-empty>`), _tmpl$5$d = /* @__PURE__ */ template(`<div class=oasis-outline-item>`);
|
|
18548
18248
|
function OutlinePanel(props) {
|
|
18249
|
+
const t = useI18n();
|
|
18549
18250
|
const [collapsed, setCollapsed] = createSignal(props.defaultCollapsed ?? false);
|
|
18550
18251
|
const [items, setItems] = createSignal([]);
|
|
18551
18252
|
const [activeId, setActiveId] = createSignal(null);
|
|
@@ -18688,6 +18389,7 @@ function OutlinePanel(props) {
|
|
|
18688
18389
|
delegateEvents(["click"]);
|
|
18689
18390
|
var _tmpl$$M = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-overflow-manager style="display:flex;align-items:center;flex:1 1 0%;min-width:0;position:relative;margin-right:8px"><button type=button class="oasis-editor-tool-button oasis-editor-tool-button-dropdown oasis-editor-toolbar-more-measure"aria-hidden=true tabindex=-1 style=position:absolute;visibility:hidden;pointer-events:none;right:0><i data-lucide=ellipsis></i></button><div style="display:flex;align-items:center;gap:8px;flex:1 1 0;min-width:0;overflow:hidden"></div><div style=flex-shrink:0;padding-left:8px;padding-right:16px;align-items:center><button type=button class="oasis-editor-tool-button oasis-editor-tool-button-dropdown"data-testid=editor-toolbar-overflow-dropdown><i data-lucide=ellipsis></i></button></div><div class="oasis-editor-toolbar-overflow-dropdown-menu oasis-editor-toolbar-overflow-menu"style="flex-direction:row;flex-wrap:wrap;align-items:center;gap:4px;padding:8px;background:var(--oasis-paper);border:1px solid var(--oasis-toolbar-border);border-radius:var(--oasis-radius);box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);max-width:calc(100vw - 16px);overflow-x:hidden;overflow-y:auto">`), _tmpl$2$v = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-item-wrapper style=display:flex;align-items:center;flex-shrink:0>`);
|
|
18690
18391
|
function ToolbarOverflowManager(props) {
|
|
18392
|
+
const t = useI18n();
|
|
18691
18393
|
const [overflowCount, setOverflowCount] = createSignal(0);
|
|
18692
18394
|
const [menuOpen, setMenuOpen] = createSignal(false);
|
|
18693
18395
|
const [panelWidth, setPanelWidth] = createSignal(null);
|
|
@@ -19496,6 +19198,7 @@ function ColorPicker(props) {
|
|
|
19496
19198
|
delegateEvents(["click", "input"]);
|
|
19497
19199
|
var _tmpl$$E = /* @__PURE__ */ template(`<div class=oasis-editor-table-grid-picker-status>`), _tmpl$2$r = /* @__PURE__ */ template(`<div class=oasis-editor-table-grid-picker-grid>`), _tmpl$3$g = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-dropdown>`), _tmpl$4$b = /* @__PURE__ */ template(`<button type=button class=oasis-editor-tool-button><i>`), _tmpl$5$a = /* @__PURE__ */ template(`<button type=button class=oasis-editor-table-grid-picker-cell>`);
|
|
19498
19200
|
function GridPicker(props) {
|
|
19201
|
+
const t = useI18n();
|
|
19499
19202
|
const [isOpen, setIsOpen] = createSignal(false);
|
|
19500
19203
|
const [hover, setHover] = createSignal({
|
|
19501
19204
|
row: 0,
|
|
@@ -20054,7 +19757,7 @@ function ToolbarItemRenderer(props) {
|
|
|
20054
19757
|
return _el$;
|
|
20055
19758
|
})();
|
|
20056
19759
|
}
|
|
20057
|
-
function createToolbarApi(host) {
|
|
19760
|
+
function createToolbarApi(host, t) {
|
|
20058
19761
|
return {
|
|
20059
19762
|
commands: host().commands,
|
|
20060
19763
|
t,
|
|
@@ -20102,9 +19805,9 @@ const GROUP_LABEL_KEYS = {
|
|
|
20102
19805
|
section: "ribbon.group.section",
|
|
20103
19806
|
general: "ribbon.group.general"
|
|
20104
19807
|
};
|
|
20105
|
-
|
|
20106
|
-
(id) => ({ id, label: t(TAB_LABEL_KEYS[id]) })
|
|
20107
|
-
|
|
19808
|
+
function buildRibbonTabDefinitions(t) {
|
|
19809
|
+
return RIBBON_TABS.map((id) => ({ id, label: t(TAB_LABEL_KEYS[id]) }));
|
|
19810
|
+
}
|
|
20108
19811
|
const DEFAULT_RIBBON_TAB = "plugins";
|
|
20109
19812
|
const DEFAULT_RIBBON_GROUP = "general";
|
|
20110
19813
|
const DEFAULT_RIBBON_ROW = 1;
|
|
@@ -20149,11 +19852,11 @@ function normalizeRibbonRow(row) {
|
|
|
20149
19852
|
function isLargeRibbonItem(item) {
|
|
20150
19853
|
return "ribbonSize" in item && item.ribbonSize === "large";
|
|
20151
19854
|
}
|
|
20152
|
-
function ribbonGroupLabel(group) {
|
|
19855
|
+
function ribbonGroupLabel(group, t) {
|
|
20153
19856
|
const key = GROUP_LABEL_KEYS[group];
|
|
20154
19857
|
return key ? t(key) : group;
|
|
20155
19858
|
}
|
|
20156
|
-
function buildRibbonGroups(items, tab) {
|
|
19859
|
+
function buildRibbonGroups(items, tab, t) {
|
|
20157
19860
|
const groups = /* @__PURE__ */ new Map();
|
|
20158
19861
|
const tabGroupOrder = RIBBON_GROUP_ORDER[tab] ?? {};
|
|
20159
19862
|
items.forEach((item, index) => {
|
|
@@ -20167,7 +19870,7 @@ function buildRibbonGroups(items, tab) {
|
|
|
20167
19870
|
if (!group) {
|
|
20168
19871
|
group = {
|
|
20169
19872
|
id: groupId,
|
|
20170
|
-
label: ribbonGroupLabel(groupId),
|
|
19873
|
+
label: ribbonGroupLabel(groupId, t),
|
|
20171
19874
|
largeItems: [],
|
|
20172
19875
|
rows: { 1: [], 2: [] },
|
|
20173
19876
|
order: groupOrder
|
|
@@ -20185,7 +19888,7 @@ function buildRibbonGroups(items, tab) {
|
|
|
20185
19888
|
}
|
|
20186
19889
|
var _tmpl$$B = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-tabs role=tablist>`), _tmpl$2$p = /* @__PURE__ */ template(`<button type=button class=oasis-editor-ribbon-tab role=tab>`);
|
|
20187
19890
|
function RibbonTabs(props) {
|
|
20188
|
-
const tabs =
|
|
19891
|
+
const tabs = buildRibbonTabDefinitions(useI18n());
|
|
20189
19892
|
const moveTab = (current, delta) => {
|
|
20190
19893
|
const index = tabs.findIndex((tab) => tab.id === current);
|
|
20191
19894
|
const next = tabs[(index + delta + tabs.length) % tabs.length];
|
|
@@ -20311,7 +20014,7 @@ function RibbonGroup(props) {
|
|
|
20311
20014
|
}
|
|
20312
20015
|
var _tmpl$$y = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-panel role=tabpanel data-testid=editor-ribbon-panel>`);
|
|
20313
20016
|
function RibbonPanel(props) {
|
|
20314
|
-
const groups = () => buildRibbonGroups(props.items(), props.activeTab());
|
|
20017
|
+
const groups = () => buildRibbonGroups(props.items(), props.activeTab(), props.api.t);
|
|
20315
20018
|
return (() => {
|
|
20316
20019
|
var _el$ = _tmpl$$y();
|
|
20317
20020
|
insert(_el$, createComponent(For, {
|
|
@@ -20340,7 +20043,7 @@ function RibbonPanel(props) {
|
|
|
20340
20043
|
var _tmpl$$x = /* @__PURE__ */ template(`<section class=oasis-editor-toolbar>`), _tmpl$2$n = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-wrap-strip>`);
|
|
20341
20044
|
const shouldAllowNativeMouseDown = (target) => target instanceof Element && target.closest("select, input, textarea, label") !== null;
|
|
20342
20045
|
function Toolbar(props) {
|
|
20343
|
-
const api = createToolbarApi(props.host);
|
|
20046
|
+
const api = createToolbarApi(props.host, useI18n());
|
|
20344
20047
|
const [version2, setVersion2] = createSignal(0);
|
|
20345
20048
|
const [activeTab, setActiveTab] = createSignal("home");
|
|
20346
20049
|
onMount(() => {
|
|
@@ -20719,6 +20422,7 @@ function createLayoutIdentityStabilizer() {
|
|
|
20719
20422
|
}
|
|
20720
20423
|
var _tmpl$$w = /* @__PURE__ */ template(`<div class=oasis-editor-page-break style="display:flex;align-items:center;justify-content:center;margin:16px 0;position:relative;user-select:none"><div style="position:absolute;left:0;right:0;top:50%;border-top:1px dashed var(--oasis-toolbar-border, #e0e3e7)"></div><div style="background:var(--oasis-bg, #f6f8fb);padding:0 12px;color:var(--oasis-text-muted, #5f6368);font-size:12px;font-family:var(--oasis-font-ui, sans-serif);z-index:1">`);
|
|
20721
20424
|
function PageBreak(props) {
|
|
20425
|
+
const t = useI18n();
|
|
20722
20426
|
return (() => {
|
|
20723
20427
|
var _el$ = _tmpl$$w(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
20724
20428
|
insert(_el$3, () => t("metric.pageBreak") || "Page Break");
|
|
@@ -21744,6 +21448,7 @@ function numFromStyle(value) {
|
|
|
21744
21448
|
return Number.isFinite(n) ? n : 0;
|
|
21745
21449
|
}
|
|
21746
21450
|
function HorizontalRuler(props) {
|
|
21451
|
+
const t = useI18n();
|
|
21747
21452
|
let pageRef;
|
|
21748
21453
|
const [scrollLeft, setScrollLeft] = createSignal(0);
|
|
21749
21454
|
const [pageLeft, setPageLeft] = createSignal(EDITOR_SCROLL_PADDING_PX);
|
|
@@ -22219,6 +21924,7 @@ function CommentHighlightOverlay(props) {
|
|
|
22219
21924
|
delegateEvents(["click"]);
|
|
22220
21925
|
var _tmpl$$p = /* @__PURE__ */ template(`<div class=oasis-editor-floating-toolbar data-testid=editor-floating-table-toolbar><div class=oasis-editor-toolbar-group></div><div class=oasis-editor-toolbar-group></div><div class=oasis-editor-toolbar-group></div><div class=oasis-editor-toolbar-group></div><div class=oasis-editor-toolbar-group>`);
|
|
22221
21926
|
function FloatingTableToolbar(props) {
|
|
21927
|
+
const t = useI18n();
|
|
22222
21928
|
const host = () => props.host();
|
|
22223
21929
|
const run = (command, payload) => host().commands.execute(command, payload);
|
|
22224
21930
|
const blocked = (command) => !host().commands.state(command).isEnabled;
|
|
@@ -22479,6 +22185,7 @@ const WRAP_OPTIONS = [{
|
|
|
22479
22185
|
labelKey: "layoutOptions.front"
|
|
22480
22186
|
}];
|
|
22481
22187
|
function WrapIcon(props) {
|
|
22188
|
+
useI18n();
|
|
22482
22189
|
const line = (x, y, w) => (() => {
|
|
22483
22190
|
var _el$ = _tmpl$$o();
|
|
22484
22191
|
setAttribute(_el$, "x", x);
|
|
@@ -22549,6 +22256,7 @@ function WrapIcon(props) {
|
|
|
22549
22256
|
})();
|
|
22550
22257
|
}
|
|
22551
22258
|
function FloatingLayoutOptions(props) {
|
|
22259
|
+
const t = useI18n();
|
|
22552
22260
|
const [open, setOpen] = createSignal(false);
|
|
22553
22261
|
const [surfaceRect, setSurfaceRect] = createSignal(null);
|
|
22554
22262
|
const [tick, setTick] = createSignal(0);
|
|
@@ -22728,89 +22436,89 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
22728
22436
|
function u(r, e2) {
|
|
22729
22437
|
if (!o[r]) {
|
|
22730
22438
|
if (!a[r]) {
|
|
22731
|
-
var
|
|
22732
|
-
if (!e2 &&
|
|
22439
|
+
var t = "function" == typeof commonjsRequire && commonjsRequire;
|
|
22440
|
+
if (!e2 && t) return t(r, true);
|
|
22733
22441
|
if (l) return l(r, true);
|
|
22734
22442
|
var n = new Error("Cannot find module '" + r + "'");
|
|
22735
22443
|
throw n.code = "MODULE_NOT_FOUND", n;
|
|
22736
22444
|
}
|
|
22737
22445
|
var i = o[r] = { exports: {} };
|
|
22738
22446
|
a[r][0].call(i.exports, function(e3) {
|
|
22739
|
-
var
|
|
22740
|
-
return u(
|
|
22447
|
+
var t2 = a[r][1][e3];
|
|
22448
|
+
return u(t2 || e3);
|
|
22741
22449
|
}, i, i.exports, s, a, o, h);
|
|
22742
22450
|
}
|
|
22743
22451
|
return o[r].exports;
|
|
22744
22452
|
}
|
|
22745
22453
|
for (var l = "function" == typeof commonjsRequire && commonjsRequire, e = 0; e < h.length; e++) u(h[e]);
|
|
22746
22454
|
return u;
|
|
22747
|
-
}({ 1: [function(e,
|
|
22455
|
+
}({ 1: [function(e, t, r) {
|
|
22748
22456
|
var d = e("./utils"), c = e("./support"), p = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
22749
22457
|
r.encode = function(e2) {
|
|
22750
|
-
for (var
|
|
22458
|
+
for (var t2, r2, n, i, s, a, o, h = [], u = 0, l = e2.length, f = l, c2 = "string" !== d.getTypeOf(e2); u < e2.length; ) f = l - u, n = c2 ? (t2 = e2[u++], r2 = u < l ? e2[u++] : 0, u < l ? e2[u++] : 0) : (t2 = e2.charCodeAt(u++), r2 = u < l ? e2.charCodeAt(u++) : 0, u < l ? e2.charCodeAt(u++) : 0), i = t2 >> 2, s = (3 & t2) << 4 | r2 >> 4, a = 1 < f ? (15 & r2) << 2 | n >> 6 : 64, o = 2 < f ? 63 & n : 64, h.push(p.charAt(i) + p.charAt(s) + p.charAt(a) + p.charAt(o));
|
|
22751
22459
|
return h.join("");
|
|
22752
22460
|
}, r.decode = function(e2) {
|
|
22753
|
-
var
|
|
22461
|
+
var t2, r2, n, i, s, a, o = 0, h = 0, u = "data:";
|
|
22754
22462
|
if (e2.substr(0, u.length) === u) throw new Error("Invalid base64 input, it looks like a data url.");
|
|
22755
22463
|
var l, f = 3 * (e2 = e2.replace(/[^A-Za-z0-9+/=]/g, "")).length / 4;
|
|
22756
22464
|
if (e2.charAt(e2.length - 1) === p.charAt(64) && f--, e2.charAt(e2.length - 2) === p.charAt(64) && f--, f % 1 != 0) throw new Error("Invalid base64 input, bad content length.");
|
|
22757
|
-
for (l = c.uint8array ? new Uint8Array(0 | f) : new Array(0 | f); o < e2.length; )
|
|
22465
|
+
for (l = c.uint8array ? new Uint8Array(0 | f) : new Array(0 | f); o < e2.length; ) t2 = p.indexOf(e2.charAt(o++)) << 2 | (i = p.indexOf(e2.charAt(o++))) >> 4, r2 = (15 & i) << 4 | (s = p.indexOf(e2.charAt(o++))) >> 2, n = (3 & s) << 6 | (a = p.indexOf(e2.charAt(o++))), l[h++] = t2, 64 !== s && (l[h++] = r2), 64 !== a && (l[h++] = n);
|
|
22758
22466
|
return l;
|
|
22759
22467
|
};
|
|
22760
|
-
}, { "./support": 30, "./utils": 32 }], 2: [function(e,
|
|
22468
|
+
}, { "./support": 30, "./utils": 32 }], 2: [function(e, t, r) {
|
|
22761
22469
|
var n = e("./external"), i = e("./stream/DataWorker"), s = e("./stream/Crc32Probe"), a = e("./stream/DataLengthProbe");
|
|
22762
|
-
function o(e2,
|
|
22763
|
-
this.compressedSize = e2, this.uncompressedSize =
|
|
22470
|
+
function o(e2, t2, r2, n2, i2) {
|
|
22471
|
+
this.compressedSize = e2, this.uncompressedSize = t2, this.crc32 = r2, this.compression = n2, this.compressedContent = i2;
|
|
22764
22472
|
}
|
|
22765
22473
|
o.prototype = { getContentWorker: function() {
|
|
22766
|
-
var e2 = new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),
|
|
22474
|
+
var e2 = new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")), t2 = this;
|
|
22767
22475
|
return e2.on("end", function() {
|
|
22768
|
-
if (this.streamInfo.data_length !==
|
|
22476
|
+
if (this.streamInfo.data_length !== t2.uncompressedSize) throw new Error("Bug : uncompressed data size mismatch");
|
|
22769
22477
|
}), e2;
|
|
22770
22478
|
}, getCompressedWorker: function() {
|
|
22771
22479
|
return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize", this.compressedSize).withStreamInfo("uncompressedSize", this.uncompressedSize).withStreamInfo("crc32", this.crc32).withStreamInfo("compression", this.compression);
|
|
22772
|
-
} }, o.createWorkerFrom = function(e2,
|
|
22773
|
-
return e2.pipe(new s()).pipe(new a("uncompressedSize")).pipe(
|
|
22774
|
-
},
|
|
22775
|
-
}, { "./external": 6, "./stream/Crc32Probe": 25, "./stream/DataLengthProbe": 26, "./stream/DataWorker": 27 }], 3: [function(e,
|
|
22480
|
+
} }, o.createWorkerFrom = function(e2, t2, r2) {
|
|
22481
|
+
return e2.pipe(new s()).pipe(new a("uncompressedSize")).pipe(t2.compressWorker(r2)).pipe(new a("compressedSize")).withStreamInfo("compression", t2);
|
|
22482
|
+
}, t.exports = o;
|
|
22483
|
+
}, { "./external": 6, "./stream/Crc32Probe": 25, "./stream/DataLengthProbe": 26, "./stream/DataWorker": 27 }], 3: [function(e, t, r) {
|
|
22776
22484
|
var n = e("./stream/GenericWorker");
|
|
22777
22485
|
r.STORE = { magic: "\0\0", compressWorker: function() {
|
|
22778
22486
|
return new n("STORE compression");
|
|
22779
22487
|
}, uncompressWorker: function() {
|
|
22780
22488
|
return new n("STORE decompression");
|
|
22781
22489
|
} }, r.DEFLATE = e("./flate");
|
|
22782
|
-
}, { "./flate": 7, "./stream/GenericWorker": 28 }], 4: [function(e,
|
|
22490
|
+
}, { "./flate": 7, "./stream/GenericWorker": 28 }], 4: [function(e, t, r) {
|
|
22783
22491
|
var n = e("./utils");
|
|
22784
22492
|
var o = function() {
|
|
22785
|
-
for (var e2,
|
|
22493
|
+
for (var e2, t2 = [], r2 = 0; r2 < 256; r2++) {
|
|
22786
22494
|
e2 = r2;
|
|
22787
22495
|
for (var n2 = 0; n2 < 8; n2++) e2 = 1 & e2 ? 3988292384 ^ e2 >>> 1 : e2 >>> 1;
|
|
22788
|
-
|
|
22496
|
+
t2[r2] = e2;
|
|
22789
22497
|
}
|
|
22790
|
-
return
|
|
22498
|
+
return t2;
|
|
22791
22499
|
}();
|
|
22792
|
-
|
|
22793
|
-
return void 0 !== e2 && e2.length ? "string" !== n.getTypeOf(e2) ? function(e3,
|
|
22500
|
+
t.exports = function(e2, t2) {
|
|
22501
|
+
return void 0 !== e2 && e2.length ? "string" !== n.getTypeOf(e2) ? function(e3, t3, r2, n2) {
|
|
22794
22502
|
var i = o, s = n2 + r2;
|
|
22795
22503
|
e3 ^= -1;
|
|
22796
|
-
for (var a = n2; a < s; a++) e3 = e3 >>> 8 ^ i[255 & (e3 ^
|
|
22504
|
+
for (var a = n2; a < s; a++) e3 = e3 >>> 8 ^ i[255 & (e3 ^ t3[a])];
|
|
22797
22505
|
return -1 ^ e3;
|
|
22798
|
-
}(0 |
|
|
22506
|
+
}(0 | t2, e2, e2.length, 0) : function(e3, t3, r2, n2) {
|
|
22799
22507
|
var i = o, s = n2 + r2;
|
|
22800
22508
|
e3 ^= -1;
|
|
22801
|
-
for (var a = n2; a < s; a++) e3 = e3 >>> 8 ^ i[255 & (e3 ^
|
|
22509
|
+
for (var a = n2; a < s; a++) e3 = e3 >>> 8 ^ i[255 & (e3 ^ t3.charCodeAt(a))];
|
|
22802
22510
|
return -1 ^ e3;
|
|
22803
|
-
}(0 |
|
|
22511
|
+
}(0 | t2, e2, e2.length, 0) : 0;
|
|
22804
22512
|
};
|
|
22805
|
-
}, { "./utils": 32 }], 5: [function(e,
|
|
22513
|
+
}, { "./utils": 32 }], 5: [function(e, t, r) {
|
|
22806
22514
|
r.base64 = false, r.binary = false, r.dir = false, r.createFolders = true, r.date = null, r.compression = null, r.compressionOptions = null, r.comment = null, r.unixPermissions = null, r.dosPermissions = null;
|
|
22807
|
-
}, {}], 6: [function(e,
|
|
22515
|
+
}, {}], 6: [function(e, t, r) {
|
|
22808
22516
|
var n = null;
|
|
22809
|
-
n = "undefined" != typeof Promise ? Promise : e("lie"),
|
|
22810
|
-
}, { lie: 37 }], 7: [function(e,
|
|
22517
|
+
n = "undefined" != typeof Promise ? Promise : e("lie"), t.exports = { Promise: n };
|
|
22518
|
+
}, { lie: 37 }], 7: [function(e, t, r) {
|
|
22811
22519
|
var n = "undefined" != typeof Uint8Array && "undefined" != typeof Uint16Array && "undefined" != typeof Uint32Array, i = e("pako"), s = e("./utils"), a = e("./stream/GenericWorker"), o = n ? "uint8array" : "array";
|
|
22812
|
-
function h(e2,
|
|
22813
|
-
a.call(this, "FlateWorker/" + e2), this._pako = null, this._pakoAction = e2, this._pakoOptions =
|
|
22520
|
+
function h(e2, t2) {
|
|
22521
|
+
a.call(this, "FlateWorker/" + e2), this._pako = null, this._pakoAction = e2, this._pakoOptions = t2, this.meta = {};
|
|
22814
22522
|
}
|
|
22815
22523
|
r.magic = "\b\0", s.inherits(h, a), h.prototype.processChunk = function(e2) {
|
|
22816
22524
|
this.meta = e2.meta, null === this._pako && this._createPako(), this._pako.push(s.transformTo(o, e2.data), false);
|
|
@@ -22820,30 +22528,30 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
22820
22528
|
a.prototype.cleanUp.call(this), this._pako = null;
|
|
22821
22529
|
}, h.prototype._createPako = function() {
|
|
22822
22530
|
this._pako = new i[this._pakoAction]({ raw: true, level: this._pakoOptions.level || -1 });
|
|
22823
|
-
var
|
|
22531
|
+
var t2 = this;
|
|
22824
22532
|
this._pako.onData = function(e2) {
|
|
22825
|
-
|
|
22533
|
+
t2.push({ data: e2, meta: t2.meta });
|
|
22826
22534
|
};
|
|
22827
22535
|
}, r.compressWorker = function(e2) {
|
|
22828
22536
|
return new h("Deflate", e2);
|
|
22829
22537
|
}, r.uncompressWorker = function() {
|
|
22830
22538
|
return new h("Inflate", {});
|
|
22831
22539
|
};
|
|
22832
|
-
}, { "./stream/GenericWorker": 28, "./utils": 32, pako: 38 }], 8: [function(e,
|
|
22833
|
-
function A(e2,
|
|
22540
|
+
}, { "./stream/GenericWorker": 28, "./utils": 32, pako: 38 }], 8: [function(e, t, r) {
|
|
22541
|
+
function A(e2, t2) {
|
|
22834
22542
|
var r2, n2 = "";
|
|
22835
|
-
for (r2 = 0; r2 <
|
|
22543
|
+
for (r2 = 0; r2 < t2; r2++) n2 += String.fromCharCode(255 & e2), e2 >>>= 8;
|
|
22836
22544
|
return n2;
|
|
22837
22545
|
}
|
|
22838
|
-
function n(e2,
|
|
22546
|
+
function n(e2, t2, r2, n2, i2, s2) {
|
|
22839
22547
|
var a, o, h = e2.file, u = e2.compression, l = s2 !== O.utf8encode, f = I.transformTo("string", s2(h.name)), c = I.transformTo("string", O.utf8encode(h.name)), d = h.comment, p = I.transformTo("string", s2(d)), m = I.transformTo("string", O.utf8encode(d)), _ = c.length !== h.name.length, g2 = m.length !== d.length, b = "", v = "", y = "", w = h.dir, k = h.date, x = { crc32: 0, compressedSize: 0, uncompressedSize: 0 };
|
|
22840
|
-
|
|
22548
|
+
t2 && !r2 || (x.crc32 = e2.crc32, x.compressedSize = e2.compressedSize, x.uncompressedSize = e2.uncompressedSize);
|
|
22841
22549
|
var S2 = 0;
|
|
22842
|
-
|
|
22550
|
+
t2 && (S2 |= 8), l || !_ && !g2 || (S2 |= 2048);
|
|
22843
22551
|
var z = 0, C = 0;
|
|
22844
|
-
w && (z |= 16), "UNIX" === i2 ? (C = 798, z |= function(e3,
|
|
22552
|
+
w && (z |= 16), "UNIX" === i2 ? (C = 798, z |= function(e3, t3) {
|
|
22845
22553
|
var r3 = e3;
|
|
22846
|
-
return e3 || (r3 =
|
|
22554
|
+
return e3 || (r3 = t3 ? 16893 : 33204), (65535 & r3) << 16;
|
|
22847
22555
|
}(h.unixPermissions, w)) : (C = 20, z |= function(e3) {
|
|
22848
22556
|
return 63 & (e3 || 0);
|
|
22849
22557
|
}(h.dosPermissions)), a = k.getUTCHours(), a <<= 6, a |= k.getUTCMinutes(), a <<= 5, a |= k.getUTCSeconds() / 2, o = k.getUTCFullYear() - 1980, o <<= 4, o |= k.getUTCMonth() + 1, o <<= 5, o |= k.getUTCDate(), _ && (v = A(1, 1) + A(B(f), 4) + c, b += "up" + A(v.length, 2) + v), g2 && (y = A(1, 1) + A(B(p), 4) + m, b += "uc" + A(y.length, 2) + y);
|
|
@@ -22851,147 +22559,147 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
22851
22559
|
return E += "\n\0", E += A(S2, 2), E += u.magic, E += A(a, 2), E += A(o, 2), E += A(x.crc32, 4), E += A(x.compressedSize, 4), E += A(x.uncompressedSize, 4), E += A(f.length, 2), E += A(b.length, 2), { fileRecord: R.LOCAL_FILE_HEADER + E + f + b, dirRecord: R.CENTRAL_FILE_HEADER + A(C, 2) + E + A(p.length, 2) + "\0\0\0\0" + A(z, 4) + A(n2, 4) + f + b + p };
|
|
22852
22560
|
}
|
|
22853
22561
|
var I = e("../utils"), i = e("../stream/GenericWorker"), O = e("../utf8"), B = e("../crc32"), R = e("../signature");
|
|
22854
|
-
function s(e2,
|
|
22855
|
-
i.call(this, "ZipFileWorker"), this.bytesWritten = 0, this.zipComment =
|
|
22562
|
+
function s(e2, t2, r2, n2) {
|
|
22563
|
+
i.call(this, "ZipFileWorker"), this.bytesWritten = 0, this.zipComment = t2, this.zipPlatform = r2, this.encodeFileName = n2, this.streamFiles = e2, this.accumulate = false, this.contentBuffer = [], this.dirRecords = [], this.currentSourceOffset = 0, this.entriesCount = 0, this.currentFile = null, this._sources = [];
|
|
22856
22564
|
}
|
|
22857
22565
|
I.inherits(s, i), s.prototype.push = function(e2) {
|
|
22858
|
-
var
|
|
22859
|
-
this.accumulate ? this.contentBuffer.push(e2) : (this.bytesWritten += e2.data.length, i.prototype.push.call(this, { data: e2.data, meta: { currentFile: this.currentFile, percent: r2 ? (
|
|
22566
|
+
var t2 = e2.meta.percent || 0, r2 = this.entriesCount, n2 = this._sources.length;
|
|
22567
|
+
this.accumulate ? this.contentBuffer.push(e2) : (this.bytesWritten += e2.data.length, i.prototype.push.call(this, { data: e2.data, meta: { currentFile: this.currentFile, percent: r2 ? (t2 + 100 * (r2 - n2 - 1)) / r2 : 100 } }));
|
|
22860
22568
|
}, s.prototype.openedSource = function(e2) {
|
|
22861
22569
|
this.currentSourceOffset = this.bytesWritten, this.currentFile = e2.file.name;
|
|
22862
|
-
var
|
|
22863
|
-
if (
|
|
22864
|
-
var r2 = n(e2,
|
|
22570
|
+
var t2 = this.streamFiles && !e2.file.dir;
|
|
22571
|
+
if (t2) {
|
|
22572
|
+
var r2 = n(e2, t2, false, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
|
|
22865
22573
|
this.push({ data: r2.fileRecord, meta: { percent: 0 } });
|
|
22866
22574
|
} else this.accumulate = true;
|
|
22867
22575
|
}, s.prototype.closedSource = function(e2) {
|
|
22868
22576
|
this.accumulate = false;
|
|
22869
|
-
var
|
|
22870
|
-
if (this.dirRecords.push(r2.dirRecord),
|
|
22577
|
+
var t2 = this.streamFiles && !e2.file.dir, r2 = n(e2, t2, true, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
|
|
22578
|
+
if (this.dirRecords.push(r2.dirRecord), t2) this.push({ data: function(e3) {
|
|
22871
22579
|
return R.DATA_DESCRIPTOR + A(e3.crc32, 4) + A(e3.compressedSize, 4) + A(e3.uncompressedSize, 4);
|
|
22872
22580
|
}(e2), meta: { percent: 100 } });
|
|
22873
22581
|
else for (this.push({ data: r2.fileRecord, meta: { percent: 0 } }); this.contentBuffer.length; ) this.push(this.contentBuffer.shift());
|
|
22874
22582
|
this.currentFile = null;
|
|
22875
22583
|
}, s.prototype.flush = function() {
|
|
22876
|
-
for (var e2 = this.bytesWritten,
|
|
22877
|
-
var r2 = this.bytesWritten - e2, n2 = function(e3,
|
|
22584
|
+
for (var e2 = this.bytesWritten, t2 = 0; t2 < this.dirRecords.length; t2++) this.push({ data: this.dirRecords[t2], meta: { percent: 100 } });
|
|
22585
|
+
var r2 = this.bytesWritten - e2, n2 = function(e3, t3, r3, n3, i2) {
|
|
22878
22586
|
var s2 = I.transformTo("string", i2(n3));
|
|
22879
|
-
return R.CENTRAL_DIRECTORY_END + "\0\0\0\0" + A(e3, 2) + A(e3, 2) + A(
|
|
22587
|
+
return R.CENTRAL_DIRECTORY_END + "\0\0\0\0" + A(e3, 2) + A(e3, 2) + A(t3, 4) + A(r3, 4) + A(s2.length, 2) + s2;
|
|
22880
22588
|
}(this.dirRecords.length, r2, e2, this.zipComment, this.encodeFileName);
|
|
22881
22589
|
this.push({ data: n2, meta: { percent: 100 } });
|
|
22882
22590
|
}, s.prototype.prepareNextSource = function() {
|
|
22883
22591
|
this.previous = this._sources.shift(), this.openedSource(this.previous.streamInfo), this.isPaused ? this.previous.pause() : this.previous.resume();
|
|
22884
22592
|
}, s.prototype.registerPrevious = function(e2) {
|
|
22885
22593
|
this._sources.push(e2);
|
|
22886
|
-
var
|
|
22594
|
+
var t2 = this;
|
|
22887
22595
|
return e2.on("data", function(e3) {
|
|
22888
|
-
|
|
22596
|
+
t2.processChunk(e3);
|
|
22889
22597
|
}), e2.on("end", function() {
|
|
22890
|
-
|
|
22598
|
+
t2.closedSource(t2.previous.streamInfo), t2._sources.length ? t2.prepareNextSource() : t2.end();
|
|
22891
22599
|
}), e2.on("error", function(e3) {
|
|
22892
|
-
|
|
22600
|
+
t2.error(e3);
|
|
22893
22601
|
}), this;
|
|
22894
22602
|
}, s.prototype.resume = function() {
|
|
22895
22603
|
return !!i.prototype.resume.call(this) && (!this.previous && this._sources.length ? (this.prepareNextSource(), true) : this.previous || this._sources.length || this.generatedError ? void 0 : (this.end(), true));
|
|
22896
22604
|
}, s.prototype.error = function(e2) {
|
|
22897
|
-
var
|
|
22605
|
+
var t2 = this._sources;
|
|
22898
22606
|
if (!i.prototype.error.call(this, e2)) return false;
|
|
22899
|
-
for (var r2 = 0; r2 <
|
|
22900
|
-
|
|
22607
|
+
for (var r2 = 0; r2 < t2.length; r2++) try {
|
|
22608
|
+
t2[r2].error(e2);
|
|
22901
22609
|
} catch (e3) {
|
|
22902
22610
|
}
|
|
22903
22611
|
return true;
|
|
22904
22612
|
}, s.prototype.lock = function() {
|
|
22905
22613
|
i.prototype.lock.call(this);
|
|
22906
|
-
for (var e2 = this._sources,
|
|
22907
|
-
},
|
|
22908
|
-
}, { "../crc32": 4, "../signature": 23, "../stream/GenericWorker": 28, "../utf8": 31, "../utils": 32 }], 9: [function(e,
|
|
22614
|
+
for (var e2 = this._sources, t2 = 0; t2 < e2.length; t2++) e2[t2].lock();
|
|
22615
|
+
}, t.exports = s;
|
|
22616
|
+
}, { "../crc32": 4, "../signature": 23, "../stream/GenericWorker": 28, "../utf8": 31, "../utils": 32 }], 9: [function(e, t, r) {
|
|
22909
22617
|
var u = e("../compressions"), n = e("./ZipFileWorker");
|
|
22910
|
-
r.generateWorker = function(e2, a,
|
|
22911
|
-
var o = new n(a.streamFiles,
|
|
22618
|
+
r.generateWorker = function(e2, a, t2) {
|
|
22619
|
+
var o = new n(a.streamFiles, t2, a.platform, a.encodeFileName), h = 0;
|
|
22912
22620
|
try {
|
|
22913
|
-
e2.forEach(function(e3,
|
|
22621
|
+
e2.forEach(function(e3, t3) {
|
|
22914
22622
|
h++;
|
|
22915
|
-
var r2 = function(e4,
|
|
22916
|
-
var r3 = e4 ||
|
|
22623
|
+
var r2 = function(e4, t4) {
|
|
22624
|
+
var r3 = e4 || t4, n3 = u[r3];
|
|
22917
22625
|
if (!n3) throw new Error(r3 + " is not a valid compression method !");
|
|
22918
22626
|
return n3;
|
|
22919
|
-
}(
|
|
22920
|
-
|
|
22627
|
+
}(t3.options.compression, a.compression), n2 = t3.options.compressionOptions || a.compressionOptions || {}, i = t3.dir, s = t3.date;
|
|
22628
|
+
t3._compressWorker(r2, n2).withStreamInfo("file", { name: e3, dir: i, date: s, comment: t3.comment || "", unixPermissions: t3.unixPermissions, dosPermissions: t3.dosPermissions }).pipe(o);
|
|
22921
22629
|
}), o.entriesCount = h;
|
|
22922
22630
|
} catch (e3) {
|
|
22923
22631
|
o.error(e3);
|
|
22924
22632
|
}
|
|
22925
22633
|
return o;
|
|
22926
22634
|
};
|
|
22927
|
-
}, { "../compressions": 3, "./ZipFileWorker": 8 }], 10: [function(e,
|
|
22635
|
+
}, { "../compressions": 3, "./ZipFileWorker": 8 }], 10: [function(e, t, r) {
|
|
22928
22636
|
function n() {
|
|
22929
22637
|
if (!(this instanceof n)) return new n();
|
|
22930
22638
|
if (arguments.length) throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
22931
22639
|
this.files = /* @__PURE__ */ Object.create(null), this.comment = null, this.root = "", this.clone = function() {
|
|
22932
22640
|
var e2 = new n();
|
|
22933
|
-
for (var
|
|
22641
|
+
for (var t2 in this) "function" != typeof this[t2] && (e2[t2] = this[t2]);
|
|
22934
22642
|
return e2;
|
|
22935
22643
|
};
|
|
22936
22644
|
}
|
|
22937
|
-
(n.prototype = e("./object")).loadAsync = e("./load"), n.support = e("./support"), n.defaults = e("./defaults"), n.version = "3.10.1", n.loadAsync = function(e2,
|
|
22938
|
-
return new n().loadAsync(e2,
|
|
22939
|
-
}, n.external = e("./external"),
|
|
22940
|
-
}, { "./defaults": 5, "./external": 6, "./load": 11, "./object": 15, "./support": 30 }], 11: [function(e,
|
|
22645
|
+
(n.prototype = e("./object")).loadAsync = e("./load"), n.support = e("./support"), n.defaults = e("./defaults"), n.version = "3.10.1", n.loadAsync = function(e2, t2) {
|
|
22646
|
+
return new n().loadAsync(e2, t2);
|
|
22647
|
+
}, n.external = e("./external"), t.exports = n;
|
|
22648
|
+
}, { "./defaults": 5, "./external": 6, "./load": 11, "./object": 15, "./support": 30 }], 11: [function(e, t, r) {
|
|
22941
22649
|
var u = e("./utils"), i = e("./external"), n = e("./utf8"), s = e("./zipEntries"), a = e("./stream/Crc32Probe"), l = e("./nodejsUtils");
|
|
22942
22650
|
function f(n2) {
|
|
22943
|
-
return new i.Promise(function(e2,
|
|
22651
|
+
return new i.Promise(function(e2, t2) {
|
|
22944
22652
|
var r2 = n2.decompressed.getContentWorker().pipe(new a());
|
|
22945
22653
|
r2.on("error", function(e3) {
|
|
22946
|
-
|
|
22654
|
+
t2(e3);
|
|
22947
22655
|
}).on("end", function() {
|
|
22948
|
-
r2.streamInfo.crc32 !== n2.decompressed.crc32 ?
|
|
22656
|
+
r2.streamInfo.crc32 !== n2.decompressed.crc32 ? t2(new Error("Corrupted zip : CRC32 mismatch")) : e2();
|
|
22949
22657
|
}).resume();
|
|
22950
22658
|
});
|
|
22951
22659
|
}
|
|
22952
|
-
|
|
22660
|
+
t.exports = function(e2, o) {
|
|
22953
22661
|
var h = this;
|
|
22954
22662
|
return o = u.extend(o || {}, { base64: false, checkCRC32: false, optimizedBinaryString: false, createFolders: false, decodeFileName: n.utf8decode }), l.isNode && l.isStream(e2) ? i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")) : u.prepareContent("the loaded zip file", e2, true, o.optimizedBinaryString, o.base64).then(function(e3) {
|
|
22955
|
-
var
|
|
22956
|
-
return
|
|
22663
|
+
var t2 = new s(o);
|
|
22664
|
+
return t2.load(e3), t2;
|
|
22957
22665
|
}).then(function(e3) {
|
|
22958
|
-
var
|
|
22959
|
-
if (o.checkCRC32) for (var n2 = 0; n2 < r2.length; n2++)
|
|
22960
|
-
return i.Promise.all(
|
|
22666
|
+
var t2 = [i.Promise.resolve(e3)], r2 = e3.files;
|
|
22667
|
+
if (o.checkCRC32) for (var n2 = 0; n2 < r2.length; n2++) t2.push(f(r2[n2]));
|
|
22668
|
+
return i.Promise.all(t2);
|
|
22961
22669
|
}).then(function(e3) {
|
|
22962
|
-
for (var
|
|
22670
|
+
for (var t2 = e3.shift(), r2 = t2.files, n2 = 0; n2 < r2.length; n2++) {
|
|
22963
22671
|
var i2 = r2[n2], s2 = i2.fileNameStr, a2 = u.resolve(i2.fileNameStr);
|
|
22964
22672
|
h.file(a2, i2.decompressed, { binary: true, optimizedBinaryString: true, date: i2.date, dir: i2.dir, comment: i2.fileCommentStr.length ? i2.fileCommentStr : null, unixPermissions: i2.unixPermissions, dosPermissions: i2.dosPermissions, createFolders: o.createFolders }), i2.dir || (h.file(a2).unsafeOriginalName = s2);
|
|
22965
22673
|
}
|
|
22966
|
-
return
|
|
22674
|
+
return t2.zipComment.length && (h.comment = t2.zipComment), h;
|
|
22967
22675
|
});
|
|
22968
22676
|
};
|
|
22969
|
-
}, { "./external": 6, "./nodejsUtils": 14, "./stream/Crc32Probe": 25, "./utf8": 31, "./utils": 32, "./zipEntries": 33 }], 12: [function(e,
|
|
22677
|
+
}, { "./external": 6, "./nodejsUtils": 14, "./stream/Crc32Probe": 25, "./utf8": 31, "./utils": 32, "./zipEntries": 33 }], 12: [function(e, t, r) {
|
|
22970
22678
|
var n = e("../utils"), i = e("../stream/GenericWorker");
|
|
22971
|
-
function s(e2,
|
|
22972
|
-
i.call(this, "Nodejs stream input adapter for " + e2), this._upstreamEnded = false, this._bindStream(
|
|
22679
|
+
function s(e2, t2) {
|
|
22680
|
+
i.call(this, "Nodejs stream input adapter for " + e2), this._upstreamEnded = false, this._bindStream(t2);
|
|
22973
22681
|
}
|
|
22974
22682
|
n.inherits(s, i), s.prototype._bindStream = function(e2) {
|
|
22975
|
-
var
|
|
22683
|
+
var t2 = this;
|
|
22976
22684
|
(this._stream = e2).pause(), e2.on("data", function(e3) {
|
|
22977
|
-
|
|
22685
|
+
t2.push({ data: e3, meta: { percent: 0 } });
|
|
22978
22686
|
}).on("error", function(e3) {
|
|
22979
|
-
|
|
22687
|
+
t2.isPaused ? this.generatedError = e3 : t2.error(e3);
|
|
22980
22688
|
}).on("end", function() {
|
|
22981
|
-
|
|
22689
|
+
t2.isPaused ? t2._upstreamEnded = true : t2.end();
|
|
22982
22690
|
});
|
|
22983
22691
|
}, s.prototype.pause = function() {
|
|
22984
22692
|
return !!i.prototype.pause.call(this) && (this._stream.pause(), true);
|
|
22985
22693
|
}, s.prototype.resume = function() {
|
|
22986
22694
|
return !!i.prototype.resume.call(this) && (this._upstreamEnded ? this.end() : this._stream.resume(), true);
|
|
22987
|
-
},
|
|
22988
|
-
}, { "../stream/GenericWorker": 28, "../utils": 32 }], 13: [function(e,
|
|
22695
|
+
}, t.exports = s;
|
|
22696
|
+
}, { "../stream/GenericWorker": 28, "../utils": 32 }], 13: [function(e, t, r) {
|
|
22989
22697
|
var i = e("readable-stream").Readable;
|
|
22990
|
-
function n(e2,
|
|
22991
|
-
i.call(this,
|
|
22698
|
+
function n(e2, t2, r2) {
|
|
22699
|
+
i.call(this, t2), this._helper = e2;
|
|
22992
22700
|
var n2 = this;
|
|
22993
|
-
e2.on("data", function(e3,
|
|
22994
|
-
n2.push(e3) || n2._helper.pause(), r2 && r2(
|
|
22701
|
+
e2.on("data", function(e3, t3) {
|
|
22702
|
+
n2.push(e3) || n2._helper.pause(), r2 && r2(t3);
|
|
22995
22703
|
}).on("error", function(e3) {
|
|
22996
22704
|
n2.emit("error", e3);
|
|
22997
22705
|
}).on("end", function() {
|
|
@@ -23000,40 +22708,40 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
23000
22708
|
}
|
|
23001
22709
|
e("../utils").inherits(n, i), n.prototype._read = function() {
|
|
23002
22710
|
this._helper.resume();
|
|
23003
|
-
},
|
|
23004
|
-
}, { "../utils": 32, "readable-stream": 16 }], 14: [function(e,
|
|
23005
|
-
|
|
23006
|
-
if (Buffer.from && Buffer.from !== Uint8Array.from) return Buffer.from(e2,
|
|
22711
|
+
}, t.exports = n;
|
|
22712
|
+
}, { "../utils": 32, "readable-stream": 16 }], 14: [function(e, t, r) {
|
|
22713
|
+
t.exports = { isNode: "undefined" != typeof Buffer, newBufferFrom: function(e2, t2) {
|
|
22714
|
+
if (Buffer.from && Buffer.from !== Uint8Array.from) return Buffer.from(e2, t2);
|
|
23007
22715
|
if ("number" == typeof e2) throw new Error('The "data" argument must not be a number');
|
|
23008
|
-
return new Buffer(e2,
|
|
22716
|
+
return new Buffer(e2, t2);
|
|
23009
22717
|
}, allocBuffer: function(e2) {
|
|
23010
22718
|
if (Buffer.alloc) return Buffer.alloc(e2);
|
|
23011
|
-
var
|
|
23012
|
-
return
|
|
22719
|
+
var t2 = new Buffer(e2);
|
|
22720
|
+
return t2.fill(0), t2;
|
|
23013
22721
|
}, isBuffer: function(e2) {
|
|
23014
22722
|
return Buffer.isBuffer(e2);
|
|
23015
22723
|
}, isStream: function(e2) {
|
|
23016
22724
|
return e2 && "function" == typeof e2.on && "function" == typeof e2.pause && "function" == typeof e2.resume;
|
|
23017
22725
|
} };
|
|
23018
|
-
}, {}], 15: [function(e,
|
|
23019
|
-
function s(e2,
|
|
23020
|
-
var n2, i2 = u.getTypeOf(
|
|
22726
|
+
}, {}], 15: [function(e, t, r) {
|
|
22727
|
+
function s(e2, t2, r2) {
|
|
22728
|
+
var n2, i2 = u.getTypeOf(t2), s2 = u.extend(r2 || {}, f);
|
|
23021
22729
|
s2.date = s2.date || /* @__PURE__ */ new Date(), null !== s2.compression && (s2.compression = s2.compression.toUpperCase()), "string" == typeof s2.unixPermissions && (s2.unixPermissions = parseInt(s2.unixPermissions, 8)), s2.unixPermissions && 16384 & s2.unixPermissions && (s2.dir = true), s2.dosPermissions && 16 & s2.dosPermissions && (s2.dir = true), s2.dir && (e2 = g2(e2)), s2.createFolders && (n2 = _(e2)) && b.call(this, n2, true);
|
|
23022
22730
|
var a2 = "string" === i2 && false === s2.binary && false === s2.base64;
|
|
23023
|
-
r2 && void 0 !== r2.binary || (s2.binary = !a2), (
|
|
22731
|
+
r2 && void 0 !== r2.binary || (s2.binary = !a2), (t2 instanceof c && 0 === t2.uncompressedSize || s2.dir || !t2 || 0 === t2.length) && (s2.base64 = false, s2.binary = true, t2 = "", s2.compression = "STORE", i2 = "string");
|
|
23024
22732
|
var o2 = null;
|
|
23025
|
-
o2 =
|
|
22733
|
+
o2 = t2 instanceof c || t2 instanceof l ? t2 : p.isNode && p.isStream(t2) ? new m(e2, t2) : u.prepareContent(e2, t2, s2.binary, s2.optimizedBinaryString, s2.base64);
|
|
23026
22734
|
var h2 = new d(e2, o2, s2);
|
|
23027
22735
|
this.files[e2] = h2;
|
|
23028
22736
|
}
|
|
23029
22737
|
var i = e("./utf8"), u = e("./utils"), l = e("./stream/GenericWorker"), a = e("./stream/StreamHelper"), f = e("./defaults"), c = e("./compressedObject"), d = e("./zipObject"), o = e("./generate"), p = e("./nodejsUtils"), m = e("./nodejs/NodejsStreamInputAdapter"), _ = function(e2) {
|
|
23030
22738
|
"/" === e2.slice(-1) && (e2 = e2.substring(0, e2.length - 1));
|
|
23031
|
-
var
|
|
23032
|
-
return 0 <
|
|
22739
|
+
var t2 = e2.lastIndexOf("/");
|
|
22740
|
+
return 0 < t2 ? e2.substring(0, t2) : "";
|
|
23033
22741
|
}, g2 = function(e2) {
|
|
23034
22742
|
return "/" !== e2.slice(-1) && (e2 += "/"), e2;
|
|
23035
|
-
}, b = function(e2,
|
|
23036
|
-
return
|
|
22743
|
+
}, b = function(e2, t2) {
|
|
22744
|
+
return t2 = void 0 !== t2 ? t2 : f.createFolders, e2 = g2(e2), this.files[e2] || s.call(this, e2, null, { dir: true, createFolders: t2 }), this.files[e2];
|
|
23037
22745
|
};
|
|
23038
22746
|
function h(e2) {
|
|
23039
22747
|
return "[object RegExp]" === Object.prototype.toString.call(e2);
|
|
@@ -23041,79 +22749,79 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
23041
22749
|
var n = { load: function() {
|
|
23042
22750
|
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
23043
22751
|
}, forEach: function(e2) {
|
|
23044
|
-
var
|
|
23045
|
-
for (
|
|
22752
|
+
var t2, r2, n2;
|
|
22753
|
+
for (t2 in this.files) n2 = this.files[t2], (r2 = t2.slice(this.root.length, t2.length)) && t2.slice(0, this.root.length) === this.root && e2(r2, n2);
|
|
23046
22754
|
}, filter: function(r2) {
|
|
23047
22755
|
var n2 = [];
|
|
23048
|
-
return this.forEach(function(e2,
|
|
23049
|
-
r2(e2,
|
|
22756
|
+
return this.forEach(function(e2, t2) {
|
|
22757
|
+
r2(e2, t2) && n2.push(t2);
|
|
23050
22758
|
}), n2;
|
|
23051
|
-
}, file: function(e2,
|
|
23052
|
-
if (1 !== arguments.length) return e2 = this.root + e2, s.call(this, e2,
|
|
22759
|
+
}, file: function(e2, t2, r2) {
|
|
22760
|
+
if (1 !== arguments.length) return e2 = this.root + e2, s.call(this, e2, t2, r2), this;
|
|
23053
22761
|
if (h(e2)) {
|
|
23054
22762
|
var n2 = e2;
|
|
23055
|
-
return this.filter(function(e3,
|
|
23056
|
-
return !
|
|
22763
|
+
return this.filter(function(e3, t3) {
|
|
22764
|
+
return !t3.dir && n2.test(e3);
|
|
23057
22765
|
});
|
|
23058
22766
|
}
|
|
23059
22767
|
var i2 = this.files[this.root + e2];
|
|
23060
22768
|
return i2 && !i2.dir ? i2 : null;
|
|
23061
22769
|
}, folder: function(r2) {
|
|
23062
22770
|
if (!r2) return this;
|
|
23063
|
-
if (h(r2)) return this.filter(function(e3,
|
|
23064
|
-
return
|
|
22771
|
+
if (h(r2)) return this.filter(function(e3, t3) {
|
|
22772
|
+
return t3.dir && r2.test(e3);
|
|
23065
22773
|
});
|
|
23066
|
-
var e2 = this.root + r2,
|
|
23067
|
-
return n2.root =
|
|
22774
|
+
var e2 = this.root + r2, t2 = b.call(this, e2), n2 = this.clone();
|
|
22775
|
+
return n2.root = t2.name, n2;
|
|
23068
22776
|
}, remove: function(r2) {
|
|
23069
22777
|
r2 = this.root + r2;
|
|
23070
22778
|
var e2 = this.files[r2];
|
|
23071
22779
|
if (e2 || ("/" !== r2.slice(-1) && (r2 += "/"), e2 = this.files[r2]), e2 && !e2.dir) delete this.files[r2];
|
|
23072
|
-
else for (var
|
|
23073
|
-
return
|
|
23074
|
-
}), n2 = 0; n2 <
|
|
22780
|
+
else for (var t2 = this.filter(function(e3, t3) {
|
|
22781
|
+
return t3.name.slice(0, r2.length) === r2;
|
|
22782
|
+
}), n2 = 0; n2 < t2.length; n2++) delete this.files[t2[n2].name];
|
|
23075
22783
|
return this;
|
|
23076
22784
|
}, generate: function() {
|
|
23077
22785
|
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
23078
22786
|
}, generateInternalStream: function(e2) {
|
|
23079
|
-
var
|
|
22787
|
+
var t2, r2 = {};
|
|
23080
22788
|
try {
|
|
23081
22789
|
if ((r2 = u.extend(e2 || {}, { streamFiles: false, compression: "STORE", compressionOptions: null, type: "", platform: "DOS", comment: null, mimeType: "application/zip", encodeFileName: i.utf8encode })).type = r2.type.toLowerCase(), r2.compression = r2.compression.toUpperCase(), "binarystring" === r2.type && (r2.type = "string"), !r2.type) throw new Error("No output type specified.");
|
|
23082
22790
|
u.checkSupport(r2.type), "darwin" !== r2.platform && "freebsd" !== r2.platform && "linux" !== r2.platform && "sunos" !== r2.platform || (r2.platform = "UNIX"), "win32" === r2.platform && (r2.platform = "DOS");
|
|
23083
22791
|
var n2 = r2.comment || this.comment || "";
|
|
23084
|
-
|
|
22792
|
+
t2 = o.generateWorker(this, r2, n2);
|
|
23085
22793
|
} catch (e3) {
|
|
23086
|
-
(
|
|
22794
|
+
(t2 = new l("error")).error(e3);
|
|
23087
22795
|
}
|
|
23088
|
-
return new a(
|
|
23089
|
-
}, generateAsync: function(e2,
|
|
23090
|
-
return this.generateInternalStream(e2).accumulate(
|
|
23091
|
-
}, generateNodeStream: function(e2,
|
|
23092
|
-
return (e2 = e2 || {}).type || (e2.type = "nodebuffer"), this.generateInternalStream(e2).toNodejsStream(
|
|
22796
|
+
return new a(t2, r2.type || "string", r2.mimeType);
|
|
22797
|
+
}, generateAsync: function(e2, t2) {
|
|
22798
|
+
return this.generateInternalStream(e2).accumulate(t2);
|
|
22799
|
+
}, generateNodeStream: function(e2, t2) {
|
|
22800
|
+
return (e2 = e2 || {}).type || (e2.type = "nodebuffer"), this.generateInternalStream(e2).toNodejsStream(t2);
|
|
23093
22801
|
} };
|
|
23094
|
-
|
|
23095
|
-
}, { "./compressedObject": 2, "./defaults": 5, "./generate": 9, "./nodejs/NodejsStreamInputAdapter": 12, "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./stream/StreamHelper": 29, "./utf8": 31, "./utils": 32, "./zipObject": 35 }], 16: [function(e,
|
|
23096
|
-
|
|
23097
|
-
}, { stream: void 0 }], 17: [function(e,
|
|
22802
|
+
t.exports = n;
|
|
22803
|
+
}, { "./compressedObject": 2, "./defaults": 5, "./generate": 9, "./nodejs/NodejsStreamInputAdapter": 12, "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./stream/StreamHelper": 29, "./utf8": 31, "./utils": 32, "./zipObject": 35 }], 16: [function(e, t, r) {
|
|
22804
|
+
t.exports = e("stream");
|
|
22805
|
+
}, { stream: void 0 }], 17: [function(e, t, r) {
|
|
23098
22806
|
var n = e("./DataReader");
|
|
23099
22807
|
function i(e2) {
|
|
23100
22808
|
n.call(this, e2);
|
|
23101
|
-
for (var
|
|
22809
|
+
for (var t2 = 0; t2 < this.data.length; t2++) e2[t2] = 255 & e2[t2];
|
|
23102
22810
|
}
|
|
23103
22811
|
e("../utils").inherits(i, n), i.prototype.byteAt = function(e2) {
|
|
23104
22812
|
return this.data[this.zero + e2];
|
|
23105
22813
|
}, i.prototype.lastIndexOfSignature = function(e2) {
|
|
23106
|
-
for (var
|
|
22814
|
+
for (var t2 = e2.charCodeAt(0), r2 = e2.charCodeAt(1), n2 = e2.charCodeAt(2), i2 = e2.charCodeAt(3), s = this.length - 4; 0 <= s; --s) if (this.data[s] === t2 && this.data[s + 1] === r2 && this.data[s + 2] === n2 && this.data[s + 3] === i2) return s - this.zero;
|
|
23107
22815
|
return -1;
|
|
23108
22816
|
}, i.prototype.readAndCheckSignature = function(e2) {
|
|
23109
|
-
var
|
|
23110
|
-
return
|
|
22817
|
+
var t2 = e2.charCodeAt(0), r2 = e2.charCodeAt(1), n2 = e2.charCodeAt(2), i2 = e2.charCodeAt(3), s = this.readData(4);
|
|
22818
|
+
return t2 === s[0] && r2 === s[1] && n2 === s[2] && i2 === s[3];
|
|
23111
22819
|
}, i.prototype.readData = function(e2) {
|
|
23112
22820
|
if (this.checkOffset(e2), 0 === e2) return [];
|
|
23113
|
-
var
|
|
23114
|
-
return this.index += e2,
|
|
23115
|
-
},
|
|
23116
|
-
}, { "../utils": 32, "./DataReader": 18 }], 18: [function(e,
|
|
22821
|
+
var t2 = this.data.slice(this.zero + this.index, this.zero + this.index + e2);
|
|
22822
|
+
return this.index += e2, t2;
|
|
22823
|
+
}, t.exports = i;
|
|
22824
|
+
}, { "../utils": 32, "./DataReader": 18 }], 18: [function(e, t, r) {
|
|
23117
22825
|
var n = e("../utils");
|
|
23118
22826
|
function i(e2) {
|
|
23119
22827
|
this.data = e2, this.length = e2.length, this.index = 0, this.zero = 0;
|
|
@@ -23128,8 +22836,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
23128
22836
|
this.setIndex(this.index + e2);
|
|
23129
22837
|
}, byteAt: function() {
|
|
23130
22838
|
}, readInt: function(e2) {
|
|
23131
|
-
var
|
|
23132
|
-
for (this.checkOffset(e2),
|
|
22839
|
+
var t2, r2 = 0;
|
|
22840
|
+
for (this.checkOffset(e2), t2 = this.index + e2 - 1; t2 >= this.index; t2--) r2 = (r2 << 8) + this.byteAt(t2);
|
|
23133
22841
|
return this.index += e2, r2;
|
|
23134
22842
|
}, readString: function(e2) {
|
|
23135
22843
|
return n.transformTo("string", this.readData(e2));
|
|
@@ -23139,18 +22847,18 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
23139
22847
|
}, readDate: function() {
|
|
23140
22848
|
var e2 = this.readInt(4);
|
|
23141
22849
|
return new Date(Date.UTC(1980 + (e2 >> 25 & 127), (e2 >> 21 & 15) - 1, e2 >> 16 & 31, e2 >> 11 & 31, e2 >> 5 & 63, (31 & e2) << 1));
|
|
23142
|
-
} },
|
|
23143
|
-
}, { "../utils": 32 }], 19: [function(e,
|
|
22850
|
+
} }, t.exports = i;
|
|
22851
|
+
}, { "../utils": 32 }], 19: [function(e, t, r) {
|
|
23144
22852
|
var n = e("./Uint8ArrayReader");
|
|
23145
22853
|
function i(e2) {
|
|
23146
22854
|
n.call(this, e2);
|
|
23147
22855
|
}
|
|
23148
22856
|
e("../utils").inherits(i, n), i.prototype.readData = function(e2) {
|
|
23149
22857
|
this.checkOffset(e2);
|
|
23150
|
-
var
|
|
23151
|
-
return this.index += e2,
|
|
23152
|
-
},
|
|
23153
|
-
}, { "../utils": 32, "./Uint8ArrayReader": 21 }], 20: [function(e,
|
|
22858
|
+
var t2 = this.data.slice(this.zero + this.index, this.zero + this.index + e2);
|
|
22859
|
+
return this.index += e2, t2;
|
|
22860
|
+
}, t.exports = i;
|
|
22861
|
+
}, { "../utils": 32, "./Uint8ArrayReader": 21 }], 20: [function(e, t, r) {
|
|
23154
22862
|
var n = e("./DataReader");
|
|
23155
22863
|
function i(e2) {
|
|
23156
22864
|
n.call(this, e2);
|
|
@@ -23163,64 +22871,64 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
23163
22871
|
return e2 === this.readData(4);
|
|
23164
22872
|
}, i.prototype.readData = function(e2) {
|
|
23165
22873
|
this.checkOffset(e2);
|
|
23166
|
-
var
|
|
23167
|
-
return this.index += e2,
|
|
23168
|
-
},
|
|
23169
|
-
}, { "../utils": 32, "./DataReader": 18 }], 21: [function(e,
|
|
22874
|
+
var t2 = this.data.slice(this.zero + this.index, this.zero + this.index + e2);
|
|
22875
|
+
return this.index += e2, t2;
|
|
22876
|
+
}, t.exports = i;
|
|
22877
|
+
}, { "../utils": 32, "./DataReader": 18 }], 21: [function(e, t, r) {
|
|
23170
22878
|
var n = e("./ArrayReader");
|
|
23171
22879
|
function i(e2) {
|
|
23172
22880
|
n.call(this, e2);
|
|
23173
22881
|
}
|
|
23174
22882
|
e("../utils").inherits(i, n), i.prototype.readData = function(e2) {
|
|
23175
22883
|
if (this.checkOffset(e2), 0 === e2) return new Uint8Array(0);
|
|
23176
|
-
var
|
|
23177
|
-
return this.index += e2,
|
|
23178
|
-
},
|
|
23179
|
-
}, { "../utils": 32, "./ArrayReader": 17 }], 22: [function(e,
|
|
22884
|
+
var t2 = this.data.subarray(this.zero + this.index, this.zero + this.index + e2);
|
|
22885
|
+
return this.index += e2, t2;
|
|
22886
|
+
}, t.exports = i;
|
|
22887
|
+
}, { "../utils": 32, "./ArrayReader": 17 }], 22: [function(e, t, r) {
|
|
23180
22888
|
var n = e("../utils"), i = e("../support"), s = e("./ArrayReader"), a = e("./StringReader"), o = e("./NodeBufferReader"), h = e("./Uint8ArrayReader");
|
|
23181
|
-
|
|
23182
|
-
var
|
|
23183
|
-
return n.checkSupport(
|
|
22889
|
+
t.exports = function(e2) {
|
|
22890
|
+
var t2 = n.getTypeOf(e2);
|
|
22891
|
+
return n.checkSupport(t2), "string" !== t2 || i.uint8array ? "nodebuffer" === t2 ? new o(e2) : i.uint8array ? new h(n.transformTo("uint8array", e2)) : new s(n.transformTo("array", e2)) : new a(e2);
|
|
23184
22892
|
};
|
|
23185
|
-
}, { "../support": 30, "../utils": 32, "./ArrayReader": 17, "./NodeBufferReader": 19, "./StringReader": 20, "./Uint8ArrayReader": 21 }], 23: [function(e,
|
|
22893
|
+
}, { "../support": 30, "../utils": 32, "./ArrayReader": 17, "./NodeBufferReader": 19, "./StringReader": 20, "./Uint8ArrayReader": 21 }], 23: [function(e, t, r) {
|
|
23186
22894
|
r.LOCAL_FILE_HEADER = "PK", r.CENTRAL_FILE_HEADER = "PK", r.CENTRAL_DIRECTORY_END = "PK", r.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x07", r.ZIP64_CENTRAL_DIRECTORY_END = "PK", r.DATA_DESCRIPTOR = "PK\x07\b";
|
|
23187
|
-
}, {}], 24: [function(e,
|
|
22895
|
+
}, {}], 24: [function(e, t, r) {
|
|
23188
22896
|
var n = e("./GenericWorker"), i = e("../utils");
|
|
23189
22897
|
function s(e2) {
|
|
23190
22898
|
n.call(this, "ConvertWorker to " + e2), this.destType = e2;
|
|
23191
22899
|
}
|
|
23192
22900
|
i.inherits(s, n), s.prototype.processChunk = function(e2) {
|
|
23193
22901
|
this.push({ data: i.transformTo(this.destType, e2.data), meta: e2.meta });
|
|
23194
|
-
},
|
|
23195
|
-
}, { "../utils": 32, "./GenericWorker": 28 }], 25: [function(e,
|
|
22902
|
+
}, t.exports = s;
|
|
22903
|
+
}, { "../utils": 32, "./GenericWorker": 28 }], 25: [function(e, t, r) {
|
|
23196
22904
|
var n = e("./GenericWorker"), i = e("../crc32");
|
|
23197
22905
|
function s() {
|
|
23198
22906
|
n.call(this, "Crc32Probe"), this.withStreamInfo("crc32", 0);
|
|
23199
22907
|
}
|
|
23200
22908
|
e("../utils").inherits(s, n), s.prototype.processChunk = function(e2) {
|
|
23201
22909
|
this.streamInfo.crc32 = i(e2.data, this.streamInfo.crc32 || 0), this.push(e2);
|
|
23202
|
-
},
|
|
23203
|
-
}, { "../crc32": 4, "../utils": 32, "./GenericWorker": 28 }], 26: [function(e,
|
|
22910
|
+
}, t.exports = s;
|
|
22911
|
+
}, { "../crc32": 4, "../utils": 32, "./GenericWorker": 28 }], 26: [function(e, t, r) {
|
|
23204
22912
|
var n = e("../utils"), i = e("./GenericWorker");
|
|
23205
22913
|
function s(e2) {
|
|
23206
22914
|
i.call(this, "DataLengthProbe for " + e2), this.propName = e2, this.withStreamInfo(e2, 0);
|
|
23207
22915
|
}
|
|
23208
22916
|
n.inherits(s, i), s.prototype.processChunk = function(e2) {
|
|
23209
22917
|
if (e2) {
|
|
23210
|
-
var
|
|
23211
|
-
this.streamInfo[this.propName] =
|
|
22918
|
+
var t2 = this.streamInfo[this.propName] || 0;
|
|
22919
|
+
this.streamInfo[this.propName] = t2 + e2.data.length;
|
|
23212
22920
|
}
|
|
23213
22921
|
i.prototype.processChunk.call(this, e2);
|
|
23214
|
-
},
|
|
23215
|
-
}, { "../utils": 32, "./GenericWorker": 28 }], 27: [function(e,
|
|
22922
|
+
}, t.exports = s;
|
|
22923
|
+
}, { "../utils": 32, "./GenericWorker": 28 }], 27: [function(e, t, r) {
|
|
23216
22924
|
var n = e("../utils"), i = e("./GenericWorker");
|
|
23217
22925
|
function s(e2) {
|
|
23218
22926
|
i.call(this, "DataWorker");
|
|
23219
|
-
var
|
|
22927
|
+
var t2 = this;
|
|
23220
22928
|
this.dataIsReady = false, this.index = 0, this.max = 0, this.data = null, this.type = "", this._tickScheduled = false, e2.then(function(e3) {
|
|
23221
|
-
|
|
22929
|
+
t2.dataIsReady = true, t2.data = e3, t2.max = e3 && e3.length || 0, t2.type = n.getTypeOf(e3), t2.isPaused || t2._tickAndRepeat();
|
|
23222
22930
|
}, function(e3) {
|
|
23223
|
-
|
|
22931
|
+
t2.error(e3);
|
|
23224
22932
|
});
|
|
23225
22933
|
}
|
|
23226
22934
|
n.inherits(s, i), s.prototype.cleanUp = function() {
|
|
@@ -23231,22 +22939,22 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
23231
22939
|
this._tickScheduled = false, this.isPaused || this.isFinished || (this._tick(), this.isFinished || (n.delay(this._tickAndRepeat, [], this), this._tickScheduled = true));
|
|
23232
22940
|
}, s.prototype._tick = function() {
|
|
23233
22941
|
if (this.isPaused || this.isFinished) return false;
|
|
23234
|
-
var e2 = null,
|
|
22942
|
+
var e2 = null, t2 = Math.min(this.max, this.index + 16384);
|
|
23235
22943
|
if (this.index >= this.max) return this.end();
|
|
23236
22944
|
switch (this.type) {
|
|
23237
22945
|
case "string":
|
|
23238
|
-
e2 = this.data.substring(this.index,
|
|
22946
|
+
e2 = this.data.substring(this.index, t2);
|
|
23239
22947
|
break;
|
|
23240
22948
|
case "uint8array":
|
|
23241
|
-
e2 = this.data.subarray(this.index,
|
|
22949
|
+
e2 = this.data.subarray(this.index, t2);
|
|
23242
22950
|
break;
|
|
23243
22951
|
case "array":
|
|
23244
22952
|
case "nodebuffer":
|
|
23245
|
-
e2 = this.data.slice(this.index,
|
|
22953
|
+
e2 = this.data.slice(this.index, t2);
|
|
23246
22954
|
}
|
|
23247
|
-
return this.index =
|
|
23248
|
-
},
|
|
23249
|
-
}, { "../utils": 32, "./GenericWorker": 28 }], 28: [function(e,
|
|
22955
|
+
return this.index = t2, this.push({ data: e2, meta: { percent: this.max ? this.index / this.max * 100 : 0 } });
|
|
22956
|
+
}, t.exports = s;
|
|
22957
|
+
}, { "../utils": 32, "./GenericWorker": 28 }], 28: [function(e, t, r) {
|
|
23250
22958
|
function n(e2) {
|
|
23251
22959
|
this.name = e2 || "default", this.streamInfo = {}, this.generatedError = null, this.extraStreamInfo = {}, this.isPaused = true, this.isFinished = false, this.isLocked = false, this._listeners = { data: [], end: [], error: [] }, this.previous = null;
|
|
23252
22960
|
}
|
|
@@ -23263,24 +22971,24 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
23263
22971
|
return true;
|
|
23264
22972
|
}, error: function(e2) {
|
|
23265
22973
|
return !this.isFinished && (this.isPaused ? this.generatedError = e2 : (this.isFinished = true, this.emit("error", e2), this.previous && this.previous.error(e2), this.cleanUp()), true);
|
|
23266
|
-
}, on: function(e2,
|
|
23267
|
-
return this._listeners[e2].push(
|
|
22974
|
+
}, on: function(e2, t2) {
|
|
22975
|
+
return this._listeners[e2].push(t2), this;
|
|
23268
22976
|
}, cleanUp: function() {
|
|
23269
22977
|
this.streamInfo = this.generatedError = this.extraStreamInfo = null, this._listeners = [];
|
|
23270
|
-
}, emit: function(e2,
|
|
23271
|
-
if (this._listeners[e2]) for (var r2 = 0; r2 < this._listeners[e2].length; r2++) this._listeners[e2][r2].call(this,
|
|
22978
|
+
}, emit: function(e2, t2) {
|
|
22979
|
+
if (this._listeners[e2]) for (var r2 = 0; r2 < this._listeners[e2].length; r2++) this._listeners[e2][r2].call(this, t2);
|
|
23272
22980
|
}, pipe: function(e2) {
|
|
23273
22981
|
return e2.registerPrevious(this);
|
|
23274
22982
|
}, registerPrevious: function(e2) {
|
|
23275
22983
|
if (this.isLocked) throw new Error("The stream '" + this + "' has already been used.");
|
|
23276
22984
|
this.streamInfo = e2.streamInfo, this.mergeStreamInfo(), this.previous = e2;
|
|
23277
|
-
var
|
|
22985
|
+
var t2 = this;
|
|
23278
22986
|
return e2.on("data", function(e3) {
|
|
23279
|
-
|
|
22987
|
+
t2.processChunk(e3);
|
|
23280
22988
|
}), e2.on("end", function() {
|
|
23281
|
-
|
|
22989
|
+
t2.end();
|
|
23282
22990
|
}), e2.on("error", function(e3) {
|
|
23283
|
-
|
|
22991
|
+
t2.error(e3);
|
|
23284
22992
|
}), this;
|
|
23285
22993
|
}, pause: function() {
|
|
23286
22994
|
return !this.isPaused && !this.isFinished && (this.isPaused = true, this.previous && this.previous.pause(), true);
|
|
@@ -23291,8 +22999,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
23291
22999
|
}, flush: function() {
|
|
23292
23000
|
}, processChunk: function(e2) {
|
|
23293
23001
|
this.push(e2);
|
|
23294
|
-
}, withStreamInfo: function(e2,
|
|
23295
|
-
return this.extraStreamInfo[e2] =
|
|
23002
|
+
}, withStreamInfo: function(e2, t2) {
|
|
23003
|
+
return this.extraStreamInfo[e2] = t2, this.mergeStreamInfo(), this;
|
|
23296
23004
|
}, mergeStreamInfo: function() {
|
|
23297
23005
|
for (var e2 in this.extraStreamInfo) Object.prototype.hasOwnProperty.call(this.extraStreamInfo, e2) && (this.streamInfo[e2] = this.extraStreamInfo[e2]);
|
|
23298
23006
|
}, lock: function() {
|
|
@@ -23301,49 +23009,49 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
23301
23009
|
}, toString: function() {
|
|
23302
23010
|
var e2 = "Worker " + this.name;
|
|
23303
23011
|
return this.previous ? this.previous + " -> " + e2 : e2;
|
|
23304
|
-
} },
|
|
23305
|
-
}, {}], 29: [function(e,
|
|
23012
|
+
} }, t.exports = n;
|
|
23013
|
+
}, {}], 29: [function(e, t, r) {
|
|
23306
23014
|
var h = e("../utils"), i = e("./ConvertWorker"), s = e("./GenericWorker"), u = e("../base64"), n = e("../support"), a = e("../external"), o = null;
|
|
23307
23015
|
if (n.nodestream) try {
|
|
23308
23016
|
o = e("../nodejs/NodejsStreamOutputAdapter");
|
|
23309
23017
|
} catch (e2) {
|
|
23310
23018
|
}
|
|
23311
23019
|
function l(e2, o2) {
|
|
23312
|
-
return new a.Promise(function(
|
|
23020
|
+
return new a.Promise(function(t2, r2) {
|
|
23313
23021
|
var n2 = [], i2 = e2._internalType, s2 = e2._outputType, a2 = e2._mimeType;
|
|
23314
|
-
e2.on("data", function(e3,
|
|
23315
|
-
n2.push(e3), o2 && o2(
|
|
23022
|
+
e2.on("data", function(e3, t3) {
|
|
23023
|
+
n2.push(e3), o2 && o2(t3);
|
|
23316
23024
|
}).on("error", function(e3) {
|
|
23317
23025
|
n2 = [], r2(e3);
|
|
23318
23026
|
}).on("end", function() {
|
|
23319
23027
|
try {
|
|
23320
|
-
var e3 = function(e4,
|
|
23028
|
+
var e3 = function(e4, t3, r3) {
|
|
23321
23029
|
switch (e4) {
|
|
23322
23030
|
case "blob":
|
|
23323
|
-
return h.newBlob(h.transformTo("arraybuffer",
|
|
23031
|
+
return h.newBlob(h.transformTo("arraybuffer", t3), r3);
|
|
23324
23032
|
case "base64":
|
|
23325
|
-
return u.encode(
|
|
23033
|
+
return u.encode(t3);
|
|
23326
23034
|
default:
|
|
23327
|
-
return h.transformTo(e4,
|
|
23035
|
+
return h.transformTo(e4, t3);
|
|
23328
23036
|
}
|
|
23329
|
-
}(s2, function(e4,
|
|
23037
|
+
}(s2, function(e4, t3) {
|
|
23330
23038
|
var r3, n3 = 0, i3 = null, s3 = 0;
|
|
23331
|
-
for (r3 = 0; r3 <
|
|
23039
|
+
for (r3 = 0; r3 < t3.length; r3++) s3 += t3[r3].length;
|
|
23332
23040
|
switch (e4) {
|
|
23333
23041
|
case "string":
|
|
23334
|
-
return
|
|
23042
|
+
return t3.join("");
|
|
23335
23043
|
case "array":
|
|
23336
|
-
return Array.prototype.concat.apply([],
|
|
23044
|
+
return Array.prototype.concat.apply([], t3);
|
|
23337
23045
|
case "uint8array":
|
|
23338
|
-
for (i3 = new Uint8Array(s3), r3 = 0; r3 <
|
|
23046
|
+
for (i3 = new Uint8Array(s3), r3 = 0; r3 < t3.length; r3++) i3.set(t3[r3], n3), n3 += t3[r3].length;
|
|
23339
23047
|
return i3;
|
|
23340
23048
|
case "nodebuffer":
|
|
23341
|
-
return Buffer.concat(
|
|
23049
|
+
return Buffer.concat(t3);
|
|
23342
23050
|
default:
|
|
23343
23051
|
throw new Error("concat : unsupported type '" + e4 + "'");
|
|
23344
23052
|
}
|
|
23345
23053
|
}(i2, n2), a2);
|
|
23346
|
-
|
|
23054
|
+
t2(e3);
|
|
23347
23055
|
} catch (e4) {
|
|
23348
23056
|
r2(e4);
|
|
23349
23057
|
}
|
|
@@ -23351,9 +23059,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
23351
23059
|
}).resume();
|
|
23352
23060
|
});
|
|
23353
23061
|
}
|
|
23354
|
-
function f(e2,
|
|
23355
|
-
var n2 =
|
|
23356
|
-
switch (
|
|
23062
|
+
function f(e2, t2, r2) {
|
|
23063
|
+
var n2 = t2;
|
|
23064
|
+
switch (t2) {
|
|
23357
23065
|
case "blob":
|
|
23358
23066
|
case "arraybuffer":
|
|
23359
23067
|
n2 = "uint8array";
|
|
@@ -23362,19 +23070,19 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
23362
23070
|
n2 = "string";
|
|
23363
23071
|
}
|
|
23364
23072
|
try {
|
|
23365
|
-
this._internalType = n2, this._outputType =
|
|
23073
|
+
this._internalType = n2, this._outputType = t2, this._mimeType = r2, h.checkSupport(n2), this._worker = e2.pipe(new i(n2)), e2.lock();
|
|
23366
23074
|
} catch (e3) {
|
|
23367
23075
|
this._worker = new s("error"), this._worker.error(e3);
|
|
23368
23076
|
}
|
|
23369
23077
|
}
|
|
23370
23078
|
f.prototype = { accumulate: function(e2) {
|
|
23371
23079
|
return l(this, e2);
|
|
23372
|
-
}, on: function(e2,
|
|
23080
|
+
}, on: function(e2, t2) {
|
|
23373
23081
|
var r2 = this;
|
|
23374
23082
|
return "data" === e2 ? this._worker.on(e2, function(e3) {
|
|
23375
|
-
|
|
23083
|
+
t2.call(r2, e3.data, e3.meta);
|
|
23376
23084
|
}) : this._worker.on(e2, function() {
|
|
23377
|
-
h.delay(
|
|
23085
|
+
h.delay(t2, arguments, r2);
|
|
23378
23086
|
}), this;
|
|
23379
23087
|
}, resume: function() {
|
|
23380
23088
|
return h.delay(this._worker.resume, [], this._worker), this;
|
|
@@ -23383,8 +23091,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
23383
23091
|
}, toNodejsStream: function(e2) {
|
|
23384
23092
|
if (h.checkSupport("nodestream"), "nodebuffer" !== this._outputType) throw new Error(this._outputType + " is not supported by this method");
|
|
23385
23093
|
return new o(this, { objectMode: "nodebuffer" !== this._outputType }, e2);
|
|
23386
|
-
} },
|
|
23387
|
-
}, { "../base64": 1, "../external": 6, "../nodejs/NodejsStreamOutputAdapter": 13, "../support": 30, "../utils": 32, "./ConvertWorker": 24, "./GenericWorker": 28 }], 30: [function(e,
|
|
23094
|
+
} }, t.exports = f;
|
|
23095
|
+
}, { "../base64": 1, "../external": 6, "../nodejs/NodejsStreamOutputAdapter": 13, "../support": 30, "../utils": 32, "./ConvertWorker": 24, "./GenericWorker": 28 }], 30: [function(e, t, r) {
|
|
23388
23096
|
if (r.base64 = true, r.array = true, r.string = true, r.arraybuffer = "undefined" != typeof ArrayBuffer && "undefined" != typeof Uint8Array, r.nodebuffer = "undefined" != typeof Buffer, r.uint8array = "undefined" != typeof Uint8Array, "undefined" == typeof ArrayBuffer) r.blob = false;
|
|
23389
23097
|
else {
|
|
23390
23098
|
var n = new ArrayBuffer(0);
|
|
@@ -23404,7 +23112,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
23404
23112
|
} catch (e2) {
|
|
23405
23113
|
r.nodestream = false;
|
|
23406
23114
|
}
|
|
23407
|
-
}, { "readable-stream": 16 }], 31: [function(e,
|
|
23115
|
+
}, { "readable-stream": 16 }], 31: [function(e, t, s) {
|
|
23408
23116
|
for (var o = e("./utils"), h = e("./support"), r = e("./nodejsUtils"), n = e("./stream/GenericWorker"), u = new Array(256), i = 0; i < 256; i++) u[i] = 252 <= i ? 6 : 248 <= i ? 5 : 240 <= i ? 4 : 224 <= i ? 3 : 192 <= i ? 2 : 1;
|
|
23409
23117
|
u[254] = u[254] = 1;
|
|
23410
23118
|
function a() {
|
|
@@ -23415,72 +23123,72 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
23415
23123
|
}
|
|
23416
23124
|
s.utf8encode = function(e2) {
|
|
23417
23125
|
return h.nodebuffer ? r.newBufferFrom(e2, "utf-8") : function(e3) {
|
|
23418
|
-
var
|
|
23126
|
+
var t2, r2, n2, i2, s2, a2 = e3.length, o2 = 0;
|
|
23419
23127
|
for (i2 = 0; i2 < a2; i2++) 55296 == (64512 & (r2 = e3.charCodeAt(i2))) && i2 + 1 < a2 && 56320 == (64512 & (n2 = e3.charCodeAt(i2 + 1))) && (r2 = 65536 + (r2 - 55296 << 10) + (n2 - 56320), i2++), o2 += r2 < 128 ? 1 : r2 < 2048 ? 2 : r2 < 65536 ? 3 : 4;
|
|
23420
|
-
for (
|
|
23421
|
-
return
|
|
23128
|
+
for (t2 = h.uint8array ? new Uint8Array(o2) : new Array(o2), i2 = s2 = 0; s2 < o2; i2++) 55296 == (64512 & (r2 = e3.charCodeAt(i2))) && i2 + 1 < a2 && 56320 == (64512 & (n2 = e3.charCodeAt(i2 + 1))) && (r2 = 65536 + (r2 - 55296 << 10) + (n2 - 56320), i2++), r2 < 128 ? t2[s2++] = r2 : (r2 < 2048 ? t2[s2++] = 192 | r2 >>> 6 : (r2 < 65536 ? t2[s2++] = 224 | r2 >>> 12 : (t2[s2++] = 240 | r2 >>> 18, t2[s2++] = 128 | r2 >>> 12 & 63), t2[s2++] = 128 | r2 >>> 6 & 63), t2[s2++] = 128 | 63 & r2);
|
|
23129
|
+
return t2;
|
|
23422
23130
|
}(e2);
|
|
23423
23131
|
}, s.utf8decode = function(e2) {
|
|
23424
23132
|
return h.nodebuffer ? o.transformTo("nodebuffer", e2).toString("utf-8") : function(e3) {
|
|
23425
|
-
var
|
|
23426
|
-
for (
|
|
23427
|
-
else if (4 < (i2 = u[n2])) a2[r2++] = 65533,
|
|
23133
|
+
var t2, r2, n2, i2, s2 = e3.length, a2 = new Array(2 * s2);
|
|
23134
|
+
for (t2 = r2 = 0; t2 < s2; ) if ((n2 = e3[t2++]) < 128) a2[r2++] = n2;
|
|
23135
|
+
else if (4 < (i2 = u[n2])) a2[r2++] = 65533, t2 += i2 - 1;
|
|
23428
23136
|
else {
|
|
23429
|
-
for (n2 &= 2 === i2 ? 31 : 3 === i2 ? 15 : 7; 1 < i2 &&
|
|
23137
|
+
for (n2 &= 2 === i2 ? 31 : 3 === i2 ? 15 : 7; 1 < i2 && t2 < s2; ) n2 = n2 << 6 | 63 & e3[t2++], i2--;
|
|
23430
23138
|
1 < i2 ? a2[r2++] = 65533 : n2 < 65536 ? a2[r2++] = n2 : (n2 -= 65536, a2[r2++] = 55296 | n2 >> 10 & 1023, a2[r2++] = 56320 | 1023 & n2);
|
|
23431
23139
|
}
|
|
23432
23140
|
return a2.length !== r2 && (a2.subarray ? a2 = a2.subarray(0, r2) : a2.length = r2), o.applyFromCharCode(a2);
|
|
23433
23141
|
}(e2 = o.transformTo(h.uint8array ? "uint8array" : "array", e2));
|
|
23434
23142
|
}, o.inherits(a, n), a.prototype.processChunk = function(e2) {
|
|
23435
|
-
var
|
|
23143
|
+
var t2 = o.transformTo(h.uint8array ? "uint8array" : "array", e2.data);
|
|
23436
23144
|
if (this.leftOver && this.leftOver.length) {
|
|
23437
23145
|
if (h.uint8array) {
|
|
23438
|
-
var r2 =
|
|
23439
|
-
(
|
|
23440
|
-
} else
|
|
23146
|
+
var r2 = t2;
|
|
23147
|
+
(t2 = new Uint8Array(r2.length + this.leftOver.length)).set(this.leftOver, 0), t2.set(r2, this.leftOver.length);
|
|
23148
|
+
} else t2 = this.leftOver.concat(t2);
|
|
23441
23149
|
this.leftOver = null;
|
|
23442
23150
|
}
|
|
23443
|
-
var n2 = function(e3,
|
|
23151
|
+
var n2 = function(e3, t3) {
|
|
23444
23152
|
var r3;
|
|
23445
|
-
for ((
|
|
23446
|
-
return r3 < 0 ?
|
|
23447
|
-
}(
|
|
23448
|
-
n2 !==
|
|
23153
|
+
for ((t3 = t3 || e3.length) > e3.length && (t3 = e3.length), r3 = t3 - 1; 0 <= r3 && 128 == (192 & e3[r3]); ) r3--;
|
|
23154
|
+
return r3 < 0 ? t3 : 0 === r3 ? t3 : r3 + u[e3[r3]] > t3 ? r3 : t3;
|
|
23155
|
+
}(t2), i2 = t2;
|
|
23156
|
+
n2 !== t2.length && (h.uint8array ? (i2 = t2.subarray(0, n2), this.leftOver = t2.subarray(n2, t2.length)) : (i2 = t2.slice(0, n2), this.leftOver = t2.slice(n2, t2.length))), this.push({ data: s.utf8decode(i2), meta: e2.meta });
|
|
23449
23157
|
}, a.prototype.flush = function() {
|
|
23450
23158
|
this.leftOver && this.leftOver.length && (this.push({ data: s.utf8decode(this.leftOver), meta: {} }), this.leftOver = null);
|
|
23451
23159
|
}, s.Utf8DecodeWorker = a, o.inherits(l, n), l.prototype.processChunk = function(e2) {
|
|
23452
23160
|
this.push({ data: s.utf8encode(e2.data), meta: e2.meta });
|
|
23453
23161
|
}, s.Utf8EncodeWorker = l;
|
|
23454
|
-
}, { "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./support": 30, "./utils": 32 }], 32: [function(e,
|
|
23162
|
+
}, { "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./support": 30, "./utils": 32 }], 32: [function(e, t, a) {
|
|
23455
23163
|
var o = e("./support"), h = e("./base64"), r = e("./nodejsUtils"), u = e("./external");
|
|
23456
23164
|
function n(e2) {
|
|
23457
23165
|
return e2;
|
|
23458
23166
|
}
|
|
23459
|
-
function l(e2,
|
|
23460
|
-
for (var r2 = 0; r2 < e2.length; ++r2)
|
|
23461
|
-
return
|
|
23167
|
+
function l(e2, t2) {
|
|
23168
|
+
for (var r2 = 0; r2 < e2.length; ++r2) t2[r2] = 255 & e2.charCodeAt(r2);
|
|
23169
|
+
return t2;
|
|
23462
23170
|
}
|
|
23463
|
-
e("setimmediate"), a.newBlob = function(
|
|
23171
|
+
e("setimmediate"), a.newBlob = function(t2, r2) {
|
|
23464
23172
|
a.checkSupport("blob");
|
|
23465
23173
|
try {
|
|
23466
|
-
return new Blob([
|
|
23174
|
+
return new Blob([t2], { type: r2 });
|
|
23467
23175
|
} catch (e2) {
|
|
23468
23176
|
try {
|
|
23469
23177
|
var n2 = new (self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder)();
|
|
23470
|
-
return n2.append(
|
|
23178
|
+
return n2.append(t2), n2.getBlob(r2);
|
|
23471
23179
|
} catch (e3) {
|
|
23472
23180
|
throw new Error("Bug : can't construct the Blob.");
|
|
23473
23181
|
}
|
|
23474
23182
|
}
|
|
23475
23183
|
};
|
|
23476
|
-
var i = { stringifyByChunk: function(e2,
|
|
23184
|
+
var i = { stringifyByChunk: function(e2, t2, r2) {
|
|
23477
23185
|
var n2 = [], i2 = 0, s2 = e2.length;
|
|
23478
23186
|
if (s2 <= r2) return String.fromCharCode.apply(null, e2);
|
|
23479
|
-
for (; i2 < s2; ) "array" ===
|
|
23187
|
+
for (; i2 < s2; ) "array" === t2 || "nodebuffer" === t2 ? n2.push(String.fromCharCode.apply(null, e2.slice(i2, Math.min(i2 + r2, s2)))) : n2.push(String.fromCharCode.apply(null, e2.subarray(i2, Math.min(i2 + r2, s2)))), i2 += r2;
|
|
23480
23188
|
return n2.join("");
|
|
23481
23189
|
}, stringifyByChar: function(e2) {
|
|
23482
|
-
for (var
|
|
23483
|
-
return
|
|
23190
|
+
for (var t2 = "", r2 = 0; r2 < e2.length; r2++) t2 += String.fromCharCode(e2[r2]);
|
|
23191
|
+
return t2;
|
|
23484
23192
|
}, applyCanBeUsed: { uint8array: function() {
|
|
23485
23193
|
try {
|
|
23486
23194
|
return o.uint8array && 1 === String.fromCharCode.apply(null, new Uint8Array(1)).length;
|
|
@@ -23495,17 +23203,17 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
23495
23203
|
}
|
|
23496
23204
|
}() } };
|
|
23497
23205
|
function s(e2) {
|
|
23498
|
-
var
|
|
23499
|
-
if ("uint8array" === r2 ? n2 = i.applyCanBeUsed.uint8array : "nodebuffer" === r2 && (n2 = i.applyCanBeUsed.nodebuffer), n2) for (; 1 <
|
|
23500
|
-
return i.stringifyByChunk(e2, r2,
|
|
23206
|
+
var t2 = 65536, r2 = a.getTypeOf(e2), n2 = true;
|
|
23207
|
+
if ("uint8array" === r2 ? n2 = i.applyCanBeUsed.uint8array : "nodebuffer" === r2 && (n2 = i.applyCanBeUsed.nodebuffer), n2) for (; 1 < t2; ) try {
|
|
23208
|
+
return i.stringifyByChunk(e2, r2, t2);
|
|
23501
23209
|
} catch (e3) {
|
|
23502
|
-
|
|
23210
|
+
t2 = Math.floor(t2 / 2);
|
|
23503
23211
|
}
|
|
23504
23212
|
return i.stringifyByChar(e2);
|
|
23505
23213
|
}
|
|
23506
|
-
function f(e2,
|
|
23507
|
-
for (var r2 = 0; r2 < e2.length; r2++)
|
|
23508
|
-
return
|
|
23214
|
+
function f(e2, t2) {
|
|
23215
|
+
for (var r2 = 0; r2 < e2.length; r2++) t2[r2] = e2[r2];
|
|
23216
|
+
return t2;
|
|
23509
23217
|
}
|
|
23510
23218
|
a.applyFromCharCode = s;
|
|
23511
23219
|
var c = {};
|
|
@@ -23543,15 +23251,15 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
23543
23251
|
return c.nodebuffer.uint8array(e2).buffer;
|
|
23544
23252
|
}, uint8array: function(e2) {
|
|
23545
23253
|
return f(e2, new Uint8Array(e2.length));
|
|
23546
|
-
}, nodebuffer: n }, a.transformTo = function(e2,
|
|
23547
|
-
if (
|
|
23254
|
+
}, nodebuffer: n }, a.transformTo = function(e2, t2) {
|
|
23255
|
+
if (t2 = t2 || "", !e2) return t2;
|
|
23548
23256
|
a.checkSupport(e2);
|
|
23549
|
-
var r2 = a.getTypeOf(
|
|
23550
|
-
return c[r2][e2](
|
|
23257
|
+
var r2 = a.getTypeOf(t2);
|
|
23258
|
+
return c[r2][e2](t2);
|
|
23551
23259
|
}, a.resolve = function(e2) {
|
|
23552
|
-
for (var
|
|
23553
|
-
var i2 =
|
|
23554
|
-
"." === i2 || "" === i2 && 0 !== n2 && n2 !==
|
|
23260
|
+
for (var t2 = e2.split("/"), r2 = [], n2 = 0; n2 < t2.length; n2++) {
|
|
23261
|
+
var i2 = t2[n2];
|
|
23262
|
+
"." === i2 || "" === i2 && 0 !== n2 && n2 !== t2.length - 1 || (".." === i2 ? r2.pop() : r2.push(i2));
|
|
23555
23263
|
}
|
|
23556
23264
|
return r2.join("/");
|
|
23557
23265
|
}, a.getTypeOf = function(e2) {
|
|
@@ -23559,39 +23267,39 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
23559
23267
|
}, a.checkSupport = function(e2) {
|
|
23560
23268
|
if (!o[e2.toLowerCase()]) throw new Error(e2 + " is not supported by this platform");
|
|
23561
23269
|
}, a.MAX_VALUE_16BITS = 65535, a.MAX_VALUE_32BITS = -1, a.pretty = function(e2) {
|
|
23562
|
-
var
|
|
23563
|
-
for (r2 = 0; r2 < (e2 || "").length; r2++) n2 += "\\x" + ((
|
|
23270
|
+
var t2, r2, n2 = "";
|
|
23271
|
+
for (r2 = 0; r2 < (e2 || "").length; r2++) n2 += "\\x" + ((t2 = e2.charCodeAt(r2)) < 16 ? "0" : "") + t2.toString(16).toUpperCase();
|
|
23564
23272
|
return n2;
|
|
23565
|
-
}, a.delay = function(e2,
|
|
23273
|
+
}, a.delay = function(e2, t2, r2) {
|
|
23566
23274
|
setImmediate(function() {
|
|
23567
|
-
e2.apply(r2 || null,
|
|
23275
|
+
e2.apply(r2 || null, t2 || []);
|
|
23568
23276
|
});
|
|
23569
|
-
}, a.inherits = function(e2,
|
|
23277
|
+
}, a.inherits = function(e2, t2) {
|
|
23570
23278
|
function r2() {
|
|
23571
23279
|
}
|
|
23572
|
-
r2.prototype =
|
|
23280
|
+
r2.prototype = t2.prototype, e2.prototype = new r2();
|
|
23573
23281
|
}, a.extend = function() {
|
|
23574
|
-
var e2,
|
|
23575
|
-
for (e2 = 0; e2 < arguments.length; e2++) for (
|
|
23282
|
+
var e2, t2, r2 = {};
|
|
23283
|
+
for (e2 = 0; e2 < arguments.length; e2++) for (t2 in arguments[e2]) Object.prototype.hasOwnProperty.call(arguments[e2], t2) && void 0 === r2[t2] && (r2[t2] = arguments[e2][t2]);
|
|
23576
23284
|
return r2;
|
|
23577
23285
|
}, a.prepareContent = function(r2, e2, n2, i2, s2) {
|
|
23578
23286
|
return u.Promise.resolve(e2).then(function(n3) {
|
|
23579
|
-
return o.blob && (n3 instanceof Blob || -1 !== ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(n3))) && "undefined" != typeof FileReader ? new u.Promise(function(
|
|
23287
|
+
return o.blob && (n3 instanceof Blob || -1 !== ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(n3))) && "undefined" != typeof FileReader ? new u.Promise(function(t2, r3) {
|
|
23580
23288
|
var e3 = new FileReader();
|
|
23581
23289
|
e3.onload = function(e4) {
|
|
23582
|
-
|
|
23290
|
+
t2(e4.target.result);
|
|
23583
23291
|
}, e3.onerror = function(e4) {
|
|
23584
23292
|
r3(e4.target.error);
|
|
23585
23293
|
}, e3.readAsArrayBuffer(n3);
|
|
23586
23294
|
}) : n3;
|
|
23587
23295
|
}).then(function(e3) {
|
|
23588
|
-
var
|
|
23589
|
-
return
|
|
23296
|
+
var t2 = a.getTypeOf(e3);
|
|
23297
|
+
return t2 ? ("arraybuffer" === t2 ? e3 = a.transformTo("uint8array", e3) : "string" === t2 && (s2 ? e3 = h.decode(e3) : n2 && true !== i2 && (e3 = function(e4) {
|
|
23590
23298
|
return l(e4, o.uint8array ? new Uint8Array(e4.length) : new Array(e4.length));
|
|
23591
23299
|
}(e3))), e3) : u.Promise.reject(new Error("Can't read the data of '" + r2 + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));
|
|
23592
23300
|
});
|
|
23593
23301
|
};
|
|
23594
|
-
}, { "./base64": 1, "./external": 6, "./nodejsUtils": 14, "./support": 30, setimmediate: 54 }], 33: [function(e,
|
|
23302
|
+
}, { "./base64": 1, "./external": 6, "./nodejsUtils": 14, "./support": 30, setimmediate: 54 }], 33: [function(e, t, r) {
|
|
23595
23303
|
var n = e("./reader/readerFor"), i = e("./utils"), s = e("./signature"), a = e("./zipEntry"), o = e("./support");
|
|
23596
23304
|
function h(e2) {
|
|
23597
23305
|
this.files = [], this.loadOptions = e2;
|
|
@@ -23599,26 +23307,26 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
23599
23307
|
h.prototype = { checkSignature: function(e2) {
|
|
23600
23308
|
if (!this.reader.readAndCheckSignature(e2)) {
|
|
23601
23309
|
this.reader.index -= 4;
|
|
23602
|
-
var
|
|
23603
|
-
throw new Error("Corrupted zip or bug: unexpected signature (" + i.pretty(
|
|
23310
|
+
var t2 = this.reader.readString(4);
|
|
23311
|
+
throw new Error("Corrupted zip or bug: unexpected signature (" + i.pretty(t2) + ", expected " + i.pretty(e2) + ")");
|
|
23604
23312
|
}
|
|
23605
|
-
}, isSignature: function(e2,
|
|
23313
|
+
}, isSignature: function(e2, t2) {
|
|
23606
23314
|
var r2 = this.reader.index;
|
|
23607
23315
|
this.reader.setIndex(e2);
|
|
23608
|
-
var n2 = this.reader.readString(4) ===
|
|
23316
|
+
var n2 = this.reader.readString(4) === t2;
|
|
23609
23317
|
return this.reader.setIndex(r2), n2;
|
|
23610
23318
|
}, readBlockEndOfCentral: function() {
|
|
23611
23319
|
this.diskNumber = this.reader.readInt(2), this.diskWithCentralDirStart = this.reader.readInt(2), this.centralDirRecordsOnThisDisk = this.reader.readInt(2), this.centralDirRecords = this.reader.readInt(2), this.centralDirSize = this.reader.readInt(4), this.centralDirOffset = this.reader.readInt(4), this.zipCommentLength = this.reader.readInt(2);
|
|
23612
|
-
var e2 = this.reader.readData(this.zipCommentLength),
|
|
23320
|
+
var e2 = this.reader.readData(this.zipCommentLength), t2 = o.uint8array ? "uint8array" : "array", r2 = i.transformTo(t2, e2);
|
|
23613
23321
|
this.zipComment = this.loadOptions.decodeFileName(r2);
|
|
23614
23322
|
}, readBlockZip64EndOfCentral: function() {
|
|
23615
23323
|
this.zip64EndOfCentralSize = this.reader.readInt(8), this.reader.skip(4), this.diskNumber = this.reader.readInt(4), this.diskWithCentralDirStart = this.reader.readInt(4), this.centralDirRecordsOnThisDisk = this.reader.readInt(8), this.centralDirRecords = this.reader.readInt(8), this.centralDirSize = this.reader.readInt(8), this.centralDirOffset = this.reader.readInt(8), this.zip64ExtensibleData = {};
|
|
23616
|
-
for (var e2,
|
|
23324
|
+
for (var e2, t2, r2, n2 = this.zip64EndOfCentralSize - 44; 0 < n2; ) e2 = this.reader.readInt(2), t2 = this.reader.readInt(4), r2 = this.reader.readData(t2), this.zip64ExtensibleData[e2] = { id: e2, length: t2, value: r2 };
|
|
23617
23325
|
}, readBlockZip64EndOfCentralLocator: function() {
|
|
23618
23326
|
if (this.diskWithZip64CentralDirStart = this.reader.readInt(4), this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8), this.disksCount = this.reader.readInt(4), 1 < this.disksCount) throw new Error("Multi-volumes zip are not supported");
|
|
23619
23327
|
}, readLocalFiles: function() {
|
|
23620
|
-
var e2,
|
|
23621
|
-
for (e2 = 0; e2 < this.files.length; e2++)
|
|
23328
|
+
var e2, t2;
|
|
23329
|
+
for (e2 = 0; e2 < this.files.length; e2++) t2 = this.files[e2], this.reader.setIndex(t2.localHeaderOffset), this.checkSignature(s.LOCAL_FILE_HEADER), t2.readLocalPart(this.reader), t2.handleUTF8(), t2.processAttributes();
|
|
23622
23330
|
}, readCentralDir: function() {
|
|
23623
23331
|
var e2;
|
|
23624
23332
|
for (this.reader.setIndex(this.centralDirOffset); this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER); ) (e2 = new a({ zip64: this.zip64 }, this.loadOptions)).readCentralPart(this.reader), this.files.push(e2);
|
|
@@ -23627,7 +23335,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
23627
23335
|
var e2 = this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);
|
|
23628
23336
|
if (e2 < 0) throw !this.isSignature(0, s.LOCAL_FILE_HEADER) ? new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html") : new Error("Corrupted zip: can't find end of central directory");
|
|
23629
23337
|
this.reader.setIndex(e2);
|
|
23630
|
-
var
|
|
23338
|
+
var t2 = e2;
|
|
23631
23339
|
if (this.checkSignature(s.CENTRAL_DIRECTORY_END), this.readBlockEndOfCentral(), this.diskNumber === i.MAX_VALUE_16BITS || this.diskWithCentralDirStart === i.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === i.MAX_VALUE_16BITS || this.centralDirRecords === i.MAX_VALUE_16BITS || this.centralDirSize === i.MAX_VALUE_32BITS || this.centralDirOffset === i.MAX_VALUE_32BITS) {
|
|
23632
23340
|
if (this.zip64 = true, (e2 = this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR)) < 0) throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");
|
|
23633
23341
|
if (this.reader.setIndex(e2), this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR), this.readBlockZip64EndOfCentralLocator(), !this.isSignature(this.relativeOffsetEndOfZip64CentralDir, s.ZIP64_CENTRAL_DIRECTORY_END) && (this.relativeOffsetEndOfZip64CentralDir = this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_END), this.relativeOffsetEndOfZip64CentralDir < 0)) throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");
|
|
@@ -23635,36 +23343,36 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
23635
23343
|
}
|
|
23636
23344
|
var r2 = this.centralDirOffset + this.centralDirSize;
|
|
23637
23345
|
this.zip64 && (r2 += 20, r2 += 12 + this.zip64EndOfCentralSize);
|
|
23638
|
-
var n2 =
|
|
23639
|
-
if (0 < n2) this.isSignature(
|
|
23346
|
+
var n2 = t2 - r2;
|
|
23347
|
+
if (0 < n2) this.isSignature(t2, s.CENTRAL_FILE_HEADER) || (this.reader.zero = n2);
|
|
23640
23348
|
else if (n2 < 0) throw new Error("Corrupted zip: missing " + Math.abs(n2) + " bytes.");
|
|
23641
23349
|
}, prepareReader: function(e2) {
|
|
23642
23350
|
this.reader = n(e2);
|
|
23643
23351
|
}, load: function(e2) {
|
|
23644
23352
|
this.prepareReader(e2), this.readEndOfCentral(), this.readCentralDir(), this.readLocalFiles();
|
|
23645
|
-
} },
|
|
23646
|
-
}, { "./reader/readerFor": 22, "./signature": 23, "./support": 30, "./utils": 32, "./zipEntry": 34 }], 34: [function(e,
|
|
23353
|
+
} }, t.exports = h;
|
|
23354
|
+
}, { "./reader/readerFor": 22, "./signature": 23, "./support": 30, "./utils": 32, "./zipEntry": 34 }], 34: [function(e, t, r) {
|
|
23647
23355
|
var n = e("./reader/readerFor"), s = e("./utils"), i = e("./compressedObject"), a = e("./crc32"), o = e("./utf8"), h = e("./compressions"), u = e("./support");
|
|
23648
|
-
function l(e2,
|
|
23649
|
-
this.options = e2, this.loadOptions =
|
|
23356
|
+
function l(e2, t2) {
|
|
23357
|
+
this.options = e2, this.loadOptions = t2;
|
|
23650
23358
|
}
|
|
23651
23359
|
l.prototype = { isEncrypted: function() {
|
|
23652
23360
|
return 1 == (1 & this.bitFlag);
|
|
23653
23361
|
}, useUTF8: function() {
|
|
23654
23362
|
return 2048 == (2048 & this.bitFlag);
|
|
23655
23363
|
}, readLocalPart: function(e2) {
|
|
23656
|
-
var
|
|
23364
|
+
var t2, r2;
|
|
23657
23365
|
if (e2.skip(22), this.fileNameLength = e2.readInt(2), r2 = e2.readInt(2), this.fileName = e2.readData(this.fileNameLength), e2.skip(r2), -1 === this.compressedSize || -1 === this.uncompressedSize) throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");
|
|
23658
|
-
if (null === (
|
|
23659
|
-
for (var
|
|
23366
|
+
if (null === (t2 = function(e3) {
|
|
23367
|
+
for (var t3 in h) if (Object.prototype.hasOwnProperty.call(h, t3) && h[t3].magic === e3) return h[t3];
|
|
23660
23368
|
return null;
|
|
23661
23369
|
}(this.compressionMethod))) throw new Error("Corrupted zip : compression " + s.pretty(this.compressionMethod) + " unknown (inner file : " + s.transformTo("string", this.fileName) + ")");
|
|
23662
|
-
this.decompressed = new i(this.compressedSize, this.uncompressedSize, this.crc32,
|
|
23370
|
+
this.decompressed = new i(this.compressedSize, this.uncompressedSize, this.crc32, t2, e2.readData(this.compressedSize));
|
|
23663
23371
|
}, readCentralPart: function(e2) {
|
|
23664
23372
|
this.versionMadeBy = e2.readInt(2), e2.skip(2), this.bitFlag = e2.readInt(2), this.compressionMethod = e2.readString(2), this.date = e2.readDate(), this.crc32 = e2.readInt(4), this.compressedSize = e2.readInt(4), this.uncompressedSize = e2.readInt(4);
|
|
23665
|
-
var
|
|
23373
|
+
var t2 = e2.readInt(2);
|
|
23666
23374
|
if (this.extraFieldsLength = e2.readInt(2), this.fileCommentLength = e2.readInt(2), this.diskNumberStart = e2.readInt(2), this.internalFileAttributes = e2.readInt(2), this.externalFileAttributes = e2.readInt(4), this.localHeaderOffset = e2.readInt(4), this.isEncrypted()) throw new Error("Encrypted zip are not supported");
|
|
23667
|
-
e2.skip(
|
|
23375
|
+
e2.skip(t2), this.readExtraFields(e2), this.parseZIP64ExtraField(e2), this.fileComment = e2.readData(this.fileCommentLength);
|
|
23668
23376
|
}, processAttributes: function() {
|
|
23669
23377
|
this.unixPermissions = null, this.dosPermissions = null;
|
|
23670
23378
|
var e2 = this.versionMadeBy >> 8;
|
|
@@ -23675,15 +23383,15 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
23675
23383
|
this.uncompressedSize === s.MAX_VALUE_32BITS && (this.uncompressedSize = e2.readInt(8)), this.compressedSize === s.MAX_VALUE_32BITS && (this.compressedSize = e2.readInt(8)), this.localHeaderOffset === s.MAX_VALUE_32BITS && (this.localHeaderOffset = e2.readInt(8)), this.diskNumberStart === s.MAX_VALUE_32BITS && (this.diskNumberStart = e2.readInt(4));
|
|
23676
23384
|
}
|
|
23677
23385
|
}, readExtraFields: function(e2) {
|
|
23678
|
-
var
|
|
23679
|
-
for (this.extraFields || (this.extraFields = {}); e2.index + 4 < i2; )
|
|
23386
|
+
var t2, r2, n2, i2 = e2.index + this.extraFieldsLength;
|
|
23387
|
+
for (this.extraFields || (this.extraFields = {}); e2.index + 4 < i2; ) t2 = e2.readInt(2), r2 = e2.readInt(2), n2 = e2.readData(r2), this.extraFields[t2] = { id: t2, length: r2, value: n2 };
|
|
23680
23388
|
e2.setIndex(i2);
|
|
23681
23389
|
}, handleUTF8: function() {
|
|
23682
23390
|
var e2 = u.uint8array ? "uint8array" : "array";
|
|
23683
23391
|
if (this.useUTF8()) this.fileNameStr = o.utf8decode(this.fileName), this.fileCommentStr = o.utf8decode(this.fileComment);
|
|
23684
23392
|
else {
|
|
23685
|
-
var
|
|
23686
|
-
if (null !==
|
|
23393
|
+
var t2 = this.findExtraFieldUnicodePath();
|
|
23394
|
+
if (null !== t2) this.fileNameStr = t2;
|
|
23687
23395
|
else {
|
|
23688
23396
|
var r2 = s.transformTo(e2, this.fileName);
|
|
23689
23397
|
this.fileNameStr = this.loadOptions.decodeFileName(r2);
|
|
@@ -23698,78 +23406,78 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
23698
23406
|
}, findExtraFieldUnicodePath: function() {
|
|
23699
23407
|
var e2 = this.extraFields[28789];
|
|
23700
23408
|
if (e2) {
|
|
23701
|
-
var
|
|
23702
|
-
return 1 !==
|
|
23409
|
+
var t2 = n(e2.value);
|
|
23410
|
+
return 1 !== t2.readInt(1) ? null : a(this.fileName) !== t2.readInt(4) ? null : o.utf8decode(t2.readData(e2.length - 5));
|
|
23703
23411
|
}
|
|
23704
23412
|
return null;
|
|
23705
23413
|
}, findExtraFieldUnicodeComment: function() {
|
|
23706
23414
|
var e2 = this.extraFields[25461];
|
|
23707
23415
|
if (e2) {
|
|
23708
|
-
var
|
|
23709
|
-
return 1 !==
|
|
23416
|
+
var t2 = n(e2.value);
|
|
23417
|
+
return 1 !== t2.readInt(1) ? null : a(this.fileComment) !== t2.readInt(4) ? null : o.utf8decode(t2.readData(e2.length - 5));
|
|
23710
23418
|
}
|
|
23711
23419
|
return null;
|
|
23712
|
-
} },
|
|
23713
|
-
}, { "./compressedObject": 2, "./compressions": 3, "./crc32": 4, "./reader/readerFor": 22, "./support": 30, "./utf8": 31, "./utils": 32 }], 35: [function(e,
|
|
23714
|
-
function n(e2,
|
|
23715
|
-
this.name = e2, this.dir = r2.dir, this.date = r2.date, this.comment = r2.comment, this.unixPermissions = r2.unixPermissions, this.dosPermissions = r2.dosPermissions, this._data =
|
|
23420
|
+
} }, t.exports = l;
|
|
23421
|
+
}, { "./compressedObject": 2, "./compressions": 3, "./crc32": 4, "./reader/readerFor": 22, "./support": 30, "./utf8": 31, "./utils": 32 }], 35: [function(e, t, r) {
|
|
23422
|
+
function n(e2, t2, r2) {
|
|
23423
|
+
this.name = e2, this.dir = r2.dir, this.date = r2.date, this.comment = r2.comment, this.unixPermissions = r2.unixPermissions, this.dosPermissions = r2.dosPermissions, this._data = t2, this._dataBinary = r2.binary, this.options = { compression: r2.compression, compressionOptions: r2.compressionOptions };
|
|
23716
23424
|
}
|
|
23717
23425
|
var s = e("./stream/StreamHelper"), i = e("./stream/DataWorker"), a = e("./utf8"), o = e("./compressedObject"), h = e("./stream/GenericWorker");
|
|
23718
23426
|
n.prototype = { internalStream: function(e2) {
|
|
23719
|
-
var
|
|
23427
|
+
var t2 = null, r2 = "string";
|
|
23720
23428
|
try {
|
|
23721
23429
|
if (!e2) throw new Error("No output type specified.");
|
|
23722
23430
|
var n2 = "string" === (r2 = e2.toLowerCase()) || "text" === r2;
|
|
23723
|
-
"binarystring" !== r2 && "text" !== r2 || (r2 = "string"),
|
|
23431
|
+
"binarystring" !== r2 && "text" !== r2 || (r2 = "string"), t2 = this._decompressWorker();
|
|
23724
23432
|
var i2 = !this._dataBinary;
|
|
23725
|
-
i2 && !n2 && (
|
|
23433
|
+
i2 && !n2 && (t2 = t2.pipe(new a.Utf8EncodeWorker())), !i2 && n2 && (t2 = t2.pipe(new a.Utf8DecodeWorker()));
|
|
23726
23434
|
} catch (e3) {
|
|
23727
|
-
(
|
|
23435
|
+
(t2 = new h("error")).error(e3);
|
|
23728
23436
|
}
|
|
23729
|
-
return new s(
|
|
23730
|
-
}, async: function(e2,
|
|
23731
|
-
return this.internalStream(e2).accumulate(
|
|
23732
|
-
}, nodeStream: function(e2,
|
|
23733
|
-
return this.internalStream(e2 || "nodebuffer").toNodejsStream(
|
|
23734
|
-
}, _compressWorker: function(e2,
|
|
23437
|
+
return new s(t2, r2, "");
|
|
23438
|
+
}, async: function(e2, t2) {
|
|
23439
|
+
return this.internalStream(e2).accumulate(t2);
|
|
23440
|
+
}, nodeStream: function(e2, t2) {
|
|
23441
|
+
return this.internalStream(e2 || "nodebuffer").toNodejsStream(t2);
|
|
23442
|
+
}, _compressWorker: function(e2, t2) {
|
|
23735
23443
|
if (this._data instanceof o && this._data.compression.magic === e2.magic) return this._data.getCompressedWorker();
|
|
23736
23444
|
var r2 = this._decompressWorker();
|
|
23737
|
-
return this._dataBinary || (r2 = r2.pipe(new a.Utf8EncodeWorker())), o.createWorkerFrom(r2, e2,
|
|
23445
|
+
return this._dataBinary || (r2 = r2.pipe(new a.Utf8EncodeWorker())), o.createWorkerFrom(r2, e2, t2);
|
|
23738
23446
|
}, _decompressWorker: function() {
|
|
23739
23447
|
return this._data instanceof o ? this._data.getContentWorker() : this._data instanceof h ? this._data : new i(this._data);
|
|
23740
23448
|
} };
|
|
23741
23449
|
for (var u = ["asText", "asBinary", "asNodeBuffer", "asUint8Array", "asArrayBuffer"], l = function() {
|
|
23742
23450
|
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
23743
23451
|
}, f = 0; f < u.length; f++) n.prototype[u[f]] = l;
|
|
23744
|
-
|
|
23745
|
-
}, { "./compressedObject": 2, "./stream/DataWorker": 27, "./stream/GenericWorker": 28, "./stream/StreamHelper": 29, "./utf8": 31 }], 36: [function(e, l,
|
|
23746
|
-
(function(
|
|
23747
|
-
var r, n, e2 =
|
|
23452
|
+
t.exports = n;
|
|
23453
|
+
}, { "./compressedObject": 2, "./stream/DataWorker": 27, "./stream/GenericWorker": 28, "./stream/StreamHelper": 29, "./utf8": 31 }], 36: [function(e, l, t) {
|
|
23454
|
+
(function(t2) {
|
|
23455
|
+
var r, n, e2 = t2.MutationObserver || t2.WebKitMutationObserver;
|
|
23748
23456
|
if (e2) {
|
|
23749
|
-
var i = 0, s = new e2(u), a =
|
|
23457
|
+
var i = 0, s = new e2(u), a = t2.document.createTextNode("");
|
|
23750
23458
|
s.observe(a, { characterData: true }), r = function() {
|
|
23751
23459
|
a.data = i = ++i % 2;
|
|
23752
23460
|
};
|
|
23753
|
-
} else if (
|
|
23754
|
-
var e3 =
|
|
23461
|
+
} else if (t2.setImmediate || void 0 === t2.MessageChannel) r = "document" in t2 && "onreadystatechange" in t2.document.createElement("script") ? function() {
|
|
23462
|
+
var e3 = t2.document.createElement("script");
|
|
23755
23463
|
e3.onreadystatechange = function() {
|
|
23756
23464
|
u(), e3.onreadystatechange = null, e3.parentNode.removeChild(e3), e3 = null;
|
|
23757
|
-
},
|
|
23465
|
+
}, t2.document.documentElement.appendChild(e3);
|
|
23758
23466
|
} : function() {
|
|
23759
23467
|
setTimeout(u, 0);
|
|
23760
23468
|
};
|
|
23761
23469
|
else {
|
|
23762
|
-
var o = new
|
|
23470
|
+
var o = new t2.MessageChannel();
|
|
23763
23471
|
o.port1.onmessage = u, r = function() {
|
|
23764
23472
|
o.port2.postMessage(0);
|
|
23765
23473
|
};
|
|
23766
23474
|
}
|
|
23767
23475
|
var h = [];
|
|
23768
23476
|
function u() {
|
|
23769
|
-
var e3,
|
|
23477
|
+
var e3, t3;
|
|
23770
23478
|
n = true;
|
|
23771
23479
|
for (var r2 = h.length; r2; ) {
|
|
23772
|
-
for (
|
|
23480
|
+
for (t3 = h, h = [], e3 = -1; ++e3 < r2; ) t3[e3]();
|
|
23773
23481
|
r2 = h.length;
|
|
23774
23482
|
}
|
|
23775
23483
|
n = false;
|
|
@@ -23778,7 +23486,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
23778
23486
|
1 !== h.push(e3) || n || r();
|
|
23779
23487
|
};
|
|
23780
23488
|
}).call(this, "undefined" != typeof commonjsGlobal ? commonjsGlobal : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {});
|
|
23781
|
-
}, {}], 37: [function(e,
|
|
23489
|
+
}, {}], 37: [function(e, t, r) {
|
|
23782
23490
|
var i = e("immediate");
|
|
23783
23491
|
function u() {
|
|
23784
23492
|
}
|
|
@@ -23787,66 +23495,66 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
23787
23495
|
if ("function" != typeof e2) throw new TypeError("resolver must be a function");
|
|
23788
23496
|
this.state = n, this.queue = [], this.outcome = void 0, e2 !== u && d(this, e2);
|
|
23789
23497
|
}
|
|
23790
|
-
function h(e2,
|
|
23791
|
-
this.promise = e2, "function" == typeof
|
|
23498
|
+
function h(e2, t2, r2) {
|
|
23499
|
+
this.promise = e2, "function" == typeof t2 && (this.onFulfilled = t2, this.callFulfilled = this.otherCallFulfilled), "function" == typeof r2 && (this.onRejected = r2, this.callRejected = this.otherCallRejected);
|
|
23792
23500
|
}
|
|
23793
|
-
function f(
|
|
23501
|
+
function f(t2, r2, n2) {
|
|
23794
23502
|
i(function() {
|
|
23795
23503
|
var e2;
|
|
23796
23504
|
try {
|
|
23797
23505
|
e2 = r2(n2);
|
|
23798
23506
|
} catch (e3) {
|
|
23799
|
-
return l.reject(
|
|
23507
|
+
return l.reject(t2, e3);
|
|
23800
23508
|
}
|
|
23801
|
-
e2 ===
|
|
23509
|
+
e2 === t2 ? l.reject(t2, new TypeError("Cannot resolve promise with itself")) : l.resolve(t2, e2);
|
|
23802
23510
|
});
|
|
23803
23511
|
}
|
|
23804
23512
|
function c(e2) {
|
|
23805
|
-
var
|
|
23806
|
-
if (e2 && ("object" == typeof e2 || "function" == typeof e2) && "function" == typeof
|
|
23807
|
-
|
|
23513
|
+
var t2 = e2 && e2.then;
|
|
23514
|
+
if (e2 && ("object" == typeof e2 || "function" == typeof e2) && "function" == typeof t2) return function() {
|
|
23515
|
+
t2.apply(e2, arguments);
|
|
23808
23516
|
};
|
|
23809
23517
|
}
|
|
23810
|
-
function d(
|
|
23518
|
+
function d(t2, e2) {
|
|
23811
23519
|
var r2 = false;
|
|
23812
23520
|
function n2(e3) {
|
|
23813
|
-
r2 || (r2 = true, l.reject(
|
|
23521
|
+
r2 || (r2 = true, l.reject(t2, e3));
|
|
23814
23522
|
}
|
|
23815
23523
|
function i2(e3) {
|
|
23816
|
-
r2 || (r2 = true, l.resolve(
|
|
23524
|
+
r2 || (r2 = true, l.resolve(t2, e3));
|
|
23817
23525
|
}
|
|
23818
23526
|
var s2 = p(function() {
|
|
23819
23527
|
e2(i2, n2);
|
|
23820
23528
|
});
|
|
23821
23529
|
"error" === s2.status && n2(s2.value);
|
|
23822
23530
|
}
|
|
23823
|
-
function p(e2,
|
|
23531
|
+
function p(e2, t2) {
|
|
23824
23532
|
var r2 = {};
|
|
23825
23533
|
try {
|
|
23826
|
-
r2.value = e2(
|
|
23534
|
+
r2.value = e2(t2), r2.status = "success";
|
|
23827
23535
|
} catch (e3) {
|
|
23828
23536
|
r2.status = "error", r2.value = e3;
|
|
23829
23537
|
}
|
|
23830
23538
|
return r2;
|
|
23831
23539
|
}
|
|
23832
|
-
(
|
|
23833
|
-
if ("function" != typeof
|
|
23540
|
+
(t.exports = o).prototype.finally = function(t2) {
|
|
23541
|
+
if ("function" != typeof t2) return this;
|
|
23834
23542
|
var r2 = this.constructor;
|
|
23835
23543
|
return this.then(function(e2) {
|
|
23836
|
-
return r2.resolve(
|
|
23544
|
+
return r2.resolve(t2()).then(function() {
|
|
23837
23545
|
return e2;
|
|
23838
23546
|
});
|
|
23839
23547
|
}, function(e2) {
|
|
23840
|
-
return r2.resolve(
|
|
23548
|
+
return r2.resolve(t2()).then(function() {
|
|
23841
23549
|
throw e2;
|
|
23842
23550
|
});
|
|
23843
23551
|
});
|
|
23844
23552
|
}, o.prototype.catch = function(e2) {
|
|
23845
23553
|
return this.then(null, e2);
|
|
23846
|
-
}, o.prototype.then = function(e2,
|
|
23847
|
-
if ("function" != typeof e2 && this.state === a || "function" != typeof
|
|
23554
|
+
}, o.prototype.then = function(e2, t2) {
|
|
23555
|
+
if ("function" != typeof e2 && this.state === a || "function" != typeof t2 && this.state === s) return this;
|
|
23848
23556
|
var r2 = new this.constructor(u);
|
|
23849
|
-
this.state !== n ? f(r2, this.state === a ? e2 :
|
|
23557
|
+
this.state !== n ? f(r2, this.state === a ? e2 : t2, this.outcome) : this.queue.push(new h(r2, e2, t2));
|
|
23850
23558
|
return r2;
|
|
23851
23559
|
}, h.prototype.callFulfilled = function(e2) {
|
|
23852
23560
|
l.resolve(this.promise, e2);
|
|
@@ -23856,48 +23564,48 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
23856
23564
|
l.reject(this.promise, e2);
|
|
23857
23565
|
}, h.prototype.otherCallRejected = function(e2) {
|
|
23858
23566
|
f(this.promise, this.onRejected, e2);
|
|
23859
|
-
}, l.resolve = function(e2,
|
|
23860
|
-
var r2 = p(c,
|
|
23567
|
+
}, l.resolve = function(e2, t2) {
|
|
23568
|
+
var r2 = p(c, t2);
|
|
23861
23569
|
if ("error" === r2.status) return l.reject(e2, r2.value);
|
|
23862
23570
|
var n2 = r2.value;
|
|
23863
23571
|
if (n2) d(e2, n2);
|
|
23864
23572
|
else {
|
|
23865
|
-
e2.state = a, e2.outcome =
|
|
23866
|
-
for (var i2 = -1, s2 = e2.queue.length; ++i2 < s2; ) e2.queue[i2].callFulfilled(
|
|
23573
|
+
e2.state = a, e2.outcome = t2;
|
|
23574
|
+
for (var i2 = -1, s2 = e2.queue.length; ++i2 < s2; ) e2.queue[i2].callFulfilled(t2);
|
|
23867
23575
|
}
|
|
23868
23576
|
return e2;
|
|
23869
|
-
}, l.reject = function(e2,
|
|
23870
|
-
e2.state = s, e2.outcome =
|
|
23871
|
-
for (var r2 = -1, n2 = e2.queue.length; ++r2 < n2; ) e2.queue[r2].callRejected(
|
|
23577
|
+
}, l.reject = function(e2, t2) {
|
|
23578
|
+
e2.state = s, e2.outcome = t2;
|
|
23579
|
+
for (var r2 = -1, n2 = e2.queue.length; ++r2 < n2; ) e2.queue[r2].callRejected(t2);
|
|
23872
23580
|
return e2;
|
|
23873
23581
|
}, o.resolve = function(e2) {
|
|
23874
23582
|
if (e2 instanceof this) return e2;
|
|
23875
23583
|
return l.resolve(new this(u), e2);
|
|
23876
23584
|
}, o.reject = function(e2) {
|
|
23877
|
-
var
|
|
23878
|
-
return l.reject(
|
|
23585
|
+
var t2 = new this(u);
|
|
23586
|
+
return l.reject(t2, e2);
|
|
23879
23587
|
}, o.all = function(e2) {
|
|
23880
23588
|
var r2 = this;
|
|
23881
23589
|
if ("[object Array]" !== Object.prototype.toString.call(e2)) return this.reject(new TypeError("must be an array"));
|
|
23882
23590
|
var n2 = e2.length, i2 = false;
|
|
23883
23591
|
if (!n2) return this.resolve([]);
|
|
23884
|
-
var s2 = new Array(n2), a2 = 0,
|
|
23885
|
-
for (; ++
|
|
23592
|
+
var s2 = new Array(n2), a2 = 0, t2 = -1, o2 = new this(u);
|
|
23593
|
+
for (; ++t2 < n2; ) h2(e2[t2], t2);
|
|
23886
23594
|
return o2;
|
|
23887
|
-
function h2(e3,
|
|
23595
|
+
function h2(e3, t3) {
|
|
23888
23596
|
r2.resolve(e3).then(function(e4) {
|
|
23889
|
-
s2[
|
|
23597
|
+
s2[t3] = e4, ++a2 !== n2 || i2 || (i2 = true, l.resolve(o2, s2));
|
|
23890
23598
|
}, function(e4) {
|
|
23891
23599
|
i2 || (i2 = true, l.reject(o2, e4));
|
|
23892
23600
|
});
|
|
23893
23601
|
}
|
|
23894
23602
|
}, o.race = function(e2) {
|
|
23895
|
-
var
|
|
23603
|
+
var t2 = this;
|
|
23896
23604
|
if ("[object Array]" !== Object.prototype.toString.call(e2)) return this.reject(new TypeError("must be an array"));
|
|
23897
23605
|
var r2 = e2.length, n2 = false;
|
|
23898
23606
|
if (!r2) return this.resolve([]);
|
|
23899
23607
|
var i2 = -1, s2 = new this(u);
|
|
23900
|
-
for (; ++i2 < r2; ) a2 = e2[i2],
|
|
23608
|
+
for (; ++i2 < r2; ) a2 = e2[i2], t2.resolve(a2).then(function(e3) {
|
|
23901
23609
|
n2 || (n2 = true, l.resolve(s2, e3));
|
|
23902
23610
|
}, function(e3) {
|
|
23903
23611
|
n2 || (n2 = true, l.reject(s2, e3));
|
|
@@ -23905,33 +23613,33 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
23905
23613
|
var a2;
|
|
23906
23614
|
return s2;
|
|
23907
23615
|
};
|
|
23908
|
-
}, { immediate: 36 }], 38: [function(e,
|
|
23616
|
+
}, { immediate: 36 }], 38: [function(e, t, r) {
|
|
23909
23617
|
var n = {};
|
|
23910
|
-
(0, e("./lib/utils/common").assign)(n, e("./lib/deflate"), e("./lib/inflate"), e("./lib/zlib/constants")),
|
|
23911
|
-
}, { "./lib/deflate": 39, "./lib/inflate": 40, "./lib/utils/common": 41, "./lib/zlib/constants": 44 }], 39: [function(e,
|
|
23618
|
+
(0, e("./lib/utils/common").assign)(n, e("./lib/deflate"), e("./lib/inflate"), e("./lib/zlib/constants")), t.exports = n;
|
|
23619
|
+
}, { "./lib/deflate": 39, "./lib/inflate": 40, "./lib/utils/common": 41, "./lib/zlib/constants": 44 }], 39: [function(e, t, r) {
|
|
23912
23620
|
var a = e("./zlib/deflate"), o = e("./utils/common"), h = e("./utils/strings"), i = e("./zlib/messages"), s = e("./zlib/zstream"), u = Object.prototype.toString, l = 0, f = -1, c = 0, d = 8;
|
|
23913
23621
|
function p(e2) {
|
|
23914
23622
|
if (!(this instanceof p)) return new p(e2);
|
|
23915
23623
|
this.options = o.assign({ level: f, method: d, chunkSize: 16384, windowBits: 15, memLevel: 8, strategy: c, to: "" }, e2 || {});
|
|
23916
|
-
var
|
|
23917
|
-
|
|
23918
|
-
var r2 = a.deflateInit2(this.strm,
|
|
23624
|
+
var t2 = this.options;
|
|
23625
|
+
t2.raw && 0 < t2.windowBits ? t2.windowBits = -t2.windowBits : t2.gzip && 0 < t2.windowBits && t2.windowBits < 16 && (t2.windowBits += 16), this.err = 0, this.msg = "", this.ended = false, this.chunks = [], this.strm = new s(), this.strm.avail_out = 0;
|
|
23626
|
+
var r2 = a.deflateInit2(this.strm, t2.level, t2.method, t2.windowBits, t2.memLevel, t2.strategy);
|
|
23919
23627
|
if (r2 !== l) throw new Error(i[r2]);
|
|
23920
|
-
if (
|
|
23628
|
+
if (t2.header && a.deflateSetHeader(this.strm, t2.header), t2.dictionary) {
|
|
23921
23629
|
var n2;
|
|
23922
|
-
if (n2 = "string" == typeof
|
|
23630
|
+
if (n2 = "string" == typeof t2.dictionary ? h.string2buf(t2.dictionary) : "[object ArrayBuffer]" === u.call(t2.dictionary) ? new Uint8Array(t2.dictionary) : t2.dictionary, (r2 = a.deflateSetDictionary(this.strm, n2)) !== l) throw new Error(i[r2]);
|
|
23923
23631
|
this._dict_set = true;
|
|
23924
23632
|
}
|
|
23925
23633
|
}
|
|
23926
|
-
function n(e2,
|
|
23927
|
-
var r2 = new p(
|
|
23634
|
+
function n(e2, t2) {
|
|
23635
|
+
var r2 = new p(t2);
|
|
23928
23636
|
if (r2.push(e2, true), r2.err) throw r2.msg || i[r2.err];
|
|
23929
23637
|
return r2.result;
|
|
23930
23638
|
}
|
|
23931
|
-
p.prototype.push = function(e2,
|
|
23639
|
+
p.prototype.push = function(e2, t2) {
|
|
23932
23640
|
var r2, n2, i2 = this.strm, s2 = this.options.chunkSize;
|
|
23933
23641
|
if (this.ended) return false;
|
|
23934
|
-
n2 =
|
|
23642
|
+
n2 = t2 === ~~t2 ? t2 : true === t2 ? 4 : 0, "string" == typeof e2 ? i2.input = h.string2buf(e2) : "[object ArrayBuffer]" === u.call(e2) ? i2.input = new Uint8Array(e2) : i2.input = e2, i2.next_in = 0, i2.avail_in = i2.input.length;
|
|
23935
23643
|
do {
|
|
23936
23644
|
if (0 === i2.avail_out && (i2.output = new o.Buf8(s2), i2.next_out = 0, i2.avail_out = s2), 1 !== (r2 = a.deflate(i2, n2)) && r2 !== l) return this.onEnd(r2), !(this.ended = true);
|
|
23937
23645
|
0 !== i2.avail_out && (0 !== i2.avail_in || 4 !== n2 && 2 !== n2) || ("string" === this.options.to ? this.onData(h.buf2binstring(o.shrinkBuf(i2.output, i2.next_out))) : this.onData(o.shrinkBuf(i2.output, i2.next_out)));
|
|
@@ -23941,31 +23649,31 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
23941
23649
|
this.chunks.push(e2);
|
|
23942
23650
|
}, p.prototype.onEnd = function(e2) {
|
|
23943
23651
|
e2 === l && ("string" === this.options.to ? this.result = this.chunks.join("") : this.result = o.flattenChunks(this.chunks)), this.chunks = [], this.err = e2, this.msg = this.strm.msg;
|
|
23944
|
-
}, r.Deflate = p, r.deflate = n, r.deflateRaw = function(e2,
|
|
23945
|
-
return (
|
|
23946
|
-
}, r.gzip = function(e2,
|
|
23947
|
-
return (
|
|
23652
|
+
}, r.Deflate = p, r.deflate = n, r.deflateRaw = function(e2, t2) {
|
|
23653
|
+
return (t2 = t2 || {}).raw = true, n(e2, t2);
|
|
23654
|
+
}, r.gzip = function(e2, t2) {
|
|
23655
|
+
return (t2 = t2 || {}).gzip = true, n(e2, t2);
|
|
23948
23656
|
};
|
|
23949
|
-
}, { "./utils/common": 41, "./utils/strings": 42, "./zlib/deflate": 46, "./zlib/messages": 51, "./zlib/zstream": 53 }], 40: [function(e,
|
|
23657
|
+
}, { "./utils/common": 41, "./utils/strings": 42, "./zlib/deflate": 46, "./zlib/messages": 51, "./zlib/zstream": 53 }], 40: [function(e, t, r) {
|
|
23950
23658
|
var c = e("./zlib/inflate"), d = e("./utils/common"), p = e("./utils/strings"), m = e("./zlib/constants"), n = e("./zlib/messages"), i = e("./zlib/zstream"), s = e("./zlib/gzheader"), _ = Object.prototype.toString;
|
|
23951
23659
|
function a(e2) {
|
|
23952
23660
|
if (!(this instanceof a)) return new a(e2);
|
|
23953
23661
|
this.options = d.assign({ chunkSize: 16384, windowBits: 0, to: "" }, e2 || {});
|
|
23954
|
-
var
|
|
23955
|
-
|
|
23956
|
-
var r2 = c.inflateInit2(this.strm,
|
|
23662
|
+
var t2 = this.options;
|
|
23663
|
+
t2.raw && 0 <= t2.windowBits && t2.windowBits < 16 && (t2.windowBits = -t2.windowBits, 0 === t2.windowBits && (t2.windowBits = -15)), !(0 <= t2.windowBits && t2.windowBits < 16) || e2 && e2.windowBits || (t2.windowBits += 32), 15 < t2.windowBits && t2.windowBits < 48 && 0 == (15 & t2.windowBits) && (t2.windowBits |= 15), this.err = 0, this.msg = "", this.ended = false, this.chunks = [], this.strm = new i(), this.strm.avail_out = 0;
|
|
23664
|
+
var r2 = c.inflateInit2(this.strm, t2.windowBits);
|
|
23957
23665
|
if (r2 !== m.Z_OK) throw new Error(n[r2]);
|
|
23958
23666
|
this.header = new s(), c.inflateGetHeader(this.strm, this.header);
|
|
23959
23667
|
}
|
|
23960
|
-
function o(e2,
|
|
23961
|
-
var r2 = new a(
|
|
23668
|
+
function o(e2, t2) {
|
|
23669
|
+
var r2 = new a(t2);
|
|
23962
23670
|
if (r2.push(e2, true), r2.err) throw r2.msg || n[r2.err];
|
|
23963
23671
|
return r2.result;
|
|
23964
23672
|
}
|
|
23965
|
-
a.prototype.push = function(e2,
|
|
23673
|
+
a.prototype.push = function(e2, t2) {
|
|
23966
23674
|
var r2, n2, i2, s2, a2, o2, h = this.strm, u = this.options.chunkSize, l = this.options.dictionary, f = false;
|
|
23967
23675
|
if (this.ended) return false;
|
|
23968
|
-
n2 =
|
|
23676
|
+
n2 = t2 === ~~t2 ? t2 : true === t2 ? m.Z_FINISH : m.Z_NO_FLUSH, "string" == typeof e2 ? h.input = p.binstring2buf(e2) : "[object ArrayBuffer]" === _.call(e2) ? h.input = new Uint8Array(e2) : h.input = e2, h.next_in = 0, h.avail_in = h.input.length;
|
|
23969
23677
|
do {
|
|
23970
23678
|
if (0 === h.avail_out && (h.output = new d.Buf8(u), h.next_out = 0, h.avail_out = u), (r2 = c.inflate(h, m.Z_NO_FLUSH)) === m.Z_NEED_DICT && l && (o2 = "string" == typeof l ? p.string2buf(l) : "[object ArrayBuffer]" === _.call(l) ? new Uint8Array(l) : l, r2 = c.inflateSetDictionary(this.strm, o2)), r2 === m.Z_BUF_ERROR && true === f && (r2 = m.Z_OK, f = false), r2 !== m.Z_STREAM_END && r2 !== m.Z_OK) return this.onEnd(r2), !(this.ended = true);
|
|
23971
23679
|
h.next_out && (0 !== h.avail_out && r2 !== m.Z_STREAM_END && (0 !== h.avail_in || n2 !== m.Z_FINISH && n2 !== m.Z_SYNC_FLUSH) || ("string" === this.options.to ? (i2 = p.utf8border(h.output, h.next_out), s2 = h.next_out - i2, a2 = p.buf2string(h.output, i2), h.next_out = s2, h.avail_out = u - s2, s2 && d.arraySet(h.output, h.output, i2, s2, 0), this.onData(a2)) : this.onData(d.shrinkBuf(h.output, h.next_out)))), 0 === h.avail_in && 0 === h.avail_out && (f = true);
|
|
@@ -23975,40 +23683,40 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
23975
23683
|
this.chunks.push(e2);
|
|
23976
23684
|
}, a.prototype.onEnd = function(e2) {
|
|
23977
23685
|
e2 === m.Z_OK && ("string" === this.options.to ? this.result = this.chunks.join("") : this.result = d.flattenChunks(this.chunks)), this.chunks = [], this.err = e2, this.msg = this.strm.msg;
|
|
23978
|
-
}, r.Inflate = a, r.inflate = o, r.inflateRaw = function(e2,
|
|
23979
|
-
return (
|
|
23686
|
+
}, r.Inflate = a, r.inflate = o, r.inflateRaw = function(e2, t2) {
|
|
23687
|
+
return (t2 = t2 || {}).raw = true, o(e2, t2);
|
|
23980
23688
|
}, r.ungzip = o;
|
|
23981
|
-
}, { "./utils/common": 41, "./utils/strings": 42, "./zlib/constants": 44, "./zlib/gzheader": 47, "./zlib/inflate": 49, "./zlib/messages": 51, "./zlib/zstream": 53 }], 41: [function(e,
|
|
23689
|
+
}, { "./utils/common": 41, "./utils/strings": 42, "./zlib/constants": 44, "./zlib/gzheader": 47, "./zlib/inflate": 49, "./zlib/messages": 51, "./zlib/zstream": 53 }], 41: [function(e, t, r) {
|
|
23982
23690
|
var n = "undefined" != typeof Uint8Array && "undefined" != typeof Uint16Array && "undefined" != typeof Int32Array;
|
|
23983
23691
|
r.assign = function(e2) {
|
|
23984
|
-
for (var
|
|
23985
|
-
var r2 =
|
|
23692
|
+
for (var t2 = Array.prototype.slice.call(arguments, 1); t2.length; ) {
|
|
23693
|
+
var r2 = t2.shift();
|
|
23986
23694
|
if (r2) {
|
|
23987
23695
|
if ("object" != typeof r2) throw new TypeError(r2 + "must be non-object");
|
|
23988
23696
|
for (var n2 in r2) r2.hasOwnProperty(n2) && (e2[n2] = r2[n2]);
|
|
23989
23697
|
}
|
|
23990
23698
|
}
|
|
23991
23699
|
return e2;
|
|
23992
|
-
}, r.shrinkBuf = function(e2,
|
|
23993
|
-
return e2.length ===
|
|
23700
|
+
}, r.shrinkBuf = function(e2, t2) {
|
|
23701
|
+
return e2.length === t2 ? e2 : e2.subarray ? e2.subarray(0, t2) : (e2.length = t2, e2);
|
|
23994
23702
|
};
|
|
23995
|
-
var i = { arraySet: function(e2,
|
|
23996
|
-
if (
|
|
23997
|
-
else for (var s2 = 0; s2 < n2; s2++) e2[i2 + s2] =
|
|
23703
|
+
var i = { arraySet: function(e2, t2, r2, n2, i2) {
|
|
23704
|
+
if (t2.subarray && e2.subarray) e2.set(t2.subarray(r2, r2 + n2), i2);
|
|
23705
|
+
else for (var s2 = 0; s2 < n2; s2++) e2[i2 + s2] = t2[r2 + s2];
|
|
23998
23706
|
}, flattenChunks: function(e2) {
|
|
23999
|
-
var
|
|
24000
|
-
for (
|
|
24001
|
-
for (a = new Uint8Array(n2),
|
|
23707
|
+
var t2, r2, n2, i2, s2, a;
|
|
23708
|
+
for (t2 = n2 = 0, r2 = e2.length; t2 < r2; t2++) n2 += e2[t2].length;
|
|
23709
|
+
for (a = new Uint8Array(n2), t2 = i2 = 0, r2 = e2.length; t2 < r2; t2++) s2 = e2[t2], a.set(s2, i2), i2 += s2.length;
|
|
24002
23710
|
return a;
|
|
24003
|
-
} }, s = { arraySet: function(e2,
|
|
24004
|
-
for (var s2 = 0; s2 < n2; s2++) e2[i2 + s2] =
|
|
23711
|
+
} }, s = { arraySet: function(e2, t2, r2, n2, i2) {
|
|
23712
|
+
for (var s2 = 0; s2 < n2; s2++) e2[i2 + s2] = t2[r2 + s2];
|
|
24005
23713
|
}, flattenChunks: function(e2) {
|
|
24006
23714
|
return [].concat.apply([], e2);
|
|
24007
23715
|
} };
|
|
24008
23716
|
r.setTyped = function(e2) {
|
|
24009
23717
|
e2 ? (r.Buf8 = Uint8Array, r.Buf16 = Uint16Array, r.Buf32 = Int32Array, r.assign(r, i)) : (r.Buf8 = Array, r.Buf16 = Array, r.Buf32 = Array, r.assign(r, s));
|
|
24010
23718
|
}, r.setTyped(n);
|
|
24011
|
-
}, {}], 42: [function(e,
|
|
23719
|
+
}, {}], 42: [function(e, t, r) {
|
|
24012
23720
|
var h = e("./common"), i = true, s = true;
|
|
24013
23721
|
try {
|
|
24014
23722
|
String.fromCharCode.apply(null, [0]);
|
|
@@ -24021,23 +23729,23 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
24021
23729
|
s = false;
|
|
24022
23730
|
}
|
|
24023
23731
|
for (var u = new h.Buf8(256), n = 0; n < 256; n++) u[n] = 252 <= n ? 6 : 248 <= n ? 5 : 240 <= n ? 4 : 224 <= n ? 3 : 192 <= n ? 2 : 1;
|
|
24024
|
-
function l(e2,
|
|
24025
|
-
if (
|
|
24026
|
-
for (var r2 = "", n2 = 0; n2 <
|
|
23732
|
+
function l(e2, t2) {
|
|
23733
|
+
if (t2 < 65537 && (e2.subarray && s || !e2.subarray && i)) return String.fromCharCode.apply(null, h.shrinkBuf(e2, t2));
|
|
23734
|
+
for (var r2 = "", n2 = 0; n2 < t2; n2++) r2 += String.fromCharCode(e2[n2]);
|
|
24027
23735
|
return r2;
|
|
24028
23736
|
}
|
|
24029
23737
|
u[254] = u[254] = 1, r.string2buf = function(e2) {
|
|
24030
|
-
var
|
|
23738
|
+
var t2, r2, n2, i2, s2, a = e2.length, o = 0;
|
|
24031
23739
|
for (i2 = 0; i2 < a; i2++) 55296 == (64512 & (r2 = e2.charCodeAt(i2))) && i2 + 1 < a && 56320 == (64512 & (n2 = e2.charCodeAt(i2 + 1))) && (r2 = 65536 + (r2 - 55296 << 10) + (n2 - 56320), i2++), o += r2 < 128 ? 1 : r2 < 2048 ? 2 : r2 < 65536 ? 3 : 4;
|
|
24032
|
-
for (
|
|
24033
|
-
return
|
|
23740
|
+
for (t2 = new h.Buf8(o), i2 = s2 = 0; s2 < o; i2++) 55296 == (64512 & (r2 = e2.charCodeAt(i2))) && i2 + 1 < a && 56320 == (64512 & (n2 = e2.charCodeAt(i2 + 1))) && (r2 = 65536 + (r2 - 55296 << 10) + (n2 - 56320), i2++), r2 < 128 ? t2[s2++] = r2 : (r2 < 2048 ? t2[s2++] = 192 | r2 >>> 6 : (r2 < 65536 ? t2[s2++] = 224 | r2 >>> 12 : (t2[s2++] = 240 | r2 >>> 18, t2[s2++] = 128 | r2 >>> 12 & 63), t2[s2++] = 128 | r2 >>> 6 & 63), t2[s2++] = 128 | 63 & r2);
|
|
23741
|
+
return t2;
|
|
24034
23742
|
}, r.buf2binstring = function(e2) {
|
|
24035
23743
|
return l(e2, e2.length);
|
|
24036
23744
|
}, r.binstring2buf = function(e2) {
|
|
24037
|
-
for (var
|
|
24038
|
-
return
|
|
24039
|
-
}, r.buf2string = function(e2,
|
|
24040
|
-
var r2, n2, i2, s2, a =
|
|
23745
|
+
for (var t2 = new h.Buf8(e2.length), r2 = 0, n2 = t2.length; r2 < n2; r2++) t2[r2] = e2.charCodeAt(r2);
|
|
23746
|
+
return t2;
|
|
23747
|
+
}, r.buf2string = function(e2, t2) {
|
|
23748
|
+
var r2, n2, i2, s2, a = t2 || e2.length, o = new Array(2 * a);
|
|
24041
23749
|
for (r2 = n2 = 0; r2 < a; ) if ((i2 = e2[r2++]) < 128) o[n2++] = i2;
|
|
24042
23750
|
else if (4 < (s2 = u[i2])) o[n2++] = 65533, r2 += s2 - 1;
|
|
24043
23751
|
else {
|
|
@@ -24045,92 +23753,92 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
24045
23753
|
1 < s2 ? o[n2++] = 65533 : i2 < 65536 ? o[n2++] = i2 : (i2 -= 65536, o[n2++] = 55296 | i2 >> 10 & 1023, o[n2++] = 56320 | 1023 & i2);
|
|
24046
23754
|
}
|
|
24047
23755
|
return l(o, n2);
|
|
24048
|
-
}, r.utf8border = function(e2,
|
|
23756
|
+
}, r.utf8border = function(e2, t2) {
|
|
24049
23757
|
var r2;
|
|
24050
|
-
for ((
|
|
24051
|
-
return r2 < 0 ?
|
|
23758
|
+
for ((t2 = t2 || e2.length) > e2.length && (t2 = e2.length), r2 = t2 - 1; 0 <= r2 && 128 == (192 & e2[r2]); ) r2--;
|
|
23759
|
+
return r2 < 0 ? t2 : 0 === r2 ? t2 : r2 + u[e2[r2]] > t2 ? r2 : t2;
|
|
24052
23760
|
};
|
|
24053
|
-
}, { "./common": 41 }], 43: [function(e,
|
|
24054
|
-
|
|
23761
|
+
}, { "./common": 41 }], 43: [function(e, t, r) {
|
|
23762
|
+
t.exports = function(e2, t2, r2, n) {
|
|
24055
23763
|
for (var i = 65535 & e2 | 0, s = e2 >>> 16 & 65535 | 0, a = 0; 0 !== r2; ) {
|
|
24056
|
-
for (r2 -= a = 2e3 < r2 ? 2e3 : r2; s = s + (i = i +
|
|
23764
|
+
for (r2 -= a = 2e3 < r2 ? 2e3 : r2; s = s + (i = i + t2[n++] | 0) | 0, --a; ) ;
|
|
24057
23765
|
i %= 65521, s %= 65521;
|
|
24058
23766
|
}
|
|
24059
23767
|
return i | s << 16 | 0;
|
|
24060
23768
|
};
|
|
24061
|
-
}, {}], 44: [function(e,
|
|
24062
|
-
|
|
24063
|
-
}, {}], 45: [function(e,
|
|
23769
|
+
}, {}], 44: [function(e, t, r) {
|
|
23770
|
+
t.exports = { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_TREES: 6, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_BUF_ERROR: -5, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, Z_BINARY: 0, Z_TEXT: 1, Z_UNKNOWN: 2, Z_DEFLATED: 8 };
|
|
23771
|
+
}, {}], 45: [function(e, t, r) {
|
|
24064
23772
|
var o = function() {
|
|
24065
|
-
for (var e2,
|
|
23773
|
+
for (var e2, t2 = [], r2 = 0; r2 < 256; r2++) {
|
|
24066
23774
|
e2 = r2;
|
|
24067
23775
|
for (var n = 0; n < 8; n++) e2 = 1 & e2 ? 3988292384 ^ e2 >>> 1 : e2 >>> 1;
|
|
24068
|
-
|
|
23776
|
+
t2[r2] = e2;
|
|
24069
23777
|
}
|
|
24070
|
-
return
|
|
23778
|
+
return t2;
|
|
24071
23779
|
}();
|
|
24072
|
-
|
|
23780
|
+
t.exports = function(e2, t2, r2, n) {
|
|
24073
23781
|
var i = o, s = n + r2;
|
|
24074
23782
|
e2 ^= -1;
|
|
24075
|
-
for (var a = n; a < s; a++) e2 = e2 >>> 8 ^ i[255 & (e2 ^
|
|
23783
|
+
for (var a = n; a < s; a++) e2 = e2 >>> 8 ^ i[255 & (e2 ^ t2[a])];
|
|
24076
23784
|
return -1 ^ e2;
|
|
24077
23785
|
};
|
|
24078
|
-
}, {}], 46: [function(e,
|
|
23786
|
+
}, {}], 46: [function(e, t, r) {
|
|
24079
23787
|
var h, c = e("../utils/common"), u = e("./trees"), d = e("./adler32"), p = e("./crc32"), n = e("./messages"), l = 0, f = 4, m = 0, _ = -2, g2 = -1, b = 4, i = 2, v = 8, y = 9, s = 286, a = 30, o = 19, w = 2 * s + 1, k = 15, x = 3, S2 = 258, z = S2 + x + 1, C = 42, E = 113, A = 1, I = 2, O = 3, B = 4;
|
|
24080
|
-
function R(e2,
|
|
24081
|
-
return e2.msg = n[
|
|
23788
|
+
function R(e2, t2) {
|
|
23789
|
+
return e2.msg = n[t2], t2;
|
|
24082
23790
|
}
|
|
24083
23791
|
function T(e2) {
|
|
24084
23792
|
return (e2 << 1) - (4 < e2 ? 9 : 0);
|
|
24085
23793
|
}
|
|
24086
23794
|
function D(e2) {
|
|
24087
|
-
for (var
|
|
23795
|
+
for (var t2 = e2.length; 0 <= --t2; ) e2[t2] = 0;
|
|
24088
23796
|
}
|
|
24089
23797
|
function F(e2) {
|
|
24090
|
-
var
|
|
24091
|
-
r2 > e2.avail_out && (r2 = e2.avail_out), 0 !== r2 && (c.arraySet(e2.output,
|
|
23798
|
+
var t2 = e2.state, r2 = t2.pending;
|
|
23799
|
+
r2 > e2.avail_out && (r2 = e2.avail_out), 0 !== r2 && (c.arraySet(e2.output, t2.pending_buf, t2.pending_out, r2, e2.next_out), e2.next_out += r2, t2.pending_out += r2, e2.total_out += r2, e2.avail_out -= r2, t2.pending -= r2, 0 === t2.pending && (t2.pending_out = 0));
|
|
24092
23800
|
}
|
|
24093
|
-
function N(e2,
|
|
24094
|
-
u._tr_flush_block(e2, 0 <= e2.block_start ? e2.block_start : -1, e2.strstart - e2.block_start,
|
|
23801
|
+
function N(e2, t2) {
|
|
23802
|
+
u._tr_flush_block(e2, 0 <= e2.block_start ? e2.block_start : -1, e2.strstart - e2.block_start, t2), e2.block_start = e2.strstart, F(e2.strm);
|
|
24095
23803
|
}
|
|
24096
|
-
function U(e2,
|
|
24097
|
-
e2.pending_buf[e2.pending++] =
|
|
23804
|
+
function U(e2, t2) {
|
|
23805
|
+
e2.pending_buf[e2.pending++] = t2;
|
|
24098
23806
|
}
|
|
24099
|
-
function P(e2,
|
|
24100
|
-
e2.pending_buf[e2.pending++] =
|
|
23807
|
+
function P(e2, t2) {
|
|
23808
|
+
e2.pending_buf[e2.pending++] = t2 >>> 8 & 255, e2.pending_buf[e2.pending++] = 255 & t2;
|
|
24101
23809
|
}
|
|
24102
|
-
function L(e2,
|
|
23810
|
+
function L(e2, t2) {
|
|
24103
23811
|
var r2, n2, i2 = e2.max_chain_length, s2 = e2.strstart, a2 = e2.prev_length, o2 = e2.nice_match, h2 = e2.strstart > e2.w_size - z ? e2.strstart - (e2.w_size - z) : 0, u2 = e2.window, l2 = e2.w_mask, f2 = e2.prev, c2 = e2.strstart + S2, d2 = u2[s2 + a2 - 1], p2 = u2[s2 + a2];
|
|
24104
23812
|
e2.prev_length >= e2.good_match && (i2 >>= 2), o2 > e2.lookahead && (o2 = e2.lookahead);
|
|
24105
23813
|
do {
|
|
24106
|
-
if (u2[(r2 =
|
|
23814
|
+
if (u2[(r2 = t2) + a2] === p2 && u2[r2 + a2 - 1] === d2 && u2[r2] === u2[s2] && u2[++r2] === u2[s2 + 1]) {
|
|
24107
23815
|
s2 += 2, r2++;
|
|
24108
23816
|
do {
|
|
24109
23817
|
} while (u2[++s2] === u2[++r2] && u2[++s2] === u2[++r2] && u2[++s2] === u2[++r2] && u2[++s2] === u2[++r2] && u2[++s2] === u2[++r2] && u2[++s2] === u2[++r2] && u2[++s2] === u2[++r2] && u2[++s2] === u2[++r2] && s2 < c2);
|
|
24110
23818
|
if (n2 = S2 - (c2 - s2), s2 = c2 - S2, a2 < n2) {
|
|
24111
|
-
if (e2.match_start =
|
|
23819
|
+
if (e2.match_start = t2, o2 <= (a2 = n2)) break;
|
|
24112
23820
|
d2 = u2[s2 + a2 - 1], p2 = u2[s2 + a2];
|
|
24113
23821
|
}
|
|
24114
23822
|
}
|
|
24115
|
-
} while ((
|
|
23823
|
+
} while ((t2 = f2[t2 & l2]) > h2 && 0 != --i2);
|
|
24116
23824
|
return a2 <= e2.lookahead ? a2 : e2.lookahead;
|
|
24117
23825
|
}
|
|
24118
23826
|
function j(e2) {
|
|
24119
|
-
var
|
|
23827
|
+
var t2, r2, n2, i2, s2, a2, o2, h2, u2, l2, f2 = e2.w_size;
|
|
24120
23828
|
do {
|
|
24121
23829
|
if (i2 = e2.window_size - e2.lookahead - e2.strstart, e2.strstart >= f2 + (f2 - z)) {
|
|
24122
|
-
for (c.arraySet(e2.window, e2.window, f2, f2, 0), e2.match_start -= f2, e2.strstart -= f2, e2.block_start -= f2,
|
|
24123
|
-
for (
|
|
23830
|
+
for (c.arraySet(e2.window, e2.window, f2, f2, 0), e2.match_start -= f2, e2.strstart -= f2, e2.block_start -= f2, t2 = r2 = e2.hash_size; n2 = e2.head[--t2], e2.head[t2] = f2 <= n2 ? n2 - f2 : 0, --r2; ) ;
|
|
23831
|
+
for (t2 = r2 = f2; n2 = e2.prev[--t2], e2.prev[t2] = f2 <= n2 ? n2 - f2 : 0, --r2; ) ;
|
|
24124
23832
|
i2 += f2;
|
|
24125
23833
|
}
|
|
24126
23834
|
if (0 === e2.strm.avail_in) break;
|
|
24127
23835
|
if (a2 = e2.strm, o2 = e2.window, h2 = e2.strstart + e2.lookahead, u2 = i2, l2 = void 0, l2 = a2.avail_in, u2 < l2 && (l2 = u2), r2 = 0 === l2 ? 0 : (a2.avail_in -= l2, c.arraySet(o2, a2.input, a2.next_in, l2, h2), 1 === a2.state.wrap ? a2.adler = d(a2.adler, o2, l2, h2) : 2 === a2.state.wrap && (a2.adler = p(a2.adler, o2, l2, h2)), a2.next_in += l2, a2.total_in += l2, l2), e2.lookahead += r2, e2.lookahead + e2.insert >= x) for (s2 = e2.strstart - e2.insert, e2.ins_h = e2.window[s2], e2.ins_h = (e2.ins_h << e2.hash_shift ^ e2.window[s2 + 1]) & e2.hash_mask; e2.insert && (e2.ins_h = (e2.ins_h << e2.hash_shift ^ e2.window[s2 + x - 1]) & e2.hash_mask, e2.prev[s2 & e2.w_mask] = e2.head[e2.ins_h], e2.head[e2.ins_h] = s2, s2++, e2.insert--, !(e2.lookahead + e2.insert < x)); ) ;
|
|
24128
23836
|
} while (e2.lookahead < z && 0 !== e2.strm.avail_in);
|
|
24129
23837
|
}
|
|
24130
|
-
function Z(e2,
|
|
23838
|
+
function Z(e2, t2) {
|
|
24131
23839
|
for (var r2, n2; ; ) {
|
|
24132
23840
|
if (e2.lookahead < z) {
|
|
24133
|
-
if (j(e2), e2.lookahead < z &&
|
|
23841
|
+
if (j(e2), e2.lookahead < z && t2 === l) return A;
|
|
24134
23842
|
if (0 === e2.lookahead) break;
|
|
24135
23843
|
}
|
|
24136
23844
|
if (r2 = 0, e2.lookahead >= x && (e2.ins_h = (e2.ins_h << e2.hash_shift ^ e2.window[e2.strstart + x - 1]) & e2.hash_mask, r2 = e2.prev[e2.strstart & e2.w_mask] = e2.head[e2.ins_h], e2.head[e2.ins_h] = e2.strstart), 0 !== r2 && e2.strstart - r2 <= e2.w_size - z && (e2.match_length = L(e2, r2)), e2.match_length >= x) if (n2 = u._tr_tally(e2, e2.strstart - e2.match_start, e2.match_length - x), e2.lookahead -= e2.match_length, e2.match_length <= e2.max_lazy_match && e2.lookahead >= x) {
|
|
@@ -24140,12 +23848,12 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
24140
23848
|
else n2 = u._tr_tally(e2, 0, e2.window[e2.strstart]), e2.lookahead--, e2.strstart++;
|
|
24141
23849
|
if (n2 && (N(e2, false), 0 === e2.strm.avail_out)) return A;
|
|
24142
23850
|
}
|
|
24143
|
-
return e2.insert = e2.strstart < x - 1 ? e2.strstart : x - 1,
|
|
23851
|
+
return e2.insert = e2.strstart < x - 1 ? e2.strstart : x - 1, t2 === f ? (N(e2, true), 0 === e2.strm.avail_out ? O : B) : e2.last_lit && (N(e2, false), 0 === e2.strm.avail_out) ? A : I;
|
|
24144
23852
|
}
|
|
24145
|
-
function W(e2,
|
|
23853
|
+
function W(e2, t2) {
|
|
24146
23854
|
for (var r2, n2, i2; ; ) {
|
|
24147
23855
|
if (e2.lookahead < z) {
|
|
24148
|
-
if (j(e2), e2.lookahead < z &&
|
|
23856
|
+
if (j(e2), e2.lookahead < z && t2 === l) return A;
|
|
24149
23857
|
if (0 === e2.lookahead) break;
|
|
24150
23858
|
}
|
|
24151
23859
|
if (r2 = 0, e2.lookahead >= x && (e2.ins_h = (e2.ins_h << e2.hash_shift ^ e2.window[e2.strstart + x - 1]) & e2.hash_mask, r2 = e2.prev[e2.strstart & e2.w_mask] = e2.head[e2.ins_h], e2.head[e2.ins_h] = e2.strstart), e2.prev_length = e2.match_length, e2.prev_match = e2.match_start, e2.match_length = x - 1, 0 !== r2 && e2.prev_length < e2.max_lazy_match && e2.strstart - r2 <= e2.w_size - z && (e2.match_length = L(e2, r2), e2.match_length <= 5 && (1 === e2.strategy || e2.match_length === x && 4096 < e2.strstart - e2.match_start) && (e2.match_length = x - 1)), e2.prev_length >= x && e2.match_length <= e2.prev_length) {
|
|
@@ -24155,37 +23863,37 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
24155
23863
|
if ((n2 = u._tr_tally(e2, 0, e2.window[e2.strstart - 1])) && N(e2, false), e2.strstart++, e2.lookahead--, 0 === e2.strm.avail_out) return A;
|
|
24156
23864
|
} else e2.match_available = 1, e2.strstart++, e2.lookahead--;
|
|
24157
23865
|
}
|
|
24158
|
-
return e2.match_available && (n2 = u._tr_tally(e2, 0, e2.window[e2.strstart - 1]), e2.match_available = 0), e2.insert = e2.strstart < x - 1 ? e2.strstart : x - 1,
|
|
23866
|
+
return e2.match_available && (n2 = u._tr_tally(e2, 0, e2.window[e2.strstart - 1]), e2.match_available = 0), e2.insert = e2.strstart < x - 1 ? e2.strstart : x - 1, t2 === f ? (N(e2, true), 0 === e2.strm.avail_out ? O : B) : e2.last_lit && (N(e2, false), 0 === e2.strm.avail_out) ? A : I;
|
|
24159
23867
|
}
|
|
24160
|
-
function M(e2,
|
|
24161
|
-
this.good_length = e2, this.max_lazy =
|
|
23868
|
+
function M(e2, t2, r2, n2, i2) {
|
|
23869
|
+
this.good_length = e2, this.max_lazy = t2, this.nice_length = r2, this.max_chain = n2, this.func = i2;
|
|
24162
23870
|
}
|
|
24163
23871
|
function H() {
|
|
24164
23872
|
this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = v, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new c.Buf16(2 * w), this.dyn_dtree = new c.Buf16(2 * (2 * a + 1)), this.bl_tree = new c.Buf16(2 * (2 * o + 1)), D(this.dyn_ltree), D(this.dyn_dtree), D(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new c.Buf16(k + 1), this.heap = new c.Buf16(2 * s + 1), D(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new c.Buf16(2 * s + 1), D(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;
|
|
24165
23873
|
}
|
|
24166
23874
|
function G(e2) {
|
|
24167
|
-
var
|
|
24168
|
-
return e2 && e2.state ? (e2.total_in = e2.total_out = 0, e2.data_type = i, (
|
|
23875
|
+
var t2;
|
|
23876
|
+
return e2 && e2.state ? (e2.total_in = e2.total_out = 0, e2.data_type = i, (t2 = e2.state).pending = 0, t2.pending_out = 0, t2.wrap < 0 && (t2.wrap = -t2.wrap), t2.status = t2.wrap ? C : E, e2.adler = 2 === t2.wrap ? 0 : 1, t2.last_flush = l, u._tr_init(t2), m) : R(e2, _);
|
|
24169
23877
|
}
|
|
24170
23878
|
function K(e2) {
|
|
24171
|
-
var
|
|
24172
|
-
return
|
|
23879
|
+
var t2 = G(e2);
|
|
23880
|
+
return t2 === m && function(e3) {
|
|
24173
23881
|
e3.window_size = 2 * e3.w_size, D(e3.head), e3.max_lazy_match = h[e3.level].max_lazy, e3.good_match = h[e3.level].good_length, e3.nice_match = h[e3.level].nice_length, e3.max_chain_length = h[e3.level].max_chain, e3.strstart = 0, e3.block_start = 0, e3.lookahead = 0, e3.insert = 0, e3.match_length = e3.prev_length = x - 1, e3.match_available = 0, e3.ins_h = 0;
|
|
24174
|
-
}(e2.state),
|
|
23882
|
+
}(e2.state), t2;
|
|
24175
23883
|
}
|
|
24176
|
-
function Y(e2,
|
|
23884
|
+
function Y(e2, t2, r2, n2, i2, s2) {
|
|
24177
23885
|
if (!e2) return _;
|
|
24178
23886
|
var a2 = 1;
|
|
24179
|
-
if (
|
|
23887
|
+
if (t2 === g2 && (t2 = 6), n2 < 0 ? (a2 = 0, n2 = -n2) : 15 < n2 && (a2 = 2, n2 -= 16), i2 < 1 || y < i2 || r2 !== v || n2 < 8 || 15 < n2 || t2 < 0 || 9 < t2 || s2 < 0 || b < s2) return R(e2, _);
|
|
24180
23888
|
8 === n2 && (n2 = 9);
|
|
24181
23889
|
var o2 = new H();
|
|
24182
|
-
return (e2.state = o2).strm = e2, o2.wrap = a2, o2.gzhead = null, o2.w_bits = n2, o2.w_size = 1 << o2.w_bits, o2.w_mask = o2.w_size - 1, o2.hash_bits = i2 + 7, o2.hash_size = 1 << o2.hash_bits, o2.hash_mask = o2.hash_size - 1, o2.hash_shift = ~~((o2.hash_bits + x - 1) / x), o2.window = new c.Buf8(2 * o2.w_size), o2.head = new c.Buf16(o2.hash_size), o2.prev = new c.Buf16(o2.w_size), o2.lit_bufsize = 1 << i2 + 6, o2.pending_buf_size = 4 * o2.lit_bufsize, o2.pending_buf = new c.Buf8(o2.pending_buf_size), o2.d_buf = 1 * o2.lit_bufsize, o2.l_buf = 3 * o2.lit_bufsize, o2.level =
|
|
23890
|
+
return (e2.state = o2).strm = e2, o2.wrap = a2, o2.gzhead = null, o2.w_bits = n2, o2.w_size = 1 << o2.w_bits, o2.w_mask = o2.w_size - 1, o2.hash_bits = i2 + 7, o2.hash_size = 1 << o2.hash_bits, o2.hash_mask = o2.hash_size - 1, o2.hash_shift = ~~((o2.hash_bits + x - 1) / x), o2.window = new c.Buf8(2 * o2.w_size), o2.head = new c.Buf16(o2.hash_size), o2.prev = new c.Buf16(o2.w_size), o2.lit_bufsize = 1 << i2 + 6, o2.pending_buf_size = 4 * o2.lit_bufsize, o2.pending_buf = new c.Buf8(o2.pending_buf_size), o2.d_buf = 1 * o2.lit_bufsize, o2.l_buf = 3 * o2.lit_bufsize, o2.level = t2, o2.strategy = s2, o2.method = r2, K(e2);
|
|
24183
23891
|
}
|
|
24184
|
-
h = [new M(0, 0, 0, 0, function(e2,
|
|
23892
|
+
h = [new M(0, 0, 0, 0, function(e2, t2) {
|
|
24185
23893
|
var r2 = 65535;
|
|
24186
23894
|
for (r2 > e2.pending_buf_size - 5 && (r2 = e2.pending_buf_size - 5); ; ) {
|
|
24187
23895
|
if (e2.lookahead <= 1) {
|
|
24188
|
-
if (j(e2), 0 === e2.lookahead &&
|
|
23896
|
+
if (j(e2), 0 === e2.lookahead && t2 === l) return A;
|
|
24189
23897
|
if (0 === e2.lookahead) break;
|
|
24190
23898
|
}
|
|
24191
23899
|
e2.strstart += e2.lookahead, e2.lookahead = 0;
|
|
@@ -24193,16 +23901,16 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
24193
23901
|
if ((0 === e2.strstart || e2.strstart >= n2) && (e2.lookahead = e2.strstart - n2, e2.strstart = n2, N(e2, false), 0 === e2.strm.avail_out)) return A;
|
|
24194
23902
|
if (e2.strstart - e2.block_start >= e2.w_size - z && (N(e2, false), 0 === e2.strm.avail_out)) return A;
|
|
24195
23903
|
}
|
|
24196
|
-
return e2.insert = 0,
|
|
24197
|
-
}), new M(4, 4, 8, 4, Z), new M(4, 5, 16, 8, Z), new M(4, 6, 32, 32, Z), new M(4, 4, 16, 16, W), new M(8, 16, 32, 32, W), new M(8, 16, 128, 128, W), new M(8, 32, 128, 256, W), new M(32, 128, 258, 1024, W), new M(32, 258, 258, 4096, W)], r.deflateInit = function(e2,
|
|
24198
|
-
return Y(e2,
|
|
24199
|
-
}, r.deflateInit2 = Y, r.deflateReset = K, r.deflateResetKeep = G, r.deflateSetHeader = function(e2,
|
|
24200
|
-
return e2 && e2.state ? 2 !== e2.state.wrap ? _ : (e2.state.gzhead =
|
|
24201
|
-
}, r.deflate = function(e2,
|
|
23904
|
+
return e2.insert = 0, t2 === f ? (N(e2, true), 0 === e2.strm.avail_out ? O : B) : (e2.strstart > e2.block_start && (N(e2, false), e2.strm.avail_out), A);
|
|
23905
|
+
}), new M(4, 4, 8, 4, Z), new M(4, 5, 16, 8, Z), new M(4, 6, 32, 32, Z), new M(4, 4, 16, 16, W), new M(8, 16, 32, 32, W), new M(8, 16, 128, 128, W), new M(8, 32, 128, 256, W), new M(32, 128, 258, 1024, W), new M(32, 258, 258, 4096, W)], r.deflateInit = function(e2, t2) {
|
|
23906
|
+
return Y(e2, t2, v, 15, 8, 0);
|
|
23907
|
+
}, r.deflateInit2 = Y, r.deflateReset = K, r.deflateResetKeep = G, r.deflateSetHeader = function(e2, t2) {
|
|
23908
|
+
return e2 && e2.state ? 2 !== e2.state.wrap ? _ : (e2.state.gzhead = t2, m) : _;
|
|
23909
|
+
}, r.deflate = function(e2, t2) {
|
|
24202
23910
|
var r2, n2, i2, s2;
|
|
24203
|
-
if (!e2 || !e2.state || 5 <
|
|
24204
|
-
if (n2 = e2.state, !e2.output || !e2.input && 0 !== e2.avail_in || 666 === n2.status &&
|
|
24205
|
-
if (n2.strm = e2, r2 = n2.last_flush, n2.last_flush =
|
|
23911
|
+
if (!e2 || !e2.state || 5 < t2 || t2 < 0) return e2 ? R(e2, _) : _;
|
|
23912
|
+
if (n2 = e2.state, !e2.output || !e2.input && 0 !== e2.avail_in || 666 === n2.status && t2 !== f) return R(e2, 0 === e2.avail_out ? -5 : _);
|
|
23913
|
+
if (n2.strm = e2, r2 = n2.last_flush, n2.last_flush = t2, n2.status === C) if (2 === n2.wrap) e2.adler = 0, U(n2, 31), U(n2, 139), U(n2, 8), n2.gzhead ? (U(n2, (n2.gzhead.text ? 1 : 0) + (n2.gzhead.hcrc ? 2 : 0) + (n2.gzhead.extra ? 4 : 0) + (n2.gzhead.name ? 8 : 0) + (n2.gzhead.comment ? 16 : 0)), U(n2, 255 & n2.gzhead.time), U(n2, n2.gzhead.time >> 8 & 255), U(n2, n2.gzhead.time >> 16 & 255), U(n2, n2.gzhead.time >> 24 & 255), U(n2, 9 === n2.level ? 2 : 2 <= n2.strategy || n2.level < 2 ? 4 : 0), U(n2, 255 & n2.gzhead.os), n2.gzhead.extra && n2.gzhead.extra.length && (U(n2, 255 & n2.gzhead.extra.length), U(n2, n2.gzhead.extra.length >> 8 & 255)), n2.gzhead.hcrc && (e2.adler = p(e2.adler, n2.pending_buf, n2.pending, 0)), n2.gzindex = 0, n2.status = 69) : (U(n2, 0), U(n2, 0), U(n2, 0), U(n2, 0), U(n2, 0), U(n2, 9 === n2.level ? 2 : 2 <= n2.strategy || n2.level < 2 ? 4 : 0), U(n2, 3), n2.status = E);
|
|
24206
23914
|
else {
|
|
24207
23915
|
var a2 = v + (n2.w_bits - 8 << 4) << 8;
|
|
24208
23916
|
a2 |= (2 <= n2.strategy || n2.level < 2 ? 0 : n2.level < 6 ? 1 : 6 === n2.level ? 2 : 3) << 6, 0 !== n2.strstart && (a2 |= 32), a2 += 31 - a2 % 31, n2.status = E, P(n2, a2), 0 !== n2.strstart && (P(n2, e2.adler >>> 16), P(n2, 65535 & e2.adler)), e2.adler = 1;
|
|
@@ -24235,22 +23943,22 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
24235
23943
|
} else n2.status = 103;
|
|
24236
23944
|
if (103 === n2.status && (n2.gzhead.hcrc ? (n2.pending + 2 > n2.pending_buf_size && F(e2), n2.pending + 2 <= n2.pending_buf_size && (U(n2, 255 & e2.adler), U(n2, e2.adler >> 8 & 255), e2.adler = 0, n2.status = E)) : n2.status = E), 0 !== n2.pending) {
|
|
24237
23945
|
if (F(e2), 0 === e2.avail_out) return n2.last_flush = -1, m;
|
|
24238
|
-
} else if (0 === e2.avail_in && T(
|
|
23946
|
+
} else if (0 === e2.avail_in && T(t2) <= T(r2) && t2 !== f) return R(e2, -5);
|
|
24239
23947
|
if (666 === n2.status && 0 !== e2.avail_in) return R(e2, -5);
|
|
24240
|
-
if (0 !== e2.avail_in || 0 !== n2.lookahead ||
|
|
24241
|
-
var o2 = 2 === n2.strategy ? function(e3,
|
|
23948
|
+
if (0 !== e2.avail_in || 0 !== n2.lookahead || t2 !== l && 666 !== n2.status) {
|
|
23949
|
+
var o2 = 2 === n2.strategy ? function(e3, t3) {
|
|
24242
23950
|
for (var r3; ; ) {
|
|
24243
23951
|
if (0 === e3.lookahead && (j(e3), 0 === e3.lookahead)) {
|
|
24244
|
-
if (
|
|
23952
|
+
if (t3 === l) return A;
|
|
24245
23953
|
break;
|
|
24246
23954
|
}
|
|
24247
23955
|
if (e3.match_length = 0, r3 = u._tr_tally(e3, 0, e3.window[e3.strstart]), e3.lookahead--, e3.strstart++, r3 && (N(e3, false), 0 === e3.strm.avail_out)) return A;
|
|
24248
23956
|
}
|
|
24249
|
-
return e3.insert = 0,
|
|
24250
|
-
}(n2,
|
|
23957
|
+
return e3.insert = 0, t3 === f ? (N(e3, true), 0 === e3.strm.avail_out ? O : B) : e3.last_lit && (N(e3, false), 0 === e3.strm.avail_out) ? A : I;
|
|
23958
|
+
}(n2, t2) : 3 === n2.strategy ? function(e3, t3) {
|
|
24251
23959
|
for (var r3, n3, i3, s3, a3 = e3.window; ; ) {
|
|
24252
23960
|
if (e3.lookahead <= S2) {
|
|
24253
|
-
if (j(e3), e3.lookahead <= S2 &&
|
|
23961
|
+
if (j(e3), e3.lookahead <= S2 && t3 === l) return A;
|
|
24254
23962
|
if (0 === e3.lookahead) break;
|
|
24255
23963
|
}
|
|
24256
23964
|
if (e3.match_length = 0, e3.lookahead >= x && 0 < e3.strstart && (n3 = a3[i3 = e3.strstart - 1]) === a3[++i3] && n3 === a3[++i3] && n3 === a3[++i3]) {
|
|
@@ -24261,33 +23969,33 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
24261
23969
|
}
|
|
24262
23970
|
if (e3.match_length >= x ? (r3 = u._tr_tally(e3, 1, e3.match_length - x), e3.lookahead -= e3.match_length, e3.strstart += e3.match_length, e3.match_length = 0) : (r3 = u._tr_tally(e3, 0, e3.window[e3.strstart]), e3.lookahead--, e3.strstart++), r3 && (N(e3, false), 0 === e3.strm.avail_out)) return A;
|
|
24263
23971
|
}
|
|
24264
|
-
return e3.insert = 0,
|
|
24265
|
-
}(n2,
|
|
23972
|
+
return e3.insert = 0, t3 === f ? (N(e3, true), 0 === e3.strm.avail_out ? O : B) : e3.last_lit && (N(e3, false), 0 === e3.strm.avail_out) ? A : I;
|
|
23973
|
+
}(n2, t2) : h[n2.level].func(n2, t2);
|
|
24266
23974
|
if (o2 !== O && o2 !== B || (n2.status = 666), o2 === A || o2 === O) return 0 === e2.avail_out && (n2.last_flush = -1), m;
|
|
24267
|
-
if (o2 === I && (1 ===
|
|
23975
|
+
if (o2 === I && (1 === t2 ? u._tr_align(n2) : 5 !== t2 && (u._tr_stored_block(n2, 0, 0, false), 3 === t2 && (D(n2.head), 0 === n2.lookahead && (n2.strstart = 0, n2.block_start = 0, n2.insert = 0))), F(e2), 0 === e2.avail_out)) return n2.last_flush = -1, m;
|
|
24268
23976
|
}
|
|
24269
|
-
return
|
|
23977
|
+
return t2 !== f ? m : n2.wrap <= 0 ? 1 : (2 === n2.wrap ? (U(n2, 255 & e2.adler), U(n2, e2.adler >> 8 & 255), U(n2, e2.adler >> 16 & 255), U(n2, e2.adler >> 24 & 255), U(n2, 255 & e2.total_in), U(n2, e2.total_in >> 8 & 255), U(n2, e2.total_in >> 16 & 255), U(n2, e2.total_in >> 24 & 255)) : (P(n2, e2.adler >>> 16), P(n2, 65535 & e2.adler)), F(e2), 0 < n2.wrap && (n2.wrap = -n2.wrap), 0 !== n2.pending ? m : 1);
|
|
24270
23978
|
}, r.deflateEnd = function(e2) {
|
|
24271
|
-
var
|
|
24272
|
-
return e2 && e2.state ? (
|
|
24273
|
-
}, r.deflateSetDictionary = function(e2,
|
|
24274
|
-
var r2, n2, i2, s2, a2, o2, h2, u2, l2 =
|
|
23979
|
+
var t2;
|
|
23980
|
+
return e2 && e2.state ? (t2 = e2.state.status) !== C && 69 !== t2 && 73 !== t2 && 91 !== t2 && 103 !== t2 && t2 !== E && 666 !== t2 ? R(e2, _) : (e2.state = null, t2 === E ? R(e2, -3) : m) : _;
|
|
23981
|
+
}, r.deflateSetDictionary = function(e2, t2) {
|
|
23982
|
+
var r2, n2, i2, s2, a2, o2, h2, u2, l2 = t2.length;
|
|
24275
23983
|
if (!e2 || !e2.state) return _;
|
|
24276
23984
|
if (2 === (s2 = (r2 = e2.state).wrap) || 1 === s2 && r2.status !== C || r2.lookahead) return _;
|
|
24277
|
-
for (1 === s2 && (e2.adler = d(e2.adler,
|
|
23985
|
+
for (1 === s2 && (e2.adler = d(e2.adler, t2, l2, 0)), r2.wrap = 0, l2 >= r2.w_size && (0 === s2 && (D(r2.head), r2.strstart = 0, r2.block_start = 0, r2.insert = 0), u2 = new c.Buf8(r2.w_size), c.arraySet(u2, t2, l2 - r2.w_size, r2.w_size, 0), t2 = u2, l2 = r2.w_size), a2 = e2.avail_in, o2 = e2.next_in, h2 = e2.input, e2.avail_in = l2, e2.next_in = 0, e2.input = t2, j(r2); r2.lookahead >= x; ) {
|
|
24278
23986
|
for (n2 = r2.strstart, i2 = r2.lookahead - (x - 1); r2.ins_h = (r2.ins_h << r2.hash_shift ^ r2.window[n2 + x - 1]) & r2.hash_mask, r2.prev[n2 & r2.w_mask] = r2.head[r2.ins_h], r2.head[r2.ins_h] = n2, n2++, --i2; ) ;
|
|
24279
23987
|
r2.strstart = n2, r2.lookahead = x - 1, j(r2);
|
|
24280
23988
|
}
|
|
24281
23989
|
return r2.strstart += r2.lookahead, r2.block_start = r2.strstart, r2.insert = r2.lookahead, r2.lookahead = 0, r2.match_length = r2.prev_length = x - 1, r2.match_available = 0, e2.next_in = o2, e2.input = h2, e2.avail_in = a2, r2.wrap = s2, m;
|
|
24282
23990
|
}, r.deflateInfo = "pako deflate (from Nodeca project)";
|
|
24283
|
-
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./messages": 51, "./trees": 52 }], 47: [function(e,
|
|
24284
|
-
|
|
23991
|
+
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./messages": 51, "./trees": 52 }], 47: [function(e, t, r) {
|
|
23992
|
+
t.exports = function() {
|
|
24285
23993
|
this.text = 0, this.time = 0, this.xflags = 0, this.os = 0, this.extra = null, this.extra_len = 0, this.name = "", this.comment = "", this.hcrc = 0, this.done = false;
|
|
24286
23994
|
};
|
|
24287
|
-
}, {}], 48: [function(e,
|
|
24288
|
-
|
|
23995
|
+
}, {}], 48: [function(e, t, r) {
|
|
23996
|
+
t.exports = function(e2, t2) {
|
|
24289
23997
|
var r2, n, i, s, a, o, h, u, l, f, c, d, p, m, _, g2, b, v, y, w, k, x, S2, z, C;
|
|
24290
|
-
r2 = e2.state, n = e2.next_in, z = e2.input, i = n + (e2.avail_in - 5), s = e2.next_out, C = e2.output, a = s - (
|
|
23998
|
+
r2 = e2.state, n = e2.next_in, z = e2.input, i = n + (e2.avail_in - 5), s = e2.next_out, C = e2.output, a = s - (t2 - e2.avail_out), o = s + (e2.avail_out - 257), h = r2.dmax, u = r2.wsize, l = r2.whave, f = r2.wnext, c = r2.window, d = r2.hold, p = r2.bits, m = r2.lencode, _ = r2.distcode, g2 = (1 << r2.lenbits) - 1, b = (1 << r2.distbits) - 1;
|
|
24291
23999
|
e: do {
|
|
24292
24000
|
p < 15 && (d += z[n++] << p, p += 8, d += z[n++] << p, p += 8), v = m[d & g2];
|
|
24293
24001
|
t: for (; ; ) {
|
|
@@ -24355,7 +24063,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
24355
24063
|
} while (n < i && s < o);
|
|
24356
24064
|
n -= w = p >> 3, d &= (1 << (p -= w << 3)) - 1, e2.next_in = n, e2.next_out = s, e2.avail_in = n < i ? i - n + 5 : 5 - (n - i), e2.avail_out = s < o ? o - s + 257 : 257 - (s - o), r2.hold = d, r2.bits = p;
|
|
24357
24065
|
};
|
|
24358
|
-
}, {}], 49: [function(e,
|
|
24066
|
+
}, {}], 49: [function(e, t, r) {
|
|
24359
24067
|
var I = e("../utils/common"), O = e("./adler32"), B = e("./crc32"), R = e("./inffast"), T = e("./inftrees"), D = 1, F = 2, N = 0, U = -2, P = 1, n = 852, i = 592;
|
|
24360
24068
|
function L(e2) {
|
|
24361
24069
|
return (e2 >>> 24 & 255) + (e2 >>> 8 & 65280) + ((65280 & e2) << 8) + ((255 & e2) << 24);
|
|
@@ -24364,41 +24072,41 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
24364
24072
|
this.mode = 0, this.last = false, this.wrap = 0, this.havedict = false, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new I.Buf16(320), this.work = new I.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;
|
|
24365
24073
|
}
|
|
24366
24074
|
function a(e2) {
|
|
24367
|
-
var
|
|
24368
|
-
return e2 && e2.state ? (
|
|
24075
|
+
var t2;
|
|
24076
|
+
return e2 && e2.state ? (t2 = e2.state, e2.total_in = e2.total_out = t2.total = 0, e2.msg = "", t2.wrap && (e2.adler = 1 & t2.wrap), t2.mode = P, t2.last = 0, t2.havedict = 0, t2.dmax = 32768, t2.head = null, t2.hold = 0, t2.bits = 0, t2.lencode = t2.lendyn = new I.Buf32(n), t2.distcode = t2.distdyn = new I.Buf32(i), t2.sane = 1, t2.back = -1, N) : U;
|
|
24369
24077
|
}
|
|
24370
24078
|
function o(e2) {
|
|
24371
|
-
var
|
|
24372
|
-
return e2 && e2.state ? ((
|
|
24079
|
+
var t2;
|
|
24080
|
+
return e2 && e2.state ? ((t2 = e2.state).wsize = 0, t2.whave = 0, t2.wnext = 0, a(e2)) : U;
|
|
24373
24081
|
}
|
|
24374
|
-
function h(e2,
|
|
24082
|
+
function h(e2, t2) {
|
|
24375
24083
|
var r2, n2;
|
|
24376
|
-
return e2 && e2.state ? (n2 = e2.state,
|
|
24084
|
+
return e2 && e2.state ? (n2 = e2.state, t2 < 0 ? (r2 = 0, t2 = -t2) : (r2 = 1 + (t2 >> 4), t2 < 48 && (t2 &= 15)), t2 && (t2 < 8 || 15 < t2) ? U : (null !== n2.window && n2.wbits !== t2 && (n2.window = null), n2.wrap = r2, n2.wbits = t2, o(e2))) : U;
|
|
24377
24085
|
}
|
|
24378
|
-
function u(e2,
|
|
24086
|
+
function u(e2, t2) {
|
|
24379
24087
|
var r2, n2;
|
|
24380
|
-
return e2 ? (n2 = new s(), (e2.state = n2).window = null, (r2 = h(e2,
|
|
24088
|
+
return e2 ? (n2 = new s(), (e2.state = n2).window = null, (r2 = h(e2, t2)) !== N && (e2.state = null), r2) : U;
|
|
24381
24089
|
}
|
|
24382
24090
|
var l, f, c = true;
|
|
24383
24091
|
function j(e2) {
|
|
24384
24092
|
if (c) {
|
|
24385
|
-
var
|
|
24386
|
-
for (l = new I.Buf32(512), f = new I.Buf32(32),
|
|
24387
|
-
for (;
|
|
24388
|
-
for (;
|
|
24389
|
-
for (;
|
|
24390
|
-
for (T(D, e2.lens, 0, 288, l, 0, e2.work, { bits: 9 }),
|
|
24093
|
+
var t2;
|
|
24094
|
+
for (l = new I.Buf32(512), f = new I.Buf32(32), t2 = 0; t2 < 144; ) e2.lens[t2++] = 8;
|
|
24095
|
+
for (; t2 < 256; ) e2.lens[t2++] = 9;
|
|
24096
|
+
for (; t2 < 280; ) e2.lens[t2++] = 7;
|
|
24097
|
+
for (; t2 < 288; ) e2.lens[t2++] = 8;
|
|
24098
|
+
for (T(D, e2.lens, 0, 288, l, 0, e2.work, { bits: 9 }), t2 = 0; t2 < 32; ) e2.lens[t2++] = 5;
|
|
24391
24099
|
T(F, e2.lens, 0, 32, f, 0, e2.work, { bits: 5 }), c = false;
|
|
24392
24100
|
}
|
|
24393
24101
|
e2.lencode = l, e2.lenbits = 9, e2.distcode = f, e2.distbits = 5;
|
|
24394
24102
|
}
|
|
24395
|
-
function Z(e2,
|
|
24103
|
+
function Z(e2, t2, r2, n2) {
|
|
24396
24104
|
var i2, s2 = e2.state;
|
|
24397
|
-
return null === s2.window && (s2.wsize = 1 << s2.wbits, s2.wnext = 0, s2.whave = 0, s2.window = new I.Buf8(s2.wsize)), n2 >= s2.wsize ? (I.arraySet(s2.window,
|
|
24105
|
+
return null === s2.window && (s2.wsize = 1 << s2.wbits, s2.wnext = 0, s2.whave = 0, s2.window = new I.Buf8(s2.wsize)), n2 >= s2.wsize ? (I.arraySet(s2.window, t2, r2 - s2.wsize, s2.wsize, 0), s2.wnext = 0, s2.whave = s2.wsize) : (n2 < (i2 = s2.wsize - s2.wnext) && (i2 = n2), I.arraySet(s2.window, t2, r2 - n2, i2, s2.wnext), (n2 -= i2) ? (I.arraySet(s2.window, t2, r2 - n2, n2, 0), s2.wnext = n2, s2.whave = s2.wsize) : (s2.wnext += i2, s2.wnext === s2.wsize && (s2.wnext = 0), s2.whave < s2.wsize && (s2.whave += i2))), 0;
|
|
24398
24106
|
}
|
|
24399
24107
|
r.inflateReset = o, r.inflateReset2 = h, r.inflateResetKeep = a, r.inflateInit = function(e2) {
|
|
24400
24108
|
return u(e2, 15);
|
|
24401
|
-
}, r.inflateInit2 = u, r.inflate = function(e2,
|
|
24109
|
+
}, r.inflateInit2 = u, r.inflate = function(e2, t2) {
|
|
24402
24110
|
var r2, n2, i2, s2, a2, o2, h2, u2, l2, f2, c2, d, p, m, _, g2, b, v, y, w, k, x, S2, z, C = 0, E = new I.Buf8(4), A = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
|
|
24403
24111
|
if (!e2 || !e2.state || !e2.output || !e2.input && 0 !== e2.avail_in) return U;
|
|
24404
24112
|
12 === (r2 = e2.state).mode && (r2.mode = 13), a2 = e2.next_out, i2 = e2.output, h2 = e2.avail_out, s2 = e2.next_in, n2 = e2.input, o2 = e2.avail_in, u2 = r2.hold, l2 = r2.bits, f2 = o2, c2 = h2, x = N;
|
|
@@ -24507,7 +24215,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
24507
24215
|
if (0 === r2.havedict) return e2.next_out = a2, e2.avail_out = h2, e2.next_in = s2, e2.avail_in = o2, r2.hold = u2, r2.bits = l2, 2;
|
|
24508
24216
|
e2.adler = r2.check = 1, r2.mode = 12;
|
|
24509
24217
|
case 12:
|
|
24510
|
-
if (5 ===
|
|
24218
|
+
if (5 === t2 || 6 === t2) break e;
|
|
24511
24219
|
case 13:
|
|
24512
24220
|
if (r2.last) {
|
|
24513
24221
|
u2 >>>= 7 & l2, l2 -= 7 & l2, r2.mode = 27;
|
|
@@ -24522,7 +24230,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
24522
24230
|
r2.mode = 14;
|
|
24523
24231
|
break;
|
|
24524
24232
|
case 1:
|
|
24525
|
-
if (j(r2), r2.mode = 20, 6 !==
|
|
24233
|
+
if (j(r2), r2.mode = 20, 6 !== t2) break;
|
|
24526
24234
|
u2 >>>= 2, l2 -= 2;
|
|
24527
24235
|
break e;
|
|
24528
24236
|
case 2:
|
|
@@ -24542,7 +24250,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
24542
24250
|
e2.msg = "invalid stored block lengths", r2.mode = 30;
|
|
24543
24251
|
break;
|
|
24544
24252
|
}
|
|
24545
|
-
if (r2.length = 65535 & u2, l2 = u2 = 0, r2.mode = 15, 6 ===
|
|
24253
|
+
if (r2.length = 65535 & u2, l2 = u2 = 0, r2.mode = 15, 6 === t2) break e;
|
|
24546
24254
|
case 15:
|
|
24547
24255
|
r2.mode = 16;
|
|
24548
24256
|
case 16:
|
|
@@ -24628,7 +24336,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
24628
24336
|
e2.msg = "invalid distances set", r2.mode = 30;
|
|
24629
24337
|
break;
|
|
24630
24338
|
}
|
|
24631
|
-
if (r2.mode = 20, 6 ===
|
|
24339
|
+
if (r2.mode = 20, 6 === t2) break e;
|
|
24632
24340
|
case 20:
|
|
24633
24341
|
r2.mode = 21;
|
|
24634
24342
|
case 21:
|
|
@@ -24753,38 +24461,38 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
24753
24461
|
default:
|
|
24754
24462
|
return U;
|
|
24755
24463
|
}
|
|
24756
|
-
return e2.next_out = a2, e2.avail_out = h2, e2.next_in = s2, e2.avail_in = o2, r2.hold = u2, r2.bits = l2, (r2.wsize || c2 !== e2.avail_out && r2.mode < 30 && (r2.mode < 27 || 4 !==
|
|
24464
|
+
return e2.next_out = a2, e2.avail_out = h2, e2.next_in = s2, e2.avail_in = o2, r2.hold = u2, r2.bits = l2, (r2.wsize || c2 !== e2.avail_out && r2.mode < 30 && (r2.mode < 27 || 4 !== t2)) && Z(e2, e2.output, e2.next_out, c2 - e2.avail_out) ? (r2.mode = 31, -4) : (f2 -= e2.avail_in, c2 -= e2.avail_out, e2.total_in += f2, e2.total_out += c2, r2.total += c2, r2.wrap && c2 && (e2.adler = r2.check = r2.flags ? B(r2.check, i2, c2, e2.next_out - c2) : O(r2.check, i2, c2, e2.next_out - c2)), e2.data_type = r2.bits + (r2.last ? 64 : 0) + (12 === r2.mode ? 128 : 0) + (20 === r2.mode || 15 === r2.mode ? 256 : 0), (0 == f2 && 0 === c2 || 4 === t2) && x === N && (x = -5), x);
|
|
24757
24465
|
}, r.inflateEnd = function(e2) {
|
|
24758
24466
|
if (!e2 || !e2.state) return U;
|
|
24759
|
-
var
|
|
24760
|
-
return
|
|
24761
|
-
}, r.inflateGetHeader = function(e2,
|
|
24467
|
+
var t2 = e2.state;
|
|
24468
|
+
return t2.window && (t2.window = null), e2.state = null, N;
|
|
24469
|
+
}, r.inflateGetHeader = function(e2, t2) {
|
|
24762
24470
|
var r2;
|
|
24763
|
-
return e2 && e2.state ? 0 == (2 & (r2 = e2.state).wrap) ? U : ((r2.head =
|
|
24764
|
-
}, r.inflateSetDictionary = function(e2,
|
|
24765
|
-
var r2, n2 =
|
|
24766
|
-
return e2 && e2.state ? 0 !== (r2 = e2.state).wrap && 11 !== r2.mode ? U : 11 === r2.mode && O(1,
|
|
24471
|
+
return e2 && e2.state ? 0 == (2 & (r2 = e2.state).wrap) ? U : ((r2.head = t2).done = false, N) : U;
|
|
24472
|
+
}, r.inflateSetDictionary = function(e2, t2) {
|
|
24473
|
+
var r2, n2 = t2.length;
|
|
24474
|
+
return e2 && e2.state ? 0 !== (r2 = e2.state).wrap && 11 !== r2.mode ? U : 11 === r2.mode && O(1, t2, n2, 0) !== r2.check ? -3 : Z(e2, t2, n2, n2) ? (r2.mode = 31, -4) : (r2.havedict = 1, N) : U;
|
|
24767
24475
|
}, r.inflateInfo = "pako inflate (from Nodeca project)";
|
|
24768
|
-
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./inffast": 48, "./inftrees": 50 }], 50: [function(e,
|
|
24476
|
+
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./inffast": 48, "./inftrees": 50 }], 50: [function(e, t, r) {
|
|
24769
24477
|
var D = e("../utils/common"), F = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0], N = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78], U = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0], P = [16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64];
|
|
24770
|
-
|
|
24478
|
+
t.exports = function(e2, t2, r2, n, i, s, a, o) {
|
|
24771
24479
|
var h, u, l, f, c, d, p, m, _, g2 = o.bits, b = 0, v = 0, y = 0, w = 0, k = 0, x = 0, S2 = 0, z = 0, C = 0, E = 0, A = null, I = 0, O = new D.Buf16(16), B = new D.Buf16(16), R = null, T = 0;
|
|
24772
24480
|
for (b = 0; b <= 15; b++) O[b] = 0;
|
|
24773
|
-
for (v = 0; v < n; v++) O[
|
|
24481
|
+
for (v = 0; v < n; v++) O[t2[r2 + v]]++;
|
|
24774
24482
|
for (k = g2, w = 15; 1 <= w && 0 === O[w]; w--) ;
|
|
24775
24483
|
if (w < k && (k = w), 0 === w) return i[s++] = 20971520, i[s++] = 20971520, o.bits = 1, 0;
|
|
24776
24484
|
for (y = 1; y < w && 0 === O[y]; y++) ;
|
|
24777
24485
|
for (k < y && (k = y), b = z = 1; b <= 15; b++) if (z <<= 1, (z -= O[b]) < 0) return -1;
|
|
24778
24486
|
if (0 < z && (0 === e2 || 1 !== w)) return -1;
|
|
24779
24487
|
for (B[1] = 0, b = 1; b < 15; b++) B[b + 1] = B[b] + O[b];
|
|
24780
|
-
for (v = 0; v < n; v++) 0 !==
|
|
24488
|
+
for (v = 0; v < n; v++) 0 !== t2[r2 + v] && (a[B[t2[r2 + v]]++] = v);
|
|
24781
24489
|
if (d = 0 === e2 ? (A = R = a, 19) : 1 === e2 ? (A = F, I -= 257, R = N, T -= 257, 256) : (A = U, R = P, -1), b = y, c = s, S2 = v = E = 0, l = -1, f = (C = 1 << (x = k)) - 1, 1 === e2 && 852 < C || 2 === e2 && 592 < C) return 1;
|
|
24782
24490
|
for (; ; ) {
|
|
24783
24491
|
for (p = b - S2, _ = a[v] < d ? (m = 0, a[v]) : a[v] > d ? (m = R[T + a[v]], A[I + a[v]]) : (m = 96, 0), h = 1 << b - S2, y = u = 1 << x; i[c + (E >> S2) + (u -= h)] = p << 24 | m << 16 | _ | 0, 0 !== u; ) ;
|
|
24784
24492
|
for (h = 1 << b - 1; E & h; ) h >>= 1;
|
|
24785
24493
|
if (0 !== h ? (E &= h - 1, E += h) : E = 0, v++, 0 == --O[b]) {
|
|
24786
24494
|
if (b === w) break;
|
|
24787
|
-
b =
|
|
24495
|
+
b = t2[r2 + a[v]];
|
|
24788
24496
|
}
|
|
24789
24497
|
if (k < b && (E & f) !== l) {
|
|
24790
24498
|
for (0 === S2 && (S2 = k), c += y, z = 1 << (x = b - S2); x + S2 < w && !((z -= O[x + S2]) <= 0); ) x++, z <<= 1;
|
|
@@ -24794,12 +24502,12 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
24794
24502
|
}
|
|
24795
24503
|
return 0 !== E && (i[c + E] = b - S2 << 24 | 64 << 16 | 0), o.bits = k, 0;
|
|
24796
24504
|
};
|
|
24797
|
-
}, { "../utils/common": 41 }], 51: [function(e,
|
|
24798
|
-
|
|
24799
|
-
}, {}], 52: [function(e,
|
|
24505
|
+
}, { "../utils/common": 41 }], 51: [function(e, t, r) {
|
|
24506
|
+
t.exports = { 2: "need dictionary", 1: "stream end", 0: "", "-1": "file error", "-2": "stream error", "-3": "data error", "-4": "insufficient memory", "-5": "buffer error", "-6": "incompatible version" };
|
|
24507
|
+
}, {}], 52: [function(e, t, r) {
|
|
24800
24508
|
var i = e("../utils/common"), o = 0, h = 1;
|
|
24801
24509
|
function n(e2) {
|
|
24802
|
-
for (var
|
|
24510
|
+
for (var t2 = e2.length; 0 <= --t2; ) e2[t2] = 0;
|
|
24803
24511
|
}
|
|
24804
24512
|
var s = 0, a = 29, u = 256, l = u + 1 + a, f = 30, c = 19, _ = 2 * l + 1, g2 = 15, d = 16, p = 7, m = 256, b = 16, v = 17, y = 18, w = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], k = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13], x = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], S2 = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], z = new Array(2 * (l + 2));
|
|
24805
24513
|
n(z);
|
|
@@ -24812,67 +24520,67 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
24812
24520
|
var I = new Array(a);
|
|
24813
24521
|
n(I);
|
|
24814
24522
|
var O, B, R, T = new Array(f);
|
|
24815
|
-
function D(e2,
|
|
24816
|
-
this.static_tree = e2, this.extra_bits =
|
|
24523
|
+
function D(e2, t2, r2, n2, i2) {
|
|
24524
|
+
this.static_tree = e2, this.extra_bits = t2, this.extra_base = r2, this.elems = n2, this.max_length = i2, this.has_stree = e2 && e2.length;
|
|
24817
24525
|
}
|
|
24818
|
-
function F(e2,
|
|
24819
|
-
this.dyn_tree = e2, this.max_code = 0, this.stat_desc =
|
|
24526
|
+
function F(e2, t2) {
|
|
24527
|
+
this.dyn_tree = e2, this.max_code = 0, this.stat_desc = t2;
|
|
24820
24528
|
}
|
|
24821
24529
|
function N(e2) {
|
|
24822
24530
|
return e2 < 256 ? E[e2] : E[256 + (e2 >>> 7)];
|
|
24823
24531
|
}
|
|
24824
|
-
function U(e2,
|
|
24825
|
-
e2.pending_buf[e2.pending++] = 255 &
|
|
24532
|
+
function U(e2, t2) {
|
|
24533
|
+
e2.pending_buf[e2.pending++] = 255 & t2, e2.pending_buf[e2.pending++] = t2 >>> 8 & 255;
|
|
24826
24534
|
}
|
|
24827
|
-
function P(e2,
|
|
24828
|
-
e2.bi_valid > d - r2 ? (e2.bi_buf |=
|
|
24535
|
+
function P(e2, t2, r2) {
|
|
24536
|
+
e2.bi_valid > d - r2 ? (e2.bi_buf |= t2 << e2.bi_valid & 65535, U(e2, e2.bi_buf), e2.bi_buf = t2 >> d - e2.bi_valid, e2.bi_valid += r2 - d) : (e2.bi_buf |= t2 << e2.bi_valid & 65535, e2.bi_valid += r2);
|
|
24829
24537
|
}
|
|
24830
|
-
function L(e2,
|
|
24831
|
-
P(e2, r2[2 *
|
|
24538
|
+
function L(e2, t2, r2) {
|
|
24539
|
+
P(e2, r2[2 * t2], r2[2 * t2 + 1]);
|
|
24832
24540
|
}
|
|
24833
|
-
function j(e2,
|
|
24834
|
-
for (var r2 = 0; r2 |= 1 & e2, e2 >>>= 1, r2 <<= 1, 0 < --
|
|
24541
|
+
function j(e2, t2) {
|
|
24542
|
+
for (var r2 = 0; r2 |= 1 & e2, e2 >>>= 1, r2 <<= 1, 0 < --t2; ) ;
|
|
24835
24543
|
return r2 >>> 1;
|
|
24836
24544
|
}
|
|
24837
|
-
function Z(e2,
|
|
24545
|
+
function Z(e2, t2, r2) {
|
|
24838
24546
|
var n2, i2, s2 = new Array(g2 + 1), a2 = 0;
|
|
24839
24547
|
for (n2 = 1; n2 <= g2; n2++) s2[n2] = a2 = a2 + r2[n2 - 1] << 1;
|
|
24840
|
-
for (i2 = 0; i2 <=
|
|
24548
|
+
for (i2 = 0; i2 <= t2; i2++) {
|
|
24841
24549
|
var o2 = e2[2 * i2 + 1];
|
|
24842
24550
|
0 !== o2 && (e2[2 * i2] = j(s2[o2]++, o2));
|
|
24843
24551
|
}
|
|
24844
24552
|
}
|
|
24845
24553
|
function W(e2) {
|
|
24846
|
-
var
|
|
24847
|
-
for (
|
|
24848
|
-
for (
|
|
24849
|
-
for (
|
|
24554
|
+
var t2;
|
|
24555
|
+
for (t2 = 0; t2 < l; t2++) e2.dyn_ltree[2 * t2] = 0;
|
|
24556
|
+
for (t2 = 0; t2 < f; t2++) e2.dyn_dtree[2 * t2] = 0;
|
|
24557
|
+
for (t2 = 0; t2 < c; t2++) e2.bl_tree[2 * t2] = 0;
|
|
24850
24558
|
e2.dyn_ltree[2 * m] = 1, e2.opt_len = e2.static_len = 0, e2.last_lit = e2.matches = 0;
|
|
24851
24559
|
}
|
|
24852
24560
|
function M(e2) {
|
|
24853
24561
|
8 < e2.bi_valid ? U(e2, e2.bi_buf) : 0 < e2.bi_valid && (e2.pending_buf[e2.pending++] = e2.bi_buf), e2.bi_buf = 0, e2.bi_valid = 0;
|
|
24854
24562
|
}
|
|
24855
|
-
function H(e2,
|
|
24856
|
-
var i2 = 2 *
|
|
24857
|
-
return e2[i2] < e2[s2] || e2[i2] === e2[s2] && n2[
|
|
24563
|
+
function H(e2, t2, r2, n2) {
|
|
24564
|
+
var i2 = 2 * t2, s2 = 2 * r2;
|
|
24565
|
+
return e2[i2] < e2[s2] || e2[i2] === e2[s2] && n2[t2] <= n2[r2];
|
|
24858
24566
|
}
|
|
24859
|
-
function G(e2,
|
|
24860
|
-
for (var n2 = e2.heap[r2], i2 = r2 << 1; i2 <= e2.heap_len && (i2 < e2.heap_len && H(
|
|
24567
|
+
function G(e2, t2, r2) {
|
|
24568
|
+
for (var n2 = e2.heap[r2], i2 = r2 << 1; i2 <= e2.heap_len && (i2 < e2.heap_len && H(t2, e2.heap[i2 + 1], e2.heap[i2], e2.depth) && i2++, !H(t2, n2, e2.heap[i2], e2.depth)); ) e2.heap[r2] = e2.heap[i2], r2 = i2, i2 <<= 1;
|
|
24861
24569
|
e2.heap[r2] = n2;
|
|
24862
24570
|
}
|
|
24863
|
-
function K(e2,
|
|
24571
|
+
function K(e2, t2, r2) {
|
|
24864
24572
|
var n2, i2, s2, a2, o2 = 0;
|
|
24865
|
-
if (0 !== e2.last_lit) for (; n2 = e2.pending_buf[e2.d_buf + 2 * o2] << 8 | e2.pending_buf[e2.d_buf + 2 * o2 + 1], i2 = e2.pending_buf[e2.l_buf + o2], o2++, 0 === n2 ? L(e2, i2,
|
|
24866
|
-
L(e2, m,
|
|
24573
|
+
if (0 !== e2.last_lit) for (; n2 = e2.pending_buf[e2.d_buf + 2 * o2] << 8 | e2.pending_buf[e2.d_buf + 2 * o2 + 1], i2 = e2.pending_buf[e2.l_buf + o2], o2++, 0 === n2 ? L(e2, i2, t2) : (L(e2, (s2 = A[i2]) + u + 1, t2), 0 !== (a2 = w[s2]) && P(e2, i2 -= I[s2], a2), L(e2, s2 = N(--n2), r2), 0 !== (a2 = k[s2]) && P(e2, n2 -= T[s2], a2)), o2 < e2.last_lit; ) ;
|
|
24574
|
+
L(e2, m, t2);
|
|
24867
24575
|
}
|
|
24868
|
-
function Y(e2,
|
|
24869
|
-
var r2, n2, i2, s2 =
|
|
24576
|
+
function Y(e2, t2) {
|
|
24577
|
+
var r2, n2, i2, s2 = t2.dyn_tree, a2 = t2.stat_desc.static_tree, o2 = t2.stat_desc.has_stree, h2 = t2.stat_desc.elems, u2 = -1;
|
|
24870
24578
|
for (e2.heap_len = 0, e2.heap_max = _, r2 = 0; r2 < h2; r2++) 0 !== s2[2 * r2] ? (e2.heap[++e2.heap_len] = u2 = r2, e2.depth[r2] = 0) : s2[2 * r2 + 1] = 0;
|
|
24871
24579
|
for (; e2.heap_len < 2; ) s2[2 * (i2 = e2.heap[++e2.heap_len] = u2 < 2 ? ++u2 : 0)] = 1, e2.depth[i2] = 0, e2.opt_len--, o2 && (e2.static_len -= a2[2 * i2 + 1]);
|
|
24872
|
-
for (
|
|
24580
|
+
for (t2.max_code = u2, r2 = e2.heap_len >> 1; 1 <= r2; r2--) G(e2, s2, r2);
|
|
24873
24581
|
for (i2 = h2; r2 = e2.heap[1], e2.heap[1] = e2.heap[e2.heap_len--], G(e2, s2, 1), n2 = e2.heap[1], e2.heap[--e2.heap_max] = r2, e2.heap[--e2.heap_max] = n2, s2[2 * i2] = s2[2 * r2] + s2[2 * n2], e2.depth[i2] = (e2.depth[r2] >= e2.depth[n2] ? e2.depth[r2] : e2.depth[n2]) + 1, s2[2 * r2 + 1] = s2[2 * n2 + 1] = i2, e2.heap[1] = i2++, G(e2, s2, 1), 2 <= e2.heap_len; ) ;
|
|
24874
|
-
e2.heap[--e2.heap_max] = e2.heap[1], function(e3,
|
|
24875
|
-
var r3, n3, i3, s3, a3, o3, h3 =
|
|
24582
|
+
e2.heap[--e2.heap_max] = e2.heap[1], function(e3, t3) {
|
|
24583
|
+
var r3, n3, i3, s3, a3, o3, h3 = t3.dyn_tree, u3 = t3.max_code, l2 = t3.stat_desc.static_tree, f2 = t3.stat_desc.has_stree, c2 = t3.stat_desc.extra_bits, d2 = t3.stat_desc.extra_base, p2 = t3.stat_desc.max_length, m2 = 0;
|
|
24876
24584
|
for (s3 = 0; s3 <= g2; s3++) e3.bl_count[s3] = 0;
|
|
24877
24585
|
for (h3[2 * e3.heap[e3.heap_max] + 1] = 0, r3 = e3.heap_max + 1; r3 < _; r3++) p2 < (s3 = h3[2 * h3[2 * (n3 = e3.heap[r3]) + 1] + 1] + 1) && (s3 = p2, m2++), h3[2 * n3 + 1] = s3, u3 < n3 || (e3.bl_count[s3]++, a3 = 0, d2 <= n3 && (a3 = c2[n3 - d2]), o3 = h3[2 * n3], e3.opt_len += o3 * (s3 + a3), f2 && (e3.static_len += o3 * (l2[2 * n3 + 1] + a3)));
|
|
24878
24586
|
if (0 !== m2) {
|
|
@@ -24882,15 +24590,15 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
24882
24590
|
} while (0 < m2);
|
|
24883
24591
|
for (s3 = p2; 0 !== s3; s3--) for (n3 = e3.bl_count[s3]; 0 !== n3; ) u3 < (i3 = e3.heap[--r3]) || (h3[2 * i3 + 1] !== s3 && (e3.opt_len += (s3 - h3[2 * i3 + 1]) * h3[2 * i3], h3[2 * i3 + 1] = s3), n3--);
|
|
24884
24592
|
}
|
|
24885
|
-
}(e2,
|
|
24593
|
+
}(e2, t2), Z(s2, u2, e2.bl_count);
|
|
24886
24594
|
}
|
|
24887
|
-
function X(e2,
|
|
24888
|
-
var n2, i2, s2 = -1, a2 =
|
|
24889
|
-
for (0 === a2 && (h2 = 138, u2 = 3),
|
|
24595
|
+
function X(e2, t2, r2) {
|
|
24596
|
+
var n2, i2, s2 = -1, a2 = t2[1], o2 = 0, h2 = 7, u2 = 4;
|
|
24597
|
+
for (0 === a2 && (h2 = 138, u2 = 3), t2[2 * (r2 + 1) + 1] = 65535, n2 = 0; n2 <= r2; n2++) i2 = a2, a2 = t2[2 * (n2 + 1) + 1], ++o2 < h2 && i2 === a2 || (o2 < u2 ? e2.bl_tree[2 * i2] += o2 : 0 !== i2 ? (i2 !== s2 && e2.bl_tree[2 * i2]++, e2.bl_tree[2 * b]++) : o2 <= 10 ? e2.bl_tree[2 * v]++ : e2.bl_tree[2 * y]++, s2 = i2, u2 = (o2 = 0) === a2 ? (h2 = 138, 3) : i2 === a2 ? (h2 = 6, 3) : (h2 = 7, 4));
|
|
24890
24598
|
}
|
|
24891
|
-
function V(e2,
|
|
24892
|
-
var n2, i2, s2 = -1, a2 =
|
|
24893
|
-
for (0 === a2 && (h2 = 138, u2 = 3), n2 = 0; n2 <= r2; n2++) if (i2 = a2, a2 =
|
|
24599
|
+
function V(e2, t2, r2) {
|
|
24600
|
+
var n2, i2, s2 = -1, a2 = t2[1], o2 = 0, h2 = 7, u2 = 4;
|
|
24601
|
+
for (0 === a2 && (h2 = 138, u2 = 3), n2 = 0; n2 <= r2; n2++) if (i2 = a2, a2 = t2[2 * (n2 + 1) + 1], !(++o2 < h2 && i2 === a2)) {
|
|
24894
24602
|
if (o2 < u2) for (; L(e2, i2, e2.bl_tree), 0 != --o2; ) ;
|
|
24895
24603
|
else 0 !== i2 ? (i2 !== s2 && (L(e2, i2, e2.bl_tree), o2--), L(e2, b, e2.bl_tree), P(e2, o2 - 3, 2)) : o2 <= 10 ? (L(e2, v, e2.bl_tree), P(e2, o2 - 3, 3)) : (L(e2, y, e2.bl_tree), P(e2, o2 - 11, 7));
|
|
24896
24604
|
s2 = i2, u2 = (o2 = 0) === a2 ? (h2 = 138, 3) : i2 === a2 ? (h2 = 6, 3) : (h2 = 7, 4);
|
|
@@ -24898,18 +24606,18 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
24898
24606
|
}
|
|
24899
24607
|
n(T);
|
|
24900
24608
|
var q = false;
|
|
24901
|
-
function J(e2,
|
|
24902
|
-
P(e2, (s << 1) + (n2 ? 1 : 0), 3), function(e3,
|
|
24903
|
-
M(e3), U(e3, r3), U(e3, ~r3), i.arraySet(e3.pending_buf, e3.window,
|
|
24904
|
-
}(e2,
|
|
24609
|
+
function J(e2, t2, r2, n2) {
|
|
24610
|
+
P(e2, (s << 1) + (n2 ? 1 : 0), 3), function(e3, t3, r3, n3) {
|
|
24611
|
+
M(e3), U(e3, r3), U(e3, ~r3), i.arraySet(e3.pending_buf, e3.window, t3, r3, e3.pending), e3.pending += r3;
|
|
24612
|
+
}(e2, t2, r2);
|
|
24905
24613
|
}
|
|
24906
24614
|
r._tr_init = function(e2) {
|
|
24907
24615
|
q || (function() {
|
|
24908
|
-
var e3,
|
|
24616
|
+
var e3, t2, r2, n2, i2, s2 = new Array(g2 + 1);
|
|
24909
24617
|
for (n2 = r2 = 0; n2 < a - 1; n2++) for (I[n2] = r2, e3 = 0; e3 < 1 << w[n2]; e3++) A[r2++] = n2;
|
|
24910
24618
|
for (A[r2 - 1] = n2, n2 = i2 = 0; n2 < 16; n2++) for (T[n2] = i2, e3 = 0; e3 < 1 << k[n2]; e3++) E[i2++] = n2;
|
|
24911
24619
|
for (i2 >>= 7; n2 < f; n2++) for (T[n2] = i2 << 7, e3 = 0; e3 < 1 << k[n2] - 7; e3++) E[256 + i2++] = n2;
|
|
24912
|
-
for (
|
|
24620
|
+
for (t2 = 0; t2 <= g2; t2++) s2[t2] = 0;
|
|
24913
24621
|
for (e3 = 0; e3 <= 143; ) z[2 * e3 + 1] = 8, e3++, s2[8]++;
|
|
24914
24622
|
for (; e3 <= 255; ) z[2 * e3 + 1] = 9, e3++, s2[9]++;
|
|
24915
24623
|
for (; e3 <= 279; ) z[2 * e3 + 1] = 7, e3++, s2[7]++;
|
|
@@ -24917,67 +24625,67 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
24917
24625
|
for (Z(z, l + 1, s2), e3 = 0; e3 < f; e3++) C[2 * e3 + 1] = 5, C[2 * e3] = j(e3, 5);
|
|
24918
24626
|
O = new D(z, w, u + 1, l, g2), B = new D(C, k, 0, f, g2), R = new D(new Array(0), x, 0, c, p);
|
|
24919
24627
|
}(), q = true), e2.l_desc = new F(e2.dyn_ltree, O), e2.d_desc = new F(e2.dyn_dtree, B), e2.bl_desc = new F(e2.bl_tree, R), e2.bi_buf = 0, e2.bi_valid = 0, W(e2);
|
|
24920
|
-
}, r._tr_stored_block = J, r._tr_flush_block = function(e2,
|
|
24628
|
+
}, r._tr_stored_block = J, r._tr_flush_block = function(e2, t2, r2, n2) {
|
|
24921
24629
|
var i2, s2, a2 = 0;
|
|
24922
24630
|
0 < e2.level ? (2 === e2.strm.data_type && (e2.strm.data_type = function(e3) {
|
|
24923
|
-
var
|
|
24924
|
-
for (
|
|
24631
|
+
var t3, r3 = 4093624447;
|
|
24632
|
+
for (t3 = 0; t3 <= 31; t3++, r3 >>>= 1) if (1 & r3 && 0 !== e3.dyn_ltree[2 * t3]) return o;
|
|
24925
24633
|
if (0 !== e3.dyn_ltree[18] || 0 !== e3.dyn_ltree[20] || 0 !== e3.dyn_ltree[26]) return h;
|
|
24926
|
-
for (
|
|
24634
|
+
for (t3 = 32; t3 < u; t3++) if (0 !== e3.dyn_ltree[2 * t3]) return h;
|
|
24927
24635
|
return o;
|
|
24928
24636
|
}(e2)), Y(e2, e2.l_desc), Y(e2, e2.d_desc), a2 = function(e3) {
|
|
24929
|
-
var
|
|
24930
|
-
for (X(e3, e3.dyn_ltree, e3.l_desc.max_code), X(e3, e3.dyn_dtree, e3.d_desc.max_code), Y(e3, e3.bl_desc),
|
|
24931
|
-
return e3.opt_len += 3 * (
|
|
24932
|
-
}(e2), i2 = e2.opt_len + 3 + 7 >>> 3, (s2 = e2.static_len + 3 + 7 >>> 3) <= i2 && (i2 = s2)) : i2 = s2 = r2 + 5, r2 + 4 <= i2 && -1 !==
|
|
24637
|
+
var t3;
|
|
24638
|
+
for (X(e3, e3.dyn_ltree, e3.l_desc.max_code), X(e3, e3.dyn_dtree, e3.d_desc.max_code), Y(e3, e3.bl_desc), t3 = c - 1; 3 <= t3 && 0 === e3.bl_tree[2 * S2[t3] + 1]; t3--) ;
|
|
24639
|
+
return e3.opt_len += 3 * (t3 + 1) + 5 + 5 + 4, t3;
|
|
24640
|
+
}(e2), i2 = e2.opt_len + 3 + 7 >>> 3, (s2 = e2.static_len + 3 + 7 >>> 3) <= i2 && (i2 = s2)) : i2 = s2 = r2 + 5, r2 + 4 <= i2 && -1 !== t2 ? J(e2, t2, r2, n2) : 4 === e2.strategy || s2 === i2 ? (P(e2, 2 + (n2 ? 1 : 0), 3), K(e2, z, C)) : (P(e2, 4 + (n2 ? 1 : 0), 3), function(e3, t3, r3, n3) {
|
|
24933
24641
|
var i3;
|
|
24934
|
-
for (P(e3,
|
|
24935
|
-
V(e3, e3.dyn_ltree,
|
|
24642
|
+
for (P(e3, t3 - 257, 5), P(e3, r3 - 1, 5), P(e3, n3 - 4, 4), i3 = 0; i3 < n3; i3++) P(e3, e3.bl_tree[2 * S2[i3] + 1], 3);
|
|
24643
|
+
V(e3, e3.dyn_ltree, t3 - 1), V(e3, e3.dyn_dtree, r3 - 1);
|
|
24936
24644
|
}(e2, e2.l_desc.max_code + 1, e2.d_desc.max_code + 1, a2 + 1), K(e2, e2.dyn_ltree, e2.dyn_dtree)), W(e2), n2 && M(e2);
|
|
24937
|
-
}, r._tr_tally = function(e2,
|
|
24938
|
-
return e2.pending_buf[e2.d_buf + 2 * e2.last_lit] =
|
|
24645
|
+
}, r._tr_tally = function(e2, t2, r2) {
|
|
24646
|
+
return e2.pending_buf[e2.d_buf + 2 * e2.last_lit] = t2 >>> 8 & 255, e2.pending_buf[e2.d_buf + 2 * e2.last_lit + 1] = 255 & t2, e2.pending_buf[e2.l_buf + e2.last_lit] = 255 & r2, e2.last_lit++, 0 === t2 ? e2.dyn_ltree[2 * r2]++ : (e2.matches++, t2--, e2.dyn_ltree[2 * (A[r2] + u + 1)]++, e2.dyn_dtree[2 * N(t2)]++), e2.last_lit === e2.lit_bufsize - 1;
|
|
24939
24647
|
}, r._tr_align = function(e2) {
|
|
24940
24648
|
P(e2, 2, 3), L(e2, m, z), function(e3) {
|
|
24941
24649
|
16 === e3.bi_valid ? (U(e3, e3.bi_buf), e3.bi_buf = 0, e3.bi_valid = 0) : 8 <= e3.bi_valid && (e3.pending_buf[e3.pending++] = 255 & e3.bi_buf, e3.bi_buf >>= 8, e3.bi_valid -= 8);
|
|
24942
24650
|
}(e2);
|
|
24943
24651
|
};
|
|
24944
|
-
}, { "../utils/common": 41 }], 53: [function(e,
|
|
24945
|
-
|
|
24652
|
+
}, { "../utils/common": 41 }], 53: [function(e, t, r) {
|
|
24653
|
+
t.exports = function() {
|
|
24946
24654
|
this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = "", this.state = null, this.data_type = 2, this.adler = 0;
|
|
24947
24655
|
};
|
|
24948
|
-
}, {}], 54: [function(e,
|
|
24656
|
+
}, {}], 54: [function(e, t, r) {
|
|
24949
24657
|
(function(e2) {
|
|
24950
24658
|
!function(r2, n) {
|
|
24951
24659
|
if (!r2.setImmediate) {
|
|
24952
|
-
var i, s,
|
|
24660
|
+
var i, s, t2, a, o = 1, h = {}, u = false, l = r2.document, e3 = Object.getPrototypeOf && Object.getPrototypeOf(r2);
|
|
24953
24661
|
e3 = e3 && e3.setTimeout ? e3 : r2, i = "[object process]" === {}.toString.call(r2.process) ? function(e4) {
|
|
24954
24662
|
process.nextTick(function() {
|
|
24955
24663
|
c(e4);
|
|
24956
24664
|
});
|
|
24957
24665
|
} : function() {
|
|
24958
24666
|
if (r2.postMessage && !r2.importScripts) {
|
|
24959
|
-
var e4 = true,
|
|
24667
|
+
var e4 = true, t3 = r2.onmessage;
|
|
24960
24668
|
return r2.onmessage = function() {
|
|
24961
24669
|
e4 = false;
|
|
24962
|
-
}, r2.postMessage("", "*"), r2.onmessage =
|
|
24670
|
+
}, r2.postMessage("", "*"), r2.onmessage = t3, e4;
|
|
24963
24671
|
}
|
|
24964
24672
|
}() ? (a = "setImmediate$" + Math.random() + "$", r2.addEventListener ? r2.addEventListener("message", d, false) : r2.attachEvent("onmessage", d), function(e4) {
|
|
24965
24673
|
r2.postMessage(a + e4, "*");
|
|
24966
|
-
}) : r2.MessageChannel ? ((
|
|
24674
|
+
}) : r2.MessageChannel ? ((t2 = new MessageChannel()).port1.onmessage = function(e4) {
|
|
24967
24675
|
c(e4.data);
|
|
24968
24676
|
}, function(e4) {
|
|
24969
|
-
|
|
24677
|
+
t2.port2.postMessage(e4);
|
|
24970
24678
|
}) : l && "onreadystatechange" in l.createElement("script") ? (s = l.documentElement, function(e4) {
|
|
24971
|
-
var
|
|
24972
|
-
|
|
24973
|
-
c(e4),
|
|
24974
|
-
}, s.appendChild(
|
|
24679
|
+
var t3 = l.createElement("script");
|
|
24680
|
+
t3.onreadystatechange = function() {
|
|
24681
|
+
c(e4), t3.onreadystatechange = null, s.removeChild(t3), t3 = null;
|
|
24682
|
+
}, s.appendChild(t3);
|
|
24975
24683
|
}) : function(e4) {
|
|
24976
24684
|
setTimeout(c, 0, e4);
|
|
24977
24685
|
}, e3.setImmediate = function(e4) {
|
|
24978
24686
|
"function" != typeof e4 && (e4 = new Function("" + e4));
|
|
24979
|
-
for (var
|
|
24980
|
-
var n2 = { callback: e4, args:
|
|
24687
|
+
for (var t3 = new Array(arguments.length - 1), r3 = 0; r3 < t3.length; r3++) t3[r3] = arguments[r3 + 1];
|
|
24688
|
+
var n2 = { callback: e4, args: t3 };
|
|
24981
24689
|
return h[o] = n2, i(o), o++;
|
|
24982
24690
|
}, e3.clearImmediate = f;
|
|
24983
24691
|
}
|
|
@@ -24987,29 +24695,29 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
24987
24695
|
function c(e4) {
|
|
24988
24696
|
if (u) setTimeout(c, 0, e4);
|
|
24989
24697
|
else {
|
|
24990
|
-
var
|
|
24991
|
-
if (
|
|
24698
|
+
var t3 = h[e4];
|
|
24699
|
+
if (t3) {
|
|
24992
24700
|
u = true;
|
|
24993
24701
|
try {
|
|
24994
24702
|
!function(e5) {
|
|
24995
|
-
var
|
|
24703
|
+
var t4 = e5.callback, r3 = e5.args;
|
|
24996
24704
|
switch (r3.length) {
|
|
24997
24705
|
case 0:
|
|
24998
|
-
|
|
24706
|
+
t4();
|
|
24999
24707
|
break;
|
|
25000
24708
|
case 1:
|
|
25001
|
-
|
|
24709
|
+
t4(r3[0]);
|
|
25002
24710
|
break;
|
|
25003
24711
|
case 2:
|
|
25004
|
-
|
|
24712
|
+
t4(r3[0], r3[1]);
|
|
25005
24713
|
break;
|
|
25006
24714
|
case 3:
|
|
25007
|
-
|
|
24715
|
+
t4(r3[0], r3[1], r3[2]);
|
|
25008
24716
|
break;
|
|
25009
24717
|
default:
|
|
25010
|
-
|
|
24718
|
+
t4.apply(n, r3);
|
|
25011
24719
|
}
|
|
25012
|
-
}(
|
|
24720
|
+
}(t3);
|
|
25013
24721
|
} finally {
|
|
25014
24722
|
f(e4), u = false;
|
|
25015
24723
|
}
|
|
@@ -25663,12 +25371,12 @@ function copy(src, dest) {
|
|
|
25663
25371
|
function _extends(Class, Super) {
|
|
25664
25372
|
var pt = Class.prototype;
|
|
25665
25373
|
if (!(pt instanceof Super)) {
|
|
25666
|
-
let
|
|
25374
|
+
let t = function() {
|
|
25667
25375
|
};
|
|
25668
|
-
|
|
25669
|
-
|
|
25670
|
-
copy(pt,
|
|
25671
|
-
Class.prototype = pt =
|
|
25376
|
+
t.prototype = Super.prototype;
|
|
25377
|
+
t = new t();
|
|
25378
|
+
copy(pt, t);
|
|
25379
|
+
Class.prototype = pt = t;
|
|
25672
25380
|
}
|
|
25673
25381
|
if (pt.constructor != Class) {
|
|
25674
25382
|
if (typeof Class != "function") {
|
|
@@ -30479,10 +30187,10 @@ function parse(source, defaultNSMapCopy, entityMap, domBuilder, errorHandler) {
|
|
|
30479
30187
|
}
|
|
30480
30188
|
}
|
|
30481
30189
|
}
|
|
30482
|
-
function copyLocator(f,
|
|
30483
|
-
|
|
30484
|
-
|
|
30485
|
-
return
|
|
30190
|
+
function copyLocator(f, t) {
|
|
30191
|
+
t.lineNumber = f.lineNumber;
|
|
30192
|
+
t.columnNumber = f.columnNumber;
|
|
30193
|
+
return t;
|
|
30486
30194
|
}
|
|
30487
30195
|
function parseElementStartPart(source, start, el, currentNSMap, entityReplacer, errorHandler, isHTML) {
|
|
30488
30196
|
function addAttribute(qname, value2, startIndex) {
|
|
@@ -31715,191 +31423,173 @@ const FORMAT_MAP = {
|
|
|
31715
31423
|
upperRoman: "upperRoman",
|
|
31716
31424
|
bullet: "bullet"
|
|
31717
31425
|
};
|
|
31426
|
+
function isXmlTrue$1(value) {
|
|
31427
|
+
return value == null || value === "1" || value === "true" || value === "on";
|
|
31428
|
+
}
|
|
31429
|
+
function parseLevel(level) {
|
|
31430
|
+
const result = {};
|
|
31431
|
+
const formatRaw = getAttributeValue(
|
|
31432
|
+
getFirstChildByTagNameNS(level, WORD_NS, "numFmt"),
|
|
31433
|
+
"val"
|
|
31434
|
+
);
|
|
31435
|
+
if (formatRaw) {
|
|
31436
|
+
result.kind = formatRaw === "bullet" ? "bullet" : "ordered";
|
|
31437
|
+
result.format = FORMAT_MAP[formatRaw];
|
|
31438
|
+
}
|
|
31439
|
+
const suffix = getAttributeValue(
|
|
31440
|
+
getFirstChildByTagNameNS(level, WORD_NS, "suff"),
|
|
31441
|
+
"val"
|
|
31442
|
+
);
|
|
31443
|
+
if (suffix === "tab" || suffix === "space" || suffix === "nothing") {
|
|
31444
|
+
result.suffix = suffix;
|
|
31445
|
+
}
|
|
31446
|
+
const startRaw = getAttributeValue(
|
|
31447
|
+
getFirstChildByTagNameNS(level, WORD_NS, "start"),
|
|
31448
|
+
"val"
|
|
31449
|
+
);
|
|
31450
|
+
if (startRaw != null) {
|
|
31451
|
+
const startAt = Number.parseInt(startRaw, 10);
|
|
31452
|
+
if (Number.isFinite(startAt)) result.startAt = startAt;
|
|
31453
|
+
}
|
|
31454
|
+
result.levelText = getAttributeValue(
|
|
31455
|
+
getFirstChildByTagNameNS(level, WORD_NS, "lvlText"),
|
|
31456
|
+
"val"
|
|
31457
|
+
) ?? void 0;
|
|
31458
|
+
const alignment = getAttributeValue(
|
|
31459
|
+
getFirstChildByTagNameNS(level, WORD_NS, "lvlJc"),
|
|
31460
|
+
"val"
|
|
31461
|
+
);
|
|
31462
|
+
if (alignment === "left" || alignment === "center" || alignment === "right") {
|
|
31463
|
+
result.alignment = alignment;
|
|
31464
|
+
}
|
|
31465
|
+
const legal = getFirstChildByTagNameNS(level, WORD_NS, "isLgl");
|
|
31466
|
+
if (legal) result.legal = isXmlTrue$1(getAttributeValue(legal, "val"));
|
|
31467
|
+
if (result.kind === "bullet" && result.levelText) {
|
|
31468
|
+
result.bulletGlyph = result.levelText;
|
|
31469
|
+
}
|
|
31470
|
+
const rPr = getFirstChildByTagNameNS(level, WORD_NS, "rPr");
|
|
31471
|
+
const rFonts = getFirstChildByTagNameNS(rPr, WORD_NS, "rFonts");
|
|
31472
|
+
result.bulletFont = getAttributeValue(rFonts, "ascii") ?? getAttributeValue(rFonts, "hAnsi") ?? void 0;
|
|
31473
|
+
const pPr = getFirstChildByTagNameNS(level, WORD_NS, "pPr");
|
|
31474
|
+
const ind = getFirstChildByTagNameNS(pPr, WORD_NS, "ind");
|
|
31475
|
+
if (ind) {
|
|
31476
|
+
const leftRaw = getAttributeValue(ind, "left") ?? getAttributeValue(ind, "start");
|
|
31477
|
+
const hangingRaw = getAttributeValue(ind, "hanging");
|
|
31478
|
+
const left = leftRaw != null ? twipsToPx(leftRaw, 0) : void 0;
|
|
31479
|
+
const hanging = hangingRaw != null ? twipsToPx(hangingRaw, 0) : void 0;
|
|
31480
|
+
if (left !== void 0 || hanging !== void 0)
|
|
31481
|
+
result.indent = { left, hanging };
|
|
31482
|
+
}
|
|
31483
|
+
return result;
|
|
31484
|
+
}
|
|
31718
31485
|
function parseNumbering(numberingXml) {
|
|
31719
|
-
const
|
|
31720
|
-
|
|
31721
|
-
|
|
31722
|
-
|
|
31723
|
-
|
|
31724
|
-
|
|
31725
|
-
|
|
31726
|
-
|
|
31727
|
-
const numStartOverrides = /* @__PURE__ */ new Map();
|
|
31728
|
-
const numToAbstractId = /* @__PURE__ */ new Map();
|
|
31729
|
-
const seenInstances = /* @__PURE__ */ new Set();
|
|
31730
|
-
const emptyResult = () => ({
|
|
31731
|
-
abstractKinds,
|
|
31732
|
-
numKinds,
|
|
31733
|
-
abstractIndents,
|
|
31734
|
-
abstractSuffixes,
|
|
31735
|
-
abstractFormats,
|
|
31736
|
-
abstractStarts,
|
|
31737
|
-
abstractBulletGlyphs,
|
|
31738
|
-
abstractBulletFonts,
|
|
31739
|
-
numStartOverrides,
|
|
31740
|
-
numToAbstractId,
|
|
31741
|
-
seenInstances
|
|
31742
|
-
});
|
|
31743
|
-
if (!numberingXml) return emptyResult();
|
|
31486
|
+
const maps = {
|
|
31487
|
+
abstractLevels: /* @__PURE__ */ new Map(),
|
|
31488
|
+
numOverrideLevels: /* @__PURE__ */ new Map(),
|
|
31489
|
+
numStartOverrides: /* @__PURE__ */ new Map(),
|
|
31490
|
+
numToAbstractId: /* @__PURE__ */ new Map(),
|
|
31491
|
+
seenInstances: /* @__PURE__ */ new Set()
|
|
31492
|
+
};
|
|
31493
|
+
if (!numberingXml) return maps;
|
|
31744
31494
|
const document2 = new DOMParser$1().parseFromString(
|
|
31745
31495
|
numberingXml,
|
|
31746
31496
|
"application/xml"
|
|
31747
31497
|
);
|
|
31748
31498
|
const numbering = document2.documentElement;
|
|
31749
|
-
if (!numbering) return
|
|
31750
|
-
const
|
|
31751
|
-
|
|
31752
|
-
|
|
31499
|
+
if (!numbering) return maps;
|
|
31500
|
+
for (const abstractNum of Array.from(
|
|
31501
|
+
numbering.getElementsByTagNameNS(WORD_NS, "abstractNum")
|
|
31502
|
+
)) {
|
|
31753
31503
|
const abstractId = getAttributeValue(abstractNum, "abstractNumId");
|
|
31754
31504
|
if (!abstractId) continue;
|
|
31755
31505
|
for (const level of getChildrenByTagNameNS(abstractNum, WORD_NS, "lvl")) {
|
|
31756
31506
|
const ilvl = getAttributeValue(level, "ilvl") ?? "0";
|
|
31757
|
-
|
|
31758
|
-
|
|
31759
|
-
|
|
31760
|
-
|
|
31761
|
-
|
|
31762
|
-
|
|
31763
|
-
|
|
31507
|
+
maps.abstractLevels.set(`${abstractId}:${ilvl}`, parseLevel(level));
|
|
31508
|
+
}
|
|
31509
|
+
}
|
|
31510
|
+
for (const num of Array.from(
|
|
31511
|
+
numbering.getElementsByTagNameNS(WORD_NS, "num")
|
|
31512
|
+
)) {
|
|
31513
|
+
const numId = getAttributeValue(num, "numId");
|
|
31514
|
+
const abstractId = getAttributeValue(
|
|
31515
|
+
getFirstChildByTagNameNS(num, WORD_NS, "abstractNumId"),
|
|
31516
|
+
"val"
|
|
31517
|
+
);
|
|
31518
|
+
if (!numId || !abstractId) continue;
|
|
31519
|
+
maps.numToAbstractId.set(numId, abstractId);
|
|
31520
|
+
for (const override of getChildrenByTagNameNS(
|
|
31521
|
+
num,
|
|
31522
|
+
WORD_NS,
|
|
31523
|
+
"lvlOverride"
|
|
31524
|
+
)) {
|
|
31525
|
+
const ilvl = getAttributeValue(override, "ilvl") ?? "0";
|
|
31526
|
+
const overrideLevel = getFirstChildByTagNameNS(override, WORD_NS, "lvl");
|
|
31527
|
+
if (overrideLevel) {
|
|
31528
|
+
maps.numOverrideLevels.set(
|
|
31529
|
+
`${numId}:${ilvl}`,
|
|
31530
|
+
parseLevel(overrideLevel)
|
|
31764
31531
|
);
|
|
31765
|
-
if (ilvl === "0") {
|
|
31766
|
-
abstractKinds.set(
|
|
31767
|
-
abstractId,
|
|
31768
|
-
format === "bullet" ? "bullet" : "ordered"
|
|
31769
|
-
);
|
|
31770
|
-
}
|
|
31771
|
-
const editorFormat = FORMAT_MAP[format];
|
|
31772
|
-
if (editorFormat) abstractFormats.set(levelKey, editorFormat);
|
|
31773
|
-
}
|
|
31774
|
-
const suffRaw = getAttributeValue(
|
|
31775
|
-
getFirstChildByTagNameNS(level, WORD_NS, "suff"),
|
|
31776
|
-
"val"
|
|
31777
|
-
);
|
|
31778
|
-
if (suffRaw === "space" || suffRaw === "nothing" || suffRaw === "tab") {
|
|
31779
|
-
abstractSuffixes.set(levelKey, suffRaw);
|
|
31780
31532
|
}
|
|
31781
31533
|
const startRaw = getAttributeValue(
|
|
31782
|
-
getFirstChildByTagNameNS(
|
|
31534
|
+
getFirstChildByTagNameNS(override, WORD_NS, "startOverride"),
|
|
31783
31535
|
"val"
|
|
31784
31536
|
);
|
|
31785
31537
|
if (startRaw != null) {
|
|
31786
|
-
const
|
|
31787
|
-
if (
|
|
31788
|
-
|
|
31789
|
-
if (format === "bullet") {
|
|
31790
|
-
const lvlTextEl = getFirstChildByTagNameNS(level, WORD_NS, "lvlText");
|
|
31791
|
-
const glyph = getAttributeValue(lvlTextEl, "val");
|
|
31792
|
-
if (glyph) abstractBulletGlyphs.set(levelKey, glyph);
|
|
31793
|
-
}
|
|
31794
|
-
const rPr = getFirstChildByTagNameNS(level, WORD_NS, "rPr");
|
|
31795
|
-
const rFonts = getFirstChildByTagNameNS(rPr, WORD_NS, "rFonts");
|
|
31796
|
-
const fontName = getAttributeValue(rFonts, "ascii") ?? getAttributeValue(rFonts, "hAnsi");
|
|
31797
|
-
if (fontName) abstractBulletFonts.set(levelKey, fontName);
|
|
31798
|
-
const pPr = getFirstChildByTagNameNS(level, WORD_NS, "pPr");
|
|
31799
|
-
const ind = getFirstChildByTagNameNS(pPr, WORD_NS, "ind");
|
|
31800
|
-
if (ind) {
|
|
31801
|
-
const leftRaw = getAttributeValue(ind, "left") ?? getAttributeValue(ind, "start");
|
|
31802
|
-
const hangingRaw = getAttributeValue(ind, "hanging");
|
|
31803
|
-
const left = leftRaw != null ? twipsToPx(leftRaw, 0) : void 0;
|
|
31804
|
-
const hanging = hangingRaw != null ? twipsToPx(hangingRaw, 0) : void 0;
|
|
31805
|
-
if (left !== void 0 || hanging !== void 0) {
|
|
31806
|
-
abstractIndents.set(levelKey, { left, hanging });
|
|
31538
|
+
const startAt = Number.parseInt(startRaw, 10);
|
|
31539
|
+
if (Number.isFinite(startAt)) {
|
|
31540
|
+
maps.numStartOverrides.set(`${numId}:${ilvl}`, startAt);
|
|
31807
31541
|
}
|
|
31808
31542
|
}
|
|
31809
31543
|
}
|
|
31810
31544
|
}
|
|
31811
|
-
|
|
31812
|
-
|
|
31813
|
-
|
|
31814
|
-
|
|
31815
|
-
|
|
31816
|
-
|
|
31817
|
-
|
|
31818
|
-
"abstractNumId"
|
|
31819
|
-
);
|
|
31820
|
-
const abstractNumId = getAttributeValue(abstractNumIdElement, "val");
|
|
31821
|
-
if (!numId || !abstractNumId) {
|
|
31822
|
-
continue;
|
|
31823
|
-
}
|
|
31824
|
-
numToAbstractId.set(numId, abstractNumId);
|
|
31825
|
-
numKinds.set(numId, abstractKinds.get(abstractNumId) ?? "ordered");
|
|
31826
|
-
for (const override of getChildrenByTagNameNS(num, WORD_NS, "lvlOverride")) {
|
|
31827
|
-
const overrideIlvl = getAttributeValue(override, "ilvl");
|
|
31828
|
-
if (!overrideIlvl) continue;
|
|
31829
|
-
const startOverrideEl = getFirstChildByTagNameNS(
|
|
31830
|
-
override,
|
|
31831
|
-
WORD_NS,
|
|
31832
|
-
"startOverride"
|
|
31833
|
-
);
|
|
31834
|
-
const startOverrideRaw = getAttributeValue(startOverrideEl, "val");
|
|
31835
|
-
if (startOverrideRaw != null) {
|
|
31836
|
-
const n = parseInt(startOverrideRaw, 10);
|
|
31837
|
-
if (!isNaN(n)) numStartOverrides.set(`${numId}:${overrideIlvl}`, n);
|
|
31838
|
-
}
|
|
31839
|
-
}
|
|
31840
|
-
}
|
|
31841
|
-
return {
|
|
31842
|
-
abstractKinds,
|
|
31843
|
-
numKinds,
|
|
31844
|
-
abstractIndents,
|
|
31845
|
-
abstractSuffixes,
|
|
31846
|
-
abstractFormats,
|
|
31847
|
-
abstractStarts,
|
|
31848
|
-
abstractBulletGlyphs,
|
|
31849
|
-
abstractBulletFonts,
|
|
31850
|
-
numStartOverrides,
|
|
31851
|
-
numToAbstractId,
|
|
31852
|
-
seenInstances
|
|
31853
|
-
};
|
|
31545
|
+
return maps;
|
|
31546
|
+
}
|
|
31547
|
+
function effectiveLevel(numberingMaps, numId, ilvl) {
|
|
31548
|
+
const abstractId = numberingMaps.numToAbstractId.get(numId);
|
|
31549
|
+
const base = abstractId ? numberingMaps.abstractLevels.get(`${abstractId}:${ilvl}`) : void 0;
|
|
31550
|
+
const override = numberingMaps.numOverrideLevels.get(`${numId}:${ilvl}`);
|
|
31551
|
+
return override ?? base ?? {};
|
|
31854
31552
|
}
|
|
31855
31553
|
function parseParagraphList(paragraphProperties, numberingMaps) {
|
|
31856
|
-
if (!paragraphProperties)
|
|
31857
|
-
return void 0;
|
|
31858
|
-
}
|
|
31554
|
+
if (!paragraphProperties) return void 0;
|
|
31859
31555
|
const numPr = getFirstChildByTagNameNS(paragraphProperties, WORD_NS, "numPr");
|
|
31860
|
-
if (!numPr)
|
|
31861
|
-
return void 0;
|
|
31862
|
-
}
|
|
31556
|
+
if (!numPr) return void 0;
|
|
31863
31557
|
const numId = getAttributeValue(
|
|
31864
31558
|
getFirstChildByTagNameNS(numPr, WORD_NS, "numId"),
|
|
31865
31559
|
"val"
|
|
31866
31560
|
);
|
|
31867
|
-
if (!numId)
|
|
31868
|
-
|
|
31869
|
-
}
|
|
31870
|
-
const ilvlValue = getAttributeValue(
|
|
31561
|
+
if (!numId) return void 0;
|
|
31562
|
+
const ilvlRaw = getAttributeValue(
|
|
31871
31563
|
getFirstChildByTagNameNS(numPr, WORD_NS, "ilvl"),
|
|
31872
31564
|
"val"
|
|
31873
31565
|
) ?? "0";
|
|
31874
|
-
const level = Number(
|
|
31875
|
-
const
|
|
31876
|
-
const
|
|
31877
|
-
const
|
|
31878
|
-
|
|
31879
|
-
|
|
31880
|
-
|
|
31881
|
-
const
|
|
31882
|
-
const instanceKey = `${numId}:${ilvlValue}`;
|
|
31566
|
+
const level = Number.parseInt(ilvlRaw, 10);
|
|
31567
|
+
const safeLevel = Number.isFinite(level) ? level : 0;
|
|
31568
|
+
const effective = effectiveLevel(numberingMaps, numId, safeLevel);
|
|
31569
|
+
const levelFormats = [];
|
|
31570
|
+
for (let index = 0; index <= safeLevel; index += 1) {
|
|
31571
|
+
levelFormats[index] = effectiveLevel(numberingMaps, numId, index).format ?? "decimal";
|
|
31572
|
+
}
|
|
31573
|
+
const instanceKey = `${numId}:${safeLevel}`;
|
|
31883
31574
|
const isFirstInInstance = !numberingMaps.seenInstances.has(instanceKey);
|
|
31884
31575
|
numberingMaps.seenInstances.add(instanceKey);
|
|
31885
|
-
|
|
31886
|
-
if (isFirstInInstance) {
|
|
31887
|
-
const override = numberingMaps.numStartOverrides.get(instanceKey);
|
|
31888
|
-
const abstractStart = levelKey ? numberingMaps.abstractStarts.get(levelKey) : void 0;
|
|
31889
|
-
const effectiveStart = override ?? abstractStart ?? 1;
|
|
31890
|
-
if (effectiveStart !== 1) startAt = effectiveStart;
|
|
31891
|
-
}
|
|
31576
|
+
const startAt = isFirstInInstance ? numberingMaps.numStartOverrides.get(instanceKey) ?? effective.startAt : void 0;
|
|
31892
31577
|
return {
|
|
31893
31578
|
list: {
|
|
31894
|
-
kind:
|
|
31895
|
-
level:
|
|
31896
|
-
|
|
31897
|
-
|
|
31898
|
-
...
|
|
31899
|
-
...
|
|
31900
|
-
...
|
|
31579
|
+
kind: effective.kind ?? "ordered",
|
|
31580
|
+
level: safeLevel,
|
|
31581
|
+
instanceId: numId,
|
|
31582
|
+
suffix: effective.suffix ?? "tab",
|
|
31583
|
+
...effective.format ? { format: effective.format } : {},
|
|
31584
|
+
...levelFormats.length ? { levelFormats } : {},
|
|
31585
|
+
...effective.levelText ? { levelText: effective.levelText } : {},
|
|
31586
|
+
...effective.alignment ? { alignment: effective.alignment } : {},
|
|
31587
|
+
...effective.legal !== void 0 ? { legal: effective.legal } : {},
|
|
31588
|
+
...startAt !== void 0 && startAt !== 1 ? { startAt } : {},
|
|
31589
|
+
...effective.bulletGlyph ? { bulletGlyph: effective.bulletGlyph } : {},
|
|
31590
|
+
...effective.bulletFont ? { bulletFont: effective.bulletFont } : {}
|
|
31901
31591
|
},
|
|
31902
|
-
indent
|
|
31592
|
+
indent: effective.indent
|
|
31903
31593
|
};
|
|
31904
31594
|
}
|
|
31905
31595
|
function stripUndefined(value) {
|
|
@@ -35850,7 +35540,7 @@ function importDocxInWorker(buffer, options = {}) {
|
|
|
35850
35540
|
const worker = new Worker(
|
|
35851
35541
|
new URL(
|
|
35852
35542
|
/* @vite-ignore */
|
|
35853
|
-
"" + new URL("assets/importDocxWorker-
|
|
35543
|
+
"" + new URL("assets/importDocxWorker-xRrspiYv.js", import.meta.url).href,
|
|
35854
35544
|
import.meta.url
|
|
35855
35545
|
),
|
|
35856
35546
|
{
|
|
@@ -36574,6 +36264,7 @@ function createEditorZoom(initial = ZOOM_DEFAULT) {
|
|
|
36574
36264
|
}
|
|
36575
36265
|
var _tmpl$$m = /* @__PURE__ */ template(`<div data-testid=editor-editor-shell><div class=oasis-editor-editor data-testid=editor-editor><div class=oasis-editor-editor-zoom-sizer><div class=oasis-editor-editor-scroll-content data-testid=editor-editor-scroll-content style="position:absolute;top:0px;transform-origin:top left"><textarea aria-label="Editor input"autocomplete=off autocapitalize=off class=oasis-editor-input data-testid=editor-input value style=pointer-events:none></textarea><input data-testid=editor-import-docx-input type=file style=display:none><input accept="image/png, image/jpeg, image/gif"data-testid=editor-insert-image-input type=file style=display:none></div></div></div><div class=oasis-editor-statusbar data-testid=editor-statusbar><div class="oasis-editor-statusbar-group oasis-editor-statusbar-start"><span class=oasis-editor-statusbar-item data-testid=editor-statusbar-word-count></span><span class=oasis-editor-statusbar-item data-testid=editor-statusbar-character-count></span><span class=oasis-editor-statusbar-item></span></div><div class="oasis-editor-statusbar-group oasis-editor-statusbar-end"><div class=oasis-editor-statusbar-zoom data-testid=editor-statusbar-zoom-control><button type=button class=oasis-editor-zoom-button>−</button><input class=oasis-editor-zoom-slider type=range><button type=button class=oasis-editor-zoom-button>+</button><span class="oasis-editor-statusbar-item oasis-editor-zoom-value"data-testid=editor-statusbar-zoom>%`), _tmpl$2$g = /* @__PURE__ */ template(`<div class=oasis-editor-import-overlay data-testid=editor-import-overlay role=status aria-live=polite><div class=oasis-editor-import-card><div class=oasis-editor-import-title></div><div class=oasis-editor-import-phase data-testid=editor-import-phase></div><div class=oasis-editor-import-progress-track><div class=oasis-editor-import-progress-bar data-testid=editor-import-progress-bar></div></div><div class=oasis-editor-import-progress-label>`), _tmpl$3$a = /* @__PURE__ */ template(`<span class=oasis-editor-import-done-icon>`), _tmpl$4$8 = /* @__PURE__ */ template(`<span class=oasis-editor-import-error-icon>`), _tmpl$5$7 = /* @__PURE__ */ template(`<span>`);
|
|
36576
36266
|
function OasisEditorEditor(props) {
|
|
36267
|
+
const t = useI18n();
|
|
36577
36268
|
const layout = () => props.layout ?? {};
|
|
36578
36269
|
const overlays = () => props.overlays;
|
|
36579
36270
|
const refs = () => props.refs ?? {};
|
|
@@ -37244,6 +36935,7 @@ const EMPTY_SNAPSHOT = {
|
|
|
37244
36935
|
activeSidePanelId: null
|
|
37245
36936
|
};
|
|
37246
36937
|
function PluginUiHost(props) {
|
|
36938
|
+
const t = useI18n();
|
|
37247
36939
|
const resolvedChildren = children$1(() => props.children);
|
|
37248
36940
|
const [snapshot, setSnapshot] = createSignal(EMPTY_SNAPSHOT);
|
|
37249
36941
|
createEffect(() => {
|
|
@@ -37278,7 +36970,7 @@ function PluginUiHost(props) {
|
|
|
37278
36970
|
return action.icon ?? "sparkles";
|
|
37279
36971
|
},
|
|
37280
36972
|
get label() {
|
|
37281
|
-
return actionLabel(action);
|
|
36973
|
+
return actionLabel(action, t);
|
|
37282
36974
|
},
|
|
37283
36975
|
get disabled() {
|
|
37284
36976
|
return !canExecuteAction(props.editor(), action);
|
|
@@ -37303,7 +36995,7 @@ function PluginUiHost(props) {
|
|
|
37303
36995
|
get when() {
|
|
37304
36996
|
return dockPanel();
|
|
37305
36997
|
},
|
|
37306
|
-
children: (panel) => renderPanel(props.editor, panel())
|
|
36998
|
+
children: (panel) => renderPanel(props.editor, panel(), t)
|
|
37307
36999
|
}), null);
|
|
37308
37000
|
insert(_el$2, createComponent(Show, {
|
|
37309
37001
|
get when() {
|
|
@@ -37311,7 +37003,7 @@ function PluginUiHost(props) {
|
|
|
37311
37003
|
},
|
|
37312
37004
|
children: (panel) => (() => {
|
|
37313
37005
|
var _el$4 = _tmpl$3$9();
|
|
37314
|
-
insert(_el$4, () => renderPanel(props.editor, panel()));
|
|
37006
|
+
insert(_el$4, () => renderPanel(props.editor, panel(), t));
|
|
37315
37007
|
return _el$4;
|
|
37316
37008
|
})()
|
|
37317
37009
|
}), null);
|
|
@@ -37340,12 +37032,12 @@ function canExecuteAction(editor, action) {
|
|
|
37340
37032
|
const resolved = resolveCommandRef(action.command);
|
|
37341
37033
|
return editor.commands.canExecute(resolved.name, resolved.payload);
|
|
37342
37034
|
}
|
|
37343
|
-
function actionLabel(action) {
|
|
37035
|
+
function actionLabel(action, t) {
|
|
37344
37036
|
if (action.tooltip) return action.tooltip;
|
|
37345
37037
|
if (action.labelKey) return t(action.labelKey);
|
|
37346
37038
|
return action.label ?? action.id;
|
|
37347
37039
|
}
|
|
37348
|
-
function renderPanel(editor, panel) {
|
|
37040
|
+
function renderPanel(editor, panel, t) {
|
|
37349
37041
|
const close = () => editor().ui.closeSidePanel(panel.id);
|
|
37350
37042
|
return createComponent(SidePanel, {
|
|
37351
37043
|
get mode() {
|
|
@@ -37715,6 +37407,7 @@ function BalloonShell(props) {
|
|
|
37715
37407
|
}
|
|
37716
37408
|
var _tmpl$$e = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-footer data-testid=editor-dialog-footer>`), _tmpl$2$b = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-overlay><div role=dialog aria-modal=true data-testid=editor-dialog><div class=oasis-editor-dialog-header><h3 class=oasis-editor-dialog-title></h3><button class=oasis-editor-dialog-close data-testid=editor-dialog-close><i data-lucide=x></i></button></div><div data-testid=editor-dialog-body>`);
|
|
37717
37409
|
function Dialog(props) {
|
|
37410
|
+
const t = useI18n();
|
|
37718
37411
|
let dialogRef;
|
|
37719
37412
|
const fallbackTitleId = createUniqueId();
|
|
37720
37413
|
const titleId = createMemo(() => props.titleId ?? fallbackTitleId);
|
|
@@ -38303,6 +37996,28 @@ class ToolbarRegistryImpl {
|
|
|
38303
37996
|
function createToolbarRegistry() {
|
|
38304
37997
|
return new ToolbarRegistryImpl();
|
|
38305
37998
|
}
|
|
37999
|
+
class MenuRegistry {
|
|
38000
|
+
constructor() {
|
|
38001
|
+
__publicField(this, "items", []);
|
|
38002
|
+
}
|
|
38003
|
+
register(item) {
|
|
38004
|
+
const existingIndex = this.items.findIndex((entry) => entry.id === item.id);
|
|
38005
|
+
if (existingIndex >= 0) {
|
|
38006
|
+
this.items[existingIndex] = item;
|
|
38007
|
+
} else {
|
|
38008
|
+
this.items.push(item);
|
|
38009
|
+
}
|
|
38010
|
+
this.items.sort(
|
|
38011
|
+
(a, b) => (a.order ?? Number.MAX_SAFE_INTEGER) - (b.order ?? Number.MAX_SAFE_INTEGER)
|
|
38012
|
+
);
|
|
38013
|
+
}
|
|
38014
|
+
unregister(id) {
|
|
38015
|
+
this.items = this.items.filter((i) => i.id !== id);
|
|
38016
|
+
}
|
|
38017
|
+
getItems() {
|
|
38018
|
+
return [...this.items];
|
|
38019
|
+
}
|
|
38020
|
+
}
|
|
38306
38021
|
const PX_TO_PT = 72 / 96;
|
|
38307
38022
|
const DEFAULT_FONT_SIZE_PX = 14.6667;
|
|
38308
38023
|
function pxToPt(value) {
|
|
@@ -38451,9 +38166,10 @@ const UNDERLINE_STYLE_OPTIONS = [
|
|
|
38451
38166
|
];
|
|
38452
38167
|
var _tmpl$$7 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-color-menu-action data-testid=editor-toolbar-underline-remove role=menuitem><span class=oasis-editor-color-menu-action-swatch><i data-lucide=slash></i></span><span>`), _tmpl$2$6 = /* @__PURE__ */ template(`<div class=oasis-editor-underline-menu-list>`), _tmpl$3$4 = /* @__PURE__ */ template(`<span class="oasis-editor-color-split-icon oasis-editor-underline-split-icon"><span class=oasis-editor-underline-split-glyph aria-hidden=true>U</span><span class=oasis-editor-underline-split-indicator>`), _tmpl$4$4 = /* @__PURE__ */ template(`<span class="oasis-editor-underline-menu-stroke oasis-editor-underline-menu-stroke-svg">`), _tmpl$5$4 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-underline-menu-item role=menuitemradio><span class=oasis-editor-underline-menu-preview></span><span class=oasis-editor-underline-menu-label>`), _tmpl$6$3 = /* @__PURE__ */ template(`<span class=oasis-editor-underline-menu-stroke>`);
|
|
38453
38168
|
const mod$1 = /Mac/i.test(navigator.userAgent) ? "⌘" : "Ctrl";
|
|
38454
|
-
const UNDERLINE_BUTTON_TOOLTIP = `${t("toolbar.underline")} (${mod$1}+U)`;
|
|
38455
38169
|
const TEST_ID = "editor-toolbar-underline";
|
|
38456
38170
|
function UnderlineControl(props) {
|
|
38171
|
+
const t = useI18n();
|
|
38172
|
+
const underlineButtonTooltip = `${t("toolbar.underline")} (${mod$1}+U)`;
|
|
38457
38173
|
const api = props.api;
|
|
38458
38174
|
const [lastUnderlineStyle, setLastUnderlineStyle] = createSignal("single");
|
|
38459
38175
|
const [open, setOpen] = createSignal(false);
|
|
@@ -38485,7 +38201,7 @@ function UnderlineControl(props) {
|
|
|
38485
38201
|
return open();
|
|
38486
38202
|
},
|
|
38487
38203
|
onOpenChange: setOpen,
|
|
38488
|
-
tooltip:
|
|
38204
|
+
tooltip: underlineButtonTooltip,
|
|
38489
38205
|
get rootActive() {
|
|
38490
38206
|
return open() || active();
|
|
38491
38207
|
},
|
|
@@ -38571,6 +38287,7 @@ function UnderlineControl(props) {
|
|
|
38571
38287
|
delegateEvents(["click"]);
|
|
38572
38288
|
var _tmpl$$6 = /* @__PURE__ */ template(`<option value=decimal>`), _tmpl$2$5 = /* @__PURE__ */ template(`<option value=lowerLetter>`), _tmpl$3$3 = /* @__PURE__ */ template(`<option value=upperLetter>`), _tmpl$4$3 = /* @__PURE__ */ template(`<option value=lowerRoman>`), _tmpl$5$3 = /* @__PURE__ */ template(`<option value=upperRoman>`), _tmpl$6$2 = /* @__PURE__ */ template(`<option value=bullet>`), _tmpl$7 = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-list-options><label class=oasis-editor-toolbar-field><span></span></label><label class=oasis-editor-toolbar-field><span></span><input type=number class=oasis-editor-tool-number data-testid=editor-toolbar-list-start-at min=1 step=1 placeholder=1>`);
|
|
38573
38289
|
function ListOptionsControl(props) {
|
|
38290
|
+
const t = useI18n();
|
|
38574
38291
|
const api = props.api;
|
|
38575
38292
|
return createComponent(Menu, {
|
|
38576
38293
|
icon: "list-filter",
|
|
@@ -38625,6 +38342,7 @@ function ListOptionsControl(props) {
|
|
|
38625
38342
|
}
|
|
38626
38343
|
var _tmpl$$5 = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-row><div class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><label class=oasis-editor-dialog-label></label><input type=number class=oasis-editor-dialog-input min=0.5 step=0.05 data-testid=editor-line-spacing-dialog-line-height>`), _tmpl$2$4 = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-row><div class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><label class=oasis-editor-dialog-label></label><input type=number class=oasis-editor-dialog-input min=0 step=1 data-testid=editor-line-spacing-dialog-spacing-before></div><div class="oasis-editor-dialog-input-group oasis-editor-dialog-input-group-grow"><label class=oasis-editor-dialog-label></label><input type=number class=oasis-editor-dialog-input min=0 step=1 data-testid=editor-line-spacing-dialog-spacing-after>`), _tmpl$3$2 = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-input-group><label class=oasis-editor-dialog-label></label><div class=oasis-editor-dialog-preview data-testid=editor-line-spacing-dialog-preview><br>`), _tmpl$4$2 = /* @__PURE__ */ template(`<button class="oasis-editor-dialog-button oasis-editor-dialog-button-secondary"data-testid=editor-line-spacing-dialog-cancel>`), _tmpl$5$2 = /* @__PURE__ */ template(`<button class="oasis-editor-dialog-button oasis-editor-dialog-button-primary"data-testid=editor-line-spacing-dialog-apply>`);
|
|
38627
38344
|
function LineSpacingDialog(props) {
|
|
38345
|
+
const t = useI18n();
|
|
38628
38346
|
const [lineHeight, setLineHeight] = createSignal("");
|
|
38629
38347
|
const [spacingBefore, setSpacingBefore] = createSignal("");
|
|
38630
38348
|
const [spacingAfter, setSpacingAfter] = createSignal("");
|
|
@@ -38717,6 +38435,7 @@ function toStr(value) {
|
|
|
38717
38435
|
return value == null ? "" : String(value);
|
|
38718
38436
|
}
|
|
38719
38437
|
function LineSpacingButton(props) {
|
|
38438
|
+
const t = useI18n();
|
|
38720
38439
|
const api = props.api;
|
|
38721
38440
|
const [isOpen, setIsOpen] = createSignal(false);
|
|
38722
38441
|
const [dialogOpen, setDialogOpen] = createSignal(false);
|
|
@@ -38865,6 +38584,7 @@ const numValue = (api, command) => {
|
|
|
38865
38584
|
return value == null ? "" : String(value);
|
|
38866
38585
|
};
|
|
38867
38586
|
function MetricGroup(props) {
|
|
38587
|
+
const t = useI18n();
|
|
38868
38588
|
const api = props.api;
|
|
38869
38589
|
const onNumber = (command) => (event) => api.commands.execute(command, event.currentTarget.value);
|
|
38870
38590
|
return createComponent(Menu, {
|
|
@@ -38950,6 +38670,7 @@ function MetricGroup(props) {
|
|
|
38950
38670
|
delegateEvents(["input"]);
|
|
38951
38671
|
var _tmpl$$2 = /* @__PURE__ */ template(`<div class="oasis-editor-toolbar-panel-section oasis-editor-toolbar-panel-actions">`), _tmpl$2$1 = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-badge data-testid=editor-table-selection-label>`);
|
|
38952
38672
|
function TableGroup(props) {
|
|
38673
|
+
const t = useI18n();
|
|
38953
38674
|
const api = props.api;
|
|
38954
38675
|
const disabled = (command) => !api.commands.state(command).isEnabled;
|
|
38955
38676
|
const selectionLabel = () => api.commands.state("tableContext").value;
|
|
@@ -39154,6 +38875,7 @@ function TableGroup(props) {
|
|
|
39154
38875
|
}
|
|
39155
38876
|
var _tmpl$$1 = /* @__PURE__ */ template(`<div class="oasis-editor-toolbar-panel-section oasis-editor-toolbar-panel-actions">`);
|
|
39156
38877
|
function SectionGroup(props) {
|
|
38878
|
+
const t = useI18n();
|
|
39157
38879
|
const api = props.api;
|
|
39158
38880
|
return createComponent(Menu, {
|
|
39159
38881
|
icon: "layout-template",
|
|
@@ -39296,10 +39018,9 @@ const FIELDS = [{
|
|
|
39296
39018
|
key: "right",
|
|
39297
39019
|
labelKey: "section.marginField.right"
|
|
39298
39020
|
}];
|
|
39299
|
-
function formatCm(cm) {
|
|
39300
|
-
return t("section.marginValue", [String(cm).replace(".", t("number.decimalSeparator"))]);
|
|
39301
|
-
}
|
|
39302
39021
|
function MarginsGroup(props) {
|
|
39022
|
+
const t = useI18n();
|
|
39023
|
+
const formatCm = (cm) => t("section.marginValue", [String(cm).replace(".", t("number.decimalSeparator"))]);
|
|
39303
39024
|
const api = props.api;
|
|
39304
39025
|
const [showCustom, setShowCustom] = createSignal(false);
|
|
39305
39026
|
const [draft, setDraft] = createSignal({});
|
|
@@ -39579,7 +39300,7 @@ function withDefaultRibbonPlacement(items) {
|
|
|
39579
39300
|
};
|
|
39580
39301
|
});
|
|
39581
39302
|
}
|
|
39582
|
-
function createDefaultToolbarPreset() {
|
|
39303
|
+
function createDefaultToolbarPreset(t) {
|
|
39583
39304
|
const items = [];
|
|
39584
39305
|
items.push({
|
|
39585
39306
|
type: "menu",
|
|
@@ -40185,154 +39906,157 @@ export {
|
|
|
40185
39906
|
imageExtensionFromMime as Z,
|
|
40186
39907
|
pxToPt as _,
|
|
40187
39908
|
getParagraphLength as a,
|
|
40188
|
-
|
|
39909
|
+
getParagraphRectFromSnapshot as a$,
|
|
40189
39910
|
buildCanvasTableLayout as a0,
|
|
40190
39911
|
resolveFloatingObjectRect as a1,
|
|
40191
39912
|
getTextBoxFloatingGeometry as a2,
|
|
40192
39913
|
getPresetPathSegments as a3,
|
|
40193
39914
|
projectBlocksLayout as a4,
|
|
40194
|
-
|
|
40195
|
-
|
|
40196
|
-
|
|
40197
|
-
|
|
40198
|
-
|
|
40199
|
-
|
|
40200
|
-
|
|
40201
|
-
|
|
40202
|
-
|
|
40203
|
-
|
|
40204
|
-
|
|
40205
|
-
|
|
40206
|
-
|
|
40207
|
-
|
|
40208
|
-
|
|
40209
|
-
|
|
40210
|
-
|
|
40211
|
-
|
|
40212
|
-
|
|
40213
|
-
|
|
40214
|
-
|
|
40215
|
-
|
|
40216
|
-
|
|
40217
|
-
|
|
40218
|
-
|
|
40219
|
-
|
|
40220
|
-
|
|
40221
|
-
|
|
40222
|
-
|
|
40223
|
-
|
|
40224
|
-
|
|
40225
|
-
|
|
40226
|
-
|
|
40227
|
-
|
|
40228
|
-
|
|
40229
|
-
|
|
40230
|
-
|
|
40231
|
-
|
|
40232
|
-
|
|
40233
|
-
|
|
40234
|
-
|
|
40235
|
-
|
|
40236
|
-
|
|
40237
|
-
|
|
40238
|
-
|
|
40239
|
-
|
|
40240
|
-
|
|
40241
|
-
|
|
40242
|
-
|
|
40243
|
-
|
|
40244
|
-
|
|
40245
|
-
|
|
40246
|
-
|
|
40247
|
-
|
|
40248
|
-
|
|
40249
|
-
|
|
40250
|
-
|
|
40251
|
-
|
|
39915
|
+
buildListLabels as a5,
|
|
39916
|
+
textStyleToFontSizePt as a6,
|
|
39917
|
+
PX_PER_POINT$2 as a7,
|
|
39918
|
+
DEFAULT_FONT_SIZE_PX as a8,
|
|
39919
|
+
isDoubleUnderlineStyle as a9,
|
|
39920
|
+
fontSizePxToPt as aA,
|
|
39921
|
+
probeLocalFontFamilies as aB,
|
|
39922
|
+
createInitialEditorState as aC,
|
|
39923
|
+
parseFontSizePtToPx as aD,
|
|
39924
|
+
formatFontSizePt as aE,
|
|
39925
|
+
listKindForTag as aF,
|
|
39926
|
+
isParagraphTag as aG,
|
|
39927
|
+
collectInlineRuns as aH,
|
|
39928
|
+
parseParagraphStyle as aI,
|
|
39929
|
+
getHeadingLevel as aJ,
|
|
39930
|
+
preciseFontModeVersion as aK,
|
|
39931
|
+
isPreciseFontModeEnabled as aL,
|
|
39932
|
+
togglePreciseFontMode as aM,
|
|
39933
|
+
nextFontSizePt as aN,
|
|
39934
|
+
previousFontSizePt as aO,
|
|
39935
|
+
fontSizePtToPx as aP,
|
|
39936
|
+
createDefaultToolbarPreset as aQ,
|
|
39937
|
+
MenuRegistry as aR,
|
|
39938
|
+
createToolbarRegistry as aS,
|
|
39939
|
+
Editor as aT,
|
|
39940
|
+
resolveCommandRef as aU,
|
|
39941
|
+
commandRefName as aV,
|
|
39942
|
+
InlineShell as aW,
|
|
39943
|
+
BalloonShell as aX,
|
|
39944
|
+
DocumentShell as aY,
|
|
39945
|
+
createMemo as aZ,
|
|
39946
|
+
getCaretRectFromSnapshot as a_,
|
|
39947
|
+
isWavyUnderlineStyle as aa,
|
|
39948
|
+
underlineStyleLineWidthPx as ab,
|
|
39949
|
+
underlineStyleDashArray as ac,
|
|
39950
|
+
resolveListLabel as ad,
|
|
39951
|
+
getListLabelInset as ae,
|
|
39952
|
+
getAlignedListLabelInset as af,
|
|
39953
|
+
getParagraphBorderInsets as ag,
|
|
39954
|
+
normalizeFamily as ah,
|
|
39955
|
+
ROBOTO_FONT_FILES as ai,
|
|
39956
|
+
loadFontAsset as aj,
|
|
39957
|
+
OFFICE_COMPAT_FONT_FAMILIES as ak,
|
|
39958
|
+
buildSfnt as al,
|
|
39959
|
+
defaultFontDecoderRegistry as am,
|
|
39960
|
+
SfntFontProgram as an,
|
|
39961
|
+
collectPdfFontFamilies as ao,
|
|
39962
|
+
projectDocumentLayout as ap,
|
|
39963
|
+
getPageHeaderZoneTop as aq,
|
|
39964
|
+
getPageBodyTop as ar,
|
|
39965
|
+
getPageColumnRects as as,
|
|
39966
|
+
findFootnoteReference as at,
|
|
39967
|
+
FOOTNOTE_MARKER_GUTTER_PX as au,
|
|
39968
|
+
resolveImporterForFile as av,
|
|
39969
|
+
createEditorStateFromDocument as aw,
|
|
39970
|
+
getDocumentParagraphsCanonical as ax,
|
|
39971
|
+
getToolbarStyleState as ay,
|
|
39972
|
+
STANDARD_FONT_SIZES_PT as az,
|
|
40252
39973
|
createEditorRun as b,
|
|
40253
|
-
|
|
40254
|
-
|
|
40255
|
-
|
|
40256
|
-
|
|
40257
|
-
|
|
40258
|
-
|
|
40259
|
-
|
|
40260
|
-
|
|
40261
|
-
|
|
40262
|
-
|
|
40263
|
-
|
|
40264
|
-
|
|
40265
|
-
|
|
40266
|
-
|
|
40267
|
-
|
|
40268
|
-
|
|
40269
|
-
|
|
40270
|
-
|
|
40271
|
-
|
|
40272
|
-
|
|
40273
|
-
|
|
40274
|
-
|
|
40275
|
-
|
|
40276
|
-
|
|
40277
|
-
|
|
40278
|
-
|
|
40279
|
-
|
|
40280
|
-
|
|
40281
|
-
|
|
40282
|
-
|
|
40283
|
-
|
|
40284
|
-
|
|
40285
|
-
|
|
40286
|
-
|
|
40287
|
-
|
|
40288
|
-
|
|
40289
|
-
|
|
40290
|
-
|
|
40291
|
-
|
|
40292
|
-
|
|
40293
|
-
|
|
40294
|
-
|
|
40295
|
-
|
|
40296
|
-
|
|
40297
|
-
|
|
40298
|
-
|
|
40299
|
-
|
|
40300
|
-
|
|
40301
|
-
|
|
40302
|
-
|
|
40303
|
-
|
|
40304
|
-
|
|
40305
|
-
|
|
40306
|
-
|
|
40307
|
-
|
|
40308
|
-
|
|
40309
|
-
|
|
40310
|
-
|
|
40311
|
-
|
|
40312
|
-
|
|
40313
|
-
|
|
40314
|
-
|
|
40315
|
-
|
|
40316
|
-
|
|
39974
|
+
OASIS_TOOLBAR_ITEMS as b$,
|
|
39975
|
+
createComponent as b0,
|
|
39976
|
+
CaretOverlay as b1,
|
|
39977
|
+
Show as b2,
|
|
39978
|
+
createRenderEffect as b3,
|
|
39979
|
+
style as b4,
|
|
39980
|
+
setAttribute as b5,
|
|
39981
|
+
setStyleProperty as b6,
|
|
39982
|
+
memo as b7,
|
|
39983
|
+
template as b8,
|
|
39984
|
+
useI18n as b9,
|
|
39985
|
+
createOasisEditorClient as bA,
|
|
39986
|
+
createEditorZoom as bB,
|
|
39987
|
+
startLongTaskObserver as bC,
|
|
39988
|
+
installGlobalReport as bD,
|
|
39989
|
+
applyStoredPreciseFontPreference as bE,
|
|
39990
|
+
getWelcomeSeen as bF,
|
|
39991
|
+
isLocalFontAccessSupported as bG,
|
|
39992
|
+
EDITOR_SCROLL_PADDING_PX as bH,
|
|
39993
|
+
Toolbar as bI,
|
|
39994
|
+
OasisEditorLoading as bJ,
|
|
39995
|
+
I18nProvider as bK,
|
|
39996
|
+
createEditorLogger as bL,
|
|
39997
|
+
createTranslator as bM,
|
|
39998
|
+
getCachedCanvasImage as bN,
|
|
39999
|
+
registerDomStatsSurface as bO,
|
|
40000
|
+
Button as bP,
|
|
40001
|
+
Checkbox as bQ,
|
|
40002
|
+
ColorPicker as bR,
|
|
40003
|
+
CommandRegistry as bS,
|
|
40004
|
+
DEFAULT_PALETTE as bT,
|
|
40005
|
+
DialogFooter as bU,
|
|
40006
|
+
FloatingActionButton as bV,
|
|
40007
|
+
GridPicker as bW,
|
|
40008
|
+
IconButton as bX,
|
|
40009
|
+
Menu as bY,
|
|
40010
|
+
OASIS_BUILTIN_COMMANDS as bZ,
|
|
40011
|
+
OASIS_MENU_ITEMS as b_,
|
|
40012
|
+
insert as ba,
|
|
40013
|
+
use as bb,
|
|
40014
|
+
addEventListener as bc,
|
|
40015
|
+
Dialog as bd,
|
|
40016
|
+
delegateEvents as be,
|
|
40017
|
+
className as bf,
|
|
40018
|
+
For as bg,
|
|
40019
|
+
UNDERLINE_STYLE_OPTIONS as bh,
|
|
40020
|
+
Tabs as bi,
|
|
40021
|
+
measureParagraphMinContentWidthPx as bj,
|
|
40022
|
+
getEditableBlocksForZone as bk,
|
|
40023
|
+
findParagraphLocation as bl,
|
|
40024
|
+
createSectionBoundaryParagraph as bm,
|
|
40025
|
+
normalizePageSettings as bn,
|
|
40026
|
+
DEFAULT_EDITOR_PAGE_SETTINGS as bo,
|
|
40027
|
+
markStart as bp,
|
|
40028
|
+
markEnd as bq,
|
|
40029
|
+
getParagraphEntries as br,
|
|
40030
|
+
getParagraphById as bs,
|
|
40031
|
+
PluginUiHost as bt,
|
|
40032
|
+
OasisEditorEditor as bu,
|
|
40033
|
+
perfTimer as bv,
|
|
40034
|
+
OasisBrandMark as bw,
|
|
40035
|
+
setPreciseFontPreference as bx,
|
|
40036
|
+
setWelcomeSeen as by,
|
|
40037
|
+
enablePreciseFontMode as bz,
|
|
40317
40038
|
createEditorParagraphFromRuns as c,
|
|
40318
|
-
|
|
40319
|
-
|
|
40320
|
-
|
|
40321
|
-
|
|
40322
|
-
|
|
40323
|
-
|
|
40324
|
-
|
|
40325
|
-
|
|
40326
|
-
|
|
40327
|
-
|
|
40328
|
-
|
|
40329
|
-
|
|
40330
|
-
|
|
40331
|
-
|
|
40332
|
-
|
|
40333
|
-
|
|
40334
|
-
|
|
40335
|
-
|
|
40039
|
+
OasisEditorAppLazy as c0,
|
|
40040
|
+
OasisEditorContainer as c1,
|
|
40041
|
+
PluginCollection as c2,
|
|
40042
|
+
Popover as c3,
|
|
40043
|
+
RIBBON_TABS as c4,
|
|
40044
|
+
Select as c5,
|
|
40045
|
+
SelectField as c6,
|
|
40046
|
+
Separator as c7,
|
|
40047
|
+
SidePanel as c8,
|
|
40048
|
+
SidePanelBody as c9,
|
|
40049
|
+
SidePanelFooter as ca,
|
|
40050
|
+
SidePanelHeader as cb,
|
|
40051
|
+
SplitButton as cc,
|
|
40052
|
+
TextField as cd,
|
|
40053
|
+
Button$1 as ce,
|
|
40054
|
+
buildRibbonTabDefinitions as cf,
|
|
40055
|
+
createEditorCommandBus as cg,
|
|
40056
|
+
createOasisEditor as ch,
|
|
40057
|
+
createOasisEditorContainer as ci,
|
|
40058
|
+
mount as cj,
|
|
40059
|
+
registerToolbarRenderer as ck,
|
|
40336
40060
|
getDocumentSections as d,
|
|
40337
40061
|
createEditorStyledRun as e,
|
|
40338
40062
|
getParagraphText as f,
|
|
@@ -40351,8 +40075,8 @@ export {
|
|
|
40351
40075
|
findParagraphTableLocation as s,
|
|
40352
40076
|
buildTableCellLayout as t,
|
|
40353
40077
|
createEditorTableCell as u,
|
|
40354
|
-
|
|
40355
|
-
|
|
40078
|
+
createEditorTableRow as v,
|
|
40079
|
+
createEditorTable as w,
|
|
40356
40080
|
underlineStyleToCssDecorationStyle as x,
|
|
40357
40081
|
resolveImageSrc as y,
|
|
40358
40082
|
createEditorFootnote as z
|