@aws-amplify/interactions 4.0.48 → 4.0.49-next.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +78 -0
- package/dist/aws-amplify-interactions.js +30438 -8762
- package/dist/aws-amplify-interactions.js.map +1 -1
- package/dist/aws-amplify-interactions.min.js +166 -5
- package/dist/aws-amplify-interactions.min.js.map +1 -1
- package/lib/Interactions.d.ts +2 -2
- package/lib/Interactions.js +41 -68
- package/lib/Interactions.js.map +1 -1
- package/lib/Providers/AWSLexProvider.d.ts +16 -3
- package/lib/Providers/AWSLexProvider.js +106 -119
- package/lib/Providers/AWSLexProvider.js.map +1 -1
- package/lib/Providers/AWSLexProviderHelper/commonUtils.d.ts +1 -0
- package/lib/Providers/AWSLexProviderHelper/commonUtils.js +39 -0
- package/lib/Providers/AWSLexProviderHelper/commonUtils.js.map +1 -0
- package/lib/Providers/AWSLexProviderHelper/utils.d.ts +3 -0
- package/lib/Providers/AWSLexProviderHelper/utils.js +48 -0
- package/lib/Providers/AWSLexProviderHelper/utils.js.map +1 -0
- package/lib/Providers/AWSLexProviderHelper/utils.native.d.ts +3 -0
- package/lib/Providers/AWSLexProviderHelper/utils.native.js +65 -0
- package/lib/Providers/AWSLexProviderHelper/utils.native.js.map +1 -0
- package/lib/Providers/AWSLexV2Provider.d.ts +58 -0
- package/lib/Providers/AWSLexV2Provider.js +292 -0
- package/lib/Providers/AWSLexV2Provider.js.map +1 -0
- package/lib/Providers/InteractionsProvider.js +3 -13
- package/lib/Providers/InteractionsProvider.js.map +1 -1
- package/lib/Providers/index.d.ts +1 -0
- package/lib/Providers/index.js +4 -5
- package/lib/Providers/index.js.map +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +4 -4
- package/lib/index.js.map +1 -1
- package/lib/types/Provider.d.ts +2 -1
- package/lib/types/Providers/AWSLexProvider.d.ts +10 -0
- package/lib/types/Providers/AWSLexProvider.js +3 -0
- package/lib/types/Providers/AWSLexProvider.js.map +1 -0
- package/lib/types/Providers/AWSLexV2Provider.d.ts +12 -0
- package/lib/types/Providers/AWSLexV2Provider.js +3 -0
- package/lib/types/Providers/AWSLexV2Provider.js.map +1 -0
- package/lib/types/index.d.ts +2 -0
- package/lib-esm/Interactions.d.ts +2 -2
- package/lib-esm/Interactions.js +38 -65
- package/lib-esm/Interactions.js.map +1 -1
- package/lib-esm/Providers/AWSLexProvider.d.ts +16 -3
- package/lib-esm/Providers/AWSLexProvider.js +102 -115
- package/lib-esm/Providers/AWSLexProvider.js.map +1 -1
- package/lib-esm/Providers/AWSLexProviderHelper/commonUtils.d.ts +1 -0
- package/lib-esm/Providers/AWSLexProviderHelper/commonUtils.js +37 -0
- package/lib-esm/Providers/AWSLexProviderHelper/commonUtils.js.map +1 -0
- package/lib-esm/Providers/AWSLexProviderHelper/utils.d.ts +3 -0
- package/lib-esm/Providers/AWSLexProviderHelper/utils.js +46 -0
- package/lib-esm/Providers/AWSLexProviderHelper/utils.js.map +1 -0
- package/lib-esm/Providers/AWSLexProviderHelper/utils.native.d.ts +3 -0
- package/lib-esm/Providers/AWSLexProviderHelper/utils.native.js +63 -0
- package/lib-esm/Providers/AWSLexProviderHelper/utils.native.js.map +1 -0
- package/lib-esm/Providers/AWSLexV2Provider.d.ts +58 -0
- package/lib-esm/Providers/AWSLexV2Provider.js +290 -0
- package/lib-esm/Providers/AWSLexV2Provider.js.map +1 -0
- package/lib-esm/Providers/InteractionsProvider.js +1 -11
- package/lib-esm/Providers/InteractionsProvider.js.map +1 -1
- package/lib-esm/Providers/index.d.ts +1 -0
- package/lib-esm/Providers/index.js +1 -0
- package/lib-esm/Providers/index.js.map +1 -1
- package/lib-esm/index.d.ts +2 -0
- package/lib-esm/index.js +2 -0
- package/lib-esm/index.js.map +1 -1
- package/lib-esm/types/Provider.d.ts +2 -1
- package/lib-esm/types/Providers/AWSLexProvider.d.ts +10 -0
- package/lib-esm/types/Providers/AWSLexProvider.js +1 -0
- package/lib-esm/types/Providers/AWSLexProvider.js.map +1 -0
- package/lib-esm/types/Providers/AWSLexV2Provider.d.ts +12 -0
- package/lib-esm/types/Providers/AWSLexV2Provider.js +1 -0
- package/lib-esm/types/Providers/AWSLexV2Provider.js.map +1 -0
- package/lib-esm/types/index.d.ts +2 -0
- package/package.json +9 -4
- package/src/Interactions.ts +43 -21
- package/src/Providers/AWSLexProvider.ts +70 -23
- package/src/Providers/AWSLexProviderHelper/commonUtils.ts +27 -0
- package/src/Providers/AWSLexProviderHelper/utils.native.ts +56 -0
- package/src/Providers/AWSLexProviderHelper/utils.ts +39 -0
- package/src/Providers/AWSLexV2Provider.ts +343 -0
- package/src/Providers/index.ts +1 -0
- package/src/index.ts +2 -0
- package/src/types/Provider.ts +1 -1
- package/src/types/Providers/AWSLexProvider.ts +23 -0
- package/src/types/Providers/AWSLexV2Provider.ts +25 -0
- package/src/types/index.ts +2 -0
- package/lib/Providers/AWSLexProviderHelper/convert.d.ts +0 -3
- package/lib/Providers/AWSLexProviderHelper/convert.js +0 -13
- package/lib/Providers/AWSLexProviderHelper/convert.js.map +0 -1
- package/lib/Providers/AWSLexProviderHelper/convert.native.d.ts +0 -1
- package/lib/Providers/AWSLexProviderHelper/convert.native.js +0 -56
- package/lib/Providers/AWSLexProviderHelper/convert.native.js.map +0 -1
- package/lib-esm/Providers/AWSLexProviderHelper/convert.d.ts +0 -3
- package/lib-esm/Providers/AWSLexProviderHelper/convert.js +0 -11
- package/lib-esm/Providers/AWSLexProviderHelper/convert.js.map +0 -1
- package/lib-esm/Providers/AWSLexProviderHelper/convert.native.d.ts +0 -1
- package/lib-esm/Providers/AWSLexProviderHelper/convert.native.js +0 -54
- package/lib-esm/Providers/AWSLexProviderHelper/convert.native.js.map +0 -1
- package/src/Providers/AWSLexProviderHelper/convert.native.ts +0 -13
- package/src/Providers/AWSLexProviderHelper/convert.ts +0 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("aws_amplify_core")):"function"==typeof define&&define.amd?define("aws_amplify_interactions",["aws_amplify_core"],t):"object"==typeof exports?exports.aws_amplify_interactions=t(require("aws_amplify_core")):e.aws_amplify_interactions=t(e.aws_amplify_core)}(this,(function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=43)}([function(e,t,r){"use strict";r.d(t,"c",(function(){return i})),r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return a})),r.d(t,"d",(function(){return s})),r.d(t,"e",(function(){return u}));var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function a(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))}function s(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}Object.create;function u(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}Object.create},function(e,t,r){"use strict";r.r(t),r.d(t,"__extends",(function(){return i})),r.d(t,"__assign",(function(){return o})),r.d(t,"__rest",(function(){return a})),r.d(t,"__decorate",(function(){return s})),r.d(t,"__param",(function(){return u})),r.d(t,"__metadata",(function(){return c})),r.d(t,"__awaiter",(function(){return f})),r.d(t,"__generator",(function(){return l})),r.d(t,"__createBinding",(function(){return d})),r.d(t,"__exportStar",(function(){return h})),r.d(t,"__values",(function(){return p})),r.d(t,"__read",(function(){return v})),r.d(t,"__spread",(function(){return g})),r.d(t,"__spreadArrays",(function(){return m})),r.d(t,"__await",(function(){return b})),r.d(t,"__asyncGenerator",(function(){return y})),r.d(t,"__asyncDelegator",(function(){return w})),r.d(t,"__asyncValues",(function(){return _})),r.d(t,"__makeTemplateObject",(function(){return O})),r.d(t,"__importStar",(function(){return S})),r.d(t,"__importDefault",(function(){return A})),r.d(t,"__classPrivateFieldGet",(function(){return E})),r.d(t,"__classPrivateFieldSet",(function(){return x}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("aws_amplify_core")):"function"==typeof define&&define.amd?define("aws_amplify_interactions",["aws_amplify_core"],t):"object"==typeof exports?exports.aws_amplify_interactions=t(require("aws_amplify_core")):e.aws_amplify_interactions=t(e.aws_amplify_core)}(this,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=85)}([function(e,t,n){"use strict";n.d(t,"f",(function(){return o})),n.d(t,"a",(function(){return i})),n.d(t,"i",(function(){return a})),n.d(t,"e",(function(){return u})),n.d(t,"g",(function(){return s})),n.d(t,"k",(function(){return c})),n.d(t,"h",(function(){return l})),n.d(t,"j",(function(){return f})),n.d(t,"d",(function(){return d})),n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return h}));var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function s(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}Object.create;function c(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function f(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function d(e){return this instanceof d?(this.v=e,this):new d(e)}function p(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof d?Promise.resolve(n.value.v).then(s,c):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function l(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function h(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=c(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}Object.create},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return f})),n.d(t,"e",(function(){return d})),n.d(t,"c",(function(){return b})),n.d(t,"d",(function(){return m}));var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function o(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function i(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function a(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(i(arguments[t]));return e}var u=function(){var e=[],t=[],n=new Set,i=function(n){return e.forEach((function(e){n.add(e.middleware,r({},e))})),t.forEach((function(e){n.addRelativeTo(e.middleware,r({},e))})),n},l=function(e){var t=[];return e.before.forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,a(l(e)))})),t.push(e),e.after.reverse().forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,a(l(e)))})),t},f=function(){var n,o=[],i=[],u={};return e.forEach((function(e){var t=r(r({},e),{before:[],after:[]});t.name&&(u[t.name]=t),o.push(t)})),t.forEach((function(e){var t=r(r({},e),{before:[],after:[]});t.name&&(u[t.name]=t),i.push(t)})),i.forEach((function(e){if(e.toMiddleware){var t=u[e.toMiddleware];if(void 0===t)throw new Error(e.toMiddleware+" is not found when adding "+(e.name||"anonymous")+" middleware "+e.relation+" "+e.toMiddleware);"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}})),(n=o,n.sort((function(e,t){return s[t.step]-s[e.step]||c[t.priority||"normal"]-c[e.priority||"normal"]}))).map(l).reduce((function(e,t){return e.push.apply(e,a(t)),e}),[]).map((function(e){return e.middleware}))},d={add:function(t,o){void 0===o&&(o={});var i=o.name,a=o.override,u=r({step:"initialize",priority:"normal",middleware:t},o);if(i){if(n.has(i)){if(!a)throw new Error("Duplicate middleware name '"+i+"'");var s=e.findIndex((function(e){return e.name===i})),c=e[s];if(c.step!==u.step||c.priority!==u.priority)throw new Error('"'+i+'" middleware with '+c.priority+" priority in "+c.step+" step cannot be overridden by same-name middleware with "+u.priority+" priority in "+u.step+" step.");e.splice(s,1)}n.add(i)}e.push(u)},addRelativeTo:function(e,o){var i=o.name,a=o.override,u=r({middleware:e},o);if(i){if(n.has(i)){if(!a)throw new Error("Duplicate middleware name '"+i+"'");var s=t.findIndex((function(e){return e.name===i})),c=t[s];if(c.toMiddleware!==u.toMiddleware||c.relation!==u.relation)throw new Error('"'+i+'" middleware '+c.relation+' "'+c.toMiddleware+'" middleware cannot be overridden by same-name middleware '+u.relation+' "'+u.toMiddleware+'" middleware.');t.splice(s,1)}n.add(i)}t.push(u)},clone:function(){return i(u())},use:function(e){e.applyToStack(d)},remove:function(r){return"string"==typeof r?function(r){var o=!1,i=function(e){return!e.name||e.name!==r||(o=!0,n.delete(r),!1)};return e=e.filter(i),t=t.filter(i),o}(r):function(r){var o=!1,i=function(e){return e.middleware!==r||(o=!0,e.name&&n.delete(e.name),!1)};return e=e.filter(i),t=t.filter(i),o}(r)},removeByTag:function(r){var o=!1,i=function(e){var t=e.tags,i=e.name;return!t||!t.includes(r)||(i&&n.delete(i),o=!0,!1)};return e=e.filter(i),t=t.filter(i),o},concat:function(e){var t=i(u());return t.use(e),t},applyToStack:i,resolve:function(e,t){var n,r;try{for(var i=o(f().reverse()),a=i.next();!a.done;a=i.next()){e=(0,a.value)(e,t)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e}};return d},s={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},c={high:3,normal:2,low:1},l=function(){function e(e){this.middlewareStack=u(),this.config=e}return e.prototype.send=function(e,t,n){var r="function"!=typeof t?t:void 0,o="function"==typeof t?t:n,i=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!o)return i(e).then((function(e){return e.output}));i(e).then((function(e){return o(null,e.output)}),(function(e){return o(e)})).catch((function(){}))},e.prototype.destroy=function(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()},e}(),f=function(){this.middlewareStack=u()};function d(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16)}))}var p=function(e,t){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function h(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function v(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(h(arguments[t]));return e}var y=function(){var e=Object.getPrototypeOf(this).constructor,t=Function.bind.apply(String,v([null],arguments)),n=new t;return Object.setPrototypeOf(n,e.prototype),n};y.prototype=Object.create(String.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(y,String);var b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return function(e,t){function n(){this.constructor=e}p(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.deserializeJSON=function(){return JSON.parse(e.prototype.toString.call(this))},t.prototype.toJSON=function(){return e.prototype.toString.call(this)},t.fromObject=function(e){return e instanceof t?e:new t(e instanceof String||"string"==typeof e?e:JSON.stringify(e))},t}(y);var m="***SensitiveInformation***"},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return a}));var r=function(){function e(e){this.statusCode=e.statusCode,this.headers=e.headers||{},this.body=e.body}return e.isInstance=function(e){if(!e)return!1;var t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers},e}();
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
@@ -12,15 +12,176 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
12
12
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */
|
|
16
|
-
var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function i(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function a(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function s(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function u(e,t){return function(r,n){t(r,n,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function f(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))}function l(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function d(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}function h(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||(t[r]=e[r])}function p(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function m(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function y(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){o.push([e,t,r,n])>1||s(e,t)}))})}function s(e,t){try{(r=i[e](t)).value instanceof b?Promise.resolve(r.value.v).then(u,c):f(o[0][2],r)}catch(e){f(o[0][3],e)}var r}function u(e){s("next",e)}function c(e){s("throw",e)}function f(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function w(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:b(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=p(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}}function O(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function S(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function A(e){return e&&e.__esModule?e:{default:e}}function E(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function x(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return u})),r.d(t,"e",(function(){return c})),r.d(t,"c",(function(){return l})),r.d(t,"d",(function(){return d}));var n=r(1),i=function(){var e=[],t=[],r=new Set,s=function(r){return e.forEach((function(e){r.add(e.middleware,Object(n.__assign)({},e))})),t.forEach((function(e){r.addRelativeTo(e.middleware,Object(n.__assign)({},e))})),r},u=function(e){var t=[];return e.before.forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,Object(n.__spread)(u(e)))})),t.push(e),e.after.reverse().forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,Object(n.__spread)(u(e)))})),t},c=function(){var r,i=[],s=[],c={};return e.forEach((function(e){var t=Object(n.__assign)(Object(n.__assign)({},e),{before:[],after:[]});t.name&&(c[t.name]=t),i.push(t)})),t.forEach((function(e){var t=Object(n.__assign)(Object(n.__assign)({},e),{before:[],after:[]});t.name&&(c[t.name]=t),s.push(t)})),s.forEach((function(e){if(e.toMiddleware){var t=c[e.toMiddleware];if(void 0===t)throw new Error(e.toMiddleware+" is not found when adding "+(e.name||"anonymous")+" middleware "+e.relation+" "+e.toMiddleware);"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}})),(r=i,r.sort((function(e,t){return o[t.step]-o[e.step]||a[t.priority||"normal"]-a[e.priority||"normal"]}))).map(u).reduce((function(e,t){return e.push.apply(e,Object(n.__spread)(t)),e}),[]).map((function(e){return e.middleware}))},f={add:function(t,i){void 0===i&&(i={});var o=i.name,a=i.override,s=Object(n.__assign)({step:"initialize",priority:"normal",middleware:t},i);if(o){if(r.has(o)){if(!a)throw new Error("Duplicate middleware name '"+o+"'");var u=e.findIndex((function(e){return e.name===o})),c=e[u];if(c.step!==s.step||c.priority!==s.priority)throw new Error('"'+o+'" middleware with '+c.priority+" priority in "+c.step+" step cannot be overridden by same-name middleware with "+s.priority+" priority in "+s.step+" step.");e.splice(u,1)}r.add(o)}e.push(s)},addRelativeTo:function(e,i){var o=i.name,a=i.override,s=Object(n.__assign)({middleware:e},i);if(o){if(r.has(o)){if(!a)throw new Error("Duplicate middleware name '"+o+"'");var u=t.findIndex((function(e){return e.name===o})),c=t[u];if(c.toMiddleware!==s.toMiddleware||c.relation!==s.relation)throw new Error('"'+o+'" middleware '+c.relation+' "'+c.toMiddleware+'" middleware cannot be overridden by same-name middleware '+s.relation+' "'+s.toMiddleware+'" middleware.');t.splice(u,1)}r.add(o)}t.push(s)},clone:function(){return s(i())},use:function(e){e.applyToStack(f)},remove:function(n){return"string"==typeof n?function(n){var i=!1,o=function(e){return!e.name||e.name!==n||(i=!0,r.delete(n),!1)};return e=e.filter(o),t=t.filter(o),i}(n):function(n){var i=!1,o=function(e){return e.middleware!==n||(i=!0,e.name&&r.delete(e.name),!1)};return e=e.filter(o),t=t.filter(o),i}(n)},removeByTag:function(n){var i=!1,o=function(e){var t=e.tags,o=e.name;return!t||!t.includes(n)||(o&&r.delete(o),i=!0,!1)};return e=e.filter(o),t=t.filter(o),i},concat:function(e){var t=s(i());return t.use(e),t},applyToStack:s,resolve:function(e,t){var r,i;try{for(var o=Object(n.__values)(c().reverse()),a=o.next();!a.done;a=o.next()){e=(0,a.value)(e,t)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return e}};return f},o={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},a={high:3,normal:2,low:1},s=function(){function e(e){this.middlewareStack=i(),this.config=e}return e.prototype.send=function(e,t,r){var n="function"!=typeof t?t:void 0,i="function"==typeof t?t:r,o=e.resolveMiddleware(this.middlewareStack,this.config,n);if(!i)return o(e).then((function(e){return e.output}));o(e).then((function(e){return i(null,e.output)}),(function(e){return i(e)})).catch((function(){}))},e.prototype.destroy=function(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()},e}(),u=function(){this.middlewareStack=i()};function c(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16)}))}var f=function(){var e=Object.getPrototypeOf(this).constructor,t=Function.bind.apply(String,Object(n.__spread)([null],arguments)),r=new t;return Object.setPrototypeOf(r,e.prototype),r};f.prototype=Object.create(String.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(f,String);var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype.deserializeJSON=function(){return JSON.parse(e.prototype.toString.call(this))},t.prototype.toJSON=function(){return e.prototype.toString.call(this)},t.fromObject=function(e){return e instanceof t?e:new t(e instanceof String||"string"==typeof e?e:JSON.stringify(e))},t}(f);var d="***SensitiveInformation***"},function(e,t,r){"use strict";r.d(t,"b",(function(){return n})),r.d(t,"a",(function(){return o}));var n=function(){function e(e){this.statusCode=e.statusCode,this.headers=e.headers||{},this.body=e.body}return e.isInstance=function(e){if(!e)return!1;var t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers},e}(),i=r(1),o=function(){function e(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.substr(-1)?e.protocol+":":e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?"/"+e.path:e.path:"/"}return e.isInstance=function(e){if(!e)return!1;var t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers},e.prototype.clone=function(){var t,r=new e(Object(i.__assign)(Object(i.__assign)({},this),{headers:Object(i.__assign)({},this.headers)}));return r.query&&(r.query=(t=r.query,Object.keys(t).reduce((function(e,r){var n,o=t[r];return Object(i.__assign)(Object(i.__assign)({},e),((n={})[r]=Array.isArray(o)?Object(i.__spread)(o):o,n))}),{}))),r},e}()},function(t,r){t.exports=e},function(e,t,r){"use strict";(function(e){r.d(t,"c",(function(){return a})),r.d(t,"d",(function(){return s})),r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return f}));var n=r(0),i=r(3),o=r(2),a=function(t,r){return Object(n.b)(void 0,void 0,void 0,(function(){var a,s,u,c,f,l,d,h,p;return Object(n.d)(this,(function(v){switch(v.label){case 0:if(a=Object(n.a)(Object(n.a)(Object(n.a)(Object(n.a)(Object(n.a)({"content-type":"application/octet-stream","x-amz-content-sha256":"UNSIGNED-PAYLOAD"},z(t.sessionAttributes)&&{"x-amz-lex-session-attributes":e.from(o.c.fromObject(t.sessionAttributes)).toString("base64")}),z(t.requestAttributes)&&{"x-amz-lex-request-attributes":e.from(o.c.fromObject(t.requestAttributes)).toString("base64")}),z(t.contentType)&&{"content-type":t.contentType}),z(t.accept)&&{accept:t.accept}),z(t.activeContexts)&&{"x-amz-lex-active-contexts":e.from(o.c.fromObject(t.activeContexts)).toString("base64")}),s="/bot/{botName}/alias/{botAlias}/user/{userId}/content",void 0===t.botName)throw new Error("No value provided for input HTTP label: botName.");if((u=t.botName).length<=0)throw new Error("Empty value provided for input HTTP label: botName.");if(s=s.replace("{botName}",Object(o.e)(u)),void 0===t.botAlias)throw new Error("No value provided for input HTTP label: botAlias.");if((u=t.botAlias).length<=0)throw new Error("Empty value provided for input HTTP label: botAlias.");if(s=s.replace("{botAlias}",Object(o.e)(u)),void 0===t.userId)throw new Error("No value provided for input HTTP label: userId.");if((u=t.userId).length<=0)throw new Error("Empty value provided for input HTTP label: userId.");return s=s.replace("{userId}",Object(o.e)(u)),void 0!==t.inputStream&&(c=t.inputStream),[4,r.endpoint()];case 1:return f=v.sent(),l=f.hostname,d=f.protocol,h=void 0===d?"https":d,p=f.port,[2,new i.a({protocol:h,hostname:l,port:p,method:"POST",headers:a,path:s,body:c})]}}))}))},s=function(e,t){return Object(n.b)(void 0,void 0,void 0,(function(){var r,a,s,u,c,f,l,d,h;return Object(n.d)(this,(function(p){switch(p.label){case 0:if(r={"content-type":"application/json"},a="/bot/{botName}/alias/{botAlias}/user/{userId}/text",void 0===e.botName)throw new Error("No value provided for input HTTP label: botName.");if((s=e.botName).length<=0)throw new Error("Empty value provided for input HTTP label: botName.");if(a=a.replace("{botName}",Object(o.e)(s)),void 0===e.botAlias)throw new Error("No value provided for input HTTP label: botAlias.");if((s=e.botAlias).length<=0)throw new Error("Empty value provided for input HTTP label: botAlias.");if(a=a.replace("{botAlias}",Object(o.e)(s)),void 0===e.userId)throw new Error("No value provided for input HTTP label: userId.");if((s=e.userId).length<=0)throw new Error("Empty value provided for input HTTP label: userId.");return a=a.replace("{userId}",Object(o.e)(s)),u=JSON.stringify(Object(n.a)(Object(n.a)(Object(n.a)(Object(n.a)({},void 0!==e.activeContexts&&null!==e.activeContexts&&{activeContexts:A(e.activeContexts,t)}),void 0!==e.inputText&&null!==e.inputText&&{inputText:e.inputText}),void 0!==e.requestAttributes&&null!==e.requestAttributes&&{requestAttributes:x(e.requestAttributes,t)}),void 0!==e.sessionAttributes&&null!==e.sessionAttributes&&{sessionAttributes:x(e.sessionAttributes,t)})),[4,t.endpoint()];case 1:return c=p.sent(),f=c.hostname,l=c.protocol,d=void 0===l?"https":l,h=c.port,[2,new i.a({protocol:d,hostname:f,port:h,method:"POST",headers:r,path:a,body:u})]}}))}))},u=function(t,r){return Object(n.b)(void 0,void 0,void 0,(function(){var i,a;return Object(n.d)(this,(function(n){return 200!==t.statusCode&&t.statusCode>=300?[2,c(t,r)]:(i={$metadata:F(t),activeContexts:void 0,alternativeIntents:void 0,audioStream:void 0,botVersion:void 0,contentType:void 0,dialogState:void 0,inputTranscript:void 0,intentName:void 0,message:void 0,messageFormat:void 0,nluIntentConfidence:void 0,sentimentResponse:void 0,sessionAttributes:void 0,sessionId:void 0,slotToElicit:void 0,slots:void 0},void 0!==t.headers["content-type"]&&(i.contentType=t.headers["content-type"]),void 0!==t.headers["x-amz-lex-intent-name"]&&(i.intentName=t.headers["x-amz-lex-intent-name"]),void 0!==t.headers["x-amz-lex-nlu-intent-confidence"]&&(i.nluIntentConfidence=new o.c(e.from(t.headers["x-amz-lex-nlu-intent-confidence"],"base64").toString("ascii"))),void 0!==t.headers["x-amz-lex-alternative-intents"]&&(i.alternativeIntents=new o.c(e.from(t.headers["x-amz-lex-alternative-intents"],"base64").toString("ascii"))),void 0!==t.headers["x-amz-lex-slots"]&&(i.slots=new o.c(e.from(t.headers["x-amz-lex-slots"],"base64").toString("ascii"))),void 0!==t.headers["x-amz-lex-session-attributes"]&&(i.sessionAttributes=new o.c(e.from(t.headers["x-amz-lex-session-attributes"],"base64").toString("ascii"))),void 0!==t.headers["x-amz-lex-sentiment"]&&(i.sentimentResponse=t.headers["x-amz-lex-sentiment"]),void 0!==t.headers["x-amz-lex-message"]&&(i.message=t.headers["x-amz-lex-message"]),void 0!==t.headers["x-amz-lex-message-format"]&&(i.messageFormat=t.headers["x-amz-lex-message-format"]),void 0!==t.headers["x-amz-lex-dialog-state"]&&(i.dialogState=t.headers["x-amz-lex-dialog-state"]),void 0!==t.headers["x-amz-lex-slot-to-elicit"]&&(i.slotToElicit=t.headers["x-amz-lex-slot-to-elicit"]),void 0!==t.headers["x-amz-lex-input-transcript"]&&(i.inputTranscript=t.headers["x-amz-lex-input-transcript"]),void 0!==t.headers["x-amz-lex-bot-version"]&&(i.botVersion=t.headers["x-amz-lex-bot-version"]),void 0!==t.headers["x-amz-lex-session-id"]&&(i.sessionId=t.headers["x-amz-lex-session-id"]),void 0!==t.headers["x-amz-lex-active-contexts"]&&(i.activeContexts=new o.c(e.from(t.headers["x-amz-lex-active-contexts"],"base64").toString("ascii"))),a=t.body,i.audioStream=a,[2,Promise.resolve(i)])}))}))},c=function(e,t){return Object(n.b)(void 0,void 0,void 0,(function(){var r,i,o,a,s,u,c,f,l,S,A,E,x,j,M,P,T,C;return Object(n.d)(this,(function(L){switch(L.label){case 0:return i=[Object(n.a)({},e)],C={},[4,D(e.body,t)];case 1:switch(r=n.a.apply(void 0,i.concat([(C.body=L.sent(),C)])),a="UnknownError",a=q(e,r.body),a){case"BadGatewayException":case"com.amazonaws.lexruntimeservice#BadGatewayException":return[3,2];case"BadRequestException":case"com.amazonaws.lexruntimeservice#BadRequestException":return[3,4];case"ConflictException":case"com.amazonaws.lexruntimeservice#ConflictException":return[3,6];case"DependencyFailedException":case"com.amazonaws.lexruntimeservice#DependencyFailedException":return[3,8];case"InternalFailureException":case"com.amazonaws.lexruntimeservice#InternalFailureException":return[3,10];case"LimitExceededException":case"com.amazonaws.lexruntimeservice#LimitExceededException":return[3,12];case"LoopDetectedException":case"com.amazonaws.lexruntimeservice#LoopDetectedException":return[3,14];case"NotAcceptableException":case"com.amazonaws.lexruntimeservice#NotAcceptableException":return[3,16];case"NotFoundException":case"com.amazonaws.lexruntimeservice#NotFoundException":return[3,18];case"RequestTimeoutException":case"com.amazonaws.lexruntimeservice#RequestTimeoutException":return[3,20];case"UnsupportedMediaTypeException":case"com.amazonaws.lexruntimeservice#UnsupportedMediaTypeException":return[3,22]}return[3,24];case 2:return s=[{}],[4,d(r,t)];case 3:return o=n.a.apply(void 0,[n.a.apply(void 0,s.concat([L.sent()])),{name:a,$metadata:F(e)}]),[3,25];case 4:return u=[{}],[4,h(r,t)];case 5:return o=n.a.apply(void 0,[n.a.apply(void 0,u.concat([L.sent()])),{name:a,$metadata:F(e)}]),[3,25];case 6:return c=[{}],[4,p(r,t)];case 7:return o=n.a.apply(void 0,[n.a.apply(void 0,c.concat([L.sent()])),{name:a,$metadata:F(e)}]),[3,25];case 8:return f=[{}],[4,v(r,t)];case 9:return o=n.a.apply(void 0,[n.a.apply(void 0,f.concat([L.sent()])),{name:a,$metadata:F(e)}]),[3,25];case 10:return l=[{}],[4,g(r,t)];case 11:return o=n.a.apply(void 0,[n.a.apply(void 0,l.concat([L.sent()])),{name:a,$metadata:F(e)}]),[3,25];case 12:return S=[{}],[4,m(r,t)];case 13:return o=n.a.apply(void 0,[n.a.apply(void 0,S.concat([L.sent()])),{name:a,$metadata:F(e)}]),[3,25];case 14:return A=[{}],[4,b(r,t)];case 15:return o=n.a.apply(void 0,[n.a.apply(void 0,A.concat([L.sent()])),{name:a,$metadata:F(e)}]),[3,25];case 16:return E=[{}],[4,y(r,t)];case 17:return o=n.a.apply(void 0,[n.a.apply(void 0,E.concat([L.sent()])),{name:a,$metadata:F(e)}]),[3,25];case 18:return x=[{}],[4,w(r,t)];case 19:return o=n.a.apply(void 0,[n.a.apply(void 0,x.concat([L.sent()])),{name:a,$metadata:F(e)}]),[3,25];case 20:return j=[{}],[4,_(r,t)];case 21:return o=n.a.apply(void 0,[n.a.apply(void 0,j.concat([L.sent()])),{name:a,$metadata:F(e)}]),[3,25];case 22:return M=[{}],[4,O(r,t)];case 23:return o=n.a.apply(void 0,[n.a.apply(void 0,M.concat([L.sent()])),{name:a,$metadata:F(e)}]),[3,25];case 24:P=r.body,a=P.code||P.Code||a,o=Object(n.a)(Object(n.a)({},P),{name:""+a,message:P.message||P.Message||a,$fault:"client",$metadata:F(e)}),L.label=25;case 25:return T=o.message||o.Message||a,o.message=T,delete o.Message,[2,Promise.reject(Object.assign(new Error(T),o))]}}))}))},f=function(e,t){return Object(n.b)(void 0,void 0,void 0,(function(){var r,i;return Object(n.d)(this,(function(n){switch(n.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,l(e,t)]:(r={$metadata:F(e),activeContexts:void 0,alternativeIntents:void 0,botVersion:void 0,dialogState:void 0,intentName:void 0,message:void 0,messageFormat:void 0,nluIntentConfidence:void 0,responseCard:void 0,sentimentResponse:void 0,sessionAttributes:void 0,sessionId:void 0,slotToElicit:void 0,slots:void 0},[4,D(e.body,t)]);case 1:return void 0!==(i=n.sent()).activeContexts&&null!==i.activeContexts&&(r.activeContexts=M(i.activeContexts,t)),void 0!==i.alternativeIntents&&null!==i.alternativeIntents&&(r.alternativeIntents=L(i.alternativeIntents,t)),void 0!==i.botVersion&&null!==i.botVersion&&(r.botVersion=i.botVersion),void 0!==i.dialogState&&null!==i.dialogState&&(r.dialogState=i.dialogState),void 0!==i.intentName&&null!==i.intentName&&(r.intentName=i.intentName),void 0!==i.message&&null!==i.message&&(r.message=i.message),void 0!==i.messageFormat&&null!==i.messageFormat&&(r.messageFormat=i.messageFormat),void 0!==i.nluIntentConfidence&&null!==i.nluIntentConfidence&&(r.nluIntentConfidence=C(i.nluIntentConfidence,t)),void 0!==i.responseCard&&null!==i.responseCard&&(r.responseCard=k(i.responseCard,t)),void 0!==i.sentimentResponse&&null!==i.sentimentResponse&&(r.sentimentResponse=B(i.sentimentResponse,t)),void 0!==i.sessionAttributes&&null!==i.sessionAttributes&&(r.sessionAttributes=N(i.sessionAttributes,t)),void 0!==i.sessionId&&null!==i.sessionId&&(r.sessionId=i.sessionId),void 0!==i.slotToElicit&&null!==i.slotToElicit&&(r.slotToElicit=i.slotToElicit),void 0!==i.slots&&null!==i.slots&&(r.slots=N(i.slots,t)),[2,Promise.resolve(r)]}}))}))},l=function(e,t){return Object(n.b)(void 0,void 0,void 0,(function(){var r,i,o,a,s,u,c,f,l,y,_,O,S,A,E;return Object(n.d)(this,(function(x){switch(x.label){case 0:return i=[Object(n.a)({},e)],E={},[4,D(e.body,t)];case 1:switch(r=n.a.apply(void 0,i.concat([(E.body=x.sent(),E)])),a="UnknownError",a=q(e,r.body),a){case"BadGatewayException":case"com.amazonaws.lexruntimeservice#BadGatewayException":return[3,2];case"BadRequestException":case"com.amazonaws.lexruntimeservice#BadRequestException":return[3,4];case"ConflictException":case"com.amazonaws.lexruntimeservice#ConflictException":return[3,6];case"DependencyFailedException":case"com.amazonaws.lexruntimeservice#DependencyFailedException":return[3,8];case"InternalFailureException":case"com.amazonaws.lexruntimeservice#InternalFailureException":return[3,10];case"LimitExceededException":case"com.amazonaws.lexruntimeservice#LimitExceededException":return[3,12];case"LoopDetectedException":case"com.amazonaws.lexruntimeservice#LoopDetectedException":return[3,14];case"NotFoundException":case"com.amazonaws.lexruntimeservice#NotFoundException":return[3,16]}return[3,18];case 2:return s=[{}],[4,d(r,t)];case 3:return o=n.a.apply(void 0,[n.a.apply(void 0,s.concat([x.sent()])),{name:a,$metadata:F(e)}]),[3,19];case 4:return u=[{}],[4,h(r,t)];case 5:return o=n.a.apply(void 0,[n.a.apply(void 0,u.concat([x.sent()])),{name:a,$metadata:F(e)}]),[3,19];case 6:return c=[{}],[4,p(r,t)];case 7:return o=n.a.apply(void 0,[n.a.apply(void 0,c.concat([x.sent()])),{name:a,$metadata:F(e)}]),[3,19];case 8:return f=[{}],[4,v(r,t)];case 9:return o=n.a.apply(void 0,[n.a.apply(void 0,f.concat([x.sent()])),{name:a,$metadata:F(e)}]),[3,19];case 10:return l=[{}],[4,g(r,t)];case 11:return o=n.a.apply(void 0,[n.a.apply(void 0,l.concat([x.sent()])),{name:a,$metadata:F(e)}]),[3,19];case 12:return y=[{}],[4,m(r,t)];case 13:return o=n.a.apply(void 0,[n.a.apply(void 0,y.concat([x.sent()])),{name:a,$metadata:F(e)}]),[3,19];case 14:return _=[{}],[4,b(r,t)];case 15:return o=n.a.apply(void 0,[n.a.apply(void 0,_.concat([x.sent()])),{name:a,$metadata:F(e)}]),[3,19];case 16:return O=[{}],[4,w(r,t)];case 17:return o=n.a.apply(void 0,[n.a.apply(void 0,O.concat([x.sent()])),{name:a,$metadata:F(e)}]),[3,19];case 18:S=r.body,a=S.code||S.Code||a,o=Object(n.a)(Object(n.a)({},S),{name:""+a,message:S.message||S.Message||a,$fault:"client",$metadata:F(e)}),x.label=19;case 19:return A=o.message||o.Message||a,o.message=A,delete o.Message,[2,Promise.reject(Object.assign(new Error(A),o))]}}))}))},d=function(e,t){return Object(n.b)(void 0,void 0,void 0,(function(){var t,r;return Object(n.d)(this,(function(n){return t={name:"BadGatewayException",$fault:"server",$metadata:F(e),Message:void 0},void 0!==(r=e.body).Message&&null!==r.Message&&(t.Message=r.Message),[2,t]}))}))},h=function(e,t){return Object(n.b)(void 0,void 0,void 0,(function(){var t,r;return Object(n.d)(this,(function(n){return t={name:"BadRequestException",$fault:"client",$metadata:F(e),message:void 0},void 0!==(r=e.body).message&&null!==r.message&&(t.message=r.message),[2,t]}))}))},p=function(e,t){return Object(n.b)(void 0,void 0,void 0,(function(){var t,r;return Object(n.d)(this,(function(n){return t={name:"ConflictException",$fault:"client",$metadata:F(e),message:void 0},void 0!==(r=e.body).message&&null!==r.message&&(t.message=r.message),[2,t]}))}))},v=function(e,t){return Object(n.b)(void 0,void 0,void 0,(function(){var t,r;return Object(n.d)(this,(function(n){return t={name:"DependencyFailedException",$fault:"client",$metadata:F(e),Message:void 0},void 0!==(r=e.body).Message&&null!==r.Message&&(t.Message=r.Message),[2,t]}))}))},g=function(e,t){return Object(n.b)(void 0,void 0,void 0,(function(){var t,r;return Object(n.d)(this,(function(n){return t={name:"InternalFailureException",$fault:"server",$metadata:F(e),message:void 0},void 0!==(r=e.body).message&&null!==r.message&&(t.message=r.message),[2,t]}))}))},m=function(e,t){return Object(n.b)(void 0,void 0,void 0,(function(){var t,r;return Object(n.d)(this,(function(n){return t={name:"LimitExceededException",$fault:"client",$metadata:F(e),message:void 0,retryAfterSeconds:void 0},void 0!==e.headers["retry-after"]&&(t.retryAfterSeconds=e.headers["retry-after"]),void 0!==(r=e.body).message&&null!==r.message&&(t.message=r.message),[2,t]}))}))},b=function(e,t){return Object(n.b)(void 0,void 0,void 0,(function(){var t,r;return Object(n.d)(this,(function(n){return t={name:"LoopDetectedException",$fault:"server",$metadata:F(e),Message:void 0},void 0!==(r=e.body).Message&&null!==r.Message&&(t.Message=r.Message),[2,t]}))}))},y=function(e,t){return Object(n.b)(void 0,void 0,void 0,(function(){var t,r;return Object(n.d)(this,(function(n){return t={name:"NotAcceptableException",$fault:"client",$metadata:F(e),message:void 0},void 0!==(r=e.body).message&&null!==r.message&&(t.message=r.message),[2,t]}))}))},w=function(e,t){return Object(n.b)(void 0,void 0,void 0,(function(){var t,r;return Object(n.d)(this,(function(n){return t={name:"NotFoundException",$fault:"client",$metadata:F(e),message:void 0},void 0!==(r=e.body).message&&null!==r.message&&(t.message=r.message),[2,t]}))}))},_=function(e,t){return Object(n.b)(void 0,void 0,void 0,(function(){var t,r;return Object(n.d)(this,(function(n){return t={name:"RequestTimeoutException",$fault:"client",$metadata:F(e),message:void 0},void 0!==(r=e.body).message&&null!==r.message&&(t.message=r.message),[2,t]}))}))},O=function(e,t){return Object(n.b)(void 0,void 0,void 0,(function(){var t,r;return Object(n.d)(this,(function(n){return t={name:"UnsupportedMediaTypeException",$fault:"client",$metadata:F(e),message:void 0},void 0!==(r=e.body).message&&null!==r.message&&(t.message=r.message),[2,t]}))}))},S=function(e,t){return Object.entries(e).reduce((function(e,t){var r,i=Object(n.e)(t,2),o=i[0],a=i[1];return null===a?e:Object(n.a)(Object(n.a)({},e),((r={})[o]=a,r))}),{})},A=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return Object(n.a)(Object(n.a)(Object(n.a)({},void 0!==e.name&&null!==e.name&&{name:e.name}),void 0!==e.parameters&&null!==e.parameters&&{parameters:S(e.parameters,t)}),void 0!==e.timeToLive&&null!==e.timeToLive&&{timeToLive:E(e.timeToLive,t)})}(e,t)}))},E=function(e,t){return Object(n.a)(Object(n.a)({},void 0!==e.timeToLiveInSeconds&&null!==e.timeToLiveInSeconds&&{timeToLiveInSeconds:e.timeToLiveInSeconds}),void 0!==e.turnsToLive&&null!==e.turnsToLive&&{turnsToLive:e.turnsToLive})},x=function(e,t){return Object.entries(e).reduce((function(e,t){var r,i=Object(n.e)(t,2),o=i[0],a=i[1];return null===a?e:Object(n.a)(Object(n.a)({},e),((r={})[o]=a,r))}),{})},j=function(e,t){return Object.entries(e).reduce((function(e,t){var r,i=Object(n.e)(t,2),o=i[0],a=i[1];return null===a?e:Object(n.a)(Object(n.a)({},e),((r={})[o]=a,r))}),{})},M=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{name:void 0!==e.name&&null!==e.name?e.name:void 0,parameters:void 0!==e.parameters&&null!==e.parameters?j(e.parameters,t):void 0,timeToLive:void 0!==e.timeToLive&&null!==e.timeToLive?P(e.timeToLive,t):void 0}}(e,t)}))},P=function(e,t){return{timeToLiveInSeconds:void 0!==e.timeToLiveInSeconds&&null!==e.timeToLiveInSeconds?e.timeToLiveInSeconds:void 0,turnsToLive:void 0!==e.turnsToLive&&null!==e.turnsToLive?e.turnsToLive:void 0}},T=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{attachmentLinkUrl:void 0!==e.attachmentLinkUrl&&null!==e.attachmentLinkUrl?e.attachmentLinkUrl:void 0,buttons:void 0!==e.buttons&&null!==e.buttons?R(e.buttons,t):void 0,imageUrl:void 0!==e.imageUrl&&null!==e.imageUrl?e.imageUrl:void 0,subTitle:void 0!==e.subTitle&&null!==e.subTitle?e.subTitle:void 0,title:void 0!==e.title&&null!==e.title?e.title:void 0}}(e,t)}))},C=function(e,t){return{score:void 0!==e.score&&null!==e.score?e.score:void 0}},L=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:I(e,t)}))},R=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{text:void 0!==e.text&&null!==e.text?e.text:void 0,value:void 0!==e.value&&null!==e.value?e.value:void 0}}(e)}))},I=function(e,t){return{intentName:void 0!==e.intentName&&null!==e.intentName?e.intentName:void 0,nluIntentConfidence:void 0!==e.nluIntentConfidence&&null!==e.nluIntentConfidence?C(e.nluIntentConfidence,t):void 0,slots:void 0!==e.slots&&null!==e.slots?N(e.slots,t):void 0}},k=function(e,t){return{contentType:void 0!==e.contentType&&null!==e.contentType?e.contentType:void 0,genericAttachments:void 0!==e.genericAttachments&&null!==e.genericAttachments?T(e.genericAttachments,t):void 0,version:void 0!==e.version&&null!==e.version?e.version:void 0}},B=function(e,t){return{sentimentLabel:void 0!==e.sentimentLabel&&null!==e.sentimentLabel?e.sentimentLabel:void 0,sentimentScore:void 0!==e.sentimentScore&&null!==e.sentimentScore?e.sentimentScore:void 0}},N=function(e,t){return Object.entries(e).reduce((function(e,t){var r,i=Object(n.e)(t,2),o=i[0],a=i[1];return null===a?e:Object(n.a)(Object(n.a)({},e),((r={})[o]=a,r))}),{})},F=function(e){var t;return{httpStatusCode:e.statusCode,requestId:null!==(t=e.headers["x-amzn-requestid"])&&void 0!==t?t:e.headers["x-amzn-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}},U=function(e,t){return function(e,t){return void 0===e&&(e=new Uint8Array),e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array)}(e,t).then((function(e){return t.utf8Encoder(e)}))},z=function(e){return!(null==e||""===e||Object.getOwnPropertyNames(e).includes("length")&&0==e.length||Object.getOwnPropertyNames(e).includes("size")&&0==e.size)},D=function(e,t){return U(e,t).then((function(e){return e.length?JSON.parse(e):{}}))},q=function(e,t){var r,n,i=function(e){var t=e;return t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},o=(r=e.headers,n="x-amzn-errortype",Object.keys(r).find((function(e){return e.toLowerCase()===n.toLowerCase()})));return void 0!==o?i(e.headers[o]):void 0!==t.code?i(t.code):void 0!==t.__type?i(t.__type):""}}).call(this,r(14).Buffer)},function(e,t,r){"use strict";r.r(t),r.d(t,"fromUtf8",(function(){return n})),r.d(t,"toUtf8",(function(){return i}));var n=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],r=0,n=e.length;r<n;r++){var i=e.charCodeAt(r);if(i<128)t.push(i);else if(i<2048)t.push(i>>6|192,63&i|128);else if(r+1<e.length&&55296==(64512&i)&&56320==(64512&e.charCodeAt(r+1))){var o=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r));t.push(o>>18|240,o>>12&63|128,o>>6&63|128,63&o|128)}else t.push(i>>12|224,i>>6&63|128,63&i|128)}return Uint8Array.from(t)}(e)},i=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",r=0,n=e.length;r<n;r++){var i=e[r];if(i<128)t+=String.fromCharCode(i);else if(192<=i&&i<224){var o=e[++r];t+=String.fromCharCode((31&i)<<6|63&o)}else if(240<=i&&i<365){var a="%"+[i,e[++r],e[++r],e[++r]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&i)<<12|(63&e[++r])<<6|63&e[++r])}return t}(e)}},function(e,t,r){"use strict";r.r(t),r.d(t,"locateWindow",(function(){return i}));var n={};function i(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:n}},function(e,t){var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(r){var n=new Uint8Array(16);e.exports=function(){return r(n),n}}else{var i=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}},function(e,t){for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);e.exports=function(e,t){var n=t||0,i=r;return[i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]]].join("")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var n=r(23),i=r(11),o=r(6),a=r(7),s=function(){function e(e){e?(this.operation=function(e){return new Promise((function(t,r){var n=(0,a.locateWindow)().msCrypto.subtle.importKey("raw",u(e),i.SHA_256_HMAC_ALGO,!1,["sign"]);n.oncomplete=function(){n.result&&t(n.result),r(new Error("ImportKey completed without importing key."))},n.onerror=function(){r(new Error("ImportKey failed to import key."))}}))}(e).then((function(e){return(0,a.locateWindow)().msCrypto.subtle.sign(i.SHA_256_HMAC_ALGO,e)})),this.operation.catch((function(){}))):this.operation=Promise.resolve((0,a.locateWindow)().msCrypto.subtle.digest("SHA-256"))}return e.prototype.update=function(e){var t=this;(0,n.isEmptyData)(e)||(this.operation=this.operation.then((function(r){return r.onerror=function(){t.operation=Promise.reject(new Error("Error encountered updating hash"))},r.process(u(e)),r})),this.operation.catch((function(){})))},e.prototype.digest=function(){return this.operation.then((function(e){return new Promise((function(t,r){e.onerror=function(){r(new Error("Error encountered finalizing hash"))},e.oncomplete=function(){e.result&&t(new Uint8Array(e.result)),r(new Error("Error encountered finalizing hash"))},e.finish()}))}))},e}();function u(e){return"string"==typeof e?(0,o.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_DATA_SHA_256=t.SHA_256_HMAC_ALGO=t.SHA_256_HASH=void 0,t.SHA_256_HASH={name:"SHA-256"},t.SHA_256_HMAC_ALGO={name:"HMAC",hash:t.SHA_256_HASH},t.EMPTY_DATA_SHA_256=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85])},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var n=r(13),i=r(11),o=r(7),a=function(){function e(e){this.toHash=new Uint8Array(0),void 0!==e&&(this.key=new Promise((function(t,r){(0,o.locateWindow)().crypto.subtle.importKey("raw",(0,n.convertToBuffer)(e),i.SHA_256_HMAC_ALGO,!1,["sign"]).then(t,r)})),this.key.catch((function(){})))}return e.prototype.update=function(e){if(!(0,n.isEmptyData)(e)){var t=(0,n.convertToBuffer)(e),r=new Uint8Array(this.toHash.byteLength+t.byteLength);r.set(this.toHash,0),r.set(t,this.toHash.byteLength),this.toHash=r}},e.prototype.digest=function(){var e=this;return this.key?this.key.then((function(t){return(0,o.locateWindow)().crypto.subtle.sign(i.SHA_256_HMAC_ALGO,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):(0,n.isEmptyData)(this.toHash)?Promise.resolve(i.EMPTY_DATA_SHA_256):Promise.resolve().then((function(){return(0,o.locateWindow)().crypto.subtle.digest(i.SHA_256_HASH,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e}();t.Sha256=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var n=r(24);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return n.convertToBuffer}});var i=r(29);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return i.isEmptyData}});var o=r(30);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return o.numToUint8}});var a=r(31);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return a.uint32ArrayFrom}})},function(e,t,r){"use strict";(function(e){
|
|
15
|
+
***************************************************************************** */var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function i(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var a=function(){function e(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.substr(-1)?e.protocol+":":e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?"/"+e.path:e.path:"/"}return e.isInstance=function(e){if(!e)return!1;var t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers},e.prototype.clone=function(){var t,n=new e(o(o({},this),{headers:o({},this.headers)}));return n.query&&(n.query=(t=n.query,Object.keys(t).reduce((function(e,n){var r,a=t[n];return o(o({},e),((r={})[n]=Array.isArray(a)?function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(i(arguments[t]));return e}(a):a,r))}),{}))),n},e}()},function(t,n){t.exports=e},function(e,t,n){"use strict";n.r(t),n.d(t,"locateWindow",(function(){return o}));var r={};function o(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:r}},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(18),o=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var o=e.getVersionPrecision(t),i=e.getVersionPrecision(n),a=Math.max(o,i),u=0,s=e.map([t,n],(function(t){var n=a-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(r&&(u=a-Math.min(o,i)),a-=1;a>=u;){if(s[0][a]>s[1][a])return 1;if(s[0][a]===s[1][a]){if(a===u)return 0;a-=1}else if(s[0][a]<s[1][a])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var o=e[n];if(t(o,n))return o}},e.assign=function(e){for(var t,n,r=e,o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];if(Object.assign)return Object.assign.apply(Object,[e].concat(i));var u=function(){var e=i[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){r[t]=e[t]}))};for(t=0,n=i.length;t<n;t+=1)u();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=o,e.exports=t.default},18:function(e,t,n){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(91))&&r.__esModule?r:{default:r},i=n(18);function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var u=function(){function e(){}var t,n;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new o.default(e,t)},e.parse=function(e){return new o.default(e).getResult()},t=e,(n=[{key:"BROWSER_MAP",get:function(){return i.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return i.ENGINE_MAP}},{key:"OS_MAP",get:function(){return i.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return i.PLATFORMS_MAP}}])&&a(t,n),e}();t.default=u,e.exports=t.default},91:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=s(n(92)),o=s(n(93)),i=s(n(94)),a=s(n(95)),u=s(n(17));function s(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=u.default.find(r.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=u.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=u.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=u.default.find(a.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return u.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,o={},i=0;if(Object.keys(e).forEach((function(t){var a=e[t];"string"==typeof a?(o[t]=a,i+=1):"object"==typeof a&&(n[t]=a,r+=1)})),r>0){var a=Object.keys(n),s=u.default.find(a,(function(e){return t.isOS(e)}));if(s){var c=this.satisfies(n[s]);if(void 0!==c)return c}var l=u.default.find(a,(function(e){return t.isPlatform(e)}));if(l){var f=this.satisfies(n[l]);if(void 0!==f)return f}}if(i>0){var d=Object.keys(o),p=u.default.find(d,(function(e){return t.isBrowser(e,!0)}));if(void 0!==p)return this.compareVersion(o[p])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),o=u.default.getBrowserTypeByAlias(r);return t&&o&&(r=o.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,o=this.getBrowserVersion();if("string"==typeof o)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(u.default.compareVersions(o,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=c,e.exports=t.default},92:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=/version\/(\d+(\.?_?\d+)+)/i,a=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=o.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=o.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=o.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=o.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=o.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=o.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=o.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=o.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=o.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=o.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=o.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=o.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=o.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=o.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=o.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=o.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=o.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=o.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=o.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=o.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=o.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=o.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=o.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=o.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=o.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=o.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=o.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:o.default.getFirstMatch(t,e),version:o.default.getSecondMatch(t,e)}}}];t.default=a,e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=n(18),a=[{test:[/Roku\/DVP/],describe:function(e){var t=o.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:i.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=o.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=o.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=o.default.getWindowsVersionName(t);return{name:i.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:i.OS_MAP.iOS},n=o.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=o.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=o.default.getMacOSVersionName(t),r={name:i.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=o.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:i.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=o.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=o.default.getAndroidVersionName(t),r={name:i.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=o.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:i.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=o.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||o.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||o.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:i.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=o.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=o.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:i.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:i.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=o.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.PlayStation4,version:t}}}];t.default=a,e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=n(18),a=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=o.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:i.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=o.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:i.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:i.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.tv}}}];t.default=a,e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=n(18),a=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:i.ENGINE_MAP.Blink};var t=o.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:i.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:i.ENGINE_MAP.Trident},n=o.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:i.ENGINE_MAP.Presto},n=o.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:i.ENGINE_MAP.Gecko},n=o.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:i.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:i.ENGINE_MAP.WebKit},n=o.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=a,e.exports=t.default}})},function(e,t,n){"use strict";(function(e){n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return u})),n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return l}));var r=n(0),o=n(2),i=n(1),a=function(t,n){return Object(r.e)(void 0,void 0,void 0,(function(){var a,u,s,c,l,f,d,p,h;return Object(r.g)(this,(function(v){switch(v.label){case 0:if(a=Object(r.a)(Object(r.a)(Object(r.a)(Object(r.a)(Object(r.a)({"content-type":"application/octet-stream","x-amz-content-sha256":"UNSIGNED-PAYLOAD"},F(t.sessionAttributes)&&{"x-amz-lex-session-attributes":e.from(i.c.fromObject(t.sessionAttributes)).toString("base64")}),F(t.requestAttributes)&&{"x-amz-lex-request-attributes":e.from(i.c.fromObject(t.requestAttributes)).toString("base64")}),F(t.contentType)&&{"content-type":t.contentType}),F(t.accept)&&{accept:t.accept}),F(t.activeContexts)&&{"x-amz-lex-active-contexts":e.from(i.c.fromObject(t.activeContexts)).toString("base64")}),u="/bot/{botName}/alias/{botAlias}/user/{userId}/content",void 0===t.botName)throw new Error("No value provided for input HTTP label: botName.");if((s=t.botName).length<=0)throw new Error("Empty value provided for input HTTP label: botName.");if(u=u.replace("{botName}",Object(i.e)(s)),void 0===t.botAlias)throw new Error("No value provided for input HTTP label: botAlias.");if((s=t.botAlias).length<=0)throw new Error("Empty value provided for input HTTP label: botAlias.");if(u=u.replace("{botAlias}",Object(i.e)(s)),void 0===t.userId)throw new Error("No value provided for input HTTP label: userId.");if((s=t.userId).length<=0)throw new Error("Empty value provided for input HTTP label: userId.");return u=u.replace("{userId}",Object(i.e)(s)),void 0!==t.inputStream&&(c=t.inputStream),[4,n.endpoint()];case 1:return l=v.sent(),f=l.hostname,d=l.protocol,p=void 0===d?"https":d,h=l.port,[2,new o.a({protocol:p,hostname:f,port:h,method:"POST",headers:a,path:u,body:c})]}}))}))},u=function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var n,a,u,s,c,l,f,d,p;return Object(r.g)(this,(function(h){switch(h.label){case 0:if(n={"content-type":"application/json"},a="/bot/{botName}/alias/{botAlias}/user/{userId}/text",void 0===e.botName)throw new Error("No value provided for input HTTP label: botName.");if((u=e.botName).length<=0)throw new Error("Empty value provided for input HTTP label: botName.");if(a=a.replace("{botName}",Object(i.e)(u)),void 0===e.botAlias)throw new Error("No value provided for input HTTP label: botAlias.");if((u=e.botAlias).length<=0)throw new Error("Empty value provided for input HTTP label: botAlias.");if(a=a.replace("{botAlias}",Object(i.e)(u)),void 0===e.userId)throw new Error("No value provided for input HTTP label: userId.");if((u=e.userId).length<=0)throw new Error("Empty value provided for input HTTP label: userId.");return a=a.replace("{userId}",Object(i.e)(u)),s=JSON.stringify(Object(r.a)(Object(r.a)(Object(r.a)(Object(r.a)({},void 0!==e.activeContexts&&null!==e.activeContexts&&{activeContexts:j(e.activeContexts,t)}),void 0!==e.inputText&&null!==e.inputText&&{inputText:e.inputText}),void 0!==e.requestAttributes&&null!==e.requestAttributes&&{requestAttributes:x(e.requestAttributes,t)}),void 0!==e.sessionAttributes&&null!==e.sessionAttributes&&{sessionAttributes:x(e.sessionAttributes,t)})),[4,t.endpoint()];case 1:return c=h.sent(),l=c.hostname,f=c.protocol,d=void 0===f?"https":f,p=c.port,[2,new o.a({protocol:d,hostname:l,port:p,method:"POST",headers:n,path:a,body:s})]}}))}))},s=function(t,n){return Object(r.e)(void 0,void 0,void 0,(function(){var o,a;return Object(r.g)(this,(function(r){return 200!==t.statusCode&&t.statusCode>=300?[2,c(t,n)]:(o={$metadata:B(t),activeContexts:void 0,alternativeIntents:void 0,audioStream:void 0,botVersion:void 0,contentType:void 0,dialogState:void 0,inputTranscript:void 0,intentName:void 0,message:void 0,messageFormat:void 0,nluIntentConfidence:void 0,sentimentResponse:void 0,sessionAttributes:void 0,sessionId:void 0,slotToElicit:void 0,slots:void 0},void 0!==t.headers["content-type"]&&(o.contentType=t.headers["content-type"]),void 0!==t.headers["x-amz-lex-intent-name"]&&(o.intentName=t.headers["x-amz-lex-intent-name"]),void 0!==t.headers["x-amz-lex-nlu-intent-confidence"]&&(o.nluIntentConfidence=new i.c(e.from(t.headers["x-amz-lex-nlu-intent-confidence"],"base64").toString("ascii"))),void 0!==t.headers["x-amz-lex-alternative-intents"]&&(o.alternativeIntents=new i.c(e.from(t.headers["x-amz-lex-alternative-intents"],"base64").toString("ascii"))),void 0!==t.headers["x-amz-lex-slots"]&&(o.slots=new i.c(e.from(t.headers["x-amz-lex-slots"],"base64").toString("ascii"))),void 0!==t.headers["x-amz-lex-session-attributes"]&&(o.sessionAttributes=new i.c(e.from(t.headers["x-amz-lex-session-attributes"],"base64").toString("ascii"))),void 0!==t.headers["x-amz-lex-sentiment"]&&(o.sentimentResponse=t.headers["x-amz-lex-sentiment"]),void 0!==t.headers["x-amz-lex-message"]&&(o.message=t.headers["x-amz-lex-message"]),void 0!==t.headers["x-amz-lex-message-format"]&&(o.messageFormat=t.headers["x-amz-lex-message-format"]),void 0!==t.headers["x-amz-lex-dialog-state"]&&(o.dialogState=t.headers["x-amz-lex-dialog-state"]),void 0!==t.headers["x-amz-lex-slot-to-elicit"]&&(o.slotToElicit=t.headers["x-amz-lex-slot-to-elicit"]),void 0!==t.headers["x-amz-lex-input-transcript"]&&(o.inputTranscript=t.headers["x-amz-lex-input-transcript"]),void 0!==t.headers["x-amz-lex-bot-version"]&&(o.botVersion=t.headers["x-amz-lex-bot-version"]),void 0!==t.headers["x-amz-lex-session-id"]&&(o.sessionId=t.headers["x-amz-lex-session-id"]),void 0!==t.headers["x-amz-lex-active-contexts"]&&(o.activeContexts=new i.c(e.from(t.headers["x-amz-lex-active-contexts"],"base64").toString("ascii"))),a=t.body,o.audioStream=a,[2,Promise.resolve(o)])}))}))},c=function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var n,o,i,a,u,s,c,l,f,_,j,E,x,A,T,P,C,M;return Object(r.g)(this,(function(I){switch(I.label){case 0:return o=[Object(r.a)({},e)],M={},[4,z(e.body,t)];case 1:switch(n=r.a.apply(void 0,o.concat([(M.body=I.sent(),M)])),a="UnknownError",a=q(e,n.body),a){case"BadGatewayException":case"com.amazonaws.lexruntimeservice#BadGatewayException":return[3,2];case"BadRequestException":case"com.amazonaws.lexruntimeservice#BadRequestException":return[3,4];case"ConflictException":case"com.amazonaws.lexruntimeservice#ConflictException":return[3,6];case"DependencyFailedException":case"com.amazonaws.lexruntimeservice#DependencyFailedException":return[3,8];case"InternalFailureException":case"com.amazonaws.lexruntimeservice#InternalFailureException":return[3,10];case"LimitExceededException":case"com.amazonaws.lexruntimeservice#LimitExceededException":return[3,12];case"LoopDetectedException":case"com.amazonaws.lexruntimeservice#LoopDetectedException":return[3,14];case"NotAcceptableException":case"com.amazonaws.lexruntimeservice#NotAcceptableException":return[3,16];case"NotFoundException":case"com.amazonaws.lexruntimeservice#NotFoundException":return[3,18];case"RequestTimeoutException":case"com.amazonaws.lexruntimeservice#RequestTimeoutException":return[3,20];case"UnsupportedMediaTypeException":case"com.amazonaws.lexruntimeservice#UnsupportedMediaTypeException":return[3,22]}return[3,24];case 2:return u=[{}],[4,d(n,t)];case 3:return i=r.a.apply(void 0,[r.a.apply(void 0,u.concat([I.sent()])),{name:a,$metadata:B(e)}]),[3,25];case 4:return s=[{}],[4,p(n,t)];case 5:return i=r.a.apply(void 0,[r.a.apply(void 0,s.concat([I.sent()])),{name:a,$metadata:B(e)}]),[3,25];case 6:return c=[{}],[4,h(n,t)];case 7:return i=r.a.apply(void 0,[r.a.apply(void 0,c.concat([I.sent()])),{name:a,$metadata:B(e)}]),[3,25];case 8:return l=[{}],[4,v(n,t)];case 9:return i=r.a.apply(void 0,[r.a.apply(void 0,l.concat([I.sent()])),{name:a,$metadata:B(e)}]),[3,25];case 10:return f=[{}],[4,y(n,t)];case 11:return i=r.a.apply(void 0,[r.a.apply(void 0,f.concat([I.sent()])),{name:a,$metadata:B(e)}]),[3,25];case 12:return _=[{}],[4,b(n,t)];case 13:return i=r.a.apply(void 0,[r.a.apply(void 0,_.concat([I.sent()])),{name:a,$metadata:B(e)}]),[3,25];case 14:return j=[{}],[4,m(n,t)];case 15:return i=r.a.apply(void 0,[r.a.apply(void 0,j.concat([I.sent()])),{name:a,$metadata:B(e)}]),[3,25];case 16:return E=[{}],[4,g(n,t)];case 17:return i=r.a.apply(void 0,[r.a.apply(void 0,E.concat([I.sent()])),{name:a,$metadata:B(e)}]),[3,25];case 18:return x=[{}],[4,w(n,t)];case 19:return i=r.a.apply(void 0,[r.a.apply(void 0,x.concat([I.sent()])),{name:a,$metadata:B(e)}]),[3,25];case 20:return A=[{}],[4,O(n,t)];case 21:return i=r.a.apply(void 0,[r.a.apply(void 0,A.concat([I.sent()])),{name:a,$metadata:B(e)}]),[3,25];case 22:return T=[{}],[4,S(n,t)];case 23:return i=r.a.apply(void 0,[r.a.apply(void 0,T.concat([I.sent()])),{name:a,$metadata:B(e)}]),[3,25];case 24:P=n.body,a=P.code||P.Code||a,i=Object(r.a)(Object(r.a)({},P),{name:""+a,message:P.message||P.Message||a,$fault:"client",$metadata:B(e)}),I.label=25;case 25:return C=i.message||i.Message||a,i.message=C,delete i.Message,[2,Promise.reject(Object.assign(new Error(C),i))]}}))}))},l=function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var n,o;return Object(r.g)(this,(function(r){switch(r.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,f(e,t)]:(n={$metadata:B(e),activeContexts:void 0,alternativeIntents:void 0,botVersion:void 0,dialogState:void 0,intentName:void 0,message:void 0,messageFormat:void 0,nluIntentConfidence:void 0,responseCard:void 0,sentimentResponse:void 0,sessionAttributes:void 0,sessionId:void 0,slotToElicit:void 0,slots:void 0},[4,z(e.body,t)]);case 1:return void 0!==(o=r.sent()).activeContexts&&null!==o.activeContexts&&(n.activeContexts=T(o.activeContexts,t)),void 0!==o.alternativeIntents&&null!==o.alternativeIntents&&(n.alternativeIntents=I(o.alternativeIntents,t)),void 0!==o.botVersion&&null!==o.botVersion&&(n.botVersion=o.botVersion),void 0!==o.dialogState&&null!==o.dialogState&&(n.dialogState=o.dialogState),void 0!==o.intentName&&null!==o.intentName&&(n.intentName=o.intentName),void 0!==o.message&&null!==o.message&&(n.message=o.message),void 0!==o.messageFormat&&null!==o.messageFormat&&(n.messageFormat=o.messageFormat),void 0!==o.nluIntentConfidence&&null!==o.nluIntentConfidence&&(n.nluIntentConfidence=M(o.nluIntentConfidence,t)),void 0!==o.responseCard&&null!==o.responseCard&&(n.responseCard=L(o.responseCard,t)),void 0!==o.sentimentResponse&&null!==o.sentimentResponse&&(n.sentimentResponse=D(o.sentimentResponse,t)),void 0!==o.sessionAttributes&&null!==o.sessionAttributes&&(n.sessionAttributes=U(o.sessionAttributes,t)),void 0!==o.sessionId&&null!==o.sessionId&&(n.sessionId=o.sessionId),void 0!==o.slotToElicit&&null!==o.slotToElicit&&(n.slotToElicit=o.slotToElicit),void 0!==o.slots&&null!==o.slots&&(n.slots=U(o.slots,t)),[2,Promise.resolve(n)]}}))}))},f=function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var n,o,i,a,u,s,c,l,f,g,O,S,_,j,E;return Object(r.g)(this,(function(x){switch(x.label){case 0:return o=[Object(r.a)({},e)],E={},[4,z(e.body,t)];case 1:switch(n=r.a.apply(void 0,o.concat([(E.body=x.sent(),E)])),a="UnknownError",a=q(e,n.body),a){case"BadGatewayException":case"com.amazonaws.lexruntimeservice#BadGatewayException":return[3,2];case"BadRequestException":case"com.amazonaws.lexruntimeservice#BadRequestException":return[3,4];case"ConflictException":case"com.amazonaws.lexruntimeservice#ConflictException":return[3,6];case"DependencyFailedException":case"com.amazonaws.lexruntimeservice#DependencyFailedException":return[3,8];case"InternalFailureException":case"com.amazonaws.lexruntimeservice#InternalFailureException":return[3,10];case"LimitExceededException":case"com.amazonaws.lexruntimeservice#LimitExceededException":return[3,12];case"LoopDetectedException":case"com.amazonaws.lexruntimeservice#LoopDetectedException":return[3,14];case"NotFoundException":case"com.amazonaws.lexruntimeservice#NotFoundException":return[3,16]}return[3,18];case 2:return u=[{}],[4,d(n,t)];case 3:return i=r.a.apply(void 0,[r.a.apply(void 0,u.concat([x.sent()])),{name:a,$metadata:B(e)}]),[3,19];case 4:return s=[{}],[4,p(n,t)];case 5:return i=r.a.apply(void 0,[r.a.apply(void 0,s.concat([x.sent()])),{name:a,$metadata:B(e)}]),[3,19];case 6:return c=[{}],[4,h(n,t)];case 7:return i=r.a.apply(void 0,[r.a.apply(void 0,c.concat([x.sent()])),{name:a,$metadata:B(e)}]),[3,19];case 8:return l=[{}],[4,v(n,t)];case 9:return i=r.a.apply(void 0,[r.a.apply(void 0,l.concat([x.sent()])),{name:a,$metadata:B(e)}]),[3,19];case 10:return f=[{}],[4,y(n,t)];case 11:return i=r.a.apply(void 0,[r.a.apply(void 0,f.concat([x.sent()])),{name:a,$metadata:B(e)}]),[3,19];case 12:return g=[{}],[4,b(n,t)];case 13:return i=r.a.apply(void 0,[r.a.apply(void 0,g.concat([x.sent()])),{name:a,$metadata:B(e)}]),[3,19];case 14:return O=[{}],[4,m(n,t)];case 15:return i=r.a.apply(void 0,[r.a.apply(void 0,O.concat([x.sent()])),{name:a,$metadata:B(e)}]),[3,19];case 16:return S=[{}],[4,w(n,t)];case 17:return i=r.a.apply(void 0,[r.a.apply(void 0,S.concat([x.sent()])),{name:a,$metadata:B(e)}]),[3,19];case 18:_=n.body,a=_.code||_.Code||a,i=Object(r.a)(Object(r.a)({},_),{name:""+a,message:_.message||_.Message||a,$fault:"client",$metadata:B(e)}),x.label=19;case 19:return j=i.message||i.Message||a,i.message=j,delete i.Message,[2,Promise.reject(Object.assign(new Error(j),i))]}}))}))},d=function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var t,n;return Object(r.g)(this,(function(r){return t={name:"BadGatewayException",$fault:"server",$metadata:B(e),Message:void 0},void 0!==(n=e.body).Message&&null!==n.Message&&(t.Message=n.Message),[2,t]}))}))},p=function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var t,n;return Object(r.g)(this,(function(r){return t={name:"BadRequestException",$fault:"client",$metadata:B(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},h=function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var t,n;return Object(r.g)(this,(function(r){return t={name:"ConflictException",$fault:"client",$metadata:B(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},v=function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var t,n;return Object(r.g)(this,(function(r){return t={name:"DependencyFailedException",$fault:"client",$metadata:B(e),Message:void 0},void 0!==(n=e.body).Message&&null!==n.Message&&(t.Message=n.Message),[2,t]}))}))},y=function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var t,n;return Object(r.g)(this,(function(r){return t={name:"InternalFailureException",$fault:"server",$metadata:B(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},b=function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var t,n;return Object(r.g)(this,(function(r){return t={name:"LimitExceededException",$fault:"client",$metadata:B(e),message:void 0,retryAfterSeconds:void 0},void 0!==e.headers["retry-after"]&&(t.retryAfterSeconds=e.headers["retry-after"]),void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},m=function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var t,n;return Object(r.g)(this,(function(r){return t={name:"LoopDetectedException",$fault:"server",$metadata:B(e),Message:void 0},void 0!==(n=e.body).Message&&null!==n.Message&&(t.Message=n.Message),[2,t]}))}))},g=function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var t,n;return Object(r.g)(this,(function(r){return t={name:"NotAcceptableException",$fault:"client",$metadata:B(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},w=function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var t,n;return Object(r.g)(this,(function(r){return t={name:"NotFoundException",$fault:"client",$metadata:B(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},O=function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var t,n;return Object(r.g)(this,(function(r){return t={name:"RequestTimeoutException",$fault:"client",$metadata:B(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},S=function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var t,n;return Object(r.g)(this,(function(r){return t={name:"UnsupportedMediaTypeException",$fault:"client",$metadata:B(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},_=function(e,t){return Object.entries(e).reduce((function(e,t){var n,o=Object(r.h)(t,2),i=o[0],a=o[1];return null===a?e:Object(r.a)(Object(r.a)({},e),((n={})[i]=a,n))}),{})},j=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return Object(r.a)(Object(r.a)(Object(r.a)({},void 0!==e.name&&null!==e.name&&{name:e.name}),void 0!==e.parameters&&null!==e.parameters&&{parameters:_(e.parameters,t)}),void 0!==e.timeToLive&&null!==e.timeToLive&&{timeToLive:E(e.timeToLive,t)})}(e,t)}))},E=function(e,t){return Object(r.a)(Object(r.a)({},void 0!==e.timeToLiveInSeconds&&null!==e.timeToLiveInSeconds&&{timeToLiveInSeconds:e.timeToLiveInSeconds}),void 0!==e.turnsToLive&&null!==e.turnsToLive&&{turnsToLive:e.turnsToLive})},x=function(e,t){return Object.entries(e).reduce((function(e,t){var n,o=Object(r.h)(t,2),i=o[0],a=o[1];return null===a?e:Object(r.a)(Object(r.a)({},e),((n={})[i]=a,n))}),{})},A=function(e,t){return Object.entries(e).reduce((function(e,t){var n,o=Object(r.h)(t,2),i=o[0],a=o[1];return null===a?e:Object(r.a)(Object(r.a)({},e),((n={})[i]=a,n))}),{})},T=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{name:void 0!==e.name&&null!==e.name?e.name:void 0,parameters:void 0!==e.parameters&&null!==e.parameters?A(e.parameters,t):void 0,timeToLive:void 0!==e.timeToLive&&null!==e.timeToLive?P(e.timeToLive,t):void 0}}(e,t)}))},P=function(e,t){return{timeToLiveInSeconds:void 0!==e.timeToLiveInSeconds&&null!==e.timeToLiveInSeconds?e.timeToLiveInSeconds:void 0,turnsToLive:void 0!==e.turnsToLive&&null!==e.turnsToLive?e.turnsToLive:void 0}},C=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{attachmentLinkUrl:void 0!==e.attachmentLinkUrl&&null!==e.attachmentLinkUrl?e.attachmentLinkUrl:void 0,buttons:void 0!==e.buttons&&null!==e.buttons?R(e.buttons,t):void 0,imageUrl:void 0!==e.imageUrl&&null!==e.imageUrl?e.imageUrl:void 0,subTitle:void 0!==e.subTitle&&null!==e.subTitle?e.subTitle:void 0,title:void 0!==e.title&&null!==e.title?e.title:void 0}}(e,t)}))},M=function(e,t){return{score:void 0!==e.score&&null!==e.score?e.score:void 0}},I=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:k(e,t)}))},R=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{text:void 0!==e.text&&null!==e.text?e.text:void 0,value:void 0!==e.value&&null!==e.value?e.value:void 0}}(e)}))},k=function(e,t){return{intentName:void 0!==e.intentName&&null!==e.intentName?e.intentName:void 0,nluIntentConfidence:void 0!==e.nluIntentConfidence&&null!==e.nluIntentConfidence?M(e.nluIntentConfidence,t):void 0,slots:void 0!==e.slots&&null!==e.slots?U(e.slots,t):void 0}},L=function(e,t){return{contentType:void 0!==e.contentType&&null!==e.contentType?e.contentType:void 0,genericAttachments:void 0!==e.genericAttachments&&null!==e.genericAttachments?C(e.genericAttachments,t):void 0,version:void 0!==e.version&&null!==e.version?e.version:void 0}},D=function(e,t){return{sentimentLabel:void 0!==e.sentimentLabel&&null!==e.sentimentLabel?e.sentimentLabel:void 0,sentimentScore:void 0!==e.sentimentScore&&null!==e.sentimentScore?e.sentimentScore:void 0}},U=function(e,t){return Object.entries(e).reduce((function(e,t){var n,o=Object(r.h)(t,2),i=o[0],a=o[1];return null===a?e:Object(r.a)(Object(r.a)({},e),((n={})[i]=a,n))}),{})},B=function(e){var t;return{httpStatusCode:e.statusCode,requestId:null!==(t=e.headers["x-amzn-requestid"])&&void 0!==t?t:e.headers["x-amzn-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}},N=function(e,t){return function(e,t){return void 0===e&&(e=new Uint8Array),e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array)}(e,t).then((function(e){return t.utf8Encoder(e)}))},F=function(e){return!(null==e||""===e||Object.getOwnPropertyNames(e).includes("length")&&0==e.length||Object.getOwnPropertyNames(e).includes("size")&&0==e.size)},z=function(e,t){return N(e,t).then((function(e){return e.length?JSON.parse(e):{}}))},q=function(e,t){var n,r,o=function(e){var t=e;return t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},i=(n=e.headers,r="x-amzn-errortype",Object.keys(n).find((function(e){return e.toLowerCase()===r.toLowerCase()})));return void 0!==i?o(e.headers[i]):void 0!==t.code?o(t.code):void 0!==t.__type?o(t.__type):""}}).call(this,n(8).Buffer)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AwsCrc32=t.Crc32=t.crc32=void 0;var r=n(26),o=n(9);t.crc32=function(e){return(new i).update(e).digest()};var i=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var o=(0,r.__values)(e),i=o.next();!i.done;i=o.next()){var u=i.value;this.checksum=this.checksum>>>8^a[255&(this.checksum^u)]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}();t.Crc32=i;var a=(0,o.uint32ArrayFrom)([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]),u=n(84);Object.defineProperty(t,"AwsCrc32",{enumerable:!0,get:function(){return u.AwsCrc32}})},function(e,t,n){"use strict";(function(e){
|
|
17
16
|
/*!
|
|
18
17
|
* The buffer module from node.js, for the browser.
|
|
19
18
|
*
|
|
20
19
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
21
20
|
* @license MIT
|
|
22
21
|
*/
|
|
23
|
-
var n=r(26),i=r(27),o=r(28);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return l(this,e)}return c(this,e,t,r)}function c(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=d(e,t);return e}(e,t,r,n):"string"==typeof t?function(e,t,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|p(t,r),i=(e=s(e,n)).write(t,r);i!==n&&(e=e.slice(0,i));return e}(e,t,r):function(e,t){if(u.isBuffer(t)){var r=0|h(t.length);return 0===(e=s(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?s(e,0):d(e,t);if("Buffer"===t.type&&o(t.data))return d(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function l(e,t){if(f(t),e=s(e,t<0?0:0|h(t)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function d(e,t){var r=t.length<0?0:0|h(t.length);e=s(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function h(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return D(e).length;default:if(n)return z(e).length;t=(""+t).toLowerCase(),n=!0}}function v(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,r);case"utf8":case"utf-8":return x(this,t,r);case"ascii":return j(this,t,r);case"latin1":case"binary":return M(this,t,r);case"base64":return E(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){var o,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var f=-1;for(o=r;o<s;o++)if(c(e,o)===c(t,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===u)return f*a}else-1!==f&&(o-=o-f),f=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var l=!0,d=0;d<u;d++)if(c(e,o+d)!==c(t,d)){l=!1;break}if(l)return o}return-1}function y(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[r+a]=s}return a}function w(e,t,r,n){return q(z(t,e.length-r),e,r,n)}function _(e,t,r,n){return q(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function O(e,t,r,n){return _(e,t,r,n)}function S(e,t,r,n){return q(D(t),e,r,n)}function A(e,t,r,n){return q(function(e,t){for(var r,n,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function E(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function x(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,a,s,u,c=e[i],f=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=r)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=l}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=4096));return r}(n)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,r){return c(null,e,t,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,r){return function(e,t,r,n){return f(t),t<=0?s(e,t):void 0!==r?"string"==typeof n?s(e,t).fill(r,n):s(e,t).fill(r):s(e,t)}(null,e,t,r)},u.allocUnsafe=function(e){return l(null,e)},u.allocUnsafeSlow=function(e){return l(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=u.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var a=e[r];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?x(this,0,e):v.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,r,n,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(n,i),f=e.slice(t,r),l=0;l<s;++l)if(c[l]!==f[l]){o=c[l],a=f[l];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return m(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return m(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return y(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":return _(this,e,t,r);case"latin1":case"binary":return O(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function j(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function M(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function P(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=U(e[o]);return i}function T(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function C(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function R(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i<o;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function I(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i<o;++i)e[r+i]=t>>>8*(n?i:3-i)&255}function k(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(e,t,r,n,o){return o||k(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function N(e,t,r,n,o){return o||k(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;r=new u(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+e]}return r},u.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||C(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},u.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||C(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUInt8=function(e,t){return t||C(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||C(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||C(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||C(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||C(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||C(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||C(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||C(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||C(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||C(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||C(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||L(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||L(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):I(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):I(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);L(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<r&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);L(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):I(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):I(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return B(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return B(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return N(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return N(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i,o=n-r;if(this===e&&r<t&&t<n)for(i=o-1;i>=0;--i)e[i+t]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+o),t);return o},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{var a=u.isBuffer(e)?e:z(new u(e,n).toString()),s=a.length;for(o=0;o<r-t;++o)this[o+t]=a[o%s]}return this};var F=/[^+\/0-9A-Za-z-_]/g;function U(e){return e<16?"0"+e.toString(16):e.toString(16)}function z(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function D(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}}).call(this,r(25))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_HASHABLE_LENGTH=t.INIT=t.KEY=t.DIGEST_LENGTH=t.BLOCK_SIZE=void 0,t.BLOCK_SIZE=64,t.DIGEST_LENGTH=32,t.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),t.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1},function(e,t,r){var n=r(20),i=r(21),o=i;o.v1=n,o.v4=i,e.exports=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebCryptoSha256=t.Ie11Sha256=void 0,(0,r(1).__exportStar)(r(22),t);var n=r(10);Object.defineProperty(t,"Ie11Sha256",{enumerable:!0,get:function(){return n.Sha256}});var i=r(12);Object.defineProperty(t,"WebCryptoSha256",{enumerable:!0,get:function(){return i.Sha256}})},function(e,t,r){e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=90)}({17:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n=r(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var r=t.match(e);return r&&r.length>0&&r[1]||""},e.getSecondMatch=function(e,t){var r=t.match(e);return r&&r.length>1&&r[2]||""},e.matchAndReturnConst=function(e,t,r){if(e.test(t))return r},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,r,n){void 0===n&&(n=!1);var i=e.getVersionPrecision(t),o=e.getVersionPrecision(r),a=Math.max(i,o),s=0,u=e.map([t,r],(function(t){var r=a-e.getVersionPrecision(t),n=t+new Array(r+1).join(".0");return e.map(n.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(n&&(s=a-Math.min(i,o)),a-=1;a>=s;){if(u[0][a]>u[1][a])return 1;if(u[0][a]===u[1][a]){if(a===s)return 0;a-=1}else if(u[0][a]<u[1][a])return-1}},e.map=function(e,t){var r,n=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r<e.length;r+=1)n.push(t(e[r]));return n},e.find=function(e,t){var r,n;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(r=0,n=e.length;r<n;r+=1){var i=e[r];if(t(i,r))return i}},e.assign=function(e){for(var t,r,n=e,i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var s=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){n[t]=e[t]}))};for(t=0,r=o.length;t<r;t+=1)s();return e},e.getBrowserAlias=function(e){return n.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return n.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,r){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(91))&&n.__esModule?n:{default:n},o=r(18);function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s=function(){function e(){}var t,r;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,(r=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}])&&a(t,r),e}();t.default=s,e.exports=t.default},91:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n=u(r(92)),i=u(r(93)),o=u(r(94)),a=u(r(95)),s=u(r(17));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=s.default.find(n.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=s.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=s.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=s.default.find(a.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return s.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,r={},n=0,i={},o=0;if(Object.keys(e).forEach((function(t){var a=e[t];"string"==typeof a?(i[t]=a,o+=1):"object"==typeof a&&(r[t]=a,n+=1)})),n>0){var a=Object.keys(r),u=s.default.find(a,(function(e){return t.isOS(e)}));if(u){var c=this.satisfies(r[u]);if(void 0!==c)return c}var f=s.default.find(a,(function(e){return t.isPlatform(e)}));if(f){var l=this.satisfies(r[f]);if(void 0!==l)return l}}if(o>0){var d=Object.keys(i),h=s.default.find(d,(function(e){return t.isBrowser(e,!0)}));if(void 0!==h)return this.compareVersion(i[h])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var r=this.getBrowserName().toLowerCase(),n=e.toLowerCase(),i=s.default.getBrowserTypeByAlias(n);return t&&i&&(n=i.toLowerCase()),n===r},t.compareVersion=function(e){var t=[0],r=e,n=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(r=e.substr(1),"="===e[1]?(n=!0,r=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?r=e.substr(1):"~"===e[0]&&(n=!0,r=e.substr(1)),t.indexOf(s.default.compareVersions(i,r,n))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=c,e.exports=t.default},92:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=/version\/(\d+(\.?_?\d+)+)/i,a=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},r=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},r=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},r=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},r=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},r=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},r=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},r=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},r=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},r=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},r=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},r=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},r=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},r=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},r=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},r=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return r&&(t.version=r),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},r=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},r=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},r=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},r=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},r=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},r=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},r=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},r=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},r=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},r=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},r=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},r=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t={name:"Android Browser"},r=i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},r=i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},r=i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=a,e.exports=t.default},93:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),a=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:o.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),r=i.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},r=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return r&&(t.version=r),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),r=i.default.getMacOSVersionName(t),n={name:o.OS_MAP.MacOS,version:t};return r&&(n.versionName=r),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),r=i.default.getAndroidVersionName(t),n={name:o.OS_MAP.Android,version:t};return r&&(n.versionName=r),n}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),r={name:o.OS_MAP.WebOS};return t&&t.length&&(r.version=t),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:o.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.PlayStation4,version:t}}}];t.default=a,e.exports=t.default},94:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),a=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",r={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(r.model=t),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),r=e.test(/like (ipod|iphone)/i);return t&&!r},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];t.default=a,e.exports=t.default},95:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),a=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:o.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:o.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:o.ENGINE_MAP.Trident},r=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:o.ENGINE_MAP.Presto},r=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=e.test(/gecko/i),r=e.test(/like gecko/i);return t&&!r},describe:function(e){var t={name:o.ENGINE_MAP.Gecko},r=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:o.ENGINE_MAP.WebKit},r=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}}];t.default=a,e.exports=t.default}})},function(e){e.exports=JSON.parse('{"name":"@aws-sdk/client-lex-runtime-service","description":"AWS SDK for JavaScript Lex Runtime Service Client for Node.js, Browser and React Native","version":"3.6.1","scripts":{"clean":"yarn remove-definitions && yarn remove-dist && yarn remove-documentation","build-documentation":"yarn remove-documentation && typedoc ./","prepublishOnly":"yarn build","pretest":"yarn build:cjs","remove-definitions":"rimraf ./types","remove-dist":"rimraf ./dist","remove-documentation":"rimraf ./docs","test:unit":"mocha **/cjs/**/*.spec.js","test":"yarn test:unit","build:cjs":"tsc -p tsconfig.json","build:es":"tsc -p tsconfig.es.json","build":"yarn build:cjs && yarn build:es","postbuild":"downlevel-dts types types/ts3.4"},"main":"./dist/cjs/index.js","types":"./types/index.d.ts","module":"./dist/es/index.js","browser":{"./runtimeConfig":"./runtimeConfig.browser"},"react-native":{"./runtimeConfig":"./runtimeConfig.native"},"sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"^1.0.0","@aws-crypto/sha256-js":"^1.0.0","@aws-sdk/config-resolver":"3.6.1","@aws-sdk/credential-provider-node":"3.6.1","@aws-sdk/fetch-http-handler":"3.6.1","@aws-sdk/hash-node":"3.6.1","@aws-sdk/invalid-dependency":"3.6.1","@aws-sdk/middleware-content-length":"3.6.1","@aws-sdk/middleware-host-header":"3.6.1","@aws-sdk/middleware-logger":"3.6.1","@aws-sdk/middleware-retry":"3.6.1","@aws-sdk/middleware-serde":"3.6.1","@aws-sdk/middleware-signing":"3.6.1","@aws-sdk/middleware-stack":"3.6.1","@aws-sdk/middleware-user-agent":"3.6.1","@aws-sdk/node-config-provider":"3.6.1","@aws-sdk/node-http-handler":"3.6.1","@aws-sdk/protocol-http":"3.6.1","@aws-sdk/smithy-client":"3.6.1","@aws-sdk/types":"3.6.1","@aws-sdk/url-parser":"3.6.1","@aws-sdk/url-parser-native":"3.6.1","@aws-sdk/util-base64-browser":"3.6.1","@aws-sdk/util-base64-node":"3.6.1","@aws-sdk/util-body-length-browser":"3.6.1","@aws-sdk/util-body-length-node":"3.6.1","@aws-sdk/util-user-agent-browser":"3.6.1","@aws-sdk/util-user-agent-node":"3.6.1","@aws-sdk/util-utf8-browser":"3.6.1","@aws-sdk/util-utf8-node":"3.6.1","tslib":"^2.0.0"},"devDependencies":{"@aws-sdk/client-documentation-generator":"3.6.1","@types/chai":"^4.2.11","@types/mocha":"^8.0.4","@types/node":"^12.7.5","downlevel-dts":"0.7.0","jest":"^26.1.0","rimraf":"^3.0.0","typedoc":"^0.19.2","typescript":"~4.1.2"},"engines":{"node":">=10.0.0"},"typesVersions":{"<4.0":{"types/*":["types/ts3.4/*"]}},"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-lex-runtime-service","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-lex-runtime-service"}}')},function(e,t,r){var n,i,o=r(8),a=r(9),s=0,u=0;e.exports=function(e,t,r){var c=t&&r||0,f=t||[],l=(e=e||{}).node||n,d=void 0!==e.clockseq?e.clockseq:i;if(null==l||null==d){var h=o();null==l&&(l=n=[1|h[0],h[1],h[2],h[3],h[4],h[5]]),null==d&&(d=i=16383&(h[6]<<8|h[7]))}var p=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:u+1,g=p-s+(v-u)/1e4;if(g<0&&void 0===e.clockseq&&(d=d+1&16383),(g<0||p>s)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=p,u=v,i=d;var m=(1e4*(268435455&(p+=122192928e5))+v)%4294967296;f[c++]=m>>>24&255,f[c++]=m>>>16&255,f[c++]=m>>>8&255,f[c++]=255&m;var b=p/4294967296*1e4&268435455;f[c++]=b>>>8&255,f[c++]=255&b,f[c++]=b>>>24&15|16,f[c++]=b>>>16&255,f[c++]=d>>>8|128,f[c++]=255&d;for(var y=0;y<6;++y)f[c+y]=l[y];return t||a(f)}},function(e,t,r){var n=r(8),i=r(9);e.exports=function(e,t,r){var o=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||n)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[o+s]=a[s];return t||i(a)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var n=r(10),i=r(12),o=r(32),a=r(35),s=r(37),u=r(7),c=function(){function e(e){(0,a.supportsWebCrypto)((0,u.locateWindow)())?this.hash=new i.Sha256(e):(0,s.isMsWindow)((0,u.locateWindow)())?this.hash=new n.Sha256(e):this.hash=new o.Sha256(e)}return e.prototype.update=function(e,t){this.hash.update(e,t)},e.prototype.digest=function(){return this.hash.digest()},e}();t.Sha256=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var n=r(44),i=void 0!==e&&e.from?function(t){return e.from(t,"utf8")}:n.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"==typeof e?i(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}}).call(this,r(14).Buffer)},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";t.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,n=c(e),a=n[0],s=n[1],u=new o(function(e,t,r){return 3*(t+r)/4-r}(0,a,s)),f=0,l=s>0?a-4:a;for(r=0;r<l;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],u[f++]=t>>16&255,u[f++]=t>>8&255,u[f++]=255&t;2===s&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,u[f++]=255&t);1===s&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,u[f++]=t>>8&255,u[f++]=255&t);return u},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],a=0,s=r-i;a<s;a+=16383)o.push(f(e,a,a+16383>s?s:a+16383));1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)n[s]=a[s],i[a.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function f(e,t,r){for(var i,o,a=[],s=t;s<r;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){
|
|
22
|
+
var r=n(43),o=n(44),i=n(45);function a(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=s.prototype:(null===e&&(e=new s(t)),e.length=t),e}function s(e,t,n){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);s.TYPED_ARRAY_SUPPORT?(e=t).__proto__=s.prototype:e=d(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!s.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|h(t,n),o=(e=u(e,r)).write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(s.isBuffer(t)){var n=0|p(t.length);return 0===(e=u(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?u(e,0):d(e,t);if("Buffer"===t.type&&i(t.data))return d(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(l(t),e=u(e,t<0?0:0|p(t)),!s.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function d(e,t){var n=t.length<0?0:0|p(t.length);e=u(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function h(e,t){if(s.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function v(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,n);case"utf8":case"utf-8":return x(this,t,n);case"ascii":return A(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return E(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:m(e,t,n,r,o);if("number"==typeof t)return t&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):m(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,r,o){var i,a=1,u=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,u/=2,s/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var l=-1;for(i=n;i<u;i++)if(c(e,i)===c(t,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===s)return l*a}else-1!==l&&(i-=i-l),l=-1}else for(n+s>u&&(n=u-s),i=n;i>=0;i--){for(var f=!0,d=0;d<s;d++)if(c(e,i+d)!==c(t,d)){f=!1;break}if(f)return i}return-1}function g(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a<r;++a){var u=parseInt(t.substr(2*a,2),16);if(isNaN(u))return a;e[n+a]=u}return a}function w(e,t,n,r){return q(F(t,e.length-n),e,n,r)}function O(e,t,n,r){return q(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function S(e,t,n,r){return O(e,t,n,r)}function _(e,t,n,r){return q(z(t),e,n,r)}function j(e,t,n,r){return q(function(e,t){for(var n,r,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function E(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function x(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,a,u,s,c=e[o],l=null,f=c>239?4:c>223?3:c>191?2:1;if(o+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(i=e[o+1]))&&(s=(31&c)<<6|63&i)>127&&(l=s);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(s=(15&c)<<12|(63&i)<<6|63&a)>2047&&(s<55296||s>57343)&&(l=s);break;case 4:i=e[o+1],a=e[o+2],u=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&u)&&(s=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&u)>65535&&s<1114112&&(l=s)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}t.Buffer=s,t.SlowBuffer=function(e){+e!=e&&(e=0);return s.alloc(+e)},t.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),s.poolSize=8192,s._augment=function(e){return e.__proto__=s.prototype,e},s.from=function(e,t,n){return c(null,e,t,n)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(e,t,n){return function(e,t,n,r){return l(t),t<=0?u(e,t):void 0!==n?"string"==typeof r?u(e,t).fill(n,r):u(e,t).fill(n):u(e,t)}(null,e,t,n)},s.allocUnsafe=function(e){return f(null,e)},s.allocUnsafeSlow=function(e){return f(null,e)},s.isBuffer=function(e){return!(null==e||!e._isBuffer)},s.compare=function(e,t){if(!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=s.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var a=e[n];if(!s.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,o),o+=a.length}return r},s.byteLength=h,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},s.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},s.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},s.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?x(this,0,e):v.apply(this,arguments)},s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},s.prototype.compare=function(e,t,n,r,o){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),u=Math.min(i,a),c=this.slice(r,o),l=e.slice(t,n),f=0;f<u;++f)if(c[f]!==l[f]){i=c[f],a=l[f];break}return i<a?-1:a<i?1:0},s.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},s.prototype.indexOf=function(e,t,n){return b(this,e,t,n,!0)},s.prototype.lastIndexOf=function(e,t,n){return b(this,e,t,n,!1)},s.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return g(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return O(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return _(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function A(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function T(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function P(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=t;i<n;++i)o+=N(e[i]);return o}function C(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function M(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,n,r,o,i){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function R(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o<i;++o)e[n+o]=(t&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function k(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o<i;++o)e[n+o]=t>>>8*(r?o:3-o)&255}function L(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function D(e,t,n,r,i){return i||L(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,i){return i||L(e,0,n,8),o.write(e,t,n,r,52,8),n+8}s.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),s.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=s.prototype;else{var o=t-e;n=new s(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+e]}return n},s.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},s.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},s.prototype.readUInt8=function(e,t){return t||M(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return t||M(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return t||M(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},s.prototype.readInt8=function(e,t){return t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){t||M(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){t||M(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return t||M(e,4,this.length),o.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return t||M(e,4,this.length),o.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return t||M(e,8,this.length),o.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return t||M(e,8,this.length),o.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||I(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},s.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||I(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,255,0),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):k(this,e,t,!0),t+4},s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):k(this,e,t,!1),t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);I(this,e,t,n,o-1,-o)}var i=0,a=1,u=0;for(this[t]=255&e;++i<n&&(a*=256);)e<0&&0===u&&0!==this[t+i-1]&&(u=1),this[t+i]=(e/a>>0)-u&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);I(this,e,t,n,o-1,-o)}var i=n-1,a=1,u=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===u&&0!==this[t+i+1]&&(u=1),this[t+i]=(e/a>>0)-u&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,127,-128),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):k(this,e,t,!0),t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):k(this,e,t,!1),t+4},s.prototype.writeFloatLE=function(e,t,n){return D(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return D(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o,i=r-n;if(this===e&&n<t&&t<r)for(o=i-1;o>=0;--o)e[o+t]=this[o+n];else if(i<1e3||!s.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),t);return i},s.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var a=s.isBuffer(e)?e:F(new s(e,r).toString()),u=a.length;for(i=0;i<n-t;++i)this[i+t]=a[i%u]}return this};var B=/[^+\/0-9A-Za-z-_]/g;function N(e){return e<16?"0"+e.toString(16):e.toString(16)}function F(e,t){var n;t=t||1/0;for(var r=e.length,o=null,i=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function z(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(B,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(42))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var r=n(68);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return r.convertToBuffer}});var o=n(69);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return o.isEmptyData}});var i=n(70);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return i.numToUint8}});var a=n(71);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return a.uint32ArrayFrom}})},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return i})),n.d(t,"__rest",(function(){return a})),n.d(t,"__decorate",(function(){return u})),n.d(t,"__param",(function(){return s})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return l})),n.d(t,"__generator",(function(){return f})),n.d(t,"__createBinding",(function(){return d})),n.d(t,"__exportStar",(function(){return p})),n.d(t,"__values",(function(){return h})),n.d(t,"__read",(function(){return v})),n.d(t,"__spread",(function(){return y})),n.d(t,"__spreadArrays",(function(){return b})),n.d(t,"__await",(function(){return m})),n.d(t,"__asyncGenerator",(function(){return g})),n.d(t,"__asyncDelegator",(function(){return w})),n.d(t,"__asyncValues",(function(){return O})),n.d(t,"__makeTemplateObject",(function(){return S})),n.d(t,"__importStar",(function(){return _})),n.d(t,"__importDefault",(function(){return j})),n.d(t,"__classPrivateFieldGet",(function(){return E})),n.d(t,"__classPrivateFieldSet",(function(){return x}));
|
|
23
|
+
/*! *****************************************************************************
|
|
24
|
+
Copyright (c) Microsoft Corporation.
|
|
25
|
+
|
|
26
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
27
|
+
purpose with or without fee is hereby granted.
|
|
28
|
+
|
|
29
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
30
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
31
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
32
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
33
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
34
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
35
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
36
|
+
***************************************************************************** */
|
|
37
|
+
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function b(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function g(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof m?Promise.resolve(n.value.v).then(s,c):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function l(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function O(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function _(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function j(e){return e&&e.__esModule?e:{default:e}}function E(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function x(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,o=n;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(39),o=n(14),i=n(27),a=n(4),u=function(){function e(e){e?(this.operation=function(e){return new Promise((function(t,n){var r=(0,a.locateWindow)().msCrypto.subtle.importKey("raw",s(e),o.SHA_256_HMAC_ALGO,!1,["sign"]);r.oncomplete=function(){r.result&&t(r.result),n(new Error("ImportKey completed without importing key."))},r.onerror=function(){n(new Error("ImportKey failed to import key."))}}))}(e).then((function(e){return(0,a.locateWindow)().msCrypto.subtle.sign(o.SHA_256_HMAC_ALGO,e)})),this.operation.catch((function(){}))):this.operation=Promise.resolve((0,a.locateWindow)().msCrypto.subtle.digest("SHA-256"))}return e.prototype.update=function(e){var t=this;(0,r.isEmptyData)(e)||(this.operation=this.operation.then((function(n){return n.onerror=function(){t.operation=Promise.reject(new Error("Error encountered updating hash"))},n.process(s(e)),n})),this.operation.catch((function(){})))},e.prototype.digest=function(){return this.operation.then((function(e){return new Promise((function(t,n){e.onerror=function(){n(new Error("Error encountered finalizing hash"))},e.oncomplete=function(){e.result&&t(new Uint8Array(e.result)),n(new Error("Error encountered finalizing hash"))},e.finish()}))}))},e}();function s(e){return"string"==typeof e?(0,i.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_DATA_SHA_256=t.SHA_256_HMAC_ALGO=t.SHA_256_HASH=void 0,t.SHA_256_HASH={name:"SHA-256"},t.SHA_256_HMAC_ALGO={name:"HMAC",hash:t.SHA_256_HASH},t.EMPTY_DATA_SHA_256=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(40),o=n(14),i=n(4),a=function(){function e(e){this.toHash=new Uint8Array(0),void 0!==e&&(this.key=new Promise((function(t,n){(0,i.locateWindow)().crypto.subtle.importKey("raw",(0,r.convertToBuffer)(e),o.SHA_256_HMAC_ALGO,!1,["sign"]).then(t,n)})),this.key.catch((function(){})))}return e.prototype.update=function(e){if(!(0,r.isEmptyData)(e)){var t=(0,r.convertToBuffer)(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then((function(t){return(0,i.locateWindow)().crypto.subtle.sign(o.SHA_256_HMAC_ALGO,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):(0,r.isEmptyData)(this.toHash)?Promise.resolve(o.EMPTY_DATA_SHA_256):Promise.resolve().then((function(){return(0,i.locateWindow)().crypto.subtle.digest(o.SHA_256_HASH,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e}();t.Sha256=a},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return i})),n.d(t,"__rest",(function(){return a})),n.d(t,"__decorate",(function(){return u})),n.d(t,"__param",(function(){return s})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return l})),n.d(t,"__generator",(function(){return f})),n.d(t,"__createBinding",(function(){return d})),n.d(t,"__exportStar",(function(){return p})),n.d(t,"__values",(function(){return h})),n.d(t,"__read",(function(){return v})),n.d(t,"__spread",(function(){return y})),n.d(t,"__spreadArrays",(function(){return b})),n.d(t,"__await",(function(){return m})),n.d(t,"__asyncGenerator",(function(){return g})),n.d(t,"__asyncDelegator",(function(){return w})),n.d(t,"__asyncValues",(function(){return O})),n.d(t,"__makeTemplateObject",(function(){return S})),n.d(t,"__importStar",(function(){return _})),n.d(t,"__importDefault",(function(){return j})),n.d(t,"__classPrivateFieldGet",(function(){return E})),n.d(t,"__classPrivateFieldSet",(function(){return x}));
|
|
38
|
+
/*! *****************************************************************************
|
|
39
|
+
Copyright (c) Microsoft Corporation.
|
|
40
|
+
|
|
41
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
42
|
+
purpose with or without fee is hereby granted.
|
|
43
|
+
|
|
44
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
45
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
46
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
47
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
48
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
49
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
50
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
51
|
+
***************************************************************************** */
|
|
52
|
+
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function b(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function g(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof m?Promise.resolve(n.value.v).then(s,c):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function l(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function O(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function _(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function j(e){return e&&e.__esModule?e:{default:e}}function E(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function x(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_HASHABLE_LENGTH=t.INIT=t.KEY=t.DIGEST_LENGTH=t.BLOCK_SIZE=void 0,t.BLOCK_SIZE=64,t.DIGEST_LENGTH=32,t.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),t.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return i})),n.d(t,"__rest",(function(){return a})),n.d(t,"__decorate",(function(){return u})),n.d(t,"__param",(function(){return s})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return l})),n.d(t,"__generator",(function(){return f})),n.d(t,"__createBinding",(function(){return d})),n.d(t,"__exportStar",(function(){return p})),n.d(t,"__values",(function(){return h})),n.d(t,"__read",(function(){return v})),n.d(t,"__spread",(function(){return y})),n.d(t,"__spreadArrays",(function(){return b})),n.d(t,"__await",(function(){return m})),n.d(t,"__asyncGenerator",(function(){return g})),n.d(t,"__asyncDelegator",(function(){return w})),n.d(t,"__asyncValues",(function(){return O})),n.d(t,"__makeTemplateObject",(function(){return S})),n.d(t,"__importStar",(function(){return _})),n.d(t,"__importDefault",(function(){return j})),n.d(t,"__classPrivateFieldGet",(function(){return E})),n.d(t,"__classPrivateFieldSet",(function(){return x}));
|
|
53
|
+
/*! *****************************************************************************
|
|
54
|
+
Copyright (c) Microsoft Corporation.
|
|
55
|
+
|
|
56
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
57
|
+
purpose with or without fee is hereby granted.
|
|
58
|
+
|
|
59
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
60
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
61
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
62
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
63
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
64
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
65
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
66
|
+
***************************************************************************** */
|
|
67
|
+
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function b(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function g(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof m?Promise.resolve(n.value.v).then(s,c):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function l(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function O(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function _(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function j(e){return e&&e.__esModule?e:{default:e}}function E(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function x(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var s,c=[],l=!1,f=-1;function d(){l&&s&&(l=!1,s.length?c=s.concat(c):f=-1,c.length&&p())}function p(){if(!l){var e=u(d);l=!0;for(var t=c.length;t;){for(s=c,c=[];++f<t;)s&&s[f].run();f=-1,t=c.length}s=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function v(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new h(e,t)),1!==c.length||l||u(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){"use strict";(function(e){}).call(this,n(19))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(67),o=n(22),i=n(86),a=n(4),u=function(){function e(e){e?(this.operation=function(e){return new Promise((function(t,n){var r=(0,a.locateWindow)().msCrypto.subtle.importKey("raw",s(e),o.SHA_256_HMAC_ALGO,!1,["sign"]);r.oncomplete=function(){r.result&&t(r.result),n(new Error("ImportKey completed without importing key."))},r.onerror=function(){n(new Error("ImportKey failed to import key."))}}))}(e).then((function(e){return(0,a.locateWindow)().msCrypto.subtle.sign(o.SHA_256_HMAC_ALGO,e)})),this.operation.catch((function(){}))):this.operation=Promise.resolve((0,a.locateWindow)().msCrypto.subtle.digest("SHA-256"))}return e.prototype.update=function(e){var t=this;(0,r.isEmptyData)(e)||(this.operation=this.operation.then((function(n){return n.onerror=function(){t.operation=Promise.reject(new Error("Error encountered updating hash"))},n.process(s(e)),n})),this.operation.catch((function(){})))},e.prototype.digest=function(){return this.operation.then((function(e){return new Promise((function(t,n){e.onerror=function(){n(new Error("Error encountered finalizing hash"))},e.oncomplete=function(){e.result&&t(new Uint8Array(e.result)),n(new Error("Error encountered finalizing hash"))},e.finish()}))}))},e}();function s(e){return"string"==typeof e?(0,i.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_DATA_SHA_256=t.SHA_256_HMAC_ALGO=t.SHA_256_HASH=void 0,t.SHA_256_HASH={name:"SHA-256"},t.SHA_256_HMAC_ALGO={name:"HMAC",hash:t.SHA_256_HASH},t.EMPTY_DATA_SHA_256=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(9),o=n(22),i=n(4),a=function(){function e(e){this.toHash=new Uint8Array(0),void 0!==e&&(this.key=new Promise((function(t,n){(0,i.locateWindow)().crypto.subtle.importKey("raw",(0,r.convertToBuffer)(e),o.SHA_256_HMAC_ALGO,!1,["sign"]).then(t,n)})),this.key.catch((function(){})))}return e.prototype.update=function(e){if(!(0,r.isEmptyData)(e)){var t=(0,r.convertToBuffer)(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then((function(t){return(0,i.locateWindow)().crypto.subtle.sign(o.SHA_256_HMAC_ALGO,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):(0,r.isEmptyData)(this.toHash)?Promise.resolve(o.EMPTY_DATA_SHA_256):Promise.resolve().then((function(){return(0,i.locateWindow)().crypto.subtle.digest(o.SHA_256_HASH,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e}();t.Sha256=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_HASHABLE_LENGTH=t.INIT=t.KEY=t.DIGEST_LENGTH=t.BLOCK_SIZE=void 0,t.BLOCK_SIZE=64,t.DIGEST_LENGTH=32,t.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),t.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return i})),n.d(t,"__rest",(function(){return a})),n.d(t,"__decorate",(function(){return u})),n.d(t,"__param",(function(){return s})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return l})),n.d(t,"__generator",(function(){return f})),n.d(t,"__createBinding",(function(){return d})),n.d(t,"__exportStar",(function(){return p})),n.d(t,"__values",(function(){return h})),n.d(t,"__read",(function(){return v})),n.d(t,"__spread",(function(){return y})),n.d(t,"__spreadArrays",(function(){return b})),n.d(t,"__await",(function(){return m})),n.d(t,"__asyncGenerator",(function(){return g})),n.d(t,"__asyncDelegator",(function(){return w})),n.d(t,"__asyncValues",(function(){return O})),n.d(t,"__makeTemplateObject",(function(){return S})),n.d(t,"__importStar",(function(){return _})),n.d(t,"__importDefault",(function(){return j})),n.d(t,"__classPrivateFieldGet",(function(){return E})),n.d(t,"__classPrivateFieldSet",(function(){return x}));
|
|
68
|
+
/*! *****************************************************************************
|
|
69
|
+
Copyright (c) Microsoft Corporation.
|
|
70
|
+
|
|
71
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
72
|
+
purpose with or without fee is hereby granted.
|
|
73
|
+
|
|
74
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
75
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
76
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
77
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
78
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
79
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
80
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
81
|
+
***************************************************************************** */
|
|
82
|
+
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function b(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function g(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof m?Promise.resolve(n.value.v).then(s,c):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function l(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function O(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function _(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function j(e){return e&&e.__esModule?e:{default:e}}function E(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function x(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return i})),n.d(t,"__rest",(function(){return a})),n.d(t,"__decorate",(function(){return u})),n.d(t,"__param",(function(){return s})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return l})),n.d(t,"__generator",(function(){return f})),n.d(t,"__createBinding",(function(){return d})),n.d(t,"__exportStar",(function(){return p})),n.d(t,"__values",(function(){return h})),n.d(t,"__read",(function(){return v})),n.d(t,"__spread",(function(){return y})),n.d(t,"__spreadArrays",(function(){return b})),n.d(t,"__await",(function(){return m})),n.d(t,"__asyncGenerator",(function(){return g})),n.d(t,"__asyncDelegator",(function(){return w})),n.d(t,"__asyncValues",(function(){return O})),n.d(t,"__makeTemplateObject",(function(){return S})),n.d(t,"__importStar",(function(){return _})),n.d(t,"__importDefault",(function(){return j})),n.d(t,"__classPrivateFieldGet",(function(){return E})),n.d(t,"__classPrivateFieldSet",(function(){return x}));
|
|
83
|
+
/*! *****************************************************************************
|
|
84
|
+
Copyright (c) Microsoft Corporation.
|
|
85
|
+
|
|
86
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
87
|
+
purpose with or without fee is hereby granted.
|
|
88
|
+
|
|
89
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
90
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
91
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
92
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
93
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
94
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
95
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
96
|
+
***************************************************************************** */
|
|
97
|
+
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function b(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function g(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof m?Promise.resolve(n.value.v).then(s,c):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function l(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function O(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function _(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function j(e){return e&&e.__esModule?e:{default:e}}function E(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function x(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";n.r(t),n.d(t,"fromUtf8",(function(){return r})),n.d(t,"toUtf8",(function(){return o}));var r=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e.charCodeAt(n);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(n+1<e.length&&55296==(64512&o)&&56320==(64512&e.charCodeAt(n+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(o>>12|224,o>>6&63|128,63&o|128)}return Uint8Array.from(t)}(e)},o=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",n=0,r=e.length;n<r;n++){var o=e[n];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){var i=e[++n];t+=String.fromCharCode((31&o)<<6|63&i)}else if(240<=o&&o<365){var a="%"+[o,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&o)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)}},function(e,t,n){var r=n(35),o=n(36),i=o;i.v1=r,i.v4=o,e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebCryptoSha256=t.Ie11Sha256=void 0,(0,n(37).__exportStar)(n(38),t);var r=n(13);Object.defineProperty(t,"Ie11Sha256",{enumerable:!0,get:function(){return r.Sha256}});var o=n(15);Object.defineProperty(t,"WebCryptoSha256",{enumerable:!0,get:function(){return o.Sha256}})},function(e){e.exports=JSON.parse('{"name":"@aws-sdk/client-lex-runtime-service","description":"AWS SDK for JavaScript Lex Runtime Service Client for Node.js, Browser and React Native","version":"3.6.1","scripts":{"clean":"yarn remove-definitions && yarn remove-dist && yarn remove-documentation","build-documentation":"yarn remove-documentation && typedoc ./","prepublishOnly":"yarn build","pretest":"yarn build:cjs","remove-definitions":"rimraf ./types","remove-dist":"rimraf ./dist","remove-documentation":"rimraf ./docs","test:unit":"mocha **/cjs/**/*.spec.js","test":"yarn test:unit","build:cjs":"tsc -p tsconfig.json","build:es":"tsc -p tsconfig.es.json","build":"yarn build:cjs && yarn build:es","postbuild":"downlevel-dts types types/ts3.4"},"main":"./dist/cjs/index.js","types":"./types/index.d.ts","module":"./dist/es/index.js","browser":{"./runtimeConfig":"./runtimeConfig.browser"},"react-native":{"./runtimeConfig":"./runtimeConfig.native"},"sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"^1.0.0","@aws-crypto/sha256-js":"^1.0.0","@aws-sdk/config-resolver":"3.6.1","@aws-sdk/credential-provider-node":"3.6.1","@aws-sdk/fetch-http-handler":"3.6.1","@aws-sdk/hash-node":"3.6.1","@aws-sdk/invalid-dependency":"3.6.1","@aws-sdk/middleware-content-length":"3.6.1","@aws-sdk/middleware-host-header":"3.6.1","@aws-sdk/middleware-logger":"3.6.1","@aws-sdk/middleware-retry":"3.6.1","@aws-sdk/middleware-serde":"3.6.1","@aws-sdk/middleware-signing":"3.6.1","@aws-sdk/middleware-stack":"3.6.1","@aws-sdk/middleware-user-agent":"3.6.1","@aws-sdk/node-config-provider":"3.6.1","@aws-sdk/node-http-handler":"3.6.1","@aws-sdk/protocol-http":"3.6.1","@aws-sdk/smithy-client":"3.6.1","@aws-sdk/types":"3.6.1","@aws-sdk/url-parser":"3.6.1","@aws-sdk/url-parser-native":"3.6.1","@aws-sdk/util-base64-browser":"3.6.1","@aws-sdk/util-base64-node":"3.6.1","@aws-sdk/util-body-length-browser":"3.6.1","@aws-sdk/util-body-length-node":"3.6.1","@aws-sdk/util-user-agent-browser":"3.6.1","@aws-sdk/util-user-agent-node":"3.6.1","@aws-sdk/util-utf8-browser":"3.6.1","@aws-sdk/util-utf8-node":"3.6.1","tslib":"^2.0.0"},"devDependencies":{"@aws-sdk/client-documentation-generator":"3.6.1","@types/chai":"^4.2.11","@types/mocha":"^8.0.4","@types/node":"^12.7.5","downlevel-dts":"0.7.0","jest":"^26.1.0","rimraf":"^3.0.0","typedoc":"^0.19.2","typescript":"~4.1.2"},"engines":{"node":">=10.0.0"},"typesVersions":{"<4.0":{"types/*":["types/ts3.4/*"]}},"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-lex-runtime-service","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-lex-runtime-service"}}')},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return a}));var r=n(0),o=n(34),i={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},a=function(t){return{applyToStack:function(n){n.add(function(t){return function(n){return function(i){return Object(r.e)(void 0,void 0,void 0,(function(){var a,u,s,c;return Object(r.g)(this,(function(l){return a=i.request,!o.a.isInstance(a)||"node"!==t.runtime||a.headers.hasOwnProperty("X-Amzn-Trace-Id")?[2,n(i)]:(u=e.env.AWS_LAMBDA_FUNCTION_NAME,s=e.env._X_AMZN_TRACE_ID,(c=function(e){return"string"==typeof e&&e.length>0})(u)&&c(s)&&(a.headers["X-Amzn-Trace-Id"]=s),[2,n(Object(r.a)(Object(r.a)({},i),{request:a}))])}))}))}}}(t),i)}}}}).call(this,n(19))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebCryptoSha256=t.Ie11Sha256=void 0,(0,n(10).__exportStar)(n(66),t);var r=n(21);Object.defineProperty(t,"Ie11Sha256",{enumerable:!0,get:function(){return r.Sha256}});var o=n(23);Object.defineProperty(t,"WebCryptoSha256",{enumerable:!0,get:function(){return o.Sha256}})},function(e){e.exports=JSON.parse('{"name":"@aws-sdk/client-lex-runtime-v2","description":"AWS SDK for JavaScript Lex Runtime V2 Client for Node.js, Browser and React Native","version":"3.171.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"tsc -p tsconfig.cjs.json","build:docs":"typedoc","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"2.0.0","@aws-crypto/sha256-js":"2.0.0","@aws-sdk/client-sts":"3.171.0","@aws-sdk/config-resolver":"3.171.0","@aws-sdk/credential-provider-node":"3.171.0","@aws-sdk/eventstream-handler-node":"3.171.0","@aws-sdk/eventstream-serde-browser":"3.171.0","@aws-sdk/eventstream-serde-config-resolver":"3.171.0","@aws-sdk/eventstream-serde-node":"3.171.0","@aws-sdk/fetch-http-handler":"3.171.0","@aws-sdk/hash-node":"3.171.0","@aws-sdk/invalid-dependency":"3.171.0","@aws-sdk/middleware-content-length":"3.171.0","@aws-sdk/middleware-eventstream":"3.171.0","@aws-sdk/middleware-host-header":"3.171.0","@aws-sdk/middleware-logger":"3.171.0","@aws-sdk/middleware-recursion-detection":"3.171.0","@aws-sdk/middleware-retry":"3.171.0","@aws-sdk/middleware-serde":"3.171.0","@aws-sdk/middleware-signing":"3.171.0","@aws-sdk/middleware-stack":"3.171.0","@aws-sdk/middleware-user-agent":"3.171.0","@aws-sdk/node-config-provider":"3.171.0","@aws-sdk/node-http-handler":"3.171.0","@aws-sdk/protocol-http":"3.171.0","@aws-sdk/smithy-client":"3.171.0","@aws-sdk/types":"3.171.0","@aws-sdk/url-parser":"3.171.0","@aws-sdk/util-base64-browser":"3.170.0","@aws-sdk/util-base64-node":"3.170.0","@aws-sdk/util-body-length-browser":"3.170.0","@aws-sdk/util-body-length-node":"3.170.0","@aws-sdk/util-defaults-mode-browser":"3.171.0","@aws-sdk/util-defaults-mode-node":"3.171.0","@aws-sdk/util-user-agent-browser":"3.171.0","@aws-sdk/util-user-agent-node":"3.171.0","@aws-sdk/util-utf8-browser":"3.170.0","@aws-sdk/util-utf8-node":"3.170.0","tslib":"^2.3.1"},"devDependencies":{"@aws-sdk/service-client-documentation-generator":"3.170.0","@tsconfig/recommended":"1.0.1","@types/node":"^12.7.5","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typedoc":"0.19.2","typescript":"~4.6.2"},"overrides":{"typedoc":{"typescript":"~4.6.2"}},"engines":{"node":">=12.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-lex-runtime-v2","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-lex-runtime-v2"}}')},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),o=function(){function e(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?"".concat(e.protocol,":"):e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?"/".concat(e.path):e.path:"/"}return e.isInstance=function(e){if(!e)return!1;var t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers},e.prototype.clone=function(){var t,n=new e(Object(r.a)(Object(r.a)({},this),{headers:Object(r.a)({},this.headers)}));return n.query&&(n.query=(t=n.query,Object.keys(t).reduce((function(e,n){var o,i=t[n];return Object(r.a)(Object(r.a)({},e),((o={})[n]=Array.isArray(i)?Object(r.j)([],Object(r.h)(i),!1):i,o))}),{}))),n},e}();!function(){function e(e){this.statusCode=e.statusCode,this.headers=e.headers||{},this.body=e.body}e.isInstance=function(e){if(!e)return!1;var t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}()},function(e,t,n){var r,o,i=n(11),a=n(12),u=0,s=0;e.exports=function(e,t,n){var c=t&&n||0,l=t||[],f=(e=e||{}).node||r,d=void 0!==e.clockseq?e.clockseq:o;if(null==f||null==d){var p=i();null==f&&(f=r=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==d&&(d=o=16383&(p[6]<<8|p[7]))}var h=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:s+1,y=h-u+(v-s)/1e4;if(y<0&&void 0===e.clockseq&&(d=d+1&16383),(y<0||h>u)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=h,s=v,o=d;var b=(1e4*(268435455&(h+=122192928e5))+v)%4294967296;l[c++]=b>>>24&255,l[c++]=b>>>16&255,l[c++]=b>>>8&255,l[c++]=255&b;var m=h/4294967296*1e4&268435455;l[c++]=m>>>8&255,l[c++]=255&m,l[c++]=m>>>24&15|16,l[c++]=m>>>16&255,l[c++]=d>>>8|128,l[c++]=255&d;for(var g=0;g<6;++g)l[c+g]=f[g];return t||a(l)}},function(e,t,n){var r=n(11),o=n(12);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var u=0;u<16;++u)t[i+u]=a[u];return t||o(a)}},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return i})),n.d(t,"__rest",(function(){return a})),n.d(t,"__decorate",(function(){return u})),n.d(t,"__param",(function(){return s})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return l})),n.d(t,"__generator",(function(){return f})),n.d(t,"__createBinding",(function(){return d})),n.d(t,"__exportStar",(function(){return p})),n.d(t,"__values",(function(){return h})),n.d(t,"__read",(function(){return v})),n.d(t,"__spread",(function(){return y})),n.d(t,"__spreadArrays",(function(){return b})),n.d(t,"__await",(function(){return m})),n.d(t,"__asyncGenerator",(function(){return g})),n.d(t,"__asyncDelegator",(function(){return w})),n.d(t,"__asyncValues",(function(){return O})),n.d(t,"__makeTemplateObject",(function(){return S})),n.d(t,"__importStar",(function(){return _})),n.d(t,"__importDefault",(function(){return j})),n.d(t,"__classPrivateFieldGet",(function(){return E})),n.d(t,"__classPrivateFieldSet",(function(){return x}));
|
|
98
|
+
/*! *****************************************************************************
|
|
99
|
+
Copyright (c) Microsoft Corporation.
|
|
100
|
+
|
|
101
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
102
|
+
purpose with or without fee is hereby granted.
|
|
103
|
+
|
|
104
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
105
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
106
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
107
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
108
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
109
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
110
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
111
|
+
***************************************************************************** */
|
|
112
|
+
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function b(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function g(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof m?Promise.resolve(n.value.v).then(s,c):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function l(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function O(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function _(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function j(e){return e&&e.__esModule?e:{default:e}}function E(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function x(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(13),o=n(15),i=n(49),a=n(57),u=n(59),s=n(4),c=function(){function e(e){(0,a.supportsWebCrypto)((0,s.locateWindow)())?this.hash=new o.Sha256(e):(0,u.isMsWindow)((0,s.locateWindow)())?this.hash=new r.Sha256(e):this.hash=new i.Sha256(e)}return e.prototype.update=function(e,t){this.hash.update(e,t)},e.prototype.digest=function(){return this.hash.digest()},e}();t.Sha256=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var r=n(41);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return r.convertToBuffer}});var o=n(46);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return o.isEmptyData}});var i=n(47);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return i.numToUint8}});var a=n(48);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return a.uint32ArrayFrom}})},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var r=n(27),o=void 0!==e&&e.from?function(t){return e.from(t,"utf8")}:r.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"==typeof e?o(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}}).call(this,n(8).Buffer)},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=c(e),a=r[0],u=r[1],s=new i(function(e,t,n){return 3*(t+n)/4-n}(0,a,u)),l=0,f=u>0?a-4:a;for(n=0;n<f;n+=4)t=o[e.charCodeAt(n)]<<18|o[e.charCodeAt(n+1)]<<12|o[e.charCodeAt(n+2)]<<6|o[e.charCodeAt(n+3)],s[l++]=t>>16&255,s[l++]=t>>8&255,s[l++]=255&t;2===u&&(t=o[e.charCodeAt(n)]<<2|o[e.charCodeAt(n+1)]>>4,s[l++]=255&t);1===u&&(t=o[e.charCodeAt(n)]<<10|o[e.charCodeAt(n+1)]<<4|o[e.charCodeAt(n+2)]>>2,s[l++]=t>>8&255,s[l++]=255&t);return s},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=0,u=n-o;a<u;a+=16383)i.push(l(e,a,a+16383>u?u:a+16383));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,s=a.length;u<s;++u)r[u]=a[u],o[a.charCodeAt(u)]=u;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var o,i,a=[],u=t;u<n;u+=3)o=(e[u]<<16&16711680)+(e[u+1]<<8&65280)+(255&e[u+2]),a.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){
|
|
24
113
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
25
|
-
t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,c=u>>1,f=-7,l=r?i-1:0,d=r?-1:1,h=e[t+l];for(l+=d,o=h&(1<<-f)-1,h>>=-f,f+=s;f>0;o=256*o+e[t+l],l+=d,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=n;f>0;a=256*a+e[t+l],l+=d,f-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),o-=c}return(h?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,u,c=8*o-i-1,f=(1<<c)-1,l=f>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+l>=1?d/u:d*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(t*u-1)*Math.pow(2,i),a+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=255&s,h+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[r+h]=255&a,h+=p,a/=256,c-=8);e[r+h-p]|=128*v}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Array.from){for(var t=new Uint32Array(e.length);0<e.length;)t[0]=e[0];return t}return Uint32Array.from(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,r(1).__exportStar)(r(33),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var n=r(1),i=r(15),o=r(34),a=r(13),s=function(){function e(e){if(this.hash=new o.RawSha256,e){this.outer=new o.RawSha256;var t=function(e){var t=(0,a.convertToBuffer)(e);if(t.byteLength>i.BLOCK_SIZE){var r=new o.RawSha256;r.update(t),t=r.digest()}var n=new Uint8Array(i.BLOCK_SIZE);return n.set(t),n}(e),r=new Uint8Array(i.BLOCK_SIZE);r.set(t);for(var n=0;n<i.BLOCK_SIZE;n++)t[n]^=54,r[n]^=92;this.hash.update(t),this.outer.update(r);for(n=0;n<t.byteLength;n++)t[n]=0}}return e.prototype.update=function(e){if(!(0,a.isEmptyData)(e)&&!this.error)try{this.hash.update((0,a.convertToBuffer)(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return(0,n.__awaiter)(this,void 0,void 0,(function(){return(0,n.__generator)(this,(function(e){return[2,this.digestSync()]}))}))},e}();t.Sha256=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var n=r(15),i=function(){function e(){this.state=Int32Array.from(n.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,r=e.byteLength;if(this.bytesHashed+=r,8*this.bytesHashed>n.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=e[t++],r--,this.bufferLength===n.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),r=this.bufferLength;if(t.setUint8(this.bufferLength++,128),r%n.BLOCK_SIZE>=n.BLOCK_SIZE-8){for(var i=this.bufferLength;i<n.BLOCK_SIZE;i++)t.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(i=this.bufferLength;i<n.BLOCK_SIZE-8;i++)t.setUint8(i,0);t.setUint32(n.BLOCK_SIZE-8,Math.floor(e/4294967296),!0),t.setUint32(n.BLOCK_SIZE-4,e),this.hashBuffer(),this.finished=!0}var o=new Uint8Array(n.DIGEST_LENGTH);for(i=0;i<8;i++)o[4*i]=this.state[i]>>>24&255,o[4*i+1]=this.state[i]>>>16&255,o[4*i+2]=this.state[i]>>>8&255,o[4*i+3]=this.state[i]>>>0&255;return o},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],u=t[5],c=t[6],f=t[7],l=0;l<n.BLOCK_SIZE;l++){if(l<16)this.temp[l]=(255&e[4*l])<<24|(255&e[4*l+1])<<16|(255&e[4*l+2])<<8|255&e[4*l+3];else{var d=this.temp[l-2],h=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,p=((d=this.temp[l-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[l]=(h+this.temp[l-7]|0)+(p+this.temp[l-16]|0)}var v=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&u^~s&c)|0)+(f+(n.KEY[l]+this.temp[l]|0)|0)|0,g=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&i^r&o^i&o)|0;f=c,c=u,u=s,s=a+v|0,a=o,o=i,i=r,r=v+g|0}t[0]+=r,t[1]+=i,t[2]+=o,t[3]+=a,t[4]+=s,t[5]+=u,t[6]+=c,t[7]+=f},e}();t.RawSha256=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(1).__exportStar(r(36),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supportsZeroByteGCM=t.supportsSubtleCrypto=t.supportsSecureRandom=t.supportsWebCrypto=void 0;var n=r(1),i=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function o(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}function a(e){return e&&i.every((function(t){return"function"==typeof e[t]}))}t.supportsWebCrypto=function(e){return!(!o(e)||"object"!=typeof e.crypto.subtle)&&a(e.crypto.subtle)},t.supportsSecureRandom=o,t.supportsSubtleCrypto=a,t.supportsZeroByteGCM=function(e){return n.__awaiter(this,void 0,void 0,(function(){var t;return n.__generator(this,(function(r){switch(r.label){case 0:if(!a(e))return[2,!1];r.label=1;case 1:return r.trys.push([1,4,,5]),[4,e.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return t=r.sent(),[4,e.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},t,new Uint8Array(0))];case 3:return[2,16===r.sent().byteLength];case 4:return r.sent(),[2,!1];case 5:return[2]}}))}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1);n.__exportStar(r(38),t),n.__exportStar(r(39),t),n.__exportStar(r(40),t),n.__exportStar(r(41),t),n.__exportStar(r(42),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsWindow=void 0;var n=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];t.isMsWindow=function(e){if(function(e){return"MSInputMethodContext"in e&&"msCrypto"in e}(e)&&void 0!==e.msCrypto.subtle){var t=e.msCrypto,r=t.getRandomValues,i=t.subtle;return n.map((function(e){return i[e]})).concat(r).every((function(e){return"function"==typeof e}))}return!1}},function(e,t,r){"use strict";r.r(t),r.d(t,"AWSLexProvider",(function(){return Dt})),r.d(t,"Interactions",(function(){return Yt}));var n=r(4),i=function(){return(i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},o=new n.ConsoleLogger("AbstractInteractionsProvider"),a=function(){function e(e){void 0===e&&(e={}),this._config=e}return e.prototype.configure=function(e){return void 0===e&&(e={}),this._config=i(i({},this._config),e),o.debug("configure "+this.getProviderName(),this._config),this.options},e.prototype.getCategory=function(){return"Interactions"},Object.defineProperty(e.prototype,"options",{get:function(){return i({},this._config)},enumerable:!0,configurable:!0}),e}(),s=r(0),u=r(19),c=r(17),f=r(1),l=r(3),d=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,h)},h=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()};for(var p=function(){function e(e){var t=(void 0===e?{}:e).requestTimeout;this.requestTimeout=t}return e.prototype.destroy=function(){},e.prototype.handle=function(e,t){var r=(void 0===t?{}:t).abortSignal,n=this.requestTimeout;if(null==r?void 0:r.aborted){var i=new Error("Request aborted");return i.name="AbortError",Promise.reject(i)}var o=e.path;if(e.query){var a=function(e){var t,r,n=[];try{for(var i=Object(f.__values)(Object.keys(e).sort()),o=i.next();!o.done;o=i.next()){var a=o.value,s=e[a];if(a=d(a),Array.isArray(s))for(var u=0,c=s.length;u<c;u++)n.push(a+"="+d(s[u]));else{var l=a;(s||"string"==typeof s)&&(l+="="+d(s)),n.push(l)}}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n.join("&")}(e.query);a&&(o+="?"+a)}var s=e.port,u=e.method,c=e.protocol+"//"+e.hostname+(s?":"+s:"")+o,h={body:"GET"===u||"HEAD"===u?void 0:e.body,headers:new Headers(e.headers),method:u};"undefined"!=typeof AbortController&&(h.signal=r);var p,v=new Request(c,h),g=[fetch(v).then((function(e){var t,r,n=e.headers,i={};try{for(var o=Object(f.__values)(n.entries()),a=o.next();!a.done;a=o.next()){var s=a.value;i[s[0]]=s[1]}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return void 0!==e.body?{response:new l.b({headers:i,statusCode:e.status,body:e.body})}:e.blob().then((function(t){return{response:new l.b({headers:i,statusCode:e.status,body:t})}}))})),(p=n,void 0===p&&(p=0),new Promise((function(e,t){p&&setTimeout((function(){var e=new Error("Request did not complete within "+p+" ms");e.name="TimeoutError",t(e)}),p)})))];return r&&g.push(new Promise((function(e,t){r.onabort=function(){var e=new Error("Request aborted");e.name="AbortError",t(e)}}))),Promise.race(g)},e}(),v={},g=new Array(64),m=0,b="A".charCodeAt(0),y="Z".charCodeAt(0);m+b<=y;m++){var w=String.fromCharCode(m+b);v[w]=m,g[m]=w}for(m=0,b="a".charCodeAt(0),y="z".charCodeAt(0);m+b<=y;m++){w=String.fromCharCode(m+b);var _=m+26;v[w]=_,g[_]=w}for(m=0;m<10;m++){v[m.toString(10)]=m+52;w=m.toString(10),_=m+52;v[w]=_,g[_]=w}v["+"]=62,g[62]="+",v["/"]=63,g[63]="/";function O(e){var t=e.length/4*3;"=="===e.substr(-2)?t-=2:"="===e.substr(-1)&&t--;for(var r=new ArrayBuffer(t),n=new DataView(r),i=0;i<e.length;i+=4){for(var o=0,a=0,s=i,u=i+3;s<=u;s++)"="!==e[s]?(o|=v[e[s]]<<6*(u-s),a+=6):o>>=6;var c=i/4*3;o>>=a%8;for(var f=Math.floor(a/8),l=0;l<f;l++){var d=8*(f-l-1);n.setUint8(c+l,(o&255<<d)>>d)}}return new Uint8Array(r)}function S(e){return new Promise((function(t,r){var n=new FileReader;n.onloadend=function(){var e;if(2!==n.readyState)return r(new Error("Reader aborted too early"));var i=null!==(e=n.result)&&void 0!==e?e:"",o=i.indexOf(","),a=o>-1?o+1:i.length;t(i.substring(a))},n.onabort=function(){return r(new Error("Read aborted"))},n.onerror=function(){return r(n.error)},n.readAsDataURL(e)}))}var A={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},E=function(e){return{applyToStack:function(t){t.add(function(e){return function(t,r){return function(n){return Object(f.__awaiter)(void 0,void 0,void 0,(function(){var i;return Object(f.__generator)(this,(function(o){return(null===(i=null==e?void 0:e.retryStrategy)||void 0===i?void 0:i.mode)&&(r.userAgent=Object(f.__spread)(r.userAgent||[],[["cfg/retry-mode",e.retryStrategy.mode]])),[2,e.retryStrategy.retry(t,n)]}))}))}}}(e),A)}}},x=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],j=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],M=["AbortError","TimeoutError","RequestTimeout","RequestTimeoutException"],P=[500,502,503,504],T=function(e){var t,r;return 429===(null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||j.includes(e.name)||1==(null===(r=e.$retryable)||void 0===r?void 0:r.throttling)},C=r(16),L=function(e,t){return Math.floor(Math.min(2e4,Math.random()*Math.pow(2,t)*e))},R=function(e){return!!e&&(function(e){return void 0!==e.$retryable}(e)||function(e){return x.includes(e.name)}(e)||T(e)||function(e){var t;return M.includes(e.name)||P.includes((null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||0)}(e))},I=function(){function e(e,t){var r,n,i,o,a,s,u,c;this.maxAttemptsProvider=e,this.mode="standard",this.retryDecider=null!==(r=null==t?void 0:t.retryDecider)&&void 0!==r?r:R,this.delayDecider=null!==(n=null==t?void 0:t.delayDecider)&&void 0!==n?n:L,this.retryQuota=null!==(i=null==t?void 0:t.retryQuota)&&void 0!==i?i:(a=o=500,s=o,u=function(e){return"TimeoutError"===e.name?10:5},c=function(e){return u(e)<=s},Object.freeze({hasRetryTokens:c,retrieveRetryTokens:function(e){if(!c(e))throw new Error("No retry token available");var t=u(e);return s-=t,t},releaseRetryTokens:function(e){s+=null!=e?e:1,s=Math.min(s,a)}}))}return e.prototype.shouldRetry=function(e,t,r){return t<r&&this.retryDecider(e)&&this.retryQuota.hasRetryTokens(e)},e.prototype.getMaxAttempts=function(){return Object(f.__awaiter)(this,void 0,void 0,(function(){var e;return Object(f.__generator)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.maxAttemptsProvider()];case 1:return e=t.sent(),[3,3];case 2:return t.sent(),e=3,[3,3];case 3:return[2,e]}}))}))},e.prototype.retry=function(e,t){return Object(f.__awaiter)(this,void 0,void 0,(function(){var r,n,i,o,a,s,u,c;return Object(f.__generator)(this,(function(d){switch(d.label){case 0:return n=0,i=0,[4,this.getMaxAttempts()];case 1:o=d.sent(),a=t.request,l.a.isInstance(a)&&(a.headers["amz-sdk-invocation-id"]=Object(C.v4)()),s=function(){var s,c,d,h,p;return Object(f.__generator)(this,(function(f){switch(f.label){case 0:return f.trys.push([0,2,,5]),l.a.isInstance(a)&&(a.headers["amz-sdk-request"]="attempt="+(n+1)+"; max="+o),[4,e(t)];case 1:return s=f.sent(),c=s.response,d=s.output,u.retryQuota.releaseRetryTokens(r),d.$metadata.attempts=n+1,d.$metadata.totalRetryDelay=i,[2,{value:{response:c,output:d}}];case 2:return h=f.sent(),n++,u.shouldRetry(h,n,o)?(r=u.retryQuota.retrieveRetryTokens(h),p=u.delayDecider(T(h)?500:100,n),i+=p,[4,new Promise((function(e){return setTimeout(e,p)}))]):[3,4];case 3:return f.sent(),[2,"continue"];case 4:throw h.$metadata||(h.$metadata={}),h.$metadata.attempts=n,h.$metadata.totalRetryDelay=i,h;case 5:return[2]}}))},u=this,d.label=2;case 2:return[5,s()];case 3:return"object"==typeof(c=d.sent())?[2,c.value]:[3,2];case 4:return[2]}}))}))},e}(),k=function(e){if(void 0===e&&(e=3),"number"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e};var B=r(18),N=r.n(B),F=r(6),U=new Set(["af-south-1","ap-east-1","ap-northeast-1","ap-northeast-2","ap-south-1","ap-southeast-1","ap-southeast-2","ca-central-1","eu-central-1","eu-north-1","eu-south-1","eu-west-1","eu-west-2","eu-west-3","me-south-1","sa-east-1","us-east-1","us-east-2","us-west-1","us-west-2"]),z=new Set(["cn-north-1","cn-northwest-1"]),D=new Set(["us-iso-east-1"]),q=new Set(["us-isob-east-1"]),H=new Set(["us-gov-east-1","us-gov-west-1"]);var G,W,Y,$,V={apiVersion:"2016-11-28",disableHostPrefix:!1,logger:{},regionInfoProvider:function(e,t){var r=void 0;switch(e){case"ap-northeast-1":r={hostname:"runtime.lex.ap-northeast-1.amazonaws.com",partition:"aws",signingService:"lex"};break;case"ap-southeast-1":r={hostname:"runtime.lex.ap-southeast-1.amazonaws.com",partition:"aws",signingService:"lex"};break;case"ap-southeast-2":r={hostname:"runtime.lex.ap-southeast-2.amazonaws.com",partition:"aws",signingService:"lex"};break;case"eu-central-1":r={hostname:"runtime.lex.eu-central-1.amazonaws.com",partition:"aws",signingService:"lex"};break;case"eu-west-1":r={hostname:"runtime.lex.eu-west-1.amazonaws.com",partition:"aws",signingService:"lex"};break;case"eu-west-2":r={hostname:"runtime.lex.eu-west-2.amazonaws.com",partition:"aws",signingService:"lex"};break;case"us-east-1":r={hostname:"runtime.lex.us-east-1.amazonaws.com",partition:"aws",signingService:"lex"};break;case"us-west-2":r={hostname:"runtime.lex.us-west-2.amazonaws.com",partition:"aws",signingService:"lex"};break;default:U.has(e)&&(r={hostname:"runtime.lex.{region}.amazonaws.com".replace("{region}",e),partition:"aws",signingService:"lex"}),z.has(e)&&(r={hostname:"runtime.lex.{region}.amazonaws.com.cn".replace("{region}",e),partition:"aws-cn"}),D.has(e)&&(r={hostname:"runtime.lex.{region}.c2s.ic.gov".replace("{region}",e),partition:"aws-iso"}),q.has(e)&&(r={hostname:"runtime.lex.{region}.sc2s.sgov.gov".replace("{region}",e),partition:"aws-iso-b"}),H.has(e)&&(r={hostname:"runtime.lex.{region}.amazonaws.com".replace("{region}",e),partition:"aws-us-gov"}),void 0===r&&(r={hostname:"runtime.lex.{region}.amazonaws.com".replace("{region}",e),partition:"aws",signingService:"lex"})}return Promise.resolve(Object(s.a)({signingService:"lex"},r))},serviceId:"Lex Runtime Service",urlParser:function(e){var t,r=new URL(e),n=r.hostname,i=r.pathname,o=r.port,a=r.protocol,s=r.search;return s&&(t=function(e){var t,r,n={};if(e=e.replace(/^\?/,""))try{for(var i=Object(f.__values)(e.split("&")),o=i.next();!o.done;o=i.next()){var a=o.value,s=Object(f.__read)(a.split("="),2),u=s[0],c=s[1],l=void 0===c?null:c;u=decodeURIComponent(u),l&&(l=decodeURIComponent(l)),u in n?Array.isArray(n[u])?n[u].push(l):n[u]=[n[u],l]:n[u]=l}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}(s)),{hostname:n,port:o?parseInt(o):void 0,protocol:a,path:i,query:t}}},K=Object(s.a)(Object(s.a)({},V),{runtime:"browser",base64Decoder:O,base64Encoder:function(e){for(var t="",r=0;r<e.length;r+=3){for(var n=0,i=0,o=r,a=Math.min(r+3,e.length);o<a;o++)n|=e[o]<<8*(a-o-1),i+=8;var s=Math.ceil(i/6);n<<=6*s-i;for(var u=1;u<=s;u++){var c=6*(s-u);t+=g[(n&63<<c)>>c]}t+="==".slice(0,4-s)}return t},bodyLengthChecker:function(e){if("string"==typeof e){for(var t=e.length,r=t-1;r>=0;r--){var n=e.charCodeAt(r);n>127&&n<=2047?t++:n>2047&&n<=65535&&(t+=2)}return t}return"number"==typeof e.byteLength?e.byteLength:"number"==typeof e.size?e.size:void 0},credentialDefaultProvider:function(e){return function(){return Promise.reject(new Error("Credential is missing"))}},defaultUserAgentProvider:(W={serviceId:V.serviceId,clientVersion:u.version},Y=W.serviceId,$=W.clientVersion,function(){return Object(f.__awaiter)(void 0,void 0,void 0,(function(){var e,t,r,n,i,o,a,s,u;return Object(f.__generator)(this,(function(c){return e=(null===(r=null===window||void 0===window?void 0:window.navigator)||void 0===r?void 0:r.userAgent)?N.a.parse(window.navigator.userAgent):void 0,t=[["aws-sdk-js",$],["os/"+((null===(n=null==e?void 0:e.os)||void 0===n?void 0:n.name)||"other"),null===(i=null==e?void 0:e.os)||void 0===i?void 0:i.version],["lang/js"],["md/browser",(null!==(a=null===(o=null==e?void 0:e.browser)||void 0===o?void 0:o.name)&&void 0!==a?a:"unknown")+"_"+(null!==(u=null===(s=null==e?void 0:e.browser)||void 0===s?void 0:s.version)&&void 0!==u?u:"unknown")]],Y&&t.push(["api/"+Y,$]),[2,t]}))}))}),maxAttempts:3,region:(G="Region is missing",function(){return Promise.reject(G)}),requestHandler:new p,sha256:c.Sha256,streamCollector:function(e){return"function"==typeof Blob&&e instanceof Blob?function(e){return Object(f.__awaiter)(this,void 0,void 0,(function(){var t,r;return Object(f.__generator)(this,(function(n){switch(n.label){case 0:return[4,S(e)];case 1:return t=n.sent(),r=O(t),[2,new Uint8Array(r)]}}))}))}(e):function(e){return Object(f.__awaiter)(this,void 0,void 0,(function(){var t,r,n,i,o,a,s;return Object(f.__generator)(this,(function(u){switch(u.label){case 0:t=new Uint8Array(0),r=e.getReader(),n=!1,u.label=1;case 1:return n?[3,3]:[4,r.read()];case 2:return i=u.sent(),o=i.done,(a=i.value)&&(s=t,(t=new Uint8Array(s.length+a.length)).set(s),t.set(a,s.length)),n=o,[3,1];case 3:return[2,t]}}))}))}(e)},utf8Decoder:F.fromUtf8,utf8Encoder:F.toUtf8}),Z=function(e){var t=e.endpoint,r=e.urlParser;if("string"==typeof t){var n=Promise.resolve(r(t));return function(){return n}}if("object"==typeof t){var i=Promise.resolve(t);return function(){return i}}return t},Q=function(e){return Object(f.__awaiter)(void 0,void 0,void 0,(function(){var t,r,n,i,o;return Object(f.__generator)(this,(function(a){switch(a.label){case 0:return t=e.tls,r=void 0===t||t,[4,e.region()];case 1:if(n=a.sent(),!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(n))throw new Error("Invalid region in client config");return[4,e.regionInfoProvider(n)];case 2:if(!(i=(null!==(o=a.sent())&&void 0!==o?o:{}).hostname))throw new Error("Cannot resolve hostname from client config");return[2,e.urlParser((r?"https:":"http:")+"//"+i)]}}))}))},X=function(e){if("string"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e};var J={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},ee=function(e){return{applyToStack:function(t){t.add(function(e){var t=this;return function(r){return function(n){return Object(f.__awaiter)(t,void 0,void 0,(function(){var t,i,o,a,s;return Object(f.__generator)(this,(function(u){return t=n.request,l.a.isInstance(t)&&(i=t.body,o=t.headers,i&&-1===Object.keys(o).map((function(e){return e.toLowerCase()})).indexOf("content-length")&&void 0!==(a=e(i))&&(t.headers=Object(f.__assign)(Object(f.__assign)({},t.headers),((s={})["content-length"]=String(a),s)))),[2,r(Object(f.__assign)(Object(f.__assign)({},n),{request:t}))]}))}))}}}(e.bodyLengthChecker),J)}}};for(var te={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},re=function(e){return{applyToStack:function(t){t.add(function(e){return function(t){return function(r){return Object(f.__awaiter)(void 0,void 0,void 0,(function(){var n,i;return Object(f.__generator)(this,(function(o){return l.a.isInstance(r.request)?(n=r.request,i=(e.requestHandler.metadata||{}).handlerProtocol,(void 0===i?"":i).indexOf("h2")>=0&&!n.headers[":authority"]?(delete n.headers.host,n.headers[":authority"]=""):n.headers.host||(n.headers.host=n.hostname),[2,t(r)]):[2,t(r)]}))}))}}}(e),te)}}},ne={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},ie=function(e){return{applyToStack:function(e){e.add((function(e,t){return function(r){return Object(f.__awaiter)(void 0,void 0,void 0,(function(){var n,i,o,a,s,u,c,l,d;return Object(f.__generator)(this,(function(h){switch(h.label){case 0:return n=t.clientName,i=t.commandName,o=t.inputFilterSensitiveLog,a=t.logger,s=t.outputFilterSensitiveLog,[4,e(r)];case 1:return u=h.sent(),a?("function"==typeof a.info&&(c=u.output,l=c.$metadata,d=Object(f.__rest)(c,["$metadata"]),a.info({clientName:n,commandName:i,input:o(r.input),output:s(d),metadata:l})),[2,u]):[2,u]}}))}))}}),ne)}}},oe={},ae={},se=0;se<256;se++){var ue=se.toString(16).toLowerCase();1===ue.length&&(ue="0"+ue),oe[se]=ue,ae[ue]=se}function ce(e){for(var t="",r=0;r<e.byteLength;r++)t+=oe[e[r]];return t}var fe="X-Amz-Date".toLowerCase(),le=["authorization",fe,"date"],de="X-Amz-Signature".toLowerCase(),he="X-Amz-Security-Token".toLowerCase(),pe={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},ve=/^proxy-/,ge=/^sec-/,me="AWS4-HMAC-SHA256-PAYLOAD",be={},ye=[];function we(e,t,r){return e+"/"+t+"/"+r+"/aws4_request"}function _e(e,t,r){var n=new e(t);return n.update(r),n.digest()}function Oe(e,t,r){var n,i,o=e.headers,a={};try{for(var s=Object(f.__values)(Object.keys(o).sort()),u=s.next();!u.done;u=s.next()){var c=u.value,l=c.toLowerCase();(l in pe||(null==t?void 0:t.has(l))||ve.test(l)||ge.test(l))&&(!r||r&&!r.has(l))||(a[l]=o[c].trim().replace(/\s+/g," "))}}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return a}var Se=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,Ae)},Ae=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()};function Ee(e,t){var r=e.headers,n=e.body;return Object(f.__awaiter)(this,void 0,void 0,(function(){var e,i,o,a,s,u,c;return Object(f.__generator)(this,(function(l){switch(l.label){case 0:try{for(e=Object(f.__values)(Object.keys(r)),i=e.next();!i.done;i=e.next())if("x-amz-content-sha256"===(o=i.value).toLowerCase())return[2,r[o]]}catch(e){u={error:e}}finally{try{i&&!i.done&&(c=e.return)&&c.call(e)}finally{if(u)throw u.error}}return null!=n?[3,1]:[2,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"];case 1:return"string"==typeof n||ArrayBuffer.isView(n)||(d=n,"function"==typeof ArrayBuffer&&d instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(d))?((a=new t).update(n),s=ce,[4,a.digest()]):[3,3];case 2:return[2,s.apply(void 0,[l.sent()])];case 3:return[2,"UNSIGNED-PAYLOAD"]}var d}))}))}function xe(e){var t=e.headers,r=e.query,n=Object(f.__rest)(e,["headers","query"]);return Object(f.__assign)(Object(f.__assign)({},n),{headers:Object(f.__assign)({},t),query:r?je(r):void 0})}function je(e){return Object.keys(e).reduce((function(t,r){var n,i=e[r];return Object(f.__assign)(Object(f.__assign)({},t),((n={})[r]=Array.isArray(i)?Object(f.__spread)(i):i,n))}),{})}function Me(e){var t,r;e="function"==typeof e.clone?e.clone():xe(e);try{for(var n=Object(f.__values)(Object.keys(e.headers)),i=n.next();!i.done;i=n.next()){var o=i.value;le.indexOf(o.toLowerCase())>-1&&delete e.headers[o]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return e}function Pe(e){return function(e){if("number"==typeof e)return new Date(1e3*e);if("string"==typeof e)return Number(e)?new Date(1e3*Number(e)):new Date(e);return e}(e).toISOString().replace(/\.\d{3}Z$/,"Z")}var Te=function(){function e(e){var t=e.applyChecksum,r=e.credentials,n=e.region,i=e.service,o=e.sha256,a=e.uriEscapePath,s=void 0===a||a;this.service=i,this.sha256=o,this.uriEscapePath=s,this.applyChecksum="boolean"!=typeof t||t,this.regionProvider=Re(n),this.credentialProvider=Ie(r)}return e.prototype.presign=function(e,t){return void 0===t&&(t={}),Object(f.__awaiter)(this,void 0,void 0,(function(){var r,n,i,o,a,s,u,c,l,d,h,p,v,g,m,b,y,w,_,O,S,A,E,x;return Object(f.__generator)(this,(function(j){switch(j.label){case 0:return r=t.signingDate,n=void 0===r?new Date:r,i=t.expiresIn,o=void 0===i?3600:i,a=t.unsignableHeaders,s=t.unhoistableHeaders,u=t.signableHeaders,c=t.signingRegion,l=t.signingService,[4,this.credentialProvider()];case 1:return d=j.sent(),null==c?[3,2]:(p=c,[3,4]);case 2:return[4,this.regionProvider()];case 3:p=j.sent(),j.label=4;case 4:return h=p,v=Ce(n),g=v.longDate,m=v.shortDate,o>604800?[2,Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future")]:(b=we(m,h,null!=l?l:this.service),y=function(e,t){var r,n,i;void 0===t&&(t={});var o="function"==typeof e.clone?e.clone():xe(e),a=o.headers,s=o.query,u=void 0===s?{}:s;try{for(var c=Object(f.__values)(Object.keys(a)),l=c.next();!l.done;l=c.next()){var d=l.value,h=d.toLowerCase();"x-amz-"!==h.substr(0,6)||(null===(i=t.unhoistableHeaders)||void 0===i?void 0:i.has(h))||(u[d]=a[d],delete a[d])}}catch(e){r={error:e}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}return Object(f.__assign)(Object(f.__assign)({},e),{headers:a,query:u})}(Me(e),{unhoistableHeaders:s}),d.sessionToken&&(y.query["X-Amz-Security-Token"]=d.sessionToken),y.query["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",y.query["X-Amz-Credential"]=d.accessKeyId+"/"+b,y.query["X-Amz-Date"]=g,y.query["X-Amz-Expires"]=o.toString(10),w=Oe(y,a,u),y.query["X-Amz-SignedHeaders"]=Le(w),_=y.query,O="X-Amz-Signature",S=this.getSignature,A=[g,b,this.getSigningKey(d,h,m,l)],E=this.createCanonicalRequest,x=[y,w],[4,Ee(e,this.sha256)]);case 5:return[4,S.apply(this,A.concat([E.apply(this,x.concat([j.sent()]))]))];case 6:return _[O]=j.sent(),[2,y]}}))}))},e.prototype.sign=function(e,t){return Object(f.__awaiter)(this,void 0,void 0,(function(){return Object(f.__generator)(this,(function(r){return"string"==typeof e?[2,this.signString(e,t)]:e.headers&&e.payload?[2,this.signEvent(e,t)]:[2,this.signRequest(e,t)]}))}))},e.prototype.signEvent=function(e,t){var r=e.headers,n=e.payload,i=t.signingDate,o=void 0===i?new Date:i,a=t.priorSignature,s=t.signingRegion,u=t.signingService;return Object(f.__awaiter)(this,void 0,void 0,(function(){var e,t,i,c,l,d,h,p,v,g,m;return Object(f.__generator)(this,(function(f){switch(f.label){case 0:return null==s?[3,1]:(t=s,[3,3]);case 1:return[4,this.regionProvider()];case 2:t=f.sent(),f.label=3;case 3:return e=t,i=Ce(o),c=i.shortDate,l=i.longDate,d=we(c,e,null!=u?u:this.service),[4,Ee({headers:{},body:n},this.sha256)];case 4:return h=f.sent(),(p=new this.sha256).update(r),g=ce,[4,p.digest()];case 5:return v=g.apply(void 0,[f.sent()]),m=[me,l,d,a,v,h].join("\n"),[2,this.signString(m,{signingDate:o,signingRegion:e,signingService:u})]}}))}))},e.prototype.signString=function(e,t){var r=void 0===t?{}:t,n=r.signingDate,i=void 0===n?new Date:n,o=r.signingRegion,a=r.signingService;return Object(f.__awaiter)(this,void 0,void 0,(function(){var t,r,n,s,u,c,l,d;return Object(f.__generator)(this,(function(f){switch(f.label){case 0:return[4,this.credentialProvider()];case 1:return t=f.sent(),null==o?[3,2]:(n=o,[3,4]);case 2:return[4,this.regionProvider()];case 3:n=f.sent(),f.label=4;case 4:return r=n,s=Ce(i).shortDate,l=(c=this.sha256).bind,[4,this.getSigningKey(t,r,s,a)];case 5:return(u=new(l.apply(c,[void 0,f.sent()]))).update(e),d=ce,[4,u.digest()];case 6:return[2,d.apply(void 0,[f.sent()])]}}))}))},e.prototype.signRequest=function(e,t){var r=void 0===t?{}:t,n=r.signingDate,i=void 0===n?new Date:n,o=r.signableHeaders,a=r.unsignableHeaders,s=r.signingRegion,u=r.signingService;return Object(f.__awaiter)(this,void 0,void 0,(function(){var t,r,n,c,l,d,h,p,v,g,m;return Object(f.__generator)(this,(function(b){switch(b.label){case 0:return[4,this.credentialProvider()];case 1:return t=b.sent(),null==s?[3,2]:(n=s,[3,4]);case 2:return[4,this.regionProvider()];case 3:n=b.sent(),b.label=4;case 4:return r=n,c=Me(e),l=Ce(i),d=l.longDate,h=l.shortDate,p=we(h,r,null!=u?u:this.service),c.headers[fe]=d,t.sessionToken&&(c.headers[he]=t.sessionToken),[4,Ee(c,this.sha256)];case 5:return v=b.sent(),!function(e,t){var r,n;e=e.toLowerCase();try{for(var i=Object(f.__values)(Object.keys(t)),o=i.next();!o.done;o=i.next()){if(e===o.value.toLowerCase())return!0}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1}("x-amz-content-sha256",c.headers)&&this.applyChecksum&&(c.headers["x-amz-content-sha256"]=v),g=Oe(c,a,o),[4,this.getSignature(d,p,this.getSigningKey(t,r,h,u),this.createCanonicalRequest(c,g,v))];case 6:return m=b.sent(),c.headers.authorization="AWS4-HMAC-SHA256 Credential="+t.accessKeyId+"/"+p+", SignedHeaders="+Le(g)+", Signature="+m,[2,c]}}))}))},e.prototype.createCanonicalRequest=function(e,t,r){var n=Object.keys(t).sort();return e.method+"\n"+this.getCanonicalPath(e)+"\n"+function(e){var t,r,n=e.query,i=void 0===n?{}:n,o=[],a={},s=function(e){if(e.toLowerCase()===de)return"continue";o.push(e);var t=i[e];"string"==typeof t?a[e]=Se(e)+"="+Se(t):Array.isArray(t)&&(a[e]=t.slice(0).sort().reduce((function(t,r){return t.concat([Se(e)+"="+Se(r)])}),[]).join("&"))};try{for(var u=Object(f.__values)(Object.keys(i).sort()),c=u.next();!c.done;c=u.next()){s(c.value)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return o.map((function(e){return a[e]})).filter((function(e){return e})).join("&")}(e)+"\n"+n.map((function(e){return e+":"+t[e]})).join("\n")+"\n\n"+n.join(";")+"\n"+r},e.prototype.createStringToSign=function(e,t,r){return Object(f.__awaiter)(this,void 0,void 0,(function(){var n,i;return Object(f.__generator)(this,(function(o){switch(o.label){case 0:return(n=new this.sha256).update(r),[4,n.digest()];case 1:return i=o.sent(),[2,"AWS4-HMAC-SHA256\n"+e+"\n"+t+"\n"+ce(i)]}}))}))},e.prototype.getCanonicalPath=function(e){var t=e.path;return this.uriEscapePath?"/"+encodeURIComponent(t.replace(/^\//,"")).replace(/%2F/g,"/"):t},e.prototype.getSignature=function(e,t,r,n){return Object(f.__awaiter)(this,void 0,void 0,(function(){var i,o,a,s,u;return Object(f.__generator)(this,(function(c){switch(c.label){case 0:return[4,this.createStringToSign(e,t,n)];case 1:return i=c.sent(),s=(a=this.sha256).bind,[4,r];case 2:return(o=new(s.apply(a,[void 0,c.sent()]))).update(i),u=ce,[4,o.digest()];case 3:return[2,u.apply(void 0,[c.sent()])]}}))}))},e.prototype.getSigningKey=function(e,t,r,n){return function(e,t,r,n,i){return Object(f.__awaiter)(void 0,void 0,void 0,(function(){var o,a,s,u,c,l,d,h,p;return Object(f.__generator)(this,(function(v){switch(v.label){case 0:return[4,_e(e,t.secretAccessKey,t.accessKeyId)];case 1:if(o=v.sent(),(a=r+":"+n+":"+i+":"+ce(o)+":"+t.sessionToken)in be)return[2,be[a]];for(ye.push(a);ye.length>50;)delete be[ye.shift()];s="AWS4"+t.secretAccessKey,v.label=2;case 2:v.trys.push([2,7,8,9]),u=Object(f.__values)([r,n,i,"aws4_request"]),c=u.next(),v.label=3;case 3:return c.done?[3,6]:(l=c.value,[4,_e(e,s,l)]);case 4:s=v.sent(),v.label=5;case 5:return c=u.next(),[3,3];case 6:return[3,9];case 7:return d=v.sent(),h={error:d},[3,9];case 8:try{c&&!c.done&&(p=u.return)&&p.call(u)}finally{if(h)throw h.error}return[7];case 9:return[2,be[a]=s]}}))}))}(this.sha256,e,r,t,n||this.service)},e}(),Ce=function(e){var t=Pe(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.substr(0,8)}},Le=function(e){return Object.keys(e).sort().join(";")},Re=function(e){if("string"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e},Ie=function(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e};function ke(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e}var Be=function(e){return new Date(Date.now()+e)};function Ne(e){return function(t,r){return function(n){return Object(f.__awaiter)(this,void 0,void 0,(function(){var i,o,a,s,u,c,d,h,p;return Object(f.__generator)(this,(function(v){switch(v.label){case 0:return l.a.isInstance(n.request)?"function"!=typeof e.signer?[3,2]:[4,e.signer()]:[2,t(n)];case 1:return o=v.sent(),[3,3];case 2:o=e.signer,v.label=3;case 3:return i=o,s=t,u=[Object(f.__assign)({},n)],p={},[4,i.sign(n.request,{signingDate:new Date(Date.now()+e.systemClockOffset),signingRegion:r.signing_region,signingService:r.signing_service})];case 4:return[4,s.apply(void 0,[f.__assign.apply(void 0,u.concat([(p.request=v.sent(),p)]))])];case 5:return a=v.sent(),c=a.response.headers,(d=c&&(c.date||c.Date))&&(h=Date.parse(d),g=h,m=e.systemClockOffset,Math.abs(Be(m).getTime()-g)>=3e5&&(e.systemClockOffset=h-Date.now())),[2,a]}var g,m}))}))}}}var Fe={name:"awsAuthMiddleware",tags:["SIGNATURE","AWSAUTH"],relation:"after",toMiddleware:"retryMiddleware",override:!0};var Ue,ze,De,qe,He,Ge,We,Ye,$e,Ve,Ke,Ze,Qe,Xe,Je,et,tt,rt,nt,it,ot,at,st,ut,ct,ft,lt,dt,ht,pt,vt,gt,mt,bt,yt,wt,_t,Ot=/[^\!\#\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,St=function(e){var t=Object(f.__read)(e,2),r=t[0],n=t[1],i=r.indexOf("/"),o=r.substring(0,i),a=r.substring(i+1);return"api"===o&&(a=a.toLowerCase()),[o,a,n].filter((function(e){return e&&e.length>0})).map((function(e){return null==e?void 0:e.replace(Ot,"_")})).join("/")},At={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Et=function(e){return{applyToStack:function(t){var r;t.add((r=e,function(e,t){return function(n){return Object(f.__awaiter)(void 0,void 0,void 0,(function(){var i,o,a,s,u,c,d,h;return Object(f.__generator)(this,(function(p){switch(p.label){case 0:return i=n.request,l.a.isInstance(i)?(o=i.headers,a=(null===(d=null==t?void 0:t.userAgent)||void 0===d?void 0:d.map(St))||[],[4,r.defaultUserAgentProvider()]):[2,e(n)];case 1:return s=p.sent().map(St),u=(null===(h=null==r?void 0:r.customUserAgent)||void 0===h?void 0:h.map(St))||[],o["x-amz-user-agent"]=Object(f.__spread)(s,a,u).join(" "),c=Object(f.__spread)(s.filter((function(e){return e.startsWith("aws-sdk-")})),u).join(" "),"browser"!==r.runtime&&c&&(o["user-agent"]=o["user-agent"]?o["user-agent"]+" "+c:c),[2,e(Object(f.__assign)(Object(f.__assign)({},n),{request:i}))]}}))}))}}),At)}}},xt=r(2),jt=function(e){function t(t){var r,n,i,o=this,a=function(e){var t,r=this,n=ke(e.credentials||e.credentialDefaultProvider(e)),i=e.signingEscapePath,o=void 0===i||i,a=e.systemClockOffset,s=void 0===a?e.systemClockOffset||0:a,u=e.sha256;return t=e.signer?ke(e.signer):function(){return ke(e.region)().then((function(t){return Object(f.__awaiter)(r,void 0,void 0,(function(){return Object(f.__generator)(this,(function(r){switch(r.label){case 0:return[4,e.regionInfoProvider(t)];case 1:return[2,[r.sent()||{},t]]}}))}))})).then((function(t){var r=Object(f.__read)(t,2),i=r[0],a=r[1],s=i.signingRegion,c=i.signingService;return e.signingRegion=e.signingRegion||s||a,e.signingName=e.signingName||c||e.serviceId,new Te({credentials:n,region:e.signingRegion,service:e.signingName,sha256:u,uriEscapePath:o})}))},Object(f.__assign)(Object(f.__assign)({},e),{systemClockOffset:s,signingEscapePath:o,credentials:n,signer:t})}(function(e){var t;return Object(f.__assign)(Object(f.__assign)({},e),{tls:null===(t=e.tls)||void 0===t||t,endpoint:e.endpoint?Z(e):function(){return Q(e)},isCustomEndpoint:!!e.endpoint})}(function(e){if(!e.region)throw new Error("Region is missing");return Object(f.__assign)(Object(f.__assign)({},e),{region:X(e.region)})}(Object(s.a)(Object(s.a)({},K),t)))),u=function(e){return Object(f.__assign)(Object(f.__assign)({},e),{customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent})}((n=k((r=a).maxAttempts),Object(f.__assign)(Object(f.__assign)({},r),{maxAttempts:n,retryStrategy:r.retryStrategy||new I(n)})));return(o=e.call(this,u)||this).config=u,o.middlewareStack.use((i=o.config,{applyToStack:function(e){e.addRelativeTo(Ne(i),Fe)}})),o.middlewareStack.use(E(o.config)),o.middlewareStack.use(ee(o.config)),o.middlewareStack.use(re(o.config)),o.middlewareStack.use(ie(o.config)),o.middlewareStack.use(Et(o.config)),o}return Object(s.c)(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(xt.a);(Ue||(Ue={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(ze||(ze={})).filterSensitiveLog=function(e){return Object(s.a)(Object(s.a)({},e),e.parameters&&{parameters:xt.d})},(De||(De={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(qe||(qe={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(He||(He={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(Ge||(Ge={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(We||(We={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(Ye||(Ye={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},($e||($e={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(Ve||(Ve={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},function(e){e.FAILED="Failed",e.FULFILLED="Fulfilled",e.READY_FOR_FULFILLMENT="ReadyForFulfillment"}(Ke||(Ke={})),function(e){e.COMPOSITE="Composite",e.CUSTOM_PAYLOAD="CustomPayload",e.PLAIN_TEXT="PlainText",e.SSML="SSML"}(Ze||(Ze={})),function(e){e.CLOSE="Close",e.CONFIRM_INTENT="ConfirmIntent",e.DELEGATE="Delegate",e.ELICIT_INTENT="ElicitIntent",e.ELICIT_SLOT="ElicitSlot"}(Qe||(Qe={})),(Xe||(Xe={})).filterSensitiveLog=function(e){return Object(s.a)(Object(s.a)(Object(s.a)({},e),e.slots&&{slots:xt.d}),e.message&&{message:xt.d})},function(e){e.CONFIRMED="Confirmed",e.DENIED="Denied",e.NONE="None"}(Je||(Je={})),(et||(et={})).filterSensitiveLog=function(e){return Object(s.a)(Object(s.a)({},e),e.slots&&{slots:xt.d})},(tt||(tt={})).filterSensitiveLog=function(e){return Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)({},e),e.recentIntentSummaryView&&{recentIntentSummaryView:e.recentIntentSummaryView.map((function(e){return et.filterSensitiveLog(e)}))}),e.sessionAttributes&&{sessionAttributes:xt.d}),e.dialogAction&&{dialogAction:Xe.filterSensitiveLog(e.dialogAction)}),e.activeContexts&&{activeContexts:xt.d})},(rt||(rt={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(nt||(nt={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(it||(it={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(ot||(ot={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(at||(at={})).filterSensitiveLog=function(e){return Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)({},e),e.sessionAttributes&&{sessionAttributes:xt.d}),e.requestAttributes&&{requestAttributes:xt.d}),e.activeContexts&&{activeContexts:xt.d})},function(e){e.CONFIRM_INTENT="ConfirmIntent",e.ELICIT_INTENT="ElicitIntent",e.ELICIT_SLOT="ElicitSlot",e.FAILED="Failed",e.FULFILLED="Fulfilled",e.READY_FOR_FULFILLMENT="ReadyForFulfillment"}(st||(st={})),(ut||(ut={})).filterSensitiveLog=function(e){return Object(s.a)(Object(s.a)(Object(s.a)({},e),e.message&&{message:xt.d}),e.activeContexts&&{activeContexts:xt.d})},(ct||(ct={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(ft||(ft={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(lt||(lt={})).filterSensitiveLog=function(e){return Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)({},e),e.sessionAttributes&&{sessionAttributes:xt.d}),e.requestAttributes&&{requestAttributes:xt.d}),e.inputText&&{inputText:xt.d}),e.activeContexts&&{activeContexts:xt.d})},(dt||(dt={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(ht||(ht={})).filterSensitiveLog=function(e){return Object(s.a)(Object(s.a)({},e),e.slots&&{slots:xt.d})},function(e){e.GENERIC="application/vnd.amazonaws.card.generic"}(pt||(pt={})),(vt||(vt={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(gt||(gt={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(mt||(mt={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(bt||(bt={})).filterSensitiveLog=function(e){return Object(s.a)({},e)},(yt||(yt={})).filterSensitiveLog=function(e){return Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)({},e),e.alternativeIntents&&{alternativeIntents:e.alternativeIntents.map((function(e){return ht.filterSensitiveLog(e)}))}),e.slots&&{slots:xt.d}),e.sessionAttributes&&{sessionAttributes:xt.d}),e.message&&{message:xt.d}),e.activeContexts&&{activeContexts:xt.d})},(wt||(wt={})).filterSensitiveLog=function(e){return Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)(Object(s.a)({},e),e.sessionAttributes&&{sessionAttributes:xt.d}),e.dialogAction&&{dialogAction:Xe.filterSensitiveLog(e.dialogAction)}),e.recentIntentSummaryView&&{recentIntentSummaryView:e.recentIntentSummaryView.map((function(e){return et.filterSensitiveLog(e)}))}),e.activeContexts&&{activeContexts:xt.d})},(_t||(_t={})).filterSensitiveLog=function(e){return Object(s.a)(Object(s.a)(Object(s.a)({},e),e.message&&{message:xt.d}),e.activeContexts&&{activeContexts:xt.d})};var Mt=r(5),Pt={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},Tt={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Ct(e,t,r){return{applyToStack:function(n){n.add(function(e,t){return function(r,n){return function(n){return Object(f.__awaiter)(void 0,void 0,void 0,(function(){var i,o;return Object(f.__generator)(this,(function(a){switch(a.label){case 0:return[4,r(n)];case 1:return i=a.sent().response,[4,t(i,e)];case 2:return o=a.sent(),[2,{response:i,output:o}]}}))}))}}}(e,r),Pt),n.add(function(e,t){return function(r,n){return function(n){return Object(f.__awaiter)(void 0,void 0,void 0,(function(){var i;return Object(f.__generator)(this,(function(o){switch(o.label){case 0:return[4,t(n.input,e)];case 1:return i=o.sent(),[2,r(Object(f.__assign)(Object(f.__assign)({},n),{request:i}))]}}))}))}}}(e,t),Tt)}}}var Lt,Rt=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return Object(s.c)(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(Ct(t,this.serialize,this.deserialize));var n=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"LexRuntimeServiceClient",commandName:"PostTextCommand",inputFilterSensitiveLog:lt.filterSensitiveLog,outputFilterSensitiveLog:yt.filterSensitiveLog},o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),i)},t.prototype.serialize=function(e,t){return Object(Mt.d)(e,t)},t.prototype.deserialize=function(e,t){return Object(Mt.b)(e,t)},t}(xt.b),It=function(e){function t(t){var r=e.call(this)||this;return r.input=t,r}return Object(s.c)(t,e),t.prototype.resolveMiddleware=function(e,t,r){this.middlewareStack.use(Ct(t,this.serialize,this.deserialize));var n=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"LexRuntimeServiceClient",commandName:"PostContentCommand",inputFilterSensitiveLog:at.filterSensitiveLog,outputFilterSensitiveLog:ut.filterSensitiveLog},o=t.requestHandler;return n.resolve((function(e){return o.handle(e.request,r||{})}),i)},t.prototype.serialize=function(e,t){return Object(Mt.c)(e,t)},t.prototype.deserialize=function(e,t){return Object(Mt.a)(e,t)},t}(xt.b),kt=function(e){if(e instanceof Blob||e instanceof ReadableStream)return new Response(e).arrayBuffer().then((function(e){return new Uint8Array(e)}));throw new Error("Readable is not supported.")},Bt=(Lt=function(e,t){return(Lt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}Lt(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Nt=function(){return(Nt=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Ft=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Ut=function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},zt=new n.ConsoleLogger("AWSLexProvider"),Dt=function(e){function t(t){void 0===t&&(t={});var r=e.call(this,t)||this;return r._botsCompleteCallback={},r}return Bt(t,e),t.prototype.getProviderName=function(){return"AWSLexProvider"},t.prototype.reportBotStatus=function(e,t){var r=this;zt.debug("postContent state",e.dialogState),"ReadyForFulfillment"!==e.dialogState&&"Fulfilled"!==e.dialogState||("function"==typeof this._botsCompleteCallback[t]&&setTimeout((function(){return r._botsCompleteCallback[t](null,{slots:e.slots})}),0),this._config&&"function"==typeof this._config[t].onComplete&&setTimeout((function(){return r._config[t].onComplete(null,{slots:e.slots})}),0)),"Failed"===e.dialogState&&("function"==typeof this._botsCompleteCallback[t]&&setTimeout((function(){return r._botsCompleteCallback[t]("Bot conversation failed")}),0),this._config&&"function"==typeof this._config[t].onComplete&&setTimeout((function(){return r._config[t].onComplete("Bot conversation failed")}),0))},t.prototype.sendMessage=function(e,t){return Ft(this,void 0,void 0,(function(){var r,i,o,a,s,u,c,f,l,d;return Ut(this,(function(h){switch(h.label){case 0:return this._config[e]?[4,n.Credentials.get()]:[2,Promise.reject("Bot "+e+" does not exist")];case 1:if(!(r=h.sent()))return[2,Promise.reject("No credentials")];if(this.lexRuntimeServiceClient=new jt({region:this._config[e].region,credentials:r,customUserAgent:Object(n.getAmplifyUserAgent)()}),"string"!=typeof t)return[3,6];i={botAlias:this._config[e].alias,botName:e,inputText:t,userId:r.identityId},zt.debug("postText to lex",t),h.label=2;case 2:return h.trys.push([2,4,,5]),o=new Rt(i),[4,this.lexRuntimeServiceClient.send(o)];case 3:return f=h.sent(),this.reportBotStatus(f,e),[2,f];case 4:return a=h.sent(),[2,Promise.reject(a)];case 5:return[3,11];case 6:s=t.content,u=t.options.messageType,i="voice"===u?{botAlias:this._config[e].alias,botName:e,contentType:"audio/x-l16; sample-rate=16000",inputStream:s,userId:r.identityId,accept:"audio/mpeg"}:{botAlias:this._config[e].alias,botName:e,contentType:"text/plain; charset=utf-8",inputStream:s,userId:r.identityId,accept:"audio/mpeg"},zt.debug("postContent to lex",t),h.label=7;case 7:return h.trys.push([7,10,,11]),c=new It(i),[4,this.lexRuntimeServiceClient.send(c)];case 8:return f=h.sent(),[4,kt(f.audioStream)];case 9:return l=h.sent(),this.reportBotStatus(f,e),[2,Nt(Nt({},f),{audioStream:l})];case 10:return d=h.sent(),[2,Promise.reject(d)];case 11:return[2]}}))}))},t.prototype.onComplete=function(e,t){if(!this._config[e])throw new ErrorEvent("Bot "+e+" does not exist");this._botsCompleteCallback[e]=t},t}(a),qt=function(){return(qt=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Ht=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Gt=function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},Wt=new n.ConsoleLogger("Interactions"),Yt=new(function(){function e(e){this._options=e,Wt.debug("Interactions Options",this._options),this._pluggables={}}return e.prototype.getModuleName=function(){return"Interactions"},e.prototype.configure=function(e){var t=this,r=e?e.Interactions||e:{};Wt.debug("configure Interactions",{opt:r}),this._options=qt(qt({bots:{}},r),r.Interactions);var n=this._options.aws_bots_config,i=this._options.bots;return!Object.keys(i).length&&n&&Array.isArray(n)&&n.forEach((function(e){t._options.bots[e.name]=e})),!this._pluggables.AWSLexProvider&&i&&Object.keys(i).map((function(e){return i[e]})).find((function(e){return!e.providerName||"AWSLexProvider"===e.providerName}))&&(this._pluggables.AWSLexProvider=new Dt),Object.keys(this._pluggables).map((function(e){t._pluggables[e].configure(t._options.bots)})),this._options},e.prototype.addPluggable=function(e){if(e&&"Interactions"===e.getCategory()){if(this._pluggables[e.getProviderName()])throw new Error("Bot "+e.getProviderName()+" already plugged");return e.configure(this._options.bots),void(this._pluggables[e.getProviderName()]=e)}},e.prototype.send=function(e,t){return Ht(this,void 0,void 0,(function(){var r;return Gt(this,(function(n){switch(n.label){case 0:if(!this._options.bots||!this._options.bots[e])throw new Error("Bot "+e+" does not exist");if(r=this._options.bots[e].providerName||"AWSLexProvider",!this._pluggables[r])throw new Error("Bot "+r+" does not have valid pluggin did you try addPluggable first?");return[4,this._pluggables[r].sendMessage(e,t)];case 1:return[2,n.sent()]}}))}))},e.prototype.onComplete=function(e,t){if(!this._options.bots||!this._options.bots[e])throw new Error("Bot "+e+" does not exist");var r=this._options.bots[e].providerName||"AWSLexProvider";if(!this._pluggables[r])throw new Error("Bot "+r+" does not have valid pluggin did you try addPluggable first?");this._pluggables[r].onComplete(e,t)},e}())(null);n.Amplify.register(Yt);t.default=Yt},function(e,t,r){"use strict";r.r(t),r.d(t,"fromUtf8",(function(){return n})),r.d(t,"toUtf8",(function(){return i}));var n=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],r=0,n=e.length;r<n;r++){var i=e.charCodeAt(r);if(i<128)t.push(i);else if(i<2048)t.push(i>>6|192,63&i|128);else if(r+1<e.length&&55296==(64512&i)&&56320==(64512&e.charCodeAt(r+1))){var o=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r));t.push(o>>18|240,o>>12&63|128,o>>6&63|128,63&o|128)}else t.push(i>>12|224,i>>6&63|128,63&i|128)}return Uint8Array.from(t)}(e)},i=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",r=0,n=e.length;r<n;r++){var i=e[r];if(i<128)t+=String.fromCharCode(i);else if(192<=i&&i<224){var o=e[++r];t+=String.fromCharCode((31&i)<<6|63&o)}else if(240<=i&&i<365){var a="%"+[i,e[++r],e[++r],e[++r]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&i)<<12|(63&e[++r])<<6|63&e[++r])}return t}(e)}}])}));
|
|
114
|
+
t.read=function(e,t,n,r,o){var i,a,u=8*o-r-1,s=(1<<u)-1,c=s>>1,l=-7,f=n?o-1:0,d=n?-1:1,p=e[t+f];for(f+=d,i=p&(1<<-l)-1,p>>=-l,l+=u;l>0;i=256*i+e[t+f],f+=d,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=d,l-=8);if(0===i)i=1-c;else{if(i===s)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),i-=c}return(p?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,u,s,c=8*i-o-1,l=(1<<c)-1,f=l>>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,h=r?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-a))<1&&(a--,s*=2),(t+=a+f>=1?d/s:d*Math.pow(2,1-f))*s>=2&&(a++,s/=2),a+f>=l?(u=0,a=l):a+f>=1?(u=(t*s-1)*Math.pow(2,o),a+=f):(u=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+p]=255&u,p+=h,u/=256,o-=8);for(a=a<<o|u,c+=o;c>0;e[n+p]=255&a,p+=h,a/=256,c-=8);e[n+p-h]|=128*v}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Array.from){for(var t=new Uint32Array(e.length);0<e.length;)t[0]=e[0];return t}return Uint32Array.from(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(16).__exportStar)(n(50),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(16),o=n(17),i=n(51),a=n(52),u=function(){function e(e){if(this.hash=new i.RawSha256,e){this.outer=new i.RawSha256;var t=function(e){var t=(0,a.convertToBuffer)(e);if(t.byteLength>o.BLOCK_SIZE){var n=new i.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(o.BLOCK_SIZE);return r.set(t),r}(e),n=new Uint8Array(o.BLOCK_SIZE);n.set(t);for(var r=0;r<o.BLOCK_SIZE;r++)t[r]^=54,n[r]^=92;this.hash.update(t),this.outer.update(n);for(r=0;r<t.byteLength;r++)t[r]=0}}return e.prototype.update=function(e){if(!(0,a.isEmptyData)(e)&&!this.error)try{this.hash.update((0,a.convertToBuffer)(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return(0,r.__awaiter)(this,void 0,void 0,(function(){return(0,r.__generator)(this,(function(e){return[2,this.digestSync()]}))}))},e}();t.Sha256=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var r=n(17),o=function(){function e(){this.state=Int32Array.from(r.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>r.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===r.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%r.BLOCK_SIZE>=r.BLOCK_SIZE-8){for(var o=this.bufferLength;o<r.BLOCK_SIZE;o++)t.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(o=this.bufferLength;o<r.BLOCK_SIZE-8;o++)t.setUint8(o,0);t.setUint32(r.BLOCK_SIZE-8,Math.floor(e/4294967296),!0),t.setUint32(r.BLOCK_SIZE-4,e),this.hashBuffer(),this.finished=!0}var i=new Uint8Array(r.DIGEST_LENGTH);for(o=0;o<8;o++)i[4*o]=this.state[o]>>>24&255,i[4*o+1]=this.state[o]>>>16&255,i[4*o+2]=this.state[o]>>>8&255,i[4*o+3]=this.state[o]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],o=t[1],i=t[2],a=t[3],u=t[4],s=t[5],c=t[6],l=t[7],f=0;f<r.BLOCK_SIZE;f++){if(f<16)this.temp[f]=(255&e[4*f])<<24|(255&e[4*f+1])<<16|(255&e[4*f+2])<<8|255&e[4*f+3];else{var d=this.temp[f-2],p=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,h=((d=this.temp[f-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[f]=(p+this.temp[f-7]|0)+(h+this.temp[f-16]|0)}var v=(((u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+(u&s^~u&c)|0)+(l+(r.KEY[f]+this.temp[f]|0)|0)|0,y=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&o^n&i^o&i)|0;l=c,c=s,s=u,u=a+v|0,a=i,i=o,o=n,n=v+y|0}t[0]+=n,t[1]+=o,t[2]+=i,t[3]+=a,t[4]+=u,t[5]+=s,t[6]+=c,t[7]+=l},e}();t.RawSha256=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var r=n(53);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return r.convertToBuffer}});var o=n(54);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return o.isEmptyData}});var i=n(55);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return i.numToUint8}});var a=n(56);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return a.uint32ArrayFrom}})},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var r=n(88),o=void 0!==e&&e.from?function(t){return e.from(t,"utf8")}:r.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"==typeof e?o(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}}).call(this,n(8).Buffer)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Array.from){for(var t=new Uint32Array(e.length);0<e.length;)t[0]=e[0];return t}return Uint32Array.from(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(18).__exportStar(n(58),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supportsZeroByteGCM=t.supportsSubtleCrypto=t.supportsSecureRandom=t.supportsWebCrypto=void 0;var r=n(18),o=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function i(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}function a(e){return e&&o.every((function(t){return"function"==typeof e[t]}))}t.supportsWebCrypto=function(e){return!(!i(e)||"object"!=typeof e.crypto.subtle)&&a(e.crypto.subtle)},t.supportsSecureRandom=i,t.supportsSubtleCrypto=a,t.supportsZeroByteGCM=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t;return r.__generator(this,(function(n){switch(n.label){case 0:if(!a(e))return[2,!1];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,e.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return t=n.sent(),[4,e.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},t,new Uint8Array(0))];case 3:return[2,16===n.sent().byteLength];case 4:return n.sent(),[2,!1];case 5:return[2]}}))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(60);r.__exportStar(n(61),t),r.__exportStar(n(62),t),r.__exportStar(n(63),t),r.__exportStar(n(64),t),r.__exportStar(n(65),t)},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return i})),n.d(t,"__rest",(function(){return a})),n.d(t,"__decorate",(function(){return u})),n.d(t,"__param",(function(){return s})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return l})),n.d(t,"__generator",(function(){return f})),n.d(t,"__createBinding",(function(){return d})),n.d(t,"__exportStar",(function(){return p})),n.d(t,"__values",(function(){return h})),n.d(t,"__read",(function(){return v})),n.d(t,"__spread",(function(){return y})),n.d(t,"__spreadArrays",(function(){return b})),n.d(t,"__await",(function(){return m})),n.d(t,"__asyncGenerator",(function(){return g})),n.d(t,"__asyncDelegator",(function(){return w})),n.d(t,"__asyncValues",(function(){return O})),n.d(t,"__makeTemplateObject",(function(){return S})),n.d(t,"__importStar",(function(){return _})),n.d(t,"__importDefault",(function(){return j})),n.d(t,"__classPrivateFieldGet",(function(){return E})),n.d(t,"__classPrivateFieldSet",(function(){return x}));
|
|
115
|
+
/*! *****************************************************************************
|
|
116
|
+
Copyright (c) Microsoft Corporation.
|
|
117
|
+
|
|
118
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
119
|
+
purpose with or without fee is hereby granted.
|
|
120
|
+
|
|
121
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
122
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
123
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
124
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
125
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
126
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
127
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
128
|
+
***************************************************************************** */
|
|
129
|
+
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function b(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function g(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof m?Promise.resolve(n.value.v).then(s,c):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function l(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function O(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function _(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function j(e){return e&&e.__esModule?e:{default:e}}function E(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function x(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsWindow=void 0;var r=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];t.isMsWindow=function(e){if(function(e){return"MSInputMethodContext"in e&&"msCrypto"in e}(e)&&void 0!==e.msCrypto.subtle){var t=e.msCrypto,n=t.getRandomValues,o=t.subtle;return r.map((function(e){return o[e]})).concat(n).every((function(e){return"function"==typeof e}))}return!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(21),o=n(23),i=n(72),a=n(75),u=n(77),s=n(4),c=function(){function e(e){(0,a.supportsWebCrypto)((0,s.locateWindow)())?this.hash=new o.Sha256(e):(0,u.isMsWindow)((0,s.locateWindow)())?this.hash=new r.Sha256(e):this.hash=new i.Sha256(e)}return e.prototype.update=function(e,t){this.hash.update(e,t)},e.prototype.digest=function(){return this.hash.digest()},e}();t.Sha256=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var r=n(87),o=void 0!==e&&e.from?function(t){return e.from(t,"utf8")}:r.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"==typeof e?o(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}}).call(this,n(8).Buffer)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;n<e.length;)t[n]=e[n],n+=1;return t}return Uint32Array.from(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(10).__exportStar(n(73),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(10),o=n(24),i=n(74),a=n(9),u=function(){function e(e){if(this.hash=new i.RawSha256,e){this.outer=new i.RawSha256;var t=function(e){var t=(0,a.convertToBuffer)(e);if(t.byteLength>o.BLOCK_SIZE){var n=new i.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(o.BLOCK_SIZE);return r.set(t),r}(e),n=new Uint8Array(o.BLOCK_SIZE);n.set(t);for(var r=0;r<o.BLOCK_SIZE;r++)t[r]^=54,n[r]^=92;this.hash.update(t),this.outer.update(n);for(r=0;r<t.byteLength;r++)t[r]=0}}return e.prototype.update=function(e){if(!(0,a.isEmptyData)(e)&&!this.error)try{this.hash.update((0,a.convertToBuffer)(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.digestSync()]}))}))},e}();t.Sha256=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var r=n(24),o=function(){function e(){this.state=Int32Array.from(r.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>r.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===r.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%r.BLOCK_SIZE>=r.BLOCK_SIZE-8){for(var o=this.bufferLength;o<r.BLOCK_SIZE;o++)t.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(o=this.bufferLength;o<r.BLOCK_SIZE-8;o++)t.setUint8(o,0);t.setUint32(r.BLOCK_SIZE-8,Math.floor(e/4294967296),!0),t.setUint32(r.BLOCK_SIZE-4,e),this.hashBuffer(),this.finished=!0}var i=new Uint8Array(r.DIGEST_LENGTH);for(o=0;o<8;o++)i[4*o]=this.state[o]>>>24&255,i[4*o+1]=this.state[o]>>>16&255,i[4*o+2]=this.state[o]>>>8&255,i[4*o+3]=this.state[o]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],o=t[1],i=t[2],a=t[3],u=t[4],s=t[5],c=t[6],l=t[7],f=0;f<r.BLOCK_SIZE;f++){if(f<16)this.temp[f]=(255&e[4*f])<<24|(255&e[4*f+1])<<16|(255&e[4*f+2])<<8|255&e[4*f+3];else{var d=this.temp[f-2],p=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,h=((d=this.temp[f-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[f]=(p+this.temp[f-7]|0)+(h+this.temp[f-16]|0)}var v=(((u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+(u&s^~u&c)|0)+(l+(r.KEY[f]+this.temp[f]|0)|0)|0,y=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&o^n&i^o&i)|0;l=c,c=s,s=u,u=a+v|0,a=i,i=o,o=n,n=v+y|0}t[0]+=n,t[1]+=o,t[2]+=i,t[3]+=a,t[4]+=u,t[5]+=s,t[6]+=c,t[7]+=l},e}();t.RawSha256=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(25).__exportStar(n(76),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supportsZeroByteGCM=t.supportsSubtleCrypto=t.supportsSecureRandom=t.supportsWebCrypto=void 0;var r=n(25),o=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function i(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}function a(e){return e&&o.every((function(t){return"function"==typeof e[t]}))}t.supportsWebCrypto=function(e){return!(!i(e)||"object"!=typeof e.crypto.subtle)&&a(e.crypto.subtle)},t.supportsSecureRandom=i,t.supportsSubtleCrypto=a,t.supportsZeroByteGCM=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t;return r.__generator(this,(function(n){switch(n.label){case 0:if(!a(e))return[2,!1];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,e.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return t=n.sent(),[4,e.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},t,new Uint8Array(0))];case 3:return[2,16===n.sent().byteLength];case 4:return n.sent(),[2,!1];case 5:return[2]}}))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(78);r.__exportStar(n(79),t),r.__exportStar(n(80),t),r.__exportStar(n(81),t),r.__exportStar(n(82),t),r.__exportStar(n(83),t)},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return i})),n.d(t,"__rest",(function(){return a})),n.d(t,"__decorate",(function(){return u})),n.d(t,"__param",(function(){return s})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return l})),n.d(t,"__generator",(function(){return f})),n.d(t,"__createBinding",(function(){return d})),n.d(t,"__exportStar",(function(){return p})),n.d(t,"__values",(function(){return h})),n.d(t,"__read",(function(){return v})),n.d(t,"__spread",(function(){return y})),n.d(t,"__spreadArrays",(function(){return b})),n.d(t,"__await",(function(){return m})),n.d(t,"__asyncGenerator",(function(){return g})),n.d(t,"__asyncDelegator",(function(){return w})),n.d(t,"__asyncValues",(function(){return O})),n.d(t,"__makeTemplateObject",(function(){return S})),n.d(t,"__importStar",(function(){return _})),n.d(t,"__importDefault",(function(){return j})),n.d(t,"__classPrivateFieldGet",(function(){return E})),n.d(t,"__classPrivateFieldSet",(function(){return x}));
|
|
130
|
+
/*! *****************************************************************************
|
|
131
|
+
Copyright (c) Microsoft Corporation.
|
|
132
|
+
|
|
133
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
134
|
+
purpose with or without fee is hereby granted.
|
|
135
|
+
|
|
136
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
137
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
138
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
139
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
140
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
141
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
142
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
143
|
+
***************************************************************************** */
|
|
144
|
+
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function b(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function g(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof m?Promise.resolve(n.value.v).then(s,c):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function l(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function O(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function _(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function j(e){return e&&e.__esModule?e:{default:e}}function E(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function x(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsWindow=void 0;var r=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];t.isMsWindow=function(e){if(function(e){return"MSInputMethodContext"in e&&"msCrypto"in e}(e)&&void 0!==e.msCrypto.subtle){var t=e.msCrypto,n=t.getRandomValues,o=t.subtle;return r.map((function(e){return o[e]})).concat(n).every((function(e){return"function"==typeof e}))}return!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AwsCrc32=void 0;var r=n(26),o=n(9),i=n(7),a=function(){function e(){this.crc32=new i.Crc32}return e.prototype.update=function(e){(0,o.isEmptyData)(e)||this.crc32.update((0,o.convertToBuffer)(e))},e.prototype.digest=function(){return(0,r.__awaiter)(this,void 0,void 0,(function(){return(0,r.__generator)(this,(function(e){return[2,(0,o.numToUint8)(this.crc32.digest())]}))}))},e}();t.AwsCrc32=a},function(e,t,n){"use strict";n.r(t),n.d(t,"AbstractInteractionsProvider",(function(){return a})),n.d(t,"AWSLexProvider",(function(){return lr})),n.d(t,"AWSLexV2Provider",(function(){return Xu})),n.d(t,"Interactions",(function(){return dr}));var r=n(0),o=n(3),i=new o.ConsoleLogger("AbstractInteractionsProvider"),a=function(){function e(e){void 0===e&&(e={}),this._config=e}return e.prototype.configure=function(e){return void 0===e&&(e={}),this._config=Object(r.a)(Object(r.a)({},this._config),e),i.debug("configure "+this.getProviderName(),this._config),this.options},e.prototype.getCategory=function(){return"Interactions"},Object.defineProperty(e.prototype,"options",{get:function(){return Object(r.a)({},this._config)},enumerable:!0,configurable:!0}),e}(),u=n(30),s=n(29);function c(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function f(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var d=n(2);
|
|
145
|
+
/*! *****************************************************************************
|
|
146
|
+
Copyright (c) Microsoft Corporation.
|
|
147
|
+
|
|
148
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
149
|
+
purpose with or without fee is hereby granted.
|
|
150
|
+
|
|
151
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
152
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
153
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
154
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
155
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
156
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
157
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
158
|
+
***************************************************************************** */function p(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var h=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,v)},v=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()};for(var y=function(){function e(e){var t=(void 0===e?{}:e).requestTimeout;this.requestTimeout=t}return e.prototype.destroy=function(){},e.prototype.handle=function(e,t){var n=(void 0===t?{}:t).abortSignal,r=this.requestTimeout;if(null==n?void 0:n.aborted){var o=new Error("Request aborted");return o.name="AbortError",Promise.reject(o)}var i=e.path;if(e.query){var a=function(e){var t,n,r=[];try{for(var o=p(Object.keys(e).sort()),i=o.next();!i.done;i=o.next()){var a=i.value,u=e[a];if(a=h(a),Array.isArray(u))for(var s=0,c=u.length;s<c;s++)r.push(a+"="+h(u[s]));else{var l=a;(u||"string"==typeof u)&&(l+="="+h(u)),r.push(l)}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r.join("&")}(e.query);a&&(i+="?"+a)}var u=e.port,s=e.method,c=e.protocol+"//"+e.hostname+(u?":"+u:"")+i,l={body:"GET"===s||"HEAD"===s?void 0:e.body,headers:new Headers(e.headers),method:s};"undefined"!=typeof AbortController&&(l.signal=n);var v,y=new Request(c,l),b=[fetch(y).then((function(e){var t,n,r=e.headers,o={};try{for(var i=f(r.entries()),a=i.next();!a.done;a=i.next()){var u=a.value;o[u[0]]=u[1]}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return void 0!==e.body?{response:new d.b({headers:o,statusCode:e.status,body:e.body})}:e.blob().then((function(t){return{response:new d.b({headers:o,statusCode:e.status,body:t})}}))})),(v=r,void 0===v&&(v=0),new Promise((function(e,t){v&&setTimeout((function(){var e=new Error("Request did not complete within "+v+" ms");e.name="TimeoutError",t(e)}),v)})))];return n&&b.push(new Promise((function(e,t){n.onabort=function(){var e=new Error("Request aborted");e.name="AbortError",t(e)}}))),Promise.race(b)},e}(),b={},m=new Array(64),g=0,w="A".charCodeAt(0),O="Z".charCodeAt(0);g+w<=O;g++){var S=String.fromCharCode(g+w);b[S]=g,m[g]=S}for(g=0,w="a".charCodeAt(0),O="z".charCodeAt(0);g+w<=O;g++){S=String.fromCharCode(g+w);var _=g+26;b[S]=_,m[_]=S}for(g=0;g<10;g++){b[g.toString(10)]=g+52;S=g.toString(10),_=g+52;b[S]=_,m[_]=S}b["+"]=62,m[62]="+",b["/"]=63,m[63]="/";function j(e){var t=e.length/4*3;"=="===e.substr(-2)?t-=2:"="===e.substr(-1)&&t--;for(var n=new ArrayBuffer(t),r=new DataView(n),o=0;o<e.length;o+=4){for(var i=0,a=0,u=o,s=o+3;u<=s;u++)"="!==e[u]?(i|=b[e[u]]<<6*(s-u),a+=6):i>>=6;var c=o/4*3;i>>=a%8;for(var l=Math.floor(a/8),f=0;f<l;f++){var d=8*(l-f-1);r.setUint8(c+f,(i&255<<d)>>d)}}return new Uint8Array(n)}function E(e){return new Promise((function(t,n){var r=new FileReader;r.onloadend=function(){var e;if(2!==r.readyState)return n(new Error("Reader aborted too early"));var o=null!==(e=r.result)&&void 0!==e?e:"",i=o.indexOf(","),a=i>-1?i+1:o.length;t(o.substring(a))},r.onabort=function(){return n(new Error("Read aborted"))},r.onerror=function(){return n(r.error)},r.readAsDataURL(e)}))}var x=function(){return(x=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function A(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function T(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function P(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var C=function(e){return function(t,n){return function(r){return A(void 0,void 0,void 0,(function(){var o;return T(this,(function(i){return(null===(o=null==e?void 0:e.retryStrategy)||void 0===o?void 0:o.mode)&&(n.userAgent=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(P(arguments[t]));return e}(n.userAgent||[],[["cfg/retry-mode",e.retryStrategy.mode]])),[2,e.retryStrategy.retry(t,r)]}))}))}}},M={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},I=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],R=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],k=["AbortError","TimeoutError","RequestTimeout","RequestTimeoutException"],L=[500,502,503,504],D=function(e){var t,n;return 429===(null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||R.includes(e.name)||1==(null===(n=e.$retryable)||void 0===n?void 0:n.throttling)},U=n(28),B=function(e,t){return Math.floor(Math.min(2e4,Math.random()*Math.pow(2,t)*e))},N=function(e){return!!e&&(function(e){return void 0!==e.$retryable}(e)||function(e){return I.includes(e.name)}(e)||D(e)||function(e){var t;return k.includes(e.name)||L.includes((null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||0)}(e))},F=function(){function e(e,t){var n,r,o,i,a,u,s,c;this.maxAttemptsProvider=e,this.mode="standard",this.retryDecider=null!==(n=null==t?void 0:t.retryDecider)&&void 0!==n?n:N,this.delayDecider=null!==(r=null==t?void 0:t.delayDecider)&&void 0!==r?r:B,this.retryQuota=null!==(o=null==t?void 0:t.retryQuota)&&void 0!==o?o:(a=i=500,u=i,s=function(e){return"TimeoutError"===e.name?10:5},c=function(e){return s(e)<=u},Object.freeze({hasRetryTokens:c,retrieveRetryTokens:function(e){if(!c(e))throw new Error("No retry token available");var t=s(e);return u-=t,t},releaseRetryTokens:function(e){u+=null!=e?e:1,u=Math.min(u,a)}}))}return e.prototype.shouldRetry=function(e,t,n){return t<n&&this.retryDecider(e)&&this.retryQuota.hasRetryTokens(e)},e.prototype.getMaxAttempts=function(){return A(this,void 0,void 0,(function(){var e;return T(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.maxAttemptsProvider()];case 1:return e=t.sent(),[3,3];case 2:return t.sent(),e=3,[3,3];case 3:return[2,e]}}))}))},e.prototype.retry=function(e,t){return A(this,void 0,void 0,(function(){var n,r,o,i,a,u,s,c;return T(this,(function(l){switch(l.label){case 0:return r=0,o=0,[4,this.getMaxAttempts()];case 1:i=l.sent(),a=t.request,d.a.isInstance(a)&&(a.headers["amz-sdk-invocation-id"]=Object(U.v4)()),u=function(){var u,c,l,f,p;return T(this,(function(h){switch(h.label){case 0:return h.trys.push([0,2,,5]),d.a.isInstance(a)&&(a.headers["amz-sdk-request"]="attempt="+(r+1)+"; max="+i),[4,e(t)];case 1:return u=h.sent(),c=u.response,l=u.output,s.retryQuota.releaseRetryTokens(n),l.$metadata.attempts=r+1,l.$metadata.totalRetryDelay=o,[2,{value:{response:c,output:l}}];case 2:return f=h.sent(),r++,s.shouldRetry(f,r,i)?(n=s.retryQuota.retrieveRetryTokens(f),p=s.delayDecider(D(f)?500:100,r),o+=p,[4,new Promise((function(e){return setTimeout(e,p)}))]):[3,4];case 3:return h.sent(),[2,"continue"];case 4:throw f.$metadata||(f.$metadata={}),f.$metadata.attempts=r,f.$metadata.totalRetryDelay=o,f;case 5:return[2]}}))},s=this,l.label=2;case 2:return[5,u()];case 3:return"object"==typeof(c=l.sent())?[2,c.value]:[3,2];case 4:return[2]}}))}))},e}(),z=function(e){if(void 0===e&&(e=3),"number"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e};function q(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function H(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var G=n(5),V=n.n(G);var $=new Set(["af-south-1","ap-east-1","ap-northeast-1","ap-northeast-2","ap-south-1","ap-southeast-1","ap-southeast-2","ca-central-1","eu-central-1","eu-north-1","eu-south-1","eu-west-1","eu-west-2","eu-west-3","me-south-1","sa-east-1","us-east-1","us-east-2","us-west-1","us-west-2"]),W=new Set(["cn-north-1","cn-northwest-1"]),K=new Set(["us-iso-east-1"]),Y=new Set(["us-isob-east-1"]),Z=new Set(["us-gov-east-1","us-gov-west-1"]);function X(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function J(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var Q,ee,te,ne,re={apiVersion:"2016-11-28",disableHostPrefix:!1,logger:{},regionInfoProvider:function(e,t){var n=void 0;switch(e){case"ap-northeast-1":n={hostname:"runtime.lex.ap-northeast-1.amazonaws.com",partition:"aws",signingService:"lex"};break;case"ap-southeast-1":n={hostname:"runtime.lex.ap-southeast-1.amazonaws.com",partition:"aws",signingService:"lex"};break;case"ap-southeast-2":n={hostname:"runtime.lex.ap-southeast-2.amazonaws.com",partition:"aws",signingService:"lex"};break;case"eu-central-1":n={hostname:"runtime.lex.eu-central-1.amazonaws.com",partition:"aws",signingService:"lex"};break;case"eu-west-1":n={hostname:"runtime.lex.eu-west-1.amazonaws.com",partition:"aws",signingService:"lex"};break;case"eu-west-2":n={hostname:"runtime.lex.eu-west-2.amazonaws.com",partition:"aws",signingService:"lex"};break;case"us-east-1":n={hostname:"runtime.lex.us-east-1.amazonaws.com",partition:"aws",signingService:"lex"};break;case"us-west-2":n={hostname:"runtime.lex.us-west-2.amazonaws.com",partition:"aws",signingService:"lex"};break;default:$.has(e)&&(n={hostname:"runtime.lex.{region}.amazonaws.com".replace("{region}",e),partition:"aws",signingService:"lex"}),W.has(e)&&(n={hostname:"runtime.lex.{region}.amazonaws.com.cn".replace("{region}",e),partition:"aws-cn"}),K.has(e)&&(n={hostname:"runtime.lex.{region}.c2s.ic.gov".replace("{region}",e),partition:"aws-iso"}),Y.has(e)&&(n={hostname:"runtime.lex.{region}.sc2s.sgov.gov".replace("{region}",e),partition:"aws-iso-b"}),Z.has(e)&&(n={hostname:"runtime.lex.{region}.amazonaws.com".replace("{region}",e),partition:"aws-us-gov"}),void 0===n&&(n={hostname:"runtime.lex.{region}.amazonaws.com".replace("{region}",e),partition:"aws",signingService:"lex"})}return Promise.resolve(Object(r.a)({signingService:"lex"},n))},serviceId:"Lex Runtime Service",urlParser:function(e){var t,n=new URL(e),r=n.hostname,o=n.pathname,i=n.port,a=n.protocol,u=n.search;return u&&(t=function(e){var t,n,r={};if(e=e.replace(/^\?/,""))try{for(var o=X(e.split("&")),i=o.next();!i.done;i=o.next()){var a=J(i.value.split("="),2),u=a[0],s=a[1],c=void 0===s?null:s;u=decodeURIComponent(u),c&&(c=decodeURIComponent(c)),u in r?Array.isArray(r[u])?r[u].push(c):r[u]=[r[u],c]:r[u]=c}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(u)),{hostname:r,port:i?parseInt(i):void 0,protocol:a,path:o,query:t}}},oe=Object(r.a)(Object(r.a)({},re),{runtime:"browser",base64Decoder:j,base64Encoder:function(e){for(var t="",n=0;n<e.length;n+=3){for(var r=0,o=0,i=n,a=Math.min(n+3,e.length);i<a;i++)r|=e[i]<<8*(a-i-1),o+=8;var u=Math.ceil(o/6);r<<=6*u-o;for(var s=1;s<=u;s++){var c=6*(u-s);t+=m[(r&63<<c)>>c]}t+="==".slice(0,4-u)}return t},bodyLengthChecker:function(e){if("string"==typeof e){for(var t=e.length,n=t-1;n>=0;n--){var r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2)}return t}return"number"==typeof e.byteLength?e.byteLength:"number"==typeof e.size?e.size:void 0}
|
|
159
|
+
/*! *****************************************************************************
|
|
160
|
+
Copyright (c) Microsoft Corporation.
|
|
161
|
+
|
|
162
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
163
|
+
purpose with or without fee is hereby granted.
|
|
164
|
+
|
|
165
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
166
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
167
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
168
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
169
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
170
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
171
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
172
|
+
***************************************************************************** */,credentialDefaultProvider:function(e){return function(){return Promise.reject(new Error("Credential is missing"))}},defaultUserAgentProvider:(ee={serviceId:re.serviceId,clientVersion:u.version},te=ee.serviceId,ne=ee.clientVersion,function(){return q(void 0,void 0,void 0,(function(){var e,t,n,r,o,i,a,u,s;return H(this,(function(c){return e=(null===(n=null===window||void 0===window?void 0:window.navigator)||void 0===n?void 0:n.userAgent)?V.a.parse(window.navigator.userAgent):void 0,t=[["aws-sdk-js",ne],["os/"+((null===(r=null==e?void 0:e.os)||void 0===r?void 0:r.name)||"other"),null===(o=null==e?void 0:e.os)||void 0===o?void 0:o.version],["lang/js"],["md/browser",(null!==(a=null===(i=null==e?void 0:e.browser)||void 0===i?void 0:i.name)&&void 0!==a?a:"unknown")+"_"+(null!==(s=null===(u=null==e?void 0:e.browser)||void 0===u?void 0:u.version)&&void 0!==s?s:"unknown")]],te&&t.push(["api/"+te,ne]),[2,t]}))}))}),maxAttempts:3,region:(Q="Region is missing",function(){return Promise.reject(Q)}),requestHandler:new y,sha256:s.Sha256,streamCollector:function(e){return"function"==typeof Blob&&e instanceof Blob?function(e){return c(this,void 0,void 0,(function(){var t,n;return l(this,(function(r){switch(r.label){case 0:return[4,E(e)];case 1:return t=r.sent(),n=j(t),[2,new Uint8Array(n)]}}))}))}(e):function(e){return c(this,void 0,void 0,(function(){var t,n,r,o,i,a,u;return l(this,(function(s){switch(s.label){case 0:t=new Uint8Array(0),n=e.getReader(),r=!1,s.label=1;case 1:return r?[3,3]:[4,n.read()];case 2:return o=s.sent(),i=o.done,(a=o.value)&&(u=t,(t=new Uint8Array(u.length+a.length)).set(u),t.set(a,u.length)),r=i,[3,1];case 3:return[2,t]}}))}))}(e)},utf8Decoder:function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e.charCodeAt(n);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(n+1<e.length&&55296==(64512&o)&&56320==(64512&e.charCodeAt(n+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(o>>12|224,o>>6&63|128,63&o|128)}return Uint8Array.from(t)}(e)},utf8Encoder:function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",n=0,r=e.length;n<r;n++){var o=e[n];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){var i=e[++n];t+=String.fromCharCode((31&o)<<6|63&i)}else if(240<=o&&o<365){var a="%"+[o,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&o)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)}});var ie=function(){return(ie=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function ae(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function ue(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var se=function(e){var t=e.endpoint,n=e.urlParser;if("string"==typeof t){var r=Promise.resolve(n(t));return function(){return r}}if("object"==typeof t){var o=Promise.resolve(t);return function(){return o}}return t},ce=function(e){return ae(void 0,void 0,void 0,(function(){var t,n,r,o,i;return ue(this,(function(a){switch(a.label){case 0:return t=e.tls,n=void 0===t||t,[4,e.region()];case 1:if(r=a.sent(),!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(r))throw new Error("Invalid region in client config");return[4,e.regionInfoProvider(r)];case 2:if(!(o=(null!==(i=a.sent())&&void 0!==i?i:{}).hostname))throw new Error("Cannot resolve hostname from client config");return[2,e.urlParser((n?"https:":"http:")+"//"+o)]}}))}))},le=function(e){if("string"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e};var fe=function(){return(fe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function de(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function pe(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var he={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},ve=function(e){return{applyToStack:function(t){t.add(function(e){var t=this;return function(n){return function(r){return de(t,void 0,void 0,(function(){var t,o,i,a,u;return pe(this,(function(s){return t=r.request,d.a.isInstance(t)&&(o=t.body,i=t.headers,o&&-1===Object.keys(i).map((function(e){return e.toLowerCase()})).indexOf("content-length")&&void 0!==(a=e(o))&&(t.headers=fe(fe({},t.headers),((u={})["content-length"]=String(a),u)))),[2,n(fe(fe({},r),{request:t}))]}))}))}}}(e.bodyLengthChecker),he)}}};function ye(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function be(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var me={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},ge=function(e){return{applyToStack:function(t){t.add(function(e){return function(t){return function(n){return ye(void 0,void 0,void 0,(function(){var r,o;return be(this,(function(i){return d.a.isInstance(n.request)?(r=n.request,o=(e.requestHandler.metadata||{}).handlerProtocol,(void 0===o?"":o).indexOf("h2")>=0&&!r.headers[":authority"]?(delete r.headers.host,r.headers[":authority"]=""):r.headers.host||(r.headers.host=r.hostname),[2,t(n)]):[2,t(n)]}))}))}}}(e),me)}}};function we(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function Oe(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var Se=function(){return function(e,t){return function(n){return we(void 0,void 0,void 0,(function(){var r,o,i,a,u,s,c,l,f;return Oe(this,(function(d){switch(d.label){case 0:return r=t.clientName,o=t.commandName,i=t.inputFilterSensitiveLog,a=t.logger,u=t.outputFilterSensitiveLog,[4,e(n)];case 1:return s=d.sent(),a?("function"==typeof a.info&&(c=s.output,l=c.$metadata,f=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(c,["$metadata"]),a.info({clientName:r,commandName:o,input:i(n.input),output:u(f),metadata:l})),[2,s]):[2,s]}}))}))}}},_e={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0};var je=function(){return(je=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function Ee(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function xe(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function Ae(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Te(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}for(var Pe={},Ce={},Me=0;Me<256;Me++){var Ie=Me.toString(16).toLowerCase();1===Ie.length&&(Ie="0"+Ie),Pe[Me]=Ie,Ce[Ie]=Me}function Re(e){for(var t="",n=0;n<e.byteLength;n++)t+=Pe[e[n]];return t}var ke="X-Amz-Date".toLowerCase(),Le=["authorization",ke,"date"],De="X-Amz-Signature".toLowerCase(),Ue="X-Amz-Security-Token".toLowerCase(),Be={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},Ne=/^proxy-/,Fe=/^sec-/,ze="AWS4-HMAC-SHA256-PAYLOAD",qe={},He=[];function Ge(e,t,n){return e+"/"+t+"/"+n+"/aws4_request"}function Ve(e,t,n){var r=new e(t);return r.update(n),r.digest()}function $e(e,t,n){var r,o,i=e.headers,a={};try{for(var u=Ae(Object.keys(i).sort()),s=u.next();!s.done;s=u.next()){var c=s.value,l=c.toLowerCase();(l in Be||(null==t?void 0:t.has(l))||Ne.test(l)||Fe.test(l))&&(!n||n&&!n.has(l))||(a[l]=i[c].trim().replace(/\s+/g," "))}}catch(e){r={error:e}}finally{try{s&&!s.done&&(o=u.return)&&o.call(u)}finally{if(r)throw r.error}}return a}var We=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,Ke)},Ke=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()};function Ye(e,t){var n=e.headers,r=e.body;return Ee(this,void 0,void 0,(function(){var e,o,i,a,u,s,c;return xe(this,(function(l){switch(l.label){case 0:try{for(e=Ae(Object.keys(n)),o=e.next();!o.done;o=e.next())if("x-amz-content-sha256"===(i=o.value).toLowerCase())return[2,n[i]]}catch(e){s={error:e}}finally{try{o&&!o.done&&(c=e.return)&&c.call(e)}finally{if(s)throw s.error}}return null!=r?[3,1]:[2,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"];case 1:return"string"==typeof r||ArrayBuffer.isView(r)||(f=r,"function"==typeof ArrayBuffer&&f instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(f))?((a=new t).update(r),u=Re,[4,a.digest()]):[3,3];case 2:return[2,u.apply(void 0,[l.sent()])];case 3:return[2,"UNSIGNED-PAYLOAD"]}var f}))}))}function Ze(e){var t=e.headers,n=e.query,r=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["headers","query"]);return je(je({},r),{headers:je({},t),query:n?Xe(n):void 0})}function Xe(e){return Object.keys(e).reduce((function(t,n){var r,o=e[n];return je(je({},t),((r={})[n]=Array.isArray(o)?function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Te(arguments[t]));return e}(o):o,r))}),{})}function Je(e){var t,n;e="function"==typeof e.clone?e.clone():Ze(e);try{for(var r=Ae(Object.keys(e.headers)),o=r.next();!o.done;o=r.next()){var i=o.value;Le.indexOf(i.toLowerCase())>-1&&delete e.headers[i]}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return e}function Qe(e){return function(e){if("number"==typeof e)return new Date(1e3*e);if("string"==typeof e)return Number(e)?new Date(1e3*Number(e)):new Date(e);return e}(e).toISOString().replace(/\.\d{3}Z$/,"Z")}var et=function(){function e(e){var t=e.applyChecksum,n=e.credentials,r=e.region,o=e.service,i=e.sha256,a=e.uriEscapePath,u=void 0===a||a;this.service=o,this.sha256=i,this.uriEscapePath=u,this.applyChecksum="boolean"!=typeof t||t,this.regionProvider=rt(r),this.credentialProvider=ot(n)}return e.prototype.presign=function(e,t){return void 0===t&&(t={}),Ee(this,void 0,void 0,(function(){var n,r,o,i,a,u,s,c,l,f,d,p,h,v,y,b,m,g,w,O,S,_,j,E;return xe(this,(function(x){switch(x.label){case 0:return n=t.signingDate,r=void 0===n?new Date:n,o=t.expiresIn,i=void 0===o?3600:o,a=t.unsignableHeaders,u=t.unhoistableHeaders,s=t.signableHeaders,c=t.signingRegion,l=t.signingService,[4,this.credentialProvider()];case 1:return f=x.sent(),null==c?[3,2]:(p=c,[3,4]);case 2:return[4,this.regionProvider()];case 3:p=x.sent(),x.label=4;case 4:return d=p,h=tt(r),v=h.longDate,y=h.shortDate,i>604800?[2,Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future")]:(b=Ge(y,d,null!=l?l:this.service),m=function(e,t){var n,r,o;void 0===t&&(t={});var i="function"==typeof e.clone?e.clone():Ze(e),a=i.headers,u=i.query,s=void 0===u?{}:u;try{for(var c=Ae(Object.keys(a)),l=c.next();!l.done;l=c.next()){var f=l.value,d=f.toLowerCase();"x-amz-"!==d.substr(0,6)||(null===(o=t.unhoistableHeaders)||void 0===o?void 0:o.has(d))||(s[f]=a[f],delete a[f])}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}return je(je({},e),{headers:a,query:s})}(Je(e),{unhoistableHeaders:u}),f.sessionToken&&(m.query["X-Amz-Security-Token"]=f.sessionToken),m.query["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",m.query["X-Amz-Credential"]=f.accessKeyId+"/"+b,m.query["X-Amz-Date"]=v,m.query["X-Amz-Expires"]=i.toString(10),g=$e(m,a,s),m.query["X-Amz-SignedHeaders"]=nt(g),w=m.query,O="X-Amz-Signature",S=this.getSignature,_=[v,b,this.getSigningKey(f,d,y,l)],j=this.createCanonicalRequest,E=[m,g],[4,Ye(e,this.sha256)]);case 5:return[4,S.apply(this,_.concat([j.apply(this,E.concat([x.sent()]))]))];case 6:return w[O]=x.sent(),[2,m]}}))}))},e.prototype.sign=function(e,t){return Ee(this,void 0,void 0,(function(){return xe(this,(function(n){return"string"==typeof e?[2,this.signString(e,t)]:e.headers&&e.payload?[2,this.signEvent(e,t)]:[2,this.signRequest(e,t)]}))}))},e.prototype.signEvent=function(e,t){var n=e.headers,r=e.payload,o=t.signingDate,i=void 0===o?new Date:o,a=t.priorSignature,u=t.signingRegion,s=t.signingService;return Ee(this,void 0,void 0,(function(){var e,t,o,c,l,f,d,p,h,v,y;return xe(this,(function(b){switch(b.label){case 0:return null==u?[3,1]:(t=u,[3,3]);case 1:return[4,this.regionProvider()];case 2:t=b.sent(),b.label=3;case 3:return e=t,o=tt(i),c=o.shortDate,l=o.longDate,f=Ge(c,e,null!=s?s:this.service),[4,Ye({headers:{},body:r},this.sha256)];case 4:return d=b.sent(),(p=new this.sha256).update(n),v=Re,[4,p.digest()];case 5:return h=v.apply(void 0,[b.sent()]),y=[ze,l,f,a,h,d].join("\n"),[2,this.signString(y,{signingDate:i,signingRegion:e,signingService:s})]}}))}))},e.prototype.signString=function(e,t){var n=void 0===t?{}:t,r=n.signingDate,o=void 0===r?new Date:r,i=n.signingRegion,a=n.signingService;return Ee(this,void 0,void 0,(function(){var t,n,r,u,s,c,l,f;return xe(this,(function(d){switch(d.label){case 0:return[4,this.credentialProvider()];case 1:return t=d.sent(),null==i?[3,2]:(r=i,[3,4]);case 2:return[4,this.regionProvider()];case 3:r=d.sent(),d.label=4;case 4:return n=r,u=tt(o).shortDate,l=(c=this.sha256).bind,[4,this.getSigningKey(t,n,u,a)];case 5:return(s=new(l.apply(c,[void 0,d.sent()]))).update(e),f=Re,[4,s.digest()];case 6:return[2,f.apply(void 0,[d.sent()])]}}))}))},e.prototype.signRequest=function(e,t){var n=void 0===t?{}:t,r=n.signingDate,o=void 0===r?new Date:r,i=n.signableHeaders,a=n.unsignableHeaders,u=n.signingRegion,s=n.signingService;return Ee(this,void 0,void 0,(function(){var t,n,r,c,l,f,d,p,h,v,y;return xe(this,(function(b){switch(b.label){case 0:return[4,this.credentialProvider()];case 1:return t=b.sent(),null==u?[3,2]:(r=u,[3,4]);case 2:return[4,this.regionProvider()];case 3:r=b.sent(),b.label=4;case 4:return n=r,c=Je(e),l=tt(o),f=l.longDate,d=l.shortDate,p=Ge(d,n,null!=s?s:this.service),c.headers[ke]=f,t.sessionToken&&(c.headers[Ue]=t.sessionToken),[4,Ye(c,this.sha256)];case 5:return h=b.sent(),!function(e,t){var n,r;e=e.toLowerCase();try{for(var o=Ae(Object.keys(t)),i=o.next();!i.done;i=o.next()){if(e===i.value.toLowerCase())return!0}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}("x-amz-content-sha256",c.headers)&&this.applyChecksum&&(c.headers["x-amz-content-sha256"]=h),v=$e(c,a,i),[4,this.getSignature(f,p,this.getSigningKey(t,n,d,s),this.createCanonicalRequest(c,v,h))];case 6:return y=b.sent(),c.headers.authorization="AWS4-HMAC-SHA256 Credential="+t.accessKeyId+"/"+p+", SignedHeaders="+nt(v)+", Signature="+y,[2,c]}}))}))},e.prototype.createCanonicalRequest=function(e,t,n){var r=Object.keys(t).sort();return e.method+"\n"+this.getCanonicalPath(e)+"\n"+function(e){var t,n,r=e.query,o=void 0===r?{}:r,i=[],a={},u=function(e){if(e.toLowerCase()===De)return"continue";i.push(e);var t=o[e];"string"==typeof t?a[e]=We(e)+"="+We(t):Array.isArray(t)&&(a[e]=t.slice(0).sort().reduce((function(t,n){return t.concat([We(e)+"="+We(n)])}),[]).join("&"))};try{for(var s=Ae(Object.keys(o).sort()),c=s.next();!c.done;c=s.next()){u(c.value)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return i.map((function(e){return a[e]})).filter((function(e){return e})).join("&")}(e)+"\n"+r.map((function(e){return e+":"+t[e]})).join("\n")+"\n\n"+r.join(";")+"\n"+n},e.prototype.createStringToSign=function(e,t,n){return Ee(this,void 0,void 0,(function(){var r,o;return xe(this,(function(i){switch(i.label){case 0:return(r=new this.sha256).update(n),[4,r.digest()];case 1:return o=i.sent(),[2,"AWS4-HMAC-SHA256\n"+e+"\n"+t+"\n"+Re(o)]}}))}))},e.prototype.getCanonicalPath=function(e){var t=e.path;return this.uriEscapePath?"/"+encodeURIComponent(t.replace(/^\//,"")).replace(/%2F/g,"/"):t},e.prototype.getSignature=function(e,t,n,r){return Ee(this,void 0,void 0,(function(){var o,i,a,u,s;return xe(this,(function(c){switch(c.label){case 0:return[4,this.createStringToSign(e,t,r)];case 1:return o=c.sent(),u=(a=this.sha256).bind,[4,n];case 2:return(i=new(u.apply(a,[void 0,c.sent()]))).update(o),s=Re,[4,i.digest()];case 3:return[2,s.apply(void 0,[c.sent()])]}}))}))},e.prototype.getSigningKey=function(e,t,n,r){return function(e,t,n,r,o){return Ee(void 0,void 0,void 0,(function(){var i,a,u,s,c,l,f,d,p;return xe(this,(function(h){switch(h.label){case 0:return[4,Ve(e,t.secretAccessKey,t.accessKeyId)];case 1:if(i=h.sent(),(a=n+":"+r+":"+o+":"+Re(i)+":"+t.sessionToken)in qe)return[2,qe[a]];for(He.push(a);He.length>50;)delete qe[He.shift()];u="AWS4"+t.secretAccessKey,h.label=2;case 2:h.trys.push([2,7,8,9]),s=Ae([n,r,o,"aws4_request"]),c=s.next(),h.label=3;case 3:return c.done?[3,6]:(l=c.value,[4,Ve(e,u,l)]);case 4:u=h.sent(),h.label=5;case 5:return c=s.next(),[3,3];case 6:return[3,9];case 7:return f=h.sent(),d={error:f},[3,9];case 8:try{c&&!c.done&&(p=s.return)&&p.call(s)}finally{if(d)throw d.error}return[7];case 9:return[2,qe[a]=u]}}))}))}(this.sha256,e,n,t,r||this.service)},e}(),tt=function(e){var t=Qe(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.substr(0,8)}},nt=function(e){return Object.keys(e).sort().join(";")},rt=function(e){if("string"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e},ot=function(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e};function it(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e}var at=function(e){return new Date(Date.now()+e)};function ut(e){return function(t,n){return function(r){return Ee(this,void 0,void 0,(function(){var o,i,a,u,s,c,l,f,p;return xe(this,(function(h){switch(h.label){case 0:return d.a.isInstance(r.request)?"function"!=typeof e.signer?[3,2]:[4,e.signer()]:[2,t(r)];case 1:return i=h.sent(),[3,3];case 2:i=e.signer,h.label=3;case 3:return o=i,u=t,s=[je({},r)],p={},[4,o.sign(r.request,{signingDate:new Date(Date.now()+e.systemClockOffset),signingRegion:n.signing_region,signingService:n.signing_service})];case 4:return[4,u.apply(void 0,[je.apply(void 0,s.concat([(p.request=h.sent(),p)]))])];case 5:return a=h.sent(),c=a.response.headers,(l=c&&(c.date||c.Date))&&(f=Date.parse(l),v=f,y=e.systemClockOffset,Math.abs(at(y).getTime()-v)>=3e5&&(e.systemClockOffset=f-Date.now())),[2,a]}var v,y}))}))}}}var st={name:"awsAuthMiddleware",tags:["SIGNATURE","AWSAUTH"],relation:"after",toMiddleware:"retryMiddleware",override:!0};var ct=function(){return(ct=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function lt(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function ft(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function dt(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function pt(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(dt(arguments[t]));return e}var ht,vt,yt,bt,mt,gt,wt,Ot,St,_t,jt,Et,xt,At,Tt,Pt,Ct,Mt,It,Rt,kt,Lt,Dt,Ut,Bt,Nt,Ft,zt,qt,Ht,Gt,Vt,$t,Wt,Kt,Yt,Zt,Xt=/[^\!\#\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Jt=function(e){var t=dt(e,2),n=t[0],r=t[1],o=n.indexOf("/"),i=n.substring(0,o),a=n.substring(o+1);return"api"===i&&(a=a.toLowerCase()),[i,a,r].filter((function(e){return e&&e.length>0})).map((function(e){return null==e?void 0:e.replace(Xt,"_")})).join("/")},Qt={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},en=function(e){return{applyToStack:function(t){var n;t.add((n=e,function(e,t){return function(r){return lt(void 0,void 0,void 0,(function(){var o,i,a,u,s,c,l,f;return ft(this,(function(p){switch(p.label){case 0:return o=r.request,d.a.isInstance(o)?(i=o.headers,a=(null===(l=null==t?void 0:t.userAgent)||void 0===l?void 0:l.map(Jt))||[],[4,n.defaultUserAgentProvider()]):[2,e(r)];case 1:return u=p.sent().map(Jt),s=(null===(f=null==n?void 0:n.customUserAgent)||void 0===f?void 0:f.map(Jt))||[],i["x-amz-user-agent"]=pt(u,a,s).join(" "),c=pt(u.filter((function(e){return e.startsWith("aws-sdk-")})),s).join(" "),"browser"!==n.runtime&&c&&(i["user-agent"]=i["user-agent"]?i["user-agent"]+" "+c:c),[2,e(ct(ct({},r),{request:o}))]}}))}))}}),Qt)}}},tn=n(1),nn=function(e){function t(t){var n,o,i,a=this,u=function(e){var t,n=this,r=it(e.credentials||e.credentialDefaultProvider(e)),o=e.signingEscapePath,i=void 0===o||o,a=e.systemClockOffset,u=void 0===a?e.systemClockOffset||0:a,s=e.sha256;return t=e.signer?it(e.signer):function(){return it(e.region)().then((function(t){return Ee(n,void 0,void 0,(function(){return xe(this,(function(n){switch(n.label){case 0:return[4,e.regionInfoProvider(t)];case 1:return[2,[n.sent()||{},t]]}}))}))})).then((function(t){var n=Te(t,2),o=n[0],a=n[1],u=o.signingRegion,c=o.signingService;return e.signingRegion=e.signingRegion||u||a,e.signingName=e.signingName||c||e.serviceId,new et({credentials:r,region:e.signingRegion,service:e.signingName,sha256:s,uriEscapePath:i})}))},je(je({},e),{systemClockOffset:u,signingEscapePath:i,credentials:r,signer:t})}(function(e){var t;return ie(ie({},e),{tls:null===(t=e.tls)||void 0===t||t,endpoint:e.endpoint?se(e):function(){return ce(e)},isCustomEndpoint:!!e.endpoint})}(function(e){if(!e.region)throw new Error("Region is missing");return ie(ie({},e),{region:le(e.region)})}(Object(r.a)(Object(r.a)({},oe),t)))),s=function(e){return ct(ct({},e),{customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent})}((o=z((n=u).maxAttempts),x(x({},n),{maxAttempts:o,retryStrategy:n.retryStrategy||new F(o)})));return(a=e.call(this,s)||this).config=s,a.middlewareStack.use((i=a.config,{applyToStack:function(e){e.addRelativeTo(ut(i),st)}})),a.middlewareStack.use(function(e){return{applyToStack:function(t){t.add(C(e),M)}}}(a.config)),a.middlewareStack.use(ve(a.config)),a.middlewareStack.use(ge(a.config)),a.middlewareStack.use((a.config,{applyToStack:function(e){e.add(Se(),_e)}})),a.middlewareStack.use(en(a.config)),a}return Object(r.f)(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(tn.a);(ht||(ht={})).filterSensitiveLog=function(e){return Object(r.a)({},e)},(vt||(vt={})).filterSensitiveLog=function(e){return Object(r.a)(Object(r.a)({},e),e.parameters&&{parameters:tn.d})},(yt||(yt={})).filterSensitiveLog=function(e){return Object(r.a)({},e)},(bt||(bt={})).filterSensitiveLog=function(e){return Object(r.a)({},e)},(mt||(mt={})).filterSensitiveLog=function(e){return Object(r.a)({},e)},(gt||(gt={})).filterSensitiveLog=function(e){return Object(r.a)({},e)},(wt||(wt={})).filterSensitiveLog=function(e){return Object(r.a)({},e)},(Ot||(Ot={})).filterSensitiveLog=function(e){return Object(r.a)({},e)},(St||(St={})).filterSensitiveLog=function(e){return Object(r.a)({},e)},(_t||(_t={})).filterSensitiveLog=function(e){return Object(r.a)({},e)},function(e){e.FAILED="Failed",e.FULFILLED="Fulfilled",e.READY_FOR_FULFILLMENT="ReadyForFulfillment"}(jt||(jt={})),function(e){e.COMPOSITE="Composite",e.CUSTOM_PAYLOAD="CustomPayload",e.PLAIN_TEXT="PlainText",e.SSML="SSML"}(Et||(Et={})),function(e){e.CLOSE="Close",e.CONFIRM_INTENT="ConfirmIntent",e.DELEGATE="Delegate",e.ELICIT_INTENT="ElicitIntent",e.ELICIT_SLOT="ElicitSlot"}(xt||(xt={})),(At||(At={})).filterSensitiveLog=function(e){return Object(r.a)(Object(r.a)(Object(r.a)({},e),e.slots&&{slots:tn.d}),e.message&&{message:tn.d})},function(e){e.CONFIRMED="Confirmed",e.DENIED="Denied",e.NONE="None"}(Tt||(Tt={})),(Pt||(Pt={})).filterSensitiveLog=function(e){return Object(r.a)(Object(r.a)({},e),e.slots&&{slots:tn.d})},(Ct||(Ct={})).filterSensitiveLog=function(e){return Object(r.a)(Object(r.a)(Object(r.a)(Object(r.a)(Object(r.a)({},e),e.recentIntentSummaryView&&{recentIntentSummaryView:e.recentIntentSummaryView.map((function(e){return Pt.filterSensitiveLog(e)}))}),e.sessionAttributes&&{sessionAttributes:tn.d}),e.dialogAction&&{dialogAction:At.filterSensitiveLog(e.dialogAction)}),e.activeContexts&&{activeContexts:tn.d})},(Mt||(Mt={})).filterSensitiveLog=function(e){return Object(r.a)({},e)},(It||(It={})).filterSensitiveLog=function(e){return Object(r.a)({},e)},(Rt||(Rt={})).filterSensitiveLog=function(e){return Object(r.a)({},e)},(kt||(kt={})).filterSensitiveLog=function(e){return Object(r.a)({},e)},(Lt||(Lt={})).filterSensitiveLog=function(e){return Object(r.a)(Object(r.a)(Object(r.a)(Object(r.a)({},e),e.sessionAttributes&&{sessionAttributes:tn.d}),e.requestAttributes&&{requestAttributes:tn.d}),e.activeContexts&&{activeContexts:tn.d})},function(e){e.CONFIRM_INTENT="ConfirmIntent",e.ELICIT_INTENT="ElicitIntent",e.ELICIT_SLOT="ElicitSlot",e.FAILED="Failed",e.FULFILLED="Fulfilled",e.READY_FOR_FULFILLMENT="ReadyForFulfillment"}(Dt||(Dt={})),(Ut||(Ut={})).filterSensitiveLog=function(e){return Object(r.a)(Object(r.a)(Object(r.a)({},e),e.message&&{message:tn.d}),e.activeContexts&&{activeContexts:tn.d})},(Bt||(Bt={})).filterSensitiveLog=function(e){return Object(r.a)({},e)},(Nt||(Nt={})).filterSensitiveLog=function(e){return Object(r.a)({},e)},(Ft||(Ft={})).filterSensitiveLog=function(e){return Object(r.a)(Object(r.a)(Object(r.a)(Object(r.a)(Object(r.a)({},e),e.sessionAttributes&&{sessionAttributes:tn.d}),e.requestAttributes&&{requestAttributes:tn.d}),e.inputText&&{inputText:tn.d}),e.activeContexts&&{activeContexts:tn.d})},(zt||(zt={})).filterSensitiveLog=function(e){return Object(r.a)({},e)},(qt||(qt={})).filterSensitiveLog=function(e){return Object(r.a)(Object(r.a)({},e),e.slots&&{slots:tn.d})},function(e){e.GENERIC="application/vnd.amazonaws.card.generic"}(Ht||(Ht={})),(Gt||(Gt={})).filterSensitiveLog=function(e){return Object(r.a)({},e)},(Vt||(Vt={})).filterSensitiveLog=function(e){return Object(r.a)({},e)},($t||($t={})).filterSensitiveLog=function(e){return Object(r.a)({},e)},(Wt||(Wt={})).filterSensitiveLog=function(e){return Object(r.a)({},e)},(Kt||(Kt={})).filterSensitiveLog=function(e){return Object(r.a)(Object(r.a)(Object(r.a)(Object(r.a)(Object(r.a)(Object(r.a)({},e),e.alternativeIntents&&{alternativeIntents:e.alternativeIntents.map((function(e){return qt.filterSensitiveLog(e)}))}),e.slots&&{slots:tn.d}),e.sessionAttributes&&{sessionAttributes:tn.d}),e.message&&{message:tn.d}),e.activeContexts&&{activeContexts:tn.d})},(Yt||(Yt={})).filterSensitiveLog=function(e){return Object(r.a)(Object(r.a)(Object(r.a)(Object(r.a)(Object(r.a)({},e),e.sessionAttributes&&{sessionAttributes:tn.d}),e.dialogAction&&{dialogAction:At.filterSensitiveLog(e.dialogAction)}),e.recentIntentSummaryView&&{recentIntentSummaryView:e.recentIntentSummaryView.map((function(e){return Pt.filterSensitiveLog(e)}))}),e.activeContexts&&{activeContexts:tn.d})},(Zt||(Zt={})).filterSensitiveLog=function(e){return Object(r.a)(Object(r.a)(Object(r.a)({},e),e.message&&{message:tn.d}),e.activeContexts&&{activeContexts:tn.d})};var rn=n(6);
|
|
173
|
+
/*! *****************************************************************************
|
|
174
|
+
Copyright (c) Microsoft Corporation.
|
|
175
|
+
|
|
176
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
177
|
+
purpose with or without fee is hereby granted.
|
|
178
|
+
|
|
179
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
180
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
181
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
182
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
183
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
184
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
185
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
186
|
+
***************************************************************************** */var on=function(){return(on=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function an(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function un(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var sn={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},cn={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function ln(e,t,n){return{applyToStack:function(r){r.add(function(e,t){return function(n,r){return function(r){return an(void 0,void 0,void 0,(function(){var o,i;return un(this,(function(a){switch(a.label){case 0:return[4,n(r)];case 1:return o=a.sent().response,[4,t(o,e)];case 2:return i=a.sent(),[2,{response:o,output:i}]}}))}))}}}(e,n),sn),r.add(function(e,t){return function(n,r){return function(r){return an(void 0,void 0,void 0,(function(){var o;return un(this,(function(i){switch(i.label){case 0:return[4,t(r.input,e)];case 1:return o=i.sent(),[2,n(on(on({},r),{request:o}))]}}))}))}}}(e,t),cn)}}}var fn=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return Object(r.f)(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(ln(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"LexRuntimeServiceClient",commandName:"PostTextCommand",inputFilterSensitiveLog:Ft.filterSensitiveLog,outputFilterSensitiveLog:Kt.filterSensitiveLog},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return Object(rn.d)(e,t)},t.prototype.deserialize=function(e,t){return Object(rn.b)(e,t)},t}(tn.b),dn=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return Object(r.f)(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(ln(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"LexRuntimeServiceClient",commandName:"PostContentCommand",inputFilterSensitiveLog:Lt.filterSensitiveLog,outputFilterSensitiveLog:Ut.filterSensitiveLog},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return Object(rn.c)(e,t)},t.prototype.deserialize=function(e,t){return Object(rn.a)(e,t)},t}(tn.b),pn={},hn=Uint8Array,vn=Uint16Array,yn=Uint32Array,bn=new hn([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),mn=new hn([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),gn=new hn([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),wn=function(e,t){for(var n=new vn(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var o=new yn(n[30]);for(r=1;r<30;++r)for(var i=n[r];i<n[r+1];++i)o[i]=i-n[r]<<5|r;return[n,o]},On=wn(bn,2),Sn=On[0],_n=On[1];Sn[28]=258,_n[258]=28;for(var jn=wn(mn,0),En=jn[0],xn=(jn[1],new vn(32768)),An=0;An<32768;++An){var Tn=(43690&An)>>>1|(21845&An)<<1;Tn=(61680&(Tn=(52428&Tn)>>>2|(13107&Tn)<<2))>>>4|(3855&Tn)<<4,xn[An]=((65280&Tn)>>>8|(255&Tn)<<8)>>>1}var Pn=function(e,t,n){for(var r=e.length,o=0,i=new vn(t);o<r;++o)e[o]&&++i[e[o]-1];var a,u=new vn(t);for(o=0;o<t;++o)u[o]=u[o-1]+i[o-1]<<1;if(n){a=new vn(1<<t);var s=15-t;for(o=0;o<r;++o)if(e[o])for(var c=o<<4|e[o],l=t-e[o],f=u[e[o]-1]++<<l,d=f|(1<<l)-1;f<=d;++f)a[xn[f]>>>s]=c}else for(a=new vn(r),o=0;o<r;++o)e[o]&&(a[o]=xn[u[e[o]-1]++]>>>15-e[o]);return a},Cn=new hn(288);for(An=0;An<144;++An)Cn[An]=8;for(An=144;An<256;++An)Cn[An]=9;for(An=256;An<280;++An)Cn[An]=7;for(An=280;An<288;++An)Cn[An]=8;var Mn=new hn(32);for(An=0;An<32;++An)Mn[An]=5;var In=Pn(Cn,9,1),Rn=Pn(Mn,5,1),kn=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},Ln=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n},Dn=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},Un=function(e){return(e+7)/8|0},Bn=function(e,t,n){(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);var r=new(2==e.BYTES_PER_ELEMENT?vn:4==e.BYTES_PER_ELEMENT?yn:hn)(n-t);return r.set(e.subarray(t,n)),r},Nn=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Fn=function(e,t,n){var r=new Error(t||Nn[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,Fn),!n)throw r;return r},zn=function(e,t,n){var r=e.length;if(!r||n&&n.f&&!n.l)return t||new hn(0);var o=!t||n,i=!n||n.i;n||(n={}),t||(t=new hn(3*r));var a=function(e){var n=t.length;if(e>n){var r=new hn(Math.max(2*n,e));r.set(t),t=r}},u=n.f||0,s=n.p||0,c=n.b||0,l=n.l,f=n.d,d=n.m,p=n.n,h=8*r;do{if(!l){u=Ln(e,s,1);var v=Ln(e,s+1,3);if(s+=3,!v){var y=e[(A=Un(s)+4)-4]|e[A-3]<<8,b=A+y;if(b>r){i&&Fn(0);break}o&&a(c+y),t.set(e.subarray(A,b),c),n.b=c+=y,n.p=s=8*b,n.f=u;continue}if(1==v)l=In,f=Rn,d=9,p=5;else if(2==v){var m=Ln(e,s,31)+257,g=Ln(e,s+10,15)+4,w=m+Ln(e,s+5,31)+1;s+=14;for(var O=new hn(w),S=new hn(19),_=0;_<g;++_)S[gn[_]]=Ln(e,s+3*_,7);s+=3*g;var j=kn(S),E=(1<<j)-1,x=Pn(S,j,1);for(_=0;_<w;){var A,T=x[Ln(e,s,E)];if(s+=15&T,(A=T>>>4)<16)O[_++]=A;else{var P=0,C=0;for(16==A?(C=3+Ln(e,s,3),s+=2,P=O[_-1]):17==A?(C=3+Ln(e,s,7),s+=3):18==A&&(C=11+Ln(e,s,127),s+=7);C--;)O[_++]=P}}var M=O.subarray(0,m),I=O.subarray(m);d=kn(M),p=kn(I),l=Pn(M,d,1),f=Pn(I,p,1)}else Fn(1);if(s>h){i&&Fn(0);break}}o&&a(c+131072);for(var R=(1<<d)-1,k=(1<<p)-1,L=s;;L=s){var D=(P=l[Dn(e,s)&R])>>>4;if((s+=15&P)>h){i&&Fn(0);break}if(P||Fn(2),D<256)t[c++]=D;else{if(256==D){L=s,l=null;break}var U=D-254;if(D>264){var B=bn[_=D-257];U=Ln(e,s,(1<<B)-1)+Sn[_],s+=B}var N=f[Dn(e,s)&k],F=N>>>4;N||Fn(3),s+=15&N;I=En[F];if(F>3){B=mn[F];I+=Dn(e,s)&(1<<B)-1,s+=B}if(s>h){i&&Fn(0);break}o&&a(c+131072);for(var z=c+U;c<z;c+=4)t[c]=t[c-I],t[c+1]=t[c+1-I],t[c+2]=t[c+2-I],t[c+3]=t[c+3-I];c=z}}n.l=l,n.p=L,n.b=c,n.f=u,l&&(u=1,n.m=d,n.d=f,n.n=p)}while(!u);return c==t.length?t:Bn(t,0,c)},qn=new hn(0),Hn=function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n},Gn=function(e,t,n){for(var r=e(),o=e.toString(),i=o.slice(o.indexOf("[")+1,o.lastIndexOf("]")).replace(/\s+/g,"").split(","),a=0;a<r.length;++a){var u=r[a],s=i[a];if("function"==typeof u){t+=";"+s+"=";var c=u.toString();if(u.prototype)if(-1!=c.indexOf("[native code]")){var l=c.indexOf(" ",8)+1;t+=c.slice(l,c.indexOf("(",l))}else for(var f in t+=c,u.prototype)t+=";"+s+".prototype."+f+"="+u.prototype[f].toString();else t+=c}else n[s]=u}return[t,n]},Vn=[],$n=function(e,t,n,r){var o;if(!Vn[n]){for(var i="",a={},u=e.length-1,s=0;s<u;++s)i=(o=Gn(e[s],i,a))[0],a=o[1];Vn[n]=Gn(e[u],i,a)}var c=Hn({},Vn[n][1]);return function(e,t,n,r,o){var i=new Worker(pn[t]||(pn[t]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return i.onmessage=function(e){var t=e.data,n=t.$e$;if(n){var r=new Error(n[0]);r.code=n[1],r.stack=n[2],o(r,null)}else o(null,t)},i.postMessage(n,r),i}(Vn[n][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",n,c,function(e){var t=[];for(var n in e)e[n].buffer&&t.push((e[n]=new e[n].constructor(e[n])).buffer);return t}(c),r)},Wn=function(){return[hn,vn,yn,bn,mn,gn,Sn,En,In,Rn,xn,Nn,Pn,kn,Ln,Dn,Un,Bn,Fn,zn,er,Yn,Zn]},Kn=function(){return[Jn,Qn]},Yn=function(e){return postMessage(e,[e.buffer])},Zn=function(e){return e&&e.size&&new hn(e.size)},Xn=function(e,t,n,r,o,i){var a=$n(n,r,o,(function(e,t){a.terminate(),i(e,t)}));return a.postMessage([e,t],t.consume?[e.buffer]:[]),function(){a.terminate()}},Jn=function(e){31==e[0]&&139==e[1]&&8==e[2]||Fn(6,"invalid gzip data");var t=e[3],n=10;4&t&&(n+=e[10]|2+(e[11]<<8));for(var r=(t>>3&1)+(t>>4&1);r>0;r-=!e[n++]);return n+(2&t)},Qn=function(e){var t=e.length;return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0};function er(e,t){return zn(e,t)}function tr(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&Fn(7),Xn(e,t,[Wn,Kn,function(){return[nr]}],(function(e){return Yn(nr(e.data[0]))}),3,n)}function nr(e,t){return zn(e.subarray(Jn(e),-8),t||new hn(Qn(e)))}var rr="undefined"!=typeof TextDecoder&&new TextDecoder;try{rr.decode(qn,{stream:!0}),1}catch(e){}var or=function(e){for(var t="",n=0;;){var r=e[n++],o=(r>127)+(r>223)+(r>239);if(n+o>e.length)return[t,Bn(e,n-1)];o?3==o?(r=((15&r)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536,t+=String.fromCharCode(55296|r>>10,56320|1023&r)):t+=1&o?String.fromCharCode((31&r)<<6|63&e[n++]):String.fromCharCode((15&r)<<12|(63&e[n++])<<6|63&e[n++]):t+=String.fromCharCode(r)}};function ir(e,t){if(t){for(var n="",r=0;r<e.length;r+=16384)n+=String.fromCharCode.apply(null,e.subarray(r,r+16384));return n}if(rr)return rr.decode(e);var o=or(e),i=o[0];return o[1].length&&Fn(8),i}"function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout&&setTimeout;var ar=function(e){return Object(r.e)(void 0,void 0,void 0,(function(){return Object(r.g)(this,(function(t){return e instanceof Blob||e instanceof ReadableStream?[2,new Response(e).arrayBuffer().then((function(e){return new Uint8Array(e)}))]:[2,Promise.reject("Invalid content type")]}))}))};function ur(e){return(ur="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var sr,cr=new o.ConsoleLogger("AWSLexProvider"),lr=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n._botsCompleteCallback={},n}return Object(r.f)(t,e),t.prototype.getProviderName=function(){return"AWSLexProvider"},t.prototype.configure=function(t){void 0===t&&(t={});var n=["name","alias","region"];return Object.keys(t).forEach((function(e){var r=t[e];if(!n.every((function(e){return e in r})))throw new Error("invalid bot configuration")})),e.prototype.configure.call(this,t)},t.prototype.reportBotStatus=function(e,t){var n=this;cr.debug("postContent state",e.dialogState),"ReadyForFulfillment"!==e.dialogState&&"Fulfilled"!==e.dialogState||("function"==typeof this._botsCompleteCallback[t]&&setTimeout((function(){return n._botsCompleteCallback[t](null,e)}),0),this._config&&"function"==typeof this._config[t].onComplete&&setTimeout((function(){return n._config[t].onComplete(null,e)}),0)),"Failed"===e.dialogState&&("function"==typeof this._botsCompleteCallback[t]&&setTimeout((function(){return n._botsCompleteCallback[t]("Bot conversation failed")}),0),this._config&&"function"==typeof this._config[t].onComplete&&setTimeout((function(){return n._config[t].onComplete("Bot conversation failed")}),0))},t.prototype.sendMessage=function(e,t){return Object(r.e)(this,void 0,void 0,(function(){var n,i,a,u,s,c,l,f,d,p,h,v,y;return Object(r.g)(this,(function(b){switch(b.label){case 0:if(!this._config[e])return[2,Promise.reject("Bot "+e+" does not exist")];b.label=1;case 1:return b.trys.push([1,3,,4]),[4,o.Credentials.get()];case 2:return n=b.sent(),[3,4];case 3:return b.sent(),[2,Promise.reject("No credentials")];case 4:if(this.lexRuntimeServiceClient=new nn({region:this._config[e].region,credentials:n,customUserAgent:Object(o.getAmplifyUserAgent)()}),"string"!=typeof t)return[3,9];i={botAlias:this._config[e].alias,botName:e,inputText:t,userId:n.identityId},cr.debug("postText to lex",t),b.label=5;case 5:return b.trys.push([5,7,,8]),a=new fn(i),[4,this.lexRuntimeServiceClient.send(a)];case 6:return d=b.sent(),this.reportBotStatus(d,e),[2,d];case 7:return u=b.sent(),[2,Promise.reject(u)];case 8:return[3,21];case 9:return s=t.content,"voice"!==t.options.messageType?[3,13]:"object"!==ur(s)?[2,Promise.reject("invalid content type")]:s instanceof Uint8Array?(l=s,[3,12]):[3,10];case 10:return[4,ar(s)];case 11:l=b.sent(),b.label=12;case 12:return c=l,i={botAlias:this._config[e].alias,botName:e,contentType:"audio/x-l16; sample-rate=16000; channel-count=1",userId:n.identityId,accept:"audio/mpeg",inputStream:c},[3,14];case 13:if("string"!=typeof s)return[2,Promise.reject("invalid content type")];i={botAlias:this._config[e].alias,botName:e,contentType:"text/plain; charset=utf-8",inputStream:s,userId:n.identityId,accept:"audio/mpeg"},b.label=14;case 14:cr.debug("postContent to lex",t),b.label=15;case 15:return b.trys.push([15,20,,21]),f=new dn(i),[4,this.lexRuntimeServiceClient.send(f)];case 16:return(d=b.sent()).audioStream?[4,ar(d.audioStream)]:[3,18];case 17:return h=b.sent(),[3,19];case 18:h=void 0,b.label=19;case 19:return p=h,v=Object(r.a)(Object(r.a)({},d),{audioStream:p}),this.reportBotStatus(v,e),[2,v];case 20:return y=b.sent(),[2,Promise.reject(y)];case 21:return[2]}}))}))},t.prototype.onComplete=function(e,t){if(!this._config[e])throw new Error("Bot "+e+" does not exist");this._botsCompleteCallback[e]=t},t}(a),fr=new o.ConsoleLogger("Interactions"),dr=new(function(){function e(e){void 0===e&&(e={}),this._options=e,fr.debug("Interactions Options",this._options),this._pluggables={}}return e.prototype.getModuleName=function(){return"Interactions"},e.prototype.configure=function(e){var t=this,n=e?e.Interactions||e:{};fr.debug("configure Interactions",{opt:n}),this._options=Object(r.a)(Object(r.a)({bots:{}},n),n.Interactions);var o=this._options.aws_bots_config,i=this._options.bots;return!Object.keys(i).length&&o&&Array.isArray(o)&&o.forEach((function(e){t._options.bots[e.name]=e})),Object.keys(i).forEach((function(e){var n,r=i[e],o=r.providerName||"AWSLexProvider";t._pluggables.AWSLexProvider||"AWSLexProvider"!==o||(t._pluggables.AWSLexProvider=new lr),t._pluggables[o]?t._pluggables[o].configure(((n={})[r.name]=r,n)):fr.debug("bot "+r.name+" was not configured as "+o+" provider was not found")})),this._options},e.prototype.addPluggable=function(e){var t=this;if(e&&"Interactions"===e.getCategory()){if(this._pluggables[e.getProviderName()])throw new Error("Pluggable "+e.getProviderName()+" already plugged");return Object.keys(this._options.bots).filter((function(n){return t._options.bots[n].providerName===e.getProviderName()})).forEach((function(n){var r,o=t._options.bots[n];e.configure(((r={})[o.name]=o,r))})),void(this._pluggables[e.getProviderName()]=e)}},e.prototype.send=function(e,t){return Object(r.e)(this,void 0,void 0,(function(){var n;return Object(r.g)(this,(function(r){switch(r.label){case 0:return this._options.bots&&this._options.bots[e]?(n=this._options.bots[e].providerName||"AWSLexProvider",this._pluggables[n]?[4,this._pluggables[n].sendMessage(e,t)]:[2,Promise.reject("Bot "+n+" does not have valid pluggin did you try addPluggable first?")]):[2,Promise.reject("Bot "+e+" does not exist")];case 1:return[2,r.sent()]}}))}))},e.prototype.onComplete=function(e,t){if(!this._options.bots||!this._options.bots[e])throw new Error("Bot "+e+" does not exist");var n=this._options.bots[e].providerName||"AWSLexProvider";if(!this._pluggables[n])throw new Error("Bot "+n+" does not have valid pluggin did you try addPluggable first?");this._pluggables[n].onComplete(e,t)},e}());o.Amplify.register(dr),function(e){e.ENV="env",e.CONFIG="shared config entry"}(sr||(sr={}));var pr=function(e){if("function"==typeof e)return e;var t=Promise.resolve(e);return function(){return t}},hr=function(e){var t,n=pr(e.useDualstackEndpoint),o=e.endpoint,i=e.useFipsEndpoint,a=e.urlParser;return Object(r.a)(Object(r.a)({},e),{tls:null===(t=e.tls)||void 0===t||t,endpoint:o?pr("string"==typeof o?a(o):o):function(){return function(e){return Object(r.e)(void 0,void 0,void 0,(function(){var t,n,o,i,a,u,s;return Object(r.g)(this,(function(r){switch(r.label){case 0:return t=e.tls,n=void 0===t||t,[4,e.region()];case 1:if(o=r.sent(),!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(o))throw new Error("Invalid region in client config");return[4,e.useDualstackEndpoint()];case 2:return i=r.sent(),[4,e.useFipsEndpoint()];case 3:return a=r.sent(),[4,e.regionInfoProvider(o,{useDualstackEndpoint:i,useFipsEndpoint:a})];case 4:if(!(u=(null!==(s=r.sent())&&void 0!==s?s:{}).hostname))throw new Error("Cannot resolve hostname from client config");return[2,e.urlParser("".concat(n?"https:":"http:","//").concat(u))]}}))}))}(Object(r.a)(Object(r.a)({},e),{useDualstackEndpoint:n,useFipsEndpoint:i}))},isCustomEndpoint:!!o,useDualstackEndpoint:n})},vr=function(e){return"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips"))},yr=function(e){return vr(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e},br=function(e,t){var n;void 0===e&&(e=[]);var r=t.useFipsEndpoint,o=t.useDualstackEndpoint;return null===(n=e.find((function(e){var t=e.tags;return r===t.includes("fips")&&o===t.includes("dualstack")})))||void 0===n?void 0:n.hostname},mr=function(e,t){var n,o,i,a,u,s,c=t.useFipsEndpoint,l=void 0!==c&&c,f=t.useDualstackEndpoint,d=void 0!==f&&f,p=t.signingService,h=t.regionHash,v=t.partitionHash,y=function(e,t){var n,r=t.partitionHash;return null!==(n=Object.keys(r||{}).find((function(t){return r[t].regions.includes(e)})))&&void 0!==n?n:"aws"}(e,{partitionHash:v}),b=e in h?e:null!==(o=null===(n=v[y])||void 0===n?void 0:n.endpoint)&&void 0!==o?o:e,m={useFipsEndpoint:l,useDualstackEndpoint:d},g=function(e,t){var n=t.regionHostname,r=t.partitionHostname;return n||(r?r.replace("{region}",e):void 0)}(b,{regionHostname:br(null===(i=h[b])||void 0===i?void 0:i.variants,m),partitionHostname:br(null===(a=v[y])||void 0===a?void 0:a.variants,m)});if(void 0===g)throw new Error("Endpoint resolution failed for: ".concat({resolvedRegion:b,useFipsEndpoint:l,useDualstackEndpoint:d}));var w=function(e,t){var n=t.signingRegion,r=t.regionRegex,o=t.useFipsEndpoint;if(n)return n;if(o){var i=r.replace("\\\\","\\").replace(/^\^/g,"\\.").replace(/\$$/g,"\\."),a=e.match(i);if(a)return a[0].slice(1,-1)}}(g,{signingRegion:null===(u=h[b])||void 0===u?void 0:u.signingRegion,regionRegex:v[y].regionRegex,useFipsEndpoint:l});return Object(r.a)(Object(r.a)({partition:y,signingService:p,hostname:g},w&&{signingRegion:w}),(null===(s=h[b])||void 0===s?void 0:s.signingService)&&{signingService:h[b].signingService})},gr=function(){function e(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?"".concat(e.protocol,":"):e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?"/".concat(e.path):e.path:"/"}return e.isInstance=function(e){if(!e)return!1;var t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers},e.prototype.clone=function(){var t,n=new e(Object(r.a)(Object(r.a)({},this),{headers:Object(r.a)({},this.headers)}));return n.query&&(n.query=(t=n.query,Object.keys(t).reduce((function(e,n){var o,i=t[n];return Object(r.a)(Object(r.a)({},e),((o={})[n]=Array.isArray(i)?Object(r.j)([],Object(r.h)(i),!1):i,o))}),{}))),n},e}();var wr=function(){function e(e){this.statusCode=e.statusCode,this.headers=e.headers||{},this.body=e.body}return e.isInstance=function(e){if(!e)return!1;var t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers},e}();var Or={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Sr=function(e){return{applyToStack:function(t){t.add(function(e){var t=this;return function(n){return function(o){return Object(r.e)(t,void 0,void 0,(function(){var t,i,a,u,s;return Object(r.g)(this,(function(c){if(t=o.request,gr.isInstance(t)&&(i=t.body,a=t.headers,i&&-1===Object.keys(a).map((function(e){return e.toLowerCase()})).indexOf("content-length")))try{u=e(i),t.headers=Object(r.a)(Object(r.a)({},t.headers),((s={})["content-length"]=String(u),s))}catch(e){}return[2,n(Object(r.a)(Object(r.a)({},o),{request:t}))]}))}))}}}(e.bodyLengthChecker),Or)}}};!function(){function e(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?"".concat(e.protocol,":"):e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?"/".concat(e.path):e.path:"/"}e.isInstance=function(e){if(!e)return!1;var t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers},e.prototype.clone=function(){var t,n=new e(Object(r.a)(Object(r.a)({},this),{headers:Object(r.a)({},this.headers)}));return n.query&&(n.query=(t=n.query,Object.keys(t).reduce((function(e,n){var o,i=t[n];return Object(r.a)(Object(r.a)({},e),((o={})[n]=Array.isArray(i)?Object(r.j)([],Object(r.h)(i),!1):i,o))}),{}))),n}}();!function(){function e(e){this.statusCode=e.statusCode,this.headers=e.headers||{},this.body=e.body}e.isInstance=function(e){if(!e)return!1;var t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}();var _r,jr={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Er=function(e){return{applyToStack:function(t){t.add(function(e){return function(t){return function(n){return Object(r.e)(void 0,void 0,void 0,(function(){var o,i;return Object(r.g)(this,(function(r){return gr.isInstance(n.request)?(o=n.request,i=(e.requestHandler.metadata||{}).handlerProtocol,(void 0===i?"":i).indexOf("h2")>=0&&!o.headers[":authority"]?(delete o.headers.host,o.headers[":authority"]=""):o.headers.host||(o.headers.host=o.hostname),[2,t(n)]):[2,t(n)]}))}))}}}(e),jr)}}},xr={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Ar=function(e){return{applyToStack:function(e){e.add((function(e,t){return function(n){return Object(r.e)(void 0,void 0,void 0,(function(){var o,i,a,u,s,c,l,f,d;return Object(r.g)(this,(function(p){switch(p.label){case 0:return o=t.clientName,i=t.commandName,a=t.inputFilterSensitiveLog,u=t.logger,s=t.outputFilterSensitiveLog,[4,e(n)];case 1:return c=p.sent(),u?("function"==typeof u.info&&(l=c.output,f=l.$metadata,d=Object(r.i)(l,["$metadata"]),u.info({clientName:o,commandName:i,input:a(n.input),output:s(d),metadata:f})),[2,c]):[2,c]}}))}))}}),xr)}}},Tr=n(31);!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(_r||(_r={}));var Pr,Cr=_r.STANDARD,Mr=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],Ir=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Rr=["AbortError","TimeoutError","RequestTimeout","RequestTimeoutException"],kr=[500,502,503,504],Lr=function(e){var t,n;return 429===(null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||Ir.includes(e.name)||1==(null===(n=e.$retryable)||void 0===n?void 0:n.throttling)},Dr=function(){function e(e){var t,n,r,o,i;this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=null!==(t=null==e?void 0:e.beta)&&void 0!==t?t:.7,this.minCapacity=null!==(n=null==e?void 0:e.minCapacity)&&void 0!==n?n:1,this.minFillRate=null!==(r=null==e?void 0:e.minFillRate)&&void 0!==r?r:.5,this.scaleConstant=null!==(o=null==e?void 0:e.scaleConstant)&&void 0!==o?o:.4,this.smooth=null!==(i=null==e?void 0:e.smooth)&&void 0!==i?i:.8;var a=this.getCurrentTimeInSeconds();this.lastThrottleTime=a,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}return e.prototype.getCurrentTimeInSeconds=function(){return Date.now()/1e3},e.prototype.getSendToken=function(){return Object(r.e)(this,void 0,void 0,(function(){return Object(r.g)(this,(function(e){return[2,this.acquireTokenBucket(1)]}))}))},e.prototype.acquireTokenBucket=function(e){return Object(r.e)(this,void 0,void 0,(function(){var t;return Object(r.g)(this,(function(n){switch(n.label){case 0:return this.enabled?(this.refillTokenBucket(),e>this.currentCapacity?(t=(e-this.currentCapacity)/this.fillRate*1e3,[4,new Promise((function(e){return setTimeout(e,t)}))]):[3,2]):[2];case 1:n.sent(),n.label=2;case 2:return this.currentCapacity=this.currentCapacity-e,[2]}}))}))},e.prototype.refillTokenBucket=function(){var e=this.getCurrentTimeInSeconds();if(this.lastTimestamp){var t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}else this.lastTimestamp=e},e.prototype.updateClientSendingRate=function(e){var t;if(this.updateMeasuredRate(),Lr(e)){var n=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=n,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(n),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());var r=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(r)},e.prototype.calculateTimeWindow=function(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))},e.prototype.cubicThrottle=function(e){return this.getPrecise(e*this.beta)},e.prototype.cubicSuccess=function(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)},e.prototype.enableTokenBucket=function(){this.enabled=!0},e.prototype.updateTokenBucketRate=function(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)},e.prototype.updateMeasuredRate=function(){var e=this.getCurrentTimeInSeconds(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){var n=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(n*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}},e.prototype.getPrecise=function(e){return parseFloat(e.toFixed(8))},e}(),Ur=new Uint8Array(16);function Br(){if(!Pr&&!(Pr="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Pr(Ur)}var Nr=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var Fr=function(e){return"string"==typeof e&&Nr.test(e)},zr=[],qr=0;qr<256;++qr)zr.push((qr+256).toString(16).substr(1));var Hr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(zr[e[t+0]]+zr[e[t+1]]+zr[e[t+2]]+zr[e[t+3]]+"-"+zr[e[t+4]]+zr[e[t+5]]+"-"+zr[e[t+6]]+zr[e[t+7]]+"-"+zr[e[t+8]]+zr[e[t+9]]+"-"+zr[e[t+10]]+zr[e[t+11]]+zr[e[t+12]]+zr[e[t+13]]+zr[e[t+14]]+zr[e[t+15]]).toLowerCase();if(!Fr(n))throw TypeError("Stringified UUID is invalid");return n};var Gr=function(e,t,n){var r=(e=e||{}).random||(e.rng||Br)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return Hr(r)},Vr=function(e,t){return Math.floor(Math.min(2e4,Math.random()*Math.pow(2,t)*e))},$r=function(e){return!!e&&(function(e){return void 0!==e.$retryable}(e)||function(e){return Mr.includes(e.name)}(e)||Lr(e)||function(e){var t;return Rr.includes(e.name)||kr.includes((null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||0)}(e))},Wr=function(){function e(e,t){var n,r,o;this.maxAttemptsProvider=e,this.mode=_r.STANDARD,this.retryDecider=null!==(n=null==t?void 0:t.retryDecider)&&void 0!==n?n:$r,this.delayDecider=null!==(r=null==t?void 0:t.delayDecider)&&void 0!==r?r:Vr,this.retryQuota=null!==(o=null==t?void 0:t.retryQuota)&&void 0!==o?o:function(e,t){var n,r,o,i=e,a=null!==(n=null==t?void 0:t.noRetryIncrement)&&void 0!==n?n:1,u=null!==(r=null==t?void 0:t.retryCost)&&void 0!==r?r:5,s=null!==(o=null==t?void 0:t.timeoutRetryCost)&&void 0!==o?o:10,c=e,l=function(e){return"TimeoutError"===e.name?s:u},f=function(e){return l(e)<=c};return Object.freeze({hasRetryTokens:f,retrieveRetryTokens:function(e){if(!f(e))throw new Error("No retry token available");var t=l(e);return c-=t,t},releaseRetryTokens:function(e){c+=null!=e?e:a,c=Math.min(c,i)}})}(500)}return e.prototype.shouldRetry=function(e,t,n){return t<n&&this.retryDecider(e)&&this.retryQuota.hasRetryTokens(e)},e.prototype.getMaxAttempts=function(){return Object(r.e)(this,void 0,void 0,(function(){var e;return Object(r.g)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.maxAttemptsProvider()];case 1:return e=t.sent(),[3,3];case 2:return t.sent(),e=3,[3,3];case 3:return[2,e]}}))}))},e.prototype.retry=function(e,t,n){return Object(r.e)(this,void 0,void 0,(function(){var o,i,a,u,s,c,l,f;return Object(r.g)(this,(function(d){switch(d.label){case 0:return i=0,a=0,[4,this.getMaxAttempts()];case 1:u=d.sent(),s=t.request,gr.isInstance(s)&&(s.headers["amz-sdk-invocation-id"]=Gr()),c=function(){var c,f,d,p,h,v,y,b;return Object(r.g)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,4,,7]),gr.isInstance(s)&&(s.headers["amz-sdk-request"]="attempt=".concat(i+1,"; max=").concat(u)),(null==n?void 0:n.beforeRequest)?[4,n.beforeRequest()]:[3,2];case 1:r.sent(),r.label=2;case 2:return[4,e(t)];case 3:return c=r.sent(),f=c.response,d=c.output,(null==n?void 0:n.afterRequest)&&n.afterRequest(f),l.retryQuota.releaseRetryTokens(o),d.$metadata.attempts=i+1,d.$metadata.totalRetryDelay=a,[2,{value:{response:f,output:d}}];case 4:return p=r.sent(),h=Yr(p),i++,l.shouldRetry(h,i,u)?(o=l.retryQuota.retrieveRetryTokens(h),v=l.delayDecider(Lr(h)?500:100,i),y=Kr(h.$response),b=Math.max(y||0,v),a+=b,[4,new Promise((function(e){return setTimeout(e,b)}))]):[3,6];case 5:return r.sent(),[2,"continue"];case 6:throw h.$metadata||(h.$metadata={}),h.$metadata.attempts=i,h.$metadata.totalRetryDelay=a,h;case 7:return[2]}}))},l=this,d.label=2;case 2:return[5,c()];case 3:return"object"==typeof(f=d.sent())?[2,f.value]:[3,2];case 4:return[2]}}))}))},e}(),Kr=function(e){if(wr.isInstance(e)){var t=Object.keys(e.headers).find((function(e){return"retry-after"===e.toLowerCase()}));if(t){var n=e.headers[t],r=Number(n);return Number.isNaN(r)?new Date(n).getTime()-Date.now():1e3*r}}},Yr=function(e){return e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):"string"==typeof e?new Error(e):new Error("AWS SDK error wrapper for ".concat(e))},Zr=function(e){function t(t,n){var o=this,i=null!=n?n:{},a=i.rateLimiter,u=Object(r.i)(i,["rateLimiter"]);return(o=e.call(this,t,u)||this).rateLimiter=null!=a?a:new Dr,o.mode=_r.ADAPTIVE,o}return Object(r.f)(t,e),t.prototype.retry=function(t,n){return Object(r.e)(this,void 0,void 0,(function(){var o=this;return Object(r.g)(this,(function(i){return[2,e.prototype.retry.call(this,t,n,{beforeRequest:function(){return Object(r.e)(o,void 0,void 0,(function(){return Object(r.g)(this,(function(e){return[2,this.rateLimiter.getSendToken()]}))}))},afterRequest:function(e){o.rateLimiter.updateClientSendingRate(e)}})]}))}))},t}(Wr),Xr={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Jr=function(e){return{applyToStack:function(t){t.add(function(e){return function(t,n){return function(o){return Object(r.e)(void 0,void 0,void 0,(function(){var i;return Object(r.g)(this,(function(a){switch(a.label){case 0:return[4,e.retryStrategy()];case 1:return(null==(i=a.sent())?void 0:i.mode)&&(n.userAgent=Object(r.j)(Object(r.j)([],Object(r.h)(n.userAgent||[]),!1),[["cfg/retry-mode",i.mode]],!1)),[2,i.retry(t,o)]}}))}))}}}(e),Xr)}}},Qr=function(e){function t(n,r){void 0===r&&(r=!0);var o=e.call(this,n)||this;return o.tryNextLink=r,o.name="ProviderError",Object.setPrototypeOf(o,t.prototype),o}return Object(r.f)(t,e),t.from=function(e,t){return void 0===t&&(t=!0),Object.assign(new this(e.message,t),e)},t}(Error);(function(e){function t(n,r){void 0===r&&(r=!0);var o=e.call(this,n,r)||this;return o.tryNextLink=r,o.name="CredentialsProviderError",Object.setPrototypeOf(o,t.prototype),o}Object(r.f)(t,e)})(Qr),function(e){function t(n,r){void 0===r&&(r=!0);var o=e.call(this,n,r)||this;return o.tryNextLink=r,o.name="TokenProviderError",Object.setPrototypeOf(o,t.prototype),o}Object(r.f)(t,e)}(Qr);for(var eo=function(e,t,n){var o,i,a,u=!1,s=function(){return Object(r.e)(void 0,void 0,void 0,(function(){return Object(r.g)(this,(function(t){switch(t.label){case 0:i||(i=e()),t.label=1;case 1:return t.trys.push([1,,3,4]),[4,i];case 2:return o=t.sent(),a=!0,u=!1,[3,4];case 3:return i=void 0,[7];case 4:return[2,o]}}))}))};return void 0===t?function(e){return Object(r.e)(void 0,void 0,void 0,(function(){return Object(r.g)(this,(function(t){switch(t.label){case 0:return a&&!(null==e?void 0:e.forceRefresh)?[3,2]:[4,s()];case 1:o=t.sent(),t.label=2;case 2:return[2,o]}}))}))}:function(e){return Object(r.e)(void 0,void 0,void 0,(function(){return Object(r.g)(this,(function(r){switch(r.label){case 0:return a&&!(null==e?void 0:e.forceRefresh)?[3,2]:[4,s()];case 1:o=r.sent(),r.label=2;case 2:return u?[2,o]:n&&!n(o)?(u=!0,[2,o]):t(o)?[4,s()]:[3,4];case 3:return r.sent(),[2,o];case 4:return[2,o]}}))}))}},to={},no={},ro=0;ro<256;ro++){var oo=ro.toString(16).toLowerCase();1===oo.length&&(oo="0".concat(oo)),to[ro]=oo,no[oo]=ro}function io(e){for(var t="",n=0;n<e.byteLength;n++)t+=to[e[n]];return t}var ao="X-Amz-Date".toLowerCase(),uo=["authorization",ao,"date"],so="X-Amz-Signature".toLowerCase(),co="X-Amz-Security-Token".toLowerCase(),lo={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},fo=/^proxy-/,po=/^sec-/,ho="AWS4-HMAC-SHA256-PAYLOAD",vo={},yo=[],bo=function(e,t,n){return"".concat(e,"/").concat(t,"/").concat(n,"/").concat("aws4_request")},mo=function(e,t,n){var r=new e(t);return r.update(n),r.digest()},go=function(e,t,n){var o,i,a=e.headers,u={};try{for(var s=Object(r.k)(Object.keys(a).sort()),c=s.next();!c.done;c=s.next()){var l=c.value;if(null!=a[l]){var f=l.toLowerCase();(f in lo||(null==t?void 0:t.has(f))||fo.test(f)||po.test(f))&&(!n||n&&!n.has(f))||(u[f]=a[l].trim().replace(/\s+/g," "))}}}catch(e){o={error:e}}finally{try{c&&!c.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}return u},wo=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,Oo)},Oo=function(e){return"%".concat(e.charCodeAt(0).toString(16).toUpperCase())},So=function(e,t){var n=e.headers,o=e.body;return Object(r.e)(void 0,void 0,void 0,(function(){var e,i,a,u,s,c,l;return Object(r.g)(this,(function(f){switch(f.label){case 0:try{for(e=Object(r.k)(Object.keys(n)),i=e.next();!i.done;i=e.next())if("x-amz-content-sha256"===(a=i.value).toLowerCase())return[2,n[a]]}catch(e){c={error:e}}finally{try{i&&!i.done&&(l=e.return)&&l.call(e)}finally{if(c)throw c.error}}return null!=o?[3,1]:[2,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"];case 1:return"string"==typeof o||ArrayBuffer.isView(o)||(d=o,"function"==typeof ArrayBuffer&&d instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(d))?((u=new t).update(o),s=io,[4,u.digest()]):[3,3];case 2:return[2,s.apply(void 0,[f.sent()])];case 3:return[2,"UNSIGNED-PAYLOAD"]}var d}))}))},_o=function(e){var t=e.headers,n=e.query,o=Object(r.i)(e,["headers","query"]);return Object(r.a)(Object(r.a)({},o),{headers:Object(r.a)({},t),query:n?jo(n):void 0})},jo=function(e){return Object.keys(e).reduce((function(t,n){var o,i=e[n];return Object(r.a)(Object(r.a)({},t),((o={})[n]=Array.isArray(i)?Object(r.j)([],Object(r.h)(i),!1):i,o))}),{})},Eo=function(e){var t,n;e="function"==typeof e.clone?e.clone():_o(e);try{for(var o=Object(r.k)(Object.keys(e.headers)),i=o.next();!i.done;i=o.next()){var a=i.value;uo.indexOf(a.toLowerCase())>-1&&delete e.headers[a]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return e},xo=function(e){return"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e},Ao=function(){function e(e){var t=e.applyChecksum,n=e.credentials,r=e.region,o=e.service,i=e.sha256,a=e.uriEscapePath,u=void 0===a||a;this.service=o,this.sha256=i,this.uriEscapePath=u,this.applyChecksum="boolean"!=typeof t||t,this.regionProvider=pr(r),this.credentialProvider=pr(n)}return e.prototype.presign=function(e,t){return void 0===t&&(t={}),Object(r.e)(this,void 0,void 0,(function(){var n,o,i,a,u,s,c,l,f,d,p,h,v,y,b,m,g,w,O,S,_,j,E,x;return Object(r.g)(this,(function(A){switch(A.label){case 0:return n=t.signingDate,o=void 0===n?new Date:n,i=t.expiresIn,a=void 0===i?3600:i,u=t.unsignableHeaders,s=t.unhoistableHeaders,c=t.signableHeaders,l=t.signingRegion,f=t.signingService,[4,this.credentialProvider()];case 1:return d=A.sent(),this.validateResolvedCredentials(d),null==l?[3,2]:(h=l,[3,4]);case 2:return[4,this.regionProvider()];case 3:h=A.sent(),A.label=4;case 4:return p=h,v=To(o),y=v.longDate,b=v.shortDate,a>604800?[2,Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future")]:(m=bo(b,p,null!=f?f:this.service),g=function(e,t){var n,o,i;void 0===t&&(t={});var a="function"==typeof e.clone?e.clone():_o(e),u=a.headers,s=a.query,c=void 0===s?{}:s;try{for(var l=Object(r.k)(Object.keys(u)),f=l.next();!f.done;f=l.next()){var d=f.value,p=d.toLowerCase();"x-amz-"!==p.slice(0,6)||(null===(i=t.unhoistableHeaders)||void 0===i?void 0:i.has(p))||(c[d]=u[d],delete u[d])}}catch(e){n={error:e}}finally{try{f&&!f.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}return Object(r.a)(Object(r.a)({},e),{headers:u,query:c})}(Eo(e),{unhoistableHeaders:s}),d.sessionToken&&(g.query["X-Amz-Security-Token"]=d.sessionToken),g.query["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",g.query["X-Amz-Credential"]="".concat(d.accessKeyId,"/").concat(m),g.query["X-Amz-Date"]=y,g.query["X-Amz-Expires"]=a.toString(10),w=go(g,u,c),g.query["X-Amz-SignedHeaders"]=Po(w),O=g.query,S="X-Amz-Signature",_=this.getSignature,j=[y,m,this.getSigningKey(d,p,b,f)],E=this.createCanonicalRequest,x=[g,w],[4,So(e,this.sha256)]);case 5:return[4,_.apply(this,j.concat([E.apply(this,x.concat([A.sent()]))]))];case 6:return O[S]=A.sent(),[2,g]}}))}))},e.prototype.sign=function(e,t){return Object(r.e)(this,void 0,void 0,(function(){return Object(r.g)(this,(function(n){return"string"==typeof e?[2,this.signString(e,t)]:e.headers&&e.payload?[2,this.signEvent(e,t)]:[2,this.signRequest(e,t)]}))}))},e.prototype.signEvent=function(e,t){var n=e.headers,o=e.payload,i=t.signingDate,a=void 0===i?new Date:i,u=t.priorSignature,s=t.signingRegion,c=t.signingService;return Object(r.e)(this,void 0,void 0,(function(){var e,t,i,l,f,d,p,h,v,y,b;return Object(r.g)(this,(function(r){switch(r.label){case 0:return null==s?[3,1]:(t=s,[3,3]);case 1:return[4,this.regionProvider()];case 2:t=r.sent(),r.label=3;case 3:return e=t,i=To(a),l=i.shortDate,f=i.longDate,d=bo(l,e,null!=c?c:this.service),[4,So({headers:{},body:o},this.sha256)];case 4:return p=r.sent(),(h=new this.sha256).update(n),y=io,[4,h.digest()];case 5:return v=y.apply(void 0,[r.sent()]),b=[ho,f,d,u,v,p].join("\n"),[2,this.signString(b,{signingDate:a,signingRegion:e,signingService:c})]}}))}))},e.prototype.signString=function(e,t){var n=void 0===t?{}:t,o=n.signingDate,i=void 0===o?new Date:o,a=n.signingRegion,u=n.signingService;return Object(r.e)(this,void 0,void 0,(function(){var t,n,o,s,c,l,f,d;return Object(r.g)(this,(function(r){switch(r.label){case 0:return[4,this.credentialProvider()];case 1:return t=r.sent(),this.validateResolvedCredentials(t),null==a?[3,2]:(o=a,[3,4]);case 2:return[4,this.regionProvider()];case 3:o=r.sent(),r.label=4;case 4:return n=o,s=To(i).shortDate,f=(l=this.sha256).bind,[4,this.getSigningKey(t,n,s,u)];case 5:return(c=new(f.apply(l,[void 0,r.sent()]))).update(e),d=io,[4,c.digest()];case 6:return[2,d.apply(void 0,[r.sent()])]}}))}))},e.prototype.signRequest=function(e,t){var n=void 0===t?{}:t,o=n.signingDate,i=void 0===o?new Date:o,a=n.signableHeaders,u=n.unsignableHeaders,s=n.signingRegion,c=n.signingService;return Object(r.e)(this,void 0,void 0,(function(){var t,n,o,l,f,d,p,h,v,y,b;return Object(r.g)(this,(function(m){switch(m.label){case 0:return[4,this.credentialProvider()];case 1:return t=m.sent(),this.validateResolvedCredentials(t),null==s?[3,2]:(o=s,[3,4]);case 2:return[4,this.regionProvider()];case 3:o=m.sent(),m.label=4;case 4:return n=o,l=Eo(e),f=To(i),d=f.longDate,p=f.shortDate,h=bo(p,n,null!=c?c:this.service),l.headers[ao]=d,t.sessionToken&&(l.headers[co]=t.sessionToken),[4,So(l,this.sha256)];case 5:return v=m.sent(),!function(e,t){var n,o;e=e.toLowerCase();try{for(var i=Object(r.k)(Object.keys(t)),a=i.next();!a.done;a=i.next()){if(e===a.value.toLowerCase())return!0}}catch(e){n={error:e}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return!1}("x-amz-content-sha256",l.headers)&&this.applyChecksum&&(l.headers["x-amz-content-sha256"]=v),y=go(l,u,a),[4,this.getSignature(d,h,this.getSigningKey(t,n,p,c),this.createCanonicalRequest(l,y,v))];case 6:return b=m.sent(),l.headers.authorization="".concat("AWS4-HMAC-SHA256"," ")+"Credential=".concat(t.accessKeyId,"/").concat(h,", ")+"SignedHeaders=".concat(Po(y),", ")+"Signature=".concat(b),[2,l]}}))}))},e.prototype.createCanonicalRequest=function(e,t,n){var o=Object.keys(t).sort();return"".concat(e.method,"\n").concat(this.getCanonicalPath(e),"\n").concat(function(e){var t,n,o=e.query,i=void 0===o?{}:o,a=[],u={},s=function(e){if(e.toLowerCase()===so)return"continue";a.push(e);var t=i[e];"string"==typeof t?u[e]="".concat(wo(e),"=").concat(wo(t)):Array.isArray(t)&&(u[e]=t.slice(0).sort().reduce((function(t,n){return t.concat(["".concat(wo(e),"=").concat(wo(n))])}),[]).join("&"))};try{for(var c=Object(r.k)(Object.keys(i).sort()),l=c.next();!l.done;l=c.next()){s(l.value)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}return a.map((function(e){return u[e]})).filter((function(e){return e})).join("&")}(e),"\n").concat(o.map((function(e){return"".concat(e,":").concat(t[e])})).join("\n"),"\n\n").concat(o.join(";"),"\n").concat(n)},e.prototype.createStringToSign=function(e,t,n){return Object(r.e)(this,void 0,void 0,(function(){var o,i;return Object(r.g)(this,(function(r){switch(r.label){case 0:return(o=new this.sha256).update(n),[4,o.digest()];case 1:return i=r.sent(),[2,"".concat("AWS4-HMAC-SHA256","\n").concat(e,"\n").concat(t,"\n").concat(io(i))]}}))}))},e.prototype.getCanonicalPath=function(e){var t,n,o=e.path;if(this.uriEscapePath){var i=[];try{for(var a=Object(r.k)(o.split("/")),u=a.next();!u.done;u=a.next()){var s=u.value;0!==(null==s?void 0:s.length)&&("."!==s&&(".."===s?i.pop():i.push(s)))}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}var c="".concat((null==o?void 0:o.startsWith("/"))?"/":"").concat(i.join("/")).concat(i.length>0&&(null==o?void 0:o.endsWith("/"))?"/":"");return encodeURIComponent(c).replace(/%2F/g,"/")}return o},e.prototype.getSignature=function(e,t,n,o){return Object(r.e)(this,void 0,void 0,(function(){var i,a,u,s,c;return Object(r.g)(this,(function(r){switch(r.label){case 0:return[4,this.createStringToSign(e,t,o)];case 1:return i=r.sent(),s=(u=this.sha256).bind,[4,n];case 2:return(a=new(s.apply(u,[void 0,r.sent()]))).update(i),c=io,[4,a.digest()];case 3:return[2,c.apply(void 0,[r.sent()])]}}))}))},e.prototype.getSigningKey=function(e,t,n,o){return function(e,t,n,o,i){return Object(r.e)(void 0,void 0,void 0,(function(){var a,u,s,c,l,f,d,p,h;return Object(r.g)(this,(function(v){switch(v.label){case 0:return[4,mo(e,t.secretAccessKey,t.accessKeyId)];case 1:if(a=v.sent(),(u="".concat(n,":").concat(o,":").concat(i,":").concat(io(a),":").concat(t.sessionToken))in vo)return[2,vo[u]];for(yo.push(u);yo.length>50;)delete vo[yo.shift()];s="AWS4".concat(t.secretAccessKey),v.label=2;case 2:v.trys.push([2,7,8,9]),c=Object(r.k)([n,o,i,"aws4_request"]),l=c.next(),v.label=3;case 3:return l.done?[3,6]:(f=l.value,[4,mo(e,s,f)]);case 4:s=v.sent(),v.label=5;case 5:return l=c.next(),[3,3];case 6:return[3,9];case 7:return d=v.sent(),p={error:d},[3,9];case 8:try{l&&!l.done&&(h=c.return)&&h.call(c)}finally{if(p)throw p.error}return[7];case 9:return[2,vo[u]=s]}}))}))}(this.sha256,e,n,t,o||this.service)},e.prototype.validateResolvedCredentials=function(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")},e}(),To=function(e){var t,n=(t=e,xo(t).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");return{longDate:n,shortDate:n.slice(0,8)}},Po=function(e){return Object.keys(e).sort().join(";")},Co=function(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e},Mo=function(e){return"function"==typeof e?eo(e,(function(e){return void 0!==e.expiration&&e.expiration.getTime()-Date.now()<3e5}),(function(e){return void 0!==e.expiration})):Co(e)},Io=function(e){return new Date(Date.now()+e)},Ro=function(e,t){var n=Date.parse(e);return function(e,t){return Math.abs(Io(t).getTime()-e)>=3e5}(n,t)?n-Date.now():t},ko=function(e){var t,n,r;return wr.isInstance(e)?null!==(n=null===(t=e.headers)||void 0===t?void 0:t.date)&&void 0!==n?n:null===(r=e.headers)||void 0===r?void 0:r.Date:void 0},Lo={name:"awsAuthMiddleware",tags:["SIGNATURE","AWSAUTH"],relation:"after",toMiddleware:"retryMiddleware",override:!0},Do=function(e){return{applyToStack:function(t){t.addRelativeTo(function(e){return function(t,n){return function(o){return Object(r.e)(this,void 0,void 0,(function(){var i,a,u,s,c,l;return Object(r.g)(this,(function(f){switch(f.label){case 0:return gr.isInstance(o.request)?[4,e.signer()]:[2,t(o)];case 1:return i=f.sent(),u=t,s=[Object(r.a)({},o)],l={},[4,i.sign(o.request,{signingDate:Io(e.systemClockOffset),signingRegion:n.signing_region,signingService:n.signing_service})];case 2:return[4,u.apply(void 0,[r.a.apply(void 0,s.concat([(l.request=f.sent(),l)]))]).catch((function(t){var n,r=null!==(n=t.ServerTime)&&void 0!==n?n:ko(t.$response);throw r&&(e.systemClockOffset=Ro(r,e.systemClockOffset)),t}))];case 3:return a=f.sent(),(c=ko(a.response))&&(e.systemClockOffset=Ro(c,e.systemClockOffset)),[2,a]}}))}))}}}(e),Lo)}}};var Uo=/[^\!\#\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Bo=function(e){var t=Object(r.h)(e,2),n=t[0],o=t[1],i=n.indexOf("/"),a=n.substring(0,i),u=n.substring(i+1);return"api"===a&&(u=u.toLowerCase()),[a,u,o].filter((function(e){return e&&e.length>0})).map((function(e){return null==e?void 0:e.replace(Uo,"_")})).join("/")},No={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Fo=function(e){return{applyToStack:function(t){var n;t.add((n=e,function(e,t){return function(o){return Object(r.e)(void 0,void 0,void 0,(function(){var i,a,u,s,c,l,f,d,p;return Object(r.g)(this,(function(h){switch(h.label){case 0:return i=o.request,gr.isInstance(i)?(a=i.headers,u=(null===(d=null==t?void 0:t.userAgent)||void 0===d?void 0:d.map(Bo))||[],[4,n.defaultUserAgentProvider()]):[2,e(o)];case 1:return s=h.sent().map(Bo),c=(null===(p=null==n?void 0:n.customUserAgent)||void 0===p?void 0:p.map(Bo))||[],l=Object(r.j)(Object(r.j)(Object(r.j)([],Object(r.h)(s),!1),Object(r.h)(u),!1),Object(r.h)(c),!1).join(" "),f=Object(r.j)(Object(r.j)([],Object(r.h)(s.filter((function(e){return e.startsWith("aws-sdk-")}))),!1),Object(r.h)(c),!1).join(" "),"browser"!==n.runtime?(f&&(a["x-amz-user-agent"]=a["x-amz-user-agent"]?"".concat(a["user-agent"]," ").concat(f):f),a["user-agent"]=l):a["x-amz-user-agent"]=l,[2,e(Object(r.a)(Object(r.a)({},o),{request:i}))]}}))}))}}),No)}}},zo=function(){var e=[],t=[],n=new Set,o=function(n){return e.forEach((function(e){n.add(e.middleware,Object(r.a)({},e))})),t.forEach((function(e){n.addRelativeTo(e.middleware,Object(r.a)({},e))})),n},i=function(e){var t=[];return e.before.forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,Object(r.j)([],Object(r.h)(i(e)),!1))})),t.push(e),e.after.reverse().forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,Object(r.j)([],Object(r.h)(i(e)),!1))})),t},a=function(){var n,o=[],a=[],u={};return e.forEach((function(e){var t=Object(r.a)(Object(r.a)({},e),{before:[],after:[]});t.name&&(u[t.name]=t),o.push(t)})),t.forEach((function(e){var t=Object(r.a)(Object(r.a)({},e),{before:[],after:[]});t.name&&(u[t.name]=t),a.push(t)})),a.forEach((function(e){if(e.toMiddleware){var t=u[e.toMiddleware];if(void 0===t)throw new Error("".concat(e.toMiddleware," is not found when adding ").concat(e.name||"anonymous"," middleware ").concat(e.relation," ").concat(e.toMiddleware));"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}})),(n=o,n.sort((function(e,t){return qo[t.step]-qo[e.step]||Ho[t.priority||"normal"]-Ho[e.priority||"normal"]}))).map(i).reduce((function(e,t){return e.push.apply(e,Object(r.j)([],Object(r.h)(t),!1)),e}),[]).map((function(e){return e.middleware}))},u={add:function(t,o){void 0===o&&(o={});var i=o.name,a=o.override,u=Object(r.a)({step:"initialize",priority:"normal",middleware:t},o);if(i){if(n.has(i)){if(!a)throw new Error("Duplicate middleware name '".concat(i,"'"));var s=e.findIndex((function(e){return e.name===i})),c=e[s];if(c.step!==u.step||c.priority!==u.priority)throw new Error('"'.concat(i,'" middleware with ').concat(c.priority," priority in ").concat(c.step," step cannot be ")+"overridden by same-name middleware with ".concat(u.priority," priority in ").concat(u.step," step."));e.splice(s,1)}n.add(i)}e.push(u)},addRelativeTo:function(e,o){var i=o.name,a=o.override,u=Object(r.a)({middleware:e},o);if(i){if(n.has(i)){if(!a)throw new Error("Duplicate middleware name '".concat(i,"'"));var s=t.findIndex((function(e){return e.name===i})),c=t[s];if(c.toMiddleware!==u.toMiddleware||c.relation!==u.relation)throw new Error('"'.concat(i,'" middleware ').concat(c.relation,' "').concat(c.toMiddleware,'" middleware cannot be overridden ')+"by same-name middleware ".concat(u.relation,' "').concat(u.toMiddleware,'" middleware.'));t.splice(s,1)}n.add(i)}t.push(u)},clone:function(){return o(zo())},use:function(e){e.applyToStack(u)},remove:function(r){return"string"==typeof r?function(r){var o=!1,i=function(e){return!e.name||e.name!==r||(o=!0,n.delete(r),!1)};return e=e.filter(i),t=t.filter(i),o}(r):function(r){var o=!1,i=function(e){return e.middleware!==r||(o=!0,e.name&&n.delete(e.name),!1)};return e=e.filter(i),t=t.filter(i),o}(r)},removeByTag:function(r){var o=!1,i=function(e){var t=e.tags,i=e.name;return!t||!t.includes(r)||(i&&n.delete(i),o=!0,!1)};return e=e.filter(i),t=t.filter(i),o},concat:function(e){var t=o(zo());return t.use(e),t},applyToStack:o,resolve:function(e,t){var n,o;try{for(var i=Object(r.k)(a().reverse()),u=i.next();!u.done;u=i.next()){e=(0,u.value)(e,t)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return e}};return u},qo={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Ho={high:3,normal:2,low:1},Go=function(){function e(e){this.middlewareStack=zo(),this.config=e}return e.prototype.send=function(e,t,n){var r="function"!=typeof t?t:void 0,o="function"==typeof t?t:n,i=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!o)return i(e).then((function(e){return e.output}));i(e).then((function(e){return o(null,e.output)}),(function(e){return o(e)})).catch((function(){}))},e.prototype.destroy=function(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()},e}(),Vo=function(){this.middlewareStack=zo()},$o="***SensitiveInformation***",Wo=function(e){if(null!=e){if("string"==typeof e){var t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&oi.warn(ri("Expected number but observed string: ".concat(e))),t}if("number"==typeof e)return e;throw new TypeError("Expected number, got ".concat(typeof e,": ").concat(e))}},Ko=(Math.ceil(Math.pow(2,127)*(2-Math.pow(2,-23))),function(e){if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError("Expected integer, got ".concat(typeof e,": ").concat(e))}}),Yo=function(e){return Zo(e,32)},Zo=function(e,t){var n=Ko(e);if(void 0!==n&&Xo(n,t)!==n)throw new TypeError("Expected ".concat(t,"-bit integer, got ").concat(e));return n},Xo=function(e,t){switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},Jo=function(e,t){if(null==e){if(t)throw new TypeError("Expected a non-null value for ".concat(t));throw new TypeError("Expected a non-null value")}return e},Qo=function(e){if(null!=e){if("object"==typeof e&&!Array.isArray(e))return e;var t=Array.isArray(e)?"array":typeof e;throw new TypeError("Expected object, got ".concat(t,": ").concat(e))}},ei=function(e){if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return oi.warn(ri("Expected string, got ".concat(typeof e,": ").concat(e))),String(e);throw new TypeError("Expected string, got ".concat(typeof e,": ").concat(e))}},ti=function(e){return"string"==typeof e?ni(e):Wo(e)},ni=function(e){switch(e){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error("Unable to parse float value: ".concat(e))}},ri=function(e){return String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((function(e){return!e.includes("stackTraceWarning")})).join("\n")},oi={warn:console.warn};new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/);var ii=function(e){function t(n){var r=e.call(this,n.message)||this;return Object.setPrototypeOf(r,t.prototype),r.name=n.name,r.$fault=n.$fault,r.$metadata=n.$metadata,r}return Object(r.f)(t,e),t}(Error),ai=function(e,t){void 0===t&&(t={}),Object.entries(t).filter((function(e){return void 0!==Object(r.h)(e,2)[1]})).forEach((function(t){var n=Object(r.h)(t,2),o=n[0],i=n[1];null!=e[o]&&""!==e[o]||(e[o]=i)}));var n=e.message||e.Message||"UnknownError";return e.message=n,delete e.Message,e},ui=function(e){var t=e.output,n=e.parsedBody,r=e.exceptionCtor,o=e.errorCode,i=si(t),a=i.httpStatusCode?i.httpStatusCode+"":void 0,u=new r({name:n.code||n.Code||o||a||"UnknowError",$fault:"client",$metadata:i});throw ai(u,n)},si=function(e){var t;return{httpStatusCode:e.statusCode,requestId:null!==(t=e.headers["x-amzn-requestid"])&&void 0!==t?t:e.headers["x-amzn-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}},ci=function(e){switch(e){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}};n(20);function li(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}var fi=function(){var e=Object.getPrototypeOf(this).constructor,t=Function.bind.apply(String,Object(r.j)([null],Object(r.h)(arguments),!1)),n=new t;return Object.setPrototypeOf(n,e.prototype),n};fi.prototype=Object.create(String.prototype,{constructor:{value:fi,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(fi,String);!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Object(r.f)(t,e),t.prototype.deserializeJSON=function(){return JSON.parse(e.prototype.toString.call(this))},t.prototype.toJSON=function(){return e.prototype.toString.call(this)},t.fromObject=function(e){return e instanceof t?e:new t(e instanceof String||"string"==typeof e?e:JSON.stringify(e))}}(fi);function di(e,t,n){var o,i,a,u;if(void 0===t&&void 0===n)a={},u=e;else{if(a=e,"function"==typeof t)return pi(a,t,u=n);u=t}try{for(var s=Object(r.k)(Object.keys(u)),c=s.next();!c.done;c=s.next()){var l=c.value;if(Array.isArray(u[l])){var f=Object(r.h)(u[l],2),d=f[0],p=f[1];if("function"==typeof p){var h=void 0,v=void 0===d&&null!=(h=p()),y="function"==typeof d&&!!d(void 0)||"function"!=typeof d&&!!d;v?a[l]=h:y&&(a[l]=p())}else{v=void 0===d&&null!=p,y="function"==typeof d&&!!d(p)||"function"!=typeof d&&!!d;(v||y)&&(a[l]=p)}}else a[l]=u[l]}}catch(e){o={error:e}}finally{try{c&&!c.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}return a}var pi=function(e,t,n){return di(e,Object.entries(n).reduce((function(e,n){var o=Object(r.h)(n,2),i=o[0],a=o[1];return Array.isArray(a)?e[i]=a:e[i]="function"==typeof a?[t,a()]:[t,a],e}),{}))},hi=function(e,t,n,r,o,i){if(null==t||void 0===t[n])throw new Error("No value provided for input HTTP label: "+n+".");var a=r();if(a.length<=0)throw new Error("Empty value provided for input HTTP label: "+n+".");return e=e.replace(o,i?a.split("/").map((function(e){return li(e)})).join("/"):li(a))};for(var vi=n(33),yi=n(32),bi=n(7),mi={},gi={},wi=0;wi<256;wi++){var Oi=wi.toString(16).toLowerCase();1===Oi.length&&(Oi="0".concat(Oi)),mi[wi]=Oi,gi[Oi]=wi}function Si(e){for(var t="",n=0;n<e.byteLength;n++)t+=mi[e[n]];return t}var _i=function(){function e(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}return e.fromNumber=function(t){if(t>0x8000000000000000||t<-0x8000000000000000)throw new Error("".concat(t," is too large (or, if negative, too small) to represent as an Int64"));for(var n=new Uint8Array(8),r=7,o=Math.abs(Math.round(t));r>-1&&o>0;r--,o/=256)n[r]=o;return t<0&&ji(n),new e(n)},e.prototype.valueOf=function(){var e=this.bytes.slice(0),t=128&e[0];return t&&ji(e),parseInt(Si(e),16)*(t?-1:1)},e.prototype.toString=function(){return String(this.valueOf())},e}();function ji(e){for(var t=0;t<8;t++)e[t]^=255;for(t=7;t>-1&&(e[t]++,0===e[t]);t--);}var Ei,xi=function(){function e(e,t){this.toUtf8=e,this.fromUtf8=t}return e.prototype.format=function(e){var t,n,o,i,a=[];try{for(var u=Object(r.k)(Object.keys(e)),s=u.next();!s.done;s=u.next()){var c=s.value,l=this.fromUtf8(c);a.push(Uint8Array.from([l.byteLength]),l,this.formatHeaderValue(e[c]))}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}var f=new Uint8Array(a.reduce((function(e,t){return e+t.byteLength}),0)),d=0;try{for(var p=Object(r.k)(a),h=p.next();!h.done;h=p.next()){var v=h.value;f.set(v,d),d+=v.byteLength}}catch(e){o={error:e}}finally{try{h&&!h.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}return f},e.prototype.formatHeaderValue=function(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":var t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":var n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":var r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":var o=new DataView(new ArrayBuffer(3+e.value.byteLength));o.setUint8(0,6),o.setUint16(1,e.value.byteLength,!1);var i=new Uint8Array(o.buffer);return i.set(e.value,3),i;case"string":var a=this.fromUtf8(e.value),u=new DataView(new ArrayBuffer(3+a.byteLength));u.setUint8(0,7),u.setUint16(1,a.byteLength,!1);var s=new Uint8Array(u.buffer);return s.set(a,3),s;case"timestamp":var c=new Uint8Array(9);return c[0]=8,c.set(_i.fromNumber(e.value.valueOf()).bytes,1),c;case"uuid":if(!Di.test(e.value))throw new Error("Invalid UUID received: ".concat(e.value));var l=new Uint8Array(17);return l[0]=9,l.set(function(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");for(var t=new Uint8Array(e.length/2),n=0;n<e.length;n+=2){var r=e.slice(n,n+2).toLowerCase();if(!(r in gi))throw new Error("Cannot decode unrecognized sequence ".concat(r," as hexadecimal"));t[n/2]=gi[r]}return t}(e.value.replace(/\-/g,"")),1),l}},e.prototype.parse=function(e){for(var t={},n=0;n<e.byteLength;){var r=e.getUint8(n++),o=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,r));switch(n+=r,e.getUint8(n++)){case 0:t[o]={type:Ai,value:!0};break;case 1:t[o]={type:Ai,value:!1};break;case 2:t[o]={type:Ti,value:e.getInt8(n++)};break;case 3:t[o]={type:Pi,value:e.getInt16(n,!1)},n+=2;break;case 4:t[o]={type:Ci,value:e.getInt32(n,!1)},n+=4;break;case 5:t[o]={type:Mi,value:new _i(new Uint8Array(e.buffer,e.byteOffset+n,8))},n+=8;break;case 6:var i=e.getUint16(n,!1);n+=2,t[o]={type:Ii,value:new Uint8Array(e.buffer,e.byteOffset+n,i)},n+=i;break;case 7:var a=e.getUint16(n,!1);n+=2,t[o]={type:Ri,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,a))},n+=a;break;case 8:t[o]={type:ki,value:new Date(new _i(new Uint8Array(e.buffer,e.byteOffset+n,8)).valueOf())},n+=8;break;case 9:var u=new Uint8Array(e.buffer,e.byteOffset+n,16);n+=16,t[o]={type:Li,value:"".concat(Si(u.subarray(0,4)),"-").concat(Si(u.subarray(4,6)),"-").concat(Si(u.subarray(6,8)),"-").concat(Si(u.subarray(8,10)),"-").concat(Si(u.subarray(10)))};break;default:throw new Error("Unrecognized header type tag")}}return t},e}();!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(Ei||(Ei={}));var Ai="boolean",Ti="byte",Pi="short",Ci="integer",Mi="long",Ii="binary",Ri="string",ki="timestamp",Li="uuid",Di=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;var Ui=function(){function e(e,t){this.headerMarshaller=new xi(e,t)}return e.prototype.encode=function(e){var t=e.headers,n=e.body,r=this.headerMarshaller.format(t),o=r.byteLength+n.byteLength+16,i=new Uint8Array(o),a=new DataView(i.buffer,i.byteOffset,i.byteLength),u=new bi.Crc32;return a.setUint32(0,o,!1),a.setUint32(4,r.byteLength,!1),a.setUint32(8,u.update(i.subarray(0,8)).digest(),!1),i.set(r,12),i.set(n,r.byteLength+12),a.setUint32(o-4,u.update(i.subarray(8,o-4)).digest(),!1),i},e.prototype.decode=function(e){var t=function(e){var t=e.byteLength,n=e.byteOffset,r=e.buffer;if(t<16)throw new Error("Provided message too short to accommodate event stream message overhead");var o=new DataView(r,n,t),i=o.getUint32(0,!1);if(t!==i)throw new Error("Reported message length does not match received message length");var a=o.getUint32(4,!1),u=o.getUint32(8,!1),s=o.getUint32(t-4,!1),c=(new bi.Crc32).update(new Uint8Array(r,n,8));if(u!==c.digest())throw new Error("The prelude checksum specified in the message (".concat(u,") does not match the calculated CRC32 checksum (").concat(c.digest(),")"));if(c.update(new Uint8Array(r,n+8,t-12)),s!==c.digest())throw new Error("The message checksum (".concat(c.digest(),") did not match the expected value of ").concat(s));return{headers:new DataView(r,n+8+4,a),body:new Uint8Array(r,n+8+4+a,i-a-16)}}(e),n=t.headers,r=t.body;return{headers:this.headerMarshaller.parse(n),body:r}},e.prototype.formatHeaders=function(e){return this.headerMarshaller.format(e)},e}();var Bi=function(){function e(e){var t=e.utf8Encoder,n=e.utf8Decoder;this.eventStreamCodec=new Ui(t,n),this.utfEncoder=t}return e.prototype.deserialize=function(e,t){return function(e,t){var n;return(n={})[Symbol.asyncIterator]=function(){return Object(r.b)(this,arguments,(function(){var n,o,i,a,u,s,c,l,f,d,p,h,v,y,b,m,g;return Object(r.g)(this,(function(w){switch(w.label){case 0:w.trys.push([0,12,13,18]),n=Object(r.c)(e),w.label=1;case 1:return[4,Object(r.d)(n.next())];case 2:if((o=w.sent()).done)return[3,11];if(i=o.value,a=t.eventStreamCodec.decode(i),"error"!==(u=a.headers[":message-type"].value))return[3,3];throw(s=new Error(a.headers[":error-message"].value||"UnknownError")).name=a.headers[":error-code"].value,s;case 3:return"exception"!==u?[3,5]:(c=a.headers[":exception-type"].value,(y={})[c]=a,l=y,[4,Object(r.d)(t.deserializer(l))]);case 4:if((f=w.sent()).$unknown)throw(d=new Error(t.toUtf8(a.body))).name=c,d;throw f[c];case 5:return"event"!==u?[3,9]:((b={})[a.headers[":event-type"].value]=a,p=b,[4,Object(r.d)(t.deserializer(p))]);case 6:return(h=w.sent()).$unknown?[3,10]:[4,Object(r.d)(h)];case 7:return[4,w.sent()];case 8:return w.sent(),[3,10];case 9:throw Error("Unrecognizable event type: ".concat(a.headers[":event-type"].value));case 10:return[3,1];case 11:return[3,18];case 12:return v=w.sent(),m={error:v},[3,18];case 13:return w.trys.push([13,,16,17]),o&&!o.done&&(g=n.return)?[4,Object(r.d)(g.call(n))]:[3,15];case 14:w.sent(),w.label=15;case 15:return[3,17];case 16:if(m)throw m.error;return[7];case 17:return[7];case 18:return[2]}}))}))},n}(function(e){var t,n=0,o=0,i=null,a=null,u=function(e){if("number"!=typeof e)throw new Error("Attempted to allocate an event message where size was not a number: "+e);n=e,o=4,i=new Uint8Array(e),new DataView(i.buffer).setUint32(0,e,!1)};return(t={})[Symbol.asyncIterator]=function(){return Object(r.b)(this,arguments,(function(){var t,s,c,l,f,d,p,h;return Object(r.g)(this,(function(v){switch(v.label){case 0:t=e[Symbol.asyncIterator](),v.label=1;case 1:return[4,Object(r.d)(t.next())];case 2:return s=v.sent(),c=s.value,s.done?n?[3,4]:[4,Object(r.d)(void 0)]:[3,10];case 3:return[2,v.sent()];case 4:return n!==o?[3,7]:[4,Object(r.d)(i)];case 5:return[4,v.sent()];case 6:return v.sent(),[3,8];case 7:throw new Error("Truncated event message received.");case 8:return[4,Object(r.d)(void 0)];case 9:return[2,v.sent()];case 10:l=c.length,f=0,v.label=11;case 11:if(!(f<l))return[3,15];if(!i){if(d=l-f,a||(a=new Uint8Array(4)),p=Math.min(4-o,d),a.set(c.slice(f,f+p),o),f+=p,(o+=p)<4)return[3,15];u(new DataView(a.buffer).getUint32(0,!1)),a=null}return h=Math.min(n-o,l-f),i.set(c.slice(f,f+h),o),o+=h,f+=h,n&&n===o?[4,Object(r.d)(i)]:[3,14];case 12:return[4,v.sent()];case 13:v.sent(),i=null,n=0,o=0,v.label=14;case 14:return[3,11];case 15:return[3,1];case 16:return[2]}}))}))},t}(e),{eventStreamCodec:this.eventStreamCodec,deserializer:t,toUtf8:this.utfEncoder})},e.prototype.serialize=function(e,t){var n,o=this;return(n={})[Symbol.asyncIterator]=function(){return Object(r.b)(this,arguments,(function(){var n,i,a,u,s,c,l;return Object(r.g)(this,(function(f){switch(f.label){case 0:f.trys.push([0,7,8,13]),n=Object(r.c)(e),f.label=1;case 1:return[4,Object(r.d)(n.next())];case 2:return(i=f.sent()).done?[3,6]:(a=i.value,u=o.eventStreamCodec.encode(t(a)),[4,Object(r.d)(u)]);case 3:return[4,f.sent()];case 4:f.sent(),f.label=5;case 5:return[3,1];case 6:return[3,13];case 7:return s=f.sent(),c={error:s},[3,13];case 8:return f.trys.push([8,,11,12]),i&&!i.done&&(l=n.return)?[4,Object(r.d)(l.call(n))]:[3,10];case 9:f.sent(),f.label=10;case 10:return[3,12];case 11:if(c)throw c.error;return[7];case 12:return[7];case 13:return[4,Object(r.d)(new Uint8Array(0))];case 14:return[4,f.sent()];case 15:return f.sent(),[2]}}))}))},n},e}(),Ni=function(){function e(e){var t=e.utf8Encoder,n=e.utf8Decoder;this.universalMarshaller=new Bi({utf8Decoder:n,utf8Encoder:t})}return e.prototype.deserialize=function(e,t){var n=Fi(e)?function(e){var t;return(t={})[Symbol.asyncIterator]=function(){return Object(r.b)(this,arguments,(function(){var t,n,o,i;return Object(r.g)(this,(function(a){switch(a.label){case 0:t=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,Object(r.d)(t.read())];case 3:return n=a.sent(),o=n.done,i=n.value,o?[4,Object(r.d)(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,Object(r.d)(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))},t}(e):e;return this.universalMarshaller.deserialize(n,t)},e.prototype.serialize=function(e,t){var n,o=this.universalMarshaller.serialize(e,t);return"function"==typeof ReadableStream?(n=o[Symbol.asyncIterator](),new ReadableStream({pull:function(e){return Object(r.e)(this,void 0,void 0,(function(){var t,o,i;return Object(r.g)(this,(function(r){switch(r.label){case 0:return[4,n.next()];case 1:return t=r.sent(),o=t.done,i=t.value,o?[2,e.close()]:(e.enqueue(i),[2])}}))}))}})):o},e}(),Fi=function(e){return"function"==typeof ReadableStream&&e instanceof ReadableStream},zi=function(e){return new Ni(e)};for(var qi=function(){function e(e){"function"==typeof e?this.configProvider=e().then((function(e){return e||{}})):(this.config=null!=e?e:{},this.configProvider=Promise.resolve(this.config))}return e.prototype.destroy=function(){},e.prototype.handle=function(e,t){var n=(void 0===t?{}:t).abortSignal;return Object(r.e)(this,void 0,void 0,(function(){var t,o,i,a,u,s,c,l,f,d,p,h;return Object(r.g)(this,(function(v){switch(v.label){case 0:return this.config?[3,2]:(t=this,[4,this.configProvider]);case 1:t.config=v.sent(),v.label=2;case 2:return o=this.config.requestTimeout,(null==n?void 0:n.aborted)?((i=new Error("Request aborted")).name="AbortError",[2,Promise.reject(i)]):(a=e.path,e.query&&(u=function(e){var t,n,o=[];try{for(var i=Object(r.k)(Object.keys(e).sort()),a=i.next();!a.done;a=i.next()){var u=a.value,s=e[u];if(u=wo(u),Array.isArray(s))for(var c=0,l=s.length;c<l;c++)o.push("".concat(u,"=").concat(wo(s[c])));else{var f=u;(s||"string"==typeof s)&&(f+="=".concat(wo(s))),o.push(f)}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return o.join("&")}(e.query))&&(a+="?".concat(u)),s=e.port,c=e.method,l="".concat(e.protocol,"//").concat(e.hostname).concat(s?":".concat(s):"").concat(a),f="GET"===c||"HEAD"===c?void 0:e.body,d={body:f,headers:new Headers(e.headers),method:c},"undefined"!=typeof AbortController&&(d.signal=n),p=new Request(l,d),h=[fetch(p).then((function(e){var t,n,o=e.headers,i={};try{for(var a=Object(r.k)(o.entries()),u=a.next();!u.done;u=a.next()){var s=u.value;i[s[0]]=s[1]}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return void 0!==e.body?{response:new wr({headers:i,statusCode:e.status,body:e.body})}:e.blob().then((function(t){return{response:new wr({headers:i,statusCode:e.status,body:t})}}))})),(y=o,void 0===y&&(y=0),new Promise((function(e,t){y&&setTimeout((function(){var e=new Error("Request did not complete within ".concat(y," ms"));e.name="TimeoutError",t(e)}),y)})))],n&&h.push(new Promise((function(e,t){n.onabort=function(){var e=new Error("Request aborted");e.name="AbortError",t(e)}}))),[2,Promise.race(h)])}var y}))}))},e}(),Hi={},Gi=new Array(64),Vi=0,$i="A".charCodeAt(0),Wi="Z".charCodeAt(0);Vi+$i<=Wi;Vi++){var Ki=String.fromCharCode(Vi+$i);Hi[Ki]=Vi,Gi[Vi]=Ki}for(Vi=0,$i="a".charCodeAt(0),Wi="z".charCodeAt(0);Vi+$i<=Wi;Vi++){Ki=String.fromCharCode(Vi+$i);var Yi=Vi+26;Hi[Ki]=Yi,Gi[Yi]=Ki}for(Vi=0;Vi<10;Vi++){Hi[Vi.toString(10)]=Vi+52;Ki=Vi.toString(10),Yi=Vi+52;Hi[Ki]=Yi,Gi[Yi]=Ki}Hi["+"]=62,Gi[62]="+",Hi["/"]=63,Gi[63]="/";function Zi(e){var t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;for(var n=new ArrayBuffer(t),r=new DataView(n),o=0;o<e.length;o+=4){for(var i=0,a=0,u=o,s=o+3;u<=s;u++)if("="!==e[u]){if(!(e[u]in Hi))throw new TypeError("Invalid character ".concat(e[u]," in base64 string."));i|=Hi[e[u]]<<6*(s-u),a+=6}else i>>=6;var c=o/4*3;i>>=a%8;for(var l=Math.floor(a/8),f=0;f<l;f++){var d=8*(l-f-1);r.setUint8(c+f,(i&255<<d)>>d)}}return new Uint8Array(n)}function Xi(e){for(var t="",n=0;n<e.length;n+=3){for(var r=0,o=0,i=n,a=Math.min(n+3,e.length);i<a;i++)r|=e[i]<<8*(a-i-1),o+=8;var u=Math.ceil(o/6);r<<=6*u-o;for(var s=1;s<=u;s++){var c=6*(u-s);t+=Gi[(r&63<<c)>>c]}t+="==".slice(0,4-u)}return t}var Ji=function(e){return"function"==typeof Blob&&e instanceof Blob?function(e){return Object(r.e)(this,void 0,void 0,(function(){var t,n;return Object(r.g)(this,(function(r){switch(r.label){case 0:return[4,Qi(e)];case 1:return t=r.sent(),n=Zi(t),[2,new Uint8Array(n)]}}))}))}(e):function(e){return Object(r.e)(this,void 0,void 0,(function(){var t,n,o,i,a,u,s;return Object(r.g)(this,(function(r){switch(r.label){case 0:t=new Uint8Array(0),n=e.getReader(),o=!1,r.label=1;case 1:return o?[3,3]:[4,n.read()];case 2:return i=r.sent(),a=i.done,(u=i.value)&&(s=t,(t=new Uint8Array(s.length+u.length)).set(s),t.set(u,s.length)),o=a,[3,1];case 3:return[2,t]}}))}))}(e)};function Qi(e){return new Promise((function(t,n){var r=new FileReader;r.onloadend=function(){var e;if(2!==r.readyState)return n(new Error("Reader aborted too early"));var o=null!==(e=r.result)&&void 0!==e?e:"",i=o.indexOf(","),a=i>-1?i+1:o.length;t(o.substring(a))},r.onabort=function(){return n(new Error("Read aborted"))},r.onerror=function(){return n(r.error)},r.readAsDataURL(e)}))}var ea=function(e){return function(){throw new Error(e)}},ta=function(e){return function(){return Promise.reject(e)}},na=function(e){if("string"==typeof e){for(var t=e.length,n=t-1;n>=0;n--){var r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&n--}return t}if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;throw new Error("Body Length computation failed for ".concat(e))},ra=function(e){var t=e.serviceId,n=e.clientVersion;return function(){return Object(r.e)(void 0,void 0,void 0,(function(){var e,o,i,a,u,s,c,l,f;return Object(r.g)(this,(function(r){return e="undefined"!=typeof window&&(null===(i=null===window||void 0===window?void 0:window.navigator)||void 0===i?void 0:i.userAgent)?V.a.parse(window.navigator.userAgent):void 0,o=[["aws-sdk-js",n],["os/".concat((null===(a=null==e?void 0:e.os)||void 0===a?void 0:a.name)||"other"),null===(u=null==e?void 0:e.os)||void 0===u?void 0:u.version],["lang/js"],["md/browser","".concat(null!==(c=null===(s=null==e?void 0:e.browser)||void 0===s?void 0:s.name)&&void 0!==c?c:"unknown","_").concat(null!==(f=null===(l=null==e?void 0:e.browser)||void 0===l?void 0:l.version)&&void 0!==f?f:"unknown")]],t&&o.push(["api/".concat(t),n]),[2,o]}))}))}};var oa=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e.charCodeAt(n);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(n+1<e.length&&55296==(64512&o)&&56320==(64512&e.charCodeAt(n+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(o>>12|224,o>>6&63|128,63&o|128)}return Uint8Array.from(t)}(e)},ia=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",n=0,r=e.length;n<r;n++){var o=e[n];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){var i=e[++n];t+=String.fromCharCode((31&o)<<6|63&i)}else if(240<=o&&o<365){var a="%"+[o,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&o)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)};var aa=function(e){if("string"==typeof e)return aa(new URL(e));var t,n=e,o=n.hostname,i=n.pathname,a=n.port,u=n.protocol,s=n.search;return s&&(t=function(e){var t,n,o={};if(e=e.replace(/^\?/,""))try{for(var i=Object(r.k)(e.split("&")),a=i.next();!a.done;a=i.next()){var u=a.value,s=Object(r.h)(u.split("="),2),c=s[0],l=s[1],f=void 0===l?null:l;c=decodeURIComponent(c),f&&(f=decodeURIComponent(f)),c in o?Array.isArray(o[c])?o[c].push(f):o[c]=[o[c],f]:o[c]=f}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return o}(s)),{hostname:o,port:a?parseInt(a):void 0,protocol:u,path:i,query:t}},ua={},sa={aws:{regions:["af-south-1","ap-east-1","ap-northeast-1","ap-northeast-2","ap-northeast-3","ap-south-1","ap-southeast-1","ap-southeast-2","ap-southeast-3","ca-central-1","eu-central-1","eu-north-1","eu-south-1","eu-west-1","eu-west-2","eu-west-3","me-central-1","me-south-1","sa-east-1","us-east-1","us-east-2","us-west-1","us-west-2"],regionRegex:"^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",variants:[{hostname:"runtime-v2-lex.{region}.amazonaws.com",tags:[]},{hostname:"runtime-v2-lex-fips.{region}.amazonaws.com",tags:["fips"]},{hostname:"runtime-v2-lex-fips.{region}.api.aws",tags:["dualstack","fips"]},{hostname:"runtime-v2-lex.{region}.api.aws",tags:["dualstack"]}]},"aws-cn":{regions:["cn-north-1","cn-northwest-1"],regionRegex:"^cn\\-\\w+\\-\\d+$",variants:[{hostname:"runtime-v2-lex.{region}.amazonaws.com.cn",tags:[]},{hostname:"runtime-v2-lex-fips.{region}.amazonaws.com.cn",tags:["fips"]},{hostname:"runtime-v2-lex-fips.{region}.api.amazonwebservices.com.cn",tags:["dualstack","fips"]},{hostname:"runtime-v2-lex.{region}.api.amazonwebservices.com.cn",tags:["dualstack"]}]},"aws-iso":{regions:["us-iso-east-1","us-iso-west-1"],regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",variants:[{hostname:"runtime-v2-lex.{region}.c2s.ic.gov",tags:[]},{hostname:"runtime-v2-lex-fips.{region}.c2s.ic.gov",tags:["fips"]}]},"aws-iso-b":{regions:["us-isob-east-1"],regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",variants:[{hostname:"runtime-v2-lex.{region}.sc2s.sgov.gov",tags:[]},{hostname:"runtime-v2-lex-fips.{region}.sc2s.sgov.gov",tags:["fips"]}]},"aws-us-gov":{regions:["us-gov-east-1","us-gov-west-1"],regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",variants:[{hostname:"runtime-v2-lex.{region}.amazonaws.com",tags:[]},{hostname:"runtime-v2-lex-fips.{region}.amazonaws.com",tags:["fips"]},{hostname:"runtime-v2-lex-fips.{region}.api.aws",tags:["dualstack","fips"]},{hostname:"runtime-v2-lex.{region}.api.aws",tags:["dualstack"]}]}},ca=function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){return Object(r.g)(this,(function(n){return[2,mr(e,Object(r.a)(Object(r.a)({},t),{signingService:"lex",regionHash:ua,partitionHash:sa}))]}))}))},la=["in-region","cross-region","mobile","standard","legacy"],fa=function(){var e,t,n="undefined"!=typeof window&&(null===(e=null===window||void 0===window?void 0:window.navigator)||void 0===e?void 0:e.userAgent)?V.a.parse(window.navigator.userAgent):void 0,r=null===(t=null==n?void 0:n.platform)||void 0===t?void 0:t.type;return"tablet"===r||"mobile"===r},da=function(e){var t,n,o,i,a,u,s,c,l,f,d,p,h,v,y,b,m,g=function(e){var t=(void 0===e?{}:e).defaultsMode;return eo((function(){return Object(r.e)(void 0,void 0,void 0,(function(){var e,n;return Object(r.g)(this,(function(r){switch(r.label){case 0:return"function"!=typeof t?[3,2]:[4,t()];case 1:return n=r.sent(),[3,3];case 2:n=t,r.label=3;case 3:switch(null==(e=n)?void 0:e.toLowerCase()){case"auto":return[2,Promise.resolve(fa()?"mobile":"standard")];case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return[2,Promise.resolve(null==e?void 0:e.toLocaleLowerCase())];case void 0:return[2,Promise.resolve("legacy")];default:throw new Error('Invalid parameter for "defaultsMode", expect '.concat(la.join(", "),", got ").concat(e))}return[2]}}))}))}))}(e),w=function(){return g().then(ci)},O=function(e){var t,n,r,o,i;return{apiVersion:"2020-08-07",disableHostPrefix:null!==(t=null==e?void 0:e.disableHostPrefix)&&void 0!==t&&t,logger:null!==(n=null==e?void 0:e.logger)&&void 0!==n?n:{},regionInfoProvider:null!==(r=null==e?void 0:e.regionInfoProvider)&&void 0!==r?r:ca,serviceId:null!==(o=null==e?void 0:e.serviceId)&&void 0!==o?o:"Lex Runtime V2",urlParser:null!==(i=null==e?void 0:e.urlParser)&&void 0!==i?i:aa}}(e);return Object(r.a)(Object(r.a)(Object(r.a)({},O),e),{runtime:"browser",defaultsMode:g,base64Decoder:null!==(t=null==e?void 0:e.base64Decoder)&&void 0!==t?t:Zi,base64Encoder:null!==(n=null==e?void 0:e.base64Encoder)&&void 0!==n?n:Xi,bodyLengthChecker:null!==(o=null==e?void 0:e.bodyLengthChecker)&&void 0!==o?o:na,credentialDefaultProvider:null!==(i=null==e?void 0:e.credentialDefaultProvider)&&void 0!==i?i:function(e){return function(){return Promise.reject(new Error("Credential is missing"))}},defaultUserAgentProvider:null!==(a=null==e?void 0:e.defaultUserAgentProvider)&&void 0!==a?a:ra({serviceId:O.serviceId,clientVersion:vi.version}),eventStreamPayloadHandlerProvider:null!==(u=null==e?void 0:e.eventStreamPayloadHandlerProvider)&&void 0!==u?u:function(){return{handle:ea("event stream request is not supported in browser.")}},eventStreamSerdeProvider:null!==(s=null==e?void 0:e.eventStreamSerdeProvider)&&void 0!==s?s:zi,maxAttempts:null!==(c=null==e?void 0:e.maxAttempts)&&void 0!==c?c:3,region:null!==(l=null==e?void 0:e.region)&&void 0!==l?l:ta("Region is missing"),requestHandler:null!==(f=null==e?void 0:e.requestHandler)&&void 0!==f?f:new qi(w),retryMode:null!==(d=null==e?void 0:e.retryMode)&&void 0!==d?d:function(){return Object(r.e)(void 0,void 0,void 0,(function(){return Object(r.g)(this,(function(e){switch(e.label){case 0:return[4,w()];case 1:return[2,e.sent().retryMode||Cr]}}))}))},sha256:null!==(p=null==e?void 0:e.sha256)&&void 0!==p?p:yi.Sha256,streamCollector:null!==(h=null==e?void 0:e.streamCollector)&&void 0!==h?h:Ji,useDualstackEndpoint:null!==(v=null==e?void 0:e.useDualstackEndpoint)&&void 0!==v?v:function(){return Promise.resolve(!1)},useFipsEndpoint:null!==(y=null==e?void 0:e.useFipsEndpoint)&&void 0!==y?y:function(){return Promise.resolve(!1)},utf8Decoder:null!==(b=null==e?void 0:e.utf8Decoder)&&void 0!==b?b:oa,utf8Encoder:null!==(m=null==e?void 0:e.utf8Encoder)&&void 0!==m?m:ia})},pa=function(e){function t(t){var n,o,i,a=this,u=function(e){var t=e.region,n=e.useFipsEndpoint;if(!t)throw new Error("Region is missing");return Object(r.a)(Object(r.a)({},e),{region:function(){return Object(r.e)(void 0,void 0,void 0,(function(){var e;return Object(r.g)(this,(function(n){switch(n.label){case 0:return"string"==typeof t?[2,yr(t)]:[4,t()];case 1:return e=n.sent(),[2,yr(e)]}}))}))},useFipsEndpoint:function(){return Object(r.e)(void 0,void 0,void 0,(function(){var e;return Object(r.g)(this,(function(r){switch(r.label){case 0:return"string"!=typeof t?[3,1]:(e=t,[3,3]);case 1:return[4,t()];case 2:e=r.sent(),r.label=3;case 3:return vr(e)?[2,!0]:[2,"boolean"==typeof n?Promise.resolve(n):n()]}}))}))}})}(da(t)),s=function(e){var t,n=e.credentials?Mo(e.credentials):e.credentialDefaultProvider(e),o=e.signingEscapePath,i=void 0===o||o,a=e.systemClockOffset,u=void 0===a?e.systemClockOffset||0:a,s=e.sha256;return t=e.signer?Co(e.signer):function(){return Co(e.region)().then((function(t){return Object(r.e)(void 0,void 0,void 0,(function(){var n,o,i,a;return Object(r.g)(this,(function(r){switch(r.label){case 0:return o=(n=e).regionInfoProvider,i=[t],a={},[4,e.useFipsEndpoint()];case 1:return a.useFipsEndpoint=r.sent(),[4,e.useDualstackEndpoint()];case 2:return[4,o.apply(n,i.concat([(a.useDualstackEndpoint=r.sent(),a)]))];case 3:return[2,[r.sent()||{},t]]}}))}))})).then((function(t){var o=Object(r.h)(t,2),a=o[0],u=o[1],c=a.signingRegion,l=a.signingService;e.signingRegion=e.signingRegion||c||u,e.signingName=e.signingName||l||e.serviceId;var f=Object(r.a)(Object(r.a)({},e),{credentials:n,region:e.signingRegion,service:e.signingName,sha256:s,uriEscapePath:i});return new(e.signerConstructor||Ao)(f)}))},Object(r.a)(Object(r.a)({},e),{systemClockOffset:u,signingEscapePath:i,credentials:n,signer:t})}(function(e){var t,n=pr(null!==(t=e.maxAttempts)&&void 0!==t?t:3);return Object(r.a)(Object(r.a)({},e),{maxAttempts:n,retryStrategy:function(){return Object(r.e)(void 0,void 0,void 0,(function(){return Object(r.g)(this,(function(t){switch(t.label){case 0:return e.retryStrategy?[2,e.retryStrategy]:[4,pr(e.retryMode)()];case 1:return t.sent()===_r.ADAPTIVE?[2,new Zr(n)]:[2,new Wr(n)]}}))}))}})}(hr(u))),c=function(e){return Object(r.a)(Object(r.a)({},e),{eventStreamMarshaller:e.eventStreamSerdeProvider(e)})}(function(e){return Object(r.a)(Object(r.a)({},e),{customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent})}((o=(n=s).signer,i=n.eventStreamPayloadHandlerProvider(Object(r.a)(Object(r.a)({},n),{eventSigner:o})),Object(r.a)(Object(r.a)({},n),{eventSigner:o,eventStreamPayloadHandler:i}))));return(a=e.call(this,c)||this).config=c,a.middlewareStack.use(Jr(a.config)),a.middlewareStack.use(Sr(a.config)),a.middlewareStack.use(Er(a.config)),a.middlewareStack.use(Ar(a.config)),a.middlewareStack.use(Object(Tr.a)(a.config)),a.middlewareStack.use(Do(a.config)),a.middlewareStack.use(Fo(a.config)),a}return Object(r.f)(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(Go),ha={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},va={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function ya(e,t,n){return{applyToStack:function(o){o.add(function(e,t){return function(n,o){return function(o){return Object(r.e)(void 0,void 0,void 0,(function(){var i,a,u;return Object(r.g)(this,(function(r){switch(r.label){case 0:return[4,n(o)];case 1:i=r.sent().response,r.label=2;case 2:return r.trys.push([2,4,,5]),[4,t(i,e)];case 3:return a=r.sent(),[2,{response:i,output:a}];case 4:throw u=r.sent(),Object.defineProperty(u,"$response",{value:i}),u;case 5:return[2]}}))}))}}}(e,n),ha),o.add(function(e,t){return function(n,o){return function(o){return Object(r.e)(void 0,void 0,void 0,(function(){var i;return Object(r.g)(this,(function(a){switch(a.label){case 0:return[4,t(o.input,e)];case 1:return i=a.sent(),[2,n(Object(r.a)(Object(r.a)({},o),{request:i}))]}}))}))}}}(e,t),va)}}}var ba,ma,ga,wa,Oa,Sa,_a,ja=function(e){function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return Object(r.f)(t,e),t}(ii),Ea=function(e){function t(n){var o=e.call(this,Object(r.a)({name:"AccessDeniedException",$fault:"client"},n))||this;return o.name="AccessDeniedException",o.$fault="client",Object.setPrototypeOf(o,t.prototype),o}return Object(r.f)(t,e),t}(ja),xa=function(e){function t(n){var o=e.call(this,Object(r.a)({name:"ConflictException",$fault:"client"},n))||this;return o.name="ConflictException",o.$fault="client",Object.setPrototypeOf(o,t.prototype),o}return Object(r.f)(t,e),t}(ja),Aa=function(e){function t(n){var o=e.call(this,Object(r.a)({name:"InternalServerException",$fault:"server"},n))||this;return o.name="InternalServerException",o.$fault="server",Object.setPrototypeOf(o,t.prototype),o}return Object(r.f)(t,e),t}(ja),Ta=function(e){function t(n){var o=e.call(this,Object(r.a)({name:"ResourceNotFoundException",$fault:"client"},n))||this;return o.name="ResourceNotFoundException",o.$fault="client",Object.setPrototypeOf(o,t.prototype),o}return Object(r.f)(t,e),t}(ja),Pa=function(e){function t(n){var o=e.call(this,Object(r.a)({name:"ThrottlingException",$fault:"client"},n))||this;return o.name="ThrottlingException",o.$fault="client",Object.setPrototypeOf(o,t.prototype),o}return Object(r.f)(t,e),t}(ja),Ca=function(e){function t(n){var o=e.call(this,Object(r.a)({name:"ValidationException",$fault:"client"},n))||this;return o.name="ValidationException",o.$fault="client",Object.setPrototypeOf(o,t.prototype),o}return Object(r.f)(t,e),t}(ja);!function(e){e.CONFIRMED="Confirmed",e.DENIED="Denied",e.NONE="None"}(ba||(ba={})),function(e){e.COMPOSITE="Composite",e.LIST="List",e.SCALAR="Scalar"}(ma||(ma={})),function(e){e.FAILED="Failed",e.FULFILLED="Fulfilled",e.FULFILLMENT_IN_PROGRESS="FulfillmentInProgress",e.IN_PROGRESS="InProgress",e.READY_FOR_FULFILLMENT="ReadyForFulfillment",e.WAITING="Waiting"}(ga||(ga={})),function(e){e.MIXED="MIXED",e.NEGATIVE="NEGATIVE",e.NEUTRAL="NEUTRAL",e.POSITIVE="POSITIVE"}(wa||(wa={})),function(e){e.CUSTOM_PAYLOAD="CustomPayload",e.IMAGE_RESPONSE_CARD="ImageResponseCard",e.PLAIN_TEXT="PlainText",e.SSML="SSML"}(Oa||(Oa={})),function(e){e.DEFAULT="Default",e.SPELL_BY_LETTER="SpellByLetter",e.SPELL_BY_WORD="SpellByWord"}(Sa||(Sa={})),function(e){e.CLOSE="Close",e.CONFIRM_INTENT="ConfirmIntent",e.DELEGATE="Delegate",e.ELICIT_INTENT="ElicitIntent",e.ELICIT_SLOT="ElicitSlot",e.NONE="None"}(_a||(_a={}));var Ma,Ia,Ra,ka,La,Da=function(e){function t(n){var o=e.call(this,Object(r.a)({name:"BadGatewayException",$fault:"server"},n))||this;return o.name="BadGatewayException",o.$fault="server",Object.setPrototypeOf(o,t.prototype),o}return Object(r.f)(t,e),t}(ja),Ua=function(e){function t(n){var o=e.call(this,Object(r.a)({name:"DependencyFailedException",$fault:"client"},n))||this;return o.name="DependencyFailedException",o.$fault="client",Object.setPrototypeOf(o,t.prototype),o}return Object(r.f)(t,e),t}(ja);!function(e){e.AUDIO="AUDIO",e.TEXT="TEXT"}(Ma||(Ma={})),function(e){e.DTMF="DTMF",e.SPEECH="Speech",e.TEXT="Text"}(Ia||(Ia={})),function(e){e.DTMF_START_DETECTED="DTMF_START_DETECTED",e.TEXT_DETECTED="TEXT_DETECTED",e.VOICE_START_DETECTED="VOICE_START_DETECTED"}(Ra||(Ra={})),function(e){e.visit=function(e,t){return void 0!==e.ConfigurationEvent?t.ConfigurationEvent(e.ConfigurationEvent):void 0!==e.AudioInputEvent?t.AudioInputEvent(e.AudioInputEvent):void 0!==e.DTMFInputEvent?t.DTMFInputEvent(e.DTMFInputEvent):void 0!==e.TextInputEvent?t.TextInputEvent(e.TextInputEvent):void 0!==e.PlaybackCompletionEvent?t.PlaybackCompletionEvent(e.PlaybackCompletionEvent):void 0!==e.DisconnectionEvent?t.DisconnectionEvent(e.DisconnectionEvent):t._(e.$unknown[0],e.$unknown[1])}}(ka||(ka={})),function(e){e.visit=function(e,t){return void 0!==e.PlaybackInterruptionEvent?t.PlaybackInterruptionEvent(e.PlaybackInterruptionEvent):void 0!==e.TranscriptEvent?t.TranscriptEvent(e.TranscriptEvent):void 0!==e.IntentResultEvent?t.IntentResultEvent(e.IntentResultEvent):void 0!==e.TextResponseEvent?t.TextResponseEvent(e.TextResponseEvent):void 0!==e.AudioResponseEvent?t.AudioResponseEvent(e.AudioResponseEvent):void 0!==e.HeartbeatEvent?t.HeartbeatEvent(e.HeartbeatEvent):void 0!==e.AccessDeniedException?t.AccessDeniedException(e.AccessDeniedException):void 0!==e.ResourceNotFoundException?t.ResourceNotFoundException(e.ResourceNotFoundException):void 0!==e.ValidationException?t.ValidationException(e.ValidationException):void 0!==e.ThrottlingException?t.ThrottlingException(e.ThrottlingException):void 0!==e.InternalServerException?t.InternalServerException(e.InternalServerException):void 0!==e.ConflictException?t.ConflictException(e.ConflictException):void 0!==e.DependencyFailedException?t.DependencyFailedException(e.DependencyFailedException):void 0!==e.BadGatewayException?t.BadGatewayException(e.BadGatewayException):t._(e.$unknown[0],e.$unknown[1])}}(La||(La={}));var Ba=function(e){return Object(r.a)(Object(r.a)({},e),e.content&&{content:$o})},Na=function(e){return Object(r.a)(Object(r.a)(Object(r.a)({},e),e.sessionState&&{sessionState:$o}),e.requestAttributes&&{requestAttributes:$o})},Fa=function(e){return Object(r.a)({},e)},za=function(e){return Object(r.a)(Object(r.a)({},e),e.text&&{text:$o})},qa=function(e){return Object(r.a)(Object(r.a)({},e),e.messages&&{messages:e.messages.map((function(e){return Ba(e)}))})},Ha=function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var n,o,i,a,u;return Object(r.g)(this,(function(s){switch(s.label){case 0:return o=[Object(r.a)({},e)],u={},[4,Gu(e.body,t)];case 1:switch(n=r.a.apply(void 0,o.concat([(u.body=s.sent(),u)])),i=Vu(e,n.body),i){case"AccessDeniedException":case"com.amazonaws.lexruntimev2#AccessDeniedException":return[3,2];case"BadGatewayException":case"com.amazonaws.lexruntimev2#BadGatewayException":return[3,4];case"ConflictException":case"com.amazonaws.lexruntimev2#ConflictException":return[3,6];case"DependencyFailedException":case"com.amazonaws.lexruntimev2#DependencyFailedException":return[3,8];case"InternalServerException":case"com.amazonaws.lexruntimev2#InternalServerException":return[3,10];case"ResourceNotFoundException":case"com.amazonaws.lexruntimev2#ResourceNotFoundException":return[3,12];case"ThrottlingException":case"com.amazonaws.lexruntimev2#ThrottlingException":return[3,14];case"ValidationException":case"com.amazonaws.lexruntimev2#ValidationException":return[3,16]}return[3,18];case 2:return[4,$a(n,t)];case 3:throw s.sent();case 4:return[4,Wa(n,t)];case 5:throw s.sent();case 6:return[4,Ka(n,t)];case 7:throw s.sent();case 8:return[4,Ya(n,t)];case 9:throw s.sent();case 10:return[4,Za(n,t)];case 11:throw s.sent();case 12:return[4,Xa(n,t)];case 13:throw s.sent();case 14:return[4,Ja(n,t)];case 15:throw s.sent();case 16:return[4,Qa(n,t)];case 17:throw s.sent();case 18:a=n.body,ui({output:e,parsedBody:a,exceptionCtor:ja,errorCode:i}),s.label=19;case 19:return[2]}}))}))},Ga=function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var n,o,i,a,u;return Object(r.g)(this,(function(s){switch(s.label){case 0:return o=[Object(r.a)({},e)],u={},[4,Gu(e.body,t)];case 1:switch(n=r.a.apply(void 0,o.concat([(u.body=s.sent(),u)])),i=Vu(e,n.body),i){case"AccessDeniedException":case"com.amazonaws.lexruntimev2#AccessDeniedException":return[3,2];case"BadGatewayException":case"com.amazonaws.lexruntimev2#BadGatewayException":return[3,4];case"ConflictException":case"com.amazonaws.lexruntimev2#ConflictException":return[3,6];case"DependencyFailedException":case"com.amazonaws.lexruntimev2#DependencyFailedException":return[3,8];case"InternalServerException":case"com.amazonaws.lexruntimev2#InternalServerException":return[3,10];case"ResourceNotFoundException":case"com.amazonaws.lexruntimev2#ResourceNotFoundException":return[3,12];case"ThrottlingException":case"com.amazonaws.lexruntimev2#ThrottlingException":return[3,14];case"ValidationException":case"com.amazonaws.lexruntimev2#ValidationException":return[3,16]}return[3,18];case 2:return[4,$a(n,t)];case 3:throw s.sent();case 4:return[4,Wa(n,t)];case 5:throw s.sent();case 6:return[4,Ka(n,t)];case 7:throw s.sent();case 8:return[4,Ya(n,t)];case 9:throw s.sent();case 10:return[4,Za(n,t)];case 11:throw s.sent();case 12:return[4,Xa(n,t)];case 13:throw s.sent();case 14:return[4,Ja(n,t)];case 15:throw s.sent();case 16:return[4,Qa(n,t)];case 17:throw s.sent();case 18:a=n.body,ui({output:e,parsedBody:a,exceptionCtor:ja,errorCode:i}),s.label=19;case 19:return[2]}}))}))},Va=di,$a=function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var t,n,o;return Object(r.g)(this,(function(i){return t=Va({}),null!=(n=e.body).message&&(t.message=ei(n.message)),o=new Ea(Object(r.a)({$metadata:zu(e)},t)),[2,ai(o,e.body)]}))}))},Wa=function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var t,n,o;return Object(r.g)(this,(function(i){return t=Va({}),null!=(n=e.body).message&&(t.message=ei(n.message)),o=new Da(Object(r.a)({$metadata:zu(e)},t)),[2,ai(o,e.body)]}))}))},Ka=function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var t,n,o;return Object(r.g)(this,(function(i){return t=Va({}),null!=(n=e.body).message&&(t.message=ei(n.message)),o=new xa(Object(r.a)({$metadata:zu(e)},t)),[2,ai(o,e.body)]}))}))},Ya=function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var t,n,o;return Object(r.g)(this,(function(i){return t=Va({}),null!=(n=e.body).message&&(t.message=ei(n.message)),o=new Ua(Object(r.a)({$metadata:zu(e)},t)),[2,ai(o,e.body)]}))}))},Za=function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var t,n,o;return Object(r.g)(this,(function(i){return t=Va({}),null!=(n=e.body).message&&(t.message=ei(n.message)),o=new Aa(Object(r.a)({$metadata:zu(e)},t)),[2,ai(o,e.body)]}))}))},Xa=function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var t,n,o;return Object(r.g)(this,(function(i){return t=Va({}),null!=(n=e.body).message&&(t.message=ei(n.message)),o=new Ta(Object(r.a)({$metadata:zu(e)},t)),[2,ai(o,e.body)]}))}))},Ja=function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var t,n,o;return Object(r.g)(this,(function(i){return t=Va({}),null!=(n=e.body).message&&(t.message=ei(n.message)),o=new Pa(Object(r.a)({$metadata:zu(e)},t)),[2,ai(o,e.body)]}))}))},Qa=function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var t,n,o;return Object(r.g)(this,(function(i){return t=Va({}),null!=(n=e.body).message&&(t.message=ei(n.message)),o=new Ca(Object(r.a)({$metadata:zu(e)},t)),[2,ai(o,e.body)]}))}))},eu=function(e,t){return Object.entries(e).reduce((function(e,t){var n,o=Object(r.h)(t,2),i=o[0],a=o[1];return null===a?e:Object(r.a)(Object(r.a)({},e),((n={})[i]=a,n))}),{})},tu=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return function(e,t){return Object(r.a)(Object(r.a)(Object(r.a)({},null!=e.contextAttributes&&{contextAttributes:eu(e.contextAttributes,t)}),null!=e.name&&{name:e.name}),null!=e.timeToLive&&{timeToLive:nu(e.timeToLive,t)})}(e,t)}))},nu=function(e,t){return Object(r.a)(Object(r.a)({},null!=e.timeToLiveInSeconds&&{timeToLiveInSeconds:e.timeToLiveInSeconds}),null!=e.turnsToLive&&{turnsToLive:e.turnsToLive})},ru=function(e,t){return Object(r.a)(Object(r.a)(Object(r.a)(Object(r.a)({},null!=e.slotElicitationStyle&&{slotElicitationStyle:e.slotElicitationStyle}),null!=e.slotToElicit&&{slotToElicit:e.slotToElicit}),null!=e.subSlotToElicit&&{subSlotToElicit:ou(e.subSlotToElicit,t)}),null!=e.type&&{type:e.type})},ou=function(e,t){return Object(r.a)(Object(r.a)({},null!=e.name&&{name:e.name}),null!=e.subSlotToElicit&&{subSlotToElicit:ou(e.subSlotToElicit,t)})},iu=function(e,t){return Object(r.a)(Object(r.a)(Object(r.a)(Object(r.a)({},null!=e.confirmationState&&{confirmationState:e.confirmationState}),null!=e.name&&{name:e.name}),null!=e.slots&&{slots:du(e.slots,t)}),null!=e.state&&{state:e.state})},au=function(e,t){return Object(r.a)({},null!=e.slotHints&&{slotHints:lu(e.slotHints,t)})},uu=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return function(e,t){return Object(r.a)({},null!=e.phrase&&{phrase:e.phrase})}(e)}))},su=function(e,t){return Object(r.a)(Object(r.a)(Object(r.a)(Object(r.a)(Object(r.a)(Object(r.a)({},null!=e.activeContexts&&{activeContexts:tu(e.activeContexts,t)}),null!=e.dialogAction&&{dialogAction:ru(e.dialogAction,t)}),null!=e.intent&&{intent:iu(e.intent,t)}),null!=e.originatingRequestId&&{originatingRequestId:e.originatingRequestId}),null!=e.runtimeHints&&{runtimeHints:au(e.runtimeHints,t)}),null!=e.sessionAttributes&&{sessionAttributes:hu(e.sessionAttributes,t)})},cu=function(e,t){return Object(r.a)(Object(r.a)(Object(r.a)(Object(r.a)({},null!=e.shape&&{shape:e.shape}),null!=e.subSlots&&{subSlots:du(e.subSlots,t)}),null!=e.value&&{value:vu(e.value,t)}),null!=e.values&&{values:yu(e.values,t)})},lu=function(e,t){return Object.entries(e).reduce((function(e,n){var o,i=Object(r.h)(n,2),a=i[0],u=i[1];return null===u?e:Object(r.a)(Object(r.a)({},e),((o={})[a]=fu(u,t),o))}),{})},fu=function(e,t){return Object.entries(e).reduce((function(e,n){var o,i=Object(r.h)(n,2),a=i[0],u=i[1];return null===u?e:Object(r.a)(Object(r.a)({},e),((o={})[a]=function(e,t){return Object(r.a)(Object(r.a)({},null!=e.runtimeHintValues&&{runtimeHintValues:uu(e.runtimeHintValues,t)}),null!=e.subSlotHints&&{subSlotHints:fu(e.subSlotHints,t)})}(u,t),o))}),{})},du=function(e,t){return Object.entries(e).reduce((function(e,n){var o,i=Object(r.h)(n,2),a=i[0],u=i[1];return null===u?e:Object(r.a)(Object(r.a)({},e),((o={})[a]=cu(u,t),o))}),{})},pu=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return e}))},hu=function(e,t){return Object.entries(e).reduce((function(e,t){var n,o=Object(r.h)(t,2),i=o[0],a=o[1];return null===a?e:Object(r.a)(Object(r.a)({},e),((n={})[i]=a,n))}),{})},vu=function(e,t){return Object(r.a)(Object(r.a)(Object(r.a)({},null!=e.interpretedValue&&{interpretedValue:e.interpretedValue}),null!=e.originalValue&&{originalValue:e.originalValue}),null!=e.resolvedValues&&{resolvedValues:pu(e.resolvedValues)})},yu=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return cu(e,t)}))},bu=function(e,t){return Object.entries(e).reduce((function(e,t){var n,o=Object(r.h)(t,2),i=o[0],a=o[1];return null===a?e:Object(r.a)(Object(r.a)({},e),((n={})[i]=ei(a),n))}),{})},mu=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{contextAttributes:null!=e.contextAttributes?bu(e.contextAttributes,t):void 0,name:ei(e.name),timeToLive:null!=e.timeToLive?gu(e.timeToLive,t):void 0}}(e,t)}))},gu=function(e,t){return{timeToLiveInSeconds:Yo(e.timeToLiveInSeconds),turnsToLive:Yo(e.turnsToLive)}},wu=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{text:ei(e.text),value:ei(e.value)}}(e)}))},Ou=function(e,t){return{score:ti(e.score)}},Su=function(e,t){return{slotElicitationStyle:ei(e.slotElicitationStyle),slotToElicit:ei(e.slotToElicit),subSlotToElicit:null!=e.subSlotToElicit?_u(e.subSlotToElicit,t):void 0,type:ei(e.type)}},_u=function(e,t){return{name:ei(e.name),subSlotToElicit:null!=e.subSlotToElicit?_u(e.subSlotToElicit,t):void 0}},ju=function(e,t){return{buttons:null!=e.buttons?wu(e.buttons):void 0,imageUrl:ei(e.imageUrl),subtitle:ei(e.subtitle),title:ei(e.title)}},Eu=function(e,t){return{confirmationState:ei(e.confirmationState),name:ei(e.name),slots:null!=e.slots?Du(e.slots,t):void 0,state:ei(e.state)}},xu=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{intent:null!=e.intent?Eu(e.intent,t):void 0,nluConfidence:null!=e.nluConfidence?Ou(e.nluConfidence):void 0,sentimentResponse:null!=e.sentimentResponse?Cu(e.sentimentResponse,t):void 0}}(e,t)}))},Au=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{content:ei(e.content),contentType:ei(e.contentType),imageResponseCard:null!=e.imageResponseCard?ju(e.imageResponseCard):void 0}}(e)}))},Tu=function(e,t){return{slotHints:null!=e.slotHints?ku(e.slotHints,t):void 0}},Pu=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{phrase:ei(e.phrase)}}(e)}))},Cu=function(e,t){return{sentiment:ei(e.sentiment),sentimentScore:null!=e.sentimentScore?Mu(e.sentimentScore,t):void 0}},Mu=function(e,t){return{mixed:ti(e.mixed),negative:ti(e.negative),neutral:ti(e.neutral),positive:ti(e.positive)}},Iu=function(e,t){return{activeContexts:null!=e.activeContexts?mu(e.activeContexts,t):void 0,dialogAction:null!=e.dialogAction?Su(e.dialogAction,t):void 0,intent:null!=e.intent?Eu(e.intent,t):void 0,originatingRequestId:ei(e.originatingRequestId),runtimeHints:null!=e.runtimeHints?Tu(e.runtimeHints,t):void 0,sessionAttributes:null!=e.sessionAttributes?Bu(e.sessionAttributes,t):void 0}},Ru=function(e,t){return{shape:ei(e.shape),subSlots:null!=e.subSlots?Du(e.subSlots,t):void 0,value:null!=e.value?Nu(e.value,t):void 0,values:null!=e.values?Fu(e.values,t):void 0}},ku=function(e,t){return Object.entries(e).reduce((function(e,n){var o,i=Object(r.h)(n,2),a=i[0],u=i[1];return null===u?e:Object(r.a)(Object(r.a)({},e),((o={})[a]=Lu(u,t),o))}),{})},Lu=function(e,t){return Object.entries(e).reduce((function(e,n){var o,i=Object(r.h)(n,2),a=i[0],u=i[1];return null===u?e:Object(r.a)(Object(r.a)({},e),((o={})[a]=function(e,t){return{runtimeHintValues:null!=e.runtimeHintValues?Pu(e.runtimeHintValues,t):void 0,subSlotHints:null!=e.subSlotHints?Lu(e.subSlotHints,t):void 0}}(u,t),o))}),{})},Du=function(e,t){return Object.entries(e).reduce((function(e,n){var o,i=Object(r.h)(n,2),a=i[0],u=i[1];return null===u?e:Object(r.a)(Object(r.a)({},e),((o={})[a]=Ru(u,t),o))}),{})},Uu=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:ei(e)}))},Bu=function(e,t){return Object.entries(e).reduce((function(e,t){var n,o=Object(r.h)(t,2),i=o[0],a=o[1];return null===a?e:Object(r.a)(Object(r.a)({},e),((n={})[i]=ei(a),n))}),{})},Nu=function(e,t){return{interpretedValue:ei(e.interpretedValue),originalValue:ei(e.originalValue),resolvedValues:null!=e.resolvedValues?Uu(e.resolvedValues):void 0}},Fu=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:Ru(e,t)}))},zu=function(e){var t;return{httpStatusCode:e.statusCode,requestId:null!==(t=e.headers["x-amzn-requestid"])&&void 0!==t?t:e.headers["x-amzn-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}},qu=function(e,t){return function(e,t){return void 0===e&&(e=new Uint8Array),e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array)}(e,t).then((function(e){return t.utf8Encoder(e)}))},Hu=function(e){return!(null==e||""===e||Object.getOwnPropertyNames(e).includes("length")&&0==e.length||Object.getOwnPropertyNames(e).includes("size")&&0==e.size)},Gu=function(e,t){return qu(e,t).then((function(e){return e.length?JSON.parse(e):{}}))},Vu=function(e,t){var n,r,o=function(e){var t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},i=(n=e.headers,r="x-amzn-errortype",Object.keys(n).find((function(e){return e.toLowerCase()===r.toLowerCase()})));return void 0!==i?o(e.headers[i]):void 0!==t.code?o(t.code):void 0!==t.__type?o(t.__type):void 0},$u=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return Object(r.f)(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(ya(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"LexRuntimeV2Client",commandName:"RecognizeTextCommand",inputFilterSensitiveLog:za,outputFilterSensitiveLog:qa},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var n,o,i,a,u,s,c,l,f;return Object(r.g)(this,(function(d){switch(d.label){case 0:return[4,t.endpoint()];case 1:return n=d.sent(),o=n.hostname,i=n.protocol,a=void 0===i?"https":i,u=n.port,s=n.path,c={"content-type":"application/json"},l="".concat((null==s?void 0:s.endsWith("/"))?s.slice(0,-1):s||"")+"/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/text",l=hi(l,e,"botId",(function(){return e.botId}),"{botId}",!1),l=hi(l,e,"botAliasId",(function(){return e.botAliasId}),"{botAliasId}",!1),l=hi(l,e,"localeId",(function(){return e.localeId}),"{localeId}",!1),l=hi(l,e,"sessionId",(function(){return e.sessionId}),"{sessionId}",!1),f=JSON.stringify(Object(r.a)(Object(r.a)(Object(r.a)({},null!=e.requestAttributes&&{requestAttributes:hu(e.requestAttributes,t)}),null!=e.sessionState&&{sessionState:su(e.sessionState,t)}),null!=e.text&&{text:e.text})),[2,new gr({protocol:a,hostname:o,port:u,method:"POST",headers:c,path:l,body:f})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var n,o,i,a;return Object(r.g)(this,(function(r){switch(r.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,Ha(e,t)]:(n=Va({$metadata:zu(e)}),i=Jo,a=Qo,[4,Gu(e.body,t)]);case 1:return null!=(o=i.apply(void 0,[a.apply(void 0,[r.sent()]),"body"])).interpretations&&(n.interpretations=xu(o.interpretations,t)),null!=o.messages&&(n.messages=Au(o.messages,t)),null!=o.requestAttributes&&(n.requestAttributes=Bu(o.requestAttributes,t)),null!=o.sessionId&&(n.sessionId=ei(o.sessionId)),null!=o.sessionState&&(n.sessionState=Iu(o.sessionState,t)),[2,n]}}))}))}(e,t)},t}(Vo),Wu=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return Object(r.f)(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(ya(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"LexRuntimeV2Client",commandName:"RecognizeUtteranceCommand",inputFilterSensitiveLog:Na,outputFilterSensitiveLog:Fa},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var n,o,i,a,u,s,c,l,f;return Object(r.g)(this,(function(r){switch(r.label){case 0:return[4,t.endpoint()];case 1:return n=r.sent(),o=n.hostname,i=n.protocol,a=void 0===i?"https":i,u=n.port,s=n.path,c=Va({},Hu,{"x-amz-content-sha256":"UNSIGNED-PAYLOAD","content-type":e.requestContentType||"application/octet-stream","x-amz-lex-session-state":e.sessionState,"x-amz-lex-request-attributes":e.requestAttributes,"response-content-type":e.responseContentType}),l="".concat((null==s?void 0:s.endsWith("/"))?s.slice(0,-1):s||"")+"/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/utterance",l=hi(l,e,"botId",(function(){return e.botId}),"{botId}",!1),l=hi(l,e,"botAliasId",(function(){return e.botAliasId}),"{botAliasId}",!1),l=hi(l,e,"localeId",(function(){return e.localeId}),"{localeId}",!1),l=hi(l,e,"sessionId",(function(){return e.sessionId}),"{sessionId}",!1),void 0!==e.inputStream&&(f=e.inputStream),[2,new gr({protocol:a,hostname:o,port:u,method:"POST",headers:c,path:l,body:f})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var n,o;return Object(r.g)(this,(function(r){return 200!==e.statusCode&&e.statusCode>=300?[2,Ga(e,t)]:(n=Va({$metadata:zu(e),inputMode:[,e.headers["x-amz-lex-input-mode"]],contentType:[,e.headers["content-type"]],messages:[,e.headers["x-amz-lex-messages"]],interpretations:[,e.headers["x-amz-lex-interpretations"]],sessionState:[,e.headers["x-amz-lex-session-state"]],requestAttributes:[,e.headers["x-amz-lex-request-attributes"]],sessionId:[,e.headers["x-amz-lex-session-id"]],inputTranscript:[,e.headers["x-amz-lex-input-transcript"]]}),o=e.body,n.audioStream=o,[2,n])}))}))}(e,t)},t}(Vo),Ku=function(e){return Object(r.e)(void 0,void 0,void 0,(function(){var t,n,o;return Object(r.g)(this,(function(i){switch(i.label){case 0:if(void 0===e)return[2,void 0];i.label=1;case 1:return i.trys.push([1,3,,4]),u=e,t=Uint8Array.from(window.atob(u),(function(e){return e.charCodeAt(0)})),[4,(a=t,Object(r.e)(void 0,void 0,void 0,(function(){return Object(r.g)(this,(function(e){switch(e.label){case 0:return[4,new Promise((function(e,t){tr(a,(function(n,r){n?t(n):e(ir(r))}))}))];case 1:return[2,e.sent()]}}))})))];case 2:return n=i.sent(),[2,JSON.parse(n)];case 3:return o=i.sent(),[2,Promise.reject("unable to decode and decompress "+o)];case 4:return[2]}var a,u}))}))};function Yu(e){return(Yu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Zu=new o.ConsoleLogger("AWSLexV2Provider"),Xu=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n._botsCompleteCallback={},n}return Object(r.f)(t,e),t.prototype.getProviderName=function(){return"AWSLexV2Provider"},t.prototype.configure=function(t){void 0===t&&(t={});var n=["name","botId","aliasId","localeId","providerName","region"];return Object.keys(t).forEach((function(e){var r=t[e];if(!n.every((function(e){return e in r})))throw new Error("invalid bot configuration")})),e.prototype.configure.call(this,t)},t.prototype.sendMessage=function(e,t){return Object(r.e)(this,void 0,void 0,(function(){var n,i,a;return Object(r.g)(this,(function(r){switch(r.label){case 0:if(!this._config[e])return[2,Promise.reject("Bot "+e+" does not exist")];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,o.Credentials.get()];case 2:return n=r.sent(),[3,4];case 3:return r.sent(),[2,Promise.reject("No credentials")];case 4:return this._lexRuntimeServiceV2Client=new pa({region:this._config[e].region,credentials:n,customUserAgent:Object(o.getAmplifyUserAgent)()}),a={botAliasId:this._config[e].aliasId,botId:this._config[e].botId,localeId:this._config[e].localeId,sessionId:n.identityId},"string"!=typeof t?[3,6]:[4,this._handleRecognizeTextCommand(e,t,a)];case 5:return i=r.sent(),[3,8];case 6:return[4,this._handleRecognizeUtteranceCommand(e,t,a)];case 7:i=r.sent(),r.label=8;case 8:return[2,i]}}))}))},t.prototype.onComplete=function(e,t){if(!this._config[e])throw new Error("Bot "+e+" does not exist");this._botsCompleteCallback[e]=t},t.prototype._reportBotStatus=function(e,t){var n,r,o,i,a,u,s=this,c=null==e?void 0:e.sessionState;Zu.debug("postContent state",null===(n=null==c?void 0:c.intent)||void 0===n?void 0:n.state);var l="function"==typeof(null===(r=this._config)||void 0===r?void 0:r[t].onComplete),f="function"==typeof(null===(o=this._botsCompleteCallback)||void 0===o?void 0:o[t]);if((l||f)&&("ReadyForFulfillment"!==(null===(i=null==c?void 0:c.intent)||void 0===i?void 0:i.state)&&"Fulfilled"!==(null===(a=null==c?void 0:c.intent)||void 0===a?void 0:a.state)||(f&&setTimeout((function(){var n;return null===(n=s._botsCompleteCallback)||void 0===n?void 0:n[t](null,e)}),0),l&&setTimeout((function(){return s._config[t].onComplete(null,e)}),0)),"Failed"===(null===(u=null==c?void 0:c.intent)||void 0===u?void 0:u.state))){var d=new Error("Bot conversation failed");f&&setTimeout((function(){return s._botsCompleteCallback[t](d)}),0),l&&setTimeout((function(){return s._config[t].onComplete(d)}),0)}},t.prototype._formatUtteranceCommandOutput=function(e){return Object(r.e)(this,void 0,void 0,(function(){var t,n,o;return Object(r.g)(this,(function(i){switch(i.label){case 0:return t=[Object(r.a)({},e)],n={},[4,Ku(e.messages)];case 1:return n.messages=i.sent(),[4,Ku(e.sessionState)];case 2:return n.sessionState=i.sent(),[4,Ku(e.interpretations)];case 3:return n.interpretations=i.sent(),[4,Ku(e.requestAttributes)];case 4:return n.requestAttributes=i.sent(),[4,Ku(e.inputTranscript)];case 5:return n.inputTranscript=i.sent(),e.audioStream?[4,ar(e.audioStream)]:[3,7];case 6:return o=i.sent(),[3,8];case 7:o=void 0,i.label=8;case 8:return[2,r.a.apply(void 0,t.concat([(n.audioStream=o,n)]))]}}))}))},t.prototype._handleRecognizeTextCommand=function(e,t,n){return Object(r.e)(this,void 0,void 0,(function(){var o,i,a,u;return Object(r.g)(this,(function(s){switch(s.label){case 0:Zu.debug("postText to lex2",t),o=Object(r.a)(Object(r.a)({},n),{text:t}),s.label=1;case 1:return s.trys.push([1,3,,4]),i=new $u(o),[4,this._lexRuntimeServiceV2Client.send(i)];case 2:return a=s.sent(),this._reportBotStatus(a,e),[2,a];case 3:return u=s.sent(),[2,Promise.reject(u)];case 4:return[2]}}))}))},t.prototype._handleRecognizeUtteranceCommand=function(e,t,n){return Object(r.e)(this,void 0,void 0,(function(){var o,i,a,u,s,c,l,f,d;return Object(r.g)(this,(function(p){switch(p.label){case 0:return o=t.content,i=t.options.messageType,Zu.debug("postContent to lex2",t),"voice"!==i?[3,4]:"object"!==Yu(o)?[2,Promise.reject("invalid content type")]:o instanceof Uint8Array?(s=o,[3,3]):[3,1];case 1:return[4,ar(o)];case 2:s=p.sent(),p.label=3;case 3:return u=s,a=Object(r.a)(Object(r.a)({},n),{requestContentType:"audio/x-l16; sample-rate=16000; channel-count=1",inputStream:u}),[3,5];case 4:if("string"!=typeof o)return[2,Promise.reject("invalid content type")];a=Object(r.a)(Object(r.a)({},n),{requestContentType:"text/plain; charset=utf-8",inputStream:o}),p.label=5;case 5:return p.trys.push([5,8,,9]),c=new Wu(a),[4,this._lexRuntimeServiceV2Client.send(c)];case 6:return l=p.sent(),[4,this._formatUtteranceCommandOutput(l)];case 7:return f=p.sent(),this._reportBotStatus(f,e),[2,f];case 8:return d=p.sent(),[2,Promise.reject(d)];case 9:return[2]}}))}))},t}(a);t.default=dr},function(e,t,n){"use strict";n.r(t),n.d(t,"fromUtf8",(function(){return r})),n.d(t,"toUtf8",(function(){return o}));var r=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e.charCodeAt(n);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(n+1<e.length&&55296==(64512&o)&&56320==(64512&e.charCodeAt(n+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(o>>12|224,o>>6&63|128,63&o|128)}return Uint8Array.from(t)}(e)},o=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",n=0,r=e.length;n<r;n++){var o=e[n];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){var i=e[++n];t+=String.fromCharCode((31&o)<<6|63&i)}else if(240<=o&&o<365){var a="%"+[o,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&o)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)}},function(e,t,n){"use strict";n.r(t),n.d(t,"fromUtf8",(function(){return r})),n.d(t,"toUtf8",(function(){return o}));var r=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e.charCodeAt(n);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(n+1<e.length&&55296==(64512&o)&&56320==(64512&e.charCodeAt(n+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(o>>12|224,o>>6&63|128,63&o|128)}return Uint8Array.from(t)}(e)},o=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",n=0,r=e.length;n<r;n++){var o=e[n];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){var i=e[++n];t+=String.fromCharCode((31&o)<<6|63&i)}else if(240<=o&&o<365){var a="%"+[o,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&o)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)}},function(e,t,n){"use strict";n.r(t),n.d(t,"fromUtf8",(function(){return r})),n.d(t,"toUtf8",(function(){return o}));var r=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e.charCodeAt(n);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(n+1<e.length&&55296==(64512&o)&&56320==(64512&e.charCodeAt(n+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(o>>12|224,o>>6&63|128,63&o|128)}return Uint8Array.from(t)}(e)},o=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",n=0,r=e.length;n<r;n++){var o=e[n];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){var i=e[++n];t+=String.fromCharCode((31&o)<<6|63&i)}else if(240<=o&&o<365){var a="%"+[o,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&o)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)}}])}));
|
|
26
187
|
//# sourceMappingURL=aws-amplify-interactions.min.js.map
|