@esri/solution-common 1.3.10 → 1.3.13
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/esm/completeItem.d.ts +1 -1
- package/dist/esm/completeItem.js +1 -1
- package/dist/esm/deleteHelpers/deleteEmptyGroups.d.ts +1 -1
- package/dist/esm/deleteHelpers/deleteEmptyGroups.js +1 -1
- package/dist/esm/deleteHelpers/deleteGroupIfEmpty.d.ts +1 -1
- package/dist/esm/deleteHelpers/deleteGroupIfEmpty.js +1 -1
- package/dist/esm/deleteHelpers/deleteSolutionContents.d.ts +1 -1
- package/dist/esm/deleteHelpers/deleteSolutionContents.js +1 -1
- package/dist/esm/deleteHelpers/deleteSolutionFolder.d.ts +1 -1
- package/dist/esm/deleteHelpers/deleteSolutionFolder.js +1 -1
- package/dist/esm/deleteHelpers/deleteSolutionItem.d.ts +1 -1
- package/dist/esm/deleteHelpers/deleteSolutionItem.js +1 -1
- package/dist/esm/deleteHelpers/reconstructBuildOrderIds.d.ts +1 -1
- package/dist/esm/deleteHelpers/reconstructBuildOrderIds.js +1 -1
- package/dist/esm/deleteHelpers/removeItems.d.ts +1 -1
- package/dist/esm/deleteHelpers/removeItems.js +1 -1
- package/dist/esm/deleteSolution.d.ts +2 -2
- package/dist/esm/deleteSolution.js +2 -2
- package/dist/esm/dependencies.d.ts +1 -1
- package/dist/esm/dependencies.js +2 -2
- package/dist/esm/featureServiceHelpers.d.ts +99 -60
- package/dist/esm/featureServiceHelpers.js +99 -60
- package/dist/esm/featureServiceHelpers.js.map +1 -1
- package/dist/esm/generalHelpers.d.ts +34 -34
- package/dist/esm/generalHelpers.js +36 -36
- package/dist/esm/getDeletableSolutionInfo.d.ts +1 -1
- package/dist/esm/getDeletableSolutionInfo.js +1 -1
- package/dist/esm/getSolutionSummary.d.ts +1 -1
- package/dist/esm/getSolutionSummary.js +1 -1
- package/dist/esm/interfaces.d.ts +438 -10
- package/dist/esm/interfaces.js +7 -1
- package/dist/esm/interfaces.js.map +1 -1
- package/dist/esm/libConnectors.d.ts +5 -5
- package/dist/esm/libConnectors.js +5 -5
- package/dist/esm/migrations/apply-schema.d.ts +1 -0
- package/dist/esm/migrations/apply-schema.js +1 -0
- package/dist/esm/migrations/apply-schema.js.map +1 -1
- package/dist/esm/migrations/upgrade-three-dot-one.d.ts +1 -0
- package/dist/esm/migrations/upgrade-three-dot-one.js +1 -0
- package/dist/esm/migrations/upgrade-three-dot-one.js.map +1 -1
- package/dist/esm/migrations/upgrade-two-dot-seven.d.ts +7 -0
- package/dist/esm/migrations/upgrade-two-dot-seven.js +7 -0
- package/dist/esm/migrations/upgrade-two-dot-seven.js.map +1 -1
- package/dist/esm/polyfills.d.ts +2 -2
- package/dist/esm/polyfills.js +2 -2
- package/dist/esm/resourceHelpers.d.ts +11 -11
- package/dist/esm/resourceHelpers.js +11 -11
- package/dist/esm/resources/addMetadataFromBlob.d.ts +1 -1
- package/dist/esm/resources/addMetadataFromBlob.js +1 -1
- package/dist/esm/resources/convert-item-resource-to-storage-resource.d.ts +1 -1
- package/dist/esm/resources/convert-item-resource-to-storage-resource.js +1 -1
- package/dist/esm/resources/convert-storage-resource-to-item-resource.d.ts +1 -1
- package/dist/esm/resources/convert-storage-resource-to-item-resource.js +1 -1
- package/dist/esm/resources/copyAssociatedFiles.d.ts +4 -3
- package/dist/esm/resources/copyAssociatedFiles.js +5 -4
- package/dist/esm/resources/copyAssociatedFiles.js.map +1 -1
- package/dist/esm/resources/copyDataIntoItem.d.ts +2 -2
- package/dist/esm/resources/copyDataIntoItem.js +2 -2
- package/dist/esm/resources/copyMetadataIntoItem.d.ts +1 -1
- package/dist/esm/resources/copyMetadataIntoItem.js +1 -1
- package/dist/esm/resources/copyResourceIntoZip.d.ts +2 -2
- package/dist/esm/resources/copyResourceIntoZip.js +2 -2
- package/dist/esm/resources/copyZipIntoItem.d.ts +1 -1
- package/dist/esm/resources/copyZipIntoItem.js +1 -1
- package/dist/esm/resources/createCopyResults.d.ts +1 -1
- package/dist/esm/resources/createCopyResults.js +1 -1
- package/dist/esm/resources/get-blob.d.ts +1 -1
- package/dist/esm/resources/get-blob.js +1 -1
- package/dist/esm/resources/getItemResourcesFilesFromPaths.d.ts +1 -1
- package/dist/esm/resources/getItemResourcesFilesFromPaths.js +1 -1
- package/dist/esm/resources/getItemResourcesPaths.d.ts +1 -1
- package/dist/esm/resources/getItemResourcesPaths.js +1 -1
- package/dist/esm/resources/transform-resource-paths-to-solution-resources.d.ts +1 -0
- package/dist/esm/resources/transform-resource-paths-to-solution-resources.js +1 -0
- package/dist/esm/resources/transform-resource-paths-to-solution-resources.js.map +1 -1
- package/dist/esm/restHelpers.d.ts +59 -54
- package/dist/esm/restHelpers.js +55 -50
- package/dist/esm/restHelpers.js.map +1 -1
- package/dist/esm/restHelpersGet.d.ts +30 -30
- package/dist/esm/restHelpersGet.js +30 -30
- package/dist/esm/templatization.d.ts +15 -15
- package/dist/esm/templatization.js +15 -15
- package/dist/esm/trackingHelpers.d.ts +9 -9
- package/dist/esm/trackingHelpers.js +9 -9
- package/dist/esm/velocityHelpers.d.ts +4 -4
- package/dist/esm/velocityHelpers.js +4 -4
- package/dist/esm/workforceHelpers.d.ts +8 -7
- package/dist/esm/workforceHelpers.js +18 -7
- package/dist/esm/workforceHelpers.js.map +1 -1
- package/dist/node/completeItem.d.ts +1 -1
- package/dist/node/completeItem.js +1 -1
- package/dist/node/deleteHelpers/deleteEmptyGroups.d.ts +1 -1
- package/dist/node/deleteHelpers/deleteEmptyGroups.js +1 -1
- package/dist/node/deleteHelpers/deleteGroupIfEmpty.d.ts +1 -1
- package/dist/node/deleteHelpers/deleteGroupIfEmpty.js +1 -1
- package/dist/node/deleteHelpers/deleteSolutionContents.d.ts +1 -1
- package/dist/node/deleteHelpers/deleteSolutionContents.js +1 -1
- package/dist/node/deleteHelpers/deleteSolutionFolder.d.ts +1 -1
- package/dist/node/deleteHelpers/deleteSolutionFolder.js +1 -1
- package/dist/node/deleteHelpers/deleteSolutionItem.d.ts +1 -1
- package/dist/node/deleteHelpers/deleteSolutionItem.js +1 -1
- package/dist/node/deleteHelpers/reconstructBuildOrderIds.d.ts +1 -1
- package/dist/node/deleteHelpers/reconstructBuildOrderIds.js +1 -1
- package/dist/node/deleteHelpers/removeItems.d.ts +1 -1
- package/dist/node/deleteHelpers/removeItems.js +1 -1
- package/dist/node/deleteSolution.d.ts +2 -2
- package/dist/node/deleteSolution.js +2 -2
- package/dist/node/dependencies.d.ts +1 -1
- package/dist/node/dependencies.js +2 -2
- package/dist/node/featureServiceHelpers.d.ts +99 -60
- package/dist/node/featureServiceHelpers.js +99 -60
- package/dist/node/featureServiceHelpers.js.map +1 -1
- package/dist/node/generalHelpers.d.ts +34 -34
- package/dist/node/generalHelpers.js +36 -36
- package/dist/node/getDeletableSolutionInfo.d.ts +1 -1
- package/dist/node/getDeletableSolutionInfo.js +1 -1
- package/dist/node/getSolutionSummary.d.ts +1 -1
- package/dist/node/getSolutionSummary.js +1 -1
- package/dist/node/interfaces.d.ts +438 -10
- package/dist/node/interfaces.js +7 -1
- package/dist/node/interfaces.js.map +1 -1
- package/dist/node/libConnectors.d.ts +5 -5
- package/dist/node/libConnectors.js +5 -5
- package/dist/node/migrations/apply-schema.d.ts +1 -0
- package/dist/node/migrations/apply-schema.js +1 -0
- package/dist/node/migrations/apply-schema.js.map +1 -1
- package/dist/node/migrations/upgrade-three-dot-one.d.ts +1 -0
- package/dist/node/migrations/upgrade-three-dot-one.js +1 -0
- package/dist/node/migrations/upgrade-three-dot-one.js.map +1 -1
- package/dist/node/migrations/upgrade-two-dot-seven.d.ts +7 -0
- package/dist/node/migrations/upgrade-two-dot-seven.js +7 -0
- package/dist/node/migrations/upgrade-two-dot-seven.js.map +1 -1
- package/dist/node/polyfills.d.ts +2 -2
- package/dist/node/polyfills.js +2 -2
- package/dist/node/resourceHelpers.d.ts +11 -11
- package/dist/node/resourceHelpers.js +11 -11
- package/dist/node/resources/addMetadataFromBlob.d.ts +1 -1
- package/dist/node/resources/addMetadataFromBlob.js +1 -1
- package/dist/node/resources/convert-item-resource-to-storage-resource.d.ts +1 -1
- package/dist/node/resources/convert-item-resource-to-storage-resource.js +1 -1
- package/dist/node/resources/convert-storage-resource-to-item-resource.d.ts +1 -1
- package/dist/node/resources/convert-storage-resource-to-item-resource.js +1 -1
- package/dist/node/resources/copyAssociatedFiles.d.ts +4 -3
- package/dist/node/resources/copyAssociatedFiles.js +5 -4
- package/dist/node/resources/copyAssociatedFiles.js.map +1 -1
- package/dist/node/resources/copyDataIntoItem.d.ts +2 -2
- package/dist/node/resources/copyDataIntoItem.js +2 -2
- package/dist/node/resources/copyMetadataIntoItem.d.ts +1 -1
- package/dist/node/resources/copyMetadataIntoItem.js +1 -1
- package/dist/node/resources/copyResourceIntoZip.d.ts +2 -2
- package/dist/node/resources/copyResourceIntoZip.js +2 -2
- package/dist/node/resources/copyZipIntoItem.d.ts +1 -1
- package/dist/node/resources/copyZipIntoItem.js +1 -1
- package/dist/node/resources/createCopyResults.d.ts +1 -1
- package/dist/node/resources/createCopyResults.js +1 -1
- package/dist/node/resources/get-blob.d.ts +1 -1
- package/dist/node/resources/get-blob.js +1 -1
- package/dist/node/resources/getItemResourcesFilesFromPaths.d.ts +1 -1
- package/dist/node/resources/getItemResourcesFilesFromPaths.js +1 -1
- package/dist/node/resources/getItemResourcesPaths.d.ts +1 -1
- package/dist/node/resources/getItemResourcesPaths.js +1 -1
- package/dist/node/resources/transform-resource-paths-to-solution-resources.d.ts +1 -0
- package/dist/node/resources/transform-resource-paths-to-solution-resources.js +1 -0
- package/dist/node/resources/transform-resource-paths-to-solution-resources.js.map +1 -1
- package/dist/node/restHelpers.d.ts +59 -54
- package/dist/node/restHelpers.js +55 -50
- package/dist/node/restHelpers.js.map +1 -1
- package/dist/node/restHelpersGet.d.ts +30 -30
- package/dist/node/restHelpersGet.js +30 -30
- package/dist/node/templatization.d.ts +15 -15
- package/dist/node/templatization.js +15 -15
- package/dist/node/trackingHelpers.d.ts +9 -9
- package/dist/node/trackingHelpers.js +9 -9
- package/dist/node/velocityHelpers.d.ts +4 -4
- package/dist/node/velocityHelpers.js +4 -4
- package/dist/node/workforceHelpers.d.ts +8 -7
- package/dist/node/workforceHelpers.js +18 -7
- package/dist/node/workforceHelpers.js.map +1 -1
- package/dist/umd/common.umd.js +399 -313
- package/dist/umd/common.umd.js.map +1 -1
- package/dist/umd/common.umd.min.js +3 -3
- package/dist/umd/common.umd.min.js.map +1 -1
- package/dist/umd/completeItem.d.ts +1 -1
- package/dist/umd/deleteHelpers/deleteEmptyGroups.d.ts +1 -1
- package/dist/umd/deleteHelpers/deleteGroupIfEmpty.d.ts +1 -1
- package/dist/umd/deleteHelpers/deleteSolutionContents.d.ts +1 -1
- package/dist/umd/deleteHelpers/deleteSolutionFolder.d.ts +1 -1
- package/dist/umd/deleteHelpers/deleteSolutionItem.d.ts +1 -1
- package/dist/umd/deleteHelpers/reconstructBuildOrderIds.d.ts +1 -1
- package/dist/umd/deleteHelpers/removeItems.d.ts +1 -1
- package/dist/umd/deleteSolution.d.ts +2 -2
- package/dist/umd/dependencies.d.ts +1 -1
- package/dist/umd/featureServiceHelpers.d.ts +99 -60
- package/dist/umd/generalHelpers.d.ts +34 -34
- package/dist/umd/getDeletableSolutionInfo.d.ts +1 -1
- package/dist/umd/getSolutionSummary.d.ts +1 -1
- package/dist/umd/interfaces.d.ts +438 -10
- package/dist/umd/libConnectors.d.ts +5 -5
- package/dist/umd/migrations/apply-schema.d.ts +1 -0
- package/dist/umd/migrations/upgrade-three-dot-one.d.ts +1 -0
- package/dist/umd/migrations/upgrade-two-dot-seven.d.ts +7 -0
- package/dist/umd/polyfills.d.ts +2 -2
- package/dist/umd/resourceHelpers.d.ts +11 -11
- package/dist/umd/resources/addMetadataFromBlob.d.ts +1 -1
- package/dist/umd/resources/convert-item-resource-to-storage-resource.d.ts +1 -1
- package/dist/umd/resources/convert-storage-resource-to-item-resource.d.ts +1 -1
- package/dist/umd/resources/copyAssociatedFiles.d.ts +4 -3
- package/dist/umd/resources/copyDataIntoItem.d.ts +2 -2
- package/dist/umd/resources/copyMetadataIntoItem.d.ts +1 -1
- package/dist/umd/resources/copyResourceIntoZip.d.ts +2 -2
- package/dist/umd/resources/copyZipIntoItem.d.ts +1 -1
- package/dist/umd/resources/createCopyResults.d.ts +1 -1
- package/dist/umd/resources/get-blob.d.ts +1 -1
- package/dist/umd/resources/getItemResourcesFilesFromPaths.d.ts +1 -1
- package/dist/umd/resources/getItemResourcesPaths.d.ts +1 -1
- package/dist/umd/resources/transform-resource-paths-to-solution-resources.d.ts +1 -0
- package/dist/umd/restHelpers.d.ts +59 -54
- package/dist/umd/restHelpersGet.d.ts +30 -30
- package/dist/umd/templatization.d.ts +15 -15
- package/dist/umd/trackingHelpers.d.ts +9 -9
- package/dist/umd/velocityHelpers.d.ts +4 -4
- package/dist/umd/workforceHelpers.d.ts +8 -7
- package/package.json +18 -17
package/dist/umd/common.umd.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* @preserve
|
|
2
|
-
* @esri/solution-common - v1.3.
|
|
2
|
+
* @esri/solution-common - v1.3.13 - Apache-2.0
|
|
3
3
|
* Copyright (c) 2018-2022 Esri, Inc.
|
|
4
|
-
* Tue
|
|
4
|
+
* Tue Apr 26 2022 15:01:53 GMT-0700 (Pacific Daylight Time)
|
|
5
5
|
*
|
|
6
6
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
7
|
* you may not use this file except in compliance with the License.
|
|
@@ -2016,14 +2016,14 @@
|
|
|
2016
2016
|
var jszip_min = {exports: {}};
|
|
2017
2017
|
|
|
2018
2018
|
(function (module, exports) {
|
|
2019
|
-
!function(t){module.exports=t();}(function(){return function s(a,o,h){function u(r,t){if(!o[r]){if(!a[r]){var e="function"==typeof commonjsRequire&&commonjsRequire;if(!t&&e)return e(r,!0);if(l)return l(r,!0);var i=new Error("Cannot find module '"+r+"'");throw i.code="MODULE_NOT_FOUND",i}var n=o[r]={exports:{}};a[r][0].call(n.exports,function(t){var e=a[r][1][t];return u(e||t)},n,n.exports,s,a,o,h);}return o[r].exports}for(var l="function"==typeof commonjsRequire&&commonjsRequire,t=0;t<h.length;t++)u(h[t]);return u}({1:[function(t,e,r){var c=t("./utils"),d=t("./support"),p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(t){for(var e,r,i,n,s,a,o,h=[],u=0,l=t.length,f=l,d="string"!==c.getTypeOf(t);u<t.length;)f=l-u,i=d?(e=t[u++],r=u<l?t[u++]:0,u<l?t[u++]:0):(e=t.charCodeAt(u++),r=u<l?t.charCodeAt(u++):0,u<l?t.charCodeAt(u++):0),n=e>>2,s=(3&e)<<4|r>>4,a=1<f?(15&r)<<2|i>>6:64,o=2<f?63&i:64,h.push(p.charAt(n)+p.charAt(s)+p.charAt(a)+p.charAt(o));return h.join("")},r.decode=function(t){var e,r,i,n,s,a,o=0,h=0,u="data:";if(t.substr(0,u.length)===u)throw new Error("Invalid base64 input, it looks like a data url.");var l,f=3*(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(t.charAt(t.length-1)===p.charAt(64)&&f--,t.charAt(t.length-2)===p.charAt(64)&&f--,f%1!=0)throw new Error("Invalid base64 input, bad content length.");for(l=d.uint8array?new Uint8Array(0|f):new Array(0|f);o<t.length;)e=p.indexOf(t.charAt(o++))<<2|(n=p.indexOf(t.charAt(o++)))>>4,r=(15&n)<<4|(s=p.indexOf(t.charAt(o++)))>>2,i=(3&s)<<6|(a=p.indexOf(t.charAt(o++))),l[h++]=e,64!==s&&(l[h++]=r),64!==a&&(l[h++]=i);return l};},{"./support":30,"./utils":32}],2:[function(t,e,r){var i=t("./external"),n=t("./stream/DataWorker"),s=t("./stream/Crc32Probe"),a=t("./stream/DataLengthProbe");function o(t,e,r,i,n){this.compressedSize=t,this.uncompressedSize=e,this.crc32=r,this.compression=i,this.compressedContent=n;}o.prototype={getContentWorker:function(){var t=new n(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),e=this;return t.on("end",function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),t},getCompressedWorker:function(){return new n(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},o.createWorkerFrom=function(t,e,r){return t.pipe(new s).pipe(new a("uncompressedSize")).pipe(e.compressWorker(r)).pipe(new a("compressedSize")).withStreamInfo("compression",e)},e.exports=o;},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,e,r){var i=t("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(t){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},r.DEFLATE=t("./flate");},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,e,r){var i=t("./utils");var o=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t;}return e}();e.exports=function(t,e){return void 0!==t&&t.length?"string"!==i.getTypeOf(t)?function(t,e,r,i){var n=o,s=i+r;t^=-1;for(var a=i;a<s;a++)t=t>>>8^n[255&(t^e[a])];return -1^t}(0|e,t,t.length,0):function(t,e,r,i){var n=o,s=i+r;t^=-1;for(var a=i;a<s;a++)t=t>>>8^n[255&(t^e.charCodeAt(a))];return -1^t}(0|e,t,t.length,0):0};},{"./utils":32}],5:[function(t,e,r){r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null;},{}],6:[function(t,e,r){var i=null;i="undefined"!=typeof Promise?Promise:t("lie"),e.exports={Promise:i};},{lie:37}],7:[function(t,e,r){var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,n=t("pako"),s=t("./utils"),a=t("./stream/GenericWorker"),o=i?"uint8array":"array";function h(t,e){a.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={};}r.magic="\b\0",s.inherits(h,a),h.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(s.transformTo(o,t.data),!1);},h.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0);},h.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null;},h.prototype._createPako=function(){this._pako=new n[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta});};},r.compressWorker=function(t){return new h("Deflate",t)},r.uncompressWorker=function(){return new h("Inflate",{})};},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,r){function A(t,e){var r,i="";for(r=0;r<e;r++)i+=String.fromCharCode(255&t),t>>>=8;return i}function i(t,e,r,i,n,s){var a,o,h=t.file,u=t.compression,l=s!==O.utf8encode,f=I.transformTo("string",s(h.name)),d=I.transformTo("string",O.utf8encode(h.name)),c=h.comment,p=I.transformTo("string",s(c)),m=I.transformTo("string",O.utf8encode(c)),_=d.length!==h.name.length,g=m.length!==c.length,b="",v="",y="",w=h.dir,k=h.date,x={crc32:0,compressedSize:0,uncompressedSize:0};e&&!r||(x.crc32=t.crc32,x.compressedSize=t.compressedSize,x.uncompressedSize=t.uncompressedSize);var S=0;e&&(S|=8),l||!_&&!g||(S|=2048);var z=0,C=0;w&&(z|=16),"UNIX"===n?(C=798,z|=function(t,e){var r=t;return t||(r=e?16893:33204),(65535&r)<<16}(h.unixPermissions,w)):(C=20,z|=function(t){return 63&(t||0)}(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)+d,b+="up"+A(v.length,2)+v),g&&(y=A(1,1)+A(B(p),4)+m,b+="uc"+A(y.length,2)+y);var E="";return E+="\n\0",E+=A(S,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(i,4)+f+b+p}}var I=t("../utils"),n=t("../stream/GenericWorker"),O=t("../utf8"),B=t("../crc32"),R=t("../signature");function s(t,e,r,i){n.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=r,this.encodeFileName=i,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[];}I.inherits(s,n),s.prototype.push=function(t){var e=t.meta.percent||0,r=this.entriesCount,i=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,n.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:r?(e+100*(r-i-1))/r:100}}));},s.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var r=i(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}});}else this.accumulate=!0;},s.prototype.closedSource=function(t){this.accumulate=!1;var e=this.streamFiles&&!t.file.dir,r=i(t,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),e)this.push({data:function(t){return R.DATA_DESCRIPTOR+A(t.crc32,4)+A(t.compressedSize,4)+A(t.uncompressedSize,4)}(t),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null;},s.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e<this.dirRecords.length;e++)this.push({data:this.dirRecords[e],meta:{percent:100}});var r=this.bytesWritten-t,i=function(t,e,r,i,n){var s=I.transformTo("string",n(i));return R.CENTRAL_DIRECTORY_END+"\0\0\0\0"+A(t,2)+A(t,2)+A(e,4)+A(r,4)+A(s.length,2)+s}(this.dirRecords.length,r,t,this.zipComment,this.encodeFileName);this.push({data:i,meta:{percent:100}});},s.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume();},s.prototype.registerPrevious=function(t){this._sources.push(t);var e=this;return t.on("data",function(t){e.processChunk(t);}),t.on("end",function(){e.closedSource(e.previous.streamInfo),e._sources.length?e.prepareNextSource():e.end();}),t.on("error",function(t){e.error(t);}),this},s.prototype.resume=function(){return !!n.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},s.prototype.error=function(t){var e=this._sources;if(!n.prototype.error.call(this,t))return !1;for(var r=0;r<e.length;r++)try{e[r].error(t);}catch(t){}return !0},s.prototype.lock=function(){n.prototype.lock.call(this);for(var t=this._sources,e=0;e<t.length;e++)t[e].lock();},e.exports=s;},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(t,e,r){var u=t("../compressions"),i=t("./ZipFileWorker");r.generateWorker=function(t,a,e){var o=new i(a.streamFiles,e,a.platform,a.encodeFileName),h=0;try{t.forEach(function(t,e){h++;var r=function(t,e){var r=t||e,i=u[r];if(!i)throw new Error(r+" is not a valid compression method !");return i}(e.options.compression,a.compression),i=e.options.compressionOptions||a.compressionOptions||{},n=e.dir,s=e.date;e._compressWorker(r,i).withStreamInfo("file",{name:t,dir:n,date:s,comment:e.comment||"",unixPermissions:e.unixPermissions,dosPermissions:e.dosPermissions}).pipe(o);}),o.entriesCount=h;}catch(t){o.error(t);}return o};},{"../compressions":3,"./ZipFileWorker":8}],10:[function(t,e,r){function i(){if(!(this instanceof i))return new i;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var t=new i;for(var e in this)"function"!=typeof this[e]&&(t[e]=this[e]);return t};}(i.prototype=t("./object")).loadAsync=t("./load"),i.support=t("./support"),i.defaults=t("./defaults"),i.version="3.7.1",i.loadAsync=function(t,e){return (new i).loadAsync(t,e)},i.external=t("./external"),e.exports=i;},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(t,e,r){var i=t("./utils"),n=t("./external"),o=t("./utf8"),h=t("./zipEntries"),s=t("./stream/Crc32Probe"),u=t("./nodejsUtils");function l(i){return new n.Promise(function(t,e){var r=i.decompressed.getContentWorker().pipe(new s);r.on("error",function(t){e(t);}).on("end",function(){r.streamInfo.crc32!==i.decompressed.crc32?e(new Error("Corrupted zip : CRC32 mismatch")):t();}).resume();})}e.exports=function(t,s){var a=this;return s=i.extend(s||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:o.utf8decode}),u.isNode&&u.isStream(t)?n.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",t,!0,s.optimizedBinaryString,s.base64).then(function(t){var e=new h(s);return e.load(t),e}).then(function(t){var e=[n.Promise.resolve(t)],r=t.files;if(s.checkCRC32)for(var i=0;i<r.length;i++)e.push(l(r[i]));return n.Promise.all(e)}).then(function(t){for(var e=t.shift(),r=e.files,i=0;i<r.length;i++){var n=r[i];a.file(n.fileNameStr,n.decompressed,{binary:!0,optimizedBinaryString:!0,date:n.date,dir:n.dir,comment:n.fileCommentStr.length?n.fileCommentStr:null,unixPermissions:n.unixPermissions,dosPermissions:n.dosPermissions,createFolders:s.createFolders});}return e.zipComment.length&&(a.comment=e.zipComment),a})};},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(t,e,r){var i=t("../utils"),n=t("../stream/GenericWorker");function s(t,e){n.call(this,"Nodejs stream input adapter for "+t),this._upstreamEnded=!1,this._bindStream(e);}i.inherits(s,n),s.prototype._bindStream=function(t){var e=this;(this._stream=t).pause(),t.on("data",function(t){e.push({data:t,meta:{percent:0}});}).on("error",function(t){e.isPaused?this.generatedError=t:e.error(t);}).on("end",function(){e.isPaused?e._upstreamEnded=!0:e.end();});},s.prototype.pause=function(){return !!n.prototype.pause.call(this)&&(this._stream.pause(),!0)},s.prototype.resume=function(){return !!n.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},e.exports=s;},{"../stream/GenericWorker":28,"../utils":32}],13:[function(t,e,r){var n=t("readable-stream").Readable;function i(t,e,r){n.call(this,e),this._helper=t;var i=this;t.on("data",function(t,e){i.push(t)||i._helper.pause(),r&&r(e);}).on("error",function(t){i.emit("error",t);}).on("end",function(){i.push(null);});}t("../utils").inherits(i,n),i.prototype._read=function(){this._helper.resume();},e.exports=i;},{"../utils":32,"readable-stream":16}],14:[function(t,e,r){e.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(t,e){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(t,e);if("number"==typeof t)throw new Error('The "data" argument must not be a number');return new Buffer(t,e)},allocBuffer:function(t){if(Buffer.alloc)return Buffer.alloc(t);var e=new Buffer(t);return e.fill(0),e},isBuffer:function(t){return isBuffer(t)},isStream:function(t){return t&&"function"==typeof t.on&&"function"==typeof t.pause&&"function"==typeof t.resume}};},{}],15:[function(t,e,r){function s(t,e,r){var i,n=u.getTypeOf(e),s=u.extend(r||{},f);s.date=s.date||new Date,null!==s.compression&&(s.compression=s.compression.toUpperCase()),"string"==typeof s.unixPermissions&&(s.unixPermissions=parseInt(s.unixPermissions,8)),s.unixPermissions&&16384&s.unixPermissions&&(s.dir=!0),s.dosPermissions&&16&s.dosPermissions&&(s.dir=!0),s.dir&&(t=g(t)),s.createFolders&&(i=_(t))&&b.call(this,i,!0);var a="string"===n&&!1===s.binary&&!1===s.base64;r&&void 0!==r.binary||(s.binary=!a),(e instanceof d&&0===e.uncompressedSize||s.dir||!e||0===e.length)&&(s.base64=!1,s.binary=!0,e="",s.compression="STORE",n="string");var o=null;o=e instanceof d||e instanceof l?e:p.isNode&&p.isStream(e)?new m(t,e):u.prepareContent(t,e,s.binary,s.optimizedBinaryString,s.base64);var h=new c(t,o,s);this.files[t]=h;}var n=t("./utf8"),u=t("./utils"),l=t("./stream/GenericWorker"),a=t("./stream/StreamHelper"),f=t("./defaults"),d=t("./compressedObject"),c=t("./zipObject"),o=t("./generate"),p=t("./nodejsUtils"),m=t("./nodejs/NodejsStreamInputAdapter"),_=function(t){"/"===t.slice(-1)&&(t=t.substring(0,t.length-1));var e=t.lastIndexOf("/");return 0<e?t.substring(0,e):""},g=function(t){return "/"!==t.slice(-1)&&(t+="/"),t},b=function(t,e){return e=void 0!==e?e:f.createFolders,t=g(t),this.files[t]||s.call(this,t,null,{dir:!0,createFolders:e}),this.files[t]};function h(t){return "[object RegExp]"===Object.prototype.toString.call(t)}var i={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(t){var e,r,i;for(e in this.files)i=this.files[e],(r=e.slice(this.root.length,e.length))&&e.slice(0,this.root.length)===this.root&&t(r,i);},filter:function(r){var i=[];return this.forEach(function(t,e){r(t,e)&&i.push(e);}),i},file:function(t,e,r){if(1!==arguments.length)return t=this.root+t,s.call(this,t,e,r),this;if(h(t)){var i=t;return this.filter(function(t,e){return !e.dir&&i.test(t)})}var n=this.files[this.root+t];return n&&!n.dir?n:null},folder:function(r){if(!r)return this;if(h(r))return this.filter(function(t,e){return e.dir&&r.test(t)});var t=this.root+r,e=b.call(this,t),i=this.clone();return i.root=e.name,i},remove:function(r){r=this.root+r;var t=this.files[r];if(t||("/"!==r.slice(-1)&&(r+="/"),t=this.files[r]),t&&!t.dir)delete this.files[r];else for(var e=this.filter(function(t,e){return e.name.slice(0,r.length)===r}),i=0;i<e.length;i++)delete this.files[e[i].name];return this},generate:function(t){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(t){var e,r={};try{if((r=u.extend(t||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:n.utf8encode})).type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),"binarystring"===r.type&&(r.type="string"),!r.type)throw new Error("No output type specified.");u.checkSupport(r.type),"darwin"!==r.platform&&"freebsd"!==r.platform&&"linux"!==r.platform&&"sunos"!==r.platform||(r.platform="UNIX"),"win32"===r.platform&&(r.platform="DOS");var i=r.comment||this.comment||"";e=o.generateWorker(this,r,i);}catch(t){(e=new l("error")).error(t);}return new a(e,r.type||"string",r.mimeType)},generateAsync:function(t,e){return this.generateInternalStream(t).accumulate(e)},generateNodeStream:function(t,e){return (t=t||{}).type||(t.type="nodebuffer"),this.generateInternalStream(t).toNodejsStream(e)}};e.exports=i;},{"./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(t,e,r){e.exports=t("stream");},{stream:void 0}],17:[function(t,e,r){var i=t("./DataReader");function n(t){i.call(this,t);for(var e=0;e<this.data.length;e++)t[e]=255&t[e];}t("../utils").inherits(n,i),n.prototype.byteAt=function(t){return this.data[this.zero+t]},n.prototype.lastIndexOfSignature=function(t){for(var e=t.charCodeAt(0),r=t.charCodeAt(1),i=t.charCodeAt(2),n=t.charCodeAt(3),s=this.length-4;0<=s;--s)if(this.data[s]===e&&this.data[s+1]===r&&this.data[s+2]===i&&this.data[s+3]===n)return s-this.zero;return -1},n.prototype.readAndCheckSignature=function(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),i=t.charCodeAt(2),n=t.charCodeAt(3),s=this.readData(4);return e===s[0]&&r===s[1]&&i===s[2]&&n===s[3]},n.prototype.readData=function(t){if(this.checkOffset(t),0===t)return [];var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n;},{"../utils":32,"./DataReader":18}],18:[function(t,e,r){var i=t("../utils");function n(t){this.data=t,this.length=t.length,this.index=0,this.zero=0;}n.prototype={checkOffset:function(t){this.checkIndex(this.index+t);},checkIndex:function(t){if(this.length<this.zero+t||t<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+t+"). Corrupted zip ?")},setIndex:function(t){this.checkIndex(t),this.index=t;},skip:function(t){this.setIndex(this.index+t);},byteAt:function(t){},readInt:function(t){var e,r=0;for(this.checkOffset(t),e=this.index+t-1;e>=this.index;e--)r=(r<<8)+this.byteAt(e);return this.index+=t,r},readString:function(t){return i.transformTo("string",this.readData(t))},readData:function(t){},lastIndexOfSignature:function(t){},readAndCheckSignature:function(t){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},e.exports=n;},{"../utils":32}],19:[function(t,e,r){var i=t("./Uint8ArrayReader");function n(t){i.call(this,t);}t("../utils").inherits(n,i),n.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n;},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,r){var i=t("./DataReader");function n(t){i.call(this,t);}t("../utils").inherits(n,i),n.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},n.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},n.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},n.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n;},{"../utils":32,"./DataReader":18}],21:[function(t,e,r){var i=t("./ArrayReader");function n(t){i.call(this,t);}t("../utils").inherits(n,i),n.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n;},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,r){var i=t("../utils"),n=t("../support"),s=t("./ArrayReader"),a=t("./StringReader"),o=t("./NodeBufferReader"),h=t("./Uint8ArrayReader");e.exports=function(t){var e=i.getTypeOf(t);return i.checkSupport(e),"string"!==e||n.uint8array?"nodebuffer"===e?new o(t):n.uint8array?new h(i.transformTo("uint8array",t)):new s(i.transformTo("array",t)):new a(t)};},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,r){r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b";},{}],24:[function(t,e,r){var i=t("./GenericWorker"),n=t("../utils");function s(t){i.call(this,"ConvertWorker to "+t),this.destType=t;}n.inherits(s,i),s.prototype.processChunk=function(t){this.push({data:n.transformTo(this.destType,t.data),meta:t.meta});},e.exports=s;},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,r){var i=t("./GenericWorker"),n=t("../crc32");function s(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0);}t("../utils").inherits(s,i),s.prototype.processChunk=function(t){this.streamInfo.crc32=n(t.data,this.streamInfo.crc32||0),this.push(t);},e.exports=s;},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,r){var i=t("../utils"),n=t("./GenericWorker");function s(t){n.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0);}i.inherits(s,n),s.prototype.processChunk=function(t){if(t){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+t.data.length;}n.prototype.processChunk.call(this,t);},e.exports=s;},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,r){var i=t("../utils"),n=t("./GenericWorker");function s(t){n.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then(function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=i.getTypeOf(t),e.isPaused||e._tickAndRepeat();},function(t){e.error(t);});}i.inherits(s,n),s.prototype.cleanUp=function(){n.prototype.cleanUp.call(this),this.data=null;},s.prototype.resume=function(){return !!n.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0));},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return !1;var t=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":t=this.data.slice(this.index,e);}return this.index=e,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=s;},{"../utils":32,"./GenericWorker":28}],28:[function(t,e,r){function i(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null;}i.prototype={push:function(t){this.emit("data",t);},end:function(){if(this.isFinished)return !1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0;}catch(t){this.emit("error",t);}return !0},error:function(t){return !this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[];},emit:function(t,e){if(this._listeners[t])for(var r=0;r<this._listeners[t].length;r++)this._listeners[t][r].call(this,e);},pipe:function(t){return t.registerPrevious(this)},registerPrevious:function(t){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=t.streamInfo,this.mergeStreamInfo(),this.previous=t;var e=this;return t.on("data",function(t){e.processChunk(t);}),t.on("end",function(){e.end();}),t.on("error",function(t){e.error(t);}),this},pause:function(){return !this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return !1;var t=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),t=!0),this.previous&&this.previous.resume(),!t},flush:function(){},processChunk:function(t){this.push(t);},withStreamInfo:function(t,e){return this.extraStreamInfo[t]=e,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var t in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(t)&&(this.streamInfo[t]=this.extraStreamInfo[t]);},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock();},toString:function(){var t="Worker "+this.name;return this.previous?this.previous+" -> "+t:t}},e.exports=i;},{}],29:[function(t,e,r){var h=t("../utils"),n=t("./ConvertWorker"),s=t("./GenericWorker"),u=t("../base64"),i=t("../support"),a=t("../external"),o=null;if(i.nodestream)try{o=t("../nodejs/NodejsStreamOutputAdapter");}catch(t){}function l(t,o){return new a.Promise(function(e,r){var i=[],n=t._internalType,s=t._outputType,a=t._mimeType;t.on("data",function(t,e){i.push(t),o&&o(e);}).on("error",function(t){i=[],r(t);}).on("end",function(){try{var t=function(t,e,r){switch(t){case"blob":return h.newBlob(h.transformTo("arraybuffer",e),r);case"base64":return u.encode(e);default:return h.transformTo(t,e)}}(s,function(t,e){var r,i=0,n=null,s=0;for(r=0;r<e.length;r++)s+=e[r].length;switch(t){case"string":return e.join("");case"array":return Array.prototype.concat.apply([],e);case"uint8array":for(n=new Uint8Array(s),r=0;r<e.length;r++)n.set(e[r],i),i+=e[r].length;return n;case"nodebuffer":return Buffer.concat(e);default:throw new Error("concat : unsupported type '"+t+"'")}}(n,i),a);e(t);}catch(t){r(t);}i=[];}).resume();})}function f(t,e,r){var i=e;switch(e){case"blob":case"arraybuffer":i="uint8array";break;case"base64":i="string";}try{this._internalType=i,this._outputType=e,this._mimeType=r,h.checkSupport(i),this._worker=t.pipe(new n(i)),t.lock();}catch(t){this._worker=new s("error"),this._worker.error(t);}}f.prototype={accumulate:function(t){return l(this,t)},on:function(t,e){var r=this;return "data"===t?this._worker.on(t,function(t){e.call(r,t.data,t.meta);}):this._worker.on(t,function(){h.delay(e,arguments,r);}),this},resume:function(){return h.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(t){if(h.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new o(this,{objectMode:"nodebuffer"!==this._outputType},t)}},e.exports=f;},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(t,e,r){if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,r.nodebuffer="undefined"!=typeof Buffer,r.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)r.blob=!1;else {var i=new ArrayBuffer(0);try{r.blob=0===new Blob([i],{type:"application/zip"}).size;}catch(t){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);n.append(i),r.blob=0===n.getBlob("application/zip").size;}catch(t){r.blob=!1;}}}try{r.nodestream=!!t("readable-stream").Readable;}catch(t){r.nodestream=!1;}},{"readable-stream":16}],31:[function(t,e,s){for(var o=t("./utils"),h=t("./support"),r=t("./nodejsUtils"),i=t("./stream/GenericWorker"),u=new Array(256),n=0;n<256;n++)u[n]=252<=n?6:248<=n?5:240<=n?4:224<=n?3:192<=n?2:1;u[254]=u[254]=1;function a(){i.call(this,"utf-8 decode"),this.leftOver=null;}function l(){i.call(this,"utf-8 encode");}s.utf8encode=function(t){return h.nodebuffer?r.newBufferFrom(t,"utf-8"):function(t){var e,r,i,n,s,a=t.length,o=0;for(n=0;n<a;n++)55296==(64512&(r=t.charCodeAt(n)))&&n+1<a&&56320==(64512&(i=t.charCodeAt(n+1)))&&(r=65536+(r-55296<<10)+(i-56320),n++),o+=r<128?1:r<2048?2:r<65536?3:4;for(e=h.uint8array?new Uint8Array(o):new Array(o),n=s=0;s<o;n++)55296==(64512&(r=t.charCodeAt(n)))&&n+1<a&&56320==(64512&(i=t.charCodeAt(n+1)))&&(r=65536+(r-55296<<10)+(i-56320),n++),r<128?e[s++]=r:(r<2048?e[s++]=192|r>>>6:(r<65536?e[s++]=224|r>>>12:(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63),e[s++]=128|r>>>6&63),e[s++]=128|63&r);return e}(t)},s.utf8decode=function(t){return h.nodebuffer?o.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,r,i,n,s=t.length,a=new Array(2*s);for(e=r=0;e<s;)if((i=t[e++])<128)a[r++]=i;else if(4<(n=u[i]))a[r++]=65533,e+=n-1;else {for(i&=2===n?31:3===n?15:7;1<n&&e<s;)i=i<<6|63&t[e++],n--;1<n?a[r++]=65533:i<65536?a[r++]=i:(i-=65536,a[r++]=55296|i>>10&1023,a[r++]=56320|1023&i);}return a.length!==r&&(a.subarray?a=a.subarray(0,r):a.length=r),o.applyFromCharCode(a)}(t=o.transformTo(h.uint8array?"uint8array":"array",t))},o.inherits(a,i),a.prototype.processChunk=function(t){var e=o.transformTo(h.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(h.uint8array){var r=e;(e=new Uint8Array(r.length+this.leftOver.length)).set(this.leftOver,0),e.set(r,this.leftOver.length);}else e=this.leftOver.concat(e);this.leftOver=null;}var i=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;0<=r&&128==(192&t[r]);)r--;return r<0?e:0===r?e:r+u[t[r]]>e?r:e}(e),n=e;i!==e.length&&(h.uint8array?(n=e.subarray(0,i),this.leftOver=e.subarray(i,e.length)):(n=e.slice(0,i),this.leftOver=e.slice(i,e.length))),this.push({data:s.utf8decode(n),meta:t.meta});},a.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null);},s.Utf8DecodeWorker=a,o.inherits(l,i),l.prototype.processChunk=function(t){this.push({data:s.utf8encode(t.data),meta:t.meta});},s.Utf8EncodeWorker=l;},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,a){var o=t("./support"),h=t("./base64"),r=t("./nodejsUtils"),i=t("set-immediate-shim"),u=t("./external");function n(t){return t}function l(t,e){for(var r=0;r<t.length;++r)e[r]=255&t.charCodeAt(r);return e}a.newBlob=function(e,r){a.checkSupport("blob");try{return new Blob([e],{type:r})}catch(t){try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return i.append(e),i.getBlob(r)}catch(t){throw new Error("Bug : can't construct the Blob.")}}};var s={stringifyByChunk:function(t,e,r){var i=[],n=0,s=t.length;if(s<=r)return String.fromCharCode.apply(null,t);for(;n<s;)"array"===e||"nodebuffer"===e?i.push(String.fromCharCode.apply(null,t.slice(n,Math.min(n+r,s)))):i.push(String.fromCharCode.apply(null,t.subarray(n,Math.min(n+r,s)))),n+=r;return i.join("")},stringifyByChar:function(t){for(var e="",r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},applyCanBeUsed:{uint8array:function(){try{return o.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(t){return !1}}(),nodebuffer:function(){try{return o.nodebuffer&&1===String.fromCharCode.apply(null,r.allocBuffer(1)).length}catch(t){return !1}}()}};function f(t){var e=65536,r=a.getTypeOf(t),i=!0;if("uint8array"===r?i=s.applyCanBeUsed.uint8array:"nodebuffer"===r&&(i=s.applyCanBeUsed.nodebuffer),i)for(;1<e;)try{return s.stringifyByChunk(t,r,e)}catch(t){e=Math.floor(e/2);}return s.stringifyByChar(t)}function d(t,e){for(var r=0;r<t.length;r++)e[r]=t[r];return e}a.applyFromCharCode=f;var c={};c.string={string:n,array:function(t){return l(t,new Array(t.length))},arraybuffer:function(t){return c.string.uint8array(t).buffer},uint8array:function(t){return l(t,new Uint8Array(t.length))},nodebuffer:function(t){return l(t,r.allocBuffer(t.length))}},c.array={string:f,array:n,arraybuffer:function(t){return new Uint8Array(t).buffer},uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return r.newBufferFrom(t)}},c.arraybuffer={string:function(t){return f(new Uint8Array(t))},array:function(t){return d(new Uint8Array(t),new Array(t.byteLength))},arraybuffer:n,uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return r.newBufferFrom(new Uint8Array(t))}},c.uint8array={string:f,array:function(t){return d(t,new Array(t.length))},arraybuffer:function(t){return t.buffer},uint8array:n,nodebuffer:function(t){return r.newBufferFrom(t)}},c.nodebuffer={string:f,array:function(t){return d(t,new Array(t.length))},arraybuffer:function(t){return c.nodebuffer.uint8array(t).buffer},uint8array:function(t){return d(t,new Uint8Array(t.length))},nodebuffer:n},a.transformTo=function(t,e){if(e=e||"",!t)return e;a.checkSupport(t);var r=a.getTypeOf(e);return c[r][t](e)},a.getTypeOf=function(t){return "string"==typeof t?"string":"[object Array]"===Object.prototype.toString.call(t)?"array":o.nodebuffer&&r.isBuffer(t)?"nodebuffer":o.uint8array&&t instanceof Uint8Array?"uint8array":o.arraybuffer&&t instanceof ArrayBuffer?"arraybuffer":void 0},a.checkSupport=function(t){if(!o[t.toLowerCase()])throw new Error(t+" is not supported by this platform")},a.MAX_VALUE_16BITS=65535,a.MAX_VALUE_32BITS=-1,a.pretty=function(t){var e,r,i="";for(r=0;r<(t||"").length;r++)i+="\\x"+((e=t.charCodeAt(r))<16?"0":"")+e.toString(16).toUpperCase();return i},a.delay=function(t,e,r){i(function(){t.apply(r||null,e||[]);});},a.inherits=function(t,e){function r(){}r.prototype=e.prototype,t.prototype=new r;},a.extend=function(){var t,e,r={};for(t=0;t<arguments.length;t++)for(e in arguments[t])arguments[t].hasOwnProperty(e)&&void 0===r[e]&&(r[e]=arguments[t][e]);return r},a.prepareContent=function(r,t,i,n,s){return u.Promise.resolve(t).then(function(i){return o.blob&&(i instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(i)))&&"undefined"!=typeof FileReader?new u.Promise(function(e,r){var t=new FileReader;t.onload=function(t){e(t.target.result);},t.onerror=function(t){r(t.target.error);},t.readAsArrayBuffer(i);}):i}).then(function(t){var e=a.getTypeOf(t);return e?("arraybuffer"===e?t=a.transformTo("uint8array",t):"string"===e&&(s?t=h.decode(t):i&&!0!==n&&(t=function(t){return l(t,o.uint8array?new Uint8Array(t.length):new Array(t.length))}(t))),t):u.Promise.reject(new Error("Can't read the data of '"+r+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})};},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,"set-immediate-shim":54}],33:[function(t,e,r){var i=t("./reader/readerFor"),n=t("./utils"),s=t("./signature"),a=t("./zipEntry"),o=(t("./utf8"),t("./support"));function h(t){this.files=[],this.loadOptions=t;}h.prototype={checkSignature:function(t){if(!this.reader.readAndCheckSignature(t)){this.reader.index-=4;var e=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+n.pretty(e)+", expected "+n.pretty(t)+")")}},isSignature:function(t,e){var r=this.reader.index;this.reader.setIndex(t);var i=this.reader.readString(4)===e;return this.reader.setIndex(r),i},readBlockEndOfCentral:function(){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);var t=this.reader.readData(this.zipCommentLength),e=o.uint8array?"uint8array":"array",r=n.transformTo(e,t);this.zipComment=this.loadOptions.decodeFileName(r);},readBlockZip64EndOfCentral:function(){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={};for(var t,e,r,i=this.zip64EndOfCentralSize-44;0<i;)t=this.reader.readInt(2),e=this.reader.readInt(4),r=this.reader.readData(e),this.zip64ExtensibleData[t]={id:t,length:e,value:r};},readBlockZip64EndOfCentralLocator:function(){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")},readLocalFiles:function(){var t,e;for(t=0;t<this.files.length;t++)e=this.files[t],this.reader.setIndex(e.localHeaderOffset),this.checkSignature(s.LOCAL_FILE_HEADER),e.readLocalPart(this.reader),e.handleUTF8(),e.processAttributes();},readCentralDir:function(){var t;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER);)(t=new a({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(t);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var t=this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);if(t<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");this.reader.setIndex(t);var e=t;if(this.checkSignature(s.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===n.MAX_VALUE_16BITS||this.diskWithCentralDirStart===n.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===n.MAX_VALUE_16BITS||this.centralDirRecords===n.MAX_VALUE_16BITS||this.centralDirSize===n.MAX_VALUE_32BITS||this.centralDirOffset===n.MAX_VALUE_32BITS){if(this.zip64=!0,(t=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(t),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");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral();}var r=this.centralDirOffset+this.centralDirSize;this.zip64&&(r+=20,r+=12+this.zip64EndOfCentralSize);var i=e-r;if(0<i)this.isSignature(e,s.CENTRAL_FILE_HEADER)||(this.reader.zero=i);else if(i<0)throw new Error("Corrupted zip: missing "+Math.abs(i)+" bytes.")},prepareReader:function(t){this.reader=i(t);},load:function(t){this.prepareReader(t),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles();}},e.exports=h;},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utf8":31,"./utils":32,"./zipEntry":34}],34:[function(t,e,r){var i=t("./reader/readerFor"),s=t("./utils"),n=t("./compressedObject"),a=t("./crc32"),o=t("./utf8"),h=t("./compressions"),u=t("./support");function l(t,e){this.options=t,this.loadOptions=e;}l.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(t){var e,r;if(t.skip(22),this.fileNameLength=t.readInt(2),r=t.readInt(2),this.fileName=t.readData(this.fileNameLength),t.skip(r),-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)");if(null===(e=function(t){for(var e in h)if(h.hasOwnProperty(e)&&h[e].magic===t)return h[e];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+s.pretty(this.compressionMethod)+" unknown (inner file : "+s.transformTo("string",this.fileName)+")");this.decompressed=new n(this.compressedSize,this.uncompressedSize,this.crc32,e,t.readData(this.compressedSize));},readCentralPart:function(t){this.versionMadeBy=t.readInt(2),t.skip(2),this.bitFlag=t.readInt(2),this.compressionMethod=t.readString(2),this.date=t.readDate(),this.crc32=t.readInt(4),this.compressedSize=t.readInt(4),this.uncompressedSize=t.readInt(4);var e=t.readInt(2);if(this.extraFieldsLength=t.readInt(2),this.fileCommentLength=t.readInt(2),this.diskNumberStart=t.readInt(2),this.internalFileAttributes=t.readInt(2),this.externalFileAttributes=t.readInt(4),this.localHeaderOffset=t.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");t.skip(e),this.readExtraFields(t),this.parseZIP64ExtraField(t),this.fileComment=t.readData(this.fileCommentLength);},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var t=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==t&&(this.dosPermissions=63&this.externalFileAttributes),3==t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0);},parseZIP64ExtraField:function(t){if(this.extraFields[1]){var e=i(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4));}},readExtraFields:function(t){var e,r,i,n=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+4<n;)e=t.readInt(2),r=t.readInt(2),i=t.readData(r),this.extraFields[e]={id:e,length:r,value:i};t.setIndex(n);},handleUTF8:function(){var t=u.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=o.utf8decode(this.fileName),this.fileCommentStr=o.utf8decode(this.fileComment);else {var e=this.findExtraFieldUnicodePath();if(null!==e)this.fileNameStr=e;else {var r=s.transformTo(t,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r);}var i=this.findExtraFieldUnicodeComment();if(null!==i)this.fileCommentStr=i;else {var n=s.transformTo(t,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(n);}}},findExtraFieldUnicodePath:function(){var t=this.extraFields[28789];if(t){var e=i(t.value);return 1!==e.readInt(1)?null:a(this.fileName)!==e.readInt(4)?null:o.utf8decode(e.readData(t.length-5))}return null},findExtraFieldUnicodeComment:function(){var t=this.extraFields[25461];if(t){var e=i(t.value);return 1!==e.readInt(1)?null:a(this.fileComment)!==e.readInt(4)?null:o.utf8decode(e.readData(t.length-5))}return null}},e.exports=l;},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,e,r){function i(t,e,r){this.name=t,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=e,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions};}var s=t("./stream/StreamHelper"),n=t("./stream/DataWorker"),a=t("./utf8"),o=t("./compressedObject"),h=t("./stream/GenericWorker");i.prototype={internalStream:function(t){var e=null,r="string";try{if(!t)throw new Error("No output type specified.");var i="string"===(r=t.toLowerCase())||"text"===r;"binarystring"!==r&&"text"!==r||(r="string"),e=this._decompressWorker();var n=!this._dataBinary;n&&!i&&(e=e.pipe(new a.Utf8EncodeWorker)),!n&&i&&(e=e.pipe(new a.Utf8DecodeWorker));}catch(t){(e=new h("error")).error(t);}return new s(e,r,"")},async:function(t,e){return this.internalStream(t).accumulate(e)},nodeStream:function(t,e){return this.internalStream(t||"nodebuffer").toNodejsStream(e)},_compressWorker:function(t,e){if(this._data instanceof o&&this._data.compression.magic===t.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new a.Utf8EncodeWorker)),o.createWorkerFrom(r,t,e)},_decompressWorker:function(){return this._data instanceof o?this._data.getContentWorker():this._data instanceof h?this._data:new n(this._data)}};for(var u=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],l=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},f=0;f<u.length;f++)i.prototype[u[f]]=l;e.exports=i;},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(t,l,e){(function(e){var r,i,t=e.MutationObserver||e.WebKitMutationObserver;if(t){var n=0,s=new t(u),a=e.document.createTextNode("");s.observe(a,{characterData:!0}),r=function(){a.data=n=++n%2;};}else if(e.setImmediate||void 0===e.MessageChannel)r="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){u(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null;},e.document.documentElement.appendChild(t);}:function(){setTimeout(u,0);};else {var o=new e.MessageChannel;o.port1.onmessage=u,r=function(){o.port2.postMessage(0);};}var h=[];function u(){var t,e;i=!0;for(var r=h.length;r;){for(e=h,h=[],t=-1;++t<r;)e[t]();r=h.length;}i=!1;}l.exports=function(t){1!==h.push(t)||i||r();};}).call(this,"undefined"!=typeof commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});},{}],37:[function(t,e,r){var n=t("immediate");function u(){}var l={},s=["REJECTED"],a=["FULFILLED"],i=["PENDING"];function o(t){if("function"!=typeof t)throw new TypeError("resolver must be a function");this.state=i,this.queue=[],this.outcome=void 0,t!==u&&c(this,t);}function h(t,e,r){this.promise=t,"function"==typeof e&&(this.onFulfilled=e,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected);}function f(e,r,i){n(function(){var t;try{t=r(i);}catch(t){return l.reject(e,t)}t===e?l.reject(e,new TypeError("Cannot resolve promise with itself")):l.resolve(e,t);});}function d(t){var e=t&&t.then;if(t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof e)return function(){e.apply(t,arguments);}}function c(e,t){var r=!1;function i(t){r||(r=!0,l.reject(e,t));}function n(t){r||(r=!0,l.resolve(e,t));}var s=p(function(){t(n,i);});"error"===s.status&&i(s.value);}function p(t,e){var r={};try{r.value=t(e),r.status="success";}catch(t){r.status="error",r.value=t;}return r}(e.exports=o).prototype.finally=function(e){if("function"!=typeof e)return this;var r=this.constructor;return this.then(function(t){return r.resolve(e()).then(function(){return t})},function(t){return r.resolve(e()).then(function(){throw t})})},o.prototype.catch=function(t){return this.then(null,t)},o.prototype.then=function(t,e){if("function"!=typeof t&&this.state===a||"function"!=typeof e&&this.state===s)return this;var r=new this.constructor(u);this.state!==i?f(r,this.state===a?t:e,this.outcome):this.queue.push(new h(r,t,e));return r},h.prototype.callFulfilled=function(t){l.resolve(this.promise,t);},h.prototype.otherCallFulfilled=function(t){f(this.promise,this.onFulfilled,t);},h.prototype.callRejected=function(t){l.reject(this.promise,t);},h.prototype.otherCallRejected=function(t){f(this.promise,this.onRejected,t);},l.resolve=function(t,e){var r=p(d,e);if("error"===r.status)return l.reject(t,r.value);var i=r.value;if(i)c(t,i);else {t.state=a,t.outcome=e;for(var n=-1,s=t.queue.length;++n<s;)t.queue[n].callFulfilled(e);}return t},l.reject=function(t,e){t.state=s,t.outcome=e;for(var r=-1,i=t.queue.length;++r<i;)t.queue[r].callRejected(e);return t},o.resolve=function(t){if(t instanceof this)return t;return l.resolve(new this(u),t)},o.reject=function(t){var e=new this(u);return l.reject(e,t)},o.all=function(t){var r=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var i=t.length,n=!1;if(!i)return this.resolve([]);var s=new Array(i),a=0,e=-1,o=new this(u);for(;++e<i;)h(t[e],e);return o;function h(t,e){r.resolve(t).then(function(t){s[e]=t,++a!==i||n||(n=!0,l.resolve(o,s));},function(t){n||(n=!0,l.reject(o,t));});}},o.race=function(t){var e=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var r=t.length,i=!1;if(!r)return this.resolve([]);var n=-1,s=new this(u);for(;++n<r;)a=t[n],e.resolve(a).then(function(t){i||(i=!0,l.resolve(s,t));},function(t){i||(i=!0,l.reject(s,t));});var a;return s};},{immediate:36}],38:[function(t,e,r){var i={};(0, t("./lib/utils/common").assign)(i,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),e.exports=i;},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(t,e,r){var a=t("./zlib/deflate"),o=t("./utils/common"),h=t("./utils/strings"),n=t("./zlib/messages"),s=t("./zlib/zstream"),u=Object.prototype.toString,l=0,f=-1,d=0,c=8;function p(t){if(!(this instanceof p))return new p(t);this.options=o.assign({level:f,method:c,chunkSize:16384,windowBits:15,memLevel:8,strategy:d,to:""},t||{});var e=this.options;e.raw&&0<e.windowBits?e.windowBits=-e.windowBits:e.gzip&&0<e.windowBits&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var r=a.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==l)throw new Error(n[r]);if(e.header&&a.deflateSetHeader(this.strm,e.header),e.dictionary){var i;if(i="string"==typeof e.dictionary?h.string2buf(e.dictionary):"[object ArrayBuffer]"===u.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,(r=a.deflateSetDictionary(this.strm,i))!==l)throw new Error(n[r]);this._dict_set=!0;}}function i(t,e){var r=new p(e);if(r.push(t,!0),r.err)throw r.msg||n[r.err];return r.result}p.prototype.push=function(t,e){var r,i,n=this.strm,s=this.options.chunkSize;if(this.ended)return !1;i=e===~~e?e:!0===e?4:0,"string"==typeof t?n.input=h.string2buf(t):"[object ArrayBuffer]"===u.call(t)?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;do{if(0===n.avail_out&&(n.output=new o.Buf8(s),n.next_out=0,n.avail_out=s),1!==(r=a.deflate(n,i))&&r!==l)return this.onEnd(r),!(this.ended=!0);0!==n.avail_out&&(0!==n.avail_in||4!==i&&2!==i)||("string"===this.options.to?this.onData(h.buf2binstring(o.shrinkBuf(n.output,n.next_out))):this.onData(o.shrinkBuf(n.output,n.next_out)));}while((0<n.avail_in||0===n.avail_out)&&1!==r);return 4===i?(r=a.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===l):2!==i||(this.onEnd(l),!(n.avail_out=0))},p.prototype.onData=function(t){this.chunks.push(t);},p.prototype.onEnd=function(t){t===l&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg;},r.Deflate=p,r.deflate=i,r.deflateRaw=function(t,e){return (e=e||{}).raw=!0,i(t,e)},r.gzip=function(t,e){return (e=e||{}).gzip=!0,i(t,e)};},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(t,e,r){var d=t("./zlib/inflate"),c=t("./utils/common"),p=t("./utils/strings"),m=t("./zlib/constants"),i=t("./zlib/messages"),n=t("./zlib/zstream"),s=t("./zlib/gzheader"),_=Object.prototype.toString;function a(t){if(!(this instanceof a))return new a(t);this.options=c.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&0<=e.windowBits&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(0<=e.windowBits&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),15<e.windowBits&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new n,this.strm.avail_out=0;var r=d.inflateInit2(this.strm,e.windowBits);if(r!==m.Z_OK)throw new Error(i[r]);this.header=new s,d.inflateGetHeader(this.strm,this.header);}function o(t,e){var r=new a(e);if(r.push(t,!0),r.err)throw r.msg||i[r.err];return r.result}a.prototype.push=function(t,e){var r,i,n,s,a,o,h=this.strm,u=this.options.chunkSize,l=this.options.dictionary,f=!1;if(this.ended)return !1;i=e===~~e?e:!0===e?m.Z_FINISH:m.Z_NO_FLUSH,"string"==typeof t?h.input=p.binstring2buf(t):"[object ArrayBuffer]"===_.call(t)?h.input=new Uint8Array(t):h.input=t,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new c.Buf8(u),h.next_out=0,h.avail_out=u),(r=d.inflate(h,m.Z_NO_FLUSH))===m.Z_NEED_DICT&&l&&(o="string"==typeof l?p.string2buf(l):"[object ArrayBuffer]"===_.call(l)?new Uint8Array(l):l,r=d.inflateSetDictionary(this.strm,o)),r===m.Z_BUF_ERROR&&!0===f&&(r=m.Z_OK,f=!1),r!==m.Z_STREAM_END&&r!==m.Z_OK)return this.onEnd(r),!(this.ended=!0);h.next_out&&(0!==h.avail_out&&r!==m.Z_STREAM_END&&(0!==h.avail_in||i!==m.Z_FINISH&&i!==m.Z_SYNC_FLUSH)||("string"===this.options.to?(n=p.utf8border(h.output,h.next_out),s=h.next_out-n,a=p.buf2string(h.output,n),h.next_out=s,h.avail_out=u-s,s&&c.arraySet(h.output,h.output,n,s,0),this.onData(a)):this.onData(c.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(f=!0);}while((0<h.avail_in||0===h.avail_out)&&r!==m.Z_STREAM_END);return r===m.Z_STREAM_END&&(i=m.Z_FINISH),i===m.Z_FINISH?(r=d.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===m.Z_OK):i!==m.Z_SYNC_FLUSH||(this.onEnd(m.Z_OK),!(h.avail_out=0))},a.prototype.onData=function(t){this.chunks.push(t);},a.prototype.onEnd=function(t){t===m.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=c.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg;},r.Inflate=a,r.inflate=o,r.inflateRaw=function(t,e){return (e=e||{}).raw=!0,o(t,e)},r.ungzip=o;},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(t,e,r){var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;r.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i]);}}return t},r.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var n={arraySet:function(t,e,r,i,n){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+i),n);else for(var s=0;s<i;s++)t[n+s]=e[r+s];},flattenChunks:function(t){var e,r,i,n,s,a;for(e=i=0,r=t.length;e<r;e++)i+=t[e].length;for(a=new Uint8Array(i),e=n=0,r=t.length;e<r;e++)s=t[e],a.set(s,n),n+=s.length;return a}},s={arraySet:function(t,e,r,i,n){for(var s=0;s<i;s++)t[n+s]=e[r+s];},flattenChunks:function(t){return [].concat.apply([],t)}};r.setTyped=function(t){t?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,n)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,s));},r.setTyped(i);},{}],42:[function(t,e,r){var h=t("./common"),n=!0,s=!0;try{String.fromCharCode.apply(null,[0]);}catch(t){n=!1;}try{String.fromCharCode.apply(null,new Uint8Array(1));}catch(t){s=!1;}for(var u=new h.Buf8(256),i=0;i<256;i++)u[i]=252<=i?6:248<=i?5:240<=i?4:224<=i?3:192<=i?2:1;function l(t,e){if(e<65537&&(t.subarray&&s||!t.subarray&&n))return String.fromCharCode.apply(null,h.shrinkBuf(t,e));for(var r="",i=0;i<e;i++)r+=String.fromCharCode(t[i]);return r}u[254]=u[254]=1,r.string2buf=function(t){var e,r,i,n,s,a=t.length,o=0;for(n=0;n<a;n++)55296==(64512&(r=t.charCodeAt(n)))&&n+1<a&&56320==(64512&(i=t.charCodeAt(n+1)))&&(r=65536+(r-55296<<10)+(i-56320),n++),o+=r<128?1:r<2048?2:r<65536?3:4;for(e=new h.Buf8(o),n=s=0;s<o;n++)55296==(64512&(r=t.charCodeAt(n)))&&n+1<a&&56320==(64512&(i=t.charCodeAt(n+1)))&&(r=65536+(r-55296<<10)+(i-56320),n++),r<128?e[s++]=r:(r<2048?e[s++]=192|r>>>6:(r<65536?e[s++]=224|r>>>12:(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63),e[s++]=128|r>>>6&63),e[s++]=128|63&r);return e},r.buf2binstring=function(t){return l(t,t.length)},r.binstring2buf=function(t){for(var e=new h.Buf8(t.length),r=0,i=e.length;r<i;r++)e[r]=t.charCodeAt(r);return e},r.buf2string=function(t,e){var r,i,n,s,a=e||t.length,o=new Array(2*a);for(r=i=0;r<a;)if((n=t[r++])<128)o[i++]=n;else if(4<(s=u[n]))o[i++]=65533,r+=s-1;else {for(n&=2===s?31:3===s?15:7;1<s&&r<a;)n=n<<6|63&t[r++],s--;1<s?o[i++]=65533:n<65536?o[i++]=n:(n-=65536,o[i++]=55296|n>>10&1023,o[i++]=56320|1023&n);}return l(o,i)},r.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;0<=r&&128==(192&t[r]);)r--;return r<0?e:0===r?e:r+u[t[r]]>e?r:e};},{"./common":41}],43:[function(t,e,r){e.exports=function(t,e,r,i){for(var n=65535&t|0,s=t>>>16&65535|0,a=0;0!==r;){for(r-=a=2e3<r?2e3:r;s=s+(n=n+e[i++]|0)|0,--a;);n%=65521,s%=65521;}return n|s<<16|0};},{}],44:[function(t,e,r){e.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};},{}],45:[function(t,e,r){var o=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t;}return e}();e.exports=function(t,e,r,i){var n=o,s=i+r;t^=-1;for(var a=i;a<s;a++)t=t>>>8^n[255&(t^e[a])];return -1^t};},{}],46:[function(t,e,r){var h,d=t("../utils/common"),u=t("./trees"),c=t("./adler32"),p=t("./crc32"),i=t("./messages"),l=0,f=4,m=0,_=-2,g=-1,b=4,n=2,v=8,y=9,s=286,a=30,o=19,w=2*s+1,k=15,x=3,S=258,z=S+x+1,C=42,E=113,A=1,I=2,O=3,B=4;function R(t,e){return t.msg=i[e],e}function T(t){return (t<<1)-(4<t?9:0)}function D(t){for(var e=t.length;0<=--e;)t[e]=0;}function F(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(d.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0));}function N(t,e){u._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,F(t.strm);}function U(t,e){t.pending_buf[t.pending++]=e;}function P(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e;}function L(t,e){var r,i,n=t.max_chain_length,s=t.strstart,a=t.prev_length,o=t.nice_match,h=t.strstart>t.w_size-z?t.strstart-(t.w_size-z):0,u=t.window,l=t.w_mask,f=t.prev,d=t.strstart+S,c=u[s+a-1],p=u[s+a];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do{if(u[(r=e)+a]===p&&u[r+a-1]===c&&u[r]===u[s]&&u[++r]===u[s+1]){s+=2,r++;do{}while(u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&s<d);if(i=S-(d-s),s=d-S,a<i){if(t.match_start=e,o<=(a=i))break;c=u[s+a-1],p=u[s+a];}}}while((e=f[e&l])>h&&0!=--n);return a<=t.lookahead?a:t.lookahead}function j(t){var e,r,i,n,s,a,o,h,u,l,f=t.w_size;do{if(n=t.window_size-t.lookahead-t.strstart,t.strstart>=f+(f-z)){for(d.arraySet(t.window,t.window,f,f,0),t.match_start-=f,t.strstart-=f,t.block_start-=f,e=r=t.hash_size;i=t.head[--e],t.head[e]=f<=i?i-f:0,--r;);for(e=r=f;i=t.prev[--e],t.prev[e]=f<=i?i-f:0,--r;);n+=f;}if(0===t.strm.avail_in)break;if(a=t.strm,o=t.window,h=t.strstart+t.lookahead,u=n,l=void 0,l=a.avail_in,u<l&&(l=u),r=0===l?0:(a.avail_in-=l,d.arraySet(o,a.input,a.next_in,l,h),1===a.state.wrap?a.adler=c(a.adler,o,l,h):2===a.state.wrap&&(a.adler=p(a.adler,o,l,h)),a.next_in+=l,a.total_in+=l,l),t.lookahead+=r,t.lookahead+t.insert>=x)for(s=t.strstart-t.insert,t.ins_h=t.window[s],t.ins_h=(t.ins_h<<t.hash_shift^t.window[s+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[s+x-1])&t.hash_mask,t.prev[s&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=s,s++,t.insert--,!(t.lookahead+t.insert<x)););}while(t.lookahead<z&&0!==t.strm.avail_in)}function Z(t,e){for(var r,i;;){if(t.lookahead<z){if(j(t),t.lookahead<z&&e===l)return A;if(0===t.lookahead)break}if(r=0,t.lookahead>=x&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+x-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-z&&(t.match_length=L(t,r)),t.match_length>=x)if(i=u._tr_tally(t,t.strstart-t.match_start,t.match_length-x),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=x){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+x-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart,0!=--t.match_length;);t.strstart++;}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else i=u._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(N(t,!1),0===t.strm.avail_out))return A}return t.insert=t.strstart<x-1?t.strstart:x-1,e===f?(N(t,!0),0===t.strm.avail_out?O:B):t.last_lit&&(N(t,!1),0===t.strm.avail_out)?A:I}function W(t,e){for(var r,i,n;;){if(t.lookahead<z){if(j(t),t.lookahead<z&&e===l)return A;if(0===t.lookahead)break}if(r=0,t.lookahead>=x&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+x-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=x-1,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-z&&(t.match_length=L(t,r),t.match_length<=5&&(1===t.strategy||t.match_length===x&&4096<t.strstart-t.match_start)&&(t.match_length=x-1)),t.prev_length>=x&&t.match_length<=t.prev_length){for(n=t.strstart+t.lookahead-x,i=u._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-x),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=n&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+x-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!=--t.prev_length;);if(t.match_available=0,t.match_length=x-1,t.strstart++,i&&(N(t,!1),0===t.strm.avail_out))return A}else if(t.match_available){if((i=u._tr_tally(t,0,t.window[t.strstart-1]))&&N(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return A}else t.match_available=1,t.strstart++,t.lookahead--;}return t.match_available&&(i=u._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<x-1?t.strstart:x-1,e===f?(N(t,!0),0===t.strm.avail_out?O:B):t.last_lit&&(N(t,!1),0===t.strm.avail_out)?A:I}function M(t,e,r,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=i,this.func=n;}function H(){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 d.Buf16(2*w),this.dyn_dtree=new d.Buf16(2*(2*a+1)),this.bl_tree=new d.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 d.Buf16(k+1),this.heap=new d.Buf16(2*s+1),D(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new d.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;}function G(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=n,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?C:E,t.adler=2===e.wrap?0:1,e.last_flush=l,u._tr_init(e),m):R(t,_)}function K(t){var e=G(t);return e===m&&function(t){t.window_size=2*t.w_size,D(t.head),t.max_lazy_match=h[t.level].max_lazy,t.good_match=h[t.level].good_length,t.nice_match=h[t.level].nice_length,t.max_chain_length=h[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=x-1,t.match_available=0,t.ins_h=0;}(t.state),e}function Y(t,e,r,i,n,s){if(!t)return _;var a=1;if(e===g&&(e=6),i<0?(a=0,i=-i):15<i&&(a=2,i-=16),n<1||y<n||r!==v||i<8||15<i||e<0||9<e||s<0||b<s)return R(t,_);8===i&&(i=9);var o=new H;return (t.state=o).strm=t,o.wrap=a,o.gzhead=null,o.w_bits=i,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=n+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+x-1)/x),o.window=new d.Buf8(2*o.w_size),o.head=new d.Buf16(o.hash_size),o.prev=new d.Buf16(o.w_size),o.lit_bufsize=1<<n+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new d.Buf8(o.pending_buf_size),o.d_buf=1*o.lit_bufsize,o.l_buf=3*o.lit_bufsize,o.level=e,o.strategy=s,o.method=r,K(t)}h=[new M(0,0,0,0,function(t,e){var r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(j(t),0===t.lookahead&&e===l)return A;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+r;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,N(t,!1),0===t.strm.avail_out))return A;if(t.strstart-t.block_start>=t.w_size-z&&(N(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(N(t,!0),0===t.strm.avail_out?O:B):(t.strstart>t.block_start&&(N(t,!1),t.strm.avail_out),A)}),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(t,e){return Y(t,e,v,15,8,0)},r.deflateInit2=Y,r.deflateReset=K,r.deflateResetKeep=G,r.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?_:(t.state.gzhead=e,m):_},r.deflate=function(t,e){var r,i,n,s;if(!t||!t.state||5<e||e<0)return t?R(t,_):_;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||666===i.status&&e!==f)return R(t,0===t.avail_out?-5:_);if(i.strm=t,r=i.last_flush,i.last_flush=e,i.status===C)if(2===i.wrap)t.adler=0,U(i,31),U(i,139),U(i,8),i.gzhead?(U(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),U(i,255&i.gzhead.time),U(i,i.gzhead.time>>8&255),U(i,i.gzhead.time>>16&255),U(i,i.gzhead.time>>24&255),U(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),U(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(U(i,255&i.gzhead.extra.length),U(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=p(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(U(i,0),U(i,0),U(i,0),U(i,0),U(i,0),U(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),U(i,3),i.status=E);else {var a=v+(i.w_bits-8<<4)<<8;a|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(a|=32),a+=31-a%31,i.status=E,P(i,a),0!==i.strstart&&(P(i,t.adler>>>16),P(i,65535&t.adler)),t.adler=1;}if(69===i.status)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>n&&(t.adler=p(t.adler,i.pending_buf,i.pending-n,n)),F(t),n=i.pending,i.pending!==i.pending_buf_size));)U(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(t.adler=p(t.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73);}else i.status=73;if(73===i.status)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=p(t.adler,i.pending_buf,i.pending-n,n)),F(t),n=i.pending,i.pending===i.pending_buf_size)){s=1;break}s=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,U(i,s);}while(0!==s);i.gzhead.hcrc&&i.pending>n&&(t.adler=p(t.adler,i.pending_buf,i.pending-n,n)),0===s&&(i.gzindex=0,i.status=91);}else i.status=91;if(91===i.status)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=p(t.adler,i.pending_buf,i.pending-n,n)),F(t),n=i.pending,i.pending===i.pending_buf_size)){s=1;break}s=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,U(i,s);}while(0!==s);i.gzhead.hcrc&&i.pending>n&&(t.adler=p(t.adler,i.pending_buf,i.pending-n,n)),0===s&&(i.status=103);}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&F(t),i.pending+2<=i.pending_buf_size&&(U(i,255&t.adler),U(i,t.adler>>8&255),t.adler=0,i.status=E)):i.status=E),0!==i.pending){if(F(t),0===t.avail_out)return i.last_flush=-1,m}else if(0===t.avail_in&&T(e)<=T(r)&&e!==f)return R(t,-5);if(666===i.status&&0!==t.avail_in)return R(t,-5);if(0!==t.avail_in||0!==i.lookahead||e!==l&&666!==i.status){var o=2===i.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(j(t),0===t.lookahead)){if(e===l)return A;break}if(t.match_length=0,r=u._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(N(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(N(t,!0),0===t.strm.avail_out?O:B):t.last_lit&&(N(t,!1),0===t.strm.avail_out)?A:I}(i,e):3===i.strategy?function(t,e){for(var r,i,n,s,a=t.window;;){if(t.lookahead<=S){if(j(t),t.lookahead<=S&&e===l)return A;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=x&&0<t.strstart&&(i=a[n=t.strstart-1])===a[++n]&&i===a[++n]&&i===a[++n]){s=t.strstart+S;do{}while(i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&n<s);t.match_length=S-(s-n),t.match_length>t.lookahead&&(t.match_length=t.lookahead);}if(t.match_length>=x?(r=u._tr_tally(t,1,t.match_length-x),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=u._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(N(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(N(t,!0),0===t.strm.avail_out?O:B):t.last_lit&&(N(t,!1),0===t.strm.avail_out)?A:I}(i,e):h[i.level].func(i,e);if(o!==O&&o!==B||(i.status=666),o===A||o===O)return 0===t.avail_out&&(i.last_flush=-1),m;if(o===I&&(1===e?u._tr_align(i):5!==e&&(u._tr_stored_block(i,0,0,!1),3===e&&(D(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),F(t),0===t.avail_out))return i.last_flush=-1,m}return e!==f?m:i.wrap<=0?1:(2===i.wrap?(U(i,255&t.adler),U(i,t.adler>>8&255),U(i,t.adler>>16&255),U(i,t.adler>>24&255),U(i,255&t.total_in),U(i,t.total_in>>8&255),U(i,t.total_in>>16&255),U(i,t.total_in>>24&255)):(P(i,t.adler>>>16),P(i,65535&t.adler)),F(t),0<i.wrap&&(i.wrap=-i.wrap),0!==i.pending?m:1)},r.deflateEnd=function(t){var e;return t&&t.state?(e=t.state.status)!==C&&69!==e&&73!==e&&91!==e&&103!==e&&e!==E&&666!==e?R(t,_):(t.state=null,e===E?R(t,-3):m):_},r.deflateSetDictionary=function(t,e){var r,i,n,s,a,o,h,u,l=e.length;if(!t||!t.state)return _;if(2===(s=(r=t.state).wrap)||1===s&&r.status!==C||r.lookahead)return _;for(1===s&&(t.adler=c(t.adler,e,l,0)),r.wrap=0,l>=r.w_size&&(0===s&&(D(r.head),r.strstart=0,r.block_start=0,r.insert=0),u=new d.Buf8(r.w_size),d.arraySet(u,e,l-r.w_size,r.w_size,0),e=u,l=r.w_size),a=t.avail_in,o=t.next_in,h=t.input,t.avail_in=l,t.next_in=0,t.input=e,j(r);r.lookahead>=x;){for(i=r.strstart,n=r.lookahead-(x-1);r.ins_h=(r.ins_h<<r.hash_shift^r.window[i+x-1])&r.hash_mask,r.prev[i&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=i,i++,--n;);r.strstart=i,r.lookahead=x-1,j(r);}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=x-1,r.match_available=0,t.next_in=o,t.input=h,t.avail_in=a,r.wrap=s,m},r.deflateInfo="pako deflate (from Nodeca project)";},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(t,e,r){e.exports=function(){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=!1;};},{}],48:[function(t,e,r){e.exports=function(t,e){var r,i,n,s,a,o,h,u,l,f,d,c,p,m,_,g,b,v,y,w,k,x,S,z,C;r=t.state,i=t.next_in,z=t.input,n=i+(t.avail_in-5),s=t.next_out,C=t.output,a=s-(e-t.avail_out),o=s+(t.avail_out-257),h=r.dmax,u=r.wsize,l=r.whave,f=r.wnext,d=r.window,c=r.hold,p=r.bits,m=r.lencode,_=r.distcode,g=(1<<r.lenbits)-1,b=(1<<r.distbits)-1;t:do{p<15&&(c+=z[i++]<<p,p+=8,c+=z[i++]<<p,p+=8),v=m[c&g];e:for(;;){if(c>>>=y=v>>>24,p-=y,0===(y=v>>>16&255))C[s++]=65535&v;else {if(!(16&y)){if(0==(64&y)){v=m[(65535&v)+(c&(1<<y)-1)];continue e}if(32&y){r.mode=12;break t}t.msg="invalid literal/length code",r.mode=30;break t}w=65535&v,(y&=15)&&(p<y&&(c+=z[i++]<<p,p+=8),w+=c&(1<<y)-1,c>>>=y,p-=y),p<15&&(c+=z[i++]<<p,p+=8,c+=z[i++]<<p,p+=8),v=_[c&b];r:for(;;){if(c>>>=y=v>>>24,p-=y,!(16&(y=v>>>16&255))){if(0==(64&y)){v=_[(65535&v)+(c&(1<<y)-1)];continue r}t.msg="invalid distance code",r.mode=30;break t}if(k=65535&v,p<(y&=15)&&(c+=z[i++]<<p,(p+=8)<y&&(c+=z[i++]<<p,p+=8)),h<(k+=c&(1<<y)-1)){t.msg="invalid distance too far back",r.mode=30;break t}if(c>>>=y,p-=y,(y=s-a)<k){if(l<(y=k-y)&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(S=d,(x=0)===f){if(x+=u-y,y<w){for(w-=y;C[s++]=d[x++],--y;);x=s-k,S=C;}}else if(f<y){if(x+=u+f-y,(y-=f)<w){for(w-=y;C[s++]=d[x++],--y;);if(x=0,f<w){for(w-=y=f;C[s++]=d[x++],--y;);x=s-k,S=C;}}}else if(x+=f-y,y<w){for(w-=y;C[s++]=d[x++],--y;);x=s-k,S=C;}for(;2<w;)C[s++]=S[x++],C[s++]=S[x++],C[s++]=S[x++],w-=3;w&&(C[s++]=S[x++],1<w&&(C[s++]=S[x++]));}else {for(x=s-k;C[s++]=C[x++],C[s++]=C[x++],C[s++]=C[x++],2<(w-=3););w&&(C[s++]=C[x++],1<w&&(C[s++]=C[x++]));}break}}break}}while(i<n&&s<o);i-=w=p>>3,c&=(1<<(p-=w<<3))-1,t.next_in=i,t.next_out=s,t.avail_in=i<n?n-i+5:5-(i-n),t.avail_out=s<o?o-s+257:257-(s-o),r.hold=c,r.bits=p;};},{}],49:[function(t,e,r){var I=t("../utils/common"),O=t("./adler32"),B=t("./crc32"),R=t("./inffast"),T=t("./inftrees"),D=1,F=2,N=0,U=-2,P=1,i=852,n=592;function L(t){return (t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function s(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,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;}function a(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=P,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new I.Buf32(i),e.distcode=e.distdyn=new I.Buf32(n),e.sane=1,e.back=-1,N):U}function o(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,a(t)):U}function h(t,e){var r,i;return t&&t.state?(i=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15<e)?U:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=r,i.wbits=e,o(t))):U}function u(t,e){var r,i;return t?(i=new s,(t.state=i).window=null,(r=h(t,e))!==N&&(t.state=null),r):U}var l,f,d=!0;function j(t){if(d){var e;for(l=new I.Buf32(512),f=new I.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(T(D,t.lens,0,288,l,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;T(F,t.lens,0,32,f,0,t.work,{bits:5}),d=!1;}t.lencode=l,t.lenbits=9,t.distcode=f,t.distbits=5;}function Z(t,e,r,i){var n,s=t.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new I.Buf8(s.wsize)),i>=s.wsize?(I.arraySet(s.window,e,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(i<(n=s.wsize-s.wnext)&&(n=i),I.arraySet(s.window,e,r-i,n,s.wnext),(i-=n)?(I.arraySet(s.window,e,r-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=n))),0}r.inflateReset=o,r.inflateReset2=h,r.inflateResetKeep=a,r.inflateInit=function(t){return u(t,15)},r.inflateInit2=u,r.inflate=function(t,e){var r,i,n,s,a,o,h,u,l,f,d,c,p,m,_,g,b,v,y,w,k,x,S,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];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return U;12===(r=t.state).mode&&(r.mode=13),a=t.next_out,n=t.output,h=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,u=r.hold,l=r.bits,f=o,d=h,x=N;t:for(;;)switch(r.mode){case P:if(0===r.wrap){r.mode=13;break}for(;l<16;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}if(2&r.wrap&&35615===u){E[r.check=0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0),l=u=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&u)<<8)+(u>>8))%31){t.msg="incorrect header check",r.mode=30;break}if(8!=(15&u)){t.msg="unknown compression method",r.mode=30;break}if(l-=4,k=8+(15&(u>>>=4)),0===r.wbits)r.wbits=k;else if(k>r.wbits){t.msg="invalid window size",r.mode=30;break}r.dmax=1<<k,t.adler=r.check=1,r.mode=512&u?10:12,l=u=0;break;case 2:for(;l<16;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}if(r.flags=u,8!=(255&r.flags)){t.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=u>>8&1),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=3;case 3:for(;l<32;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}r.head&&(r.head.time=u),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,E[2]=u>>>16&255,E[3]=u>>>24&255,r.check=B(r.check,E,4,0)),l=u=0,r.mode=4;case 4:for(;l<16;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}r.head&&(r.head.xflags=255&u,r.head.os=u>>8),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=5;case 5:if(1024&r.flags){for(;l<16;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}r.length=u,r.head&&(r.head.extra_len=u),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0;}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(o<(c=r.length)&&(c=o),c&&(r.head&&(k=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),I.arraySet(r.head.extra,i,s,c,k)),512&r.flags&&(r.check=B(r.check,i,c,s)),o-=c,s+=c,r.length-=c),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===o)break t;for(c=0;k=i[s+c++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k)),k&&c<o;);if(512&r.flags&&(r.check=B(r.check,i,c,s)),o-=c,s+=c,k)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===o)break t;for(c=0;k=i[s+c++],r.head&&k&&r.length<65536&&(r.head.comment+=String.fromCharCode(k)),k&&c<o;);if(512&r.flags&&(r.check=B(r.check,i,c,s)),o-=c,s+=c,k)break t}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;l<16;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}if(u!==(65535&r.check)){t.msg="header crc mismatch",r.mode=30;break}l=u=0;}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=12;break;case 10:for(;l<32;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}t.adler=r.check=L(u),l=u=0,r.mode=11;case 11:if(0===r.havedict)return t.next_out=a,t.avail_out=h,t.next_in=s,t.avail_in=o,r.hold=u,r.bits=l,2;t.adler=r.check=1,r.mode=12;case 12:if(5===e||6===e)break t;case 13:if(r.last){u>>>=7&l,l-=7&l,r.mode=27;break}for(;l<3;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}switch(r.last=1&u,l-=1,3&(u>>>=1)){case 0:r.mode=14;break;case 1:if(j(r),r.mode=20,6!==e)break;u>>>=2,l-=2;break t;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=30;}u>>>=2,l-=2;break;case 14:for(u>>>=7&l,l-=7&l;l<32;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}if((65535&u)!=(u>>>16^65535)){t.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&u,l=u=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(c=r.length){if(o<c&&(c=o),h<c&&(c=h),0===c)break t;I.arraySet(n,i,s,c,a),o-=c,s+=c,h-=c,a+=c,r.length-=c;break}r.mode=12;break;case 17:for(;l<14;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}if(r.nlen=257+(31&u),u>>>=5,l-=5,r.ndist=1+(31&u),u>>>=5,l-=5,r.ncode=4+(15&u),u>>>=4,l-=4,286<r.nlen||30<r.ndist){t.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;l<3;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}r.lens[A[r.have++]]=7&u,u>>>=3,l-=3;}for(;r.have<19;)r.lens[A[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,S={bits:r.lenbits},x=T(0,r.lens,0,19,r.lencode,0,r.work,S),r.lenbits=S.bits,x){t.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;g=(C=r.lencode[u&(1<<r.lenbits)-1])>>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}if(b<16)u>>>=_,l-=_,r.lens[r.have++]=b;else {if(16===b){for(z=_+2;l<z;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}if(u>>>=_,l-=_,0===r.have){t.msg="invalid bit length repeat",r.mode=30;break}k=r.lens[r.have-1],c=3+(3&u),u>>>=2,l-=2;}else if(17===b){for(z=_+3;l<z;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}l-=_,k=0,c=3+(7&(u>>>=_)),u>>>=3,l-=3;}else {for(z=_+7;l<z;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}l-=_,k=0,c=11+(127&(u>>>=_)),u>>>=7,l-=7;}if(r.have+c>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=30;break}for(;c--;)r.lens[r.have++]=k;}}if(30===r.mode)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,S={bits:r.lenbits},x=T(D,r.lens,0,r.nlen,r.lencode,0,r.work,S),r.lenbits=S.bits,x){t.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,S={bits:r.distbits},x=T(F,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,S),r.distbits=S.bits,x){t.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(6<=o&&258<=h){t.next_out=a,t.avail_out=h,t.next_in=s,t.avail_in=o,r.hold=u,r.bits=l,R(t,d),a=t.next_out,n=t.output,h=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,u=r.hold,l=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;g=(C=r.lencode[u&(1<<r.lenbits)-1])>>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}if(g&&0==(240&g)){for(v=_,y=g,w=b;g=(C=r.lencode[w+((u&(1<<v+y)-1)>>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}u>>>=v,l-=v,r.back+=v;}if(u>>>=_,l-=_,r.back+=_,r.length=b,0===g){r.mode=26;break}if(32&g){r.back=-1,r.mode=12;break}if(64&g){t.msg="invalid literal/length code",r.mode=30;break}r.extra=15&g,r.mode=22;case 22:if(r.extra){for(z=r.extra;l<z;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}r.length+=u&(1<<r.extra)-1,u>>>=r.extra,l-=r.extra,r.back+=r.extra;}r.was=r.length,r.mode=23;case 23:for(;g=(C=r.distcode[u&(1<<r.distbits)-1])>>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}if(0==(240&g)){for(v=_,y=g,w=b;g=(C=r.distcode[w+((u&(1<<v+y)-1)>>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}u>>>=v,l-=v,r.back+=v;}if(u>>>=_,l-=_,r.back+=_,64&g){t.msg="invalid distance code",r.mode=30;break}r.offset=b,r.extra=15&g,r.mode=24;case 24:if(r.extra){for(z=r.extra;l<z;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}r.offset+=u&(1<<r.extra)-1,u>>>=r.extra,l-=r.extra,r.back+=r.extra;}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===h)break t;if(c=d-h,r.offset>c){if((c=r.offset-c)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=30;break}p=c>r.wnext?(c-=r.wnext,r.wsize-c):r.wnext-c,c>r.length&&(c=r.length),m=r.window;}else m=n,p=a-r.offset,c=r.length;for(h<c&&(c=h),h-=c,r.length-=c;n[a++]=m[p++],--c;);0===r.length&&(r.mode=21);break;case 26:if(0===h)break t;n[a++]=r.length,h--,r.mode=21;break;case 27:if(r.wrap){for(;l<32;){if(0===o)break t;o--,u|=i[s++]<<l,l+=8;}if(d-=h,t.total_out+=d,r.total+=d,d&&(t.adler=r.check=r.flags?B(r.check,n,d,a-d):O(r.check,n,d,a-d)),d=h,(r.flags?u:L(u))!==r.check){t.msg="incorrect data check",r.mode=30;break}l=u=0;}r.mode=28;case 28:if(r.wrap&&r.flags){for(;l<32;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}if(u!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=30;break}l=u=0;}r.mode=29;case 29:x=1;break t;case 30:x=-3;break t;case 31:return -4;case 32:default:return U}return t.next_out=a,t.avail_out=h,t.next_in=s,t.avail_in=o,r.hold=u,r.bits=l,(r.wsize||d!==t.avail_out&&r.mode<30&&(r.mode<27||4!==e))&&Z(t,t.output,t.next_out,d-t.avail_out)?(r.mode=31,-4):(f-=t.avail_in,d-=t.avail_out,t.total_in+=f,t.total_out+=d,r.total+=d,r.wrap&&d&&(t.adler=r.check=r.flags?B(r.check,n,d,t.next_out-d):O(r.check,n,d,t.next_out-d)),t.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0==f&&0===d||4===e)&&x===N&&(x=-5),x)},r.inflateEnd=function(t){if(!t||!t.state)return U;var e=t.state;return e.window&&(e.window=null),t.state=null,N},r.inflateGetHeader=function(t,e){var r;return t&&t.state?0==(2&(r=t.state).wrap)?U:((r.head=e).done=!1,N):U},r.inflateSetDictionary=function(t,e){var r,i=e.length;return t&&t.state?0!==(r=t.state).wrap&&11!==r.mode?U:11===r.mode&&O(1,e,i,0)!==r.check?-3:Z(t,e,i,i)?(r.mode=31,-4):(r.havedict=1,N):U},r.inflateInfo="pako inflate (from Nodeca project)";},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(t,e,r){var D=t("../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];e.exports=function(t,e,r,i,n,s,a,o){var h,u,l,f,d,c,p,m,_,g=o.bits,b=0,v=0,y=0,w=0,k=0,x=0,S=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;for(b=0;b<=15;b++)O[b]=0;for(v=0;v<i;v++)O[e[r+v]]++;for(k=g,w=15;1<=w&&0===O[w];w--);if(w<k&&(k=w),0===w)return n[s++]=20971520,n[s++]=20971520,o.bits=1,0;for(y=1;y<w&&0===O[y];y++);for(k<y&&(k=y),b=z=1;b<=15;b++)if(z<<=1,(z-=O[b])<0)return -1;if(0<z&&(0===t||1!==w))return -1;for(B[1]=0,b=1;b<15;b++)B[b+1]=B[b]+O[b];for(v=0;v<i;v++)0!==e[r+v]&&(a[B[e[r+v]]++]=v);if(c=0===t?(A=R=a,19):1===t?(A=F,I-=257,R=N,T-=257,256):(A=U,R=P,-1),b=y,d=s,S=v=E=0,l=-1,f=(C=1<<(x=k))-1,1===t&&852<C||2===t&&592<C)return 1;for(;;){for(p=b-S,_=a[v]<c?(m=0,a[v]):a[v]>c?(m=R[T+a[v]],A[I+a[v]]):(m=96,0),h=1<<b-S,y=u=1<<x;n[d+(E>>S)+(u-=h)]=p<<24|m<<16|_|0,0!==u;);for(h=1<<b-1;E&h;)h>>=1;if(0!==h?(E&=h-1,E+=h):E=0,v++,0==--O[b]){if(b===w)break;b=e[r+a[v]];}if(k<b&&(E&f)!==l){for(0===S&&(S=k),d+=y,z=1<<(x=b-S);x+S<w&&!((z-=O[x+S])<=0);)x++,z<<=1;if(C+=1<<x,1===t&&852<C||2===t&&592<C)return 1;n[l=E&f]=k<<24|x<<16|d-s|0;}}return 0!==E&&(n[d+E]=b-S<<24|64<<16|0),o.bits=k,0};},{"../utils/common":41}],51:[function(t,e,r){e.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"};},{}],52:[function(t,e,r){var n=t("../utils/common"),o=0,h=1;function i(t){for(var e=t.length;0<=--e;)t[e]=0;}var s=0,a=29,u=256,l=u+1+a,f=30,d=19,_=2*l+1,g=15,c=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],S=[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));i(z);var C=new Array(2*f);i(C);var E=new Array(512);i(E);var A=new Array(256);i(A);var I=new Array(a);i(I);var O,B,R,T=new Array(f);function D(t,e,r,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=i,this.max_length=n,this.has_stree=t&&t.length;}function F(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e;}function N(t){return t<256?E[t]:E[256+(t>>>7)]}function U(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255;}function P(t,e,r){t.bi_valid>c-r?(t.bi_buf|=e<<t.bi_valid&65535,U(t,t.bi_buf),t.bi_buf=e>>c-t.bi_valid,t.bi_valid+=r-c):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r);}function L(t,e,r){P(t,r[2*e],r[2*e+1]);}function j(t,e){for(var r=0;r|=1&t,t>>>=1,r<<=1,0<--e;);return r>>>1}function Z(t,e,r){var i,n,s=new Array(g+1),a=0;for(i=1;i<=g;i++)s[i]=a=a+r[i-1]<<1;for(n=0;n<=e;n++){var o=t[2*n+1];0!==o&&(t[2*n]=j(s[o]++,o));}}function W(t){var e;for(e=0;e<l;e++)t.dyn_ltree[2*e]=0;for(e=0;e<f;e++)t.dyn_dtree[2*e]=0;for(e=0;e<d;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*m]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0;}function M(t){8<t.bi_valid?U(t,t.bi_buf):0<t.bi_valid&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0;}function H(t,e,r,i){var n=2*e,s=2*r;return t[n]<t[s]||t[n]===t[s]&&i[e]<=i[r]}function G(t,e,r){for(var i=t.heap[r],n=r<<1;n<=t.heap_len&&(n<t.heap_len&&H(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!H(e,i,t.heap[n],t.depth));)t.heap[r]=t.heap[n],r=n,n<<=1;t.heap[r]=i;}function K(t,e,r){var i,n,s,a,o=0;if(0!==t.last_lit)for(;i=t.pending_buf[t.d_buf+2*o]<<8|t.pending_buf[t.d_buf+2*o+1],n=t.pending_buf[t.l_buf+o],o++,0===i?L(t,n,e):(L(t,(s=A[n])+u+1,e),0!==(a=w[s])&&P(t,n-=I[s],a),L(t,s=N(--i),r),0!==(a=k[s])&&P(t,i-=T[s],a)),o<t.last_lit;);L(t,m,e);}function Y(t,e){var r,i,n,s=e.dyn_tree,a=e.stat_desc.static_tree,o=e.stat_desc.has_stree,h=e.stat_desc.elems,u=-1;for(t.heap_len=0,t.heap_max=_,r=0;r<h;r++)0!==s[2*r]?(t.heap[++t.heap_len]=u=r,t.depth[r]=0):s[2*r+1]=0;for(;t.heap_len<2;)s[2*(n=t.heap[++t.heap_len]=u<2?++u:0)]=1,t.depth[n]=0,t.opt_len--,o&&(t.static_len-=a[2*n+1]);for(e.max_code=u,r=t.heap_len>>1;1<=r;r--)G(t,s,r);for(n=h;r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],G(t,s,1),i=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=i,s[2*n]=s[2*r]+s[2*i],t.depth[n]=(t.depth[r]>=t.depth[i]?t.depth[r]:t.depth[i])+1,s[2*r+1]=s[2*i+1]=n,t.heap[1]=n++,G(t,s,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,i,n,s,a,o,h=e.dyn_tree,u=e.max_code,l=e.stat_desc.static_tree,f=e.stat_desc.has_stree,d=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,p=e.stat_desc.max_length,m=0;for(s=0;s<=g;s++)t.bl_count[s]=0;for(h[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<_;r++)p<(s=h[2*h[2*(i=t.heap[r])+1]+1]+1)&&(s=p,m++),h[2*i+1]=s,u<i||(t.bl_count[s]++,a=0,c<=i&&(a=d[i-c]),o=h[2*i],t.opt_len+=o*(s+a),f&&(t.static_len+=o*(l[2*i+1]+a)));if(0!==m){do{for(s=p-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[p]--,m-=2;}while(0<m);for(s=p;0!==s;s--)for(i=t.bl_count[s];0!==i;)u<(n=t.heap[--r])||(h[2*n+1]!==s&&(t.opt_len+=(s-h[2*n+1])*h[2*n],h[2*n+1]=s),i--);}}(t,e),Z(s,u,t.bl_count);}function X(t,e,r){var i,n,s=-1,a=e[1],o=0,h=7,u=4;for(0===a&&(h=138,u=3),e[2*(r+1)+1]=65535,i=0;i<=r;i++)n=a,a=e[2*(i+1)+1],++o<h&&n===a||(o<u?t.bl_tree[2*n]+=o:0!==n?(n!==s&&t.bl_tree[2*n]++,t.bl_tree[2*b]++):o<=10?t.bl_tree[2*v]++:t.bl_tree[2*y]++,s=n,u=(o=0)===a?(h=138,3):n===a?(h=6,3):(h=7,4));}function V(t,e,r){var i,n,s=-1,a=e[1],o=0,h=7,u=4;for(0===a&&(h=138,u=3),i=0;i<=r;i++)if(n=a,a=e[2*(i+1)+1],!(++o<h&&n===a)){if(o<u)for(;L(t,n,t.bl_tree),0!=--o;);else 0!==n?(n!==s&&(L(t,n,t.bl_tree),o--),L(t,b,t.bl_tree),P(t,o-3,2)):o<=10?(L(t,v,t.bl_tree),P(t,o-3,3)):(L(t,y,t.bl_tree),P(t,o-11,7));s=n,u=(o=0)===a?(h=138,3):n===a?(h=6,3):(h=7,4);}}i(T);var q=!1;function J(t,e,r,i){P(t,(s<<1)+(i?1:0),3),function(t,e,r,i){M(t),i&&(U(t,r),U(t,~r)),n.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r;}(t,e,r,!0);}r._tr_init=function(t){q||(function(){var t,e,r,i,n,s=new Array(g+1);for(i=r=0;i<a-1;i++)for(I[i]=r,t=0;t<1<<w[i];t++)A[r++]=i;for(A[r-1]=i,i=n=0;i<16;i++)for(T[i]=n,t=0;t<1<<k[i];t++)E[n++]=i;for(n>>=7;i<f;i++)for(T[i]=n<<7,t=0;t<1<<k[i]-7;t++)E[256+n++]=i;for(e=0;e<=g;e++)s[e]=0;for(t=0;t<=143;)z[2*t+1]=8,t++,s[8]++;for(;t<=255;)z[2*t+1]=9,t++,s[9]++;for(;t<=279;)z[2*t+1]=7,t++,s[7]++;for(;t<=287;)z[2*t+1]=8,t++,s[8]++;for(Z(z,l+1,s),t=0;t<f;t++)C[2*t+1]=5,C[2*t]=j(t,5);O=new D(z,w,u+1,l,g),B=new D(C,k,0,f,g),R=new D(new Array(0),x,0,d,p);}(),q=!0),t.l_desc=new F(t.dyn_ltree,O),t.d_desc=new F(t.dyn_dtree,B),t.bl_desc=new F(t.bl_tree,R),t.bi_buf=0,t.bi_valid=0,W(t);},r._tr_stored_block=J,r._tr_flush_block=function(t,e,r,i){var n,s,a=0;0<t.level?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return o;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return h;for(e=32;e<u;e++)if(0!==t.dyn_ltree[2*e])return h;return o}(t)),Y(t,t.l_desc),Y(t,t.d_desc),a=function(t){var e;for(X(t,t.dyn_ltree,t.l_desc.max_code),X(t,t.dyn_dtree,t.d_desc.max_code),Y(t,t.bl_desc),e=d-1;3<=e&&0===t.bl_tree[2*S[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),n=t.opt_len+3+7>>>3,(s=t.static_len+3+7>>>3)<=n&&(n=s)):n=s=r+5,r+4<=n&&-1!==e?J(t,e,r,i):4===t.strategy||s===n?(P(t,2+(i?1:0),3),K(t,z,C)):(P(t,4+(i?1:0),3),function(t,e,r,i){var n;for(P(t,e-257,5),P(t,r-1,5),P(t,i-4,4),n=0;n<i;n++)P(t,t.bl_tree[2*S[n]+1],3);V(t,t.dyn_ltree,e-1),V(t,t.dyn_dtree,r-1);}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),K(t,t.dyn_ltree,t.dyn_dtree)),W(t),i&&M(t);},r._tr_tally=function(t,e,r){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(A[r]+u+1)]++,t.dyn_dtree[2*N(e)]++),t.last_lit===t.lit_bufsize-1},r._tr_align=function(t){P(t,2,3),L(t,m,z),function(t){16===t.bi_valid?(U(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8);}(t);};},{"../utils/common":41}],53:[function(t,e,r){e.exports=function(){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;};},{}],54:[function(t,e,r){e.exports="function"==typeof setImmediate?setImmediate:function(){var t=[].slice.apply(arguments);t.splice(1,0,0),setTimeout.apply(null,t);};},{}]},{},[10])(10)});
|
|
2019
|
+
!function(t){module.exports=t();}(function(){return function s(a,o,h){function u(r,t){if(!o[r]){if(!a[r]){var e="function"==typeof commonjsRequire&&commonjsRequire;if(!t&&e)return e(r,!0);if(l)return l(r,!0);var i=new Error("Cannot find module '"+r+"'");throw i.code="MODULE_NOT_FOUND",i}var n=o[r]={exports:{}};a[r][0].call(n.exports,function(t){var e=a[r][1][t];return u(e||t)},n,n.exports,s,a,o,h);}return o[r].exports}for(var l="function"==typeof commonjsRequire&&commonjsRequire,t=0;t<h.length;t++)u(h[t]);return u}({1:[function(t,e,r){var c=t("./utils"),d=t("./support"),p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(t){for(var e,r,i,n,s,a,o,h=[],u=0,l=t.length,f=l,d="string"!==c.getTypeOf(t);u<t.length;)f=l-u,i=d?(e=t[u++],r=u<l?t[u++]:0,u<l?t[u++]:0):(e=t.charCodeAt(u++),r=u<l?t.charCodeAt(u++):0,u<l?t.charCodeAt(u++):0),n=e>>2,s=(3&e)<<4|r>>4,a=1<f?(15&r)<<2|i>>6:64,o=2<f?63&i:64,h.push(p.charAt(n)+p.charAt(s)+p.charAt(a)+p.charAt(o));return h.join("")},r.decode=function(t){var e,r,i,n,s,a,o=0,h=0,u="data:";if(t.substr(0,u.length)===u)throw new Error("Invalid base64 input, it looks like a data url.");var l,f=3*(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(t.charAt(t.length-1)===p.charAt(64)&&f--,t.charAt(t.length-2)===p.charAt(64)&&f--,f%1!=0)throw new Error("Invalid base64 input, bad content length.");for(l=d.uint8array?new Uint8Array(0|f):new Array(0|f);o<t.length;)e=p.indexOf(t.charAt(o++))<<2|(n=p.indexOf(t.charAt(o++)))>>4,r=(15&n)<<4|(s=p.indexOf(t.charAt(o++)))>>2,i=(3&s)<<6|(a=p.indexOf(t.charAt(o++))),l[h++]=e,64!==s&&(l[h++]=r),64!==a&&(l[h++]=i);return l};},{"./support":30,"./utils":32}],2:[function(t,e,r){var i=t("./external"),n=t("./stream/DataWorker"),s=t("./stream/Crc32Probe"),a=t("./stream/DataLengthProbe");function o(t,e,r,i,n){this.compressedSize=t,this.uncompressedSize=e,this.crc32=r,this.compression=i,this.compressedContent=n;}o.prototype={getContentWorker:function(){var t=new n(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),e=this;return t.on("end",function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),t},getCompressedWorker:function(){return new n(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},o.createWorkerFrom=function(t,e,r){return t.pipe(new s).pipe(new a("uncompressedSize")).pipe(e.compressWorker(r)).pipe(new a("compressedSize")).withStreamInfo("compression",e)},e.exports=o;},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,e,r){var i=t("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(t){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},r.DEFLATE=t("./flate");},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,e,r){var i=t("./utils");var o=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t;}return e}();e.exports=function(t,e){return void 0!==t&&t.length?"string"!==i.getTypeOf(t)?function(t,e,r,i){var n=o,s=i+r;t^=-1;for(var a=i;a<s;a++)t=t>>>8^n[255&(t^e[a])];return -1^t}(0|e,t,t.length,0):function(t,e,r,i){var n=o,s=i+r;t^=-1;for(var a=i;a<s;a++)t=t>>>8^n[255&(t^e.charCodeAt(a))];return -1^t}(0|e,t,t.length,0):0};},{"./utils":32}],5:[function(t,e,r){r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null;},{}],6:[function(t,e,r){var i=null;i="undefined"!=typeof Promise?Promise:t("lie"),e.exports={Promise:i};},{lie:37}],7:[function(t,e,r){var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,n=t("pako"),s=t("./utils"),a=t("./stream/GenericWorker"),o=i?"uint8array":"array";function h(t,e){a.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={};}r.magic="\b\0",s.inherits(h,a),h.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(s.transformTo(o,t.data),!1);},h.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0);},h.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null;},h.prototype._createPako=function(){this._pako=new n[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta});};},r.compressWorker=function(t){return new h("Deflate",t)},r.uncompressWorker=function(){return new h("Inflate",{})};},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,r){function A(t,e){var r,i="";for(r=0;r<e;r++)i+=String.fromCharCode(255&t),t>>>=8;return i}function i(t,e,r,i,n,s){var a,o,h=t.file,u=t.compression,l=s!==O.utf8encode,f=I.transformTo("string",s(h.name)),d=I.transformTo("string",O.utf8encode(h.name)),c=h.comment,p=I.transformTo("string",s(c)),m=I.transformTo("string",O.utf8encode(c)),_=d.length!==h.name.length,g=m.length!==c.length,b="",v="",y="",w=h.dir,k=h.date,x={crc32:0,compressedSize:0,uncompressedSize:0};e&&!r||(x.crc32=t.crc32,x.compressedSize=t.compressedSize,x.uncompressedSize=t.uncompressedSize);var S=0;e&&(S|=8),l||!_&&!g||(S|=2048);var z=0,C=0;w&&(z|=16),"UNIX"===n?(C=798,z|=function(t,e){var r=t;return t||(r=e?16893:33204),(65535&r)<<16}(h.unixPermissions,w)):(C=20,z|=function(t){return 63&(t||0)}(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)+d,b+="up"+A(v.length,2)+v),g&&(y=A(1,1)+A(B(p),4)+m,b+="uc"+A(y.length,2)+y);var E="";return E+="\n\0",E+=A(S,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(i,4)+f+b+p}}var I=t("../utils"),n=t("../stream/GenericWorker"),O=t("../utf8"),B=t("../crc32"),R=t("../signature");function s(t,e,r,i){n.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=r,this.encodeFileName=i,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[];}I.inherits(s,n),s.prototype.push=function(t){var e=t.meta.percent||0,r=this.entriesCount,i=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,n.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:r?(e+100*(r-i-1))/r:100}}));},s.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var r=i(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}});}else this.accumulate=!0;},s.prototype.closedSource=function(t){this.accumulate=!1;var e=this.streamFiles&&!t.file.dir,r=i(t,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),e)this.push({data:function(t){return R.DATA_DESCRIPTOR+A(t.crc32,4)+A(t.compressedSize,4)+A(t.uncompressedSize,4)}(t),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null;},s.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e<this.dirRecords.length;e++)this.push({data:this.dirRecords[e],meta:{percent:100}});var r=this.bytesWritten-t,i=function(t,e,r,i,n){var s=I.transformTo("string",n(i));return R.CENTRAL_DIRECTORY_END+"\0\0\0\0"+A(t,2)+A(t,2)+A(e,4)+A(r,4)+A(s.length,2)+s}(this.dirRecords.length,r,t,this.zipComment,this.encodeFileName);this.push({data:i,meta:{percent:100}});},s.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume();},s.prototype.registerPrevious=function(t){this._sources.push(t);var e=this;return t.on("data",function(t){e.processChunk(t);}),t.on("end",function(){e.closedSource(e.previous.streamInfo),e._sources.length?e.prepareNextSource():e.end();}),t.on("error",function(t){e.error(t);}),this},s.prototype.resume=function(){return !!n.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},s.prototype.error=function(t){var e=this._sources;if(!n.prototype.error.call(this,t))return !1;for(var r=0;r<e.length;r++)try{e[r].error(t);}catch(t){}return !0},s.prototype.lock=function(){n.prototype.lock.call(this);for(var t=this._sources,e=0;e<t.length;e++)t[e].lock();},e.exports=s;},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(t,e,r){var u=t("../compressions"),i=t("./ZipFileWorker");r.generateWorker=function(t,a,e){var o=new i(a.streamFiles,e,a.platform,a.encodeFileName),h=0;try{t.forEach(function(t,e){h++;var r=function(t,e){var r=t||e,i=u[r];if(!i)throw new Error(r+" is not a valid compression method !");return i}(e.options.compression,a.compression),i=e.options.compressionOptions||a.compressionOptions||{},n=e.dir,s=e.date;e._compressWorker(r,i).withStreamInfo("file",{name:t,dir:n,date:s,comment:e.comment||"",unixPermissions:e.unixPermissions,dosPermissions:e.dosPermissions}).pipe(o);}),o.entriesCount=h;}catch(t){o.error(t);}return o};},{"../compressions":3,"./ZipFileWorker":8}],10:[function(t,e,r){function i(){if(!(this instanceof i))return new i;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var t=new i;for(var e in this)"function"!=typeof this[e]&&(t[e]=this[e]);return t};}(i.prototype=t("./object")).loadAsync=t("./load"),i.support=t("./support"),i.defaults=t("./defaults"),i.version="3.9.1",i.loadAsync=function(t,e){return (new i).loadAsync(t,e)},i.external=t("./external"),e.exports=i;},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(t,e,r){var u=t("./utils"),n=t("./external"),i=t("./utf8"),s=t("./zipEntries"),a=t("./stream/Crc32Probe"),l=t("./nodejsUtils");function f(i){return new n.Promise(function(t,e){var r=i.decompressed.getContentWorker().pipe(new a);r.on("error",function(t){e(t);}).on("end",function(){r.streamInfo.crc32!==i.decompressed.crc32?e(new Error("Corrupted zip : CRC32 mismatch")):t();}).resume();})}e.exports=function(t,o){var h=this;return o=u.extend(o||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:i.utf8decode}),l.isNode&&l.isStream(t)?n.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):u.prepareContent("the loaded zip file",t,!0,o.optimizedBinaryString,o.base64).then(function(t){var e=new s(o);return e.load(t),e}).then(function(t){var e=[n.Promise.resolve(t)],r=t.files;if(o.checkCRC32)for(var i=0;i<r.length;i++)e.push(f(r[i]));return n.Promise.all(e)}).then(function(t){for(var e=t.shift(),r=e.files,i=0;i<r.length;i++){var n=r[i],s=n.fileNameStr,a=u.resolve(n.fileNameStr);h.file(a,n.decompressed,{binary:!0,optimizedBinaryString:!0,date:n.date,dir:n.dir,comment:n.fileCommentStr.length?n.fileCommentStr:null,unixPermissions:n.unixPermissions,dosPermissions:n.dosPermissions,createFolders:o.createFolders}),n.dir||(h.file(a).unsafeOriginalName=s);}return e.zipComment.length&&(h.comment=e.zipComment),h})};},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(t,e,r){var i=t("../utils"),n=t("../stream/GenericWorker");function s(t,e){n.call(this,"Nodejs stream input adapter for "+t),this._upstreamEnded=!1,this._bindStream(e);}i.inherits(s,n),s.prototype._bindStream=function(t){var e=this;(this._stream=t).pause(),t.on("data",function(t){e.push({data:t,meta:{percent:0}});}).on("error",function(t){e.isPaused?this.generatedError=t:e.error(t);}).on("end",function(){e.isPaused?e._upstreamEnded=!0:e.end();});},s.prototype.pause=function(){return !!n.prototype.pause.call(this)&&(this._stream.pause(),!0)},s.prototype.resume=function(){return !!n.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},e.exports=s;},{"../stream/GenericWorker":28,"../utils":32}],13:[function(t,e,r){var n=t("readable-stream").Readable;function i(t,e,r){n.call(this,e),this._helper=t;var i=this;t.on("data",function(t,e){i.push(t)||i._helper.pause(),r&&r(e);}).on("error",function(t){i.emit("error",t);}).on("end",function(){i.push(null);});}t("../utils").inherits(i,n),i.prototype._read=function(){this._helper.resume();},e.exports=i;},{"../utils":32,"readable-stream":16}],14:[function(t,e,r){e.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(t,e){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(t,e);if("number"==typeof t)throw new Error('The "data" argument must not be a number');return new Buffer(t,e)},allocBuffer:function(t){if(Buffer.alloc)return Buffer.alloc(t);var e=new Buffer(t);return e.fill(0),e},isBuffer:function(t){return isBuffer(t)},isStream:function(t){return t&&"function"==typeof t.on&&"function"==typeof t.pause&&"function"==typeof t.resume}};},{}],15:[function(t,e,r){function s(t,e,r){var i,n=u.getTypeOf(e),s=u.extend(r||{},f);s.date=s.date||new Date,null!==s.compression&&(s.compression=s.compression.toUpperCase()),"string"==typeof s.unixPermissions&&(s.unixPermissions=parseInt(s.unixPermissions,8)),s.unixPermissions&&16384&s.unixPermissions&&(s.dir=!0),s.dosPermissions&&16&s.dosPermissions&&(s.dir=!0),s.dir&&(t=g(t)),s.createFolders&&(i=_(t))&&b.call(this,i,!0);var a="string"===n&&!1===s.binary&&!1===s.base64;r&&void 0!==r.binary||(s.binary=!a),(e instanceof d&&0===e.uncompressedSize||s.dir||!e||0===e.length)&&(s.base64=!1,s.binary=!0,e="",s.compression="STORE",n="string");var o=null;o=e instanceof d||e instanceof l?e:p.isNode&&p.isStream(e)?new m(t,e):u.prepareContent(t,e,s.binary,s.optimizedBinaryString,s.base64);var h=new c(t,o,s);this.files[t]=h;}var n=t("./utf8"),u=t("./utils"),l=t("./stream/GenericWorker"),a=t("./stream/StreamHelper"),f=t("./defaults"),d=t("./compressedObject"),c=t("./zipObject"),o=t("./generate"),p=t("./nodejsUtils"),m=t("./nodejs/NodejsStreamInputAdapter"),_=function(t){"/"===t.slice(-1)&&(t=t.substring(0,t.length-1));var e=t.lastIndexOf("/");return 0<e?t.substring(0,e):""},g=function(t){return "/"!==t.slice(-1)&&(t+="/"),t},b=function(t,e){return e=void 0!==e?e:f.createFolders,t=g(t),this.files[t]||s.call(this,t,null,{dir:!0,createFolders:e}),this.files[t]};function h(t){return "[object RegExp]"===Object.prototype.toString.call(t)}var i={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(t){var e,r,i;for(e in this.files)i=this.files[e],(r=e.slice(this.root.length,e.length))&&e.slice(0,this.root.length)===this.root&&t(r,i);},filter:function(r){var i=[];return this.forEach(function(t,e){r(t,e)&&i.push(e);}),i},file:function(t,e,r){if(1!==arguments.length)return t=this.root+t,s.call(this,t,e,r),this;if(h(t)){var i=t;return this.filter(function(t,e){return !e.dir&&i.test(t)})}var n=this.files[this.root+t];return n&&!n.dir?n:null},folder:function(r){if(!r)return this;if(h(r))return this.filter(function(t,e){return e.dir&&r.test(t)});var t=this.root+r,e=b.call(this,t),i=this.clone();return i.root=e.name,i},remove:function(r){r=this.root+r;var t=this.files[r];if(t||("/"!==r.slice(-1)&&(r+="/"),t=this.files[r]),t&&!t.dir)delete this.files[r];else for(var e=this.filter(function(t,e){return e.name.slice(0,r.length)===r}),i=0;i<e.length;i++)delete this.files[e[i].name];return this},generate:function(t){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(t){var e,r={};try{if((r=u.extend(t||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:n.utf8encode})).type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),"binarystring"===r.type&&(r.type="string"),!r.type)throw new Error("No output type specified.");u.checkSupport(r.type),"darwin"!==r.platform&&"freebsd"!==r.platform&&"linux"!==r.platform&&"sunos"!==r.platform||(r.platform="UNIX"),"win32"===r.platform&&(r.platform="DOS");var i=r.comment||this.comment||"";e=o.generateWorker(this,r,i);}catch(t){(e=new l("error")).error(t);}return new a(e,r.type||"string",r.mimeType)},generateAsync:function(t,e){return this.generateInternalStream(t).accumulate(e)},generateNodeStream:function(t,e){return (t=t||{}).type||(t.type="nodebuffer"),this.generateInternalStream(t).toNodejsStream(e)}};e.exports=i;},{"./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(t,e,r){e.exports=t("stream");},{stream:void 0}],17:[function(t,e,r){var i=t("./DataReader");function n(t){i.call(this,t);for(var e=0;e<this.data.length;e++)t[e]=255&t[e];}t("../utils").inherits(n,i),n.prototype.byteAt=function(t){return this.data[this.zero+t]},n.prototype.lastIndexOfSignature=function(t){for(var e=t.charCodeAt(0),r=t.charCodeAt(1),i=t.charCodeAt(2),n=t.charCodeAt(3),s=this.length-4;0<=s;--s)if(this.data[s]===e&&this.data[s+1]===r&&this.data[s+2]===i&&this.data[s+3]===n)return s-this.zero;return -1},n.prototype.readAndCheckSignature=function(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),i=t.charCodeAt(2),n=t.charCodeAt(3),s=this.readData(4);return e===s[0]&&r===s[1]&&i===s[2]&&n===s[3]},n.prototype.readData=function(t){if(this.checkOffset(t),0===t)return [];var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n;},{"../utils":32,"./DataReader":18}],18:[function(t,e,r){var i=t("../utils");function n(t){this.data=t,this.length=t.length,this.index=0,this.zero=0;}n.prototype={checkOffset:function(t){this.checkIndex(this.index+t);},checkIndex:function(t){if(this.length<this.zero+t||t<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+t+"). Corrupted zip ?")},setIndex:function(t){this.checkIndex(t),this.index=t;},skip:function(t){this.setIndex(this.index+t);},byteAt:function(t){},readInt:function(t){var e,r=0;for(this.checkOffset(t),e=this.index+t-1;e>=this.index;e--)r=(r<<8)+this.byteAt(e);return this.index+=t,r},readString:function(t){return i.transformTo("string",this.readData(t))},readData:function(t){},lastIndexOfSignature:function(t){},readAndCheckSignature:function(t){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},e.exports=n;},{"../utils":32}],19:[function(t,e,r){var i=t("./Uint8ArrayReader");function n(t){i.call(this,t);}t("../utils").inherits(n,i),n.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n;},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,r){var i=t("./DataReader");function n(t){i.call(this,t);}t("../utils").inherits(n,i),n.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},n.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},n.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},n.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n;},{"../utils":32,"./DataReader":18}],21:[function(t,e,r){var i=t("./ArrayReader");function n(t){i.call(this,t);}t("../utils").inherits(n,i),n.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n;},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,r){var i=t("../utils"),n=t("../support"),s=t("./ArrayReader"),a=t("./StringReader"),o=t("./NodeBufferReader"),h=t("./Uint8ArrayReader");e.exports=function(t){var e=i.getTypeOf(t);return i.checkSupport(e),"string"!==e||n.uint8array?"nodebuffer"===e?new o(t):n.uint8array?new h(i.transformTo("uint8array",t)):new s(i.transformTo("array",t)):new a(t)};},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,r){r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b";},{}],24:[function(t,e,r){var i=t("./GenericWorker"),n=t("../utils");function s(t){i.call(this,"ConvertWorker to "+t),this.destType=t;}n.inherits(s,i),s.prototype.processChunk=function(t){this.push({data:n.transformTo(this.destType,t.data),meta:t.meta});},e.exports=s;},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,r){var i=t("./GenericWorker"),n=t("../crc32");function s(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0);}t("../utils").inherits(s,i),s.prototype.processChunk=function(t){this.streamInfo.crc32=n(t.data,this.streamInfo.crc32||0),this.push(t);},e.exports=s;},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,r){var i=t("../utils"),n=t("./GenericWorker");function s(t){n.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0);}i.inherits(s,n),s.prototype.processChunk=function(t){if(t){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+t.data.length;}n.prototype.processChunk.call(this,t);},e.exports=s;},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,r){var i=t("../utils"),n=t("./GenericWorker");function s(t){n.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then(function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=i.getTypeOf(t),e.isPaused||e._tickAndRepeat();},function(t){e.error(t);});}i.inherits(s,n),s.prototype.cleanUp=function(){n.prototype.cleanUp.call(this),this.data=null;},s.prototype.resume=function(){return !!n.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0));},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return !1;var t=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":t=this.data.slice(this.index,e);}return this.index=e,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=s;},{"../utils":32,"./GenericWorker":28}],28:[function(t,e,r){function i(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null;}i.prototype={push:function(t){this.emit("data",t);},end:function(){if(this.isFinished)return !1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0;}catch(t){this.emit("error",t);}return !0},error:function(t){return !this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[];},emit:function(t,e){if(this._listeners[t])for(var r=0;r<this._listeners[t].length;r++)this._listeners[t][r].call(this,e);},pipe:function(t){return t.registerPrevious(this)},registerPrevious:function(t){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=t.streamInfo,this.mergeStreamInfo(),this.previous=t;var e=this;return t.on("data",function(t){e.processChunk(t);}),t.on("end",function(){e.end();}),t.on("error",function(t){e.error(t);}),this},pause:function(){return !this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return !1;var t=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),t=!0),this.previous&&this.previous.resume(),!t},flush:function(){},processChunk:function(t){this.push(t);},withStreamInfo:function(t,e){return this.extraStreamInfo[t]=e,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var t in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(t)&&(this.streamInfo[t]=this.extraStreamInfo[t]);},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock();},toString:function(){var t="Worker "+this.name;return this.previous?this.previous+" -> "+t:t}},e.exports=i;},{}],29:[function(t,e,r){var h=t("../utils"),n=t("./ConvertWorker"),s=t("./GenericWorker"),u=t("../base64"),i=t("../support"),a=t("../external"),o=null;if(i.nodestream)try{o=t("../nodejs/NodejsStreamOutputAdapter");}catch(t){}function l(t,o){return new a.Promise(function(e,r){var i=[],n=t._internalType,s=t._outputType,a=t._mimeType;t.on("data",function(t,e){i.push(t),o&&o(e);}).on("error",function(t){i=[],r(t);}).on("end",function(){try{var t=function(t,e,r){switch(t){case"blob":return h.newBlob(h.transformTo("arraybuffer",e),r);case"base64":return u.encode(e);default:return h.transformTo(t,e)}}(s,function(t,e){var r,i=0,n=null,s=0;for(r=0;r<e.length;r++)s+=e[r].length;switch(t){case"string":return e.join("");case"array":return Array.prototype.concat.apply([],e);case"uint8array":for(n=new Uint8Array(s),r=0;r<e.length;r++)n.set(e[r],i),i+=e[r].length;return n;case"nodebuffer":return Buffer.concat(e);default:throw new Error("concat : unsupported type '"+t+"'")}}(n,i),a);e(t);}catch(t){r(t);}i=[];}).resume();})}function f(t,e,r){var i=e;switch(e){case"blob":case"arraybuffer":i="uint8array";break;case"base64":i="string";}try{this._internalType=i,this._outputType=e,this._mimeType=r,h.checkSupport(i),this._worker=t.pipe(new n(i)),t.lock();}catch(t){this._worker=new s("error"),this._worker.error(t);}}f.prototype={accumulate:function(t){return l(this,t)},on:function(t,e){var r=this;return "data"===t?this._worker.on(t,function(t){e.call(r,t.data,t.meta);}):this._worker.on(t,function(){h.delay(e,arguments,r);}),this},resume:function(){return h.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(t){if(h.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new o(this,{objectMode:"nodebuffer"!==this._outputType},t)}},e.exports=f;},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(t,e,r){if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,r.nodebuffer="undefined"!=typeof Buffer,r.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)r.blob=!1;else {var i=new ArrayBuffer(0);try{r.blob=0===new Blob([i],{type:"application/zip"}).size;}catch(t){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);n.append(i),r.blob=0===n.getBlob("application/zip").size;}catch(t){r.blob=!1;}}}try{r.nodestream=!!t("readable-stream").Readable;}catch(t){r.nodestream=!1;}},{"readable-stream":16}],31:[function(t,e,s){for(var o=t("./utils"),h=t("./support"),r=t("./nodejsUtils"),i=t("./stream/GenericWorker"),u=new Array(256),n=0;n<256;n++)u[n]=252<=n?6:248<=n?5:240<=n?4:224<=n?3:192<=n?2:1;u[254]=u[254]=1;function a(){i.call(this,"utf-8 decode"),this.leftOver=null;}function l(){i.call(this,"utf-8 encode");}s.utf8encode=function(t){return h.nodebuffer?r.newBufferFrom(t,"utf-8"):function(t){var e,r,i,n,s,a=t.length,o=0;for(n=0;n<a;n++)55296==(64512&(r=t.charCodeAt(n)))&&n+1<a&&56320==(64512&(i=t.charCodeAt(n+1)))&&(r=65536+(r-55296<<10)+(i-56320),n++),o+=r<128?1:r<2048?2:r<65536?3:4;for(e=h.uint8array?new Uint8Array(o):new Array(o),n=s=0;s<o;n++)55296==(64512&(r=t.charCodeAt(n)))&&n+1<a&&56320==(64512&(i=t.charCodeAt(n+1)))&&(r=65536+(r-55296<<10)+(i-56320),n++),r<128?e[s++]=r:(r<2048?e[s++]=192|r>>>6:(r<65536?e[s++]=224|r>>>12:(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63),e[s++]=128|r>>>6&63),e[s++]=128|63&r);return e}(t)},s.utf8decode=function(t){return h.nodebuffer?o.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,r,i,n,s=t.length,a=new Array(2*s);for(e=r=0;e<s;)if((i=t[e++])<128)a[r++]=i;else if(4<(n=u[i]))a[r++]=65533,e+=n-1;else {for(i&=2===n?31:3===n?15:7;1<n&&e<s;)i=i<<6|63&t[e++],n--;1<n?a[r++]=65533:i<65536?a[r++]=i:(i-=65536,a[r++]=55296|i>>10&1023,a[r++]=56320|1023&i);}return a.length!==r&&(a.subarray?a=a.subarray(0,r):a.length=r),o.applyFromCharCode(a)}(t=o.transformTo(h.uint8array?"uint8array":"array",t))},o.inherits(a,i),a.prototype.processChunk=function(t){var e=o.transformTo(h.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(h.uint8array){var r=e;(e=new Uint8Array(r.length+this.leftOver.length)).set(this.leftOver,0),e.set(r,this.leftOver.length);}else e=this.leftOver.concat(e);this.leftOver=null;}var i=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;0<=r&&128==(192&t[r]);)r--;return r<0?e:0===r?e:r+u[t[r]]>e?r:e}(e),n=e;i!==e.length&&(h.uint8array?(n=e.subarray(0,i),this.leftOver=e.subarray(i,e.length)):(n=e.slice(0,i),this.leftOver=e.slice(i,e.length))),this.push({data:s.utf8decode(n),meta:t.meta});},a.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null);},s.Utf8DecodeWorker=a,o.inherits(l,i),l.prototype.processChunk=function(t){this.push({data:s.utf8encode(t.data),meta:t.meta});},s.Utf8EncodeWorker=l;},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,a){var o=t("./support"),h=t("./base64"),r=t("./nodejsUtils"),i=t("set-immediate-shim"),u=t("./external");function n(t){return t}function l(t,e){for(var r=0;r<t.length;++r)e[r]=255&t.charCodeAt(r);return e}a.newBlob=function(e,r){a.checkSupport("blob");try{return new Blob([e],{type:r})}catch(t){try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return i.append(e),i.getBlob(r)}catch(t){throw new Error("Bug : can't construct the Blob.")}}};var s={stringifyByChunk:function(t,e,r){var i=[],n=0,s=t.length;if(s<=r)return String.fromCharCode.apply(null,t);for(;n<s;)"array"===e||"nodebuffer"===e?i.push(String.fromCharCode.apply(null,t.slice(n,Math.min(n+r,s)))):i.push(String.fromCharCode.apply(null,t.subarray(n,Math.min(n+r,s)))),n+=r;return i.join("")},stringifyByChar:function(t){for(var e="",r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},applyCanBeUsed:{uint8array:function(){try{return o.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(t){return !1}}(),nodebuffer:function(){try{return o.nodebuffer&&1===String.fromCharCode.apply(null,r.allocBuffer(1)).length}catch(t){return !1}}()}};function f(t){var e=65536,r=a.getTypeOf(t),i=!0;if("uint8array"===r?i=s.applyCanBeUsed.uint8array:"nodebuffer"===r&&(i=s.applyCanBeUsed.nodebuffer),i)for(;1<e;)try{return s.stringifyByChunk(t,r,e)}catch(t){e=Math.floor(e/2);}return s.stringifyByChar(t)}function d(t,e){for(var r=0;r<t.length;r++)e[r]=t[r];return e}a.applyFromCharCode=f;var c={};c.string={string:n,array:function(t){return l(t,new Array(t.length))},arraybuffer:function(t){return c.string.uint8array(t).buffer},uint8array:function(t){return l(t,new Uint8Array(t.length))},nodebuffer:function(t){return l(t,r.allocBuffer(t.length))}},c.array={string:f,array:n,arraybuffer:function(t){return new Uint8Array(t).buffer},uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return r.newBufferFrom(t)}},c.arraybuffer={string:function(t){return f(new Uint8Array(t))},array:function(t){return d(new Uint8Array(t),new Array(t.byteLength))},arraybuffer:n,uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return r.newBufferFrom(new Uint8Array(t))}},c.uint8array={string:f,array:function(t){return d(t,new Array(t.length))},arraybuffer:function(t){return t.buffer},uint8array:n,nodebuffer:function(t){return r.newBufferFrom(t)}},c.nodebuffer={string:f,array:function(t){return d(t,new Array(t.length))},arraybuffer:function(t){return c.nodebuffer.uint8array(t).buffer},uint8array:function(t){return d(t,new Uint8Array(t.length))},nodebuffer:n},a.transformTo=function(t,e){if(e=e||"",!t)return e;a.checkSupport(t);var r=a.getTypeOf(e);return c[r][t](e)},a.resolve=function(t){for(var e=t.split("/"),r=[],i=0;i<e.length;i++){var n=e[i];"."===n||""===n&&0!==i&&i!==e.length-1||(".."===n?r.pop():r.push(n));}return r.join("/")},a.getTypeOf=function(t){return "string"==typeof t?"string":"[object Array]"===Object.prototype.toString.call(t)?"array":o.nodebuffer&&r.isBuffer(t)?"nodebuffer":o.uint8array&&t instanceof Uint8Array?"uint8array":o.arraybuffer&&t instanceof ArrayBuffer?"arraybuffer":void 0},a.checkSupport=function(t){if(!o[t.toLowerCase()])throw new Error(t+" is not supported by this platform")},a.MAX_VALUE_16BITS=65535,a.MAX_VALUE_32BITS=-1,a.pretty=function(t){var e,r,i="";for(r=0;r<(t||"").length;r++)i+="\\x"+((e=t.charCodeAt(r))<16?"0":"")+e.toString(16).toUpperCase();return i},a.delay=function(t,e,r){i(function(){t.apply(r||null,e||[]);});},a.inherits=function(t,e){function r(){}r.prototype=e.prototype,t.prototype=new r;},a.extend=function(){var t,e,r={};for(t=0;t<arguments.length;t++)for(e in arguments[t])arguments[t].hasOwnProperty(e)&&void 0===r[e]&&(r[e]=arguments[t][e]);return r},a.prepareContent=function(r,t,i,n,s){return u.Promise.resolve(t).then(function(i){return o.blob&&(i instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(i)))&&"undefined"!=typeof FileReader?new u.Promise(function(e,r){var t=new FileReader;t.onload=function(t){e(t.target.result);},t.onerror=function(t){r(t.target.error);},t.readAsArrayBuffer(i);}):i}).then(function(t){var e=a.getTypeOf(t);return e?("arraybuffer"===e?t=a.transformTo("uint8array",t):"string"===e&&(s?t=h.decode(t):i&&!0!==n&&(t=function(t){return l(t,o.uint8array?new Uint8Array(t.length):new Array(t.length))}(t))),t):u.Promise.reject(new Error("Can't read the data of '"+r+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})};},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,"set-immediate-shim":54}],33:[function(t,e,r){var i=t("./reader/readerFor"),n=t("./utils"),s=t("./signature"),a=t("./zipEntry"),o=(t("./utf8"),t("./support"));function h(t){this.files=[],this.loadOptions=t;}h.prototype={checkSignature:function(t){if(!this.reader.readAndCheckSignature(t)){this.reader.index-=4;var e=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+n.pretty(e)+", expected "+n.pretty(t)+")")}},isSignature:function(t,e){var r=this.reader.index;this.reader.setIndex(t);var i=this.reader.readString(4)===e;return this.reader.setIndex(r),i},readBlockEndOfCentral:function(){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);var t=this.reader.readData(this.zipCommentLength),e=o.uint8array?"uint8array":"array",r=n.transformTo(e,t);this.zipComment=this.loadOptions.decodeFileName(r);},readBlockZip64EndOfCentral:function(){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={};for(var t,e,r,i=this.zip64EndOfCentralSize-44;0<i;)t=this.reader.readInt(2),e=this.reader.readInt(4),r=this.reader.readData(e),this.zip64ExtensibleData[t]={id:t,length:e,value:r};},readBlockZip64EndOfCentralLocator:function(){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")},readLocalFiles:function(){var t,e;for(t=0;t<this.files.length;t++)e=this.files[t],this.reader.setIndex(e.localHeaderOffset),this.checkSignature(s.LOCAL_FILE_HEADER),e.readLocalPart(this.reader),e.handleUTF8(),e.processAttributes();},readCentralDir:function(){var t;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER);)(t=new a({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(t);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var t=this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);if(t<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");this.reader.setIndex(t);var e=t;if(this.checkSignature(s.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===n.MAX_VALUE_16BITS||this.diskWithCentralDirStart===n.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===n.MAX_VALUE_16BITS||this.centralDirRecords===n.MAX_VALUE_16BITS||this.centralDirSize===n.MAX_VALUE_32BITS||this.centralDirOffset===n.MAX_VALUE_32BITS){if(this.zip64=!0,(t=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(t),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");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral();}var r=this.centralDirOffset+this.centralDirSize;this.zip64&&(r+=20,r+=12+this.zip64EndOfCentralSize);var i=e-r;if(0<i)this.isSignature(e,s.CENTRAL_FILE_HEADER)||(this.reader.zero=i);else if(i<0)throw new Error("Corrupted zip: missing "+Math.abs(i)+" bytes.")},prepareReader:function(t){this.reader=i(t);},load:function(t){this.prepareReader(t),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles();}},e.exports=h;},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utf8":31,"./utils":32,"./zipEntry":34}],34:[function(t,e,r){var i=t("./reader/readerFor"),s=t("./utils"),n=t("./compressedObject"),a=t("./crc32"),o=t("./utf8"),h=t("./compressions"),u=t("./support");function l(t,e){this.options=t,this.loadOptions=e;}l.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(t){var e,r;if(t.skip(22),this.fileNameLength=t.readInt(2),r=t.readInt(2),this.fileName=t.readData(this.fileNameLength),t.skip(r),-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)");if(null===(e=function(t){for(var e in h)if(h.hasOwnProperty(e)&&h[e].magic===t)return h[e];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+s.pretty(this.compressionMethod)+" unknown (inner file : "+s.transformTo("string",this.fileName)+")");this.decompressed=new n(this.compressedSize,this.uncompressedSize,this.crc32,e,t.readData(this.compressedSize));},readCentralPart:function(t){this.versionMadeBy=t.readInt(2),t.skip(2),this.bitFlag=t.readInt(2),this.compressionMethod=t.readString(2),this.date=t.readDate(),this.crc32=t.readInt(4),this.compressedSize=t.readInt(4),this.uncompressedSize=t.readInt(4);var e=t.readInt(2);if(this.extraFieldsLength=t.readInt(2),this.fileCommentLength=t.readInt(2),this.diskNumberStart=t.readInt(2),this.internalFileAttributes=t.readInt(2),this.externalFileAttributes=t.readInt(4),this.localHeaderOffset=t.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");t.skip(e),this.readExtraFields(t),this.parseZIP64ExtraField(t),this.fileComment=t.readData(this.fileCommentLength);},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var t=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==t&&(this.dosPermissions=63&this.externalFileAttributes),3==t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0);},parseZIP64ExtraField:function(t){if(this.extraFields[1]){var e=i(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4));}},readExtraFields:function(t){var e,r,i,n=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+4<n;)e=t.readInt(2),r=t.readInt(2),i=t.readData(r),this.extraFields[e]={id:e,length:r,value:i};t.setIndex(n);},handleUTF8:function(){var t=u.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=o.utf8decode(this.fileName),this.fileCommentStr=o.utf8decode(this.fileComment);else {var e=this.findExtraFieldUnicodePath();if(null!==e)this.fileNameStr=e;else {var r=s.transformTo(t,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r);}var i=this.findExtraFieldUnicodeComment();if(null!==i)this.fileCommentStr=i;else {var n=s.transformTo(t,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(n);}}},findExtraFieldUnicodePath:function(){var t=this.extraFields[28789];if(t){var e=i(t.value);return 1!==e.readInt(1)?null:a(this.fileName)!==e.readInt(4)?null:o.utf8decode(e.readData(t.length-5))}return null},findExtraFieldUnicodeComment:function(){var t=this.extraFields[25461];if(t){var e=i(t.value);return 1!==e.readInt(1)?null:a(this.fileComment)!==e.readInt(4)?null:o.utf8decode(e.readData(t.length-5))}return null}},e.exports=l;},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,e,r){function i(t,e,r){this.name=t,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=e,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions};}var s=t("./stream/StreamHelper"),n=t("./stream/DataWorker"),a=t("./utf8"),o=t("./compressedObject"),h=t("./stream/GenericWorker");i.prototype={internalStream:function(t){var e=null,r="string";try{if(!t)throw new Error("No output type specified.");var i="string"===(r=t.toLowerCase())||"text"===r;"binarystring"!==r&&"text"!==r||(r="string"),e=this._decompressWorker();var n=!this._dataBinary;n&&!i&&(e=e.pipe(new a.Utf8EncodeWorker)),!n&&i&&(e=e.pipe(new a.Utf8DecodeWorker));}catch(t){(e=new h("error")).error(t);}return new s(e,r,"")},async:function(t,e){return this.internalStream(t).accumulate(e)},nodeStream:function(t,e){return this.internalStream(t||"nodebuffer").toNodejsStream(e)},_compressWorker:function(t,e){if(this._data instanceof o&&this._data.compression.magic===t.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new a.Utf8EncodeWorker)),o.createWorkerFrom(r,t,e)},_decompressWorker:function(){return this._data instanceof o?this._data.getContentWorker():this._data instanceof h?this._data:new n(this._data)}};for(var u=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],l=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},f=0;f<u.length;f++)i.prototype[u[f]]=l;e.exports=i;},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(t,l,e){(function(e){var r,i,t=e.MutationObserver||e.WebKitMutationObserver;if(t){var n=0,s=new t(u),a=e.document.createTextNode("");s.observe(a,{characterData:!0}),r=function(){a.data=n=++n%2;};}else if(e.setImmediate||void 0===e.MessageChannel)r="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){u(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null;},e.document.documentElement.appendChild(t);}:function(){setTimeout(u,0);};else {var o=new e.MessageChannel;o.port1.onmessage=u,r=function(){o.port2.postMessage(0);};}var h=[];function u(){var t,e;i=!0;for(var r=h.length;r;){for(e=h,h=[],t=-1;++t<r;)e[t]();r=h.length;}i=!1;}l.exports=function(t){1!==h.push(t)||i||r();};}).call(this,"undefined"!=typeof commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});},{}],37:[function(t,e,r){var n=t("immediate");function u(){}var l={},s=["REJECTED"],a=["FULFILLED"],i=["PENDING"];function o(t){if("function"!=typeof t)throw new TypeError("resolver must be a function");this.state=i,this.queue=[],this.outcome=void 0,t!==u&&c(this,t);}function h(t,e,r){this.promise=t,"function"==typeof e&&(this.onFulfilled=e,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected);}function f(e,r,i){n(function(){var t;try{t=r(i);}catch(t){return l.reject(e,t)}t===e?l.reject(e,new TypeError("Cannot resolve promise with itself")):l.resolve(e,t);});}function d(t){var e=t&&t.then;if(t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof e)return function(){e.apply(t,arguments);}}function c(e,t){var r=!1;function i(t){r||(r=!0,l.reject(e,t));}function n(t){r||(r=!0,l.resolve(e,t));}var s=p(function(){t(n,i);});"error"===s.status&&i(s.value);}function p(t,e){var r={};try{r.value=t(e),r.status="success";}catch(t){r.status="error",r.value=t;}return r}(e.exports=o).prototype.finally=function(e){if("function"!=typeof e)return this;var r=this.constructor;return this.then(function(t){return r.resolve(e()).then(function(){return t})},function(t){return r.resolve(e()).then(function(){throw t})})},o.prototype.catch=function(t){return this.then(null,t)},o.prototype.then=function(t,e){if("function"!=typeof t&&this.state===a||"function"!=typeof e&&this.state===s)return this;var r=new this.constructor(u);this.state!==i?f(r,this.state===a?t:e,this.outcome):this.queue.push(new h(r,t,e));return r},h.prototype.callFulfilled=function(t){l.resolve(this.promise,t);},h.prototype.otherCallFulfilled=function(t){f(this.promise,this.onFulfilled,t);},h.prototype.callRejected=function(t){l.reject(this.promise,t);},h.prototype.otherCallRejected=function(t){f(this.promise,this.onRejected,t);},l.resolve=function(t,e){var r=p(d,e);if("error"===r.status)return l.reject(t,r.value);var i=r.value;if(i)c(t,i);else {t.state=a,t.outcome=e;for(var n=-1,s=t.queue.length;++n<s;)t.queue[n].callFulfilled(e);}return t},l.reject=function(t,e){t.state=s,t.outcome=e;for(var r=-1,i=t.queue.length;++r<i;)t.queue[r].callRejected(e);return t},o.resolve=function(t){if(t instanceof this)return t;return l.resolve(new this(u),t)},o.reject=function(t){var e=new this(u);return l.reject(e,t)},o.all=function(t){var r=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var i=t.length,n=!1;if(!i)return this.resolve([]);var s=new Array(i),a=0,e=-1,o=new this(u);for(;++e<i;)h(t[e],e);return o;function h(t,e){r.resolve(t).then(function(t){s[e]=t,++a!==i||n||(n=!0,l.resolve(o,s));},function(t){n||(n=!0,l.reject(o,t));});}},o.race=function(t){var e=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var r=t.length,i=!1;if(!r)return this.resolve([]);var n=-1,s=new this(u);for(;++n<r;)a=t[n],e.resolve(a).then(function(t){i||(i=!0,l.resolve(s,t));},function(t){i||(i=!0,l.reject(s,t));});var a;return s};},{immediate:36}],38:[function(t,e,r){var i={};(0, t("./lib/utils/common").assign)(i,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),e.exports=i;},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(t,e,r){var a=t("./zlib/deflate"),o=t("./utils/common"),h=t("./utils/strings"),n=t("./zlib/messages"),s=t("./zlib/zstream"),u=Object.prototype.toString,l=0,f=-1,d=0,c=8;function p(t){if(!(this instanceof p))return new p(t);this.options=o.assign({level:f,method:c,chunkSize:16384,windowBits:15,memLevel:8,strategy:d,to:""},t||{});var e=this.options;e.raw&&0<e.windowBits?e.windowBits=-e.windowBits:e.gzip&&0<e.windowBits&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var r=a.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==l)throw new Error(n[r]);if(e.header&&a.deflateSetHeader(this.strm,e.header),e.dictionary){var i;if(i="string"==typeof e.dictionary?h.string2buf(e.dictionary):"[object ArrayBuffer]"===u.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,(r=a.deflateSetDictionary(this.strm,i))!==l)throw new Error(n[r]);this._dict_set=!0;}}function i(t,e){var r=new p(e);if(r.push(t,!0),r.err)throw r.msg||n[r.err];return r.result}p.prototype.push=function(t,e){var r,i,n=this.strm,s=this.options.chunkSize;if(this.ended)return !1;i=e===~~e?e:!0===e?4:0,"string"==typeof t?n.input=h.string2buf(t):"[object ArrayBuffer]"===u.call(t)?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;do{if(0===n.avail_out&&(n.output=new o.Buf8(s),n.next_out=0,n.avail_out=s),1!==(r=a.deflate(n,i))&&r!==l)return this.onEnd(r),!(this.ended=!0);0!==n.avail_out&&(0!==n.avail_in||4!==i&&2!==i)||("string"===this.options.to?this.onData(h.buf2binstring(o.shrinkBuf(n.output,n.next_out))):this.onData(o.shrinkBuf(n.output,n.next_out)));}while((0<n.avail_in||0===n.avail_out)&&1!==r);return 4===i?(r=a.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===l):2!==i||(this.onEnd(l),!(n.avail_out=0))},p.prototype.onData=function(t){this.chunks.push(t);},p.prototype.onEnd=function(t){t===l&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg;},r.Deflate=p,r.deflate=i,r.deflateRaw=function(t,e){return (e=e||{}).raw=!0,i(t,e)},r.gzip=function(t,e){return (e=e||{}).gzip=!0,i(t,e)};},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(t,e,r){var d=t("./zlib/inflate"),c=t("./utils/common"),p=t("./utils/strings"),m=t("./zlib/constants"),i=t("./zlib/messages"),n=t("./zlib/zstream"),s=t("./zlib/gzheader"),_=Object.prototype.toString;function a(t){if(!(this instanceof a))return new a(t);this.options=c.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&0<=e.windowBits&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(0<=e.windowBits&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),15<e.windowBits&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new n,this.strm.avail_out=0;var r=d.inflateInit2(this.strm,e.windowBits);if(r!==m.Z_OK)throw new Error(i[r]);this.header=new s,d.inflateGetHeader(this.strm,this.header);}function o(t,e){var r=new a(e);if(r.push(t,!0),r.err)throw r.msg||i[r.err];return r.result}a.prototype.push=function(t,e){var r,i,n,s,a,o,h=this.strm,u=this.options.chunkSize,l=this.options.dictionary,f=!1;if(this.ended)return !1;i=e===~~e?e:!0===e?m.Z_FINISH:m.Z_NO_FLUSH,"string"==typeof t?h.input=p.binstring2buf(t):"[object ArrayBuffer]"===_.call(t)?h.input=new Uint8Array(t):h.input=t,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new c.Buf8(u),h.next_out=0,h.avail_out=u),(r=d.inflate(h,m.Z_NO_FLUSH))===m.Z_NEED_DICT&&l&&(o="string"==typeof l?p.string2buf(l):"[object ArrayBuffer]"===_.call(l)?new Uint8Array(l):l,r=d.inflateSetDictionary(this.strm,o)),r===m.Z_BUF_ERROR&&!0===f&&(r=m.Z_OK,f=!1),r!==m.Z_STREAM_END&&r!==m.Z_OK)return this.onEnd(r),!(this.ended=!0);h.next_out&&(0!==h.avail_out&&r!==m.Z_STREAM_END&&(0!==h.avail_in||i!==m.Z_FINISH&&i!==m.Z_SYNC_FLUSH)||("string"===this.options.to?(n=p.utf8border(h.output,h.next_out),s=h.next_out-n,a=p.buf2string(h.output,n),h.next_out=s,h.avail_out=u-s,s&&c.arraySet(h.output,h.output,n,s,0),this.onData(a)):this.onData(c.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(f=!0);}while((0<h.avail_in||0===h.avail_out)&&r!==m.Z_STREAM_END);return r===m.Z_STREAM_END&&(i=m.Z_FINISH),i===m.Z_FINISH?(r=d.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===m.Z_OK):i!==m.Z_SYNC_FLUSH||(this.onEnd(m.Z_OK),!(h.avail_out=0))},a.prototype.onData=function(t){this.chunks.push(t);},a.prototype.onEnd=function(t){t===m.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=c.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg;},r.Inflate=a,r.inflate=o,r.inflateRaw=function(t,e){return (e=e||{}).raw=!0,o(t,e)},r.ungzip=o;},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(t,e,r){var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;r.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i]);}}return t},r.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var n={arraySet:function(t,e,r,i,n){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+i),n);else for(var s=0;s<i;s++)t[n+s]=e[r+s];},flattenChunks:function(t){var e,r,i,n,s,a;for(e=i=0,r=t.length;e<r;e++)i+=t[e].length;for(a=new Uint8Array(i),e=n=0,r=t.length;e<r;e++)s=t[e],a.set(s,n),n+=s.length;return a}},s={arraySet:function(t,e,r,i,n){for(var s=0;s<i;s++)t[n+s]=e[r+s];},flattenChunks:function(t){return [].concat.apply([],t)}};r.setTyped=function(t){t?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,n)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,s));},r.setTyped(i);},{}],42:[function(t,e,r){var h=t("./common"),n=!0,s=!0;try{String.fromCharCode.apply(null,[0]);}catch(t){n=!1;}try{String.fromCharCode.apply(null,new Uint8Array(1));}catch(t){s=!1;}for(var u=new h.Buf8(256),i=0;i<256;i++)u[i]=252<=i?6:248<=i?5:240<=i?4:224<=i?3:192<=i?2:1;function l(t,e){if(e<65537&&(t.subarray&&s||!t.subarray&&n))return String.fromCharCode.apply(null,h.shrinkBuf(t,e));for(var r="",i=0;i<e;i++)r+=String.fromCharCode(t[i]);return r}u[254]=u[254]=1,r.string2buf=function(t){var e,r,i,n,s,a=t.length,o=0;for(n=0;n<a;n++)55296==(64512&(r=t.charCodeAt(n)))&&n+1<a&&56320==(64512&(i=t.charCodeAt(n+1)))&&(r=65536+(r-55296<<10)+(i-56320),n++),o+=r<128?1:r<2048?2:r<65536?3:4;for(e=new h.Buf8(o),n=s=0;s<o;n++)55296==(64512&(r=t.charCodeAt(n)))&&n+1<a&&56320==(64512&(i=t.charCodeAt(n+1)))&&(r=65536+(r-55296<<10)+(i-56320),n++),r<128?e[s++]=r:(r<2048?e[s++]=192|r>>>6:(r<65536?e[s++]=224|r>>>12:(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63),e[s++]=128|r>>>6&63),e[s++]=128|63&r);return e},r.buf2binstring=function(t){return l(t,t.length)},r.binstring2buf=function(t){for(var e=new h.Buf8(t.length),r=0,i=e.length;r<i;r++)e[r]=t.charCodeAt(r);return e},r.buf2string=function(t,e){var r,i,n,s,a=e||t.length,o=new Array(2*a);for(r=i=0;r<a;)if((n=t[r++])<128)o[i++]=n;else if(4<(s=u[n]))o[i++]=65533,r+=s-1;else {for(n&=2===s?31:3===s?15:7;1<s&&r<a;)n=n<<6|63&t[r++],s--;1<s?o[i++]=65533:n<65536?o[i++]=n:(n-=65536,o[i++]=55296|n>>10&1023,o[i++]=56320|1023&n);}return l(o,i)},r.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;0<=r&&128==(192&t[r]);)r--;return r<0?e:0===r?e:r+u[t[r]]>e?r:e};},{"./common":41}],43:[function(t,e,r){e.exports=function(t,e,r,i){for(var n=65535&t|0,s=t>>>16&65535|0,a=0;0!==r;){for(r-=a=2e3<r?2e3:r;s=s+(n=n+e[i++]|0)|0,--a;);n%=65521,s%=65521;}return n|s<<16|0};},{}],44:[function(t,e,r){e.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};},{}],45:[function(t,e,r){var o=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t;}return e}();e.exports=function(t,e,r,i){var n=o,s=i+r;t^=-1;for(var a=i;a<s;a++)t=t>>>8^n[255&(t^e[a])];return -1^t};},{}],46:[function(t,e,r){var h,d=t("../utils/common"),u=t("./trees"),c=t("./adler32"),p=t("./crc32"),i=t("./messages"),l=0,f=4,m=0,_=-2,g=-1,b=4,n=2,v=8,y=9,s=286,a=30,o=19,w=2*s+1,k=15,x=3,S=258,z=S+x+1,C=42,E=113,A=1,I=2,O=3,B=4;function R(t,e){return t.msg=i[e],e}function T(t){return (t<<1)-(4<t?9:0)}function D(t){for(var e=t.length;0<=--e;)t[e]=0;}function F(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(d.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0));}function N(t,e){u._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,F(t.strm);}function U(t,e){t.pending_buf[t.pending++]=e;}function P(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e;}function L(t,e){var r,i,n=t.max_chain_length,s=t.strstart,a=t.prev_length,o=t.nice_match,h=t.strstart>t.w_size-z?t.strstart-(t.w_size-z):0,u=t.window,l=t.w_mask,f=t.prev,d=t.strstart+S,c=u[s+a-1],p=u[s+a];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do{if(u[(r=e)+a]===p&&u[r+a-1]===c&&u[r]===u[s]&&u[++r]===u[s+1]){s+=2,r++;do{}while(u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&s<d);if(i=S-(d-s),s=d-S,a<i){if(t.match_start=e,o<=(a=i))break;c=u[s+a-1],p=u[s+a];}}}while((e=f[e&l])>h&&0!=--n);return a<=t.lookahead?a:t.lookahead}function j(t){var e,r,i,n,s,a,o,h,u,l,f=t.w_size;do{if(n=t.window_size-t.lookahead-t.strstart,t.strstart>=f+(f-z)){for(d.arraySet(t.window,t.window,f,f,0),t.match_start-=f,t.strstart-=f,t.block_start-=f,e=r=t.hash_size;i=t.head[--e],t.head[e]=f<=i?i-f:0,--r;);for(e=r=f;i=t.prev[--e],t.prev[e]=f<=i?i-f:0,--r;);n+=f;}if(0===t.strm.avail_in)break;if(a=t.strm,o=t.window,h=t.strstart+t.lookahead,u=n,l=void 0,l=a.avail_in,u<l&&(l=u),r=0===l?0:(a.avail_in-=l,d.arraySet(o,a.input,a.next_in,l,h),1===a.state.wrap?a.adler=c(a.adler,o,l,h):2===a.state.wrap&&(a.adler=p(a.adler,o,l,h)),a.next_in+=l,a.total_in+=l,l),t.lookahead+=r,t.lookahead+t.insert>=x)for(s=t.strstart-t.insert,t.ins_h=t.window[s],t.ins_h=(t.ins_h<<t.hash_shift^t.window[s+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[s+x-1])&t.hash_mask,t.prev[s&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=s,s++,t.insert--,!(t.lookahead+t.insert<x)););}while(t.lookahead<z&&0!==t.strm.avail_in)}function Z(t,e){for(var r,i;;){if(t.lookahead<z){if(j(t),t.lookahead<z&&e===l)return A;if(0===t.lookahead)break}if(r=0,t.lookahead>=x&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+x-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-z&&(t.match_length=L(t,r)),t.match_length>=x)if(i=u._tr_tally(t,t.strstart-t.match_start,t.match_length-x),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=x){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+x-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart,0!=--t.match_length;);t.strstart++;}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else i=u._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(N(t,!1),0===t.strm.avail_out))return A}return t.insert=t.strstart<x-1?t.strstart:x-1,e===f?(N(t,!0),0===t.strm.avail_out?O:B):t.last_lit&&(N(t,!1),0===t.strm.avail_out)?A:I}function W(t,e){for(var r,i,n;;){if(t.lookahead<z){if(j(t),t.lookahead<z&&e===l)return A;if(0===t.lookahead)break}if(r=0,t.lookahead>=x&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+x-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=x-1,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-z&&(t.match_length=L(t,r),t.match_length<=5&&(1===t.strategy||t.match_length===x&&4096<t.strstart-t.match_start)&&(t.match_length=x-1)),t.prev_length>=x&&t.match_length<=t.prev_length){for(n=t.strstart+t.lookahead-x,i=u._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-x),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=n&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+x-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!=--t.prev_length;);if(t.match_available=0,t.match_length=x-1,t.strstart++,i&&(N(t,!1),0===t.strm.avail_out))return A}else if(t.match_available){if((i=u._tr_tally(t,0,t.window[t.strstart-1]))&&N(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return A}else t.match_available=1,t.strstart++,t.lookahead--;}return t.match_available&&(i=u._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<x-1?t.strstart:x-1,e===f?(N(t,!0),0===t.strm.avail_out?O:B):t.last_lit&&(N(t,!1),0===t.strm.avail_out)?A:I}function M(t,e,r,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=i,this.func=n;}function H(){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 d.Buf16(2*w),this.dyn_dtree=new d.Buf16(2*(2*a+1)),this.bl_tree=new d.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 d.Buf16(k+1),this.heap=new d.Buf16(2*s+1),D(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new d.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;}function G(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=n,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?C:E,t.adler=2===e.wrap?0:1,e.last_flush=l,u._tr_init(e),m):R(t,_)}function K(t){var e=G(t);return e===m&&function(t){t.window_size=2*t.w_size,D(t.head),t.max_lazy_match=h[t.level].max_lazy,t.good_match=h[t.level].good_length,t.nice_match=h[t.level].nice_length,t.max_chain_length=h[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=x-1,t.match_available=0,t.ins_h=0;}(t.state),e}function Y(t,e,r,i,n,s){if(!t)return _;var a=1;if(e===g&&(e=6),i<0?(a=0,i=-i):15<i&&(a=2,i-=16),n<1||y<n||r!==v||i<8||15<i||e<0||9<e||s<0||b<s)return R(t,_);8===i&&(i=9);var o=new H;return (t.state=o).strm=t,o.wrap=a,o.gzhead=null,o.w_bits=i,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=n+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+x-1)/x),o.window=new d.Buf8(2*o.w_size),o.head=new d.Buf16(o.hash_size),o.prev=new d.Buf16(o.w_size),o.lit_bufsize=1<<n+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new d.Buf8(o.pending_buf_size),o.d_buf=1*o.lit_bufsize,o.l_buf=3*o.lit_bufsize,o.level=e,o.strategy=s,o.method=r,K(t)}h=[new M(0,0,0,0,function(t,e){var r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(j(t),0===t.lookahead&&e===l)return A;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+r;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,N(t,!1),0===t.strm.avail_out))return A;if(t.strstart-t.block_start>=t.w_size-z&&(N(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(N(t,!0),0===t.strm.avail_out?O:B):(t.strstart>t.block_start&&(N(t,!1),t.strm.avail_out),A)}),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(t,e){return Y(t,e,v,15,8,0)},r.deflateInit2=Y,r.deflateReset=K,r.deflateResetKeep=G,r.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?_:(t.state.gzhead=e,m):_},r.deflate=function(t,e){var r,i,n,s;if(!t||!t.state||5<e||e<0)return t?R(t,_):_;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||666===i.status&&e!==f)return R(t,0===t.avail_out?-5:_);if(i.strm=t,r=i.last_flush,i.last_flush=e,i.status===C)if(2===i.wrap)t.adler=0,U(i,31),U(i,139),U(i,8),i.gzhead?(U(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),U(i,255&i.gzhead.time),U(i,i.gzhead.time>>8&255),U(i,i.gzhead.time>>16&255),U(i,i.gzhead.time>>24&255),U(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),U(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(U(i,255&i.gzhead.extra.length),U(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=p(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(U(i,0),U(i,0),U(i,0),U(i,0),U(i,0),U(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),U(i,3),i.status=E);else {var a=v+(i.w_bits-8<<4)<<8;a|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(a|=32),a+=31-a%31,i.status=E,P(i,a),0!==i.strstart&&(P(i,t.adler>>>16),P(i,65535&t.adler)),t.adler=1;}if(69===i.status)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>n&&(t.adler=p(t.adler,i.pending_buf,i.pending-n,n)),F(t),n=i.pending,i.pending!==i.pending_buf_size));)U(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(t.adler=p(t.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73);}else i.status=73;if(73===i.status)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=p(t.adler,i.pending_buf,i.pending-n,n)),F(t),n=i.pending,i.pending===i.pending_buf_size)){s=1;break}s=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,U(i,s);}while(0!==s);i.gzhead.hcrc&&i.pending>n&&(t.adler=p(t.adler,i.pending_buf,i.pending-n,n)),0===s&&(i.gzindex=0,i.status=91);}else i.status=91;if(91===i.status)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=p(t.adler,i.pending_buf,i.pending-n,n)),F(t),n=i.pending,i.pending===i.pending_buf_size)){s=1;break}s=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,U(i,s);}while(0!==s);i.gzhead.hcrc&&i.pending>n&&(t.adler=p(t.adler,i.pending_buf,i.pending-n,n)),0===s&&(i.status=103);}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&F(t),i.pending+2<=i.pending_buf_size&&(U(i,255&t.adler),U(i,t.adler>>8&255),t.adler=0,i.status=E)):i.status=E),0!==i.pending){if(F(t),0===t.avail_out)return i.last_flush=-1,m}else if(0===t.avail_in&&T(e)<=T(r)&&e!==f)return R(t,-5);if(666===i.status&&0!==t.avail_in)return R(t,-5);if(0!==t.avail_in||0!==i.lookahead||e!==l&&666!==i.status){var o=2===i.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(j(t),0===t.lookahead)){if(e===l)return A;break}if(t.match_length=0,r=u._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(N(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(N(t,!0),0===t.strm.avail_out?O:B):t.last_lit&&(N(t,!1),0===t.strm.avail_out)?A:I}(i,e):3===i.strategy?function(t,e){for(var r,i,n,s,a=t.window;;){if(t.lookahead<=S){if(j(t),t.lookahead<=S&&e===l)return A;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=x&&0<t.strstart&&(i=a[n=t.strstart-1])===a[++n]&&i===a[++n]&&i===a[++n]){s=t.strstart+S;do{}while(i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&n<s);t.match_length=S-(s-n),t.match_length>t.lookahead&&(t.match_length=t.lookahead);}if(t.match_length>=x?(r=u._tr_tally(t,1,t.match_length-x),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=u._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(N(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(N(t,!0),0===t.strm.avail_out?O:B):t.last_lit&&(N(t,!1),0===t.strm.avail_out)?A:I}(i,e):h[i.level].func(i,e);if(o!==O&&o!==B||(i.status=666),o===A||o===O)return 0===t.avail_out&&(i.last_flush=-1),m;if(o===I&&(1===e?u._tr_align(i):5!==e&&(u._tr_stored_block(i,0,0,!1),3===e&&(D(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),F(t),0===t.avail_out))return i.last_flush=-1,m}return e!==f?m:i.wrap<=0?1:(2===i.wrap?(U(i,255&t.adler),U(i,t.adler>>8&255),U(i,t.adler>>16&255),U(i,t.adler>>24&255),U(i,255&t.total_in),U(i,t.total_in>>8&255),U(i,t.total_in>>16&255),U(i,t.total_in>>24&255)):(P(i,t.adler>>>16),P(i,65535&t.adler)),F(t),0<i.wrap&&(i.wrap=-i.wrap),0!==i.pending?m:1)},r.deflateEnd=function(t){var e;return t&&t.state?(e=t.state.status)!==C&&69!==e&&73!==e&&91!==e&&103!==e&&e!==E&&666!==e?R(t,_):(t.state=null,e===E?R(t,-3):m):_},r.deflateSetDictionary=function(t,e){var r,i,n,s,a,o,h,u,l=e.length;if(!t||!t.state)return _;if(2===(s=(r=t.state).wrap)||1===s&&r.status!==C||r.lookahead)return _;for(1===s&&(t.adler=c(t.adler,e,l,0)),r.wrap=0,l>=r.w_size&&(0===s&&(D(r.head),r.strstart=0,r.block_start=0,r.insert=0),u=new d.Buf8(r.w_size),d.arraySet(u,e,l-r.w_size,r.w_size,0),e=u,l=r.w_size),a=t.avail_in,o=t.next_in,h=t.input,t.avail_in=l,t.next_in=0,t.input=e,j(r);r.lookahead>=x;){for(i=r.strstart,n=r.lookahead-(x-1);r.ins_h=(r.ins_h<<r.hash_shift^r.window[i+x-1])&r.hash_mask,r.prev[i&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=i,i++,--n;);r.strstart=i,r.lookahead=x-1,j(r);}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=x-1,r.match_available=0,t.next_in=o,t.input=h,t.avail_in=a,r.wrap=s,m},r.deflateInfo="pako deflate (from Nodeca project)";},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(t,e,r){e.exports=function(){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=!1;};},{}],48:[function(t,e,r){e.exports=function(t,e){var r,i,n,s,a,o,h,u,l,f,d,c,p,m,_,g,b,v,y,w,k,x,S,z,C;r=t.state,i=t.next_in,z=t.input,n=i+(t.avail_in-5),s=t.next_out,C=t.output,a=s-(e-t.avail_out),o=s+(t.avail_out-257),h=r.dmax,u=r.wsize,l=r.whave,f=r.wnext,d=r.window,c=r.hold,p=r.bits,m=r.lencode,_=r.distcode,g=(1<<r.lenbits)-1,b=(1<<r.distbits)-1;t:do{p<15&&(c+=z[i++]<<p,p+=8,c+=z[i++]<<p,p+=8),v=m[c&g];e:for(;;){if(c>>>=y=v>>>24,p-=y,0===(y=v>>>16&255))C[s++]=65535&v;else {if(!(16&y)){if(0==(64&y)){v=m[(65535&v)+(c&(1<<y)-1)];continue e}if(32&y){r.mode=12;break t}t.msg="invalid literal/length code",r.mode=30;break t}w=65535&v,(y&=15)&&(p<y&&(c+=z[i++]<<p,p+=8),w+=c&(1<<y)-1,c>>>=y,p-=y),p<15&&(c+=z[i++]<<p,p+=8,c+=z[i++]<<p,p+=8),v=_[c&b];r:for(;;){if(c>>>=y=v>>>24,p-=y,!(16&(y=v>>>16&255))){if(0==(64&y)){v=_[(65535&v)+(c&(1<<y)-1)];continue r}t.msg="invalid distance code",r.mode=30;break t}if(k=65535&v,p<(y&=15)&&(c+=z[i++]<<p,(p+=8)<y&&(c+=z[i++]<<p,p+=8)),h<(k+=c&(1<<y)-1)){t.msg="invalid distance too far back",r.mode=30;break t}if(c>>>=y,p-=y,(y=s-a)<k){if(l<(y=k-y)&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(S=d,(x=0)===f){if(x+=u-y,y<w){for(w-=y;C[s++]=d[x++],--y;);x=s-k,S=C;}}else if(f<y){if(x+=u+f-y,(y-=f)<w){for(w-=y;C[s++]=d[x++],--y;);if(x=0,f<w){for(w-=y=f;C[s++]=d[x++],--y;);x=s-k,S=C;}}}else if(x+=f-y,y<w){for(w-=y;C[s++]=d[x++],--y;);x=s-k,S=C;}for(;2<w;)C[s++]=S[x++],C[s++]=S[x++],C[s++]=S[x++],w-=3;w&&(C[s++]=S[x++],1<w&&(C[s++]=S[x++]));}else {for(x=s-k;C[s++]=C[x++],C[s++]=C[x++],C[s++]=C[x++],2<(w-=3););w&&(C[s++]=C[x++],1<w&&(C[s++]=C[x++]));}break}}break}}while(i<n&&s<o);i-=w=p>>3,c&=(1<<(p-=w<<3))-1,t.next_in=i,t.next_out=s,t.avail_in=i<n?n-i+5:5-(i-n),t.avail_out=s<o?o-s+257:257-(s-o),r.hold=c,r.bits=p;};},{}],49:[function(t,e,r){var I=t("../utils/common"),O=t("./adler32"),B=t("./crc32"),R=t("./inffast"),T=t("./inftrees"),D=1,F=2,N=0,U=-2,P=1,i=852,n=592;function L(t){return (t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function s(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,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;}function a(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=P,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new I.Buf32(i),e.distcode=e.distdyn=new I.Buf32(n),e.sane=1,e.back=-1,N):U}function o(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,a(t)):U}function h(t,e){var r,i;return t&&t.state?(i=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15<e)?U:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=r,i.wbits=e,o(t))):U}function u(t,e){var r,i;return t?(i=new s,(t.state=i).window=null,(r=h(t,e))!==N&&(t.state=null),r):U}var l,f,d=!0;function j(t){if(d){var e;for(l=new I.Buf32(512),f=new I.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(T(D,t.lens,0,288,l,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;T(F,t.lens,0,32,f,0,t.work,{bits:5}),d=!1;}t.lencode=l,t.lenbits=9,t.distcode=f,t.distbits=5;}function Z(t,e,r,i){var n,s=t.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new I.Buf8(s.wsize)),i>=s.wsize?(I.arraySet(s.window,e,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(i<(n=s.wsize-s.wnext)&&(n=i),I.arraySet(s.window,e,r-i,n,s.wnext),(i-=n)?(I.arraySet(s.window,e,r-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=n))),0}r.inflateReset=o,r.inflateReset2=h,r.inflateResetKeep=a,r.inflateInit=function(t){return u(t,15)},r.inflateInit2=u,r.inflate=function(t,e){var r,i,n,s,a,o,h,u,l,f,d,c,p,m,_,g,b,v,y,w,k,x,S,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];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return U;12===(r=t.state).mode&&(r.mode=13),a=t.next_out,n=t.output,h=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,u=r.hold,l=r.bits,f=o,d=h,x=N;t:for(;;)switch(r.mode){case P:if(0===r.wrap){r.mode=13;break}for(;l<16;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}if(2&r.wrap&&35615===u){E[r.check=0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0),l=u=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&u)<<8)+(u>>8))%31){t.msg="incorrect header check",r.mode=30;break}if(8!=(15&u)){t.msg="unknown compression method",r.mode=30;break}if(l-=4,k=8+(15&(u>>>=4)),0===r.wbits)r.wbits=k;else if(k>r.wbits){t.msg="invalid window size",r.mode=30;break}r.dmax=1<<k,t.adler=r.check=1,r.mode=512&u?10:12,l=u=0;break;case 2:for(;l<16;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}if(r.flags=u,8!=(255&r.flags)){t.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=u>>8&1),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=3;case 3:for(;l<32;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}r.head&&(r.head.time=u),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,E[2]=u>>>16&255,E[3]=u>>>24&255,r.check=B(r.check,E,4,0)),l=u=0,r.mode=4;case 4:for(;l<16;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}r.head&&(r.head.xflags=255&u,r.head.os=u>>8),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=5;case 5:if(1024&r.flags){for(;l<16;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}r.length=u,r.head&&(r.head.extra_len=u),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0;}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(o<(c=r.length)&&(c=o),c&&(r.head&&(k=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),I.arraySet(r.head.extra,i,s,c,k)),512&r.flags&&(r.check=B(r.check,i,c,s)),o-=c,s+=c,r.length-=c),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===o)break t;for(c=0;k=i[s+c++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k)),k&&c<o;);if(512&r.flags&&(r.check=B(r.check,i,c,s)),o-=c,s+=c,k)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===o)break t;for(c=0;k=i[s+c++],r.head&&k&&r.length<65536&&(r.head.comment+=String.fromCharCode(k)),k&&c<o;);if(512&r.flags&&(r.check=B(r.check,i,c,s)),o-=c,s+=c,k)break t}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;l<16;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}if(u!==(65535&r.check)){t.msg="header crc mismatch",r.mode=30;break}l=u=0;}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=12;break;case 10:for(;l<32;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}t.adler=r.check=L(u),l=u=0,r.mode=11;case 11:if(0===r.havedict)return t.next_out=a,t.avail_out=h,t.next_in=s,t.avail_in=o,r.hold=u,r.bits=l,2;t.adler=r.check=1,r.mode=12;case 12:if(5===e||6===e)break t;case 13:if(r.last){u>>>=7&l,l-=7&l,r.mode=27;break}for(;l<3;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}switch(r.last=1&u,l-=1,3&(u>>>=1)){case 0:r.mode=14;break;case 1:if(j(r),r.mode=20,6!==e)break;u>>>=2,l-=2;break t;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=30;}u>>>=2,l-=2;break;case 14:for(u>>>=7&l,l-=7&l;l<32;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}if((65535&u)!=(u>>>16^65535)){t.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&u,l=u=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(c=r.length){if(o<c&&(c=o),h<c&&(c=h),0===c)break t;I.arraySet(n,i,s,c,a),o-=c,s+=c,h-=c,a+=c,r.length-=c;break}r.mode=12;break;case 17:for(;l<14;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}if(r.nlen=257+(31&u),u>>>=5,l-=5,r.ndist=1+(31&u),u>>>=5,l-=5,r.ncode=4+(15&u),u>>>=4,l-=4,286<r.nlen||30<r.ndist){t.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;l<3;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}r.lens[A[r.have++]]=7&u,u>>>=3,l-=3;}for(;r.have<19;)r.lens[A[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,S={bits:r.lenbits},x=T(0,r.lens,0,19,r.lencode,0,r.work,S),r.lenbits=S.bits,x){t.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;g=(C=r.lencode[u&(1<<r.lenbits)-1])>>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}if(b<16)u>>>=_,l-=_,r.lens[r.have++]=b;else {if(16===b){for(z=_+2;l<z;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}if(u>>>=_,l-=_,0===r.have){t.msg="invalid bit length repeat",r.mode=30;break}k=r.lens[r.have-1],c=3+(3&u),u>>>=2,l-=2;}else if(17===b){for(z=_+3;l<z;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}l-=_,k=0,c=3+(7&(u>>>=_)),u>>>=3,l-=3;}else {for(z=_+7;l<z;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}l-=_,k=0,c=11+(127&(u>>>=_)),u>>>=7,l-=7;}if(r.have+c>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=30;break}for(;c--;)r.lens[r.have++]=k;}}if(30===r.mode)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,S={bits:r.lenbits},x=T(D,r.lens,0,r.nlen,r.lencode,0,r.work,S),r.lenbits=S.bits,x){t.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,S={bits:r.distbits},x=T(F,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,S),r.distbits=S.bits,x){t.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(6<=o&&258<=h){t.next_out=a,t.avail_out=h,t.next_in=s,t.avail_in=o,r.hold=u,r.bits=l,R(t,d),a=t.next_out,n=t.output,h=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,u=r.hold,l=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;g=(C=r.lencode[u&(1<<r.lenbits)-1])>>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}if(g&&0==(240&g)){for(v=_,y=g,w=b;g=(C=r.lencode[w+((u&(1<<v+y)-1)>>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}u>>>=v,l-=v,r.back+=v;}if(u>>>=_,l-=_,r.back+=_,r.length=b,0===g){r.mode=26;break}if(32&g){r.back=-1,r.mode=12;break}if(64&g){t.msg="invalid literal/length code",r.mode=30;break}r.extra=15&g,r.mode=22;case 22:if(r.extra){for(z=r.extra;l<z;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}r.length+=u&(1<<r.extra)-1,u>>>=r.extra,l-=r.extra,r.back+=r.extra;}r.was=r.length,r.mode=23;case 23:for(;g=(C=r.distcode[u&(1<<r.distbits)-1])>>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}if(0==(240&g)){for(v=_,y=g,w=b;g=(C=r.distcode[w+((u&(1<<v+y)-1)>>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}u>>>=v,l-=v,r.back+=v;}if(u>>>=_,l-=_,r.back+=_,64&g){t.msg="invalid distance code",r.mode=30;break}r.offset=b,r.extra=15&g,r.mode=24;case 24:if(r.extra){for(z=r.extra;l<z;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}r.offset+=u&(1<<r.extra)-1,u>>>=r.extra,l-=r.extra,r.back+=r.extra;}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===h)break t;if(c=d-h,r.offset>c){if((c=r.offset-c)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=30;break}p=c>r.wnext?(c-=r.wnext,r.wsize-c):r.wnext-c,c>r.length&&(c=r.length),m=r.window;}else m=n,p=a-r.offset,c=r.length;for(h<c&&(c=h),h-=c,r.length-=c;n[a++]=m[p++],--c;);0===r.length&&(r.mode=21);break;case 26:if(0===h)break t;n[a++]=r.length,h--,r.mode=21;break;case 27:if(r.wrap){for(;l<32;){if(0===o)break t;o--,u|=i[s++]<<l,l+=8;}if(d-=h,t.total_out+=d,r.total+=d,d&&(t.adler=r.check=r.flags?B(r.check,n,d,a-d):O(r.check,n,d,a-d)),d=h,(r.flags?u:L(u))!==r.check){t.msg="incorrect data check",r.mode=30;break}l=u=0;}r.mode=28;case 28:if(r.wrap&&r.flags){for(;l<32;){if(0===o)break t;o--,u+=i[s++]<<l,l+=8;}if(u!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=30;break}l=u=0;}r.mode=29;case 29:x=1;break t;case 30:x=-3;break t;case 31:return -4;case 32:default:return U}return t.next_out=a,t.avail_out=h,t.next_in=s,t.avail_in=o,r.hold=u,r.bits=l,(r.wsize||d!==t.avail_out&&r.mode<30&&(r.mode<27||4!==e))&&Z(t,t.output,t.next_out,d-t.avail_out)?(r.mode=31,-4):(f-=t.avail_in,d-=t.avail_out,t.total_in+=f,t.total_out+=d,r.total+=d,r.wrap&&d&&(t.adler=r.check=r.flags?B(r.check,n,d,t.next_out-d):O(r.check,n,d,t.next_out-d)),t.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0==f&&0===d||4===e)&&x===N&&(x=-5),x)},r.inflateEnd=function(t){if(!t||!t.state)return U;var e=t.state;return e.window&&(e.window=null),t.state=null,N},r.inflateGetHeader=function(t,e){var r;return t&&t.state?0==(2&(r=t.state).wrap)?U:((r.head=e).done=!1,N):U},r.inflateSetDictionary=function(t,e){var r,i=e.length;return t&&t.state?0!==(r=t.state).wrap&&11!==r.mode?U:11===r.mode&&O(1,e,i,0)!==r.check?-3:Z(t,e,i,i)?(r.mode=31,-4):(r.havedict=1,N):U},r.inflateInfo="pako inflate (from Nodeca project)";},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(t,e,r){var D=t("../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];e.exports=function(t,e,r,i,n,s,a,o){var h,u,l,f,d,c,p,m,_,g=o.bits,b=0,v=0,y=0,w=0,k=0,x=0,S=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;for(b=0;b<=15;b++)O[b]=0;for(v=0;v<i;v++)O[e[r+v]]++;for(k=g,w=15;1<=w&&0===O[w];w--);if(w<k&&(k=w),0===w)return n[s++]=20971520,n[s++]=20971520,o.bits=1,0;for(y=1;y<w&&0===O[y];y++);for(k<y&&(k=y),b=z=1;b<=15;b++)if(z<<=1,(z-=O[b])<0)return -1;if(0<z&&(0===t||1!==w))return -1;for(B[1]=0,b=1;b<15;b++)B[b+1]=B[b]+O[b];for(v=0;v<i;v++)0!==e[r+v]&&(a[B[e[r+v]]++]=v);if(c=0===t?(A=R=a,19):1===t?(A=F,I-=257,R=N,T-=257,256):(A=U,R=P,-1),b=y,d=s,S=v=E=0,l=-1,f=(C=1<<(x=k))-1,1===t&&852<C||2===t&&592<C)return 1;for(;;){for(p=b-S,_=a[v]<c?(m=0,a[v]):a[v]>c?(m=R[T+a[v]],A[I+a[v]]):(m=96,0),h=1<<b-S,y=u=1<<x;n[d+(E>>S)+(u-=h)]=p<<24|m<<16|_|0,0!==u;);for(h=1<<b-1;E&h;)h>>=1;if(0!==h?(E&=h-1,E+=h):E=0,v++,0==--O[b]){if(b===w)break;b=e[r+a[v]];}if(k<b&&(E&f)!==l){for(0===S&&(S=k),d+=y,z=1<<(x=b-S);x+S<w&&!((z-=O[x+S])<=0);)x++,z<<=1;if(C+=1<<x,1===t&&852<C||2===t&&592<C)return 1;n[l=E&f]=k<<24|x<<16|d-s|0;}}return 0!==E&&(n[d+E]=b-S<<24|64<<16|0),o.bits=k,0};},{"../utils/common":41}],51:[function(t,e,r){e.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"};},{}],52:[function(t,e,r){var n=t("../utils/common"),o=0,h=1;function i(t){for(var e=t.length;0<=--e;)t[e]=0;}var s=0,a=29,u=256,l=u+1+a,f=30,d=19,_=2*l+1,g=15,c=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],S=[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));i(z);var C=new Array(2*f);i(C);var E=new Array(512);i(E);var A=new Array(256);i(A);var I=new Array(a);i(I);var O,B,R,T=new Array(f);function D(t,e,r,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=i,this.max_length=n,this.has_stree=t&&t.length;}function F(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e;}function N(t){return t<256?E[t]:E[256+(t>>>7)]}function U(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255;}function P(t,e,r){t.bi_valid>c-r?(t.bi_buf|=e<<t.bi_valid&65535,U(t,t.bi_buf),t.bi_buf=e>>c-t.bi_valid,t.bi_valid+=r-c):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r);}function L(t,e,r){P(t,r[2*e],r[2*e+1]);}function j(t,e){for(var r=0;r|=1&t,t>>>=1,r<<=1,0<--e;);return r>>>1}function Z(t,e,r){var i,n,s=new Array(g+1),a=0;for(i=1;i<=g;i++)s[i]=a=a+r[i-1]<<1;for(n=0;n<=e;n++){var o=t[2*n+1];0!==o&&(t[2*n]=j(s[o]++,o));}}function W(t){var e;for(e=0;e<l;e++)t.dyn_ltree[2*e]=0;for(e=0;e<f;e++)t.dyn_dtree[2*e]=0;for(e=0;e<d;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*m]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0;}function M(t){8<t.bi_valid?U(t,t.bi_buf):0<t.bi_valid&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0;}function H(t,e,r,i){var n=2*e,s=2*r;return t[n]<t[s]||t[n]===t[s]&&i[e]<=i[r]}function G(t,e,r){for(var i=t.heap[r],n=r<<1;n<=t.heap_len&&(n<t.heap_len&&H(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!H(e,i,t.heap[n],t.depth));)t.heap[r]=t.heap[n],r=n,n<<=1;t.heap[r]=i;}function K(t,e,r){var i,n,s,a,o=0;if(0!==t.last_lit)for(;i=t.pending_buf[t.d_buf+2*o]<<8|t.pending_buf[t.d_buf+2*o+1],n=t.pending_buf[t.l_buf+o],o++,0===i?L(t,n,e):(L(t,(s=A[n])+u+1,e),0!==(a=w[s])&&P(t,n-=I[s],a),L(t,s=N(--i),r),0!==(a=k[s])&&P(t,i-=T[s],a)),o<t.last_lit;);L(t,m,e);}function Y(t,e){var r,i,n,s=e.dyn_tree,a=e.stat_desc.static_tree,o=e.stat_desc.has_stree,h=e.stat_desc.elems,u=-1;for(t.heap_len=0,t.heap_max=_,r=0;r<h;r++)0!==s[2*r]?(t.heap[++t.heap_len]=u=r,t.depth[r]=0):s[2*r+1]=0;for(;t.heap_len<2;)s[2*(n=t.heap[++t.heap_len]=u<2?++u:0)]=1,t.depth[n]=0,t.opt_len--,o&&(t.static_len-=a[2*n+1]);for(e.max_code=u,r=t.heap_len>>1;1<=r;r--)G(t,s,r);for(n=h;r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],G(t,s,1),i=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=i,s[2*n]=s[2*r]+s[2*i],t.depth[n]=(t.depth[r]>=t.depth[i]?t.depth[r]:t.depth[i])+1,s[2*r+1]=s[2*i+1]=n,t.heap[1]=n++,G(t,s,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,i,n,s,a,o,h=e.dyn_tree,u=e.max_code,l=e.stat_desc.static_tree,f=e.stat_desc.has_stree,d=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,p=e.stat_desc.max_length,m=0;for(s=0;s<=g;s++)t.bl_count[s]=0;for(h[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<_;r++)p<(s=h[2*h[2*(i=t.heap[r])+1]+1]+1)&&(s=p,m++),h[2*i+1]=s,u<i||(t.bl_count[s]++,a=0,c<=i&&(a=d[i-c]),o=h[2*i],t.opt_len+=o*(s+a),f&&(t.static_len+=o*(l[2*i+1]+a)));if(0!==m){do{for(s=p-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[p]--,m-=2;}while(0<m);for(s=p;0!==s;s--)for(i=t.bl_count[s];0!==i;)u<(n=t.heap[--r])||(h[2*n+1]!==s&&(t.opt_len+=(s-h[2*n+1])*h[2*n],h[2*n+1]=s),i--);}}(t,e),Z(s,u,t.bl_count);}function X(t,e,r){var i,n,s=-1,a=e[1],o=0,h=7,u=4;for(0===a&&(h=138,u=3),e[2*(r+1)+1]=65535,i=0;i<=r;i++)n=a,a=e[2*(i+1)+1],++o<h&&n===a||(o<u?t.bl_tree[2*n]+=o:0!==n?(n!==s&&t.bl_tree[2*n]++,t.bl_tree[2*b]++):o<=10?t.bl_tree[2*v]++:t.bl_tree[2*y]++,s=n,u=(o=0)===a?(h=138,3):n===a?(h=6,3):(h=7,4));}function V(t,e,r){var i,n,s=-1,a=e[1],o=0,h=7,u=4;for(0===a&&(h=138,u=3),i=0;i<=r;i++)if(n=a,a=e[2*(i+1)+1],!(++o<h&&n===a)){if(o<u)for(;L(t,n,t.bl_tree),0!=--o;);else 0!==n?(n!==s&&(L(t,n,t.bl_tree),o--),L(t,b,t.bl_tree),P(t,o-3,2)):o<=10?(L(t,v,t.bl_tree),P(t,o-3,3)):(L(t,y,t.bl_tree),P(t,o-11,7));s=n,u=(o=0)===a?(h=138,3):n===a?(h=6,3):(h=7,4);}}i(T);var q=!1;function J(t,e,r,i){P(t,(s<<1)+(i?1:0),3),function(t,e,r,i){M(t),i&&(U(t,r),U(t,~r)),n.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r;}(t,e,r,!0);}r._tr_init=function(t){q||(function(){var t,e,r,i,n,s=new Array(g+1);for(i=r=0;i<a-1;i++)for(I[i]=r,t=0;t<1<<w[i];t++)A[r++]=i;for(A[r-1]=i,i=n=0;i<16;i++)for(T[i]=n,t=0;t<1<<k[i];t++)E[n++]=i;for(n>>=7;i<f;i++)for(T[i]=n<<7,t=0;t<1<<k[i]-7;t++)E[256+n++]=i;for(e=0;e<=g;e++)s[e]=0;for(t=0;t<=143;)z[2*t+1]=8,t++,s[8]++;for(;t<=255;)z[2*t+1]=9,t++,s[9]++;for(;t<=279;)z[2*t+1]=7,t++,s[7]++;for(;t<=287;)z[2*t+1]=8,t++,s[8]++;for(Z(z,l+1,s),t=0;t<f;t++)C[2*t+1]=5,C[2*t]=j(t,5);O=new D(z,w,u+1,l,g),B=new D(C,k,0,f,g),R=new D(new Array(0),x,0,d,p);}(),q=!0),t.l_desc=new F(t.dyn_ltree,O),t.d_desc=new F(t.dyn_dtree,B),t.bl_desc=new F(t.bl_tree,R),t.bi_buf=0,t.bi_valid=0,W(t);},r._tr_stored_block=J,r._tr_flush_block=function(t,e,r,i){var n,s,a=0;0<t.level?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return o;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return h;for(e=32;e<u;e++)if(0!==t.dyn_ltree[2*e])return h;return o}(t)),Y(t,t.l_desc),Y(t,t.d_desc),a=function(t){var e;for(X(t,t.dyn_ltree,t.l_desc.max_code),X(t,t.dyn_dtree,t.d_desc.max_code),Y(t,t.bl_desc),e=d-1;3<=e&&0===t.bl_tree[2*S[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),n=t.opt_len+3+7>>>3,(s=t.static_len+3+7>>>3)<=n&&(n=s)):n=s=r+5,r+4<=n&&-1!==e?J(t,e,r,i):4===t.strategy||s===n?(P(t,2+(i?1:0),3),K(t,z,C)):(P(t,4+(i?1:0),3),function(t,e,r,i){var n;for(P(t,e-257,5),P(t,r-1,5),P(t,i-4,4),n=0;n<i;n++)P(t,t.bl_tree[2*S[n]+1],3);V(t,t.dyn_ltree,e-1),V(t,t.dyn_dtree,r-1);}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),K(t,t.dyn_ltree,t.dyn_dtree)),W(t),i&&M(t);},r._tr_tally=function(t,e,r){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(A[r]+u+1)]++,t.dyn_dtree[2*N(e)]++),t.last_lit===t.lit_bufsize-1},r._tr_align=function(t){P(t,2,3),L(t,m,z),function(t){16===t.bi_valid?(U(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8);}(t);};},{"../utils/common":41}],53:[function(t,e,r){e.exports=function(){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;};},{}],54:[function(t,e,r){e.exports="function"==typeof setImmediate?setImmediate:function(){var t=[].slice.apply(arguments);t.splice(1,0,0),setTimeout.apply(null,t);};},{}]},{},[10])(10)});
|
|
2020
2020
|
}(jszip_min));
|
|
2021
2021
|
|
|
2022
2022
|
var JSZip = jszip_min.exports;
|
|
2023
2023
|
|
|
2024
2024
|
/*!
|
|
2025
|
-
* @esri/arcgis-html-sanitizer - v2.
|
|
2026
|
-
* Copyright (c)
|
|
2025
|
+
* @esri/arcgis-html-sanitizer - v2.10.0 - Tue Mar 15 2022 16:38:25 GMT-0400 (Eastern Daylight Time)
|
|
2026
|
+
* Copyright (c) 2022 - Environmental Systems Research Institute, Inc.
|
|
2027
2027
|
* Apache-2.0
|
|
2028
2028
|
*
|
|
2029
2029
|
* js-xss
|
|
@@ -3637,7 +3637,7 @@
|
|
|
3637
3637
|
* FilterXSS class
|
|
3638
3638
|
*
|
|
3639
3639
|
* @param {Object} options
|
|
3640
|
-
* whiteList, onTag, onTagAttr, onIgnoreTag,
|
|
3640
|
+
* whiteList (or allowList), onTag, onTagAttr, onIgnoreTag,
|
|
3641
3641
|
* onIgnoreTagAttr, safeAttrValue, escapeHtml
|
|
3642
3642
|
* stripIgnoreTagBody, allowCommentTag, stripBlankChar
|
|
3643
3643
|
* css{whiteList, onAttr, onIgnoreAttr} `css=false` means don't use `cssfilter`
|
|
@@ -3654,7 +3654,7 @@
|
|
|
3654
3654
|
options.onIgnoreTag = DEFAULT.onIgnoreTagStripAll;
|
|
3655
3655
|
}
|
|
3656
3656
|
|
|
3657
|
-
options.whiteList = options.whiteList || DEFAULT.whiteList;
|
|
3657
|
+
options.whiteList = options.whiteList || options.allowList || DEFAULT.whiteList;
|
|
3658
3658
|
options.onTag = options.onTag || DEFAULT.onTag;
|
|
3659
3659
|
options.onTagAttr = options.onTagAttr || DEFAULT.onTagAttr;
|
|
3660
3660
|
options.onIgnoreTag = options.onIgnoreTag || DEFAULT.onIgnoreTag;
|
|
@@ -3849,58 +3849,71 @@
|
|
|
3849
3849
|
var _this = this;
|
|
3850
3850
|
// Supported HTML Spec: https://doc.arcgis.com/en/arcgis-online/reference/supported-html.htm
|
|
3851
3851
|
this.arcgisWhiteList = {
|
|
3852
|
-
a: ["href", "
|
|
3852
|
+
a: ["href", "style", "target"],
|
|
3853
3853
|
abbr: ["title"],
|
|
3854
|
-
img: ["src", "width", "height", "border", "alt", "style"],
|
|
3855
|
-
video: [
|
|
3856
|
-
"autoplay",
|
|
3857
|
-
"controls",
|
|
3858
|
-
"height",
|
|
3859
|
-
"loop",
|
|
3860
|
-
"muted",
|
|
3861
|
-
"poster",
|
|
3862
|
-
"preload",
|
|
3863
|
-
"width"
|
|
3864
|
-
],
|
|
3865
3854
|
audio: ["autoplay", "controls", "loop", "muted", "preload"],
|
|
3855
|
+
b: [],
|
|
3856
|
+
br: [],
|
|
3857
|
+
dd: ["style"],
|
|
3858
|
+
div: ["align", "style"],
|
|
3859
|
+
dl: ["style"],
|
|
3860
|
+
dt: ["style"],
|
|
3861
|
+
em: [],
|
|
3862
|
+
figcaption: ["style"],
|
|
3863
|
+
figure: ["style"],
|
|
3864
|
+
font: ["color", "face", "size", "style"],
|
|
3865
|
+
h1: ["style"],
|
|
3866
|
+
h2: ["style"],
|
|
3867
|
+
h3: ["style"],
|
|
3868
|
+
h4: ["style"],
|
|
3869
|
+
h5: ["style"],
|
|
3870
|
+
h6: ["style"],
|
|
3871
|
+
hr: [],
|
|
3872
|
+
i: [],
|
|
3873
|
+
img: ["alt", "border", "height", "src", "style", "width"],
|
|
3874
|
+
li: [],
|
|
3875
|
+
ol: [],
|
|
3876
|
+
p: ["style"],
|
|
3866
3877
|
source: ["media", "src", "type"],
|
|
3867
3878
|
span: ["style"],
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3879
|
+
strong: [],
|
|
3880
|
+
sub: ["style"],
|
|
3881
|
+
sup: ["style"],
|
|
3882
|
+
table: ["border", "cellpadding", "cellspacing", "height", "style", "width"],
|
|
3883
|
+
tbody: [],
|
|
3884
|
+
tr: ["align", "height", "style", "valign"],
|
|
3872
3885
|
td: [
|
|
3873
|
-
"height",
|
|
3874
|
-
"width",
|
|
3875
|
-
"valign",
|
|
3876
3886
|
"align",
|
|
3877
3887
|
"colspan",
|
|
3878
|
-
"
|
|
3888
|
+
"height",
|
|
3879
3889
|
"nowrap",
|
|
3880
|
-
"
|
|
3890
|
+
"rowspan",
|
|
3891
|
+
"style",
|
|
3892
|
+
"valign",
|
|
3893
|
+
"width"
|
|
3881
3894
|
],
|
|
3882
3895
|
th: [
|
|
3883
|
-
"height",
|
|
3884
|
-
"width",
|
|
3885
|
-
"valign",
|
|
3886
3896
|
"align",
|
|
3887
3897
|
"colspan",
|
|
3888
|
-
"
|
|
3898
|
+
"height",
|
|
3889
3899
|
"nowrap",
|
|
3890
|
-
"
|
|
3900
|
+
"rowspan",
|
|
3901
|
+
"style",
|
|
3902
|
+
"valign",
|
|
3903
|
+
"width"
|
|
3891
3904
|
],
|
|
3892
|
-
p: ["style"],
|
|
3893
|
-
b: [],
|
|
3894
|
-
strong: [],
|
|
3895
|
-
i: [],
|
|
3896
|
-
em: [],
|
|
3897
3905
|
u: [],
|
|
3898
|
-
br: [],
|
|
3899
|
-
li: [],
|
|
3900
3906
|
ul: [],
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3907
|
+
video: [
|
|
3908
|
+
"autoplay",
|
|
3909
|
+
"controls",
|
|
3910
|
+
"height",
|
|
3911
|
+
"loop",
|
|
3912
|
+
"muted",
|
|
3913
|
+
"poster",
|
|
3914
|
+
"preload",
|
|
3915
|
+
"width"
|
|
3916
|
+
]
|
|
3904
3917
|
};
|
|
3905
3918
|
this.allowedProtocols = [
|
|
3906
3919
|
"http",
|
|
@@ -4008,19 +4021,22 @@
|
|
|
4008
4021
|
* Sanitizes a URL string following the allowed protocols and sanitization rules.
|
|
4009
4022
|
*
|
|
4010
4023
|
* @param {string} value The URL to sanitize.
|
|
4011
|
-
* @
|
|
4024
|
+
* @param {{ isProtocolRequired: boolean }} options Configuration options for URL checking.
|
|
4025
|
+
* @returns {string} The sanitized URL if it's valid, or an empty string if the URL is invalid.
|
|
4012
4026
|
*/
|
|
4013
|
-
Sanitizer.prototype.sanitizeUrl = function (value) {
|
|
4027
|
+
Sanitizer.prototype.sanitizeUrl = function (value, options) {
|
|
4028
|
+
var _a = (options !== null && options !== void 0 ? options : {}).isProtocolRequired, isProtocolRequired = _a === void 0 ? true : _a;
|
|
4014
4029
|
var protocol = this._trim(value.substring(0, value.indexOf(":")));
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
return "";
|
|
4020
|
-
}
|
|
4021
|
-
else {
|
|
4030
|
+
var isRootUrl = value === '/';
|
|
4031
|
+
var isUrlFragment = /^#/.test(value);
|
|
4032
|
+
var isValidProtocol = protocol && this.allowedProtocols.indexOf(protocol.toLowerCase()) > -1;
|
|
4033
|
+
if (isRootUrl || isUrlFragment || isValidProtocol) {
|
|
4022
4034
|
return lib$1.exports.escapeAttrValue(value);
|
|
4023
4035
|
}
|
|
4036
|
+
if (!protocol && !isProtocolRequired) {
|
|
4037
|
+
return lib$1.exports.escapeAttrValue("https://".concat(value));
|
|
4038
|
+
}
|
|
4039
|
+
return "";
|
|
4024
4040
|
};
|
|
4025
4041
|
/**
|
|
4026
4042
|
* Sanitizes an HTML attribute value.
|
|
@@ -4175,7 +4191,7 @@
|
|
|
4175
4191
|
* @param zipFilename Name to use for zip File
|
|
4176
4192
|
* @param files List of files to add to zip File
|
|
4177
4193
|
* @param folder Folder to contain the files
|
|
4178
|
-
* @
|
|
4194
|
+
* @returns Promise resolving to a zip File
|
|
4179
4195
|
*/
|
|
4180
4196
|
function createZip(zipFilename, files, folder) {
|
|
4181
4197
|
return new Promise((resolve, reject) => {
|
|
@@ -4197,7 +4213,7 @@
|
|
|
4197
4213
|
*
|
|
4198
4214
|
* @param HTML Text to sanitize
|
|
4199
4215
|
* @param sanitizer Instance of Sanitizer class
|
|
4200
|
-
* @
|
|
4216
|
+
* @returns Sanitized version of `html`
|
|
4201
4217
|
* @see https://github.com/esri/arcgis-html-sanitizer#basic-usage
|
|
4202
4218
|
*/
|
|
4203
4219
|
function sanitizeHTML(html, sanitizer) {
|
|
@@ -4211,7 +4227,7 @@
|
|
|
4211
4227
|
*
|
|
4212
4228
|
* @param json JSON to sanitize
|
|
4213
4229
|
* @param sanitizer Instance of Sanitizer class
|
|
4214
|
-
* @
|
|
4230
|
+
* @returns Sanitized version of `json`
|
|
4215
4231
|
* @see https://github.com/esri/arcgis-html-sanitizer#sanitize-json
|
|
4216
4232
|
*/
|
|
4217
4233
|
function sanitizeJSON(json, sanitizer) {
|
|
@@ -4225,7 +4241,7 @@
|
|
|
4225
4241
|
*
|
|
4226
4242
|
* @param url URL to sanitize
|
|
4227
4243
|
* @param sanitizer Instance of Sanitizer class
|
|
4228
|
-
* @
|
|
4244
|
+
* @returns Sanitized version of `url`
|
|
4229
4245
|
* @see https://github.com/esri/arcgis-html-sanitizer#sanitize-urls
|
|
4230
4246
|
*/
|
|
4231
4247
|
function sanitizeURLProtocol(url, sanitizer) {
|
|
@@ -4239,7 +4255,7 @@
|
|
|
4239
4255
|
*
|
|
4240
4256
|
* @param html HTML to check
|
|
4241
4257
|
* @param sanitizer Instance of Sanitizer class
|
|
4242
|
-
* @
|
|
4258
|
+
* @returns An object containing a flag indicating if `html` is valid (i.e., contains no invalid HTML)
|
|
4243
4259
|
* as well as the sanitized version of `html`
|
|
4244
4260
|
* @see https://github.com/esri/arcgis-html-sanitizer#basic-usage
|
|
4245
4261
|
*/
|
|
@@ -4276,7 +4292,7 @@
|
|
|
4276
4292
|
* Supplies Blob.text for Microsoft Legacy Edge
|
|
4277
4293
|
*
|
|
4278
4294
|
* @param blob Blob to read
|
|
4279
|
-
* @
|
|
4295
|
+
* @returns Promise resolving to blob's text
|
|
4280
4296
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob
|
|
4281
4297
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/FileReader
|
|
4282
4298
|
*/
|
|
@@ -4315,7 +4331,7 @@
|
|
|
4315
4331
|
* @param fileBits Contents for file
|
|
4316
4332
|
* @param fileName Name for file
|
|
4317
4333
|
* @param options Bucket of options, euch as `type` for the MIME type; defaults to empty string for `type`
|
|
4318
|
-
* @
|
|
4334
|
+
* @returns File or, for Microsoft Legacy Edge, Blob
|
|
4319
4335
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/File/File
|
|
4320
4336
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob
|
|
4321
4337
|
*/
|
|
@@ -4365,7 +4381,7 @@
|
|
|
4365
4381
|
*
|
|
4366
4382
|
* @param url URL to append to
|
|
4367
4383
|
* @param parameter Query parameter to append, prefixed with "?" or "&" as appropriate to what url already has
|
|
4368
|
-
* @
|
|
4384
|
+
* @returns New URL combining url and parameter
|
|
4369
4385
|
*/
|
|
4370
4386
|
function appendQueryParam(url, parameter) {
|
|
4371
4387
|
return url + (url.indexOf("?") === -1 ? "?" : "&") + parameter;
|
|
@@ -4374,7 +4390,7 @@
|
|
|
4374
4390
|
* Extracts JSON from a Blob.
|
|
4375
4391
|
*
|
|
4376
4392
|
* @param blob Blob to use as source
|
|
4377
|
-
* @
|
|
4393
|
+
* @returns A promise that will resolve with JSON or null
|
|
4378
4394
|
*/
|
|
4379
4395
|
function blobToJson(blob) {
|
|
4380
4396
|
return new Promise(resolve => {
|
|
@@ -4394,7 +4410,7 @@
|
|
|
4394
4410
|
* @param blob Blob to use as source
|
|
4395
4411
|
* @param filename Name to use for file
|
|
4396
4412
|
* @param mimeType MIME type to override blob's MIME type
|
|
4397
|
-
* @
|
|
4413
|
+
* @returns File created out of Blob and filename
|
|
4398
4414
|
*/
|
|
4399
4415
|
function blobToFile(blob, filename, mimeType) {
|
|
4400
4416
|
return blob
|
|
@@ -4407,7 +4423,7 @@
|
|
|
4407
4423
|
* Extracts text from a Blob.
|
|
4408
4424
|
*
|
|
4409
4425
|
* @param blob Blob to use as source
|
|
4410
|
-
* @
|
|
4426
|
+
* @returns A promise that will resolve with text read from blob
|
|
4411
4427
|
*/
|
|
4412
4428
|
function blobToText(blob) {
|
|
4413
4429
|
return new Promise(resolve => {
|
|
@@ -4425,7 +4441,7 @@
|
|
|
4425
4441
|
* Checks that a URL path ends with a slash.
|
|
4426
4442
|
*
|
|
4427
4443
|
* @param url URL to check
|
|
4428
|
-
* @
|
|
4444
|
+
* @returns URL, appended with slash if missing
|
|
4429
4445
|
*/
|
|
4430
4446
|
function checkUrlPathTermination(url) {
|
|
4431
4447
|
return url ? (url.endsWith("/") ? url : url + "/") : url;
|
|
@@ -4433,7 +4449,7 @@
|
|
|
4433
4449
|
/**
|
|
4434
4450
|
* Creates a random 32-character alphanumeric string.
|
|
4435
4451
|
*
|
|
4436
|
-
* @
|
|
4452
|
+
* @returns A lowercase 32-char alphanumeric string
|
|
4437
4453
|
* @internal
|
|
4438
4454
|
*/
|
|
4439
4455
|
function createLongId() {
|
|
@@ -4443,7 +4459,7 @@
|
|
|
4443
4459
|
/**
|
|
4444
4460
|
* Creates a random 8-character alphanumeric string that begins with an alphabetic character.
|
|
4445
4461
|
*
|
|
4446
|
-
* @
|
|
4462
|
+
* @returns An alphanumeric string in the range [a0000000..zzzzzzzz]
|
|
4447
4463
|
*/
|
|
4448
4464
|
function createShortId() {
|
|
4449
4465
|
// Return a random number, but beginning with an alphabetic character so that it can be used as a valid
|
|
@@ -4473,7 +4489,7 @@
|
|
|
4473
4489
|
*
|
|
4474
4490
|
* @param itemType The AGO item type
|
|
4475
4491
|
* @param id Item id to include in response
|
|
4476
|
-
* @
|
|
4492
|
+
* @returns Empty creation response
|
|
4477
4493
|
*/
|
|
4478
4494
|
function generateEmptyCreationResponse(itemType, id = "") {
|
|
4479
4495
|
return {
|
|
@@ -4487,7 +4503,7 @@
|
|
|
4487
4503
|
* Converts JSON to a Blob.
|
|
4488
4504
|
*
|
|
4489
4505
|
* @param json JSON to use as source
|
|
4490
|
-
* @
|
|
4506
|
+
* @returns A blob from the source JSON
|
|
4491
4507
|
*/
|
|
4492
4508
|
function jsonToBlob(json) {
|
|
4493
4509
|
const _json = JSON.stringify(json);
|
|
@@ -4504,7 +4520,7 @@
|
|
|
4504
4520
|
* @param json JSON to use as source
|
|
4505
4521
|
* @param filename Name to use for file
|
|
4506
4522
|
* @param mimeType MIME type to override blob's MIME type
|
|
4507
|
-
* @
|
|
4523
|
+
* @returns File created out of JSON and filename
|
|
4508
4524
|
*/
|
|
4509
4525
|
function jsonToFile(json, filename, mimeType = "application/json") {
|
|
4510
4526
|
return blobToFile(jsonToBlob(json), filename, mimeType);
|
|
@@ -4514,7 +4530,7 @@
|
|
|
4514
4530
|
*
|
|
4515
4531
|
* @param filename Name to give file
|
|
4516
4532
|
* @param blob Blob to save
|
|
4517
|
-
* @
|
|
4533
|
+
* @returns Promise resolving when operation is complete
|
|
4518
4534
|
*/
|
|
4519
4535
|
// Function is only used for live testing, so excluding it from coverage for now
|
|
4520
4536
|
/* istanbul ignore next */
|
|
@@ -4538,7 +4554,7 @@
|
|
|
4538
4554
|
* Makes a deep clone, including arrays but not functions.
|
|
4539
4555
|
*
|
|
4540
4556
|
* @param obj Object to be cloned
|
|
4541
|
-
* @
|
|
4557
|
+
* @returns Clone of obj
|
|
4542
4558
|
* @example
|
|
4543
4559
|
* ```js
|
|
4544
4560
|
* import { cloneObject } from "utils/object-helpers";
|
|
@@ -4580,7 +4596,7 @@
|
|
|
4580
4596
|
*
|
|
4581
4597
|
* @param json1 First object
|
|
4582
4598
|
* @param json2 Second object
|
|
4583
|
-
* @
|
|
4599
|
+
* @returns True if objects are the same
|
|
4584
4600
|
*/
|
|
4585
4601
|
function compareJSON(json1, json2) {
|
|
4586
4602
|
return JSON.stringify(json1) === JSON.stringify(json2);
|
|
@@ -4590,7 +4606,7 @@
|
|
|
4590
4606
|
*
|
|
4591
4607
|
* @param json1 First object
|
|
4592
4608
|
* @param json2 Second object
|
|
4593
|
-
* @
|
|
4609
|
+
* @returns True if objects are the same
|
|
4594
4610
|
*/
|
|
4595
4611
|
function compareJSONNoEmptyStrings(json1, json2) {
|
|
4596
4612
|
const jsonStr1 = JSON.stringify(json1).replace(/":""/g, '":null');
|
|
@@ -4602,7 +4618,7 @@
|
|
|
4602
4618
|
*
|
|
4603
4619
|
* @param json1 First object
|
|
4604
4620
|
* @param json2 Second object
|
|
4605
|
-
* @
|
|
4621
|
+
* @returns A list of mismatch report strings
|
|
4606
4622
|
*/
|
|
4607
4623
|
function compareJSONProperties(json1, json2) {
|
|
4608
4624
|
let mismatches = [];
|
|
@@ -4666,7 +4682,7 @@
|
|
|
4666
4682
|
*
|
|
4667
4683
|
* @param json JSON to sanitize
|
|
4668
4684
|
* @param sanitizer Instance of Sanitizer class
|
|
4669
|
-
* @
|
|
4685
|
+
* @returns Sanitized version of `json`
|
|
4670
4686
|
* @see https://github.com/esri/arcgis-html-sanitizer#sanitize-json
|
|
4671
4687
|
*/
|
|
4672
4688
|
function sanitizeJSONAndReportChanges(json, sanitizer) {
|
|
@@ -4751,7 +4767,7 @@
|
|
|
4751
4767
|
* Creates an AGO-style JSON failure response with success property.
|
|
4752
4768
|
*
|
|
4753
4769
|
* @param e Optional error information
|
|
4754
|
-
* @
|
|
4770
|
+
* @returns JSON structure with property success set to false and optionally including `e`
|
|
4755
4771
|
*/
|
|
4756
4772
|
function fail(e) {
|
|
4757
4773
|
if (e) {
|
|
@@ -4766,7 +4782,7 @@
|
|
|
4766
4782
|
*
|
|
4767
4783
|
* @param ids List of ids
|
|
4768
4784
|
* @param e Optional error information
|
|
4769
|
-
* @
|
|
4785
|
+
* @returns JSON structure with property success set to false and optionally including `e`
|
|
4770
4786
|
*/
|
|
4771
4787
|
function failWithIds(itemIds, e) {
|
|
4772
4788
|
if (e) {
|
|
@@ -4780,7 +4796,7 @@
|
|
|
4780
4796
|
* Extracts the ids from a string
|
|
4781
4797
|
*
|
|
4782
4798
|
* @param v String to examine
|
|
4783
|
-
* @
|
|
4799
|
+
* @returns List of id strings found
|
|
4784
4800
|
* @example
|
|
4785
4801
|
* get id from
|
|
4786
4802
|
* bad3483e025c47338d43df308c117308
|
|
@@ -4810,7 +4826,7 @@
|
|
|
4810
4826
|
* @param obj Object to retrieve value from
|
|
4811
4827
|
* @param path Path into an object, e.g., "data.values.webmap", where "data" is a top-level property
|
|
4812
4828
|
* in obj
|
|
4813
|
-
* @
|
|
4829
|
+
* @returns Value at end of path
|
|
4814
4830
|
*/
|
|
4815
4831
|
function getProp(obj, path) {
|
|
4816
4832
|
return path.split(".").reduce(function (prev, curr) {
|
|
@@ -4823,7 +4839,7 @@
|
|
|
4823
4839
|
*
|
|
4824
4840
|
* @param obj Object to retrieve values from
|
|
4825
4841
|
* @param props Array of paths into the object e.g., "data.values.webmap", where "data" is a top-level property
|
|
4826
|
-
* @
|
|
4842
|
+
* @returns Array of the values plucked from the object; only defined values are returned
|
|
4827
4843
|
*/
|
|
4828
4844
|
function getProps(obj, props) {
|
|
4829
4845
|
return props.reduce((a, p) => {
|
|
@@ -4842,7 +4858,7 @@
|
|
|
4842
4858
|
* @param path Path into an object, e.g., "data.values.webmap", where "data" is a top-level property
|
|
4843
4859
|
* in obj
|
|
4844
4860
|
* @param defaultV Optional value to use if any part of path--including final value--is undefined
|
|
4845
|
-
* @
|
|
4861
|
+
* @returns Value at end of path
|
|
4846
4862
|
*/
|
|
4847
4863
|
function getPropWithDefault(obj, path, defaultV) {
|
|
4848
4864
|
const value = path.split(".").reduce(function (prev, curr) {
|
|
@@ -4920,9 +4936,9 @@
|
|
|
4920
4936
|
/**
|
|
4921
4937
|
* Creates a timestamp string using the current UTC date and time.
|
|
4922
4938
|
*
|
|
4923
|
-
* @
|
|
4939
|
+
* @returns Timestamp formatted as YYYYMMDD_hhmm_ssmmm, with month one-based and all values padded with zeroes on the
|
|
4924
4940
|
* left as needed (`ssmmm` stands for seconds from 0..59 and milliseconds from 0..999)
|
|
4925
|
-
* @
|
|
4941
|
+
* @private
|
|
4926
4942
|
*/
|
|
4927
4943
|
function getUTCTimestamp() {
|
|
4928
4944
|
const now = new Date();
|
|
@@ -4941,7 +4957,7 @@
|
|
|
4941
4957
|
*
|
|
4942
4958
|
* @param jsonObj Object to test
|
|
4943
4959
|
* @param keywords List of keywords to look for in jsonObj
|
|
4944
|
-
* @
|
|
4960
|
+
* @returns Boolean indicating result
|
|
4945
4961
|
*/
|
|
4946
4962
|
function hasAnyKeyword(jsonObj, keywords) {
|
|
4947
4963
|
const typeKeywords = getProp(jsonObj, "item.typeKeywords") || jsonObj.typeKeywords || [];
|
|
@@ -4957,7 +4973,7 @@
|
|
|
4957
4973
|
*
|
|
4958
4974
|
* @param jsonObj Object to test
|
|
4959
4975
|
* @param keyword Keyword to look for in jsonObj
|
|
4960
|
-
* @
|
|
4976
|
+
* @returns Boolean indicating result
|
|
4961
4977
|
*/
|
|
4962
4978
|
function hasTypeKeyword(jsonObj, keyword) {
|
|
4963
4979
|
const typeKeywords = getProp(jsonObj, "item.typeKeywords") || jsonObj.typeKeywords || [];
|
|
@@ -4971,7 +4987,7 @@
|
|
|
4971
4987
|
* @param title The root title to test
|
|
4972
4988
|
* @param templateDictionary Hash of the facts
|
|
4973
4989
|
* @param path to the objects to evaluate for potantial name clashes
|
|
4974
|
-
* @
|
|
4990
|
+
* @returns string The unique title to use
|
|
4975
4991
|
*/
|
|
4976
4992
|
function getUniqueTitle(title, templateDictionary, path) {
|
|
4977
4993
|
title = title ? title.trim() : "_";
|
|
@@ -4993,7 +5009,7 @@
|
|
|
4993
5009
|
* @param obj Object to scan and to modify
|
|
4994
5010
|
* @param pattern Search pattern in each string
|
|
4995
5011
|
* @param replacement Replacement for matches to search pattern
|
|
4996
|
-
* @
|
|
5012
|
+
* @returns Modified obj is returned
|
|
4997
5013
|
*/
|
|
4998
5014
|
function globalStringReplace(obj, pattern, replacement) {
|
|
4999
5015
|
if (obj) {
|
|
@@ -5018,7 +5034,7 @@
|
|
|
5018
5034
|
* @param datasourceInfos Array of DatasourceInfos to evaluate
|
|
5019
5035
|
* @param itemId The items id to check for
|
|
5020
5036
|
* @param layerId The layers id to check for
|
|
5021
|
-
* @
|
|
5037
|
+
* @returns Boolean indicating result
|
|
5022
5038
|
*/
|
|
5023
5039
|
function hasDatasource(datasourceInfos, itemId, layerId) {
|
|
5024
5040
|
return datasourceInfos.some(ds => ds.itemId === itemId && ds.layerId === layerId);
|
|
@@ -5063,7 +5079,7 @@
|
|
|
5063
5079
|
* @param templates Array of item templates to search
|
|
5064
5080
|
* @param id of template we are searching for
|
|
5065
5081
|
*
|
|
5066
|
-
* @
|
|
5082
|
+
* @returns Template associated with the user provided id argument
|
|
5067
5083
|
*/
|
|
5068
5084
|
function getTemplateById(templates, id) {
|
|
5069
5085
|
let template;
|
|
@@ -5081,7 +5097,7 @@
|
|
|
5081
5097
|
*
|
|
5082
5098
|
* @param v a string value to test with the expression
|
|
5083
5099
|
* @param ex the regular expresion to test with
|
|
5084
|
-
* @
|
|
5100
|
+
* @returns an array of matches
|
|
5085
5101
|
*/
|
|
5086
5102
|
function regExTest(v, ex) {
|
|
5087
5103
|
return v && ex.test(v) ? v.match(ex) : [];
|
|
@@ -5092,7 +5108,7 @@
|
|
|
5092
5108
|
*
|
|
5093
5109
|
* @param min Inclusive minimum desired value
|
|
5094
5110
|
* @param max Non-inclusive maximum desired value
|
|
5095
|
-
* @
|
|
5111
|
+
* @returns Random number in the range [min, max)
|
|
5096
5112
|
*/
|
|
5097
5113
|
function _getRandomNumberInRange(min, max) {
|
|
5098
5114
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random#Getting_a_random_number_between_two_values
|
|
@@ -5105,8 +5121,8 @@
|
|
|
5105
5121
|
*
|
|
5106
5122
|
* @param n Number to pad
|
|
5107
5123
|
* @param totalSize Desired *minimum* width of number after padding with zeroes
|
|
5108
|
-
* @
|
|
5109
|
-
* @
|
|
5124
|
+
* @returns Number converted to string and padded on the left as needed
|
|
5125
|
+
* @private
|
|
5110
5126
|
*/
|
|
5111
5127
|
function _padPositiveNum(n, totalSize) {
|
|
5112
5128
|
let numStr = n.toString();
|
|
@@ -5120,9 +5136,9 @@
|
|
|
5120
5136
|
* Implements rejected ECMA proposal to change `typeof null` from "object" to "null".
|
|
5121
5137
|
*
|
|
5122
5138
|
* @param value Value whose type is sought
|
|
5123
|
-
* @
|
|
5139
|
+
* @returns "null" if `value` is null; `typeof value` otherwise
|
|
5124
5140
|
* @see https://web.archive.org/web/20160331031419/http://wiki.ecmascript.org:80/doku.php?id=harmony:typeof_null
|
|
5125
|
-
* @
|
|
5141
|
+
* @private
|
|
5126
5142
|
*/
|
|
5127
5143
|
function _typeof_null(value) {
|
|
5128
5144
|
return value === null ? "null" : typeof value;
|
|
@@ -5663,31 +5679,31 @@
|
|
|
5663
5679
|
* itself; name has to be acceptable to AGOL, otherwise it discards the URL, so substitution must be
|
|
5664
5680
|
* made before attempting to create the item.
|
|
5665
5681
|
*
|
|
5666
|
-
* @
|
|
5682
|
+
* @private
|
|
5667
5683
|
*/
|
|
5668
5684
|
const SERVER_NAME = "portalBaseUrl";
|
|
5669
5685
|
/**
|
|
5670
5686
|
* A parameterized geometry server name
|
|
5671
5687
|
*
|
|
5672
|
-
* @
|
|
5688
|
+
* @private
|
|
5673
5689
|
*/
|
|
5674
5690
|
const GEOMETRY_SERVER_NAME = "organization.helperServices.geometry.url";
|
|
5675
5691
|
/**
|
|
5676
5692
|
* A parameterized geocode server name
|
|
5677
5693
|
*
|
|
5678
|
-
* @
|
|
5694
|
+
* @private
|
|
5679
5695
|
*/
|
|
5680
5696
|
const GEOCODE_SERVER_NAME = "organization.helperServices.geocode:getDefaultLocatorURL";
|
|
5681
5697
|
/**
|
|
5682
5698
|
* A parameterized network analyst server name
|
|
5683
5699
|
*
|
|
5684
|
-
* @
|
|
5700
|
+
* @private
|
|
5685
5701
|
*/
|
|
5686
5702
|
const NA_SERVER_NAME = "organization.helperServices.route.url";
|
|
5687
5703
|
/**
|
|
5688
5704
|
* A parameterized network analyst server name
|
|
5689
5705
|
*
|
|
5690
|
-
* @
|
|
5706
|
+
* @private
|
|
5691
5707
|
*/
|
|
5692
5708
|
const PRINT_SERVER_NAME = "organization.helperServices.printTask.url";
|
|
5693
5709
|
const TRANSFORMS = {
|
|
@@ -5701,7 +5717,7 @@
|
|
|
5701
5717
|
* Wraps double brackets around the supplied term.
|
|
5702
5718
|
*
|
|
5703
5719
|
* @param term Term to be wrapped, e.g., SERVER_NAME's "portalBaseUrl"
|
|
5704
|
-
* @
|
|
5720
|
+
* @returns Wrapped term, e.g., "{{portalBaseUrl}}"
|
|
5705
5721
|
*/
|
|
5706
5722
|
function placeholder(term) {
|
|
5707
5723
|
return "{{" + term + "}}";
|
|
@@ -5750,7 +5766,7 @@
|
|
|
5750
5766
|
*
|
|
5751
5767
|
* @param id AGO id of item
|
|
5752
5768
|
* @param type AGO item type; defaults to ""
|
|
5753
|
-
* @
|
|
5769
|
+
* @returns Empty template containing supplied id, optional type, and a key created using the function createShortId()
|
|
5754
5770
|
*/
|
|
5755
5771
|
function createPlaceholderTemplate(id, type = "") {
|
|
5756
5772
|
return {
|
|
@@ -5773,7 +5789,7 @@
|
|
|
5773
5789
|
* Extracts the version of a solution from its data section.
|
|
5774
5790
|
*
|
|
5775
5791
|
* @param itemData Data section of the solution as JSON
|
|
5776
|
-
* @
|
|
5792
|
+
* @returns Zero-based version number
|
|
5777
5793
|
*/
|
|
5778
5794
|
function extractSolutionVersion(itemData) {
|
|
5779
5795
|
let version = getProp(itemData, "metadata.version");
|
|
@@ -5791,8 +5807,8 @@
|
|
|
5791
5807
|
*
|
|
5792
5808
|
* @param templates A collection of AGO item templates to search
|
|
5793
5809
|
* @param id AGO id of template to find
|
|
5794
|
-
* @
|
|
5795
|
-
* @
|
|
5810
|
+
* @returns Offset of of matching template or -1 if not found
|
|
5811
|
+
* @private
|
|
5796
5812
|
*/
|
|
5797
5813
|
function findTemplateIndexInList(templates, id) {
|
|
5798
5814
|
const baseId = id;
|
|
@@ -5805,7 +5821,7 @@
|
|
|
5805
5821
|
*
|
|
5806
5822
|
* @param templates A collection of AGO item templates to search
|
|
5807
5823
|
* @param id AGO id of template to find
|
|
5808
|
-
* @
|
|
5824
|
+
* @returns Matching template or null
|
|
5809
5825
|
*/
|
|
5810
5826
|
function findTemplateInList(templates, id) {
|
|
5811
5827
|
const iTemplate = findTemplateIndexInList(templates, id);
|
|
@@ -5831,7 +5847,7 @@
|
|
|
5831
5847
|
*
|
|
5832
5848
|
* @param templates A collection of AGO item templates
|
|
5833
5849
|
* @param id Id of item in templates list to find; if not found, no replacement is done
|
|
5834
|
-
* @
|
|
5850
|
+
* @private
|
|
5835
5851
|
*/
|
|
5836
5852
|
function removeTemplate(templates, id) {
|
|
5837
5853
|
const i = findTemplateIndexInList(templates, id);
|
|
@@ -5844,7 +5860,7 @@
|
|
|
5844
5860
|
*
|
|
5845
5861
|
* @param template Template to check for replacements; template is modified by this function
|
|
5846
5862
|
* @param replacements Hash of facts: org URL, adlib replacements, deferreds for dependencies
|
|
5847
|
-
* @
|
|
5863
|
+
* @returns template is returned after updating it
|
|
5848
5864
|
*/
|
|
5849
5865
|
function replaceInTemplate(template, replacements) {
|
|
5850
5866
|
return adlib(template, replacements, TRANSFORMS);
|
|
@@ -5855,8 +5871,8 @@
|
|
|
5855
5871
|
* @param templates A collection of AGO item templates
|
|
5856
5872
|
* @param id Id of item in templates list to find; if not found, no replacement is done
|
|
5857
5873
|
* @param template Replacement template
|
|
5858
|
-
* @
|
|
5859
|
-
* @
|
|
5874
|
+
* @returns True if replacement was made
|
|
5875
|
+
* @private
|
|
5860
5876
|
*/
|
|
5861
5877
|
function replaceTemplate(templates, id, template) {
|
|
5862
5878
|
const i = findTemplateIndexInList(templates, id);
|
|
@@ -5934,7 +5950,7 @@
|
|
|
5934
5950
|
* @param url Address of Blob
|
|
5935
5951
|
* @param authentication Credentials for the request
|
|
5936
5952
|
* @param requestOptions - Options for the request, including parameters relevant to the endpoint.
|
|
5937
|
-
* @
|
|
5953
|
+
* @returns Promise that will resolve with Blob or an AGO-style JSON failure response
|
|
5938
5954
|
*/
|
|
5939
5955
|
function getBlob(url, authentication, requestOptions = {}) {
|
|
5940
5956
|
if (!url) {
|
|
@@ -6012,7 +6028,7 @@
|
|
|
6012
6028
|
* @param url Address of Blob
|
|
6013
6029
|
* @param filename Name to use for file
|
|
6014
6030
|
* @param authentication Credentials for the request
|
|
6015
|
-
* @
|
|
6031
|
+
* @returns Promise that will resolve with a File, undefined if the Blob is null, or an AGO-style JSON failure response
|
|
6016
6032
|
*/
|
|
6017
6033
|
function getBlobAsFile(url, filename, authentication, ignoreErrors = [], mimeType) {
|
|
6018
6034
|
return new Promise((resolve, reject) => {
|
|
@@ -6026,7 +6042,7 @@
|
|
|
6026
6042
|
* @param url Address of Blob
|
|
6027
6043
|
* @param authentication Credentials for the request
|
|
6028
6044
|
* @param ignoreErrors List of HTTP error codes that should be ignored
|
|
6029
|
-
* @
|
|
6045
|
+
* @returns Promise that will resolve with Blob or an AGO-REST JSON failure response
|
|
6030
6046
|
*/
|
|
6031
6047
|
function getBlobCheckForError(url, authentication, ignoreErrors = []) {
|
|
6032
6048
|
return new Promise((resolve, reject) => {
|
|
@@ -6064,7 +6080,7 @@
|
|
|
6064
6080
|
* Extracts the text in a url between the last forward slash and the beginning of the url's parameters.
|
|
6065
6081
|
*
|
|
6066
6082
|
* @param url URL to work with
|
|
6067
|
-
* @
|
|
6083
|
+
* @returns Text extracted; empty if url ends with a forward slash or has a "?" immediately after the last
|
|
6068
6084
|
* forward slash
|
|
6069
6085
|
*/
|
|
6070
6086
|
function getFilenameFromUrl(url) {
|
|
@@ -6086,7 +6102,7 @@
|
|
|
6086
6102
|
*
|
|
6087
6103
|
* @param groupId Id of an group whose primary information is sought
|
|
6088
6104
|
* @param authentication Credentials for the request to AGO
|
|
6089
|
-
* @
|
|
6105
|
+
* @returns A promise that will resolve with group's JSON or error JSON or throws ArcGISRequestError in case of HTTP error
|
|
6090
6106
|
* or response error code
|
|
6091
6107
|
*/
|
|
6092
6108
|
function getGroupBase(groupId, authentication) {
|
|
@@ -6100,7 +6116,7 @@
|
|
|
6100
6116
|
*
|
|
6101
6117
|
* @param groupId Id of an group whose category schema information is sought
|
|
6102
6118
|
* @param authentication Credentials for the request to AGO
|
|
6103
|
-
* @
|
|
6119
|
+
* @returns A promise that will resolve with JSON of group's category schema
|
|
6104
6120
|
* @see https://developers.arcgis.com/rest/users-groups-and-items/group-category-schema.htm
|
|
6105
6121
|
*/
|
|
6106
6122
|
function getGroupCategorySchema(groupId, authentication) {
|
|
@@ -6114,7 +6130,7 @@
|
|
|
6114
6130
|
*
|
|
6115
6131
|
* @param groupId Id of a group whose contents are sought
|
|
6116
6132
|
* @param authentication Credentials for the request to AGO
|
|
6117
|
-
* @
|
|
6133
|
+
* @returns A promise that will resolve with list of dependent ids or an empty list
|
|
6118
6134
|
*/
|
|
6119
6135
|
function getGroupContents(groupId, authentication) {
|
|
6120
6136
|
return new Promise((resolve, reject) => {
|
|
@@ -6133,7 +6149,7 @@
|
|
|
6133
6149
|
*
|
|
6134
6150
|
* @param itemId Id of an item whose primary information is sought
|
|
6135
6151
|
* @param authentication Credentials for the request to AGO
|
|
6136
|
-
* @
|
|
6152
|
+
* @returns A promise that will resolve with item's JSON or error JSON or throws ArcGISRequestError in case of HTTP error
|
|
6137
6153
|
* or response error code
|
|
6138
6154
|
*/
|
|
6139
6155
|
function getItemBase(itemId, authentication) {
|
|
@@ -6148,7 +6164,7 @@
|
|
|
6148
6164
|
* @param itemId Id of an item whose data information is sought
|
|
6149
6165
|
* @param filename Name to use for file
|
|
6150
6166
|
* @param authentication Credentials for the request to AGO
|
|
6151
|
-
* @
|
|
6167
|
+
* @returns Promise that will resolve with a File, undefined if the Blob is null, or an AGO-style JSON failure response
|
|
6152
6168
|
*/
|
|
6153
6169
|
function getItemDataAsFile(itemId, filename, authentication) {
|
|
6154
6170
|
return new Promise(resolve => {
|
|
@@ -6161,7 +6177,7 @@
|
|
|
6161
6177
|
* @param itemId Id of an item whose data information is sought
|
|
6162
6178
|
* @param filename Name to use for file
|
|
6163
6179
|
* @param authentication Credentials for the request to AGO
|
|
6164
|
-
* @
|
|
6180
|
+
* @returns Promise that will resolve with JSON, or an AGO-style JSON failure response
|
|
6165
6181
|
*/
|
|
6166
6182
|
function getItemDataAsJson(itemId, authentication) {
|
|
6167
6183
|
return new Promise(resolve => {
|
|
@@ -6173,7 +6189,7 @@
|
|
|
6173
6189
|
*
|
|
6174
6190
|
* @param itemId Id of an item whose data information is sought
|
|
6175
6191
|
* @param authentication Credentials for the request to AGO
|
|
6176
|
-
* @
|
|
6192
|
+
* @returns A promise that will resolve with the data Blob or null if the item doesn't have a data section
|
|
6177
6193
|
*/
|
|
6178
6194
|
function getItemDataBlob(itemId, authentication) {
|
|
6179
6195
|
return new Promise(resolve => {
|
|
@@ -6186,7 +6202,7 @@
|
|
|
6186
6202
|
*
|
|
6187
6203
|
* @param itemId Id of an item whose data information is sought
|
|
6188
6204
|
* @param authentication Credentials for the request to AGO
|
|
6189
|
-
* @
|
|
6205
|
+
* @returns URL string
|
|
6190
6206
|
*/
|
|
6191
6207
|
function getItemDataBlobUrl(itemId, authentication) {
|
|
6192
6208
|
return `${getPortalSharingUrlFromAuth(authentication)}/content/items/${itemId}/data`;
|
|
@@ -6196,7 +6212,7 @@
|
|
|
6196
6212
|
*
|
|
6197
6213
|
* @param itemId Id of an item whose data information is sought
|
|
6198
6214
|
* @param authentication Credentials for the request to AGO
|
|
6199
|
-
* @
|
|
6215
|
+
* @returns URL string
|
|
6200
6216
|
*/
|
|
6201
6217
|
function getItemInfoFileUrlPrefix(itemId, authentication) {
|
|
6202
6218
|
return `${getPortalSharingUrlFromAuth(authentication)}/content/items/${itemId}/info/`;
|
|
@@ -6206,7 +6222,7 @@
|
|
|
6206
6222
|
*
|
|
6207
6223
|
* @param itemId Id of an item whose data information is sought
|
|
6208
6224
|
* @param authentication Credentials for the request to AGO
|
|
6209
|
-
* @
|
|
6225
|
+
* @returns Promise that will resolve with `undefined` or a File containing the metadata
|
|
6210
6226
|
*/
|
|
6211
6227
|
function getItemMetadataAsFile(itemId, authentication) {
|
|
6212
6228
|
return new Promise(resolve => {
|
|
@@ -6225,7 +6241,7 @@
|
|
|
6225
6241
|
*
|
|
6226
6242
|
* @param itemId Id of an item whose data information is sought
|
|
6227
6243
|
* @param authentication Credentials for the request to AGO
|
|
6228
|
-
* @
|
|
6244
|
+
* @returns A promise that will resolve with the metadata Blob or null if the item doesn't have a metadata file
|
|
6229
6245
|
*/
|
|
6230
6246
|
function getItemMetadataBlob(itemId, authentication) {
|
|
6231
6247
|
return new Promise((resolve, reject) => {
|
|
@@ -6238,7 +6254,7 @@
|
|
|
6238
6254
|
*
|
|
6239
6255
|
* @param itemId Id of an item whose data information is sought
|
|
6240
6256
|
* @param authentication Credentials for the request to AGO
|
|
6241
|
-
* @
|
|
6257
|
+
* @returns URL string
|
|
6242
6258
|
*/
|
|
6243
6259
|
function getItemMetadataBlobUrl(itemId, authentication) {
|
|
6244
6260
|
return (getItemInfoFileUrlPrefix(itemId, authentication) + "metadata/metadata.xml");
|
|
@@ -6250,7 +6266,7 @@
|
|
|
6250
6266
|
* @param relationshipType
|
|
6251
6267
|
* @param direction
|
|
6252
6268
|
* @param authentication Credentials for the request to AGO
|
|
6253
|
-
* @
|
|
6269
|
+
* @returns A promise that will resolve with an arcgis-rest-js `IGetRelatedItemsResponse` structure
|
|
6254
6270
|
*/
|
|
6255
6271
|
function getItemRelatedItems(itemId, relationshipType, direction, authentication) {
|
|
6256
6272
|
return new Promise(resolve => {
|
|
@@ -6279,7 +6295,7 @@
|
|
|
6279
6295
|
* @param itemId Id of an item whose related items are sought
|
|
6280
6296
|
* @param direction
|
|
6281
6297
|
* @param authentication Credentials for the request to AGO
|
|
6282
|
-
* @
|
|
6298
|
+
* @returns A promise that will resolve with a list of IRelatedItems
|
|
6283
6299
|
*/
|
|
6284
6300
|
function getItemRelatedItemsInSameDirection(itemId, direction, authentication) {
|
|
6285
6301
|
return new Promise(resolve => {
|
|
@@ -6349,7 +6365,7 @@
|
|
|
6349
6365
|
*
|
|
6350
6366
|
* @param itemId Id of an item whose resources are sought
|
|
6351
6367
|
* @param authentication Credentials for the request to AGO
|
|
6352
|
-
* @
|
|
6368
|
+
* @returns Promise that will resolve with a list of Files or an AGO-style JSON failure response
|
|
6353
6369
|
*/
|
|
6354
6370
|
function getItemResourcesFiles(itemId, authentication) {
|
|
6355
6371
|
return new Promise((resolve, reject) => {
|
|
@@ -6368,7 +6384,7 @@
|
|
|
6368
6384
|
*
|
|
6369
6385
|
* @param solutionItemId Id of a deployed Solution
|
|
6370
6386
|
* @param authentication Credentials for the request
|
|
6371
|
-
* @
|
|
6387
|
+
* @returns Promise resolving to a list of detailed item information
|
|
6372
6388
|
*/
|
|
6373
6389
|
function getItemsRelatedToASolution(solutionItemId, authentication) {
|
|
6374
6390
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
@@ -6384,7 +6400,7 @@
|
|
|
6384
6400
|
* in the item's base section
|
|
6385
6401
|
* @param isGroup Switch indicating if the item is a group
|
|
6386
6402
|
* @param authentication Credentials for the request to AGO
|
|
6387
|
-
* @
|
|
6403
|
+
* @returns Promise that will resolve with an image Blob or an AGO-style JSON failure response
|
|
6388
6404
|
*/
|
|
6389
6405
|
function getItemThumbnail(itemId, thumbnailUrlPart, isGroup, authentication) {
|
|
6390
6406
|
return new Promise((resolve, reject) => {
|
|
@@ -6404,7 +6420,7 @@
|
|
|
6404
6420
|
* in the item's base section
|
|
6405
6421
|
* @param isGroup Switch indicating if the item is a group
|
|
6406
6422
|
* @param authentication Credentials for the request to AGO
|
|
6407
|
-
* @
|
|
6423
|
+
* @returns Promise that will resolve with an image Blob or an AGO-style JSON failure response
|
|
6408
6424
|
*/
|
|
6409
6425
|
function getItemThumbnailAsFile(itemId, thumbnailUrlPart, isGroup, authentication) {
|
|
6410
6426
|
return new Promise((resolve, reject) => {
|
|
@@ -6427,7 +6443,7 @@
|
|
|
6427
6443
|
* in the item's base section
|
|
6428
6444
|
* @param isGroup Switch indicating if the item is a group
|
|
6429
6445
|
* @param authentication Credentials for the request to AGO
|
|
6430
|
-
* @
|
|
6446
|
+
* @returns URL string
|
|
6431
6447
|
*/
|
|
6432
6448
|
function getItemThumbnailUrl(itemId, thumbnailUrlPart, isGroup, authentication) {
|
|
6433
6449
|
return (checkUrlPathTermination(getPortalSharingUrlFromAuth(authentication)) +
|
|
@@ -6441,7 +6457,7 @@
|
|
|
6441
6457
|
*
|
|
6442
6458
|
* @param url Address of JSON
|
|
6443
6459
|
* @param authentication Credentials for the request
|
|
6444
|
-
* @
|
|
6460
|
+
* @returns Promise that will resolve with JSON
|
|
6445
6461
|
*/
|
|
6446
6462
|
function getJson(url, authentication) {
|
|
6447
6463
|
// Get the blob from the URL
|
|
@@ -6486,7 +6502,7 @@
|
|
|
6486
6502
|
*
|
|
6487
6503
|
* @param itemId Id of an AGO item to query
|
|
6488
6504
|
* @param authentication Credentials for the request
|
|
6489
|
-
* @
|
|
6505
|
+
* @returns Promise resolving to a list of Solution item ids
|
|
6490
6506
|
*/
|
|
6491
6507
|
function getSolutionsRelatedToAnItem(itemId, authentication) {
|
|
6492
6508
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
@@ -6504,9 +6520,9 @@
|
|
|
6504
6520
|
* Fixes the types of Blobs incorrectly typed as text/plain.
|
|
6505
6521
|
*
|
|
6506
6522
|
* @param blob Blob to check
|
|
6507
|
-
* @
|
|
6523
|
+
* @returns Promise resolving to original Blob, unless it's originally typed as text/plain but is
|
|
6508
6524
|
* really JSON, ZIP, or XML
|
|
6509
|
-
* @
|
|
6525
|
+
* @private
|
|
6510
6526
|
*/
|
|
6511
6527
|
function _fixTextBlobType(blob) {
|
|
6512
6528
|
return new Promise((resolve, reject) => {
|
|
@@ -6559,8 +6575,8 @@
|
|
|
6559
6575
|
* @param groupId Id of a group whose contents are sought
|
|
6560
6576
|
* @param pagingParams Structure with start and num properties for the tranche to fetch
|
|
6561
6577
|
* @param authentication Credentials for the request to AGO
|
|
6562
|
-
* @
|
|
6563
|
-
* @
|
|
6578
|
+
* @returns A promise that will resolve with list of dependent ids or an empty list
|
|
6579
|
+
* @private
|
|
6564
6580
|
*/
|
|
6565
6581
|
function _getGroupContentsTranche(groupId, pagingParams, authentication) {
|
|
6566
6582
|
return new Promise((resolve, reject) => {
|
|
@@ -6597,8 +6613,8 @@
|
|
|
6597
6613
|
* @param itemId Id of an item whose resources are sought
|
|
6598
6614
|
* @param pagingParams Structure with start and num properties for the tranche to fetch
|
|
6599
6615
|
* @param authentication Credentials for the request to AGO
|
|
6600
|
-
* @
|
|
6601
|
-
* @
|
|
6616
|
+
* @returns Promise that will resolve with a list of File promises or an AGO-style JSON failure response
|
|
6617
|
+
* @private
|
|
6602
6618
|
*/
|
|
6603
6619
|
function _getItemResourcesTranche(itemId, pagingParams, authentication) {
|
|
6604
6620
|
return new Promise((resolve, reject) => {
|
|
@@ -6687,7 +6703,7 @@
|
|
|
6687
6703
|
* @param templateDictionary Hash of facts: org URL, adlib replacements, deferreds for dependencies
|
|
6688
6704
|
* @param templates the list of IItemTemplates from the solution
|
|
6689
6705
|
*
|
|
6690
|
-
* @
|
|
6706
|
+
* @private
|
|
6691
6707
|
*/
|
|
6692
6708
|
function setLocationTrackingEnabled(portalResponse, userResponse, templateDictionary, templates) {
|
|
6693
6709
|
// set locationTracking...contains service url and id
|
|
@@ -6715,7 +6731,7 @@
|
|
|
6715
6731
|
* @param templates the list of IItemTemplates from the solution
|
|
6716
6732
|
* @param templateDictionary Hash of facts: org URL, adlib replacements, deferreds for dependencies
|
|
6717
6733
|
*
|
|
6718
|
-
* @
|
|
6734
|
+
* @private
|
|
6719
6735
|
*/
|
|
6720
6736
|
function _validateTrackingTemplates(templates, templateDictionary) {
|
|
6721
6737
|
/* istanbul ignore else */
|
|
@@ -6738,7 +6754,7 @@
|
|
|
6738
6754
|
* @param templateDictionary Hash of facts: org URL, adlib replacements, deferreds for dependencies
|
|
6739
6755
|
* @param authentication Credentials for the requests
|
|
6740
6756
|
*
|
|
6741
|
-
* @
|
|
6757
|
+
* @private
|
|
6742
6758
|
*/
|
|
6743
6759
|
function getTackingServiceOwner(templateDictionary, authentication) {
|
|
6744
6760
|
if (templateDictionary.locationTrackingEnabled) {
|
|
@@ -6761,7 +6777,7 @@
|
|
|
6761
6777
|
* @param itemTemplate the template to evaluate
|
|
6762
6778
|
* @param itemUpdate the item update to evaluate
|
|
6763
6779
|
*
|
|
6764
|
-
* @
|
|
6780
|
+
* @private
|
|
6765
6781
|
*/
|
|
6766
6782
|
function isTrackingViewTemplate(itemTemplate, itemUpdate) {
|
|
6767
6783
|
const typeKeywords = getProp(itemTemplate, "item.typeKeywords") ||
|
|
@@ -6775,7 +6791,7 @@
|
|
|
6775
6791
|
*
|
|
6776
6792
|
* @param itemTemplate the template to evaluate
|
|
6777
6793
|
*
|
|
6778
|
-
* @
|
|
6794
|
+
* @private
|
|
6779
6795
|
*/
|
|
6780
6796
|
function isTrackingViewGroup(itemTemplate) {
|
|
6781
6797
|
const typeKeywords = getProp(itemTemplate, "item.tags");
|
|
@@ -6787,7 +6803,7 @@
|
|
|
6787
6803
|
*
|
|
6788
6804
|
* @param itemTemplate Template for feature service item
|
|
6789
6805
|
*
|
|
6790
|
-
* @
|
|
6806
|
+
* @private
|
|
6791
6807
|
*/
|
|
6792
6808
|
function templatizeTracker(itemTemplate) {
|
|
6793
6809
|
/* istanbul ignore else */
|
|
@@ -6814,7 +6830,7 @@
|
|
|
6814
6830
|
* @param groupId the id of the associated tracker group
|
|
6815
6831
|
* @param groupIdVar the variable to replace the existing name with
|
|
6816
6832
|
*
|
|
6817
|
-
* @
|
|
6833
|
+
* @private
|
|
6818
6834
|
*/
|
|
6819
6835
|
function _setName(itemTemplate, path, groupId, groupIdVar) {
|
|
6820
6836
|
const name = getProp(itemTemplate, path);
|
|
@@ -6831,7 +6847,7 @@
|
|
|
6831
6847
|
* @param obj the object that stores the serviceItemId
|
|
6832
6848
|
* @param path the path to the property that stores the serviceItemId
|
|
6833
6849
|
*
|
|
6834
|
-
* @
|
|
6850
|
+
* @private
|
|
6835
6851
|
*/
|
|
6836
6852
|
function templatizeServiceItemId(obj, path) {
|
|
6837
6853
|
const serviceItemId = getProp(obj, path);
|
|
@@ -6847,7 +6863,7 @@
|
|
|
6847
6863
|
* @param options the current request options to update
|
|
6848
6864
|
* @param templateDictionary Hash of facts: org URL, adlib replacements, deferreds for dependencies
|
|
6849
6865
|
*
|
|
6850
|
-
* @
|
|
6866
|
+
* @private
|
|
6851
6867
|
*/
|
|
6852
6868
|
function setTrackingOptions(itemTemplate, options, templateDictionary) {
|
|
6853
6869
|
/* istanbul ignore else */
|
|
@@ -6887,8 +6903,8 @@
|
|
|
6887
6903
|
* @param dependencies Array of IDependency for name mapping
|
|
6888
6904
|
* @param templatizeFieldReferences Templatize all field references within a layer
|
|
6889
6905
|
* @param templateDictionary Hash mapping property names to replacement values
|
|
6890
|
-
* @
|
|
6891
|
-
* @
|
|
6906
|
+
* @returns A promise that will resolve when template has been updated
|
|
6907
|
+
* @private
|
|
6892
6908
|
*/
|
|
6893
6909
|
function templatize(itemTemplate, dependencies, templatizeFieldReferences, templateDictionary) {
|
|
6894
6910
|
templateDictionary = templateDictionary || {};
|
|
@@ -6976,7 +6992,7 @@
|
|
|
6976
6992
|
* @param layer The data layer instance with field name references within
|
|
6977
6993
|
* @param fieldInfos the object that stores the cached field infos
|
|
6978
6994
|
* @param isPortal Controls what properties should be removed.
|
|
6979
|
-
* @
|
|
6995
|
+
* @returns An updated instance of the fieldInfos
|
|
6980
6996
|
*/
|
|
6981
6997
|
function cacheFieldInfos(layer, fieldInfos, isPortal) {
|
|
6982
6998
|
// cache the source fields as they are in the original source
|
|
@@ -7011,6 +7027,7 @@
|
|
|
7011
7027
|
* @param layer the data layer being cloned
|
|
7012
7028
|
* @param prop the property name used to cache
|
|
7013
7029
|
* @param fieldInfos the object that will store the cached property
|
|
7030
|
+
* @private
|
|
7014
7031
|
*/
|
|
7015
7032
|
function _cacheFieldInfo(layer, prop, fieldInfos, removeProp) {
|
|
7016
7033
|
/* istanbul ignore else */
|
|
@@ -7031,7 +7048,7 @@
|
|
|
7031
7048
|
* Cache popup info that can contain field references
|
|
7032
7049
|
*
|
|
7033
7050
|
* @param data The items data property
|
|
7034
|
-
* @
|
|
7051
|
+
* @returns An updated instance of the popupInfos
|
|
7035
7052
|
*/
|
|
7036
7053
|
function cachePopupInfos(data) {
|
|
7037
7054
|
// store any popupInfo so we can update after any potential name changes
|
|
@@ -7054,6 +7071,7 @@
|
|
|
7054
7071
|
* @param popupInfos object to store the cahced popupInfo
|
|
7055
7072
|
* @param type is it a layer or table
|
|
7056
7073
|
* @param _items list or either layers or tables
|
|
7074
|
+
* @private
|
|
7057
7075
|
*/
|
|
7058
7076
|
function _cachePopupInfo(popupInfos, type, _items) {
|
|
7059
7077
|
_items.forEach((item) => {
|
|
@@ -7069,8 +7087,8 @@
|
|
|
7069
7087
|
* @param itemTemplate Item to be created; n.b.: this item is modified
|
|
7070
7088
|
* @param templateDictionary Hash mapping property names to replacement values
|
|
7071
7089
|
* @param createResponse Response from create service
|
|
7072
|
-
* @
|
|
7073
|
-
* @
|
|
7090
|
+
* @returns An updated instance of the template
|
|
7091
|
+
* @private
|
|
7074
7092
|
*/
|
|
7075
7093
|
function updateTemplate(itemTemplate, templateDictionary, createResponse) {
|
|
7076
7094
|
// Update the item with any typeKeywords that were added on create
|
|
@@ -7091,8 +7109,8 @@
|
|
|
7091
7109
|
*
|
|
7092
7110
|
* @param itemTemplate Item to be created; n.b.: this item is modified
|
|
7093
7111
|
* @param createResponse Response from create service
|
|
7094
|
-
* @
|
|
7095
|
-
* @
|
|
7112
|
+
* @returns An updated instance of the template
|
|
7113
|
+
* @private
|
|
7096
7114
|
*/
|
|
7097
7115
|
function _updateTypeKeywords(itemTemplate, createResponse) {
|
|
7098
7116
|
// https://github.com/Esri/solution.js/issues/589
|
|
@@ -7111,7 +7129,7 @@
|
|
|
7111
7129
|
* Example... { layer0: { fields: { lowerCaseSourceFieldName: newFieldNameAfterDeployment } } }
|
|
7112
7130
|
*
|
|
7113
7131
|
* @param layerInfos The object that stores the cached layer properties and name mapping
|
|
7114
|
-
* @
|
|
7132
|
+
* @returns The settings object that will be used to de-templatize the field references.
|
|
7115
7133
|
*/
|
|
7116
7134
|
function getLayerSettings(layerInfos, url, itemId, enterpriseIDMapping) {
|
|
7117
7135
|
const settings = {};
|
|
@@ -7143,7 +7161,7 @@
|
|
|
7143
7161
|
*
|
|
7144
7162
|
* @param templates A collection of AGO item templates.
|
|
7145
7163
|
* @param solutionItemId The item id for the deployed solution item.
|
|
7146
|
-
* @
|
|
7164
|
+
* @returns An updated collection of AGO templates with unique feature service names.
|
|
7147
7165
|
*/
|
|
7148
7166
|
function setNamesAndTitles(templates, solutionItemId) {
|
|
7149
7167
|
const names = [];
|
|
@@ -7216,8 +7234,8 @@
|
|
|
7216
7234
|
*
|
|
7217
7235
|
* @param template Template for feature service item
|
|
7218
7236
|
* @param authentication Credentials for the request
|
|
7219
|
-
* @
|
|
7220
|
-
* @
|
|
7237
|
+
* @returns A promise that will resolve when template has been updated
|
|
7238
|
+
* @private
|
|
7221
7239
|
*/
|
|
7222
7240
|
function updateTemplateForInvalidDesignations(template, authentication) {
|
|
7223
7241
|
return new Promise((resolve, reject) => {
|
|
@@ -7254,7 +7272,7 @@
|
|
|
7254
7272
|
* @param popupInfos The object from the popupInfo property for the layer
|
|
7255
7273
|
* @param adminLayerInfos The object from the adminLayerInfo property for the layer
|
|
7256
7274
|
* @param settings The settings object that has all of the mappings for de-templatizing.
|
|
7257
|
-
* @
|
|
7275
|
+
* @returns An object that contains updated instances of popupInfos, fieldInfos, and adminLayerInfos
|
|
7258
7276
|
*/
|
|
7259
7277
|
function deTemplatizeFieldInfos(fieldInfos, popupInfos, adminLayerInfos, settings) {
|
|
7260
7278
|
const fieldInfoKeys = Object.keys(fieldInfos);
|
|
@@ -7284,7 +7302,7 @@
|
|
|
7284
7302
|
* to the item settings for the view.
|
|
7285
7303
|
*
|
|
7286
7304
|
* @param itemTemplate The current itemTemplate being processed.
|
|
7287
|
-
* @
|
|
7305
|
+
* @returns array of layers and tables
|
|
7288
7306
|
*/
|
|
7289
7307
|
function getLayersAndTables(itemTemplate) {
|
|
7290
7308
|
const properties = itemTemplate.properties;
|
|
@@ -7311,8 +7329,8 @@
|
|
|
7311
7329
|
* @param url Feature service endpoint
|
|
7312
7330
|
* @param ids layer and table ids
|
|
7313
7331
|
* @param authentication Credentials for the request
|
|
7314
|
-
* @
|
|
7315
|
-
* @
|
|
7332
|
+
* @returns A promise that will resolve an array of promises with either a failure or the data
|
|
7333
|
+
* @private
|
|
7316
7334
|
*/
|
|
7317
7335
|
function getExistingLayersAndTables(url, ids, authentication) {
|
|
7318
7336
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
@@ -7334,8 +7352,8 @@
|
|
|
7334
7352
|
* service)
|
|
7335
7353
|
* @param popupInfos the cached popup info from the layers
|
|
7336
7354
|
* @param authentication Credentials for the request
|
|
7337
|
-
* @
|
|
7338
|
-
* @
|
|
7355
|
+
* @returns A promise that will resolve when all layers and tables have been added
|
|
7356
|
+
* @private
|
|
7339
7357
|
*/
|
|
7340
7358
|
function addFeatureServiceLayersAndTables(itemTemplate, templateDictionary, popupInfos, authentication) {
|
|
7341
7359
|
return new Promise((resolve, reject) => {
|
|
@@ -7396,8 +7414,8 @@
|
|
|
7396
7414
|
* @param adminLayerInfos Hash map of a layers adminLayerInfo
|
|
7397
7415
|
* @param fieldInfos Hash map of properties that contain field references
|
|
7398
7416
|
* @param itemTemplate
|
|
7399
|
-
* @
|
|
7400
|
-
* @
|
|
7417
|
+
* @returns A promise that will resolve when the feature service has been updated
|
|
7418
|
+
* @private
|
|
7401
7419
|
*/
|
|
7402
7420
|
function addFeatureServiceDefinition(serviceUrl, listToAdd, templateDictionary, authentication, key, adminLayerInfos, fieldInfos, itemTemplate) {
|
|
7403
7421
|
return new Promise((resolve, reject) => {
|
|
@@ -7501,8 +7519,8 @@
|
|
|
7501
7519
|
* @param layerChunks Groups of layers or tables to add to the service
|
|
7502
7520
|
* @param authentication Credentials for the request
|
|
7503
7521
|
*
|
|
7504
|
-
* @
|
|
7505
|
-
* @
|
|
7522
|
+
* @returns Add to service definition options
|
|
7523
|
+
* @private
|
|
7506
7524
|
*/
|
|
7507
7525
|
function _updateAddOptions(itemTemplate, item, options, layerChunks, authentication) {
|
|
7508
7526
|
const isMsView = getProp(itemTemplate, "properties.service.isMultiServicesView") || false;
|
|
@@ -7535,7 +7553,7 @@
|
|
|
7535
7553
|
* Remove "multiScaleGeometryInfo" for issue #526 to prevent invalid enablement of layer optimization
|
|
7536
7554
|
*
|
|
7537
7555
|
* @param layer the layer to evaluate
|
|
7538
|
-
* @
|
|
7556
|
+
* @private
|
|
7539
7557
|
*/
|
|
7540
7558
|
function removeLayerOptimization(layer) {
|
|
7541
7559
|
/* istanbul ignore else */
|
|
@@ -7550,8 +7568,8 @@
|
|
|
7550
7568
|
* @param itemTemplate the item template
|
|
7551
7569
|
* @param templateDictionary Hash mapping Solution source id to id of its clone
|
|
7552
7570
|
*
|
|
7553
|
-
* @
|
|
7554
|
-
* @
|
|
7571
|
+
* @returns the updated item
|
|
7572
|
+
* @private
|
|
7555
7573
|
*/
|
|
7556
7574
|
function _updateForPortal(item, itemTemplate, templateDictionary) {
|
|
7557
7575
|
// When deploying to portal we need to adjust the uniquie ID field up front
|
|
@@ -7615,8 +7633,8 @@
|
|
|
7615
7633
|
* @param itemTemplate the item template
|
|
7616
7634
|
* @param templateDictionary Hash mapping Solution source id to id of its clone
|
|
7617
7635
|
*
|
|
7618
|
-
* @
|
|
7619
|
-
* @
|
|
7636
|
+
* @returns an array of the source layers fields
|
|
7637
|
+
* @private
|
|
7620
7638
|
*/
|
|
7621
7639
|
function _getFieldNames(table, itemTemplate, templateDictionary) {
|
|
7622
7640
|
let sourceLayerFields = [];
|
|
@@ -7647,8 +7665,8 @@
|
|
|
7647
7665
|
* @param item Layer or table
|
|
7648
7666
|
* @param templateDictionary Hash mapping Solution source id to id of its clone
|
|
7649
7667
|
*
|
|
7650
|
-
* @
|
|
7651
|
-
* @
|
|
7668
|
+
* @returns updated layer or table
|
|
7669
|
+
* @private
|
|
7652
7670
|
*/
|
|
7653
7671
|
function _updateItemFields(item, fieldNames) {
|
|
7654
7672
|
/* istanbul ignore else */
|
|
@@ -7669,8 +7687,8 @@
|
|
|
7669
7687
|
*
|
|
7670
7688
|
* @param table the table instance to evaluate
|
|
7671
7689
|
* @param sourceLayerFields array of fields from the source service
|
|
7672
|
-
* @
|
|
7673
|
-
* @
|
|
7690
|
+
* @returns Updated instance of the table
|
|
7691
|
+
* @private
|
|
7674
7692
|
*/
|
|
7675
7693
|
function _updateSourceLayerFields(table, sourceLayerFields) {
|
|
7676
7694
|
/* istanbul ignore else */
|
|
@@ -7690,7 +7708,7 @@
|
|
|
7690
7708
|
*
|
|
7691
7709
|
* @param item the item details from the current template
|
|
7692
7710
|
* @param templateDictionary Hash mapping property names to replacement values
|
|
7693
|
-
* @
|
|
7711
|
+
* @private
|
|
7694
7712
|
*/
|
|
7695
7713
|
function _updateGeomFieldName(adminLayerInfo, templateDictionary) {
|
|
7696
7714
|
// issue #471
|
|
@@ -7718,7 +7736,7 @@
|
|
|
7718
7736
|
*
|
|
7719
7737
|
* @param itemTemplate
|
|
7720
7738
|
* @param templateDictionary Hash mapping Solution source id to id of its clone (and name & URL for feature service)
|
|
7721
|
-
* @
|
|
7739
|
+
* @private
|
|
7722
7740
|
*/
|
|
7723
7741
|
function _updateTemplateDictionaryFields(itemTemplate, templateDictionary, compareItemId = true) {
|
|
7724
7742
|
const layers = itemTemplate.properties.layers;
|
|
@@ -7748,7 +7766,7 @@
|
|
|
7748
7766
|
* @param templateDictionary Hash mapping Solution source id to id of its clone (and name & URL for feature service)
|
|
7749
7767
|
* @param itemId The source id for the item
|
|
7750
7768
|
* @param spatialReference { wkid: 102100 } for example
|
|
7751
|
-
* @
|
|
7769
|
+
* @private
|
|
7752
7770
|
*/
|
|
7753
7771
|
function setDefaultSpatialReference(templateDictionary, itemId, spatialReference) {
|
|
7754
7772
|
/* istanbul ignore else */
|
|
@@ -7764,7 +7782,7 @@
|
|
|
7764
7782
|
* @param serviceInfo Basic service information
|
|
7765
7783
|
* @param itemTemplate The current template to process
|
|
7766
7784
|
* @param templateDictionary Hash mapping Solution source id to id of its clone (and name & URL for feature service)
|
|
7767
|
-
* @
|
|
7785
|
+
* @private
|
|
7768
7786
|
*/
|
|
7769
7787
|
function validateSpatialReferenceAndExtent(serviceInfo, itemTemplate, templateDictionary) {
|
|
7770
7788
|
/* istanbul ignore else */
|
|
@@ -7809,8 +7827,8 @@
|
|
|
7809
7827
|
* @param adminLayerInfos Hash map of a layers adminLayerInfo
|
|
7810
7828
|
* @param templateDictionary Hash mapping Solution source id to id of its clone (and name & URL for feature service)
|
|
7811
7829
|
* @param authentication Credentials for the request
|
|
7812
|
-
* @
|
|
7813
|
-
* @
|
|
7830
|
+
* @returns A promise that will resolve when the feature service has been updated
|
|
7831
|
+
* @private
|
|
7814
7832
|
*/
|
|
7815
7833
|
function updateLayerFieldReferences(itemTemplate, fieldInfos, popupInfos, adminLayerInfos, templateDictionary) {
|
|
7816
7834
|
return new Promise((resolveFn, rejectFn) => {
|
|
@@ -7836,8 +7854,8 @@
|
|
|
7836
7854
|
* @param adminLayerInfos Hash map of a layers adminLayerInfo
|
|
7837
7855
|
* @param templateDictionary
|
|
7838
7856
|
* @param authentication Credentials for the request
|
|
7839
|
-
* @
|
|
7840
|
-
* @
|
|
7857
|
+
* @returns An object with detemplatized field references
|
|
7858
|
+
* @private
|
|
7841
7859
|
*/
|
|
7842
7860
|
function postProcessFields(itemTemplate, layerInfos, popupInfos, adminLayerInfos, templateDictionary) {
|
|
7843
7861
|
return new Promise((resolveFn, rejectFn) => {
|
|
@@ -7918,8 +7936,8 @@
|
|
|
7918
7936
|
* we need to pass it via an updateDef call or it will be set as the typeIdField of the source service
|
|
7919
7937
|
*
|
|
7920
7938
|
* @param item current layer or table
|
|
7921
|
-
* @
|
|
7922
|
-
* @
|
|
7939
|
+
* @returns name of field to set for typeIdField in the update call
|
|
7940
|
+
* @private
|
|
7923
7941
|
*/
|
|
7924
7942
|
function _getTypeIdField(item) {
|
|
7925
7943
|
const typeIdFields = item.fields.filter((f) => {
|
|
@@ -7937,8 +7955,8 @@
|
|
|
7937
7955
|
* visible true when added with the layer definition
|
|
7938
7956
|
*
|
|
7939
7957
|
* @param fieldInfo current layers or tables fieldInfo
|
|
7940
|
-
* @
|
|
7941
|
-
* @
|
|
7958
|
+
* @returns Array of fields that should not be visible in the view
|
|
7959
|
+
* @private
|
|
7942
7960
|
*/
|
|
7943
7961
|
function _getFieldVisibilityUpdates(fieldInfo) {
|
|
7944
7962
|
const visibilityUpdates = [];
|
|
@@ -7966,8 +7984,8 @@
|
|
|
7966
7984
|
*
|
|
7967
7985
|
* @param fieldInfo current view layer or table fieldInfo
|
|
7968
7986
|
* @param fieldUpdates any existing field updates
|
|
7969
|
-
* @
|
|
7970
|
-
* @
|
|
7987
|
+
* @returns Array of fields to be updated
|
|
7988
|
+
* @private
|
|
7971
7989
|
*/
|
|
7972
7990
|
function _validateDomains(fieldInfo, fieldUpdates) {
|
|
7973
7991
|
const domainAliasInfos = _getDomainAndAliasInfos(fieldInfo);
|
|
@@ -7992,7 +8010,7 @@
|
|
|
7992
8010
|
* @param fields the alias or domain fields
|
|
7993
8011
|
* @param key the field key to evaluate
|
|
7994
8012
|
* @param fieldUpdates any existing field updates
|
|
7995
|
-
* @
|
|
8013
|
+
* @private
|
|
7996
8014
|
*/
|
|
7997
8015
|
function _getPortalViewFieldUpdates(field, names, fields, key, fieldUpdates) {
|
|
7998
8016
|
if (field.hasOwnProperty(key) && field[key]) {
|
|
@@ -8021,8 +8039,8 @@
|
|
|
8021
8039
|
*
|
|
8022
8040
|
* @param fieldInfo current view layer or table fieldInfo
|
|
8023
8041
|
* @param fieldUpdates any existing field updates
|
|
8024
|
-
* @
|
|
8025
|
-
* @
|
|
8042
|
+
* @returns Array of fields to be updated
|
|
8043
|
+
* @private
|
|
8026
8044
|
*/
|
|
8027
8045
|
function _validateViewDomainsAndAlias(fieldInfo, item) {
|
|
8028
8046
|
const domainAliasInfos = _getDomainAndAliasInfos(fieldInfo);
|
|
@@ -8042,7 +8060,7 @@
|
|
|
8042
8060
|
* Get array of domain fields and names and alias fields and names
|
|
8043
8061
|
*
|
|
8044
8062
|
* @param fieldInfo current view layer or table fieldInfo
|
|
8045
|
-
*
|
|
8063
|
+
* @private
|
|
8046
8064
|
*/
|
|
8047
8065
|
function _getDomainAndAliasInfos(fieldInfo) {
|
|
8048
8066
|
const domainFields = [];
|
|
@@ -8085,7 +8103,7 @@
|
|
|
8085
8103
|
* @param names array of field names
|
|
8086
8104
|
* @param fields array of fields
|
|
8087
8105
|
* @param key the field key to compare
|
|
8088
|
-
* @
|
|
8106
|
+
* @private
|
|
8089
8107
|
*/
|
|
8090
8108
|
function _isViewFieldOverride(field, names, fields, key) {
|
|
8091
8109
|
/* istanbul ignore else */
|
|
@@ -8102,7 +8120,7 @@
|
|
|
8102
8120
|
*
|
|
8103
8121
|
* @param itemTemplate
|
|
8104
8122
|
* @param popupInfos popup info to be added back to the layer
|
|
8105
|
-
* @
|
|
8123
|
+
* @private
|
|
8106
8124
|
*/
|
|
8107
8125
|
function updatePopupInfo(itemTemplate, popupInfos) {
|
|
8108
8126
|
["layers", "tables"].forEach(type => {
|
|
@@ -8122,6 +8140,7 @@
|
|
|
8122
8140
|
*
|
|
8123
8141
|
* @param basePath path used to de-templatize while deploying
|
|
8124
8142
|
* @param value to be converted to lower case for lookup while deploying
|
|
8143
|
+
* @private
|
|
8125
8144
|
*/
|
|
8126
8145
|
function _templatize(basePath, value, suffix) {
|
|
8127
8146
|
if (value.startsWith("{{")) {
|
|
@@ -8137,6 +8156,7 @@
|
|
|
8137
8156
|
* @param object the object with the property to templatize
|
|
8138
8157
|
* @param property the property of the object to templatize
|
|
8139
8158
|
* @param basePath path used to de-templatize while deploying
|
|
8159
|
+
* @private
|
|
8140
8160
|
*/
|
|
8141
8161
|
function _templatizeProperty(object, property, basePath, suffix) {
|
|
8142
8162
|
if (object && object.hasOwnProperty(property) && object[property]) {
|
|
@@ -8151,8 +8171,8 @@
|
|
|
8151
8171
|
* @param itemTemplate Template for feature service item
|
|
8152
8172
|
* @param dependencies Array of IDependency for name mapping
|
|
8153
8173
|
* @param templatizeFieldReferences Templatize all field references within a layer
|
|
8154
|
-
* @
|
|
8155
|
-
* @
|
|
8174
|
+
* @returns A promise that will resolve when template has been updated
|
|
8175
|
+
* @private
|
|
8156
8176
|
*/
|
|
8157
8177
|
function _templatizeLayer(dataItem, adminItem, itemTemplate, dependencies, templatizeFieldReferences, templateDictionary) {
|
|
8158
8178
|
// check for and repair common field issues
|
|
@@ -8207,6 +8227,7 @@
|
|
|
8207
8227
|
*
|
|
8208
8228
|
* @param adminItem layer or table from the service
|
|
8209
8229
|
* @param fieldNames string list of fields names
|
|
8230
|
+
* @private
|
|
8210
8231
|
*/
|
|
8211
8232
|
function _validateDisplayField(adminItem, fieldNames) {
|
|
8212
8233
|
const displayField = adminItem.displayField || "";
|
|
@@ -8247,6 +8268,7 @@
|
|
|
8247
8268
|
*
|
|
8248
8269
|
* @param adminItem layer or table from the service
|
|
8249
8270
|
* @param fieldNames string list of fields names
|
|
8271
|
+
* @private
|
|
8250
8272
|
*/
|
|
8251
8273
|
function _validateIndexes(adminItem, fieldNames) {
|
|
8252
8274
|
const indexes = adminItem.indexes;
|
|
@@ -8282,6 +8304,7 @@
|
|
|
8282
8304
|
*
|
|
8283
8305
|
* @param adminItem layer or table from the service
|
|
8284
8306
|
* @param fieldNames string list of fields names
|
|
8307
|
+
* @private
|
|
8285
8308
|
*/
|
|
8286
8309
|
function _validateTemplatesFields(adminItem, fieldNames) {
|
|
8287
8310
|
const templates = adminItem.templates;
|
|
@@ -8308,6 +8331,7 @@
|
|
|
8308
8331
|
*
|
|
8309
8332
|
* @param adminItem layer or table from the service
|
|
8310
8333
|
* @param fieldNames string list of fields names
|
|
8334
|
+
* @private
|
|
8311
8335
|
*/
|
|
8312
8336
|
function _validateTypesTemplates(adminItem, fieldNames) {
|
|
8313
8337
|
const types = adminItem.types;
|
|
@@ -8324,6 +8348,7 @@
|
|
|
8324
8348
|
*
|
|
8325
8349
|
* @param adminItem layer or table from the service
|
|
8326
8350
|
* @param fieldNames string list of fields names
|
|
8351
|
+
* @private
|
|
8327
8352
|
*/
|
|
8328
8353
|
function _validateEditFieldsInfo(adminItem, fieldNames) {
|
|
8329
8354
|
const editFieldsInfo = adminItem.editFieldsInfo;
|
|
@@ -8360,7 +8385,8 @@
|
|
|
8360
8385
|
* @param itemID The id for the item that contains this layer.
|
|
8361
8386
|
* @param layer JSON return from the layer being templatized.
|
|
8362
8387
|
* @param dependencies
|
|
8363
|
-
* @
|
|
8388
|
+
* @returns An updated instance of the layer
|
|
8389
|
+
* @private
|
|
8364
8390
|
*/
|
|
8365
8391
|
function _templatizeLayerFieldReferences(dataItem, itemID, layer, dependencies) {
|
|
8366
8392
|
// This is the value that will be used as the template for adlib replacement
|
|
@@ -8389,8 +8415,8 @@
|
|
|
8389
8415
|
*
|
|
8390
8416
|
* @param layer The layer to be modified
|
|
8391
8417
|
* @param dependencies Array of service dependencies
|
|
8392
|
-
* @
|
|
8393
|
-
* @
|
|
8418
|
+
* @returns A new copy of the modified adminLayerInfo for the given layer
|
|
8419
|
+
* @private
|
|
8394
8420
|
*/
|
|
8395
8421
|
function _templatizeAdminLayerInfo(layer, dependencies, templateDictionary) {
|
|
8396
8422
|
// Create new instance of adminLayerInfo to update for clone
|
|
@@ -8423,7 +8449,7 @@
|
|
|
8423
8449
|
*
|
|
8424
8450
|
* @param object The layer to be modified
|
|
8425
8451
|
* @param dependencies Array of service dependencies
|
|
8426
|
-
* @
|
|
8452
|
+
* @private
|
|
8427
8453
|
*/
|
|
8428
8454
|
function _processAdminObject(object, dependencies) {
|
|
8429
8455
|
deleteProp(object, "sourceId");
|
|
@@ -8436,8 +8462,8 @@
|
|
|
8436
8462
|
*
|
|
8437
8463
|
* @param lookupName The current name from the source service
|
|
8438
8464
|
* @param dependencies Array of IDependency for name mapping
|
|
8439
|
-
* @
|
|
8440
|
-
* @
|
|
8465
|
+
* @returns The templatized name || undefined when no matching dependency is found
|
|
8466
|
+
* @private
|
|
8441
8467
|
*/
|
|
8442
8468
|
function _templatizeSourceServiceName(lookupName, dependencies) {
|
|
8443
8469
|
const deps = dependencies.filter(dependency => dependency.name === lookupName);
|
|
@@ -8449,6 +8475,7 @@
|
|
|
8449
8475
|
* @param layer the layer object with the adminLayerInfo property to templatize
|
|
8450
8476
|
* @param basePath path used to de-templatize while deploying
|
|
8451
8477
|
* @param itemID the id for the item that contains this layer
|
|
8478
|
+
* @private
|
|
8452
8479
|
*/
|
|
8453
8480
|
function _templatizeAdminLayerInfoFields(layer, dependencies) {
|
|
8454
8481
|
// templatize the source layer fields
|
|
@@ -8482,6 +8509,7 @@
|
|
|
8482
8509
|
*
|
|
8483
8510
|
* @param lookupName name of dependency we want to find the id of
|
|
8484
8511
|
* @param dependencies array of item dependencies
|
|
8512
|
+
* @private
|
|
8485
8513
|
*/
|
|
8486
8514
|
function _getDependantItemId(lookupName, dependencies) {
|
|
8487
8515
|
const deps = dependencies.filter(dependency => dependency.name === lookupName);
|
|
@@ -8492,6 +8520,7 @@
|
|
|
8492
8520
|
*
|
|
8493
8521
|
* @param fields array of sourceLayerFields to templatize
|
|
8494
8522
|
* @param basePath path used to de-templatize while deploying
|
|
8523
|
+
* @private
|
|
8495
8524
|
*/
|
|
8496
8525
|
function _templatizeAdminSourceLayerFields(fields, basePath) {
|
|
8497
8526
|
fields.forEach(f => _templatizeProperty(f, "source", basePath, "name"));
|
|
@@ -8501,6 +8530,7 @@
|
|
|
8501
8530
|
*
|
|
8502
8531
|
* @param topFilter the topFilter object to templatize
|
|
8503
8532
|
* @param basePath path used to de-templatize while deploying
|
|
8533
|
+
* @private
|
|
8504
8534
|
*/
|
|
8505
8535
|
function _templatizeTopFilter(topFilter, basePath) {
|
|
8506
8536
|
/* istanbul ignore else */
|
|
@@ -8531,6 +8561,7 @@
|
|
|
8531
8561
|
*
|
|
8532
8562
|
* @param layer the layer that has the relationships to templatize
|
|
8533
8563
|
* @param itemID the id of the item that contains the related table
|
|
8564
|
+
* @private
|
|
8534
8565
|
*/
|
|
8535
8566
|
function _templatizeRelationshipFields(layer, itemID) {
|
|
8536
8567
|
if (layer && layer.relationships) {
|
|
@@ -8552,6 +8583,7 @@
|
|
|
8552
8583
|
* @param basePath path used to de-templatize while deploying
|
|
8553
8584
|
* @param itemID the id for the item that contains this layer
|
|
8554
8585
|
* @param fieldNames array of fieldNames
|
|
8586
|
+
* @private
|
|
8555
8587
|
*/
|
|
8556
8588
|
function _templatizePopupInfo(layerDefinition, layer, basePath, itemID, fieldNames) {
|
|
8557
8589
|
// the data layer does not have the fields...will need to get those
|
|
@@ -8578,6 +8610,7 @@
|
|
|
8578
8610
|
* @param property that could have a field name referenced
|
|
8579
8611
|
* @param fieldNames array for field names for the layer
|
|
8580
8612
|
* @param basePath path used to de-templatize while deploying
|
|
8613
|
+
* @private
|
|
8581
8614
|
*/
|
|
8582
8615
|
function _templatizeName(object, property, fieldNames, basePath) {
|
|
8583
8616
|
if (object.hasOwnProperty(property)) {
|
|
@@ -8599,6 +8632,7 @@
|
|
|
8599
8632
|
* @param layer json of layer being cloned
|
|
8600
8633
|
* @param itemID id of the item that contains the current layer
|
|
8601
8634
|
* @param basePath path used to de-templatize while deploying
|
|
8635
|
+
* @private
|
|
8602
8636
|
*/
|
|
8603
8637
|
function _templatizePopupInfoFieldInfos(fieldInfos, layer, itemID, basePath) {
|
|
8604
8638
|
fieldInfos.forEach((f) => {
|
|
@@ -8613,6 +8647,7 @@
|
|
|
8613
8647
|
* @param layer json of layer being cloned
|
|
8614
8648
|
* @param itemID id of the item that contains the current layer
|
|
8615
8649
|
* @param basePath path used to de-templatize while deploying
|
|
8650
|
+
* @private
|
|
8616
8651
|
*/
|
|
8617
8652
|
function _templatizeFieldName(name, layer, itemID, basePath) {
|
|
8618
8653
|
if (name.indexOf("relationships/") > -1) {
|
|
@@ -8648,6 +8683,7 @@
|
|
|
8648
8683
|
* @param expressionInfos the popups expressionInfos to check
|
|
8649
8684
|
* @param fieldNames array of the layers field names
|
|
8650
8685
|
* @param basePath path used to de-templatize while deploying
|
|
8686
|
+
* @private
|
|
8651
8687
|
*/
|
|
8652
8688
|
function _templatizeExpressionInfos(expressionInfos, fieldNames, basePath) {
|
|
8653
8689
|
return expressionInfos.map((i) => {
|
|
@@ -8665,6 +8701,7 @@
|
|
|
8665
8701
|
* @param layer json of layer being cloned
|
|
8666
8702
|
* @param itemID id of the item that contains the current layer
|
|
8667
8703
|
* @param fieldNames array of field names
|
|
8704
|
+
* @private
|
|
8668
8705
|
*/
|
|
8669
8706
|
function _templatizePopupElements(popupElelments, basePath, layer, itemID, fieldNames) {
|
|
8670
8707
|
popupElelments.forEach((pe) => {
|
|
@@ -8684,6 +8721,7 @@
|
|
|
8684
8721
|
* @param basePath path used to de-templatize while deploying
|
|
8685
8722
|
* @param layer json of layer being cloned
|
|
8686
8723
|
* @param itemID id of the item that contains the current layer
|
|
8724
|
+
* @private
|
|
8687
8725
|
*/
|
|
8688
8726
|
function _templatizeMediaInfos(mediaInfos, fieldNames, basePath, layer, itemId) {
|
|
8689
8727
|
// templatize various properties of mediaInfos
|
|
@@ -8711,6 +8749,7 @@
|
|
|
8711
8749
|
* @param layer the layer with the definition editor
|
|
8712
8750
|
* @param basePath path used to de-templatize while deploying
|
|
8713
8751
|
* @param fieldNames json of layer being cloned
|
|
8752
|
+
* @private
|
|
8714
8753
|
*/
|
|
8715
8754
|
function _templatizeDefinitionEditor(layer, basePath, fieldNames) {
|
|
8716
8755
|
if (layer) {
|
|
@@ -8740,6 +8779,7 @@
|
|
|
8740
8779
|
* @param layer the layer with the definition editor
|
|
8741
8780
|
* @param basePath path used to de-templatize while deploying
|
|
8742
8781
|
* @param fieldNames array of field names
|
|
8782
|
+
* @private
|
|
8743
8783
|
*/
|
|
8744
8784
|
function _templatizeDefinitionExpression(layer, basePath, fieldNames) {
|
|
8745
8785
|
if (layer && layer.hasOwnProperty("definitionExpression")) {
|
|
@@ -8752,6 +8792,7 @@
|
|
|
8752
8792
|
* @param expression the expression to test for field name references
|
|
8753
8793
|
* @param basePath path used to de-templatize while deploying
|
|
8754
8794
|
* @param fieldNames array of the layers field names
|
|
8795
|
+
* @private
|
|
8755
8796
|
*/
|
|
8756
8797
|
function _templatizeSimpleName(expression, basePath, fieldNames, suffix) {
|
|
8757
8798
|
fieldNames.forEach(name => {
|
|
@@ -8769,6 +8810,7 @@
|
|
|
8769
8810
|
* @param layer the data layer
|
|
8770
8811
|
* @param basePath path used to de-templatize while deploying
|
|
8771
8812
|
* @param fieldNames array of the layers field names
|
|
8813
|
+
* @private
|
|
8772
8814
|
*/
|
|
8773
8815
|
function _templatizeDrawingInfo(layer, basePath, fieldNames) {
|
|
8774
8816
|
if (layer) {
|
|
@@ -8789,6 +8831,7 @@
|
|
|
8789
8831
|
* @param renderer the layers renderer
|
|
8790
8832
|
* @param basePath path used to de-templatize while deploying
|
|
8791
8833
|
* @param fieldNames array of the layers field names
|
|
8834
|
+
* @private
|
|
8792
8835
|
*/
|
|
8793
8836
|
function _templatizeRenderer(renderer, basePath, fieldNames) {
|
|
8794
8837
|
switch (renderer.type) {
|
|
@@ -8810,6 +8853,7 @@
|
|
|
8810
8853
|
* @param renderer the renderer object to check for field references
|
|
8811
8854
|
* @param basePath path used to de-templatize while deploying
|
|
8812
8855
|
* @param fieldNames array of field names that will be used to search expressions
|
|
8856
|
+
* @private
|
|
8813
8857
|
*/
|
|
8814
8858
|
function _templatizeGenRenderer(renderer, basePath, fieldNames) {
|
|
8815
8859
|
/* istanbul ignore else */
|
|
@@ -8859,6 +8903,7 @@
|
|
|
8859
8903
|
* @param renderer the renderer object to check for field references
|
|
8860
8904
|
* @param basePath path used to de-templatize while deploying
|
|
8861
8905
|
* @param fieldNames array of field names that will be used to search expressions
|
|
8906
|
+
* @private
|
|
8862
8907
|
*/
|
|
8863
8908
|
function _templatizeTemporalRenderer(renderer, basePath, fieldNames) {
|
|
8864
8909
|
const renderers = [
|
|
@@ -8876,6 +8921,7 @@
|
|
|
8876
8921
|
* @param authoringInfo object containing metadata about the authoring process
|
|
8877
8922
|
* @param basePath path used to de-templatize while deploying
|
|
8878
8923
|
* @param fieldNames the name of fields from the layer
|
|
8924
|
+
* @private
|
|
8879
8925
|
*/
|
|
8880
8926
|
function _templatizeAuthoringInfo(authoringInfo, basePath, fieldNames) {
|
|
8881
8927
|
/* istanbul ignore else */
|
|
@@ -8907,6 +8953,7 @@
|
|
|
8907
8953
|
* @param text the text that contains the expression
|
|
8908
8954
|
* @param fieldName name of the field to test for
|
|
8909
8955
|
* @param basePath path used to de-templatize while deploying
|
|
8956
|
+
* @private
|
|
8910
8957
|
*/
|
|
8911
8958
|
function _templatizeArcadeExpressions(text, fieldName, basePath) {
|
|
8912
8959
|
const t = _templatize(basePath, fieldName, "name");
|
|
@@ -8954,6 +9001,7 @@
|
|
|
8954
9001
|
* @param labelingInfo the object that contains the labelingInfo
|
|
8955
9002
|
* @param basePath path used to de-templatize while deploying
|
|
8956
9003
|
* @param fieldNames array of the layers field names
|
|
9004
|
+
* @private
|
|
8957
9005
|
*/
|
|
8958
9006
|
function _templatizeLabelingInfo(labelingInfo, basePath, fieldNames) {
|
|
8959
9007
|
labelingInfo.forEach((li) => {
|
|
@@ -8995,6 +9043,7 @@
|
|
|
8995
9043
|
*
|
|
8996
9044
|
* @param layer the data layer being cloned
|
|
8997
9045
|
* @param basePath path used to de-templatize while deploying
|
|
9046
|
+
* @private
|
|
8998
9047
|
*/
|
|
8999
9048
|
function _templatizeTemplates(layer, basePath) {
|
|
9000
9049
|
const templates = layer.templates || [];
|
|
@@ -9012,6 +9061,7 @@
|
|
|
9012
9061
|
*
|
|
9013
9062
|
* @param layer the data layer being cloned
|
|
9014
9063
|
* @param basePath path used to de-templatize while deploying
|
|
9064
|
+
* @private
|
|
9015
9065
|
*/
|
|
9016
9066
|
function _templatizeTypeTemplates(layer, basePath) {
|
|
9017
9067
|
const types = layer.types;
|
|
@@ -9043,6 +9093,7 @@
|
|
|
9043
9093
|
* @param obj the object to templatize
|
|
9044
9094
|
* @param basePath path used to de-templatize while deploying
|
|
9045
9095
|
* @param suffix expected suffix for template variable
|
|
9096
|
+
* @private
|
|
9046
9097
|
*/
|
|
9047
9098
|
function _templatizeKeys(obj, basePath, suffix) {
|
|
9048
9099
|
let _obj;
|
|
@@ -9064,6 +9115,7 @@
|
|
|
9064
9115
|
*
|
|
9065
9116
|
* @param layer the data layer being cloned
|
|
9066
9117
|
* @param basePath path used to de-templatize while deploying
|
|
9118
|
+
* @private
|
|
9067
9119
|
*/
|
|
9068
9120
|
function _templatizeTimeInfo(layer, basePath) {
|
|
9069
9121
|
if (layer.timeInfo) {
|
|
@@ -9089,6 +9141,7 @@
|
|
|
9089
9141
|
* @param layer the data layer being cloned
|
|
9090
9142
|
* @param basePath path used to de-templatize while deploying
|
|
9091
9143
|
* @param fieldNames array of the layers field names
|
|
9144
|
+
* @private
|
|
9092
9145
|
*/
|
|
9093
9146
|
function _templatizeDefinitionQuery(layer, basePath, fieldNames) {
|
|
9094
9147
|
// templatize view definition query
|
|
@@ -9105,6 +9158,7 @@
|
|
|
9105
9158
|
*
|
|
9106
9159
|
* @param fieldInfos the object that stores the cached information
|
|
9107
9160
|
* @param id the id for the current layer being processed
|
|
9161
|
+
* @private
|
|
9108
9162
|
*/
|
|
9109
9163
|
function _getNameMapping(fieldInfos, id) {
|
|
9110
9164
|
// create name mapping
|
|
@@ -9185,7 +9239,8 @@
|
|
|
9185
9239
|
/**
|
|
9186
9240
|
* Helper function to ensure same chunk size value is used in multiple locations
|
|
9187
9241
|
*
|
|
9188
|
-
* @
|
|
9242
|
+
* @returns a number that represents how many layers should be included per addToDef call
|
|
9243
|
+
* @private
|
|
9189
9244
|
*/
|
|
9190
9245
|
function _getLayerChunkSize() {
|
|
9191
9246
|
return 20;
|
|
@@ -9211,7 +9266,7 @@
|
|
|
9211
9266
|
const DeployedSolutionFormatVersion = 1;
|
|
9212
9267
|
//#region Enums ------------------------------------------------------------------------------------------------------//
|
|
9213
9268
|
/**
|
|
9214
|
-
*
|
|
9269
|
+
* Flags for storing an item's binary resources.
|
|
9215
9270
|
*/
|
|
9216
9271
|
exports.EFileType = void 0;
|
|
9217
9272
|
(function (EFileType) {
|
|
@@ -9221,6 +9276,9 @@
|
|
|
9221
9276
|
EFileType[EFileType["Resource"] = 3] = "Resource";
|
|
9222
9277
|
EFileType[EFileType["Thumbnail"] = 4] = "Thumbnail";
|
|
9223
9278
|
})(exports.EFileType || (exports.EFileType = {}));
|
|
9279
|
+
/**
|
|
9280
|
+
* Text versions of flags for storing an item's binary resources.
|
|
9281
|
+
*/
|
|
9224
9282
|
exports.SFileType = void 0;
|
|
9225
9283
|
(function (SFileType) {
|
|
9226
9284
|
SFileType[SFileType["Data"] = 0] = "Data";
|
|
@@ -9242,6 +9300,9 @@
|
|
|
9242
9300
|
EItemProgressStatus[EItemProgressStatus["Failed"] = 5] = "Failed";
|
|
9243
9301
|
EItemProgressStatus[EItemProgressStatus["Unknown"] = 6] = "Unknown";
|
|
9244
9302
|
})(exports.EItemProgressStatus || (exports.EItemProgressStatus = {}));
|
|
9303
|
+
/**
|
|
9304
|
+
* Text versions of flags for reporting the status of creating or deploying an item.
|
|
9305
|
+
*/
|
|
9245
9306
|
const SItemProgressStatus = [
|
|
9246
9307
|
"1 Started",
|
|
9247
9308
|
"2 Created",
|
|
@@ -9274,7 +9335,7 @@
|
|
|
9274
9335
|
*
|
|
9275
9336
|
* @param itemTemplate template for the workforce project item
|
|
9276
9337
|
* @param authentication credentials for any requests
|
|
9277
|
-
* @
|
|
9338
|
+
* @returns templatized itemTemplate
|
|
9278
9339
|
*/
|
|
9279
9340
|
function convertWorkforceItemToTemplate(itemTemplate, authentication) {
|
|
9280
9341
|
return new Promise((resolve, reject) => {
|
|
@@ -9303,7 +9364,7 @@
|
|
|
9303
9364
|
* @param data itemTemplate data
|
|
9304
9365
|
* @param keyProperties workforce project properties that contain references to dependencies
|
|
9305
9366
|
* @param authentication credentials for any requests
|
|
9306
|
-
* @
|
|
9367
|
+
* @returns List of dependencies ids
|
|
9307
9368
|
*/
|
|
9308
9369
|
function extractWorkforceDependencies(data, keyProperties, authentication) {
|
|
9309
9370
|
return new Promise((resolve, reject) => {
|
|
@@ -9384,7 +9445,7 @@
|
|
|
9384
9445
|
* @param data itemTemplate data
|
|
9385
9446
|
* @param keyProperties workforce project properties that should be templatized
|
|
9386
9447
|
* @param urlHash a key value pair of url and itemId
|
|
9387
|
-
* @
|
|
9448
|
+
* @returns an updated data object to be stored in the template
|
|
9388
9449
|
*/
|
|
9389
9450
|
function templatizeWorkforce(data, keyProperties, urlHash) {
|
|
9390
9451
|
keyProperties.forEach(p => {
|
|
@@ -9499,7 +9560,7 @@
|
|
|
9499
9560
|
* This function will update the provided workforceInfos object
|
|
9500
9561
|
*
|
|
9501
9562
|
* @param workforceInfos the object that stores the integration and type info with global ids
|
|
9502
|
-
*
|
|
9563
|
+
* @private
|
|
9503
9564
|
*/
|
|
9504
9565
|
function _updateGlobalIdAndAssignmentType(workforceInfos) {
|
|
9505
9566
|
const updateId = (i) => {
|
|
@@ -9524,6 +9585,7 @@
|
|
|
9524
9585
|
setProp(workforceInfos, "assignmentTypeInfos", assignmentTypeInfos.map(updateId));
|
|
9525
9586
|
}
|
|
9526
9587
|
}
|
|
9588
|
+
//???
|
|
9527
9589
|
function _getAssignmentTypeInfos(assignmentTypes) {
|
|
9528
9590
|
// Assignment Types
|
|
9529
9591
|
const assignmentTypeInfos = [];
|
|
@@ -9540,6 +9602,7 @@
|
|
|
9540
9602
|
});
|
|
9541
9603
|
return assignmentTypeInfos;
|
|
9542
9604
|
}
|
|
9605
|
+
//???
|
|
9543
9606
|
function _getAssignmentIntegrationInfos(assignmentIntegrations, authentication) {
|
|
9544
9607
|
return new Promise((resolve, reject) => {
|
|
9545
9608
|
let requests = [];
|
|
@@ -9619,6 +9682,7 @@
|
|
|
9619
9682
|
*
|
|
9620
9683
|
* @param item the object that may contain a urlTemplate
|
|
9621
9684
|
* @param urlHash a key value pair of url and itemId
|
|
9685
|
+
* @private
|
|
9622
9686
|
*/
|
|
9623
9687
|
function _templatizeUrlTemplate(item, urlHash) {
|
|
9624
9688
|
// v1 uses urlTemplate
|
|
@@ -9676,6 +9740,7 @@
|
|
|
9676
9740
|
return t;
|
|
9677
9741
|
});
|
|
9678
9742
|
}
|
|
9743
|
+
//???
|
|
9679
9744
|
function _templatizeWorkforceProject(t, groupUpdates) {
|
|
9680
9745
|
/* istanbul ignore else */
|
|
9681
9746
|
if (isWorkforceProject(t)) {
|
|
@@ -9725,6 +9790,7 @@
|
|
|
9725
9790
|
}
|
|
9726
9791
|
return t;
|
|
9727
9792
|
}
|
|
9793
|
+
//???
|
|
9728
9794
|
function _templatizeWorkforceDispatcherOrWorker(t, type) {
|
|
9729
9795
|
/* istanbul ignore else */
|
|
9730
9796
|
if ((t.item.typeKeywords || []).indexOf(type) > -1) {
|
|
@@ -9780,6 +9846,7 @@
|
|
|
9780
9846
|
urls: urls
|
|
9781
9847
|
};
|
|
9782
9848
|
}
|
|
9849
|
+
//???
|
|
9783
9850
|
function _getURLs(v) {
|
|
9784
9851
|
return regExTest(v, /=(http.*?FeatureServer.*?(?=&|$))/gi).map(_v => _v.replace("=", ""));
|
|
9785
9852
|
}
|
|
@@ -9789,7 +9856,7 @@
|
|
|
9789
9856
|
*
|
|
9790
9857
|
* @param newlyCreatedItem Item to be created; n.b.: this item is modified
|
|
9791
9858
|
* @param destinationAuthentication The session used to create the new item(s)
|
|
9792
|
-
* @
|
|
9859
|
+
* @returns A promise that will resolve with { "success" === true || false }
|
|
9793
9860
|
*/
|
|
9794
9861
|
function fineTuneCreatedWorkforceItem(newlyCreatedItem, destinationAuthentication, url, templateDictionary) {
|
|
9795
9862
|
return new Promise((resolve, reject) => {
|
|
@@ -9830,6 +9897,7 @@
|
|
|
9830
9897
|
}, e => reject(fail(e)));
|
|
9831
9898
|
});
|
|
9832
9899
|
}
|
|
9900
|
+
//???
|
|
9833
9901
|
function _getFields(url, ids, authentication) {
|
|
9834
9902
|
return new Promise((resolve, reject) => {
|
|
9835
9903
|
const options = {
|
|
@@ -9851,10 +9919,12 @@
|
|
|
9851
9919
|
}, e => reject(fail(e)));
|
|
9852
9920
|
});
|
|
9853
9921
|
}
|
|
9922
|
+
//???
|
|
9854
9923
|
function _updateUrl(url) {
|
|
9855
9924
|
url += url.endsWith("/") ? "" : "/";
|
|
9856
9925
|
return url;
|
|
9857
9926
|
}
|
|
9927
|
+
//???
|
|
9858
9928
|
function _getAddFeatures(updateInfos, fields) {
|
|
9859
9929
|
const features = [];
|
|
9860
9930
|
updateInfos.forEach((update) => {
|
|
@@ -9867,6 +9937,7 @@
|
|
|
9867
9937
|
});
|
|
9868
9938
|
return features;
|
|
9869
9939
|
}
|
|
9940
|
+
//???
|
|
9870
9941
|
function _getField(name, fields) {
|
|
9871
9942
|
return fields.filter(f => f.toLowerCase() === name.toLowerCase())[0];
|
|
9872
9943
|
}
|
|
@@ -9877,8 +9948,8 @@
|
|
|
9877
9948
|
* @param name Current users name
|
|
9878
9949
|
* @param fullName Current users full name
|
|
9879
9950
|
* @param destinationAuthentication The session used to create the new item(s)
|
|
9880
|
-
* @
|
|
9881
|
-
* @
|
|
9951
|
+
* @returns A promise that will resolve with true || false
|
|
9952
|
+
* @private
|
|
9882
9953
|
*/
|
|
9883
9954
|
function _updateDispatchers(url, name, fullName, authentication, isPortal) {
|
|
9884
9955
|
return new Promise((resolve, reject) => {
|
|
@@ -9915,6 +9986,7 @@
|
|
|
9915
9986
|
}
|
|
9916
9987
|
});
|
|
9917
9988
|
}
|
|
9989
|
+
//???
|
|
9918
9990
|
function _applyEdits(url, adds, authentication, useGlobalIds = false // only set when contains a globalid
|
|
9919
9991
|
) {
|
|
9920
9992
|
return new Promise((resolve, reject) => {
|
|
@@ -9967,7 +10039,7 @@
|
|
|
9967
10039
|
* Creates a UserSession via a function so that the global arcgisSolution variable can access authentication.
|
|
9968
10040
|
*
|
|
9969
10041
|
* @param options See https://esri.github.io/arcgis-rest-js/api/auth/IUserSessionOptions/
|
|
9970
|
-
* @
|
|
10042
|
+
* @returns UserSession
|
|
9971
10043
|
*/
|
|
9972
10044
|
function getUserSession(options = {}) {
|
|
9973
10045
|
return new arcgisRestAuth.UserSession(options);
|
|
@@ -9979,7 +10051,7 @@
|
|
|
9979
10051
|
* @param destinationItemId Destination of relationship
|
|
9980
10052
|
* @param relationshipType Type of relationship
|
|
9981
10053
|
* @param authentication Credentials for the request
|
|
9982
|
-
* @
|
|
10054
|
+
* @returns A Promise to add item resources.
|
|
9983
10055
|
*/
|
|
9984
10056
|
function addForwardItemRelationship(originItemId, destinationItemId, relationshipType, authentication) {
|
|
9985
10057
|
return new Promise(resolve => {
|
|
@@ -10008,7 +10080,7 @@
|
|
|
10008
10080
|
* @param originItemId Origin of relationship
|
|
10009
10081
|
* @param destinationRelationships Destinations
|
|
10010
10082
|
* @param authentication Credentials for the request
|
|
10011
|
-
* @
|
|
10083
|
+
* @returns A Promise to add item resources.
|
|
10012
10084
|
*/
|
|
10013
10085
|
function addForwardItemRelationships(originItemId, destinationRelationships, authentication) {
|
|
10014
10086
|
return new Promise(resolve => {
|
|
@@ -10028,7 +10100,7 @@
|
|
|
10028
10100
|
*
|
|
10029
10101
|
* @param url URL to use as base
|
|
10030
10102
|
* @param authentication Credentials to be used to generate token for URL
|
|
10031
|
-
* @
|
|
10103
|
+
* @returns A promise that will resolve with the supplied URL with `token=<token>` added to its query params
|
|
10032
10104
|
* unless either the URL doesn't exist or the token can't be generated
|
|
10033
10105
|
*/
|
|
10034
10106
|
function addTokenToUrl(url, authentication) {
|
|
@@ -10058,7 +10130,7 @@
|
|
|
10058
10130
|
* @param options the info to add to the services definition
|
|
10059
10131
|
* @param skipRetry a boolean to control if retry logic will be used. Defaults to false.
|
|
10060
10132
|
* @param useAsync a boolean to control if we will use an async request
|
|
10061
|
-
* @
|
|
10133
|
+
* @returns A promise that will resolve when the request has completed
|
|
10062
10134
|
*/
|
|
10063
10135
|
function addToServiceDefinition(url, options, skipRetry = false, useAsync = false) {
|
|
10064
10136
|
/* istanbul ignore else */
|
|
@@ -10084,7 +10156,7 @@
|
|
|
10084
10156
|
* @param result the result returned from the addToDefinition request.
|
|
10085
10157
|
* This will contain a status url or the standard sync result.
|
|
10086
10158
|
* @param authentication Credentials to be used to generate token for URL
|
|
10087
|
-
* @
|
|
10159
|
+
* @returns A promise that will resolve when the request has completed
|
|
10088
10160
|
*/
|
|
10089
10161
|
function checkRequestStatus(result, authentication) {
|
|
10090
10162
|
return new Promise((resolve, reject) => {
|
|
@@ -10115,7 +10187,7 @@
|
|
|
10115
10187
|
* Converts a general search into an ISearchOptions structure.
|
|
10116
10188
|
*
|
|
10117
10189
|
* @param search Search specified in one of three ways
|
|
10118
|
-
* @
|
|
10190
|
+
* @returns Recast search
|
|
10119
10191
|
*/
|
|
10120
10192
|
function convertToISearchOptions(search) {
|
|
10121
10193
|
// Convert the search into an ISearchOptions
|
|
@@ -10145,7 +10217,7 @@
|
|
|
10145
10217
|
* In some cases orgs can have null or undefined coordinate values associated with the org extent
|
|
10146
10218
|
*
|
|
10147
10219
|
* @param extent the extent to validate
|
|
10148
|
-
* @
|
|
10220
|
+
* @returns the provided extent or a default global extent if some coordinates are not numbers
|
|
10149
10221
|
* @private
|
|
10150
10222
|
*/
|
|
10151
10223
|
function _validateExtent(extent) {
|
|
@@ -10175,7 +10247,7 @@
|
|
|
10175
10247
|
* @param outSR the spatial reference to project to
|
|
10176
10248
|
* @param geometryServiceUrl the service url for the geometry service to use
|
|
10177
10249
|
* @param authentication the credentials for the requests
|
|
10178
|
-
* @
|
|
10250
|
+
* @returns the extent projected to the provided spatial reference
|
|
10179
10251
|
* or the world extent projected to the provided spatial reference
|
|
10180
10252
|
* @private
|
|
10181
10253
|
*/
|
|
@@ -10213,7 +10285,7 @@
|
|
|
10213
10285
|
* @param outSR Desired spatial reference
|
|
10214
10286
|
* @param geometryServiceUrl Path to geometry service providing `findTransformations` and `project` services
|
|
10215
10287
|
* @param authentication Credentials for the request
|
|
10216
|
-
* @
|
|
10288
|
+
* @returns Original extent if it's already using outSR or the extents projected into the outSR
|
|
10217
10289
|
*/
|
|
10218
10290
|
function convertExtent(extent, outSR, geometryServiceUrl, authentication) {
|
|
10219
10291
|
const _requestOptions = { authentication };
|
|
@@ -10284,7 +10356,7 @@
|
|
|
10284
10356
|
* @param newItemTemplate Template of item to be created
|
|
10285
10357
|
* @param authentication Credentials for the request
|
|
10286
10358
|
* @param templateDictionary Hash of facts: org URL, adlib replacements, user; .user.folders property contains a list
|
|
10287
|
-
* @
|
|
10359
|
+
* @returns A promise that will resolve with an object reporting success and the Solution id
|
|
10288
10360
|
*/
|
|
10289
10361
|
function createFeatureService(newItemTemplate, authentication, templateDictionary) {
|
|
10290
10362
|
return new Promise((resolve, reject) => {
|
|
@@ -10309,7 +10381,7 @@
|
|
|
10309
10381
|
* @param metadataFile Item's metadata file
|
|
10310
10382
|
* @param resourcesFiles Item's resources
|
|
10311
10383
|
* @param access Access to set for item: "public", "org", "private"
|
|
10312
|
-
* @
|
|
10384
|
+
* @returns A promise that will resolve with an object reporting success or failure and the Solution id
|
|
10313
10385
|
*/
|
|
10314
10386
|
function createFullItem(itemInfo, folderId, destinationAuthentication, itemThumbnailUrl, itemThumbnailAuthentication, dataFile, metadataFile, resourcesFiles, access = "private") {
|
|
10315
10387
|
return new Promise((resolve, reject) => {
|
|
@@ -10395,7 +10467,7 @@
|
|
|
10395
10467
|
* @param folderId Id of folder to receive item; null indicates that the item goes into the root
|
|
10396
10468
|
* folder; ignored for Group item type
|
|
10397
10469
|
* @param access Access to set for item: "public", "org", "private"
|
|
10398
|
-
* @
|
|
10470
|
+
* @returns A promise that will resolve with an object reporting success and the Solution id
|
|
10399
10471
|
*/
|
|
10400
10472
|
function createItemWithData(itemInfo, dataInfo, authentication, folderId, access = "private") {
|
|
10401
10473
|
return new Promise((resolve, reject) => {
|
|
@@ -10456,7 +10528,7 @@
|
|
|
10456
10528
|
* of known folder names; function updates list with existing names not yet known, and creates .user.folders if it
|
|
10457
10529
|
* doesn't exist in the dictionary
|
|
10458
10530
|
* @param authentication Credentials for creating folder
|
|
10459
|
-
* @
|
|
10531
|
+
* @returns Id of created folder
|
|
10460
10532
|
*/
|
|
10461
10533
|
function createUniqueFolder(title, templateDictionary, authentication) {
|
|
10462
10534
|
return new Promise((resolve, reject) => {
|
|
@@ -10503,7 +10575,7 @@
|
|
|
10503
10575
|
* If the tracking owner is not the one deploying the solution
|
|
10504
10576
|
* tracker groups will be created under the deployment user but
|
|
10505
10577
|
* will be reassigned to the tracking owner.
|
|
10506
|
-
* @
|
|
10578
|
+
* @returns Information about created group
|
|
10507
10579
|
*/
|
|
10508
10580
|
function createUniqueGroup(title, groupItem, templateDictionary, authentication, owner) {
|
|
10509
10581
|
return new Promise((resolve, reject) => {
|
|
@@ -10557,7 +10629,7 @@
|
|
|
10557
10629
|
*
|
|
10558
10630
|
* @param itemTemplate Template of item to be created
|
|
10559
10631
|
* @param authentication Credentials for the request
|
|
10560
|
-
* @
|
|
10632
|
+
* @returns A promise that will resolve a list of dependencies
|
|
10561
10633
|
*/
|
|
10562
10634
|
function extractDependencies(itemTemplate, authentication) {
|
|
10563
10635
|
const dependencies = [];
|
|
@@ -10594,7 +10666,7 @@
|
|
|
10594
10666
|
* @param serviceUrl the url for the service
|
|
10595
10667
|
* @param layerList list of base layer info
|
|
10596
10668
|
* @param authentication Credentials for the request
|
|
10597
|
-
* @
|
|
10669
|
+
* @returns A promise that will resolve a list of dependencies
|
|
10598
10670
|
*/
|
|
10599
10671
|
function getLayers(serviceUrl, layerList, authentication) {
|
|
10600
10672
|
return new Promise((resolve, reject) => {
|
|
@@ -10620,7 +10692,7 @@
|
|
|
10620
10692
|
* @param args The IPostProcessArgs for the request(s)
|
|
10621
10693
|
* @param isPortal boolean to indicate if we are deploying to portal
|
|
10622
10694
|
*
|
|
10623
|
-
* @
|
|
10695
|
+
* @returns An array of update instructions
|
|
10624
10696
|
* @private
|
|
10625
10697
|
*/
|
|
10626
10698
|
function getLayerUpdates(args, isPortal) {
|
|
@@ -10677,7 +10749,8 @@
|
|
|
10677
10749
|
* @param tables the tables from the service
|
|
10678
10750
|
* @param relUpdates the relationships to add for the service
|
|
10679
10751
|
*
|
|
10680
|
-
* @
|
|
10752
|
+
* @returns An array with relationships that have been sorted
|
|
10753
|
+
* @private
|
|
10681
10754
|
*/
|
|
10682
10755
|
function _sortRelationships(layers, tables, relUpdates) {
|
|
10683
10756
|
const ids = [].concat(layers.map((l) => l.id), tables.map((t) => t.id));
|
|
@@ -10706,7 +10779,7 @@
|
|
|
10706
10779
|
* @param itemTemplate Template of item being deployed
|
|
10707
10780
|
* @param authentication Credentials for the request
|
|
10708
10781
|
* @param updates An array of update instructions
|
|
10709
|
-
* @
|
|
10782
|
+
* @returns An array of update instructions
|
|
10710
10783
|
*/
|
|
10711
10784
|
function getFinalServiceUpdates(itemTemplate, authentication, updates) {
|
|
10712
10785
|
const sourceSchemaChangesAllowed = getProp(itemTemplate, "properties.service.sourceSchemaChangesAllowed");
|
|
@@ -10731,7 +10804,7 @@
|
|
|
10731
10804
|
*
|
|
10732
10805
|
* @param Update will contain either add, update, or delete from service definition call
|
|
10733
10806
|
* @param skipRetry defaults to false. when true the retry logic will be ignored
|
|
10734
|
-
* @
|
|
10807
|
+
* @returns A promise that will resolve when service definition call has completed
|
|
10735
10808
|
* @private
|
|
10736
10809
|
*/
|
|
10737
10810
|
/* istanbul ignore else */
|
|
@@ -10764,7 +10837,7 @@
|
|
|
10764
10837
|
*
|
|
10765
10838
|
* @param itemTemplate Feature service item, data, dependencies definition to be modified
|
|
10766
10839
|
* @param authentication Credentials for the request to AGOL
|
|
10767
|
-
* @
|
|
10840
|
+
* @returns A promise that will resolve when fullItem has been updated
|
|
10768
10841
|
* @private
|
|
10769
10842
|
*/
|
|
10770
10843
|
function getServiceLayersAndTables(itemTemplate, authentication) {
|
|
@@ -10792,7 +10865,7 @@
|
|
|
10792
10865
|
* @param serviceUrl the feature service url
|
|
10793
10866
|
* @param authentication Credentials for the request to AGOL
|
|
10794
10867
|
* @param workforceService boolean to indicate if extra workforce service steps should be handled
|
|
10795
|
-
* @
|
|
10868
|
+
* @returns A promise that will resolve with the service properties
|
|
10796
10869
|
* @private
|
|
10797
10870
|
*/
|
|
10798
10871
|
function getFeatureServiceProperties(serviceUrl, authentication, workforceService = false) {
|
|
@@ -10855,7 +10928,8 @@
|
|
|
10855
10928
|
* Layers and Tables are both returned in the layers array when we access a feature service from the admin api.
|
|
10856
10929
|
*
|
|
10857
10930
|
* @param adminData The data of the feature service
|
|
10858
|
-
* @
|
|
10931
|
+
* @returns A mutated version of the provided adminData
|
|
10932
|
+
* @private
|
|
10859
10933
|
*/
|
|
10860
10934
|
function _parseAdminServiceData(adminData) {
|
|
10861
10935
|
const layers = adminData.layers || [];
|
|
@@ -10871,7 +10945,7 @@
|
|
|
10871
10945
|
* These layers should not be templatized or depolyed
|
|
10872
10946
|
*
|
|
10873
10947
|
* @param groupDesignations the items group designations to evaluate
|
|
10874
|
-
* @
|
|
10948
|
+
* @returns A boolean indicating if the invalid designation is found in the item info
|
|
10875
10949
|
*/
|
|
10876
10950
|
function hasInvalidGroupDesignations(groupDesignations) {
|
|
10877
10951
|
const invalidGroupDesignations = ["livingatlas"];
|
|
@@ -10884,7 +10958,7 @@
|
|
|
10884
10958
|
*
|
|
10885
10959
|
* @param folderId Id of a folder to delete
|
|
10886
10960
|
* @param authentication Credentials for the request to AGO
|
|
10887
|
-
* @
|
|
10961
|
+
* @returns A promise that will resolve with the result of the request
|
|
10888
10962
|
*/
|
|
10889
10963
|
function removeFolder(folderId, authentication) {
|
|
10890
10964
|
return new Promise((resolve, reject) => {
|
|
@@ -10900,7 +10974,7 @@
|
|
|
10900
10974
|
*
|
|
10901
10975
|
* @param groupId Id of a group to delete
|
|
10902
10976
|
* @param authentication Credentials for the request to AGO
|
|
10903
|
-
* @
|
|
10977
|
+
* @returns A promise that will resolve with the result of the request
|
|
10904
10978
|
*/
|
|
10905
10979
|
function removeGroup(groupId, authentication) {
|
|
10906
10980
|
return new Promise((resolve, reject) => {
|
|
@@ -10916,7 +10990,7 @@
|
|
|
10916
10990
|
*
|
|
10917
10991
|
* @param itemId Id of an item to delete
|
|
10918
10992
|
* @param authentication Credentials for the request to AGO
|
|
10919
|
-
* @
|
|
10993
|
+
* @returns A promise that will resolve with the result of the request
|
|
10920
10994
|
*/
|
|
10921
10995
|
function removeItem(itemId, authentication) {
|
|
10922
10996
|
return new Promise((resolve, reject) => {
|
|
@@ -10932,7 +11006,7 @@
|
|
|
10932
11006
|
*
|
|
10933
11007
|
* @param itemId Id of an item or group to delete
|
|
10934
11008
|
* @param authentication Credentials for the request to AGO
|
|
10935
|
-
* @
|
|
11009
|
+
* @returns A promise that will resolve with the result of the request
|
|
10936
11010
|
*/
|
|
10937
11011
|
function removeItemOrGroup(itemId, authentication) {
|
|
10938
11012
|
return new Promise((resolve, reject) => {
|
|
@@ -10945,7 +11019,7 @@
|
|
|
10945
11019
|
* Searches for items matching a query and that the caller has access to.
|
|
10946
11020
|
*
|
|
10947
11021
|
* @param search Search string (e.g., "q=redlands+map") or a more detailed structure that can include authentication
|
|
10948
|
-
* @
|
|
11022
|
+
* @returns Promise resolving with search results
|
|
10949
11023
|
* @see https://developers.arcgis.com/rest/users-groups-and-items/search.htm
|
|
10950
11024
|
*/
|
|
10951
11025
|
function searchItems(search) {
|
|
@@ -10956,7 +11030,7 @@
|
|
|
10956
11030
|
*
|
|
10957
11031
|
* @param search Search string (e.g., "q=redlands+map") or a more detailed structure that can include authentication
|
|
10958
11032
|
* @param accumulatedResponse Response built from previous requests
|
|
10959
|
-
* @
|
|
11033
|
+
* @returns Promise resolving with search results
|
|
10960
11034
|
* @see https://developers.arcgis.com/rest/users-groups-and-items/search.htm
|
|
10961
11035
|
*/
|
|
10962
11036
|
function searchAllItems(search, accumulatedResponse) {
|
|
@@ -10992,7 +11066,7 @@
|
|
|
10992
11066
|
* @param searchString Text for which to search, e.g., 'redlands+map', 'type:"Web Map" -type:"Web Mapping Application"'
|
|
10993
11067
|
* @param authentication Credentials for the request to AGO
|
|
10994
11068
|
* @param additionalSearchOptions Adjustments to search, such as tranche size
|
|
10995
|
-
* @
|
|
11069
|
+
* @returns A promise that will resolve with a structure with a tranche of results and
|
|
10996
11070
|
* describing how many items are available
|
|
10997
11071
|
* @see https://developers.arcgis.com/rest/users-groups-and-items/group-search.htm
|
|
10998
11072
|
* @see https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm
|
|
@@ -11015,7 +11089,7 @@
|
|
|
11015
11089
|
* @param groups List of groups that have been found from previous requests
|
|
11016
11090
|
* @param inPagingParams The paging params for the recurisve searching
|
|
11017
11091
|
*
|
|
11018
|
-
* @
|
|
11092
|
+
* @returns A promise that will resolve with all groups that meet the search criteria
|
|
11019
11093
|
*/
|
|
11020
11094
|
function searchAllGroups(searchString, authentication, groups, inPagingParams) {
|
|
11021
11095
|
const pagingParams = inPagingParams ? inPagingParams : {
|
|
@@ -11052,7 +11126,7 @@
|
|
|
11052
11126
|
* are supplied as an array: each array element consists of one or more categories to be ORed; array elements are ANDed
|
|
11053
11127
|
* @param portalUrl Rest Url of the portal to perform the search
|
|
11054
11128
|
* @param accumulatedResponse Response built from previous requests
|
|
11055
|
-
* @
|
|
11129
|
+
* @returns A promise that will resolve with a structure with a tranche of results and
|
|
11056
11130
|
* describing how many items are available
|
|
11057
11131
|
* @see https://developers.arcgis.com/rest/users-groups-and-items/group-content-search.htm
|
|
11058
11132
|
* @see https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm
|
|
@@ -11091,7 +11165,7 @@
|
|
|
11091
11165
|
* @param additionalSearchOptions Adjustments to search, such as tranche size and categories of interest; categories
|
|
11092
11166
|
* are supplied as an array: each array element consists of one or more categories to be ORed; array elements are ANDed
|
|
11093
11167
|
* @param portalUrl Rest Url of the portal to perform the search
|
|
11094
|
-
* @
|
|
11168
|
+
* @returns A promise that will resolve with a structure with a tranche of results and
|
|
11095
11169
|
* describing how many items are available
|
|
11096
11170
|
* @see https://developers.arcgis.com/rest/users-groups-and-items/group-content-search.htm
|
|
11097
11171
|
* @see https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm
|
|
@@ -11120,7 +11194,7 @@
|
|
|
11120
11194
|
* @param userName The new owner for the group
|
|
11121
11195
|
* @param authentication Credentials for the request to
|
|
11122
11196
|
*
|
|
11123
|
-
* @
|
|
11197
|
+
* @returns A promise that will resolve after the group ownership has been assigned
|
|
11124
11198
|
*
|
|
11125
11199
|
*/
|
|
11126
11200
|
function reassignGroup(groupId, userName, authentication) {
|
|
@@ -11139,7 +11213,7 @@
|
|
|
11139
11213
|
* @param users List of users to remove from the group
|
|
11140
11214
|
* @param authentication Credentials for the request to
|
|
11141
11215
|
*
|
|
11142
|
-
* @
|
|
11216
|
+
* @returns A promise that will resolve after the users have been removed
|
|
11143
11217
|
*
|
|
11144
11218
|
*/
|
|
11145
11219
|
function removeUsers(groupId, users, authentication) {
|
|
@@ -11157,7 +11231,7 @@
|
|
|
11157
11231
|
* @param destinationAuthentication Credentials for the request to AGO
|
|
11158
11232
|
* @param owner owner of the group when sharing tracking items (can be different from the deploying user)
|
|
11159
11233
|
*
|
|
11160
|
-
* @
|
|
11234
|
+
* @returns A promise that will resolve after the item has been shared
|
|
11161
11235
|
*
|
|
11162
11236
|
*/
|
|
11163
11237
|
function shareItem(groupId, id, destinationAuthentication, owner) {
|
|
@@ -11204,7 +11278,7 @@
|
|
|
11204
11278
|
* for binary content
|
|
11205
11279
|
* @param authentication Credentials for request
|
|
11206
11280
|
* @param additionalParams Updates that are put under the `params` property, which is not serialized
|
|
11207
|
-
* @
|
|
11281
|
+
* @returns A Promise that will resolve with the success/failure status of the request
|
|
11208
11282
|
*/
|
|
11209
11283
|
function updateGroup(groupInfo, authentication, additionalParams) {
|
|
11210
11284
|
return new Promise((resolve, reject) => {
|
|
@@ -11301,7 +11375,7 @@
|
|
|
11301
11375
|
* @param id AGOL id of item to update
|
|
11302
11376
|
* @param url URL to assign to item's base section
|
|
11303
11377
|
* @param authentication Credentials for the request
|
|
11304
|
-
* @
|
|
11378
|
+
* @returns A promise that will resolve with the item id when the item has been updated or an AGO-style JSON failure
|
|
11305
11379
|
* response
|
|
11306
11380
|
*/
|
|
11307
11381
|
function updateItemURL(id, url, authentication) {
|
|
@@ -11315,7 +11389,7 @@
|
|
|
11315
11389
|
* @param itemId Id of item to receive data file
|
|
11316
11390
|
* @param dataFile Data to be added
|
|
11317
11391
|
* @param authentication Credentials for the request
|
|
11318
|
-
* @
|
|
11392
|
+
* @returns Promise reporting success or failure
|
|
11319
11393
|
* @private
|
|
11320
11394
|
*/
|
|
11321
11395
|
function _addItemDataFile(itemId, dataFile, authentication) {
|
|
@@ -11346,7 +11420,7 @@
|
|
|
11346
11420
|
* @param itemId Id of item to receive data file
|
|
11347
11421
|
* @param metadataFile Metadata to be added
|
|
11348
11422
|
* @param authentication Credentials for the request
|
|
11349
|
-
* @
|
|
11423
|
+
* @returns Promise reporting success or failure
|
|
11350
11424
|
* @private
|
|
11351
11425
|
*/
|
|
11352
11426
|
function _addItemMetadataFile(itemId, metadataFile, authentication) {
|
|
@@ -11368,7 +11442,7 @@
|
|
|
11368
11442
|
* Accumulates the number of relationships in a collection of layers.
|
|
11369
11443
|
*
|
|
11370
11444
|
* @param List of layers to examine
|
|
11371
|
-
* @
|
|
11445
|
+
* @returns The number of relationships
|
|
11372
11446
|
* @private
|
|
11373
11447
|
*/
|
|
11374
11448
|
function _countRelationships(layers) {
|
|
@@ -11382,7 +11456,7 @@
|
|
|
11382
11456
|
* @param serviceUrl URL to hosted service
|
|
11383
11457
|
* @param layerList List of layers at that service...must contain id
|
|
11384
11458
|
* @param authentication Credentials for the request
|
|
11385
|
-
* @
|
|
11459
|
+
* @returns A promise that will resolve with a list of the layers from the admin api
|
|
11386
11460
|
* @private
|
|
11387
11461
|
*/
|
|
11388
11462
|
function _getCreateServiceOptions(newItemTemplate, authentication, templateDictionary) {
|
|
@@ -11434,7 +11508,7 @@
|
|
|
11434
11508
|
*
|
|
11435
11509
|
* @param serviceInfo the object that contains the spatial reference to evaluate
|
|
11436
11510
|
* @param templateDictionary the template dictionary
|
|
11437
|
-
* @
|
|
11511
|
+
* @returns the extent to use as the fallback
|
|
11438
11512
|
* @private
|
|
11439
11513
|
*/
|
|
11440
11514
|
function _getFallbackExtent(serviceInfo, templateDictionary) {
|
|
@@ -11451,7 +11525,7 @@
|
|
|
11451
11525
|
* Add relationships to all layers in one call to retain fully functioning composite relationships
|
|
11452
11526
|
*
|
|
11453
11527
|
* @param args The IPostProcessArgs for the request(s)
|
|
11454
|
-
* @
|
|
11528
|
+
* @returns Any relationships that should be updated for the service
|
|
11455
11529
|
* @private
|
|
11456
11530
|
*/
|
|
11457
11531
|
function _getRelationshipUpdates(args) {
|
|
@@ -11479,7 +11553,7 @@
|
|
|
11479
11553
|
* @param obj parameters for the request
|
|
11480
11554
|
* @param args various arguments to help support the request
|
|
11481
11555
|
* @param type type of update the request will handle
|
|
11482
|
-
* @
|
|
11556
|
+
* @returns IUpdate that has the request url and arguments
|
|
11483
11557
|
* @private
|
|
11484
11558
|
*/
|
|
11485
11559
|
function _getUpdate(url, id, obj, args, type) {
|
|
@@ -11523,6 +11597,7 @@
|
|
|
11523
11597
|
*
|
|
11524
11598
|
* @param base Item's base section
|
|
11525
11599
|
* @param data Item's data section
|
|
11600
|
+
* @private
|
|
11526
11601
|
*/
|
|
11527
11602
|
function _reportVariablesInItem(itemId, itemType, base, data) {
|
|
11528
11603
|
const getUnresolved = (v) => {
|
|
@@ -11554,7 +11629,8 @@
|
|
|
11554
11629
|
* @param serviceInfo Service information
|
|
11555
11630
|
* @param params arcgis-rest-js params to update
|
|
11556
11631
|
* @param isPortal Is the service hosted in a portal?
|
|
11557
|
-
* @
|
|
11632
|
+
* @returns Updated item
|
|
11633
|
+
* @private
|
|
11558
11634
|
*/
|
|
11559
11635
|
function _setItemProperties(item, itemTemplate, serviceInfo, params, isPortal) {
|
|
11560
11636
|
// Set the capabilities
|
|
@@ -11632,7 +11708,7 @@
|
|
|
11632
11708
|
* Set isUnique as true for indexes that reference origin relationship keyFields.
|
|
11633
11709
|
*
|
|
11634
11710
|
* @param serviceInfo Service information
|
|
11635
|
-
* @
|
|
11711
|
+
* @private
|
|
11636
11712
|
*/
|
|
11637
11713
|
function _updateIndexesForRelationshipKeyFields(serviceInfo) {
|
|
11638
11714
|
const layersAndTables = (serviceInfo.layers || []).concat(serviceInfo.tables || []);
|
|
@@ -11673,8 +11749,9 @@
|
|
|
11673
11749
|
* @param url URL to assign to item's base section
|
|
11674
11750
|
* @param authentication Credentials for the request
|
|
11675
11751
|
* @param numAttempts Number of times to try to set the URL if AGO says that it updated the URL, but really didn't
|
|
11676
|
-
* @
|
|
11752
|
+
* @returns A promise that will resolve with the item id when the item has been updated or an AGO-style JSON failure
|
|
11677
11753
|
* response
|
|
11754
|
+
* @private
|
|
11678
11755
|
*/
|
|
11679
11756
|
function _updateItemURL(id, url, authentication, numAttempts = 1) {
|
|
11680
11757
|
// Introduce a lag because AGO update appears to choke with rapid subsequent calls
|
|
@@ -11745,7 +11822,7 @@
|
|
|
11745
11822
|
*
|
|
11746
11823
|
* @param itemId Id of an item whose information is sought
|
|
11747
11824
|
* @param authentication Credentials for the request
|
|
11748
|
-
* @
|
|
11825
|
+
* @returns Promise that will resolve with everything known about the item
|
|
11749
11826
|
*/
|
|
11750
11827
|
function getCompleteItem(itemId, authentication) {
|
|
11751
11828
|
let itemBase;
|
|
@@ -11877,7 +11954,7 @@
|
|
|
11877
11954
|
*
|
|
11878
11955
|
* @param groupId Id of the group to be deleted
|
|
11879
11956
|
* @param authentication Credentials for the request
|
|
11880
|
-
* @
|
|
11957
|
+
* @returns Promise indicating if group was deleted
|
|
11881
11958
|
*/
|
|
11882
11959
|
function deleteGroupIfEmpty(groupId, authentication) {
|
|
11883
11960
|
let username;
|
|
@@ -11968,7 +12045,7 @@
|
|
|
11968
12045
|
*
|
|
11969
12046
|
* @param groups Ids of the groups to be deleted
|
|
11970
12047
|
* @param authentication Credentials for the request
|
|
11971
|
-
* @
|
|
12048
|
+
* @returns Promise that will resolve with the list of successfully deleted groups
|
|
11972
12049
|
*/
|
|
11973
12050
|
function deleteEmptyGroups(groups, authentication) {
|
|
11974
12051
|
if (groups.length === 0) {
|
|
@@ -12003,7 +12080,7 @@
|
|
|
12003
12080
|
* @param solutionFolderId Id of the folder of a deployed Solution
|
|
12004
12081
|
* @param deletedItemIds Ids in the Solution, including the Solution item; used to deal with lagging folder deletion
|
|
12005
12082
|
* @param authentication Credentials for the request
|
|
12006
|
-
* @
|
|
12083
|
+
* @returns Promise that will resolve if deletion was successful and fail if any part of it failed;
|
|
12007
12084
|
* if the folder has a non-Solution item, it will not be deleted, but the function will return true
|
|
12008
12085
|
*/
|
|
12009
12086
|
function deleteSolutionFolder(solutionIds, folderId, authentication) {
|
|
@@ -12076,7 +12153,7 @@
|
|
|
12076
12153
|
*
|
|
12077
12154
|
* @param solutionItemId Id of a deployed Solution
|
|
12078
12155
|
* @param authentication Credentials for the request
|
|
12079
|
-
* @
|
|
12156
|
+
* @returns Promise that will resolve with the status of deleting the item
|
|
12080
12157
|
*/
|
|
12081
12158
|
function deleteSolutionItem(solutionItemId, authentication) {
|
|
12082
12159
|
const protectOptions = {
|
|
@@ -12121,7 +12198,7 @@
|
|
|
12121
12198
|
* Topologically sorts a list of items into a build list.
|
|
12122
12199
|
*
|
|
12123
12200
|
* @param templates A collection of AGO item templates
|
|
12124
|
-
* @
|
|
12201
|
+
* @returns An object containing three parts: a list of ids of items in the order in which they need to be built
|
|
12125
12202
|
* so that dependencies are built before items that require those dependencies, a list of item ids found in a
|
|
12126
12203
|
* template's dependencies but not present in the supplied list of templates, and a dictionary containing items
|
|
12127
12204
|
* that need to be post-processed due to dependency cycles.
|
|
@@ -12249,7 +12326,7 @@
|
|
|
12249
12326
|
/**
|
|
12250
12327
|
* A visit flag used in the topological sort algorithm.
|
|
12251
12328
|
*
|
|
12252
|
-
* @
|
|
12329
|
+
* @private
|
|
12253
12330
|
*/
|
|
12254
12331
|
var ESortVisitState;
|
|
12255
12332
|
(function (ESortVisitState) {
|
|
@@ -12281,7 +12358,7 @@
|
|
|
12281
12358
|
* Reconstructs the build order of a set of templates.
|
|
12282
12359
|
*
|
|
12283
12360
|
* @param templates A collection of AGO item templates
|
|
12284
|
-
* @
|
|
12361
|
+
* @returns The ids of the source templates in build order, which is not necessarily the same
|
|
12285
12362
|
* as the build order used to create the template Solution
|
|
12286
12363
|
*/
|
|
12287
12364
|
function reconstructBuildOrderIds(templates) {
|
|
@@ -12354,7 +12431,7 @@
|
|
|
12354
12431
|
* @param solutionDeletedSummary Solution summary containing items successfully deleted
|
|
12355
12432
|
* @param solutionFailureSummary Solution summary containing items that could not be deleted
|
|
12356
12433
|
* @param deleteOptions Reporting options
|
|
12357
|
-
* @
|
|
12434
|
+
* @returns Promise that will resolve with a list of two solution summaries: successful deletions
|
|
12358
12435
|
* and failed deletions. Ignored items (e.g., already deleted) will not be in either list.
|
|
12359
12436
|
*/
|
|
12360
12437
|
function removeItems(solutionSummary, hubSiteItemIds, authentication, percentDone, progressPercentStep, deleteOptions = {}) {
|
|
@@ -12449,7 +12526,7 @@
|
|
|
12449
12526
|
* @param solutionSummary List of items in the solution that would be deleted
|
|
12450
12527
|
* @param authentication Credentials for the request
|
|
12451
12528
|
* @param options Progress reporting options
|
|
12452
|
-
* @
|
|
12529
|
+
* @returns Promise that will resolve with a list of two solution summaries: successful deletions
|
|
12453
12530
|
* and failed deletions. Ignored items (e.g., already deleted) and items shared with more than
|
|
12454
12531
|
* one Solution will not be in either list.
|
|
12455
12532
|
* Note that Solution item and its deployment folder will only be deleted if all of its deployed
|
|
@@ -12558,7 +12635,7 @@
|
|
|
12558
12635
|
*
|
|
12559
12636
|
* @param solutionItemId Id of a deployed Solution
|
|
12560
12637
|
* @param authentication Credentials for the request
|
|
12561
|
-
* @
|
|
12638
|
+
* @returns Promise resolving to a summary of the deployed Solution
|
|
12562
12639
|
*/
|
|
12563
12640
|
function getSolutionSummary(solutionItemId, authentication) {
|
|
12564
12641
|
const solutionSummary = {
|
|
@@ -12649,7 +12726,7 @@
|
|
|
12649
12726
|
*
|
|
12650
12727
|
* @param solutionItemId Id of a deployed Solution
|
|
12651
12728
|
* @param authentication Credentials for the request
|
|
12652
|
-
* @
|
|
12729
|
+
* @returns Promise resolving to the list of items in the solution that would be deleted.
|
|
12653
12730
|
*/
|
|
12654
12731
|
function getDeletableSolutionInfo(solutionItemId, authentication) {
|
|
12655
12732
|
let solutionSummary;
|
|
@@ -12694,7 +12771,7 @@
|
|
|
12694
12771
|
* @param solutionItemId Id of a deployed Solution
|
|
12695
12772
|
* @param authentication Credentials for the request
|
|
12696
12773
|
* @param options Progress reporting options
|
|
12697
|
-
* @
|
|
12774
|
+
* @returns Promise that will resolve with a list of two solution summaries: successful deletions
|
|
12698
12775
|
* and failed deletions. Ignored items (e.g., already deleted) and items shared with more than
|
|
12699
12776
|
* one Solution will not be in either list.
|
|
12700
12777
|
* Note that Solution item and its deployment folder will only be deleted if all of its deployed
|
|
@@ -12720,7 +12797,7 @@
|
|
|
12720
12797
|
* @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
|
|
12721
12798
|
* @param authentication Credentials for the request
|
|
12722
12799
|
* @param options Progress reporting options
|
|
12723
|
-
* @
|
|
12800
|
+
* @returns Promise that will resolve with a list of two solution summaries: successful deletions
|
|
12724
12801
|
* and failed deletions. Ignored items (e.g., already deleted) and items shared with more than
|
|
12725
12802
|
* one Solution will not be in either list.
|
|
12726
12803
|
* Note that Solution item and its deployment folder will only be deleted if all of its deployed
|
|
@@ -13022,6 +13099,7 @@
|
|
|
13022
13099
|
*
|
|
13023
13100
|
* @param model
|
|
13024
13101
|
* @param authentication
|
|
13102
|
+
* @private
|
|
13025
13103
|
*/
|
|
13026
13104
|
function _applySchema(model) {
|
|
13027
13105
|
if (hubCommon.getProp(model, "item.properties.schemaVersion") >= 1) {
|
|
@@ -13475,6 +13553,13 @@
|
|
|
13475
13553
|
* See the License for the specific language governing permissions and
|
|
13476
13554
|
* limitations under the License.
|
|
13477
13555
|
*/
|
|
13556
|
+
/**
|
|
13557
|
+
* Updates schema to 2.7.
|
|
13558
|
+
*
|
|
13559
|
+
* @param model Model to be updated
|
|
13560
|
+
* @returns Updated model
|
|
13561
|
+
* @private
|
|
13562
|
+
*/
|
|
13478
13563
|
function _upgradeTwoDotSeven(model) {
|
|
13479
13564
|
if (hubCommon.getProp(model, "item.properties.schemaVersion") >= 2.7) {
|
|
13480
13565
|
return model;
|
|
@@ -13655,7 +13740,7 @@
|
|
|
13655
13740
|
* @param sourceResourceFilename Either filename or folder/filename to resource
|
|
13656
13741
|
* @param storageVersion Version of the Solution template
|
|
13657
13742
|
* @param storageFileType Optional argument that when supplied will control the how the prefix is created
|
|
13658
|
-
* @
|
|
13743
|
+
* @returns Folder and filename for storage; folder is the itemID plus ("_" + storageFolder) if storageFolder
|
|
13659
13744
|
* exists plus ("_" + part of sourceResourceFilename before "/" if that separator exists);
|
|
13660
13745
|
* file is sourceResourceFilename
|
|
13661
13746
|
* @see convertStorageResourceToItemResource
|
|
@@ -13718,7 +13803,7 @@
|
|
|
13718
13803
|
*
|
|
13719
13804
|
* @param storageResourceFilename Filename used to store the resource, metadata, or thumbnail of an item
|
|
13720
13805
|
* @param storageVersion Version of the Solution template
|
|
13721
|
-
* @
|
|
13806
|
+
* @returns Folder and filename for storing information in an item, as well as the type (resource, metadata,
|
|
13722
13807
|
* or thumbnail) of the information; the folder property is only meaningful for the resource type
|
|
13723
13808
|
* @see generateResourceStorageFilename
|
|
13724
13809
|
* @see generateMetadataStorageFilename
|
|
@@ -13785,7 +13870,7 @@
|
|
|
13785
13870
|
* @param fileInfo Info about item that was to be copied
|
|
13786
13871
|
* @param fetchedFromSource Status of fetching item from source
|
|
13787
13872
|
* @param copiedToDestination Status of copying item to destination
|
|
13788
|
-
* @
|
|
13873
|
+
* @returns IAssociatedFileCopyResults object
|
|
13789
13874
|
*/
|
|
13790
13875
|
function createCopyResults(fileInfo, fetchedFromSource, copiedToDestination) {
|
|
13791
13876
|
return {
|
|
@@ -13818,7 +13903,7 @@
|
|
|
13818
13903
|
* @param sourceAuthentication Credentials for the request to the source
|
|
13819
13904
|
* @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
|
|
13820
13905
|
* @param destinationAuthentication Credentials for the request to the storage
|
|
13821
|
-
* @
|
|
13906
|
+
* @returns A promise which resolves to the result of the copy
|
|
13822
13907
|
*/
|
|
13823
13908
|
function copyDataIntoItem(fileInfo, sourceAuthentication, destinationItemId, destinationAuthentication) {
|
|
13824
13909
|
return new Promise(resolve => {
|
|
@@ -13841,7 +13926,7 @@
|
|
|
13841
13926
|
* Creates a file with a specified mime type.
|
|
13842
13927
|
*
|
|
13843
13928
|
* @param fileDescription Structure containing a file and the desired mime type
|
|
13844
|
-
* @
|
|
13929
|
+
* @returns Created file
|
|
13845
13930
|
*/
|
|
13846
13931
|
function createMimeTypedFile(fileDescription) {
|
|
13847
13932
|
return new_File([fileDescription.blob], fileDescription.filename, {
|
|
@@ -13871,7 +13956,7 @@
|
|
|
13871
13956
|
* @param blob Blob containing metadata
|
|
13872
13957
|
* @param itemId Item to receive metadata
|
|
13873
13958
|
* @param authentication Credentials for the request
|
|
13874
|
-
* @
|
|
13959
|
+
* @returns Promise resolving to JSON containing success boolean
|
|
13875
13960
|
*/
|
|
13876
13961
|
function addMetadataFromBlob(blob, itemId, authentication) {
|
|
13877
13962
|
const updateOptions = {
|
|
@@ -13910,7 +13995,7 @@
|
|
|
13910
13995
|
* @param sourceAuthentication Credentials for the request to the source
|
|
13911
13996
|
* @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
|
|
13912
13997
|
* @param destinationAuthentication Credentials for the request to the storage
|
|
13913
|
-
* @
|
|
13998
|
+
* @returns A promise which resolves to the result of the copy
|
|
13914
13999
|
*/
|
|
13915
14000
|
function copyMetadataIntoItem(fileInfo, sourceAuthentication, destinationItemId, destinationAuthentication) {
|
|
13916
14001
|
return new Promise(resolve => {
|
|
@@ -13947,7 +14032,7 @@
|
|
|
13947
14032
|
*
|
|
13948
14033
|
* @param file Information about the source and destination of the file such as its URL, folder, filename
|
|
13949
14034
|
* @param zipInfo Information about a zipfile such as its name and its zip object
|
|
13950
|
-
* @
|
|
14035
|
+
* @returns The result of the copy
|
|
13951
14036
|
*/
|
|
13952
14037
|
function copyResourceIntoZip(file, zipInfo) {
|
|
13953
14038
|
// Add it to the zip
|
|
@@ -13968,7 +14053,7 @@
|
|
|
13968
14053
|
* @param fileInfo Information about the source and destination of the file such as its URL, folder, filename
|
|
13969
14054
|
* @param sourceAuthentication Credentials for the request to the source
|
|
13970
14055
|
* @param zipInfo Information about a zipfile such as its name and its zip object
|
|
13971
|
-
* @
|
|
14056
|
+
* @returns A promise which resolves to the result of the copy
|
|
13972
14057
|
*/
|
|
13973
14058
|
function copyResourceIntoZipFromInfo(fileInfo, sourceAuthentication, zipInfo) {
|
|
13974
14059
|
return new Promise(resolve => {
|
|
@@ -14012,7 +14097,7 @@
|
|
|
14012
14097
|
* @param zipInfo Information about a zipfile such as its name and its zip object
|
|
14013
14098
|
* @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
|
|
14014
14099
|
* @param destinationAuthentication Credentials for the request to the storage
|
|
14015
|
-
* @
|
|
14100
|
+
* @returns A promise which resolves to the result of the copy
|
|
14016
14101
|
*/
|
|
14017
14102
|
function copyZipIntoItem(zipInfo, destinationItemId, destinationAuthentication) {
|
|
14018
14103
|
return new Promise(resolve => {
|
|
@@ -14061,7 +14146,7 @@
|
|
|
14061
14146
|
* @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
|
|
14062
14147
|
* @param destinationAuthentication Credentials for the request to the storage
|
|
14063
14148
|
* @param filesPerZip Number of files to include per zip file; AGO limits zips to 50 files
|
|
14064
|
-
* @
|
|
14149
|
+
* @returns A promise which resolves to a list of the result of the copies
|
|
14065
14150
|
*/
|
|
14066
14151
|
function copyFilesAsResources(files, destinationItemId, destinationAuthentication, filesPerZip = 40) {
|
|
14067
14152
|
return new Promise(resolve => {
|
|
@@ -14119,7 +14204,7 @@
|
|
|
14119
14204
|
* @param sourceAuthentication Credentials for the request to the source
|
|
14120
14205
|
* @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
|
|
14121
14206
|
* @param destinationAuthentication Credentials for the request to the storage
|
|
14122
|
-
* @
|
|
14207
|
+
* @returns A promise which resolves to a list of the result of the copies
|
|
14123
14208
|
*/
|
|
14124
14209
|
function copyAssociatedFilesByType(fileInfos, sourceAuthentication, destinationItemId, destinationAuthentication) {
|
|
14125
14210
|
return new Promise(resolve => {
|
|
@@ -14195,7 +14280,8 @@
|
|
|
14195
14280
|
* @param zipInfos List of zip files containing files to store
|
|
14196
14281
|
* @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
|
|
14197
14282
|
* @param destinationAuthentication Credentials for the request to the storage
|
|
14198
|
-
* @
|
|
14283
|
+
* @returns A promise which resolves to a list of the result of the copies
|
|
14284
|
+
* @private
|
|
14199
14285
|
*/
|
|
14200
14286
|
function _copyAssociatedFileZips(zipInfos, destinationItemId, destinationAuthentication) {
|
|
14201
14287
|
return new Promise(resolve => {
|
|
@@ -14221,7 +14307,7 @@
|
|
|
14221
14307
|
* @param zipInfos List of zip files containing files to store
|
|
14222
14308
|
* @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
|
|
14223
14309
|
* @param destinationAuthentication Credentials for the request to the storage
|
|
14224
|
-
* @
|
|
14310
|
+
* @returns A promise which resolves to a list of the result of the copies
|
|
14225
14311
|
*/
|
|
14226
14312
|
function _sendZipsSeriallyToItem(zipInfos, destinationItemId, destinationAuthentication) {
|
|
14227
14313
|
return new Promise(resolve => {
|
|
@@ -14306,7 +14392,7 @@
|
|
|
14306
14392
|
* @param destinationItemId Id of item to receive copy of resource/metadata
|
|
14307
14393
|
* @param destinationAuthentication Credentials for the request to the destination
|
|
14308
14394
|
* @param template Template for using its itemId and properties for fine-tuning the filename for Hub
|
|
14309
|
-
* @
|
|
14395
|
+
* @returns A promise which resolves to a boolean indicating if the copies were successful
|
|
14310
14396
|
*/
|
|
14311
14397
|
function copyFilesFromStorageItem(storageAuthentication, filePaths, destinationFolderId, destinationItemId, destinationAuthentication, template = {}) {
|
|
14312
14398
|
// TODO: This is only used in deployer, so move there
|
|
@@ -14359,7 +14445,7 @@
|
|
|
14359
14445
|
* @param files List of item files and paths for storing the files
|
|
14360
14446
|
* @param storageItemId Id of item to receive copy of resource/metadata
|
|
14361
14447
|
* @param storageAuthentication Credentials for the request to the storage
|
|
14362
|
-
* @
|
|
14448
|
+
* @returns A promise which resolves to a list of the filenames under which the resource/metadata are stored
|
|
14363
14449
|
*/
|
|
14364
14450
|
function copyFilesToStorageItem(files, storageItemId, storageAuthentication) {
|
|
14365
14451
|
return new Promise(resolve => {
|
|
@@ -14377,7 +14463,7 @@
|
|
|
14377
14463
|
* Generates a folder and filename for storing a copy of an item's metadata in a storage item.
|
|
14378
14464
|
*
|
|
14379
14465
|
* @param itemId Id of item
|
|
14380
|
-
* @
|
|
14466
|
+
* @returns Folder and filename for storage; folder is the itemID suffixed with "_info_metadata"
|
|
14381
14467
|
* @see convertStorageResourceToItemResource
|
|
14382
14468
|
*/
|
|
14383
14469
|
function generateMetadataStorageFilename(itemId) {
|
|
@@ -14396,7 +14482,7 @@
|
|
|
14396
14482
|
* @param resourceFilenames List of resource filenames for an item, e.g., ["file1", "myFolder/file2"]
|
|
14397
14483
|
* @param isGroup Boolean to indicate if the files are associated with a group or item
|
|
14398
14484
|
* @param storageVersion Version of the Solution template
|
|
14399
|
-
* @
|
|
14485
|
+
* @returns List of item files' URLs and folder/filenames for storing the files
|
|
14400
14486
|
*/
|
|
14401
14487
|
function generateSourceFilePaths(portalSharingUrl, itemId, thumbnailUrlPart, resourceFilenames, isGroup = false, storageVersion = 0) {
|
|
14402
14488
|
const filePaths = resourceFilenames.map(resourceFilename => {
|
|
@@ -14428,7 +14514,7 @@
|
|
|
14428
14514
|
* @param sourcePortalSharingUrl Server/sharing
|
|
14429
14515
|
* @param itemId Id of item
|
|
14430
14516
|
* @param isGroup Boolean to indicate if the files are associated with a group or item
|
|
14431
|
-
* @
|
|
14517
|
+
* @returns URL string
|
|
14432
14518
|
*/
|
|
14433
14519
|
function generateSourceMetadataUrl(sourcePortalSharingUrl, itemId, isGroup = false) {
|
|
14434
14520
|
return (checkUrlPathTermination(sourcePortalSharingUrl) +
|
|
@@ -14442,7 +14528,7 @@
|
|
|
14442
14528
|
* @param sourcePortalSharingUrl Server/sharing
|
|
14443
14529
|
* @param itemId Id of item
|
|
14444
14530
|
* @param sourceResourceFilename Either filename or folder/filename to resource
|
|
14445
|
-
* @
|
|
14531
|
+
* @returns URL string
|
|
14446
14532
|
*/
|
|
14447
14533
|
function generateSourceResourceUrl(sourcePortalSharingUrl, itemId, sourceResourceFilename) {
|
|
14448
14534
|
return (checkUrlPathTermination(sourcePortalSharingUrl) +
|
|
@@ -14458,7 +14544,7 @@
|
|
|
14458
14544
|
* @param itemId Id of item
|
|
14459
14545
|
* @param thumbnailUrlPart Partial path to the thumbnail held in an item's JSON
|
|
14460
14546
|
* @param isGroup Boolean to indicate if the files are associated with a group or item
|
|
14461
|
-
* @
|
|
14547
|
+
* @returns URL string
|
|
14462
14548
|
*/
|
|
14463
14549
|
function generateSourceThumbnailUrl(sourcePortalSharingUrl, itemId, thumbnailUrlPart, isGroup = false) {
|
|
14464
14550
|
return (checkUrlPathTermination(sourcePortalSharingUrl) +
|
|
@@ -14475,7 +14561,7 @@
|
|
|
14475
14561
|
* @param storageItemId Id of storage item
|
|
14476
14562
|
* @param resourceFilenames List of resource filenames for an item, e.g., ["file1", "myFolder/file2"]
|
|
14477
14563
|
* @param storageVersion Version of the Solution template
|
|
14478
|
-
* @
|
|
14564
|
+
* @returns List of item files' URLs and folder/filenames for storing the files
|
|
14479
14565
|
*/
|
|
14480
14566
|
function generateStorageFilePaths(portalSharingUrl, storageItemId, resourceFilenames = [], storageVersion = 0) {
|
|
14481
14567
|
return resourceFilenames.map(resourceFilename => {
|
|
@@ -14490,7 +14576,7 @@
|
|
|
14490
14576
|
*
|
|
14491
14577
|
* @param itemId Id of item
|
|
14492
14578
|
* @param thumbnailUrlPart Partial path to the thumbnail held in an item's JSON
|
|
14493
|
-
* @
|
|
14579
|
+
* @returns Folder and filename for storage; folder is the itemID suffixed with "_info_thumbnail";
|
|
14494
14580
|
* file is URI-encoded thumbnailUrlPart
|
|
14495
14581
|
* @see convertStorageResourceToItemResource
|
|
14496
14582
|
*/
|
|
@@ -14515,7 +14601,7 @@
|
|
|
14515
14601
|
*
|
|
14516
14602
|
* @param authentication Credentials for the request to the storage
|
|
14517
14603
|
* @param filePaths List of item files' URLs and folder/filenames for storing the files
|
|
14518
|
-
* @
|
|
14604
|
+
* @returns A promise which resolves to a boolean indicating if the copies were successful
|
|
14519
14605
|
*/
|
|
14520
14606
|
function getThumbnailFromStorageItem(authentication, filePaths) {
|
|
14521
14607
|
let thumbnailUrl;
|
|
@@ -14538,7 +14624,7 @@
|
|
|
14538
14624
|
* @param filename Name of the resource file to update
|
|
14539
14625
|
* @param content The new content to update the resource with
|
|
14540
14626
|
* @param authentication Credentials for the request to the storage
|
|
14541
|
-
* @
|
|
14627
|
+
* @returns A promise which resolves with a success true/false response
|
|
14542
14628
|
*/
|
|
14543
14629
|
function updateItemResourceText(itemId, filename, content, authentication) {
|
|
14544
14630
|
return portal.updateItemResource({
|
|
@@ -14616,7 +14702,7 @@
|
|
|
14616
14702
|
*
|
|
14617
14703
|
* @param resourceItemFilePaths Paths to resources in source
|
|
14618
14704
|
* @param authentication Credentials for the request to the source
|
|
14619
|
-
* @
|
|
14705
|
+
* @returns A promise which resolves with an array of resource files
|
|
14620
14706
|
*/
|
|
14621
14707
|
function getItemResourcesFilesFromPaths(resourceItemFilePaths, authentication) {
|
|
14622
14708
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
@@ -14662,7 +14748,7 @@
|
|
|
14662
14748
|
* @param solutionItemId item id for the solution
|
|
14663
14749
|
* @param authentication Credentials for the request to the storage
|
|
14664
14750
|
* @param storageVersion Version of the Solution template
|
|
14665
|
-
* @
|
|
14751
|
+
* @returns A promise which resolves with an array of paths to resources for the item
|
|
14666
14752
|
*/
|
|
14667
14753
|
function getItemResourcesPaths(itemTemplate, solutionItemId, authentication, storageVersion = 0) {
|
|
14668
14754
|
// get the resources for the item
|
|
@@ -14776,7 +14862,7 @@
|
|
|
14776
14862
|
* @param authentication Credentials for the requests
|
|
14777
14863
|
* @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
|
|
14778
14864
|
*
|
|
14779
|
-
* @
|
|
14865
|
+
* @returns a promise that will resolve with the velocity url or an empty string when the org does not support velocity
|
|
14780
14866
|
*
|
|
14781
14867
|
*/
|
|
14782
14868
|
function getVelocityUrlBase(authentication, templateDictionary) {
|
|
@@ -14815,7 +14901,7 @@
|
|
|
14815
14901
|
* @param type The item type
|
|
14816
14902
|
* @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
|
|
14817
14903
|
*
|
|
14818
|
-
* @
|
|
14904
|
+
* @returns an updated instance of the data object that was supplied.
|
|
14819
14905
|
*
|
|
14820
14906
|
*/
|
|
14821
14907
|
function updateVelocityReferences(data, type, templateDictionary) {
|
|
@@ -14837,8 +14923,8 @@
|
|
|
14837
14923
|
* @param data The data object of the item
|
|
14838
14924
|
* @param velocityUrl The velocity url from the current organization
|
|
14839
14925
|
*
|
|
14840
|
-
* @
|
|
14841
|
-
*
|
|
14926
|
+
* @returns an updated instance of the data object that was supplied.
|
|
14927
|
+
* @private
|
|
14842
14928
|
*/
|
|
14843
14929
|
function _replaceVelocityUrls(data, velocityUrl) {
|
|
14844
14930
|
let dataString = JSON.stringify(data);
|