From 683daf8e1877ad50c0b28e6a13d82beb651add07 Mon Sep 17 00:00:00 2001 From: Vlad Olaru Date: Tue, 19 Nov 2019 08:48:51 +0200 Subject: [PATCH] Version bump to 1.2.0 --- ...lass-pixelgrade_assistant-setup_wizard.php | 3 +- admin/js/support.js | 424 +++++++++--------- admin/js/support.min.js | 2 +- package.json | 2 +- pixelgrade-assistant.php | 4 +- readme.txt | 10 +- 6 files changed, 225 insertions(+), 220 deletions(-) diff --git a/admin/class-pixelgrade_assistant-setup_wizard.php b/admin/class-pixelgrade_assistant-setup_wizard.php index 917d406..051bd0f 100644 --- a/admin/class-pixelgrade_assistant-setup_wizard.php +++ b/admin/class-pixelgrade_assistant-setup_wizard.php @@ -110,8 +110,7 @@ public function redirect_to_correct_url() { * Setup Wizard Header. */ public function setup_wizard_header() { - global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow, - $update_title, $total_update_count, $parent_file; + global $hook_suffix, $current_screen; if ( empty( $current_screen ) ) { set_current_screen(); diff --git a/admin/js/support.js b/admin/js/support.js index 7cde82e..479b60a 100644 --- a/admin/js/support.js +++ b/admin/js/support.js @@ -49,19 +49,19 @@ var baseGet=require("./_baseGet");function get(e,t,r){var a=null==e?void 0:baseG },{"./_baseGet":535}],405:[function(require,module,exports){ "use strict";var $=require("../internals/export"),$indexOf=require("../internals/array-includes").indexOf,sloppyArrayMethod=require("../internals/sloppy-array-method"),nativeIndexOf=[].indexOf,NEGATIVE_ZERO=!!nativeIndexOf&&1/[1].indexOf(1,-0)<0,SLOPPY_METHOD=sloppyArrayMethod("indexOf");$({target:"Array",proto:!0,forced:NEGATIVE_ZERO||SLOPPY_METHOD},{indexOf:function(e){return NEGATIVE_ZERO?nativeIndexOf.apply(this,arguments)||0:$indexOf(this,e,arguments.length>1?arguments[1]:void 0)}}); -},{"../internals/array-includes":302,"../internals/export":321,"../internals/sloppy-array-method":383}],420:[function(require,module,exports){ -var $=require("../internals/export"),parseIntImplementation=require("../internals/parse-int");$({global:!0,forced:parseInt!=parseIntImplementation},{parseInt:parseIntImplementation}); - -},{"../internals/export":321,"../internals/parse-int":366}],419:[function(require,module,exports){ +},{"../internals/array-includes":302,"../internals/export":321,"../internals/sloppy-array-method":383}],419:[function(require,module,exports){ var redefine=require("../internals/redefine"),toString=require("../internals/object-to-string"),ObjectPrototype=Object.prototype;toString!==ObjectPrototype.toString&&redefine(ObjectPrototype,"toString",toString,{unsafe:!0}); -},{"../internals/object-to-string":364,"../internals/redefine":371}],425:[function(require,module,exports){ +},{"../internals/object-to-string":364,"../internals/redefine":371}],423:[function(require,module,exports){ +"use strict";var redefine=require("../internals/redefine"),anObject=require("../internals/an-object"),fails=require("../internals/fails"),flags=require("../internals/regexp-flags"),TO_STRING="toString",RegExpPrototype=RegExp.prototype,nativeToString=RegExpPrototype[TO_STRING],NOT_GENERIC=fails(function(){return"/a/b"!=nativeToString.call({source:"a",flags:"b"})}),INCORRECT_NAME=nativeToString.name!=TO_STRING;(NOT_GENERIC||INCORRECT_NAME)&&redefine(RegExp.prototype,TO_STRING,function(){var e=anObject(this),r=String(e.source),t=e.flags;return"/"+r+"/"+String(void 0===t&&e instanceof RegExp&&!("flags"in RegExpPrototype)?flags.call(e):t)},{unsafe:!0}); + +},{"../internals/an-object":300,"../internals/fails":322,"../internals/redefine":371,"../internals/regexp-flags":374}],425:[function(require,module,exports){ "use strict";var fixRegExpWellKnownSymbolLogic=require("../internals/fix-regexp-well-known-symbol-logic"),anObject=require("../internals/an-object"),requireObjectCoercible=require("../internals/require-object-coercible"),sameValue=require("../internals/same-value"),regExpExec=require("../internals/regexp-exec-abstract");fixRegExpWellKnownSymbolLogic("search",1,function(e,r,n){return[function(r){var n=requireObjectCoercible(this),i=null==r?void 0:r[e];return void 0!==i?i.call(r,n):new RegExp(r)[e](String(n))},function(e){var i=n(r,e,this);if(i.done)return i.value;var l=anObject(e),t=String(this),a=l.lastIndex;sameValue(a,0)||(l.lastIndex=0);var c=regExpExec(l,t);return sameValue(l.lastIndex,a)||(l.lastIndex=a),null===c?-1:c.index}]}); -},{"../internals/an-object":300,"../internals/fix-regexp-well-known-symbol-logic":323,"../internals/regexp-exec-abstract":372,"../internals/require-object-coercible":375,"../internals/same-value":376}],423:[function(require,module,exports){ -"use strict";var redefine=require("../internals/redefine"),anObject=require("../internals/an-object"),fails=require("../internals/fails"),flags=require("../internals/regexp-flags"),TO_STRING="toString",RegExpPrototype=RegExp.prototype,nativeToString=RegExpPrototype[TO_STRING],NOT_GENERIC=fails(function(){return"/a/b"!=nativeToString.call({source:"a",flags:"b"})}),INCORRECT_NAME=nativeToString.name!=TO_STRING;(NOT_GENERIC||INCORRECT_NAME)&&redefine(RegExp.prototype,TO_STRING,function(){var e=anObject(this),r=String(e.source),t=e.flags;return"/"+r+"/"+String(void 0===t&&e instanceof RegExp&&!("flags"in RegExpPrototype)?flags.call(e):t)},{unsafe:!0}); +},{"../internals/an-object":300,"../internals/fix-regexp-well-known-symbol-logic":323,"../internals/regexp-exec-abstract":372,"../internals/require-object-coercible":375,"../internals/same-value":376}],420:[function(require,module,exports){ +var $=require("../internals/export"),parseIntImplementation=require("../internals/parse-int");$({global:!0,forced:parseInt!=parseIntImplementation},{parseInt:parseIntImplementation}); -},{"../internals/an-object":300,"../internals/fails":322,"../internals/redefine":371,"../internals/regexp-flags":374}],58:[function(require,module,exports){ +},{"../internals/export":321,"../internals/parse-int":366}],58:[function(require,module,exports){ "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return _CircularProgress.default}});var _CircularProgress=_interopRequireDefault(require("./CircularProgress")); },{"./CircularProgress":57,"@babel/runtime/helpers/interopRequireDefault":41}],7:[function(require,module,exports){ @@ -127,28 +127,28 @@ var $=require("../internals/export"),toObject=require("../internals/to-object"), },{"./Checkbox":55,"@babel/runtime/helpers/interopRequireDefault":41}],751:[function(require,module,exports){ "use strict";var stringify=require("./stringify"),parse=require("./parse"),formats=require("./formats");module.exports={formats:formats,parse:parse,stringify:stringify}; -},{"./formats":750,"./parse":752,"./stringify":753}],686:[function(require,module,exports){ -var baseIndexOf=require("./_baseIndexOf"),isArrayLike=require("./isArrayLike"),isString=require("./isString"),toInteger=require("./toInteger"),values=require("./values"),nativeMax=Math.max;function includes(e,r,i,n){e=isArrayLike(e)?e:values(e),i=i&&!n?toInteger(i):0;var a=e.length;return i<0&&(i=nativeMax(a+i,0)),isString(e)?i<=a&&e.indexOf(r,i)>-1:!!a&&baseIndexOf(e,r,i)>-1}module.exports=includes; - -},{"./_baseIndexOf":540,"./isArrayLike":690,"./isString":703,"./toInteger":724,"./values":729}],682:[function(require,module,exports){ +},{"./formats":750,"./parse":752,"./stringify":753}],682:[function(require,module,exports){ var baseHas=require("./_baseHas"),hasPath=require("./_hasPath");function has(a,s){return null!=a&&hasPath(a,s,baseHas)}module.exports=has; -},{"./_baseHas":538,"./_hasPath":609}],403:[function(require,module,exports){ -"use strict";var $=require("../internals/export"),$filter=require("../internals/array-iteration").filter,arrayMethodHasSpeciesSupport=require("../internals/array-method-has-species-support");$({target:"Array",proto:!0,forced:!arrayMethodHasSpeciesSupport("filter")},{filter:function(r){return $filter(this,r,arguments.length>1?arguments[1]:void 0)}}); +},{"./_baseHas":538,"./_hasPath":609}],686:[function(require,module,exports){ +var baseIndexOf=require("./_baseIndexOf"),isArrayLike=require("./isArrayLike"),isString=require("./isString"),toInteger=require("./toInteger"),values=require("./values"),nativeMax=Math.max;function includes(e,r,i,n){e=isArrayLike(e)?e:values(e),i=i&&!n?toInteger(i):0;var a=e.length;return i<0&&(i=nativeMax(a+i,0)),isString(e)?i<=a&&e.indexOf(r,i)>-1:!!a&&baseIndexOf(e,r,i)>-1}module.exports=includes; -},{"../internals/array-iteration":303,"../internals/array-method-has-species-support":304,"../internals/export":321}],414:[function(require,module,exports){ -var $=require("../internals/export"),fails=require("../internals/fails"),toIndexedObject=require("../internals/to-indexed-object"),nativeGetOwnPropertyDescriptor=require("../internals/object-get-own-property-descriptor").f,DESCRIPTORS=require("../internals/descriptors"),FAILS_ON_PRIMITIVES=fails(function(){nativeGetOwnPropertyDescriptor(1)}),FORCED=!DESCRIPTORS||FAILS_ON_PRIMITIVES;$({target:"Object",stat:!0,forced:FORCED,sham:!DESCRIPTORS},{getOwnPropertyDescriptor:function(e,r){return nativeGetOwnPropertyDescriptor(toIndexedObject(e),r)}}); +},{"./_baseIndexOf":540,"./isArrayLike":690,"./isString":703,"./toInteger":724,"./values":729}],403:[function(require,module,exports){ +"use strict";var $=require("../internals/export"),$filter=require("../internals/array-iteration").filter,arrayMethodHasSpeciesSupport=require("../internals/array-method-has-species-support");$({target:"Array",proto:!0,forced:!arrayMethodHasSpeciesSupport("filter")},{filter:function(r){return $filter(this,r,arguments.length>1?arguments[1]:void 0)}}); -},{"../internals/descriptors":317,"../internals/export":321,"../internals/fails":322,"../internals/object-get-own-property-descriptor":355,"../internals/to-indexed-object":391}],415:[function(require,module,exports){ +},{"../internals/array-iteration":303,"../internals/array-method-has-species-support":304,"../internals/export":321}],415:[function(require,module,exports){ var $=require("../internals/export"),DESCRIPTORS=require("../internals/descriptors"),ownKeys=require("../internals/own-keys"),toIndexedObject=require("../internals/to-indexed-object"),getOwnPropertyDescriptorModule=require("../internals/object-get-own-property-descriptor"),createProperty=require("../internals/create-property");$({target:"Object",stat:!0,sham:!DESCRIPTORS},{getOwnPropertyDescriptors:function(e){for(var r,t,o=toIndexedObject(e),n=getOwnPropertyDescriptorModule.f,i=ownKeys(o),s={},p=0;i.length>p;)void 0!==(t=n(o,r=i[p++]))&&createProperty(s,r,t);return s}}); -},{"../internals/create-property":315,"../internals/descriptors":317,"../internals/export":321,"../internals/object-get-own-property-descriptor":355,"../internals/own-keys":365,"../internals/to-indexed-object":391}],430:[function(require,module,exports){ -var global=require("../internals/global"),DOMIterables=require("../internals/dom-iterables"),forEach=require("../internals/array-for-each"),createNonEnumerableProperty=require("../internals/create-non-enumerable-property");for(var COLLECTION_NAME in DOMIterables){var Collection=global[COLLECTION_NAME],CollectionPrototype=Collection&&Collection.prototype;if(CollectionPrototype&&CollectionPrototype.forEach!==forEach)try{createNonEnumerableProperty(CollectionPrototype,"forEach",forEach)}catch(e){CollectionPrototype.forEach=forEach}} +},{"../internals/create-property":315,"../internals/descriptors":317,"../internals/export":321,"../internals/object-get-own-property-descriptor":355,"../internals/own-keys":365,"../internals/to-indexed-object":391}],414:[function(require,module,exports){ +var $=require("../internals/export"),fails=require("../internals/fails"),toIndexedObject=require("../internals/to-indexed-object"),nativeGetOwnPropertyDescriptor=require("../internals/object-get-own-property-descriptor").f,DESCRIPTORS=require("../internals/descriptors"),FAILS_ON_PRIMITIVES=fails(function(){nativeGetOwnPropertyDescriptor(1)}),FORCED=!DESCRIPTORS||FAILS_ON_PRIMITIVES;$({target:"Object",stat:!0,forced:FORCED,sham:!DESCRIPTORS},{getOwnPropertyDescriptor:function(e,r){return nativeGetOwnPropertyDescriptor(toIndexedObject(e),r)}}); -},{"../internals/array-for-each":301,"../internals/create-non-enumerable-property":313,"../internals/dom-iterables":319,"../internals/global":328}],422:[function(require,module,exports){ +},{"../internals/descriptors":317,"../internals/export":321,"../internals/fails":322,"../internals/object-get-own-property-descriptor":355,"../internals/to-indexed-object":391}],422:[function(require,module,exports){ var DESCRIPTORS=require("../internals/descriptors"),global=require("../internals/global"),isForced=require("../internals/is-forced"),inheritIfRequired=require("../internals/inherit-if-required"),defineProperty=require("../internals/object-define-property").f,getOwnPropertyNames=require("../internals/object-get-own-property-names").f,isRegExp=require("../internals/is-regexp"),getFlags=require("../internals/regexp-flags"),redefine=require("../internals/redefine"),fails=require("../internals/fails"),setSpecies=require("../internals/set-species"),wellKnownSymbol=require("../internals/well-known-symbol"),MATCH=wellKnownSymbol("match"),NativeRegExp=global.RegExp,RegExpPrototype=NativeRegExp.prototype,re1=/a/g,re2=/a/g,CORRECT_NEW=new NativeRegExp(re1)!==re1,FORCED=DESCRIPTORS&&isForced("RegExp",!CORRECT_NEW||fails(function(){return re2[MATCH]=!1,NativeRegExp(re1)!=re1||NativeRegExp(re2)==re2||"/a/i"!=NativeRegExp(re1,"i")}));if(FORCED){for(var RegExpWrapper=function(e,r){var i=this instanceof RegExpWrapper,p=isRegExp(e),t=void 0===r;return!i&&p&&e.constructor===RegExpWrapper&&t?e:inheritIfRequired(CORRECT_NEW?new NativeRegExp(p&&!t?e.source:e,r):NativeRegExp((p=e instanceof RegExpWrapper)?e.source:e,p&&t?getFlags.call(e):r),i?this:RegExpPrototype,RegExpWrapper)},proxy=function(e){e in RegExpWrapper||defineProperty(RegExpWrapper,e,{configurable:!0,get:function(){return NativeRegExp[e]},set:function(r){NativeRegExp[e]=r}})},keys=getOwnPropertyNames(NativeRegExp),index=0;keys.length>index;)proxy(keys[index++]);RegExpPrototype.constructor=RegExpWrapper,RegExpWrapper.prototype=RegExpPrototype,redefine(global,"RegExp",RegExpWrapper)}setSpecies("RegExp"); -},{"../internals/descriptors":317,"../internals/fails":322,"../internals/global":328,"../internals/inherit-if-required":335,"../internals/is-forced":339,"../internals/is-regexp":343,"../internals/object-define-property":354,"../internals/object-get-own-property-names":357,"../internals/redefine":371,"../internals/regexp-flags":374,"../internals/set-species":378,"../internals/well-known-symbol":399}],8:[function(require,module,exports){ +},{"../internals/descriptors":317,"../internals/fails":322,"../internals/global":328,"../internals/inherit-if-required":335,"../internals/is-forced":339,"../internals/is-regexp":343,"../internals/object-define-property":354,"../internals/object-get-own-property-names":357,"../internals/redefine":371,"../internals/regexp-flags":374,"../internals/set-species":378,"../internals/well-known-symbol":399}],430:[function(require,module,exports){ +var global=require("../internals/global"),DOMIterables=require("../internals/dom-iterables"),forEach=require("../internals/array-for-each"),createNonEnumerableProperty=require("../internals/create-non-enumerable-property");for(var COLLECTION_NAME in DOMIterables){var Collection=global[COLLECTION_NAME],CollectionPrototype=Collection&&Collection.prototype;if(CollectionPrototype&&CollectionPrototype.forEach!==forEach)try{createNonEnumerableProperty(CollectionPrototype,"forEach",forEach)}catch(e){CollectionPrototype.forEach=forEach}} + +},{"../internals/array-for-each":301,"../internals/create-non-enumerable-property":313,"../internals/dom-iterables":319,"../internals/global":328}],8:[function(require,module,exports){ "use strict";require("core-js/modules/es.symbol"),require("core-js/modules/es.symbol.description"),require("core-js/modules/es.array.map"),require("core-js/modules/es.function.name"),require("core-js/modules/es.object.get-prototype-of"),require("core-js/modules/es.object.keys"),require("core-js/modules/es.object.set-prototype-of"),require("core-js/modules/es.object.to-string"),require("core-js/modules/es.promise"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _map2=_interopRequireDefault(require("lodash/map")),_sortBy2=_interopRequireDefault(require("lodash/sortBy")),_isEmpty2=_interopRequireDefault(require("lodash/isEmpty")),_get2=_interopRequireDefault(require("lodash/get")),_size2=_interopRequireDefault(require("lodash/size")),_extend2=_interopRequireDefault(require("lodash/extend")),_isUndefined2=_interopRequireDefault(require("lodash/isUndefined")),_react=_interopRequireDefault(require("react")),_reactRedux=require("react-redux"),_propTypes=_interopRequireDefault(require("prop-types"));require("whatwg-fetch");var _helpers=_interopRequireDefault(require("../helpers")),_ProgressBar=_interopRequireDefault(require("./ProgressBar/ProgressBar"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?_assertThisInitialized(e):t}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _defineProperties(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:null,n=this;if((0,_isEmpty2.default)(e))console.log("No data in posts");else{if(n.sceKeyExists("posts"))return console.log("Posts exists"),void _helpers.default.pushNotification({notice_id:"sce-posts-exists",title:_helpers.default.decodeHtml((0,_get2.default)(pixassist,"themeConfig.starterContent.l10n.postsAlreadyExistTitle","")),content:_helpers.default.decodeHtml((0,_get2.default)(pixassist,"themeConfig.starterContent.l10n.postAlreadyExistsContent","")),type:"info"});e=(0,_sortBy2.default)(e,"priority"),(0,_map2.default)(e,function(e,i){var s=e.name,o={post_type:e.name,ids:e.ids};null!==t&&t!==s||n.queue.add(function(){_helpers.default.$ajax(pixassist.wpRest.endpoint.import.url,pixassist.wpRest.endpoint.import.method,{type:"post_type",url:n.state.value,args:o},function(e){console.log(e),n.queue.next()},function(e){console.log(e),n.queue.next()},function(e){n.setState({description:_helpers.default.decodeHtml((0,_get2.default)(pixassist,"themeConfig.starterContent.l10n.postImporting",""))+s+"..."}),e.setRequestHeader("X-WP-Nonce",pixassist.wpRest.nonce)})})})}}},{key:"importTaxonomies",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this;if((0,_isEmpty2.default)(e))console.log("No data in taxonomies");else{if(n.sceKeyExists("terms"))return _helpers.default.pushNotification({notice_id:"sce-terms-exists",title:_helpers.default.decodeHtml((0,_get2.default)(pixassist,"themeConfig.starterContent.l10n.taxonomiesAlreadyExistTitle","")),content:_helpers.default.decodeHtml((0,_get2.default)(pixassist,"themeConfig.starterContent.l10n.taxonomiesAlreadyExistContent","")),type:"info"}),void console.log("Terms exists");e=(0,_sortBy2.default)(e,"priority"),(0,_map2.default)(e,function(e,i){var s=e.name,o={tax:s,ids:e.ids};null!==t&&t!==s||n.queue.add(function(){_helpers.default.$ajax(pixassist.wpRest.endpoint.import.url,pixassist.wpRest.endpoint.import.method,{type:"taxonomy",url:n.state.value,args:o},function(e){console.log(e),n.queue.next()},function(e){console.log(e),n.queue.next()},function(e){e.setRequestHeader("X-WP-Nonce",pixassist.wpRest.nonce),n.setState({description:_helpers.default.decodeHtml((0,_get2.default)(pixassist,"themeConfig.starterContent.l10n.taxonomyImporting",""))+s+"..."})})})})}}},{key:"importWidgets",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this;if(t.sceKeyExists("widgets"))return console.log("Widgets exists"),void _helpers.default.pushNotification({notice_id:"sce-widgets-exists",title:_helpers.default.decodeHtml((0,_get2.default)(pixassist,"themeConfig.starterContent.l10n.widgetsAlreadyExistTitle","")),content:_helpers.default.decodeHtml((0,_get2.default)(pixassist,"themeConfig.starterContent.l10n.widgetsAlreadyExistContent","")),type:"info"});t.queue.add(function(){_helpers.default.$ajax(pixassist.wpRest.endpoint.import.url,pixassist.wpRest.endpoint.import.method,{type:"parsed_widgets",url:t.state.value,args:{data:"ok"}},function(e){console.log(e),t.queue.next()},function(e){console.log(e),t.queue.next()},function(n){e&&t.setState({description:_helpers.default.decodeHtml((0,_get2.default)(pixassist,"themeConfig.starterContent.l10n.widgetsImporting",""))}),n.setRequestHeader("X-WP-Nonce",pixassist.wpRest.nonce)})})}},{key:"importPreSettings",value:function(e){var t=this;(0,_isEmpty2.default)(e)?console.log("No data in pre_settings"):t.sceKeyExists("pre_settings")?console.log("Pre options exists"):t.queue.add(function(){_helpers.default.$ajax(pixassist.wpRest.endpoint.import.url,pixassist.wpRest.endpoint.import.method,{type:"pre_settings",url:t.state.value,args:{data:e}},function(e){console.log(e),t.queue.next()},function(e){console.log(e),t.queue.next()},function(e){t.setState({description:_helpers.default.decodeHtml((0,_get2.default)(pixassist,"themeConfig.starterContent.l10n.importingPreSettings",""))}),e.setRequestHeader("X-WP-Nonce",pixassist.wpRest.nonce)})})}},{key:"importPostSettings",value:function(e){var t=this;(0,_isEmpty2.default)(e)?console.log("No data in post_settings"):(t.sceKeyExists("post_settings")&&console.log("post_settings exists"),t.queue.add(function(){_helpers.default.$ajax(pixassist.adminUrl,"GET",{},function(e){setTimeout(function(){t.importWidgets(!1)},1e3),t.queue.next()},null,function(e){t.setState({description:_helpers.default.decodeHtml((0,_get2.default)(pixassist,"themeConfig.starterContent.l10n.importingPostSettings",""))}),e.setRequestHeader("X-WP-Nonce",pixassist.wpRest.nonce)})}),t.queue.add(function(){_helpers.default.$ajax(pixassist.wpRest.endpoint.import.url,pixassist.wpRest.endpoint.import.method,{type:"post_settings",url:t.state.value,args:{data:e}},function(e){console.log(e),t.queue.next(),t.props.onReady(),t.setState({importing:!1,demoClass:"box--plugin-validated",description:_helpers.default.decodeHtml((0,_get2.default)(pixassist,"themeConfig.starterContent.l10n.importSuccessful",""))}),t.props.onStarterContentFinished()},function(e){console.log(e),t.setState({importing:!1,demoClass:"box--warning",description:"error"}),t.queue.next()})}))}},{key:"hasPlaceholders",value:function(){return this.sceKeyExists("media")&&!(0,_isEmpty2.default)(pixassist.themeMod.starterContent.media.placeholders)}},{key:"sceKeyExists",value:function(e){return!(0,_isUndefined2.default)(pixassist.themeMod.starterContent)&&!(0,_isEmpty2.default)(pixassist.themeMod.starterContent[e])}},{key:"checkStatus",value:function(e){if(e.status>=200&&e.status<300)return e;console.log(e.text());var t=new Error(e.statusText);throw t.response=e,t}}]),t}(),StarterContent=(0,_reactRedux.connect)(mapStateToProps,mapDispatchToProps)(StarterContentContainer),_default=StarterContent;exports.default=_default; },{"../helpers":27,"./ProgressBar/ProgressBar":1,"core-js/modules/es.array.map":407,"core-js/modules/es.function.name":411,"core-js/modules/es.object.get-prototype-of":416,"core-js/modules/es.object.keys":417,"core-js/modules/es.object.set-prototype-of":418,"core-js/modules/es.object.to-string":419,"core-js/modules/es.promise":421,"core-js/modules/es.symbol":429,"core-js/modules/es.symbol.description":428,"lodash/extend":675,"lodash/get":681,"lodash/isEmpty":693,"lodash/isUndefined":706,"lodash/map":711,"lodash/size":718,"lodash/sortBy":719,"prop-types":747,"react":801,"react-redux":781,"whatwg-fetch":852}],852:[function(require,module,exports){ @@ -217,13 +217,13 @@ var baseFlatten=require("./_baseFlatten"),baseOrderBy=require("./_baseOrderBy"), },{"../../helpers":27,"./breadcrumbs":9,"./feedback":16,"core-js/modules/es.array.map":407,"core-js/modules/es.object.get-prototype-of":416,"core-js/modules/es.object.keys":417,"core-js/modules/es.object.set-prototype-of":418,"core-js/modules/es.parse-int":420,"lodash/get":681,"lodash/isUndefined":706,"lodash/size":718,"prop-types":747,"react":801,"react-redux":781}],276:[function(require,module,exports){ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _merge2=require("lodash/merge"),_merge3=_interopRequireDefault(_merge2),_set2=require("lodash/set"),_set3=_interopRequireDefault(_set2),_isEmpty2=require("lodash/isEmpty"),_isEmpty3=_interopRequireDefault(_isEmpty2),_cloneDeep2=require("lodash/cloneDeep"),_cloneDeep3=_interopRequireDefault(_cloneDeep2),_isString2=require("lodash/isString"),_isString3=_interopRequireDefault(_isString2),_each2=require("lodash/each"),_each3=_interopRequireDefault(_each2),_isPlainObject2=require("lodash/isPlainObject"),_isPlainObject3=_interopRequireDefault(_isPlainObject2),_isArray2=require("lodash/isArray"),_isArray3=_interopRequireDefault(_isArray2);exports.default=bodybuilder;var _queryBuilder=require("./query-builder"),_queryBuilder2=_interopRequireDefault(_queryBuilder),_filterBuilder=require("./filter-builder"),_filterBuilder2=_interopRequireDefault(_filterBuilder),_aggregationBuilder=require("./aggregation-builder"),_aggregationBuilder2=_interopRequireDefault(_aggregationBuilder),_utils=require("./utils");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function bodybuilder(){var e={};return Object.assign({sort:function(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc";return e.sort=e.sort||[],(0,_isArray3.default)(r)?((0,_isPlainObject3.default)(e.sort)&&(e.sort=[e.sort]),(0,_isArray3.default)(e.sort)&&(0,_each3.default)(r,function(r){if((0,_isString3.default)(r))return(0,_utils.sortMerge)(e.sort,r,t);(0,_each3.default)(r,function(r,t){(0,_utils.sortMerge)(e.sort,t,r)})})):(0,_utils.sortMerge)(e.sort,r,t),this},from:function(r){return e.from=r,this},size:function(r){return e.size=r,this},rawOption:function(r,t){return e[r]=t,this},build:function(r){var t=this.getQuery(),i=this.getFilter(),u=this.getAggregations();return"v1"===r?_buildV1(e,t,i,u):_build(e,t,i,u)}},(0,_queryBuilder2.default)(),(0,_filterBuilder2.default)(),(0,_aggregationBuilder2.default)())}function _buildV1(e,r,t,i){var u=(0,_cloneDeep3.default)(e);return(0,_isEmpty3.default)(t)?(0,_isEmpty3.default)(r)||(0,_set3.default)(u,"query",r):((0,_set3.default)(u,"query.filtered.filter",t),(0,_isEmpty3.default)(r)||(0,_set3.default)(u,"query.filtered.query",r)),(0,_isEmpty3.default)(i)||(0,_set3.default)(u,"aggregations",i),u}function _build(e,r,t,i){var u=(0,_cloneDeep3.default)(e);if((0,_isEmpty3.default)(t))(0,_isEmpty3.default)(r)||(0,_set3.default)(u,"query",r);else{var l={},a={};(0,_set3.default)(l,"query.bool.filter",t),(0,_isEmpty3.default)(r.bool)?(0,_isEmpty3.default)(r)||(0,_set3.default)(a,"query.bool.must",r):(0,_set3.default)(a,"query.bool",r.bool),(0,_merge3.default)(u,l,a)}return(0,_isEmpty3.default)(i)||(0,_set3.default)(u,"aggs",i),u}module.exports=bodybuilder; -},{"./aggregation-builder":274,"./filter-builder":275,"./query-builder":277,"./utils":278,"lodash/cloneDeep":670,"lodash/each":673,"lodash/isArray":689,"lodash/isEmpty":693,"lodash/isPlainObject":701,"lodash/isString":703,"lodash/merge":713,"lodash/set":717}],98:[function(require,module,exports){ -"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return _Typography.default}});var _Typography=_interopRequireDefault(require("./Typography")); - -},{"./Typography":97,"@babel/runtime/helpers/interopRequireDefault":41}],79:[function(require,module,exports){ +},{"./aggregation-builder":274,"./filter-builder":275,"./query-builder":277,"./utils":278,"lodash/cloneDeep":670,"lodash/each":673,"lodash/isArray":689,"lodash/isEmpty":693,"lodash/isPlainObject":701,"lodash/isString":703,"lodash/merge":713,"lodash/set":717}],79:[function(require,module,exports){ "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return _Tab.default}});var _Tab=_interopRequireDefault(require("./Tab")); -},{"./Tab":78,"@babel/runtime/helpers/interopRequireDefault":41}],23:[function(require,module,exports){ +},{"./Tab":78,"@babel/runtime/helpers/interopRequireDefault":41}],98:[function(require,module,exports){ +"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return _Typography.default}});var _Typography=_interopRequireDefault(require("./Typography")); + +},{"./Typography":97,"@babel/runtime/helpers/interopRequireDefault":41}],23:[function(require,module,exports){ "use strict";require("core-js/modules/es.array.map"),require("core-js/modules/es.object.get-prototype-of"),require("core-js/modules/es.object.keys"),require("core-js/modules/es.object.set-prototype-of"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _get2=_interopRequireDefault(require("lodash/get")),_isUndefined2=_interopRequireDefault(require("lodash/isUndefined")),_react=_interopRequireDefault(require("react")),_ticket=_interopRequireDefault(require("./ticket")),_reactRedux=require("react-redux"),_propTypes=_interopRequireDefault(require("prop-types")),_helpers=_interopRequireDefault(require("../../../helpers"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r>>2]>>>24-o%4*8&255)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,f=0;f<4&&o+.75*f>>6*(3-f)&63));var c=a.charAt(64);if(c)for(;n.length%4;)n.push(c);return n.join("")},parse:function(r){var e=r.length,a=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var o=0;o>>6-i%4*2;n[o>>>2]|=(f|c)<<24-o%4*8,o++}return t.create(n,o)}(r,e,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),r.enc.Base64}); },{"./core":432}],690:[function(require,module,exports){ @@ -319,10 +319,10 @@ var isFunction=require("./isFunction"),isLength=require("./isLength");function i },{"./core":432,"./hmac":435,"./sha1":436}],426:[function(require,module,exports){ "use strict";var fixRegExpWellKnownSymbolLogic=require("../internals/fix-regexp-well-known-symbol-logic"),isRegExp=require("../internals/is-regexp"),anObject=require("../internals/an-object"),requireObjectCoercible=require("../internals/require-object-coercible"),speciesConstructor=require("../internals/species-constructor"),advanceStringIndex=require("../internals/advance-string-index"),toLength=require("../internals/to-length"),callRegExpExec=require("../internals/regexp-exec-abstract"),regexpExec=require("../internals/regexp-exec"),fails=require("../internals/fails"),arrayPush=[].push,min=Math.min,MAX_UINT32=4294967295,SUPPORTS_Y=!fails(function(){return!RegExp(MAX_UINT32,"y")});fixRegExpWellKnownSymbolLogic("split",2,function(e,n,i){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,i){var r=String(requireObjectCoercible(this)),t=void 0===i?MAX_UINT32:i>>>0;if(0===t)return[];if(void 0===e)return[r];if(!isRegExp(e))return n.call(r,e,t);for(var l,s,c,u=[],a=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),g=0,o=new RegExp(e.source,a+"g");(l=regexpExec.call(o,r))&&!((s=o.lastIndex)>g&&(u.push(r.slice(g,l.index)),l.length>1&&l.index=t));)o.lastIndex===l.index&&o.lastIndex++;return g===r.length?!c&&o.test("")||u.push(""):u.push(r.slice(g)),u.length>t?u.slice(0,t):u}:"0".split(void 0,0).length?function(e,i){return void 0===e&&0===i?[]:n.call(this,e,i)}:n,[function(n,i){var t=requireObjectCoercible(this),l=null==n?void 0:n[e];return void 0!==l?l.call(n,t,i):r.call(String(t),n,i)},function(e,t){var l=i(r,e,this,t,r!==n);if(l.done)return l.value;var s=anObject(e),c=String(this),u=speciesConstructor(s,RegExp),a=s.unicode,g=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(SUPPORTS_Y?"y":"g"),o=new u(SUPPORTS_Y?s:"^(?:"+s.source+")",g),x=void 0===t?MAX_UINT32:t>>>0;if(0===x)return[];if(0===c.length)return null===callRegExpExec(o,c)?[c]:[];for(var h=0,p=0,d=[];p=c?dark.text.primary:light.text.primary;if("production"!==process.env.NODE_ENV){var t=(0,_colorManipulator.getContrastRatio)(e,r);t<3&&console.error(["Material-UI: the contrast ratio of ".concat(t,":1 for ").concat(r," on ").concat(e),"falls below the WACG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join("\n"))}return r}function f(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=(0,_extends2.default)({},e)).main&&e[r]&&(e.main=e[r]),"production"!==process.env.NODE_ENV&&!e.main)throw new Error(["Material-UI: the color provided to augmentColor(color) is invalid.","The color object needs to have a `main` property or a `".concat(r,"` property.")].join("\n"));return addLightOrDark(e,"light",t,p),addLightOrDark(e,"dark",a,p),e.contrastText||(e.contrastText=h(e.main)),e}var _={dark:dark,light:light};return"production"!==process.env.NODE_ENV&&(_[l]||console.error("Material-UI: the palette type `".concat(l,"` is not supported."))),(0,_utils.deepmerge)((0,_extends2.default)({common:_common.default,type:l,primary:f(t),secondary:f(o,"A400","A200","A700"),error:f(n),grey:_grey.default,contrastThreshold:c,getContrastText:h,augmentColor:f,tonalOffset:p},_[l]),g)}exports.dark=dark; }).call(this,require('_process')) -},{"@babel/runtime/helpers/extends":39,"@babel/runtime/helpers/interopRequireDefault":41,"@babel/runtime/helpers/objectWithoutProperties":45,"@material-ui/utils":185,"_process":745}],116:[function(require,module,exports){ +},{"../colors/common":99,"../colors/grey":100,"../colors/indigo":101,"../colors/pink":102,"../colors/red":103,"./colorManipulator":112,"@babel/runtime/helpers/extends":39,"@babel/runtime/helpers/interopRequireDefault":41,"@babel/runtime/helpers/objectWithoutProperties":45,"@material-ui/utils":185,"_process":745}],119:[function(require,module,exports){ (function (process){ -"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=createPalette,exports.dark=exports.light=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends")),_objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties")),_utils=require("@material-ui/utils"),_common=_interopRequireDefault(require("../colors/common")),_grey=_interopRequireDefault(require("../colors/grey")),_indigo=_interopRequireDefault(require("../colors/indigo")),_pink=_interopRequireDefault(require("../colors/pink")),_red=_interopRequireDefault(require("../colors/red")),_colorManipulator=require("./colorManipulator"),light={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:_common.default.white,default:_grey.default[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.08)",hoverOpacity:.08,selected:"rgba(0, 0, 0, 0.14)",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)"}};exports.light=light;var dark={text:{primary:_common.default.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:_grey.default[800],default:"#303030"},action:{active:_common.default.white,hover:"rgba(255, 255, 255, 0.1)",hoverOpacity:.1,selected:"rgba(255, 255, 255, 0.2)",disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)"}};function addLightOrDark(e,r,t,a){e[r]||(e.hasOwnProperty(t)?e[r]=e[t]:"light"===r?e.light=(0,_colorManipulator.lighten)(e.main,a):"dark"===r&&(e.dark=(0,_colorManipulator.darken)(e.main,1.5*a)))}function createPalette(e){var r=e.primary,t=void 0===r?{light:_indigo.default[300],main:_indigo.default[500],dark:_indigo.default[700]}:r,a=e.secondary,o=void 0===a?{light:_pink.default.A200,main:_pink.default.A400,dark:_pink.default.A700}:a,i=e.error,n=void 0===i?{light:_red.default[300],main:_red.default[500],dark:_red.default[700]}:i,d=e.type,l=void 0===d?"light":d,u=e.contrastThreshold,c=void 0===u?3:u,s=e.tonalOffset,p=void 0===s?.2:s,g=(0,_objectWithoutProperties2.default)(e,["primary","secondary","error","type","contrastThreshold","tonalOffset"]);function h(e){"production"!==process.env.NODE_ENV&&(e||console.error("Material-UI: missing background argument in getContrastText(".concat(e,").")));var r=(0,_colorManipulator.getContrastRatio)(e,dark.text.primary)>=c?dark.text.primary:light.text.primary;if("production"!==process.env.NODE_ENV){var t=(0,_colorManipulator.getContrastRatio)(e,r);t<3&&console.error(["Material-UI: the contrast ratio of ".concat(t,":1 for ").concat(r," on ").concat(e),"falls below the WACG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join("\n"))}return r}function f(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=(0,_extends2.default)({},e)).main&&e[r]&&(e.main=e[r]),"production"!==process.env.NODE_ENV&&!e.main)throw new Error(["Material-UI: the color provided to augmentColor(color) is invalid.","The color object needs to have a `main` property or a `".concat(r,"` property.")].join("\n"));return addLightOrDark(e,"light",t,p),addLightOrDark(e,"dark",a,p),e.contrastText||(e.contrastText=h(e.main)),e}var _={dark:dark,light:light};return"production"!==process.env.NODE_ENV&&(_[l]||console.error("Material-UI: the palette type `".concat(l,"` is not supported."))),(0,_utils.deepmerge)((0,_extends2.default)({common:_common.default,type:l,primary:f(t),secondary:f(o,"A400","A200","A700"),error:f(n),grey:_grey.default,contrastThreshold:c,getContrastText:h,augmentColor:f,tonalOffset:p},_[l]),g)}exports.dark=dark; +"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=createTypography;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends")),_objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties")),_utils=require("@material-ui/utils");function round(e){return Math.round(1e5*e)/1e5}var caseAllCaps={textTransform:"uppercase"},defaultFontFamily='"Roboto", "Helvetica", "Arial", sans-serif';function createTypography(e,t){var o="function"==typeof t?t(e):t,i=o.fontFamily,r=void 0===i?defaultFontFamily:i,n=o.fontSize,a=void 0===n?14:n,u=o.fontWeightLight,l=void 0===u?300:u,f=o.fontWeightRegular,s=void 0===f?400:f,d=o.fontWeightMedium,h=void 0===d?500:d,p=o.fontWeightBold,m=void 0===p?700:p,c=o.htmlFontSize,g=void 0===c?16:c,b=o.allVariants,y=o.pxToRem,v=(0,_objectWithoutProperties2.default)(o,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);"production"!==process.env.NODE_ENV&&("number"!=typeof a&&console.error("Material-UI: 'fontSize' is required to be a number."),"number"!=typeof g&&console.error("Material-UI: 'htmlFontSize' is required to be a number."));var W=a/14,F=y||function(e){return"".concat(e/g*W,"rem")},_=function(e,t,o,i,n){return(0,_extends2.default)({fontFamily:r,fontWeight:e,fontSize:F(t),lineHeight:o},r===defaultFontFamily?{letterSpacing:"".concat(round(i/t),"em")}:{},{},n,{},b)},R={h1:_(l,96,1,-1.5),h2:_(l,60,1,-.5),h3:_(s,48,1.04,0),h4:_(s,34,1.17,.25),h5:_(s,24,1.33,0),h6:_(h,20,1.6,.15),subtitle1:_(s,16,1.75,.15),subtitle2:_(h,14,1.57,.1),body1:_(s,16,1.5,.15),body2:_(s,14,1.43,.15),button:_(h,14,1.75,.4,caseAllCaps),caption:_(s,12,1.66,.4),overline:_(s,12,2.66,1,caseAllCaps)};return(0,_utils.deepmerge)((0,_extends2.default)({htmlFontSize:g,pxToRem:F,round:round,fontFamily:r,fontSize:a,fontWeightLight:l,fontWeightRegular:s,fontWeightMedium:h,fontWeightBold:m},R),v,{clone:!1})} }).call(this,require('_process')) -},{"../colors/common":99,"../colors/grey":100,"../colors/indigo":101,"../colors/pink":102,"../colors/red":103,"./colorManipulator":112,"@babel/runtime/helpers/extends":39,"@babel/runtime/helpers/interopRequireDefault":41,"@babel/runtime/helpers/objectWithoutProperties":45,"@material-ui/utils":185,"_process":745}],118:[function(require,module,exports){ +},{"@babel/runtime/helpers/extends":39,"@babel/runtime/helpers/interopRequireDefault":41,"@babel/runtime/helpers/objectWithoutProperties":45,"@material-ui/utils":185,"_process":745}],118:[function(require,module,exports){ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=createStyles;var _styles=require("@material-ui/styles");function createStyles(e){return(0,_styles.createStyles)(e)} },{"@material-ui/styles":161}],120:[function(require,module,exports){ @@ -883,16 +883,16 @@ var e=function(e){return parseFloat(e)};module.exports=function(r){return null== },{"jss":501}],494:[function(require,module,exports){ "use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var hyphenate=_interopDefault(require("hyphenate-style-name"));function convertCase(e){var r={};for(var a in e){r[0===a.indexOf("--")?a:hyphenate(a)]=e[a]}return e.fallbacks&&(Array.isArray(e.fallbacks)?r.fallbacks=e.fallbacks.map(convertCase):r.fallbacks=convertCase(e.fallbacks)),r}function camelCase(){return{onProcessStyle:function(e){if(Array.isArray(e)){for(var r=0;rMAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;h>0;)this.buffer[this.bufferLength++]=t[e++],h--,this.bufferLength===BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0);return this},Sha256.prototype.digest=function(t){if(!this.finished){var e=8*this.bytesHashed,h=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),s=this.bufferLength;if(h.setUint8(this.bufferLength++,128),s%BLOCK_SIZE>=BLOCK_SIZE-8){for(var i=this.bufferLength;i>>24&255,r[4*i+1]=this.state[i]>>>16&255,r[4*i+2]=this.state[i]>>>8&255,r[4*i+3]=this.state[i]>>>0&255;return t?r.toString(t):r},Sha256.prototype.hashBuffer=function(){for(var t=this.buffer,e=this.state,h=e[0],s=e[1],i=e[2],r=e[3],f=e[4],a=e[5],n=e[6],u=e[7],o=0;o>>17|L<<15)^(L>>>19|L<<13)^L>>>10,E=((L=this.temp[o-15])>>>7|L<<25)^(L>>>18|L<<14)^L>>>3;this.temp[o]=(b+this.temp[o-7]|0)+(E+this.temp[o-16]|0)}var S=(((f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7))+(f&a^~f&n)|0)+(u+(KEY[o]+this.temp[o]|0)|0)|0,p=((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+(h&s^h&i^s&i)|0;u=n,n=a,a=f,f=r+S|0,r=i,i=s,s=h,h=S+p|0}e[0]+=h,e[1]+=s,e[2]+=i,e[3]+=r,e[4]+=f,e[5]+=a,e[6]+=n,e[7]+=u}; -},{"./browserHashUtils":204,"buffer/":290}],207:[function(require,module,exports){ -var Buffer=require("buffer/").Buffer,hashUtils=require("./browserHashUtils"),BLOCK_SIZE=64,DIGEST_LENGTH=20,KEY=new Uint32Array([1518500249,1859775393,-1894007588,-899497514]),INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],MAX_HASHABLE_LENGTH=Math.pow(2,53)-1;function Sha1(){this.h0=1732584193,this.h1=4023233417,this.h2=2562383102,this.h3=271733878,this.h4=3285377520,this.block=new Uint32Array(80),this.offset=0,this.shift=24,this.totalLength=0}module.exports=exports=Sha1,Sha1.BLOCK_SIZE=BLOCK_SIZE,Sha1.prototype.update=function(t){if(this.finished)throw new Error("Attempted to update an already finished hash.");if(hashUtils.isEmptyData(t))return this;var h=(t=hashUtils.convertToBuffer(t)).length;this.totalLength+=8*h;for(var i=0;i14||14===this.offset&&this.shift<24)&&this.processBlock(),this.offset=14,this.shift=24,this.write(0),this.write(0),this.write(this.totalLength>0xffffffffff?this.totalLength/1099511627776:0),this.write(this.totalLength>4294967295?this.totalLength/4294967296:0);for(var h=24;h>=0;h-=8)this.write(this.totalLength>>h);var i=new Buffer(DIGEST_LENGTH),s=new DataView(i.buffer);return s.setUint32(0,this.h0,!1),s.setUint32(4,this.h1,!1),s.setUint32(8,this.h2,!1),s.setUint32(12,this.h3,!1),s.setUint32(16,this.h4,!1),t?i.toString(t):i},Sha1.prototype.processBlock=function(){for(var t=16;t<80;t++){var h=this.block[t-3]^this.block[t-8]^this.block[t-14]^this.block[t-16];this.block[t]=h<<1|h>>>31}var i,s,e=this.h0,r=this.h1,f=this.h2,o=this.h3,a=this.h4;for(t=0;t<80;t++){t<20?(i=o^r&(f^o),s=1518500249):t<40?(i=r^f^o,s=1859775393):t<60?(i=r&f|o&(r|f),s=2400959708):(i=r^f^o,s=3395469782);var n=(e<<5|e>>>27)+i+a+s+(0|this.block[t]);a=o,o=f,f=r<<30|r>>>2,r=e,e=n}for(this.h0=this.h0+e|0,this.h1=this.h1+r|0,this.h2=this.h2+f|0,this.h3=this.h3+o|0,this.h4=this.h4+a|0,this.offset=0,t=0;t<16;t++)this.block[t]=0}; - },{"./browserHashUtils":204,"buffer/":290}],206:[function(require,module,exports){ var hashUtils=require("./browserHashUtils"),Buffer=require("buffer/").Buffer,BLOCK_SIZE=64,DIGEST_LENGTH=16,INIT=[1732584193,4023233417,2562383102,271733878];function Md5(){this.state=[1732584193,4023233417,2562383102,271733878],this.buffer=new DataView(new ArrayBuffer(BLOCK_SIZE)),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}function cmn(t,i,e,n,g,f){return((i=(i+t&4294967295)+(n+f&4294967295)&4294967295)<>>32-g)+e&4294967295}function ff(t,i,e,n,g,f,h){return cmn(i&e|~i&n,t,i,g,f,h)}function gg(t,i,e,n,g,f,h){return cmn(i&n|e&~n,t,i,g,f,h)}function hh(t,i,e,n,g,f,h){return cmn(i^e^n,t,i,g,f,h)}function ii(t,i,e,n,g,f,h){return cmn(e^(i|~n),t,i,g,f,h)}module.exports=exports=Md5,Md5.BLOCK_SIZE=BLOCK_SIZE,Md5.prototype.update=function(t){if(hashUtils.isEmptyData(t))return this;if(this.finished)throw new Error("Attempted to update an already finished hash.");var i=hashUtils.convertToBuffer(t),e=0,n=i.byteLength;for(this.bytesHashed+=n;n>0;)this.buffer.setUint8(this.bufferLength++,i[e++]),n--,this.bufferLength===BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0);return this},Md5.prototype.digest=function(t){if(!this.finished){var i=this.buffer,e=this.bufferLength,n=8*this.bytesHashed;if(i.setUint8(this.bufferLength++,128),e%BLOCK_SIZE>=BLOCK_SIZE-8){for(var g=this.bufferLength;g>>0,!0),i.setUint32(BLOCK_SIZE-4,Math.floor(n/4294967296),!0),this.hashBuffer(),this.finished=!0}var f=new DataView(new ArrayBuffer(DIGEST_LENGTH));for(g=0;g<4;g++)f.setUint32(4*g,this.state[g],!0);var h=new Buffer(f.buffer,f.byteOffset,f.byteLength);return t?h.toString(t):h},Md5.prototype.hashBuffer=function(){var t=this.buffer,i=this.state,e=i[0],n=i[1],g=i[2],f=i[3];e=ff(e,n,g,f,t.getUint32(0,!0),7,3614090360),f=ff(f,e,n,g,t.getUint32(4,!0),12,3905402710),g=ff(g,f,e,n,t.getUint32(8,!0),17,606105819),n=ff(n,g,f,e,t.getUint32(12,!0),22,3250441966),e=ff(e,n,g,f,t.getUint32(16,!0),7,4118548399),f=ff(f,e,n,g,t.getUint32(20,!0),12,1200080426),g=ff(g,f,e,n,t.getUint32(24,!0),17,2821735955),n=ff(n,g,f,e,t.getUint32(28,!0),22,4249261313),e=ff(e,n,g,f,t.getUint32(32,!0),7,1770035416),f=ff(f,e,n,g,t.getUint32(36,!0),12,2336552879),g=ff(g,f,e,n,t.getUint32(40,!0),17,4294925233),n=ff(n,g,f,e,t.getUint32(44,!0),22,2304563134),e=ff(e,n,g,f,t.getUint32(48,!0),7,1804603682),f=ff(f,e,n,g,t.getUint32(52,!0),12,4254626195),g=ff(g,f,e,n,t.getUint32(56,!0),17,2792965006),e=gg(e,n=ff(n,g,f,e,t.getUint32(60,!0),22,1236535329),g,f,t.getUint32(4,!0),5,4129170786),f=gg(f,e,n,g,t.getUint32(24,!0),9,3225465664),g=gg(g,f,e,n,t.getUint32(44,!0),14,643717713),n=gg(n,g,f,e,t.getUint32(0,!0),20,3921069994),e=gg(e,n,g,f,t.getUint32(20,!0),5,3593408605),f=gg(f,e,n,g,t.getUint32(40,!0),9,38016083),g=gg(g,f,e,n,t.getUint32(60,!0),14,3634488961),n=gg(n,g,f,e,t.getUint32(16,!0),20,3889429448),e=gg(e,n,g,f,t.getUint32(36,!0),5,568446438),f=gg(f,e,n,g,t.getUint32(56,!0),9,3275163606),g=gg(g,f,e,n,t.getUint32(12,!0),14,4107603335),n=gg(n,g,f,e,t.getUint32(32,!0),20,1163531501),e=gg(e,n,g,f,t.getUint32(52,!0),5,2850285829),f=gg(f,e,n,g,t.getUint32(8,!0),9,4243563512),g=gg(g,f,e,n,t.getUint32(28,!0),14,1735328473),e=hh(e,n=gg(n,g,f,e,t.getUint32(48,!0),20,2368359562),g,f,t.getUint32(20,!0),4,4294588738),f=hh(f,e,n,g,t.getUint32(32,!0),11,2272392833),g=hh(g,f,e,n,t.getUint32(44,!0),16,1839030562),n=hh(n,g,f,e,t.getUint32(56,!0),23,4259657740),e=hh(e,n,g,f,t.getUint32(4,!0),4,2763975236),f=hh(f,e,n,g,t.getUint32(16,!0),11,1272893353),g=hh(g,f,e,n,t.getUint32(28,!0),16,4139469664),n=hh(n,g,f,e,t.getUint32(40,!0),23,3200236656),e=hh(e,n,g,f,t.getUint32(52,!0),4,681279174),f=hh(f,e,n,g,t.getUint32(0,!0),11,3936430074),g=hh(g,f,e,n,t.getUint32(12,!0),16,3572445317),n=hh(n,g,f,e,t.getUint32(24,!0),23,76029189),e=hh(e,n,g,f,t.getUint32(36,!0),4,3654602809),f=hh(f,e,n,g,t.getUint32(48,!0),11,3873151461),g=hh(g,f,e,n,t.getUint32(60,!0),16,530742520),e=ii(e,n=hh(n,g,f,e,t.getUint32(8,!0),23,3299628645),g,f,t.getUint32(0,!0),6,4096336452),f=ii(f,e,n,g,t.getUint32(28,!0),10,1126891415),g=ii(g,f,e,n,t.getUint32(56,!0),15,2878612391),n=ii(n,g,f,e,t.getUint32(20,!0),21,4237533241),e=ii(e,n,g,f,t.getUint32(48,!0),6,1700485571),f=ii(f,e,n,g,t.getUint32(12,!0),10,2399980690),g=ii(g,f,e,n,t.getUint32(40,!0),15,4293915773),n=ii(n,g,f,e,t.getUint32(4,!0),21,2240044497),e=ii(e,n,g,f,t.getUint32(32,!0),6,1873313359),f=ii(f,e,n,g,t.getUint32(60,!0),10,4264355552),g=ii(g,f,e,n,t.getUint32(24,!0),15,2734768916),n=ii(n,g,f,e,t.getUint32(52,!0),21,1309151649),e=ii(e,n,g,f,t.getUint32(16,!0),6,4149444226),f=ii(f,e,n,g,t.getUint32(44,!0),10,3174756917),g=ii(g,f,e,n,t.getUint32(8,!0),15,718787259),n=ii(n,g,f,e,t.getUint32(36,!0),21,3951481745),i[0]=e+i[0]&4294967295,i[1]=n+i[1]&4294967295,i[2]=g+i[2]&4294967295,i[3]=f+i[3]&4294967295}; +},{"./browserHashUtils":204,"buffer/":290}],207:[function(require,module,exports){ +var Buffer=require("buffer/").Buffer,hashUtils=require("./browserHashUtils"),BLOCK_SIZE=64,DIGEST_LENGTH=20,KEY=new Uint32Array([1518500249,1859775393,-1894007588,-899497514]),INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],MAX_HASHABLE_LENGTH=Math.pow(2,53)-1;function Sha1(){this.h0=1732584193,this.h1=4023233417,this.h2=2562383102,this.h3=271733878,this.h4=3285377520,this.block=new Uint32Array(80),this.offset=0,this.shift=24,this.totalLength=0}module.exports=exports=Sha1,Sha1.BLOCK_SIZE=BLOCK_SIZE,Sha1.prototype.update=function(t){if(this.finished)throw new Error("Attempted to update an already finished hash.");if(hashUtils.isEmptyData(t))return this;var h=(t=hashUtils.convertToBuffer(t)).length;this.totalLength+=8*h;for(var i=0;i14||14===this.offset&&this.shift<24)&&this.processBlock(),this.offset=14,this.shift=24,this.write(0),this.write(0),this.write(this.totalLength>0xffffffffff?this.totalLength/1099511627776:0),this.write(this.totalLength>4294967295?this.totalLength/4294967296:0);for(var h=24;h>=0;h-=8)this.write(this.totalLength>>h);var i=new Buffer(DIGEST_LENGTH),s=new DataView(i.buffer);return s.setUint32(0,this.h0,!1),s.setUint32(4,this.h1,!1),s.setUint32(8,this.h2,!1),s.setUint32(12,this.h3,!1),s.setUint32(16,this.h4,!1),t?i.toString(t):i},Sha1.prototype.processBlock=function(){for(var t=16;t<80;t++){var h=this.block[t-3]^this.block[t-8]^this.block[t-14]^this.block[t-16];this.block[t]=h<<1|h>>>31}var i,s,e=this.h0,r=this.h1,f=this.h2,o=this.h3,a=this.h4;for(t=0;t<80;t++){t<20?(i=o^r&(f^o),s=1518500249):t<40?(i=r^f^o,s=1859775393):t<60?(i=r&f|o&(r|f),s=2400959708):(i=r^f^o,s=3395469782);var n=(e<<5|e>>>27)+i+a+s+(0|this.block[t]);a=o,o=f,f=r<<30|r>>>2,r=e,e=n}for(this.h0=this.h0+e|0,this.h1=this.h1+r|0,this.h2=this.h2+f|0,this.h3=this.h3+o|0,this.h4=this.h4+a|0,this.offset=0,t=0;t<16;t++)this.block[t]=0}; + },{"./browserHashUtils":204,"buffer/":290}],205:[function(require,module,exports){ var hashUtils=require("./browserHashUtils");function Hmac(t,e){this.hash=new t,this.outer=new t;var r=bufferFromSecret(t,e),s=new Uint8Array(t.BLOCK_SIZE);s.set(r);for(var h=0;ht.BLOCK_SIZE){var s=new t;s.update(r),r=s.digest()}var h=new Uint8Array(t.BLOCK_SIZE);return h.set(r),h}module.exports=exports=Hmac,Hmac.prototype.update=function(t){if(hashUtils.isEmptyData(t)||this.error)return this;try{this.hash.update(hashUtils.convertToBuffer(t))}catch(t){this.error=t}return this},Hmac.prototype.digest=function(t){return this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest(t)}; @@ -2762,7 +2762,13 @@ var Buffer=require("buffer/").Buffer;"undefined"!=typeof ArrayBuffer&&void 0===A }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer) -},{"base64-js":273,"buffer":283,"ieee754":487,"isarray":492}],245:[function(require,module,exports){ +},{"base64-js":273,"buffer":283,"ieee754":487,"isarray":492}],264:[function(require,module,exports){ +(function (process,setImmediate){ +var AWS,util={environment:"nodejs",engine:function(){if(util.isBrowser()&&"undefined"!=typeof navigator)return navigator.userAgent;var e=process.platform+"/"+process.version;return process.env.AWS_EXECUTION_ENV&&(e+=" exec-env/"+process.env.AWS_EXECUTION_ENV),e},userAgent:function(){var e=util.environment,t="aws-sdk-"+e+"/"+require("./core").VERSION;return"nodejs"===e&&(t+=" "+util.engine()),t},uriEscape:function(e){var t=encodeURIComponent(e);return t=(t=t.replace(/[^A-Za-z0-9_.~\-%]+/g,escape)).replace(/[*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})},uriEscapePath:function(e){var t=[];return util.arrayEach(e.split("/"),function(e){t.push(util.uriEscape(e))}),t.join("/")},urlParse:function(e){return util.url.parse(e)},urlFormat:function(e){return util.url.format(e)},queryStringParse:function(e){return util.querystring.parse(e)},queryParamsToString:function(e){var t=[],r=util.uriEscape,n=Object.keys(e).sort();return util.arrayEach(n,function(n){var o=e[n],i=r(n),a=i+"=";if(Array.isArray(o)){var u=[];util.arrayEach(o,function(e){u.push(r(e))}),a=i+"="+u.sort().join("&"+i+"=")}else null!=o&&(a=i+"="+r(o));t.push(a)}),t.join("&")},readFileSync:function(e){return util.isBrowser()?null:require("fs").readFileSync(e,"utf-8")},base64:{encode:function(e){if("number"==typeof e)throw util.error(new Error("Cannot base64 encode number "+e));return null==e?e:util.buffer.toBuffer(e).toString("base64")},decode:function(e){if("number"==typeof e)throw util.error(new Error("Cannot base64 decode number "+e));return null==e?e:util.buffer.toBuffer(e,"base64")}},buffer:{toBuffer:function(e,t){return"function"==typeof util.Buffer.from&&util.Buffer.from!==Uint8Array.from?util.Buffer.from(e,t):new util.Buffer(e,t)},alloc:function(e,t,r){if("number"!=typeof e)throw new Error("size passed to alloc must be a number.");if("function"==typeof util.Buffer.alloc)return util.Buffer.alloc(e,t,r);var n=new util.Buffer(e);return void 0!==t&&"function"==typeof n.fill&&n.fill(t,void 0,void 0,r),n},toStream:function(e){util.Buffer.isBuffer(e)||(e=util.buffer.toBuffer(e));var t=new util.stream.Readable,r=0;return t._read=function(n){if(r>=e.length)return t.push(null);var o=r+n;o>e.length&&(o=e.length),t.push(e.slice(r,o)),r=o},t},concat:function(e){var t,r,n=0,o=0;for(r=0;r>>8^t[255&(r^e.readUInt8(n))]}return(-1^r)>>>0},hmac:function(e,t,r,n){return r||(r="binary"),"buffer"===r&&(r=void 0),n||(n="sha256"),"string"==typeof t&&(t=util.buffer.toBuffer(t)),util.crypto.lib.createHmac(n,e).update(t).digest(r)},md5:function(e,t,r){return util.crypto.hash("md5",e,t,r)},sha256:function(e,t,r){return util.crypto.hash("sha256",e,t,r)},hash:function(e,t,r,n){var o=util.crypto.createHash(e);r||(r="binary"),"buffer"===r&&(r=void 0),"string"==typeof t&&(t=util.buffer.toBuffer(t));var i=util.arraySliceFn(t),a=util.Buffer.isBuffer(t);if(util.isBrowser()&&"undefined"!=typeof ArrayBuffer&&t&&t.buffer instanceof ArrayBuffer&&(a=!0),n&&"object"==typeof t&&"function"==typeof t.on&&!a)t.on("data",function(e){o.update(e)}),t.on("error",function(e){n(e)}),t.on("end",function(){n(null,o.digest(r))});else{if(!n||!i||a||"undefined"==typeof FileReader){util.isBrowser()&&"object"==typeof t&&!a&&(t=new util.Buffer(new Uint8Array(t)));var u=o.update(t).digest(r);return n&&n(null,u),u}var f=0,s=new FileReader;s.onerror=function(){n(new Error("Failed to read data."))},s.onload=function(){var e=new util.Buffer(new Uint8Array(s.result));o.update(e),f+=e.length,s._continueReading()},s._continueReading=function(){if(f>=t.size)n(null,o.digest(r));else{var e=f+524288;e>t.size&&(e=t.size),s.readAsArrayBuffer(i.call(t,f,e))}},s._continueReading()}},toHex:function(e){for(var t=[],r=0;r=3e5,!1),AWS.config.isClockSkewed},applyClockOffset:function(e){e&&(AWS.config.systemClockOffset=e-(new Date).getTime())},extractRequestId:function(e){var t=e.httpResponse.headers["x-amz-request-id"]||e.httpResponse.headers["x-amzn-requestid"];!t&&e.data&&e.data.ResponseMetadata&&(t=e.data.ResponseMetadata.RequestId),t&&(e.requestId=t),e.error&&(e.error.requestId=t)},addPromises:function(e,t){var r=!1;void 0===t&&AWS&&AWS.config&&(t=AWS.config.getPromisesDependency()),void 0===t&&"undefined"!=typeof Promise&&(t=Promise),"function"!=typeof t&&(r=!0),Array.isArray(e)||(e=[e]);for(var n=0;n=0?(i++,setTimeout(u,o+(e.retryAfter||0))):r(e)},u=function(){var t="";n.handleRequest(e,o,function(e){e.on("data",function(e){t+=e.toString()}),e.on("end",function(){var n=e.statusCode;if(n<300)r(null,t);else{var o=1e3*parseInt(e.headers["retry-after"],10)||0,i=util.error(new Error,{retryable:n>=500||429===n});o&&i.retryable&&(i.retryAfter=o),a(i)}})},a)};AWS.util.defer(u)},uuid:{v4:function(){return require("uuid").v4()}},convertPayloadToString:function(e){var t=e.request,r=t.operation,n=t.service.api.operations[r].output||{};n.payload&&e.data[n.payload]&&(e.data[n.payload]=e.data[n.payload].toString())},defer:function(e){"object"==typeof process&&"function"==typeof process.nextTick?process.nextTick(e):"function"==typeof setImmediate?setImmediate(e):setTimeout(e,0)},getRequestPayloadShape:function(e){var t=e.service.api.operations;if(t){var r=(t||{})[e.operation];if(r&&r.input&&r.input.payload)return r.input.members[r.input.payload]}},getProfilesFromSharedConfig:function(e,t){var r={},n={};if(process.env[util.configOptInEnv])n=e.loadFrom({isConfig:!0,filename:process.env[util.sharedConfigFileEnv]});for(var o=e.loadFrom({filename:t||process.env[util.configOptInEnv]&&process.env[util.sharedCredentialsFileEnv]}),i=0,a=Object.keys(n);ithis.expireTime)||(this.expired||!this.accessKeyId||!this.secretAccessKey)},get:function(e){var s=this;this.needsRefresh()?this.refresh(function(t){t||(s.expired=!1),e&&e(t)}):e&&e()},refresh:function(e){this.expired=!1,e()},coalesceRefresh:function(e,s){var t=this;1===t.refreshCallbacks.push(e)&&t.load(function(e){AWS.util.arrayEach(t.refreshCallbacks,function(t){s?t(e):AWS.util.defer(function(){t(e)})}),t.refreshCallbacks.length=0})},load:function(e){e()}}),AWS.Credentials.addPromisesToClass=function(e){this.prototype.getPromise=AWS.util.promisifyMethod("get",e),this.prototype.refreshPromise=AWS.util.promisifyMethod("refresh",e)},AWS.Credentials.deletePromisesFromClass=function(){delete this.prototype.getPromise,delete this.prototype.refreshPromise},AWS.util.addPromises(AWS.Credentials); -},{"./core":211}],215:[function(require,module,exports){ -var AWS=require("../core");AWS.CredentialProviderChain=AWS.util.inherit(AWS.Credentials,{constructor:function(e){this.providers=e||AWS.CredentialProviderChain.defaultProviders.slice(0),this.resolveCallbacks=[]},resolve:function(e){var r=this;if(0===r.providers.length)return e(new Error("No providers")),r;if(1===r.resolveCallbacks.push(e)){var i=0,o=r.providers.slice(0);!function e(t,l){if(!t&&l||i===o.length)return AWS.util.arrayEach(r.resolveCallbacks,function(e){e(t,l)}),void(r.resolveCallbacks.length=0);var s=o[i++];(l="function"==typeof s?s.call():s).get?l.get(function(r){e(r,r?null:l)}):e(null,l)}()}return r}}),AWS.CredentialProviderChain.defaultProviders=[],AWS.CredentialProviderChain.addPromisesToClass=function(e){this.prototype.resolvePromise=AWS.util.promisifyMethod("resolve",e)},AWS.CredentialProviderChain.deletePromisesFromClass=function(){delete this.prototype.resolvePromise},AWS.util.addPromises(AWS.CredentialProviderChain); - -},{"../core":211}],216:[function(require,module,exports){ -var AWS=require("../core"),STS=require("../../clients/sts");AWS.SAMLCredentials=AWS.util.inherit(AWS.Credentials,{constructor:function(e){AWS.Credentials.call(this),this.expired=!0,this.params=e},refresh:function(e){this.coalesceRefresh(e||AWS.util.fn.callback)},load:function(e){var i=this;i.createClients(),i.service.assumeRoleWithSAML(function(s,t){s||i.service.credentialsFrom(t,i),e(s)})},createClients:function(){this.service=this.service||new STS({params:this.params})}}); - -},{"../../clients/sts":201,"../core":211}],217:[function(require,module,exports){ +},{"./core":211}],217:[function(require,module,exports){ var AWS=require("../core"),STS=require("../../clients/sts");AWS.TemporaryCredentials=AWS.util.inherit(AWS.Credentials,{constructor:function(e,s){AWS.Credentials.call(this),this.loadMasterCredentials(s),this.expired=!0,this.params=e||{},this.params.RoleArn&&(this.params.RoleSessionName=this.params.RoleSessionName||"temporary-credentials")},refresh:function(e){this.coalesceRefresh(e||AWS.util.fn.callback)},load:function(e){var s=this;s.createClients(),s.masterCredentials.get(function(){s.service.config.credentials=s.masterCredentials,(s.params.RoleArn?s.service.assumeRole:s.service.getSessionToken).call(s.service,function(t,r){t||s.service.credentialsFrom(r,s),e(t)})})},loadMasterCredentials:function(e){for(this.masterCredentials=e||AWS.config.credentials;this.masterCredentials.masterCredentials;)this.masterCredentials=this.masterCredentials.masterCredentials;"function"!=typeof this.masterCredentials.get&&(this.masterCredentials=new AWS.Credentials(this.masterCredentials))},createClients:function(){this.service=this.service||new STS({params:this.params})}}); -},{"../../clients/sts":201,"../core":211}],218:[function(require,module,exports){ -var AWS=require("../core"),STS=require("../../clients/sts");AWS.WebIdentityCredentials=AWS.util.inherit(AWS.Credentials,{constructor:function(e,i){AWS.Credentials.call(this),this.expired=!0,this.params=e,this.params.RoleSessionName=this.params.RoleSessionName||"web-identity",this.data=null,this._clientConfig=AWS.util.copy(i||{})},refresh:function(e){this.coalesceRefresh(e||AWS.util.fn.callback)},load:function(e){var i=this;i.createClients(),i.service.assumeRoleWithWebIdentity(function(t,s){i.data=null,t||(i.data=s,i.service.credentialsFrom(s,i)),e(t)})},createClients:function(){if(!this.service){var e=AWS.util.merge({},this._clientConfig);e.params=this.params,this.service=new STS(e)}}}); +},{"../../clients/sts":201,"../core":211}],213:[function(require,module,exports){ +var AWS=require("../core"),STS=require("../../clients/sts");AWS.ChainableTemporaryCredentials=AWS.util.inherit(AWS.Credentials,{constructor:function(e){AWS.Credentials.call(this),e=e||{},this.errorCode="ChainableTemporaryCredentialsProviderFailure",this.expired=!0,this.tokenCodeFn=null;var r=AWS.util.copy(e.params)||{};if(r.RoleArn&&(r.RoleSessionName=r.RoleSessionName||"temporary-credentials"),r.SerialNumber){if(!e.tokenCodeFn||"function"!=typeof e.tokenCodeFn)throw new AWS.util.error(new Error("tokenCodeFn must be a function when params.SerialNumber is given"),{code:this.errorCode});this.tokenCodeFn=e.tokenCodeFn}var n=AWS.util.merge({params:r,credentials:e.masterCredentials||AWS.config.credentials},e.stsConfig||{});this.service=new STS(n)},refresh:function(e){this.coalesceRefresh(e||AWS.util.fn.callback)},load:function(e){var r=this,n=r.service.config.params.RoleArn?"assumeRole":"getSessionToken";this.getTokenCode(function(o,i){var t={};o?e(o):(i&&(t.TokenCode=i),r.service[n](t,function(n,o){n||r.service.credentialsFrom(o,r),e(n)}))})},getTokenCode:function(e){var r=this;this.tokenCodeFn?this.tokenCodeFn(this.service.config.params.SerialNumber,function(n,o){if(n){var i=n;return n instanceof Error&&(i=n.message),void e(AWS.util.error(new Error("Error fetching MFA token: "+i),{code:r.errorCode}))}e(null,o)}):e(null)}}); + +},{"../../clients/sts":201,"../core":211}],215:[function(require,module,exports){ +var AWS=require("../core");AWS.CredentialProviderChain=AWS.util.inherit(AWS.Credentials,{constructor:function(e){this.providers=e||AWS.CredentialProviderChain.defaultProviders.slice(0),this.resolveCallbacks=[]},resolve:function(e){var r=this;if(0===r.providers.length)return e(new Error("No providers")),r;if(1===r.resolveCallbacks.push(e)){var i=0,o=r.providers.slice(0);!function e(t,l){if(!t&&l||i===o.length)return AWS.util.arrayEach(r.resolveCallbacks,function(e){e(t,l)}),void(r.resolveCallbacks.length=0);var s=o[i++];(l="function"==typeof s?s.call():s).get?l.get(function(r){e(r,r?null:l)}):e(null,l)}()}return r}}),AWS.CredentialProviderChain.defaultProviders=[],AWS.CredentialProviderChain.addPromisesToClass=function(e){this.prototype.resolvePromise=AWS.util.promisifyMethod("resolve",e)},AWS.CredentialProviderChain.deletePromisesFromClass=function(){delete this.prototype.resolvePromise},AWS.util.addPromises(AWS.CredentialProviderChain); -},{"../../clients/sts":201,"../core":211}],228:[function(require,module,exports){ +},{"../core":211}],228:[function(require,module,exports){ var AWS=require("../core"),EventEmitter=require("events").EventEmitter;require("../http"),AWS.XHRClient=AWS.util.inherit({handleRequest:function(e,t,r,n){var s=this,o=e.endpoint,i=new EventEmitter,a=o.protocol+"//"+o.hostname;80!==o.port&&443!==o.port&&(a+=":"+o.port),a+=e.path;var u=new XMLHttpRequest,d=!1;e.stream=u,u.addEventListener("readystatechange",function(){try{if(0===u.status)return}catch(e){return}this.readyState>=this.HEADERS_RECEIVED&&!d&&(i.statusCode=u.status,i.headers=s.parseHeaders(u.getAllResponseHeaders()),i.emit("headers",i.statusCode,i.headers,u.statusText),d=!0),this.readyState===this.DONE&&s.finishRequest(u,i)},!1),u.upload.addEventListener("progress",function(e){i.emit("sendProgress",e)}),u.addEventListener("progress",function(e){i.emit("receiveProgress",e)},!1),u.addEventListener("timeout",function(){n(AWS.util.error(new Error("Timeout"),{code:"TimeoutError"}))},!1),u.addEventListener("error",function(){n(AWS.util.error(new Error("Network Failure"),{code:"NetworkingError"}))},!1),u.addEventListener("abort",function(){n(AWS.util.error(new Error("Request aborted"),{code:"RequestAbortedError"}))},!1),r(i),u.open(e.method,a,!1!==t.xhrAsync),AWS.util.each(e.headers,function(e,t){"Content-Length"!==e&&"User-Agent"!==e&&"Host"!==e&&u.setRequestHeader(e,t)}),t.timeout&&!1!==t.xhrAsync&&(u.timeout=t.timeout),t.xhrWithCredentials&&(u.withCredentials=!0);try{u.responseType="arraybuffer"}catch(e){}try{e.body?u.send(e.body):u.send()}catch(t){if(!e.body||"object"!=typeof e.body.buffer)throw t;u.send(e.body.buffer)}return i},parseHeaders:function(e){var t={};return AWS.util.arrayEach(e.split(/\r?\n/),function(e){var r=e.split(":",1)[0],n=e.substring(r.length+2);r.length>0&&(t[r.toLowerCase()]=n)}),t},finishRequest:function(e,t){var r;if("arraybuffer"===e.responseType&&e.response){var n=e.response;r=new AWS.util.Buffer(n.byteLength);for(var s=new Uint8Array(n),o=0;o=e.length)return t.push(null);var o=r+n;o>e.length&&(o=e.length),t.push(e.slice(r,o)),r=o},t},concat:function(e){var t,r,n=0,o=0;for(r=0;r>>8^t[255&(r^e.readUInt8(n))]}return(-1^r)>>>0},hmac:function(e,t,r,n){return r||(r="binary"),"buffer"===r&&(r=void 0),n||(n="sha256"),"string"==typeof t&&(t=util.buffer.toBuffer(t)),util.crypto.lib.createHmac(n,e).update(t).digest(r)},md5:function(e,t,r){return util.crypto.hash("md5",e,t,r)},sha256:function(e,t,r){return util.crypto.hash("sha256",e,t,r)},hash:function(e,t,r,n){var o=util.crypto.createHash(e);r||(r="binary"),"buffer"===r&&(r=void 0),"string"==typeof t&&(t=util.buffer.toBuffer(t));var i=util.arraySliceFn(t),a=util.Buffer.isBuffer(t);if(util.isBrowser()&&"undefined"!=typeof ArrayBuffer&&t&&t.buffer instanceof ArrayBuffer&&(a=!0),n&&"object"==typeof t&&"function"==typeof t.on&&!a)t.on("data",function(e){o.update(e)}),t.on("error",function(e){n(e)}),t.on("end",function(){n(null,o.digest(r))});else{if(!n||!i||a||"undefined"==typeof FileReader){util.isBrowser()&&"object"==typeof t&&!a&&(t=new util.Buffer(new Uint8Array(t)));var u=o.update(t).digest(r);return n&&n(null,u),u}var f=0,s=new FileReader;s.onerror=function(){n(new Error("Failed to read data."))},s.onload=function(){var e=new util.Buffer(new Uint8Array(s.result));o.update(e),f+=e.length,s._continueReading()},s._continueReading=function(){if(f>=t.size)n(null,o.digest(r));else{var e=f+524288;e>t.size&&(e=t.size),s.readAsArrayBuffer(i.call(t,f,e))}},s._continueReading()}},toHex:function(e){for(var t=[],r=0;r=3e5,!1),AWS.config.isClockSkewed},applyClockOffset:function(e){e&&(AWS.config.systemClockOffset=e-(new Date).getTime())},extractRequestId:function(e){var t=e.httpResponse.headers["x-amz-request-id"]||e.httpResponse.headers["x-amzn-requestid"];!t&&e.data&&e.data.ResponseMetadata&&(t=e.data.ResponseMetadata.RequestId),t&&(e.requestId=t),e.error&&(e.error.requestId=t)},addPromises:function(e,t){var r=!1;void 0===t&&AWS&&AWS.config&&(t=AWS.config.getPromisesDependency()),void 0===t&&"undefined"!=typeof Promise&&(t=Promise),"function"!=typeof t&&(r=!0),Array.isArray(e)||(e=[e]);for(var n=0;n=0?(i++,setTimeout(u,o+(e.retryAfter||0))):r(e)},u=function(){var t="";n.handleRequest(e,o,function(e){e.on("data",function(e){t+=e.toString()}),e.on("end",function(){var n=e.statusCode;if(n<300)r(null,t);else{var o=1e3*parseInt(e.headers["retry-after"],10)||0,i=util.error(new Error,{retryable:n>=500||429===n});o&&i.retryable&&(i.retryAfter=o),a(i)}})},a)};AWS.util.defer(u)},uuid:{v4:function(){return require("uuid").v4()}},convertPayloadToString:function(e){var t=e.request,r=t.operation,n=t.service.api.operations[r].output||{};n.payload&&e.data[n.payload]&&(e.data[n.payload]=e.data[n.payload].toString())},defer:function(e){"object"==typeof process&&"function"==typeof process.nextTick?process.nextTick(e):"function"==typeof setImmediate?setImmediate(e):setTimeout(e,0)},getRequestPayloadShape:function(e){var t=e.service.api.operations;if(t){var r=(t||{})[e.operation];if(r&&r.input&&r.input.payload)return r.input.members[r.input.payload]}},getProfilesFromSharedConfig:function(e,t){var r={},n={};if(process.env[util.configOptInEnv])n=e.loadFrom({isConfig:!0,filename:process.env[util.sharedConfigFileEnv]});for(var o=e.loadFrom({filename:t||process.env[util.configOptInEnv]&&process.env[util.sharedCredentialsFileEnv]}),i=0,a=Object.keys(n);i0){var u=(t=new AWS.XML.Parser).parse(a.toString(),o);util.update(e.data,u)}}module.exports={buildRequest:buildRequest,extractError:extractError,extractData:extractData}; -},{"../core":211,"../util":264,"./rest":241}],233:[function(require,module,exports){ -var Shape=require("./shape"),util=require("../util"),property=util.property,memoizedProperty=util.memoizedProperty;function Operation(t,e,r){var o=this;r=r||{},property(this,"name",e.name||t),property(this,"api",r.api,!1),e.http=e.http||{},property(this,"endpoint",e.endpoint),property(this,"httpMethod",e.http.method||"POST"),property(this,"httpPath",e.http.requestUri||"/"),property(this,"authtype",e.authtype||""),property(this,"endpointDiscoveryRequired",e.endpointdiscovery?e.endpointdiscovery.required?"REQUIRED":"OPTIONAL":"NULL"),memoizedProperty(this,"input",function(){return e.input?Shape.create(e.input,r):new Shape.create({type:"structure"},r)}),memoizedProperty(this,"output",function(){return e.output?Shape.create(e.output,r):new Shape.create({type:"structure"},r)}),memoizedProperty(this,"errors",function(){var t=[];if(!e.errors)return null;for(var o=0;o-1?t||"":t,this.isJsonValue?JSON.parse(t):t&&"function"==typeof t.toString?t.toString():t},this.toWireFormat=function(e){return this.isJsonValue?JSON.stringify(e):e}}function FloatShape(){Shape.apply(this,arguments),this.toType=function(e){return null==e?null:parseFloat(e)},this.toWireFormat=this.toType}function IntegerShape(){Shape.apply(this,arguments),this.toType=function(e){return null==e?null:parseInt(e,10)},this.toWireFormat=this.toType}function BinaryShape(){Shape.apply(this,arguments),this.toType=function(e){var t=util.base64.decode(e);if(this.isSensitive&&util.isNode()&&"function"==typeof util.Buffer.alloc){var r=util.Buffer.alloc(t.length,t);t.fill(0),t=r}return t},this.toWireFormat=util.base64.encode}function Base64Shape(){BinaryShape.apply(this,arguments)}function BooleanShape(){Shape.apply(this,arguments),this.toType=function(e){return"boolean"==typeof e?e:null==e?null:"true"===e}}Shape.normalizedTypes={character:"string",double:"float",long:"integer",short:"integer",biginteger:"integer",bigdecimal:"float",blob:"binary"},Shape.types={structure:StructureShape,list:ListShape,map:MapShape,boolean:BooleanShape,timestamp:TimestampShape,float:FloatShape,integer:IntegerShape,string:StringShape,base64:Base64Shape,binary:BinaryShape},Shape.resolve=function(e,t){if(e.shape){var r=t.api.shapes[e.shape];if(!r)throw new Error("Cannot find shape reference: "+e.shape);return r}return null},Shape.create=function(e,t,r){if(e.isShape)return e;var i=Shape.resolve(e,t);if(i){var p=Object.keys(e);t.documentation||(p=p.filter(function(e){return!e.match(/documentation/)}));var a=function(){i.constructor.call(this,e,t,r)};return a.prototype=i,new a}e.type||(e.members?e.type="structure":e.member?e.type="list":e.key?e.type="map":e.type="string");var o=e.type;if(Shape.normalizedTypes[e.type]&&(e.type=Shape.normalizedTypes[e.type]),Shape.types[e.type])return new Shape.types[e.type](e,t,r);throw new Error("Unrecognized shape type: "+o)},Shape.shapes={StructureShape:StructureShape,ListShape:ListShape,MapShape:MapShape,StringShape:StringShape,BooleanShape:BooleanShape,Base64Shape:Base64Shape},module.exports=Shape; -},{"../util":264,"./collection":232}],249:[function(require,module,exports){ +},{"../util":264,"./collection":232}],233:[function(require,module,exports){ +var Shape=require("./shape"),util=require("../util"),property=util.property,memoizedProperty=util.memoizedProperty;function Operation(t,e,r){var o=this;r=r||{},property(this,"name",e.name||t),property(this,"api",r.api,!1),e.http=e.http||{},property(this,"endpoint",e.endpoint),property(this,"httpMethod",e.http.method||"POST"),property(this,"httpPath",e.http.requestUri||"/"),property(this,"authtype",e.authtype||""),property(this,"endpointDiscoveryRequired",e.endpointdiscovery?e.endpointdiscovery.required?"REQUIRED":"OPTIONAL":"NULL"),memoizedProperty(this,"input",function(){return e.input?Shape.create(e.input,r):new Shape.create({type:"structure"},r)}),memoizedProperty(this,"output",function(){return e.output?Shape.create(e.output,r):new Shape.create({type:"structure"},r)}),memoizedProperty(this,"errors",function(){var t=[];if(!e.errors)return null;for(var o=0;o=0?"&":"?";var u=[];util.arrayEach(Object.keys(o).sort(),function(e){Array.isArray(o[e])||(o[e]=[o[e]]);for(var t=0;t=0?"&":"?";var u=[];util.arrayEach(Object.keys(o).sort(),function(e){Array.isArray(o[e])||(o[e]=[o[e]]);for(var t=0;t"+this.children.map(function(t){return t.toString()}).join("")+"":"/>")},module.exports={XmlNode:XmlNode}; -},{"./escape-attribute":267}],267:[function(require,module,exports){ +},{"./escape-attribute":267}],270:[function(require,module,exports){ +var escapeElement=require("./escape-element").escapeElement;function XmlText(e){this.value=e}XmlText.prototype.toString=function(){return escapeElement(""+this.value)},module.exports={XmlText:XmlText}; + +},{"./escape-element":268}],267:[function(require,module,exports){ function escapeAttribute(e){return e.replace(/&/g,"&").replace(/'/g,"'").replace(//g,">").replace(/"/g,""")}module.exports={escapeAttribute:escapeAttribute}; },{}],268:[function(require,module,exports){ @@ -3048,13 +3048,13 @@ function escapeElement(e){return e.replace(/&/g,"&").replace(/2?r-2:0),u=2;u1||e.minimum_should_match_override)&&(t.minimum_should_match=i.minimum_should_match),{bool:t}}function unwrap(e){return e.length>1?e:(0,_last3.default)(e)}function pushQuery(e,i,t){for(var r={},u=arguments.length,l=Array(u>3?u-3:0),n=3;n1||e.minimum_should_match_override)&&(t.minimum_should_match=i.minimum_should_match),{bool:t}}function unwrap(e){return e.length>1?e:(0,_last3.default)(e)}function pushQuery(e,i,t){for(var r={},u=arguments.length,l=Array(u>3?u-3:0),n=3;n1&&void 0!==arguments[1]&&arguments[1];t.minimum_should_match=r,t.minimum_should_match_override=n}(r,!!n),this},getQuery:function(){return this.hasQuery()?(0,_utils.toBool)(t):{}},hasQuery:function(){return!!(t.and.length||t.or.length||t.not.length)}}} -},{"./utils":278}],670:[function(require,module,exports){ -var baseClone=require("./_baseClone"),CLONE_DEEP_FLAG=1,CLONE_SYMBOLS_FLAG=4;function cloneDeep(e){return baseClone(e,CLONE_DEEP_FLAG|CLONE_SYMBOLS_FLAG)}module.exports=cloneDeep; - -},{"./_baseClone":528}],673:[function(require,module,exports){ +},{"./utils":278}],673:[function(require,module,exports){ module.exports=require("./forEach"); -},{"./forEach":680}],717:[function(require,module,exports){ +},{"./forEach":680}],670:[function(require,module,exports){ +var baseClone=require("./_baseClone"),CLONE_DEEP_FLAG=1,CLONE_SYMBOLS_FLAG=4;function cloneDeep(e){return baseClone(e,CLONE_DEEP_FLAG|CLONE_SYMBOLS_FLAG)}module.exports=cloneDeep; + +},{"./_baseClone":528}],717:[function(require,module,exports){ var baseSet=require("./_baseSet");function set(e,t,r){return null==e?e:baseSet(e,t,r)}module.exports=set; },{"./_baseSet":562}],713:[function(require,module,exports){ @@ -3090,13 +3090,13 @@ function last(l){var t=null==l?0:l.length;return t?l[t-1]:void 0}module.exports= },{}],699:[function(require,module,exports){ function isObject(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}module.exports=isObject; -},{}],677:[function(require,module,exports){ -var baseFindIndex=require("./_baseFindIndex"),baseIteratee=require("./_baseIteratee"),toInteger=require("./toInteger"),nativeMax=Math.max;function findIndex(e,n,r){var t=null==e?0:e.length;if(!t)return-1;var a=null==r?0:toInteger(r);return a<0&&(a=nativeMax(t+a,0)),baseFindIndex(e,baseIteratee(n,3),a)}module.exports=findIndex; - -},{"./_baseFindIndex":531,"./_baseIteratee":550,"./toInteger":724}],666:[function(require,module,exports){ +},{}],666:[function(require,module,exports){ var assignValue=require("./_assignValue"),copyObject=require("./_copyObject"),createAssigner=require("./_createAssigner"),isArrayLike=require("./isArrayLike"),isPrototype=require("./_isPrototype"),keys=require("./keys"),objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty,assign=createAssigner(function(e,r){if(isPrototype(r)||isArrayLike(r))copyObject(r,keys(r),e);else for(var s in r)hasOwnProperty.call(r,s)&&assignValue(e,s,r[s])});module.exports=assign; -},{"./_assignValue":523,"./_copyObject":583,"./_createAssigner":587,"./_isPrototype":625,"./isArrayLike":690,"./keys":707}],280:[function(require,module,exports){ +},{"./_assignValue":523,"./_copyObject":583,"./_createAssigner":587,"./_isPrototype":625,"./isArrayLike":690,"./keys":707}],677:[function(require,module,exports){ +var baseFindIndex=require("./_baseFindIndex"),baseIteratee=require("./_baseIteratee"),toInteger=require("./toInteger"),nativeMax=Math.max;function findIndex(e,n,r){var t=null==e?0:e.length;if(!t)return-1;var a=null==r?0:toInteger(r);return a<0&&(a=nativeMax(t+a,0)),baseFindIndex(e,baseIteratee(n,3),a)}module.exports=findIndex; + +},{"./_baseFindIndex":531,"./_baseIteratee":550,"./toInteger":724}],280:[function(require,module,exports){ (function (process,Buffer){ "use strict";var assert=require("assert"),Zstream=require("pako/lib/zlib/zstream"),zlib_deflate=require("pako/lib/zlib/deflate.js"),zlib_inflate=require("pako/lib/zlib/inflate.js"),constants=require("pako/lib/zlib/constants");for(var key in constants)exports[key]=constants[key];exports.NONE=0,exports.DEFLATE=1,exports.INFLATE=2,exports.GZIP=3,exports.GUNZIP=4,exports.DEFLATERAW=5,exports.INFLATERAW=6,exports.UNZIP=7;var GZIP_HEADER_ID1=31,GZIP_HEADER_ID2=139;function Zlib(t){if("number"!=typeof t||texports.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=t,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}Zlib.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,assert(this.init_done,"close before init"),assert(this.mode<=exports.UNZIP),this.mode===exports.DEFLATE||this.mode===exports.GZIP||this.mode===exports.DEFLATERAW?zlib_deflate.deflateEnd(this.strm):this.mode!==exports.INFLATE&&this.mode!==exports.GUNZIP&&this.mode!==exports.INFLATERAW&&this.mode!==exports.UNZIP||zlib_inflate.inflateEnd(this.strm),this.mode=exports.NONE,this.dictionary=null)},Zlib.prototype.write=function(t,e,s,i,r,o,n){return this._write(!0,t,e,s,i,r,o,n)},Zlib.prototype.writeSync=function(t,e,s,i,r,o,n){return this._write(!1,t,e,s,i,r,o,n)},Zlib.prototype._write=function(t,e,s,i,r,o,n,h){if(assert.equal(arguments.length,8),assert(this.init_done,"write before init"),assert(this.mode!==exports.NONE,"already finalized"),assert.equal(!1,this.write_in_progress,"write already in progress"),assert.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,assert.equal(!1,void 0===e,"must provide flush value"),this.write_in_progress=!0,e!==exports.Z_NO_FLUSH&&e!==exports.Z_PARTIAL_FLUSH&&e!==exports.Z_SYNC_FLUSH&&e!==exports.Z_FULL_FLUSH&&e!==exports.Z_FINISH&&e!==exports.Z_BLOCK)throw new Error("Invalid flush value");if(null==s&&(s=Buffer.alloc(0),r=0,i=0),this.strm.avail_in=r,this.strm.input=s,this.strm.next_in=i,this.strm.avail_out=h,this.strm.output=o,this.strm.next_out=n,this.flush=e,!t)return this._process(),this._checkError()?this._afterSync():void 0;var a=this;return process.nextTick(function(){a._process(),a._after()}),this},Zlib.prototype._afterSync=function(){var t=this.strm.avail_out,e=this.strm.avail_in;return this.write_in_progress=!1,[e,t]},Zlib.prototype._process=function(){var t=null;switch(this.mode){case exports.DEFLATE:case exports.GZIP:case exports.DEFLATERAW:this.err=zlib_deflate.deflate(this.strm,this.flush);break;case exports.UNZIP:switch(this.strm.avail_in>0&&(t=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===t)break;if(this.strm.input[t]!==GZIP_HEADER_ID1){this.mode=exports.INFLATE;break}if(this.gzip_id_bytes_read=1,t++,1===this.strm.avail_in)break;case 1:if(null===t)break;this.strm.input[t]===GZIP_HEADER_ID2?(this.gzip_id_bytes_read=2,this.mode=exports.GUNZIP):this.mode=exports.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case exports.INFLATE:case exports.GUNZIP:case exports.INFLATERAW:for(this.err=zlib_inflate.inflate(this.strm,this.flush),this.err===exports.Z_NEED_DICT&&this.dictionary&&(this.err=zlib_inflate.inflateSetDictionary(this.strm,this.dictionary),this.err===exports.Z_OK?this.err=zlib_inflate.inflate(this.strm,this.flush):this.err===exports.Z_DATA_ERROR&&(this.err=exports.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===exports.GUNZIP&&this.err===exports.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=zlib_inflate.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},Zlib.prototype._checkError=function(){switch(this.err){case exports.Z_OK:case exports.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===exports.Z_FINISH)return this._error("unexpected end of file"),!1;break;case exports.Z_STREAM_END:break;case exports.Z_NEED_DICT:return null==this.dictionary?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},Zlib.prototype._after=function(){if(this._checkError()){var t=this.strm.avail_out,e=this.strm.avail_in;this.write_in_progress=!1,this.callback(e,t),this.pending_close&&this.close()}},Zlib.prototype._error=function(t){this.strm.msg&&(t=this.strm.msg),this.onerror(t,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},Zlib.prototype.init=function(t,e,s,i,r){assert(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),assert(t>=8&&t<=15,"invalid windowBits"),assert(e>=-1&&e<=9,"invalid compression level"),assert(s>=1&&s<=9,"invalid memlevel"),assert(i===exports.Z_FILTERED||i===exports.Z_HUFFMAN_ONLY||i===exports.Z_RLE||i===exports.Z_FIXED||i===exports.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(e,t,s,i,r),this._setDictionary()},Zlib.prototype.params=function(){throw new Error("deflateParams Not supported")},Zlib.prototype.reset=function(){this._reset(),this._setDictionary()},Zlib.prototype._init=function(t,e,s,i,r){switch(this.level=t,this.windowBits=e,this.memLevel=s,this.strategy=i,this.flush=exports.Z_NO_FLUSH,this.err=exports.Z_OK,this.mode!==exports.GZIP&&this.mode!==exports.GUNZIP||(this.windowBits+=16),this.mode===exports.UNZIP&&(this.windowBits+=32),this.mode!==exports.DEFLATERAW&&this.mode!==exports.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new Zstream,this.mode){case exports.DEFLATE:case exports.GZIP:case exports.DEFLATERAW:this.err=zlib_deflate.deflateInit2(this.strm,this.level,exports.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case exports.INFLATE:case exports.GUNZIP:case exports.INFLATERAW:case exports.UNZIP:this.err=zlib_inflate.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==exports.Z_OK&&this._error("Init error"),this.dictionary=r,this.write_in_progress=!1,this.init_done=!0},Zlib.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=exports.Z_OK,this.mode){case exports.DEFLATE:case exports.DEFLATERAW:this.err=zlib_deflate.deflateSetDictionary(this.strm,this.dictionary)}this.err!==exports.Z_OK&&this._error("Failed to set dictionary")}},Zlib.prototype._reset=function(){switch(this.err=exports.Z_OK,this.mode){case exports.DEFLATE:case exports.DEFLATERAW:case exports.GZIP:this.err=zlib_deflate.deflateReset(this.strm);break;case exports.INFLATE:case exports.INFLATERAW:case exports.GUNZIP:this.err=zlib_inflate.inflateReset(this.strm)}this.err!==exports.Z_OK&&this._error("Failed to reset stream")},exports.Zlib=Zlib; @@ -3108,19 +3108,19 @@ var assignValue=require("./_assignValue"),copyObject=require("./_copyObject"),cr }).call(this,require("buffer").Buffer) -},{"base64-js":273,"buffer":283,"ieee754":487}],735:[function(require,module,exports){ -"use strict";module.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}; - -},{}],743:[function(require,module,exports){ +},{"base64-js":273,"buffer":283,"ieee754":487}],743:[function(require,module,exports){ "use strict";function ZStream(){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}module.exports=ZStream; -},{}],739:[function(require,module,exports){ -"use strict";var utils=require("../utils/common"),adler32=require("./adler32"),crc32=require("./crc32"),inflate_fast=require("./inffast"),inflate_table=require("./inftrees"),CODES=0,LENS=1,DISTS=2,Z_FINISH=4,Z_BLOCK=5,Z_TREES=6,Z_OK=0,Z_STREAM_END=1,Z_NEED_DICT=2,Z_STREAM_ERROR=-2,Z_DATA_ERROR=-3,Z_MEM_ERROR=-4,Z_BUF_ERROR=-5,Z_DEFLATED=8,HEAD=1,FLAGS=2,TIME=3,OS=4,EXLEN=5,EXTRA=6,NAME=7,COMMENT=8,HCRC=9,DICTID=10,DICT=11,TYPE=12,TYPEDO=13,STORED=14,COPY_=15,COPY=16,TABLE=17,LENLENS=18,CODELENS=19,LEN_=20,LEN=21,LENEXT=22,DIST=23,DISTEXT=24,MATCH=25,LIT=26,CHECK=27,LENGTH=28,DONE=29,BAD=30,MEM=31,SYNC=32,ENOUGH_LENS=852,ENOUGH_DISTS=592,MAX_WBITS=15,DEF_WBITS=MAX_WBITS;function zswap32(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function InflateState(){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 utils.Buf16(320),this.work=new utils.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function inflateResetKeep(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=HEAD,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new utils.Buf32(ENOUGH_LENS),t.distcode=t.distdyn=new utils.Buf32(ENOUGH_DISTS),t.sane=1,t.back=-1,Z_OK):Z_STREAM_ERROR}function inflateReset(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,inflateResetKeep(e)):Z_STREAM_ERROR}function inflateReset2(e,t){var a,i;return e&&e.state?(i=e.state,t<0?(a=0,t=-t):(a=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?Z_STREAM_ERROR:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=a,i.wbits=t,inflateReset(e))):Z_STREAM_ERROR}function inflateInit2(e,t){var a,i;return e?(i=new InflateState,e.state=i,i.window=null,(a=inflateReset2(e,t))!==Z_OK&&(e.state=null),a):Z_STREAM_ERROR}function inflateInit(e){return inflateInit2(e,DEF_WBITS)}var lenfix,distfix,virgin=!0;function fixedtables(e){if(virgin){var t;for(lenfix=new utils.Buf32(512),distfix=new utils.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(inflate_table(LENS,e.lens,0,288,lenfix,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;inflate_table(DISTS,e.lens,0,32,distfix,0,e.work,{bits:5}),virgin=!1}e.lencode=lenfix,e.lenbits=9,e.distcode=distfix,e.distbits=5}function updatewindow(e,t,a,i){var n,s=e.state;return null===s.window&&(s.wsize=1<=s.wsize?(utils.arraySet(s.window,t,a-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):((n=s.wsize-s.wnext)>i&&(n=i),utils.arraySet(s.window,t,a-i,n,s.wnext),(i-=n)?(utils.arraySet(s.window,t,a-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,a.check=crc32(a.check,v,2,0),d=0,f=0,a.mode=FLAGS;break}if(a.flags=0,a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&d)<<8)+(d>>8))%31){e.msg="incorrect header check",a.mode=BAD;break}if((15&d)!==Z_DEFLATED){e.msg="unknown compression method",a.mode=BAD;break}if(f-=4,D=8+(15&(d>>>=4)),0===a.wbits)a.wbits=D;else if(D>a.wbits){e.msg="invalid window size",a.mode=BAD;break}a.dmax=1<>8&1),512&a.flags&&(v[0]=255&d,v[1]=d>>>8&255,a.check=crc32(a.check,v,2,0)),d=0,f=0,a.mode=TIME;case TIME:for(;f<32;){if(0===r)break e;r--,d+=i[s++]<>>8&255,v[2]=d>>>16&255,v[3]=d>>>24&255,a.check=crc32(a.check,v,4,0)),d=0,f=0,a.mode=OS;case OS:for(;f<16;){if(0===r)break e;r--,d+=i[s++]<>8),512&a.flags&&(v[0]=255&d,v[1]=d>>>8&255,a.check=crc32(a.check,v,2,0)),d=0,f=0,a.mode=EXLEN;case EXLEN:if(1024&a.flags){for(;f<16;){if(0===r)break e;r--,d+=i[s++]<>>8&255,a.check=crc32(a.check,v,2,0)),d=0,f=0}else a.head&&(a.head.extra=null);a.mode=EXTRA;case EXTRA:if(1024&a.flags&&((E=a.length)>r&&(E=r),E&&(a.head&&(D=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Array(a.head.extra_len)),utils.arraySet(a.head.extra,i,s,E,D)),512&a.flags&&(a.check=crc32(a.check,i,E,s)),r-=E,s+=E,a.length-=E),a.length))break e;a.length=0,a.mode=NAME;case NAME:if(2048&a.flags){if(0===r)break e;E=0;do{D=i[s+E++],a.head&&D&&a.length<65536&&(a.head.name+=String.fromCharCode(D))}while(D&&E>9&1,a.head.done=!0),e.adler=a.check=0,a.mode=TYPE;break;case DICTID:for(;f<32;){if(0===r)break e;r--,d+=i[s++]<>>=7&f,f-=7&f,a.mode=CHECK;break}for(;f<3;){if(0===r)break e;r--,d+=i[s++]<>>=1)){case 0:a.mode=STORED;break;case 1:if(fixedtables(a),a.mode=LEN_,t===Z_TREES){d>>>=2,f-=2;break e}break;case 2:a.mode=TABLE;break;case 3:e.msg="invalid block type",a.mode=BAD}d>>>=2,f-=2;break;case STORED:for(d>>>=7&f,f-=7&f;f<32;){if(0===r)break e;r--,d+=i[s++]<>>16^65535)){e.msg="invalid stored block lengths",a.mode=BAD;break}if(a.length=65535&d,d=0,f=0,a.mode=COPY_,t===Z_TREES)break e;case COPY_:a.mode=COPY;case COPY:if(E=a.length){if(E>r&&(E=r),E>o&&(E=o),0===E)break e;utils.arraySet(n,i,s,E,l),r-=E,s+=E,o-=E,l+=E,a.length-=E;break}a.mode=TYPE;break;case TABLE:for(;f<14;){if(0===r)break e;r--,d+=i[s++]<>>=5,f-=5,a.ndist=1+(31&d),d>>>=5,f-=5,a.ncode=4+(15&d),d>>>=4,f-=4,a.nlen>286||a.ndist>30){e.msg="too many length or distance symbols",a.mode=BAD;break}a.have=0,a.mode=LENLENS;case LENLENS:for(;a.have>>=3,f-=3}for(;a.have<19;)a.lens[O[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,S={bits:a.lenbits},g=inflate_table(CODES,a.lens,0,19,a.lencode,0,a.work,S),a.lenbits=S.bits,g){e.msg="invalid code lengths set",a.mode=BAD;break}a.have=0,a.mode=CODELENS;case CODELENS:for(;a.have>>16&255,w=65535&A,!((k=A>>>24)<=f);){if(0===r)break e;r--,d+=i[s++]<>>=k,f-=k,a.lens[a.have++]=w;else{if(16===w){for(x=k+2;f>>=k,f-=k,0===a.have){e.msg="invalid bit length repeat",a.mode=BAD;break}D=a.lens[a.have-1],E=3+(3&d),d>>>=2,f-=2}else if(17===w){for(x=k+3;f>>=k)),d>>>=3,f-=3}else{for(x=k+7;f>>=k)),d>>>=7,f-=7}if(a.have+E>a.nlen+a.ndist){e.msg="invalid bit length repeat",a.mode=BAD;break}for(;E--;)a.lens[a.have++]=D}}if(a.mode===BAD)break;if(0===a.lens[256]){e.msg="invalid code -- missing end-of-block",a.mode=BAD;break}if(a.lenbits=9,S={bits:a.lenbits},g=inflate_table(LENS,a.lens,0,a.nlen,a.lencode,0,a.work,S),a.lenbits=S.bits,g){e.msg="invalid literal/lengths set",a.mode=BAD;break}if(a.distbits=6,a.distcode=a.distdyn,S={bits:a.distbits},g=inflate_table(DISTS,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,S),a.distbits=S.bits,g){e.msg="invalid distances set",a.mode=BAD;break}if(a.mode=LEN_,t===Z_TREES)break e;case LEN_:a.mode=LEN;case LEN:if(r>=6&&o>=258){e.next_out=l,e.avail_out=o,e.next_in=s,e.avail_in=r,a.hold=d,a.bits=f,inflate_fast(e,h),l=e.next_out,n=e.output,o=e.avail_out,s=e.next_in,i=e.input,r=e.avail_in,d=a.hold,f=a.bits,a.mode===TYPE&&(a.back=-1);break}for(a.back=0;m=(A=a.lencode[d&(1<>>16&255,w=65535&A,!((k=A>>>24)<=f);){if(0===r)break e;r--,d+=i[s++]<>u)])>>>16&255,w=65535&A,!(u+(k=A>>>24)<=f);){if(0===r)break e;r--,d+=i[s++]<>>=u,f-=u,a.back+=u}if(d>>>=k,f-=k,a.back+=k,a.length=w,0===m){a.mode=LIT;break}if(32&m){a.back=-1,a.mode=TYPE;break}if(64&m){e.msg="invalid literal/length code",a.mode=BAD;break}a.extra=15&m,a.mode=LENEXT;case LENEXT:if(a.extra){for(x=a.extra;f>>=a.extra,f-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=DIST;case DIST:for(;m=(A=a.distcode[d&(1<>>16&255,w=65535&A,!((k=A>>>24)<=f);){if(0===r)break e;r--,d+=i[s++]<>u)])>>>16&255,w=65535&A,!(u+(k=A>>>24)<=f);){if(0===r)break e;r--,d+=i[s++]<>>=u,f-=u,a.back+=u}if(d>>>=k,f-=k,a.back+=k,64&m){e.msg="invalid distance code",a.mode=BAD;break}a.offset=w,a.extra=15&m,a.mode=DISTEXT;case DISTEXT:if(a.extra){for(x=a.extra;f>>=a.extra,f-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){e.msg="invalid distance too far back",a.mode=BAD;break}a.mode=MATCH;case MATCH:if(0===o)break e;if(E=h-o,a.offset>E){if((E=a.offset-E)>a.whave&&a.sane){e.msg="invalid distance too far back",a.mode=BAD;break}E>a.wnext?(E-=a.wnext,b=a.wsize-E):b=a.wnext-E,E>a.length&&(E=a.length),_=a.window}else _=n,b=l-a.offset,E=a.length;E>o&&(E=o),o-=E,a.length-=E;do{n[l++]=_[b++]}while(--E);0===a.length&&(a.mode=LEN);break;case LIT:if(0===o)break e;n[l++]=a.length,o--,a.mode=LEN;break;case CHECK:if(a.wrap){for(;f<32;){if(0===r)break e;r--,d|=i[s++]<4?9:0)}function zero(t){for(var e=t.length;--e>=0;)t[e]=0}function flush_pending(t){var e=t.state,_=e.pending;_>t.avail_out&&(_=t.avail_out),0!==_&&(utils.arraySet(t.output,e.pending_buf,e.pending_out,_,t.next_out),t.next_out+=_,e.pending_out+=_,t.total_out+=_,t.avail_out-=_,e.pending-=_,0===e.pending&&(e.pending_out=0))}function flush_block_only(t,e){trees._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,flush_pending(t.strm)}function put_byte(t,e){t.pending_buf[t.pending++]=e}function putShortMSB(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function read_buf(t,e,_,a){var s=t.avail_in;return s>a&&(s=a),0===s?0:(t.avail_in-=s,utils.arraySet(e,t.input,t.next_in,s,_),1===t.state.wrap?t.adler=adler32(t.adler,e,s,_):2===t.state.wrap&&(t.adler=crc32(t.adler,e,s,_)),t.next_in+=s,t.total_in+=s,s)}function longest_match(t,e){var _,a,s=t.max_chain_length,i=t.strstart,n=t.prev_length,r=t.nice_match,l=t.strstart>t.w_size-MIN_LOOKAHEAD?t.strstart-(t.w_size-MIN_LOOKAHEAD):0,h=t.window,o=t.w_mask,d=t.prev,u=t.strstart+MAX_MATCH,f=h[i+n-1],E=h[i+n];t.prev_length>=t.good_match&&(s>>=2),r>t.lookahead&&(r=t.lookahead);do{if(h[(_=e)+n]===E&&h[_+n-1]===f&&h[_]===h[i]&&h[++_]===h[i+1]){i+=2,_++;do{}while(h[++i]===h[++_]&&h[++i]===h[++_]&&h[++i]===h[++_]&&h[++i]===h[++_]&&h[++i]===h[++_]&&h[++i]===h[++_]&&h[++i]===h[++_]&&h[++i]===h[++_]&&in){if(t.match_start=e,n=a,a>=r)break;f=h[i+n-1],E=h[i+n]}}}while((e=d[e&o])>l&&0!=--s);return n<=t.lookahead?n:t.lookahead}function fill_window(t){var e,_,a,s,i,n=t.w_size;do{if(s=t.window_size-t.lookahead-t.strstart,t.strstart>=n+(n-MIN_LOOKAHEAD)){utils.arraySet(t.window,t.window,n,n,0),t.match_start-=n,t.strstart-=n,t.block_start-=n,e=_=t.hash_size;do{a=t.head[--e],t.head[e]=a>=n?a-n:0}while(--_);e=_=n;do{a=t.prev[--e],t.prev[e]=a>=n?a-n:0}while(--_);s+=n}if(0===t.strm.avail_in)break;if(_=read_buf(t.strm,t.window,t.strstart+t.lookahead,s),t.lookahead+=_,t.lookahead+t.insert>=MIN_MATCH)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=(t.ins_h<t.pending_buf_size-5&&(_=t.pending_buf_size-5);;){if(t.lookahead<=1){if(fill_window(t),0===t.lookahead&&e===Z_NO_FLUSH)return BS_NEED_MORE;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var a=t.block_start+_;if((0===t.strstart||t.strstart>=a)&&(t.lookahead=t.strstart-a,t.strstart=a,flush_block_only(t,!1),0===t.strm.avail_out))return BS_NEED_MORE;if(t.strstart-t.block_start>=t.w_size-MIN_LOOKAHEAD&&(flush_block_only(t,!1),0===t.strm.avail_out))return BS_NEED_MORE}return t.insert=0,e===Z_FINISH?(flush_block_only(t,!0),0===t.strm.avail_out?BS_FINISH_STARTED:BS_FINISH_DONE):(t.strstart>t.block_start&&(flush_block_only(t,!1),t.strm.avail_out),BS_NEED_MORE)}function deflate_fast(t,e){for(var _,a;;){if(t.lookahead=MIN_MATCH&&(t.ins_h=(t.ins_h<=MIN_MATCH)if(a=trees._tr_tally(t,t.strstart-t.match_start,t.match_length-MIN_MATCH),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=MIN_MATCH){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<=MIN_MATCH&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=MIN_MATCH-1)),t.prev_length>=MIN_MATCH&&t.match_length<=t.prev_length){s=t.strstart+t.lookahead-MIN_MATCH,a=trees._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-MIN_MATCH),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=s&&(t.ins_h=(t.ins_h<=MIN_MATCH&&t.strstart>0&&(a=n[s=t.strstart-1])===n[++s]&&a===n[++s]&&a===n[++s]){i=t.strstart+MAX_MATCH;do{}while(a===n[++s]&&a===n[++s]&&a===n[++s]&&a===n[++s]&&a===n[++s]&&a===n[++s]&&a===n[++s]&&a===n[++s]&&st.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=MIN_MATCH?(_=trees._tr_tally(t,1,t.match_length-MIN_MATCH),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(_=trees._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),_&&(flush_block_only(t,!1),0===t.strm.avail_out))return BS_NEED_MORE}return t.insert=0,e===Z_FINISH?(flush_block_only(t,!0),0===t.strm.avail_out?BS_FINISH_STARTED:BS_FINISH_DONE):t.last_lit&&(flush_block_only(t,!1),0===t.strm.avail_out)?BS_NEED_MORE:BS_BLOCK_DONE}function deflate_huff(t,e){for(var _;;){if(0===t.lookahead&&(fill_window(t),0===t.lookahead)){if(e===Z_NO_FLUSH)return BS_NEED_MORE;break}if(t.match_length=0,_=trees._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,_&&(flush_block_only(t,!1),0===t.strm.avail_out))return BS_NEED_MORE}return t.insert=0,e===Z_FINISH?(flush_block_only(t,!0),0===t.strm.avail_out?BS_FINISH_STARTED:BS_FINISH_DONE):t.last_lit&&(flush_block_only(t,!1),0===t.strm.avail_out)?BS_NEED_MORE:BS_BLOCK_DONE}function Config(t,e,_,a,s){this.good_length=t,this.max_lazy=e,this.nice_length=_,this.max_chain=a,this.func=s}function lm_init(t){t.window_size=2*t.w_size,zero(t.head),t.max_lazy_match=configuration_table[t.level].max_lazy,t.good_match=configuration_table[t.level].good_length,t.nice_match=configuration_table[t.level].nice_length,t.max_chain_length=configuration_table[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=MIN_MATCH-1,t.match_available=0,t.ins_h=0}function DeflateState(){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=Z_DEFLATED,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 utils.Buf16(2*HEAP_SIZE),this.dyn_dtree=new utils.Buf16(2*(2*D_CODES+1)),this.bl_tree=new utils.Buf16(2*(2*BL_CODES+1)),zero(this.dyn_ltree),zero(this.dyn_dtree),zero(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new utils.Buf16(MAX_BITS+1),this.heap=new utils.Buf16(2*L_CODES+1),zero(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new utils.Buf16(2*L_CODES+1),zero(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 deflateResetKeep(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=Z_UNKNOWN,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?INIT_STATE:BUSY_STATE,t.adler=2===e.wrap?0:1,e.last_flush=Z_NO_FLUSH,trees._tr_init(e),Z_OK):err(t,Z_STREAM_ERROR)}function deflateReset(t){var e=deflateResetKeep(t);return e===Z_OK&&lm_init(t.state),e}function deflateSetHeader(t,e){return t&&t.state?2!==t.state.wrap?Z_STREAM_ERROR:(t.state.gzhead=e,Z_OK):Z_STREAM_ERROR}function deflateInit2(t,e,_,a,s,i){if(!t)return Z_STREAM_ERROR;var n=1;if(e===Z_DEFAULT_COMPRESSION&&(e=6),a<0?(n=0,a=-a):a>15&&(n=2,a-=16),s<1||s>MAX_MEM_LEVEL||_!==Z_DEFLATED||a<8||a>15||e<0||e>9||i<0||i>Z_FIXED)return err(t,Z_STREAM_ERROR);8===a&&(a=9);var r=new DeflateState;return t.state=r,r.strm=t,r.wrap=n,r.gzhead=null,r.w_bits=a,r.w_size=1<Z_BLOCK||e<0)return t?err(t,Z_STREAM_ERROR):Z_STREAM_ERROR;if(a=t.state,!t.output||!t.input&&0!==t.avail_in||a.status===FINISH_STATE&&e!==Z_FINISH)return err(t,0===t.avail_out?Z_BUF_ERROR:Z_STREAM_ERROR);if(a.strm=t,_=a.last_flush,a.last_flush=e,a.status===INIT_STATE)if(2===a.wrap)t.adler=0,put_byte(a,31),put_byte(a,139),put_byte(a,8),a.gzhead?(put_byte(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),put_byte(a,255&a.gzhead.time),put_byte(a,a.gzhead.time>>8&255),put_byte(a,a.gzhead.time>>16&255),put_byte(a,a.gzhead.time>>24&255),put_byte(a,9===a.level?2:a.strategy>=Z_HUFFMAN_ONLY||a.level<2?4:0),put_byte(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(put_byte(a,255&a.gzhead.extra.length),put_byte(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(t.adler=crc32(t.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=EXTRA_STATE):(put_byte(a,0),put_byte(a,0),put_byte(a,0),put_byte(a,0),put_byte(a,0),put_byte(a,9===a.level?2:a.strategy>=Z_HUFFMAN_ONLY||a.level<2?4:0),put_byte(a,OS_CODE),a.status=BUSY_STATE);else{var n=Z_DEFLATED+(a.w_bits-8<<4)<<8;n|=(a.strategy>=Z_HUFFMAN_ONLY||a.level<2?0:a.level<6?1:6===a.level?2:3)<<6,0!==a.strstart&&(n|=PRESET_DICT),n+=31-n%31,a.status=BUSY_STATE,putShortMSB(a,n),0!==a.strstart&&(putShortMSB(a,t.adler>>>16),putShortMSB(a,65535&t.adler)),t.adler=1}if(a.status===EXTRA_STATE)if(a.gzhead.extra){for(s=a.pending;a.gzindex<(65535&a.gzhead.extra.length)&&(a.pending!==a.pending_buf_size||(a.gzhead.hcrc&&a.pending>s&&(t.adler=crc32(t.adler,a.pending_buf,a.pending-s,s)),flush_pending(t),s=a.pending,a.pending!==a.pending_buf_size));)put_byte(a,255&a.gzhead.extra[a.gzindex]),a.gzindex++;a.gzhead.hcrc&&a.pending>s&&(t.adler=crc32(t.adler,a.pending_buf,a.pending-s,s)),a.gzindex===a.gzhead.extra.length&&(a.gzindex=0,a.status=NAME_STATE)}else a.status=NAME_STATE;if(a.status===NAME_STATE)if(a.gzhead.name){s=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>s&&(t.adler=crc32(t.adler,a.pending_buf,a.pending-s,s)),flush_pending(t),s=a.pending,a.pending===a.pending_buf_size)){i=1;break}i=a.gzindexs&&(t.adler=crc32(t.adler,a.pending_buf,a.pending-s,s)),0===i&&(a.gzindex=0,a.status=COMMENT_STATE)}else a.status=COMMENT_STATE;if(a.status===COMMENT_STATE)if(a.gzhead.comment){s=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>s&&(t.adler=crc32(t.adler,a.pending_buf,a.pending-s,s)),flush_pending(t),s=a.pending,a.pending===a.pending_buf_size)){i=1;break}i=a.gzindexs&&(t.adler=crc32(t.adler,a.pending_buf,a.pending-s,s)),0===i&&(a.status=HCRC_STATE)}else a.status=HCRC_STATE;if(a.status===HCRC_STATE&&(a.gzhead.hcrc?(a.pending+2>a.pending_buf_size&&flush_pending(t),a.pending+2<=a.pending_buf_size&&(put_byte(a,255&t.adler),put_byte(a,t.adler>>8&255),t.adler=0,a.status=BUSY_STATE)):a.status=BUSY_STATE),0!==a.pending){if(flush_pending(t),0===t.avail_out)return a.last_flush=-1,Z_OK}else if(0===t.avail_in&&rank(e)<=rank(_)&&e!==Z_FINISH)return err(t,Z_BUF_ERROR);if(a.status===FINISH_STATE&&0!==t.avail_in)return err(t,Z_BUF_ERROR);if(0!==t.avail_in||0!==a.lookahead||e!==Z_NO_FLUSH&&a.status!==FINISH_STATE){var r=a.strategy===Z_HUFFMAN_ONLY?deflate_huff(a,e):a.strategy===Z_RLE?deflate_rle(a,e):configuration_table[a.level].func(a,e);if(r!==BS_FINISH_STARTED&&r!==BS_FINISH_DONE||(a.status=FINISH_STATE),r===BS_NEED_MORE||r===BS_FINISH_STARTED)return 0===t.avail_out&&(a.last_flush=-1),Z_OK;if(r===BS_BLOCK_DONE&&(e===Z_PARTIAL_FLUSH?trees._tr_align(a):e!==Z_BLOCK&&(trees._tr_stored_block(a,0,0,!1),e===Z_FULL_FLUSH&&(zero(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),flush_pending(t),0===t.avail_out))return a.last_flush=-1,Z_OK}return e!==Z_FINISH?Z_OK:a.wrap<=0?Z_STREAM_END:(2===a.wrap?(put_byte(a,255&t.adler),put_byte(a,t.adler>>8&255),put_byte(a,t.adler>>16&255),put_byte(a,t.adler>>24&255),put_byte(a,255&t.total_in),put_byte(a,t.total_in>>8&255),put_byte(a,t.total_in>>16&255),put_byte(a,t.total_in>>24&255)):(putShortMSB(a,t.adler>>>16),putShortMSB(a,65535&t.adler)),flush_pending(t),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?Z_OK:Z_STREAM_END)}function deflateEnd(t){var e;return t&&t.state?(e=t.state.status)!==INIT_STATE&&e!==EXTRA_STATE&&e!==NAME_STATE&&e!==COMMENT_STATE&&e!==HCRC_STATE&&e!==BUSY_STATE&&e!==FINISH_STATE?err(t,Z_STREAM_ERROR):(t.state=null,e===BUSY_STATE?err(t,Z_DATA_ERROR):Z_OK):Z_STREAM_ERROR}function deflateSetDictionary(t,e){var _,a,s,i,n,r,l,h,o=e.length;if(!t||!t.state)return Z_STREAM_ERROR;if(2===(i=(_=t.state).wrap)||1===i&&_.status!==INIT_STATE||_.lookahead)return Z_STREAM_ERROR;for(1===i&&(t.adler=adler32(t.adler,e,o,0)),_.wrap=0,o>=_.w_size&&(0===i&&(zero(_.head),_.strstart=0,_.block_start=0,_.insert=0),h=new utils.Buf8(_.w_size),utils.arraySet(h,e,o-_.w_size,_.w_size,0),e=h,o=_.w_size),n=t.avail_in,r=t.next_in,l=t.input,t.avail_in=o,t.next_in=0,t.input=e,fill_window(_);_.lookahead>=MIN_MATCH;){a=_.strstart,s=_.lookahead-(MIN_MATCH-1);do{_.ins_h=(_.ins_h<<_.hash_shift^_.window[a+MIN_MATCH-1])&_.hash_mask,_.prev[a&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=a,a++}while(--s);_.strstart=a,_.lookahead=MIN_MATCH-1,fill_window(_)}return _.strstart+=_.lookahead,_.block_start=_.strstart,_.insert=_.lookahead,_.lookahead=0,_.match_length=_.prev_length=MIN_MATCH-1,_.match_available=0,t.next_in=r,t.input=l,t.avail_in=n,_.wrap=i,Z_OK}configuration_table=[new Config(0,0,0,0,deflate_stored),new Config(4,4,8,4,deflate_fast),new Config(4,5,16,8,deflate_fast),new Config(4,6,32,32,deflate_fast),new Config(4,4,16,16,deflate_slow),new Config(8,16,32,32,deflate_slow),new Config(8,16,128,128,deflate_slow),new Config(8,32,128,256,deflate_slow),new Config(32,128,258,1024,deflate_slow),new Config(32,258,258,4096,deflate_slow)],/* common-shake removed: exports.deflateInit = */ deflateInit,exports.deflateInit2=deflateInit2,exports.deflateReset=deflateReset,/* common-shake removed: exports.deflateResetKeep = */ deflateResetKeep,/* common-shake removed: exports.deflateSetHeader = */ deflateSetHeader,exports.deflate=deflate,exports.deflateEnd=deflateEnd,exports.deflateSetDictionary=deflateSetDictionary,/* common-shake removed: exports.deflateInfo = */ "pako deflate (from Nodeca project)"; -},{"../utils/common":733,"./adler32":734,"./crc32":736,"./messages":741,"./trees":742}],281:[function(require,module,exports){ +},{"../utils/common":733,"./adler32":734,"./crc32":736,"./messages":741,"./trees":742}],739:[function(require,module,exports){ +"use strict";var utils=require("../utils/common"),adler32=require("./adler32"),crc32=require("./crc32"),inflate_fast=require("./inffast"),inflate_table=require("./inftrees"),CODES=0,LENS=1,DISTS=2,Z_FINISH=4,Z_BLOCK=5,Z_TREES=6,Z_OK=0,Z_STREAM_END=1,Z_NEED_DICT=2,Z_STREAM_ERROR=-2,Z_DATA_ERROR=-3,Z_MEM_ERROR=-4,Z_BUF_ERROR=-5,Z_DEFLATED=8,HEAD=1,FLAGS=2,TIME=3,OS=4,EXLEN=5,EXTRA=6,NAME=7,COMMENT=8,HCRC=9,DICTID=10,DICT=11,TYPE=12,TYPEDO=13,STORED=14,COPY_=15,COPY=16,TABLE=17,LENLENS=18,CODELENS=19,LEN_=20,LEN=21,LENEXT=22,DIST=23,DISTEXT=24,MATCH=25,LIT=26,CHECK=27,LENGTH=28,DONE=29,BAD=30,MEM=31,SYNC=32,ENOUGH_LENS=852,ENOUGH_DISTS=592,MAX_WBITS=15,DEF_WBITS=MAX_WBITS;function zswap32(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function InflateState(){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 utils.Buf16(320),this.work=new utils.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function inflateResetKeep(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=HEAD,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new utils.Buf32(ENOUGH_LENS),t.distcode=t.distdyn=new utils.Buf32(ENOUGH_DISTS),t.sane=1,t.back=-1,Z_OK):Z_STREAM_ERROR}function inflateReset(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,inflateResetKeep(e)):Z_STREAM_ERROR}function inflateReset2(e,t){var a,i;return e&&e.state?(i=e.state,t<0?(a=0,t=-t):(a=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?Z_STREAM_ERROR:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=a,i.wbits=t,inflateReset(e))):Z_STREAM_ERROR}function inflateInit2(e,t){var a,i;return e?(i=new InflateState,e.state=i,i.window=null,(a=inflateReset2(e,t))!==Z_OK&&(e.state=null),a):Z_STREAM_ERROR}function inflateInit(e){return inflateInit2(e,DEF_WBITS)}var lenfix,distfix,virgin=!0;function fixedtables(e){if(virgin){var t;for(lenfix=new utils.Buf32(512),distfix=new utils.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(inflate_table(LENS,e.lens,0,288,lenfix,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;inflate_table(DISTS,e.lens,0,32,distfix,0,e.work,{bits:5}),virgin=!1}e.lencode=lenfix,e.lenbits=9,e.distcode=distfix,e.distbits=5}function updatewindow(e,t,a,i){var n,s=e.state;return null===s.window&&(s.wsize=1<=s.wsize?(utils.arraySet(s.window,t,a-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):((n=s.wsize-s.wnext)>i&&(n=i),utils.arraySet(s.window,t,a-i,n,s.wnext),(i-=n)?(utils.arraySet(s.window,t,a-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,a.check=crc32(a.check,v,2,0),d=0,f=0,a.mode=FLAGS;break}if(a.flags=0,a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&d)<<8)+(d>>8))%31){e.msg="incorrect header check",a.mode=BAD;break}if((15&d)!==Z_DEFLATED){e.msg="unknown compression method",a.mode=BAD;break}if(f-=4,D=8+(15&(d>>>=4)),0===a.wbits)a.wbits=D;else if(D>a.wbits){e.msg="invalid window size",a.mode=BAD;break}a.dmax=1<>8&1),512&a.flags&&(v[0]=255&d,v[1]=d>>>8&255,a.check=crc32(a.check,v,2,0)),d=0,f=0,a.mode=TIME;case TIME:for(;f<32;){if(0===r)break e;r--,d+=i[s++]<>>8&255,v[2]=d>>>16&255,v[3]=d>>>24&255,a.check=crc32(a.check,v,4,0)),d=0,f=0,a.mode=OS;case OS:for(;f<16;){if(0===r)break e;r--,d+=i[s++]<>8),512&a.flags&&(v[0]=255&d,v[1]=d>>>8&255,a.check=crc32(a.check,v,2,0)),d=0,f=0,a.mode=EXLEN;case EXLEN:if(1024&a.flags){for(;f<16;){if(0===r)break e;r--,d+=i[s++]<>>8&255,a.check=crc32(a.check,v,2,0)),d=0,f=0}else a.head&&(a.head.extra=null);a.mode=EXTRA;case EXTRA:if(1024&a.flags&&((E=a.length)>r&&(E=r),E&&(a.head&&(D=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Array(a.head.extra_len)),utils.arraySet(a.head.extra,i,s,E,D)),512&a.flags&&(a.check=crc32(a.check,i,E,s)),r-=E,s+=E,a.length-=E),a.length))break e;a.length=0,a.mode=NAME;case NAME:if(2048&a.flags){if(0===r)break e;E=0;do{D=i[s+E++],a.head&&D&&a.length<65536&&(a.head.name+=String.fromCharCode(D))}while(D&&E>9&1,a.head.done=!0),e.adler=a.check=0,a.mode=TYPE;break;case DICTID:for(;f<32;){if(0===r)break e;r--,d+=i[s++]<>>=7&f,f-=7&f,a.mode=CHECK;break}for(;f<3;){if(0===r)break e;r--,d+=i[s++]<>>=1)){case 0:a.mode=STORED;break;case 1:if(fixedtables(a),a.mode=LEN_,t===Z_TREES){d>>>=2,f-=2;break e}break;case 2:a.mode=TABLE;break;case 3:e.msg="invalid block type",a.mode=BAD}d>>>=2,f-=2;break;case STORED:for(d>>>=7&f,f-=7&f;f<32;){if(0===r)break e;r--,d+=i[s++]<>>16^65535)){e.msg="invalid stored block lengths",a.mode=BAD;break}if(a.length=65535&d,d=0,f=0,a.mode=COPY_,t===Z_TREES)break e;case COPY_:a.mode=COPY;case COPY:if(E=a.length){if(E>r&&(E=r),E>o&&(E=o),0===E)break e;utils.arraySet(n,i,s,E,l),r-=E,s+=E,o-=E,l+=E,a.length-=E;break}a.mode=TYPE;break;case TABLE:for(;f<14;){if(0===r)break e;r--,d+=i[s++]<>>=5,f-=5,a.ndist=1+(31&d),d>>>=5,f-=5,a.ncode=4+(15&d),d>>>=4,f-=4,a.nlen>286||a.ndist>30){e.msg="too many length or distance symbols",a.mode=BAD;break}a.have=0,a.mode=LENLENS;case LENLENS:for(;a.have>>=3,f-=3}for(;a.have<19;)a.lens[O[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,S={bits:a.lenbits},g=inflate_table(CODES,a.lens,0,19,a.lencode,0,a.work,S),a.lenbits=S.bits,g){e.msg="invalid code lengths set",a.mode=BAD;break}a.have=0,a.mode=CODELENS;case CODELENS:for(;a.have>>16&255,w=65535&A,!((k=A>>>24)<=f);){if(0===r)break e;r--,d+=i[s++]<>>=k,f-=k,a.lens[a.have++]=w;else{if(16===w){for(x=k+2;f>>=k,f-=k,0===a.have){e.msg="invalid bit length repeat",a.mode=BAD;break}D=a.lens[a.have-1],E=3+(3&d),d>>>=2,f-=2}else if(17===w){for(x=k+3;f>>=k)),d>>>=3,f-=3}else{for(x=k+7;f>>=k)),d>>>=7,f-=7}if(a.have+E>a.nlen+a.ndist){e.msg="invalid bit length repeat",a.mode=BAD;break}for(;E--;)a.lens[a.have++]=D}}if(a.mode===BAD)break;if(0===a.lens[256]){e.msg="invalid code -- missing end-of-block",a.mode=BAD;break}if(a.lenbits=9,S={bits:a.lenbits},g=inflate_table(LENS,a.lens,0,a.nlen,a.lencode,0,a.work,S),a.lenbits=S.bits,g){e.msg="invalid literal/lengths set",a.mode=BAD;break}if(a.distbits=6,a.distcode=a.distdyn,S={bits:a.distbits},g=inflate_table(DISTS,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,S),a.distbits=S.bits,g){e.msg="invalid distances set",a.mode=BAD;break}if(a.mode=LEN_,t===Z_TREES)break e;case LEN_:a.mode=LEN;case LEN:if(r>=6&&o>=258){e.next_out=l,e.avail_out=o,e.next_in=s,e.avail_in=r,a.hold=d,a.bits=f,inflate_fast(e,h),l=e.next_out,n=e.output,o=e.avail_out,s=e.next_in,i=e.input,r=e.avail_in,d=a.hold,f=a.bits,a.mode===TYPE&&(a.back=-1);break}for(a.back=0;m=(A=a.lencode[d&(1<>>16&255,w=65535&A,!((k=A>>>24)<=f);){if(0===r)break e;r--,d+=i[s++]<>u)])>>>16&255,w=65535&A,!(u+(k=A>>>24)<=f);){if(0===r)break e;r--,d+=i[s++]<>>=u,f-=u,a.back+=u}if(d>>>=k,f-=k,a.back+=k,a.length=w,0===m){a.mode=LIT;break}if(32&m){a.back=-1,a.mode=TYPE;break}if(64&m){e.msg="invalid literal/length code",a.mode=BAD;break}a.extra=15&m,a.mode=LENEXT;case LENEXT:if(a.extra){for(x=a.extra;f>>=a.extra,f-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=DIST;case DIST:for(;m=(A=a.distcode[d&(1<>>16&255,w=65535&A,!((k=A>>>24)<=f);){if(0===r)break e;r--,d+=i[s++]<>u)])>>>16&255,w=65535&A,!(u+(k=A>>>24)<=f);){if(0===r)break e;r--,d+=i[s++]<>>=u,f-=u,a.back+=u}if(d>>>=k,f-=k,a.back+=k,64&m){e.msg="invalid distance code",a.mode=BAD;break}a.offset=w,a.extra=15&m,a.mode=DISTEXT;case DISTEXT:if(a.extra){for(x=a.extra;f>>=a.extra,f-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){e.msg="invalid distance too far back",a.mode=BAD;break}a.mode=MATCH;case MATCH:if(0===o)break e;if(E=h-o,a.offset>E){if((E=a.offset-E)>a.whave&&a.sane){e.msg="invalid distance too far back",a.mode=BAD;break}E>a.wnext?(E-=a.wnext,b=a.wsize-E):b=a.wnext-E,E>a.length&&(E=a.length),_=a.window}else _=n,b=l-a.offset,E=a.length;E>o&&(E=o),o-=E,a.length-=E;do{n[l++]=_[b++]}while(--E);0===a.length&&(a.mode=LEN);break;case LIT:if(0===o)break e;n[l++]=a.length,o--,a.mode=LEN;break;case CHECK:if(a.wrap){for(;f<32;){if(0===r)break e;r--,d|=i[s++]<=kMaxLength?s=new RangeError(kRangeErrorMessage):n=Buffer.concat(t,r),t=[],e.close(),i(s,n)}e.on("error",function(n){e.removeListener("end",f),e.removeListener("readable",s),i(n)}),e.on("end",f),e.end(n),s()}function zlibBufferSync(e,n){if("string"==typeof n&&(n=Buffer.from(n)),!Buffer.isBuffer(n))throw new TypeError("Not a string or buffer");var i=e._finishFlushFlag;return e._processChunk(n,i)}function Deflate(e){if(!(this instanceof Deflate))return new Deflate(e);Zlib.call(this,e,binding.DEFLATE)}function Inflate(e){if(!(this instanceof Inflate))return new Inflate(e);Zlib.call(this,e,binding.INFLATE)}function Gzip(e){if(!(this instanceof Gzip))return new Gzip(e);Zlib.call(this,e,binding.GZIP)}function Gunzip(e){if(!(this instanceof Gunzip))return new Gunzip(e);Zlib.call(this,e,binding.GUNZIP)}function DeflateRaw(e){if(!(this instanceof DeflateRaw))return new DeflateRaw(e);Zlib.call(this,e,binding.DEFLATERAW)}function InflateRaw(e){if(!(this instanceof InflateRaw))return new InflateRaw(e);Zlib.call(this,e,binding.INFLATERAW)}function Unzip(e){if(!(this instanceof Unzip))return new Unzip(e);Zlib.call(this,e,binding.UNZIP)}function isValidFlushFlag(e){return e===binding.Z_NO_FLUSH||e===binding.Z_PARTIAL_FLUSH||e===binding.Z_SYNC_FLUSH||e===binding.Z_FULL_FLUSH||e===binding.Z_FINISH||e===binding.Z_BLOCK}function Zlib(e,n){var i=this;if(this._opts=e=e||{},this._chunkSize=e.chunkSize||exports.Z_DEFAULT_CHUNK,Transform.call(this,e),e.flush&&!isValidFlushFlag(e.flush))throw new Error("Invalid flush flag: "+e.flush);if(e.finishFlush&&!isValidFlushFlag(e.finishFlush))throw new Error("Invalid flush flag: "+e.finishFlush);if(this._flushFlag=e.flush||binding.Z_NO_FLUSH,this._finishFlushFlag=void 0!==e.finishFlush?e.finishFlush:binding.Z_FINISH,e.chunkSize&&(e.chunkSizeexports.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBitsexports.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.levelexports.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevelexports.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=exports.Z_FILTERED&&e.strategy!=exports.Z_HUFFMAN_ONLY&&e.strategy!=exports.Z_RLE&&e.strategy!=exports.Z_FIXED&&e.strategy!=exports.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!Buffer.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new binding.Zlib(n);var t=this;this._hadError=!1,this._handle.onerror=function(e,n){_close(t),t._hadError=!0;var i=new Error(e);i.errno=n,i.code=exports.codes[n],t.emit("error",i)};var r=exports.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(r=e.level);var s=exports.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(s=e.strategy),this._handle.init(e.windowBits||exports.Z_DEFAULT_WINDOWBITS,r,e.memLevel||exports.Z_DEFAULT_MEMLEVEL,s,e.dictionary),this._buffer=Buffer.allocUnsafe(this._chunkSize),this._offset=0,this._level=r,this._strategy=s,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!i._handle},configurable:!0,enumerable:!0})}function _close(e,n){n&&process.nextTick(n),e._handle&&(e._handle.close(),e._handle=null)}function emitCloseNT(e){e.emit("close")}Object.defineProperty(exports,"codes",{enumerable:!0,value:Object.freeze(codes),writable:!1}),/* common-shake removed: exports.Deflate = */ Deflate,/* common-shake removed: exports.Inflate = */ Inflate,/* common-shake removed: exports.Gzip = */ Gzip,/* common-shake removed: exports.Gunzip = */ Gunzip,/* common-shake removed: exports.DeflateRaw = */ DeflateRaw,/* common-shake removed: exports.InflateRaw = */ InflateRaw,/* common-shake removed: exports.Unzip = */ Unzip,/* common-shake removed: exports.createDeflate = */ void 0, function(e){return new Deflate(e)},/* common-shake removed: exports.createInflate = */ void 0, function(e){return new Inflate(e)},/* common-shake removed: exports.createDeflateRaw = */ void 0, function(e){return new DeflateRaw(e)},/* common-shake removed: exports.createInflateRaw = */ void 0, function(e){return new InflateRaw(e)},/* common-shake removed: exports.createGzip = */ void 0, function(e){return new Gzip(e)},/* common-shake removed: exports.createGunzip = */ void 0, function(e){return new Gunzip(e)},exports.createUnzip=function(e){return new Unzip(e)},/* common-shake removed: exports.deflate = */ void 0, function(e,n,i){return"function"==typeof n&&(i=n,n={}),zlibBuffer(new Deflate(n),e,i)},/* common-shake removed: exports.deflateSync = */ void 0, function(e,n){return zlibBufferSync(new Deflate(n),e)},/* common-shake removed: exports.gzip = */ void 0, function(e,n,i){return"function"==typeof n&&(i=n,n={}),zlibBuffer(new Gzip(n),e,i)},/* common-shake removed: exports.gzipSync = */ void 0, function(e,n){return zlibBufferSync(new Gzip(n),e)},/* common-shake removed: exports.deflateRaw = */ void 0, function(e,n,i){return"function"==typeof n&&(i=n,n={}),zlibBuffer(new DeflateRaw(n),e,i)},/* common-shake removed: exports.deflateRawSync = */ void 0, function(e,n){return zlibBufferSync(new DeflateRaw(n),e)},/* common-shake removed: exports.unzip = */ void 0, function(e,n,i){return"function"==typeof n&&(i=n,n={}),zlibBuffer(new Unzip(n),e,i)},/* common-shake removed: exports.unzipSync = */ void 0, function(e,n){return zlibBufferSync(new Unzip(n),e)},/* common-shake removed: exports.inflate = */ void 0, function(e,n,i){return"function"==typeof n&&(i=n,n={}),zlibBuffer(new Inflate(n),e,i)},/* common-shake removed: exports.inflateSync = */ void 0, function(e,n){return zlibBufferSync(new Inflate(n),e)},/* common-shake removed: exports.gunzip = */ void 0, function(e,n,i){return"function"==typeof n&&(i=n,n={}),zlibBuffer(new Gunzip(n),e,i)},/* common-shake removed: exports.gunzipSync = */ void 0, function(e,n){return zlibBufferSync(new Gunzip(n),e)},/* common-shake removed: exports.inflateRaw = */ void 0, function(e,n,i){return"function"==typeof n&&(i=n,n={}),zlibBuffer(new InflateRaw(n),e,i)},/* common-shake removed: exports.inflateRawSync = */ void 0, function(e,n){return zlibBufferSync(new InflateRaw(n),e)},util.inherits(Zlib,Transform),Zlib.prototype.params=function(e,n,i){if(eexports.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(n!=exports.Z_FILTERED&&n!=exports.Z_HUFFMAN_ONLY&&n!=exports.Z_RLE&&n!=exports.Z_FIXED&&n!=exports.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+n);if(this._level!==e||this._strategy!==n){var t=this;this.flush(binding.Z_SYNC_FLUSH,function(){assert(t._handle,"zlib binding closed"),t._handle.params(e,n),t._hadError||(t._level=e,t._strategy=n,i&&i())})}else process.nextTick(i)},Zlib.prototype.reset=function(){return assert(this._handle,"zlib binding closed"),this._handle.reset()},Zlib.prototype._flush=function(e){this._transform(Buffer.alloc(0),"",e)},Zlib.prototype.flush=function(e,n){var i=this,t=this._writableState;("function"==typeof e||void 0===e&&!n)&&(n=e,e=binding.Z_FULL_FLUSH),t.ended?n&&process.nextTick(n):t.ending?n&&this.once("end",n):t.needDrain?n&&this.once("drain",function(){return i.flush(e,n)}):(this._flushFlag=e,this.write(Buffer.alloc(0),"",n))},Zlib.prototype.close=function(e){_close(this,e),process.nextTick(emitCloseNT,this)},Zlib.prototype._transform=function(e,n,i){var t,r=this._writableState,s=(r.ending||r.ended)&&(!e||r.length===e.length);return null===e||Buffer.isBuffer(e)?this._handle?(s?t=this._finishFlushFlag:(t=this._flushFlag,e.length>=r.length&&(this._flushFlag=this._opts.flush||binding.Z_NO_FLUSH)),void this._processChunk(e,t,i)):i(new Error("zlib binding closed")):i(new Error("invalid input"))},Zlib.prototype._processChunk=function(e,n,i){var t=e&&e.length,r=this._chunkSize-this._offset,s=0,f=this,o="function"==typeof i;if(!o){var l,a=[],u=0;this.on("error",function(e){l=e}),assert(this._handle,"zlib binding closed");do{var _=this._handle.writeSync(n,e,s,t,this._buffer,this._offset,r)}while(!this._hadError&&d(_[0],_[1]));if(this._hadError)throw l;if(u>=kMaxLength)throw _close(this),new RangeError(kRangeErrorMessage);var c=Buffer.concat(a,u);return _close(this),c}assert(this._handle,"zlib binding closed");var h=this._handle.write(n,e,s,t,this._buffer,this._offset,r);function d(l,_){if(this&&(this.buffer=null,this.callback=null),!f._hadError){var c=r-_;if(assert(c>=0,"have should not go down"),c>0){var h=f._buffer.slice(f._offset,f._offset+c);f._offset+=c,o?f.push(h):(a.push(h),u+=h.length)}if((0===_||f._offset>=f._chunkSize)&&(r=f._chunkSize,f._offset=0,f._buffer=Buffer.allocUnsafe(f._chunkSize)),0===_){if(s+=t-l,t=l,!o)return!0;var b=f._handle.write(n,e,s,t,f._buffer,f._offset,f._chunkSize);return b.callback=d,void(b.buffer=e)}if(!o)return!1;i()}}h.buffer=e,h.callback=d},util.inherits(Deflate,Zlib),util.inherits(Inflate,Zlib),util.inherits(Gzip,Zlib),util.inherits(Gunzip,Zlib),util.inherits(DeflateRaw,Zlib),util.inherits(InflateRaw,Zlib),util.inherits(Unzip,Zlib); @@ -3173,13 +3173,13 @@ module.exports=function(o){return"object"==typeof o?null!==o:"function"==typeof },{}],297:[function(require,module,exports){ var wellKnownSymbol=require("../internals/well-known-symbol"),create=require("../internals/object-create"),createNonEnumerableProperty=require("../internals/create-non-enumerable-property"),UNSCOPABLES=wellKnownSymbol("unscopables"),ArrayPrototype=Array.prototype;null==ArrayPrototype[UNSCOPABLES]&&createNonEnumerableProperty(ArrayPrototype,UNSCOPABLES,create(null)),module.exports=function(e){ArrayPrototype[UNSCOPABLES][e]=!0}; -},{"../internals/create-non-enumerable-property":313,"../internals/object-create":352,"../internals/well-known-symbol":399}],399:[function(require,module,exports){ -var global=require("../internals/global"),shared=require("../internals/shared"),uid=require("../internals/uid"),NATIVE_SYMBOL=require("../internals/native-symbol"),Symbol=global.Symbol,store=shared("wks");module.exports=function(e){return store[e]||(store[e]=NATIVE_SYMBOL&&Symbol[e]||(NATIVE_SYMBOL?Symbol:uid)("Symbol."+e))}; - -},{"../internals/global":328,"../internals/native-symbol":348,"../internals/shared":382,"../internals/uid":396}],352:[function(require,module,exports){ +},{"../internals/create-non-enumerable-property":313,"../internals/object-create":352,"../internals/well-known-symbol":399}],352:[function(require,module,exports){ var anObject=require("../internals/an-object"),defineProperties=require("../internals/object-define-properties"),enumBugKeys=require("../internals/enum-bug-keys"),hiddenKeys=require("../internals/hidden-keys"),html=require("../internals/html"),documentCreateElement=require("../internals/document-create-element"),sharedKey=require("../internals/shared-key"),IE_PROTO=sharedKey("IE_PROTO"),PROTOTYPE="prototype",Empty=function(){},createDict=function(){var e,t=documentCreateElement("iframe"),r=enumBugKeys.length;for(t.style.display="none",html.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write("