@aws-amplify/geo 1.3.12-next.13 → 1.3.12-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.
@@ -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_geo",["aws_amplify_core"],t):"object"==typeof exports?exports.aws_amplify_geo=t(require("aws_amplify_core")):e.aws_amplify_geo=t(e.aws_amplify_core)}(window,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.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 i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));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=41)}([function(t,n){t.exports=e},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.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 i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));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),i=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 i=e.getVersionPrecision(t),o=e.getVersionPrecision(n),u=Math.max(i,o),a=0,s=e.map([t,n],(function(t){var n=u-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&&(a=u-Math.min(i,o)),u-=1;u>=a;){if(s[0][u]>s[1][u])return 1;if(s[0][u]===s[1][u]){if(u===a)return 0;u-=1}else if(s[0][u]<s[1][u])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 i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,r=e,i=arguments.length,o=new Array(i>1?i-1:0),u=1;u<i;u++)o[u-1]=arguments[u];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var a=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){r[t]=e[t]}))};for(t=0,n=o.length;t<n;t+=1)a();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=i,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,i=(r=n(91))&&r.__esModule?r:{default:r},o=n(18);function u(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 a=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 i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,(n=[{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}}])&&u(t,n),e}();t.default=a,e.exports=t.default},91:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=s(n(92)),i=s(n(93)),o=s(n(94)),u=s(n(95)),a=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=a.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=a.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=a.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=a.default.find(u.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 a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,i={},o=0;if(Object.keys(e).forEach((function(t){var u=e[t];"string"==typeof u?(i[t]=u,o+=1):"object"==typeof u&&(n[t]=u,r+=1)})),r>0){var u=Object.keys(n),s=a.default.find(u,(function(e){return t.isOS(e)}));if(s){var c=this.satisfies(n[s]);if(void 0!==c)return c}var l=a.default.find(u,(function(e){return t.isPlatform(e)}));if(l){var f=this.satisfies(n[l]);if(void 0!==f)return f}}if(o>0){var d=Object.keys(i),h=a.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 n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=a.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)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(a.default.compareVersions(i,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,i=(r=n(17))&&r.__esModule?r:{default:r},o=/version\/(\d+(\.?_?\d+)+)/i,u=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,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=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.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=i.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=i.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=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.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=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.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=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.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=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.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=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.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=i.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=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),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=u,e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),u=[{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),n=i.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:o.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{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),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:o.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:o.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{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=u,e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),u=[{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",n={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{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),n=e.test(/like (ipod|iphone)/i);return t&&!n},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=u,e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),u=[{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},n=i.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:o.ENGINE_MAP.Presto},n=i.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:o.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),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},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=u,e.exports=t.default}})},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return i})),n.d(t,"__assign",(function(){return o})),n.d(t,"__rest",(function(){return u})),n.d(t,"__decorate",(function(){return a})),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 h})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return v})),n.d(t,"__spread",(function(){return g})),n.d(t,"__spreadArrays",(function(){return y})),n.d(t,"__await",(function(){return m})),n.d(t,"__asyncGenerator",(function(){return w})),n.d(t,"__asyncDelegator",(function(){return D})),n.d(t,"__asyncValues",(function(){return b})),n.d(t,"__makeTemplateObject",(function(){return E})),n.d(t,"__importStar",(function(){return A})),n.d(t,"__importDefault",(function(){return S})),n.d(t,"__classPrivateFieldGet",(function(){return C})),n.d(t,"__classPrivateFieldSet",(function(){return F}));
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_geo",["aws_amplify_core"],t):"object"==typeof exports?exports.aws_amplify_geo=t(require("aws_amplify_core")):e.aws_amplify_geo=t(e.aws_amplify_core)}(window,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.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 i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));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=41)}([function(t,n){t.exports=e},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.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 i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));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),i=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 i=e.getVersionPrecision(t),o=e.getVersionPrecision(n),u=Math.max(i,o),a=0,s=e.map([t,n],(function(t){var n=u-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&&(a=u-Math.min(i,o)),u-=1;u>=a;){if(s[0][u]>s[1][u])return 1;if(s[0][u]===s[1][u]){if(u===a)return 0;u-=1}else if(s[0][u]<s[1][u])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 i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,r=e,i=arguments.length,o=new Array(i>1?i-1:0),u=1;u<i;u++)o[u-1]=arguments[u];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var a=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){r[t]=e[t]}))};for(t=0,n=o.length;t<n;t+=1)a();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=i,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,i=(r=n(91))&&r.__esModule?r:{default:r},o=n(18);function u(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 a=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 i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,(n=[{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}}])&&u(t,n),e}();t.default=a,e.exports=t.default},91:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=s(n(92)),i=s(n(93)),o=s(n(94)),u=s(n(95)),a=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=a.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=a.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=a.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=a.default.find(u.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 a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,i={},o=0;if(Object.keys(e).forEach((function(t){var u=e[t];"string"==typeof u?(i[t]=u,o+=1):"object"==typeof u&&(n[t]=u,r+=1)})),r>0){var u=Object.keys(n),s=a.default.find(u,(function(e){return t.isOS(e)}));if(s){var c=this.satisfies(n[s]);if(void 0!==c)return c}var l=a.default.find(u,(function(e){return t.isPlatform(e)}));if(l){var f=this.satisfies(n[l]);if(void 0!==f)return f}}if(o>0){var d=Object.keys(i),h=a.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 n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=a.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)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(a.default.compareVersions(i,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,i=(r=n(17))&&r.__esModule?r:{default:r},o=/version\/(\d+(\.?_?\d+)+)/i,u=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,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=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.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=i.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=i.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=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.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=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.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=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.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=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.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=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.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=i.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=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),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=u,e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),u=[{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),n=i.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:o.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{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),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:o.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:o.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{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=u,e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),u=[{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",n={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{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),n=e.test(/like (ipod|iphone)/i);return t&&!n},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=u,e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),u=[{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},n=i.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:o.ENGINE_MAP.Presto},n=i.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:o.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),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},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=u,e.exports=t.default}})},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return i})),n.d(t,"__assign",(function(){return o})),n.d(t,"__rest",(function(){return u})),n.d(t,"__decorate",(function(){return a})),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 h})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return v})),n.d(t,"__spread",(function(){return g})),n.d(t,"__spreadArrays",(function(){return y})),n.d(t,"__await",(function(){return m})),n.d(t,"__asyncGenerator",(function(){return D})),n.d(t,"__asyncDelegator",(function(){return w})),n.d(t,"__asyncValues",(function(){return b})),n.d(t,"__makeTemplateObject",(function(){return E})),n.d(t,"__importStar",(function(){return A})),n.d(t,"__importDefault",(function(){return S})),n.d(t,"__classPrivateFieldGet",(function(){return C})),n.d(t,"__classPrivateFieldSet",(function(){return F}));
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -13,7 +13,7 @@ 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
15
  ***************************************************************************** */
16
- 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 i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function u(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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function a(e,t,n,r){var i,o=arguments.length,u=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(u=(o<3?i(u):o>3?i(t,n,u):i(t,n))||u);return o>3&&u&&Object.defineProperty(t,n,u),u}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(i,o){function u(e){try{s(r.next(e))}catch(e){o(e)}}function a(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,a)}s((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,r=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=u.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=t.call(e,u)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function h(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}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.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)u.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function y(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],u=0,a=o.length;u<a;u++,i++)r[i]=o[u];return r}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function w(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},u("next"),u("throw"),u("return"),r[Symbol.asyncIterator]=function(){return this},r;function u(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{(n=i[e](t)).value instanceof m?Promise.resolve(n.value.v).then(s,c):l(o[0][2],n)}catch(e){l(o[0][3],e)}var n}function s(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function D(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,i){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function b(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(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,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function A(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 S(e){return e&&e.__esModule?e:{default:e}}function C(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function F(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,"locateWindow",(function(){return i}));const r={};function i(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:r}},function(e,t,n){"use strict";const r=n(14),i=n(15),o=n(16),u=new o({maxSize:1e5}),a=e=>!("object"!=typeof e||null===e||e instanceof RegExp||e instanceof Error||e instanceof Date),s=(e,t)=>{if(!a(e))return e;t={deep:!1,pascalCase:!1,...t};const{exclude:n,pascalCase:o,stopPaths:s,deep:c}=t,l=new Set(s),f=e=>(t,s)=>{if(c&&a(s)){const n=void 0===e?t:`${e}.${t}`;l.has(n)||(s=r(s,f(n)))}if(!n||!((e,t)=>e.some(e=>"string"==typeof e?e===t:(e.lastIndex=0,e.test(t))))(n,t)){const e=o?`${t}_`:t;if(u.has(e))t=u.get(e);else{const n=i(t,{pascalCase:o});t.length<100&&u.set(e,n),t=n}}return[t,s]};return r(e,f(void 0))};e.exports=(e,t)=>Array.isArray(e)?Object.keys(e).map(n=>s(e[n],t)):s(e,t)},function(e,t,n){"use strict";(function(e){}).call(this,n(17))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(19),i=n(7),o=n(42),u=n(3),a=function(){function e(e){e?(this.operation=function(e){return new Promise((function(t,n){var r=(0,u.locateWindow)().msCrypto.subtle.importKey("raw",s(e),i.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,u.locateWindow)().msCrypto.subtle.sign(i.SHA_256_HMAC_ALGO,e)})),this.operation.catch((function(){}))):this.operation=Promise.resolve((0,u.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,o.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=a},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),i=n(7),o=n(3),u=function(){function e(e){this.toHash=new Uint8Array(0),void 0!==e&&(this.key=new Promise((function(t,n){(0,o.locateWindow)().crypto.subtle.importKey("raw",(0,r.convertToBuffer)(e),i.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,o.locateWindow)().crypto.subtle.sign(i.SHA_256_HMAC_ALGO,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):(0,r.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=u},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(20);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return r.convertToBuffer}});var i=n(26);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return i.isEmptyData}});var o=n(27);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return o.numToUint8}});var u=n(28);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return u.uint32ArrayFrom}})},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 i})),n.d(t,"__assign",(function(){return o})),n.d(t,"__rest",(function(){return u})),n.d(t,"__decorate",(function(){return a})),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 h})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return v})),n.d(t,"__spread",(function(){return g})),n.d(t,"__spreadArrays",(function(){return y})),n.d(t,"__await",(function(){return m})),n.d(t,"__asyncGenerator",(function(){return w})),n.d(t,"__asyncDelegator",(function(){return D})),n.d(t,"__asyncValues",(function(){return b})),n.d(t,"__makeTemplateObject",(function(){return E})),n.d(t,"__importStar",(function(){return A})),n.d(t,"__importDefault",(function(){return S})),n.d(t,"__classPrivateFieldGet",(function(){return C})),n.d(t,"__classPrivateFieldSet",(function(){return F}));
16
+ 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 i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function u(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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function a(e,t,n,r){var i,o=arguments.length,u=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(u=(o<3?i(u):o>3?i(t,n,u):i(t,n))||u);return o>3&&u&&Object.defineProperty(t,n,u),u}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(i,o){function u(e){try{s(r.next(e))}catch(e){o(e)}}function a(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,a)}s((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,r=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=u.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=t.call(e,u)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function h(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}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.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)u.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function y(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],u=0,a=o.length;u<a;u++,i++)r[i]=o[u];return r}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function D(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},u("next"),u("throw"),u("return"),r[Symbol.asyncIterator]=function(){return this},r;function u(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{(n=i[e](t)).value instanceof m?Promise.resolve(n.value.v).then(s,c):l(o[0][2],n)}catch(e){l(o[0][3],e)}var n}function s(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[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,i){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function b(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(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,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function A(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 S(e){return e&&e.__esModule?e:{default:e}}function C(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function F(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,"locateWindow",(function(){return i}));var r={};function i(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:r}},function(e,t,n){"use strict";const r=n(14),i=n(15),o=n(16),u=new o({maxSize:1e5}),a=e=>!("object"!=typeof e||null===e||e instanceof RegExp||e instanceof Error||e instanceof Date),s=(e,t)=>{if(!a(e))return e;t={deep:!1,pascalCase:!1,...t};const{exclude:n,pascalCase:o,stopPaths:s,deep:c}=t,l=new Set(s),f=e=>(t,s)=>{if(c&&a(s)){const n=void 0===e?t:`${e}.${t}`;l.has(n)||(s=r(s,f(n)))}if(!n||!((e,t)=>e.some(e=>"string"==typeof e?e===t:(e.lastIndex=0,e.test(t))))(n,t)){const e=o?`${t}_`:t;if(u.has(e))t=u.get(e);else{const n=i(t,{pascalCase:o});t.length<100&&u.set(e,n),t=n}}return[t,s]};return r(e,f(void 0))};e.exports=(e,t)=>Array.isArray(e)?Object.keys(e).map(n=>s(e[n],t)):s(e,t)},function(e,t,n){"use strict";(function(e){}).call(this,n(17))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(19),i=n(7),o=n(42),u=n(3),a=function(){function e(e){e?(this.operation=function(e){return new Promise((function(t,n){var r=(0,u.locateWindow)().msCrypto.subtle.importKey("raw",s(e),i.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,u.locateWindow)().msCrypto.subtle.sign(i.SHA_256_HMAC_ALGO,e)})),this.operation.catch((function(){}))):this.operation=Promise.resolve((0,u.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,o.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=a},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),i=n(7),o=n(3),u=function(){function e(e){this.toHash=new Uint8Array(0),void 0!==e&&(this.key=new Promise((function(t,n){(0,o.locateWindow)().crypto.subtle.importKey("raw",(0,r.convertToBuffer)(e),i.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,o.locateWindow)().crypto.subtle.sign(i.SHA_256_HMAC_ALGO,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):(0,r.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=u},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(20);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return r.convertToBuffer}});var i=n(26);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return i.isEmptyData}});var o=n(27);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return o.numToUint8}});var u=n(28);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return u.uint32ArrayFrom}})},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 i})),n.d(t,"__assign",(function(){return o})),n.d(t,"__rest",(function(){return u})),n.d(t,"__decorate",(function(){return a})),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 h})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return v})),n.d(t,"__spread",(function(){return g})),n.d(t,"__spreadArrays",(function(){return y})),n.d(t,"__await",(function(){return m})),n.d(t,"__asyncGenerator",(function(){return D})),n.d(t,"__asyncDelegator",(function(){return w})),n.d(t,"__asyncValues",(function(){return b})),n.d(t,"__makeTemplateObject",(function(){return E})),n.d(t,"__importStar",(function(){return A})),n.d(t,"__importDefault",(function(){return S})),n.d(t,"__classPrivateFieldGet",(function(){return C})),n.d(t,"__classPrivateFieldSet",(function(){return F}));
17
17
  /*! *****************************************************************************
18
18
  Copyright (c) Microsoft Corporation.
19
19
 
@@ -28,16 +28,16 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
28
28
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
29
29
  PERFORMANCE OF THIS SOFTWARE.
30
30
  ***************************************************************************** */
31
- 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 i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function u(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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function a(e,t,n,r){var i,o=arguments.length,u=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(u=(o<3?i(u):o>3?i(t,n,u):i(t,n))||u);return o>3&&u&&Object.defineProperty(t,n,u),u}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(i,o){function u(e){try{s(r.next(e))}catch(e){o(e)}}function a(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,a)}s((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,r=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=u.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=t.call(e,u)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function h(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}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.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)u.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function y(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],u=0,a=o.length;u<a;u++,i++)r[i]=o[u];return r}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function w(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},u("next"),u("throw"),u("return"),r[Symbol.asyncIterator]=function(){return this},r;function u(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{(n=i[e](t)).value instanceof m?Promise.resolve(n.value.v).then(s,c):l(o[0][2],n)}catch(e){l(o[0][3],e)}var n}function s(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function D(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,i){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function b(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(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,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function A(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 S(e){return e&&e.__esModule?e:{default:e}}function C(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function F(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.WebCryptoSha256=t.Ie11Sha256=void 0,(0,n(2).__exportStar)(n(18),t);var r=n(6);Object.defineProperty(t,"Ie11Sha256",{enumerable:!0,get:function(){return r.Sha256}});var i=n(8);Object.defineProperty(t,"WebCryptoSha256",{enumerable:!0,get:function(){return i.Sha256}})},function(e){e.exports=JSON.parse('{"name":"@aws-sdk/client-location","description":"AWS SDK for JavaScript Location Client for Node.js, Browser and React Native","version":"3.48.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:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-*"},"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.48.0","@aws-sdk/config-resolver":"3.47.2","@aws-sdk/credential-provider-node":"3.48.0","@aws-sdk/fetch-http-handler":"3.47.2","@aws-sdk/hash-node":"3.47.2","@aws-sdk/invalid-dependency":"3.47.2","@aws-sdk/middleware-content-length":"3.47.2","@aws-sdk/middleware-host-header":"3.47.2","@aws-sdk/middleware-logger":"3.47.2","@aws-sdk/middleware-retry":"3.47.2","@aws-sdk/middleware-serde":"3.47.2","@aws-sdk/middleware-signing":"3.47.2","@aws-sdk/middleware-stack":"3.47.2","@aws-sdk/middleware-user-agent":"3.47.2","@aws-sdk/node-config-provider":"3.47.2","@aws-sdk/node-http-handler":"3.47.2","@aws-sdk/protocol-http":"3.47.2","@aws-sdk/smithy-client":"3.47.2","@aws-sdk/types":"3.47.1","@aws-sdk/url-parser":"3.47.2","@aws-sdk/util-base64-browser":"3.47.1","@aws-sdk/util-base64-node":"3.47.2","@aws-sdk/util-body-length-browser":"3.47.1","@aws-sdk/util-body-length-node":"3.47.1","@aws-sdk/util-defaults-mode-browser":"3.47.2","@aws-sdk/util-defaults-mode-node":"3.47.2","@aws-sdk/util-user-agent-browser":"3.47.2","@aws-sdk/util-user-agent-node":"3.47.2","@aws-sdk/util-utf8-browser":"3.47.1","@aws-sdk/util-utf8-node":"3.47.2","tslib":"^2.3.0"},"devDependencies":{"@aws-sdk/service-client-documentation-generator":"3.47.1","@types/node":"^12.7.5"},"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-location","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-location"}}')},function(e,t,n){"use strict";const r=e=>"object"==typeof e&&null!==e,i=Symbol("skip"),o=e=>r(e)&&!(e instanceof RegExp)&&!(e instanceof Error)&&!(e instanceof Date),u=(e,t,n,r=new WeakMap)=>{if(n={deep:!1,target:{},...n},r.has(e))return r.get(e);r.set(e,n.target);const{target:a}=n;delete n.target;const s=e=>e.map(e=>o(e)?u(e,t,n,r):e);if(Array.isArray(e))return s(e);for(const[c,l]of Object.entries(e)){const f=t(c,l,e);if(f===i)continue;let[d,h,{shouldRecurse:p=!0}={}]=f;"__proto__"!==d&&(n.deep&&p&&o(h)&&(h=Array.isArray(h)?s(h):u(h,t,n,r)),a[d]=h)}return a};e.exports=(e,t,n)=>{if(!r(e))throw new TypeError(`Expected an object, got \`${e}\` (${typeof e})`);return u(e,t,n)},e.exports.mapObjectSkip=i},function(e,t,n){"use strict";const r=(e,t)=>{if("string"!=typeof e&&!Array.isArray(e))throw new TypeError("Expected the input to be `string | string[]`");t=Object.assign({pascalCase:!1},t);return 0===(e=Array.isArray(e)?e.map(e=>e.trim()).filter(e=>e.length).join("-"):e.trim()).length?"":1===e.length?t.pascalCase?e.toUpperCase():e.toLowerCase():(e!==e.toLowerCase()&&(e=(e=>{let t=!1,n=!1,r=!1;for(let i=0;i<e.length;i++){const o=e[i];t&&/[a-zA-Z]/.test(o)&&o.toUpperCase()===o?(e=e.slice(0,i)+"-"+e.slice(i),t=!1,r=n,n=!0,i++):n&&r&&/[a-zA-Z]/.test(o)&&o.toLowerCase()===o?(e=e.slice(0,i-1)+"-"+e.slice(i-1),r=n,n=!1,t=!0):(t=o.toLowerCase()===o&&o.toUpperCase()!==o,r=n,n=o.toUpperCase()===o&&o.toLowerCase()!==o)}return e})(e)),e=e.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(e,t)=>t.toUpperCase()).replace(/\d+(\w|$)/g,e=>e.toUpperCase()),n=e,t.pascalCase?n.charAt(0).toUpperCase()+n.slice(1):n);var n};e.exports=r,e.exports.default=r},function(e,t,n){"use strict";e.exports=class{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,t){this.cache.set(e,t),this._size++,this._size>=this.maxSize&&(this._size=0,this.oldCache=this.cache,this.cache=new Map)}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){const t=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,t),t}}set(e,t){return this.cache.has(e)?this.cache.set(e,t):this._set(e,t),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){return this.cache.has(e)?this.cache.get(e):this.oldCache.has(e)?this.oldCache.get(e):void 0}delete(e){const t=this.cache.delete(e);return t&&this._size--,this.oldCache.delete(e)||t}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(const[e]of this)yield e}*values(){for(const[,e]of this)yield e}*[Symbol.iterator](){for(const e of this.cache)yield e;for(const e of this.oldCache){const[t]=e;this.cache.has(t)||(yield e)}}get size(){let e=0;for(const t of this.oldCache.keys())this.cache.has(t)||e++;return this._size+e}}},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!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:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(e){r=u}}();var s,c=[],l=!1,f=-1;function d(){l&&s&&(l=!1,s.length?c=s.concat(c):f=-1,c.length&&h())}function h(){if(!l){var e=a(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===u||!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 p(e,t){this.fun=e,this.array=t}function v(){}i.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 p(e,t)),1!==c.length||l||a(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(6),i=n(8),o=n(29),u=n(32),a=n(34),s=n(3),c=function(){function e(e){(0,u.supportsWebCrypto)((0,s.locateWindow)())?this.hash=new i.Sha256(e):(0,a.isMsWindow)((0,s.locateWindow)())?this.hash=new r.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,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(43),i=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?i(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}}).call(this,n(21).Buffer)},function(e,t,n){"use strict";(function(e){
31
+ 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 i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function u(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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function a(e,t,n,r){var i,o=arguments.length,u=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(u=(o<3?i(u):o>3?i(t,n,u):i(t,n))||u);return o>3&&u&&Object.defineProperty(t,n,u),u}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(i,o){function u(e){try{s(r.next(e))}catch(e){o(e)}}function a(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,a)}s((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,r=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=u.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=t.call(e,u)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function h(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}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.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)u.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function y(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],u=0,a=o.length;u<a;u++,i++)r[i]=o[u];return r}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function D(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},u("next"),u("throw"),u("return"),r[Symbol.asyncIterator]=function(){return this},r;function u(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{(n=i[e](t)).value instanceof m?Promise.resolve(n.value.v).then(s,c):l(o[0][2],n)}catch(e){l(o[0][3],e)}var n}function s(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[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,i){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function b(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(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,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function A(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 S(e){return e&&e.__esModule?e:{default:e}}function C(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function F(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.WebCryptoSha256=t.Ie11Sha256=void 0,(0,n(2).__exportStar)(n(18),t);var r=n(6);Object.defineProperty(t,"Ie11Sha256",{enumerable:!0,get:function(){return r.Sha256}});var i=n(8);Object.defineProperty(t,"WebCryptoSha256",{enumerable:!0,get:function(){return i.Sha256}})},function(e){e.exports=JSON.parse('{"name":"@aws-sdk/client-location","description":"AWS SDK for JavaScript Location Client for Node.js, Browser and React Native","version":"3.48.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:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-*"},"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.48.0","@aws-sdk/config-resolver":"3.47.2","@aws-sdk/credential-provider-node":"3.48.0","@aws-sdk/fetch-http-handler":"3.47.2","@aws-sdk/hash-node":"3.47.2","@aws-sdk/invalid-dependency":"3.47.2","@aws-sdk/middleware-content-length":"3.47.2","@aws-sdk/middleware-host-header":"3.47.2","@aws-sdk/middleware-logger":"3.47.2","@aws-sdk/middleware-retry":"3.47.2","@aws-sdk/middleware-serde":"3.47.2","@aws-sdk/middleware-signing":"3.47.2","@aws-sdk/middleware-stack":"3.47.2","@aws-sdk/middleware-user-agent":"3.47.2","@aws-sdk/node-config-provider":"3.47.2","@aws-sdk/node-http-handler":"3.47.2","@aws-sdk/protocol-http":"3.47.2","@aws-sdk/smithy-client":"3.47.2","@aws-sdk/types":"3.47.1","@aws-sdk/url-parser":"3.47.2","@aws-sdk/util-base64-browser":"3.47.1","@aws-sdk/util-base64-node":"3.47.2","@aws-sdk/util-body-length-browser":"3.47.1","@aws-sdk/util-body-length-node":"3.47.1","@aws-sdk/util-defaults-mode-browser":"3.47.2","@aws-sdk/util-defaults-mode-node":"3.47.2","@aws-sdk/util-user-agent-browser":"3.47.2","@aws-sdk/util-user-agent-node":"3.47.2","@aws-sdk/util-utf8-browser":"3.47.1","@aws-sdk/util-utf8-node":"3.47.2","tslib":"^2.3.0"},"devDependencies":{"@aws-sdk/service-client-documentation-generator":"3.47.1","@types/node":"^12.7.5"},"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-location","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-location"}}')},function(e,t,n){"use strict";const r=e=>"object"==typeof e&&null!==e,i=Symbol("skip"),o=e=>r(e)&&!(e instanceof RegExp)&&!(e instanceof Error)&&!(e instanceof Date),u=(e,t,n,r=new WeakMap)=>{if(n={deep:!1,target:{},...n},r.has(e))return r.get(e);r.set(e,n.target);const{target:a}=n;delete n.target;const s=e=>e.map(e=>o(e)?u(e,t,n,r):e);if(Array.isArray(e))return s(e);for(const[c,l]of Object.entries(e)){const f=t(c,l,e);if(f===i)continue;let[d,h,{shouldRecurse:p=!0}={}]=f;"__proto__"!==d&&(n.deep&&p&&o(h)&&(h=Array.isArray(h)?s(h):u(h,t,n,r)),a[d]=h)}return a};e.exports=(e,t,n)=>{if(!r(e))throw new TypeError(`Expected an object, got \`${e}\` (${typeof e})`);return u(e,t,n)},e.exports.mapObjectSkip=i},function(e,t,n){"use strict";const r=(e,t)=>{if("string"!=typeof e&&!Array.isArray(e))throw new TypeError("Expected the input to be `string | string[]`");t=Object.assign({pascalCase:!1},t);return 0===(e=Array.isArray(e)?e.map(e=>e.trim()).filter(e=>e.length).join("-"):e.trim()).length?"":1===e.length?t.pascalCase?e.toUpperCase():e.toLowerCase():(e!==e.toLowerCase()&&(e=(e=>{let t=!1,n=!1,r=!1;for(let i=0;i<e.length;i++){const o=e[i];t&&/[a-zA-Z]/.test(o)&&o.toUpperCase()===o?(e=e.slice(0,i)+"-"+e.slice(i),t=!1,r=n,n=!0,i++):n&&r&&/[a-zA-Z]/.test(o)&&o.toLowerCase()===o?(e=e.slice(0,i-1)+"-"+e.slice(i-1),r=n,n=!1,t=!0):(t=o.toLowerCase()===o&&o.toUpperCase()!==o,r=n,n=o.toUpperCase()===o&&o.toLowerCase()!==o)}return e})(e)),e=e.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(e,t)=>t.toUpperCase()).replace(/\d+(\w|$)/g,e=>e.toUpperCase()),n=e,t.pascalCase?n.charAt(0).toUpperCase()+n.slice(1):n);var n};e.exports=r,e.exports.default=r},function(e,t,n){"use strict";e.exports=class{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,t){this.cache.set(e,t),this._size++,this._size>=this.maxSize&&(this._size=0,this.oldCache=this.cache,this.cache=new Map)}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){const t=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,t),t}}set(e,t){return this.cache.has(e)?this.cache.set(e,t):this._set(e,t),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){return this.cache.has(e)?this.cache.get(e):this.oldCache.has(e)?this.oldCache.get(e):void 0}delete(e){const t=this.cache.delete(e);return t&&this._size--,this.oldCache.delete(e)||t}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(const[e]of this)yield e}*values(){for(const[,e]of this)yield e}*[Symbol.iterator](){for(const e of this.cache)yield e;for(const e of this.oldCache){const[t]=e;this.cache.has(t)||(yield e)}}get size(){let e=0;for(const t of this.oldCache.keys())this.cache.has(t)||e++;return this._size+e}}},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!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:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(e){r=u}}();var s,c=[],l=!1,f=-1;function d(){l&&s&&(l=!1,s.length?c=s.concat(c):f=-1,c.length&&h())}function h(){if(!l){var e=a(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===u||!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 p(e,t){this.fun=e,this.array=t}function v(){}i.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 p(e,t)),1!==c.length||l||a(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(6),i=n(8),o=n(29),u=n(32),a=n(34),s=n(3),c=function(){function e(e){(0,u.supportsWebCrypto)((0,s.locateWindow)())?this.hash=new i.Sha256(e):(0,a.isMsWindow)((0,s.locateWindow)())?this.hash=new r.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,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(43),i=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?i(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}}).call(this,n(21).Buffer)},function(e,t,n){"use strict";(function(e){
32
32
  /*!
33
33
  * The buffer module from node.js, for the browser.
34
34
  *
35
35
  * @author Feross Aboukhadijeh <http://feross.org>
36
36
  * @license MIT
37
37
  */
38
- var r=n(23),i=n(24),o=n(25);function u(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(u()<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|p(t,n),i=(e=a(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(s.isBuffer(t)){var n=0|h(t.length);return 0===(e=a(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?a(e,0):d(e,t);if("Buffer"===t.type&&o(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=a(e,t<0?0:0|h(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|h(t.length);e=a(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function h(e){if(e>=u())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u().toString(16)+" bytes");return 0|e}function p(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 U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(e).length;default:if(r)return U(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 x(this,t,n);case"utf8":case"utf-8":return F(this,t,n);case"ascii":return _(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){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=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)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,i);if("number"==typeof t)return t&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):m(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,r,i){var o,u=1,a=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;u=2,a/=2,s/=2,n/=2}function c(e,t){return 1===u?e[t]:e.readUInt16BE(t*u)}if(i){var l=-1;for(o=n;o<a;o++)if(c(e,o)===c(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===s)return l*u}else-1!==l&&(o-=o-l),l=-1}else for(n+s>a&&(n=a-s),o=n;o>=0;o--){for(var f=!0,d=0;d<s;d++)if(c(e,o+d)!==c(t,d)){f=!1;break}if(f)return o}return-1}function w(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var u=0;u<r;++u){var a=parseInt(t.substr(2*u,2),16);if(isNaN(a))return u;e[n+u]=a}return u}function D(e,t,n,r){return z(U(t,e.length-n),e,n,r)}function b(e,t,n,r){return z(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function E(e,t,n,r){return b(e,t,n,r)}function A(e,t,n,r){return z(G(t),e,n,r)}function S(e,t,n,r){return z(function(e,t){for(var n,r,i,o=[],u=0;u<e.length&&!((t-=2)<0);++u)n=e.charCodeAt(u),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function C(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function F(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,u,a,s,c=e[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=e[i+1]))&&(s=(31&c)<<6|63&o)>127&&(l=s);break;case 3:o=e[i+1],u=e[i+2],128==(192&o)&&128==(192&u)&&(s=(15&c)<<12|(63&o)<<6|63&u)>2047&&(s<55296||s>57343)&&(l=s);break;case 4:o=e[i+1],u=e[i+2],a=e[i+3],128==(192&o)&&128==(192&u)&&128==(192&a)&&(s=(15&c)<<18|(63&o)<<12|(63&u)<<6|63&a)>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),i+=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=u(),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?a(e,t):void 0!==n?"string"==typeof r?a(e,t).fill(n,r):a(e,t).fill(n):a(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,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];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(!o(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),i=0;for(n=0;n<e.length;++n){var u=e[n];if(!s.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(r,i),i+=u.length}return r},s.byteLength=p,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)g(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)g(this,t,t+3),g(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)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},s.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?F(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,i){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===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),u=(n>>>=0)-(t>>>=0),a=Math.min(o,u),c=this.slice(r,i),l=e.slice(t,n),f=0;f<a;++f)if(c[f]!==l[f]){o=c[f],u=l[f];break}return o<u?-1:u<o?1:0},s.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},s.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},s.prototype.lastIndexOf=function(e,t,n){return y(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 i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return w(this,e,t,n);case"utf8":case"utf-8":return D(this,e,t,n);case"ascii":return b(this,e,t,n);case"latin1":case"binary":return E(this,e,t,n);case"base64":return A(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function _(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function P(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function x(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=j(e[o]);return i}function B(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function T(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 M(e,t,n,r,i,o){if(!s.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(n+r>e.length)throw new RangeError("Index out of range")}function L(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function O(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function R(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function k(e,t,n,r,o){return o||R(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function N(e,t,n,r,o){return o||R(e,0,n,8),i.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 i=t-e;n=new s(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},s.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||T(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},s.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||T(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},s.prototype.readUInt8=function(e,t){return t||T(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return t||T(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return t||T(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return t||T(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||T(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||T(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||T(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return t||T(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){t||T(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||T(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||T(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||T(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||T(e,4,this.length),i.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return t||T(e,4,this.length),i.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return t||T(e,8,this.length),i.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return t||T(e,8,this.length),i.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||M(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},s.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||M(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||M(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||M(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||M(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):O(this,e,t,!0),t+4},s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||M(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):O(this,e,t,!1),t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);M(this,e,t,n,i-1,-i)}var o=0,u=1,a=0;for(this[t]=255&e;++o<n&&(u*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/u>>0)-a&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);M(this,e,t,n,i-1,-i)}var o=n-1,u=1,a=0;for(this[t+o]=255&e;--o>=0&&(u*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/u>>0)-a&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||M(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||M(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||M(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):O(this,e,t,!0),t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||M(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):O(this,e,t,!1),t+4},s.prototype.writeFloatLE=function(e,t,n){return k(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return k(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return N(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return N(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 i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},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 i=e.charCodeAt(0);i<256&&(e=i)}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 o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var u=s.isBuffer(e)?e:U(new s(e,r).toString()),a=u.length;for(o=0;o<n-t;++o)this[o+t]=u[o%a]}return this};var I=/[^+\/0-9A-Za-z-_]/g;function j(e){return e<16?"0"+e.toString(16):e.toString(16)}function U(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],u=0;u<r;++u){if((n=e.charCodeAt(u))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(u+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.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;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function G(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(I,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(22))},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),u=r[0],a=r[1],s=new o(function(e,t,n){return 3*(t+n)/4-n}(0,u,a)),l=0,f=a>0?u-4:u;for(n=0;n<f;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],s[l++]=t>>16&255,s[l++]=t>>8&255,s[l++]=255&t;2===a&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,s[l++]=255&t);1===a&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[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,i=n%3,o=[],u=0,a=n-i;u<a;u+=16383)o.push(l(e,u,u+16383>a?a:u+16383));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=u.length;a<s;++a)r[a]=u[a],i[u.charCodeAt(a)]=a;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 i,o,u=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),u.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return u.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){
38
+ var r=n(23),i=n(24),o=n(25);function u(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(u()<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|p(t,n),i=(e=a(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(s.isBuffer(t)){var n=0|h(t.length);return 0===(e=a(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?a(e,0):d(e,t);if("Buffer"===t.type&&o(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=a(e,t<0?0:0|h(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|h(t.length);e=a(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function h(e){if(e>=u())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u().toString(16)+" bytes");return 0|e}function p(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 U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(e).length;default:if(r)return U(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 B(this,t,n);case"utf8":case"utf-8":return F(this,t,n);case"ascii":return _(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){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=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)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,i);if("number"==typeof t)return t&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):m(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,r,i){var o,u=1,a=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;u=2,a/=2,s/=2,n/=2}function c(e,t){return 1===u?e[t]:e.readUInt16BE(t*u)}if(i){var l=-1;for(o=n;o<a;o++)if(c(e,o)===c(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===s)return l*u}else-1!==l&&(o-=o-l),l=-1}else for(n+s>a&&(n=a-s),o=n;o>=0;o--){for(var f=!0,d=0;d<s;d++)if(c(e,o+d)!==c(t,d)){f=!1;break}if(f)return o}return-1}function D(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var u=0;u<r;++u){var a=parseInt(t.substr(2*u,2),16);if(isNaN(a))return u;e[n+u]=a}return u}function w(e,t,n,r){return z(U(t,e.length-n),e,n,r)}function b(e,t,n,r){return z(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function E(e,t,n,r){return b(e,t,n,r)}function A(e,t,n,r){return z(G(t),e,n,r)}function S(e,t,n,r){return z(function(e,t){for(var n,r,i,o=[],u=0;u<e.length&&!((t-=2)<0);++u)n=e.charCodeAt(u),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function C(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function F(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,u,a,s,c=e[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=e[i+1]))&&(s=(31&c)<<6|63&o)>127&&(l=s);break;case 3:o=e[i+1],u=e[i+2],128==(192&o)&&128==(192&u)&&(s=(15&c)<<12|(63&o)<<6|63&u)>2047&&(s<55296||s>57343)&&(l=s);break;case 4:o=e[i+1],u=e[i+2],a=e[i+3],128==(192&o)&&128==(192&u)&&128==(192&a)&&(s=(15&c)<<18|(63&o)<<12|(63&u)<<6|63&a)>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),i+=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=u(),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?a(e,t):void 0!==n?"string"==typeof r?a(e,t).fill(n,r):a(e,t).fill(n):a(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,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];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(!o(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),i=0;for(n=0;n<e.length;++n){var u=e[n];if(!s.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(r,i),i+=u.length}return r},s.byteLength=p,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)g(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)g(this,t,t+3),g(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)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},s.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?F(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,i){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===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),u=(n>>>=0)-(t>>>=0),a=Math.min(o,u),c=this.slice(r,i),l=e.slice(t,n),f=0;f<a;++f)if(c[f]!==l[f]){o=c[f],u=l[f];break}return o<u?-1:u<o?1:0},s.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},s.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},s.prototype.lastIndexOf=function(e,t,n){return y(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 i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return D(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return b(this,e,t,n);case"latin1":case"binary":return E(this,e,t,n);case"base64":return A(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function _(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function P(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function B(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=j(e[o]);return i}function x(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function T(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 M(e,t,n,r,i,o){if(!s.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(n+r>e.length)throw new RangeError("Index out of range")}function L(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function O(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function R(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function k(e,t,n,r,o){return o||R(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function N(e,t,n,r,o){return o||R(e,0,n,8),i.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 i=t-e;n=new s(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},s.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||T(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},s.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||T(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},s.prototype.readUInt8=function(e,t){return t||T(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return t||T(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return t||T(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return t||T(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||T(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||T(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||T(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return t||T(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){t||T(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||T(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||T(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||T(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||T(e,4,this.length),i.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return t||T(e,4,this.length),i.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return t||T(e,8,this.length),i.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return t||T(e,8,this.length),i.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||M(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},s.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||M(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||M(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||M(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||M(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):O(this,e,t,!0),t+4},s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||M(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):O(this,e,t,!1),t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);M(this,e,t,n,i-1,-i)}var o=0,u=1,a=0;for(this[t]=255&e;++o<n&&(u*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/u>>0)-a&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);M(this,e,t,n,i-1,-i)}var o=n-1,u=1,a=0;for(this[t+o]=255&e;--o>=0&&(u*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/u>>0)-a&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||M(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||M(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||M(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):O(this,e,t,!0),t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||M(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):O(this,e,t,!1),t+4},s.prototype.writeFloatLE=function(e,t,n){return k(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return k(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return N(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return N(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 i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},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 i=e.charCodeAt(0);i<256&&(e=i)}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 o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var u=s.isBuffer(e)?e:U(new s(e,r).toString()),a=u.length;for(o=0;o<n-t;++o)this[o+t]=u[o%a]}return this};var I=/[^+\/0-9A-Za-z-_]/g;function j(e){return e<16?"0"+e.toString(16):e.toString(16)}function U(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],u=0;u<r;++u){if((n=e.charCodeAt(u))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(u+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.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;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function G(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(I,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(22))},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),u=r[0],a=r[1],s=new o(function(e,t,n){return 3*(t+n)/4-n}(0,u,a)),l=0,f=a>0?u-4:u;for(n=0;n<f;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],s[l++]=t>>16&255,s[l++]=t>>8&255,s[l++]=255&t;2===a&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,s[l++]=255&t);1===a&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[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,i=n%3,o=[],u=0,a=n-i;u<a;u+=16383)o.push(l(e,u,u+16383>a?a:u+16383));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=u.length;a<s;++a)r[a]=u[a],i[u.charCodeAt(a)]=a;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 i,o,u=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),u.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return u.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){
39
39
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
40
- t.read=function(e,t,n,r,i){var o,u,a=8*i-r-1,s=(1<<a)-1,c=s>>1,l=-7,f=n?i-1:0,d=n?-1:1,h=e[t+f];for(f+=d,o=h&(1<<-l)-1,h>>=-l,l+=a;l>0;o=256*o+e[t+f],f+=d,l-=8);for(u=o&(1<<-l)-1,o>>=-l,l+=r;l>0;u=256*u+e[t+f],f+=d,l-=8);if(0===o)o=1-c;else{if(o===s)return u?NaN:1/0*(h?-1:1);u+=Math.pow(2,r),o-=c}return(h?-1:1)*u*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var u,a,s,c=8*o-i-1,l=(1<<c)-1,f=l>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,p=r?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,u=l):(u=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-u))<1&&(u--,s*=2),(t+=u+f>=1?d/s:d*Math.pow(2,1-f))*s>=2&&(u++,s/=2),u+f>=l?(a=0,u=l):u+f>=1?(a=(t*s-1)*Math.pow(2,i),u+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),u=0));i>=8;e[n+h]=255&a,h+=p,a/=256,i-=8);for(u=u<<i|a,c+=i;c>0;e[n+h]=255&u,h+=p,u/=256,c-=8);e[n+h-p]|=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(!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(2).__exportStar(n(30),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(2),i=n(10),o=n(31),u=n(9),a=function(){function e(e){if(this.hash=new o.RawSha256,e){this.outer=new o.RawSha256;var t=function(e){var t=(0,u.convertToBuffer)(e);if(t.byteLength>i.BLOCK_SIZE){var n=new o.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(i.BLOCK_SIZE);return r.set(t),r}(e),n=new Uint8Array(i.BLOCK_SIZE);n.set(t);for(var r=0;r<i.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,u.isEmptyData)(e)&&!this.error)try{this.hash.update((0,u.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=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var r=n(10),i=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 i=this.bufferLength;i<r.BLOCK_SIZE;i++)t.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(i=this.bufferLength;i<r.BLOCK_SIZE-8;i++)t.setUint8(i,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 o=new Uint8Array(r.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,n=t[0],i=t[1],o=t[2],u=t[3],a=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],h=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,p=((d=this.temp[f-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[f]=(h+this.temp[f-7]|0)+(p+this.temp[f-16]|0)}var v=(((a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7))+(a&s^~a&c)|0)+(l+(r.KEY[f]+this.temp[f]|0)|0)|0,g=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&i^n&o^i&o)|0;l=c,c=s,s=a,a=u+v|0,u=o,o=i,i=n,n=v+g|0}t[0]+=n,t[1]+=i,t[2]+=o,t[3]+=u,t[4]+=a,t[5]+=s,t[6]+=c,t[7]+=l},e}();t.RawSha256=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(11).__exportStar(n(33),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(11),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 u(e){return e&&i.every((function(t){return"function"==typeof e[t]}))}t.supportsWebCrypto=function(e){return!(!o(e)||"object"!=typeof e.crypto.subtle)&&u(e.crypto.subtle)},t.supportsSecureRandom=o,t.supportsSubtleCrypto=u,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(!u(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(35);r.__exportStar(n(36),t),r.__exportStar(n(37),t),r.__exportStar(n(38),t),r.__exportStar(n(39),t),r.__exportStar(n(40),t)},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return i})),n.d(t,"__assign",(function(){return o})),n.d(t,"__rest",(function(){return u})),n.d(t,"__decorate",(function(){return a})),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 h})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return v})),n.d(t,"__spread",(function(){return g})),n.d(t,"__spreadArrays",(function(){return y})),n.d(t,"__await",(function(){return m})),n.d(t,"__asyncGenerator",(function(){return w})),n.d(t,"__asyncDelegator",(function(){return D})),n.d(t,"__asyncValues",(function(){return b})),n.d(t,"__makeTemplateObject",(function(){return E})),n.d(t,"__importStar",(function(){return A})),n.d(t,"__importDefault",(function(){return S})),n.d(t,"__classPrivateFieldGet",(function(){return C})),n.d(t,"__classPrivateFieldSet",(function(){return F}));
40
+ t.read=function(e,t,n,r,i){var o,u,a=8*i-r-1,s=(1<<a)-1,c=s>>1,l=-7,f=n?i-1:0,d=n?-1:1,h=e[t+f];for(f+=d,o=h&(1<<-l)-1,h>>=-l,l+=a;l>0;o=256*o+e[t+f],f+=d,l-=8);for(u=o&(1<<-l)-1,o>>=-l,l+=r;l>0;u=256*u+e[t+f],f+=d,l-=8);if(0===o)o=1-c;else{if(o===s)return u?NaN:1/0*(h?-1:1);u+=Math.pow(2,r),o-=c}return(h?-1:1)*u*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var u,a,s,c=8*o-i-1,l=(1<<c)-1,f=l>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,p=r?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,u=l):(u=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-u))<1&&(u--,s*=2),(t+=u+f>=1?d/s:d*Math.pow(2,1-f))*s>=2&&(u++,s/=2),u+f>=l?(a=0,u=l):u+f>=1?(a=(t*s-1)*Math.pow(2,i),u+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),u=0));i>=8;e[n+h]=255&a,h+=p,a/=256,i-=8);for(u=u<<i|a,c+=i;c>0;e[n+h]=255&u,h+=p,u/=256,c-=8);e[n+h-p]|=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(!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(2).__exportStar(n(30),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(2),i=n(10),o=n(31),u=n(9),a=function(){function e(e){if(this.hash=new o.RawSha256,e){this.outer=new o.RawSha256;var t=function(e){var t=(0,u.convertToBuffer)(e);if(t.byteLength>i.BLOCK_SIZE){var n=new o.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(i.BLOCK_SIZE);return r.set(t),r}(e),n=new Uint8Array(i.BLOCK_SIZE);n.set(t);for(var r=0;r<i.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,u.isEmptyData)(e)&&!this.error)try{this.hash.update((0,u.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=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var r=n(10),i=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 i=this.bufferLength;i<r.BLOCK_SIZE;i++)t.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(i=this.bufferLength;i<r.BLOCK_SIZE-8;i++)t.setUint8(i,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 o=new Uint8Array(r.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,n=t[0],i=t[1],o=t[2],u=t[3],a=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],h=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,p=((d=this.temp[f-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[f]=(h+this.temp[f-7]|0)+(p+this.temp[f-16]|0)}var v=(((a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7))+(a&s^~a&c)|0)+(l+(r.KEY[f]+this.temp[f]|0)|0)|0,g=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&i^n&o^i&o)|0;l=c,c=s,s=a,a=u+v|0,u=o,o=i,i=n,n=v+g|0}t[0]+=n,t[1]+=i,t[2]+=o,t[3]+=u,t[4]+=a,t[5]+=s,t[6]+=c,t[7]+=l},e}();t.RawSha256=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(11).__exportStar(n(33),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(11),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 u(e){return e&&i.every((function(t){return"function"==typeof e[t]}))}t.supportsWebCrypto=function(e){return!(!o(e)||"object"!=typeof e.crypto.subtle)&&u(e.crypto.subtle)},t.supportsSecureRandom=o,t.supportsSubtleCrypto=u,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(!u(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(35);r.__exportStar(n(36),t),r.__exportStar(n(37),t),r.__exportStar(n(38),t),r.__exportStar(n(39),t),r.__exportStar(n(40),t)},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return i})),n.d(t,"__assign",(function(){return o})),n.d(t,"__rest",(function(){return u})),n.d(t,"__decorate",(function(){return a})),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 h})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return v})),n.d(t,"__spread",(function(){return g})),n.d(t,"__spreadArrays",(function(){return y})),n.d(t,"__await",(function(){return m})),n.d(t,"__asyncGenerator",(function(){return D})),n.d(t,"__asyncDelegator",(function(){return w})),n.d(t,"__asyncValues",(function(){return b})),n.d(t,"__makeTemplateObject",(function(){return E})),n.d(t,"__importStar",(function(){return A})),n.d(t,"__importDefault",(function(){return S})),n.d(t,"__classPrivateFieldGet",(function(){return C})),n.d(t,"__classPrivateFieldSet",(function(){return F}));
41
41
  /*! *****************************************************************************
42
42
  Copyright (c) Microsoft Corporation.
43
43
 
@@ -52,5 +52,5 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
52
52
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
53
53
  PERFORMANCE OF THIS SOFTWARE.
54
54
  ***************************************************************************** */
55
- 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 i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function u(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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function a(e,t,n,r){var i,o=arguments.length,u=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(u=(o<3?i(u):o>3?i(t,n,u):i(t,n))||u);return o>3&&u&&Object.defineProperty(t,n,u),u}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(i,o){function u(e){try{s(r.next(e))}catch(e){o(e)}}function a(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,a)}s((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,r=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=u.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=t.call(e,u)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function h(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}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.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)u.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function y(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],u=0,a=o.length;u<a;u++,i++)r[i]=o[u];return r}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function w(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},u("next"),u("throw"),u("return"),r[Symbol.asyncIterator]=function(){return this},r;function u(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{(n=i[e](t)).value instanceof m?Promise.resolve(n.value.v).then(s,c):l(o[0][2],n)}catch(e){l(o[0][3],e)}var n}function s(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function D(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,i){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function b(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(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,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function A(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 S(e){return e&&e.__esModule?e:{default:e}}function C(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function F(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,i=t.subtle;return r.map((function(e){return i[e]})).concat(n).every((function(e){return"function"==typeof e}))}return!1}},function(e,t,n){"use strict";n.r(t),n.d(t,"Geo",(function(){return tu}));var r=n(0),i=n(4),o=n.n(i),u=function(e,t){return(u=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 a(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}u(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var s=function(){return(s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function c(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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function l(e,t,n,r){return new(n||(n=Promise))((function(i,o){function u(e){try{s(r.next(e))}catch(e){o(e)}}function a(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,a)}s((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,r=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=u.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=t.call(e,u)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}Object.create;function d(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 h(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)u.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u}function p(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}var v;Object.create;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(v||(v={}));var g=function(e){if("boolean"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e},y=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 i=Promise.resolve(t);return function(){return i}}return t},m=function(e){var t,n=g(e.useDualstackEndpoint),r=e.endpoint,i=e.useFipsEndpoint;return s(s({},e),{tls:null===(t=e.tls)||void 0===t||t,endpoint:r?y(s(s({},e),{endpoint:r})):function(){return function(e){return l(void 0,void 0,void 0,(function(){var t,n,r,i,o,u,a;return f(this,(function(s){switch(s.label){case 0:return t=e.tls,n=void 0===t||t,[4,e.region()];case 1:if(r=s.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.useDualstackEndpoint()];case 2:return i=s.sent(),[4,e.useFipsEndpoint()];case 3:return o=s.sent(),[4,e.regionInfoProvider(r,{useDualstackEndpoint:i,useFipsEndpoint:o})];case 4:if(!(u=(null!==(a=s.sent())&&void 0!==a?a:{}).hostname))throw new Error("Cannot resolve hostname from client config");return[2,e.urlParser((n?"https:":"http:")+"//"+u)]}}))}))}(s(s({},e),{useDualstackEndpoint:n,useFipsEndpoint:i}))},isCustomEndpoint:!!r,useDualstackEndpoint:n})},w=function(e){return"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips"))},D=function(e){return w(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e},b=function(e,t){var n;void 0===e&&(e=[]);var r=t.useFipsEndpoint,i=t.useDualstackEndpoint;return null===(n=e.find((function(e){var t=e.tags;return r===t.includes("fips")&&i===t.includes("dualstack")})))||void 0===n?void 0:n.hostname},E=function(e,t){var n,r,i,o,u,a,c=t.useFipsEndpoint,l=void 0!==c&&c,f=t.useDualstackEndpoint,d=void 0!==f&&f,h=t.signingService,p=t.regionHash,v=t.partitionHash,g=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}),y=e in p?e:null!==(r=null===(n=v[g])||void 0===n?void 0:n.endpoint)&&void 0!==r?r:e,m={useFipsEndpoint:l,useDualstackEndpoint:d},w=function(e,t){var n=t.regionHostname,r=t.partitionHostname;return n||(r?r.replace("{region}",e):void 0)}(y,{regionHostname:b(null===(i=p[y])||void 0===i?void 0:i.variants,m),partitionHostname:b(null===(o=v[g])||void 0===o?void 0:o.variants,m)});if(void 0===w)throw new Error("Endpoint resolution failed for: "+{resolvedRegion:y,useFipsEndpoint:l,useDualstackEndpoint:d});var D=function(e,t){var n=t.signingRegion,r=t.regionRegex,i=t.useFipsEndpoint;if(n)return n;if(i){var o=r.replace("\\\\","\\").replace(/^\^/g,"\\.").replace(/\$$/g,"\\."),u=e.match(o);if(u)return u[0].slice(1,-1)}}(w,{signingRegion:null===(u=p[y])||void 0===u?void 0:u.signingRegion,regionRegex:v[g].regionRegex,useFipsEndpoint:l});return s(s({partition:g,signingService:h,hostname:w},D&&{signingRegion:D}),(null===(a=p[y])||void 0===a?void 0:a.signingService)&&{signingService:p[y].signingService})},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(s(s({},this),{headers:s({},this.headers)}));return n.query&&(n.query=(t=n.query,Object.keys(t).reduce((function(e,n){var r,i=t[n];return s(s({},e),((r={})[n]=Array.isArray(i)?p([],h(i)):i,r))}),{}))),n},e}();var S=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}();function C(e){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(e)}var F={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},_=function(e){return{applyToStack:function(t){t.add(function(e){var t=this;return function(n){return function(r){return l(t,void 0,void 0,(function(){var t,i,o,u,a;return f(this,(function(c){return t=r.request,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!==(u=e(i))&&(t.headers=s(s({},t.headers),((a={})["content-length"]=String(u),a)))),[2,n(s(s({},r),{request:t}))]}))}))}}}(e.bodyLengthChecker),F)}}};var P,x={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},B=function(e){return{applyToStack:function(t){t.add(function(e){return function(t){return function(n){return l(void 0,void 0,void 0,(function(){var r,i;return f(this,(function(o){return A.isInstance(n.request)?(r=n.request,i=(e.requestHandler.metadata||{}).handlerProtocol,(void 0===i?"":i).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),x)}}},T={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},M=function(e){return{applyToStack:function(e){e.add((function(e,t){return function(n){return l(void 0,void 0,void 0,(function(){var r,i,o,u,a,s,l,d,h;return f(this,(function(f){switch(f.label){case 0:return r=t.clientName,i=t.commandName,o=t.inputFilterSensitiveLog,u=t.logger,a=t.outputFilterSensitiveLog,[4,e(n)];case 1:return s=f.sent(),u?("function"==typeof u.info&&(l=s.output,d=l.$metadata,h=c(l,["$metadata"]),u.info({clientName:r,commandName:i,input:o(n.input),output:a(h),metadata:d})),[2,s]):[2,s]}}))}))}}),T)}}};!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(P||(P={}));var L,O=P.STANDARD,R=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],k=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],N=["AbortError","TimeoutError","RequestTimeout","RequestTimeoutException"],I=[500,502,503,504],j=function(e){var t,n;return 429===(null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||k.includes(e.name)||1==(null===(n=e.$retryable)||void 0===n?void 0:n.throttling)},U=function(){function e(e){var t,n,r,i,o;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!==(i=null==e?void 0:e.scaleConstant)&&void 0!==i?i:.4,this.smooth=null!==(o=null==e?void 0:e.smooth)&&void 0!==o?o:.8;var u=this.getCurrentTimeInSeconds();this.lastThrottleTime=u,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 l(this,void 0,void 0,(function(){return f(this,(function(e){return[2,this.acquireTokenBucket(1)]}))}))},e.prototype.acquireTokenBucket=function(e){return l(this,void 0,void 0,(function(){var t;return f(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(),j(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}(),G=new Uint8Array(16);function z(){if(!L&&!(L="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 L(G)}var H=/^(?:[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 q=function(e){return"string"==typeof e&&H.test(e)},$=[],W=0;W<256;++W)$.push((W+256).toString(16).substr(1));var V=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=($[e[t+0]]+$[e[t+1]]+$[e[t+2]]+$[e[t+3]]+"-"+$[e[t+4]]+$[e[t+5]]+"-"+$[e[t+6]]+$[e[t+7]]+"-"+$[e[t+8]]+$[e[t+9]]+"-"+$[e[t+10]]+$[e[t+11]]+$[e[t+12]]+$[e[t+13]]+$[e[t+14]]+$[e[t+15]]).toLowerCase();if(!q(n))throw TypeError("Stringified UUID is invalid");return n};var Y=function(e,t,n){var r=(e=e||{}).random||(e.rng||z)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return V(r)},K=function(e,t){return Math.floor(Math.min(2e4,Math.random()*Math.pow(2,t)*e))},Z=function(e){return!!e&&(function(e){return void 0!==e.$retryable}(e)||function(e){return R.includes(e.name)}(e)||j(e)||function(e){var t;return N.includes(e.name)||I.includes((null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||0)}(e))},J=function(){function e(e,t){var n,r,i;this.maxAttemptsProvider=e,this.mode=P.STANDARD,this.retryDecider=null!==(n=null==t?void 0:t.retryDecider)&&void 0!==n?n:Z,this.delayDecider=null!==(r=null==t?void 0:t.delayDecider)&&void 0!==r?r:K,this.retryQuota=null!==(i=null==t?void 0:t.retryQuota)&&void 0!==i?i:function(e,t){var n,r,i,o=e,u=null!==(n=null==t?void 0:t.noRetryIncrement)&&void 0!==n?n:1,a=null!==(r=null==t?void 0:t.retryCost)&&void 0!==r?r:5,s=null!==(i=null==t?void 0:t.timeoutRetryCost)&&void 0!==i?i:10,c=e,l=function(e){return"TimeoutError"===e.name?s:a},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:u,c=Math.min(c,o)}})}(500)}return e.prototype.shouldRetry=function(e,t,n){return t<n&&this.retryDecider(e)&&this.retryQuota.hasRetryTokens(e)},e.prototype.getMaxAttempts=function(){return l(this,void 0,void 0,(function(){var e;return f(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 l(this,void 0,void 0,(function(){var r,i,o,u,a,s,c,l;return f(this,(function(d){switch(d.label){case 0:return i=0,o=0,[4,this.getMaxAttempts()];case 1:u=d.sent(),a=t.request,A.isInstance(a)&&(a.headers["amz-sdk-invocation-id"]=Y()),s=function(){var s,l,d,h,p,v;return f(this,(function(f){switch(f.label){case 0:return f.trys.push([0,4,,7]),A.isInstance(a)&&(a.headers["amz-sdk-request"]="attempt="+(i+1)+"; max="+u),(null==n?void 0:n.beforeRequest)?[4,n.beforeRequest()]:[3,2];case 1:f.sent(),f.label=2;case 2:return[4,e(t)];case 3:return s=f.sent(),l=s.response,d=s.output,(null==n?void 0:n.afterRequest)&&n.afterRequest(l),c.retryQuota.releaseRetryTokens(r),d.$metadata.attempts=i+1,d.$metadata.totalRetryDelay=o,[2,{value:{response:l,output:d}}];case 4:return h=f.sent(),p=Q(h),i++,c.shouldRetry(p,i,u)?(r=c.retryQuota.retrieveRetryTokens(p),v=c.delayDecider(j(p)?500:100,i),o+=v,[4,new Promise((function(e){return setTimeout(e,v)}))]):[3,6];case 5:return f.sent(),[2,"continue"];case 6:throw p.$metadata||(p.$metadata={}),p.$metadata.attempts=i,p.$metadata.totalRetryDelay=o,p;case 7:return[2]}}))},c=this,d.label=2;case 2:return[5,s()];case 3:return"object"==typeof(l=d.sent())?[2,l.value]:[3,2];case 4:return[2]}}))}))},e}(),Q=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 "+e)},X=function(e){function t(t,n){var r=this,i=null!=n?n:{},o=i.rateLimiter,u=c(i,["rateLimiter"]);return(r=e.call(this,t,u)||this).rateLimiter=null!=o?o:new U,r.mode=P.ADAPTIVE,r}return a(t,e),t.prototype.retry=function(t,n){return l(this,void 0,void 0,(function(){var r=this;return f(this,(function(i){return[2,e.prototype.retry.call(this,t,n,{beforeRequest:function(){return l(r,void 0,void 0,(function(){return f(this,(function(e){return[2,this.rateLimiter.getSendToken()]}))}))},afterRequest:function(e){r.rateLimiter.updateClientSendingRate(e)}})]}))}))},t}(J),ee=function(e){return l(void 0,void 0,void 0,(function(){return f(this,(function(t){switch(t.label){case 0:return"string"==typeof e?[2,e]:[4,e()];case 1:return[2,t.sent()]}}))}))},te=function(e){if(void 0===e&&(e=3),"number"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e},ne={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},re=function(e){return{applyToStack:function(t){t.add(function(e){return function(t,n){return function(r){return l(void 0,void 0,void 0,(function(){var i;return f(this,(function(o){switch(o.label){case 0:return[4,e.retryStrategy()];case 1:return(null==(i=o.sent())?void 0:i.mode)&&(n.userAgent=p(p([],h(n.userAgent||[])),[["cfg/retry-mode",i.mode]])),[2,i.retry(t,r)]}}))}))}}}(e),ne)}}};(function(e){function t(t,n){void 0===n&&(n=!0);var r=e.call(this,t)||this;return r.tryNextLink=n,r}a(t,e),t.from=function(e,t){return void 0===t&&(t=!0),Object.defineProperty(e,"tryNextLink",{value:t,configurable:!1,enumerable:!1,writable:!1}),e}})(Error),function(e){function t(t,n){void 0===n&&(n=!0);var r=e.call(this,t)||this;return r.tryNextLink=n,r.name="CredentialsProviderError",r}a(t,e),t.from=function(e,t){return void 0===t&&(t=!0),Object.defineProperty(e,"tryNextLink",{value:t,configurable:!1,enumerable:!1,writable:!1}),e}}(Error);for(var ie=function(e,t,n){var r,i,o,u=function(){return l(void 0,void 0,void 0,(function(){return f(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 r=t.sent(),o=!0,[3,4];case 3:return i=void 0,[7];case 4:return[2,r]}}))}))};if(void 0===t)return function(){return l(void 0,void 0,void 0,(function(){return f(this,(function(e){switch(e.label){case 0:return o?[3,2]:[4,u()];case 1:r=e.sent(),e.label=2;case 2:return[2,r]}}))}))};var a=!1;return function(){return l(void 0,void 0,void 0,(function(){return f(this,(function(e){switch(e.label){case 0:return o?[3,2]:[4,u()];case 1:r=e.sent(),e.label=2;case 2:return a?[2,r]:n&&!n(r)?(a=!0,[2,r]):t(r)?[4,u()]:[3,4];case 3:return e.sent(),[2,r];case 4:return[2,r]}}))}))}},oe={},ue={},ae=0;ae<256;ae++){var se=ae.toString(16).toLowerCase();1===se.length&&(se="0"+se),oe[ae]=se,ue[se]=ae}function ce(e){for(var t="",n=0;n<e.byteLength;n++)t+=oe[e[n]];return t}var le="X-Amz-Date".toLowerCase(),fe=["authorization",le,"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-/,ye="AWS4-HMAC-SHA256-PAYLOAD",me={},we=[],De=function(e,t,n){return e+"/"+t+"/"+n+"/aws4_request"},be=function(e,t,n){var r=new e(t);return r.update(n),r.digest()},Ee=function(e,t,n){var r,i,o=e.headers,u={};try{for(var a=d(Object.keys(o).sort()),s=a.next();!s.done;s=a.next()){var c=s.value,l=c.toLowerCase();(l in pe||(null==t?void 0:t.has(l))||ve.test(l)||ge.test(l))&&(!n||n&&!n.has(l))||(u[l]=o[c].trim().replace(/\s+/g," "))}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return u},Ae=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,Se)},Se=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()},Ce=function(e,t){var n=e.headers,r=e.body;return l(void 0,void 0,void 0,(function(){var e,i,o,u,a,s,c;return f(this,(function(l){switch(l.label){case 0:try{for(e=d(Object.keys(n)),i=e.next();!i.done;i=e.next())if("x-amz-content-sha256"===(o=i.value).toLowerCase())return[2,n[o]]}catch(e){s={error:e}}finally{try{i&&!i.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))?((u=new t).update(r),a=ce,[4,u.digest()]):[3,3];case 2:return[2,a.apply(void 0,[l.sent()])];case 3:return[2,"UNSIGNED-PAYLOAD"]}var f}))}))},Fe=function(e){var t=e.headers,n=e.query,r=c(e,["headers","query"]);return s(s({},r),{headers:s({},t),query:n?_e(n):void 0})},_e=function(e){return Object.keys(e).reduce((function(t,n){var r,i=e[n];return s(s({},t),((r={})[n]=Array.isArray(i)?p([],h(i)):i,r))}),{})},Pe=function(e){var t,n;e="function"==typeof e.clone?e.clone():Fe(e);try{for(var r=d(Object.keys(e.headers)),i=r.next();!i.done;i=r.next()){var o=i.value;fe.indexOf(o.toLowerCase())>-1&&delete e.headers[o]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return e},xe=function(e){return"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e},Be=function(){function e(e){var t=e.applyChecksum,n=e.credentials,r=e.region,i=e.service,o=e.sha256,u=e.uriEscapePath,a=void 0===u||u;this.service=i,this.sha256=o,this.uriEscapePath=a,this.applyChecksum="boolean"!=typeof t||t,this.regionProvider=function(e){if("string"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e}(r),this.credentialProvider=function(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e}(n)}return e.prototype.presign=function(e,t){return void 0===t&&(t={}),l(this,void 0,void 0,(function(){var n,r,i,o,u,a,c,l,h,p,v,g,y,m,w,D,b,E,A,S,C,F,_,P;return f(this,(function(f){switch(f.label){case 0:return n=t.signingDate,r=void 0===n?new Date:n,i=t.expiresIn,o=void 0===i?3600:i,u=t.unsignableHeaders,a=t.unhoistableHeaders,c=t.signableHeaders,l=t.signingRegion,h=t.signingService,[4,this.credentialProvider()];case 1:return p=f.sent(),null==l?[3,2]:(g=l,[3,4]);case 2:return[4,this.regionProvider()];case 3:g=f.sent(),f.label=4;case 4:return v=g,y=Te(r),m=y.longDate,w=y.shortDate,o>604800?[2,Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future")]:(D=De(w,v,null!=h?h:this.service),b=function(e,t){var n,r,i;void 0===t&&(t={});var o="function"==typeof e.clone?e.clone():Fe(e),u=o.headers,a=o.query,c=void 0===a?{}:a;try{for(var l=d(Object.keys(u)),f=l.next();!f.done;f=l.next()){var h=f.value,p=h.toLowerCase();"x-amz-"!==p.substr(0,6)||(null===(i=t.unhoistableHeaders)||void 0===i?void 0:i.has(p))||(c[h]=u[h],delete u[h])}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return s(s({},e),{headers:u,query:c})}(Pe(e),{unhoistableHeaders:a}),p.sessionToken&&(b.query["X-Amz-Security-Token"]=p.sessionToken),b.query["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",b.query["X-Amz-Credential"]=p.accessKeyId+"/"+D,b.query["X-Amz-Date"]=m,b.query["X-Amz-Expires"]=o.toString(10),E=Ee(b,u,c),b.query["X-Amz-SignedHeaders"]=Me(E),A=b.query,S="X-Amz-Signature",C=this.getSignature,F=[m,D,this.getSigningKey(p,v,w,h)],_=this.createCanonicalRequest,P=[b,E],[4,Ce(e,this.sha256)]);case 5:return[4,C.apply(this,F.concat([_.apply(this,P.concat([f.sent()]))]))];case 6:return A[S]=f.sent(),[2,b]}}))}))},e.prototype.sign=function(e,t){return l(this,void 0,void 0,(function(){return f(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,i=t.signingDate,o=void 0===i?new Date:i,u=t.priorSignature,a=t.signingRegion,s=t.signingService;return l(this,void 0,void 0,(function(){var e,t,i,c,l,d,h,p,v,g,y;return f(this,(function(f){switch(f.label){case 0:return null==a?[3,1]:(t=a,[3,3]);case 1:return[4,this.regionProvider()];case 2:t=f.sent(),f.label=3;case 3:return e=t,i=Te(o),c=i.shortDate,l=i.longDate,d=De(c,e,null!=s?s:this.service),[4,Ce({headers:{},body:r},this.sha256)];case 4:return h=f.sent(),(p=new this.sha256).update(n),g=ce,[4,p.digest()];case 5:return v=g.apply(void 0,[f.sent()]),y=[ye,l,d,u,v,h].join("\n"),[2,this.signString(y,{signingDate:o,signingRegion:e,signingService:s})]}}))}))},e.prototype.signString=function(e,t){var n=void 0===t?{}:t,r=n.signingDate,i=void 0===r?new Date:r,o=n.signingRegion,u=n.signingService;return l(this,void 0,void 0,(function(){var t,n,r,a,s,c,l,d;return f(this,(function(f){switch(f.label){case 0:return[4,this.credentialProvider()];case 1:return t=f.sent(),null==o?[3,2]:(r=o,[3,4]);case 2:return[4,this.regionProvider()];case 3:r=f.sent(),f.label=4;case 4:return n=r,a=Te(i).shortDate,l=(c=this.sha256).bind,[4,this.getSigningKey(t,n,a,u)];case 5:return(s=new(l.apply(c,[void 0,f.sent()]))).update(e),d=ce,[4,s.digest()];case 6:return[2,d.apply(void 0,[f.sent()])]}}))}))},e.prototype.signRequest=function(e,t){var n=void 0===t?{}:t,r=n.signingDate,i=void 0===r?new Date:r,o=n.signableHeaders,u=n.unsignableHeaders,a=n.signingRegion,s=n.signingService;return l(this,void 0,void 0,(function(){var t,n,r,c,l,h,p,v,g,y,m;return f(this,(function(f){switch(f.label){case 0:return[4,this.credentialProvider()];case 1:return t=f.sent(),null==a?[3,2]:(r=a,[3,4]);case 2:return[4,this.regionProvider()];case 3:r=f.sent(),f.label=4;case 4:return n=r,c=Pe(e),l=Te(i),h=l.longDate,p=l.shortDate,v=De(p,n,null!=s?s:this.service),c.headers[le]=h,t.sessionToken&&(c.headers[he]=t.sessionToken),[4,Ce(c,this.sha256)];case 5:return g=f.sent(),!function(e,t){var n,r;e=e.toLowerCase();try{for(var i=d(Object.keys(t)),o=i.next();!o.done;o=i.next()){if(e===o.value.toLowerCase())return!0}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1}("x-amz-content-sha256",c.headers)&&this.applyChecksum&&(c.headers["x-amz-content-sha256"]=g),y=Ee(c,u,o),[4,this.getSignature(h,v,this.getSigningKey(t,n,p,s),this.createCanonicalRequest(c,y,g))];case 6:return m=f.sent(),c.headers.authorization="AWS4-HMAC-SHA256 Credential="+t.accessKeyId+"/"+v+", SignedHeaders="+Me(y)+", Signature="+m,[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,i=void 0===r?{}:r,o=[],u={},a=function(e){if(e.toLowerCase()===de)return"continue";o.push(e);var t=i[e];"string"==typeof t?u[e]=Ae(e)+"="+Ae(t):Array.isArray(t)&&(u[e]=t.slice(0).sort().reduce((function(t,n){return t.concat([Ae(e)+"="+Ae(n)])}),[]).join("&"))};try{for(var s=d(Object.keys(i).sort()),c=s.next();!c.done;c=s.next()){a(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 o.map((function(e){return u[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 l(this,void 0,void 0,(function(){var r,i;return f(this,(function(o){switch(o.label){case 0:return(r=new this.sha256).update(n),[4,r.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,n,r){return l(this,void 0,void 0,(function(){var i,o,u,a,s;return f(this,(function(c){switch(c.label){case 0:return[4,this.createStringToSign(e,t,r)];case 1:return i=c.sent(),a=(u=this.sha256).bind,[4,n];case 2:return(o=new(a.apply(u,[void 0,c.sent()]))).update(i),s=ce,[4,o.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,i){return l(void 0,void 0,void 0,(function(){var o,u,a,s,c,l,h,p,v;return f(this,(function(f){switch(f.label){case 0:return[4,be(e,t.secretAccessKey,t.accessKeyId)];case 1:if(o=f.sent(),(u=n+":"+r+":"+i+":"+ce(o)+":"+t.sessionToken)in me)return[2,me[u]];for(we.push(u);we.length>50;)delete me[we.shift()];a="AWS4"+t.secretAccessKey,f.label=2;case 2:f.trys.push([2,7,8,9]),s=d([n,r,i,"aws4_request"]),c=s.next(),f.label=3;case 3:return c.done?[3,6]:(l=c.value,[4,be(e,a,l)]);case 4:a=f.sent(),f.label=5;case 5:return c=s.next(),[3,3];case 6:return[3,9];case 7:return h=f.sent(),p={error:h},[3,9];case 8:try{c&&!c.done&&(v=s.return)&&v.call(s)}finally{if(p)throw p.error}return[7];case 9:return[2,me[u]=a]}}))}))}(this.sha256,e,n,t,r||this.service)},e}(),Te=function(e){var t,n=(t=e,xe(t).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");return{longDate:n,shortDate:n.substr(0,8)}},Me=function(e){return Object.keys(e).sort().join(";")},Le=function(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e},Oe=function(e){return"function"==typeof e?ie(e,(function(e){return void 0!==e.expiration&&e.expiration.getTime()-Date.now()<3e5}),(function(e){return void 0!==e.expiration})):Le(e)},Re=function(e){return new Date(Date.now()+e)},ke=function(e,t){var n=Date.parse(e);return function(e,t){return Math.abs(Re(t).getTime()-e)>=3e5}(n,t)?n-Date.now():t},Ne=function(e){var t,n,r;return S.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},Ie={name:"awsAuthMiddleware",tags:["SIGNATURE","AWSAUTH"],relation:"after",toMiddleware:"retryMiddleware",override:!0},je=function(e){return{applyToStack:function(t){t.addRelativeTo(function(e){return function(t,n){return function(r){return l(this,void 0,void 0,(function(){var i,o,u,a,c,l;return f(this,(function(f){switch(f.label){case 0:return A.isInstance(r.request)?[4,e.signer()]:[2,t(r)];case 1:return i=f.sent(),u=t,a=[s({},r)],l={},[4,i.sign(r.request,{signingDate:Re(e.systemClockOffset),signingRegion:n.signing_region,signingService:n.signing_service})];case 2:return[4,u.apply(void 0,[s.apply(void 0,a.concat([(l.request=f.sent(),l)]))]).catch((function(t){var n,r=null!==(n=t.ServerTime)&&void 0!==n?n:Ne(t.$response);throw r&&(e.systemClockOffset=ke(r,e.systemClockOffset)),t}))];case 3:return o=f.sent(),(c=Ne(o.response))&&(e.systemClockOffset=ke(c,e.systemClockOffset)),[2,o]}}))}))}}}(e),Ie)}}};var Ue=/[^\!\#\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Ge=function(e){var t=h(e,2),n=t[0],r=t[1],i=n.indexOf("/"),o=n.substring(0,i),u=n.substring(i+1);return"api"===o&&(u=u.toLowerCase()),[o,u,r].filter((function(e){return e&&e.length>0})).map((function(e){return null==e?void 0:e.replace(Ue,"_")})).join("/")},ze={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},He=function(e){return{applyToStack:function(t){var n;t.add((n=e,function(e,t){return function(r){return l(void 0,void 0,void 0,(function(){var i,o,u,a,c,l,d,v,g;return f(this,(function(f){switch(f.label){case 0:return i=r.request,A.isInstance(i)?(o=i.headers,u=(null===(v=null==t?void 0:t.userAgent)||void 0===v?void 0:v.map(Ge))||[],[4,n.defaultUserAgentProvider()]):[2,e(r)];case 1:return a=f.sent().map(Ge),c=(null===(g=null==n?void 0:n.customUserAgent)||void 0===g?void 0:g.map(Ge))||[],l=p(p(p([],h(a)),h(u)),h(c)).join(" "),d=p(p([],h(a.filter((function(e){return e.startsWith("aws-sdk-")})))),h(c)).join(" "),"browser"!==n.runtime?(d&&(o["x-amz-user-agent"]=o["x-amz-user-agent"]?o["user-agent"]+" "+d:d),o["user-agent"]=l):o["x-amz-user-agent"]=l,[2,e(s(s({},r),{request:i}))]}}))}))}}),ze)}}},qe=function(){var e=[],t=[],n=new Set,r=function(n){return e.forEach((function(e){n.add(e.middleware,s({},e))})),t.forEach((function(e){n.addRelativeTo(e.middleware,s({},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,p([],h(i(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,p([],h(i(e))))})),t},o=function(){var n,r=[],o=[],u={};return e.forEach((function(e){var t=s(s({},e),{before:[],after:[]});t.name&&(u[t.name]=t),r.push(t)})),t.forEach((function(e){var t=s(s({},e),{before:[],after:[]});t.name&&(u[t.name]=t),o.push(t)})),o.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=r,n.sort((function(e,t){return $e[t.step]-$e[e.step]||We[t.priority||"normal"]-We[e.priority||"normal"]}))).map(i).reduce((function(e,t){return e.push.apply(e,p([],h(t))),e}),[]).map((function(e){return e.middleware}))},u={add:function(t,r){void 0===r&&(r={});var i=r.name,o=r.override,u=s({step:"initialize",priority:"normal",middleware:t},r);if(i){if(n.has(i)){if(!o)throw new Error("Duplicate middleware name '"+i+"'");var a=e.findIndex((function(e){return e.name===i})),c=e[a];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(a,1)}n.add(i)}e.push(u)},addRelativeTo:function(e,r){var i=r.name,o=r.override,u=s({middleware:e},r);if(i){if(n.has(i)){if(!o)throw new Error("Duplicate middleware name '"+i+"'");var a=t.findIndex((function(e){return e.name===i})),c=t[a];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(a,1)}n.add(i)}t.push(u)},clone:function(){return r(qe())},use:function(e){e.applyToStack(u)},remove:function(r){return"string"==typeof r?function(r){var i=!1,o=function(e){return!e.name||e.name!==r||(i=!0,n.delete(r),!1)};return e=e.filter(o),t=t.filter(o),i}(r):function(r){var i=!1,o=function(e){return e.middleware!==r||(i=!0,e.name&&n.delete(e.name),!1)};return e=e.filter(o),t=t.filter(o),i}(r)},removeByTag:function(r){var i=!1,o=function(e){var t=e.tags,o=e.name;return!t||!t.includes(r)||(o&&n.delete(o),i=!0,!1)};return e=e.filter(o),t=t.filter(o),i},concat:function(e){var t=r(qe());return t.use(e),t},applyToStack:r,resolve:function(e,t){var n,r;try{for(var i=d(o().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&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e}};return u},$e={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},We={high:3,normal:2,low:1},Ve=function(){function e(e){this.middlewareStack=qe(),this.config=e}return e.prototype.send=function(e,t,n){var r="function"!=typeof t?t:void 0,i="function"==typeof t?t:n,o=e.resolveMiddleware(this.middlewareStack,this.config,r);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}(),Ye=function(){this.middlewareStack=qe()},Ke="***SensitiveInformation***",Ze=function(e){if(null!=e){if("boolean"==typeof e)return e;throw new TypeError("Expected boolean, got "+typeof e)}},Je=function(e){if(null!=e){if("number"==typeof e)return e;throw new TypeError("Expected number, got "+typeof e)}},Qe=Math.ceil(Math.pow(2,127)*(2-Math.pow(2,-23))),Xe=function(e){var t=Je(e);if(void 0!==t&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>Qe)throw new TypeError("Expected 32-bit float, got "+e);return t},et=function(e){if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError("Expected integer, got "+typeof e)}},tt=function(e){return it(e,32)},nt=function(e){return it(e,16)},rt=function(e){return it(e,8)},it=function(e,t){var n=et(e);if(void 0!==n&&ot(n,t)!==n)throw new TypeError("Expected "+t+"-bit integer, got "+e);return n},ot=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]}},ut=function(e,t){if(null==e){if(t)throw new TypeError("Expected a non-null value for "+t);throw new TypeError("Expected a non-null value")}return e},at=function(e){if(null!=e){if("object"==typeof e&&!Array.isArray(e))return e;throw new TypeError("Expected object, got "+typeof e)}},st=function(e){if(null!=e){if("string"==typeof e)return e;throw new TypeError("Expected string, got "+typeof e)}},ct=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,lt=function(e){var t=e.match(ct);if(null===t||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},ft=function(e){return"string"==typeof e?dt(e):Je(e)},dt=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: "+e)}},ht=function(e){return nt("string"==typeof e?lt(e):e)},pt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var vt=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),gt=function(e){if(null!=e){if("string"!=typeof e)throw new TypeError("RFC-3339 date-times must be expressed as strings");var t=vt.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");var n=h(t,8),r=(n[0],n[1]),i=n[2],o=n[3],u=n[4],a=n[5],s=n[6],c=n[7],l=ht(At(r)),f=bt(i,"month",1,12),d=bt(o,"day",1,31);return yt(l,f,d,{hours:u,minutes:a,seconds:s,fractionalMilliseconds:c})}},yt=(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{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{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{2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),function(e,t,n,r){var i=t-1;return wt(e,i,n),new Date(Date.UTC(e,i,n,bt(r.hours,"hour",0,23),bt(r.minutes,"minute",0,59),bt(r.seconds,"seconds",0,60),Et(r.fractionalMilliseconds)))}),mt=[31,28,31,30,31,30,31,31,30,31,30,31],wt=function(e,t,n){var r=mt[t];if(1===t&&Dt(e)&&(r=29),n>r)throw new TypeError("Invalid day for "+pt[t]+" in "+e+": "+n)},Dt=function(e){return e%4==0&&(e%100!=0||e%400==0)},bt=function(e,t,n,r){var i=function(e){return rt("string"==typeof e?lt(e):e)}(At(e));if(i<n||i>r)throw new TypeError(t+" must be between "+n+" and "+r+", inclusive");return i},Et=function(e){return null==e?0:1e3*function(e){return Xe("string"==typeof e?lt(e):e)}("0."+e)},At=function(e){for(var t=0;t<e.length-1&&"0"===e.charAt(t);)t++;return 0===t?e:e.slice(t)},St=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(5);function Ct(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}var Ft=function(){var e=Object.getPrototypeOf(this).constructor,t=Function.bind.apply(String,p([null],h(arguments))),n=new t;return Object.setPrototypeOf(n,e.prototype),n};Ft.prototype=Object.create(String.prototype,{constructor:{value:Ft,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(Ft,String);!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}a(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))}}(Ft);var _t=function(e){if(e!=e)return"NaN";switch(e){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return e}};var Pt=n(13),xt=n(12);for(var Bt=function(){function e(e){var t=this;"function"==typeof e?this.configProvider=function(){return l(t,void 0,void 0,(function(){return f(this,(function(t){switch(t.label){case 0:return[4,e()];case 1:return[2,t.sent()||{}]}}))}))}:this.config=null!=e?e:{}}return e.prototype.destroy=function(){},e.prototype.handle=function(e,t){var n=(void 0===t?{}:t).abortSignal;return l(this,void 0,void 0,(function(){var t,r,i,o,u,a,s,c,l,h,p,v;return f(this,(function(f){switch(f.label){case 0:return this.config||!this.configProvider?[3,2]:(t=this,[4,this.configProvider()]);case 1:t.config=f.sent(),f.label=2;case 2:return r=this.config.requestTimeout,(null==n?void 0:n.aborted)?((i=new Error("Request aborted")).name="AbortError",[2,Promise.reject(i)]):(o=e.path,e.query&&(u=function(e){var t,n,r=[];try{for(var i=d(Object.keys(e).sort()),o=i.next();!o.done;o=i.next()){var u=o.value,a=e[u];if(u=Ae(u),Array.isArray(a))for(var s=0,c=a.length;s<c;s++)r.push(u+"="+Ae(a[s]));else{var l=u;(a||"string"==typeof a)&&(l+="="+Ae(a)),r.push(l)}}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r.join("&")}(e.query))&&(o+="?"+u),a=e.port,s=e.method,c=e.protocol+"//"+e.hostname+(a?":"+a:"")+o,l="GET"===s||"HEAD"===s?void 0:e.body,h={body:l,headers:new Headers(e.headers),method:s},"undefined"!=typeof AbortController&&(h.signal=n),p=new Request(c,h),v=[fetch(p).then((function(e){var t,n,r=e.headers,i={};try{for(var o=d(r.entries()),u=o.next();!u.done;u=o.next()){var a=u.value;i[a[0]]=a[1]}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return void 0!==e.body?{response:new S({headers:i,statusCode:e.status,body:e.body})}:e.blob().then((function(t){return{response:new S({headers:i,statusCode:e.status,body:t})}}))})),(g=r,void 0===g&&(g=0),new Promise((function(e,t){g&&setTimeout((function(){var e=new Error("Request did not complete within "+g+" ms");e.name="TimeoutError",t(e)}),g)})))],n&&v.push(new Promise((function(e,t){n.onabort=function(){var e=new Error("Request aborted");e.name="AbortError",t(e)}}))),[2,Promise.race(v)])}var g}))}))},e}(),Tt={},Mt=new Array(64),Lt=0,Ot="A".charCodeAt(0),Rt="Z".charCodeAt(0);Lt+Ot<=Rt;Lt++){var kt=String.fromCharCode(Lt+Ot);Tt[kt]=Lt,Mt[Lt]=kt}for(Lt=0,Ot="a".charCodeAt(0),Rt="z".charCodeAt(0);Lt+Ot<=Rt;Lt++){kt=String.fromCharCode(Lt+Ot);var Nt=Lt+26;Tt[kt]=Nt,Mt[Nt]=kt}for(Lt=0;Lt<10;Lt++){Tt[Lt.toString(10)]=Lt+52;kt=Lt.toString(10),Nt=Lt+52;Tt[kt]=Nt,Mt[Nt]=kt}Tt["+"]=62,Mt[62]="+",Tt["/"]=63,Mt[63]="/";function It(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),i=0;i<e.length;i+=4){for(var o=0,u=0,a=i,s=i+3;a<=s;a++)if("="!==e[a]){if(!(e[a]in Tt))throw new TypeError("Invalid character "+e[a]+" in base64 string.");o|=Tt[e[a]]<<6*(s-a),u+=6}else o>>=6;var c=i/4*3;o>>=u%8;for(var l=Math.floor(u/8),f=0;f<l;f++){var d=8*(l-f-1);r.setUint8(c+f,(o&255<<d)>>d)}}return new Uint8Array(n)}function jt(e){for(var t="",n=0;n<e.length;n+=3){for(var r=0,i=0,o=n,u=Math.min(n+3,e.length);o<u;o++)r|=e[o]<<8*(u-o-1),i+=8;var a=Math.ceil(i/6);r<<=6*a-i;for(var s=1;s<=a;s++){var c=6*(a-s);t+=Mt[(r&63<<c)>>c]}t+="==".slice(0,4-a)}return t}var Ut=function(e){return"function"==typeof Blob&&e instanceof Blob?function(e){return l(this,void 0,void 0,(function(){var t,n;return f(this,(function(r){switch(r.label){case 0:return[4,Gt(e)];case 1:return t=r.sent(),n=It(t),[2,new Uint8Array(n)]}}))}))}(e):function(e){return l(this,void 0,void 0,(function(){var t,n,r,i,o,u,a;return f(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 i=s.sent(),o=i.done,(u=i.value)&&(a=t,(t=new Uint8Array(a.length+u.length)).set(a),t.set(u,a.length)),r=o,[3,1];case 3:return[2,t]}}))}))}(e)};function Gt(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 i=null!==(e=r.result)&&void 0!==e?e:"",o=i.indexOf(","),u=o>-1?o+1:i.length;t(i.substring(u))},r.onabort=function(){return n(new Error("Read aborted"))},r.onerror=function(){return n(r.error)},r.readAsDataURL(e)}))}function zt(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}var Ht=n(1),qt=n.n(Ht),$t=function(e){var t=e.serviceId,n=e.clientVersion;return function(){return l(void 0,void 0,void 0,(function(){var e,r,i,o,u,a,s,c,l;return f(this,(function(f){return e="undefined"!=typeof window&&(null===(i=null===window||void 0===window?void 0:window.navigator)||void 0===i?void 0:i.userAgent)?qt.a.parse(window.navigator.userAgent):void 0,r=[["aws-sdk-js",n],["os/"+((null===(o=null==e?void 0:e.os)||void 0===o?void 0:o.name)||"other"),null===(u=null==e?void 0:e.os)||void 0===u?void 0:u.version],["lang/js"],["md/browser",(null!==(s=null===(a=null==e?void 0:e.browser)||void 0===a?void 0:a.name)&&void 0!==s?s:"unknown")+"_"+(null!==(l=null===(c=null==e?void 0:e.browser)||void 0===c?void 0:c.version)&&void 0!==l?l:"unknown")]],t&&r.push(["api/"+t,n]),[2,r]}))}))}};var Wt=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 i=e.charCodeAt(n);if(i<128)t.push(i);else if(i<2048)t.push(i>>6|192,63&i|128);else if(n+1<e.length&&55296==(64512&i)&&56320==(64512&e.charCodeAt(n+1))){var o=65536+((1023&i)<<10)+(1023&e.charCodeAt(++n));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)},Vt=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 i=e[n];if(i<128)t+=String.fromCharCode(i);else if(192<=i&&i<224){var o=e[++n];t+=String.fromCharCode((31&i)<<6|63&o)}else if(240<=i&&i<365){var u="%"+[i,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(u)}else t+=String.fromCharCode((15&i)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)};var Yt,Kt,Zt,Jt,Qt,Xt,en,tn,nn,rn,on,un,an,sn,cn,ln,fn,dn,hn,pn,vn,gn,yn,mn,wn,Dn,bn,En,An,Sn,Cn,Fn,_n,Pn,xn,Bn,Tn,Mn,Ln,On,Rn,kn,Nn,In,jn,Un,Gn,zn,Hn,qn,$n,Wn,Vn,Yn,Kn,Zn,Jn,Qn,Xn,er,tr,nr,rr,ir,or,ur,ar,sr,cr,lr,fr,dr,hr,pr,vr,gr,yr,mr,wr,Dr,br,Er,Ar,Sr,Cr,Fr,_r,Pr,xr,Br,Tr,Mr,Lr,Or,Rr,kr,Nr,Ir,jr,Ur,Gr,zr,Hr,qr,$r,Wr,Vr,Yr,Kr,Zr,Jr,Qr,Xr,ei,ti,ni,ri,ii,oi,ui,ai,si,ci,li,fi,di,hi,pi,vi,gi,yi,mi,wi,Di,bi,Ei,Ai,Si,Ci,Fi,_i,Pi,xi,Bi,Ti,Mi,Li,Oi=function(e){var t,n=new URL(e),r=n.hostname,i=n.pathname,o=n.port,u=n.protocol,a=n.search;return a&&(t=function(e){var t,n,r={};if(e=e.replace(/^\?/,""))try{for(var i=d(e.split("&")),o=i.next();!o.done;o=i.next()){var u=h(o.value.split("="),2),a=u[0],s=u[1],c=void 0===s?null:s;a=decodeURIComponent(a),c&&(c=decodeURIComponent(c)),a in r?Array.isArray(r[a])?r[a].push(c):r[a]=[r[a],c]:r[a]=c}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}(a)),{hostname:r,port:o?parseInt(o):void 0,protocol:u,path:i,query:t}},Ri={},ki={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-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:"geo.{region}.amazonaws.com",tags:[]},{hostname:"geo-fips.{region}.amazonaws.com",tags:["fips"]},{hostname:"geo-fips.{region}.api.aws",tags:["dualstack","fips"]},{hostname:"geo.{region}.api.aws",tags:["dualstack"]}]},"aws-cn":{regions:["cn-north-1","cn-northwest-1"],regionRegex:"^cn\\-\\w+\\-\\d+$",variants:[{hostname:"geo.{region}.amazonaws.com.cn",tags:[]},{hostname:"geo-fips.{region}.amazonaws.com.cn",tags:["fips"]},{hostname:"geo-fips.{region}.api.amazonwebservices.com.cn",tags:["dualstack","fips"]},{hostname:"geo.{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:"geo.{region}.c2s.ic.gov",tags:[]},{hostname:"geo-fips.{region}.c2s.ic.gov",tags:["fips"]}]},"aws-iso-b":{regions:["us-isob-east-1"],regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",variants:[{hostname:"geo.{region}.sc2s.sgov.gov",tags:[]},{hostname:"geo-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:"geo.{region}.amazonaws.com",tags:[]},{hostname:"geo-fips.{region}.amazonaws.com",tags:["fips"]},{hostname:"geo-fips.{region}.api.aws",tags:["dualstack","fips"]},{hostname:"geo.{region}.api.aws",tags:["dualstack"]}]}},Ni=function(e,t){return l(void 0,void 0,void 0,(function(){return f(this,(function(n){return[2,E(e,s(s({},t),{signingService:"geo",regionHash:Ri,partitionHash:ki}))]}))}))},Ii=["in-region","cross-region","mobile","standard","legacy"],ji=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)?qt.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},Ui=function(e){var t,n,r,i,o,u,a,c,d,h,p,v,g,y,m,w,D=function(e){var t=(void 0===e?{}:e).defaultsMode;return ie((function(){return l(void 0,void 0,void 0,(function(){var e,n;return f(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(ji()?"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 '+Ii.join(", ")+", got "+e)}return[2]}}))}))}))}(e),b=function(){return D().then(St)},E=function(e){var t,n,r,i,o;return{apiVersion:"2020-11-19",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:Ni,serviceId:null!==(i=null==e?void 0:e.serviceId)&&void 0!==i?i:"Location",urlParser:null!==(o=null==e?void 0:e.urlParser)&&void 0!==o?o:Oi}}(e);return s(s(s({},E),e),{runtime:"browser",defaultsMode:D,base64Decoder:null!==(t=null==e?void 0:e.base64Decoder)&&void 0!==t?t:It,base64Encoder:null!==(n=null==e?void 0:e.base64Encoder)&&void 0!==n?n:jt,bodyLengthChecker:null!==(r=null==e?void 0:e.bodyLengthChecker)&&void 0!==r?r:zt,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!==(o=null==e?void 0:e.defaultUserAgentProvider)&&void 0!==o?o:$t({serviceId:E.serviceId,clientVersion:Pt.version}),maxAttempts:null!==(u=null==e?void 0:e.maxAttempts)&&void 0!==u?u:3,region:null!==(a=null==e?void 0:e.region)&&void 0!==a?a:(w="Region is missing",function(){return Promise.reject(w)}),requestHandler:null!==(c=null==e?void 0:e.requestHandler)&&void 0!==c?c:new Bt(b),retryMode:null!==(d=null==e?void 0:e.retryMode)&&void 0!==d?d:function(){return l(void 0,void 0,void 0,(function(){return f(this,(function(e){switch(e.label){case 0:return[4,b()];case 1:return[2,e.sent().retryMode||O]}}))}))},sha256:null!==(h=null==e?void 0:e.sha256)&&void 0!==h?h:xt.Sha256,streamCollector:null!==(p=null==e?void 0:e.streamCollector)&&void 0!==p?p:Ut,useDualstackEndpoint:null!==(v=null==e?void 0:e.useDualstackEndpoint)&&void 0!==v?v:function(){return Promise.resolve(!1)},useFipsEndpoint:null!==(g=null==e?void 0:e.useFipsEndpoint)&&void 0!==g?g:function(){return Promise.resolve(!1)},utf8Decoder:null!==(y=null==e?void 0:e.utf8Decoder)&&void 0!==y?y:Wt,utf8Encoder:null!==(m=null==e?void 0:e.utf8Encoder)&&void 0!==m?m:Vt})},Gi=function(e){function t(t){var n,r,i=this,o=function(e){var t=e.region,n=e.useFipsEndpoint;if(!t)throw new Error("Region is missing");return s(s({},e),{region:function(){return l(void 0,void 0,void 0,(function(){var e;return f(this,(function(n){switch(n.label){case 0:return"string"==typeof t?[2,D(t)]:[4,t()];case 1:return e=n.sent(),[2,D(e)]}}))}))},useFipsEndpoint:function(){return l(void 0,void 0,void 0,(function(){var e;return f(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 w(e)?[2,!0]:[2,"boolean"==typeof n?Promise.resolve(n):n()]}}))}))}})}(Ui(t)),u=m(o),a=function(e){return s(s({},e),{customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent})}(function(e){var t,n=e.credentials?Oe(e.credentials):e.credentialDefaultProvider(e),r=e.signingEscapePath,i=void 0===r||r,o=e.systemClockOffset,u=void 0===o?e.systemClockOffset||0:o,a=e.sha256;return t=e.signer?Le(e.signer):function(){return Le(e.region)().then((function(t){return l(void 0,void 0,void 0,(function(){var n,r,i,o;return f(this,(function(u){switch(u.label){case 0:return r=(n=e).regionInfoProvider,i=[t],o={},[4,e.useFipsEndpoint()];case 1:return o.useFipsEndpoint=u.sent(),[4,e.useDualstackEndpoint()];case 2:return[4,r.apply(n,i.concat([(o.useDualstackEndpoint=u.sent(),o)]))];case 3:return[2,[u.sent()||{},t]]}}))}))})).then((function(t){var r=h(t,2),o=r[0],u=r[1],c=o.signingRegion,l=o.signingService;e.signingRegion=e.signingRegion||c||u,e.signingName=e.signingName||l||e.serviceId;var f=s(s({},e),{credentials:n,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:i});return new(e.signerConstructor||Be)(f)}))},s(s({},e),{systemClockOffset:u,signingEscapePath:i,credentials:n,signer:t})}((r=te((n=u).maxAttempts),s(s({},n),{maxAttempts:r,retryStrategy:function(){return l(void 0,void 0,void 0,(function(){return f(this,(function(e){switch(e.label){case 0:return n.retryStrategy?[2,n.retryStrategy]:[4,ee(n.retryMode)];case 1:return e.sent()===P.ADAPTIVE?[2,new X(r)]:[2,new J(r)]}}))}))}}))));return(i=e.call(this,a)||this).config=a,i.middlewareStack.use(re(i.config)),i.middlewareStack.use(_(i.config)),i.middlewareStack.use(B(i.config)),i.middlewareStack.use(M(i.config)),i.middlewareStack.use(je(i.config)),i.middlewareStack.use(He(i.config)),i}return a(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(Ve),zi={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},Hi={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function qi(e,t,n){return{applyToStack:function(r){r.add(function(e,t){return function(n,r){return function(r){return l(void 0,void 0,void 0,(function(){var i,o,u;return f(this,(function(a){switch(a.label){case 0:return[4,n(r)];case 1:i=a.sent().response,a.label=2;case 2:return a.trys.push([2,4,,5]),[4,t(i,e)];case 3:return o=a.sent(),[2,{response:i,output:o}];case 4:throw u=a.sent(),Object.assign(u,{$response:i});case 5:return[2]}}))}))}}}(e,n),zi),r.add(function(e,t){return function(n,r){return function(r){return l(void 0,void 0,void 0,(function(){var i;return f(this,(function(o){switch(o.label){case 0:return[4,t(r.input,e)];case 1:return i=o.sent(),[2,n(s(s({},r),{request:i}))]}}))}))}}}(e,t),Hi)}}}(Yt||(Yt={})).filterSensitiveLog=function(e){return s({},e)},(Kt||(Kt={})).filterSensitiveLog=function(e){return s({},e)},(Zt||(Zt={})).filterSensitiveLog=function(e){return s({},e)},(Jt||(Jt={})).filterSensitiveLog=function(e){return s({},e)},(Qt||(Qt={})).filterSensitiveLog=function(e){return s({},e)},(Xt||(Xt={})).filterSensitiveLog=function(e){return s({},e)},(en||(en={})).filterSensitiveLog=function(e){return s({},e)},(tn||(tn={})).filterSensitiveLog=function(e){return s({},e)},(nn||(nn={})).filterSensitiveLog=function(e){return s({},e)},(rn||(rn={})).filterSensitiveLog=function(e){return s({},e)},(on||(on={})).filterSensitiveLog=function(e){return s({},e)},(un||(un={})).filterSensitiveLog=function(e){return s(s(s({},e),e.Position&&{Position:Ke}),e.PositionProperties&&{PositionProperties:Ke})},(an||(an={})).filterSensitiveLog=function(e){return s(s({},e),e.DevicePositionUpdates&&{DevicePositionUpdates:e.DevicePositionUpdates.map((function(e){return un.filterSensitiveLog(e)}))})},(sn||(sn={})).filterSensitiveLog=function(e){return s({},e)},(cn||(cn={})).filterSensitiveLog=function(e){return s({},e)},(ln||(ln={})).filterSensitiveLog=function(e){return s({},e)},(fn||(fn={})).filterSensitiveLog=function(e){return s(s(s({},e),e.Position&&{Position:Ke}),e.PositionProperties&&{PositionProperties:Ke})},(dn||(dn={})).filterSensitiveLog=function(e){return s({},e)},(hn||(hn={})).filterSensitiveLog=function(e){return s(s({},e),e.DevicePositions&&{DevicePositions:e.DevicePositions.map((function(e){return fn.filterSensitiveLog(e)}))})},(pn||(pn={})).filterSensitiveLog=function(e){return s(s({},e),e.Polygon&&{Polygon:e.Polygon.map((function(e){return Ke}))})},(vn||(vn={})).filterSensitiveLog=function(e){return s(s({},e),e.Geometry&&{Geometry:pn.filterSensitiveLog(e.Geometry)})},(gn||(gn={})).filterSensitiveLog=function(e){return s(s({},e),e.Entries&&{Entries:e.Entries.map((function(e){return vn.filterSensitiveLog(e)}))})},(yn||(yn={})).filterSensitiveLog=function(e){return s({},e)},(mn||(mn={})).filterSensitiveLog=function(e){return s({},e)},(wn||(wn={})).filterSensitiveLog=function(e){return s({},e)},(Dn||(Dn={})).filterSensitiveLog=function(e){return s(s({},e),e.Updates&&{Updates:e.Updates.map((function(e){return un.filterSensitiveLog(e)}))})},(bn||(bn={})).filterSensitiveLog=function(e){return s({},e)},(En||(En={})).filterSensitiveLog=function(e){return s({},e)},(An||(An={})).filterSensitiveLog=function(e){return s({},e)},(Sn||(Sn={})).filterSensitiveLog=function(e){return s({},e)},(Cn||(Cn={})).filterSensitiveLog=function(e){return s({},e)},(Fn||(Fn={})).filterSensitiveLog=function(e){return s({},e)},(_n||(_n={})).filterSensitiveLog=function(e){return s(s(s(s({},e),e.DeparturePosition&&{DeparturePosition:Ke}),e.DestinationPosition&&{DestinationPosition:Ke}),e.WaypointPositions&&{WaypointPositions:Ke})},(Pn||(Pn={})).filterSensitiveLog=function(e){return s(s({},e),e.LineString&&{LineString:Ke})},(xn||(xn={})).filterSensitiveLog=function(e){return s(s(s({},e),e.StartPosition&&{StartPosition:Ke}),e.EndPosition&&{EndPosition:Ke})},(Bn||(Bn={})).filterSensitiveLog=function(e){return s(s(s(s(s({},e),e.StartPosition&&{StartPosition:Ke}),e.EndPosition&&{EndPosition:Ke}),e.Geometry&&{Geometry:Pn.filterSensitiveLog(e.Geometry)}),e.Steps&&{Steps:e.Steps.map((function(e){return xn.filterSensitiveLog(e)}))})},(Tn||(Tn={})).filterSensitiveLog=function(e){return s(s({},e),e.RouteBBox&&{RouteBBox:Ke})},(Mn||(Mn={})).filterSensitiveLog=function(e){return s(s(s({},e),e.Legs&&{Legs:e.Legs.map((function(e){return Bn.filterSensitiveLog(e)}))}),e.Summary&&{Summary:Tn.filterSensitiveLog(e.Summary)})},(Ln||(Ln={})).filterSensitiveLog=function(e){return s(s(s({},e),e.DeparturePositions&&{DeparturePositions:Ke}),e.DestinationPositions&&{DestinationPositions:Ke})},(On||(On={})).filterSensitiveLog=function(e){return s({},e)},(Rn||(Rn={})).filterSensitiveLog=function(e){return s({},e)},(kn||(kn={})).filterSensitiveLog=function(e){return s({},e)},(Nn||(Nn={})).filterSensitiveLog=function(e){return s(s(s({},e),e.SnappedDeparturePositions&&{SnappedDeparturePositions:Ke}),e.SnappedDestinationPositions&&{SnappedDestinationPositions:Ke})},(In||(In={})).filterSensitiveLog=function(e){return s({},e)},(jn||(jn={})).filterSensitiveLog=function(e){return s({},e)},(Un||(Un={})).filterSensitiveLog=function(e){return s({},e)},(Gn||(Gn={})).filterSensitiveLog=function(e){return s({},e)},(zn||(zn={})).filterSensitiveLog=function(e){return s({},e)},(Hn||(Hn={})).filterSensitiveLog=function(e){return s({},e)},(qn||(qn={})).filterSensitiveLog=function(e){return s({},e)},($n||($n={})).filterSensitiveLog=function(e){return s({},e)},(Wn||(Wn={})).filterSensitiveLog=function(e){return s({},e)},(Vn||(Vn={})).filterSensitiveLog=function(e){return s({},e)},(Yn||(Yn={})).filterSensitiveLog=function(e){return s({},e)},(Kn||(Kn={})).filterSensitiveLog=function(e){return s({},e)},(Zn||(Zn={})).filterSensitiveLog=function(e){return s({},e)},(Jn||(Jn={})).filterSensitiveLog=function(e){return s({},e)},(Qn||(Qn={})).filterSensitiveLog=function(e){return s({},e)},(Xn||(Xn={})).filterSensitiveLog=function(e){return s({},e)},(er||(er={})).filterSensitiveLog=function(e){return s({},e)},(tr||(tr={})).filterSensitiveLog=function(e){return s({},e)},(nr||(nr={})).filterSensitiveLog=function(e){return s({},e)},(rr||(rr={})).filterSensitiveLog=function(e){return s({},e)},(ir||(ir={})).filterSensitiveLog=function(e){return s({},e)},(or||(or={})).filterSensitiveLog=function(e){return s({},e)},(ur||(ur={})).filterSensitiveLog=function(e){return s({},e)},(ar||(ar={})).filterSensitiveLog=function(e){return s({},e)},(sr||(sr={})).filterSensitiveLog=function(e){return s({},e)},(cr||(cr={})).filterSensitiveLog=function(e){return s({},e)},(lr||(lr={})).filterSensitiveLog=function(e){return s({},e)},(fr||(fr={})).filterSensitiveLog=function(e){return s({},e)},(dr||(dr={})).filterSensitiveLog=function(e){return s({},e)},(hr||(hr={})).filterSensitiveLog=function(e){return s({},e)},(pr||(pr={})).filterSensitiveLog=function(e){return s({},e)},(vr||(vr={})).filterSensitiveLog=function(e){return s({},e)},(gr||(gr={})).filterSensitiveLog=function(e){return s({},e)},(yr||(yr={})).filterSensitiveLog=function(e){return s({},e)},(mr||(mr={})).filterSensitiveLog=function(e){return s({},e)},(wr||(wr={})).filterSensitiveLog=function(e){return s({},e)},(Dr||(Dr={})).filterSensitiveLog=function(e){return s({},e)},(br||(br={})).filterSensitiveLog=function(e){return s({},e)},(Er||(Er={})).filterSensitiveLog=function(e){return s({},e)},(Ar||(Ar={})).filterSensitiveLog=function(e){return s({},e)},(Sr||(Sr={})).filterSensitiveLog=function(e){return s({},e)},(Cr||(Cr={})).filterSensitiveLog=function(e){return s(s({},e),e.Geometry&&{Geometry:pn.filterSensitiveLog(e.Geometry)})},(Fr||(Fr={})).filterSensitiveLog=function(e){return s({},e)},(_r||(_r={})).filterSensitiveLog=function(e){return s({},e)},(Pr||(Pr={})).filterSensitiveLog=function(e){return s({},e)},(xr||(xr={})).filterSensitiveLog=function(e){return s({},e)},(Br||(Br={})).filterSensitiveLog=function(e){return s(s({},e),e.Geometry&&{Geometry:pn.filterSensitiveLog(e.Geometry)})},(Tr||(Tr={})).filterSensitiveLog=function(e){return s(s({},e),e.Entries&&{Entries:e.Entries.map((function(e){return Br.filterSensitiveLog(e)}))})},(Mr||(Mr={})).filterSensitiveLog=function(e){return s(s({},e),e.Geometry&&{Geometry:pn.filterSensitiveLog(e.Geometry)})},(Lr||(Lr={})).filterSensitiveLog=function(e){return s({},e)},(Or||(Or={})).filterSensitiveLog=function(e){return s({},e)},(Rr||(Rr={})).filterSensitiveLog=function(e){return s({},e)},(kr||(kr={})).filterSensitiveLog=function(e){return s({},e)},(Nr||(Nr={})).filterSensitiveLog=function(e){return s(s(s({},e),e.Position&&{Position:Ke}),e.PositionProperties&&{PositionProperties:Ke})},(Ir||(Ir={})).filterSensitiveLog=function(e){return s({},e)},(jr||(jr={})).filterSensitiveLog=function(e){return s(s({},e),e.DevicePositions&&{DevicePositions:e.DevicePositions.map((function(e){return fn.filterSensitiveLog(e)}))})},(Ur||(Ur={})).filterSensitiveLog=function(e){return s({},e)},(Gr||(Gr={})).filterSensitiveLog=function(e){return s({},e)},(zr||(zr={})).filterSensitiveLog=function(e){return s({},e)},(Hr||(Hr={})).filterSensitiveLog=function(e){return s({},e)},(qr||(qr={})).filterSensitiveLog=function(e){return s({},e)},($r||($r={})).filterSensitiveLog=function(e){return s({},e)},(Wr||(Wr={})).filterSensitiveLog=function(e){return s({},e)},(Vr||(Vr={})).filterSensitiveLog=function(e){return s({},e)},(Yr||(Yr={})).filterSensitiveLog=function(e){return s({},e)},(Kr||(Kr={})).filterSensitiveLog=function(e){return s(s(s({},e),e.Position&&{Position:Ke}),e.PositionProperties&&{PositionProperties:Ke})},(Zr||(Zr={})).filterSensitiveLog=function(e){return s(s({},e),e.Entries&&{Entries:e.Entries.map((function(e){return Kr.filterSensitiveLog(e)}))})},(Jr||(Jr={})).filterSensitiveLog=function(e){return s({},e)},(Qr||(Qr={})).filterSensitiveLog=function(e){return s({},e)},(Xr||(Xr={})).filterSensitiveLog=function(e){return s({},e)},(ei||(ei={})).filterSensitiveLog=function(e){return s({},e)},(ti||(ti={})).filterSensitiveLog=function(e){return s({},e)},(ni||(ni={})).filterSensitiveLog=function(e){return s({},e)},(ri||(ri={})).filterSensitiveLog=function(e){return s({},e)},(ii||(ii={})).filterSensitiveLog=function(e){return s({},e)},(oi||(oi={})).filterSensitiveLog=function(e){return s({},e)},(ui||(ui={})).filterSensitiveLog=function(e){return s({},e)},(ai||(ai={})).filterSensitiveLog=function(e){return s({},e)},(si||(si={})).filterSensitiveLog=function(e){return s({},e)},(ci||(ci={})).filterSensitiveLog=function(e){return s({},e)},(li||(li={})).filterSensitiveLog=function(e){return s({},e)},(fi||(fi={})).filterSensitiveLog=function(e){return s({},e)},(di||(di={})).filterSensitiveLog=function(e){return s({},e)},(hi||(hi={})).filterSensitiveLog=function(e){return s(s({},e),e.Position&&{Position:Ke})},(pi||(pi={})).filterSensitiveLog=function(e){return s(s({},e),e.Point&&{Point:Ke})},(vi||(vi={})).filterSensitiveLog=function(e){return s({},e)},(gi||(gi={})).filterSensitiveLog=function(e){return s(s({},e),e.Geometry&&{Geometry:pi.filterSensitiveLog(e.Geometry)})},(yi||(yi={})).filterSensitiveLog=function(e){return s(s({},e),e.Place&&{Place:gi.filterSensitiveLog(e.Place)})},(mi||(mi={})).filterSensitiveLog=function(e){return s(s({},e),e.Position&&{Position:Ke})},(wi||(wi={})).filterSensitiveLog=function(e){return s(s(s({},e),e.Summary&&{Summary:mi.filterSensitiveLog(e.Summary)}),e.Results&&{Results:e.Results.map((function(e){return yi.filterSensitiveLog(e)}))})},(Di||(Di={})).filterSensitiveLog=function(e){return s(s(s(s({},e),e.Text&&{Text:Ke}),e.BiasPosition&&{BiasPosition:Ke}),e.FilterBBox&&{FilterBBox:Ke})},(bi||(bi={})).filterSensitiveLog=function(e){return s({},e)},(Ei||(Ei={})).filterSensitiveLog=function(e){return s(s(s(s({},e),e.Text&&{Text:Ke}),e.BiasPosition&&{BiasPosition:Ke}),e.FilterBBox&&{FilterBBox:Ke})},(Ai||(Ai={})).filterSensitiveLog=function(e){return s(s({},e),e.Summary&&{Summary:Ei.filterSensitiveLog(e.Summary)})},(Si||(Si={})).filterSensitiveLog=function(e){return s(s(s(s({},e),e.Text&&{Text:Ke}),e.BiasPosition&&{BiasPosition:Ke}),e.FilterBBox&&{FilterBBox:Ke})},(Ci||(Ci={})).filterSensitiveLog=function(e){return s(s({},e),e.Place&&{Place:gi.filterSensitiveLog(e.Place)})},(Fi||(Fi={})).filterSensitiveLog=function(e){return s(s(s(s(s({},e),e.Text&&{Text:Ke}),e.BiasPosition&&{BiasPosition:Ke}),e.FilterBBox&&{FilterBBox:Ke}),e.ResultBBox&&{ResultBBox:Ke})},(_i||(_i={})).filterSensitiveLog=function(e){return s(s(s({},e),e.Summary&&{Summary:Fi.filterSensitiveLog(e.Summary)}),e.Results&&{Results:e.Results.map((function(e){return Ci.filterSensitiveLog(e)}))})},(Pi||(Pi={})).filterSensitiveLog=function(e){return s({},e)},(xi||(xi={})).filterSensitiveLog=function(e){return s({},e)},(Bi||(Bi={})).filterSensitiveLog=function(e){return s({},e)},(Ti||(Ti={})).filterSensitiveLog=function(e){return s({},e)},(Mi||(Mi={})).filterSensitiveLog=function(e){return s({},e)},(Li||(Li={})).filterSensitiveLog=function(e){return s({},e)};var $i=function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,i,o,u,a,c,l,d,h,p,v;return f(this,(function(f){switch(f.label){case 0:return r=[s({},e)],v={},[4,Bo(e.body,t)];case 1:switch(n=s.apply(void 0,r.concat([(v.body=f.sent(),v)])),o="UnknownError",o=To(e,n.body),o){case"AccessDeniedException":case"com.amazonaws.location#AccessDeniedException":return[3,2];case"InternalServerException":case"com.amazonaws.location#InternalServerException":return[3,4];case"ResourceNotFoundException":case"com.amazonaws.location#ResourceNotFoundException":return[3,6];case"ThrottlingException":case"com.amazonaws.location#ThrottlingException":return[3,8];case"ValidationException":case"com.amazonaws.location#ValidationException":return[3,10]}return[3,12];case 2:return u=[{}],[4,Ji(n,t)];case 3:return i=s.apply(void 0,[s.apply(void 0,u.concat([f.sent()])),{name:o,$metadata:Po(e)}]),[3,13];case 4:return a=[{}],[4,Qi(n,t)];case 5:return i=s.apply(void 0,[s.apply(void 0,a.concat([f.sent()])),{name:o,$metadata:Po(e)}]),[3,13];case 6:return c=[{}],[4,Xi(n,t)];case 7:return i=s.apply(void 0,[s.apply(void 0,c.concat([f.sent()])),{name:o,$metadata:Po(e)}]),[3,13];case 8:return l=[{}],[4,eo(n,t)];case 9:return i=s.apply(void 0,[s.apply(void 0,l.concat([f.sent()])),{name:o,$metadata:Po(e)}]),[3,13];case 10:return d=[{}],[4,to(n,t)];case 11:return i=s.apply(void 0,[s.apply(void 0,d.concat([f.sent()])),{name:o,$metadata:Po(e)}]),[3,13];case 12:h=n.body,o=h.code||h.Code||o,i=s(s({},h),{name:""+o,message:h.message||h.Message||o,$fault:"client",$metadata:Po(e)}),f.label=13;case 13:return p=i.message||i.Message||o,i.message=p,delete i.Message,[2,Promise.reject(Object.assign(new Error(p),i))]}}))}))},Wi=function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,i,o,u,a,c,l,d,h,p,v;return f(this,(function(f){switch(f.label){case 0:return r=[s({},e)],v={},[4,Bo(e.body,t)];case 1:switch(n=s.apply(void 0,r.concat([(v.body=f.sent(),v)])),o="UnknownError",o=To(e,n.body),o){case"AccessDeniedException":case"com.amazonaws.location#AccessDeniedException":return[3,2];case"InternalServerException":case"com.amazonaws.location#InternalServerException":return[3,4];case"ResourceNotFoundException":case"com.amazonaws.location#ResourceNotFoundException":return[3,6];case"ThrottlingException":case"com.amazonaws.location#ThrottlingException":return[3,8];case"ValidationException":case"com.amazonaws.location#ValidationException":return[3,10]}return[3,12];case 2:return u=[{}],[4,Ji(n,t)];case 3:return i=s.apply(void 0,[s.apply(void 0,u.concat([f.sent()])),{name:o,$metadata:Po(e)}]),[3,13];case 4:return a=[{}],[4,Qi(n,t)];case 5:return i=s.apply(void 0,[s.apply(void 0,a.concat([f.sent()])),{name:o,$metadata:Po(e)}]),[3,13];case 6:return c=[{}],[4,Xi(n,t)];case 7:return i=s.apply(void 0,[s.apply(void 0,c.concat([f.sent()])),{name:o,$metadata:Po(e)}]),[3,13];case 8:return l=[{}],[4,eo(n,t)];case 9:return i=s.apply(void 0,[s.apply(void 0,l.concat([f.sent()])),{name:o,$metadata:Po(e)}]),[3,13];case 10:return d=[{}],[4,to(n,t)];case 11:return i=s.apply(void 0,[s.apply(void 0,d.concat([f.sent()])),{name:o,$metadata:Po(e)}]),[3,13];case 12:h=n.body,o=h.code||h.Code||o,i=s(s({},h),{name:""+o,message:h.message||h.Message||o,$fault:"client",$metadata:Po(e)}),f.label=13;case 13:return p=i.message||i.Message||o,i.message=p,delete i.Message,[2,Promise.reject(Object.assign(new Error(p),i))]}}))}))},Vi=function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,i,o,u,a,c,l,d,h,p,v;return f(this,(function(f){switch(f.label){case 0:return r=[s({},e)],v={},[4,Bo(e.body,t)];case 1:switch(n=s.apply(void 0,r.concat([(v.body=f.sent(),v)])),o="UnknownError",o=To(e,n.body),o){case"AccessDeniedException":case"com.amazonaws.location#AccessDeniedException":return[3,2];case"InternalServerException":case"com.amazonaws.location#InternalServerException":return[3,4];case"ResourceNotFoundException":case"com.amazonaws.location#ResourceNotFoundException":return[3,6];case"ThrottlingException":case"com.amazonaws.location#ThrottlingException":return[3,8];case"ValidationException":case"com.amazonaws.location#ValidationException":return[3,10]}return[3,12];case 2:return u=[{}],[4,Ji(n,t)];case 3:return i=s.apply(void 0,[s.apply(void 0,u.concat([f.sent()])),{name:o,$metadata:Po(e)}]),[3,13];case 4:return a=[{}],[4,Qi(n,t)];case 5:return i=s.apply(void 0,[s.apply(void 0,a.concat([f.sent()])),{name:o,$metadata:Po(e)}]),[3,13];case 6:return c=[{}],[4,Xi(n,t)];case 7:return i=s.apply(void 0,[s.apply(void 0,c.concat([f.sent()])),{name:o,$metadata:Po(e)}]),[3,13];case 8:return l=[{}],[4,eo(n,t)];case 9:return i=s.apply(void 0,[s.apply(void 0,l.concat([f.sent()])),{name:o,$metadata:Po(e)}]),[3,13];case 10:return d=[{}],[4,to(n,t)];case 11:return i=s.apply(void 0,[s.apply(void 0,d.concat([f.sent()])),{name:o,$metadata:Po(e)}]),[3,13];case 12:h=n.body,o=h.code||h.Code||o,i=s(s({},h),{name:""+o,message:h.message||h.Message||o,$fault:"client",$metadata:Po(e)}),f.label=13;case 13:return p=i.message||i.Message||o,i.message=p,delete i.Message,[2,Promise.reject(Object.assign(new Error(p),i))]}}))}))},Yi=function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,i,o,u,a,c,l,d,h,p,v;return f(this,(function(f){switch(f.label){case 0:return r=[s({},e)],v={},[4,Bo(e.body,t)];case 1:switch(n=s.apply(void 0,r.concat([(v.body=f.sent(),v)])),o="UnknownError",o=To(e,n.body),o){case"AccessDeniedException":case"com.amazonaws.location#AccessDeniedException":return[3,2];case"InternalServerException":case"com.amazonaws.location#InternalServerException":return[3,4];case"ResourceNotFoundException":case"com.amazonaws.location#ResourceNotFoundException":return[3,6];case"ThrottlingException":case"com.amazonaws.location#ThrottlingException":return[3,8];case"ValidationException":case"com.amazonaws.location#ValidationException":return[3,10]}return[3,12];case 2:return u=[{}],[4,Ji(n,t)];case 3:return i=s.apply(void 0,[s.apply(void 0,u.concat([f.sent()])),{name:o,$metadata:Po(e)}]),[3,13];case 4:return a=[{}],[4,Qi(n,t)];case 5:return i=s.apply(void 0,[s.apply(void 0,a.concat([f.sent()])),{name:o,$metadata:Po(e)}]),[3,13];case 6:return c=[{}],[4,Xi(n,t)];case 7:return i=s.apply(void 0,[s.apply(void 0,c.concat([f.sent()])),{name:o,$metadata:Po(e)}]),[3,13];case 8:return l=[{}],[4,eo(n,t)];case 9:return i=s.apply(void 0,[s.apply(void 0,l.concat([f.sent()])),{name:o,$metadata:Po(e)}]),[3,13];case 10:return d=[{}],[4,to(n,t)];case 11:return i=s.apply(void 0,[s.apply(void 0,d.concat([f.sent()])),{name:o,$metadata:Po(e)}]),[3,13];case 12:h=n.body,o=h.code||h.Code||o,i=s(s({},h),{name:""+o,message:h.message||h.Message||o,$fault:"client",$metadata:Po(e)}),f.label=13;case 13:return p=i.message||i.Message||o,i.message=p,delete i.Message,[2,Promise.reject(Object.assign(new Error(p),i))]}}))}))},Ki=function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,i,o,u,a,c,l,d,h,p,v;return f(this,(function(f){switch(f.label){case 0:return r=[s({},e)],v={},[4,Bo(e.body,t)];case 1:switch(n=s.apply(void 0,r.concat([(v.body=f.sent(),v)])),o="UnknownError",o=To(e,n.body),o){case"AccessDeniedException":case"com.amazonaws.location#AccessDeniedException":return[3,2];case"InternalServerException":case"com.amazonaws.location#InternalServerException":return[3,4];case"ResourceNotFoundException":case"com.amazonaws.location#ResourceNotFoundException":return[3,6];case"ThrottlingException":case"com.amazonaws.location#ThrottlingException":return[3,8];case"ValidationException":case"com.amazonaws.location#ValidationException":return[3,10]}return[3,12];case 2:return u=[{}],[4,Ji(n,t)];case 3:return i=s.apply(void 0,[s.apply(void 0,u.concat([f.sent()])),{name:o,$metadata:Po(e)}]),[3,13];case 4:return a=[{}],[4,Qi(n,t)];case 5:return i=s.apply(void 0,[s.apply(void 0,a.concat([f.sent()])),{name:o,$metadata:Po(e)}]),[3,13];case 6:return c=[{}],[4,Xi(n,t)];case 7:return i=s.apply(void 0,[s.apply(void 0,c.concat([f.sent()])),{name:o,$metadata:Po(e)}]),[3,13];case 8:return l=[{}],[4,eo(n,t)];case 9:return i=s.apply(void 0,[s.apply(void 0,l.concat([f.sent()])),{name:o,$metadata:Po(e)}]),[3,13];case 10:return d=[{}],[4,to(n,t)];case 11:return i=s.apply(void 0,[s.apply(void 0,d.concat([f.sent()])),{name:o,$metadata:Po(e)}]),[3,13];case 12:h=n.body,o=h.code||h.Code||o,i=s(s({},h),{name:""+o,message:h.message||h.Message||o,$fault:"client",$metadata:Po(e)}),f.label=13;case 13:return p=i.message||i.Message||o,i.message=p,delete i.Message,[2,Promise.reject(Object.assign(new Error(p),i))]}}))}))},Zi=function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,i,o,u,a,c,l,d,h,p,v;return f(this,(function(f){switch(f.label){case 0:return r=[s({},e)],v={},[4,Bo(e.body,t)];case 1:switch(n=s.apply(void 0,r.concat([(v.body=f.sent(),v)])),o="UnknownError",o=To(e,n.body),o){case"AccessDeniedException":case"com.amazonaws.location#AccessDeniedException":return[3,2];case"InternalServerException":case"com.amazonaws.location#InternalServerException":return[3,4];case"ResourceNotFoundException":case"com.amazonaws.location#ResourceNotFoundException":return[3,6];case"ThrottlingException":case"com.amazonaws.location#ThrottlingException":return[3,8];case"ValidationException":case"com.amazonaws.location#ValidationException":return[3,10]}return[3,12];case 2:return u=[{}],[4,Ji(n,t)];case 3:return i=s.apply(void 0,[s.apply(void 0,u.concat([f.sent()])),{name:o,$metadata:Po(e)}]),[3,13];case 4:return a=[{}],[4,Qi(n,t)];case 5:return i=s.apply(void 0,[s.apply(void 0,a.concat([f.sent()])),{name:o,$metadata:Po(e)}]),[3,13];case 6:return c=[{}],[4,Xi(n,t)];case 7:return i=s.apply(void 0,[s.apply(void 0,c.concat([f.sent()])),{name:o,$metadata:Po(e)}]),[3,13];case 8:return l=[{}],[4,eo(n,t)];case 9:return i=s.apply(void 0,[s.apply(void 0,l.concat([f.sent()])),{name:o,$metadata:Po(e)}]),[3,13];case 10:return d=[{}],[4,to(n,t)];case 11:return i=s.apply(void 0,[s.apply(void 0,d.concat([f.sent()])),{name:o,$metadata:Po(e)}]),[3,13];case 12:h=n.body,o=h.code||h.Code||o,i=s(s({},h),{name:""+o,message:h.message||h.Message||o,$fault:"client",$metadata:Po(e)}),f.label=13;case 13:return p=i.message||i.Message||o,i.message=p,delete i.Message,[2,Promise.reject(Object.assign(new Error(p),i))]}}))}))},Ji=function(e,t){return l(void 0,void 0,void 0,(function(){var t,n;return f(this,(function(r){return t={name:"AccessDeniedException",$fault:"client",$metadata:Po(e),Message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.Message=st(n.message)),[2,t]}))}))},Qi=function(e,t){return l(void 0,void 0,void 0,(function(){var t,n;return f(this,(function(r){return t={name:"InternalServerException",$fault:"server",$retryable:{},$metadata:Po(e),Message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.Message=st(n.message)),[2,t]}))}))},Xi=function(e,t){return l(void 0,void 0,void 0,(function(){var t,n;return f(this,(function(r){return t={name:"ResourceNotFoundException",$fault:"client",$metadata:Po(e),Message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.Message=st(n.message)),[2,t]}))}))},eo=function(e,t){return l(void 0,void 0,void 0,(function(){var t,n;return f(this,(function(r){return t={name:"ThrottlingException",$fault:"client",$retryable:{},$metadata:Po(e),Message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.Message=st(n.message)),[2,t]}))}))},to=function(e,t){return l(void 0,void 0,void 0,(function(){var n,r;return f(this,(function(i){return n={name:"ValidationException",$fault:"client",$metadata:Po(e),FieldList:void 0,Message:void 0,Reason:void 0},void 0!==(r=e.body).fieldList&&null!==r.fieldList&&(n.FieldList=_o(r.fieldList,t)),void 0!==r.message&&null!==r.message&&(n.Message=st(r.message)),void 0!==r.reason&&null!==r.reason&&(n.Reason=st(r.reason)),[2,n]}))}))},no=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return s(s({},void 0!==e.GeofenceId&&null!==e.GeofenceId&&{GeofenceId:e.GeofenceId}),void 0!==e.Geometry&&null!==e.Geometry&&{Geometry:oo(e.Geometry,t)})}(e,t)}))},ro=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return null===e?null:_t(e)}))},io=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return null===e?null:e}))},oo=function(e,t){return s({},void 0!==e.Polygon&&null!==e.Polygon&&{Polygon:ao(e.Polygon,t)})},uo=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return null===e?null:e}))},ao=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return null===e?null:so(e,t)}))}(e,t)}))},so=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return null===e?null:_t(e)}))},co=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{Error:void 0!==e.Error&&null!==e.Error?lo(e.Error,t):void 0,GeofenceId:st(e.GeofenceId)}}(e,t)}))},lo=function(e,t){return{Code:st(e.Code),Message:st(e.Message)}},fo=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{Error:void 0!==e.Error&&null!==e.Error?lo(e.Error,t):void 0,GeofenceId:st(e.GeofenceId)}}(e,t)}))},ho=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{CreateTime:void 0!==e.CreateTime&&null!==e.CreateTime?ut(gt(e.CreateTime)):void 0,GeofenceId:st(e.GeofenceId),UpdateTime:void 0!==e.UpdateTime&&null!==e.UpdateTime?ut(gt(e.UpdateTime)):void 0}}(e)}))},po=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:ft(e)}))},vo=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:st(e)}))},go=function(e,t){return{Polygon:void 0!==e.Polygon&&null!==e.Polygon?yo(e.Polygon,t):void 0}},yo=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:bo(e,t)}))}(e,t)}))},mo=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{CreateTime:void 0!==e.CreateTime&&null!==e.CreateTime?ut(gt(e.CreateTime)):void 0,GeofenceId:st(e.GeofenceId),Geometry:void 0!==e.Geometry&&null!==e.Geometry?go(e.Geometry,t):void 0,Status:st(e.Status),UpdateTime:void 0!==e.UpdateTime&&null!==e.UpdateTime?ut(gt(e.UpdateTime)):void 0}}(e,t)}))},wo=function(e,t){return{AddressNumber:st(e.AddressNumber),Country:st(e.Country),Geometry:void 0!==e.Geometry&&null!==e.Geometry?Do(e.Geometry,t):void 0,Interpolated:Ze(e.Interpolated),Label:st(e.Label),Municipality:st(e.Municipality),Neighborhood:st(e.Neighborhood),PostalCode:st(e.PostalCode),Region:st(e.Region),Street:st(e.Street),SubRegion:st(e.SubRegion),TimeZone:void 0!==e.TimeZone&&null!==e.TimeZone?Fo(e.TimeZone,t):void 0}},Do=function(e,t){return{Point:void 0!==e.Point&&null!==e.Point?bo(e.Point,t):void 0}},bo=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:ft(e)}))},Eo=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{Distance:ft(e.Distance),Place:void 0!==e.Place&&null!==e.Place?wo(e.Place,t):void 0}}(e,t)}))},Ao=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{Distance:ft(e.Distance),Place:void 0!==e.Place&&null!==e.Place?wo(e.Place,t):void 0,Relevance:ft(e.Relevance)}}(e,t)}))},So=function(e,t){return{DataSource:st(e.DataSource),Language:st(e.Language),MaxResults:tt(e.MaxResults),Position:void 0!==e.Position&&null!==e.Position?bo(e.Position,t):void 0}},Co=function(e,t){return{BiasPosition:void 0!==e.BiasPosition&&null!==e.BiasPosition?bo(e.BiasPosition,t):void 0,DataSource:st(e.DataSource),FilterBBox:void 0!==e.FilterBBox&&null!==e.FilterBBox?po(e.FilterBBox):void 0,FilterCountries:void 0!==e.FilterCountries&&null!==e.FilterCountries?vo(e.FilterCountries):void 0,Language:st(e.Language),MaxResults:tt(e.MaxResults),ResultBBox:void 0!==e.ResultBBox&&null!==e.ResultBBox?po(e.ResultBBox):void 0,Text:st(e.Text)}},Fo=function(e,t){return{Name:st(e.Name),Offset:tt(e.Offset)}},_o=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{Message:st(e.message),Name:st(e.name)}}(e)}))},Po=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"]}},xo=function(e,t){return void 0===e&&(e=new Uint8Array),e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array)},Bo=function(e,t){return function(e,t){return xo(e,t).then((function(e){return t.utf8Encoder(e)}))}(e,t).then((function(e){return e.length?JSON.parse(e):{}}))},To=function(e,t){var n,r,i=function(e){var t=e;return t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},o=(n=e.headers,r="x-amzn-errortype",Object.keys(n).find((function(e){return e.toLowerCase()===r.toLowerCase()})));return void 0!==o?i(e.headers[o]):void 0!==t.code?i(t.code):void 0!==t.__type?i(t.__type):""},Mo=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return a(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(qi(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"LocationClient",commandName:"SearchPlaceIndexForTextCommand",inputFilterSensitiveLog:Si.filterSensitiveLog,outputFilterSensitiveLog:_i.filterSensitiveLog},o=t.requestHandler;return r.resolve((function(e){return o.handle(e.request,n||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,i,o,u,a,c,l,d,h;return f(this,(function(f){switch(f.label){case 0:return[4,t.endpoint()];case 1:if(n=f.sent(),n.hostname,r=n.protocol,i=void 0===r?"https":r,o=n.port,u=n.path,a={"content-type":"application/json"},c=((null==u?void 0:u.endsWith("/"))?u.slice(0,-1):u||"")+"/places/v0/indexes/{IndexName}/search/text",void 0===e.IndexName)throw new Error("No value provided for input HTTP label: IndexName.");if((l=e.IndexName).length<=0)throw new Error("Empty value provided for input HTTP label: IndexName.");return c=c.replace("{IndexName}",Ct(l)),d=JSON.stringify(s(s(s(s(s(s({},void 0!==e.BiasPosition&&null!==e.BiasPosition&&{BiasPosition:so(e.BiasPosition,t)}),void 0!==e.FilterBBox&&null!==e.FilterBBox&&{FilterBBox:ro(e.FilterBBox,t)}),void 0!==e.FilterCountries&&null!==e.FilterCountries&&{FilterCountries:io(e.FilterCountries,t)}),void 0!==e.Language&&null!==e.Language&&{Language:e.Language}),void 0!==e.MaxResults&&null!==e.MaxResults&&{MaxResults:e.MaxResults}),void 0!==e.Text&&null!==e.Text&&{Text:e.Text})),[4,t.endpoint()];case 2:if(h=f.sent().hostname,!0!==t.disableHostPrefix&&!C(h="places."+h))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return[2,new A({protocol:i,hostname:h,port:o,method:"POST",headers:a,path:c,body:d})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,i,o;return f(this,(function(u){switch(u.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,Zi(e,t)]:(n={$metadata:Po(e),Results:void 0,Summary:void 0},i=ut,o=at,[4,Bo(e.body,t)]);case 1:return void 0!==(r=i.apply(void 0,[o.apply(void 0,[u.sent()]),"body"])).Results&&null!==r.Results&&(n.Results=Ao(r.Results,t)),void 0!==r.Summary&&null!==r.Summary&&(n.Summary=Co(r.Summary,t)),[2,Promise.resolve(n)]}}))}))}(e,t)},t}(Ye),Lo=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return a(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(qi(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"LocationClient",commandName:"SearchPlaceIndexForPositionCommand",inputFilterSensitiveLog:hi.filterSensitiveLog,outputFilterSensitiveLog:wi.filterSensitiveLog},o=t.requestHandler;return r.resolve((function(e){return o.handle(e.request,n||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,i,o,u,a,c,l,d,h;return f(this,(function(f){switch(f.label){case 0:return[4,t.endpoint()];case 1:if(n=f.sent(),n.hostname,r=n.protocol,i=void 0===r?"https":r,o=n.port,u=n.path,a={"content-type":"application/json"},c=((null==u?void 0:u.endsWith("/"))?u.slice(0,-1):u||"")+"/places/v0/indexes/{IndexName}/search/position",void 0===e.IndexName)throw new Error("No value provided for input HTTP label: IndexName.");if((l=e.IndexName).length<=0)throw new Error("Empty value provided for input HTTP label: IndexName.");return c=c.replace("{IndexName}",Ct(l)),d=JSON.stringify(s(s(s({},void 0!==e.Language&&null!==e.Language&&{Language:e.Language}),void 0!==e.MaxResults&&null!==e.MaxResults&&{MaxResults:e.MaxResults}),void 0!==e.Position&&null!==e.Position&&{Position:so(e.Position,t)})),[4,t.endpoint()];case 2:if(h=f.sent().hostname,!0!==t.disableHostPrefix&&!C(h="places."+h))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return[2,new A({protocol:i,hostname:h,port:o,method:"POST",headers:a,path:c,body:d})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,i,o;return f(this,(function(u){switch(u.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,Ki(e,t)]:(n={$metadata:Po(e),Results:void 0,Summary:void 0},i=ut,o=at,[4,Bo(e.body,t)]);case 1:return void 0!==(r=i.apply(void 0,[o.apply(void 0,[u.sent()]),"body"])).Results&&null!==r.Results&&(n.Results=Eo(r.Results,t)),void 0!==r.Summary&&null!==r.Summary&&(n.Summary=So(r.Summary,t)),[2,Promise.resolve(n)]}}))}))}(e,t)},t}(Ye),Oo=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return a(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(qi(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"LocationClient",commandName:"GetGeofenceCommand",inputFilterSensitiveLog:Sr.filterSensitiveLog,outputFilterSensitiveLog:Cr.filterSensitiveLog},o=t.requestHandler;return r.resolve((function(e){return o.handle(e.request,n||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,i,o,u,a,s,c,l;return f(this,(function(f){switch(f.label){case 0:return[4,t.endpoint()];case 1:if(n=f.sent(),n.hostname,r=n.protocol,i=void 0===r?"https":r,o=n.port,u=n.path,a={},s=((null==u?void 0:u.endsWith("/"))?u.slice(0,-1):u||"")+"/geofencing/v0/collections/{CollectionName}/geofences/{GeofenceId}",void 0===e.CollectionName)throw new Error("No value provided for input HTTP label: CollectionName.");if((c=e.CollectionName).length<=0)throw new Error("Empty value provided for input HTTP label: CollectionName.");if(s=s.replace("{CollectionName}",Ct(c)),void 0===e.GeofenceId)throw new Error("No value provided for input HTTP label: GeofenceId.");if((c=e.GeofenceId).length<=0)throw new Error("Empty value provided for input HTTP label: GeofenceId.");return s=s.replace("{GeofenceId}",Ct(c)),[4,t.endpoint()];case 2:if(l=f.sent().hostname,!0!==t.disableHostPrefix&&!C(l="geofencing."+l))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return[2,new A({protocol:i,hostname:l,port:o,method:"GET",headers:a,path:s,body:void 0})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,i,o;return f(this,(function(u){switch(u.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,Vi(e,t)]:(n={$metadata:Po(e),CreateTime:void 0,GeofenceId:void 0,Geometry:void 0,Status:void 0,UpdateTime:void 0},i=ut,o=at,[4,Bo(e.body,t)]);case 1:return void 0!==(r=i.apply(void 0,[o.apply(void 0,[u.sent()]),"body"])).CreateTime&&null!==r.CreateTime&&(n.CreateTime=ut(gt(r.CreateTime))),void 0!==r.GeofenceId&&null!==r.GeofenceId&&(n.GeofenceId=st(r.GeofenceId)),void 0!==r.Geometry&&null!==r.Geometry&&(n.Geometry=go(r.Geometry,t)),void 0!==r.Status&&null!==r.Status&&(n.Status=st(r.Status)),void 0!==r.UpdateTime&&null!==r.UpdateTime&&(n.UpdateTime=ut(gt(r.UpdateTime))),[2,Promise.resolve(n)]}}))}))}(e,t)},t}(Ye),Ro=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return a(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(qi(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"LocationClient",commandName:"ListGeofencesCommand",inputFilterSensitiveLog:xr.filterSensitiveLog,outputFilterSensitiveLog:Tr.filterSensitiveLog},o=t.requestHandler;return r.resolve((function(e){return o.handle(e.request,n||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,i,o,u,a,c,l,d,h;return f(this,(function(f){switch(f.label){case 0:return[4,t.endpoint()];case 1:if(n=f.sent(),n.hostname,r=n.protocol,i=void 0===r?"https":r,o=n.port,u=n.path,a={"content-type":"application/json"},c=((null==u?void 0:u.endsWith("/"))?u.slice(0,-1):u||"")+"/geofencing/v0/collections/{CollectionName}/list-geofences",void 0===e.CollectionName)throw new Error("No value provided for input HTTP label: CollectionName.");if((l=e.CollectionName).length<=0)throw new Error("Empty value provided for input HTTP label: CollectionName.");return c=c.replace("{CollectionName}",Ct(l)),d=JSON.stringify(s({},void 0!==e.NextToken&&null!==e.NextToken&&{NextToken:e.NextToken})),[4,t.endpoint()];case 2:if(h=f.sent().hostname,!0!==t.disableHostPrefix&&!C(h="geofencing."+h))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return[2,new A({protocol:i,hostname:h,port:o,method:"POST",headers:a,path:c,body:d})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,i,o;return f(this,(function(u){switch(u.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,Yi(e,t)]:(n={$metadata:Po(e),Entries:void 0,NextToken:void 0},i=ut,o=at,[4,Bo(e.body,t)]);case 1:return void 0!==(r=i.apply(void 0,[o.apply(void 0,[u.sent()]),"body"])).Entries&&null!==r.Entries&&(n.Entries=mo(r.Entries,t)),void 0!==r.NextToken&&null!==r.NextToken&&(n.NextToken=st(r.NextToken)),[2,Promise.resolve(n)]}}))}))}(e,t)},t}(Ye),ko=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return a(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(qi(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"LocationClient",commandName:"BatchPutGeofenceCommand",inputFilterSensitiveLog:gn.filterSensitiveLog,outputFilterSensitiveLog:wn.filterSensitiveLog},o=t.requestHandler;return r.resolve((function(e){return o.handle(e.request,n||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,i,o,u,a,c,l,d,h;return f(this,(function(f){switch(f.label){case 0:return[4,t.endpoint()];case 1:if(n=f.sent(),n.hostname,r=n.protocol,i=void 0===r?"https":r,o=n.port,u=n.path,a={"content-type":"application/json"},c=((null==u?void 0:u.endsWith("/"))?u.slice(0,-1):u||"")+"/geofencing/v0/collections/{CollectionName}/put-geofences",void 0===e.CollectionName)throw new Error("No value provided for input HTTP label: CollectionName.");if((l=e.CollectionName).length<=0)throw new Error("Empty value provided for input HTTP label: CollectionName.");return c=c.replace("{CollectionName}",Ct(l)),d=JSON.stringify(s({},void 0!==e.Entries&&null!==e.Entries&&{Entries:no(e.Entries,t)})),[4,t.endpoint()];case 2:if(h=f.sent().hostname,!0!==t.disableHostPrefix&&!C(h="geofencing."+h))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return[2,new A({protocol:i,hostname:h,port:o,method:"POST",headers:a,path:c,body:d})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,i,o;return f(this,(function(u){switch(u.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,Wi(e,t)]:(n={$metadata:Po(e),Errors:void 0,Successes:void 0},i=ut,o=at,[4,Bo(e.body,t)]);case 1:return void 0!==(r=i.apply(void 0,[o.apply(void 0,[u.sent()]),"body"])).Errors&&null!==r.Errors&&(n.Errors=fo(r.Errors,t)),void 0!==r.Successes&&null!==r.Successes&&(n.Successes=ho(r.Successes,t)),[2,Promise.resolve(n)]}}))}))}(e,t)},t}(Ye),No=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return a(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(qi(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"LocationClient",commandName:"BatchDeleteGeofenceCommand",inputFilterSensitiveLog:tn.filterSensitiveLog,outputFilterSensitiveLog:rn.filterSensitiveLog},o=t.requestHandler;return r.resolve((function(e){return o.handle(e.request,n||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,i,o,u,a,c,l,d,h;return f(this,(function(f){switch(f.label){case 0:return[4,t.endpoint()];case 1:if(n=f.sent(),n.hostname,r=n.protocol,i=void 0===r?"https":r,o=n.port,u=n.path,a={"content-type":"application/json"},c=((null==u?void 0:u.endsWith("/"))?u.slice(0,-1):u||"")+"/geofencing/v0/collections/{CollectionName}/delete-geofences",void 0===e.CollectionName)throw new Error("No value provided for input HTTP label: CollectionName.");if((l=e.CollectionName).length<=0)throw new Error("Empty value provided for input HTTP label: CollectionName.");return c=c.replace("{CollectionName}",Ct(l)),d=JSON.stringify(s({},void 0!==e.GeofenceIds&&null!==e.GeofenceIds&&{GeofenceIds:uo(e.GeofenceIds,t)})),[4,t.endpoint()];case 2:if(h=f.sent().hostname,!0!==t.disableHostPrefix&&!C(h="geofencing."+h))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return[2,new A({protocol:i,hostname:h,port:o,method:"POST",headers:a,path:c,body:d})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return l(void 0,void 0,void 0,(function(){var n,r,i,o;return f(this,(function(u){switch(u.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,$i(e,t)]:(n={$metadata:Po(e),Errors:void 0},i=ut,o=at,[4,Bo(e.body,t)]);case 1:return void 0!==(r=i.apply(void 0,[o.apply(void 0,[u.sent()]),"body"])).Errors&&null!==r.Errors&&(n.Errors=co(r.Errors,t)),[2,Promise.resolve(n)]}}))}))}(e,t)},t}(Ye);function Io(e){for(var t,n,r=function(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}(e),i=0,o=1;o<r.length;)t=n||r[0],i+=((n=r[o])[0]-t[0])*(n[1]+t[1]),o++;return i>0}var jo=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)u.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u};function Uo(e,t){if(!Number.isFinite(e)||!Number.isFinite(t))throw new Error("Invalid coordinates: ["+e+","+t+"]");if(t<-90||90<t)throw new Error("Latitude must be between -90 and 90 degrees inclusive.");if(e<-180||180<e)throw new Error("Longitude must be between -180 and 180 degrees inclusive.")}function Go(e){if(!/^(?:[\x2D\.0-9A-Z_a-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDCD0-\uDCEB\uDCF0-\uDCF9\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])+$/i.test(e))throw new Error("Invalid geofenceId: '"+e+"' - IDs can only contain alphanumeric characters, hyphens, underscores and periods.")}function zo(e,t){var n=t?t+": ":"";if(e.length<4)throw new Error(n+"LinearRing must contain 4 or more coordinates.");var r=[];if(e.forEach((function(e){try{Uo(e[0],e[1])}catch(t){r.push({coordinates:e,error:t.message})}})),r.length>0)throw new Error(n+"One or more of the coordinates in the Polygon LinearRing are not valid: "+JSON.stringify(r));var i=jo(e[0],2),o=i[0],u=i[1],a=jo(e[e.length-1],2),s=a[0],c=a[1];if(o!==s||u!==c)throw new Error(n+"LinearRing's first and last coordinates are not the same");if(Io(e))throw new Error(n+"LinearRing coordinates must be wound counterclockwise")}function Ho(e){var t={};e.forEach((function(e){if(!e.geofenceId)throw new Error("Geofence '"+e+"' is missing geofenceId");var n=e.geofenceId;if(Go(n),t[n])throw new Error("Duplicate geofenceId: "+n);if(t[n]=!0,!e.geometry)throw new Error("Geofence '"+n+"' is missing geometry");var r=e.geometry;if(!r.polygon)throw new Error("Geofence '"+n+"' is missing geometry.polygon");var i=r.polygon;try{!function(e,t){var n=t?t+": ":"";if(!Array.isArray(e))throw new Error(n+"Polygon is of incorrect structure. It should be an array of LinearRings");if(e.length<1)throw new Error(n+"Polygon must have a single LinearRing array.");if(e.length>1)throw new Error(n+"Polygon must have a single LinearRing array. Note: We do not currently support polygons with holes, multipolygons, polygons that are wound clockwise, or that cross the antimeridian.");if(e.reduce((function(e,t){return e+t.length}),0)>1e3)throw new Error(n+"Polygon has more than the maximum 1000 vertices.");e.forEach((function(e){zo(e,t)}))}(i,n)}catch(e){if(e.message.includes("Polygon has more than the maximum 1000 vertices."))throw new Error("Geofence '"+n+"' has more than the maximum of 1000 vertices")}zo(jo(i,1)[0],n)}))}var qo=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function u(e){try{s(r.next(e))}catch(e){o(e)}}function a(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,a)}s((r=r.apply(e,t||[])).next())}))},$o=function(e,t){var n,r,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,r=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=u.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=t.call(e,u)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Wo=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)u.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u},Vo=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Wo(arguments[t]));return e},Yo=new r.ConsoleLogger("AmazonLocationServiceProvider"),Ko=function(){function e(e){this._config=e||{},Yo.debug("Geo Options",this._config)}return e.prototype.getCategory=function(){return e.CATEGORY},e.prototype.getProviderName=function(){return e.PROVIDER_NAME},e.prototype.configure=function(e){return Yo.debug("configure Amazon Location Service Provider",e),e?(this._config=Object.assign({},this._config,e),this._config):this._config},e.prototype.getAvailableMaps=function(){this._verifyMapResources();var e=[],t=this._config.maps.items,n=this._config.region;for(var r in t){var i=t[r].style;e.push({mapName:r,style:i,region:n})}return e},e.prototype.getDefaultMap=function(){this._verifyMapResources();var e=this._config.maps.default;return{mapName:e,style:this._config.maps.items[e].style,region:this._config.region}},e.prototype.searchByText=function(e,t){return qo(this,void 0,void 0,(function(){var n,i,u,a,s,c;return $o(this,(function(l){switch(l.label){case 0:return[4,this._ensureCredentials()];case 1:if(!l.sent())throw new Error("No credentials");if(this._verifySearchIndex(null==t?void 0:t.searchIndexName),n={Text:e,IndexName:this._config.search_indices.default},t){if(n.FilterCountries=t.countries,n.MaxResults=t.maxResults,t.searchIndexName&&(n.IndexName=t.searchIndexName),t.biasPosition&&t.searchAreaConstraints)throw new Error("BiasPosition and SearchAreaConstraints are mutually exclusive, please remove one or the other from the options object");t.biasPosition&&(n.BiasPosition=t.biasPosition),t.searchAreaConstraints&&(n.FilterBBox=t.searchAreaConstraints)}i=new Gi({credentials:this._config.credentials,region:this._config.region,customUserAgent:Object(r.getAmplifyUserAgent)()}),u=new Mo(n),l.label=2;case 2:return l.trys.push([2,4,,5]),[4,i.send(u)];case 3:return a=l.sent(),[3,5];case 4:throw s=l.sent(),Yo.debug(s),s;case 5:return c=a.Results.map((function(e){return e.Place})),[2,o()(c,{deep:!0})]}}))}))},e.prototype.searchByCoordinates=function(e,t){return qo(this,void 0,void 0,(function(){var n,i,u,a,s,c;return $o(this,(function(l){switch(l.label){case 0:return[4,this._ensureCredentials()];case 1:if(!l.sent())throw new Error("No credentials");this._verifySearchIndex(null==t?void 0:t.searchIndexName),n={Position:e,IndexName:this._config.search_indices.default},t&&(t.searchIndexName&&(n.IndexName=t.searchIndexName),n.MaxResults=t.maxResults),i=new Gi({credentials:this._config.credentials,region:this._config.region,customUserAgent:Object(r.getAmplifyUserAgent)()}),u=new Lo(n),l.label=2;case 2:return l.trys.push([2,4,,5]),[4,i.send(u)];case 3:return a=l.sent(),[3,5];case 4:throw s=l.sent(),Yo.debug(s),s;case 5:return c=a.Results.map((function(e){return e.Place})),[2,o()(c[0],{deep:!0})]}}))}))},e.prototype.saveGeofences=function(e,t){return qo(this,void 0,void 0,(function(){var n,r,i,o=this;return $o(this,(function(u){switch(u.label){case 0:if(e.length<1)throw new Error("Geofence input array is empty");return[4,this._ensureCredentials()];case 1:if(!u.sent())throw new Error("No credentials");try{this._verifyGeofenceCollections(null==t?void 0:t.collectionName)}catch(e){throw Yo.debug(e),e}for(Ho(e),n=e.map((function(e){return{GeofenceId:e.geofenceId,Geometry:{Polygon:e.geometry.polygon}}})),r={successes:[],errors:[]},i=[];n.length>0;)10,i.push(n.splice(0,10));return[4,Promise.all(i.map((function(e){return qo(o,void 0,void 0,(function(){var n,i;return $o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this._AmazonLocationServiceBatchPutGeofenceCall(e,(null==t?void 0:t.collectionName)||this._config.geofenceCollections.default)];case 1:return n=o.sent(),[3,3];case 2:return i=o.sent(),e.forEach((function(e){r.errors.push({geofenceId:e.GeofenceId,error:{code:"APIConnectionError",message:i.message}})})),[2];case 3:return n.Successes.forEach((function(e){var t=e.GeofenceId,n=e.CreateTime,i=e.UpdateTime;r.successes.push({geofenceId:t,createTime:n,updateTime:i})})),n.Errors.forEach((function(e){var t=e.Error,n=t.Code,i=t.Message,o=e.GeofenceId;r.errors.push({error:{code:n,message:i},geofenceId:o})})),[2]}}))}))})))];case 2:return u.sent(),[2,r]}}))}))},e.prototype.getGeofence=function(e,t){return qo(this,void 0,void 0,(function(){var n,i,o,u,a,s,c,l,f,d;return $o(this,(function(h){switch(h.label){case 0:return[4,this._ensureCredentials()];case 1:if(!h.sent())throw new Error("No credentials");try{this._verifyGeofenceCollections(null==t?void 0:t.collectionName)}catch(e){throw Yo.debug(e),e}Go(e),n=new Gi({credentials:this._config.credentials,region:this._config.region,customUserAgent:Object(r.getAmplifyUserAgent)()}),i={GeofenceId:e,CollectionName:(null==t?void 0:t.collectionName)||this._config.geofenceCollections.default},o=new Oo(i),h.label=2;case 2:return h.trys.push([2,4,,5]),[4,n.send(o)];case 3:return u=h.sent(),[3,5];case 4:throw a=h.sent(),Yo.debug(a),a;case 5:return s=u.GeofenceId,c=u.CreateTime,l=u.UpdateTime,f=u.Status,d=u.Geometry,[2,{createTime:c,geofenceId:s,geometry:{polygon:d.Polygon},status:f,updateTime:l}]}}))}))},e.prototype.listGeofences=function(e){return qo(this,void 0,void 0,(function(){var t,n,i,o,u,a,s;return $o(this,(function(c){switch(c.label){case 0:return[4,this._ensureCredentials()];case 1:if(!c.sent())throw new Error("No credentials");try{this._verifyGeofenceCollections(null==e?void 0:e.collectionName)}catch(e){throw Yo.debug(e),e}t=new Gi({credentials:this._config.credentials,region:this._config.region,customUserAgent:Object(r.getAmplifyUserAgent)()}),n={NextToken:null==e?void 0:e.nextToken,CollectionName:(null==e?void 0:e.collectionName)||this._config.geofenceCollections.default},i=new Ro(n),c.label=2;case 2:return c.trys.push([2,4,,5]),[4,t.send(i)];case 3:return o=c.sent(),[3,5];case 4:throw u=c.sent(),Yo.debug(u),u;case 5:return a=o.NextToken,s=o.Entries,[2,{entries:s.map((function(e){return{geofenceId:e.GeofenceId,createTime:e.CreateTime,updateTime:e.UpdateTime,status:e.Status,geometry:{polygon:e.Geometry.Polygon}}})),nextToken:a}]}}))}))},e.prototype.deleteGeofences=function(e,t){return qo(this,void 0,void 0,(function(){var n,r,i,o,u=this;return $o(this,(function(a){switch(a.label){case 0:if(e.length<1)throw new Error("GeofenceId input array is empty");return[4,this._ensureCredentials()];case 1:if(!a.sent())throw new Error("No credentials");if(this._verifyGeofenceCollections(null==t?void 0:t.collectionName),(n=e.filter((function(e){try{Go(e)}catch(e){return!0}}))).length>0)throw new Error("Invalid geofence ids: "+n.join(", "));for(r={successes:[],errors:[]},i=[],o=0;o<e.length;)i.push(e.slice(o,o+=10));return[4,Promise.all(i.map((function(e){return qo(u,void 0,void 0,(function(){var n,i,o,u;return $o(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,this._AmazonLocationServiceBatchDeleteGeofenceCall(e,(null==t?void 0:t.collectionName)||this._config.geofenceCollections.default)];case 1:return n=a.sent(),[3,3];case 2:return i=a.sent(),e.forEach((function(e){var t={geofenceId:e,error:{code:i.message,message:i.message}};r.errors.push(t)})),[2];case 3:return o=n.Errors.map((function(e){return e.geofenceId})),(u=r.successes).push.apply(u,Vo(e.filter((function(e){return!o.includes(e)})))),[2]}}))}))})))];case 2:return a.sent(),[2,r]}}))}))},e.prototype._ensureCredentials=function(){return qo(this,void 0,void 0,(function(){var e,t,n;return $o(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,r.Credentials.get()];case 1:return(e=i.sent())?(t=r.Credentials.shear(e),Yo.debug("Set credentials for storage. Credentials are:",t),this._config.credentials=t,[2,!0]):[2,!1];case 2:return n=i.sent(),Yo.debug("Ensure credentials error. Credentials are:",n),[2,!1];case 3:return[2]}}))}))},e.prototype._verifyMapResources=function(){if(!this._config.maps){var e="No map resources found in amplify config, run 'amplify add geo' to create one and run `amplify push` after";throw Yo.debug(e),new Error(e)}if(!this._config.maps.default){e="No default map resource found in amplify config, run 'amplify add geo' to create one and run `amplify push` after";throw Yo.debug(e),new Error(e)}},e.prototype._verifySearchIndex=function(e){if(!(this._config.search_indices&&this._config.search_indices.default||e)){var t="No Search Index found in amplify config, please run `amplify add geo` to create one and run `amplify push` after.";throw Yo.debug(t),new Error(t)}},e.prototype._verifyGeofenceCollections=function(e){if(!(this._config.geofenceCollections&&this._config.geofenceCollections.default||e)){var t="No Geofence Collections found, please run `amplify add geo` to create one and run `amplify push` after.";throw Yo.debug(t),new Error(t)}},e.prototype._AmazonLocationServiceBatchPutGeofenceCall=function(e,t){return qo(this,void 0,void 0,(function(){var n,i,o,u;return $o(this,(function(a){switch(a.label){case 0:n={Entries:e,CollectionName:t||this._config.geofenceCollections.default},i=new Gi({credentials:this._config.credentials,region:this._config.region,customUserAgent:Object(r.getAmplifyUserAgent)()}),o=new ko(n),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,i.send(o)];case 2:return u=a.sent(),[3,4];case 3:throw a.sent();case 4:return[2,u]}}))}))},e.prototype._AmazonLocationServiceBatchDeleteGeofenceCall=function(e,t){return qo(this,void 0,void 0,(function(){var n,i,o,u;return $o(this,(function(a){switch(a.label){case 0:n={GeofenceIds:e,CollectionName:t||this._config.geofenceCollections.default},i=new Gi({credentials:this._config.credentials,region:this._config.region,customUserAgent:Object(r.getAmplifyUserAgent)()}),o=new No(n),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,i.send(o)];case 2:return u=a.sent(),[3,4];case 3:throw a.sent();case 4:return[2,u]}}))}))},e.CATEGORY="Geo",e.PROVIDER_NAME="AmazonLocationService",e}(),Zo=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function u(e){try{s(r.next(e))}catch(e){o(e)}}function a(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,a)}s((r=r.apply(e,t||[])).next())}))},Jo=function(e,t){var n,r,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,r=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=u.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=t.call(e,u)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Qo=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)u.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u},Xo=new r.ConsoleLogger("Geo"),eu="AmazonLocationService",tu=new(function(){function e(){this._config={},this._pluggables=[],Xo.debug("Geo Options",this._config)}return e.prototype.getModuleName=function(){return e.MODULE},e.prototype.addPluggable=function(e){if(e&&"Geo"===e.getCategory())return this._pluggables.push(e),e.configure(this._config[e.getProviderName()])},e.prototype.getPluggable=function(e){var t=this._pluggables.find((function(t){return t.getProviderName()===e}));if(void 0===t)throw Xo.debug("No plugin found with providerName",e),new Error("No plugin found in Geo for the provider");return t},e.prototype.removePluggable=function(e){this._pluggables=this._pluggables.filter((function(t){return t.getProviderName()!==e}))},e.prototype.configure=function(e){var t=this;if(Xo.debug("configure Geo"),!e)return this._config;var n=Object(r.parseMobileHubConfig)(e);return this._config=Object.assign({},this._config,n.Geo,e),this._pluggables.forEach((function(e){e.configure(t._config[e.getProviderName()])})),0===this._pluggables.length&&this.addPluggable(new Ko),this._config},e.prototype.getAvailableMaps=function(e){return void 0===e&&(e=eu),this.getPluggable(e).getAvailableMaps()},e.prototype.getDefaultMap=function(e){return void 0===e&&(e=eu),this.getPluggable(e).getDefaultMap()},e.prototype.searchByText=function(e,t){return Zo(this,void 0,void 0,(function(){var n,r,i,o;return Jo(this,(function(u){switch(u.label){case 0:n=(t||{}).providerName,r=void 0===n?eu:n,i=this.getPluggable(r),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,i.searchByText(e,t)];case 2:return[2,u.sent()];case 3:throw o=u.sent(),Xo.debug(o),o;case 4:return[2]}}))}))},e.prototype.searchByCoordinates=function(e,t){return Zo(this,void 0,void 0,(function(){var n,r,i,o,u,a,s;return Jo(this,(function(c){switch(c.label){case 0:n=(t||{}).providerName,r=void 0===n?eu:n,i=this.getPluggable(r),o=Qo(e,2),u=o[0],a=o[1],c.label=1;case 1:return c.trys.push([1,3,,4]),Uo(u,a),[4,i.searchByCoordinates(e,t)];case 2:return[2,c.sent()];case 3:throw s=c.sent(),Xo.debug(s),s;case 4:return[2]}}))}))},e.prototype.saveGeofences=function(e,t){return Zo(this,void 0,void 0,(function(){var n,r,i,o,u;return Jo(this,(function(a){switch(a.label){case 0:n=(t||{}).providerName,r=void 0===n?eu:n,i=this.getPluggable(r),o=Array.isArray(e)?e:[e],a.label=1;case 1:return a.trys.push([1,3,,4]),[4,i.saveGeofences(o,t)];case 2:return[2,a.sent()];case 3:throw u=a.sent(),Xo.debug(u),u;case 4:return[2]}}))}))},e.prototype.getGeofence=function(e,t){return Zo(this,void 0,void 0,(function(){var n,r,i,o;return Jo(this,(function(u){switch(u.label){case 0:n=(t||{}).providerName,r=void 0===n?eu:n,i=this.getPluggable(r),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,i.getGeofence(e,t)];case 2:return[2,u.sent()];case 3:throw o=u.sent(),Xo.debug(o),o;case 4:return[2]}}))}))},e.prototype.listGeofences=function(e){return Zo(this,void 0,void 0,(function(){var t,n,r,i;return Jo(this,(function(o){switch(o.label){case 0:t=(e||{}).providerName,n=void 0===t?eu:t,r=this.getPluggable(n),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,r.listGeofences(e)];case 2:return[2,o.sent()];case 3:throw i=o.sent(),Xo.debug(i),i;case 4:return[2]}}))}))},e.prototype.deleteGeofences=function(e,t){return Zo(this,void 0,void 0,(function(){var n,r,i,o,u;return Jo(this,(function(a){switch(a.label){case 0:n=(t||{}).providerName,r=void 0===n?eu:n,i=this.getPluggable(r),o=Array.isArray(e)?e:[e],a.label=1;case 1:return a.trys.push([1,3,,4]),[4,i.deleteGeofences(o,t)];case 2:return[2,a.sent()];case 3:throw u=a.sent(),Xo.debug(u),u;case 4:return[2]}}))}))},e.MODULE="Geo",e}());r.Amplify.register(tu)},function(e,t,n){"use strict";n.r(t),n.d(t,"fromUtf8",(function(){return r})),n.d(t,"toUtf8",(function(){return i}));const r=e=>"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):(e=>{const t=[];for(let n=0,r=e.length;n<r;n++){const r=e.charCodeAt(n);if(r<128)t.push(r);else if(r<2048)t.push(r>>6|192,63&r|128);else if(n+1<e.length&&55296==(64512&r)&&56320==(64512&e.charCodeAt(n+1))){const i=65536+((1023&r)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(r>>12|224,r>>6&63|128,63&r|128)}return Uint8Array.from(t)})(e),i=e=>"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):(e=>{let t="";for(let n=0,r=e.length;n<r;n++){const r=e[n];if(r<128)t+=String.fromCharCode(r);else if(192<=r&&r<224){const i=e[++n];t+=String.fromCharCode((31&r)<<6|63&i)}else if(240<=r&&r<365){const i="%"+[r,e[++n],e[++n],e[++n]].map(e=>e.toString(16)).join("%");t+=decodeURIComponent(i)}else t+=String.fromCharCode((15&r)<<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 i}));const r=e=>"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):(e=>{const t=[];for(let n=0,r=e.length;n<r;n++){const r=e.charCodeAt(n);if(r<128)t.push(r);else if(r<2048)t.push(r>>6|192,63&r|128);else if(n+1<e.length&&55296==(64512&r)&&56320==(64512&e.charCodeAt(n+1))){const i=65536+((1023&r)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(r>>12|224,r>>6&63|128,63&r|128)}return Uint8Array.from(t)})(e),i=e=>"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):(e=>{let t="";for(let n=0,r=e.length;n<r;n++){const r=e[n];if(r<128)t+=String.fromCharCode(r);else if(192<=r&&r<224){const i=e[++n];t+=String.fromCharCode((31&r)<<6|63&i)}else if(240<=r&&r<365){const i="%"+[r,e[++n],e[++n],e[++n]].map(e=>e.toString(16)).join("%");t+=decodeURIComponent(i)}else t+=String.fromCharCode((15&r)<<12|(63&e[++n])<<6|63&e[++n])}return t})(e)}])}));
55
+ 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 i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function u(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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function a(e,t,n,r){var i,o=arguments.length,u=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(u=(o<3?i(u):o>3?i(t,n,u):i(t,n))||u);return o>3&&u&&Object.defineProperty(t,n,u),u}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(i,o){function u(e){try{s(r.next(e))}catch(e){o(e)}}function a(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,a)}s((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,r=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=u.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=t.call(e,u)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function h(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}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.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)u.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function y(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],u=0,a=o.length;u<a;u++,i++)r[i]=o[u];return r}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function D(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},u("next"),u("throw"),u("return"),r[Symbol.asyncIterator]=function(){return this},r;function u(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{(n=i[e](t)).value instanceof m?Promise.resolve(n.value.v).then(s,c):l(o[0][2],n)}catch(e){l(o[0][3],e)}var n}function s(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[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,i){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function b(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(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,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function A(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 S(e){return e&&e.__esModule?e:{default:e}}function C(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function F(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,i=t.subtle;return r.map((function(e){return i[e]})).concat(n).every((function(e){return"function"==typeof e}))}return!1}},function(e,t,n){"use strict";n.r(t),n.d(t,"Geo",(function(){return Vo}));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 i(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 o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function u(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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function a(e,t,n,r){return new(n||(n=Promise))((function(i,o){function u(e){try{s(r.next(e))}catch(e){o(e)}}function a(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,a)}s((r=r.apply(e,t||[])).next())}))}function s(e,t){var n,r,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,r=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=u.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=t.call(e,u)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}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,i,o=n.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)u.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u}function f(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}Object.create;var d,h=n(0),p=n(4),v=n.n(p);!function(e){e.ENV="env",e.CONFIG="shared config entry"}(d||(d={}));var g=function(e){if("boolean"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e},y=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 i=Promise.resolve(t);return function(){return i}}return t},m=function(e){var t,n=g(e.useDualstackEndpoint),r=e.endpoint,i=e.useFipsEndpoint;return o(o({},e),{tls:null===(t=e.tls)||void 0===t||t,endpoint:r?y(o(o({},e),{endpoint:r})):function(){return function(e){return a(void 0,void 0,void 0,(function(){var t,n,r,i,o,u,a;return s(this,(function(s){switch(s.label){case 0:return t=e.tls,n=void 0===t||t,[4,e.region()];case 1:if(r=s.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.useDualstackEndpoint()];case 2:return i=s.sent(),[4,e.useFipsEndpoint()];case 3:return o=s.sent(),[4,e.regionInfoProvider(r,{useDualstackEndpoint:i,useFipsEndpoint:o})];case 4:if(!(u=(null!==(a=s.sent())&&void 0!==a?a:{}).hostname))throw new Error("Cannot resolve hostname from client config");return[2,e.urlParser((n?"https:":"http:")+"//"+u)]}}))}))}(o(o({},e),{useDualstackEndpoint:n,useFipsEndpoint:i}))},isCustomEndpoint:!!r,useDualstackEndpoint:n})},D=function(e){return"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips"))},w=function(e){return D(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e},b=function(e,t){var n;void 0===e&&(e=[]);var r=t.useFipsEndpoint,i=t.useDualstackEndpoint;return null===(n=e.find((function(e){var t=e.tags;return r===t.includes("fips")&&i===t.includes("dualstack")})))||void 0===n?void 0:n.hostname},E=function(e,t){var n,r,i,u,a,s,c=t.useFipsEndpoint,l=void 0!==c&&c,f=t.useDualstackEndpoint,d=void 0!==f&&f,h=t.signingService,p=t.regionHash,v=t.partitionHash,g=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}),y=e in p?e:null!==(r=null===(n=v[g])||void 0===n?void 0:n.endpoint)&&void 0!==r?r:e,m={useFipsEndpoint:l,useDualstackEndpoint:d},D=function(e,t){var n=t.regionHostname,r=t.partitionHostname;return n||(r?r.replace("{region}",e):void 0)}(y,{regionHostname:b(null===(i=p[y])||void 0===i?void 0:i.variants,m),partitionHostname:b(null===(u=v[g])||void 0===u?void 0:u.variants,m)});if(void 0===D)throw new Error("Endpoint resolution failed for: "+{resolvedRegion:y,useFipsEndpoint:l,useDualstackEndpoint:d});var w=function(e,t){var n=t.signingRegion,r=t.regionRegex,i=t.useFipsEndpoint;if(n)return n;if(i){var o=r.replace("\\\\","\\").replace(/^\^/g,"\\.").replace(/\$$/g,"\\."),u=e.match(o);if(u)return u[0].slice(1,-1)}}(D,{signingRegion:null===(a=p[y])||void 0===a?void 0:a.signingRegion,regionRegex:v[g].regionRegex,useFipsEndpoint:l});return o(o({partition:g,signingService:h,hostname:D},w&&{signingRegion:w}),(null===(s=p[y])||void 0===s?void 0:s.signingService)&&{signingService:p[y].signingService})},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,i=t[n];return o(o({},e),((r={})[n]=Array.isArray(i)?f([],l(i)):i,r))}),{}))),n},e}();var S=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}();function C(e){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(e)}var F={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},_=function(e){return{applyToStack:function(t){t.add(function(e){var t=this;return function(n){return function(r){return a(t,void 0,void 0,(function(){var t,i,u,a,c;return s(this,(function(s){return t=r.request,A.isInstance(t)&&(i=t.body,u=t.headers,i&&-1===Object.keys(u).map((function(e){return e.toLowerCase()})).indexOf("content-length")&&void 0!==(a=e(i))&&(t.headers=o(o({},t.headers),((c={})["content-length"]=String(a),c)))),[2,n(o(o({},r),{request:t}))]}))}))}}}(e.bodyLengthChecker),F)}}};var P,B={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},x=function(e){return{applyToStack:function(t){t.add(function(e){return function(t){return function(n){return a(void 0,void 0,void 0,(function(){var r,i;return s(this,(function(o){return A.isInstance(n.request)?(r=n.request,i=(e.requestHandler.metadata||{}).handlerProtocol,(void 0===i?"":i).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),B)}}},T={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},M=function(e){return{applyToStack:function(e){e.add((function(e,t){return function(n){return a(void 0,void 0,void 0,(function(){var r,i,o,a,c,l,f,d,h;return s(this,(function(s){switch(s.label){case 0:return r=t.clientName,i=t.commandName,o=t.inputFilterSensitiveLog,a=t.logger,c=t.outputFilterSensitiveLog,[4,e(n)];case 1:return l=s.sent(),a?("function"==typeof a.info&&(f=l.output,d=f.$metadata,h=u(f,["$metadata"]),a.info({clientName:r,commandName:i,input:o(n.input),output:c(h),metadata:d})),[2,l]):[2,l]}}))}))}}),T)}}};!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(P||(P={}));var L,O=P.STANDARD,R=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],k=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],N=["AbortError","TimeoutError","RequestTimeout","RequestTimeoutException"],I=[500,502,503,504],j=function(e){var t,n;return 429===(null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||k.includes(e.name)||1==(null===(n=e.$retryable)||void 0===n?void 0:n.throttling)},U=function(){function e(e){var t,n,r,i,o;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!==(i=null==e?void 0:e.scaleConstant)&&void 0!==i?i:.4,this.smooth=null!==(o=null==e?void 0:e.smooth)&&void 0!==o?o:.8;var u=this.getCurrentTimeInSeconds();this.lastThrottleTime=u,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 a(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.acquireTokenBucket(1)]}))}))},e.prototype.acquireTokenBucket=function(e){return a(this,void 0,void 0,(function(){var t;return s(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(),j(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}(),G=new Uint8Array(16);function z(){if(!L&&!(L="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 L(G)}var H=/^(?:[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 q=function(e){return"string"==typeof e&&H.test(e)},$=[],W=0;W<256;++W)$.push((W+256).toString(16).substr(1));var V=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=($[e[t+0]]+$[e[t+1]]+$[e[t+2]]+$[e[t+3]]+"-"+$[e[t+4]]+$[e[t+5]]+"-"+$[e[t+6]]+$[e[t+7]]+"-"+$[e[t+8]]+$[e[t+9]]+"-"+$[e[t+10]]+$[e[t+11]]+$[e[t+12]]+$[e[t+13]]+$[e[t+14]]+$[e[t+15]]).toLowerCase();if(!q(n))throw TypeError("Stringified UUID is invalid");return n};var Y=function(e,t,n){var r=(e=e||{}).random||(e.rng||z)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return V(r)},K=function(e,t){return Math.floor(Math.min(2e4,Math.random()*Math.pow(2,t)*e))},Z=function(e){return!!e&&(function(e){return void 0!==e.$retryable}(e)||function(e){return R.includes(e.name)}(e)||j(e)||function(e){var t;return N.includes(e.name)||I.includes((null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||0)}(e))},J=function(){function e(e,t){var n,r,i;this.maxAttemptsProvider=e,this.mode=P.STANDARD,this.retryDecider=null!==(n=null==t?void 0:t.retryDecider)&&void 0!==n?n:Z,this.delayDecider=null!==(r=null==t?void 0:t.delayDecider)&&void 0!==r?r:K,this.retryQuota=null!==(i=null==t?void 0:t.retryQuota)&&void 0!==i?i:function(e,t){var n,r,i,o=e,u=null!==(n=null==t?void 0:t.noRetryIncrement)&&void 0!==n?n:1,a=null!==(r=null==t?void 0:t.retryCost)&&void 0!==r?r:5,s=null!==(i=null==t?void 0:t.timeoutRetryCost)&&void 0!==i?i:10,c=e,l=function(e){return"TimeoutError"===e.name?s:a},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:u,c=Math.min(c,o)}})}(500)}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 s(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 a(this,void 0,void 0,(function(){var r,i,o,u,a,c,l,f;return s(this,(function(d){switch(d.label){case 0:return i=0,o=0,[4,this.getMaxAttempts()];case 1:u=d.sent(),a=t.request,A.isInstance(a)&&(a.headers["amz-sdk-invocation-id"]=Y()),c=function(){var c,f,d,h,p,v;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,4,,7]),A.isInstance(a)&&(a.headers["amz-sdk-request"]="attempt="+(i+1)+"; max="+u),(null==n?void 0:n.beforeRequest)?[4,n.beforeRequest()]:[3,2];case 1:s.sent(),s.label=2;case 2:return[4,e(t)];case 3:return c=s.sent(),f=c.response,d=c.output,(null==n?void 0:n.afterRequest)&&n.afterRequest(f),l.retryQuota.releaseRetryTokens(r),d.$metadata.attempts=i+1,d.$metadata.totalRetryDelay=o,[2,{value:{response:f,output:d}}];case 4:return h=s.sent(),p=Q(h),i++,l.shouldRetry(p,i,u)?(r=l.retryQuota.retrieveRetryTokens(p),v=l.delayDecider(j(p)?500:100,i),o+=v,[4,new Promise((function(e){return setTimeout(e,v)}))]):[3,6];case 5:return s.sent(),[2,"continue"];case 6:throw p.$metadata||(p.$metadata={}),p.$metadata.attempts=i,p.$metadata.totalRetryDelay=o,p;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}(),Q=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 "+e)},X=function(e){function t(t,n){var r=this,i=null!=n?n:{},o=i.rateLimiter,a=u(i,["rateLimiter"]);return(r=e.call(this,t,a)||this).rateLimiter=null!=o?o:new U,r.mode=P.ADAPTIVE,r}return i(t,e),t.prototype.retry=function(t,n){return a(this,void 0,void 0,(function(){var r=this;return s(this,(function(i){return[2,e.prototype.retry.call(this,t,n,{beforeRequest:function(){return a(r,void 0,void 0,(function(){return s(this,(function(e){return[2,this.rateLimiter.getSendToken()]}))}))},afterRequest:function(e){r.rateLimiter.updateClientSendingRate(e)}})]}))}))},t}(J),ee=function(e){return a(void 0,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return"string"==typeof e?[2,e]:[4,e()];case 1:return[2,t.sent()]}}))}))},te=function(e){if(void 0===e&&(e=3),"number"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e},ne={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},re=function(e){return{applyToStack:function(t){t.add(function(e){return function(t,n){return function(r){return a(void 0,void 0,void 0,(function(){var i;return s(this,(function(o){switch(o.label){case 0:return[4,e.retryStrategy()];case 1:return(null==(i=o.sent())?void 0:i.mode)&&(n.userAgent=f(f([],l(n.userAgent||[])),[["cfg/retry-mode",i.mode]])),[2,i.retry(t,r)]}}))}))}}}(e),ne)}}};(function(e){function t(t,n){void 0===n&&(n=!0);var r=e.call(this,t)||this;return r.tryNextLink=n,r}i(t,e),t.from=function(e,t){return void 0===t&&(t=!0),Object.defineProperty(e,"tryNextLink",{value:t,configurable:!1,enumerable:!1,writable:!1}),e}})(Error),function(e){function t(t,n){void 0===n&&(n=!0);var r=e.call(this,t)||this;return r.tryNextLink=n,r.name="CredentialsProviderError",r}i(t,e),t.from=function(e,t){return void 0===t&&(t=!0),Object.defineProperty(e,"tryNextLink",{value:t,configurable:!1,enumerable:!1,writable:!1}),e}}(Error);for(var ie=function(e,t,n){var r,i,o,u=function(){return a(void 0,void 0,void 0,(function(){return s(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 r=t.sent(),o=!0,[3,4];case 3:return i=void 0,[7];case 4:return[2,r]}}))}))};if(void 0===t)return function(){return a(void 0,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return o?[3,2]:[4,u()];case 1:r=e.sent(),e.label=2;case 2:return[2,r]}}))}))};var c=!1;return function(){return a(void 0,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return o?[3,2]:[4,u()];case 1:r=e.sent(),e.label=2;case 2:return c?[2,r]:n&&!n(r)?(c=!0,[2,r]):t(r)?[4,u()]:[3,4];case 3:return e.sent(),[2,r];case 4:return[2,r]}}))}))}},oe={},ue={},ae=0;ae<256;ae++){var se=ae.toString(16).toLowerCase();1===se.length&&(se="0"+se),oe[ae]=se,ue[se]=ae}function ce(e){for(var t="",n=0;n<e.byteLength;n++)t+=oe[e[n]];return t}var le="X-Amz-Date".toLowerCase(),fe=["authorization",le,"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-/,ye="AWS4-HMAC-SHA256-PAYLOAD",me={},De=[],we=function(e,t,n){return e+"/"+t+"/"+n+"/aws4_request"},be=function(e,t,n){var r=new e(t);return r.update(n),r.digest()},Ee=function(e,t,n){var r,i,o=e.headers,u={};try{for(var a=c(Object.keys(o).sort()),s=a.next();!s.done;s=a.next()){var l=s.value,f=l.toLowerCase();(f in pe||(null==t?void 0:t.has(f))||ve.test(f)||ge.test(f))&&(!n||n&&!n.has(f))||(u[f]=o[l].trim().replace(/\s+/g," "))}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return u},Ae=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,Se)},Se=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()},Ce=function(e,t){var n=e.headers,r=e.body;return a(void 0,void 0,void 0,(function(){var e,i,o,u,a,l,f;return s(this,(function(s){switch(s.label){case 0:try{for(e=c(Object.keys(n)),i=e.next();!i.done;i=e.next())if("x-amz-content-sha256"===(o=i.value).toLowerCase())return[2,n[o]]}catch(e){l={error:e}}finally{try{i&&!i.done&&(f=e.return)&&f.call(e)}finally{if(l)throw l.error}}return null!=r?[3,1]:[2,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"];case 1:return"string"==typeof r||ArrayBuffer.isView(r)||(d=r,"function"==typeof ArrayBuffer&&d instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(d))?((u=new t).update(r),a=ce,[4,u.digest()]):[3,3];case 2:return[2,a.apply(void 0,[s.sent()])];case 3:return[2,"UNSIGNED-PAYLOAD"]}var d}))}))},Fe=function(e){var t=e.headers,n=e.query,r=u(e,["headers","query"]);return o(o({},r),{headers:o({},t),query:n?_e(n):void 0})},_e=function(e){return Object.keys(e).reduce((function(t,n){var r,i=e[n];return o(o({},t),((r={})[n]=Array.isArray(i)?f([],l(i)):i,r))}),{})},Pe=function(e){var t,n;e="function"==typeof e.clone?e.clone():Fe(e);try{for(var r=c(Object.keys(e.headers)),i=r.next();!i.done;i=r.next()){var o=i.value;fe.indexOf(o.toLowerCase())>-1&&delete e.headers[o]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return e},Be=function(e){return"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e},xe=function(){function e(e){var t=e.applyChecksum,n=e.credentials,r=e.region,i=e.service,o=e.sha256,u=e.uriEscapePath,a=void 0===u||u;this.service=i,this.sha256=o,this.uriEscapePath=a,this.applyChecksum="boolean"!=typeof t||t,this.regionProvider=function(e){if("string"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e}(r),this.credentialProvider=function(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e}(n)}return e.prototype.presign=function(e,t){return void 0===t&&(t={}),a(this,void 0,void 0,(function(){var n,r,i,u,a,l,f,d,h,p,v,g,y,m,D,w,b,E,A,S,C,F,_,P;return s(this,(function(s){switch(s.label){case 0:return n=t.signingDate,r=void 0===n?new Date:n,i=t.expiresIn,u=void 0===i?3600:i,a=t.unsignableHeaders,l=t.unhoistableHeaders,f=t.signableHeaders,d=t.signingRegion,h=t.signingService,[4,this.credentialProvider()];case 1:return p=s.sent(),null==d?[3,2]:(g=d,[3,4]);case 2:return[4,this.regionProvider()];case 3:g=s.sent(),s.label=4;case 4:return v=g,y=Te(r),m=y.longDate,D=y.shortDate,u>604800?[2,Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future")]:(w=we(D,v,null!=h?h:this.service),b=function(e,t){var n,r,i;void 0===t&&(t={});var u="function"==typeof e.clone?e.clone():Fe(e),a=u.headers,s=u.query,l=void 0===s?{}:s;try{for(var f=c(Object.keys(a)),d=f.next();!d.done;d=f.next()){var h=d.value,p=h.toLowerCase();"x-amz-"!==p.substr(0,6)||(null===(i=t.unhoistableHeaders)||void 0===i?void 0:i.has(p))||(l[h]=a[h],delete a[h])}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}return o(o({},e),{headers:a,query:l})}(Pe(e),{unhoistableHeaders:l}),p.sessionToken&&(b.query["X-Amz-Security-Token"]=p.sessionToken),b.query["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",b.query["X-Amz-Credential"]=p.accessKeyId+"/"+w,b.query["X-Amz-Date"]=m,b.query["X-Amz-Expires"]=u.toString(10),E=Ee(b,a,f),b.query["X-Amz-SignedHeaders"]=Me(E),A=b.query,S="X-Amz-Signature",C=this.getSignature,F=[m,w,this.getSigningKey(p,v,D,h)],_=this.createCanonicalRequest,P=[b,E],[4,Ce(e,this.sha256)]);case 5:return[4,C.apply(this,F.concat([_.apply(this,P.concat([s.sent()]))]))];case 6:return A[S]=s.sent(),[2,b]}}))}))},e.prototype.sign=function(e,t){return a(this,void 0,void 0,(function(){return s(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,i=t.signingDate,o=void 0===i?new Date:i,u=t.priorSignature,c=t.signingRegion,l=t.signingService;return a(this,void 0,void 0,(function(){var e,t,i,a,f,d,h,p,v,g,y;return s(this,(function(s){switch(s.label){case 0:return null==c?[3,1]:(t=c,[3,3]);case 1:return[4,this.regionProvider()];case 2:t=s.sent(),s.label=3;case 3:return e=t,i=Te(o),a=i.shortDate,f=i.longDate,d=we(a,e,null!=l?l:this.service),[4,Ce({headers:{},body:r},this.sha256)];case 4:return h=s.sent(),(p=new this.sha256).update(n),g=ce,[4,p.digest()];case 5:return v=g.apply(void 0,[s.sent()]),y=[ye,f,d,u,v,h].join("\n"),[2,this.signString(y,{signingDate:o,signingRegion:e,signingService:l})]}}))}))},e.prototype.signString=function(e,t){var n=void 0===t?{}:t,r=n.signingDate,i=void 0===r?new Date:r,o=n.signingRegion,u=n.signingService;return a(this,void 0,void 0,(function(){var t,n,r,a,c,l,f,d;return s(this,(function(s){switch(s.label){case 0:return[4,this.credentialProvider()];case 1:return t=s.sent(),null==o?[3,2]:(r=o,[3,4]);case 2:return[4,this.regionProvider()];case 3:r=s.sent(),s.label=4;case 4:return n=r,a=Te(i).shortDate,f=(l=this.sha256).bind,[4,this.getSigningKey(t,n,a,u)];case 5:return(c=new(f.apply(l,[void 0,s.sent()]))).update(e),d=ce,[4,c.digest()];case 6:return[2,d.apply(void 0,[s.sent()])]}}))}))},e.prototype.signRequest=function(e,t){var n=void 0===t?{}:t,r=n.signingDate,i=void 0===r?new Date:r,o=n.signableHeaders,u=n.unsignableHeaders,l=n.signingRegion,f=n.signingService;return a(this,void 0,void 0,(function(){var t,n,r,a,d,h,p,v,g,y,m;return s(this,(function(s){switch(s.label){case 0:return[4,this.credentialProvider()];case 1:return t=s.sent(),null==l?[3,2]:(r=l,[3,4]);case 2:return[4,this.regionProvider()];case 3:r=s.sent(),s.label=4;case 4:return n=r,a=Pe(e),d=Te(i),h=d.longDate,p=d.shortDate,v=we(p,n,null!=f?f:this.service),a.headers[le]=h,t.sessionToken&&(a.headers[he]=t.sessionToken),[4,Ce(a,this.sha256)];case 5:return g=s.sent(),!function(e,t){var n,r;e=e.toLowerCase();try{for(var i=c(Object.keys(t)),o=i.next();!o.done;o=i.next()){if(e===o.value.toLowerCase())return!0}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1}("x-amz-content-sha256",a.headers)&&this.applyChecksum&&(a.headers["x-amz-content-sha256"]=g),y=Ee(a,u,o),[4,this.getSignature(h,v,this.getSigningKey(t,n,p,f),this.createCanonicalRequest(a,y,g))];case 6:return m=s.sent(),a.headers.authorization="AWS4-HMAC-SHA256 Credential="+t.accessKeyId+"/"+v+", SignedHeaders="+Me(y)+", Signature="+m,[2,a]}}))}))},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,i=void 0===r?{}:r,o=[],u={},a=function(e){if(e.toLowerCase()===de)return"continue";o.push(e);var t=i[e];"string"==typeof t?u[e]=Ae(e)+"="+Ae(t):Array.isArray(t)&&(u[e]=t.slice(0).sort().reduce((function(t,n){return t.concat([Ae(e)+"="+Ae(n)])}),[]).join("&"))};try{for(var s=c(Object.keys(i).sort()),l=s.next();!l.done;l=s.next()){a(l.value)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return o.map((function(e){return u[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 a(this,void 0,void 0,(function(){var r,i;return s(this,(function(o){switch(o.label){case 0:return(r=new this.sha256).update(n),[4,r.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,n,r){return a(this,void 0,void 0,(function(){var i,o,u,a,c;return s(this,(function(s){switch(s.label){case 0:return[4,this.createStringToSign(e,t,r)];case 1:return i=s.sent(),a=(u=this.sha256).bind,[4,n];case 2:return(o=new(a.apply(u,[void 0,s.sent()]))).update(i),c=ce,[4,o.digest()];case 3:return[2,c.apply(void 0,[s.sent()])]}}))}))},e.prototype.getSigningKey=function(e,t,n,r){return function(e,t,n,r,i){return a(void 0,void 0,void 0,(function(){var o,u,a,l,f,d,h,p,v;return s(this,(function(s){switch(s.label){case 0:return[4,be(e,t.secretAccessKey,t.accessKeyId)];case 1:if(o=s.sent(),(u=n+":"+r+":"+i+":"+ce(o)+":"+t.sessionToken)in me)return[2,me[u]];for(De.push(u);De.length>50;)delete me[De.shift()];a="AWS4"+t.secretAccessKey,s.label=2;case 2:s.trys.push([2,7,8,9]),l=c([n,r,i,"aws4_request"]),f=l.next(),s.label=3;case 3:return f.done?[3,6]:(d=f.value,[4,be(e,a,d)]);case 4:a=s.sent(),s.label=5;case 5:return f=l.next(),[3,3];case 6:return[3,9];case 7:return h=s.sent(),p={error:h},[3,9];case 8:try{f&&!f.done&&(v=l.return)&&v.call(l)}finally{if(p)throw p.error}return[7];case 9:return[2,me[u]=a]}}))}))}(this.sha256,e,n,t,r||this.service)},e}(),Te=function(e){var t,n=(t=e,Be(t).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");return{longDate:n,shortDate:n.substr(0,8)}},Me=function(e){return Object.keys(e).sort().join(";")},Le=function(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e},Oe=function(e){return"function"==typeof e?ie(e,(function(e){return void 0!==e.expiration&&e.expiration.getTime()-Date.now()<3e5}),(function(e){return void 0!==e.expiration})):Le(e)},Re=function(e){return new Date(Date.now()+e)},ke=function(e,t){var n=Date.parse(e);return function(e,t){return Math.abs(Re(t).getTime()-e)>=3e5}(n,t)?n-Date.now():t},Ne=function(e){var t,n,r;return S.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},Ie={name:"awsAuthMiddleware",tags:["SIGNATURE","AWSAUTH"],relation:"after",toMiddleware:"retryMiddleware",override:!0},je=function(e){return{applyToStack:function(t){t.addRelativeTo(function(e){return function(t,n){return function(r){return a(this,void 0,void 0,(function(){var i,u,a,c,l,f;return s(this,(function(s){switch(s.label){case 0:return A.isInstance(r.request)?[4,e.signer()]:[2,t(r)];case 1:return i=s.sent(),a=t,c=[o({},r)],f={},[4,i.sign(r.request,{signingDate:Re(e.systemClockOffset),signingRegion:n.signing_region,signingService:n.signing_service})];case 2:return[4,a.apply(void 0,[o.apply(void 0,c.concat([(f.request=s.sent(),f)]))]).catch((function(t){var n,r=null!==(n=t.ServerTime)&&void 0!==n?n:Ne(t.$response);throw r&&(e.systemClockOffset=ke(r,e.systemClockOffset)),t}))];case 3:return u=s.sent(),(l=Ne(u.response))&&(e.systemClockOffset=ke(l,e.systemClockOffset)),[2,u]}}))}))}}}(e),Ie)}}};var Ue=/[^\!\#\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Ge=function(e){var t=l(e,2),n=t[0],r=t[1],i=n.indexOf("/"),o=n.substring(0,i),u=n.substring(i+1);return"api"===o&&(u=u.toLowerCase()),[o,u,r].filter((function(e){return e&&e.length>0})).map((function(e){return null==e?void 0:e.replace(Ue,"_")})).join("/")},ze={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},He=function(e){return{applyToStack:function(t){var n;t.add((n=e,function(e,t){return function(r){return a(void 0,void 0,void 0,(function(){var i,u,a,c,d,h,p,v,g;return s(this,(function(s){switch(s.label){case 0:return i=r.request,A.isInstance(i)?(u=i.headers,a=(null===(v=null==t?void 0:t.userAgent)||void 0===v?void 0:v.map(Ge))||[],[4,n.defaultUserAgentProvider()]):[2,e(r)];case 1:return c=s.sent().map(Ge),d=(null===(g=null==n?void 0:n.customUserAgent)||void 0===g?void 0:g.map(Ge))||[],h=f(f(f([],l(c)),l(a)),l(d)).join(" "),p=f(f([],l(c.filter((function(e){return e.startsWith("aws-sdk-")})))),l(d)).join(" "),"browser"!==n.runtime?(p&&(u["x-amz-user-agent"]=u["x-amz-user-agent"]?u["user-agent"]+" "+p:p),u["user-agent"]=h):u["x-amz-user-agent"]=h,[2,e(o(o({},r),{request:i}))]}}))}))}}),ze)}}},qe=function(){var e=[],t=[],n=new Set,r=function(n){return e.forEach((function(e){n.add(e.middleware,o({},e))})),t.forEach((function(e){n.addRelativeTo(e.middleware,o({},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,f([],l(i(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,f([],l(i(e))))})),t},u=function(){var n,r=[],u=[],a={};return e.forEach((function(e){var t=o(o({},e),{before:[],after:[]});t.name&&(a[t.name]=t),r.push(t)})),t.forEach((function(e){var t=o(o({},e),{before:[],after:[]});t.name&&(a[t.name]=t),u.push(t)})),u.forEach((function(e){if(e.toMiddleware){var t=a[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=r,n.sort((function(e,t){return $e[t.step]-$e[e.step]||We[t.priority||"normal"]-We[e.priority||"normal"]}))).map(i).reduce((function(e,t){return e.push.apply(e,f([],l(t))),e}),[]).map((function(e){return e.middleware}))},a={add:function(t,r){void 0===r&&(r={});var i=r.name,u=r.override,a=o({step:"initialize",priority:"normal",middleware:t},r);if(i){if(n.has(i)){if(!u)throw new Error("Duplicate middleware name '"+i+"'");var s=e.findIndex((function(e){return e.name===i})),c=e[s];if(c.step!==a.step||c.priority!==a.priority)throw new Error('"'+i+'" middleware with '+c.priority+" priority in "+c.step+" step cannot be overridden by same-name middleware with "+a.priority+" priority in "+a.step+" step.");e.splice(s,1)}n.add(i)}e.push(a)},addRelativeTo:function(e,r){var i=r.name,u=r.override,a=o({middleware:e},r);if(i){if(n.has(i)){if(!u)throw new Error("Duplicate middleware name '"+i+"'");var s=t.findIndex((function(e){return e.name===i})),c=t[s];if(c.toMiddleware!==a.toMiddleware||c.relation!==a.relation)throw new Error('"'+i+'" middleware '+c.relation+' "'+c.toMiddleware+'" middleware cannot be overridden by same-name middleware '+a.relation+' "'+a.toMiddleware+'" middleware.');t.splice(s,1)}n.add(i)}t.push(a)},clone:function(){return r(qe())},use:function(e){e.applyToStack(a)},remove:function(r){return"string"==typeof r?function(r){var i=!1,o=function(e){return!e.name||e.name!==r||(i=!0,n.delete(r),!1)};return e=e.filter(o),t=t.filter(o),i}(r):function(r){var i=!1,o=function(e){return e.middleware!==r||(i=!0,e.name&&n.delete(e.name),!1)};return e=e.filter(o),t=t.filter(o),i}(r)},removeByTag:function(r){var i=!1,o=function(e){var t=e.tags,o=e.name;return!t||!t.includes(r)||(o&&n.delete(o),i=!0,!1)};return e=e.filter(o),t=t.filter(o),i},concat:function(e){var t=r(qe());return t.use(e),t},applyToStack:r,resolve:function(e,t){var n,r;try{for(var i=c(u().reverse()),o=i.next();!o.done;o=i.next()){e=(0,o.value)(e,t)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e}};return a},$e={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},We={high:3,normal:2,low:1},Ve=function(){function e(e){this.middlewareStack=qe(),this.config=e}return e.prototype.send=function(e,t,n){var r="function"!=typeof t?t:void 0,i="function"==typeof t?t:n,o=e.resolveMiddleware(this.middlewareStack,this.config,r);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}(),Ye=function(){this.middlewareStack=qe()},Ke="***SensitiveInformation***",Ze=function(e){if(null!=e){if("boolean"==typeof e)return e;throw new TypeError("Expected boolean, got "+typeof e)}},Je=function(e){if(null!=e){if("number"==typeof e)return e;throw new TypeError("Expected number, got "+typeof e)}},Qe=Math.ceil(Math.pow(2,127)*(2-Math.pow(2,-23))),Xe=function(e){var t=Je(e);if(void 0!==t&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>Qe)throw new TypeError("Expected 32-bit float, got "+e);return t},et=function(e){if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError("Expected integer, got "+typeof e)}},tt=function(e){return it(e,32)},nt=function(e){return it(e,16)},rt=function(e){return it(e,8)},it=function(e,t){var n=et(e);if(void 0!==n&&ot(n,t)!==n)throw new TypeError("Expected "+t+"-bit integer, got "+e);return n},ot=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]}},ut=function(e,t){if(null==e){if(t)throw new TypeError("Expected a non-null value for "+t);throw new TypeError("Expected a non-null value")}return e},at=function(e){if(null!=e){if("object"==typeof e&&!Array.isArray(e))return e;throw new TypeError("Expected object, got "+typeof e)}},st=function(e){if(null!=e){if("string"==typeof e)return e;throw new TypeError("Expected string, got "+typeof e)}},ct=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,lt=function(e){var t=e.match(ct);if(null===t||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},ft=function(e){return"string"==typeof e?dt(e):Je(e)},dt=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: "+e)}},ht=function(e){return nt("string"==typeof e?lt(e):e)},pt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var vt=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),gt=function(e){if(null!=e){if("string"!=typeof e)throw new TypeError("RFC-3339 date-times must be expressed as strings");var t=vt.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");var n=l(t,8),r=(n[0],n[1]),i=n[2],o=n[3],u=n[4],a=n[5],s=n[6],c=n[7],f=ht(At(r)),d=bt(i,"month",1,12),h=bt(o,"day",1,31);return yt(f,d,h,{hours:u,minutes:a,seconds:s,fractionalMilliseconds:c})}},yt=(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{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{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{2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),function(e,t,n,r){var i=t-1;return Dt(e,i,n),new Date(Date.UTC(e,i,n,bt(r.hours,"hour",0,23),bt(r.minutes,"minute",0,59),bt(r.seconds,"seconds",0,60),Et(r.fractionalMilliseconds)))}),mt=[31,28,31,30,31,30,31,31,30,31,30,31],Dt=function(e,t,n){var r=mt[t];if(1===t&&wt(e)&&(r=29),n>r)throw new TypeError("Invalid day for "+pt[t]+" in "+e+": "+n)},wt=function(e){return e%4==0&&(e%100!=0||e%400==0)},bt=function(e,t,n,r){var i=function(e){return rt("string"==typeof e?lt(e):e)}(At(e));if(i<n||i>r)throw new TypeError(t+" must be between "+n+" and "+r+", inclusive");return i},Et=function(e){return null==e?0:1e3*function(e){return Xe("string"==typeof e?lt(e):e)}("0."+e)},At=function(e){for(var t=0;t<e.length-1&&"0"===e.charAt(t);)t++;return 0===t?e:e.slice(t)},St=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(5);function Ct(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}var Ft=function(){var e=Object.getPrototypeOf(this).constructor,t=Function.bind.apply(String,f([null],l(arguments))),n=new t;return Object.setPrototypeOf(n,e.prototype),n};Ft.prototype=Object.create(String.prototype,{constructor:{value:Ft,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(Ft,String);!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}i(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))}}(Ft);var _t=function(e){if(e!=e)return"NaN";switch(e){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return e}};var Pt=n(13),Bt=n(12);for(var xt=function(){function e(e){var t=this;"function"==typeof e?this.configProvider=function(){return a(t,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,e()];case 1:return[2,t.sent()||{}]}}))}))}:this.config=null!=e?e:{}}return e.prototype.destroy=function(){},e.prototype.handle=function(e,t){var n=(void 0===t?{}:t).abortSignal;return a(this,void 0,void 0,(function(){var t,r,i,o,u,a,l,f,d,h,p,v;return s(this,(function(s){switch(s.label){case 0:return this.config||!this.configProvider?[3,2]:(t=this,[4,this.configProvider()]);case 1:t.config=s.sent(),s.label=2;case 2:return r=this.config.requestTimeout,(null==n?void 0:n.aborted)?((i=new Error("Request aborted")).name="AbortError",[2,Promise.reject(i)]):(o=e.path,e.query&&(u=function(e){var t,n,r=[];try{for(var i=c(Object.keys(e).sort()),o=i.next();!o.done;o=i.next()){var u=o.value,a=e[u];if(u=Ae(u),Array.isArray(a))for(var s=0,l=a.length;s<l;s++)r.push(u+"="+Ae(a[s]));else{var f=u;(a||"string"==typeof a)&&(f+="="+Ae(a)),r.push(f)}}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r.join("&")}(e.query))&&(o+="?"+u),a=e.port,l=e.method,f=e.protocol+"//"+e.hostname+(a?":"+a:"")+o,d="GET"===l||"HEAD"===l?void 0:e.body,h={body:d,headers:new Headers(e.headers),method:l},"undefined"!=typeof AbortController&&(h.signal=n),p=new Request(f,h),v=[fetch(p).then((function(e){var t,n,r=e.headers,i={};try{for(var o=c(r.entries()),u=o.next();!u.done;u=o.next()){var a=u.value;i[a[0]]=a[1]}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return void 0!==e.body?{response:new S({headers:i,statusCode:e.status,body:e.body})}:e.blob().then((function(t){return{response:new S({headers:i,statusCode:e.status,body:t})}}))})),(g=r,void 0===g&&(g=0),new Promise((function(e,t){g&&setTimeout((function(){var e=new Error("Request did not complete within "+g+" ms");e.name="TimeoutError",t(e)}),g)})))],n&&v.push(new Promise((function(e,t){n.onabort=function(){var e=new Error("Request aborted");e.name="AbortError",t(e)}}))),[2,Promise.race(v)])}var g}))}))},e}(),Tt={},Mt=new Array(64),Lt=0,Ot="A".charCodeAt(0),Rt="Z".charCodeAt(0);Lt+Ot<=Rt;Lt++){var kt=String.fromCharCode(Lt+Ot);Tt[kt]=Lt,Mt[Lt]=kt}for(Lt=0,Ot="a".charCodeAt(0),Rt="z".charCodeAt(0);Lt+Ot<=Rt;Lt++){kt=String.fromCharCode(Lt+Ot);var Nt=Lt+26;Tt[kt]=Nt,Mt[Nt]=kt}for(Lt=0;Lt<10;Lt++){Tt[Lt.toString(10)]=Lt+52;kt=Lt.toString(10),Nt=Lt+52;Tt[kt]=Nt,Mt[Nt]=kt}Tt["+"]=62,Mt[62]="+",Tt["/"]=63,Mt[63]="/";function It(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),i=0;i<e.length;i+=4){for(var o=0,u=0,a=i,s=i+3;a<=s;a++)if("="!==e[a]){if(!(e[a]in Tt))throw new TypeError("Invalid character "+e[a]+" in base64 string.");o|=Tt[e[a]]<<6*(s-a),u+=6}else o>>=6;var c=i/4*3;o>>=u%8;for(var l=Math.floor(u/8),f=0;f<l;f++){var d=8*(l-f-1);r.setUint8(c+f,(o&255<<d)>>d)}}return new Uint8Array(n)}function jt(e){for(var t="",n=0;n<e.length;n+=3){for(var r=0,i=0,o=n,u=Math.min(n+3,e.length);o<u;o++)r|=e[o]<<8*(u-o-1),i+=8;var a=Math.ceil(i/6);r<<=6*a-i;for(var s=1;s<=a;s++){var c=6*(a-s);t+=Mt[(r&63<<c)>>c]}t+="==".slice(0,4-a)}return t}var Ut=function(e){return"function"==typeof Blob&&e instanceof Blob?function(e){return a(this,void 0,void 0,(function(){var t,n;return s(this,(function(r){switch(r.label){case 0:return[4,Gt(e)];case 1:return t=r.sent(),n=It(t),[2,new Uint8Array(n)]}}))}))}(e):function(e){return a(this,void 0,void 0,(function(){var t,n,r,i,o,u,a;return s(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 i=s.sent(),o=i.done,(u=i.value)&&(a=t,(t=new Uint8Array(a.length+u.length)).set(a),t.set(u,a.length)),r=o,[3,1];case 3:return[2,t]}}))}))}(e)};function Gt(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 i=null!==(e=r.result)&&void 0!==e?e:"",o=i.indexOf(","),u=o>-1?o+1:i.length;t(i.substring(u))},r.onabort=function(){return n(new Error("Read aborted"))},r.onerror=function(){return n(r.error)},r.readAsDataURL(e)}))}function zt(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}var Ht=n(1),qt=n.n(Ht),$t=function(e){var t=e.serviceId,n=e.clientVersion;return function(){return a(void 0,void 0,void 0,(function(){var e,r,i,o,u,a,c,l,f;return s(this,(function(s){return e="undefined"!=typeof window&&(null===(i=null===window||void 0===window?void 0:window.navigator)||void 0===i?void 0:i.userAgent)?qt.a.parse(window.navigator.userAgent):void 0,r=[["aws-sdk-js",n],["os/"+((null===(o=null==e?void 0:e.os)||void 0===o?void 0:o.name)||"other"),null===(u=null==e?void 0:e.os)||void 0===u?void 0:u.version],["lang/js"],["md/browser",(null!==(c=null===(a=null==e?void 0:e.browser)||void 0===a?void 0:a.name)&&void 0!==c?c:"unknown")+"_"+(null!==(f=null===(l=null==e?void 0:e.browser)||void 0===l?void 0:l.version)&&void 0!==f?f:"unknown")]],t&&r.push(["api/"+t,n]),[2,r]}))}))}};var Wt=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 i=e.charCodeAt(n);if(i<128)t.push(i);else if(i<2048)t.push(i>>6|192,63&i|128);else if(n+1<e.length&&55296==(64512&i)&&56320==(64512&e.charCodeAt(n+1))){var o=65536+((1023&i)<<10)+(1023&e.charCodeAt(++n));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)},Vt=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 i=e[n];if(i<128)t+=String.fromCharCode(i);else if(192<=i&&i<224){var o=e[++n];t+=String.fromCharCode((31&i)<<6|63&o)}else if(240<=i&&i<365){var u="%"+[i,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(u)}else t+=String.fromCharCode((15&i)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)};var Yt,Kt,Zt,Jt,Qt,Xt,en,tn,nn,rn,on,un,an,sn,cn,ln,fn,dn,hn,pn,vn,gn,yn,mn,Dn,wn,bn,En,An,Sn,Cn,Fn,_n,Pn,Bn,xn,Tn,Mn,Ln,On,Rn,kn,Nn,In,jn,Un,Gn,zn,Hn,qn,$n,Wn,Vn,Yn,Kn,Zn,Jn,Qn,Xn,er,tr,nr,rr,ir,or,ur,ar,sr,cr,lr,fr,dr,hr,pr,vr,gr,yr,mr,Dr,wr,br,Er,Ar,Sr,Cr,Fr,_r,Pr,Br,xr,Tr,Mr,Lr,Or,Rr,kr,Nr,Ir,jr,Ur,Gr,zr,Hr,qr,$r,Wr,Vr,Yr,Kr,Zr,Jr,Qr,Xr,ei,ti,ni,ri,ii,oi,ui,ai,si,ci,li,fi,di,hi,pi,vi,gi,yi,mi,Di,wi,bi,Ei,Ai,Si,Ci,Fi,_i,Pi,Bi,xi,Ti,Mi,Li,Oi=function(e){var t,n=new URL(e),r=n.hostname,i=n.pathname,o=n.port,u=n.protocol,a=n.search;return a&&(t=function(e){var t,n,r={};if(e=e.replace(/^\?/,""))try{for(var i=c(e.split("&")),o=i.next();!o.done;o=i.next()){var u=l(o.value.split("="),2),a=u[0],s=u[1],f=void 0===s?null:s;a=decodeURIComponent(a),f&&(f=decodeURIComponent(f)),a in r?Array.isArray(r[a])?r[a].push(f):r[a]=[r[a],f]:r[a]=f}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}(a)),{hostname:r,port:o?parseInt(o):void 0,protocol:u,path:i,query:t}},Ri={},ki={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-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:"geo.{region}.amazonaws.com",tags:[]},{hostname:"geo-fips.{region}.amazonaws.com",tags:["fips"]},{hostname:"geo-fips.{region}.api.aws",tags:["dualstack","fips"]},{hostname:"geo.{region}.api.aws",tags:["dualstack"]}]},"aws-cn":{regions:["cn-north-1","cn-northwest-1"],regionRegex:"^cn\\-\\w+\\-\\d+$",variants:[{hostname:"geo.{region}.amazonaws.com.cn",tags:[]},{hostname:"geo-fips.{region}.amazonaws.com.cn",tags:["fips"]},{hostname:"geo-fips.{region}.api.amazonwebservices.com.cn",tags:["dualstack","fips"]},{hostname:"geo.{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:"geo.{region}.c2s.ic.gov",tags:[]},{hostname:"geo-fips.{region}.c2s.ic.gov",tags:["fips"]}]},"aws-iso-b":{regions:["us-isob-east-1"],regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",variants:[{hostname:"geo.{region}.sc2s.sgov.gov",tags:[]},{hostname:"geo-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:"geo.{region}.amazonaws.com",tags:[]},{hostname:"geo-fips.{region}.amazonaws.com",tags:["fips"]},{hostname:"geo-fips.{region}.api.aws",tags:["dualstack","fips"]},{hostname:"geo.{region}.api.aws",tags:["dualstack"]}]}},Ni=function(e,t){return a(void 0,void 0,void 0,(function(){return s(this,(function(n){return[2,E(e,o(o({},t),{signingService:"geo",regionHash:Ri,partitionHash:ki}))]}))}))},Ii=["in-region","cross-region","mobile","standard","legacy"],ji=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)?qt.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},Ui=function(e){var t,n,r,i,u,c,l,f,d,h,p,v,g,y,m,D,w=function(e){var t=(void 0===e?{}:e).defaultsMode;return ie((function(){return a(void 0,void 0,void 0,(function(){var e,n;return s(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(ji()?"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 '+Ii.join(", ")+", got "+e)}return[2]}}))}))}))}(e),b=function(){return w().then(St)},E=function(e){var t,n,r,i,o;return{apiVersion:"2020-11-19",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:Ni,serviceId:null!==(i=null==e?void 0:e.serviceId)&&void 0!==i?i:"Location",urlParser:null!==(o=null==e?void 0:e.urlParser)&&void 0!==o?o:Oi}}(e);return o(o(o({},E),e),{runtime:"browser",defaultsMode:w,base64Decoder:null!==(t=null==e?void 0:e.base64Decoder)&&void 0!==t?t:It,base64Encoder:null!==(n=null==e?void 0:e.base64Encoder)&&void 0!==n?n:jt,bodyLengthChecker:null!==(r=null==e?void 0:e.bodyLengthChecker)&&void 0!==r?r:zt,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!==(u=null==e?void 0:e.defaultUserAgentProvider)&&void 0!==u?u:$t({serviceId:E.serviceId,clientVersion:Pt.version}),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:(D="Region is missing",function(){return Promise.reject(D)}),requestHandler:null!==(f=null==e?void 0:e.requestHandler)&&void 0!==f?f:new xt(b),retryMode:null!==(d=null==e?void 0:e.retryMode)&&void 0!==d?d:function(){return a(void 0,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,b()];case 1:return[2,e.sent().retryMode||O]}}))}))},sha256:null!==(h=null==e?void 0:e.sha256)&&void 0!==h?h:Bt.Sha256,streamCollector:null!==(p=null==e?void 0:e.streamCollector)&&void 0!==p?p:Ut,useDualstackEndpoint:null!==(v=null==e?void 0:e.useDualstackEndpoint)&&void 0!==v?v:function(){return Promise.resolve(!1)},useFipsEndpoint:null!==(g=null==e?void 0:e.useFipsEndpoint)&&void 0!==g?g:function(){return Promise.resolve(!1)},utf8Decoder:null!==(y=null==e?void 0:e.utf8Decoder)&&void 0!==y?y:Wt,utf8Encoder:null!==(m=null==e?void 0:e.utf8Encoder)&&void 0!==m?m:Vt})},Gi=function(e){function t(t){var n,r,i=this,u=function(e){var t=e.region,n=e.useFipsEndpoint;if(!t)throw new Error("Region is missing");return o(o({},e),{region:function(){return a(void 0,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return"string"==typeof t?[2,w(t)]:[4,t()];case 1:return e=n.sent(),[2,w(e)]}}))}))},useFipsEndpoint:function(){return a(void 0,void 0,void 0,(function(){var e;return s(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 D(e)?[2,!0]:[2,"boolean"==typeof n?Promise.resolve(n):n()]}}))}))}})}(Ui(t)),c=m(u),f=function(e){return o(o({},e),{customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent})}(function(e){var t,n=e.credentials?Oe(e.credentials):e.credentialDefaultProvider(e),r=e.signingEscapePath,i=void 0===r||r,u=e.systemClockOffset,c=void 0===u?e.systemClockOffset||0:u,f=e.sha256;return t=e.signer?Le(e.signer):function(){return Le(e.region)().then((function(t){return a(void 0,void 0,void 0,(function(){var n,r,i,o;return s(this,(function(u){switch(u.label){case 0:return r=(n=e).regionInfoProvider,i=[t],o={},[4,e.useFipsEndpoint()];case 1:return o.useFipsEndpoint=u.sent(),[4,e.useDualstackEndpoint()];case 2:return[4,r.apply(n,i.concat([(o.useDualstackEndpoint=u.sent(),o)]))];case 3:return[2,[u.sent()||{},t]]}}))}))})).then((function(t){var r=l(t,2),u=r[0],a=r[1],s=u.signingRegion,c=u.signingService;e.signingRegion=e.signingRegion||s||a,e.signingName=e.signingName||c||e.serviceId;var d=o(o({},e),{credentials:n,region:e.signingRegion,service:e.signingName,sha256:f,uriEscapePath:i});return new(e.signerConstructor||xe)(d)}))},o(o({},e),{systemClockOffset:c,signingEscapePath:i,credentials:n,signer:t})}((r=te((n=c).maxAttempts),o(o({},n),{maxAttempts:r,retryStrategy:function(){return a(void 0,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return n.retryStrategy?[2,n.retryStrategy]:[4,ee(n.retryMode)];case 1:return e.sent()===P.ADAPTIVE?[2,new X(r)]:[2,new J(r)]}}))}))}}))));return(i=e.call(this,f)||this).config=f,i.middlewareStack.use(re(i.config)),i.middlewareStack.use(_(i.config)),i.middlewareStack.use(x(i.config)),i.middlewareStack.use(M(i.config)),i.middlewareStack.use(je(i.config)),i.middlewareStack.use(He(i.config)),i}return i(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(Ve),zi={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},Hi={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function qi(e,t,n){return{applyToStack:function(r){r.add(function(e,t){return function(n,r){return function(r){return a(void 0,void 0,void 0,(function(){var i,o,u;return s(this,(function(a){switch(a.label){case 0:return[4,n(r)];case 1:i=a.sent().response,a.label=2;case 2:return a.trys.push([2,4,,5]),[4,t(i,e)];case 3:return o=a.sent(),[2,{response:i,output:o}];case 4:throw u=a.sent(),Object.assign(u,{$response:i});case 5:return[2]}}))}))}}}(e,n),zi),r.add(function(e,t){return function(n,r){return function(r){return a(void 0,void 0,void 0,(function(){var i;return s(this,(function(u){switch(u.label){case 0:return[4,t(r.input,e)];case 1:return i=u.sent(),[2,n(o(o({},r),{request:i}))]}}))}))}}}(e,t),Hi)}}}(Yt||(Yt={})).filterSensitiveLog=function(e){return o({},e)},(Kt||(Kt={})).filterSensitiveLog=function(e){return o({},e)},(Zt||(Zt={})).filterSensitiveLog=function(e){return o({},e)},(Jt||(Jt={})).filterSensitiveLog=function(e){return o({},e)},(Qt||(Qt={})).filterSensitiveLog=function(e){return o({},e)},(Xt||(Xt={})).filterSensitiveLog=function(e){return o({},e)},(en||(en={})).filterSensitiveLog=function(e){return o({},e)},(tn||(tn={})).filterSensitiveLog=function(e){return o({},e)},(nn||(nn={})).filterSensitiveLog=function(e){return o({},e)},(rn||(rn={})).filterSensitiveLog=function(e){return o({},e)},(on||(on={})).filterSensitiveLog=function(e){return o({},e)},(un||(un={})).filterSensitiveLog=function(e){return o(o(o({},e),e.Position&&{Position:Ke}),e.PositionProperties&&{PositionProperties:Ke})},(an||(an={})).filterSensitiveLog=function(e){return o(o({},e),e.DevicePositionUpdates&&{DevicePositionUpdates:e.DevicePositionUpdates.map((function(e){return un.filterSensitiveLog(e)}))})},(sn||(sn={})).filterSensitiveLog=function(e){return o({},e)},(cn||(cn={})).filterSensitiveLog=function(e){return o({},e)},(ln||(ln={})).filterSensitiveLog=function(e){return o({},e)},(fn||(fn={})).filterSensitiveLog=function(e){return o(o(o({},e),e.Position&&{Position:Ke}),e.PositionProperties&&{PositionProperties:Ke})},(dn||(dn={})).filterSensitiveLog=function(e){return o({},e)},(hn||(hn={})).filterSensitiveLog=function(e){return o(o({},e),e.DevicePositions&&{DevicePositions:e.DevicePositions.map((function(e){return fn.filterSensitiveLog(e)}))})},(pn||(pn={})).filterSensitiveLog=function(e){return o(o({},e),e.Polygon&&{Polygon:e.Polygon.map((function(e){return Ke}))})},(vn||(vn={})).filterSensitiveLog=function(e){return o(o({},e),e.Geometry&&{Geometry:pn.filterSensitiveLog(e.Geometry)})},(gn||(gn={})).filterSensitiveLog=function(e){return o(o({},e),e.Entries&&{Entries:e.Entries.map((function(e){return vn.filterSensitiveLog(e)}))})},(yn||(yn={})).filterSensitiveLog=function(e){return o({},e)},(mn||(mn={})).filterSensitiveLog=function(e){return o({},e)},(Dn||(Dn={})).filterSensitiveLog=function(e){return o({},e)},(wn||(wn={})).filterSensitiveLog=function(e){return o(o({},e),e.Updates&&{Updates:e.Updates.map((function(e){return un.filterSensitiveLog(e)}))})},(bn||(bn={})).filterSensitiveLog=function(e){return o({},e)},(En||(En={})).filterSensitiveLog=function(e){return o({},e)},(An||(An={})).filterSensitiveLog=function(e){return o({},e)},(Sn||(Sn={})).filterSensitiveLog=function(e){return o({},e)},(Cn||(Cn={})).filterSensitiveLog=function(e){return o({},e)},(Fn||(Fn={})).filterSensitiveLog=function(e){return o({},e)},(_n||(_n={})).filterSensitiveLog=function(e){return o(o(o(o({},e),e.DeparturePosition&&{DeparturePosition:Ke}),e.DestinationPosition&&{DestinationPosition:Ke}),e.WaypointPositions&&{WaypointPositions:Ke})},(Pn||(Pn={})).filterSensitiveLog=function(e){return o(o({},e),e.LineString&&{LineString:Ke})},(Bn||(Bn={})).filterSensitiveLog=function(e){return o(o(o({},e),e.StartPosition&&{StartPosition:Ke}),e.EndPosition&&{EndPosition:Ke})},(xn||(xn={})).filterSensitiveLog=function(e){return o(o(o(o(o({},e),e.StartPosition&&{StartPosition:Ke}),e.EndPosition&&{EndPosition:Ke}),e.Geometry&&{Geometry:Pn.filterSensitiveLog(e.Geometry)}),e.Steps&&{Steps:e.Steps.map((function(e){return Bn.filterSensitiveLog(e)}))})},(Tn||(Tn={})).filterSensitiveLog=function(e){return o(o({},e),e.RouteBBox&&{RouteBBox:Ke})},(Mn||(Mn={})).filterSensitiveLog=function(e){return o(o(o({},e),e.Legs&&{Legs:e.Legs.map((function(e){return xn.filterSensitiveLog(e)}))}),e.Summary&&{Summary:Tn.filterSensitiveLog(e.Summary)})},(Ln||(Ln={})).filterSensitiveLog=function(e){return o(o(o({},e),e.DeparturePositions&&{DeparturePositions:Ke}),e.DestinationPositions&&{DestinationPositions:Ke})},(On||(On={})).filterSensitiveLog=function(e){return o({},e)},(Rn||(Rn={})).filterSensitiveLog=function(e){return o({},e)},(kn||(kn={})).filterSensitiveLog=function(e){return o({},e)},(Nn||(Nn={})).filterSensitiveLog=function(e){return o(o(o({},e),e.SnappedDeparturePositions&&{SnappedDeparturePositions:Ke}),e.SnappedDestinationPositions&&{SnappedDestinationPositions:Ke})},(In||(In={})).filterSensitiveLog=function(e){return o({},e)},(jn||(jn={})).filterSensitiveLog=function(e){return o({},e)},(Un||(Un={})).filterSensitiveLog=function(e){return o({},e)},(Gn||(Gn={})).filterSensitiveLog=function(e){return o({},e)},(zn||(zn={})).filterSensitiveLog=function(e){return o({},e)},(Hn||(Hn={})).filterSensitiveLog=function(e){return o({},e)},(qn||(qn={})).filterSensitiveLog=function(e){return o({},e)},($n||($n={})).filterSensitiveLog=function(e){return o({},e)},(Wn||(Wn={})).filterSensitiveLog=function(e){return o({},e)},(Vn||(Vn={})).filterSensitiveLog=function(e){return o({},e)},(Yn||(Yn={})).filterSensitiveLog=function(e){return o({},e)},(Kn||(Kn={})).filterSensitiveLog=function(e){return o({},e)},(Zn||(Zn={})).filterSensitiveLog=function(e){return o({},e)},(Jn||(Jn={})).filterSensitiveLog=function(e){return o({},e)},(Qn||(Qn={})).filterSensitiveLog=function(e){return o({},e)},(Xn||(Xn={})).filterSensitiveLog=function(e){return o({},e)},(er||(er={})).filterSensitiveLog=function(e){return o({},e)},(tr||(tr={})).filterSensitiveLog=function(e){return o({},e)},(nr||(nr={})).filterSensitiveLog=function(e){return o({},e)},(rr||(rr={})).filterSensitiveLog=function(e){return o({},e)},(ir||(ir={})).filterSensitiveLog=function(e){return o({},e)},(or||(or={})).filterSensitiveLog=function(e){return o({},e)},(ur||(ur={})).filterSensitiveLog=function(e){return o({},e)},(ar||(ar={})).filterSensitiveLog=function(e){return o({},e)},(sr||(sr={})).filterSensitiveLog=function(e){return o({},e)},(cr||(cr={})).filterSensitiveLog=function(e){return o({},e)},(lr||(lr={})).filterSensitiveLog=function(e){return o({},e)},(fr||(fr={})).filterSensitiveLog=function(e){return o({},e)},(dr||(dr={})).filterSensitiveLog=function(e){return o({},e)},(hr||(hr={})).filterSensitiveLog=function(e){return o({},e)},(pr||(pr={})).filterSensitiveLog=function(e){return o({},e)},(vr||(vr={})).filterSensitiveLog=function(e){return o({},e)},(gr||(gr={})).filterSensitiveLog=function(e){return o({},e)},(yr||(yr={})).filterSensitiveLog=function(e){return o({},e)},(mr||(mr={})).filterSensitiveLog=function(e){return o({},e)},(Dr||(Dr={})).filterSensitiveLog=function(e){return o({},e)},(wr||(wr={})).filterSensitiveLog=function(e){return o({},e)},(br||(br={})).filterSensitiveLog=function(e){return o({},e)},(Er||(Er={})).filterSensitiveLog=function(e){return o({},e)},(Ar||(Ar={})).filterSensitiveLog=function(e){return o({},e)},(Sr||(Sr={})).filterSensitiveLog=function(e){return o({},e)},(Cr||(Cr={})).filterSensitiveLog=function(e){return o(o({},e),e.Geometry&&{Geometry:pn.filterSensitiveLog(e.Geometry)})},(Fr||(Fr={})).filterSensitiveLog=function(e){return o({},e)},(_r||(_r={})).filterSensitiveLog=function(e){return o({},e)},(Pr||(Pr={})).filterSensitiveLog=function(e){return o({},e)},(Br||(Br={})).filterSensitiveLog=function(e){return o({},e)},(xr||(xr={})).filterSensitiveLog=function(e){return o(o({},e),e.Geometry&&{Geometry:pn.filterSensitiveLog(e.Geometry)})},(Tr||(Tr={})).filterSensitiveLog=function(e){return o(o({},e),e.Entries&&{Entries:e.Entries.map((function(e){return xr.filterSensitiveLog(e)}))})},(Mr||(Mr={})).filterSensitiveLog=function(e){return o(o({},e),e.Geometry&&{Geometry:pn.filterSensitiveLog(e.Geometry)})},(Lr||(Lr={})).filterSensitiveLog=function(e){return o({},e)},(Or||(Or={})).filterSensitiveLog=function(e){return o({},e)},(Rr||(Rr={})).filterSensitiveLog=function(e){return o({},e)},(kr||(kr={})).filterSensitiveLog=function(e){return o({},e)},(Nr||(Nr={})).filterSensitiveLog=function(e){return o(o(o({},e),e.Position&&{Position:Ke}),e.PositionProperties&&{PositionProperties:Ke})},(Ir||(Ir={})).filterSensitiveLog=function(e){return o({},e)},(jr||(jr={})).filterSensitiveLog=function(e){return o(o({},e),e.DevicePositions&&{DevicePositions:e.DevicePositions.map((function(e){return fn.filterSensitiveLog(e)}))})},(Ur||(Ur={})).filterSensitiveLog=function(e){return o({},e)},(Gr||(Gr={})).filterSensitiveLog=function(e){return o({},e)},(zr||(zr={})).filterSensitiveLog=function(e){return o({},e)},(Hr||(Hr={})).filterSensitiveLog=function(e){return o({},e)},(qr||(qr={})).filterSensitiveLog=function(e){return o({},e)},($r||($r={})).filterSensitiveLog=function(e){return o({},e)},(Wr||(Wr={})).filterSensitiveLog=function(e){return o({},e)},(Vr||(Vr={})).filterSensitiveLog=function(e){return o({},e)},(Yr||(Yr={})).filterSensitiveLog=function(e){return o({},e)},(Kr||(Kr={})).filterSensitiveLog=function(e){return o(o(o({},e),e.Position&&{Position:Ke}),e.PositionProperties&&{PositionProperties:Ke})},(Zr||(Zr={})).filterSensitiveLog=function(e){return o(o({},e),e.Entries&&{Entries:e.Entries.map((function(e){return Kr.filterSensitiveLog(e)}))})},(Jr||(Jr={})).filterSensitiveLog=function(e){return o({},e)},(Qr||(Qr={})).filterSensitiveLog=function(e){return o({},e)},(Xr||(Xr={})).filterSensitiveLog=function(e){return o({},e)},(ei||(ei={})).filterSensitiveLog=function(e){return o({},e)},(ti||(ti={})).filterSensitiveLog=function(e){return o({},e)},(ni||(ni={})).filterSensitiveLog=function(e){return o({},e)},(ri||(ri={})).filterSensitiveLog=function(e){return o({},e)},(ii||(ii={})).filterSensitiveLog=function(e){return o({},e)},(oi||(oi={})).filterSensitiveLog=function(e){return o({},e)},(ui||(ui={})).filterSensitiveLog=function(e){return o({},e)},(ai||(ai={})).filterSensitiveLog=function(e){return o({},e)},(si||(si={})).filterSensitiveLog=function(e){return o({},e)},(ci||(ci={})).filterSensitiveLog=function(e){return o({},e)},(li||(li={})).filterSensitiveLog=function(e){return o({},e)},(fi||(fi={})).filterSensitiveLog=function(e){return o({},e)},(di||(di={})).filterSensitiveLog=function(e){return o({},e)},(hi||(hi={})).filterSensitiveLog=function(e){return o(o({},e),e.Position&&{Position:Ke})},(pi||(pi={})).filterSensitiveLog=function(e){return o(o({},e),e.Point&&{Point:Ke})},(vi||(vi={})).filterSensitiveLog=function(e){return o({},e)},(gi||(gi={})).filterSensitiveLog=function(e){return o(o({},e),e.Geometry&&{Geometry:pi.filterSensitiveLog(e.Geometry)})},(yi||(yi={})).filterSensitiveLog=function(e){return o(o({},e),e.Place&&{Place:gi.filterSensitiveLog(e.Place)})},(mi||(mi={})).filterSensitiveLog=function(e){return o(o({},e),e.Position&&{Position:Ke})},(Di||(Di={})).filterSensitiveLog=function(e){return o(o(o({},e),e.Summary&&{Summary:mi.filterSensitiveLog(e.Summary)}),e.Results&&{Results:e.Results.map((function(e){return yi.filterSensitiveLog(e)}))})},(wi||(wi={})).filterSensitiveLog=function(e){return o(o(o(o({},e),e.Text&&{Text:Ke}),e.BiasPosition&&{BiasPosition:Ke}),e.FilterBBox&&{FilterBBox:Ke})},(bi||(bi={})).filterSensitiveLog=function(e){return o({},e)},(Ei||(Ei={})).filterSensitiveLog=function(e){return o(o(o(o({},e),e.Text&&{Text:Ke}),e.BiasPosition&&{BiasPosition:Ke}),e.FilterBBox&&{FilterBBox:Ke})},(Ai||(Ai={})).filterSensitiveLog=function(e){return o(o({},e),e.Summary&&{Summary:Ei.filterSensitiveLog(e.Summary)})},(Si||(Si={})).filterSensitiveLog=function(e){return o(o(o(o({},e),e.Text&&{Text:Ke}),e.BiasPosition&&{BiasPosition:Ke}),e.FilterBBox&&{FilterBBox:Ke})},(Ci||(Ci={})).filterSensitiveLog=function(e){return o(o({},e),e.Place&&{Place:gi.filterSensitiveLog(e.Place)})},(Fi||(Fi={})).filterSensitiveLog=function(e){return o(o(o(o(o({},e),e.Text&&{Text:Ke}),e.BiasPosition&&{BiasPosition:Ke}),e.FilterBBox&&{FilterBBox:Ke}),e.ResultBBox&&{ResultBBox:Ke})},(_i||(_i={})).filterSensitiveLog=function(e){return o(o(o({},e),e.Summary&&{Summary:Fi.filterSensitiveLog(e.Summary)}),e.Results&&{Results:e.Results.map((function(e){return Ci.filterSensitiveLog(e)}))})},(Pi||(Pi={})).filterSensitiveLog=function(e){return o({},e)},(Bi||(Bi={})).filterSensitiveLog=function(e){return o({},e)},(xi||(xi={})).filterSensitiveLog=function(e){return o({},e)},(Ti||(Ti={})).filterSensitiveLog=function(e){return o({},e)},(Mi||(Mi={})).filterSensitiveLog=function(e){return o({},e)},(Li||(Li={})).filterSensitiveLog=function(e){return o({},e)};var $i=function(e,t){return a(void 0,void 0,void 0,(function(){var n,r,i,u,a,c,l,f,d,h,p,v;return s(this,(function(s){switch(s.label){case 0:return r=[o({},e)],v={},[4,xo(e.body,t)];case 1:switch(n=o.apply(void 0,r.concat([(v.body=s.sent(),v)])),u="UnknownError",u=To(e,n.body),u){case"AccessDeniedException":case"com.amazonaws.location#AccessDeniedException":return[3,2];case"InternalServerException":case"com.amazonaws.location#InternalServerException":return[3,4];case"ResourceNotFoundException":case"com.amazonaws.location#ResourceNotFoundException":return[3,6];case"ThrottlingException":case"com.amazonaws.location#ThrottlingException":return[3,8];case"ValidationException":case"com.amazonaws.location#ValidationException":return[3,10]}return[3,12];case 2:return a=[{}],[4,Ji(n,t)];case 3:return i=o.apply(void 0,[o.apply(void 0,a.concat([s.sent()])),{name:u,$metadata:Po(e)}]),[3,13];case 4:return c=[{}],[4,Qi(n,t)];case 5:return i=o.apply(void 0,[o.apply(void 0,c.concat([s.sent()])),{name:u,$metadata:Po(e)}]),[3,13];case 6:return l=[{}],[4,Xi(n,t)];case 7:return i=o.apply(void 0,[o.apply(void 0,l.concat([s.sent()])),{name:u,$metadata:Po(e)}]),[3,13];case 8:return f=[{}],[4,eo(n,t)];case 9:return i=o.apply(void 0,[o.apply(void 0,f.concat([s.sent()])),{name:u,$metadata:Po(e)}]),[3,13];case 10:return d=[{}],[4,to(n,t)];case 11:return i=o.apply(void 0,[o.apply(void 0,d.concat([s.sent()])),{name:u,$metadata:Po(e)}]),[3,13];case 12:h=n.body,u=h.code||h.Code||u,i=o(o({},h),{name:""+u,message:h.message||h.Message||u,$fault:"client",$metadata:Po(e)}),s.label=13;case 13:return p=i.message||i.Message||u,i.message=p,delete i.Message,[2,Promise.reject(Object.assign(new Error(p),i))]}}))}))},Wi=function(e,t){return a(void 0,void 0,void 0,(function(){var n,r,i,u,a,c,l,f,d,h,p,v;return s(this,(function(s){switch(s.label){case 0:return r=[o({},e)],v={},[4,xo(e.body,t)];case 1:switch(n=o.apply(void 0,r.concat([(v.body=s.sent(),v)])),u="UnknownError",u=To(e,n.body),u){case"AccessDeniedException":case"com.amazonaws.location#AccessDeniedException":return[3,2];case"InternalServerException":case"com.amazonaws.location#InternalServerException":return[3,4];case"ResourceNotFoundException":case"com.amazonaws.location#ResourceNotFoundException":return[3,6];case"ThrottlingException":case"com.amazonaws.location#ThrottlingException":return[3,8];case"ValidationException":case"com.amazonaws.location#ValidationException":return[3,10]}return[3,12];case 2:return a=[{}],[4,Ji(n,t)];case 3:return i=o.apply(void 0,[o.apply(void 0,a.concat([s.sent()])),{name:u,$metadata:Po(e)}]),[3,13];case 4:return c=[{}],[4,Qi(n,t)];case 5:return i=o.apply(void 0,[o.apply(void 0,c.concat([s.sent()])),{name:u,$metadata:Po(e)}]),[3,13];case 6:return l=[{}],[4,Xi(n,t)];case 7:return i=o.apply(void 0,[o.apply(void 0,l.concat([s.sent()])),{name:u,$metadata:Po(e)}]),[3,13];case 8:return f=[{}],[4,eo(n,t)];case 9:return i=o.apply(void 0,[o.apply(void 0,f.concat([s.sent()])),{name:u,$metadata:Po(e)}]),[3,13];case 10:return d=[{}],[4,to(n,t)];case 11:return i=o.apply(void 0,[o.apply(void 0,d.concat([s.sent()])),{name:u,$metadata:Po(e)}]),[3,13];case 12:h=n.body,u=h.code||h.Code||u,i=o(o({},h),{name:""+u,message:h.message||h.Message||u,$fault:"client",$metadata:Po(e)}),s.label=13;case 13:return p=i.message||i.Message||u,i.message=p,delete i.Message,[2,Promise.reject(Object.assign(new Error(p),i))]}}))}))},Vi=function(e,t){return a(void 0,void 0,void 0,(function(){var n,r,i,u,a,c,l,f,d,h,p,v;return s(this,(function(s){switch(s.label){case 0:return r=[o({},e)],v={},[4,xo(e.body,t)];case 1:switch(n=o.apply(void 0,r.concat([(v.body=s.sent(),v)])),u="UnknownError",u=To(e,n.body),u){case"AccessDeniedException":case"com.amazonaws.location#AccessDeniedException":return[3,2];case"InternalServerException":case"com.amazonaws.location#InternalServerException":return[3,4];case"ResourceNotFoundException":case"com.amazonaws.location#ResourceNotFoundException":return[3,6];case"ThrottlingException":case"com.amazonaws.location#ThrottlingException":return[3,8];case"ValidationException":case"com.amazonaws.location#ValidationException":return[3,10]}return[3,12];case 2:return a=[{}],[4,Ji(n,t)];case 3:return i=o.apply(void 0,[o.apply(void 0,a.concat([s.sent()])),{name:u,$metadata:Po(e)}]),[3,13];case 4:return c=[{}],[4,Qi(n,t)];case 5:return i=o.apply(void 0,[o.apply(void 0,c.concat([s.sent()])),{name:u,$metadata:Po(e)}]),[3,13];case 6:return l=[{}],[4,Xi(n,t)];case 7:return i=o.apply(void 0,[o.apply(void 0,l.concat([s.sent()])),{name:u,$metadata:Po(e)}]),[3,13];case 8:return f=[{}],[4,eo(n,t)];case 9:return i=o.apply(void 0,[o.apply(void 0,f.concat([s.sent()])),{name:u,$metadata:Po(e)}]),[3,13];case 10:return d=[{}],[4,to(n,t)];case 11:return i=o.apply(void 0,[o.apply(void 0,d.concat([s.sent()])),{name:u,$metadata:Po(e)}]),[3,13];case 12:h=n.body,u=h.code||h.Code||u,i=o(o({},h),{name:""+u,message:h.message||h.Message||u,$fault:"client",$metadata:Po(e)}),s.label=13;case 13:return p=i.message||i.Message||u,i.message=p,delete i.Message,[2,Promise.reject(Object.assign(new Error(p),i))]}}))}))},Yi=function(e,t){return a(void 0,void 0,void 0,(function(){var n,r,i,u,a,c,l,f,d,h,p,v;return s(this,(function(s){switch(s.label){case 0:return r=[o({},e)],v={},[4,xo(e.body,t)];case 1:switch(n=o.apply(void 0,r.concat([(v.body=s.sent(),v)])),u="UnknownError",u=To(e,n.body),u){case"AccessDeniedException":case"com.amazonaws.location#AccessDeniedException":return[3,2];case"InternalServerException":case"com.amazonaws.location#InternalServerException":return[3,4];case"ResourceNotFoundException":case"com.amazonaws.location#ResourceNotFoundException":return[3,6];case"ThrottlingException":case"com.amazonaws.location#ThrottlingException":return[3,8];case"ValidationException":case"com.amazonaws.location#ValidationException":return[3,10]}return[3,12];case 2:return a=[{}],[4,Ji(n,t)];case 3:return i=o.apply(void 0,[o.apply(void 0,a.concat([s.sent()])),{name:u,$metadata:Po(e)}]),[3,13];case 4:return c=[{}],[4,Qi(n,t)];case 5:return i=o.apply(void 0,[o.apply(void 0,c.concat([s.sent()])),{name:u,$metadata:Po(e)}]),[3,13];case 6:return l=[{}],[4,Xi(n,t)];case 7:return i=o.apply(void 0,[o.apply(void 0,l.concat([s.sent()])),{name:u,$metadata:Po(e)}]),[3,13];case 8:return f=[{}],[4,eo(n,t)];case 9:return i=o.apply(void 0,[o.apply(void 0,f.concat([s.sent()])),{name:u,$metadata:Po(e)}]),[3,13];case 10:return d=[{}],[4,to(n,t)];case 11:return i=o.apply(void 0,[o.apply(void 0,d.concat([s.sent()])),{name:u,$metadata:Po(e)}]),[3,13];case 12:h=n.body,u=h.code||h.Code||u,i=o(o({},h),{name:""+u,message:h.message||h.Message||u,$fault:"client",$metadata:Po(e)}),s.label=13;case 13:return p=i.message||i.Message||u,i.message=p,delete i.Message,[2,Promise.reject(Object.assign(new Error(p),i))]}}))}))},Ki=function(e,t){return a(void 0,void 0,void 0,(function(){var n,r,i,u,a,c,l,f,d,h,p,v;return s(this,(function(s){switch(s.label){case 0:return r=[o({},e)],v={},[4,xo(e.body,t)];case 1:switch(n=o.apply(void 0,r.concat([(v.body=s.sent(),v)])),u="UnknownError",u=To(e,n.body),u){case"AccessDeniedException":case"com.amazonaws.location#AccessDeniedException":return[3,2];case"InternalServerException":case"com.amazonaws.location#InternalServerException":return[3,4];case"ResourceNotFoundException":case"com.amazonaws.location#ResourceNotFoundException":return[3,6];case"ThrottlingException":case"com.amazonaws.location#ThrottlingException":return[3,8];case"ValidationException":case"com.amazonaws.location#ValidationException":return[3,10]}return[3,12];case 2:return a=[{}],[4,Ji(n,t)];case 3:return i=o.apply(void 0,[o.apply(void 0,a.concat([s.sent()])),{name:u,$metadata:Po(e)}]),[3,13];case 4:return c=[{}],[4,Qi(n,t)];case 5:return i=o.apply(void 0,[o.apply(void 0,c.concat([s.sent()])),{name:u,$metadata:Po(e)}]),[3,13];case 6:return l=[{}],[4,Xi(n,t)];case 7:return i=o.apply(void 0,[o.apply(void 0,l.concat([s.sent()])),{name:u,$metadata:Po(e)}]),[3,13];case 8:return f=[{}],[4,eo(n,t)];case 9:return i=o.apply(void 0,[o.apply(void 0,f.concat([s.sent()])),{name:u,$metadata:Po(e)}]),[3,13];case 10:return d=[{}],[4,to(n,t)];case 11:return i=o.apply(void 0,[o.apply(void 0,d.concat([s.sent()])),{name:u,$metadata:Po(e)}]),[3,13];case 12:h=n.body,u=h.code||h.Code||u,i=o(o({},h),{name:""+u,message:h.message||h.Message||u,$fault:"client",$metadata:Po(e)}),s.label=13;case 13:return p=i.message||i.Message||u,i.message=p,delete i.Message,[2,Promise.reject(Object.assign(new Error(p),i))]}}))}))},Zi=function(e,t){return a(void 0,void 0,void 0,(function(){var n,r,i,u,a,c,l,f,d,h,p,v;return s(this,(function(s){switch(s.label){case 0:return r=[o({},e)],v={},[4,xo(e.body,t)];case 1:switch(n=o.apply(void 0,r.concat([(v.body=s.sent(),v)])),u="UnknownError",u=To(e,n.body),u){case"AccessDeniedException":case"com.amazonaws.location#AccessDeniedException":return[3,2];case"InternalServerException":case"com.amazonaws.location#InternalServerException":return[3,4];case"ResourceNotFoundException":case"com.amazonaws.location#ResourceNotFoundException":return[3,6];case"ThrottlingException":case"com.amazonaws.location#ThrottlingException":return[3,8];case"ValidationException":case"com.amazonaws.location#ValidationException":return[3,10]}return[3,12];case 2:return a=[{}],[4,Ji(n,t)];case 3:return i=o.apply(void 0,[o.apply(void 0,a.concat([s.sent()])),{name:u,$metadata:Po(e)}]),[3,13];case 4:return c=[{}],[4,Qi(n,t)];case 5:return i=o.apply(void 0,[o.apply(void 0,c.concat([s.sent()])),{name:u,$metadata:Po(e)}]),[3,13];case 6:return l=[{}],[4,Xi(n,t)];case 7:return i=o.apply(void 0,[o.apply(void 0,l.concat([s.sent()])),{name:u,$metadata:Po(e)}]),[3,13];case 8:return f=[{}],[4,eo(n,t)];case 9:return i=o.apply(void 0,[o.apply(void 0,f.concat([s.sent()])),{name:u,$metadata:Po(e)}]),[3,13];case 10:return d=[{}],[4,to(n,t)];case 11:return i=o.apply(void 0,[o.apply(void 0,d.concat([s.sent()])),{name:u,$metadata:Po(e)}]),[3,13];case 12:h=n.body,u=h.code||h.Code||u,i=o(o({},h),{name:""+u,message:h.message||h.Message||u,$fault:"client",$metadata:Po(e)}),s.label=13;case 13:return p=i.message||i.Message||u,i.message=p,delete i.Message,[2,Promise.reject(Object.assign(new Error(p),i))]}}))}))},Ji=function(e,t){return a(void 0,void 0,void 0,(function(){var t,n;return s(this,(function(r){return t={name:"AccessDeniedException",$fault:"client",$metadata:Po(e),Message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.Message=st(n.message)),[2,t]}))}))},Qi=function(e,t){return a(void 0,void 0,void 0,(function(){var t,n;return s(this,(function(r){return t={name:"InternalServerException",$fault:"server",$retryable:{},$metadata:Po(e),Message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.Message=st(n.message)),[2,t]}))}))},Xi=function(e,t){return a(void 0,void 0,void 0,(function(){var t,n;return s(this,(function(r){return t={name:"ResourceNotFoundException",$fault:"client",$metadata:Po(e),Message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.Message=st(n.message)),[2,t]}))}))},eo=function(e,t){return a(void 0,void 0,void 0,(function(){var t,n;return s(this,(function(r){return t={name:"ThrottlingException",$fault:"client",$retryable:{},$metadata:Po(e),Message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.Message=st(n.message)),[2,t]}))}))},to=function(e,t){return a(void 0,void 0,void 0,(function(){var n,r;return s(this,(function(i){return n={name:"ValidationException",$fault:"client",$metadata:Po(e),FieldList:void 0,Message:void 0,Reason:void 0},void 0!==(r=e.body).fieldList&&null!==r.fieldList&&(n.FieldList=_o(r.fieldList,t)),void 0!==r.message&&null!==r.message&&(n.Message=st(r.message)),void 0!==r.reason&&null!==r.reason&&(n.Reason=st(r.reason)),[2,n]}))}))},no=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return o(o({},void 0!==e.GeofenceId&&null!==e.GeofenceId&&{GeofenceId:e.GeofenceId}),void 0!==e.Geometry&&null!==e.Geometry&&{Geometry:oo(e.Geometry,t)})}(e,t)}))},ro=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return null===e?null:_t(e)}))},io=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return null===e?null:e}))},oo=function(e,t){return o({},void 0!==e.Polygon&&null!==e.Polygon&&{Polygon:ao(e.Polygon,t)})},uo=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return null===e?null:e}))},ao=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return null===e?null:so(e,t)}))}(e,t)}))},so=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return null===e?null:_t(e)}))},co=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{Error:void 0!==e.Error&&null!==e.Error?lo(e.Error,t):void 0,GeofenceId:st(e.GeofenceId)}}(e,t)}))},lo=function(e,t){return{Code:st(e.Code),Message:st(e.Message)}},fo=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{Error:void 0!==e.Error&&null!==e.Error?lo(e.Error,t):void 0,GeofenceId:st(e.GeofenceId)}}(e,t)}))},ho=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{CreateTime:void 0!==e.CreateTime&&null!==e.CreateTime?ut(gt(e.CreateTime)):void 0,GeofenceId:st(e.GeofenceId),UpdateTime:void 0!==e.UpdateTime&&null!==e.UpdateTime?ut(gt(e.UpdateTime)):void 0}}(e)}))},po=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:ft(e)}))},vo=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:st(e)}))},go=function(e,t){return{Polygon:void 0!==e.Polygon&&null!==e.Polygon?yo(e.Polygon,t):void 0}},yo=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:bo(e,t)}))}(e,t)}))},mo=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{CreateTime:void 0!==e.CreateTime&&null!==e.CreateTime?ut(gt(e.CreateTime)):void 0,GeofenceId:st(e.GeofenceId),Geometry:void 0!==e.Geometry&&null!==e.Geometry?go(e.Geometry,t):void 0,Status:st(e.Status),UpdateTime:void 0!==e.UpdateTime&&null!==e.UpdateTime?ut(gt(e.UpdateTime)):void 0}}(e,t)}))},Do=function(e,t){return{AddressNumber:st(e.AddressNumber),Country:st(e.Country),Geometry:void 0!==e.Geometry&&null!==e.Geometry?wo(e.Geometry,t):void 0,Interpolated:Ze(e.Interpolated),Label:st(e.Label),Municipality:st(e.Municipality),Neighborhood:st(e.Neighborhood),PostalCode:st(e.PostalCode),Region:st(e.Region),Street:st(e.Street),SubRegion:st(e.SubRegion),TimeZone:void 0!==e.TimeZone&&null!==e.TimeZone?Fo(e.TimeZone,t):void 0}},wo=function(e,t){return{Point:void 0!==e.Point&&null!==e.Point?bo(e.Point,t):void 0}},bo=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:ft(e)}))},Eo=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{Distance:ft(e.Distance),Place:void 0!==e.Place&&null!==e.Place?Do(e.Place,t):void 0}}(e,t)}))},Ao=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{Distance:ft(e.Distance),Place:void 0!==e.Place&&null!==e.Place?Do(e.Place,t):void 0,Relevance:ft(e.Relevance)}}(e,t)}))},So=function(e,t){return{DataSource:st(e.DataSource),Language:st(e.Language),MaxResults:tt(e.MaxResults),Position:void 0!==e.Position&&null!==e.Position?bo(e.Position,t):void 0}},Co=function(e,t){return{BiasPosition:void 0!==e.BiasPosition&&null!==e.BiasPosition?bo(e.BiasPosition,t):void 0,DataSource:st(e.DataSource),FilterBBox:void 0!==e.FilterBBox&&null!==e.FilterBBox?po(e.FilterBBox):void 0,FilterCountries:void 0!==e.FilterCountries&&null!==e.FilterCountries?vo(e.FilterCountries):void 0,Language:st(e.Language),MaxResults:tt(e.MaxResults),ResultBBox:void 0!==e.ResultBBox&&null!==e.ResultBBox?po(e.ResultBBox):void 0,Text:st(e.Text)}},Fo=function(e,t){return{Name:st(e.Name),Offset:tt(e.Offset)}},_o=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{Message:st(e.message),Name:st(e.name)}}(e)}))},Po=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"]}},Bo=function(e,t){return void 0===e&&(e=new Uint8Array),e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array)},xo=function(e,t){return function(e,t){return Bo(e,t).then((function(e){return t.utf8Encoder(e)}))}(e,t).then((function(e){return e.length?JSON.parse(e):{}}))},To=function(e,t){var n,r,i=function(e){var t=e;return t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},o=(n=e.headers,r="x-amzn-errortype",Object.keys(n).find((function(e){return e.toLowerCase()===r.toLowerCase()})));return void 0!==o?i(e.headers[o]):void 0!==t.code?i(t.code):void 0!==t.__type?i(t.__type):""},Mo=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return i(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(qi(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"LocationClient",commandName:"SearchPlaceIndexForTextCommand",inputFilterSensitiveLog:Si.filterSensitiveLog,outputFilterSensitiveLog:_i.filterSensitiveLog},o=t.requestHandler;return r.resolve((function(e){return o.handle(e.request,n||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return a(void 0,void 0,void 0,(function(){var n,r,i,u,a,c,l,f,d,h;return s(this,(function(s){switch(s.label){case 0:return[4,t.endpoint()];case 1:if(n=s.sent(),n.hostname,r=n.protocol,i=void 0===r?"https":r,u=n.port,a=n.path,c={"content-type":"application/json"},l=((null==a?void 0:a.endsWith("/"))?a.slice(0,-1):a||"")+"/places/v0/indexes/{IndexName}/search/text",void 0===e.IndexName)throw new Error("No value provided for input HTTP label: IndexName.");if((f=e.IndexName).length<=0)throw new Error("Empty value provided for input HTTP label: IndexName.");return l=l.replace("{IndexName}",Ct(f)),d=JSON.stringify(o(o(o(o(o(o({},void 0!==e.BiasPosition&&null!==e.BiasPosition&&{BiasPosition:so(e.BiasPosition,t)}),void 0!==e.FilterBBox&&null!==e.FilterBBox&&{FilterBBox:ro(e.FilterBBox,t)}),void 0!==e.FilterCountries&&null!==e.FilterCountries&&{FilterCountries:io(e.FilterCountries,t)}),void 0!==e.Language&&null!==e.Language&&{Language:e.Language}),void 0!==e.MaxResults&&null!==e.MaxResults&&{MaxResults:e.MaxResults}),void 0!==e.Text&&null!==e.Text&&{Text:e.Text})),[4,t.endpoint()];case 2:if(h=s.sent().hostname,!0!==t.disableHostPrefix&&!C(h="places."+h))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return[2,new A({protocol:i,hostname:h,port:u,method:"POST",headers:c,path:l,body:d})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return a(void 0,void 0,void 0,(function(){var n,r,i,o;return s(this,(function(u){switch(u.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,Zi(e,t)]:(n={$metadata:Po(e),Results:void 0,Summary:void 0},i=ut,o=at,[4,xo(e.body,t)]);case 1:return void 0!==(r=i.apply(void 0,[o.apply(void 0,[u.sent()]),"body"])).Results&&null!==r.Results&&(n.Results=Ao(r.Results,t)),void 0!==r.Summary&&null!==r.Summary&&(n.Summary=Co(r.Summary,t)),[2,Promise.resolve(n)]}}))}))}(e,t)},t}(Ye),Lo=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return i(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(qi(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"LocationClient",commandName:"SearchPlaceIndexForPositionCommand",inputFilterSensitiveLog:hi.filterSensitiveLog,outputFilterSensitiveLog:Di.filterSensitiveLog},o=t.requestHandler;return r.resolve((function(e){return o.handle(e.request,n||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return a(void 0,void 0,void 0,(function(){var n,r,i,u,a,c,l,f,d,h;return s(this,(function(s){switch(s.label){case 0:return[4,t.endpoint()];case 1:if(n=s.sent(),n.hostname,r=n.protocol,i=void 0===r?"https":r,u=n.port,a=n.path,c={"content-type":"application/json"},l=((null==a?void 0:a.endsWith("/"))?a.slice(0,-1):a||"")+"/places/v0/indexes/{IndexName}/search/position",void 0===e.IndexName)throw new Error("No value provided for input HTTP label: IndexName.");if((f=e.IndexName).length<=0)throw new Error("Empty value provided for input HTTP label: IndexName.");return l=l.replace("{IndexName}",Ct(f)),d=JSON.stringify(o(o(o({},void 0!==e.Language&&null!==e.Language&&{Language:e.Language}),void 0!==e.MaxResults&&null!==e.MaxResults&&{MaxResults:e.MaxResults}),void 0!==e.Position&&null!==e.Position&&{Position:so(e.Position,t)})),[4,t.endpoint()];case 2:if(h=s.sent().hostname,!0!==t.disableHostPrefix&&!C(h="places."+h))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return[2,new A({protocol:i,hostname:h,port:u,method:"POST",headers:c,path:l,body:d})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return a(void 0,void 0,void 0,(function(){var n,r,i,o;return s(this,(function(u){switch(u.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,Ki(e,t)]:(n={$metadata:Po(e),Results:void 0,Summary:void 0},i=ut,o=at,[4,xo(e.body,t)]);case 1:return void 0!==(r=i.apply(void 0,[o.apply(void 0,[u.sent()]),"body"])).Results&&null!==r.Results&&(n.Results=Eo(r.Results,t)),void 0!==r.Summary&&null!==r.Summary&&(n.Summary=So(r.Summary,t)),[2,Promise.resolve(n)]}}))}))}(e,t)},t}(Ye),Oo=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return i(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(qi(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"LocationClient",commandName:"GetGeofenceCommand",inputFilterSensitiveLog:Sr.filterSensitiveLog,outputFilterSensitiveLog:Cr.filterSensitiveLog},o=t.requestHandler;return r.resolve((function(e){return o.handle(e.request,n||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return a(void 0,void 0,void 0,(function(){var n,r,i,o,u,a,c,l,f;return s(this,(function(s){switch(s.label){case 0:return[4,t.endpoint()];case 1:if(n=s.sent(),n.hostname,r=n.protocol,i=void 0===r?"https":r,o=n.port,u=n.path,a={},c=((null==u?void 0:u.endsWith("/"))?u.slice(0,-1):u||"")+"/geofencing/v0/collections/{CollectionName}/geofences/{GeofenceId}",void 0===e.CollectionName)throw new Error("No value provided for input HTTP label: CollectionName.");if((l=e.CollectionName).length<=0)throw new Error("Empty value provided for input HTTP label: CollectionName.");if(c=c.replace("{CollectionName}",Ct(l)),void 0===e.GeofenceId)throw new Error("No value provided for input HTTP label: GeofenceId.");if((l=e.GeofenceId).length<=0)throw new Error("Empty value provided for input HTTP label: GeofenceId.");return c=c.replace("{GeofenceId}",Ct(l)),[4,t.endpoint()];case 2:if(f=s.sent().hostname,!0!==t.disableHostPrefix&&!C(f="geofencing."+f))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return[2,new A({protocol:i,hostname:f,port:o,method:"GET",headers:a,path:c,body:void 0})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return a(void 0,void 0,void 0,(function(){var n,r,i,o;return s(this,(function(u){switch(u.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,Vi(e,t)]:(n={$metadata:Po(e),CreateTime:void 0,GeofenceId:void 0,Geometry:void 0,Status:void 0,UpdateTime:void 0},i=ut,o=at,[4,xo(e.body,t)]);case 1:return void 0!==(r=i.apply(void 0,[o.apply(void 0,[u.sent()]),"body"])).CreateTime&&null!==r.CreateTime&&(n.CreateTime=ut(gt(r.CreateTime))),void 0!==r.GeofenceId&&null!==r.GeofenceId&&(n.GeofenceId=st(r.GeofenceId)),void 0!==r.Geometry&&null!==r.Geometry&&(n.Geometry=go(r.Geometry,t)),void 0!==r.Status&&null!==r.Status&&(n.Status=st(r.Status)),void 0!==r.UpdateTime&&null!==r.UpdateTime&&(n.UpdateTime=ut(gt(r.UpdateTime))),[2,Promise.resolve(n)]}}))}))}(e,t)},t}(Ye),Ro=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return i(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(qi(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"LocationClient",commandName:"ListGeofencesCommand",inputFilterSensitiveLog:Br.filterSensitiveLog,outputFilterSensitiveLog:Tr.filterSensitiveLog},o=t.requestHandler;return r.resolve((function(e){return o.handle(e.request,n||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return a(void 0,void 0,void 0,(function(){var n,r,i,u,a,c,l,f,d,h;return s(this,(function(s){switch(s.label){case 0:return[4,t.endpoint()];case 1:if(n=s.sent(),n.hostname,r=n.protocol,i=void 0===r?"https":r,u=n.port,a=n.path,c={"content-type":"application/json"},l=((null==a?void 0:a.endsWith("/"))?a.slice(0,-1):a||"")+"/geofencing/v0/collections/{CollectionName}/list-geofences",void 0===e.CollectionName)throw new Error("No value provided for input HTTP label: CollectionName.");if((f=e.CollectionName).length<=0)throw new Error("Empty value provided for input HTTP label: CollectionName.");return l=l.replace("{CollectionName}",Ct(f)),d=JSON.stringify(o({},void 0!==e.NextToken&&null!==e.NextToken&&{NextToken:e.NextToken})),[4,t.endpoint()];case 2:if(h=s.sent().hostname,!0!==t.disableHostPrefix&&!C(h="geofencing."+h))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return[2,new A({protocol:i,hostname:h,port:u,method:"POST",headers:c,path:l,body:d})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return a(void 0,void 0,void 0,(function(){var n,r,i,o;return s(this,(function(u){switch(u.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,Yi(e,t)]:(n={$metadata:Po(e),Entries:void 0,NextToken:void 0},i=ut,o=at,[4,xo(e.body,t)]);case 1:return void 0!==(r=i.apply(void 0,[o.apply(void 0,[u.sent()]),"body"])).Entries&&null!==r.Entries&&(n.Entries=mo(r.Entries,t)),void 0!==r.NextToken&&null!==r.NextToken&&(n.NextToken=st(r.NextToken)),[2,Promise.resolve(n)]}}))}))}(e,t)},t}(Ye),ko=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return i(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(qi(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"LocationClient",commandName:"BatchPutGeofenceCommand",inputFilterSensitiveLog:gn.filterSensitiveLog,outputFilterSensitiveLog:Dn.filterSensitiveLog},o=t.requestHandler;return r.resolve((function(e){return o.handle(e.request,n||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return a(void 0,void 0,void 0,(function(){var n,r,i,u,a,c,l,f,d,h;return s(this,(function(s){switch(s.label){case 0:return[4,t.endpoint()];case 1:if(n=s.sent(),n.hostname,r=n.protocol,i=void 0===r?"https":r,u=n.port,a=n.path,c={"content-type":"application/json"},l=((null==a?void 0:a.endsWith("/"))?a.slice(0,-1):a||"")+"/geofencing/v0/collections/{CollectionName}/put-geofences",void 0===e.CollectionName)throw new Error("No value provided for input HTTP label: CollectionName.");if((f=e.CollectionName).length<=0)throw new Error("Empty value provided for input HTTP label: CollectionName.");return l=l.replace("{CollectionName}",Ct(f)),d=JSON.stringify(o({},void 0!==e.Entries&&null!==e.Entries&&{Entries:no(e.Entries,t)})),[4,t.endpoint()];case 2:if(h=s.sent().hostname,!0!==t.disableHostPrefix&&!C(h="geofencing."+h))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return[2,new A({protocol:i,hostname:h,port:u,method:"POST",headers:c,path:l,body:d})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return a(void 0,void 0,void 0,(function(){var n,r,i,o;return s(this,(function(u){switch(u.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,Wi(e,t)]:(n={$metadata:Po(e),Errors:void 0,Successes:void 0},i=ut,o=at,[4,xo(e.body,t)]);case 1:return void 0!==(r=i.apply(void 0,[o.apply(void 0,[u.sent()]),"body"])).Errors&&null!==r.Errors&&(n.Errors=fo(r.Errors,t)),void 0!==r.Successes&&null!==r.Successes&&(n.Successes=ho(r.Successes,t)),[2,Promise.resolve(n)]}}))}))}(e,t)},t}(Ye),No=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return i(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(qi(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"LocationClient",commandName:"BatchDeleteGeofenceCommand",inputFilterSensitiveLog:tn.filterSensitiveLog,outputFilterSensitiveLog:rn.filterSensitiveLog},o=t.requestHandler;return r.resolve((function(e){return o.handle(e.request,n||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return a(void 0,void 0,void 0,(function(){var n,r,i,u,a,c,l,f,d,h;return s(this,(function(s){switch(s.label){case 0:return[4,t.endpoint()];case 1:if(n=s.sent(),n.hostname,r=n.protocol,i=void 0===r?"https":r,u=n.port,a=n.path,c={"content-type":"application/json"},l=((null==a?void 0:a.endsWith("/"))?a.slice(0,-1):a||"")+"/geofencing/v0/collections/{CollectionName}/delete-geofences",void 0===e.CollectionName)throw new Error("No value provided for input HTTP label: CollectionName.");if((f=e.CollectionName).length<=0)throw new Error("Empty value provided for input HTTP label: CollectionName.");return l=l.replace("{CollectionName}",Ct(f)),d=JSON.stringify(o({},void 0!==e.GeofenceIds&&null!==e.GeofenceIds&&{GeofenceIds:uo(e.GeofenceIds,t)})),[4,t.endpoint()];case 2:if(h=s.sent().hostname,!0!==t.disableHostPrefix&&!C(h="geofencing."+h))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return[2,new A({protocol:i,hostname:h,port:u,method:"POST",headers:c,path:l,body:d})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return a(void 0,void 0,void 0,(function(){var n,r,i,o;return s(this,(function(u){switch(u.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,$i(e,t)]:(n={$metadata:Po(e),Errors:void 0},i=ut,o=at,[4,xo(e.body,t)]);case 1:return void 0!==(r=i.apply(void 0,[o.apply(void 0,[u.sent()]),"body"])).Errors&&null!==r.Errors&&(n.Errors=co(r.Errors,t)),[2,Promise.resolve(n)]}}))}))}(e,t)},t}(Ye);function Io(e){for(var t,n,r=function(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}(e),i=0,o=1;o<r.length;)t=n||r[0],i+=((n=r[o])[0]-t[0])*(n[1]+t[1]),o++;return i>0}function jo(e,t){if(!Number.isFinite(e)||!Number.isFinite(t))throw new Error("Invalid coordinates: ["+e+","+t+"]");if(t<-90||90<t)throw new Error("Latitude must be between -90 and 90 degrees inclusive.");if(e<-180||180<e)throw new Error("Longitude must be between -180 and 180 degrees inclusive.")}function Uo(e){if(!/^(?:[\x2D\.0-9A-Z_a-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDCD0-\uDCEB\uDCF0-\uDCF9\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])+$/i.test(e))throw new Error("Invalid geofenceId: '"+e+"' - IDs can only contain alphanumeric characters, hyphens, underscores and periods.")}function Go(e,t){var n=t?t+": ":"";if(e.length<4)throw new Error(n+"LinearRing must contain 4 or more coordinates.");var r=[];if(e.forEach((function(e){try{jo(e[0],e[1])}catch(t){r.push({coordinates:e,error:t.message})}})),r.length>0)throw new Error(n+"One or more of the coordinates in the Polygon LinearRing are not valid: "+JSON.stringify(r));var i=l(e[0],2),o=i[0],u=i[1],a=l(e[e.length-1],2),s=a[0],c=a[1];if(o!==s||u!==c)throw new Error(n+"LinearRing's first and last coordinates are not the same");if(Io(e))throw new Error(n+"LinearRing coordinates must be wound counterclockwise")}function zo(e){var t={};e.forEach((function(e){if(!e.geofenceId)throw new Error("Geofence '"+e+"' is missing geofenceId");var n=e.geofenceId;if(Uo(n),t[n])throw new Error("Duplicate geofenceId: "+n);if(t[n]=!0,!e.geometry)throw new Error("Geofence '"+n+"' is missing geometry");var r=e.geometry;if(!r.polygon)throw new Error("Geofence '"+n+"' is missing geometry.polygon");var i=r.polygon;try{!function(e,t){var n=t?t+": ":"";if(!Array.isArray(e))throw new Error(n+"Polygon is of incorrect structure. It should be an array of LinearRings");if(e.length<1)throw new Error(n+"Polygon must have a single LinearRing array.");if(e.length>1)throw new Error(n+"Polygon must have a single LinearRing array. Note: We do not currently support polygons with holes, multipolygons, polygons that are wound clockwise, or that cross the antimeridian.");if(e.reduce((function(e,t){return e+t.length}),0)>1e3)throw new Error(n+"Polygon has more than the maximum 1000 vertices.");e.forEach((function(e){Go(e,t)}))}(i,n)}catch(e){if(e.message.includes("Polygon has more than the maximum 1000 vertices."))throw new Error("Geofence '"+n+"' has more than the maximum of 1000 vertices")}Go(l(i,1)[0],n)}))}var Ho=new h.ConsoleLogger("AmazonLocationServiceProvider"),qo=function(){function e(e){this._config=e||{},Ho.debug("Geo Options",this._config)}return e.prototype.getCategory=function(){return e.CATEGORY},e.prototype.getProviderName=function(){return e.PROVIDER_NAME},e.prototype.configure=function(e){return Ho.debug("configure Amazon Location Service Provider",e),e?(this._config=Object.assign({},this._config,e),this._config):this._config},e.prototype.getAvailableMaps=function(){this._verifyMapResources();var e=[],t=this._config.maps.items,n=this._config.region;for(var r in t){var i=t[r].style;e.push({mapName:r,style:i,region:n})}return e},e.prototype.getDefaultMap=function(){this._verifyMapResources();var e=this._config.maps.default;return{mapName:e,style:this._config.maps.items[e].style,region:this._config.region}},e.prototype.searchByText=function(e,t){return a(this,void 0,void 0,(function(){var n,r,i,o,u,a;return s(this,(function(s){switch(s.label){case 0:return[4,this._ensureCredentials()];case 1:if(!s.sent())throw new Error("No credentials");if(this._verifySearchIndex(null==t?void 0:t.searchIndexName),n={Text:e,IndexName:this._config.search_indices.default},t){if(n.FilterCountries=t.countries,n.MaxResults=t.maxResults,t.searchIndexName&&(n.IndexName=t.searchIndexName),t.biasPosition&&t.searchAreaConstraints)throw new Error("BiasPosition and SearchAreaConstraints are mutually exclusive, please remove one or the other from the options object");t.biasPosition&&(n.BiasPosition=t.biasPosition),t.searchAreaConstraints&&(n.FilterBBox=t.searchAreaConstraints)}r=new Gi({credentials:this._config.credentials,region:this._config.region,customUserAgent:Object(h.getAmplifyUserAgent)()}),i=new Mo(n),s.label=2;case 2:return s.trys.push([2,4,,5]),[4,r.send(i)];case 3:return o=s.sent(),[3,5];case 4:throw u=s.sent(),Ho.debug(u),u;case 5:return a=o.Results.map((function(e){return e.Place})),[2,v()(a,{deep:!0})]}}))}))},e.prototype.searchByCoordinates=function(e,t){return a(this,void 0,void 0,(function(){var n,r,i,o,u,a;return s(this,(function(s){switch(s.label){case 0:return[4,this._ensureCredentials()];case 1:if(!s.sent())throw new Error("No credentials");this._verifySearchIndex(null==t?void 0:t.searchIndexName),n={Position:e,IndexName:this._config.search_indices.default},t&&(t.searchIndexName&&(n.IndexName=t.searchIndexName),n.MaxResults=t.maxResults),r=new Gi({credentials:this._config.credentials,region:this._config.region,customUserAgent:Object(h.getAmplifyUserAgent)()}),i=new Lo(n),s.label=2;case 2:return s.trys.push([2,4,,5]),[4,r.send(i)];case 3:return o=s.sent(),[3,5];case 4:throw u=s.sent(),Ho.debug(u),u;case 5:return a=o.Results.map((function(e){return e.Place})),[2,v()(a[0],{deep:!0})]}}))}))},e.prototype.saveGeofences=function(e,t){return a(this,void 0,void 0,(function(){var n,r,i,o=this;return s(this,(function(u){switch(u.label){case 0:if(e.length<1)throw new Error("Geofence input array is empty");return[4,this._ensureCredentials()];case 1:if(!u.sent())throw new Error("No credentials");try{this._verifyGeofenceCollections(null==t?void 0:t.collectionName)}catch(e){throw Ho.debug(e),e}for(zo(e),n=e.map((function(e){return{GeofenceId:e.geofenceId,Geometry:{Polygon:e.geometry.polygon}}})),r={successes:[],errors:[]},i=[];n.length>0;)10,i.push(n.splice(0,10));return[4,Promise.all(i.map((function(e){return a(o,void 0,void 0,(function(){var n,i;return s(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this._AmazonLocationServiceBatchPutGeofenceCall(e,(null==t?void 0:t.collectionName)||this._config.geofenceCollections.default)];case 1:return n=o.sent(),[3,3];case 2:return i=o.sent(),e.forEach((function(e){r.errors.push({geofenceId:e.GeofenceId,error:{code:"APIConnectionError",message:i.message}})})),[2];case 3:return n.Successes.forEach((function(e){var t=e.GeofenceId,n=e.CreateTime,i=e.UpdateTime;r.successes.push({geofenceId:t,createTime:n,updateTime:i})})),n.Errors.forEach((function(e){var t=e.Error,n=t.Code,i=t.Message,o=e.GeofenceId;r.errors.push({error:{code:n,message:i},geofenceId:o})})),[2]}}))}))})))];case 2:return u.sent(),[2,r]}}))}))},e.prototype.getGeofence=function(e,t){return a(this,void 0,void 0,(function(){var n,r,i,o,u,a,c,l,f,d;return s(this,(function(s){switch(s.label){case 0:return[4,this._ensureCredentials()];case 1:if(!s.sent())throw new Error("No credentials");try{this._verifyGeofenceCollections(null==t?void 0:t.collectionName)}catch(e){throw Ho.debug(e),e}Uo(e),n=new Gi({credentials:this._config.credentials,region:this._config.region,customUserAgent:Object(h.getAmplifyUserAgent)()}),r={GeofenceId:e,CollectionName:(null==t?void 0:t.collectionName)||this._config.geofenceCollections.default},i=new Oo(r),s.label=2;case 2:return s.trys.push([2,4,,5]),[4,n.send(i)];case 3:return o=s.sent(),[3,5];case 4:throw u=s.sent(),Ho.debug(u),u;case 5:return a=o.GeofenceId,c=o.CreateTime,l=o.UpdateTime,f=o.Status,d=o.Geometry,[2,{createTime:c,geofenceId:a,geometry:{polygon:d.Polygon},status:f,updateTime:l}]}}))}))},e.prototype.listGeofences=function(e){return a(this,void 0,void 0,(function(){var t,n,r,i,o,u,a;return s(this,(function(s){switch(s.label){case 0:return[4,this._ensureCredentials()];case 1:if(!s.sent())throw new Error("No credentials");try{this._verifyGeofenceCollections(null==e?void 0:e.collectionName)}catch(e){throw Ho.debug(e),e}t=new Gi({credentials:this._config.credentials,region:this._config.region,customUserAgent:Object(h.getAmplifyUserAgent)()}),n={NextToken:null==e?void 0:e.nextToken,CollectionName:(null==e?void 0:e.collectionName)||this._config.geofenceCollections.default},r=new Ro(n),s.label=2;case 2:return s.trys.push([2,4,,5]),[4,t.send(r)];case 3:return i=s.sent(),[3,5];case 4:throw o=s.sent(),Ho.debug(o),o;case 5:return u=i.NextToken,a=i.Entries,[2,{entries:a.map((function(e){return{geofenceId:e.GeofenceId,createTime:e.CreateTime,updateTime:e.UpdateTime,status:e.Status,geometry:{polygon:e.Geometry.Polygon}}})),nextToken:u}]}}))}))},e.prototype.deleteGeofences=function(e,t){return a(this,void 0,void 0,(function(){var n,r,i,o,u=this;return s(this,(function(c){switch(c.label){case 0:if(e.length<1)throw new Error("GeofenceId input array is empty");return[4,this._ensureCredentials()];case 1:if(!c.sent())throw new Error("No credentials");if(this._verifyGeofenceCollections(null==t?void 0:t.collectionName),(n=e.filter((function(e){try{Uo(e)}catch(e){return!0}}))).length>0)throw new Error("Invalid geofence ids: "+n.join(", "));for(r={successes:[],errors:[]},i=[],o=0;o<e.length;)i.push(e.slice(o,o+=10));return[4,Promise.all(i.map((function(e){return a(u,void 0,void 0,(function(){var n,i,o,u;return s(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,this._AmazonLocationServiceBatchDeleteGeofenceCall(e,(null==t?void 0:t.collectionName)||this._config.geofenceCollections.default)];case 1:return n=a.sent(),[3,3];case 2:return i=a.sent(),e.forEach((function(e){var t={geofenceId:e,error:{code:i.message,message:i.message}};r.errors.push(t)})),[2];case 3:return o=n.Errors.map((function(e){return e.geofenceId})),(u=r.successes).push.apply(u,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(l(arguments[t]));return e}(e.filter((function(e){return!o.includes(e)})))),[2]}}))}))})))];case 2:return c.sent(),[2,r]}}))}))},e.prototype._ensureCredentials=function(){return a(this,void 0,void 0,(function(){var e,t,n;return s(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,h.Credentials.get()];case 1:return(e=r.sent())?(t=h.Credentials.shear(e),Ho.debug("Set credentials for storage. Credentials are:",t),this._config.credentials=t,[2,!0]):[2,!1];case 2:return n=r.sent(),Ho.debug("Ensure credentials error. Credentials are:",n),[2,!1];case 3:return[2]}}))}))},e.prototype._verifyMapResources=function(){if(!this._config.maps){var e="No map resources found in amplify config, run 'amplify add geo' to create one and run `amplify push` after";throw Ho.debug(e),new Error(e)}if(!this._config.maps.default){e="No default map resource found in amplify config, run 'amplify add geo' to create one and run `amplify push` after";throw Ho.debug(e),new Error(e)}},e.prototype._verifySearchIndex=function(e){if(!(this._config.search_indices&&this._config.search_indices.default||e)){var t="No Search Index found in amplify config, please run `amplify add geo` to create one and run `amplify push` after.";throw Ho.debug(t),new Error(t)}},e.prototype._verifyGeofenceCollections=function(e){if(!(this._config.geofenceCollections&&this._config.geofenceCollections.default||e)){var t="No Geofence Collections found, please run `amplify add geo` to create one and run `amplify push` after.";throw Ho.debug(t),new Error(t)}},e.prototype._AmazonLocationServiceBatchPutGeofenceCall=function(e,t){return a(this,void 0,void 0,(function(){var n,r,i,o;return s(this,(function(u){switch(u.label){case 0:n={Entries:e,CollectionName:t||this._config.geofenceCollections.default},r=new Gi({credentials:this._config.credentials,region:this._config.region,customUserAgent:Object(h.getAmplifyUserAgent)()}),i=new ko(n),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,r.send(i)];case 2:return o=u.sent(),[3,4];case 3:throw u.sent();case 4:return[2,o]}}))}))},e.prototype._AmazonLocationServiceBatchDeleteGeofenceCall=function(e,t){return a(this,void 0,void 0,(function(){var n,r,i,o;return s(this,(function(u){switch(u.label){case 0:n={GeofenceIds:e,CollectionName:t||this._config.geofenceCollections.default},r=new Gi({credentials:this._config.credentials,region:this._config.region,customUserAgent:Object(h.getAmplifyUserAgent)()}),i=new No(n),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,r.send(i)];case 2:return o=u.sent(),[3,4];case 3:throw u.sent();case 4:return[2,o]}}))}))},e.CATEGORY="Geo",e.PROVIDER_NAME="AmazonLocationService",e}(),$o=new h.ConsoleLogger("Geo"),Wo="AmazonLocationService",Vo=new(function(){function e(){this._config={},this._pluggables=[],$o.debug("Geo Options",this._config)}return e.prototype.getModuleName=function(){return e.MODULE},e.prototype.addPluggable=function(e){if(e&&"Geo"===e.getCategory())return this._pluggables.push(e),e.configure(this._config[e.getProviderName()])},e.prototype.getPluggable=function(e){var t=this._pluggables.find((function(t){return t.getProviderName()===e}));if(void 0===t)throw $o.debug("No plugin found with providerName",e),new Error("No plugin found in Geo for the provider");return t},e.prototype.removePluggable=function(e){this._pluggables=this._pluggables.filter((function(t){return t.getProviderName()!==e}))},e.prototype.configure=function(e){var t=this;if($o.debug("configure Geo"),!e)return this._config;var n=Object(h.parseMobileHubConfig)(e);return this._config=Object.assign({},this._config,n.Geo,e),this._pluggables.forEach((function(e){e.configure(t._config[e.getProviderName()])})),0===this._pluggables.length&&this.addPluggable(new qo),this._config},e.prototype.getAvailableMaps=function(e){return void 0===e&&(e=Wo),this.getPluggable(e).getAvailableMaps()},e.prototype.getDefaultMap=function(e){return void 0===e&&(e=Wo),this.getPluggable(e).getDefaultMap()},e.prototype.searchByText=function(e,t){return a(this,void 0,void 0,(function(){var n,r,i,o;return s(this,(function(u){switch(u.label){case 0:n=(t||{}).providerName,r=void 0===n?Wo:n,i=this.getPluggable(r),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,i.searchByText(e,t)];case 2:return[2,u.sent()];case 3:throw o=u.sent(),$o.debug(o),o;case 4:return[2]}}))}))},e.prototype.searchByCoordinates=function(e,t){return a(this,void 0,void 0,(function(){var n,r,i,o,u,a,c;return s(this,(function(s){switch(s.label){case 0:n=(t||{}).providerName,r=void 0===n?Wo:n,i=this.getPluggable(r),o=l(e,2),u=o[0],a=o[1],s.label=1;case 1:return s.trys.push([1,3,,4]),jo(u,a),[4,i.searchByCoordinates(e,t)];case 2:return[2,s.sent()];case 3:throw c=s.sent(),$o.debug(c),c;case 4:return[2]}}))}))},e.prototype.saveGeofences=function(e,t){return a(this,void 0,void 0,(function(){var n,r,i,o,u;return s(this,(function(a){switch(a.label){case 0:n=(t||{}).providerName,r=void 0===n?Wo:n,i=this.getPluggable(r),o=Array.isArray(e)?e:[e],a.label=1;case 1:return a.trys.push([1,3,,4]),[4,i.saveGeofences(o,t)];case 2:return[2,a.sent()];case 3:throw u=a.sent(),$o.debug(u),u;case 4:return[2]}}))}))},e.prototype.getGeofence=function(e,t){return a(this,void 0,void 0,(function(){var n,r,i,o;return s(this,(function(u){switch(u.label){case 0:n=(t||{}).providerName,r=void 0===n?Wo:n,i=this.getPluggable(r),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,i.getGeofence(e,t)];case 2:return[2,u.sent()];case 3:throw o=u.sent(),$o.debug(o),o;case 4:return[2]}}))}))},e.prototype.listGeofences=function(e){return a(this,void 0,void 0,(function(){var t,n,r,i;return s(this,(function(o){switch(o.label){case 0:t=(e||{}).providerName,n=void 0===t?Wo:t,r=this.getPluggable(n),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,r.listGeofences(e)];case 2:return[2,o.sent()];case 3:throw i=o.sent(),$o.debug(i),i;case 4:return[2]}}))}))},e.prototype.deleteGeofences=function(e,t){return a(this,void 0,void 0,(function(){var n,r,i,o,u;return s(this,(function(a){switch(a.label){case 0:n=(t||{}).providerName,r=void 0===n?Wo:n,i=this.getPluggable(r),o=Array.isArray(e)?e:[e],a.label=1;case 1:return a.trys.push([1,3,,4]),[4,i.deleteGeofences(o,t)];case 2:return[2,a.sent()];case 3:throw u=a.sent(),$o.debug(u),u;case 4:return[2]}}))}))},e.MODULE="Geo",e}());h.Amplify.register(Vo)},function(e,t,n){"use strict";n.r(t),n.d(t,"fromUtf8",(function(){return r})),n.d(t,"toUtf8",(function(){return i}));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 i=e.charCodeAt(n);if(i<128)t.push(i);else if(i<2048)t.push(i>>6|192,63&i|128);else if(n+1<e.length&&55296==(64512&i)&&56320==(64512&e.charCodeAt(n+1))){var o=65536+((1023&i)<<10)+(1023&e.charCodeAt(++n));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="",n=0,r=e.length;n<r;n++){var i=e[n];if(i<128)t+=String.fromCharCode(i);else if(192<=i&&i<224){var o=e[++n];t+=String.fromCharCode((31&i)<<6|63&o)}else if(240<=i&&i<365){var u="%"+[i,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(u)}else t+=String.fromCharCode((15&i)<<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 i}));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 i=e.charCodeAt(n);if(i<128)t.push(i);else if(i<2048)t.push(i>>6|192,63&i|128);else if(n+1<e.length&&55296==(64512&i)&&56320==(64512&e.charCodeAt(n+1))){var o=65536+((1023&i)<<10)+(1023&e.charCodeAt(++n));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="",n=0,r=e.length;n<r;n++){var i=e[n];if(i<128)t+=String.fromCharCode(i);else if(192<=i&&i<224){var o=e[++n];t+=String.fromCharCode((31&i)<<6|63&o)}else if(240<=i&&i<365){var u="%"+[i,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(u)}else t+=String.fromCharCode((15&i)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)}}])}));
56
56
  //# sourceMappingURL=aws-amplify-geo.min.js.map