@ezeep/ezeep-js 1.0.217 → 1.0.220

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
- var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();var __awaiter=this&&this.__awaiter||function(e,t,r,n){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function o(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n["throw"](e))}catch(e){i(e)}}function l(e){e.done?r(e.value):a(e.value).then(o,s)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return l([e,t])}}function l(o){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,a&&(i=o[0]&2?a["return"]:o[0]?a["throw"]||((i=a["return"])&&i.call(a),0):a.next)&&!(i=i.call(a,o[1])).done)return i;if(a=0,i)o=[o[0]&2,i.value];switch(o[0]){case 0:case 1:i=o;break;case 4:r.label++;return{value:o[1],done:false};case 5:r.label++;a=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){r.label=o[1];break}if(o[0]===6&&r.label<i[1]){r.label=i[1];i=o;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(o);break}if(i[2])r.ops.pop();r.trys.pop();continue}o=t.call(e,r)}catch(e){o=[6,e];a=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,i;n<a;n++){if(i||!(n in t)){if(!i)i=Array.prototype.slice.call(t,0,n);i[n]=t[n]}}return e.concat(i||Array.prototype.slice.call(t))};System.register(["./p-c04b764e.system.js"],(function(e){"use strict";var t,r,n,a,i,o,s,l,c;return{setters:[function(e){t=e.g;r=e.f;n=e.r;a=e.c;i=e.h;o=e.H;s=e.a;l=e.d;c=e.F}],execute:function(){var p=this;var d=function(e,t,r){var n=e.get(t);if(!n){e.set(t,[r])}else if(!n.includes(r)){n.push(r)}};var u=function(e,t){var r;return function(){var n=[];for(var a=0;a<arguments.length;a++){n[a]=arguments[a]}if(r){clearTimeout(r)}r=setTimeout((function(){r=0;e.apply(void 0,n)}),t)}};var m=function(e){return!("isConnected"in e)||e.isConnected};var f=u((function(e){for(var t=0,r=e.keys();t<r.length;t++){var n=r[t];e.set(n,e.get(n).filter(m))}}),2e3);var h=function(e){var n=e.on;var a=new Map;if(typeof t==="function"){n("dispose",(function(){a.clear()}));n("get",(function(e){var r=t();if(r){d(a,e,r)}}));n("set",(function(e){var t=a.get(e);if(t){a.set(e,t.filter(r))}f(a)}));n("reset",(function(){a.forEach((function(e){return e.forEach(r)}));f(a)}))}};var g=function(e,t){if(t===void 0){t=function(e,t){return e!==t}}var r=new Map(Object.entries(e!==null&&e!==void 0?e:{}));var n={dispose:[],get:[],set:[],reset:[]};var a=function(){r=new Map(Object.entries(e!==null&&e!==void 0?e:{}));n.reset.forEach((function(e){return e()}))};var i=function(){n.dispose.forEach((function(e){return e()}));a()};var o=function(e){n.get.forEach((function(t){return t(e)}));return r.get(e)};var s=function(e,a){var i=r.get(e);if(t(a,i,e)){r.set(e,a);n.set.forEach((function(t){return t(e,a,i)}))}};var l=typeof Proxy==="undefined"?{}:new Proxy(e,{get:function(e,t){return o(t)},ownKeys:function(e){return Array.from(r.keys())},getOwnPropertyDescriptor:function(){return{enumerable:true,configurable:true}},has:function(e,t){return r.has(t)},set:function(e,t,r){s(t,r);return true}});var c=function(e,t){n[e].push(t);return function(){y(n[e],t)}};var p=function(t,r){var n=c("set",(function(e,n){if(e===t){r(n)}}));var a=c("reset",(function(){return r(e[t])}));return function(){n();a()}};var d=function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return e.forEach((function(e){if(e.set){c("set",e.set)}if(e.get){c("get",e.get)}if(e.reset){c("reset",e.reset)}}))};var u=function(e){var t=r.get(e);n.set.forEach((function(r){return r(e,t,t)}))};return{state:l,get:o,set:s,on:c,onChange:p,use:d,dispose:i,reset:a,forceUpdate:u}};var y=function(e,t){var r=e.indexOf(t);if(r>=0){e[r]=e[e.length-1];e.length--}};var v=function(e,t){var r=g(e,t);h(r);return r};function b(e){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){b=function e(t){return typeof t}}else{b=function e(t){return t&&typeof Symbol==="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t}}return b(e)}function x(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}function N(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?Object(arguments[t]):{};var n=Object.keys(r);if(typeof Object.getOwnPropertySymbols==="function"){n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))}n.forEach((function(t){x(e,t,r[t])}))}return e}function z(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}function S(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||false;n.configurable=true;if("value"in n)n.writable=true;Object.defineProperty(e,n.key,n)}}function w(e,t,r){if(t)S(e.prototype,t);if(r)S(e,r);return e}var P=typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function C(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e["default"]:e}function R(e,t,r){return r={path:t,exports:{},require:function(e,t){return E()}},e(r,r.exports),r.exports}function _(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:true});Object.keys(e).forEach((function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:true,get:function(){return e[r]}})}));return t}function E(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var k=R((function(e){function t(r){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){e.exports=t=function e(t){return typeof t};e.exports["default"]=e.exports,e.exports.__esModule=true}else{e.exports=t=function e(t){return t&&typeof Symbol==="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.exports["default"]=e.exports,e.exports.__esModule=true}return t(r)}e.exports=t;e.exports["default"]=e.exports,e.exports.__esModule=true}));var O=C(k);function T(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function B(e,t){if(t&&(O(t)==="object"||typeof t==="function")){return t}return T(e)}function q(e){q=Object.setPrototypeOf?Object.getPrototypeOf:function e(t){return t.__proto__||Object.getPrototypeOf(t)};return q(e)}function M(e,t){M=Object.setPrototypeOf||function e(t,r){t.__proto__=r;return t};return M(e,t)}function A(e,t){if(typeof t!=="function"&&t!==null){throw new TypeError("Super expression must either be null or a function")}e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:true,configurable:true}});if(t)M(e,t)}var I={type:"logger",log:function e(t){this.output("log",t)},warn:function e(t){this.output("warn",t)},error:function e(t){this.output("error",t)},output:function e(t,r){if(console&&console[t])console[t].apply(console,r)}};var H=function(){function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};z(this,e);this.init(t,r)}w(e,[{key:"init",value:function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this.prefix=r.prefix||"i18next:";this.logger=t||I;this.options=r;this.debug=r.debug}},{key:"setDebug",value:function e(t){this.debug=t}},{key:"log",value:function e(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++){r[n]=arguments[n]}return this.forward(r,"log","",true)}},{key:"warn",value:function e(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++){r[n]=arguments[n]}return this.forward(r,"warn","",true)}},{key:"error",value:function e(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++){r[n]=arguments[n]}return this.forward(r,"error","")}},{key:"deprecate",value:function e(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++){r[n]=arguments[n]}return this.forward(r,"warn","WARNING DEPRECATED: ",true)}},{key:"forward",value:function e(t,r,n,a){if(a&&!this.debug)return null;if(typeof t[0]==="string")t[0]="".concat(n).concat(this.prefix," ").concat(t[0]);return this.logger[r](t)}},{key:"create",value:function t(r){return new e(this.logger,N({},{prefix:"".concat(this.prefix,":").concat(r,":")},this.options))}}]);return e}();var L=new H;var D=function(){function e(){z(this,e);this.observers={}}w(e,[{key:"on",value:function e(t,r){var n=this;t.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[];n.observers[e].push(r)}));return this}},{key:"off",value:function e(t,r){if(!this.observers[t])return;if(!r){delete this.observers[t];return}this.observers[t]=this.observers[t].filter((function(e){return e!==r}))}},{key:"emit",value:function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++){n[a-1]=arguments[a]}if(this.observers[t]){var i=[].concat(this.observers[t]);i.forEach((function(e){e.apply(void 0,n)}))}if(this.observers["*"]){var o=[].concat(this.observers["*"]);o.forEach((function(e){e.apply(e,[t].concat(n))}))}}}]);return e}();function j(){var e;var t;var r=new Promise((function(r,n){e=r;t=n}));r.resolve=e;r.reject=t;return r}function U(e){if(e==null)return"";return""+e}function F(e,t,r){e.forEach((function(e){if(t[e])r[e]=t[e]}))}function V(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function a(){return!e||typeof e==="string"}var i=typeof t!=="string"?[].concat(t):t.split(".");while(i.length>1){if(a())return{};var o=n(i.shift());if(!e[o]&&r)e[o]=new r;if(Object.prototype.hasOwnProperty.call(e,o)){e=e[o]}else{e={}}}if(a())return{};return{obj:e,k:n(i.shift())}}function K(e,t,r){var n=V(e,t,Object),a=n.obj,i=n.k;a[i]=r}function G(e,t,r,n){var a=V(e,t,Object),i=a.obj,o=a.k;i[o]=i[o]||[];if(n)i[o]=i[o].concat(r);if(!n)i[o].push(r)}function W(e,t){var r=V(e,t),n=r.obj,a=r.k;if(!n)return undefined;return n[a]}function X(e,t,r){var n=W(e,r);if(n!==undefined){return n}return W(t,r)}function Q(e,t,r){for(var n in t){if(n!=="__proto__"&&n!=="constructor"){if(n in e){if(typeof e[n]==="string"||e[n]instanceof String||typeof t[n]==="string"||t[n]instanceof String){if(r)e[n]=t[n]}else{Q(e[n],t[n],r)}}else{e[n]=t[n]}}}return e}function Y(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var J={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function $(e){if(typeof e==="string"){return e.replace(/[&<>"'\/]/g,(function(e){return J[e]}))}return e}var Z=typeof window!=="undefined"&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1;var ee=[" ",",","?","!",";"];function te(e,t,r){t=t||"";r=r||"";var n=ee.filter((function(e){return t.indexOf(e)<0&&r.indexOf(e)<0}));if(n.length===0)return true;var a=new RegExp("(".concat(n.map((function(e){return e==="?"?"\\?":e})).join("|"),")"));var i=!a.test(e);if(!i){var o=e.indexOf(r);if(o>0&&!a.test(e.substring(0,o))){i=true}}return i}function re(e,t){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:".";if(!e)return undefined;if(e[t])return e[t];var n=t.split(r);var a=e;for(var i=0;i<n.length;++i){if(!a)return undefined;if(typeof a[n[i]]==="string"&&i+1<n.length){return undefined}if(a[n[i]]===undefined){var o=2;var s=n.slice(i,i+o).join(r);var l=a[s];while(l===undefined&&n.length>i+o){o++;s=n.slice(i,i+o).join(r);l=a[s]}if(l===undefined)return undefined;if(typeof l==="string")return l;if(s&&typeof l[s]==="string")return l[s];var c=n.slice(i+o).join(r);if(c)return re(l,c,r);return undefined}a=a[n[i]]}return a}var ne=function(e){A(t,e);function t(e){var r;var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{ns:["translation"],defaultNS:"translation"};z(this,t);r=B(this,q(t).call(this));if(Z){D.call(T(r))}r.data=e||{};r.options=n;if(r.options.keySeparator===undefined){r.options.keySeparator="."}if(r.options.ignoreJSONStructure===undefined){r.options.ignoreJSONStructure=true}return r}w(t,[{key:"addNamespaces",value:function e(t){if(this.options.ns.indexOf(t)<0){this.options.ns.push(t)}}},{key:"removeNamespaces",value:function e(t){var r=this.options.ns.indexOf(t);if(r>-1){this.options.ns.splice(r,1)}}},{key:"getResource",value:function e(t,r,n){var a=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};var i=a.keySeparator!==undefined?a.keySeparator:this.options.keySeparator;var o=a.ignoreJSONStructure!==undefined?a.ignoreJSONStructure:this.options.ignoreJSONStructure;var s=[t,r];if(n&&typeof n!=="string")s=s.concat(n);if(n&&typeof n==="string")s=s.concat(i?n.split(i):n);if(t.indexOf(".")>-1){s=t.split(".")}var l=W(this.data,s);if(l||!o||typeof n!=="string")return l;return re(this.data&&this.data[t]&&this.data[t][r],n,i)}},{key:"addResource",value:function e(t,r,n,a){var i=arguments.length>4&&arguments[4]!==undefined?arguments[4]:{silent:false};var o=this.options.keySeparator;if(o===undefined)o=".";var s=[t,r];if(n)s=s.concat(o?n.split(o):n);if(t.indexOf(".")>-1){s=t.split(".");a=r;r=s[1]}this.addNamespaces(r);K(this.data,s,a);if(!i.silent)this.emit("added",t,r,n,a)}},{key:"addResources",value:function e(t,r,n){var a=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{silent:false};for(var i in n){if(typeof n[i]==="string"||Object.prototype.toString.apply(n[i])==="[object Array]")this.addResource(t,r,i,n[i],{silent:true})}if(!a.silent)this.emit("added",t,r,n)}},{key:"addResourceBundle",value:function e(t,r,n,a,i){var o=arguments.length>5&&arguments[5]!==undefined?arguments[5]:{silent:false};var s=[t,r];if(t.indexOf(".")>-1){s=t.split(".");a=n;n=r;r=s[1]}this.addNamespaces(r);var l=W(this.data,s)||{};if(a){Q(l,n,i)}else{l=N({},l,n)}K(this.data,s,l);if(!o.silent)this.emit("added",t,r,n)}},{key:"removeResourceBundle",value:function e(t,r){if(this.hasResourceBundle(t,r)){delete this.data[t][r]}this.removeNamespaces(r);this.emit("removed",t,r)}},{key:"hasResourceBundle",value:function e(t,r){return this.getResource(t,r)!==undefined}},{key:"getResourceBundle",value:function e(t,r){if(!r)r=this.options.defaultNS;if(this.options.compatibilityAPI==="v1")return N({},{},this.getResource(t,r));return this.getResource(t,r)}},{key:"getDataByLanguage",value:function e(t){return this.data[t]}},{key:"hasLanguageSomeTranslations",value:function e(t){var r=this.getDataByLanguage(t);var n=r&&Object.keys(r)||[];return!!n.find((function(e){return r[e]&&Object.keys(r[e]).length>0}))}},{key:"toJSON",value:function e(){return this.data}}]);return t}(D);var ae={processors:{},addPostProcessor:function e(t){this.processors[t.name]=t},handle:function e(t,r,n,a,i){var o=this;t.forEach((function(e){if(o.processors[e])r=o.processors[e].process(r,n,a,i)}));return r}};var ie={};var oe=function(e){A(t,e);function t(e){var r;var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};z(this,t);r=B(this,q(t).call(this));if(Z){D.call(T(r))}F(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,T(r));r.options=n;if(r.options.keySeparator===undefined){r.options.keySeparator="."}r.logger=L.create("translator");return r}w(t,[{key:"changeLanguage",value:function e(t){if(t)this.language=t}},{key:"exists",value:function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{interpolation:{}};if(t===undefined||t===null){return false}var n=this.resolve(t,r);return n&&n.res!==undefined}},{key:"extractFromKey",value:function e(t,r){var n=r.nsSeparator!==undefined?r.nsSeparator:this.options.nsSeparator;if(n===undefined)n=":";var a=r.keySeparator!==undefined?r.keySeparator:this.options.keySeparator;var i=r.ns||this.options.defaultNS;var o=n&&t.indexOf(n)>-1;var s=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!te(t,n,a);if(o&&!s){var l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0){return{key:t,namespaces:i}}var c=t.split(n);if(n!==a||n===a&&this.options.ns.indexOf(c[0])>-1)i=c.shift();t=c.join(a)}if(typeof i==="string")i=[i];return{key:t,namespaces:i}}},{key:"translate",value:function e(r,n,a){var i=this;if(b(n)!=="object"&&this.options.overloadTranslationOptionHandler){n=this.options.overloadTranslationOptionHandler(arguments)}if(!n)n={};if(r===undefined||r===null)return"";if(!Array.isArray(r))r=[String(r)];var o=n.keySeparator!==undefined?n.keySeparator:this.options.keySeparator;var s=this.extractFromKey(r[r.length-1],n),l=s.key,c=s.namespaces;var p=c[c.length-1];var d=n.lng||this.language;var u=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&d.toLowerCase()==="cimode"){if(u){var m=n.nsSeparator||this.options.nsSeparator;return p+m+l}return l}var f=this.resolve(r,n);var h=f&&f.res;var g=f&&f.usedKey||l;var y=f&&f.exactUsedKey||l;var v=Object.prototype.toString.apply(h);var x=["[object Number]","[object Function]","[object RegExp]"];var z=n.joinArrays!==undefined?n.joinArrays:this.options.joinArrays;var S=!this.i18nFormat||this.i18nFormat.handleAsObject;var w=typeof h!=="string"&&typeof h!=="boolean"&&typeof h!=="number";if(S&&h&&w&&x.indexOf(v)<0&&!(typeof z==="string"&&v==="[object Array]")){if(!n.returnObjects&&!this.options.returnObjects){if(!this.options.returnedObjectHandler){this.logger.warn("accessing an object - but returnObjects options is not enabled!")}return this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,h,N({},n,{ns:c})):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.")}if(o){var P=v==="[object Array]";var C=P?[]:{};var R=P?y:g;for(var _ in h){if(Object.prototype.hasOwnProperty.call(h,_)){var E="".concat(R).concat(o).concat(_);C[_]=this.translate(E,N({},n,{joinArrays:false,ns:c}));if(C[_]===E)C[_]=h[_]}}h=C}}else if(S&&typeof z==="string"&&v==="[object Array]"){h=h.join(z);if(h)h=this.extendTranslation(h,r,n,a)}else{var k=false;var O=false;var T=n.count!==undefined&&typeof n.count!=="string";var B=t.hasDefaultValue(n);var q=T?this.pluralResolver.getSuffix(d,n.count,n):"";var M=n["defaultValue".concat(q)]||n.defaultValue;if(!this.isValidLookup(h)&&B){k=true;h=M}if(!this.isValidLookup(h)){O=true;h=l}var A=n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey;var I=A&&O?undefined:h;var H=B&&M!==h&&this.options.updateMissing;if(O||k||H){this.logger.log(H?"updateKey":"missingKey",d,p,l,H?M:h);if(o){var L=this.resolve(l,N({},n,{keySeparator:false}));if(L&&L.res)this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var D=[];var j=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&j&&j[0]){for(var U=0;U<j.length;U++){D.push(j[U])}}else if(this.options.saveMissingTo==="all"){D=this.languageUtils.toResolveHierarchy(n.lng||this.language)}else{D.push(n.lng||this.language)}var F=function e(t,r,a){if(i.options.missingKeyHandler){i.options.missingKeyHandler(t,p,r,H?a:I,H,n)}else if(i.backendConnector&&i.backendConnector.saveMissing){i.backendConnector.saveMissing(t,p,r,H?a:I,H,n)}i.emit("missingKey",t,p,r,h)};if(this.options.saveMissing){if(this.options.saveMissingPlurals&&T){D.forEach((function(e){i.pluralResolver.getSuffixes(e).forEach((function(t){F([e],l+t,n["defaultValue".concat(t)]||M)}))}))}else{F(D,l,M)}}}h=this.extendTranslation(h,r,n,f,a);if(O&&h===l&&this.options.appendNamespaceToMissingKey)h="".concat(p,":").concat(l);if((O||k)&&this.options.parseMissingKeyHandler)h=this.options.parseMissingKeyHandler(h)}return h}},{key:"extendTranslation",value:function e(t,r,n,a,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse){t=this.i18nFormat.parse(t,n,a.usedLng,a.usedNS,a.usedKey,{resolved:a})}else if(!n.skipInterpolation){if(n.interpolation)this.interpolator.init(N({},n,{interpolation:N({},this.options.interpolation,n.interpolation)}));var s=n.interpolation&&n.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;var l;if(s){var c=t.match(this.interpolator.nestingRegexp);l=c&&c.length}var p=n.replace&&typeof n.replace!=="string"?n.replace:n;if(this.options.interpolation.defaultVariables)p=N({},this.options.interpolation.defaultVariables,p);t=this.interpolator.interpolate(t,p,n.lng||this.language,n);if(s){var d=t.match(this.interpolator.nestingRegexp);var u=d&&d.length;if(l<u)n.nest=false}if(n.nest!==false)t=this.interpolator.nest(t,(function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++){t[a]=arguments[a]}if(i&&i[0]===t[0]&&!n.context){o.logger.warn("It seems you are nesting recursively key: ".concat(t[0]," in key: ").concat(r[0]));return null}return o.translate.apply(o,t.concat([r]))}),n);if(n.interpolation)this.interpolator.reset()}var m=n.postProcess||this.options.postProcess;var f=typeof m==="string"?[m]:m;if(t!==undefined&&t!==null&&f&&f.length&&n.applyPostProcessor!==false){t=ae.handle(f,t,r,this.options&&this.options.postProcessPassResolved?N({i18nResolved:a},n):n,this)}return t}},{key:"resolve",value:function e(t){var r=this;var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var a;var i;var o;var s;var l;if(typeof t==="string")t=[t];t.forEach((function(e){if(r.isValidLookup(a))return;var t=r.extractFromKey(e,n);var c=t.key;i=c;var p=t.namespaces;if(r.options.fallbackNS)p=p.concat(r.options.fallbackNS);var d=n.count!==undefined&&typeof n.count!=="string";var u=n.context!==undefined&&(typeof n.context==="string"||typeof n.context==="number")&&n.context!=="";var m=n.lngs?n.lngs:r.languageUtils.toResolveHierarchy(n.lng||r.language,n.fallbackLng);p.forEach((function(e){if(r.isValidLookup(a))return;l=e;if(!ie["".concat(m[0],"-").concat(e)]&&r.utils&&r.utils.hasLoadedNamespace&&!r.utils.hasLoadedNamespace(l)){ie["".concat(m[0],"-").concat(e)]=true;r.logger.warn('key "'.concat(i,'" for languages "').concat(m.join(", "),'" won\'t get resolved as namespace "').concat(l,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}m.forEach((function(t){if(r.isValidLookup(a))return;s=t;var i=c;var l=[i];if(r.i18nFormat&&r.i18nFormat.addLookupKeys){r.i18nFormat.addLookupKeys(l,c,t,e,n)}else{var p;if(d)p=r.pluralResolver.getSuffix(t,n.count,n);if(d&&u)l.push(i+p);if(u)l.push(i+="".concat(r.options.contextSeparator).concat(n.context));if(d)l.push(i+=p)}var m;while(m=l.pop()){if(!r.isValidLookup(a)){o=m;a=r.getResource(t,e,m,n)}}}))}))}));return{res:a,usedKey:i,exactUsedKey:o,usedLng:s,usedNS:l}}},{key:"isValidLookup",value:function e(t){return t!==undefined&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}},{key:"getResource",value:function e(t,r,n){var a=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};if(this.i18nFormat&&this.i18nFormat.getResource)return this.i18nFormat.getResource(t,r,n,a);return this.resourceStore.getResource(t,r,n,a)}}],[{key:"hasDefaultValue",value:function e(t){var r="defaultValue";for(var n in t){if(Object.prototype.hasOwnProperty.call(t,n)&&r===n.substring(0,r.length)&&undefined!==t[n]){return true}}return false}}]);return t}(D);function se(e){return e.charAt(0).toUpperCase()+e.slice(1)}var le=function(){function e(t){z(this,e);this.options=t;this.supportedLngs=this.options.supportedLngs||false;this.logger=L.create("languageUtils")}w(e,[{key:"getScriptPartFromCode",value:function e(t){if(!t||t.indexOf("-")<0)return null;var r=t.split("-");if(r.length===2)return null;r.pop();if(r[r.length-1].toLowerCase()==="x")return null;return this.formatLanguageCode(r.join("-"))}},{key:"getLanguagePartFromCode",value:function e(t){if(!t||t.indexOf("-")<0)return t;var r=t.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function e(t){if(typeof t==="string"&&t.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"];var n=t.split("-");if(this.options.lowerCaseLng){n=n.map((function(e){return e.toLowerCase()}))}else if(n.length===2){n[0]=n[0].toLowerCase();n[1]=n[1].toUpperCase();if(r.indexOf(n[1].toLowerCase())>-1)n[1]=se(n[1].toLowerCase())}else if(n.length===3){n[0]=n[0].toLowerCase();if(n[1].length===2)n[1]=n[1].toUpperCase();if(n[0]!=="sgn"&&n[2].length===2)n[2]=n[2].toUpperCase();if(r.indexOf(n[1].toLowerCase())>-1)n[1]=se(n[1].toLowerCase());if(r.indexOf(n[2].toLowerCase())>-1)n[2]=se(n[2].toLowerCase())}return n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isSupportedCode",value:function e(t){if(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs){t=this.getLanguagePartFromCode(t)}return!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}},{key:"getBestMatchFromCodes",value:function e(t){var r=this;if(!t)return null;var n;t.forEach((function(e){if(n)return;var t=r.formatLanguageCode(e);if(!r.options.supportedLngs||r.isSupportedCode(t))n=t}));if(!n&&this.options.supportedLngs){t.forEach((function(e){if(n)return;var t=r.getLanguagePartFromCode(e);if(r.isSupportedCode(t))return n=t;n=r.options.supportedLngs.find((function(e){if(e.indexOf(t)===0)return e}))}))}if(!n)n=this.getFallbackCodes(this.options.fallbackLng)[0];return n}},{key:"getFallbackCodes",value:function e(t,r){if(!t)return[];if(typeof t==="function")t=t(r);if(typeof t==="string")t=[t];if(Object.prototype.toString.apply(t)==="[object Array]")return t;if(!r)return t["default"]||[];var n=t[r];if(!n)n=t[this.getScriptPartFromCode(r)];if(!n)n=t[this.formatLanguageCode(r)];if(!n)n=t[this.getLanguagePartFromCode(r)];if(!n)n=t["default"];return n||[]}},{key:"toResolveHierarchy",value:function e(t,r){var n=this;var a=this.getFallbackCodes(r||this.options.fallbackLng||[],t);var i=[];var o=function e(t){if(!t)return;if(n.isSupportedCode(t)){i.push(t)}else{n.logger.warn("rejecting language code not found in supportedLngs: ".concat(t))}};if(typeof t==="string"&&t.indexOf("-")>-1){if(this.options.load!=="languageOnly")o(this.formatLanguageCode(t));if(this.options.load!=="languageOnly"&&this.options.load!=="currentOnly")o(this.getScriptPartFromCode(t));if(this.options.load!=="currentOnly")o(this.getLanguagePartFromCode(t))}else if(typeof t==="string"){o(this.formatLanguageCode(t))}a.forEach((function(e){if(i.indexOf(e)<0)o(n.formatLanguageCode(e))}));return i}}]);return e}();var ce=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}];var pe={1:function e(t){return Number(t>1)},2:function e(t){return Number(t!=1)},3:function e(t){return 0},4:function e(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function e(t){return Number(t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function e(t){return Number(t==1?0:t>=2&&t<=4?1:2)},7:function e(t){return Number(t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function e(t){return Number(t==1?0:t==2?1:t!=8&&t!=11?2:3)},9:function e(t){return Number(t>=2)},10:function e(t){return Number(t==1?0:t==2?1:t<7?2:t<11?3:4)},11:function e(t){return Number(t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3)},12:function e(t){return Number(t%10!=1||t%100==11)},13:function e(t){return Number(t!==0)},14:function e(t){return Number(t==1?0:t==2?1:t==3?2:3)},15:function e(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function e(t){return Number(t%10==1&&t%100!=11?0:t!==0?1:2)},17:function e(t){return Number(t==1||t%10==1&&t%100!=11?0:1)},18:function e(t){return Number(t==0?0:t==1?1:2)},19:function e(t){return Number(t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function e(t){return Number(t==1?0:t==0||t%100>0&&t%100<20?1:2)},21:function e(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function e(t){return Number(t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3)}};var de=["v1","v2","v3"];var ue={zero:0,one:1,two:2,few:3,many:4,other:5};function me(){var e={};ce.forEach((function(t){t.lngs.forEach((function(r){e[r]={numbers:t.nr,plurals:pe[t.fc]}}))}));return e}var fe=function(){function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};z(this,e);this.languageUtils=t;this.options=r;this.logger=L.create("pluralResolver");if((!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl==="undefined"||!Intl.PluralRules)){this.options.compatibilityJSON="v3";this.logger.error("Your environment seems not to be Inlt API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")}this.rules=me()}w(e,[{key:"addRule",value:function e(t,r){this.rules[t]=r}},{key:"getRule",value:function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(this.shouldUseIntlApi()){try{return new Intl.PluralRules(t,{type:r.ordinal?"ordinal":"cardinal"})}catch(e){return}}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var n=this.getRule(t,r);if(this.shouldUseIntlApi()){return n&&n.resolvedOptions().pluralCategories.length>1}return n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function e(t,r){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};return this.getSuffixes(t,n).map((function(e){return"".concat(r).concat(e)}))}},{key:"getSuffixes",value:function e(t){var r=this;var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var a=this.getRule(t,n);if(!a){return[]}if(this.shouldUseIntlApi()){return a.resolvedOptions().pluralCategories.sort((function(e,t){return ue[e]-ue[t]})).map((function(e){return"".concat(r.options.prepend).concat(e)}))}return a.numbers.map((function(e){return r.getSuffix(t,e,n)}))}},{key:"getSuffix",value:function e(t,r){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var a=this.getRule(t,n);if(a){if(this.shouldUseIntlApi()){return"".concat(this.options.prepend).concat(a.select(r))}return this.getSuffixRetroCompatible(a,r)}this.logger.warn("no plural rule found for: ".concat(t));return""}},{key:"getSuffixRetroCompatible",value:function e(t,r){var n=this;var a=t.noAbs?t.plurals(r):t.plurals(Math.abs(r));var i=t.numbers[a];if(this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1){if(i===2){i="plural"}else if(i===1){i=""}}var o=function e(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};if(this.options.compatibilityJSON==="v1"){if(i===1)return"";if(typeof i==="number")return"_plural_".concat(i.toString());return o()}else if(this.options.compatibilityJSON==="v2"){return o()}else if(this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1){return o()}return this.options.prepend&&a.toString()?this.options.prepend+a.toString():a.toString()}},{key:"shouldUseIntlApi",value:function e(){return!de.includes(this.options.compatibilityJSON)}}]);return e}();var he=function(){function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};z(this,e);this.logger=L.create("interpolator");this.options=t;this.format=t.interpolation&&t.interpolation.format||function(e){return e};this.init(t)}w(e,[{key:"init",value:function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};if(!t.interpolation)t.interpolation={escapeValue:true};var r=t.interpolation;this.escape=r.escape!==undefined?r.escape:$;this.escapeValue=r.escapeValue!==undefined?r.escapeValue:true;this.useRawValueToEscape=r.useRawValueToEscape!==undefined?r.useRawValueToEscape:false;this.prefix=r.prefix?Y(r.prefix):r.prefixEscaped||"{{";this.suffix=r.suffix?Y(r.suffix):r.suffixEscaped||"}}";this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",";this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-";this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"";this.nestingPrefix=r.nestingPrefix?Y(r.nestingPrefix):r.nestingPrefixEscaped||Y("$t(");this.nestingSuffix=r.nestingSuffix?Y(r.nestingSuffix):r.nestingSuffixEscaped||Y(")");this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",";this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3;this.alwaysFormat=r.alwaysFormat!==undefined?r.alwaysFormat:false;this.resetRegExp()}},{key:"reset",value:function e(){if(this.options)this.init(this.options)}},{key:"resetRegExp",value:function e(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(t,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function e(t,r,n,a){var i=this;var o;var s;var l;var c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function p(e){return e.replace(/\$/g,"$$$$")}var d=function e(t){if(t.indexOf(i.formatSeparator)<0){var o=X(r,c,t);return i.alwaysFormat?i.format(o,undefined,n,N({},a,r,{interpolationkey:t})):o}var s=t.split(i.formatSeparator);var l=s.shift().trim();var p=s.join(i.formatSeparator).trim();return i.format(X(r,c,l),p,n,N({},a,r,{interpolationkey:l}))};this.resetRegExp();var u=a&&a.missingInterpolationHandler||this.options.missingInterpolationHandler;var m=a&&a.interpolation&&a.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;var f=[{regex:this.regexpUnescape,safeValue:function e(t){return p(t)}},{regex:this.regexp,safeValue:function e(t){return i.escapeValue?p(i.escape(t)):p(t)}}];f.forEach((function(e){l=0;while(o=e.regex.exec(t)){s=d(o[1].trim());if(s===undefined){if(typeof u==="function"){var r=u(t,o,a);s=typeof r==="string"?r:""}else if(m){s=o[0];continue}else{i.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(t));s=""}}else if(typeof s!=="string"&&!i.useRawValueToEscape){s=U(s)}var n=e.safeValue(s);t=t.replace(o[0],n);if(m){e.regex.lastIndex+=n.length;e.regex.lastIndex-=o[0].length}else{e.regex.lastIndex=0}l++;if(l>=i.maxReplaces){break}}}));return t}},{key:"nest",value:function e(t,r){var n=this;var a=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var i;var o;var s=N({},a);s.applyPostProcessor=false;delete s.defaultValue;function l(e,t){var r=this.nestingOptionsSeparator;if(e.indexOf(r)<0)return e;var n=e.split(new RegExp("".concat(r,"[ ]*{")));var a="{".concat(n[1]);e=n[0];a=this.interpolate(a,s);a=a.replace(/'/g,'"');try{s=JSON.parse(a);if(t)s=N({},t,s)}catch(t){this.logger.warn("failed parsing options string in nesting for key ".concat(e),t);return"".concat(e).concat(r).concat(a)}delete s.defaultValue;return e}while(i=this.nestingRegexp.exec(t)){var c=[];var p=false;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){var d=i[1].split(this.formatSeparator).map((function(e){return e.trim()}));i[1]=d.shift();c=d;p=true}o=r(l.call(this,i[1].trim(),s),s);if(o&&i[0]===t&&typeof o!=="string")return o;if(typeof o!=="string")o=U(o);if(!o){this.logger.warn("missed to resolve ".concat(i[1]," for nesting ").concat(t));o=""}if(p){o=c.reduce((function(e,t){return n.format(e,t,a.lng,N({},a,{interpolationkey:i[1].trim()}))}),o.trim())}t=t.replace(i[0],o);this.regexp.lastIndex=0}return t}}]);return e}();function ge(e,t){var r=e.indexOf(t);while(r!==-1){e.splice(r,1);r=e.indexOf(t)}}var ye=function(e){A(t,e);function t(e,r,n){var a;var i=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};z(this,t);a=B(this,q(t).call(this));if(Z){D.call(T(a))}a.backend=e;a.store=r;a.services=n;a.languageUtils=n.languageUtils;a.options=i;a.logger=L.create("backendConnector");a.state={};a.queue=[];if(a.backend&&a.backend.init){a.backend.init(n,i.backend,i)}return a}w(t,[{key:"queueLoad",value:function e(t,r,n,a){var i=this;var o=[];var s=[];var l=[];var c=[];t.forEach((function(e){var t=true;r.forEach((function(r){var a="".concat(e,"|").concat(r);if(!n.reload&&i.store.hasResourceBundle(e,r)){i.state[a]=2}else if(i.state[a]<0);else if(i.state[a]===1){if(s.indexOf(a)<0)s.push(a)}else{i.state[a]=1;t=false;if(s.indexOf(a)<0)s.push(a);if(o.indexOf(a)<0)o.push(a);if(c.indexOf(r)<0)c.push(r)}}));if(!t)l.push(e)}));if(o.length||s.length){this.queue.push({pending:s,loaded:{},errors:[],callback:a})}return{toLoad:o,pending:s,toLoadLanguages:l,toLoadNamespaces:c}}},{key:"loaded",value:function e(t,r,n){var a=t.split("|");var i=a[0];var o=a[1];if(r)this.emit("failedLoading",i,o,r);if(n){this.store.addResourceBundle(i,o,n)}this.state[t]=r?-1:2;var e={};this.queue.forEach((function(n){G(n.loaded,[i],o);ge(n.pending,t);if(r)n.errors.push(r);if(n.pending.length===0&&!n.done){Object.keys(n.loaded).forEach((function(t){if(!e[t])e[t]=[];if(n.loaded[t].length){n.loaded[t].forEach((function(r){if(e[t].indexOf(r)<0)e[t].push(r)}))}}));n.done=true;if(n.errors.length){n.callback(n.errors)}else{n.callback()}}}));this.emit("loaded",e);this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function e(t,r,n){var a=this;var i=arguments.length>3&&arguments[3]!==undefined?arguments[3]:0;var o=arguments.length>4&&arguments[4]!==undefined?arguments[4]:350;var s=arguments.length>5?arguments[5]:undefined;if(!t.length)return s(null,{});return this.backend[n](t,r,(function(e,l){if(e&&l&&i<5){setTimeout((function(){a.read.call(a,t,r,n,i+1,o*2,s)}),o);return}s(e,l)}))}},{key:"prepareLoading",value:function e(t,r){var n=this;var a=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var i=arguments.length>3?arguments[3]:undefined;if(!this.backend){this.logger.warn("No backend was added via i18next.use. Will not load resources.");return i&&i()}if(typeof t==="string")t=this.languageUtils.toResolveHierarchy(t);if(typeof r==="string")r=[r];var o=this.queueLoad(t,r,a,i);if(!o.toLoad.length){if(!o.pending.length)i();return null}o.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function e(t,r,n){this.prepareLoading(t,r,{},n)}},{key:"reload",value:function e(t,r,n){this.prepareLoading(t,r,{reload:true},n)}},{key:"loadOne",value:function e(t){var r=this;var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"";var a=t.split("|");var i=a[0];var o=a[1];this.read(i,o,"read",undefined,undefined,(function(e,a){if(e)r.logger.warn("".concat(n,"loading namespace ").concat(o," for language ").concat(i," failed"),e);if(!e&&a)r.logger.log("".concat(n,"loaded namespace ").concat(o," for language ").concat(i),a);r.loaded(t,e,a)}))}},{key:"saveMissing",value:function e(t,r,n,a,i){var o=arguments.length>5&&arguments[5]!==undefined?arguments[5]:{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(r)){this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(r,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(n===undefined||n===null||n==="")return;if(this.backend&&this.backend.create){this.backend.create(t,r,n,a,null,N({},o,{isUpdate:i}))}if(!t||!t[0])return;this.store.addResource(t[0],r,n,a)}}]);return t}(D);function ve(){return{debug:false,initImmediate:true,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:false,supportedLngs:false,nonExplicitSupportedLngs:false,load:"all",preload:false,simplifyPluralSuffix:true,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:false,saveMissing:false,updateMissing:false,saveMissingTo:"fallback",saveMissingPlurals:true,missingKeyHandler:false,missingInterpolationHandler:false,postProcess:false,postProcessPassResolved:false,returnNull:true,returnEmptyString:true,returnObjects:false,joinArrays:false,returnedObjectHandler:false,parseMissingKeyHandler:false,appendNamespaceToMissingKey:false,appendNamespaceToCIMode:false,overloadTranslationOptionHandler:function e(t){var r={};if(b(t[1])==="object")r=t[1];if(typeof t[1]==="string")r.defaultValue=t[1];if(typeof t[2]==="string")r.tDescription=t[2];if(b(t[2])==="object"||b(t[3])==="object"){var n=t[3]||t[2];Object.keys(n).forEach((function(e){r[e]=n[e]}))}return r},interpolation:{escapeValue:true,format:function e(t,r,n,a){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:true}}}function be(e){if(typeof e.ns==="string")e.ns=[e.ns];if(typeof e.fallbackLng==="string")e.fallbackLng=[e.fallbackLng];if(typeof e.fallbackNS==="string")e.fallbackNS=[e.fallbackNS];if(e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0){e.supportedLngs=e.supportedLngs.concat(["cimode"])}return e}function xe(){}var Ne=function(e){A(t,e);function t(){var e;var r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var n=arguments.length>1?arguments[1]:undefined;z(this,t);e=B(this,q(t).call(this));if(Z){D.call(T(e))}e.options=be(r);e.services={};e.logger=L;e.modules={external:[]};if(n&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate){e.init(r,n);return B(e,T(e))}setTimeout((function(){e.init(r,n)}),0)}return e}w(t,[{key:"init",value:function e(){var t=this;var r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var n=arguments.length>1?arguments[1]:undefined;if(typeof r==="function"){n=r;r={}}if(!r.defaultNS&&r.ns){if(typeof r.ns==="string"){r.defaultNS=r.ns}else if(r.ns.indexOf("translation")<0){r.defaultNS=r.ns[0]}}this.options=N({},ve(),this.options,be(r));if(r.keySeparator!==undefined){this.options.userDefinedKeySeparator=r.keySeparator}this.format=this.options.interpolation.format;if(!n)n=xe;function a(e){if(!e)return null;if(typeof e==="function")return new e;return e}if(!this.options.isClone){if(this.modules.logger){L.init(a(this.modules.logger),this.options)}else{L.init(null,this.options)}var i=new le(this.options);this.store=new ne(this.options.resources,this.options);var o=this.services;o.logger=L;o.resourceStore=this.store;o.languageUtils=i;o.pluralResolver=new fe(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix});o.interpolator=new he(this.options);o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)};o.backendConnector=new ye(a(this.modules.backend),o.resourceStore,o,this.options);o.backendConnector.on("*",(function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++){n[a-1]=arguments[a]}t.emit.apply(t,[e].concat(n))}));if(this.modules.languageDetector){o.languageDetector=a(this.modules.languageDetector);o.languageDetector.init(o,this.options.detection,this.options)}if(this.modules.i18nFormat){o.i18nFormat=a(this.modules.i18nFormat);if(o.i18nFormat.init)o.i18nFormat.init(this)}this.translator=new oe(this.services,this.options);this.translator.on("*",(function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++){n[a-1]=arguments[a]}t.emit.apply(t,[e].concat(n))}));this.modules.external.forEach((function(e){if(e.init)e.init(t)}))}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);if(s.length>0&&s[0]!=="dev")this.options.lng=s[0]}if(!this.services.languageDetector&&!this.options.lng){this.logger.warn("init: no languageDetector is used and no lng is defined")}var l=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];l.forEach((function(e){t[e]=function(){var r;return(r=t.store)[e].apply(r,arguments)}}));var c=["addResource","addResources","addResourceBundle","removeResourceBundle"];c.forEach((function(e){t[e]=function(){var r;(r=t.store)[e].apply(r,arguments);return t}}));var p=j();var d=function e(){var r=function e(r,a){if(t.isInitialized&&!t.initializedStoreOnce)t.logger.warn("init: i18next is already initialized. You should call init just once!");t.isInitialized=true;if(!t.options.isClone)t.logger.log("initialized",t.options);t.emit("initialized",t.options);p.resolve(a);n(r,a)};if(t.languages&&t.options.compatibilityAPI!=="v1"&&!t.isInitialized)return r(null,t.t.bind(t));t.changeLanguage(t.options.lng,r)};if(this.options.resources||!this.options.initImmediate){d()}else{setTimeout(d,0)}return p}},{key:"loadResources",value:function e(t){var r=this;var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:xe;var a=n;var i=typeof t==="string"?t:this.language;if(typeof t==="function")a=t;if(!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode")return a();var o=[];var s=function e(t){if(!t)return;var n=r.services.languageUtils.toResolveHierarchy(t);n.forEach((function(e){if(o.indexOf(e)<0)o.push(e)}))};if(!i){var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.forEach((function(e){return s(e)}))}else{s(i)}if(this.options.preload){this.options.preload.forEach((function(e){return s(e)}))}this.services.backendConnector.load(o,this.options.ns,a)}else{a(null)}}},{key:"reloadResources",value:function e(t,r,n){var a=j();if(!t)t=this.languages;if(!r)r=this.options.ns;if(!n)n=xe;this.services.backendConnector.reload(t,r,(function(e){a.resolve();n(e)}));return a}},{key:"use",value:function e(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");if(t.type==="backend"){this.modules.backend=t}if(t.type==="logger"||t.log&&t.warn&&t.error){this.modules.logger=t}if(t.type==="languageDetector"){this.modules.languageDetector=t}if(t.type==="i18nFormat"){this.modules.i18nFormat=t}if(t.type==="postProcessor"){ae.addPostProcessor(t)}if(t.type==="3rdParty"){this.modules.external.push(t)}return this}},{key:"changeLanguage",value:function e(t,r){var n=this;this.isLanguageChangingTo=t;var a=j();this.emit("languageChanging",t);var i=function e(t){n.language=t;n.languages=n.services.languageUtils.toResolveHierarchy(t);n.resolvedLanguage=undefined;if(["cimode","dev"].indexOf(t)>-1)return;for(var r=0;r<n.languages.length;r++){var a=n.languages[r];if(["cimode","dev"].indexOf(a)>-1)continue;if(n.store.hasLanguageSomeTranslations(a)){n.resolvedLanguage=a;break}}};var o=function e(t,o){if(o){i(o);n.translator.changeLanguage(o);n.isLanguageChangingTo=undefined;n.emit("languageChanged",o);n.logger.log("languageChanged",o)}else{n.isLanguageChangingTo=undefined}a.resolve((function(){return n.t.apply(n,arguments)}));if(r)r(t,(function(){return n.t.apply(n,arguments)}))};var s=function e(r){if(!t&&!r&&n.services.languageDetector)r=[];var a=typeof r==="string"?r:n.services.languageUtils.getBestMatchFromCodes(r);if(a){if(!n.language){i(a)}if(!n.translator.language)n.translator.changeLanguage(a);if(n.services.languageDetector)n.services.languageDetector.cacheUserLanguage(a)}n.loadResources(a,(function(e){o(e,a)}))};if(!t&&this.services.languageDetector&&!this.services.languageDetector.async){s(this.services.languageDetector.detect())}else if(!t&&this.services.languageDetector&&this.services.languageDetector.async){this.services.languageDetector.detect(s)}else{s(t)}return a}},{key:"getFixedT",value:function e(t,r,n){var a=this;var i=function e(t,r){var i;if(b(r)!=="object"){for(var o=arguments.length,s=new Array(o>2?o-2:0),l=2;l<o;l++){s[l-2]=arguments[l]}i=a.options.overloadTranslationOptionHandler([t,r].concat(s))}else{i=N({},r)}i.lng=i.lng||e.lng;i.lngs=i.lngs||e.lngs;i.ns=i.ns||e.ns;var c=a.options.keySeparator||".";var p=n?"".concat(n).concat(c).concat(t):t;return a.t(p,i)};if(typeof t==="string"){i.lng=t}else{i.lngs=t}i.ns=r;i.keyPrefix=n;return i}},{key:"t",value:function e(){var t;return this.translator&&(t=this.translator).translate.apply(t,arguments)}},{key:"exists",value:function e(){var t;return this.translator&&(t=this.translator).exists.apply(t,arguments)}},{key:"setDefaultNamespace",value:function e(t){this.options.defaultNS=t}},{key:"hasLoadedNamespace",value:function e(t){var r=this;var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(!this.isInitialized){this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages);return false}if(!this.languages||!this.languages.length){this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages);return false}var a=this.resolvedLanguage||this.languages[0];var i=this.options?this.options.fallbackLng:false;var o=this.languages[this.languages.length-1];if(a.toLowerCase()==="cimode")return true;var s=function e(t,n){var a=r.services.backendConnector.state["".concat(t,"|").concat(n)];return a===-1||a===2};if(n.precheck){var l=n.precheck(this,s);if(l!==undefined)return l}if(this.hasResourceBundle(a,t))return true;if(!this.services.backendConnector.backend)return true;if(s(a,t)&&(!i||s(o,t)))return true;return false}},{key:"loadNamespaces",value:function e(t,r){var n=this;var a=j();if(!this.options.ns){r&&r();return Promise.resolve()}if(typeof t==="string")t=[t];t.forEach((function(e){if(n.options.ns.indexOf(e)<0)n.options.ns.push(e)}));this.loadResources((function(e){a.resolve();if(r)r(e)}));return a}},{key:"loadLanguages",value:function e(t,r){var n=j();if(typeof t==="string")t=[t];var a=this.options.preload||[];var i=t.filter((function(e){return a.indexOf(e)<0}));if(!i.length){if(r)r();return Promise.resolve()}this.options.preload=a.concat(i);this.loadResources((function(e){n.resolve();if(r)r(e)}));return n}},{key:"dir",value:function e(t){if(!t)t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language);if(!t)return"rtl";var r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"];return r.indexOf(this.services.languageUtils.getLanguagePartFromCode(t))>=0?"rtl":"ltr"}},{key:"createInstance",value:function e(){var r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var n=arguments.length>1?arguments[1]:undefined;return new t(r,n)}},{key:"cloneInstance",value:function e(){var r=this;var n=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var a=arguments.length>1&&arguments[1]!==undefined?arguments[1]:xe;var i=N({},this.options,n,{isClone:true});var o=new t(i);var s=["store","services","language"];s.forEach((function(e){o[e]=r[e]}));o.services=N({},this.services);o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)};o.translator=new oe(o.services,o.options);o.translator.on("*",(function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++){r[n-1]=arguments[n]}o.emit.apply(o,[e].concat(r))}));o.init(i,a);o.translator.options=o.options;o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)};return o}},{key:"toJSON",value:function e(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]);return t}(D);var ze=new Ne;var Se={heading:"Drucke mit ezeep Blue",description:"Melde dich mit deinem ezeep Blue-Konto an, um zu drucken.",action:"Anmelden"};var we={heading:"Keine Datei ausgewählt",description:"Wähle zunächst eine Datei zum Drucken aus.",action:"OK"};var Pe={loading:"Lade meine Drucker…",print:"Drucken",printer:"Drucker",print_processing:"Drucken…",print_success:"Erfolgreich gedruckt.",print_failed:"Druck fehlgeschlagen",not_supported:"Der ausgewählte Dateityp wird nicht unterstützt.",color:"Farbe",orientation:"Ausrichtung",size:"Papierformat",duplex:"Beidseitig",quality:"Druckqualität",select_printer:"Wähle einen Drucker",select_color:"Wähle Farbe/Graustufen",select_size:"Wähle Papierformat",select_orientation:"Wähle Ausrichtung",select_quality:"Wähle Druckqualität",select_duplex:"Wähle Beidseitig",color_color:"Farbe",color_grayscale:"Graustufen",orientation_portrait:"Hochformat",orientation_landscape:"Querformat",unknown_location:"Unbekannter Standort",no_printers:"Keine Drucker gefunden.",prepare_upload:"Vorbereiten…",uploading:"Hochladen…",duplex_none:"Keine",copies:"Kopien",duplex_long:"auf der langen Seite umdrehen",duplex_short:"auf der kurzen Seite umdrehen",pull_print_success:"Bereit zum Auslösen."};var Ce={login:"Anmelden",print:"Drucken",cancel:"Abbrechen",close:"Schließen",retry:"Wiederholen",select_printer:"Wähle Drucker"};var Re={description:"Ziehe eine Datei hier in den Browser ",meta_leading:"oder",meta_select:"wähle eine Datei aus",meta_trailing:"um mit ezeep Blue zu drucken.",selected_file:"Ausgewählte Datei:"};var _e={theme:"Farbschema",appearance:"Darstellung",system:"System",light:"Hell",dark:"Dunkel",account:"Konto verwalten",help:"Hilfe & Unterstützung",logout:"Ausloggen"};var Ee={login_dialog:Se,no_document_dialog:we,printer_selection:Pe,button_actions:Ce,upload:Re,user_menu:_e};var ke={heading:"Print with ezeep Blue",description:"Sign in with your ezeep Blue account to print.",action:"Sign in"};var Oe={heading:"No file selected",description:"Select a file first to print.",action:"OK"};var Te={loading:"Loading My Printers…",print_processing:"Printing…",print_success:"Successfully printed.",pull_print_success:"Ready to be released.",print_failed:"Print failed",not_supported:"The selected file type is not supported.",prepare_upload:"Preparing…",uploading:"Uploading…",print:"Print",printer:"Printer",color:"Color",orientation:"Orientation",size:"Paper Size",duplex:"Double-sided",duplex_none:"None",duplex_long:"flip on long side",duplex_short:"flip on short side",quality:"Print Quality",select_printer:"Select a printer",select_color:"Select Color/Grayscale",select_orientation:"Select Orientation",select_size:"Select Paper Size",select_quality:"Select Print Quality",select_duplex:"Select Double-sided",color_color:"Color",color_grayscale:"Grayscale",orientation_portrait:"Portrait",orientation_landscape:"Landscape",unknown_location:"Unknown location",no_printers:"No printers found.",copies:"Copies"};var Be={login:"Sign In",print:"Print",cancel:"Cancel",close:"Close",retry:"Retry",select_printer:"Select Printer"};var qe={description:"Drop a file here into the browser ",meta_leading:"or",meta_select:"select a file",meta_trailing:"to print with ezeep Blue.",selected_file:"Selected File:"};var Me={theme:"Color theme",appearance:"Appearance",system:"System",light:"Light",dark:"Dark",account:"Manage Account",help:"Help & Support",logout:"Logout"};var Ae={login_dialog:ke,no_document_dialog:Oe,printer_selection:Te,button_actions:Be,upload:qe,user_menu:Me};function Ie(e){return Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&")}function He(e){var t={en:{translation:Ae},de:{translation:Ee}};if(e!=""){ze.init({resources:t,lng:e,nsSeparator:false,fallbackLng:"en"})}else{ze.init({resources:t,lng:navigator.language,nsSeparator:false,fallbackLng:"en"})}}var Le=function(e){var t=e.fn,r=e.validate,n=e.interval,a=e.maxAttempts;return __awaiter(p,void 0,void 0,(function(){var e,i;var o=this;return __generator(this,(function(s){e=0;i=function(s,l){return __awaiter(o,void 0,void 0,(function(){var o;return __generator(this,(function(c){switch(c.label){case 0:return[4,t()];case 1:o=c.sent();e++;if(r(o)){return[2,s(o)]}else if(a&&e===a){return[2,l(new Error("Exceeded max attempts."))]}else{setTimeout(i,n,s,l)}return[2]}}))}))};return[2,new Promise(i)]}))}))};var De=function(e){var t={};Object.keys(e).forEach((function(r){if(e[r]!==""){t[r]=e[r]}}));return t};var je=function(){function e(e,t){this.urlParams=new URLSearchParams;this.isAuthorized=false;this.redirectURI=e;this.clientID=t;this.oauthUrl=Ue.state.authApiHostUrl;this.authURI=new URL("https://".concat(this.oauthUrl,"/oauth/authorize/"));this.accessTokenURL="https://".concat(this.oauthUrl,"/oauth/access_token/")}e.prototype.generateCodeVerifier=function(){if(Ue.state.codeVerifier!==""){this.codeVerifier=Ue.state.codeVerifier}else{var e=new Uint8Array(128);var t=crypto.getRandomValues(e);var r=btoa(t.toString()).substr(0,128);this.codeVerifier=r;Ue.state.codeVerifier=this.codeVerifier}};e.prototype.generateCodeChallenge=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,n,a;return __generator(this,(function(i){switch(i.label){case 0:t=new TextEncoder;r=t.encode(e);return[4,crypto.subtle.digest("SHA-256",r)];case 1:n=i.sent();a=btoa(String.fromCharCode.apply(null,new Uint8Array(n)));this.codeChallenge=a.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"");return[2]}}))}))};e.prototype.buildAuthURI=function(){this.urlParams.append("response_type","code");this.urlParams.append("client_id",this.clientID);this.urlParams.append("redirect_uri",this.redirectURI);this.urlParams.append("code_challenge",this.codeChallenge);this.urlParams.append("code_challenge_method","S256");this.authURI.search=this.urlParams.toString();Ue.state.authUri=this.authURI.toString()};e.prototype.getAccessToken=function(){var e=this;return fetch(this.accessTokenURL,{credentials:"include",headers:{Authorization:"Basic "+btoa(this.clientID+":"),"Content-Type":"application/x-www-form-urlencoded"},method:"POST",body:Ie({grant_type:"authorization_code",scope:"printing",code:Ue.state.code,redirect_uri:this.redirectURI,code_verifier:Ue.state.codeVerifier})}).then((function(e){return e.json()})).then((function(t){if(t.access_token){Ue.state.isAuthorized=true;e.isAuthorized=Ue.state.isAuthorized;localStorage.setItem("isAuthorized",e.isAuthorized.toString());e.accessToken=t.access_token;localStorage.setItem("access_token",e.accessToken);Ue.state.accessToken=e.accessToken;e.refreshToken=t.refresh_token;localStorage.setItem("refreshToken",e.refreshToken);Ue.state.refreshToken=e.refreshToken}}))};e.prototype.refreshTokens=function(){var e=this;fetch(this.accessTokenURL,{credentials:"include",headers:{Authorization:"Basic "+btoa(this.clientID+":"),"Content-Type":"application/x-www-form-urlencoded"},method:"POST",body:Ie({grant_type:"refresh_token",scope:"printing",refresh_token:Ue.state.refreshToken})}).then((function(e){return e.json()})).then((function(t){if(t.access_token){e.accessToken=t.access_token;localStorage.setItem("access_token",e.accessToken);Ue.state.accessToken=e.accessToken;e.refreshToken=t.refresh_token;localStorage.setItem("refreshToken",e.refreshToken);Ue.state.refreshToken=e.refreshToken;Ue.state.isAuthorized=true}}))};e.prototype.revokeRefreshToken=function(){fetch("https://".concat(this.oauthUrl,"/oauth/revoke/"),{credentials:"include",headers:{Authorization:"Basic "+btoa(this.clientID+":"),"Content-Type":"application/x-www-form-urlencoded"},method:"POST",body:Ie({token:Ue.state.refreshToken})}).then((function(e){console.log(e.json())})).catch((function(e){console.log(e)}))};return e}();var Ue=v({code:"",codeVerifier:"",accessToken:"",refreshToken:"",isAuthorized:false,devApi:false,authApiHostUrl:"",redirectUri:"",authUri:""});function Fe(){var e=new URLSearchParams(window.location.search);var t=e.get("code");if(window.opener){if(t){window.opener.postMessage(t,Ue.state.redirectUri);window.close()}}}var Ve=":host{--ezp-theme-solid:var(--ezp-accent-cyan-solid);--ezp-theme-translucent:var(--ezp-accent-cyan-translucent);display:block}";var Ke=e("ezp_auth",function(){function e(e){n(this,e);this.authCancel=a(this,"authCancel",7);this.authSuccess=a(this,"authSuccess",7);this.oauthPopupWindow=null;this.previousUrl=null}e.prototype.listenDialogAction=function(){this.openSignInWindow(this.auth.authURI.toString(),"ezeep Login")};e.prototype.listenDialogClose=function(){this.authCancel.emit()};e.prototype.listenStatusCancel=function(){this.authCancel.emit()};e.prototype.openSignInWindow=function(e,t){var r=this;if(Ue.state.isAuthorized){this.authCancel.emit();this.authSuccess.emit();return}window.removeEventListener("message",this.receiveMessage);var n="toolbar=no, menubar=no, width=600, height=7000, top=100, left=100";if(this.oauthPopupWindow===null||this.oauthPopupWindow.closed){this.oauthPopupWindow=window.open(e,t,n)}else if(this.previousUrl!==this.auth.authURI.toString()){this.oauthPopupWindow=window.open(e,t,n);if(!this.oauthPopupWindow||this.oauthPopupWindow.closed||typeof this.oauthPopupWindow.closed=="undefined"){alert("popup blocked")}this.oauthPopupWindow.focus()}else{this.oauthPopupWindow.focus()}window.addEventListener("message",(function(e){return r.receiveMessage(e)}),false);this.previousUrl=this.auth.authURI};e.prototype.receiveMessage=function(e){var t=this;Ue.state.code=e.data;this.auth.getAccessToken().then((function(){t.authCancel.emit();t.authSuccess.emit()}))};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:this.auth=new je(this.redirectURI,this.clientID);if(!this.code)return[3,2];Ue.state.code=this.code;return[4,this.auth.getAccessToken()];case 1:e.sent();this.authCancel.emit();this.authSuccess.emit();e.label=2;case 2:if(!(Ue.state.isAuthorized===false))return[3,4];this.auth.generateCodeVerifier();return[4,this.auth.generateCodeChallenge(Ue.state.codeVerifier)];case 3:e.sent();this.auth.buildAuthURI();e.label=4;case 4:if(this.hidelogin&&this.trigger==="button"){this.openSignInWindow(this.auth.authURI.toString(),"ezeep Login")}return[2]}}))}))};e.prototype.render=function(){var e=this;return i(o,null,this.hidelogin&&this.trigger==="button"?i("ezp-status",{description:ze.t("login_dialog.action"),processing:true,cancel:true}):this.hidelogin&&this.trigger==="file"?i("ezp-text-button",{type:"button",level:"primary",onClick:function(){return e.openSignInWindow(e.auth.authURI.toString(),"ezeep Login")},label:ze.t("button_actions.select_printer")}):i("ezp-dialog",{heading:ze.t("login_dialog.heading"),description:ze.t("login_dialog.description"),action:ze.t("login_dialog.action"),iconName:"logo",iconSize:"huge",iconFramed:false,instance:"login"}))};return e}());Ke.style=Ve;var Ge=":host{-webkit-animation:var(--ezp-backdrop-animation-name, host-in) var(--ezp-duration-3) forwards var(--ezp-easing-out-quart);animation:var(--ezp-backdrop-animation-name, host-in) var(--ezp-duration-3) forwards var(--ezp-easing-out-quart);background:var(--ezp-core-backdrop);border-radius:var(--ezp-backdrop-border-radius, 6px);display:block;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%;z-index:4}:host(.hide){--ezp-backdrop-animation-name:host-out}@-webkit-keyframes host-in{0%{opacity:0}100%{opacity:1}}@keyframes host-in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes host-out{0%{opacity:1}100%{opacity:0}}@keyframes host-out{0%{opacity:1}100%{opacity:0}}";var We=e("ezp_backdrop",function(){function e(e){n(this,e);this.backdropHideStart=a(this,"backdropHideStart",7);this.backdropHideEnd=a(this,"backdropHideEnd",7);this.visible=true}e.prototype.handleClick=function(){this.visible=false;this.backdropHideStart.emit()};e.prototype.listenAnimationEnd=function(){if(!this.visible){this.backdropHideEnd.emit()}};e.prototype.render=function(){var e=this;return i(o,{class:{hide:!this.visible},onClick:function(){return e.handleClick()}})};Object.defineProperty(e.prototype,"component",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());We.style=Ge;var Xe=":host{--ezp-icon-fill:var(--ezp-theme-solid);-ms-flex-line-pack:center;align-content:center;background:var(--ezp-core-backdrop);display:grid;grid-template:auto/minmax(auto, 280px);height:100%;-ms-flex-pack:center;justify-content:center;left:0;position:fixed;top:0;width:100%}#box{background:var(--ezp-core-surface-tertiary);border-radius:6px;-webkit-box-shadow:var(--ezp-dialog-box-boxShadow, 0 0 0 1px var(--ezp-black-10));box-shadow:var(--ezp-dialog-box-boxShadow, 0 0 0 1px var(--ezp-black-10))}#header{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end;padding:var(--ezp-spacing-2) var(--ezp-spacing-3)}#body{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-5);padding:0 var(--ezp-spacing-5);text-align:center}#text{color:var(--ezp-core-foreground-primary);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-4)}#footer{display:grid;grid-template:auto/minmax(144px, auto);-ms-flex-pack:center;justify-content:center;padding:var(--ezp-spacing-5)}";var Qe=e("ezp_dialog",function(){function e(e){var t=this;n(this,e);this.dialogClose=a(this,"dialogClose",7);this.dialogAction=a(this,"dialogAction",7);this.action=ze.t("button_actions.close");this.iconSize="large";this.iconFramed=true;this.handleClose=function(){t.dialogClose.emit(t.instance)};this.handleAction=function(){t.dialogAction.emit(t.instance)}}e.prototype.componentWillLoad=function(){};e.prototype.render=function(){return i(o,null,i("div",{id:"box"},i("div",{id:"header"},i("ezp-icon-button",{level:"tertiary",icon:"close",type:"button",onClick:this.handleClose})),i("div",{id:"body"},this.iconName&&i("ezp-icon",{name:this.iconName,size:this.iconSize,framed:this.iconFramed}),i("div",{id:"text"},i("ezp-label",{text:this.heading,weight:"heavy"}),i("ezp-label",{text:this.description}))),i("div",{id:"footer"},i("ezp-text-button",{type:"button",level:"primary",onClick:this.handleAction,label:this.action}))))};return e}());Qe.style=Xe;var Ye=":host{-ms-flex-line-pack:center;align-content:center;background:var(--ezp-icon-background, transparent);border-radius:var(--ezp-icon-borderRadius, 0);display:grid;grid-template:var(--ezp-icon-gridTemplate)/var(--ezp-icon-gridTemplate);height:var(--ezp-icon-height, var(--ezp-icon-size));-ms-flex-pack:center;justify-content:center;padding:var(--ezp-icon-padding, 0);width:var(--ezp-icon-width, var(--ezp-icon-size))}:host(.framed){--ezp-icon-background:var(--ezp-core-shade-primary);--ezp-icon-borderRadius:50%;--ezp-icon-padding:var(--ezp-icon-frame)}:host(.normal){--ezp-icon-size:18px;--ezp-icon-gridTemplate:24px;--ezp-icon-frame:var(--ezp-spacing-3)}:host(.large){--ezp-icon-size:36px;--ezp-icon-gridTemplate:48px;--ezp-icon-frame:var(--ezp-spacing-4)}:host(.huge){--ezp-icon-size:54px;--ezp-icon-gridTemplate:72px;--ezp-icon-frame:var(--ezp-spacing-5)}svg{display:block;fill:var(--ezp-icon-fill, currentColor);height:100%;width:100%}";var Je=e("ezp_icon",function(){function e(e){n(this,e);this.size="normal";this.framed=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){switch(t.label){case 0:return[4,fetch(l("./assets/glyph-".concat(this.name,".svg"))).then((function(e){return e.text()})).then((function(t){e.glyph=t})).catch((function(e){return console.log(e)}))];case 1:t.sent();return[2]}}))}))};e.prototype.render=function(){return i(o,{class:"".concat(this.size," ").concat(this.framed?"framed":"")},i("div",{id:"glyph",innerHTML:this.glyph}))};Object.defineProperty(e,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return e}());Je.style=Ye;var $e=":host{display:block}:host(.primary){--ezp-iconButton-background-disabled:var(--ezp-core-shade-primary);--ezp-iconButton-background-init:var(--ezp-theme-solid);--ezp-iconButton-color-disabled:var(--ezp-core-foreground-tertiary);--ezp-iconButton-color-init:var(--ezp-white-100);--ezp-iconButton-opacity-active:0.74;--ezp-iconButton-opacity-hover:0.84}:host(.secondary){--ezp-iconButton-background-active:var(--ezp-core-shade-tertiary);--ezp-iconButton-background-disabled:var(--ezp-core-shade-primary);--ezp-iconButton-background-hover:var(--ezp-core-shade-secondary);--ezp-iconButton-background-init:var(--ezp-core-shade-primary);--ezp-iconButton-color-disabled:var(--ezp-core-foreground-tertiary);--ezp-iconButton-color-init:var(--ezp-theme-solid)}:host(.tertiary){--ezp-iconButton-background-active:var(--ezp-core-shade-secondary);--ezp-iconButton-background-hover:var(--ezp-core-shade-primary);--ezp-iconButton-background-init:transparent;--ezp-iconButton-color-disabled:var(--ezp-core-foreground-tertiary);--ezp-iconButton-color-init:var(--ezp-theme-solid)}:host(.quaternary){--ezp-iconButton-background-init:transparent;--ezp-iconButton-color-disabled:var(--ezp-core-foreground-tertiary);--ezp-iconButton-color-init:var(--ezp-theme-solid);--ezp-iconButton-opacity-active:0.58;--ezp-iconButton-opacity-hover:0.74}#button{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-iconButton-background, var(--ezp-iconButton-background-init));border:0;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;color:var(--ezp-iconButton-color, var(--ezp-iconButton-color-init));cursor:var(--ezp-iconButton-cursor, pointer);display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;margin:0;opacity:var(--ezp-iconButton-opacity, 1);outline:none;padding:var(--ezp-spacing-2)}@media (hover: hover){#button:not(:disabled):hover{--ezp-iconButton-background:var(\n --ezp-iconButton-background-hover,\n var(--ezp-iconButton-background-init)\n );--ezp-iconButton-opacity:var(--ezp-iconButton-opacity-hover, 1)}#button:not(:disabled):active{--ezp-iconButton-background:var(\n --ezp-iconButton-background-active,\n var(--ezp-iconButton-background-init)\n );--ezp-iconButton-opacity:var(--ezp-iconButton-opacity-active, 1)}}#button:disabled{--ezp-iconButton-background:var(\n --ezp-iconButton-background-disabled,\n var(--ezp-iconButton-background-init)\n );--ezp-iconButton-color:var(--ezp-iconButton-color-disabled);--ezp-iconButton-cursor:default}";var Ze=e("ezp_icon_button",function(){function e(e){n(this,e);this.blank=false;this.disabled=false;this.level="primary"}e.prototype.render=function(){var e=this.type!==undefined?"button":"a";var t=this.type!==undefined?{type:this.type,disabled:this.disabled}:{href:this.href,target:this.blank?"_blank":"_self"};return i(o,{class:"".concat(this.level)},i(e,Object.assign({id:"button"},t),i("ezp-icon",{name:this.icon})))};return e}());Ze.style=$e;var et=':host{display:block;min-width:var(--ezp-label-minWidth, auto);padding-bottom:1px;padding-top:1px}:host::before,:host::after{content:"";display:block;height:0}:host::before{margin-top:calc((var(--ezp-label-offset) + 1px) * -1)}:host::after{margin-bottom:calc((var(--ezp-label-offset) + 1px) * -1)}:host(.no-wrap){--ezp-label-whiteSpace:nowrap}:host(.ellipsis){--ezp-label-minWidth:0;--ezp-label-overflow:hidden;--ezp-label-textOverflow:ellipsis;--ezp-label-whiteSpace:nowrap;--ezp-label-width:100%}:host(.primary){--ezp-label-fontSize:17px;--ezp-label-lineHeight:24px;--ezp-label-letterSpacing:-0.0127756105em;--ezp-label-offset:6px}:host(.secondary){--ezp-label-fontSize:14px;--ezp-label-lineHeight:20px;--ezp-label-letterSpacing:-0.0062235443em;--ezp-label-offset:5px}:host(.tertiary){--ezp-label-fontSize:12px;--ezp-label-lineHeight:18px;--ezp-label-letterSpacing:0.0004907745em;--ezp-label-offset:5px}:host(.soft){--ezp-label-fontWeight:400}:host(.strong){--ezp-label-fontWeight:500}:host(.heavy){--ezp-label-fontWeight:600}#text{font-size:var(--ezp-label-fontSize);font-weight:var(--ezp-label-fontWeight);letter-spacing:var(--ezp-label-letterSpacing);line-height:var(--ezp-label-lineHeight);overflow:var(--ezp-label-overflow, visible);text-overflow:var(--ezp-label-textOverflow, clip);white-space:var(--ezp-label-whiteSpace, normal);width:var(--ezp-label-width, auto)}';var tt=e("ezp_label",function(){function e(e){n(this,e);this.ellipsis=false;this.level="secondary";this.noWrap=false;this.text="Label";this.weight="soft"}e.prototype.render=function(){return i(o,{class:"".concat(this.level," ").concat(this.weight," ").concat(this.ellipsis?"ellipsis":""," ").concat(this.noWrap?"no-wrap":"")},i("div",{id:"text"},this.text))};return e}());tt.style=et;var rt=typeof globalThis!=="undefined"&&globalThis||typeof self!=="undefined"&&self||typeof rt!=="undefined"&&rt;var nt={searchParams:"URLSearchParams"in rt,iterable:"Symbol"in rt&&"iterator"in Symbol,blob:"FileReader"in rt&&"Blob"in rt&&function(){try{new Blob;return true}catch(e){return false}}(),formData:"FormData"in rt,arrayBuffer:"ArrayBuffer"in rt};function at(e){return e&&DataView.prototype.isPrototypeOf(e)}if(nt.arrayBuffer){var it=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"];var ot=ArrayBuffer.isView||function(e){return e&&it.indexOf(Object.prototype.toString.call(e))>-1}}function st(e){if(typeof e!=="string"){e=String(e)}if(/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||e===""){throw new TypeError('Invalid character in header field name: "'+e+'"')}return e.toLowerCase()}function lt(e){if(typeof e!=="string"){e=String(e)}return e}function ct(e){var t={next:function(){var t=e.shift();return{done:t===undefined,value:t}}};if(nt.iterable){t[Symbol.iterator]=function(){return t}}return t}function pt(e){this.map={};if(e instanceof pt){e.forEach((function(e,t){this.append(t,e)}),this)}else if(Array.isArray(e)){e.forEach((function(e){this.append(e[0],e[1])}),this)}else if(e){Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}}pt.prototype.append=function(e,t){e=st(e);t=lt(t);var r=this.map[e];this.map[e]=r?r+", "+t:t};pt.prototype["delete"]=function(e){delete this.map[st(e)]};pt.prototype.get=function(e){e=st(e);return this.has(e)?this.map[e]:null};pt.prototype.has=function(e){return this.map.hasOwnProperty(st(e))};pt.prototype.set=function(e,t){this.map[st(e)]=lt(t)};pt.prototype.forEach=function(e,t){for(var r in this.map){if(this.map.hasOwnProperty(r)){e.call(t,this.map[r],r,this)}}};pt.prototype.keys=function(){var e=[];this.forEach((function(t,r){e.push(r)}));return ct(e)};pt.prototype.values=function(){var e=[];this.forEach((function(t){e.push(t)}));return ct(e)};pt.prototype.entries=function(){var e=[];this.forEach((function(t,r){e.push([r,t])}));return ct(e)};if(nt.iterable){pt.prototype[Symbol.iterator]=pt.prototype.entries}function dt(e){if(e.bodyUsed){return Promise.reject(new TypeError("Already read"))}e.bodyUsed=true}function ut(e){return new Promise((function(t,r){e.onload=function(){t(e.result)};e.onerror=function(){r(e.error)}}))}function mt(e){var t=new FileReader;var r=ut(t);t.readAsArrayBuffer(e);return r}function ft(e){var t=new FileReader;var r=ut(t);t.readAsText(e);return r}function ht(e){var t=new Uint8Array(e);var r=new Array(t.length);for(var n=0;n<t.length;n++){r[n]=String.fromCharCode(t[n])}return r.join("")}function gt(e){if(e.slice){return e.slice(0)}else{var t=new Uint8Array(e.byteLength);t.set(new Uint8Array(e));return t.buffer}}function yt(){this.bodyUsed=false;this._initBody=function(e){this.bodyUsed=this.bodyUsed;this._bodyInit=e;if(!e){this._bodyText=""}else if(typeof e==="string"){this._bodyText=e}else if(nt.blob&&Blob.prototype.isPrototypeOf(e)){this._bodyBlob=e}else if(nt.formData&&FormData.prototype.isPrototypeOf(e)){this._bodyFormData=e}else if(nt.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)){this._bodyText=e.toString()}else if(nt.arrayBuffer&&nt.blob&&at(e)){this._bodyArrayBuffer=gt(e.buffer);this._bodyInit=new Blob([this._bodyArrayBuffer])}else if(nt.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||ot(e))){this._bodyArrayBuffer=gt(e)}else{this._bodyText=e=Object.prototype.toString.call(e)}if(!this.headers.get("content-type")){if(typeof e==="string"){this.headers.set("content-type","text/plain;charset=UTF-8")}else if(this._bodyBlob&&this._bodyBlob.type){this.headers.set("content-type",this._bodyBlob.type)}else if(nt.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)){this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8")}}};if(nt.blob){this.blob=function(){var e=dt(this);if(e){return e}if(this._bodyBlob){return Promise.resolve(this._bodyBlob)}else if(this._bodyArrayBuffer){return Promise.resolve(new Blob([this._bodyArrayBuffer]))}else if(this._bodyFormData){throw new Error("could not read FormData body as blob")}else{return Promise.resolve(new Blob([this._bodyText]))}};this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=dt(this);if(e){return e}if(ArrayBuffer.isView(this._bodyArrayBuffer)){return Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength))}else{return Promise.resolve(this._bodyArrayBuffer)}}else{return this.blob().then(mt)}}}this.text=function(){var e=dt(this);if(e){return e}if(this._bodyBlob){return ft(this._bodyBlob)}else if(this._bodyArrayBuffer){return Promise.resolve(ht(this._bodyArrayBuffer))}else if(this._bodyFormData){throw new Error("could not read FormData body as text")}else{return Promise.resolve(this._bodyText)}};if(nt.formData){this.formData=function(){return this.text().then(Nt)}}this.json=function(){return this.text().then(JSON.parse)};return this}var vt=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function bt(e){var t=e.toUpperCase();return vt.indexOf(t)>-1?t:e}function xt(e,t){if(!(this instanceof xt)){throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.')}t=t||{};var r=t.body;if(e instanceof xt){if(e.bodyUsed){throw new TypeError("Already read")}this.url=e.url;this.credentials=e.credentials;if(!t.headers){this.headers=new pt(e.headers)}this.method=e.method;this.mode=e.mode;this.signal=e.signal;if(!r&&e._bodyInit!=null){r=e._bodyInit;e.bodyUsed=true}}else{this.url=String(e)}this.credentials=t.credentials||this.credentials||"same-origin";if(t.headers||!this.headers){this.headers=new pt(t.headers)}this.method=bt(t.method||this.method||"GET");this.mode=t.mode||this.mode||null;this.signal=t.signal||this.signal;this.referrer=null;if((this.method==="GET"||this.method==="HEAD")&&r){throw new TypeError("Body not allowed for GET or HEAD requests")}this._initBody(r);if(this.method==="GET"||this.method==="HEAD"){if(t.cache==="no-store"||t.cache==="no-cache"){var n=/([?&])_=[^&]*/;if(n.test(this.url)){this.url=this.url.replace(n,"$1_="+(new Date).getTime())}else{var a=/\?/;this.url+=(a.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}}xt.prototype.clone=function(){return new xt(this,{body:this._bodyInit})};function Nt(e){var t=new FormData;e.trim().split("&").forEach((function(e){if(e){var r=e.split("=");var n=r.shift().replace(/\+/g," ");var a=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(a))}}));return t}function zt(e){var t=new pt;var r=e.replace(/\r?\n[\t ]+/g," ");r.split("\r").map((function(e){return e.indexOf("\n")===0?e.substr(1,e.length):e})).forEach((function(e){var r=e.split(":");var n=r.shift().trim();if(n){var a=r.join(":").trim();t.append(n,a)}}));return t}yt.call(xt.prototype);function St(e,t){if(!(this instanceof St)){throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.')}if(!t){t={}}this.type="default";this.status=t.status===undefined?200:t.status;this.ok=this.status>=200&&this.status<300;this.statusText=t.statusText===undefined?"":""+t.statusText;this.headers=new pt(t.headers);this.url=t.url||"";this._initBody(e)}yt.call(St.prototype);St.prototype.clone=function(){return new St(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new pt(this.headers),url:this.url})};St.error=function(){var e=new St(null,{status:0,statusText:""});e.type="error";return e};var wt=[301,302,303,307,308];St.redirect=function(e,t){if(wt.indexOf(t)===-1){throw new RangeError("Invalid status code")}return new St(null,{status:t,headers:{location:e}})};var Pt=rt.DOMException;try{new Pt}catch(e){Pt=function(e,t){this.message=e;this.name=t;var r=Error(e);this.stack=r.stack};Pt.prototype=Object.create(Error.prototype);Pt.prototype.constructor=Pt}function Ct(e,t){return new Promise((function(r,n){var a=new xt(e,t);if(a.signal&&a.signal.aborted){return n(new Pt("Aborted","AbortError"))}var i=new XMLHttpRequest;function o(){i.abort()}i.onload=function(){var e={status:i.status,statusText:i.statusText,headers:zt(i.getAllResponseHeaders()||"")};e.url="responseURL"in i?i.responseURL:e.headers.get("X-Request-URL");var t="response"in i?i.response:i.responseText;setTimeout((function(){r(new St(t,e))}),0)};i.onerror=function(){setTimeout((function(){n(new TypeError("Network request failed"))}),0)};i.ontimeout=function(){setTimeout((function(){n(new TypeError("Network request failed"))}),0)};i.onabort=function(){setTimeout((function(){n(new Pt("Aborted","AbortError"))}),0)};function s(e){try{return e===""&&rt.location.href?rt.location.href:e}catch(t){return e}}i.open(a.method,s(a.url),true);if(a.credentials==="include"){i.withCredentials=true}else if(a.credentials==="omit"){i.withCredentials=false}if("responseType"in i){if(nt.blob){i.responseType="blob"}else if(nt.arrayBuffer&&a.headers.get("Content-Type")&&a.headers.get("Content-Type").indexOf("application/octet-stream")!==-1){i.responseType="arraybuffer"}}if(t&&typeof t.headers==="object"&&!(t.headers instanceof pt)){Object.getOwnPropertyNames(t.headers).forEach((function(e){i.setRequestHeader(e,lt(t.headers[e]))}))}else{a.headers.forEach((function(e,t){i.setRequestHeader(t,e)}))}if(a.signal){a.signal.addEventListener("abort",o);i.onreadystatechange=function(){if(i.readyState===4){a.signal.removeEventListener("abort",o)}}}i.send(typeof a._bodyInit==="undefined"?null:a._bodyInit)}))}Ct.polyfill=true;if(!rt.fetch){rt.fetch=Ct;rt.Headers=pt;rt.Request=xt;rt.Response=St}var Rt=Object.freeze({__proto__:null,Headers:pt,Request:xt,Response:St,get DOMException(){return Pt},fetch:Ct});var _t=_(Rt);var Et=function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={exports:{},id:n,loaded:false};e[n].call(a.exports,a,a.exports,r);a.loaded=true;return a.exports}r.m=e;r.c=t;r.p="";return r(0)}([function(e,t,r){var n=r(1);var a=typeof importScripts==="function";e.exports=n(a?self:window)},function(e,t,r){function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++){r[t]=e[t]}return r}else{return Array.from(e)}}var a=[];function i(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i<t;i++){r[i-1]=arguments[i]}var o=a.reduce((function(e,t){return[t].concat(e)}),[]);var s=Promise.resolve(r);o.forEach((function(e){var t=e.request,r=e.requestError;if(t||r){s=s.then((function(e){return t.apply(undefined,n(e))}),r)}}));s=s.then((function(t){var r=new(Function.prototype.bind.apply(Request,[null].concat(n(t))));return e(r).then((function(e){e.request=r;return e})).catch((function(e){e.request=r;return Promise.reject(e)}))}));o.forEach((function(e){var t=e.response,r=e.responseError;if(t||r){s=s.then(t,r)}}));return s}e.exports=function e(t){if(!t.fetch){try{r(2)}catch(e){throw Error("No fetch available. Unable to register fetch-intercept")}}t.fetch=function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++){r[n]=arguments[n]}return i.apply(undefined,[e].concat(r))}}(t.fetch);return{register:function e(t){a.push(t);return function(){var e=a.indexOf(t);if(e>=0){a.splice(e,1)}}},clear:function e(){a=[]}}}},function(e,t){e.exports=_t}]);function kt(e){return e.toLowerCase()}function Ot(e){if(e&&typeof e==="object"){var t=e;if(typeof t.rawHeaders==="function"&&typeof t.clone==="function"&&typeof t.get==="function"&&typeof t.set==="function"&&typeof t.contains==="function"&&typeof t.remove==="function"&&typeof t.headersArray==="function"&&typeof t.headerValues==="function"&&typeof t.headerNames==="function"&&typeof t.toJson==="function"){return true}}return false}var Tt=function(){function e(e){this._headersMap={};if(e){for(var t in e){this.set(t,e[t])}}}e.prototype.set=function(e,t){this._headersMap[kt(e)]={name:e,value:t.toString()}};e.prototype.get=function(e){var t=this._headersMap[kt(e)];return!t?undefined:t.value};e.prototype.contains=function(e){return!!this._headersMap[kt(e)]};e.prototype.remove=function(e){var t=this.contains(e);delete this._headersMap[kt(e)];return t};e.prototype.rawHeaders=function(){return this.toJson({preserveCase:true})};e.prototype.headersArray=function(){var e=[];for(var t in this._headersMap){e.push(this._headersMap[t])}return e};e.prototype.headerNames=function(){var e=[];var t=this.headersArray();for(var r=0;r<t.length;++r){e.push(t[r].name)}return e};e.prototype.headerValues=function(){var e=[];var t=this.headersArray();for(var r=0;r<t.length;++r){e.push(t[r].value)}return e};e.prototype.toJson=function(e){if(e===void 0){e={}}var t={};if(e.preserveCase){for(var r in this._headersMap){var n=this._headersMap[r];t[n.name]=n.value}}else{for(var r in this._headersMap){var n=this._headersMap[r];t[kt(n.name)]=n.value}}return t};e.prototype.toString=function(){return JSON.stringify(this.toJson({preserveCase:true}))};e.prototype.clone=function(){var t={};for(var r in this._headersMap){var n=this._headersMap[r];t[n.name]=n.value}return new e(t)};return e}();function Bt(e){var t="";for(var r=0;r<e.length;r++){t+=String.fromCharCode(e[r])}return btoa(t)}function qt(e){var t=atob(e);var r=new Uint8Array(t.length);for(var n=0;n<t.length;n++){r[n]=t.charCodeAt(n)}return r}var Mt=P.process;var At={coreHttpVersion:"2.2.3",HTTP:"http:",HTTPS:"https:",HTTP_PROXY:"HTTP_PROXY",HTTPS_PROXY:"HTTPS_PROXY",NO_PROXY:"NO_PROXY",ALL_PROXY:"ALL_PROXY",HttpConstants:{HttpVerbs:{PUT:"PUT",GET:"GET",DELETE:"DELETE",POST:"POST",MERGE:"MERGE",HEAD:"HEAD",PATCH:"PATCH"},StatusCodes:{TooManyRequests:429,ServiceUnavailable:503}},HeaderConstants:{AUTHORIZATION:"authorization",AUTHORIZATION_SCHEME:"Bearer",RETRY_AFTER:"Retry-After",USER_AGENT:"User-Agent"}};var It="$";var Ht="_";var Lt;var Dt=new Uint8Array(16);function jt(){if(!Lt){Lt=typeof crypto!=="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!=="undefined"&&typeof msCrypto.getRandomValues==="function"&&msCrypto.getRandomValues.bind(msCrypto);if(!Lt){throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}}return Lt(Dt)}var Ut=/^(?:[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;function Ft(e){return typeof e==="string"&&Ut.test(e)}var Vt=[];for(var Kt=0;Kt<256;++Kt){Vt.push((Kt+256).toString(16).substr(1))}function Gt(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var r=(Vt[e[t+0]]+Vt[e[t+1]]+Vt[e[t+2]]+Vt[e[t+3]]+"-"+Vt[e[t+4]]+Vt[e[t+5]]+"-"+Vt[e[t+6]]+Vt[e[t+7]]+"-"+Vt[e[t+8]]+Vt[e[t+9]]+"-"+Vt[e[t+10]]+Vt[e[t+11]]+Vt[e[t+12]]+Vt[e[t+13]]+Vt[e[t+14]]+Vt[e[t+15]]).toLowerCase();if(!Ft(r)){throw TypeError("Stringified UUID is invalid")}return r}function Wt(e,t,r){e=e||{};var n=e.random||(e.rng||jt)();n[6]=n[6]&15|64;n[8]=n[8]&63|128;if(t){r=r||0;for(var a=0;a<16;++a){t[r+a]=n[a]}return t}return Gt(n)}var Xt=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i;var Qt=typeof Mt!=="undefined"&&!!Mt.version&&!!Mt.versions&&!!Mt.versions.node;function Yt(e){return Xt.test(e)}function Jt(){return Wt()}function $t(e,t,r,n){var a,i,o;if(!Array.isArray(e)){e=[e]}if(!r||!n){return a={},a[t]=e,a}var s=(i={},i[t]=e,i);s[It]=(o={},o[r]=n,o);return s}var Zt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function er(e){return Zt.test(e)}function tr(e,t,r){return!e||!t?e:e.split(t).join(r||"")}function rr(e){return typeof e!=="object"&&typeof e!=="function"||e===null}function nr(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}var ar=function(){function e(e,t){if(e===void 0){e={}}this.modelMappers=e;this.isXML=t}e.prototype.validateConstraints=function(e,t,r){var n=function(e,n){throw new Error('"'.concat(r,'" with value "').concat(t,'" should satisfy the constraint "').concat(e,'": ').concat(n,"."))};if(e.constraints&&t!=undefined){var a=t;var i=e.constraints,o=i.ExclusiveMaximum,s=i.ExclusiveMinimum,l=i.InclusiveMaximum,c=i.InclusiveMinimum,p=i.MaxItems,d=i.MaxLength,u=i.MinItems,m=i.MinLength,f=i.MultipleOf,h=i.Pattern,g=i.UniqueItems;if(o!=undefined&&a>=o){n("ExclusiveMaximum",o)}if(s!=undefined&&a<=s){n("ExclusiveMinimum",s)}if(l!=undefined&&a>l){n("InclusiveMaximum",l)}if(c!=undefined&&a<c){n("InclusiveMinimum",c)}var y=t;if(p!=undefined&&y.length>p){n("MaxItems",p)}if(d!=undefined&&y.length>d){n("MaxLength",d)}if(u!=undefined&&y.length<u){n("MinItems",u)}if(m!=undefined&&y.length<m){n("MinLength",m)}if(f!=undefined&&a%f!==0){n("MultipleOf",f)}if(h){var v=typeof h==="string"?new RegExp(h):h;if(typeof t!=="string"||t.match(v)===null){n("Pattern",h)}}if(g&&y.some((function(e,t,r){return r.indexOf(e)!==t}))){n("UniqueItems",g)}}};e.prototype.serialize=function(e,t,r,n){if(n===void 0){n={}}var a,i,o;var s={rootName:(a=n.rootName)!==null&&a!==void 0?a:"",includeRoot:(i=n.includeRoot)!==null&&i!==void 0?i:false,xmlCharKey:(o=n.xmlCharKey)!==null&&o!==void 0?o:Ht};var l={};var c=e.type.name;if(!r){r=e.serializedName}if(c.match(/^Sequence$/i)!==null){l=[]}if(e.isConstant){t=e.defaultValue}var p=e.required,d=e.nullable;if(p&&d&&t===undefined){throw new Error("".concat(r," cannot be undefined."))}if(p&&!d&&t==undefined){throw new Error("".concat(r," cannot be null or undefined."))}if(!p&&d===false&&t===null){throw new Error("".concat(r," cannot be null."))}if(t==undefined){l=t}else{this.validateConstraints(e,t,r);if(c.match(/^any$/i)!==null){l=t}else if(c.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i)!==null){l=dr(c,r,t)}else if(c.match(/^Enum$/i)!==null){var u=e;l=ur(r,u.type.allowedValues,t)}else if(c.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i)!==null){l=hr(c,t,r)}else if(c.match(/^ByteArray$/i)!==null){l=mr(r,t)}else if(c.match(/^Base64Url$/i)!==null){l=fr(r,t)}else if(c.match(/^Sequence$/i)!==null){l=gr(this,e,t,r,Boolean(this.isXML),s)}else if(c.match(/^Dictionary$/i)!==null){l=yr(this,e,t,r,Boolean(this.isXML),s)}else if(c.match(/^Composite$/i)!==null){l=Nr(this,e,t,r,Boolean(this.isXML),s)}}return l};e.prototype.deserialize=function(e,t,r,n){if(n===void 0){n={}}var a,i,o;var s={rootName:(a=n.rootName)!==null&&a!==void 0?a:"",includeRoot:(i=n.includeRoot)!==null&&i!==void 0?i:false,xmlCharKey:(o=n.xmlCharKey)!==null&&o!==void 0?o:Ht};if(t==undefined){if(this.isXML&&e.type.name==="Sequence"&&!e.xmlIsWrapped){t=[]}if(e.defaultValue!==undefined){t=e.defaultValue}return t}var l;var c=e.type.name;if(!r){r=e.serializedName}if(c.match(/^Composite$/i)!==null){l=wr(this,e,t,r,s)}else{if(this.isXML){var p=s.xmlCharKey;var d=t;if(d[It]!=undefined&&d[p]!=undefined){t=d[p]}}if(c.match(/^Number$/i)!==null){l=parseFloat(t);if(isNaN(l)){l=t}}else if(c.match(/^Boolean$/i)!==null){if(t==="true"){l=true}else if(t==="false"){l=false}else{l=t}}else if(c.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i)!==null){l=t}else if(c.match(/^(Date|DateTime|DateTimeRfc1123)$/i)!==null){l=new Date(t)}else if(c.match(/^UnixTime$/i)!==null){l=pr(t)}else if(c.match(/^ByteArray$/i)!==null){l=qt(t)}else if(c.match(/^Base64Url$/i)!==null){l=sr(t)}else if(c.match(/^Sequence$/i)!==null){l=Cr(this,e,t,r,s)}else if(c.match(/^Dictionary$/i)!==null){l=Pr(this,e,t,r,s)}}if(e.isConstant){l=e.defaultValue}return l};return e}();function ir(e,t){var r=e.length;while(r-1>=0&&e[r-1]===t){--r}return e.substr(0,r)}function or(e){if(!e){return undefined}if(!(e instanceof Uint8Array)){throw new Error("Please provide an input of type Uint8Array for converting to Base64Url.")}var t=Bt(e);return ir(t,"=").replace(/\+/g,"-").replace(/\//g,"_")}function sr(e){if(!e){return undefined}if(e&&typeof e.valueOf()!=="string"){throw new Error("Please provide an input of type string for converting to Uint8Array")}e=e.replace(/-/g,"+").replace(/_/g,"/");return qt(e)}function lr(e){var t=[];var r="";if(e){var n=e.split(".");for(var a=0,i=n;a<i.length;a++){var o=i[a];if(o.charAt(o.length-1)==="\\"){r+=o.substr(0,o.length-1)+"."}else{r+=o;t.push(r);r=""}}}return t}function cr(e){if(!e){return undefined}if(typeof e.valueOf()==="string"){e=new Date(e)}return Math.floor(e.getTime()/1e3)}function pr(e){if(!e){return undefined}return new Date(e*1e3)}function dr(e,t,r){if(r!==null&&r!==undefined){if(e.match(/^Number$/i)!==null){if(typeof r!=="number"){throw new Error("".concat(t," with value ").concat(r," must be of type number."))}}else if(e.match(/^String$/i)!==null){if(typeof r.valueOf()!=="string"){throw new Error("".concat(t,' with value "').concat(r,'" must be of type string.'))}}else if(e.match(/^Uuid$/i)!==null){if(!(typeof r.valueOf()==="string"&&Yt(r))){throw new Error("".concat(t,' with value "').concat(r,'" must be of type string and a valid uuid.'))}}else if(e.match(/^Boolean$/i)!==null){if(typeof r!=="boolean"){throw new Error("".concat(t," with value ").concat(r," must be of type boolean."))}}else if(e.match(/^Stream$/i)!==null){var n=typeof r;if(n!=="string"&&n!=="function"&&!(r instanceof ArrayBuffer)&&!ArrayBuffer.isView(r)&&!((typeof Blob==="function"||typeof Blob==="object")&&r instanceof Blob)){throw new Error("".concat(t," must be a string, Blob, ArrayBuffer, ArrayBufferView, or a function returning NodeJS.ReadableStream."))}}}return r}function ur(e,t,r){if(!t){throw new Error("Please provide a set of allowedValues to validate ".concat(e," as an Enum Type."))}var n=t.some((function(e){if(typeof e.valueOf()==="string"){return e.toLowerCase()===r.toLowerCase()}return e===r}));if(!n){throw new Error("".concat(r," is not a valid value for ").concat(e,". The valid values are: ").concat(JSON.stringify(t),"."))}return r}function mr(e,t){var r="";if(t!=undefined){if(!(t instanceof Uint8Array)){throw new Error("".concat(e," must be of type Uint8Array."))}r=Bt(t)}return r}function fr(e,t){var r="";if(t!=undefined){if(!(t instanceof Uint8Array)){throw new Error("".concat(e," must be of type Uint8Array."))}r=or(t)||""}return r}function hr(e,t,r){if(t!=undefined){if(e.match(/^Date$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==="string"&&!isNaN(Date.parse(t)))){throw new Error("".concat(r," must be an instanceof Date or a string in ISO8601 format."))}t=t instanceof Date?t.toISOString().substring(0,10):new Date(t).toISOString().substring(0,10)}else if(e.match(/^DateTime$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==="string"&&!isNaN(Date.parse(t)))){throw new Error("".concat(r," must be an instanceof Date or a string in ISO8601 format."))}t=t instanceof Date?t.toISOString():new Date(t).toISOString()}else if(e.match(/^DateTimeRfc1123$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==="string"&&!isNaN(Date.parse(t)))){throw new Error("".concat(r," must be an instanceof Date or a string in RFC-1123 format."))}t=t instanceof Date?t.toUTCString():new Date(t).toUTCString()}else if(e.match(/^UnixTime$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==="string"&&!isNaN(Date.parse(t)))){throw new Error("".concat(r," must be an instanceof Date or a string in RFC-1123/ISO8601 format ")+"for it to be serialized in UnixTime/Epoch format.")}t=cr(t)}else if(e.match(/^TimeSpan$/i)!==null){if(!er(t)){throw new Error("".concat(r,' must be a string in ISO 8601 format. Instead was "').concat(t,'".'))}}}return t}function gr(e,t,r,n,a,i){var o,s;if(!Array.isArray(r)){throw new Error("".concat(n," must be of type Array."))}var l=t.type.element;if(!l||typeof l!=="object"){throw new Error('element" metadata for an Array must be defined in the '+'mapper and it must of type "object" in '.concat(n,"."))}var c=[];for(var p=0;p<r.length;p++){var d=e.serialize(l,r[p],n,i);if(a&&l.xmlNamespace){var u=l.xmlNamespacePrefix?"xmlns:".concat(l.xmlNamespacePrefix):"xmlns";if(l.type.name==="Composite"){c[p]=Object.assign({},d);c[p][It]=(o={},o[u]=l.xmlNamespace,o)}else{c[p]={};c[p][i.xmlCharKey]=d;c[p][It]=(s={},s[u]=l.xmlNamespace,s)}}else{c[p]=d}}return c}function yr(e,t,r,n,a,i){var o;if(typeof r!=="object"){throw new Error("".concat(n," must be of type object."))}var s=t.type.value;if(!s||typeof s!=="object"){throw new Error('"value" metadata for a Dictionary must be defined in the '+'mapper and it must of type "object" in '.concat(n,"."))}var l={};for(var c=0,p=Object.keys(r);c<p.length;c++){var d=p[c];var u=e.serialize(s,r[d],n,i);l[d]=zr(s,u,a,i)}if(a&&t.xmlNamespace){var m=t.xmlNamespacePrefix?"xmlns:".concat(t.xmlNamespacePrefix):"xmlns";var f=l;f[It]=(o={},o[m]=t.xmlNamespace,o);return f}return l}function vr(e,t,r){var n=t.type.additionalProperties;if(!n&&t.type.className){var a=br(e,t,r);return a===null||a===void 0?void 0:a.type.additionalProperties}return n}function br(e,t,r){var n=t.type.className;if(!n){throw new Error('Class name for model "'.concat(r,'" is not provided in the mapper "').concat(JSON.stringify(t,undefined,2),'".'))}return e.modelMappers[n]}function xr(e,t,r){var n=t.type.modelProperties;if(!n){var a=br(e,t,r);if(!a){throw new Error('mapper() cannot be null or undefined for model "'.concat(t.type.className,'".'))}n=a===null||a===void 0?void 0:a.type.modelProperties;if(!n){throw new Error("modelProperties cannot be null or undefined in the "+'mapper "'.concat(JSON.stringify(a),'" of type "').concat(t.type.className,'" for object "').concat(r,'".'))}}return n}function Nr(e,t,r,n,a,i){var o,s;if(_r(e,t)){t=Rr(e,t,r,"clientName")}if(r!=undefined){var l={};var c=xr(e,t,n);for(var p=0,d=Object.keys(c);p<d.length;p++){var u=d[p];var m=c[u];if(m.readOnly){continue}var f=void 0;var h=l;if(e.isXML){if(m.xmlIsWrapped){f=m.xmlName}else{f=m.xmlElementName||m.xmlName}}else{var g=lr(m.serializedName);f=g.pop();for(var y=0,v=g;y<v.length;y++){var b=v[y];var x=h[b];if(x==undefined&&(r[u]!=undefined||m.defaultValue!==undefined)){h[b]={}}h=h[b]}}if(h!=undefined){if(a&&t.xmlNamespace){var N=t.xmlNamespacePrefix?"xmlns:".concat(t.xmlNamespacePrefix):"xmlns";h[It]=Object.assign(Object.assign({},h[It]),(o={},o[N]=t.xmlNamespace,o))}var z=m.serializedName!==""?n+"."+m.serializedName:n;var S=r[u];var w=_r(e,t);if(w&&w.clientName===u&&S==undefined){S=t.serializedName}var P=e.serialize(m,S,z,i);if(P!==undefined&&f!=undefined){var C=zr(m,P,a,i);if(a&&m.xmlIsAttribute){h[It]=h[It]||{};h[It][f]=P}else if(a&&m.xmlIsWrapped){h[f]=(s={},s[m.xmlElementName]=C,s)}else{h[f]=C}}}}var R=vr(e,t,n);if(R){var _=Object.keys(c);var E=function(t){var a=_.every((function(e){return e!==t}));if(a){l[t]=e.serialize(R,r[t],n+'["'+t+'"]',i)}};for(var k in r){E(k)}}return l}return r}function zr(e,t,r,n){var a;if(!r||!e.xmlNamespace){return t}var i=e.xmlNamespacePrefix?"xmlns:".concat(e.xmlNamespacePrefix):"xmlns";var o=(a={},a[i]=e.xmlNamespace,a);if(["Composite"].includes(e.type.name)){if(t[It]){return t}else{var s=Object.assign({},t);s[It]=o;return s}}var l={};l[n.xmlCharKey]=t;l[It]=o;return l}function Sr(e,t){return[It,t.xmlCharKey].includes(e)}function wr(e,t,r,n,a){var i;if(_r(e,t)){t=Rr(e,t,r,"serializedName")}var o=xr(e,t,n);var s={};var l=[];for(var c=0,p=Object.keys(o);c<p.length;c++){var d=p[c];var u=o[d];var m=lr(o[d].serializedName);l.push(m[0]);var f=u.serializedName,h=u.xmlName,g=u.xmlElementName;var y=n;if(f!==""&&f!==undefined){y=n+"."+f}var v=u.headerCollectionPrefix;if(v){var b={};for(var x=0,N=Object.keys(r);x<N.length;x++){var z=N[x];if(z.startsWith(v)){b[z.substring(v.length)]=e.deserialize(u.type.value,r[z],y,a)}l.push(z)}s[d]=b}else if(e.isXML){if(u.xmlIsAttribute&&r[It]){s[d]=e.deserialize(u,r[It][h],y,a)}else{var S=g||h||f;if(u.xmlIsWrapped){var w=r[h];var P=(i=w===null||w===void 0?void 0:w[g])!==null&&i!==void 0?i:[];s[d]=e.deserialize(u,P,y,a)}else{var C=r[S];s[d]=e.deserialize(u,C,y,a)}}}else{var R=void 0;var _=r;for(var E=0,k=m;E<k.length;E++){var O=k[E];if(!_)break;_=_[O]}R=_;var T=t.type.polymorphicDiscriminator;if(T&&d===T.clientName&&R==undefined){R=t.serializedName}var B=void 0;if(Array.isArray(r[d])&&o[d].serializedName===""){R=r[d];var q=e.deserialize(u,R,y,a);for(var M=0,A=Object.entries(s);M<A.length;M++){var I=A[M],H=I[0],L=I[1];if(!Object.prototype.hasOwnProperty.call(q,H)){q[H]=L}}s=q}else if(R!==undefined||u.defaultValue!==undefined){B=e.deserialize(u,R,y,a);s[d]=B}}}var D=t.type.additionalProperties;if(D){var j=function(e){for(var t in o){var r=lr(o[t].serializedName);if(r[0]===e){return false}}return true};for(var U in r){if(j(U)){s[U]=e.deserialize(D,r[U],n+'["'+U+'"]',a)}}}else if(r){for(var F=0,V=Object.keys(r);F<V.length;F++){var d=V[F];if(s[d]===undefined&&!l.includes(d)&&!Sr(d,a)){s[d]=r[d]}}}return s}function Pr(e,t,r,n,a){var i=t.type.value;if(!i||typeof i!=="object"){throw new Error('"value" metadata for a Dictionary must be defined in the '+'mapper and it must of type "object" in '.concat(n))}if(r){var o={};for(var s=0,l=Object.keys(r);s<l.length;s++){var c=l[s];o[c]=e.deserialize(i,r[c],n,a)}return o}return r}function Cr(e,t,r,n,a){var i=t.type.element;if(!i||typeof i!=="object"){throw new Error('element" metadata for an Array must be defined in the '+'mapper and it must of type "object" in '.concat(n))}if(r){if(!Array.isArray(r)){r=[r]}var o=[];for(var s=0;s<r.length;s++){o[s]=e.deserialize(i,r[s],"".concat(n,"[").concat(s,"]"),a)}return o}return r}function Rr(e,t,r,n){var a=_r(e,t);if(a){var i=a[n];if(i!=undefined){var o=r[i];if(o!=undefined){var s=t.type.uberParent||t.type.className;var l=o===s?o:s+"."+o;var c=e.modelMappers.discriminators[l];if(c){t=c}}}}return t}function _r(e,t){return t.type.polymorphicDiscriminator||Er(e,t.type.uberParent)||Er(e,t.type.className)}function Er(e,t){return t&&e.modelMappers[t]&&e.modelMappers[t].type.polymorphicDiscriminator}function kr(e){var t={};for(var r=0,n=e;r<n.length;r++){var a=n[r];t[a]=a}return t}var Or=kr(["Base64Url","Boolean","ByteArray","Composite","Date","DateTime","DateTimeRfc1123","Dictionary","Enum","Number","Object","Sequence","String","Stream","TimeSpan","UnixTime"]);function Tr(e){if(e&&typeof e==="object"){var t=e;if(typeof t.url==="string"&&typeof t.method==="string"&&typeof t.headers==="object"&&Ot(t.headers)&&typeof t.validateRequestProperties==="function"&&typeof t.prepare==="function"&&typeof t.clone==="function"){return true}}return false}var Br=function(){function e(e,t,r,n,a,i,o,s,l,c,p,d,u,m,f){this.streamResponseBody=i;this.streamResponseStatusCodes=f;this.url=e||"";this.method=t||"GET";this.headers=Ot(a)?a:new Tt(a);this.body=r;this.query=n;this.formData=undefined;this.withCredentials=o||false;this.abortSignal=s;this.timeout=l||0;this.onUploadProgress=c;this.onDownloadProgress=p;this.proxySettings=d;this.keepAlive=u;this.decompressResponse=m;this.requestId=this.headers.get("x-ms-client-request-id")||Jt()}e.prototype.validateRequestProperties=function(){if(!this.method){throw new Error("WebResource.method is required.")}if(!this.url){throw new Error("WebResource.url is required.")}};e.prototype.prepare=function(e){if(!e){throw new Error("options object is required")}if(e.method===undefined||e.method===null||typeof e.method.valueOf()!=="string"){throw new Error("options.method must be a string.")}if(e.url&&e.pathTemplate){throw new Error("options.url and options.pathTemplate are mutually exclusive. Please provide exactly one of them.")}if((e.pathTemplate===undefined||e.pathTemplate===null||typeof e.pathTemplate.valueOf()!=="string")&&(e.url===undefined||e.url===null||typeof e.url.valueOf()!=="string")){throw new Error("Please provide exactly one of options.pathTemplate or options.url.")}if(e.url){if(typeof e.url!=="string"){throw new Error('options.url must be of type "string".')}this.url=e.url}if(e.method){var t=["GET","PUT","HEAD","DELETE","OPTIONS","POST","PATCH","TRACE"];if(t.indexOf(e.method.toUpperCase())===-1){throw new Error('The provided method "'+e.method+'" is invalid. Supported HTTP methods are: '+JSON.stringify(t))}}this.method=e.method.toUpperCase();if(e.pathTemplate){var r=e.pathTemplate,n=e.pathParameters;if(typeof r!=="string"){throw new Error('options.pathTemplate must be of type "string".')}if(!e.baseUrl){e.baseUrl="https://management.azure.com"}var a=e.baseUrl;var i=a+(a.endsWith("/")?"":"/")+(r.startsWith("/")?r.slice(1):r);var o=i.match(/({[\w-]*\s*[\w-]*})/gi);if(o&&o.length){if(!n){throw new Error("pathTemplate: ".concat(r," has been provided. Hence, options.pathParameters must also be provided."))}o.forEach((function(e){var t=e.slice(1,-1);var a=n[t];if(a===null||a===undefined||!(typeof a==="string"||typeof a==="object")){var o=JSON.stringify(n,undefined,2);throw new Error("pathTemplate: ".concat(r," contains the path parameter ").concat(t)+" however, it is not present in parameters: ".concat(o,".")+'The value of the path parameter can either be a "string" of the form { '.concat(t,': "some sample value" } or ')+'it can be an "object" of the form { "'.concat(t,'": { value: "some sample value", skipUrlEncoding: true } }.'))}if(typeof a.valueOf()==="string"){i=i.replace(e,encodeURIComponent(a))}if(typeof a.valueOf()==="object"){if(!a.value){throw new Error("options.pathParameters[".concat(t,'] is of type "object" but it does not contain a "value" property.'))}if(a.skipUrlEncoding){i=i.replace(e,a.value)}else{i=i.replace(e,encodeURIComponent(a.value))}}}))}this.url=i}if(e.queryParameters){var s=e.queryParameters;if(typeof s!=="object"){throw new Error("options.queryParameters must be of type object. It should be a JSON object "+'of "query-parameter-name" as the key and the "query-parameter-value" as the value. '+'The "query-parameter-value" may be fo type "string" or an "object" of the form { value: "query-parameter-value", skipUrlEncoding: true }.')}if(this.url&&this.url.indexOf("?")===-1){this.url+="?"}var l=[];this.query={};for(var c in s){var p=s[c];if(p){if(typeof p==="string"){l.push(c+"="+encodeURIComponent(p));this.query[c]=encodeURIComponent(p)}else if(typeof p==="object"){if(!p.value){throw new Error("options.queryParameters[".concat(c,'] is of type "object" but it does not contain a "value" property.'))}if(p.skipUrlEncoding){l.push(c+"="+p.value);this.query[c]=p.value}else{l.push(c+"="+encodeURIComponent(p.value));this.query[c]=encodeURIComponent(p.value)}}}}this.url+=l.join("&")}if(e.headers){var d=e.headers;for(var u=0,m=Object.keys(e.headers);u<m.length;u++){var f=m[u];this.headers.set(f,d[f])}}if(!this.headers.get("accept-language")){this.headers.set("accept-language","en-US")}if(!this.headers.get("x-ms-client-request-id")&&!e.disableClientRequestId){this.headers.set("x-ms-client-request-id",this.requestId)}if(!this.headers.get("Content-Type")){this.headers.set("Content-Type","application/json; charset=utf-8")}this.body=e.body;if(e.body!==undefined&&e.body!==null){if(e.bodyIsStream){if(!this.headers.get("Transfer-Encoding")){this.headers.set("Transfer-Encoding","chunked")}if(this.headers.get("Content-Type")!=="application/octet-stream"){this.headers.set("Content-Type","application/octet-stream")}}else{if(e.serializationMapper){this.body=new ar(e.mappers).serialize(e.serializationMapper,e.body,"requestBody")}if(!e.disableJsonStringifyOnBody){this.body=JSON.stringify(e.body)}}}if(e.spanOptions){this.spanOptions=e.spanOptions}if(e.tracingContext){this.tracingContext=e.tracingContext}this.abortSignal=e.abortSignal;this.onDownloadProgress=e.onDownloadProgress;this.onUploadProgress=e.onUploadProgress;return this};e.prototype.clone=function(){var t=new e(this.url,this.method,this.body,this.query,this.headers&&this.headers.clone(),this.streamResponseBody,this.withCredentials,this.abortSignal,this.timeout,this.onUploadProgress,this.onDownloadProgress,this.proxySettings,this.keepAlive,this.decompressResponse,this.streamResponseStatusCodes);if(this.formData){t.formData=this.formData}if(this.operationSpec){t.operationSpec=this.operationSpec}if(this.shouldDeserialize){t.shouldDeserialize=this.shouldDeserialize}if(this.operationResponseGetter){t.operationResponseGetter=this.operationResponseGetter}return t};return e}();
1
+ var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();var __awaiter=this&&this.__awaiter||function(e,t,r,n){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function o(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n["throw"](e))}catch(e){i(e)}}function l(e){e.done?r(e.value):a(e.value).then(o,s)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return l([e,t])}}function l(o){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,a&&(i=o[0]&2?a["return"]:o[0]?a["throw"]||((i=a["return"])&&i.call(a),0):a.next)&&!(i=i.call(a,o[1])).done)return i;if(a=0,i)o=[o[0]&2,i.value];switch(o[0]){case 0:case 1:i=o;break;case 4:r.label++;return{value:o[1],done:false};case 5:r.label++;a=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){r.label=o[1];break}if(o[0]===6&&r.label<i[1]){r.label=i[1];i=o;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(o);break}if(i[2])r.ops.pop();r.trys.pop();continue}o=t.call(e,r)}catch(e){o=[6,e];a=0}finally{n=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,i;n<a;n++){if(i||!(n in t)){if(!i)i=Array.prototype.slice.call(t,0,n);i[n]=t[n]}}return e.concat(i||Array.prototype.slice.call(t))};System.register(["./p-c04b764e.system.js"],(function(e){"use strict";var t,r,n,a,i,o,s,l,c;return{setters:[function(e){t=e.g;r=e.f;n=e.r;a=e.c;i=e.h;o=e.H;s=e.a;l=e.d;c=e.F}],execute:function(){var p=this;var d=function(e,t,r){var n=e.get(t);if(!n){e.set(t,[r])}else if(!n.includes(r)){n.push(r)}};var u=function(e,t){var r;return function(){var n=[];for(var a=0;a<arguments.length;a++){n[a]=arguments[a]}if(r){clearTimeout(r)}r=setTimeout((function(){r=0;e.apply(void 0,n)}),t)}};var m=function(e){return!("isConnected"in e)||e.isConnected};var f=u((function(e){for(var t=0,r=e.keys();t<r.length;t++){var n=r[t];e.set(n,e.get(n).filter(m))}}),2e3);var h=function(e){var n=e.on;var a=new Map;if(typeof t==="function"){n("dispose",(function(){a.clear()}));n("get",(function(e){var r=t();if(r){d(a,e,r)}}));n("set",(function(e){var t=a.get(e);if(t){a.set(e,t.filter(r))}f(a)}));n("reset",(function(){a.forEach((function(e){return e.forEach(r)}));f(a)}))}};var g=function(e,t){if(t===void 0){t=function(e,t){return e!==t}}var r=new Map(Object.entries(e!==null&&e!==void 0?e:{}));var n={dispose:[],get:[],set:[],reset:[]};var a=function(){r=new Map(Object.entries(e!==null&&e!==void 0?e:{}));n.reset.forEach((function(e){return e()}))};var i=function(){n.dispose.forEach((function(e){return e()}));a()};var o=function(e){n.get.forEach((function(t){return t(e)}));return r.get(e)};var s=function(e,a){var i=r.get(e);if(t(a,i,e)){r.set(e,a);n.set.forEach((function(t){return t(e,a,i)}))}};var l=typeof Proxy==="undefined"?{}:new Proxy(e,{get:function(e,t){return o(t)},ownKeys:function(e){return Array.from(r.keys())},getOwnPropertyDescriptor:function(){return{enumerable:true,configurable:true}},has:function(e,t){return r.has(t)},set:function(e,t,r){s(t,r);return true}});var c=function(e,t){n[e].push(t);return function(){y(n[e],t)}};var p=function(t,r){var n=c("set",(function(e,n){if(e===t){r(n)}}));var a=c("reset",(function(){return r(e[t])}));return function(){n();a()}};var d=function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return e.forEach((function(e){if(e.set){c("set",e.set)}if(e.get){c("get",e.get)}if(e.reset){c("reset",e.reset)}}))};var u=function(e){var t=r.get(e);n.set.forEach((function(r){return r(e,t,t)}))};return{state:l,get:o,set:s,on:c,onChange:p,use:d,dispose:i,reset:a,forceUpdate:u}};var y=function(e,t){var r=e.indexOf(t);if(r>=0){e[r]=e[e.length-1];e.length--}};var v=function(e,t){var r=g(e,t);h(r);return r};function b(e){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){b=function e(t){return typeof t}}else{b=function e(t){return t&&typeof Symbol==="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t}}return b(e)}function x(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}function N(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?Object(arguments[t]):{};var n=Object.keys(r);if(typeof Object.getOwnPropertySymbols==="function"){n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))}n.forEach((function(t){x(e,t,r[t])}))}return e}function z(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}function S(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||false;n.configurable=true;if("value"in n)n.writable=true;Object.defineProperty(e,n.key,n)}}function w(e,t,r){if(t)S(e.prototype,t);if(r)S(e,r);return e}var P=typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function C(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e["default"]:e}function R(e,t,r){return r={path:t,exports:{},require:function(e,t){return E()}},e(r,r.exports),r.exports}function _(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:true});Object.keys(e).forEach((function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:true,get:function(){return e[r]}})}));return t}function E(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var k=R((function(e){function t(r){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){e.exports=t=function e(t){return typeof t};e.exports["default"]=e.exports,e.exports.__esModule=true}else{e.exports=t=function e(t){return t&&typeof Symbol==="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.exports["default"]=e.exports,e.exports.__esModule=true}return t(r)}e.exports=t;e.exports["default"]=e.exports,e.exports.__esModule=true}));var O=C(k);function T(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function B(e,t){if(t&&(O(t)==="object"||typeof t==="function")){return t}return T(e)}function q(e){q=Object.setPrototypeOf?Object.getPrototypeOf:function e(t){return t.__proto__||Object.getPrototypeOf(t)};return q(e)}function M(e,t){M=Object.setPrototypeOf||function e(t,r){t.__proto__=r;return t};return M(e,t)}function A(e,t){if(typeof t!=="function"&&t!==null){throw new TypeError("Super expression must either be null or a function")}e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:true,configurable:true}});if(t)M(e,t)}var I={type:"logger",log:function e(t){this.output("log",t)},warn:function e(t){this.output("warn",t)},error:function e(t){this.output("error",t)},output:function e(t,r){if(console&&console[t])console[t].apply(console,r)}};var H=function(){function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};z(this,e);this.init(t,r)}w(e,[{key:"init",value:function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this.prefix=r.prefix||"i18next:";this.logger=t||I;this.options=r;this.debug=r.debug}},{key:"setDebug",value:function e(t){this.debug=t}},{key:"log",value:function e(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++){r[n]=arguments[n]}return this.forward(r,"log","",true)}},{key:"warn",value:function e(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++){r[n]=arguments[n]}return this.forward(r,"warn","",true)}},{key:"error",value:function e(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++){r[n]=arguments[n]}return this.forward(r,"error","")}},{key:"deprecate",value:function e(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++){r[n]=arguments[n]}return this.forward(r,"warn","WARNING DEPRECATED: ",true)}},{key:"forward",value:function e(t,r,n,a){if(a&&!this.debug)return null;if(typeof t[0]==="string")t[0]="".concat(n).concat(this.prefix," ").concat(t[0]);return this.logger[r](t)}},{key:"create",value:function t(r){return new e(this.logger,N({},{prefix:"".concat(this.prefix,":").concat(r,":")},this.options))}}]);return e}();var L=new H;var D=function(){function e(){z(this,e);this.observers={}}w(e,[{key:"on",value:function e(t,r){var n=this;t.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[];n.observers[e].push(r)}));return this}},{key:"off",value:function e(t,r){if(!this.observers[t])return;if(!r){delete this.observers[t];return}this.observers[t]=this.observers[t].filter((function(e){return e!==r}))}},{key:"emit",value:function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++){n[a-1]=arguments[a]}if(this.observers[t]){var i=[].concat(this.observers[t]);i.forEach((function(e){e.apply(void 0,n)}))}if(this.observers["*"]){var o=[].concat(this.observers["*"]);o.forEach((function(e){e.apply(e,[t].concat(n))}))}}}]);return e}();function j(){var e;var t;var r=new Promise((function(r,n){e=r;t=n}));r.resolve=e;r.reject=t;return r}function U(e){if(e==null)return"";return""+e}function F(e,t,r){e.forEach((function(e){if(t[e])r[e]=t[e]}))}function V(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function a(){return!e||typeof e==="string"}var i=typeof t!=="string"?[].concat(t):t.split(".");while(i.length>1){if(a())return{};var o=n(i.shift());if(!e[o]&&r)e[o]=new r;if(Object.prototype.hasOwnProperty.call(e,o)){e=e[o]}else{e={}}}if(a())return{};return{obj:e,k:n(i.shift())}}function K(e,t,r){var n=V(e,t,Object),a=n.obj,i=n.k;a[i]=r}function G(e,t,r,n){var a=V(e,t,Object),i=a.obj,o=a.k;i[o]=i[o]||[];if(n)i[o]=i[o].concat(r);if(!n)i[o].push(r)}function W(e,t){var r=V(e,t),n=r.obj,a=r.k;if(!n)return undefined;return n[a]}function X(e,t,r){var n=W(e,r);if(n!==undefined){return n}return W(t,r)}function Q(e,t,r){for(var n in t){if(n!=="__proto__"&&n!=="constructor"){if(n in e){if(typeof e[n]==="string"||e[n]instanceof String||typeof t[n]==="string"||t[n]instanceof String){if(r)e[n]=t[n]}else{Q(e[n],t[n],r)}}else{e[n]=t[n]}}}return e}function Y(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var J={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function $(e){if(typeof e==="string"){return e.replace(/[&<>"'\/]/g,(function(e){return J[e]}))}return e}var Z=typeof window!=="undefined"&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1;var ee=[" ",",","?","!",";"];function te(e,t,r){t=t||"";r=r||"";var n=ee.filter((function(e){return t.indexOf(e)<0&&r.indexOf(e)<0}));if(n.length===0)return true;var a=new RegExp("(".concat(n.map((function(e){return e==="?"?"\\?":e})).join("|"),")"));var i=!a.test(e);if(!i){var o=e.indexOf(r);if(o>0&&!a.test(e.substring(0,o))){i=true}}return i}function re(e,t){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:".";if(!e)return undefined;if(e[t])return e[t];var n=t.split(r);var a=e;for(var i=0;i<n.length;++i){if(!a)return undefined;if(typeof a[n[i]]==="string"&&i+1<n.length){return undefined}if(a[n[i]]===undefined){var o=2;var s=n.slice(i,i+o).join(r);var l=a[s];while(l===undefined&&n.length>i+o){o++;s=n.slice(i,i+o).join(r);l=a[s]}if(l===undefined)return undefined;if(typeof l==="string")return l;if(s&&typeof l[s]==="string")return l[s];var c=n.slice(i+o).join(r);if(c)return re(l,c,r);return undefined}a=a[n[i]]}return a}var ne=function(e){A(t,e);function t(e){var r;var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{ns:["translation"],defaultNS:"translation"};z(this,t);r=B(this,q(t).call(this));if(Z){D.call(T(r))}r.data=e||{};r.options=n;if(r.options.keySeparator===undefined){r.options.keySeparator="."}if(r.options.ignoreJSONStructure===undefined){r.options.ignoreJSONStructure=true}return r}w(t,[{key:"addNamespaces",value:function e(t){if(this.options.ns.indexOf(t)<0){this.options.ns.push(t)}}},{key:"removeNamespaces",value:function e(t){var r=this.options.ns.indexOf(t);if(r>-1){this.options.ns.splice(r,1)}}},{key:"getResource",value:function e(t,r,n){var a=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};var i=a.keySeparator!==undefined?a.keySeparator:this.options.keySeparator;var o=a.ignoreJSONStructure!==undefined?a.ignoreJSONStructure:this.options.ignoreJSONStructure;var s=[t,r];if(n&&typeof n!=="string")s=s.concat(n);if(n&&typeof n==="string")s=s.concat(i?n.split(i):n);if(t.indexOf(".")>-1){s=t.split(".")}var l=W(this.data,s);if(l||!o||typeof n!=="string")return l;return re(this.data&&this.data[t]&&this.data[t][r],n,i)}},{key:"addResource",value:function e(t,r,n,a){var i=arguments.length>4&&arguments[4]!==undefined?arguments[4]:{silent:false};var o=this.options.keySeparator;if(o===undefined)o=".";var s=[t,r];if(n)s=s.concat(o?n.split(o):n);if(t.indexOf(".")>-1){s=t.split(".");a=r;r=s[1]}this.addNamespaces(r);K(this.data,s,a);if(!i.silent)this.emit("added",t,r,n,a)}},{key:"addResources",value:function e(t,r,n){var a=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{silent:false};for(var i in n){if(typeof n[i]==="string"||Object.prototype.toString.apply(n[i])==="[object Array]")this.addResource(t,r,i,n[i],{silent:true})}if(!a.silent)this.emit("added",t,r,n)}},{key:"addResourceBundle",value:function e(t,r,n,a,i){var o=arguments.length>5&&arguments[5]!==undefined?arguments[5]:{silent:false};var s=[t,r];if(t.indexOf(".")>-1){s=t.split(".");a=n;n=r;r=s[1]}this.addNamespaces(r);var l=W(this.data,s)||{};if(a){Q(l,n,i)}else{l=N({},l,n)}K(this.data,s,l);if(!o.silent)this.emit("added",t,r,n)}},{key:"removeResourceBundle",value:function e(t,r){if(this.hasResourceBundle(t,r)){delete this.data[t][r]}this.removeNamespaces(r);this.emit("removed",t,r)}},{key:"hasResourceBundle",value:function e(t,r){return this.getResource(t,r)!==undefined}},{key:"getResourceBundle",value:function e(t,r){if(!r)r=this.options.defaultNS;if(this.options.compatibilityAPI==="v1")return N({},{},this.getResource(t,r));return this.getResource(t,r)}},{key:"getDataByLanguage",value:function e(t){return this.data[t]}},{key:"hasLanguageSomeTranslations",value:function e(t){var r=this.getDataByLanguage(t);var n=r&&Object.keys(r)||[];return!!n.find((function(e){return r[e]&&Object.keys(r[e]).length>0}))}},{key:"toJSON",value:function e(){return this.data}}]);return t}(D);var ae={processors:{},addPostProcessor:function e(t){this.processors[t.name]=t},handle:function e(t,r,n,a,i){var o=this;t.forEach((function(e){if(o.processors[e])r=o.processors[e].process(r,n,a,i)}));return r}};var ie={};var oe=function(e){A(t,e);function t(e){var r;var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};z(this,t);r=B(this,q(t).call(this));if(Z){D.call(T(r))}F(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,T(r));r.options=n;if(r.options.keySeparator===undefined){r.options.keySeparator="."}r.logger=L.create("translator");return r}w(t,[{key:"changeLanguage",value:function e(t){if(t)this.language=t}},{key:"exists",value:function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{interpolation:{}};if(t===undefined||t===null){return false}var n=this.resolve(t,r);return n&&n.res!==undefined}},{key:"extractFromKey",value:function e(t,r){var n=r.nsSeparator!==undefined?r.nsSeparator:this.options.nsSeparator;if(n===undefined)n=":";var a=r.keySeparator!==undefined?r.keySeparator:this.options.keySeparator;var i=r.ns||this.options.defaultNS;var o=n&&t.indexOf(n)>-1;var s=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!te(t,n,a);if(o&&!s){var l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0){return{key:t,namespaces:i}}var c=t.split(n);if(n!==a||n===a&&this.options.ns.indexOf(c[0])>-1)i=c.shift();t=c.join(a)}if(typeof i==="string")i=[i];return{key:t,namespaces:i}}},{key:"translate",value:function e(r,n,a){var i=this;if(b(n)!=="object"&&this.options.overloadTranslationOptionHandler){n=this.options.overloadTranslationOptionHandler(arguments)}if(!n)n={};if(r===undefined||r===null)return"";if(!Array.isArray(r))r=[String(r)];var o=n.keySeparator!==undefined?n.keySeparator:this.options.keySeparator;var s=this.extractFromKey(r[r.length-1],n),l=s.key,c=s.namespaces;var p=c[c.length-1];var d=n.lng||this.language;var u=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&d.toLowerCase()==="cimode"){if(u){var m=n.nsSeparator||this.options.nsSeparator;return p+m+l}return l}var f=this.resolve(r,n);var h=f&&f.res;var g=f&&f.usedKey||l;var y=f&&f.exactUsedKey||l;var v=Object.prototype.toString.apply(h);var x=["[object Number]","[object Function]","[object RegExp]"];var z=n.joinArrays!==undefined?n.joinArrays:this.options.joinArrays;var S=!this.i18nFormat||this.i18nFormat.handleAsObject;var w=typeof h!=="string"&&typeof h!=="boolean"&&typeof h!=="number";if(S&&h&&w&&x.indexOf(v)<0&&!(typeof z==="string"&&v==="[object Array]")){if(!n.returnObjects&&!this.options.returnObjects){if(!this.options.returnedObjectHandler){this.logger.warn("accessing an object - but returnObjects options is not enabled!")}return this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,h,N({},n,{ns:c})):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.")}if(o){var P=v==="[object Array]";var C=P?[]:{};var R=P?y:g;for(var _ in h){if(Object.prototype.hasOwnProperty.call(h,_)){var E="".concat(R).concat(o).concat(_);C[_]=this.translate(E,N({},n,{joinArrays:false,ns:c}));if(C[_]===E)C[_]=h[_]}}h=C}}else if(S&&typeof z==="string"&&v==="[object Array]"){h=h.join(z);if(h)h=this.extendTranslation(h,r,n,a)}else{var k=false;var O=false;var T=n.count!==undefined&&typeof n.count!=="string";var B=t.hasDefaultValue(n);var q=T?this.pluralResolver.getSuffix(d,n.count,n):"";var M=n["defaultValue".concat(q)]||n.defaultValue;if(!this.isValidLookup(h)&&B){k=true;h=M}if(!this.isValidLookup(h)){O=true;h=l}var A=n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey;var I=A&&O?undefined:h;var H=B&&M!==h&&this.options.updateMissing;if(O||k||H){this.logger.log(H?"updateKey":"missingKey",d,p,l,H?M:h);if(o){var L=this.resolve(l,N({},n,{keySeparator:false}));if(L&&L.res)this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var D=[];var j=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&j&&j[0]){for(var U=0;U<j.length;U++){D.push(j[U])}}else if(this.options.saveMissingTo==="all"){D=this.languageUtils.toResolveHierarchy(n.lng||this.language)}else{D.push(n.lng||this.language)}var F=function e(t,r,a){if(i.options.missingKeyHandler){i.options.missingKeyHandler(t,p,r,H?a:I,H,n)}else if(i.backendConnector&&i.backendConnector.saveMissing){i.backendConnector.saveMissing(t,p,r,H?a:I,H,n)}i.emit("missingKey",t,p,r,h)};if(this.options.saveMissing){if(this.options.saveMissingPlurals&&T){D.forEach((function(e){i.pluralResolver.getSuffixes(e).forEach((function(t){F([e],l+t,n["defaultValue".concat(t)]||M)}))}))}else{F(D,l,M)}}}h=this.extendTranslation(h,r,n,f,a);if(O&&h===l&&this.options.appendNamespaceToMissingKey)h="".concat(p,":").concat(l);if((O||k)&&this.options.parseMissingKeyHandler)h=this.options.parseMissingKeyHandler(h)}return h}},{key:"extendTranslation",value:function e(t,r,n,a,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse){t=this.i18nFormat.parse(t,n,a.usedLng,a.usedNS,a.usedKey,{resolved:a})}else if(!n.skipInterpolation){if(n.interpolation)this.interpolator.init(N({},n,{interpolation:N({},this.options.interpolation,n.interpolation)}));var s=n.interpolation&&n.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;var l;if(s){var c=t.match(this.interpolator.nestingRegexp);l=c&&c.length}var p=n.replace&&typeof n.replace!=="string"?n.replace:n;if(this.options.interpolation.defaultVariables)p=N({},this.options.interpolation.defaultVariables,p);t=this.interpolator.interpolate(t,p,n.lng||this.language,n);if(s){var d=t.match(this.interpolator.nestingRegexp);var u=d&&d.length;if(l<u)n.nest=false}if(n.nest!==false)t=this.interpolator.nest(t,(function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++){t[a]=arguments[a]}if(i&&i[0]===t[0]&&!n.context){o.logger.warn("It seems you are nesting recursively key: ".concat(t[0]," in key: ").concat(r[0]));return null}return o.translate.apply(o,t.concat([r]))}),n);if(n.interpolation)this.interpolator.reset()}var m=n.postProcess||this.options.postProcess;var f=typeof m==="string"?[m]:m;if(t!==undefined&&t!==null&&f&&f.length&&n.applyPostProcessor!==false){t=ae.handle(f,t,r,this.options&&this.options.postProcessPassResolved?N({i18nResolved:a},n):n,this)}return t}},{key:"resolve",value:function e(t){var r=this;var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var a;var i;var o;var s;var l;if(typeof t==="string")t=[t];t.forEach((function(e){if(r.isValidLookup(a))return;var t=r.extractFromKey(e,n);var c=t.key;i=c;var p=t.namespaces;if(r.options.fallbackNS)p=p.concat(r.options.fallbackNS);var d=n.count!==undefined&&typeof n.count!=="string";var u=n.context!==undefined&&(typeof n.context==="string"||typeof n.context==="number")&&n.context!=="";var m=n.lngs?n.lngs:r.languageUtils.toResolveHierarchy(n.lng||r.language,n.fallbackLng);p.forEach((function(e){if(r.isValidLookup(a))return;l=e;if(!ie["".concat(m[0],"-").concat(e)]&&r.utils&&r.utils.hasLoadedNamespace&&!r.utils.hasLoadedNamespace(l)){ie["".concat(m[0],"-").concat(e)]=true;r.logger.warn('key "'.concat(i,'" for languages "').concat(m.join(", "),'" won\'t get resolved as namespace "').concat(l,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}m.forEach((function(t){if(r.isValidLookup(a))return;s=t;var i=c;var l=[i];if(r.i18nFormat&&r.i18nFormat.addLookupKeys){r.i18nFormat.addLookupKeys(l,c,t,e,n)}else{var p;if(d)p=r.pluralResolver.getSuffix(t,n.count,n);if(d&&u)l.push(i+p);if(u)l.push(i+="".concat(r.options.contextSeparator).concat(n.context));if(d)l.push(i+=p)}var m;while(m=l.pop()){if(!r.isValidLookup(a)){o=m;a=r.getResource(t,e,m,n)}}}))}))}));return{res:a,usedKey:i,exactUsedKey:o,usedLng:s,usedNS:l}}},{key:"isValidLookup",value:function e(t){return t!==undefined&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}},{key:"getResource",value:function e(t,r,n){var a=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};if(this.i18nFormat&&this.i18nFormat.getResource)return this.i18nFormat.getResource(t,r,n,a);return this.resourceStore.getResource(t,r,n,a)}}],[{key:"hasDefaultValue",value:function e(t){var r="defaultValue";for(var n in t){if(Object.prototype.hasOwnProperty.call(t,n)&&r===n.substring(0,r.length)&&undefined!==t[n]){return true}}return false}}]);return t}(D);function se(e){return e.charAt(0).toUpperCase()+e.slice(1)}var le=function(){function e(t){z(this,e);this.options=t;this.supportedLngs=this.options.supportedLngs||false;this.logger=L.create("languageUtils")}w(e,[{key:"getScriptPartFromCode",value:function e(t){if(!t||t.indexOf("-")<0)return null;var r=t.split("-");if(r.length===2)return null;r.pop();if(r[r.length-1].toLowerCase()==="x")return null;return this.formatLanguageCode(r.join("-"))}},{key:"getLanguagePartFromCode",value:function e(t){if(!t||t.indexOf("-")<0)return t;var r=t.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function e(t){if(typeof t==="string"&&t.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"];var n=t.split("-");if(this.options.lowerCaseLng){n=n.map((function(e){return e.toLowerCase()}))}else if(n.length===2){n[0]=n[0].toLowerCase();n[1]=n[1].toUpperCase();if(r.indexOf(n[1].toLowerCase())>-1)n[1]=se(n[1].toLowerCase())}else if(n.length===3){n[0]=n[0].toLowerCase();if(n[1].length===2)n[1]=n[1].toUpperCase();if(n[0]!=="sgn"&&n[2].length===2)n[2]=n[2].toUpperCase();if(r.indexOf(n[1].toLowerCase())>-1)n[1]=se(n[1].toLowerCase());if(r.indexOf(n[2].toLowerCase())>-1)n[2]=se(n[2].toLowerCase())}return n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isSupportedCode",value:function e(t){if(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs){t=this.getLanguagePartFromCode(t)}return!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}},{key:"getBestMatchFromCodes",value:function e(t){var r=this;if(!t)return null;var n;t.forEach((function(e){if(n)return;var t=r.formatLanguageCode(e);if(!r.options.supportedLngs||r.isSupportedCode(t))n=t}));if(!n&&this.options.supportedLngs){t.forEach((function(e){if(n)return;var t=r.getLanguagePartFromCode(e);if(r.isSupportedCode(t))return n=t;n=r.options.supportedLngs.find((function(e){if(e.indexOf(t)===0)return e}))}))}if(!n)n=this.getFallbackCodes(this.options.fallbackLng)[0];return n}},{key:"getFallbackCodes",value:function e(t,r){if(!t)return[];if(typeof t==="function")t=t(r);if(typeof t==="string")t=[t];if(Object.prototype.toString.apply(t)==="[object Array]")return t;if(!r)return t["default"]||[];var n=t[r];if(!n)n=t[this.getScriptPartFromCode(r)];if(!n)n=t[this.formatLanguageCode(r)];if(!n)n=t[this.getLanguagePartFromCode(r)];if(!n)n=t["default"];return n||[]}},{key:"toResolveHierarchy",value:function e(t,r){var n=this;var a=this.getFallbackCodes(r||this.options.fallbackLng||[],t);var i=[];var o=function e(t){if(!t)return;if(n.isSupportedCode(t)){i.push(t)}else{n.logger.warn("rejecting language code not found in supportedLngs: ".concat(t))}};if(typeof t==="string"&&t.indexOf("-")>-1){if(this.options.load!=="languageOnly")o(this.formatLanguageCode(t));if(this.options.load!=="languageOnly"&&this.options.load!=="currentOnly")o(this.getScriptPartFromCode(t));if(this.options.load!=="currentOnly")o(this.getLanguagePartFromCode(t))}else if(typeof t==="string"){o(this.formatLanguageCode(t))}a.forEach((function(e){if(i.indexOf(e)<0)o(n.formatLanguageCode(e))}));return i}}]);return e}();var ce=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}];var pe={1:function e(t){return Number(t>1)},2:function e(t){return Number(t!=1)},3:function e(t){return 0},4:function e(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function e(t){return Number(t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function e(t){return Number(t==1?0:t>=2&&t<=4?1:2)},7:function e(t){return Number(t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function e(t){return Number(t==1?0:t==2?1:t!=8&&t!=11?2:3)},9:function e(t){return Number(t>=2)},10:function e(t){return Number(t==1?0:t==2?1:t<7?2:t<11?3:4)},11:function e(t){return Number(t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3)},12:function e(t){return Number(t%10!=1||t%100==11)},13:function e(t){return Number(t!==0)},14:function e(t){return Number(t==1?0:t==2?1:t==3?2:3)},15:function e(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function e(t){return Number(t%10==1&&t%100!=11?0:t!==0?1:2)},17:function e(t){return Number(t==1||t%10==1&&t%100!=11?0:1)},18:function e(t){return Number(t==0?0:t==1?1:2)},19:function e(t){return Number(t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function e(t){return Number(t==1?0:t==0||t%100>0&&t%100<20?1:2)},21:function e(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function e(t){return Number(t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3)}};var de=["v1","v2","v3"];var ue={zero:0,one:1,two:2,few:3,many:4,other:5};function me(){var e={};ce.forEach((function(t){t.lngs.forEach((function(r){e[r]={numbers:t.nr,plurals:pe[t.fc]}}))}));return e}var fe=function(){function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};z(this,e);this.languageUtils=t;this.options=r;this.logger=L.create("pluralResolver");if((!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl==="undefined"||!Intl.PluralRules)){this.options.compatibilityJSON="v3";this.logger.error("Your environment seems not to be Inlt API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")}this.rules=me()}w(e,[{key:"addRule",value:function e(t,r){this.rules[t]=r}},{key:"getRule",value:function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(this.shouldUseIntlApi()){try{return new Intl.PluralRules(t,{type:r.ordinal?"ordinal":"cardinal"})}catch(e){return}}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function e(t){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var n=this.getRule(t,r);if(this.shouldUseIntlApi()){return n&&n.resolvedOptions().pluralCategories.length>1}return n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function e(t,r){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};return this.getSuffixes(t,n).map((function(e){return"".concat(r).concat(e)}))}},{key:"getSuffixes",value:function e(t){var r=this;var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var a=this.getRule(t,n);if(!a){return[]}if(this.shouldUseIntlApi()){return a.resolvedOptions().pluralCategories.sort((function(e,t){return ue[e]-ue[t]})).map((function(e){return"".concat(r.options.prepend).concat(e)}))}return a.numbers.map((function(e){return r.getSuffix(t,e,n)}))}},{key:"getSuffix",value:function e(t,r){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var a=this.getRule(t,n);if(a){if(this.shouldUseIntlApi()){return"".concat(this.options.prepend).concat(a.select(r))}return this.getSuffixRetroCompatible(a,r)}this.logger.warn("no plural rule found for: ".concat(t));return""}},{key:"getSuffixRetroCompatible",value:function e(t,r){var n=this;var a=t.noAbs?t.plurals(r):t.plurals(Math.abs(r));var i=t.numbers[a];if(this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1){if(i===2){i="plural"}else if(i===1){i=""}}var o=function e(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};if(this.options.compatibilityJSON==="v1"){if(i===1)return"";if(typeof i==="number")return"_plural_".concat(i.toString());return o()}else if(this.options.compatibilityJSON==="v2"){return o()}else if(this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1){return o()}return this.options.prepend&&a.toString()?this.options.prepend+a.toString():a.toString()}},{key:"shouldUseIntlApi",value:function e(){return!de.includes(this.options.compatibilityJSON)}}]);return e}();var he=function(){function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};z(this,e);this.logger=L.create("interpolator");this.options=t;this.format=t.interpolation&&t.interpolation.format||function(e){return e};this.init(t)}w(e,[{key:"init",value:function e(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};if(!t.interpolation)t.interpolation={escapeValue:true};var r=t.interpolation;this.escape=r.escape!==undefined?r.escape:$;this.escapeValue=r.escapeValue!==undefined?r.escapeValue:true;this.useRawValueToEscape=r.useRawValueToEscape!==undefined?r.useRawValueToEscape:false;this.prefix=r.prefix?Y(r.prefix):r.prefixEscaped||"{{";this.suffix=r.suffix?Y(r.suffix):r.suffixEscaped||"}}";this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",";this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-";this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"";this.nestingPrefix=r.nestingPrefix?Y(r.nestingPrefix):r.nestingPrefixEscaped||Y("$t(");this.nestingSuffix=r.nestingSuffix?Y(r.nestingSuffix):r.nestingSuffixEscaped||Y(")");this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",";this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3;this.alwaysFormat=r.alwaysFormat!==undefined?r.alwaysFormat:false;this.resetRegExp()}},{key:"reset",value:function e(){if(this.options)this.init(this.options)}},{key:"resetRegExp",value:function e(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(t,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function e(t,r,n,a){var i=this;var o;var s;var l;var c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function p(e){return e.replace(/\$/g,"$$$$")}var d=function e(t){if(t.indexOf(i.formatSeparator)<0){var o=X(r,c,t);return i.alwaysFormat?i.format(o,undefined,n,N({},a,r,{interpolationkey:t})):o}var s=t.split(i.formatSeparator);var l=s.shift().trim();var p=s.join(i.formatSeparator).trim();return i.format(X(r,c,l),p,n,N({},a,r,{interpolationkey:l}))};this.resetRegExp();var u=a&&a.missingInterpolationHandler||this.options.missingInterpolationHandler;var m=a&&a.interpolation&&a.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;var f=[{regex:this.regexpUnescape,safeValue:function e(t){return p(t)}},{regex:this.regexp,safeValue:function e(t){return i.escapeValue?p(i.escape(t)):p(t)}}];f.forEach((function(e){l=0;while(o=e.regex.exec(t)){s=d(o[1].trim());if(s===undefined){if(typeof u==="function"){var r=u(t,o,a);s=typeof r==="string"?r:""}else if(m){s=o[0];continue}else{i.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(t));s=""}}else if(typeof s!=="string"&&!i.useRawValueToEscape){s=U(s)}var n=e.safeValue(s);t=t.replace(o[0],n);if(m){e.regex.lastIndex+=n.length;e.regex.lastIndex-=o[0].length}else{e.regex.lastIndex=0}l++;if(l>=i.maxReplaces){break}}}));return t}},{key:"nest",value:function e(t,r){var n=this;var a=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var i;var o;var s=N({},a);s.applyPostProcessor=false;delete s.defaultValue;function l(e,t){var r=this.nestingOptionsSeparator;if(e.indexOf(r)<0)return e;var n=e.split(new RegExp("".concat(r,"[ ]*{")));var a="{".concat(n[1]);e=n[0];a=this.interpolate(a,s);a=a.replace(/'/g,'"');try{s=JSON.parse(a);if(t)s=N({},t,s)}catch(t){this.logger.warn("failed parsing options string in nesting for key ".concat(e),t);return"".concat(e).concat(r).concat(a)}delete s.defaultValue;return e}while(i=this.nestingRegexp.exec(t)){var c=[];var p=false;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){var d=i[1].split(this.formatSeparator).map((function(e){return e.trim()}));i[1]=d.shift();c=d;p=true}o=r(l.call(this,i[1].trim(),s),s);if(o&&i[0]===t&&typeof o!=="string")return o;if(typeof o!=="string")o=U(o);if(!o){this.logger.warn("missed to resolve ".concat(i[1]," for nesting ").concat(t));o=""}if(p){o=c.reduce((function(e,t){return n.format(e,t,a.lng,N({},a,{interpolationkey:i[1].trim()}))}),o.trim())}t=t.replace(i[0],o);this.regexp.lastIndex=0}return t}}]);return e}();function ge(e,t){var r=e.indexOf(t);while(r!==-1){e.splice(r,1);r=e.indexOf(t)}}var ye=function(e){A(t,e);function t(e,r,n){var a;var i=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};z(this,t);a=B(this,q(t).call(this));if(Z){D.call(T(a))}a.backend=e;a.store=r;a.services=n;a.languageUtils=n.languageUtils;a.options=i;a.logger=L.create("backendConnector");a.state={};a.queue=[];if(a.backend&&a.backend.init){a.backend.init(n,i.backend,i)}return a}w(t,[{key:"queueLoad",value:function e(t,r,n,a){var i=this;var o=[];var s=[];var l=[];var c=[];t.forEach((function(e){var t=true;r.forEach((function(r){var a="".concat(e,"|").concat(r);if(!n.reload&&i.store.hasResourceBundle(e,r)){i.state[a]=2}else if(i.state[a]<0);else if(i.state[a]===1){if(s.indexOf(a)<0)s.push(a)}else{i.state[a]=1;t=false;if(s.indexOf(a)<0)s.push(a);if(o.indexOf(a)<0)o.push(a);if(c.indexOf(r)<0)c.push(r)}}));if(!t)l.push(e)}));if(o.length||s.length){this.queue.push({pending:s,loaded:{},errors:[],callback:a})}return{toLoad:o,pending:s,toLoadLanguages:l,toLoadNamespaces:c}}},{key:"loaded",value:function e(t,r,n){var a=t.split("|");var i=a[0];var o=a[1];if(r)this.emit("failedLoading",i,o,r);if(n){this.store.addResourceBundle(i,o,n)}this.state[t]=r?-1:2;var e={};this.queue.forEach((function(n){G(n.loaded,[i],o);ge(n.pending,t);if(r)n.errors.push(r);if(n.pending.length===0&&!n.done){Object.keys(n.loaded).forEach((function(t){if(!e[t])e[t]=[];if(n.loaded[t].length){n.loaded[t].forEach((function(r){if(e[t].indexOf(r)<0)e[t].push(r)}))}}));n.done=true;if(n.errors.length){n.callback(n.errors)}else{n.callback()}}}));this.emit("loaded",e);this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function e(t,r,n){var a=this;var i=arguments.length>3&&arguments[3]!==undefined?arguments[3]:0;var o=arguments.length>4&&arguments[4]!==undefined?arguments[4]:350;var s=arguments.length>5?arguments[5]:undefined;if(!t.length)return s(null,{});return this.backend[n](t,r,(function(e,l){if(e&&l&&i<5){setTimeout((function(){a.read.call(a,t,r,n,i+1,o*2,s)}),o);return}s(e,l)}))}},{key:"prepareLoading",value:function e(t,r){var n=this;var a=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var i=arguments.length>3?arguments[3]:undefined;if(!this.backend){this.logger.warn("No backend was added via i18next.use. Will not load resources.");return i&&i()}if(typeof t==="string")t=this.languageUtils.toResolveHierarchy(t);if(typeof r==="string")r=[r];var o=this.queueLoad(t,r,a,i);if(!o.toLoad.length){if(!o.pending.length)i();return null}o.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function e(t,r,n){this.prepareLoading(t,r,{},n)}},{key:"reload",value:function e(t,r,n){this.prepareLoading(t,r,{reload:true},n)}},{key:"loadOne",value:function e(t){var r=this;var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"";var a=t.split("|");var i=a[0];var o=a[1];this.read(i,o,"read",undefined,undefined,(function(e,a){if(e)r.logger.warn("".concat(n,"loading namespace ").concat(o," for language ").concat(i," failed"),e);if(!e&&a)r.logger.log("".concat(n,"loaded namespace ").concat(o," for language ").concat(i),a);r.loaded(t,e,a)}))}},{key:"saveMissing",value:function e(t,r,n,a,i){var o=arguments.length>5&&arguments[5]!==undefined?arguments[5]:{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(r)){this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(r,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(n===undefined||n===null||n==="")return;if(this.backend&&this.backend.create){this.backend.create(t,r,n,a,null,N({},o,{isUpdate:i}))}if(!t||!t[0])return;this.store.addResource(t[0],r,n,a)}}]);return t}(D);function ve(){return{debug:false,initImmediate:true,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:false,supportedLngs:false,nonExplicitSupportedLngs:false,load:"all",preload:false,simplifyPluralSuffix:true,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:false,saveMissing:false,updateMissing:false,saveMissingTo:"fallback",saveMissingPlurals:true,missingKeyHandler:false,missingInterpolationHandler:false,postProcess:false,postProcessPassResolved:false,returnNull:true,returnEmptyString:true,returnObjects:false,joinArrays:false,returnedObjectHandler:false,parseMissingKeyHandler:false,appendNamespaceToMissingKey:false,appendNamespaceToCIMode:false,overloadTranslationOptionHandler:function e(t){var r={};if(b(t[1])==="object")r=t[1];if(typeof t[1]==="string")r.defaultValue=t[1];if(typeof t[2]==="string")r.tDescription=t[2];if(b(t[2])==="object"||b(t[3])==="object"){var n=t[3]||t[2];Object.keys(n).forEach((function(e){r[e]=n[e]}))}return r},interpolation:{escapeValue:true,format:function e(t,r,n,a){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:true}}}function be(e){if(typeof e.ns==="string")e.ns=[e.ns];if(typeof e.fallbackLng==="string")e.fallbackLng=[e.fallbackLng];if(typeof e.fallbackNS==="string")e.fallbackNS=[e.fallbackNS];if(e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0){e.supportedLngs=e.supportedLngs.concat(["cimode"])}return e}function xe(){}var Ne=function(e){A(t,e);function t(){var e;var r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var n=arguments.length>1?arguments[1]:undefined;z(this,t);e=B(this,q(t).call(this));if(Z){D.call(T(e))}e.options=be(r);e.services={};e.logger=L;e.modules={external:[]};if(n&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate){e.init(r,n);return B(e,T(e))}setTimeout((function(){e.init(r,n)}),0)}return e}w(t,[{key:"init",value:function e(){var t=this;var r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var n=arguments.length>1?arguments[1]:undefined;if(typeof r==="function"){n=r;r={}}if(!r.defaultNS&&r.ns){if(typeof r.ns==="string"){r.defaultNS=r.ns}else if(r.ns.indexOf("translation")<0){r.defaultNS=r.ns[0]}}this.options=N({},ve(),this.options,be(r));if(r.keySeparator!==undefined){this.options.userDefinedKeySeparator=r.keySeparator}this.format=this.options.interpolation.format;if(!n)n=xe;function a(e){if(!e)return null;if(typeof e==="function")return new e;return e}if(!this.options.isClone){if(this.modules.logger){L.init(a(this.modules.logger),this.options)}else{L.init(null,this.options)}var i=new le(this.options);this.store=new ne(this.options.resources,this.options);var o=this.services;o.logger=L;o.resourceStore=this.store;o.languageUtils=i;o.pluralResolver=new fe(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix});o.interpolator=new he(this.options);o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)};o.backendConnector=new ye(a(this.modules.backend),o.resourceStore,o,this.options);o.backendConnector.on("*",(function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++){n[a-1]=arguments[a]}t.emit.apply(t,[e].concat(n))}));if(this.modules.languageDetector){o.languageDetector=a(this.modules.languageDetector);o.languageDetector.init(o,this.options.detection,this.options)}if(this.modules.i18nFormat){o.i18nFormat=a(this.modules.i18nFormat);if(o.i18nFormat.init)o.i18nFormat.init(this)}this.translator=new oe(this.services,this.options);this.translator.on("*",(function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++){n[a-1]=arguments[a]}t.emit.apply(t,[e].concat(n))}));this.modules.external.forEach((function(e){if(e.init)e.init(t)}))}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);if(s.length>0&&s[0]!=="dev")this.options.lng=s[0]}if(!this.services.languageDetector&&!this.options.lng){this.logger.warn("init: no languageDetector is used and no lng is defined")}var l=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];l.forEach((function(e){t[e]=function(){var r;return(r=t.store)[e].apply(r,arguments)}}));var c=["addResource","addResources","addResourceBundle","removeResourceBundle"];c.forEach((function(e){t[e]=function(){var r;(r=t.store)[e].apply(r,arguments);return t}}));var p=j();var d=function e(){var r=function e(r,a){if(t.isInitialized&&!t.initializedStoreOnce)t.logger.warn("init: i18next is already initialized. You should call init just once!");t.isInitialized=true;if(!t.options.isClone)t.logger.log("initialized",t.options);t.emit("initialized",t.options);p.resolve(a);n(r,a)};if(t.languages&&t.options.compatibilityAPI!=="v1"&&!t.isInitialized)return r(null,t.t.bind(t));t.changeLanguage(t.options.lng,r)};if(this.options.resources||!this.options.initImmediate){d()}else{setTimeout(d,0)}return p}},{key:"loadResources",value:function e(t){var r=this;var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:xe;var a=n;var i=typeof t==="string"?t:this.language;if(typeof t==="function")a=t;if(!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode")return a();var o=[];var s=function e(t){if(!t)return;var n=r.services.languageUtils.toResolveHierarchy(t);n.forEach((function(e){if(o.indexOf(e)<0)o.push(e)}))};if(!i){var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.forEach((function(e){return s(e)}))}else{s(i)}if(this.options.preload){this.options.preload.forEach((function(e){return s(e)}))}this.services.backendConnector.load(o,this.options.ns,a)}else{a(null)}}},{key:"reloadResources",value:function e(t,r,n){var a=j();if(!t)t=this.languages;if(!r)r=this.options.ns;if(!n)n=xe;this.services.backendConnector.reload(t,r,(function(e){a.resolve();n(e)}));return a}},{key:"use",value:function e(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");if(t.type==="backend"){this.modules.backend=t}if(t.type==="logger"||t.log&&t.warn&&t.error){this.modules.logger=t}if(t.type==="languageDetector"){this.modules.languageDetector=t}if(t.type==="i18nFormat"){this.modules.i18nFormat=t}if(t.type==="postProcessor"){ae.addPostProcessor(t)}if(t.type==="3rdParty"){this.modules.external.push(t)}return this}},{key:"changeLanguage",value:function e(t,r){var n=this;this.isLanguageChangingTo=t;var a=j();this.emit("languageChanging",t);var i=function e(t){n.language=t;n.languages=n.services.languageUtils.toResolveHierarchy(t);n.resolvedLanguage=undefined;if(["cimode","dev"].indexOf(t)>-1)return;for(var r=0;r<n.languages.length;r++){var a=n.languages[r];if(["cimode","dev"].indexOf(a)>-1)continue;if(n.store.hasLanguageSomeTranslations(a)){n.resolvedLanguage=a;break}}};var o=function e(t,o){if(o){i(o);n.translator.changeLanguage(o);n.isLanguageChangingTo=undefined;n.emit("languageChanged",o);n.logger.log("languageChanged",o)}else{n.isLanguageChangingTo=undefined}a.resolve((function(){return n.t.apply(n,arguments)}));if(r)r(t,(function(){return n.t.apply(n,arguments)}))};var s=function e(r){if(!t&&!r&&n.services.languageDetector)r=[];var a=typeof r==="string"?r:n.services.languageUtils.getBestMatchFromCodes(r);if(a){if(!n.language){i(a)}if(!n.translator.language)n.translator.changeLanguage(a);if(n.services.languageDetector)n.services.languageDetector.cacheUserLanguage(a)}n.loadResources(a,(function(e){o(e,a)}))};if(!t&&this.services.languageDetector&&!this.services.languageDetector.async){s(this.services.languageDetector.detect())}else if(!t&&this.services.languageDetector&&this.services.languageDetector.async){this.services.languageDetector.detect(s)}else{s(t)}return a}},{key:"getFixedT",value:function e(t,r,n){var a=this;var i=function e(t,r){var i;if(b(r)!=="object"){for(var o=arguments.length,s=new Array(o>2?o-2:0),l=2;l<o;l++){s[l-2]=arguments[l]}i=a.options.overloadTranslationOptionHandler([t,r].concat(s))}else{i=N({},r)}i.lng=i.lng||e.lng;i.lngs=i.lngs||e.lngs;i.ns=i.ns||e.ns;var c=a.options.keySeparator||".";var p=n?"".concat(n).concat(c).concat(t):t;return a.t(p,i)};if(typeof t==="string"){i.lng=t}else{i.lngs=t}i.ns=r;i.keyPrefix=n;return i}},{key:"t",value:function e(){var t;return this.translator&&(t=this.translator).translate.apply(t,arguments)}},{key:"exists",value:function e(){var t;return this.translator&&(t=this.translator).exists.apply(t,arguments)}},{key:"setDefaultNamespace",value:function e(t){this.options.defaultNS=t}},{key:"hasLoadedNamespace",value:function e(t){var r=this;var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(!this.isInitialized){this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages);return false}if(!this.languages||!this.languages.length){this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages);return false}var a=this.resolvedLanguage||this.languages[0];var i=this.options?this.options.fallbackLng:false;var o=this.languages[this.languages.length-1];if(a.toLowerCase()==="cimode")return true;var s=function e(t,n){var a=r.services.backendConnector.state["".concat(t,"|").concat(n)];return a===-1||a===2};if(n.precheck){var l=n.precheck(this,s);if(l!==undefined)return l}if(this.hasResourceBundle(a,t))return true;if(!this.services.backendConnector.backend)return true;if(s(a,t)&&(!i||s(o,t)))return true;return false}},{key:"loadNamespaces",value:function e(t,r){var n=this;var a=j();if(!this.options.ns){r&&r();return Promise.resolve()}if(typeof t==="string")t=[t];t.forEach((function(e){if(n.options.ns.indexOf(e)<0)n.options.ns.push(e)}));this.loadResources((function(e){a.resolve();if(r)r(e)}));return a}},{key:"loadLanguages",value:function e(t,r){var n=j();if(typeof t==="string")t=[t];var a=this.options.preload||[];var i=t.filter((function(e){return a.indexOf(e)<0}));if(!i.length){if(r)r();return Promise.resolve()}this.options.preload=a.concat(i);this.loadResources((function(e){n.resolve();if(r)r(e)}));return n}},{key:"dir",value:function e(t){if(!t)t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language);if(!t)return"rtl";var r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"];return r.indexOf(this.services.languageUtils.getLanguagePartFromCode(t))>=0?"rtl":"ltr"}},{key:"createInstance",value:function e(){var r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var n=arguments.length>1?arguments[1]:undefined;return new t(r,n)}},{key:"cloneInstance",value:function e(){var r=this;var n=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var a=arguments.length>1&&arguments[1]!==undefined?arguments[1]:xe;var i=N({},this.options,n,{isClone:true});var o=new t(i);var s=["store","services","language"];s.forEach((function(e){o[e]=r[e]}));o.services=N({},this.services);o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)};o.translator=new oe(o.services,o.options);o.translator.on("*",(function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++){r[n-1]=arguments[n]}o.emit.apply(o,[e].concat(r))}));o.init(i,a);o.translator.options=o.options;o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)};return o}},{key:"toJSON",value:function e(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]);return t}(D);var ze=new Ne;var Se={heading:"Drucke mit ezeep Blue",description:"Melde dich mit deinem ezeep Blue-Konto an, um zu drucken.",action:"Anmelden"};var we={heading:"Keine Datei ausgewählt",description:"Wähle zunächst eine Datei zum Drucken aus.",action:"OK"};var Pe={loading:"Lade meine Drucker…",print:"Drucken",printer:"Drucker",print_processing:"Drucken…",print_success:"Erfolgreich gedruckt.",print_failed:"Druck fehlgeschlagen",not_supported:"Der ausgewählte Dateityp wird nicht unterstützt.",color:"Farbe",orientation:"Ausrichtung",size:"Papierformat",duplex:"Beidseitig",quality:"Druckqualität",select_printer:"Wähle einen Drucker",select_color:"Wähle Farbe/Graustufen",select_size:"Wähle Papierformat",select_orientation:"Wähle Ausrichtung",select_quality:"Wähle Druckqualität",select_duplex:"Wähle Beidseitig",color_color:"Farbe",color_grayscale:"Graustufen",orientation_portrait:"Hochformat",orientation_landscape:"Querformat",unknown_location:"Unbekannter Standort",no_printers:"Keine Drucker gefunden.",prepare_upload:"Vorbereiten…",uploading:"Hochladen…",duplex_none:"Keine",copies:"Kopien",duplex_long:"auf der langen Seite umdrehen",duplex_short:"auf der kurzen Seite umdrehen",pull_print_success:"Bereit zum Auslösen."};var Ce={login:"Anmelden",print:"Drucken",cancel:"Abbrechen",close:"Schließen",retry:"Wiederholen",select_printer:"Wähle Drucker"};var Re={description:"Ziehe eine Datei hier in den Browser ",meta_leading:"oder",meta_select:"wähle eine Datei aus",meta_trailing:"um mit ezeep Blue zu drucken.",selected_file:"Ausgewählte Datei:"};var _e={theme:"Farbschema",appearance:"Darstellung",system:"System",light:"Hell",dark:"Dunkel",account:"Konto verwalten",help:"Hilfe & Unterstützung",logout:"Ausloggen"};var Ee={login_dialog:Se,no_document_dialog:we,printer_selection:Pe,button_actions:Ce,upload:Re,user_menu:_e};var ke={heading:"Print with ezeep Blue",description:"Sign in with your ezeep Blue account to print.",action:"Sign in"};var Oe={heading:"No file selected",description:"Select a file first to print.",action:"OK"};var Te={loading:"Loading My Printers…",print_processing:"Printing…",print_success:"Successfully printed.",pull_print_success:"Ready to be released.",print_failed:"Print failed",not_supported:"The selected file type is not supported.",prepare_upload:"Preparing…",uploading:"Uploading…",print:"Print",printer:"Printer",color:"Color",orientation:"Orientation",size:"Paper Size",duplex:"Double-sided",duplex_none:"None",duplex_long:"flip on long side",duplex_short:"flip on short side",quality:"Print Quality",select_printer:"Select a printer",select_color:"Select Color/Grayscale",select_orientation:"Select Orientation",select_size:"Select Paper Size",select_quality:"Select Print Quality",select_duplex:"Select Double-sided",color_color:"Color",color_grayscale:"Grayscale",orientation_portrait:"Portrait",orientation_landscape:"Landscape",unknown_location:"Unknown location",no_printers:"No printers found.",copies:"Copies"};var Be={login:"Sign In",print:"Print",cancel:"Cancel",close:"Close",retry:"Retry",select_printer:"Select Printer"};var qe={description:"Drop a file here into the browser ",meta_leading:"or",meta_select:"select a file",meta_trailing:"to print with ezeep Blue.",selected_file:"Selected File:"};var Me={theme:"Color theme",appearance:"Appearance",system:"System",light:"Light",dark:"Dark",account:"Manage Account",help:"Help & Support",logout:"Logout"};var Ae={login_dialog:ke,no_document_dialog:Oe,printer_selection:Te,button_actions:Be,upload:qe,user_menu:Me};function Ie(e){return Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&")}function He(e){var t={en:{translation:Ae},de:{translation:Ee}};if(e!=""){ze.init({resources:t,lng:e,nsSeparator:false,fallbackLng:"en"})}else{ze.init({resources:t,lng:navigator.language,nsSeparator:false,fallbackLng:"en"})}}var Le=function(e){var t=e.fn,r=e.validate,n=e.interval,a=e.maxAttempts;return __awaiter(p,void 0,void 0,(function(){var e,i;var o=this;return __generator(this,(function(s){e=0;i=function(s,l){return __awaiter(o,void 0,void 0,(function(){var o;return __generator(this,(function(c){switch(c.label){case 0:return[4,t()];case 1:o=c.sent();e++;if(r(o)){return[2,s(o)]}else if(a&&e===a){return[2,l(new Error("Exceeded max attempts."))]}else{setTimeout(i,n,s,l)}return[2]}}))}))};return[2,new Promise(i)]}))}))};var De=function(e){var t={};Object.keys(e).forEach((function(r){if(e[r]!==""){t[r]=e[r]}}));return t};var je=function(){function e(e,t){this.urlParams=new URLSearchParams;this.isAuthorized=false;this.redirectURI=e;this.clientID=t;this.oauthUrl=Ue.state.authApiHostUrl;this.authURI=new URL("https://".concat(this.oauthUrl,"/oauth/authorize/"));this.accessTokenURL="https://".concat(this.oauthUrl,"/oauth/access_token/")}e.prototype.generateCodeVerifier=function(){if(Ue.state.codeVerifier!==""){this.codeVerifier=Ue.state.codeVerifier}else{var e=new Uint8Array(128);var t=crypto.getRandomValues(e);var r=btoa(t.toString()).substr(0,128);this.codeVerifier=r;Ue.state.codeVerifier=this.codeVerifier}};e.prototype.generateCodeChallenge=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,n,a;return __generator(this,(function(i){switch(i.label){case 0:t=new TextEncoder;r=t.encode(e);return[4,crypto.subtle.digest("SHA-256",r)];case 1:n=i.sent();a=btoa(String.fromCharCode.apply(null,new Uint8Array(n)));this.codeChallenge=a.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"");return[2]}}))}))};e.prototype.buildAuthURI=function(){this.urlParams.append("response_type","code");this.urlParams.append("client_id",this.clientID);this.urlParams.append("redirect_uri",this.redirectURI);this.urlParams.append("code_challenge",this.codeChallenge);this.urlParams.append("code_challenge_method","S256");this.authURI.search=this.urlParams.toString();Ue.state.authUri=this.authURI.toString()};e.prototype.getAccessToken=function(){var e=this;return fetch(this.accessTokenURL,{credentials:"include",headers:{Authorization:"Basic "+btoa(this.clientID+":"),"Content-Type":"application/x-www-form-urlencoded"},method:"POST",body:Ie({grant_type:"authorization_code",scope:"printing",code:Ue.state.code,redirect_uri:this.redirectURI,code_verifier:Ue.state.codeVerifier})}).then((function(e){return e.json()})).then((function(t){if(t.access_token){Ue.state.isAuthorized=true;e.isAuthorized=Ue.state.isAuthorized;localStorage.setItem("isAuthorized",e.isAuthorized.toString());e.accessToken=t.access_token;localStorage.setItem("access_token",e.accessToken);Ue.state.accessToken=e.accessToken;e.refreshToken=t.refresh_token;localStorage.setItem("refreshToken",e.refreshToken);Ue.state.refreshToken=e.refreshToken}}))};e.prototype.refreshTokens=function(){var e=this;fetch(this.accessTokenURL,{credentials:"include",headers:{Authorization:"Basic "+btoa(this.clientID+":"),"Content-Type":"application/x-www-form-urlencoded"},method:"POST",body:Ie({grant_type:"refresh_token",scope:"printing",refresh_token:Ue.state.refreshToken})}).then((function(e){return e.json()})).then((function(t){if(t.access_token){e.accessToken=t.access_token;localStorage.setItem("access_token",e.accessToken);Ue.state.accessToken=e.accessToken;e.refreshToken=t.refresh_token;localStorage.setItem("refreshToken",e.refreshToken);Ue.state.refreshToken=e.refreshToken;Ue.state.isAuthorized=true}}))};e.prototype.revokeRefreshToken=function(){if(Ue.state.refreshToken)fetch("https://".concat(this.oauthUrl,"/oauth/revoke/"),{credentials:"include",headers:{Authorization:"Basic "+btoa(this.clientID+":"),"Content-Type":"application/x-www-form-urlencoded"},method:"POST",body:Ie({token:Ue.state.refreshToken})}).catch((function(e){console.log(e)}))};return e}();var Ue=v({code:"",codeVerifier:"",accessToken:"",refreshToken:"",isAuthorized:false,devApi:false,authApiHostUrl:"",redirectUri:"",authUri:""});function Fe(){var e=new URLSearchParams(window.location.search);var t=e.get("code");if(window.opener){if(t){window.opener.postMessage(t,Ue.state.redirectUri);window.close()}}}var Ve=":host{--ezp-theme-solid:var(--ezp-accent-cyan-solid);--ezp-theme-translucent:var(--ezp-accent-cyan-translucent);display:block}";var Ke=e("ezp_auth",function(){function e(e){n(this,e);this.authCancel=a(this,"authCancel",7);this.authSuccess=a(this,"authSuccess",7);this.oauthPopupWindow=null;this.previousUrl=null}e.prototype.listenDialogAction=function(){this.openSignInWindow(this.auth.authURI.toString(),"ezeep Login")};e.prototype.listenDialogClose=function(){this.authCancel.emit()};e.prototype.listenStatusCancel=function(){this.authCancel.emit()};e.prototype.openSignInWindow=function(e,t){var r=this;if(Ue.state.isAuthorized){this.authCancel.emit();this.authSuccess.emit();return}window.removeEventListener("message",this.receiveMessage);var n="toolbar=no, menubar=no, width=600, height=7000, top=100, left=100";if(this.oauthPopupWindow===null||this.oauthPopupWindow.closed){this.oauthPopupWindow=window.open(e,t,n)}else if(this.previousUrl!==this.auth.authURI.toString()){this.oauthPopupWindow=window.open(e,t,n);if(!this.oauthPopupWindow||this.oauthPopupWindow.closed||typeof this.oauthPopupWindow.closed=="undefined"){alert("popup blocked")}this.oauthPopupWindow.focus()}else{this.oauthPopupWindow.focus()}window.addEventListener("message",(function(e){return r.receiveMessage(e)}),false);this.previousUrl=this.auth.authURI};e.prototype.receiveMessage=function(e){var t=this;Ue.state.code=e.data;this.auth.getAccessToken().then((function(){t.authCancel.emit();t.authSuccess.emit()}))};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:this.auth=new je(this.redirectURI,this.clientID);if(!this.code)return[3,2];Ue.state.code=this.code;return[4,this.auth.getAccessToken()];case 1:e.sent();this.authCancel.emit();this.authSuccess.emit();e.label=2;case 2:if(!(Ue.state.isAuthorized===false))return[3,4];this.auth.generateCodeVerifier();return[4,this.auth.generateCodeChallenge(Ue.state.codeVerifier)];case 3:e.sent();this.auth.buildAuthURI();e.label=4;case 4:if(this.hidelogin&&this.trigger==="button"){this.openSignInWindow(this.auth.authURI.toString(),"ezeep Login")}return[2]}}))}))};e.prototype.render=function(){var e=this;return i(o,null,this.hidelogin&&this.trigger==="button"?i("ezp-status",{description:ze.t("login_dialog.action"),processing:true,cancel:true}):this.hidelogin&&this.trigger==="file"?i("ezp-text-button",{type:"button",level:"primary",onClick:function(){return e.openSignInWindow(e.auth.authURI.toString(),"ezeep Login")},label:ze.t("button_actions.select_printer")}):i("ezp-dialog",{heading:ze.t("login_dialog.heading"),description:ze.t("login_dialog.description"),action:ze.t("login_dialog.action"),iconName:"logo",iconSize:"huge",iconFramed:false,instance:"login"}))};return e}());Ke.style=Ve;var Ge=":host{-webkit-animation:var(--ezp-backdrop-animation-name, host-in) var(--ezp-duration-3) forwards var(--ezp-easing-out-quart);animation:var(--ezp-backdrop-animation-name, host-in) var(--ezp-duration-3) forwards var(--ezp-easing-out-quart);background:var(--ezp-core-backdrop);border-radius:var(--ezp-backdrop-border-radius, 6px);display:block;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%;z-index:4}:host(.hide){--ezp-backdrop-animation-name:host-out}@-webkit-keyframes host-in{0%{opacity:0}100%{opacity:1}}@keyframes host-in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes host-out{0%{opacity:1}100%{opacity:0}}@keyframes host-out{0%{opacity:1}100%{opacity:0}}";var We=e("ezp_backdrop",function(){function e(e){n(this,e);this.backdropHideStart=a(this,"backdropHideStart",7);this.backdropHideEnd=a(this,"backdropHideEnd",7);this.visible=true}e.prototype.handleClick=function(){this.visible=false;this.backdropHideStart.emit()};e.prototype.listenAnimationEnd=function(){if(!this.visible){this.backdropHideEnd.emit()}};e.prototype.render=function(){var e=this;return i(o,{class:{hide:!this.visible},onClick:function(){return e.handleClick()}})};Object.defineProperty(e.prototype,"component",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());We.style=Ge;var Xe=":host{--ezp-icon-fill:var(--ezp-theme-solid);-ms-flex-line-pack:center;align-content:center;background:var(--ezp-core-backdrop);display:grid;grid-template:auto/minmax(auto, 280px);height:100%;-ms-flex-pack:center;justify-content:center;left:0;position:fixed;top:0;width:100%}#box{background:var(--ezp-core-surface-tertiary);border-radius:6px;-webkit-box-shadow:var(--ezp-dialog-box-boxShadow, 0 0 0 1px var(--ezp-black-10));box-shadow:var(--ezp-dialog-box-boxShadow, 0 0 0 1px var(--ezp-black-10))}#header{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end;padding:var(--ezp-spacing-2) var(--ezp-spacing-3)}#body{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-5);padding:0 var(--ezp-spacing-5);text-align:center}#text{color:var(--ezp-core-foreground-primary);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-4)}#footer{display:grid;grid-template:auto/minmax(144px, auto);-ms-flex-pack:center;justify-content:center;padding:var(--ezp-spacing-5)}";var Qe=e("ezp_dialog",function(){function e(e){var t=this;n(this,e);this.dialogClose=a(this,"dialogClose",7);this.dialogAction=a(this,"dialogAction",7);this.action=ze.t("button_actions.close");this.iconSize="large";this.iconFramed=true;this.handleClose=function(){t.dialogClose.emit(t.instance)};this.handleAction=function(){t.dialogAction.emit(t.instance)}}e.prototype.componentWillLoad=function(){};e.prototype.render=function(){return i(o,null,i("div",{id:"box"},i("div",{id:"header"},i("ezp-icon-button",{level:"tertiary",icon:"close",type:"button",onClick:this.handleClose})),i("div",{id:"body"},this.iconName&&i("ezp-icon",{name:this.iconName,size:this.iconSize,framed:this.iconFramed}),i("div",{id:"text"},i("ezp-label",{text:this.heading,weight:"heavy"}),i("ezp-label",{text:this.description}))),i("div",{id:"footer"},i("ezp-text-button",{type:"button",level:"primary",onClick:this.handleAction,label:this.action}))))};return e}());Qe.style=Xe;var Ye=":host{-ms-flex-line-pack:center;align-content:center;background:var(--ezp-icon-background, transparent);border-radius:var(--ezp-icon-borderRadius, 0);display:grid;grid-template:var(--ezp-icon-gridTemplate)/var(--ezp-icon-gridTemplate);height:var(--ezp-icon-height, var(--ezp-icon-size));-ms-flex-pack:center;justify-content:center;padding:var(--ezp-icon-padding, 0);width:var(--ezp-icon-width, var(--ezp-icon-size))}:host(.framed){--ezp-icon-background:var(--ezp-core-shade-primary);--ezp-icon-borderRadius:50%;--ezp-icon-padding:var(--ezp-icon-frame)}:host(.normal){--ezp-icon-size:18px;--ezp-icon-gridTemplate:24px;--ezp-icon-frame:var(--ezp-spacing-3)}:host(.large){--ezp-icon-size:36px;--ezp-icon-gridTemplate:48px;--ezp-icon-frame:var(--ezp-spacing-4)}:host(.huge){--ezp-icon-size:54px;--ezp-icon-gridTemplate:72px;--ezp-icon-frame:var(--ezp-spacing-5)}svg{display:block;fill:var(--ezp-icon-fill, currentColor);height:100%;width:100%}";var Je=e("ezp_icon",function(){function e(e){n(this,e);this.size="normal";this.framed=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){switch(t.label){case 0:return[4,fetch(l("./assets/glyph-".concat(this.name,".svg"))).then((function(e){return e.text()})).then((function(t){e.glyph=t})).catch((function(e){return console.log(e)}))];case 1:t.sent();return[2]}}))}))};e.prototype.render=function(){return i(o,{class:"".concat(this.size," ").concat(this.framed?"framed":"")},i("div",{id:"glyph",innerHTML:this.glyph}))};Object.defineProperty(e,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return e}());Je.style=Ye;var $e=":host{display:block}:host(.primary){--ezp-iconButton-background-disabled:var(--ezp-core-shade-primary);--ezp-iconButton-background-init:var(--ezp-theme-solid);--ezp-iconButton-color-disabled:var(--ezp-core-foreground-tertiary);--ezp-iconButton-color-init:var(--ezp-white-100);--ezp-iconButton-opacity-active:0.74;--ezp-iconButton-opacity-hover:0.84}:host(.secondary){--ezp-iconButton-background-active:var(--ezp-core-shade-tertiary);--ezp-iconButton-background-disabled:var(--ezp-core-shade-primary);--ezp-iconButton-background-hover:var(--ezp-core-shade-secondary);--ezp-iconButton-background-init:var(--ezp-core-shade-primary);--ezp-iconButton-color-disabled:var(--ezp-core-foreground-tertiary);--ezp-iconButton-color-init:var(--ezp-theme-solid)}:host(.tertiary){--ezp-iconButton-background-active:var(--ezp-core-shade-secondary);--ezp-iconButton-background-hover:var(--ezp-core-shade-primary);--ezp-iconButton-background-init:transparent;--ezp-iconButton-color-disabled:var(--ezp-core-foreground-tertiary);--ezp-iconButton-color-init:var(--ezp-theme-solid)}:host(.quaternary){--ezp-iconButton-background-init:transparent;--ezp-iconButton-color-disabled:var(--ezp-core-foreground-tertiary);--ezp-iconButton-color-init:var(--ezp-theme-solid);--ezp-iconButton-opacity-active:0.58;--ezp-iconButton-opacity-hover:0.74}#button{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-iconButton-background, var(--ezp-iconButton-background-init));border:0;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;color:var(--ezp-iconButton-color, var(--ezp-iconButton-color-init));cursor:var(--ezp-iconButton-cursor, pointer);display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;margin:0;opacity:var(--ezp-iconButton-opacity, 1);outline:none;padding:var(--ezp-spacing-2)}@media (hover: hover){#button:not(:disabled):hover{--ezp-iconButton-background:var(\n --ezp-iconButton-background-hover,\n var(--ezp-iconButton-background-init)\n );--ezp-iconButton-opacity:var(--ezp-iconButton-opacity-hover, 1)}#button:not(:disabled):active{--ezp-iconButton-background:var(\n --ezp-iconButton-background-active,\n var(--ezp-iconButton-background-init)\n );--ezp-iconButton-opacity:var(--ezp-iconButton-opacity-active, 1)}}#button:disabled{--ezp-iconButton-background:var(\n --ezp-iconButton-background-disabled,\n var(--ezp-iconButton-background-init)\n );--ezp-iconButton-color:var(--ezp-iconButton-color-disabled);--ezp-iconButton-cursor:default}";var Ze=e("ezp_icon_button",function(){function e(e){n(this,e);this.blank=false;this.disabled=false;this.level="primary"}e.prototype.render=function(){var e=this.type!==undefined?"button":"a";var t=this.type!==undefined?{type:this.type,disabled:this.disabled}:{href:this.href,target:this.blank?"_blank":"_self"};return i(o,{class:"".concat(this.level)},i(e,Object.assign({id:"button"},t),i("ezp-icon",{name:this.icon})))};return e}());Ze.style=$e;var et=':host{display:block;min-width:var(--ezp-label-minWidth, auto);padding-bottom:1px;padding-top:1px}:host::before,:host::after{content:"";display:block;height:0}:host::before{margin-top:calc((var(--ezp-label-offset) + 1px) * -1)}:host::after{margin-bottom:calc((var(--ezp-label-offset) + 1px) * -1)}:host(.no-wrap){--ezp-label-whiteSpace:nowrap}:host(.ellipsis){--ezp-label-minWidth:0;--ezp-label-overflow:hidden;--ezp-label-textOverflow:ellipsis;--ezp-label-whiteSpace:nowrap;--ezp-label-width:100%}:host(.primary){--ezp-label-fontSize:17px;--ezp-label-lineHeight:24px;--ezp-label-letterSpacing:-0.0127756105em;--ezp-label-offset:6px}:host(.secondary){--ezp-label-fontSize:14px;--ezp-label-lineHeight:20px;--ezp-label-letterSpacing:-0.0062235443em;--ezp-label-offset:5px}:host(.tertiary){--ezp-label-fontSize:12px;--ezp-label-lineHeight:18px;--ezp-label-letterSpacing:0.0004907745em;--ezp-label-offset:5px}:host(.soft){--ezp-label-fontWeight:400}:host(.strong){--ezp-label-fontWeight:500}:host(.heavy){--ezp-label-fontWeight:600}#text{font-size:var(--ezp-label-fontSize);font-weight:var(--ezp-label-fontWeight);letter-spacing:var(--ezp-label-letterSpacing);line-height:var(--ezp-label-lineHeight);overflow:var(--ezp-label-overflow, visible);text-overflow:var(--ezp-label-textOverflow, clip);white-space:var(--ezp-label-whiteSpace, normal);width:var(--ezp-label-width, auto)}';var tt=e("ezp_label",function(){function e(e){n(this,e);this.ellipsis=false;this.level="secondary";this.noWrap=false;this.text="Label";this.weight="soft"}e.prototype.render=function(){return i(o,{class:"".concat(this.level," ").concat(this.weight," ").concat(this.ellipsis?"ellipsis":""," ").concat(this.noWrap?"no-wrap":"")},i("div",{id:"text"},this.text))};return e}());tt.style=et;var rt=typeof globalThis!=="undefined"&&globalThis||typeof self!=="undefined"&&self||typeof rt!=="undefined"&&rt;var nt={searchParams:"URLSearchParams"in rt,iterable:"Symbol"in rt&&"iterator"in Symbol,blob:"FileReader"in rt&&"Blob"in rt&&function(){try{new Blob;return true}catch(e){return false}}(),formData:"FormData"in rt,arrayBuffer:"ArrayBuffer"in rt};function at(e){return e&&DataView.prototype.isPrototypeOf(e)}if(nt.arrayBuffer){var it=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"];var ot=ArrayBuffer.isView||function(e){return e&&it.indexOf(Object.prototype.toString.call(e))>-1}}function st(e){if(typeof e!=="string"){e=String(e)}if(/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||e===""){throw new TypeError('Invalid character in header field name: "'+e+'"')}return e.toLowerCase()}function lt(e){if(typeof e!=="string"){e=String(e)}return e}function ct(e){var t={next:function(){var t=e.shift();return{done:t===undefined,value:t}}};if(nt.iterable){t[Symbol.iterator]=function(){return t}}return t}function pt(e){this.map={};if(e instanceof pt){e.forEach((function(e,t){this.append(t,e)}),this)}else if(Array.isArray(e)){e.forEach((function(e){this.append(e[0],e[1])}),this)}else if(e){Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}}pt.prototype.append=function(e,t){e=st(e);t=lt(t);var r=this.map[e];this.map[e]=r?r+", "+t:t};pt.prototype["delete"]=function(e){delete this.map[st(e)]};pt.prototype.get=function(e){e=st(e);return this.has(e)?this.map[e]:null};pt.prototype.has=function(e){return this.map.hasOwnProperty(st(e))};pt.prototype.set=function(e,t){this.map[st(e)]=lt(t)};pt.prototype.forEach=function(e,t){for(var r in this.map){if(this.map.hasOwnProperty(r)){e.call(t,this.map[r],r,this)}}};pt.prototype.keys=function(){var e=[];this.forEach((function(t,r){e.push(r)}));return ct(e)};pt.prototype.values=function(){var e=[];this.forEach((function(t){e.push(t)}));return ct(e)};pt.prototype.entries=function(){var e=[];this.forEach((function(t,r){e.push([r,t])}));return ct(e)};if(nt.iterable){pt.prototype[Symbol.iterator]=pt.prototype.entries}function dt(e){if(e.bodyUsed){return Promise.reject(new TypeError("Already read"))}e.bodyUsed=true}function ut(e){return new Promise((function(t,r){e.onload=function(){t(e.result)};e.onerror=function(){r(e.error)}}))}function mt(e){var t=new FileReader;var r=ut(t);t.readAsArrayBuffer(e);return r}function ft(e){var t=new FileReader;var r=ut(t);t.readAsText(e);return r}function ht(e){var t=new Uint8Array(e);var r=new Array(t.length);for(var n=0;n<t.length;n++){r[n]=String.fromCharCode(t[n])}return r.join("")}function gt(e){if(e.slice){return e.slice(0)}else{var t=new Uint8Array(e.byteLength);t.set(new Uint8Array(e));return t.buffer}}function yt(){this.bodyUsed=false;this._initBody=function(e){this.bodyUsed=this.bodyUsed;this._bodyInit=e;if(!e){this._bodyText=""}else if(typeof e==="string"){this._bodyText=e}else if(nt.blob&&Blob.prototype.isPrototypeOf(e)){this._bodyBlob=e}else if(nt.formData&&FormData.prototype.isPrototypeOf(e)){this._bodyFormData=e}else if(nt.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)){this._bodyText=e.toString()}else if(nt.arrayBuffer&&nt.blob&&at(e)){this._bodyArrayBuffer=gt(e.buffer);this._bodyInit=new Blob([this._bodyArrayBuffer])}else if(nt.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||ot(e))){this._bodyArrayBuffer=gt(e)}else{this._bodyText=e=Object.prototype.toString.call(e)}if(!this.headers.get("content-type")){if(typeof e==="string"){this.headers.set("content-type","text/plain;charset=UTF-8")}else if(this._bodyBlob&&this._bodyBlob.type){this.headers.set("content-type",this._bodyBlob.type)}else if(nt.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)){this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8")}}};if(nt.blob){this.blob=function(){var e=dt(this);if(e){return e}if(this._bodyBlob){return Promise.resolve(this._bodyBlob)}else if(this._bodyArrayBuffer){return Promise.resolve(new Blob([this._bodyArrayBuffer]))}else if(this._bodyFormData){throw new Error("could not read FormData body as blob")}else{return Promise.resolve(new Blob([this._bodyText]))}};this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=dt(this);if(e){return e}if(ArrayBuffer.isView(this._bodyArrayBuffer)){return Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength))}else{return Promise.resolve(this._bodyArrayBuffer)}}else{return this.blob().then(mt)}}}this.text=function(){var e=dt(this);if(e){return e}if(this._bodyBlob){return ft(this._bodyBlob)}else if(this._bodyArrayBuffer){return Promise.resolve(ht(this._bodyArrayBuffer))}else if(this._bodyFormData){throw new Error("could not read FormData body as text")}else{return Promise.resolve(this._bodyText)}};if(nt.formData){this.formData=function(){return this.text().then(Nt)}}this.json=function(){return this.text().then(JSON.parse)};return this}var vt=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function bt(e){var t=e.toUpperCase();return vt.indexOf(t)>-1?t:e}function xt(e,t){if(!(this instanceof xt)){throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.')}t=t||{};var r=t.body;if(e instanceof xt){if(e.bodyUsed){throw new TypeError("Already read")}this.url=e.url;this.credentials=e.credentials;if(!t.headers){this.headers=new pt(e.headers)}this.method=e.method;this.mode=e.mode;this.signal=e.signal;if(!r&&e._bodyInit!=null){r=e._bodyInit;e.bodyUsed=true}}else{this.url=String(e)}this.credentials=t.credentials||this.credentials||"same-origin";if(t.headers||!this.headers){this.headers=new pt(t.headers)}this.method=bt(t.method||this.method||"GET");this.mode=t.mode||this.mode||null;this.signal=t.signal||this.signal;this.referrer=null;if((this.method==="GET"||this.method==="HEAD")&&r){throw new TypeError("Body not allowed for GET or HEAD requests")}this._initBody(r);if(this.method==="GET"||this.method==="HEAD"){if(t.cache==="no-store"||t.cache==="no-cache"){var n=/([?&])_=[^&]*/;if(n.test(this.url)){this.url=this.url.replace(n,"$1_="+(new Date).getTime())}else{var a=/\?/;this.url+=(a.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}}xt.prototype.clone=function(){return new xt(this,{body:this._bodyInit})};function Nt(e){var t=new FormData;e.trim().split("&").forEach((function(e){if(e){var r=e.split("=");var n=r.shift().replace(/\+/g," ");var a=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(a))}}));return t}function zt(e){var t=new pt;var r=e.replace(/\r?\n[\t ]+/g," ");r.split("\r").map((function(e){return e.indexOf("\n")===0?e.substr(1,e.length):e})).forEach((function(e){var r=e.split(":");var n=r.shift().trim();if(n){var a=r.join(":").trim();t.append(n,a)}}));return t}yt.call(xt.prototype);function St(e,t){if(!(this instanceof St)){throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.')}if(!t){t={}}this.type="default";this.status=t.status===undefined?200:t.status;this.ok=this.status>=200&&this.status<300;this.statusText=t.statusText===undefined?"":""+t.statusText;this.headers=new pt(t.headers);this.url=t.url||"";this._initBody(e)}yt.call(St.prototype);St.prototype.clone=function(){return new St(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new pt(this.headers),url:this.url})};St.error=function(){var e=new St(null,{status:0,statusText:""});e.type="error";return e};var wt=[301,302,303,307,308];St.redirect=function(e,t){if(wt.indexOf(t)===-1){throw new RangeError("Invalid status code")}return new St(null,{status:t,headers:{location:e}})};var Pt=rt.DOMException;try{new Pt}catch(e){Pt=function(e,t){this.message=e;this.name=t;var r=Error(e);this.stack=r.stack};Pt.prototype=Object.create(Error.prototype);Pt.prototype.constructor=Pt}function Ct(e,t){return new Promise((function(r,n){var a=new xt(e,t);if(a.signal&&a.signal.aborted){return n(new Pt("Aborted","AbortError"))}var i=new XMLHttpRequest;function o(){i.abort()}i.onload=function(){var e={status:i.status,statusText:i.statusText,headers:zt(i.getAllResponseHeaders()||"")};e.url="responseURL"in i?i.responseURL:e.headers.get("X-Request-URL");var t="response"in i?i.response:i.responseText;setTimeout((function(){r(new St(t,e))}),0)};i.onerror=function(){setTimeout((function(){n(new TypeError("Network request failed"))}),0)};i.ontimeout=function(){setTimeout((function(){n(new TypeError("Network request failed"))}),0)};i.onabort=function(){setTimeout((function(){n(new Pt("Aborted","AbortError"))}),0)};function s(e){try{return e===""&&rt.location.href?rt.location.href:e}catch(t){return e}}i.open(a.method,s(a.url),true);if(a.credentials==="include"){i.withCredentials=true}else if(a.credentials==="omit"){i.withCredentials=false}if("responseType"in i){if(nt.blob){i.responseType="blob"}else if(nt.arrayBuffer&&a.headers.get("Content-Type")&&a.headers.get("Content-Type").indexOf("application/octet-stream")!==-1){i.responseType="arraybuffer"}}if(t&&typeof t.headers==="object"&&!(t.headers instanceof pt)){Object.getOwnPropertyNames(t.headers).forEach((function(e){i.setRequestHeader(e,lt(t.headers[e]))}))}else{a.headers.forEach((function(e,t){i.setRequestHeader(t,e)}))}if(a.signal){a.signal.addEventListener("abort",o);i.onreadystatechange=function(){if(i.readyState===4){a.signal.removeEventListener("abort",o)}}}i.send(typeof a._bodyInit==="undefined"?null:a._bodyInit)}))}Ct.polyfill=true;if(!rt.fetch){rt.fetch=Ct;rt.Headers=pt;rt.Request=xt;rt.Response=St}var Rt=Object.freeze({__proto__:null,Headers:pt,Request:xt,Response:St,get DOMException(){return Pt},fetch:Ct});var _t=_(Rt);var Et=function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={exports:{},id:n,loaded:false};e[n].call(a.exports,a,a.exports,r);a.loaded=true;return a.exports}r.m=e;r.c=t;r.p="";return r(0)}([function(e,t,r){var n=r(1);var a=typeof importScripts==="function";e.exports=n(a?self:window)},function(e,t,r){function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++){r[t]=e[t]}return r}else{return Array.from(e)}}var a=[];function i(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i<t;i++){r[i-1]=arguments[i]}var o=a.reduce((function(e,t){return[t].concat(e)}),[]);var s=Promise.resolve(r);o.forEach((function(e){var t=e.request,r=e.requestError;if(t||r){s=s.then((function(e){return t.apply(undefined,n(e))}),r)}}));s=s.then((function(t){var r=new(Function.prototype.bind.apply(Request,[null].concat(n(t))));return e(r).then((function(e){e.request=r;return e})).catch((function(e){e.request=r;return Promise.reject(e)}))}));o.forEach((function(e){var t=e.response,r=e.responseError;if(t||r){s=s.then(t,r)}}));return s}e.exports=function e(t){if(!t.fetch){try{r(2)}catch(e){throw Error("No fetch available. Unable to register fetch-intercept")}}t.fetch=function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++){r[n]=arguments[n]}return i.apply(undefined,[e].concat(r))}}(t.fetch);return{register:function e(t){a.push(t);return function(){var e=a.indexOf(t);if(e>=0){a.splice(e,1)}}},clear:function e(){a=[]}}}},function(e,t){e.exports=_t}]);function kt(e){return e.toLowerCase()}function Ot(e){if(e&&typeof e==="object"){var t=e;if(typeof t.rawHeaders==="function"&&typeof t.clone==="function"&&typeof t.get==="function"&&typeof t.set==="function"&&typeof t.contains==="function"&&typeof t.remove==="function"&&typeof t.headersArray==="function"&&typeof t.headerValues==="function"&&typeof t.headerNames==="function"&&typeof t.toJson==="function"){return true}}return false}var Tt=function(){function e(e){this._headersMap={};if(e){for(var t in e){this.set(t,e[t])}}}e.prototype.set=function(e,t){this._headersMap[kt(e)]={name:e,value:t.toString()}};e.prototype.get=function(e){var t=this._headersMap[kt(e)];return!t?undefined:t.value};e.prototype.contains=function(e){return!!this._headersMap[kt(e)]};e.prototype.remove=function(e){var t=this.contains(e);delete this._headersMap[kt(e)];return t};e.prototype.rawHeaders=function(){return this.toJson({preserveCase:true})};e.prototype.headersArray=function(){var e=[];for(var t in this._headersMap){e.push(this._headersMap[t])}return e};e.prototype.headerNames=function(){var e=[];var t=this.headersArray();for(var r=0;r<t.length;++r){e.push(t[r].name)}return e};e.prototype.headerValues=function(){var e=[];var t=this.headersArray();for(var r=0;r<t.length;++r){e.push(t[r].value)}return e};e.prototype.toJson=function(e){if(e===void 0){e={}}var t={};if(e.preserveCase){for(var r in this._headersMap){var n=this._headersMap[r];t[n.name]=n.value}}else{for(var r in this._headersMap){var n=this._headersMap[r];t[kt(n.name)]=n.value}}return t};e.prototype.toString=function(){return JSON.stringify(this.toJson({preserveCase:true}))};e.prototype.clone=function(){var t={};for(var r in this._headersMap){var n=this._headersMap[r];t[n.name]=n.value}return new e(t)};return e}();function Bt(e){var t="";for(var r=0;r<e.length;r++){t+=String.fromCharCode(e[r])}return btoa(t)}function qt(e){var t=atob(e);var r=new Uint8Array(t.length);for(var n=0;n<t.length;n++){r[n]=t.charCodeAt(n)}return r}var Mt=P.process;var At={coreHttpVersion:"2.2.3",HTTP:"http:",HTTPS:"https:",HTTP_PROXY:"HTTP_PROXY",HTTPS_PROXY:"HTTPS_PROXY",NO_PROXY:"NO_PROXY",ALL_PROXY:"ALL_PROXY",HttpConstants:{HttpVerbs:{PUT:"PUT",GET:"GET",DELETE:"DELETE",POST:"POST",MERGE:"MERGE",HEAD:"HEAD",PATCH:"PATCH"},StatusCodes:{TooManyRequests:429,ServiceUnavailable:503}},HeaderConstants:{AUTHORIZATION:"authorization",AUTHORIZATION_SCHEME:"Bearer",RETRY_AFTER:"Retry-After",USER_AGENT:"User-Agent"}};var It="$";var Ht="_";var Lt;var Dt=new Uint8Array(16);function jt(){if(!Lt){Lt=typeof crypto!=="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!=="undefined"&&typeof msCrypto.getRandomValues==="function"&&msCrypto.getRandomValues.bind(msCrypto);if(!Lt){throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}}return Lt(Dt)}var Ut=/^(?:[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;function Ft(e){return typeof e==="string"&&Ut.test(e)}var Vt=[];for(var Kt=0;Kt<256;++Kt){Vt.push((Kt+256).toString(16).substr(1))}function Gt(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var r=(Vt[e[t+0]]+Vt[e[t+1]]+Vt[e[t+2]]+Vt[e[t+3]]+"-"+Vt[e[t+4]]+Vt[e[t+5]]+"-"+Vt[e[t+6]]+Vt[e[t+7]]+"-"+Vt[e[t+8]]+Vt[e[t+9]]+"-"+Vt[e[t+10]]+Vt[e[t+11]]+Vt[e[t+12]]+Vt[e[t+13]]+Vt[e[t+14]]+Vt[e[t+15]]).toLowerCase();if(!Ft(r)){throw TypeError("Stringified UUID is invalid")}return r}function Wt(e,t,r){e=e||{};var n=e.random||(e.rng||jt)();n[6]=n[6]&15|64;n[8]=n[8]&63|128;if(t){r=r||0;for(var a=0;a<16;++a){t[r+a]=n[a]}return t}return Gt(n)}var Xt=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i;var Qt=typeof Mt!=="undefined"&&!!Mt.version&&!!Mt.versions&&!!Mt.versions.node;function Yt(e){return Xt.test(e)}function Jt(){return Wt()}function $t(e,t,r,n){var a,i,o;if(!Array.isArray(e)){e=[e]}if(!r||!n){return a={},a[t]=e,a}var s=(i={},i[t]=e,i);s[It]=(o={},o[r]=n,o);return s}var Zt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function er(e){return Zt.test(e)}function tr(e,t,r){return!e||!t?e:e.split(t).join(r||"")}function rr(e){return typeof e!=="object"&&typeof e!=="function"||e===null}function nr(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}var ar=function(){function e(e,t){if(e===void 0){e={}}this.modelMappers=e;this.isXML=t}e.prototype.validateConstraints=function(e,t,r){var n=function(e,n){throw new Error('"'.concat(r,'" with value "').concat(t,'" should satisfy the constraint "').concat(e,'": ').concat(n,"."))};if(e.constraints&&t!=undefined){var a=t;var i=e.constraints,o=i.ExclusiveMaximum,s=i.ExclusiveMinimum,l=i.InclusiveMaximum,c=i.InclusiveMinimum,p=i.MaxItems,d=i.MaxLength,u=i.MinItems,m=i.MinLength,f=i.MultipleOf,h=i.Pattern,g=i.UniqueItems;if(o!=undefined&&a>=o){n("ExclusiveMaximum",o)}if(s!=undefined&&a<=s){n("ExclusiveMinimum",s)}if(l!=undefined&&a>l){n("InclusiveMaximum",l)}if(c!=undefined&&a<c){n("InclusiveMinimum",c)}var y=t;if(p!=undefined&&y.length>p){n("MaxItems",p)}if(d!=undefined&&y.length>d){n("MaxLength",d)}if(u!=undefined&&y.length<u){n("MinItems",u)}if(m!=undefined&&y.length<m){n("MinLength",m)}if(f!=undefined&&a%f!==0){n("MultipleOf",f)}if(h){var v=typeof h==="string"?new RegExp(h):h;if(typeof t!=="string"||t.match(v)===null){n("Pattern",h)}}if(g&&y.some((function(e,t,r){return r.indexOf(e)!==t}))){n("UniqueItems",g)}}};e.prototype.serialize=function(e,t,r,n){if(n===void 0){n={}}var a,i,o;var s={rootName:(a=n.rootName)!==null&&a!==void 0?a:"",includeRoot:(i=n.includeRoot)!==null&&i!==void 0?i:false,xmlCharKey:(o=n.xmlCharKey)!==null&&o!==void 0?o:Ht};var l={};var c=e.type.name;if(!r){r=e.serializedName}if(c.match(/^Sequence$/i)!==null){l=[]}if(e.isConstant){t=e.defaultValue}var p=e.required,d=e.nullable;if(p&&d&&t===undefined){throw new Error("".concat(r," cannot be undefined."))}if(p&&!d&&t==undefined){throw new Error("".concat(r," cannot be null or undefined."))}if(!p&&d===false&&t===null){throw new Error("".concat(r," cannot be null."))}if(t==undefined){l=t}else{this.validateConstraints(e,t,r);if(c.match(/^any$/i)!==null){l=t}else if(c.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i)!==null){l=dr(c,r,t)}else if(c.match(/^Enum$/i)!==null){var u=e;l=ur(r,u.type.allowedValues,t)}else if(c.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i)!==null){l=hr(c,t,r)}else if(c.match(/^ByteArray$/i)!==null){l=mr(r,t)}else if(c.match(/^Base64Url$/i)!==null){l=fr(r,t)}else if(c.match(/^Sequence$/i)!==null){l=gr(this,e,t,r,Boolean(this.isXML),s)}else if(c.match(/^Dictionary$/i)!==null){l=yr(this,e,t,r,Boolean(this.isXML),s)}else if(c.match(/^Composite$/i)!==null){l=Nr(this,e,t,r,Boolean(this.isXML),s)}}return l};e.prototype.deserialize=function(e,t,r,n){if(n===void 0){n={}}var a,i,o;var s={rootName:(a=n.rootName)!==null&&a!==void 0?a:"",includeRoot:(i=n.includeRoot)!==null&&i!==void 0?i:false,xmlCharKey:(o=n.xmlCharKey)!==null&&o!==void 0?o:Ht};if(t==undefined){if(this.isXML&&e.type.name==="Sequence"&&!e.xmlIsWrapped){t=[]}if(e.defaultValue!==undefined){t=e.defaultValue}return t}var l;var c=e.type.name;if(!r){r=e.serializedName}if(c.match(/^Composite$/i)!==null){l=wr(this,e,t,r,s)}else{if(this.isXML){var p=s.xmlCharKey;var d=t;if(d[It]!=undefined&&d[p]!=undefined){t=d[p]}}if(c.match(/^Number$/i)!==null){l=parseFloat(t);if(isNaN(l)){l=t}}else if(c.match(/^Boolean$/i)!==null){if(t==="true"){l=true}else if(t==="false"){l=false}else{l=t}}else if(c.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i)!==null){l=t}else if(c.match(/^(Date|DateTime|DateTimeRfc1123)$/i)!==null){l=new Date(t)}else if(c.match(/^UnixTime$/i)!==null){l=pr(t)}else if(c.match(/^ByteArray$/i)!==null){l=qt(t)}else if(c.match(/^Base64Url$/i)!==null){l=sr(t)}else if(c.match(/^Sequence$/i)!==null){l=Cr(this,e,t,r,s)}else if(c.match(/^Dictionary$/i)!==null){l=Pr(this,e,t,r,s)}}if(e.isConstant){l=e.defaultValue}return l};return e}();function ir(e,t){var r=e.length;while(r-1>=0&&e[r-1]===t){--r}return e.substr(0,r)}function or(e){if(!e){return undefined}if(!(e instanceof Uint8Array)){throw new Error("Please provide an input of type Uint8Array for converting to Base64Url.")}var t=Bt(e);return ir(t,"=").replace(/\+/g,"-").replace(/\//g,"_")}function sr(e){if(!e){return undefined}if(e&&typeof e.valueOf()!=="string"){throw new Error("Please provide an input of type string for converting to Uint8Array")}e=e.replace(/-/g,"+").replace(/_/g,"/");return qt(e)}function lr(e){var t=[];var r="";if(e){var n=e.split(".");for(var a=0,i=n;a<i.length;a++){var o=i[a];if(o.charAt(o.length-1)==="\\"){r+=o.substr(0,o.length-1)+"."}else{r+=o;t.push(r);r=""}}}return t}function cr(e){if(!e){return undefined}if(typeof e.valueOf()==="string"){e=new Date(e)}return Math.floor(e.getTime()/1e3)}function pr(e){if(!e){return undefined}return new Date(e*1e3)}function dr(e,t,r){if(r!==null&&r!==undefined){if(e.match(/^Number$/i)!==null){if(typeof r!=="number"){throw new Error("".concat(t," with value ").concat(r," must be of type number."))}}else if(e.match(/^String$/i)!==null){if(typeof r.valueOf()!=="string"){throw new Error("".concat(t,' with value "').concat(r,'" must be of type string.'))}}else if(e.match(/^Uuid$/i)!==null){if(!(typeof r.valueOf()==="string"&&Yt(r))){throw new Error("".concat(t,' with value "').concat(r,'" must be of type string and a valid uuid.'))}}else if(e.match(/^Boolean$/i)!==null){if(typeof r!=="boolean"){throw new Error("".concat(t," with value ").concat(r," must be of type boolean."))}}else if(e.match(/^Stream$/i)!==null){var n=typeof r;if(n!=="string"&&n!=="function"&&!(r instanceof ArrayBuffer)&&!ArrayBuffer.isView(r)&&!((typeof Blob==="function"||typeof Blob==="object")&&r instanceof Blob)){throw new Error("".concat(t," must be a string, Blob, ArrayBuffer, ArrayBufferView, or a function returning NodeJS.ReadableStream."))}}}return r}function ur(e,t,r){if(!t){throw new Error("Please provide a set of allowedValues to validate ".concat(e," as an Enum Type."))}var n=t.some((function(e){if(typeof e.valueOf()==="string"){return e.toLowerCase()===r.toLowerCase()}return e===r}));if(!n){throw new Error("".concat(r," is not a valid value for ").concat(e,". The valid values are: ").concat(JSON.stringify(t),"."))}return r}function mr(e,t){var r="";if(t!=undefined){if(!(t instanceof Uint8Array)){throw new Error("".concat(e," must be of type Uint8Array."))}r=Bt(t)}return r}function fr(e,t){var r="";if(t!=undefined){if(!(t instanceof Uint8Array)){throw new Error("".concat(e," must be of type Uint8Array."))}r=or(t)||""}return r}function hr(e,t,r){if(t!=undefined){if(e.match(/^Date$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==="string"&&!isNaN(Date.parse(t)))){throw new Error("".concat(r," must be an instanceof Date or a string in ISO8601 format."))}t=t instanceof Date?t.toISOString().substring(0,10):new Date(t).toISOString().substring(0,10)}else if(e.match(/^DateTime$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==="string"&&!isNaN(Date.parse(t)))){throw new Error("".concat(r," must be an instanceof Date or a string in ISO8601 format."))}t=t instanceof Date?t.toISOString():new Date(t).toISOString()}else if(e.match(/^DateTimeRfc1123$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==="string"&&!isNaN(Date.parse(t)))){throw new Error("".concat(r," must be an instanceof Date or a string in RFC-1123 format."))}t=t instanceof Date?t.toUTCString():new Date(t).toUTCString()}else if(e.match(/^UnixTime$/i)!==null){if(!(t instanceof Date||typeof t.valueOf()==="string"&&!isNaN(Date.parse(t)))){throw new Error("".concat(r," must be an instanceof Date or a string in RFC-1123/ISO8601 format ")+"for it to be serialized in UnixTime/Epoch format.")}t=cr(t)}else if(e.match(/^TimeSpan$/i)!==null){if(!er(t)){throw new Error("".concat(r,' must be a string in ISO 8601 format. Instead was "').concat(t,'".'))}}}return t}function gr(e,t,r,n,a,i){var o,s;if(!Array.isArray(r)){throw new Error("".concat(n," must be of type Array."))}var l=t.type.element;if(!l||typeof l!=="object"){throw new Error('element" metadata for an Array must be defined in the '+'mapper and it must of type "object" in '.concat(n,"."))}var c=[];for(var p=0;p<r.length;p++){var d=e.serialize(l,r[p],n,i);if(a&&l.xmlNamespace){var u=l.xmlNamespacePrefix?"xmlns:".concat(l.xmlNamespacePrefix):"xmlns";if(l.type.name==="Composite"){c[p]=Object.assign({},d);c[p][It]=(o={},o[u]=l.xmlNamespace,o)}else{c[p]={};c[p][i.xmlCharKey]=d;c[p][It]=(s={},s[u]=l.xmlNamespace,s)}}else{c[p]=d}}return c}function yr(e,t,r,n,a,i){var o;if(typeof r!=="object"){throw new Error("".concat(n," must be of type object."))}var s=t.type.value;if(!s||typeof s!=="object"){throw new Error('"value" metadata for a Dictionary must be defined in the '+'mapper and it must of type "object" in '.concat(n,"."))}var l={};for(var c=0,p=Object.keys(r);c<p.length;c++){var d=p[c];var u=e.serialize(s,r[d],n,i);l[d]=zr(s,u,a,i)}if(a&&t.xmlNamespace){var m=t.xmlNamespacePrefix?"xmlns:".concat(t.xmlNamespacePrefix):"xmlns";var f=l;f[It]=(o={},o[m]=t.xmlNamespace,o);return f}return l}function vr(e,t,r){var n=t.type.additionalProperties;if(!n&&t.type.className){var a=br(e,t,r);return a===null||a===void 0?void 0:a.type.additionalProperties}return n}function br(e,t,r){var n=t.type.className;if(!n){throw new Error('Class name for model "'.concat(r,'" is not provided in the mapper "').concat(JSON.stringify(t,undefined,2),'".'))}return e.modelMappers[n]}function xr(e,t,r){var n=t.type.modelProperties;if(!n){var a=br(e,t,r);if(!a){throw new Error('mapper() cannot be null or undefined for model "'.concat(t.type.className,'".'))}n=a===null||a===void 0?void 0:a.type.modelProperties;if(!n){throw new Error("modelProperties cannot be null or undefined in the "+'mapper "'.concat(JSON.stringify(a),'" of type "').concat(t.type.className,'" for object "').concat(r,'".'))}}return n}function Nr(e,t,r,n,a,i){var o,s;if(_r(e,t)){t=Rr(e,t,r,"clientName")}if(r!=undefined){var l={};var c=xr(e,t,n);for(var p=0,d=Object.keys(c);p<d.length;p++){var u=d[p];var m=c[u];if(m.readOnly){continue}var f=void 0;var h=l;if(e.isXML){if(m.xmlIsWrapped){f=m.xmlName}else{f=m.xmlElementName||m.xmlName}}else{var g=lr(m.serializedName);f=g.pop();for(var y=0,v=g;y<v.length;y++){var b=v[y];var x=h[b];if(x==undefined&&(r[u]!=undefined||m.defaultValue!==undefined)){h[b]={}}h=h[b]}}if(h!=undefined){if(a&&t.xmlNamespace){var N=t.xmlNamespacePrefix?"xmlns:".concat(t.xmlNamespacePrefix):"xmlns";h[It]=Object.assign(Object.assign({},h[It]),(o={},o[N]=t.xmlNamespace,o))}var z=m.serializedName!==""?n+"."+m.serializedName:n;var S=r[u];var w=_r(e,t);if(w&&w.clientName===u&&S==undefined){S=t.serializedName}var P=e.serialize(m,S,z,i);if(P!==undefined&&f!=undefined){var C=zr(m,P,a,i);if(a&&m.xmlIsAttribute){h[It]=h[It]||{};h[It][f]=P}else if(a&&m.xmlIsWrapped){h[f]=(s={},s[m.xmlElementName]=C,s)}else{h[f]=C}}}}var R=vr(e,t,n);if(R){var _=Object.keys(c);var E=function(t){var a=_.every((function(e){return e!==t}));if(a){l[t]=e.serialize(R,r[t],n+'["'+t+'"]',i)}};for(var k in r){E(k)}}return l}return r}function zr(e,t,r,n){var a;if(!r||!e.xmlNamespace){return t}var i=e.xmlNamespacePrefix?"xmlns:".concat(e.xmlNamespacePrefix):"xmlns";var o=(a={},a[i]=e.xmlNamespace,a);if(["Composite"].includes(e.type.name)){if(t[It]){return t}else{var s=Object.assign({},t);s[It]=o;return s}}var l={};l[n.xmlCharKey]=t;l[It]=o;return l}function Sr(e,t){return[It,t.xmlCharKey].includes(e)}function wr(e,t,r,n,a){var i;if(_r(e,t)){t=Rr(e,t,r,"serializedName")}var o=xr(e,t,n);var s={};var l=[];for(var c=0,p=Object.keys(o);c<p.length;c++){var d=p[c];var u=o[d];var m=lr(o[d].serializedName);l.push(m[0]);var f=u.serializedName,h=u.xmlName,g=u.xmlElementName;var y=n;if(f!==""&&f!==undefined){y=n+"."+f}var v=u.headerCollectionPrefix;if(v){var b={};for(var x=0,N=Object.keys(r);x<N.length;x++){var z=N[x];if(z.startsWith(v)){b[z.substring(v.length)]=e.deserialize(u.type.value,r[z],y,a)}l.push(z)}s[d]=b}else if(e.isXML){if(u.xmlIsAttribute&&r[It]){s[d]=e.deserialize(u,r[It][h],y,a)}else{var S=g||h||f;if(u.xmlIsWrapped){var w=r[h];var P=(i=w===null||w===void 0?void 0:w[g])!==null&&i!==void 0?i:[];s[d]=e.deserialize(u,P,y,a)}else{var C=r[S];s[d]=e.deserialize(u,C,y,a)}}}else{var R=void 0;var _=r;for(var E=0,k=m;E<k.length;E++){var O=k[E];if(!_)break;_=_[O]}R=_;var T=t.type.polymorphicDiscriminator;if(T&&d===T.clientName&&R==undefined){R=t.serializedName}var B=void 0;if(Array.isArray(r[d])&&o[d].serializedName===""){R=r[d];var q=e.deserialize(u,R,y,a);for(var M=0,A=Object.entries(s);M<A.length;M++){var I=A[M],H=I[0],L=I[1];if(!Object.prototype.hasOwnProperty.call(q,H)){q[H]=L}}s=q}else if(R!==undefined||u.defaultValue!==undefined){B=e.deserialize(u,R,y,a);s[d]=B}}}var D=t.type.additionalProperties;if(D){var j=function(e){for(var t in o){var r=lr(o[t].serializedName);if(r[0]===e){return false}}return true};for(var U in r){if(j(U)){s[U]=e.deserialize(D,r[U],n+'["'+U+'"]',a)}}}else if(r){for(var F=0,V=Object.keys(r);F<V.length;F++){var d=V[F];if(s[d]===undefined&&!l.includes(d)&&!Sr(d,a)){s[d]=r[d]}}}return s}function Pr(e,t,r,n,a){var i=t.type.value;if(!i||typeof i!=="object"){throw new Error('"value" metadata for a Dictionary must be defined in the '+'mapper and it must of type "object" in '.concat(n))}if(r){var o={};for(var s=0,l=Object.keys(r);s<l.length;s++){var c=l[s];o[c]=e.deserialize(i,r[c],n,a)}return o}return r}function Cr(e,t,r,n,a){var i=t.type.element;if(!i||typeof i!=="object"){throw new Error('element" metadata for an Array must be defined in the '+'mapper and it must of type "object" in '.concat(n))}if(r){if(!Array.isArray(r)){r=[r]}var o=[];for(var s=0;s<r.length;s++){o[s]=e.deserialize(i,r[s],"".concat(n,"[").concat(s,"]"),a)}return o}return r}function Rr(e,t,r,n){var a=_r(e,t);if(a){var i=a[n];if(i!=undefined){var o=r[i];if(o!=undefined){var s=t.type.uberParent||t.type.className;var l=o===s?o:s+"."+o;var c=e.modelMappers.discriminators[l];if(c){t=c}}}}return t}function _r(e,t){return t.type.polymorphicDiscriminator||Er(e,t.type.uberParent)||Er(e,t.type.className)}function Er(e,t){return t&&e.modelMappers[t]&&e.modelMappers[t].type.polymorphicDiscriminator}function kr(e){var t={};for(var r=0,n=e;r<n.length;r++){var a=n[r];t[a]=a}return t}var Or=kr(["Base64Url","Boolean","ByteArray","Composite","Date","DateTime","DateTimeRfc1123","Dictionary","Enum","Number","Object","Sequence","String","Stream","TimeSpan","UnixTime"]);function Tr(e){if(e&&typeof e==="object"){var t=e;if(typeof t.url==="string"&&typeof t.method==="string"&&typeof t.headers==="object"&&Ot(t.headers)&&typeof t.validateRequestProperties==="function"&&typeof t.prepare==="function"&&typeof t.clone==="function"){return true}}return false}var Br=function(){function e(e,t,r,n,a,i,o,s,l,c,p,d,u,m,f){this.streamResponseBody=i;this.streamResponseStatusCodes=f;this.url=e||"";this.method=t||"GET";this.headers=Ot(a)?a:new Tt(a);this.body=r;this.query=n;this.formData=undefined;this.withCredentials=o||false;this.abortSignal=s;this.timeout=l||0;this.onUploadProgress=c;this.onDownloadProgress=p;this.proxySettings=d;this.keepAlive=u;this.decompressResponse=m;this.requestId=this.headers.get("x-ms-client-request-id")||Jt()}e.prototype.validateRequestProperties=function(){if(!this.method){throw new Error("WebResource.method is required.")}if(!this.url){throw new Error("WebResource.url is required.")}};e.prototype.prepare=function(e){if(!e){throw new Error("options object is required")}if(e.method===undefined||e.method===null||typeof e.method.valueOf()!=="string"){throw new Error("options.method must be a string.")}if(e.url&&e.pathTemplate){throw new Error("options.url and options.pathTemplate are mutually exclusive. Please provide exactly one of them.")}if((e.pathTemplate===undefined||e.pathTemplate===null||typeof e.pathTemplate.valueOf()!=="string")&&(e.url===undefined||e.url===null||typeof e.url.valueOf()!=="string")){throw new Error("Please provide exactly one of options.pathTemplate or options.url.")}if(e.url){if(typeof e.url!=="string"){throw new Error('options.url must be of type "string".')}this.url=e.url}if(e.method){var t=["GET","PUT","HEAD","DELETE","OPTIONS","POST","PATCH","TRACE"];if(t.indexOf(e.method.toUpperCase())===-1){throw new Error('The provided method "'+e.method+'" is invalid. Supported HTTP methods are: '+JSON.stringify(t))}}this.method=e.method.toUpperCase();if(e.pathTemplate){var r=e.pathTemplate,n=e.pathParameters;if(typeof r!=="string"){throw new Error('options.pathTemplate must be of type "string".')}if(!e.baseUrl){e.baseUrl="https://management.azure.com"}var a=e.baseUrl;var i=a+(a.endsWith("/")?"":"/")+(r.startsWith("/")?r.slice(1):r);var o=i.match(/({[\w-]*\s*[\w-]*})/gi);if(o&&o.length){if(!n){throw new Error("pathTemplate: ".concat(r," has been provided. Hence, options.pathParameters must also be provided."))}o.forEach((function(e){var t=e.slice(1,-1);var a=n[t];if(a===null||a===undefined||!(typeof a==="string"||typeof a==="object")){var o=JSON.stringify(n,undefined,2);throw new Error("pathTemplate: ".concat(r," contains the path parameter ").concat(t)+" however, it is not present in parameters: ".concat(o,".")+'The value of the path parameter can either be a "string" of the form { '.concat(t,': "some sample value" } or ')+'it can be an "object" of the form { "'.concat(t,'": { value: "some sample value", skipUrlEncoding: true } }.'))}if(typeof a.valueOf()==="string"){i=i.replace(e,encodeURIComponent(a))}if(typeof a.valueOf()==="object"){if(!a.value){throw new Error("options.pathParameters[".concat(t,'] is of type "object" but it does not contain a "value" property.'))}if(a.skipUrlEncoding){i=i.replace(e,a.value)}else{i=i.replace(e,encodeURIComponent(a.value))}}}))}this.url=i}if(e.queryParameters){var s=e.queryParameters;if(typeof s!=="object"){throw new Error("options.queryParameters must be of type object. It should be a JSON object "+'of "query-parameter-name" as the key and the "query-parameter-value" as the value. '+'The "query-parameter-value" may be fo type "string" or an "object" of the form { value: "query-parameter-value", skipUrlEncoding: true }.')}if(this.url&&this.url.indexOf("?")===-1){this.url+="?"}var l=[];this.query={};for(var c in s){var p=s[c];if(p){if(typeof p==="string"){l.push(c+"="+encodeURIComponent(p));this.query[c]=encodeURIComponent(p)}else if(typeof p==="object"){if(!p.value){throw new Error("options.queryParameters[".concat(c,'] is of type "object" but it does not contain a "value" property.'))}if(p.skipUrlEncoding){l.push(c+"="+p.value);this.query[c]=p.value}else{l.push(c+"="+encodeURIComponent(p.value));this.query[c]=encodeURIComponent(p.value)}}}}this.url+=l.join("&")}if(e.headers){var d=e.headers;for(var u=0,m=Object.keys(e.headers);u<m.length;u++){var f=m[u];this.headers.set(f,d[f])}}if(!this.headers.get("accept-language")){this.headers.set("accept-language","en-US")}if(!this.headers.get("x-ms-client-request-id")&&!e.disableClientRequestId){this.headers.set("x-ms-client-request-id",this.requestId)}if(!this.headers.get("Content-Type")){this.headers.set("Content-Type","application/json; charset=utf-8")}this.body=e.body;if(e.body!==undefined&&e.body!==null){if(e.bodyIsStream){if(!this.headers.get("Transfer-Encoding")){this.headers.set("Transfer-Encoding","chunked")}if(this.headers.get("Content-Type")!=="application/octet-stream"){this.headers.set("Content-Type","application/octet-stream")}}else{if(e.serializationMapper){this.body=new ar(e.mappers).serialize(e.serializationMapper,e.body,"requestBody")}if(!e.disableJsonStringifyOnBody){this.body=JSON.stringify(e.body)}}}if(e.spanOptions){this.spanOptions=e.spanOptions}if(e.tracingContext){this.tracingContext=e.tracingContext}this.abortSignal=e.abortSignal;this.onDownloadProgress=e.onDownloadProgress;this.onUploadProgress=e.onUploadProgress;return this};e.prototype.clone=function(){var t=new e(this.url,this.method,this.body,this.query,this.headers&&this.headers.clone(),this.streamResponseBody,this.withCredentials,this.abortSignal,this.timeout,this.onUploadProgress,this.onDownloadProgress,this.proxySettings,this.keepAlive,this.decompressResponse,this.streamResponseStatusCodes);if(this.formData){t.formData=this.formData}if(this.operationSpec){t.operationSpec=this.operationSpec}if(this.shouldDeserialize){t.shouldDeserialize=this.shouldDeserialize}if(this.operationResponseGetter){t.operationResponseGetter=this.operationResponseGetter}return t};return e}();
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -18,4 +18,4 @@ var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setP
18
18
  *
19
19
  * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
20
20
  * @license MIT
21
- */var sh=50;ph.TYPED_ARRAY_SUPPORT=Mi.TYPED_ARRAY_SUPPORT!==undefined?Mi.TYPED_ARRAY_SUPPORT:true;function lh(){return ph.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function ch(e,t){if(lh()<t){throw new RangeError("Invalid typed array length")}if(ph.TYPED_ARRAY_SUPPORT){e=new Uint8Array(t);e.__proto__=ph.prototype}else{if(e===null){e=new ph(t)}e.length=t}return e}function ph(e,t,r){if(!ph.TYPED_ARRAY_SUPPORT&&!(this instanceof ph)){return new ph(e,t,r)}if(typeof e==="number"){if(typeof t==="string"){throw new Error("If encoding is specified then the first argument must be a string")}return fh(this,e)}return dh(this,e,t,r)}ph.poolSize=8192;ph._augment=function(e){e.__proto__=ph.prototype;return e};function dh(e,t,r,n){if(typeof t==="number"){throw new TypeError('"value" argument must not be a number')}if(typeof ArrayBuffer!=="undefined"&&t instanceof ArrayBuffer){return yh(e,t,r,n)}if(typeof t==="string"){return hh(e,t,r)}return vh(e,t)}ph.from=function(e,t,r){return dh(null,e,t,r)};if(ph.TYPED_ARRAY_SUPPORT){ph.prototype.__proto__=Uint8Array.prototype;ph.__proto__=Uint8Array}function uh(e){if(typeof e!=="number"){throw new TypeError('"size" argument must be a number')}else if(e<0){throw new RangeError('"size" argument must not be negative')}}function mh(e,t,r,n){uh(t);if(t<=0){return ch(e,t)}if(r!==undefined){return typeof n==="string"?ch(e,t).fill(r,n):ch(e,t).fill(r)}return ch(e,t)}ph.alloc=function(e,t,r){return mh(null,e,t,r)};function fh(e,t){uh(t);e=ch(e,t<0?0:bh(t)|0);if(!ph.TYPED_ARRAY_SUPPORT){for(var r=0;r<t;++r){e[r]=0}}return e}ph.allocUnsafe=function(e){return fh(null,e)};ph.allocUnsafeSlow=function(e){return fh(null,e)};function hh(e,t,r){if(typeof r!=="string"||r===""){r="utf8"}if(!ph.isEncoding(r)){throw new TypeError('"encoding" must be a valid string encoding')}var n=Nh(t,r)|0;e=ch(e,n);var a=e.write(t,r);if(a!==n){e=e.slice(0,a)}return e}function gh(e,t){var r=t.length<0?0:bh(t.length)|0;e=ch(e,r);for(var n=0;n<r;n+=1){e[n]=t[n]&255}return e}function yh(e,t,r,n){if(r<0||t.byteLength<r){throw new RangeError("'offset' is out of bounds")}if(t.byteLength<r+(n||0)){throw new RangeError("'length' is out of bounds")}if(r===undefined&&n===undefined){t=new Uint8Array(t)}else if(n===undefined){t=new Uint8Array(t,r)}else{t=new Uint8Array(t,r,n)}if(ph.TYPED_ARRAY_SUPPORT){e=t;e.__proto__=ph.prototype}else{e=gh(e,t)}return e}function vh(e,t){if(xh(t)){var r=bh(t.length)|0;e=ch(e,r);if(e.length===0){return e}t.copy(e,0,0,r);return e}if(t){if(typeof ArrayBuffer!=="undefined"&&t.buffer instanceof ArrayBuffer||"length"in t){if(typeof t.length!=="number"||rg(t.length)){return ch(e,0)}return gh(e,t)}if(t.type==="Buffer"&&oh(t.data)){return gh(e,t.data)}}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function bh(e){if(e>=lh()){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+lh().toString(16)+" bytes")}return e|0}ph.isBuffer=ng;function xh(e){return!!(e!=null&&e._isBuffer)}ph.compare=function e(t,r){if(!xh(t)||!xh(r)){throw new TypeError("Arguments must be Buffers")}if(t===r)return 0;var n=t.length;var a=r.length;for(var i=0,o=Math.min(n,a);i<o;++i){if(t[i]!==r[i]){n=t[i];a=r[i];break}}if(n<a)return-1;if(a<n)return 1;return 0};ph.isEncoding=function e(t){switch(String(t).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 true;default:return false}};ph.concat=function e(t,r){if(!oh(t)){throw new TypeError('"list" argument must be an Array of Buffers')}if(t.length===0){return ph.alloc(0)}var n;if(r===undefined){r=0;for(n=0;n<t.length;++n){r+=t[n].length}}var a=ph.allocUnsafe(r);var i=0;for(n=0;n<t.length;++n){var o=t[n];if(!xh(o)){throw new TypeError('"list" argument must be an Array of Buffers')}o.copy(a,i);i+=o.length}return a};function Nh(e,t){if(xh(e)){return e.length}if(typeof ArrayBuffer!=="undefined"&&typeof ArrayBuffer.isView==="function"&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer)){return e.byteLength}if(typeof e!=="string"){e=""+e}var r=e.length;if(r===0)return 0;var n=false;for(;;){switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case undefined:return Jh(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return eg(e).length;default:if(n)return Jh(e).length;t=(""+t).toLowerCase();n=true}}}ph.byteLength=Nh;function zh(e,t,r){var n=false;if(t===undefined||t<0){t=0}if(t>this.length){return""}if(r===undefined||r>this.length){r=this.length}if(r<=0){return""}r>>>=0;t>>>=0;if(r<=t){return""}if(!e)e="utf8";while(true){switch(e){case"hex":return Hh(this,t,r);case"utf8":case"utf-8":return Bh(this,t,r);case"ascii":return Ah(this,t,r);case"latin1":case"binary":return Ih(this,t,r);case"base64":return Th(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Lh(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase();n=true}}}ph.prototype._isBuffer=true;function Sh(e,t,r){var n=e[t];e[t]=e[r];e[r]=n}ph.prototype.swap16=function e(){var t=this.length;if(t%2!==0){throw new RangeError("Buffer size must be a multiple of 16-bits")}for(var r=0;r<t;r+=2){Sh(this,r,r+1)}return this};ph.prototype.swap32=function e(){var t=this.length;if(t%4!==0){throw new RangeError("Buffer size must be a multiple of 32-bits")}for(var r=0;r<t;r+=4){Sh(this,r,r+3);Sh(this,r+1,r+2)}return this};ph.prototype.swap64=function e(){var t=this.length;if(t%8!==0){throw new RangeError("Buffer size must be a multiple of 64-bits")}for(var r=0;r<t;r+=8){Sh(this,r,r+7);Sh(this,r+1,r+6);Sh(this,r+2,r+5);Sh(this,r+3,r+4)}return this};ph.prototype.toString=function e(){var t=this.length|0;if(t===0)return"";if(arguments.length===0)return Bh(this,0,t);return zh.apply(this,arguments)};ph.prototype.equals=function e(t){if(!xh(t))throw new TypeError("Argument must be a Buffer");if(this===t)return true;return ph.compare(this,t)===0};ph.prototype.inspect=function e(){var t="";var r=sh;if(this.length>0){t=this.toString("hex",0,r).match(/.{2}/g).join(" ");if(this.length>r)t+=" ... "}return"<Buffer "+t+">"};ph.prototype.compare=function e(t,r,n,a,i){if(!xh(t)){throw new TypeError("Argument must be a Buffer")}if(r===undefined){r=0}if(n===undefined){n=t?t.length:0}if(a===undefined){a=0}if(i===undefined){i=this.length}if(r<0||n>t.length||a<0||i>this.length){throw new RangeError("out of range index")}if(a>=i&&r>=n){return 0}if(a>=i){return-1}if(r>=n){return 1}r>>>=0;n>>>=0;a>>>=0;i>>>=0;if(this===t)return 0;var o=i-a;var s=n-r;var l=Math.min(o,s);var c=this.slice(a,i);var p=t.slice(r,n);for(var d=0;d<l;++d){if(c[d]!==p[d]){o=c[d];s=p[d];break}}if(o<s)return-1;if(s<o)return 1;return 0};function wh(e,t,r,n,a){if(e.length===0)return-1;if(typeof r==="string"){n=r;r=0}else if(r>2147483647){r=2147483647}else if(r<-2147483648){r=-2147483648}r=+r;if(isNaN(r)){r=a?0:e.length-1}if(r<0)r=e.length+r;if(r>=e.length){if(a)return-1;else r=e.length-1}else if(r<0){if(a)r=0;else return-1}if(typeof t==="string"){t=ph.from(t,n)}if(xh(t)){if(t.length===0){return-1}return Ph(e,t,r,n,a)}else if(typeof t==="number"){t=t&255;if(ph.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf==="function"){if(a){return Uint8Array.prototype.indexOf.call(e,t,r)}else{return Uint8Array.prototype.lastIndexOf.call(e,t,r)}}return Ph(e,[t],r,n,a)}throw new TypeError("val must be string, number or Buffer")}function Ph(e,t,r,n,a){var i=1;var o=e.length;var s=t.length;if(n!==undefined){n=String(n).toLowerCase();if(n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le"){if(e.length<2||t.length<2){return-1}i=2;o/=2;s/=2;r/=2}}function l(e,t){if(i===1){return e[t]}else{return e.readUInt16BE(t*i)}}var c;if(a){var p=-1;for(c=r;c<o;c++){if(l(e,c)===l(t,p===-1?0:c-p)){if(p===-1)p=c;if(c-p+1===s)return p*i}else{if(p!==-1)c-=c-p;p=-1}}}else{if(r+s>o)r=o-s;for(c=r;c>=0;c--){var d=true;for(var u=0;u<s;u++){if(l(e,c+u)!==l(t,u)){d=false;break}}if(d)return c}}return-1}ph.prototype.includes=function e(t,r,n){return this.indexOf(t,r,n)!==-1};ph.prototype.indexOf=function e(t,r,n){return wh(this,t,r,n,true)};ph.prototype.lastIndexOf=function e(t,r,n){return wh(this,t,r,n,false)};function Ch(e,t,r,n){r=Number(r)||0;var a=e.length-r;if(!n){n=a}else{n=Number(n);if(n>a){n=a}}var i=t.length;if(i%2!==0)throw new TypeError("Invalid hex string");if(n>i/2){n=i/2}for(var o=0;o<n;++o){var s=parseInt(t.substr(o*2,2),16);if(isNaN(s))return o;e[r+o]=s}return o}function Rh(e,t,r,n){return tg(Jh(t,e.length-r),e,r,n)}function _h(e,t,r,n){return tg($h(t),e,r,n)}function Eh(e,t,r,n){return _h(e,t,r,n)}function kh(e,t,r,n){return tg(eg(t),e,r,n)}function Oh(e,t,r,n){return tg(Zh(t,e.length-r),e,r,n)}ph.prototype.write=function e(t,r,n,a){if(r===undefined){a="utf8";n=this.length;r=0}else if(n===undefined&&typeof r==="string"){a=r;n=this.length;r=0}else if(isFinite(r)){r=r|0;if(isFinite(n)){n=n|0;if(a===undefined)a="utf8"}else{a=n;n=undefined}}else{throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported")}var i=this.length-r;if(n===undefined||n>i)n=i;if(t.length>0&&(n<0||r<0)||r>this.length){throw new RangeError("Attempt to write outside buffer bounds")}if(!a)a="utf8";var o=false;for(;;){switch(a){case"hex":return Ch(this,t,r,n);case"utf8":case"utf-8":return Rh(this,t,r,n);case"ascii":return _h(this,t,r,n);case"latin1":case"binary":return Eh(this,t,r,n);case"base64":return kh(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Oh(this,t,r,n);default:if(o)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase();o=true}}};ph.prototype.toJSON=function e(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Th(e,t,r){if(t===0&&r===e.length){return rh(e)}else{return rh(e.slice(t,r))}}function Bh(e,t,r){r=Math.min(e.length,r);var n=[];var a=t;while(a<r){var i=e[a];var o=null;var s=i>239?4:i>223?3:i>191?2:1;if(a+s<=r){var l,c,p,d;switch(s){case 1:if(i<128){o=i}break;case 2:l=e[a+1];if((l&192)===128){d=(i&31)<<6|l&63;if(d>127){o=d}}break;case 3:l=e[a+1];c=e[a+2];if((l&192)===128&&(c&192)===128){d=(i&15)<<12|(l&63)<<6|c&63;if(d>2047&&(d<55296||d>57343)){o=d}}break;case 4:l=e[a+1];c=e[a+2];p=e[a+3];if((l&192)===128&&(c&192)===128&&(p&192)===128){d=(i&15)<<18|(l&63)<<12|(c&63)<<6|p&63;if(d>65535&&d<1114112){o=d}}}}if(o===null){o=65533;s=1}else if(o>65535){o-=65536;n.push(o>>>10&1023|55296);o=56320|o&1023}n.push(o);a+=s}return Mh(n)}var qh=4096;function Mh(e){var t=e.length;if(t<=qh){return String.fromCharCode.apply(String,e)}var r="";var n=0;while(n<t){r+=String.fromCharCode.apply(String,e.slice(n,n+=qh))}return r}function Ah(e,t,r){var n="";r=Math.min(e.length,r);for(var a=t;a<r;++a){n+=String.fromCharCode(e[a]&127)}return n}function Ih(e,t,r){var n="";r=Math.min(e.length,r);for(var a=t;a<r;++a){n+=String.fromCharCode(e[a])}return n}function Hh(e,t,r){var n=e.length;if(!t||t<0)t=0;if(!r||r<0||r>n)r=n;var a="";for(var i=t;i<r;++i){a+=Yh(e[i])}return a}function Lh(e,t,r){var n=e.slice(t,r);var a="";for(var i=0;i<n.length;i+=2){a+=String.fromCharCode(n[i]+n[i+1]*256)}return a}ph.prototype.slice=function e(t,r){var n=this.length;t=~~t;r=r===undefined?n:~~r;if(t<0){t+=n;if(t<0)t=0}else if(t>n){t=n}if(r<0){r+=n;if(r<0)r=0}else if(r>n){r=n}if(r<t)r=t;var a;if(ph.TYPED_ARRAY_SUPPORT){a=this.subarray(t,r);a.__proto__=ph.prototype}else{var i=r-t;a=new ph(i,undefined);for(var o=0;o<i;++o){a[o]=this[o+t]}}return a};function Dh(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}ph.prototype.readUIntLE=function e(t,r,n){t=t|0;r=r|0;if(!n)Dh(t,r,this.length);var a=this[t];var i=1;var o=0;while(++o<r&&(i*=256)){a+=this[t+o]*i}return a};ph.prototype.readUIntBE=function e(t,r,n){t=t|0;r=r|0;if(!n){Dh(t,r,this.length)}var a=this[t+--r];var i=1;while(r>0&&(i*=256)){a+=this[t+--r]*i}return a};ph.prototype.readUInt8=function e(t,r){if(!r)Dh(t,1,this.length);return this[t]};ph.prototype.readUInt16LE=function e(t,r){if(!r)Dh(t,2,this.length);return this[t]|this[t+1]<<8};ph.prototype.readUInt16BE=function e(t,r){if(!r)Dh(t,2,this.length);return this[t]<<8|this[t+1]};ph.prototype.readUInt32LE=function e(t,r){if(!r)Dh(t,4,this.length);return(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};ph.prototype.readUInt32BE=function e(t,r){if(!r)Dh(t,4,this.length);return this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};ph.prototype.readIntLE=function e(t,r,n){t=t|0;r=r|0;if(!n)Dh(t,r,this.length);var a=this[t];var i=1;var o=0;while(++o<r&&(i*=256)){a+=this[t+o]*i}i*=128;if(a>=i)a-=Math.pow(2,8*r);return a};ph.prototype.readIntBE=function e(t,r,n){t=t|0;r=r|0;if(!n)Dh(t,r,this.length);var a=r;var i=1;var o=this[t+--a];while(a>0&&(i*=256)){o+=this[t+--a]*i}i*=128;if(o>=i)o-=Math.pow(2,8*r);return o};ph.prototype.readInt8=function e(t,r){if(!r)Dh(t,1,this.length);if(!(this[t]&128))return this[t];return(255-this[t]+1)*-1};ph.prototype.readInt16LE=function e(t,r){if(!r)Dh(t,2,this.length);var n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};ph.prototype.readInt16BE=function e(t,r){if(!r)Dh(t,2,this.length);var n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};ph.prototype.readInt32LE=function e(t,r){if(!r)Dh(t,4,this.length);return this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};ph.prototype.readInt32BE=function e(t,r){if(!r)Dh(t,4,this.length);return this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};ph.prototype.readFloatLE=function e(t,r){if(!r)Dh(t,4,this.length);return nh(this,t,true,23,4)};ph.prototype.readFloatBE=function e(t,r){if(!r)Dh(t,4,this.length);return nh(this,t,false,23,4)};ph.prototype.readDoubleLE=function e(t,r){if(!r)Dh(t,8,this.length);return nh(this,t,true,52,8)};ph.prototype.readDoubleBE=function e(t,r){if(!r)Dh(t,8,this.length);return nh(this,t,false,52,8)};function jh(e,t,r,n,a,i){if(!xh(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}ph.prototype.writeUIntLE=function e(t,r,n,a){t=+t;r=r|0;n=n|0;if(!a){var i=Math.pow(2,8*n)-1;jh(this,t,r,n,i,0)}var o=1;var s=0;this[r]=t&255;while(++s<n&&(o*=256)){this[r+s]=t/o&255}return r+n};ph.prototype.writeUIntBE=function e(t,r,n,a){t=+t;r=r|0;n=n|0;if(!a){var i=Math.pow(2,8*n)-1;jh(this,t,r,n,i,0)}var o=n-1;var s=1;this[r+o]=t&255;while(--o>=0&&(s*=256)){this[r+o]=t/s&255}return r+n};ph.prototype.writeUInt8=function e(t,r,n){t=+t;r=r|0;if(!n)jh(this,t,r,1,255,0);if(!ph.TYPED_ARRAY_SUPPORT)t=Math.floor(t);this[r]=t&255;return r+1};function Uh(e,t,r,n){if(t<0)t=65535+t+1;for(var a=0,i=Math.min(e.length-r,2);a<i;++a){e[r+a]=(t&255<<8*(n?a:1-a))>>>(n?a:1-a)*8}}ph.prototype.writeUInt16LE=function e(t,r,n){t=+t;r=r|0;if(!n)jh(this,t,r,2,65535,0);if(ph.TYPED_ARRAY_SUPPORT){this[r]=t&255;this[r+1]=t>>>8}else{Uh(this,t,r,true)}return r+2};ph.prototype.writeUInt16BE=function e(t,r,n){t=+t;r=r|0;if(!n)jh(this,t,r,2,65535,0);if(ph.TYPED_ARRAY_SUPPORT){this[r]=t>>>8;this[r+1]=t&255}else{Uh(this,t,r,false)}return r+2};function Fh(e,t,r,n){if(t<0)t=4294967295+t+1;for(var a=0,i=Math.min(e.length-r,4);a<i;++a){e[r+a]=t>>>(n?a:3-a)*8&255}}ph.prototype.writeUInt32LE=function e(t,r,n){t=+t;r=r|0;if(!n)jh(this,t,r,4,4294967295,0);if(ph.TYPED_ARRAY_SUPPORT){this[r+3]=t>>>24;this[r+2]=t>>>16;this[r+1]=t>>>8;this[r]=t&255}else{Fh(this,t,r,true)}return r+4};ph.prototype.writeUInt32BE=function e(t,r,n){t=+t;r=r|0;if(!n)jh(this,t,r,4,4294967295,0);if(ph.TYPED_ARRAY_SUPPORT){this[r]=t>>>24;this[r+1]=t>>>16;this[r+2]=t>>>8;this[r+3]=t&255}else{Fh(this,t,r,false)}return r+4};ph.prototype.writeIntLE=function e(t,r,n,a){t=+t;r=r|0;if(!a){var i=Math.pow(2,8*n-1);jh(this,t,r,n,i-1,-i)}var o=0;var s=1;var l=0;this[r]=t&255;while(++o<n&&(s*=256)){if(t<0&&l===0&&this[r+o-1]!==0){l=1}this[r+o]=(t/s>>0)-l&255}return r+n};ph.prototype.writeIntBE=function e(t,r,n,a){t=+t;r=r|0;if(!a){var i=Math.pow(2,8*n-1);jh(this,t,r,n,i-1,-i)}var o=n-1;var s=1;var l=0;this[r+o]=t&255;while(--o>=0&&(s*=256)){if(t<0&&l===0&&this[r+o+1]!==0){l=1}this[r+o]=(t/s>>0)-l&255}return r+n};ph.prototype.writeInt8=function e(t,r,n){t=+t;r=r|0;if(!n)jh(this,t,r,1,127,-128);if(!ph.TYPED_ARRAY_SUPPORT)t=Math.floor(t);if(t<0)t=255+t+1;this[r]=t&255;return r+1};ph.prototype.writeInt16LE=function e(t,r,n){t=+t;r=r|0;if(!n)jh(this,t,r,2,32767,-32768);if(ph.TYPED_ARRAY_SUPPORT){this[r]=t&255;this[r+1]=t>>>8}else{Uh(this,t,r,true)}return r+2};ph.prototype.writeInt16BE=function e(t,r,n){t=+t;r=r|0;if(!n)jh(this,t,r,2,32767,-32768);if(ph.TYPED_ARRAY_SUPPORT){this[r]=t>>>8;this[r+1]=t&255}else{Uh(this,t,r,false)}return r+2};ph.prototype.writeInt32LE=function e(t,r,n){t=+t;r=r|0;if(!n)jh(this,t,r,4,2147483647,-2147483648);if(ph.TYPED_ARRAY_SUPPORT){this[r]=t&255;this[r+1]=t>>>8;this[r+2]=t>>>16;this[r+3]=t>>>24}else{Fh(this,t,r,true)}return r+4};ph.prototype.writeInt32BE=function e(t,r,n){t=+t;r=r|0;if(!n)jh(this,t,r,4,2147483647,-2147483648);if(t<0)t=4294967295+t+1;if(ph.TYPED_ARRAY_SUPPORT){this[r]=t>>>24;this[r+1]=t>>>16;this[r+2]=t>>>8;this[r+3]=t&255}else{Fh(this,t,r,false)}return r+4};function Vh(e,t,r,n,a,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Kh(e,t,r,n,a){if(!a){Vh(e,t,r,4)}ah(e,t,r,n,23,4);return r+4}ph.prototype.writeFloatLE=function e(t,r,n){return Kh(this,t,r,true,n)};ph.prototype.writeFloatBE=function e(t,r,n){return Kh(this,t,r,false,n)};function Gh(e,t,r,n,a){if(!a){Vh(e,t,r,8)}ah(e,t,r,n,52,8);return r+8}ph.prototype.writeDoubleLE=function e(t,r,n){return Gh(this,t,r,true,n)};ph.prototype.writeDoubleBE=function e(t,r,n){return Gh(this,t,r,false,n)};ph.prototype.copy=function e(t,r,n,a){if(!n)n=0;if(!a&&a!==0)a=this.length;if(r>=t.length)r=t.length;if(!r)r=0;if(a>0&&a<n)a=n;if(a===n)return 0;if(t.length===0||this.length===0)return 0;if(r<0){throw new RangeError("targetStart out of bounds")}if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(a<0)throw new RangeError("sourceEnd out of bounds");if(a>this.length)a=this.length;if(t.length-r<a-n){a=t.length-r+n}var i=a-n;var o;if(this===t&&n<r&&r<a){for(o=i-1;o>=0;--o){t[o+r]=this[o+n]}}else if(i<1e3||!ph.TYPED_ARRAY_SUPPORT){for(o=0;o<i;++o){t[o+r]=this[o+n]}}else{Uint8Array.prototype.set.call(t,this.subarray(n,n+i),r)}return i};ph.prototype.fill=function e(t,r,n,a){if(typeof t==="string"){if(typeof r==="string"){a=r;r=0;n=this.length}else if(typeof n==="string"){a=n;n=this.length}if(t.length===1){var i=t.charCodeAt(0);if(i<256){t=i}}if(a!==undefined&&typeof a!=="string"){throw new TypeError("encoding must be a string")}if(typeof a==="string"&&!ph.isEncoding(a)){throw new TypeError("Unknown encoding: "+a)}}else if(typeof t==="number"){t=t&255}if(r<0||this.length<r||this.length<n){throw new RangeError("Out of range index")}if(n<=r){return this}r=r>>>0;n=n===undefined?this.length:n>>>0;if(!t)t=0;var o;if(typeof t==="number"){for(o=r;o<n;++o){this[o]=t}}else{var s=xh(t)?t:Jh(new ph(t,a).toString());var l=s.length;for(o=0;o<n-r;++o){this[o+r]=s[o%l]}}return this};var Wh=/[^+\/0-9A-Za-z-_]/g;function Xh(e){e=Qh(e).replace(Wh,"");if(e.length<2)return"";while(e.length%4!==0){e=e+"="}return e}function Qh(e){if(e.trim)return e.trim();return e.replace(/^\s+|\s+$/g,"")}function Yh(e){if(e<16)return"0"+e.toString(16);return e.toString(16)}function Jh(e,t){t=t||Infinity;var r;var n=e.length;var a=null;var i=[];for(var o=0;o<n;++o){r=e.charCodeAt(o);if(r>55295&&r<57344){if(!a){if(r>56319){if((t-=3)>-1)i.push(239,191,189);continue}else if(o+1===n){if((t-=3)>-1)i.push(239,191,189);continue}a=r;continue}if(r<56320){if((t-=3)>-1)i.push(239,191,189);a=r;continue}r=(a-55296<<10|r-56320)+65536}else if(a){if((t-=3)>-1)i.push(239,191,189)}a=null;if(r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else{throw new Error("Invalid code point")}}return i}function $h(e){var t=[];for(var r=0;r<e.length;++r){t.push(e.charCodeAt(r)&255)}return t}function Zh(e,t){var r,n,a;var i=[];for(var o=0;o<e.length;++o){if((t-=2)<0)break;r=e.charCodeAt(o);n=r>>8;a=r%256;i.push(a);i.push(n)}return i}function eg(e){return Zf(Xh(e))}function tg(e,t,r,n){for(var a=0;a<n;++a){if(a+r>=t.length||a>=e.length)break;t[a+r]=e[a]}return a}function rg(e){return e!==e}function ng(e){return e!=null&&(!!e._isBuffer||ag(e)||ig(e))}function ag(e){return!!e.constructor&&typeof e.constructor.isBuffer==="function"&&e.constructor.isBuffer(e)}function ig(e){return typeof e.readFloatLE==="function"&&typeof e.slice==="function"&&ag(e.slice(0,0))}function og(e){var t=Vr.parse(e);var r=t.getPath();r=r||"/";r=pg(r);t.setPath(r);return t.toString()}function sg(e){var t="";if(e.search("DevelopmentStorageProxyUri=")!==-1){var r=e.split(";");for(var n=0,a=r;n<a.length;n++){var i=a[n];if(i.trim().startsWith("DevelopmentStorageProxyUri=")){t=i.trim().match("DevelopmentStorageProxyUri=(.*)")[1]}}}return t}function lg(e,t){var r=e.split(";");for(var n=0,a=r;n<a.length;n++){var i=a[n];if(i.trim().startsWith(t)){return i.trim().match(t+"=(.*)")[1]}}return""}function cg(e){var t="";if(e.startsWith("UseDevelopmentStorage=true")){t=sg(e);e=Kf}var r=lg(e,"BlobEndpoint");r=r.endsWith("/")?r.slice(0,-1):r;if(e.search("DefaultEndpointsProtocol=")!==-1&&e.search("AccountKey=")!==-1){var n="";var a="";var i=ph.from("accountKey","base64");var o="";a=lg(e,"AccountName");i=ph.from(lg(e,"AccountKey"),"base64");if(!r){n=lg(e,"DefaultEndpointsProtocol");var s=n.toLowerCase();if(s!=="https"&&s!=="http"){throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'")}o=lg(e,"EndpointSuffix");if(!o){throw new Error("Invalid EndpointSuffix in the provided Connection String")}r="".concat(n,"://").concat(a,".blob.").concat(o)}if(!a){throw new Error("Invalid AccountName in the provided Connection String")}else if(i.length===0){throw new Error("Invalid AccountKey in the provided Connection String")}return{kind:"AccountConnString",url:r,accountName:a,accountKey:i,proxyUri:t}}else{var l=lg(e,"SharedAccessSignature");var a=Sg(r);if(!r){throw new Error("Invalid BlobEndpoint in the provided SAS Connection String")}else if(!l){throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String")}return{kind:"SASConnString",url:r,accountName:a,accountSas:l}}}function pg(e){return encodeURIComponent(e).replace(/%2F/g,"/").replace(/'/g,"%27").replace(/\+/g,"%20").replace(/%25/g,"%")}function dg(e,t){var r=Vr.parse(e);var n=r.getPath();n=n?n.endsWith("/")?"".concat(n).concat(t):"".concat(n,"/").concat(t):t;r.setPath(n);return r.toString()}function ug(e,t,r){var n=Vr.parse(e);n.setQueryParameter(t,r);return n.toString()}function mg(e,t){var r=Vr.parse(e);return r.getQueryParameterValue(t)}function fg(e,t){var r=Vr.parse(e);r.setHost(t);return r.toString()}function hg(e){var t=Vr.parse(e);return t.getScheme()}function gg(e,t){var r=Vr.parse(e);var n=r.getQuery();if(n){n+="&"+t}else{n=t}r.setQuery(n);return r.toString()}function yg(e,t){if(t===void 0){t=true}var r=e.toISOString();return t?r.substring(0,r.length-1)+"0000"+"Z":r.substring(0,r.length-5)+"Z"}function vg(e){return!Qt?btoa(e):ph.from(e).toString("base64")}function bg(e,t){var r=48;var n=6;var a=r-n;if(e.length>a){e=e.slice(0,a)}var i=e+Ng(t.toString(),r-e.length,"0");return vg(i)}function xg(e,t,r){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){return[2,new Promise((function(n,a){var i;var o=function(){if(i!==undefined){clearTimeout(i)}a(r)};var s=function(){if(t!==undefined){t.removeEventListener("abort",o)}n()};i=setTimeout(s,e);if(t!==undefined){t.addEventListener("abort",o)}}))]}))}))}function Ng(e,t,r){if(r===void 0){r=" "}if(String.prototype.padStart){return e.padStart(t,r)}r=r||" ";if(e.length>t){return e}else{t=t-e.length;if(t>r.length){r+=r.repeat(t/r.length)}return r.slice(0,t)+e}}function zg(e,t){return e.toLocaleLowerCase()===t.toLocaleLowerCase()}function Sg(e){var t=Vr.parse(e);var r;try{if(t.getHost().split(".")[1]==="blob"){r=t.getHost().split(".")[0]}else if(wg(t)){r=t.getPath().split("/")[1]}else{r=""}return r}catch(e){throw new Error("Unable to extract accountName with provided information.")}}function wg(e){if(e.getHost()===undefined){return false}var t=e.getHost()+(e.getPort()===undefined?"":":"+e.getPort());return/^.*:.*:.*$|^localhost(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(t)}function Pg(e){if(e===undefined){return undefined}var t=[];for(var r in e){if(Object.prototype.hasOwnProperty.call(e,r)){var n=e[r];t.push("".concat(encodeURIComponent(r),"=").concat(encodeURIComponent(n)))}}return t.join("&")}function Cg(e){if(e===undefined){return undefined}var t={blobTagSet:[]};for(var r in e){if(Object.prototype.hasOwnProperty.call(e,r)){var n=e[r];t.blobTagSet.push({key:r,value:n})}}return t}function Rg(e){if(e===undefined){return undefined}var t={};for(var r=0,n=e.blobTagSet;r<n.length;r++){var a=n[r];t[a.key]=a.value}return t}function _g(e){if(e===undefined){return undefined}switch(e.kind){case"csv":return{format:{type:"delimited",delimitedTextConfiguration:{columnSeparator:e.columnSeparator||",",fieldQuote:e.fieldQuote||"",recordSeparator:e.recordSeparator,escapeChar:e.escapeCharacter||"",headersPresent:e.hasHeaders||false}}};case"json":return{format:{type:"json",jsonTextConfiguration:{recordSeparator:e.recordSeparator}}};case"arrow":return{format:{type:"arrow",arrowConfiguration:{schema:e.schema}}};case"parquet":return{format:{type:"parquet"}};default:throw Error("Invalid BlobQueryTextConfiguration.")}}function Eg(e){if(!e){return undefined}if("policy-id"in e){return undefined}var t=[];var r=function(r){var n=r.split("_");var a="or-";if(n[0].startsWith(a)){n[0]=n[0].substring(a.length)}var i={ruleId:n[1],replicationStatus:e[r]};var o=t.findIndex((function(e){return e.policyId===n[0]}));if(o>-1){t[o].rules.push(i)}else{t.push({policyId:n[0],rules:[i]})}};for(var n in e){r(n)}return t}function kg(e,t){e.credential=t;return e}function Og(e){return e?e.scheme+" "+e.value:undefined}var Tg=function(e){Mr(t,e);function t(t,r){return e.call(this,t,r)||this}t.prototype.sendRequest=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(Qt){return[2,this._nextPolicy.sendRequest(e)]}if(e.method.toUpperCase()==="GET"||e.method.toUpperCase()==="HEAD"){e.url=ug(e.url,Df.Parameters.FORCE_BROWSER_NO_CACHE,(new Date).getTime().toString())}e.headers.remove(jf.COOKIE);e.headers.remove(jf.CONTENT_LENGTH);return[2,this._nextPolicy.sendRequest(e)]}))}))};return t}(Sn);var Bg=function(){function e(){}e.prototype.create=function(e,t){return new Tg(e,t)};return e}();var qg;(function(e){e[e["EXPONENTIAL"]=0]="EXPONENTIAL";e[e["FIXED"]=1]="FIXED"})(qg||(qg={}));var Mg={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:qg.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:undefined};var Ag=new jr("The operation was aborted.");var Ig=function(e){Mr(t,e);function t(t,r,n){if(n===void 0){n=Mg}var a=e.call(this,t,r)||this;a.retryOptions={retryPolicyType:n.retryPolicyType?n.retryPolicyType:Mg.retryPolicyType,maxTries:n.maxTries&&n.maxTries>=1?Math.floor(n.maxTries):Mg.maxTries,tryTimeoutInMs:n.tryTimeoutInMs&&n.tryTimeoutInMs>=0?n.tryTimeoutInMs:Mg.tryTimeoutInMs,retryDelayInMs:n.retryDelayInMs&&n.retryDelayInMs>=0?Math.min(n.retryDelayInMs,n.maxRetryDelayInMs?n.maxRetryDelayInMs:Mg.maxRetryDelayInMs):Mg.retryDelayInMs,maxRetryDelayInMs:n.maxRetryDelayInMs&&n.maxRetryDelayInMs>=0?n.maxRetryDelayInMs:Mg.maxRetryDelayInMs,secondaryHost:n.secondaryHost?n.secondaryHost:Mg.secondaryHost};return a}t.prototype.sendRequest=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.attemptSendRequest(e,false,1)]}))}))};t.prototype.attemptSendRequest=function(e,t,r){return __awaiter(this,void 0,void 0,(function(){var n,a,i,o;return __generator(this,(function(s){switch(s.label){case 0:n=e.clone();a=t||!this.retryOptions.secondaryHost||!(e.method==="GET"||e.method==="HEAD"||e.method==="OPTIONS")||r%2===1;if(!a){n.url=fg(n.url,this.retryOptions.secondaryHost)}if(this.retryOptions.tryTimeoutInMs){n.url=ug(n.url,Df.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString())}s.label=1;case 1:s.trys.push([1,3,,4]);kf.info("RetryPolicy: =====> Try=".concat(r," ").concat(a?"Primary":"Secondary"));return[4,this._nextPolicy.sendRequest(n)];case 2:i=s.sent();if(!this.shouldRetry(a,r,i)){return[2,i]}t=t||!a&&i.status===404;return[3,4];case 3:o=s.sent();kf.error("RetryPolicy: Caught error, message: ".concat(o.message,", code: ").concat(o.code));if(!this.shouldRetry(a,r,i,o)){throw o}return[3,4];case 4:return[4,this.delay(a,r,e.abortSignal)];case 5:s.sent();return[2,this.attemptSendRequest(e,t,++r)]}}))}))};t.prototype.shouldRetry=function(e,t,r,n){if(t>=this.retryOptions.maxTries){kf.info("RetryPolicy: Attempt(s) ".concat(t," >= maxTries ").concat(this.retryOptions.maxTries,", no further try."));return false}var a=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(n){for(var i=0,o=a;i<o.length;i++){var s=o[i];if(n.name.toUpperCase().includes(s)||n.message.toUpperCase().includes(s)||n.code&&n.code.toString().toUpperCase()===s){kf.info("RetryPolicy: Network error ".concat(s," found, will retry."));return true}}}if(r||n){var l=r?r.status:n?n.statusCode:0;if(!e&&l===404){kf.info("RetryPolicy: Secondary access with 404, will retry.");return true}if(l===503||l===500){kf.info("RetryPolicy: Will retry for status code ".concat(l,"."));return true}}if((n===null||n===void 0?void 0:n.code)==="PARSE_ERROR"&&(n===null||n===void 0?void 0:n.message.startsWith('Error "Error: Unclosed root tag'))){kf.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry.");return true}return false};t.prototype.delay=function(e,t,r){return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(a){n=0;if(e){switch(this.retryOptions.retryPolicyType){case qg.EXPONENTIAL:n=Math.min((Math.pow(2,t-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case qg.FIXED:n=this.retryOptions.retryDelayInMs;break}}else{n=Math.random()*1e3}kf.info("RetryPolicy: Delay for ".concat(n,"ms"));return[2,xg(n,r,Ag)]}))}))};return t}(Sn);var Hg=function(){function e(e){this.retryOptions=e}e.prototype.create=function(e,t){return new Ig(e,t,this.retryOptions)};return e}();var Lg=function(e){Mr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.sendRequest=function(e){return this._nextPolicy.sendRequest(this.signRequest(e))};t.prototype.signRequest=function(e){return e};return t}(Sn);var Dg=function(e){Mr(t,e);function t(t,r){return e.call(this,t,r)||this}return t}(Lg);var jg=function(){function e(){}e.prototype.create=function(e,t){throw new Error("Method should be implemented in children classes.")};return e}();var Ug=function(e){Mr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.create=function(e,t){return new Dg(e,t)};return t}(jg);var Fg=function(e){Mr(t,e);function t(t,r,n){var a=e.call(this,t,r)||this;a.telemetry=n;return a}t.prototype.sendRequest=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(Qt){if(!e.headers){e.headers=new Tt}if(!e.headers.get(jf.USER_AGENT)){e.headers.set(jf.USER_AGENT,this.telemetry)}}return[2,this._nextPolicy.sendRequest(e)]}))}))};return t}(Sn);var Vg=function(){function e(e){var t=[];if(Qt){if(e){var r=e.userAgentPrefix||"";if(r.length>0&&t.indexOf(r)===-1){t.push(r)}}var n="azsdk-js-storageblob/".concat(Of);if(t.indexOf(n)===-1){t.push(n)}var a="(NODE-VERSION ".concat(da.version,"; ").concat(undefined()," ").concat(undefined(),")");if(t.indexOf(a)===-1){t.push(a)}}this.telemetryString=t.join(" ")}e.prototype.create=function(e,t){return new Fg(e,t,this.telemetryString)};return e}();var Kg=new gn;function Gg(){return Kg}function Wg(e){if(!e||typeof e!=="object"){return false}var t=e;return Array.isArray(t.factories)&&typeof t.options==="object"&&typeof t.toServiceClientOptions==="function"}var Xg=function(){function e(e,t){if(t===void 0){t={}}this.factories=e;this.options=Object.assign(Object.assign({},t),{httpClient:t.httpClient||Gg()})}e.prototype.toServiceClientOptions=function(){return{httpClient:this.options.httpClient,requestPolicyFactories:this.factories}};return e}();function Qg(e,t){if(t===void 0){t={}}if(e===undefined){e=new Ug}var r=new Vg(t.userAgentOptions);var n=[ps({userAgent:r.telemetryString}),Qn(t.keepAliveOptions),r,pi(),new Bg,new Hg(t.retryOptions),Hn(undefined,{xmlCharKey:"#"}),Fa({logger:kf.info,allowedHeaderNames:Gf,allowedQueryParameters:Wf})];if(Qt){n.push(gi());n.push(ci())}n.push(Xa(e)?kg(si(e,Lf),e):e);return new Xg(n,t)}var Yg=function(){function e(){}return e}();var Jg="azure-storage-blob";var $g="12.8.0";var Zg=function(e){Mr(t,e);function t(t,r){var n=this;if(t===undefined){throw new Error("'url' cannot be null")}if(!r){r={}}if(!r.userAgent){var a=ei();r.userAgent="".concat(Jg,"/").concat($g," ").concat(a)}n=e.call(this,undefined,r)||this;n.requestContentType="application/json; charset=utf-8";n.baseUri=r.endpoint||"{url}";n.url=t;n.version=r.version||"2020-10-02";return n}return t}(us);var ey=function(){function e(e,t){this.url=og(e);this.accountName=Sg(e);this.pipeline=t;this.storageClientContext=new Zg(this.url,t.toServiceClientOptions());this.isHttps=zg(hg(this.url)||"","https");this.credential=new Ug;for(var r=0,n=this.pipeline.factories;r<n.length;r++){var a=n[r];if(Qt&&a instanceof Yg||a instanceof Ug){this.credential=a}else if(Xa(a.credential)){this.credential=a.credential}}var i=this.storageClientContext;i.requestContentType=undefined}return e}();var ty=os({packagePrefix:"Azure.Storage.Blob",namespace:"Microsoft.Storage"});function ry(e){var t,r;return{spanOptions:(t=e===null||e===void 0?void 0:e.tracingOptions)===null||t===void 0?void 0:t.spanOptions,tracingContext:(r=e===null||e===void 0?void 0:e.tracingOptions)===null||r===void 0?void 0:r.tracingContext}}var ny=function(){function e(){this.read=false;this.add=false;this.create=false;this.write=false;this.delete=false;this.deleteVersion=false;this.tag=false;this.move=false;this.execute=false;this.setImmutabilityPolicy=false}e.parse=function(t){var r=new e;for(var n=0,a=t;n<a.length;n++){var i=a[n];switch(i){case"r":r.read=true;break;case"a":r.add=true;break;case"c":r.create=true;break;case"w":r.write=true;break;case"d":r.delete=true;break;case"x":r.deleteVersion=true;break;case"t":r.tag=true;break;case"m":r.move=true;break;case"e":r.execute=true;break;case"i":r.setImmutabilityPolicy=true;break;default:throw new RangeError("Invalid permission: ".concat(i))}}return r};e.from=function(t){var r=new e;if(t.read){r.read=true}if(t.add){r.add=true}if(t.create){r.create=true}if(t.write){r.write=true}if(t.delete){r.delete=true}if(t.deleteVersion){r.deleteVersion=true}if(t.tag){r.tag=true}if(t.move){r.move=true}if(t.execute){r.execute=true}if(t.setImmutabilityPolicy){r.setImmutabilityPolicy=true}return r};e.prototype.toString=function(){var e=[];if(this.read){e.push("r")}if(this.add){e.push("a")}if(this.create){e.push("c")}if(this.write){e.push("w")}if(this.delete){e.push("d")}if(this.deleteVersion){e.push("x")}if(this.tag){e.push("t")}if(this.move){e.push("m")}if(this.execute){e.push("e")}if(this.setImmutabilityPolicy){e.push("i")}return e.join("")};return e}();var ay=function(){function e(){this.read=false;this.add=false;this.create=false;this.write=false;this.delete=false;this.deleteVersion=false;this.list=false;this.tag=false;this.move=false;this.execute=false;this.setImmutabilityPolicy=false}e.parse=function(t){var r=new e;for(var n=0,a=t;n<a.length;n++){var i=a[n];switch(i){case"r":r.read=true;break;case"a":r.add=true;break;case"c":r.create=true;break;case"w":r.write=true;break;case"d":r.delete=true;break;case"l":r.list=true;break;case"t":r.tag=true;break;case"x":r.deleteVersion=true;break;case"m":r.move=true;break;case"e":r.execute=true;break;case"i":r.setImmutabilityPolicy=true;break;default:throw new RangeError("Invalid permission ".concat(i))}}return r};e.from=function(t){var r=new e;if(t.read){r.read=true}if(t.add){r.add=true}if(t.create){r.create=true}if(t.write){r.write=true}if(t.delete){r.delete=true}if(t.list){r.list=true}if(t.deleteVersion){r.deleteVersion=true}if(t.tag){r.tag=true}if(t.move){r.move=true}if(t.execute){r.execute=true}if(t.setImmutabilityPolicy){r.setImmutabilityPolicy=true}return r};e.prototype.toString=function(){var e=[];if(this.read){e.push("r")}if(this.add){e.push("a")}if(this.create){e.push("c")}if(this.write){e.push("w")}if(this.delete){e.push("d")}if(this.deleteVersion){e.push("x")}if(this.list){e.push("l")}if(this.tag){e.push("t")}if(this.move){e.push("m")}if(this.execute){e.push("e")}if(this.setImmutabilityPolicy){e.push("i")}return e.join("")};return e}();var iy=function(){function e(){}return e}();function oy(e){return e.end?"".concat(e.start,"-").concat(e.end):e.start}var sy;(function(e){e["Https"]="https";e["HttpsAndHttp"]="https,http"})(sy||(sy={}));var ly=function(){function e(e,t,r,n,a,i,o,s,l,c,p,d,u,m,f,h,g,y,v){this.version=e;this.signature=t;if(r!==undefined&&typeof r!=="string"){this.permissions=r.permissions;this.services=r.services;this.resourceTypes=r.resourceTypes;this.protocol=r.protocol;this.startsOn=r.startsOn;this.expiresOn=r.expiresOn;this.ipRangeInner=r.ipRange;this.identifier=r.identifier;this.resource=r.resource;this.cacheControl=r.cacheControl;this.contentDisposition=r.contentDisposition;this.contentEncoding=r.contentEncoding;this.contentLanguage=r.contentLanguage;this.contentType=r.contentType;if(r.userDelegationKey){this.signedOid=r.userDelegationKey.signedObjectId;this.signedTenantId=r.userDelegationKey.signedTenantId;this.signedStartsOn=r.userDelegationKey.signedStartsOn;this.signedExpiresOn=r.userDelegationKey.signedExpiresOn;this.signedService=r.userDelegationKey.signedService;this.signedVersion=r.userDelegationKey.signedVersion;this.preauthorizedAgentObjectId=r.preauthorizedAgentObjectId;this.correlationId=r.correlationId}}else{this.services=n;this.resourceTypes=a;this.expiresOn=s;this.permissions=r;this.protocol=i;this.startsOn=o;this.ipRangeInner=l;this.identifier=c;this.resource=p;this.cacheControl=d;this.contentDisposition=u;this.contentEncoding=m;this.contentLanguage=f;this.contentType=h;if(g){this.signedOid=g.signedObjectId;this.signedTenantId=g.signedTenantId;this.signedStartsOn=g.signedStartsOn;this.signedExpiresOn=g.signedExpiresOn;this.signedService=g.signedService;this.signedVersion=g.signedVersion;this.preauthorizedAgentObjectId=y;this.correlationId=v}}}Object.defineProperty(e.prototype,"ipRange",{get:function(){if(this.ipRangeInner){return{end:this.ipRangeInner.end,start:this.ipRangeInner.start}}return undefined},enumerable:false,configurable:true});e.prototype.toString=function(){var e=["sv","ss","srt","spr","st","se","sip","si","skoid","sktid","skt","ske","sks","skv","sr","sp","sig","rscc","rscd","rsce","rscl","rsct","saoid","scid"];var t=[];for(var r=0,n=e;r<n.length;r++){var a=n[r];switch(a){case"sv":this.tryAppendQueryParameter(t,a,this.version);break;case"ss":this.tryAppendQueryParameter(t,a,this.services);break;case"srt":this.tryAppendQueryParameter(t,a,this.resourceTypes);break;case"spr":this.tryAppendQueryParameter(t,a,this.protocol);break;case"st":this.tryAppendQueryParameter(t,a,this.startsOn?yg(this.startsOn,false):undefined);break;case"se":this.tryAppendQueryParameter(t,a,this.expiresOn?yg(this.expiresOn,false):undefined);break;case"sip":this.tryAppendQueryParameter(t,a,this.ipRange?oy(this.ipRange):undefined);break;case"si":this.tryAppendQueryParameter(t,a,this.identifier);break;case"skoid":this.tryAppendQueryParameter(t,a,this.signedOid);break;case"sktid":this.tryAppendQueryParameter(t,a,this.signedTenantId);break;case"skt":this.tryAppendQueryParameter(t,a,this.signedStartsOn?yg(this.signedStartsOn,false):undefined);break;case"ske":this.tryAppendQueryParameter(t,a,this.signedExpiresOn?yg(this.signedExpiresOn,false):undefined);break;case"sks":this.tryAppendQueryParameter(t,a,this.signedService);break;case"skv":this.tryAppendQueryParameter(t,a,this.signedVersion);break;case"sr":this.tryAppendQueryParameter(t,a,this.resource);break;case"sp":this.tryAppendQueryParameter(t,a,this.permissions);break;case"sig":this.tryAppendQueryParameter(t,a,this.signature);break;case"rscc":this.tryAppendQueryParameter(t,a,this.cacheControl);break;case"rscd":this.tryAppendQueryParameter(t,a,this.contentDisposition);break;case"rsce":this.tryAppendQueryParameter(t,a,this.contentEncoding);break;case"rscl":this.tryAppendQueryParameter(t,a,this.contentLanguage);break;case"rsct":this.tryAppendQueryParameter(t,a,this.contentType);break;case"saoid":this.tryAppendQueryParameter(t,a,this.preauthorizedAgentObjectId);break;case"scid":this.tryAppendQueryParameter(t,a,this.correlationId);break}}return t.join("&")};e.prototype.tryAppendQueryParameter=function(e,t,r){if(!r){return}t=encodeURIComponent(t);r=encodeURIComponent(r);if(t.length>0&&r.length>0){e.push("".concat(t,"=").concat(r))}};return e}();function cy(e,t,r){var n=e.version?e.version:Tf;var a=t instanceof Yg?t:undefined;var i;if(a===undefined&&r!==undefined){i=new iy(r,t)}if(a===undefined&&i===undefined){throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName.")}if(n>="2018-11-09"){if(a!==undefined){return dy(e,a)}else{if(n>="2020-02-10"){return my(e,i)}else{return uy(e,i)}}}if(n>="2015-04-05"){if(a!==undefined){return py(e,a)}else{throw new RangeError("'version' must be >= '2018-11-09' when generating user delegation SAS using user delegation key.")}}throw new RangeError("'version' must be >= '2015-04-05'.")}function py(e,t){e=hy(e);if(!e.identifier&&!(e.permissions&&e.expiresOn)){throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.")}var r="c";if(e.blobName){r="b"}var n;if(e.permissions){if(e.blobName){n=ny.parse(e.permissions.toString()).toString()}else{n=ay.parse(e.permissions.toString()).toString()}}var a=[n?n:"",e.startsOn?yg(e.startsOn,false):"",e.expiresOn?yg(e.expiresOn,false):"",fy(t.accountName,e.containerName,e.blobName),e.identifier,e.ipRange?oy(e.ipRange):"",e.protocol?e.protocol:"",e.version,e.cacheControl?e.cacheControl:"",e.contentDisposition?e.contentDisposition:"",e.contentEncoding?e.contentEncoding:"",e.contentLanguage?e.contentLanguage:"",e.contentType?e.contentType:""].join("\n");var i=t.computeHMACSHA256(a);return new ly(e.version,i,n,undefined,undefined,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,r,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType)}function dy(e,t){e=hy(e);if(!e.identifier&&!(e.permissions&&e.expiresOn)){throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.")}var r="c";var n=e.snapshotTime;if(e.blobName){r="b";if(e.snapshotTime){r="bs"}else if(e.versionId){r="bv";n=e.versionId}}var a;if(e.permissions){if(e.blobName){a=ny.parse(e.permissions.toString()).toString()}else{a=ay.parse(e.permissions.toString()).toString()}}var i=[a?a:"",e.startsOn?yg(e.startsOn,false):"",e.expiresOn?yg(e.expiresOn,false):"",fy(t.accountName,e.containerName,e.blobName),e.identifier,e.ipRange?oy(e.ipRange):"",e.protocol?e.protocol:"",e.version,r,n,e.cacheControl?e.cacheControl:"",e.contentDisposition?e.contentDisposition:"",e.contentEncoding?e.contentEncoding:"",e.contentLanguage?e.contentLanguage:"",e.contentType?e.contentType:""].join("\n");var o=t.computeHMACSHA256(i);return new ly(e.version,o,a,undefined,undefined,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,r,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType)}function uy(e,t){e=hy(e);if(!e.permissions||!e.expiresOn){throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.")}var r="c";var n=e.snapshotTime;if(e.blobName){r="b";if(e.snapshotTime){r="bs"}else if(e.versionId){r="bv";n=e.versionId}}var a;if(e.permissions){if(e.blobName){a=ny.parse(e.permissions.toString()).toString()}else{a=ay.parse(e.permissions.toString()).toString()}}var i=[a?a:"",e.startsOn?yg(e.startsOn,false):"",e.expiresOn?yg(e.expiresOn,false):"",fy(t.accountName,e.containerName,e.blobName),t.userDelegationKey.signedObjectId,t.userDelegationKey.signedTenantId,t.userDelegationKey.signedStartsOn?yg(t.userDelegationKey.signedStartsOn,false):"",t.userDelegationKey.signedExpiresOn?yg(t.userDelegationKey.signedExpiresOn,false):"",t.userDelegationKey.signedService,t.userDelegationKey.signedVersion,e.ipRange?oy(e.ipRange):"",e.protocol?e.protocol:"",e.version,r,n,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType].join("\n");var o=t.computeHMACSHA256(i);return new ly(e.version,o,a,undefined,undefined,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,r,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,t.userDelegationKey)}function my(e,t){e=hy(e);if(!e.permissions||!e.expiresOn){throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.")}var r="c";var n=e.snapshotTime;if(e.blobName){r="b";if(e.snapshotTime){r="bs"}else if(e.versionId){r="bv";n=e.versionId}}var a;if(e.permissions){if(e.blobName){a=ny.parse(e.permissions.toString()).toString()}else{a=ay.parse(e.permissions.toString()).toString()}}var i=[a?a:"",e.startsOn?yg(e.startsOn,false):"",e.expiresOn?yg(e.expiresOn,false):"",fy(t.accountName,e.containerName,e.blobName),t.userDelegationKey.signedObjectId,t.userDelegationKey.signedTenantId,t.userDelegationKey.signedStartsOn?yg(t.userDelegationKey.signedStartsOn,false):"",t.userDelegationKey.signedExpiresOn?yg(t.userDelegationKey.signedExpiresOn,false):"",t.userDelegationKey.signedService,t.userDelegationKey.signedVersion,e.preauthorizedAgentObjectId,undefined,e.correlationId,e.ipRange?oy(e.ipRange):"",e.protocol?e.protocol:"",e.version,r,n,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType].join("\n");var o=t.computeHMACSHA256(i);return new ly(e.version,o,a,undefined,undefined,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,r,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,t.userDelegationKey,e.preauthorizedAgentObjectId,e.correlationId)}function fy(e,t,r){var n=["/blob/".concat(e,"/").concat(t)];if(r){n.push("/".concat(r))}return n.join("")}function hy(e){var t=e.version?e.version:Tf;if(e.snapshotTime&&t<"2018-11-09"){throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.")}if(e.blobName===undefined&&e.snapshotTime){throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.")}if(e.versionId&&t<"2019-10-10"){throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.")}if(e.blobName===undefined&&e.versionId){throw RangeError("Must provide 'blobName' when providing 'versionId'.")}if(e.permissions&&e.permissions.setImmutabilityPolicy&&t<"2020-08-04"){throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.")}if(e.permissions&&e.permissions.deleteVersion&&t<"2019-10-10"){throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.")}if(e.permissions&&e.permissions.tag&&t<"2019-12-12"){throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.")}if(t<"2020-02-10"&&e.permissions&&(e.permissions.move||e.permissions.execute)){throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.")}if(t<"2020-02-10"&&(e.preauthorizedAgentObjectId||e.correlationId)){throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.")}e.version=t;return e}var gy=function(){function e(e,t){var r=new Zg(e.url,e.pipeline.toServiceClientOptions());this._url=e.url;if(e.name===undefined){this._isContainer=true;this._containerOrBlobOperation=new pm(r)}else{this._isContainer=false;this._containerOrBlobOperation=new Em(r)}if(!t){t=Jt()}this._leaseId=t}Object.defineProperty(e.prototype,"leaseId",{get:function(){return this._leaseId},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"url",{get:function(){return this._url},enumerable:false,configurable:true});e.prototype.acquireLease=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o,s,l,c,p,d;return __generator(this,(function(u){switch(u.label){case 0:l=ty("BlobLeaseClient-acquireLease",t),c=l.span,p=l.updatedOptions;if(this._isContainer&&(((r=t.conditions)===null||r===void 0?void 0:r.ifMatch)&&((n=t.conditions)===null||n===void 0?void 0:n.ifMatch)!==Uf||((a=t.conditions)===null||a===void 0?void 0:a.ifNoneMatch)&&((i=t.conditions)===null||i===void 0?void 0:i.ifNoneMatch)!==Uf||((o=t.conditions)===null||o===void 0?void 0:o.tagConditions))){throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.")}u.label=1;case 1:u.trys.push([1,3,4,5]);return[4,this._containerOrBlobOperation.acquireLease(Object.assign({abortSignal:t.abortSignal,duration:e,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(s=t.conditions)===null||s===void 0?void 0:s.tagConditions}),proposedLeaseId:this._leaseId},ry(p)))];case 2:return[2,u.sent()];case 3:d=u.sent();c.setStatus({code:as.ERROR,message:d.message});throw d;case 4:c.end();return[7];case 5:return[2]}}))}))};e.prototype.changeLease=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o,s,l,c,p,d,u;return __generator(this,(function(m){switch(m.label){case 0:l=ty("BlobLeaseClient-changeLease",t),c=l.span,p=l.updatedOptions;if(this._isContainer&&(((r=t.conditions)===null||r===void 0?void 0:r.ifMatch)&&((n=t.conditions)===null||n===void 0?void 0:n.ifMatch)!==Uf||((a=t.conditions)===null||a===void 0?void 0:a.ifNoneMatch)&&((i=t.conditions)===null||i===void 0?void 0:i.ifNoneMatch)!==Uf||((o=t.conditions)===null||o===void 0?void 0:o.tagConditions))){throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.")}m.label=1;case 1:m.trys.push([1,3,4,5]);return[4,this._containerOrBlobOperation.changeLease(this._leaseId,e,Object.assign({abortSignal:t.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(s=t.conditions)===null||s===void 0?void 0:s.tagConditions})},ry(p)))];case 2:d=m.sent();this._leaseId=e;return[2,d];case 3:u=m.sent();c.setStatus({code:as.ERROR,message:u.message});throw u;case 4:c.end();return[7];case 5:return[2]}}))}))};e.prototype.releaseLease=function(e){if(e===void 0){e={}}return __awaiter(this,void 0,void 0,(function(){var t,r,n,a,i,o,s,l,c,p;return __generator(this,(function(d){switch(d.label){case 0:s=ty("BlobLeaseClient-releaseLease",e),l=s.span,c=s.updatedOptions;if(this._isContainer&&(((t=e.conditions)===null||t===void 0?void 0:t.ifMatch)&&((r=e.conditions)===null||r===void 0?void 0:r.ifMatch)!==Uf||((n=e.conditions)===null||n===void 0?void 0:n.ifNoneMatch)&&((a=e.conditions)===null||a===void 0?void 0:a.ifNoneMatch)!==Uf||((i=e.conditions)===null||i===void 0?void 0:i.tagConditions))){throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.")}d.label=1;case 1:d.trys.push([1,3,4,5]);return[4,this._containerOrBlobOperation.releaseLease(this._leaseId,Object.assign({abortSignal:e.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(o=e.conditions)===null||o===void 0?void 0:o.tagConditions})},ry(c)))];case 2:return[2,d.sent()];case 3:p=d.sent();l.setStatus({code:as.ERROR,message:p.message});throw p;case 4:l.end();return[7];case 5:return[2]}}))}))};e.prototype.renewLease=function(e){if(e===void 0){e={}}return __awaiter(this,void 0,void 0,(function(){var t,r,n,a,i,o,s,l,c,p;return __generator(this,(function(d){switch(d.label){case 0:s=ty("BlobLeaseClient-renewLease",e),l=s.span,c=s.updatedOptions;if(this._isContainer&&(((t=e.conditions)===null||t===void 0?void 0:t.ifMatch)&&((r=e.conditions)===null||r===void 0?void 0:r.ifMatch)!==Uf||((n=e.conditions)===null||n===void 0?void 0:n.ifNoneMatch)&&((a=e.conditions)===null||a===void 0?void 0:a.ifNoneMatch)!==Uf||((i=e.conditions)===null||i===void 0?void 0:i.tagConditions))){throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.")}d.label=1;case 1:d.trys.push([1,3,4,5]);return[4,this._containerOrBlobOperation.renewLease(this._leaseId,Object.assign({abortSignal:e.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(o=e.conditions)===null||o===void 0?void 0:o.tagConditions})},ry(c)))];case 2:return[2,d.sent()];case 3:p=d.sent();l.setStatus({code:as.ERROR,message:p.message});throw p;case 4:l.end();return[7];case 5:return[2]}}))}))};e.prototype.breakLease=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o,s,l,c,p,d,u;return __generator(this,(function(m){switch(m.label){case 0:l=ty("BlobLeaseClient-breakLease",t),c=l.span,p=l.updatedOptions;if(this._isContainer&&(((r=t.conditions)===null||r===void 0?void 0:r.ifMatch)&&((n=t.conditions)===null||n===void 0?void 0:n.ifMatch)!==Uf||((a=t.conditions)===null||a===void 0?void 0:a.ifNoneMatch)&&((i=t.conditions)===null||i===void 0?void 0:i.ifNoneMatch)!==Uf||((o=t.conditions)===null||o===void 0?void 0:o.tagConditions))){throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.")}m.label=1;case 1:m.trys.push([1,3,4,5]);d=Object.assign({abortSignal:t.abortSignal,breakPeriod:e,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(s=t.conditions)===null||s===void 0?void 0:s.tagConditions})},ry(p));return[4,this._containerOrBlobOperation.breakLease(d)];case 2:return[2,m.sent()];case 3:u=m.sent();c.setStatus({code:as.ERROR,message:u.message});throw u;case 4:c.end();return[7];case 5:return[2]}}))}))};return e}();var yy=1;var vy=function(){function e(e,t){if(t===void 0){t={}}this.originalResponse=e}Object.defineProperty(e.prototype,"acceptRanges",{get:function(){return this.originalResponse.acceptRanges},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"cacheControl",{get:function(){return this.originalResponse.cacheControl},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"contentDisposition",{get:function(){return this.originalResponse.contentDisposition},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"contentEncoding",{get:function(){return this.originalResponse.contentEncoding},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"contentLanguage",{get:function(){return this.originalResponse.contentLanguage},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"blobSequenceNumber",{get:function(){return this.originalResponse.blobSequenceNumber},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"blobType",{get:function(){return this.originalResponse.blobType},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"contentLength",{get:function(){return this.originalResponse.contentLength},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"contentMD5",{get:function(){return this.originalResponse.contentMD5},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"contentRange",{get:function(){return this.originalResponse.contentRange},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"contentType",{get:function(){return this.originalResponse.contentType},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"copyCompletedOn",{get:function(){return undefined},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"copyId",{get:function(){return this.originalResponse.copyId},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"copyProgress",{get:function(){return this.originalResponse.copyProgress},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"copySource",{get:function(){return this.originalResponse.copySource},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"copyStatus",{get:function(){return this.originalResponse.copyStatus},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"copyStatusDescription",{get:function(){return this.originalResponse.copyStatusDescription},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"leaseDuration",{get:function(){return this.originalResponse.leaseDuration},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"leaseState",{get:function(){return this.originalResponse.leaseState},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"leaseStatus",{get:function(){return this.originalResponse.leaseStatus},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"date",{get:function(){return this.originalResponse.date},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"blobCommittedBlockCount",{get:function(){return this.originalResponse.blobCommittedBlockCount},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"etag",{get:function(){return this.originalResponse.etag},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"errorCode",{get:function(){return this.originalResponse.errorCode},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isServerEncrypted",{get:function(){return this.originalResponse.isServerEncrypted},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"blobContentMD5",{get:function(){return this.originalResponse.blobContentMD5},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"lastModified",{get:function(){return this.originalResponse.lastModified},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"metadata",{get:function(){return this.originalResponse.metadata},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"requestId",{get:function(){return this.originalResponse.requestId},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"clientRequestId",{get:function(){return this.originalResponse.clientRequestId},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"version",{get:function(){return this.originalResponse.version},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"encryptionKeySha256",{get:function(){return this.originalResponse.encryptionKeySha256},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"contentCrc64",{get:function(){return this.originalResponse.contentCrc64},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"blobBody",{get:function(){throw Error("Quick query in browser is not supported yet.")},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"readableStreamBody",{get:function(){return undefined},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"_response",{get:function(){return this.originalResponse._response},enumerable:false,configurable:true});return e}();var by;(function(e){e["Hot"]="Hot";e["Cool"]="Cool";e["Archive"]="Archive"})(by||(by={}));var xy;(function(e){e["P4"]="P4";e["P6"]="P6";e["P10"]="P10";e["P15"]="P15";e["P20"]="P20";e["P30"]="P30";e["P40"]="P40";e["P50"]="P50";e["P60"]="P60";e["P70"]="P70";e["P80"]="P80"})(xy||(xy={}));function Ny(e){if(e===undefined){return undefined}return e}function zy(e,t){if(e&&!t){throw new RangeError("Customer-provided encryption key must be used over HTTPS.")}if(e&&!e.encryptionAlgorithm){e.encryptionAlgorithm=Vf}}function Sy(e){var t=(e._response.parsedBody.pageRange||[]).map((function(e){return{offset:e.start,count:e.end-e.start}}));var r=(e._response.parsedBody.clearRange||[]).map((function(e){return{offset:e.start,count:e.end-e.start}}));return Object.assign(Object.assign({},e),{pageRange:t,clearRange:r,_response:Object.assign(Object.assign({},e._response),{parsedBody:{pageRange:t,clearRange:r}})})}var wy=function(e){Mr(t,e);function t(r){var n=e.call(this,r)||this;n.name="PollerStoppedError";Object.setPrototypeOf(n,t.prototype);return n}return t}(Error);var Py=function(e){Mr(t,e);function t(r){var n=e.call(this,r)||this;n.name="PollerCancelledError";Object.setPrototypeOf(n,t.prototype);return n}return t}(Error);var Cy=function(){function e(e){var t=this;this.stopped=true;this.pollProgressCallbacks=[];this.operation=e;this.promise=new Promise((function(e,r){t.resolve=e;t.reject=r}));this.promise.catch((function(){}))}e.prototype.startPolling=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:if(this.stopped){this.stopped=false}e.label=1;case 1:if(!(!this.isStopped()&&!this.isDone()))return[3,4];return[4,this.poll()];case 2:e.sent();return[4,this.delay()];case 3:e.sent();return[3,1];case 4:return[2]}}))}))};e.prototype.pollOnce=function(e){if(e===void 0){e={}}return __awaiter(this,void 0,void 0,(function(){var t,r;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);if(!!this.isDone())return[3,2];t=this;return[4,this.operation.update({abortSignal:e.abortSignal,fireProgress:this.fireProgress.bind(this)})];case 1:t.operation=n.sent();if(this.isDone()&&this.resolve){this.resolve(this.operation.state.result)}n.label=2;case 2:return[3,4];case 3:r=n.sent();this.operation.state.error=r;if(this.reject){this.reject(r)}throw r;case 4:return[2]}}))}))};e.prototype.fireProgress=function(e){for(var t=0,r=this.pollProgressCallbacks;t<r.length;t++){var n=r[t];n(e)}};e.prototype.cancelOnce=function(e){if(e===void 0){e={}}return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(r){switch(r.label){case 0:t=this;return[4,this.operation.cancel(e)];case 1:t.operation=r.sent();if(this.reject){this.reject(new Py("Poller cancelled"))}return[2]}}))}))};e.prototype.poll=function(e){var t=this;if(e===void 0){e={}}if(!this.pollOncePromise){this.pollOncePromise=this.pollOnce(e);var r=function(){t.pollOncePromise=undefined};this.pollOncePromise.then(r,r).catch(this.reject)}return this.pollOncePromise};e.prototype.pollUntilDone=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(this.stopped){this.startPolling().catch(this.reject)}return[2,this.promise]}))}))};e.prototype.onProgress=function(e){var t=this;this.pollProgressCallbacks.push(e);return function(){t.pollProgressCallbacks=t.pollProgressCallbacks.filter((function(t){return t!==e}))}};e.prototype.isDone=function(){var e=this.operation.state;return Boolean(e.isCompleted||e.isCancelled||e.error)};e.prototype.stopPolling=function(){if(!this.stopped){this.stopped=true;if(this.reject){this.reject(new wy("This poller is already stopped"))}}};e.prototype.isStopped=function(){return this.stopped};e.prototype.cancelOperation=function(e){if(e===void 0){e={}}if(!this.stopped){this.stopped=true}if(!this.cancelPromise){this.cancelPromise=this.cancelOnce(e)}else if(e.abortSignal){throw new Error("A cancel request is currently pending")}return this.cancelPromise};e.prototype.getOperationState=function(){return this.operation.state};e.prototype.getResult=function(){var e=this.operation.state;return e.result};e.prototype.toString=function(){return this.operation.toString()};return e}();var Ry=function(e){Mr(t,e);function t(t){var r=this;var n=t.blobClient,a=t.copySource,i=t.intervalInMs,o=i===void 0?15e3:i,s=t.onProgress,l=t.resumeFrom,c=t.startCopyFromURLOptions;var p;if(l){p=JSON.parse(l).state}var d=Oy(Object.assign(Object.assign({},p),{blobClient:n,copySource:a,startCopyFromURLOptions:c}));r=e.call(this,d)||this;if(typeof s==="function"){r.onProgress(s)}r.intervalInMs=o;return r}t.prototype.delay=function(){return pa(this.intervalInMs)};return t}(Cy);var _y=function e(t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var e,r;return __generator(this,(function(n){switch(n.label){case 0:e=this.state;r=e.copyId;if(e.isCompleted){return[2,Oy(e)]}if(!r){e.isCancelled=true;return[2,Oy(e)]}return[4,e.blobClient.abortCopyFromURL(r,{abortSignal:t.abortSignal})];case 1:n.sent();e.isCancelled=true;return[2,Oy(e)]}}))}))};var Ey=function e(t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var e,r,n,a,i,i,o,s,l,c;return __generator(this,(function(p){switch(p.label){case 0:e=this.state;r=e.blobClient,n=e.copySource,a=e.startCopyFromURLOptions;if(!!e.isStarted)return[3,2];e.isStarted=true;return[4,r.startCopyFromURL(n,a)];case 1:i=p.sent();e.copyId=i.copyId;if(i.copyStatus==="success"){e.result=i;e.isCompleted=true}return[3,6];case 2:if(!!e.isCompleted)return[3,6];p.label=3;case 3:p.trys.push([3,5,,6]);return[4,e.blobClient.getProperties({abortSignal:t.abortSignal})];case 4:i=p.sent();o=i.copyStatus,s=i.copyProgress;l=e.copyProgress;if(s){e.copyProgress=s}if(o==="pending"&&s!==l&&typeof t.fireProgress==="function"){t.fireProgress(e)}else if(o==="success"){e.result=i;e.isCompleted=true}else if(o==="failed"){e.error=new Error('Blob copy failed with reason: "'.concat(i.copyStatusDescription||"unknown",'"'));e.isCompleted=true}return[3,6];case 5:c=p.sent();e.error=c;e.isCompleted=true;return[3,6];case 6:return[2,Oy(e)]}}))}))};var ky=function e(){return JSON.stringify({state:this.state},(function(e,t){if(e==="blobClient"){return undefined}return t}))};function Oy(e){return{state:Object.assign({},e),cancel:_y,toString:ky,update:Ey}}function Ty(e){if(e.offset<0){throw new RangeError("Range.offset cannot be smaller than 0.")}if(e.count&&e.count<=0){throw new RangeError("Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end.")}return e.count?"bytes=".concat(e.offset,"-").concat(e.offset+e.count-1):"bytes=".concat(e.offset,"-")}var By=typeof Reflect==="object"?Reflect:null;var qy=By&&typeof By.apply==="function"?By.apply:function e(t,r,n){return Function.prototype.apply.call(t,r,n)};var My;if(By&&typeof By.ownKeys==="function"){My=By.ownKeys}else if(Object.getOwnPropertySymbols){My=function e(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}}else{My=function e(t){return Object.getOwnPropertyNames(t)}}function Ay(e){if(console&&console.warn)console.warn(e)}var Iy=Number.isNaN||function e(t){return t!==t};function Hy(){Hy.init.call(this)}var Ly=Hy;var Dy=$y;Hy.EventEmitter=Hy;Hy.prototype._events=undefined;Hy.prototype._eventsCount=0;Hy.prototype._maxListeners=undefined;var jy=10;function Uy(e){if(typeof e!=="function"){throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}}Object.defineProperty(Hy,"defaultMaxListeners",{enumerable:true,get:function(){return jy},set:function(e){if(typeof e!=="number"||e<0||Iy(e)){throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".")}jy=e}});Hy.init=function(){if(this._events===undefined||this._events===Object.getPrototypeOf(this)._events){this._events=Object.create(null);this._eventsCount=0}this._maxListeners=this._maxListeners||undefined};Hy.prototype.setMaxListeners=function e(t){if(typeof t!=="number"||t<0||Iy(t)){throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".")}this._maxListeners=t;return this};function Fy(e){if(e._maxListeners===undefined)return Hy.defaultMaxListeners;return e._maxListeners}Hy.prototype.getMaxListeners=function e(){return Fy(this)};Hy.prototype.emit=function e(t){var r=[];for(var n=1;n<arguments.length;n++)r.push(arguments[n]);var a=t==="error";var i=this._events;if(i!==undefined)a=a&&i.error===undefined;else if(!a)return false;if(a){var o;if(r.length>0)o=r[0];if(o instanceof Error){throw o}var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));s.context=o;throw s}var l=i[t];if(l===undefined)return false;if(typeof l==="function"){qy(l,this,r)}else{var c=l.length;var p=Qy(l,c);for(var n=0;n<c;++n)qy(p[n],this,r)}return true};function Vy(e,t,r,n){var a;var i;var o;Uy(r);i=e._events;if(i===undefined){i=e._events=Object.create(null);e._eventsCount=0}else{if(i.newListener!==undefined){e.emit("newListener",t,r.listener?r.listener:r);i=e._events}o=i[t]}if(o===undefined){o=i[t]=r;++e._eventsCount}else{if(typeof o==="function"){o=i[t]=n?[r,o]:[o,r]}else if(n){o.unshift(r)}else{o.push(r)}a=Fy(e);if(a>0&&o.length>a&&!o.warned){o.warned=true;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners "+"added. Use emitter.setMaxListeners() to "+"increase limit");s.name="MaxListenersExceededWarning";s.emitter=e;s.type=t;s.count=o.length;Ay(s)}}return e}Hy.prototype.addListener=function e(t,r){return Vy(this,t,r,false)};Hy.prototype.on=Hy.prototype.addListener;Hy.prototype.prependListener=function e(t,r){return Vy(this,t,r,true)};function Ky(){if(!this.fired){this.target.removeListener(this.type,this.wrapFn);this.fired=true;if(arguments.length===0)return this.listener.call(this.target);return this.listener.apply(this.target,arguments)}}function Gy(e,t,r){var n={fired:false,wrapFn:undefined,target:e,type:t,listener:r};var a=Ky.bind(n);a.listener=r;n.wrapFn=a;return a}Hy.prototype.once=function e(t,r){Uy(r);this.on(t,Gy(this,t,r));return this};Hy.prototype.prependOnceListener=function e(t,r){Uy(r);this.prependListener(t,Gy(this,t,r));return this};Hy.prototype.removeListener=function e(t,r){var n,a,i,o,s;Uy(r);a=this._events;if(a===undefined)return this;n=a[t];if(n===undefined)return this;if(n===r||n.listener===r){if(--this._eventsCount===0)this._events=Object.create(null);else{delete a[t];if(a.removeListener)this.emit("removeListener",t,n.listener||r)}}else if(typeof n!=="function"){i=-1;for(o=n.length-1;o>=0;o--){if(n[o]===r||n[o].listener===r){s=n[o].listener;i=o;break}}if(i<0)return this;if(i===0)n.shift();else{Yy(n,i)}if(n.length===1)a[t]=n[0];if(a.removeListener!==undefined)this.emit("removeListener",t,s||r)}return this};Hy.prototype.off=Hy.prototype.removeListener;Hy.prototype.removeAllListeners=function e(t){var r,n,a;n=this._events;if(n===undefined)return this;if(n.removeListener===undefined){if(arguments.length===0){this._events=Object.create(null);this._eventsCount=0}else if(n[t]!==undefined){if(--this._eventsCount===0)this._events=Object.create(null);else delete n[t]}return this}if(arguments.length===0){var i=Object.keys(n);var o;for(a=0;a<i.length;++a){o=i[a];if(o==="removeListener")continue;this.removeAllListeners(o)}this.removeAllListeners("removeListener");this._events=Object.create(null);this._eventsCount=0;return this}r=n[t];if(typeof r==="function"){this.removeListener(t,r)}else if(r!==undefined){for(a=r.length-1;a>=0;a--){this.removeListener(t,r[a])}}return this};function Wy(e,t,r){var n=e._events;if(n===undefined)return[];var a=n[t];if(a===undefined)return[];if(typeof a==="function")return r?[a.listener||a]:[a];return r?Jy(a):Qy(a,a.length)}Hy.prototype.listeners=function e(t){return Wy(this,t,true)};Hy.prototype.rawListeners=function e(t){return Wy(this,t,false)};Hy.listenerCount=function(e,t){if(typeof e.listenerCount==="function"){return e.listenerCount(t)}else{return Xy.call(e,t)}};Hy.prototype.listenerCount=Xy;function Xy(e){var t=this._events;if(t!==undefined){var r=t[e];if(typeof r==="function"){return 1}else if(r!==undefined){return r.length}}return 0}Hy.prototype.eventNames=function e(){return this._eventsCount>0?My(this._events):[]};function Qy(e,t){var r=new Array(t);for(var n=0;n<t;++n)r[n]=e[n];return r}function Yy(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function Jy(e){var t=new Array(e.length);for(var r=0;r<t.length;++r){t[r]=e[r].listener||e[r]}return t}function $y(e,t){return new Promise((function(r,n){function a(r){e.removeListener(t,i);n(r)}function i(){if(typeof e.removeListener==="function"){e.removeListener("error",a)}r([].slice.call(arguments))}ev(e,t,i,{once:true});if(t!=="error"){Zy(e,a,{once:true})}}))}function Zy(e,t,r){if(typeof e.on==="function"){ev(e,"error",t,r)}}function ev(e,t,r,n){if(typeof e.on==="function"){if(n.once){e.once(t,r)}else{e.on(t,r)}}else if(typeof e.addEventListener==="function"){e.addEventListener(t,(function a(i){if(n.once){e.removeEventListener(t,a)}r(i)}))}else{throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}}Ly.once=Dy;var tv;(function(e){e[e["Good"]=0]="Good";e[e["Error"]=1]="Error"})(tv||(tv={}));var rv=function(){function e(e){if(e===void 0){e=5}this.actives=0;this.completed=0;this.offset=0;this.operations=[];this.state=tv.Good;if(e<1){throw new RangeError("concurrency must be larger than 0")}this.concurrency=e;this.emitter=new Ly.EventEmitter}e.prototype.addOperation=function(e){var t=this;this.operations.push((function(){return __awaiter(t,void 0,void 0,(function(){var t;return __generator(this,(function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);this.actives++;return[4,e()];case 1:r.sent();this.actives--;this.completed++;this.parallelExecute();return[3,3];case 2:t=r.sent();this.emitter.emit("error",t);return[3,3];case 3:return[2]}}))}))}))};e.prototype.do=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){if(this.operations.length===0){return[2,Promise.resolve()]}this.parallelExecute();return[2,new Promise((function(t,r){e.emitter.on("finish",t);e.emitter.on("error",(function(t){e.state=tv.Error;r(t)}))}))]}))}))};e.prototype.nextOperation=function(){if(this.offset<this.operations.length){return this.operations[this.offset++]}return null};e.prototype.parallelExecute=function(){if(this.state===tv.Error){return}if(this.completed>=this.operations.length){this.emitter.emit("finish");return}while(this.actives<this.concurrency){var e=this.nextOperation();if(e){e()}else{return}}};return e}();var nv=function(){function e(){}return e}();function av(){}function iv(){}var ov=function e(){};var sv=function e(){};var lv=function(e){Mr(t,e);function t(t,r,n,a){var i;var o=this;a=a||{};var s;var l;if(Wg(r)){l=t;s=r}else if(Qt&&r instanceof Yg||r instanceof Ug||Xa(r)){l=t;a=n;s=Qg(r,a)}else if(!r&&typeof r!=="string"){l=t;s=Qg(new Ug,a)}else if(r&&typeof r==="string"&&n&&typeof n==="string"){var c=r;var p=n;var d=cg(t);if(d.kind==="AccountConnString"){if(Qt){var u=new Yg(d.accountName,d.accountKey);l=dg(dg(d.url,encodeURIComponent(c)),encodeURIComponent(p));a.proxyOptions=hi();s=Qg(u,a)}else{throw new Error("Account connection string is only supported in Node.js environment")}}else if(d.kind==="SASConnString"){l=dg(dg(d.url,encodeURIComponent(c)),encodeURIComponent(p))+"?"+d.accountSas;s=Qg(new Ug,a)}else{throw new Error("Connection string must be either an Account connection string or a SAS connection string")}}else{throw new Error("Expecting non-empty strings for containerName and blobName parameters")}o=e.call(this,l,s)||this;i=o.getBlobAndContainerNamesFromUrl(),o._name=i.blobName,o._containerName=i.containerName;o.blobContext=new Em(o.storageClientContext);o._snapshot=mg(o.url,Df.Parameters.SNAPSHOT);o._versionId=mg(o.url,Df.Parameters.VERSIONID);return o}Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"containerName",{get:function(){return this._containerName},enumerable:false,configurable:true});t.prototype.withSnapshot=function(e){return new t(ug(this.url,Df.Parameters.SNAPSHOT,e.length===0?undefined:e),this.pipeline)};t.prototype.withVersion=function(e){return new t(ug(this.url,Df.Parameters.VERSIONID,e.length===0?undefined:e),this.pipeline)};t.prototype.getAppendBlobClient=function(){return new cv(this.url,this.pipeline)};t.prototype.getBlockBlobClient=function(){return new pv(this.url,this.pipeline)};t.prototype.getPageBlobClient=function(){return new dv(this.url,this.pipeline)};t.prototype.download=function(e,t,r){if(e===void 0){e=0}if(r===void 0){r={}}return __awaiter(this,void 0,void 0,(function(){var n,a,i,o,s,l,c;var p=this;return __generator(this,(function(d){switch(d.label){case 0:r.conditions=r.conditions||{};r.conditions=r.conditions||{};zy(r.customerProvidedKey,this.isHttps);a=ty("BlobClient-download",r),i=a.span,o=a.updatedOptions;d.label=1;case 1:d.trys.push([1,3,4,5]);return[4,this.blobContext.download(Object.assign({abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:(n=r.conditions)===null||n===void 0?void 0:n.tagConditions}),requestOptions:{onDownloadProgress:Qt?undefined:r.onProgress},range:e===0&&!t?undefined:Ty({offset:e,count:t}),rangeGetContentMD5:r.rangeGetContentMD5,rangeGetContentCRC64:r.rangeGetContentCrc64,snapshot:r.snapshot,cpkInfo:r.customerProvidedKey},ry(o)))];case 2:s=d.sent();l=Object.assign(Object.assign({},s),{_response:s._response,objectReplicationDestinationPolicyId:s.objectReplicationPolicyId,objectReplicationSourceProperties:Eg(s.objectReplicationRules)});if(!Qt){return[2,l]}if(r.maxRetryRequests===undefined||r.maxRetryRequests<0){r.maxRetryRequests=Hf}if(s.contentLength===undefined){throw new RangeError("File download response doesn't contain valid content length header")}if(!s.etag){throw new RangeError("File download response doesn't contain valid etag header")}return[2,new yy(l,(function(t){return __awaiter(p,void 0,void 0,(function(){var n,a;return __generator(this,(function(i){switch(i.label){case 0:a={leaseAccessConditions:r.conditions,modifiedAccessConditions:{ifMatch:r.conditions.ifMatch||s.etag,ifModifiedSince:r.conditions.ifModifiedSince,ifNoneMatch:r.conditions.ifNoneMatch,ifUnmodifiedSince:r.conditions.ifUnmodifiedSince,ifTags:(n=r.conditions)===null||n===void 0?void 0:n.tagConditions},range:Ty({count:e+s.contentLength-t,offset:t}),rangeGetContentMD5:r.rangeGetContentMD5,rangeGetContentCRC64:r.rangeGetContentCrc64,snapshot:r.snapshot,cpkInfo:r.customerProvidedKey};return[4,this.blobContext.download(Object.assign({abortSignal:r.abortSignal},a))];case 1:return[2,i.sent().readableStreamBody]}}))}))}),e,s.contentLength,{maxRetryRequests:r.maxRetryRequests,onProgress:r.onProgress})];case 3:c=d.sent();i.setStatus({code:as.ERROR,message:c.message});throw c;case 4:i.end();return[7];case 5:return[2]}}))}))};t.prototype.exists=function(e){if(e===void 0){e={}}return __awaiter(this,void 0,void 0,(function(){var t,r,n,a;return __generator(this,(function(i){switch(i.label){case 0:t=ty("BlobClient-exists",e),r=t.span,n=t.updatedOptions;i.label=1;case 1:i.trys.push([1,3,4,5]);zy(e.customerProvidedKey,this.isHttps);return[4,this.getProperties({abortSignal:e.abortSignal,customerProvidedKey:e.customerProvidedKey,conditions:e.conditions,tracingOptions:n.tracingOptions})];case 2:i.sent();return[2,true];case 3:a=i.sent();if(a.statusCode===404){r.setStatus({code:as.ERROR,message:"Expected exception when checking blob existence"});return[2,false]}r.setStatus({code:as.ERROR,message:a.message});throw a;case 4:r.end();return[7];case 5:return[2]}}))}))};t.prototype.getProperties=function(e){if(e===void 0){e={}}return __awaiter(this,void 0,void 0,(function(){var t,r,n,a,i,o;return __generator(this,(function(s){switch(s.label){case 0:r=ty("BlobClient-getProperties",e),n=r.span,a=r.updatedOptions;s.label=1;case 1:s.trys.push([1,3,4,5]);e.conditions=e.conditions||{};zy(e.customerProvidedKey,this.isHttps);return[4,this.blobContext.getProperties(Object.assign({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(t=e.conditions)===null||t===void 0?void 0:t.tagConditions}),cpkInfo:e.customerProvidedKey},ry(a)))];case 2:i=s.sent();return[2,Object.assign(Object.assign({},i),{_response:i._response,objectReplicationDestinationPolicyId:i.objectReplicationPolicyId,objectReplicationSourceProperties:Eg(i.objectReplicationRules)})];case 3:o=s.sent();n.setStatus({code:as.ERROR,message:o.message});throw o;case 4:n.end();return[7];case 5:return[2]}}))}))};t.prototype.delete=function(e){if(e===void 0){e={}}return __awaiter(this,void 0,void 0,(function(){var t,r,n,a,i;return __generator(this,(function(o){switch(o.label){case 0:r=ty("BlobClient-delete",e),n=r.span,a=r.updatedOptions;e.conditions=e.conditions||{};o.label=1;case 1:o.trys.push([1,3,4,5]);return[4,this.blobContext.delete(Object.assign({abortSignal:e.abortSignal,deleteSnapshots:e.deleteSnapshots,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(t=e.conditions)===null||t===void 0?void 0:t.tagConditions})},ry(a)))];case 2:return[2,o.sent()];case 3:i=o.sent();n.setStatus({code:as.ERROR,message:i.message});throw i;case 4:n.end();return[7];case 5:return[2]}}))}))};t.prototype.deleteIfExists=function(e){if(e===void 0){e={}}return __awaiter(this,void 0,void 0,(function(){var t,r,n,a,i,o,s;return __generator(this,(function(l){switch(l.label){case 0:n=ty("BlobClient-deleteIfExists",e),a=n.span,i=n.updatedOptions;l.label=1;case 1:l.trys.push([1,3,4,5]);return[4,this.delete(i)];case 2:o=l.sent();return[2,Object.assign(Object.assign({succeeded:true},o),{_response:o._response})];case 3:s=l.sent();if(((t=s.details)===null||t===void 0?void 0:t.errorCode)==="BlobNotFound"){a.setStatus({code:as.ERROR,message:"Expected exception when deleting a blob or snapshot only if it exists."});return[2,Object.assign(Object.assign({succeeded:false},(r=s.response)===null||r===void 0?void 0:r.parsedHeaders),{_response:s.response})]}a.setStatus({code:as.ERROR,message:s.message});throw s;case 4:a.end();return[7];case 5:return[2]}}))}))};t.prototype.undelete=function(e){if(e===void 0){e={}}return __awaiter(this,void 0,void 0,(function(){var t,r,n,a;return __generator(this,(function(i){switch(i.label){case 0:t=ty("BlobClient-undelete",e),r=t.span,n=t.updatedOptions;i.label=1;case 1:i.trys.push([1,3,4,5]);return[4,this.blobContext.undelete(Object.assign({abortSignal:e.abortSignal},ry(n)))];case 2:return[2,i.sent()];case 3:a=i.sent();r.setStatus({code:as.ERROR,message:a.message});throw a;case 4:r.end();return[7];case 5:return[2]}}))}))};t.prototype.setHTTPHeaders=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o;return __generator(this,(function(s){switch(s.label){case 0:n=ty("BlobClient-setHTTPHeaders",t),a=n.span,i=n.updatedOptions;t.conditions=t.conditions||{};s.label=1;case 1:s.trys.push([1,3,4,5]);zy(t.customerProvidedKey,this.isHttps);return[4,this.blobContext.setHttpHeaders(Object.assign({abortSignal:t.abortSignal,blobHttpHeaders:e,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions})},ry(i)))];case 2:return[2,s.sent()];case 3:o=s.sent();a.setStatus({code:as.ERROR,message:o.message});throw o;case 4:a.end();return[7];case 5:return[2]}}))}))};t.prototype.setMetadata=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o;return __generator(this,(function(s){switch(s.label){case 0:n=ty("BlobClient-setMetadata",t),a=n.span,i=n.updatedOptions;t.conditions=t.conditions||{};s.label=1;case 1:s.trys.push([1,3,4,5]);zy(t.customerProvidedKey,this.isHttps);return[4,this.blobContext.setMetadata(Object.assign({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,metadata:e,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions}),cpkInfo:t.customerProvidedKey,encryptionScope:t.encryptionScope},ry(i)))];case 2:return[2,s.sent()];case 3:o=s.sent();a.setStatus({code:as.ERROR,message:o.message});throw o;case 4:a.end();return[7];case 5:return[2]}}))}))};t.prototype.setTags=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o;return __generator(this,(function(s){switch(s.label){case 0:n=ty("BlobClient-setTags",t),a=n.span,i=n.updatedOptions;s.label=1;case 1:s.trys.push([1,3,4,5]);return[4,this.blobContext.setTags(Object.assign(Object.assign({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions})},ry(i)),{tags:Cg(e)}))];case 2:return[2,s.sent()];case 3:o=s.sent();a.setStatus({code:as.ERROR,message:o.message});throw o;case 4:a.end();return[7];case 5:return[2]}}))}))};t.prototype.getTags=function(e){if(e===void 0){e={}}return __awaiter(this,void 0,void 0,(function(){var t,r,n,a,i,o,s;return __generator(this,(function(l){switch(l.label){case 0:r=ty("BlobClient-getTags",e),n=r.span,a=r.updatedOptions;l.label=1;case 1:l.trys.push([1,3,4,5]);return[4,this.blobContext.getTags(Object.assign({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(t=e.conditions)===null||t===void 0?void 0:t.tagConditions})},ry(a)))];case 2:i=l.sent();o=Object.assign(Object.assign({},i),{_response:i._response,tags:Rg({blobTagSet:i.blobTagSet})||{}});return[2,o];case 3:s=l.sent();n.setStatus({code:as.ERROR,message:s.message});throw s;case 4:n.end();return[7];case 5:return[2]}}))}))};t.prototype.getBlobLeaseClient=function(e){return new gy(this,e)};t.prototype.createSnapshot=function(e){if(e===void 0){e={}}return __awaiter(this,void 0,void 0,(function(){var t,r,n,a,i;return __generator(this,(function(o){switch(o.label){case 0:r=ty("BlobClient-createSnapshot",e),n=r.span,a=r.updatedOptions;e.conditions=e.conditions||{};o.label=1;case 1:o.trys.push([1,3,4,5]);zy(e.customerProvidedKey,this.isHttps);return[4,this.blobContext.createSnapshot(Object.assign({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,metadata:e.metadata,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(t=e.conditions)===null||t===void 0?void 0:t.tagConditions}),cpkInfo:e.customerProvidedKey,encryptionScope:e.encryptionScope},ry(a)))];case 2:return[2,o.sent()];case 3:i=o.sent();n.setStatus({code:as.ERROR,message:i.message});throw i;case 4:n.end();return[7];case 5:return[2]}}))}))};t.prototype.beginCopyFromURL=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n;var a=this;return __generator(this,(function(i){switch(i.label){case 0:r={abortCopyFromURL:function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return a.abortCopyFromURL.apply(a,e)},getProperties:function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return a.getProperties.apply(a,e)},startCopyFromURL:function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return a.startCopyFromURL.apply(a,e)}};n=new Ry({blobClient:r,copySource:e,intervalInMs:t.intervalInMs,onProgress:t.onProgress,resumeFrom:t.resumeFrom,startCopyFromURLOptions:t});return[4,n.poll()];case 1:i.sent();return[2,n]}}))}))};t.prototype.abortCopyFromURL=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i;return __generator(this,(function(o){switch(o.label){case 0:r=ty("BlobClient-abortCopyFromURL",t),n=r.span,a=r.updatedOptions;o.label=1;case 1:o.trys.push([1,3,4,5]);return[4,this.blobContext.abortCopyFromURL(e,Object.assign({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions},ry(a)))];case 2:return[2,o.sent()];case 3:i=o.sent();n.setStatus({code:as.ERROR,message:i.message});throw i;case 4:n.end();return[7];case 5:return[2]}}))}))};t.prototype.syncCopyFromURL=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o,s,l;return __generator(this,(function(c){switch(c.label){case 0:i=ty("BlobClient-syncCopyFromURL",t),o=i.span,s=i.updatedOptions;t.conditions=t.conditions||{};t.sourceConditions=t.sourceConditions||{};c.label=1;case 1:c.trys.push([1,3,4,5]);return[4,this.blobContext.copyFromURL(e,Object.assign({abortSignal:t.abortSignal,metadata:t.metadata,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:t.sourceConditions.ifMatch,sourceIfModifiedSince:t.sourceConditions.ifModifiedSince,sourceIfNoneMatch:t.sourceConditions.ifNoneMatch,sourceIfUnmodifiedSince:t.sourceConditions.ifUnmodifiedSince},sourceContentMD5:t.sourceContentMD5,copySourceAuthorization:Og(t.sourceAuthorization),blobTagsString:Pg(t.tags),immutabilityPolicyExpiry:(n=t.immutabilityPolicy)===null||n===void 0?void 0:n.expiriesOn,immutabilityPolicyMode:(a=t.immutabilityPolicy)===null||a===void 0?void 0:a.policyMode,legalHold:t.legalHold},ry(s)))];case 2:return[2,c.sent()];case 3:l=c.sent();o.setStatus({code:as.ERROR,message:l.message});throw l;case 4:o.end();return[7];case 5:return[2]}}))}))};t.prototype.setAccessTier=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o;return __generator(this,(function(s){switch(s.label){case 0:n=ty("BlobClient-setAccessTier",t),a=n.span,i=n.updatedOptions;s.label=1;case 1:s.trys.push([1,3,4,5]);return[4,this.blobContext.setTier(Ny(e),Object.assign({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions}),rehydratePriority:t.rehydratePriority},ry(i)))];case 2:return[2,s.sent()];case 3:o=s.sent();a.setStatus({code:as.ERROR,message:o.message});throw o;case 4:a.end();return[7];case 5:return[2]}}))}))};t.prototype.downloadToBuffer=function(e,t,r,n){if(n===void 0){n={}}return __awaiter(this,void 0,void 0,(function(){var a,i,o,s,l,c,p,d,u,m,f,h,g;var y=this;return __generator(this,(function(v){switch(v.label){case 0:i=0;o=0;s=n;if(e instanceof ph){a=e;i=t||0;o=typeof r==="number"?r:0}else{i=typeof e==="number"?e:0;o=typeof t==="number"?t:0;s=r||{}}l=ty("BlobClient-downloadToBuffer",s),c=l.span,p=l.updatedOptions;v.label=1;case 1:v.trys.push([1,5,6,7]);if(!s.blockSize){s.blockSize=0}if(s.blockSize<0){throw new RangeError("blockSize option must be >= 0")}if(s.blockSize===0){s.blockSize=If}if(i<0){throw new RangeError("offset option must be >= 0")}if(o&&o<=0){throw new RangeError("count option must be greater than 0")}if(!s.conditions){s.conditions={}}if(!!o)return[3,3];return[4,this.getProperties(Object.assign(Object.assign({},s),{tracingOptions:Object.assign(Object.assign({},s.tracingOptions),ry(p))}))];case 2:d=v.sent();o=d.contentLength-i;if(o<0){throw new RangeError("offset ".concat(i," shouldn't be larger than blob size ").concat(d.contentLength))}v.label=3;case 3:if(!a){try{a=ph.alloc(o)}catch(e){throw new Error("Unable to allocate the buffer of size: ".concat(o,'(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile".\t ').concat(e.message))}}if(a.length<o){throw new RangeError("The buffer's size should be equal to or larger than the request count of bytes: ".concat(o))}u=0;m=new rv(s.concurrency);f=function(e){m.addOperation((function(){return __awaiter(y,void 0,void 0,(function(){var t;return __generator(this,(function(r){switch(r.label){case 0:t=i+o;if(e+s.blockSize<t){t=e+s.blockSize}return[4,this.download(e,t-e,{abortSignal:s.abortSignal,conditions:s.conditions,maxRetryRequests:s.maxRetryRequestsPerBlock,customerProvidedKey:s.customerProvidedKey,tracingOptions:Object.assign(Object.assign({},s.tracingOptions),ry(p))})];case 1:r.sent();return[4,av()];case 2:r.sent();u+=t-e;if(s.onProgress){s.onProgress({loadedBytes:u})}return[2]}}))}))}))};for(h=i;h<i+o;h=h+s.blockSize){f(h)}return[4,m.do()];case 4:v.sent();return[2,a];case 5:g=v.sent();c.setStatus({code:as.ERROR,message:g.message});throw g;case 6:c.end();return[7];case 7:return[2]}}))}))};t.prototype.downloadToFile=function(e,t,r,n){if(t===void 0){t=0}if(n===void 0){n={}}return __awaiter(this,void 0,void 0,(function(){var e,a,i,o,s;return __generator(this,(function(l){switch(l.label){case 0:e=ty("BlobClient-downloadToFile",n),a=e.span,i=e.updatedOptions;l.label=1;case 1:l.trys.push([1,5,6,7]);return[4,this.download(t,r,Object.assign(Object.assign({},n),{tracingOptions:Object.assign(Object.assign({},n.tracingOptions),ry(i))}))];case 2:o=l.sent();if(!o.readableStreamBody)return[3,4];return[4,iv()];case 3:l.sent();l.label=4;case 4:o.blobDownloadStream=undefined;return[2,o];case 5:s=l.sent();a.setStatus({code:as.ERROR,message:s.message});throw s;case 6:a.end();return[7];case 7:return[2]}}))}))};t.prototype.getBlobAndContainerNamesFromUrl=function(){var e;var t;try{var r=Vr.parse(this.url);if(r.getHost().split(".")[1]==="blob"){var n=r.getPath().match("/([^/]*)(/(.*))?");e=n[1];t=n[3]}else if(wg(r)){var n=r.getPath().match("/([^/]*)/([^/]*)(/(.*))?");e=n[2];t=n[4]}else{var n=r.getPath().match("/([^/]*)(/(.*))?");e=n[1];t=n[3]}e=decodeURIComponent(e);t=decodeURIComponent(t);t=t.replace(/\\/g,"/");if(!e){throw new Error("Provided containerName is invalid.")}return{blobName:t,containerName:e}}catch(e){throw new Error("Unable to extract blobName and containerName with provided information.")}};t.prototype.startCopyFromURL=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o,s,l;return __generator(this,(function(c){switch(c.label){case 0:i=ty("BlobClient-startCopyFromURL",t),o=i.span,s=i.updatedOptions;t.conditions=t.conditions||{};t.sourceConditions=t.sourceConditions||{};c.label=1;case 1:c.trys.push([1,3,4,5]);return[4,this.blobContext.startCopyFromURL(e,Object.assign({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,metadata:t.metadata,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:t.sourceConditions.ifMatch,sourceIfModifiedSince:t.sourceConditions.ifModifiedSince,sourceIfNoneMatch:t.sourceConditions.ifNoneMatch,sourceIfUnmodifiedSince:t.sourceConditions.ifUnmodifiedSince,sourceIfTags:t.sourceConditions.tagConditions},immutabilityPolicyExpiry:(n=t.immutabilityPolicy)===null||n===void 0?void 0:n.expiriesOn,immutabilityPolicyMode:(a=t.immutabilityPolicy)===null||a===void 0?void 0:a.policyMode,legalHold:t.legalHold,rehydratePriority:t.rehydratePriority,tier:Ny(t.tier),blobTagsString:Pg(t.tags),sealBlob:t.sealBlob},ry(s)))];case 2:return[2,c.sent()];case 3:l=c.sent();o.setStatus({code:as.ERROR,message:l.message});throw l;case 4:o.end();return[7];case 5:return[2]}}))}))};t.prototype.generateSasUrl=function(e){var t=this;return new Promise((function(r){if(!(t.credential instanceof Yg)){throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential")}var n=cy(Object.assign({containerName:t._containerName,blobName:t._name,snapshotTime:t._snapshot,versionId:t._versionId},e),t.credential).toString();r(gg(t.url,n))}))};t.prototype.deleteImmutabilityPolicy=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,n,a;return __generator(this,(function(i){switch(i.label){case 0:t=ty("BlobClient-deleteImmutabilityPolicy",e),r=t.span,n=t.updatedOptions;i.label=1;case 1:i.trys.push([1,3,4,5]);return[4,this.blobContext.deleteImmutabilityPolicy(Object.assign({abortSignal:e===null||e===void 0?void 0:e.abortSignal},ry(n)))];case 2:return[2,i.sent()];case 3:a=i.sent();r.setStatus({code:as.ERROR,message:a.message});throw a;case 4:r.end();return[7];case 5:return[2]}}))}))};t.prototype.setImmutabilityPolicy=function(e,t){return __awaiter(this,void 0,void 0,(function(){var r,n,a,i;return __generator(this,(function(o){switch(o.label){case 0:r=ty("BlobClient-setImmutabilityPolicy",t),n=r.span,a=r.updatedOptions;o.label=1;case 1:o.trys.push([1,3,4,5]);return[4,this.blobContext.setImmutabilityPolicy(Object.assign({abortSignal:t===null||t===void 0?void 0:t.abortSignal,immutabilityPolicyExpiry:e.expiriesOn,immutabilityPolicyMode:e.policyMode,modifiedAccessConditions:t===null||t===void 0?void 0:t.modifiedAccessCondition},ry(a)))];case 2:return[2,o.sent()];case 3:i=o.sent();n.setStatus({code:as.ERROR,message:i.message});throw i;case 4:n.end();return[7];case 5:return[2]}}))}))};t.prototype.setLegalHold=function(e,t){return __awaiter(this,void 0,void 0,(function(){var r,n,a,i;return __generator(this,(function(o){switch(o.label){case 0:r=ty("BlobClient-setLegalHold",t),n=r.span,a=r.updatedOptions;o.label=1;case 1:o.trys.push([1,3,4,5]);return[4,this.blobContext.setLegalHold(e,Object.assign({abortSignal:t===null||t===void 0?void 0:t.abortSignal},ry(a)))];case 2:return[2,o.sent()];case 3:i=o.sent();n.setStatus({code:as.ERROR,message:i.message});throw i;case 4:n.end();return[7];case 5:return[2]}}))}))};return t}(ey);var cv=function(e){Mr(t,e);function t(t,r,n,a){var i=this;var o;var s;a=a||{};if(Wg(r)){s=t;o=r}else if(Qt&&r instanceof Yg||r instanceof Ug||Xa(r)){s=t;a=n;o=Qg(r,a)}else if(!r&&typeof r!=="string"){s=t;o=Qg(new Ug,a)}else if(r&&typeof r==="string"&&n&&typeof n==="string"){var l=r;var c=n;var p=cg(t);if(p.kind==="AccountConnString"){if(Qt){var d=new Yg(p.accountName,p.accountKey);s=dg(dg(p.url,encodeURIComponent(l)),encodeURIComponent(c));a.proxyOptions=hi();o=Qg(d,a)}else{throw new Error("Account connection string is only supported in Node.js environment")}}else if(p.kind==="SASConnString"){s=dg(dg(p.url,encodeURIComponent(l)),encodeURIComponent(c))+"?"+p.accountSas;o=Qg(new Ug,a)}else{throw new Error("Connection string must be either an Account connection string or a SAS connection string")}}else{throw new Error("Expecting non-empty strings for containerName and blobName parameters")}i=e.call(this,s,o)||this;i.appendBlobContext=new ff(i.storageClientContext);return i}t.prototype.withSnapshot=function(e){return new t(ug(this.url,Df.Parameters.SNAPSHOT,e.length===0?undefined:e),this.pipeline)};t.prototype.create=function(e){if(e===void 0){e={}}return __awaiter(this,void 0,void 0,(function(){var t,r,n,a,i,o,s;return __generator(this,(function(l){switch(l.label){case 0:a=ty("AppendBlobClient-create",e),i=a.span,o=a.updatedOptions;e.conditions=e.conditions||{};l.label=1;case 1:l.trys.push([1,3,4,5]);zy(e.customerProvidedKey,this.isHttps);return[4,this.appendBlobContext.create(0,Object.assign({abortSignal:e.abortSignal,blobHttpHeaders:e.blobHTTPHeaders,leaseAccessConditions:e.conditions,metadata:e.metadata,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(t=e.conditions)===null||t===void 0?void 0:t.tagConditions}),cpkInfo:e.customerProvidedKey,encryptionScope:e.encryptionScope,immutabilityPolicyExpiry:(r=e.immutabilityPolicy)===null||r===void 0?void 0:r.expiriesOn,immutabilityPolicyMode:(n=e.immutabilityPolicy)===null||n===void 0?void 0:n.policyMode,legalHold:e.legalHold,blobTagsString:Pg(e.tags)},ry(o)))];case 2:return[2,l.sent()];case 3:s=l.sent();i.setStatus({code:as.ERROR,message:s.message});throw s;case 4:i.end();return[7];case 5:return[2]}}))}))};t.prototype.createIfNotExists=function(e){if(e===void 0){e={}}return __awaiter(this,void 0,void 0,(function(){var t,r,n,a,i,o,s,l;return __generator(this,(function(c){switch(c.label){case 0:n=ty("AppendBlobClient-createIfNotExists",e),a=n.span,i=n.updatedOptions;o={ifNoneMatch:Ff};c.label=1;case 1:c.trys.push([1,3,4,5]);return[4,this.create(Object.assign(Object.assign({},i),{conditions:o}))];case 2:s=c.sent();return[2,Object.assign(Object.assign({succeeded:true},s),{_response:s._response})];case 3:l=c.sent();if(((t=l.details)===null||t===void 0?void 0:t.errorCode)==="BlobAlreadyExists"){a.setStatus({code:as.ERROR,message:"Expected exception when creating a blob only if it does not already exist."});return[2,Object.assign(Object.assign({succeeded:false},(r=l.response)===null||r===void 0?void 0:r.parsedHeaders),{_response:l.response})]}a.setStatus({code:as.ERROR,message:l.message});throw l;case 4:a.end();return[7];case 5:return[2]}}))}))};t.prototype.seal=function(e){if(e===void 0){e={}}return __awaiter(this,void 0,void 0,(function(){var t,r,n,a,i;return __generator(this,(function(o){switch(o.label){case 0:r=ty("AppendBlobClient-seal",e),n=r.span,a=r.updatedOptions;e.conditions=e.conditions||{};o.label=1;case 1:o.trys.push([1,3,4,5]);return[4,this.appendBlobContext.seal(Object.assign({abortSignal:e.abortSignal,appendPositionAccessConditions:e.conditions,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(t=e.conditions)===null||t===void 0?void 0:t.tagConditions})},ry(a)))];case 2:return[2,o.sent()];case 3:i=o.sent();n.setStatus({code:as.ERROR,message:i.message});throw i;case 4:n.end();return[7];case 5:return[2]}}))}))};t.prototype.appendBlock=function(e,t,r){if(r===void 0){r={}}return __awaiter(this,void 0,void 0,(function(){var n,a,i,o,s;return __generator(this,(function(l){switch(l.label){case 0:a=ty("AppendBlobClient-appendBlock",r),i=a.span,o=a.updatedOptions;r.conditions=r.conditions||{};l.label=1;case 1:l.trys.push([1,3,4,5]);zy(r.customerProvidedKey,this.isHttps);return[4,this.appendBlobContext.appendBlock(t,e,Object.assign({abortSignal:r.abortSignal,appendPositionAccessConditions:r.conditions,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:(n=r.conditions)===null||n===void 0?void 0:n.tagConditions}),requestOptions:{onUploadProgress:r.onProgress},transactionalContentMD5:r.transactionalContentMD5,transactionalContentCrc64:r.transactionalContentCrc64,cpkInfo:r.customerProvidedKey,encryptionScope:r.encryptionScope},ry(o)))];case 2:return[2,l.sent()];case 3:s=l.sent();i.setStatus({code:as.ERROR,message:s.message});throw s;case 4:i.end();return[7];case 5:return[2]}}))}))};t.prototype.appendBlockFromURL=function(e,t,r,n){if(n===void 0){n={}}return __awaiter(this,void 0,void 0,(function(){var a,i,o,s,l;return __generator(this,(function(c){switch(c.label){case 0:i=ty("AppendBlobClient-appendBlockFromURL",n),o=i.span,s=i.updatedOptions;n.conditions=n.conditions||{};n.sourceConditions=n.sourceConditions||{};c.label=1;case 1:c.trys.push([1,3,4,5]);zy(n.customerProvidedKey,this.isHttps);return[4,this.appendBlobContext.appendBlockFromUrl(e,0,Object.assign({abortSignal:n.abortSignal,sourceRange:Ty({offset:t,count:r}),sourceContentMD5:n.sourceContentMD5,sourceContentCrc64:n.sourceContentCrc64,leaseAccessConditions:n.conditions,appendPositionAccessConditions:n.conditions,modifiedAccessConditions:Object.assign(Object.assign({},n.conditions),{ifTags:(a=n.conditions)===null||a===void 0?void 0:a.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:n.sourceConditions.ifMatch,sourceIfModifiedSince:n.sourceConditions.ifModifiedSince,sourceIfNoneMatch:n.sourceConditions.ifNoneMatch,sourceIfUnmodifiedSince:n.sourceConditions.ifUnmodifiedSince},copySourceAuthorization:Og(n.sourceAuthorization),cpkInfo:n.customerProvidedKey,encryptionScope:n.encryptionScope},ry(s)))];case 2:return[2,c.sent()];case 3:l=c.sent();o.setStatus({code:as.ERROR,message:l.message});throw l;case 4:o.end();return[7];case 5:return[2]}}))}))};return t}(lv);var pv=function(e){Mr(t,e);function t(t,r,n,a){var i=this;var o;var s;a=a||{};if(Wg(r)){s=t;o=r}else if(Qt&&r instanceof Yg||r instanceof Ug||Xa(r)){s=t;a=n;o=Qg(r,a)}else if(!r&&typeof r!=="string"){s=t;o=Qg(new Ug,a)}else if(r&&typeof r==="string"&&n&&typeof n==="string"){var l=r;var c=n;var p=cg(t);if(p.kind==="AccountConnString"){if(Qt){var d=new Yg(p.accountName,p.accountKey);s=dg(dg(p.url,encodeURIComponent(l)),encodeURIComponent(c));a.proxyOptions=hi();o=Qg(d,a)}else{throw new Error("Account connection string is only supported in Node.js environment")}}else if(p.kind==="SASConnString"){s=dg(dg(p.url,encodeURIComponent(l)),encodeURIComponent(c))+"?"+p.accountSas;o=Qg(new Ug,a)}else{throw new Error("Connection string must be either an Account connection string or a SAS connection string")}}else{throw new Error("Expecting non-empty strings for containerName and blobName parameters")}i=e.call(this,s,o)||this;i.blockBlobContext=new Nf(i.storageClientContext);i._blobContext=new Em(i.storageClientContext);return i}t.prototype.withSnapshot=function(e){return new t(ug(this.url,Df.Parameters.SNAPSHOT,e.length===0?undefined:e),this.pipeline)};t.prototype.query=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o,s;return __generator(this,(function(l){switch(l.label){case 0:zy(t.customerProvidedKey,this.isHttps);n=ty("BlockBlobClient-query",t),a=n.span,i=n.updatedOptions;l.label=1;case 1:l.trys.push([1,3,4,5]);if(!Qt){throw new Error("This operation currently is only supported in Node.js.")}return[4,this._blobContext.query(Object.assign({abortSignal:t.abortSignal,queryRequest:{queryType:"SQL",expression:e,inputSerialization:_g(t.inputTextConfiguration),outputSerialization:_g(t.outputTextConfiguration)},leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions})},ry(i)))];case 2:o=l.sent();return[2,new vy(o,{abortSignal:t.abortSignal,onProgress:t.onProgress,onError:t.onError})];case 3:s=l.sent();a.setStatus({code:as.ERROR,message:s.message});throw s;case 4:a.end();return[7];case 5:return[2]}}))}))};t.prototype.upload=function(e,t,r){if(r===void 0){r={}}return __awaiter(this,void 0,void 0,(function(){var n,a,i,o,s,l,c;return __generator(this,(function(p){switch(p.label){case 0:r.conditions=r.conditions||{};o=ty("BlockBlobClient-upload",r),s=o.span,l=o.updatedOptions;p.label=1;case 1:p.trys.push([1,3,4,5]);zy(r.customerProvidedKey,this.isHttps);return[4,this.blockBlobContext.upload(t,e,Object.assign({abortSignal:r.abortSignal,blobHttpHeaders:r.blobHTTPHeaders,leaseAccessConditions:r.conditions,metadata:r.metadata,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:(n=r.conditions)===null||n===void 0?void 0:n.tagConditions}),requestOptions:{onUploadProgress:r.onProgress},cpkInfo:r.customerProvidedKey,encryptionScope:r.encryptionScope,immutabilityPolicyExpiry:(a=r.immutabilityPolicy)===null||a===void 0?void 0:a.expiriesOn,immutabilityPolicyMode:(i=r.immutabilityPolicy)===null||i===void 0?void 0:i.policyMode,legalHold:r.legalHold,tier:Ny(r.tier),blobTagsString:Pg(r.tags)},ry(l)))];case 2:return[2,p.sent()];case 3:c=p.sent();s.setStatus({code:as.ERROR,message:c.message});throw c;case 4:s.end();return[7];case 5:return[2]}}))}))};t.prototype.syncUploadFromURL=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o,s,l,c,p;return __generator(this,(function(d){switch(d.label){case 0:t.conditions=t.conditions||{};s=ty("BlockBlobClient-syncUploadFromURL",t),l=s.span,c=s.updatedOptions;d.label=1;case 1:d.trys.push([1,3,4,5]);zy(t.customerProvidedKey,this.isHttps);return[4,this.blockBlobContext.putBlobFromUrl(0,e,Object.assign(Object.assign(Object.assign({},t),{blobHttpHeaders:t.blobHTTPHeaders,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:t.conditions.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:(r=t.sourceConditions)===null||r===void 0?void 0:r.ifMatch,sourceIfModifiedSince:(n=t.sourceConditions)===null||n===void 0?void 0:n.ifModifiedSince,sourceIfNoneMatch:(a=t.sourceConditions)===null||a===void 0?void 0:a.ifNoneMatch,sourceIfUnmodifiedSince:(i=t.sourceConditions)===null||i===void 0?void 0:i.ifUnmodifiedSince,sourceIfTags:(o=t.sourceConditions)===null||o===void 0?void 0:o.tagConditions},cpkInfo:t.customerProvidedKey,copySourceAuthorization:Og(t.sourceAuthorization),tier:Ny(t.tier),blobTagsString:Pg(t.tags)}),ry(c)))];case 2:return[2,d.sent()];case 3:p=d.sent();l.setStatus({code:as.ERROR,message:p.message});throw p;case 4:l.end();return[7];case 5:return[2]}}))}))};t.prototype.stageBlock=function(e,t,r,n){if(n===void 0){n={}}return __awaiter(this,void 0,void 0,(function(){var a,i,o,s;return __generator(this,(function(l){switch(l.label){case 0:a=ty("BlockBlobClient-stageBlock",n),i=a.span,o=a.updatedOptions;l.label=1;case 1:l.trys.push([1,3,4,5]);zy(n.customerProvidedKey,this.isHttps);return[4,this.blockBlobContext.stageBlock(e,r,t,Object.assign({abortSignal:n.abortSignal,leaseAccessConditions:n.conditions,requestOptions:{onUploadProgress:n.onProgress},transactionalContentMD5:n.transactionalContentMD5,transactionalContentCrc64:n.transactionalContentCrc64,cpkInfo:n.customerProvidedKey,encryptionScope:n.encryptionScope},ry(o)))];case 2:return[2,l.sent()];case 3:s=l.sent();i.setStatus({code:as.ERROR,message:s.message});throw s;case 4:i.end();return[7];case 5:return[2]}}))}))};t.prototype.stageBlockFromURL=function(e,t,r,n,a){if(r===void 0){r=0}if(a===void 0){a={}}return __awaiter(this,void 0,void 0,(function(){var i,o,s,l;return __generator(this,(function(c){switch(c.label){case 0:i=ty("BlockBlobClient-stageBlockFromURL",a),o=i.span,s=i.updatedOptions;c.label=1;case 1:c.trys.push([1,3,4,5]);zy(a.customerProvidedKey,this.isHttps);return[4,this.blockBlobContext.stageBlockFromURL(e,0,t,Object.assign({abortSignal:a.abortSignal,leaseAccessConditions:a.conditions,sourceContentMD5:a.sourceContentMD5,sourceContentCrc64:a.sourceContentCrc64,sourceRange:r===0&&!n?undefined:Ty({offset:r,count:n}),cpkInfo:a.customerProvidedKey,encryptionScope:a.encryptionScope,copySourceAuthorization:Og(a.sourceAuthorization)},ry(s)))];case 2:return[2,c.sent()];case 3:l=c.sent();o.setStatus({code:as.ERROR,message:l.message});throw l;case 4:o.end();return[7];case 5:return[2]}}))}))};t.prototype.commitBlockList=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o,s,l;return __generator(this,(function(c){switch(c.label){case 0:t.conditions=t.conditions||{};i=ty("BlockBlobClient-commitBlockList",t),o=i.span,s=i.updatedOptions;c.label=1;case 1:c.trys.push([1,3,4,5]);zy(t.customerProvidedKey,this.isHttps);return[4,this.blockBlobContext.commitBlockList({latest:e},Object.assign({abortSignal:t.abortSignal,blobHttpHeaders:t.blobHTTPHeaders,leaseAccessConditions:t.conditions,metadata:t.metadata,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions}),cpkInfo:t.customerProvidedKey,encryptionScope:t.encryptionScope,immutabilityPolicyExpiry:(n=t.immutabilityPolicy)===null||n===void 0?void 0:n.expiriesOn,immutabilityPolicyMode:(a=t.immutabilityPolicy)===null||a===void 0?void 0:a.policyMode,legalHold:t.legalHold,tier:Ny(t.tier),blobTagsString:Pg(t.tags)},ry(s)))];case 2:return[2,c.sent()];case 3:l=c.sent();o.setStatus({code:as.ERROR,message:l.message});throw l;case 4:o.end();return[7];case 5:return[2]}}))}))};t.prototype.getBlockList=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o,s;return __generator(this,(function(l){switch(l.label){case 0:n=ty("BlockBlobClient-getBlockList",t),a=n.span,i=n.updatedOptions;l.label=1;case 1:l.trys.push([1,3,4,5]);return[4,this.blockBlobContext.getBlockList(e,Object.assign({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions})},ry(i)))];case 2:o=l.sent();if(!o.committedBlocks){o.committedBlocks=[]}if(!o.uncommittedBlocks){o.uncommittedBlocks=[]}return[2,o];case 3:s=l.sent();a.setStatus({code:as.ERROR,message:s.message});throw s;case 4:a.end();return[7];case 5:return[2]}}))}))};t.prototype.uploadData=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o;return __generator(this,(function(s){r=ty("BlockBlobClient-uploadData",t),n=r.span,a=r.updatedOptions;try{if(Qt){if(e instanceof ph){i=e}else if(e instanceof ArrayBuffer){i=ph.from(e)}else{e=e;i=ph.from(e.buffer,e.byteOffset,e.byteLength)}return[2,this.uploadSeekableInternal((function(e,t){return i.slice(e,e+t)}),i.byteLength,a)]}else{o=new Blob([e]);return[2,this.uploadSeekableInternal((function(e,t){return o.slice(e,e+t)}),o.size,a)]}}catch(e){n.setStatus({code:as.ERROR,message:e.message});throw e}finally{n.end()}return[2]}))}))};t.prototype.uploadBrowserData=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o;return __generator(this,(function(s){switch(s.label){case 0:r=ty("BlockBlobClient-uploadBrowserData",t),n=r.span,a=r.updatedOptions;s.label=1;case 1:s.trys.push([1,3,4,5]);i=new Blob([e]);return[4,this.uploadSeekableInternal((function(e,t){return i.slice(e,e+t)}),i.size,a)];case 2:return[2,s.sent()];case 3:o=s.sent();n.setStatus({code:as.ERROR,message:o.message});throw o;case 4:n.end();return[7];case 5:return[2]}}))}))};t.prototype.uploadSeekableInternal=function(e,t,r){if(r===void 0){r={}}return __awaiter(this,void 0,void 0,(function(){var n,a,i,o,s,l,c,p,d,u,m;var f=this;return __generator(this,(function(h){switch(h.label){case 0:if(!r.blockSize){r.blockSize=0}if(r.blockSize<0||r.blockSize>qf){throw new RangeError("blockSize option must be >= 0 and <= ".concat(qf))}if(r.maxSingleShotSize!==0&&!r.maxSingleShotSize){r.maxSingleShotSize=Bf}if(r.maxSingleShotSize<0||r.maxSingleShotSize>Bf){throw new RangeError("maxSingleShotSize option must be >= 0 and <= ".concat(Bf))}if(r.blockSize===0){if(t>qf*Mf){throw new RangeError("".concat(t," is too larger to upload to a block blob."))}if(t>r.maxSingleShotSize){r.blockSize=Math.ceil(t/Mf);if(r.blockSize<If){r.blockSize=If}}}if(!r.blobHTTPHeaders){r.blobHTTPHeaders={}}if(!r.conditions){r.conditions={}}n=ty("BlockBlobClient-uploadSeekableInternal",r),a=n.span,i=n.updatedOptions;h.label=1;case 1:h.trys.push([1,5,6,7]);if(!(t<=r.maxSingleShotSize))return[3,3];return[4,this.upload(e(0,t),t,i)];case 2:return[2,h.sent()];case 3:o=Math.floor((t-1)/r.blockSize)+1;if(o>Mf){throw new RangeError("The buffer's size is too big or the BlockSize is too small;"+"the number of blocks must be <= ".concat(Mf))}s=[];l=Jt();c=0;p=new rv(r.concurrency);d=function(n){p.addOperation((function(){return __awaiter(f,void 0,void 0,(function(){var a,p,d,u;return __generator(this,(function(m){switch(m.label){case 0:a=bg(l,n);p=r.blockSize*n;d=n===o-1?t:p+r.blockSize;u=d-p;s.push(a);return[4,this.stageBlock(a,e(p,u),u,{abortSignal:r.abortSignal,conditions:r.conditions,encryptionScope:r.encryptionScope,tracingOptions:i.tracingOptions})];case 1:m.sent();c+=u;if(r.onProgress){r.onProgress({loadedBytes:c})}return[2]}}))}))}))};for(u=0;u<o;u++){d(u)}return[4,p.do()];case 4:h.sent();return[2,this.commitBlockList(s,i)];case 5:m=h.sent();a.setStatus({code:as.ERROR,message:m.message});throw m;case 6:a.end();return[7];case 7:return[2]}}))}))};t.prototype.uploadFile=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var e,r,n,a,i;return __generator(this,(function(o){switch(o.label){case 0:e=ty("BlockBlobClient-uploadFile",t),r=e.span,n=e.updatedOptions;o.label=1;case 1:o.trys.push([1,4,5,6]);return[4,ov()];case 2:a=o.sent().size;return[4,this.uploadSeekableInternal((function(e,t){return function(){return sv()}}),a,Object.assign(Object.assign({},t),{tracingOptions:Object.assign(Object.assign({},t.tracingOptions),ry(n))}))];case 3:return[2,o.sent()];case 4:i=o.sent();r.setStatus({code:as.ERROR,message:i.message});throw i;case 5:r.end();return[7];case 6:return[2]}}))}))};t.prototype.uploadStream=function(e,t,r,n){if(t===void 0){t=Af}if(r===void 0){r=5}if(n===void 0){n={}}return __awaiter(this,void 0,void 0,(function(){var a,i,o,s,l,c,p,d,u;var m=this;return __generator(this,(function(f){switch(f.label){case 0:if(!n.blobHTTPHeaders){n.blobHTTPHeaders={}}if(!n.conditions){n.conditions={}}a=ty("BlockBlobClient-uploadStream",n),i=a.span,o=a.updatedOptions;f.label=1;case 1:f.trys.push([1,4,5,6]);s=0;l=Jt();c=0;p=[];d=new nv(e,t,r,(function(e,t){return __awaiter(m,void 0,void 0,(function(){var r;return __generator(this,(function(a){switch(a.label){case 0:r=bg(l,s);p.push(r);s++;return[4,this.stageBlock(r,e,t,{conditions:n.conditions,encryptionScope:n.encryptionScope,tracingOptions:o.tracingOptions})];case 1:a.sent();c+=t;if(n.onProgress){n.onProgress({loadedBytes:c})}return[2]}}))}))}),Math.ceil(r/4*3));return[4,d.do()];case 2:f.sent();return[4,this.commitBlockList(p,Object.assign(Object.assign({},n),{tracingOptions:Object.assign(Object.assign({},n.tracingOptions),ry(o))}))];case 3:return[2,f.sent()];case 4:u=f.sent();i.setStatus({code:as.ERROR,message:u.message});throw u;case 5:i.end();return[7];case 6:return[2]}}))}))};return t}(lv);var dv=function(e){Mr(t,e);function t(t,r,n,a){var i=this;var o;var s;a=a||{};if(Wg(r)){s=t;o=r}else if(Qt&&r instanceof Yg||r instanceof Ug||Xa(r)){s=t;a=n;o=Qg(r,a)}else if(!r&&typeof r!=="string"){s=t;o=Qg(new Ug,a)}else if(r&&typeof r==="string"&&n&&typeof n==="string"){var l=r;var c=n;var p=cg(t);if(p.kind==="AccountConnString"){if(Qt){var d=new Yg(p.accountName,p.accountKey);s=dg(dg(p.url,encodeURIComponent(l)),encodeURIComponent(c));a.proxyOptions=hi();o=Qg(d,a)}else{throw new Error("Account connection string is only supported in Node.js environment")}}else if(p.kind==="SASConnString"){s=dg(dg(p.url,encodeURIComponent(l)),encodeURIComponent(c))+"?"+p.accountSas;o=Qg(new Ug,a)}else{throw new Error("Connection string must be either an Account connection string or a SAS connection string")}}else{throw new Error("Expecting non-empty strings for containerName and blobName parameters")}i=e.call(this,s,o)||this;i.pageBlobContext=new tf(i.storageClientContext);return i}t.prototype.withSnapshot=function(e){return new t(ug(this.url,Df.Parameters.SNAPSHOT,e.length===0?undefined:e),this.pipeline)};t.prototype.create=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o,s,l;return __generator(this,(function(c){switch(c.label){case 0:t.conditions=t.conditions||{};i=ty("PageBlobClient-create",t),o=i.span,s=i.updatedOptions;c.label=1;case 1:c.trys.push([1,3,4,5]);zy(t.customerProvidedKey,this.isHttps);return[4,this.pageBlobContext.create(0,e,Object.assign({abortSignal:t.abortSignal,blobHttpHeaders:t.blobHTTPHeaders,blobSequenceNumber:t.blobSequenceNumber,leaseAccessConditions:t.conditions,metadata:t.metadata,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions}),cpkInfo:t.customerProvidedKey,encryptionScope:t.encryptionScope,immutabilityPolicyExpiry:(n=t.immutabilityPolicy)===null||n===void 0?void 0:n.expiriesOn,immutabilityPolicyMode:(a=t.immutabilityPolicy)===null||a===void 0?void 0:a.policyMode,legalHold:t.legalHold,tier:Ny(t.tier),blobTagsString:Pg(t.tags)},ry(s)))];case 2:return[2,c.sent()];case 3:l=c.sent();o.setStatus({code:as.ERROR,message:l.message});throw l;case 4:o.end();return[7];case 5:return[2]}}))}))};t.prototype.createIfNotExists=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o,s,l,c;return __generator(this,(function(p){switch(p.label){case 0:a=ty("PageBlobClient-createIfNotExists",t),i=a.span,o=a.updatedOptions;p.label=1;case 1:p.trys.push([1,3,4,5]);s={ifNoneMatch:Ff};return[4,this.create(e,Object.assign(Object.assign({},t),{conditions:s,tracingOptions:o.tracingOptions}))];case 2:l=p.sent();return[2,Object.assign(Object.assign({succeeded:true},l),{_response:l._response})];case 3:c=p.sent();if(((r=c.details)===null||r===void 0?void 0:r.errorCode)==="BlobAlreadyExists"){i.setStatus({code:as.ERROR,message:"Expected exception when creating a blob only if it does not already exist."});return[2,Object.assign(Object.assign({succeeded:false},(n=c.response)===null||n===void 0?void 0:n.parsedHeaders),{_response:c.response})]}i.setStatus({code:as.ERROR,message:c.message});throw c;case 4:i.end();return[7];case 5:return[2]}}))}))};t.prototype.uploadPages=function(e,t,r,n){if(n===void 0){n={}}return __awaiter(this,void 0,void 0,(function(){var a,i,o,s,l;return __generator(this,(function(c){switch(c.label){case 0:n.conditions=n.conditions||{};i=ty("PageBlobClient-uploadPages",n),o=i.span,s=i.updatedOptions;c.label=1;case 1:c.trys.push([1,3,4,5]);zy(n.customerProvidedKey,this.isHttps);return[4,this.pageBlobContext.uploadPages(r,e,Object.assign({abortSignal:n.abortSignal,leaseAccessConditions:n.conditions,modifiedAccessConditions:Object.assign(Object.assign({},n.conditions),{ifTags:(a=n.conditions)===null||a===void 0?void 0:a.tagConditions}),requestOptions:{onUploadProgress:n.onProgress},range:Ty({offset:t,count:r}),sequenceNumberAccessConditions:n.conditions,transactionalContentMD5:n.transactionalContentMD5,transactionalContentCrc64:n.transactionalContentCrc64,cpkInfo:n.customerProvidedKey,encryptionScope:n.encryptionScope},ry(s)))];case 2:return[2,c.sent()];case 3:l=c.sent();o.setStatus({code:as.ERROR,message:l.message});throw l;case 4:o.end();return[7];case 5:return[2]}}))}))};t.prototype.uploadPagesFromURL=function(e,t,r,n,a){if(a===void 0){a={}}return __awaiter(this,void 0,void 0,(function(){var i,o,s,l,c;return __generator(this,(function(p){switch(p.label){case 0:a.conditions=a.conditions||{};a.sourceConditions=a.sourceConditions||{};o=ty("PageBlobClient-uploadPagesFromURL",a),s=o.span,l=o.updatedOptions;p.label=1;case 1:p.trys.push([1,3,4,5]);zy(a.customerProvidedKey,this.isHttps);return[4,this.pageBlobContext.uploadPagesFromURL(e,Ty({offset:t,count:n}),0,Ty({offset:r,count:n}),Object.assign({abortSignal:a.abortSignal,sourceContentMD5:a.sourceContentMD5,sourceContentCrc64:a.sourceContentCrc64,leaseAccessConditions:a.conditions,sequenceNumberAccessConditions:a.conditions,modifiedAccessConditions:Object.assign(Object.assign({},a.conditions),{ifTags:(i=a.conditions)===null||i===void 0?void 0:i.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:a.sourceConditions.ifMatch,sourceIfModifiedSince:a.sourceConditions.ifModifiedSince,sourceIfNoneMatch:a.sourceConditions.ifNoneMatch,sourceIfUnmodifiedSince:a.sourceConditions.ifUnmodifiedSince},cpkInfo:a.customerProvidedKey,encryptionScope:a.encryptionScope,copySourceAuthorization:Og(a.sourceAuthorization)},ry(l)))];case 2:return[2,p.sent()];case 3:c=p.sent();s.setStatus({code:as.ERROR,message:c.message});throw c;case 4:s.end();return[7];case 5:return[2]}}))}))};t.prototype.clearPages=function(e,t,r){if(e===void 0){e=0}if(r===void 0){r={}}return __awaiter(this,void 0,void 0,(function(){var n,a,i,o,s;return __generator(this,(function(l){switch(l.label){case 0:r.conditions=r.conditions||{};a=ty("PageBlobClient-clearPages",r),i=a.span,o=a.updatedOptions;l.label=1;case 1:l.trys.push([1,3,4,5]);return[4,this.pageBlobContext.clearPages(0,Object.assign({abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:(n=r.conditions)===null||n===void 0?void 0:n.tagConditions}),range:Ty({offset:e,count:t}),sequenceNumberAccessConditions:r.conditions,cpkInfo:r.customerProvidedKey,encryptionScope:r.encryptionScope},ry(o)))];case 2:return[2,l.sent()];case 3:s=l.sent();i.setStatus({code:as.ERROR,message:s.message});throw s;case 4:i.end();return[7];case 5:return[2]}}))}))};t.prototype.getPageRanges=function(e,t,r){if(e===void 0){e=0}if(r===void 0){r={}}return __awaiter(this,void 0,void 0,(function(){var n,a,i,o,s;return __generator(this,(function(l){switch(l.label){case 0:r.conditions=r.conditions||{};a=ty("PageBlobClient-getPageRanges",r),i=a.span,o=a.updatedOptions;l.label=1;case 1:l.trys.push([1,3,4,5]);return[4,this.pageBlobContext.getPageRanges(Object.assign({abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:(n=r.conditions)===null||n===void 0?void 0:n.tagConditions}),range:Ty({offset:e,count:t})},ry(o))).then(Sy)];case 2:return[2,l.sent()];case 3:s=l.sent();i.setStatus({code:as.ERROR,message:s.message});throw s;case 4:i.end();return[7];case 5:return[2]}}))}))};t.prototype.getPageRangesDiff=function(e,t,r,n){if(n===void 0){n={}}return __awaiter(this,void 0,void 0,(function(){var a,i,o,s,l;return __generator(this,(function(c){switch(c.label){case 0:n.conditions=n.conditions||{};i=ty("PageBlobClient-getPageRangesDiff",n),o=i.span,s=i.updatedOptions;c.label=1;case 1:c.trys.push([1,3,4,5]);return[4,this.pageBlobContext.getPageRangesDiff(Object.assign({abortSignal:n.abortSignal,leaseAccessConditions:n.conditions,modifiedAccessConditions:Object.assign(Object.assign({},n.conditions),{ifTags:(a=n.conditions)===null||a===void 0?void 0:a.tagConditions}),prevsnapshot:r,range:Ty({offset:e,count:t})},ry(s))).then(Sy)];case 2:return[2,c.sent()];case 3:l=c.sent();o.setStatus({code:as.ERROR,message:l.message});throw l;case 4:o.end();return[7];case 5:return[2]}}))}))};t.prototype.getPageRangesDiffForManagedDisks=function(e,t,r,n){if(n===void 0){n={}}return __awaiter(this,void 0,void 0,(function(){var a,i,o,s,l;return __generator(this,(function(c){switch(c.label){case 0:n.conditions=n.conditions||{};i=ty("PageBlobClient-GetPageRangesDiffForManagedDisks",n),o=i.span,s=i.updatedOptions;c.label=1;case 1:c.trys.push([1,3,4,5]);return[4,this.pageBlobContext.getPageRangesDiff(Object.assign({abortSignal:n.abortSignal,leaseAccessConditions:n.conditions,modifiedAccessConditions:Object.assign(Object.assign({},n.conditions),{ifTags:(a=n.conditions)===null||a===void 0?void 0:a.tagConditions}),prevSnapshotUrl:r,range:Ty({offset:e,count:t})},ry(s))).then(Sy)];case 2:return[2,c.sent()];case 3:l=c.sent();o.setStatus({code:as.ERROR,message:l.message});throw l;case 4:o.end();return[7];case 5:return[2]}}))}))};t.prototype.resize=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o;return __generator(this,(function(s){switch(s.label){case 0:t.conditions=t.conditions||{};n=ty("PageBlobClient-resize",t),a=n.span,i=n.updatedOptions;s.label=1;case 1:s.trys.push([1,3,4,5]);return[4,this.pageBlobContext.resize(e,Object.assign({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions}),encryptionScope:t.encryptionScope},ry(i)))];case 2:return[2,s.sent()];case 3:o=s.sent();a.setStatus({code:as.ERROR,message:o.message});throw o;case 4:a.end();return[7];case 5:return[2]}}))}))};t.prototype.updateSequenceNumber=function(e,t,r){if(r===void 0){r={}}return __awaiter(this,void 0,void 0,(function(){var n,a,i,o,s;return __generator(this,(function(l){switch(l.label){case 0:r.conditions=r.conditions||{};a=ty("PageBlobClient-updateSequenceNumber",r),i=a.span,o=a.updatedOptions;l.label=1;case 1:l.trys.push([1,3,4,5]);return[4,this.pageBlobContext.updateSequenceNumber(e,Object.assign({abortSignal:r.abortSignal,blobSequenceNumber:t,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:(n=r.conditions)===null||n===void 0?void 0:n.tagConditions})},ry(o)))];case 2:return[2,l.sent()];case 3:s=l.sent();i.setStatus({code:as.ERROR,message:s.message});throw s;case 4:i.end();return[7];case 5:return[2]}}))}))};t.prototype.startCopyIncremental=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o;return __generator(this,(function(s){switch(s.label){case 0:n=ty("PageBlobClient-startCopyIncremental",t),a=n.span,i=n.updatedOptions;s.label=1;case 1:s.trys.push([1,3,4,5]);return[4,this.pageBlobContext.copyIncremental(e,Object.assign({abortSignal:t.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions})},ry(i)))];case 2:return[2,s.sent()];case 3:o=s.sent();a.setStatus({code:as.ERROR,message:o.message});throw o;case 4:a.end();return[7];case 5:return[2]}}))}))};return t}(lv);var uv=function(){function e(e,t){var r=this;this.getPrintStatus=function(){return fetch("https://".concat(r.printingApi,"/sfapi/Status/?id=").concat(encodeURIComponent(mv.state.jobID)),{headers:{Authorization:"Bearer "+Ue.state.accessToken}}).then((function(e){return e.json()}))};this.redirectURI=e;this.clientID=t;this.printingApi=mv.state.printApiHostUrl;this.checkStoredRefreshToken()}e.prototype.checkStoredRefreshToken=function(){if(Ue.state.refreshToken!==""){return}if(localStorage.getItem("refreshToken")===null){Ue.state.refreshToken=""}else{Ue.state.refreshToken=localStorage.getItem("refreshToken")}};e.prototype.registerFetchInterceptor=function(){var e=this;Et.register({request:function(e,t){return[e,t]},requestError:function(e){return Promise.reject(e)},response:function(t){if(t.status===401){if(Ue.state.refreshToken===""){return t}var r=new je(e.redirectURI,e.clientID);r.refreshTokens()}return t},responseError:function(e){return Promise.reject(e)}})};e.prototype.getPrinterList=function(e){return fetch("https://".concat(this.printingApi,"/sfapi/GetPrinter/"),{method:"GET",headers:{Authorization:"Bearer "+e}}).then((function(e){return e.json()}))};e.prototype.getConfig=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,fetch("https://".concat(this.printingApi,"/sfapi/GetConfiguration/"),{method:"GET",headers:{Authorization:"Bearer "+e}})]}))}))};e.prototype.getPrinterProperties=function(e,t){return fetch("https://".concat(this.printingApi,"/sfapi/GetPrinterProperties/?id=").concat(t),{method:"GET",headers:{Authorization:"Bearer "+e}}).then((function(e){return e.json()}))};e.prototype.getAllPrinterProperties=function(e){return fetch("https://".concat(this.printingApi,"/sfapi/GetPrinterProperties/"),{method:"GET",headers:{Authorization:"Bearer "+e}}).then((function(e){return e.json()}))};e.prototype.printFileByUrl=function(e,t,r,n,a,i,o){return fetch("https://".concat(this.printingApi,"/sfapi/Print/"),{method:"POST",headers:{Authorization:"Bearer "+e,"Content-Type":"application/json"},body:JSON.stringify(Object.assign(Object.assign(Object.assign({fileurl:t,type:r,printerid:n},i&&{alias:i}),o&&{printanddelete:o}),{properties:a}))})};e.prototype.printByFileID=function(e,t,r,n,a,i,o){return fetch("https://".concat(this.printingApi,"/sfapi/Print/"),{method:"POST",headers:{Authorization:"Bearer "+e,"Content-Type":"application/json"},body:JSON.stringify(Object.assign(Object.assign(Object.assign({fileid:t,type:r,printerid:n},i&&{alias:i}),o&&{printanddelete:o}),{properties:a}))}).then((function(e){return e.json()}))};e.prototype.prepareFileUpload=function(e){return fetch("https://".concat(this.printingApi,"/sfapi/PrepareUpload/"),{method:"GET",headers:{Authorization:"Bearer "+e}}).then((function(e){return e.json()}))};e.prototype.uploadFile=function(e,t){return fetch("".concat(e),{method:"PUT",headers:{"x-ms-blob-type":"BlockBlob","Content-Type:":"multipart/form-data"},body:t}).then((function(e){return e.json()}))};e.prototype.uploadBlobFiles=function(e,t){return __awaiter(this,void 0,void 0,(function(){var r,n,a;return __generator(this,(function(i){switch(i.label){case 0:mv.state.uploadProgress=0;r=Qg(new Ug,{retryOptions:{maxTries:4},userAgentOptions:{userAgentPrefix:"AdvancedSample V1.0.0"},keepAliveOptions:{enable:false}});n=new pv(e,r);return[4,n.uploadData(t,{blockSize:4*1024*1024,concurrency:20,onProgress:function(e){var r=100*e.loadedBytes/t.size;mv.state.uploadProgress=r},blobHTTPHeaders:{blobContentType:"application/octet-stream"}})];case 1:a=i.sent();return[2,a]}}))}))};return e}();var mv=v({printers:[],jobID:"",printFinished:false,printApiHostUrl:"",printerProperties:{},fileID:"",fileUrl:"",fileType:"",printerID:"",fileName:"",uploadProgress:0,supportedFileExtensions:""});var fv=function(){function e(){}e.prototype.getUserInfo=function(){return fetch("https://".concat(Ue.state.authApiHostUrl,"/v1/users/me"),{headers:{Authorization:"Bearer "+Ue.state.accessToken,"Content-Type":"application/json"},method:"GET"}).then((function(e){return e.json()}))};return e}();var hv=v({user:null,theme:"",appearance:""});var gv=':host{-ms-flex-line-pack:var(--ezp-printerSelection-alignContent, center);align-content:var(--ezp-printerSelection-alignContent, center);background:var(--ezp-printerSelection-background, var(--ezp-core-backdrop));display:grid;grid-template:auto/var(--ezp-printerSelection-width, 320px);height:var(--ezp-printerSelection-height, 100vh);-ms-flex-pack:var(--ezp-printerSelection-justifyContent, center);justify-content:var(--ezp-printerSelection-justifyContent, center);left:0;position:var(--ezp-printerSelection-position, fixed);top:0;width:100%;z-index:1}:host(.seamless){--ezp-printerSelection-alignContent:stretch;--ezp-printerSelection-background:transparent;--ezp-printerSelection-body-background:transparent;--ezp-printerSelection-body-padding:0;--ezp-printerSelection-box-background:transparent;--ezp-printerSelection-box-borderRadius:0;--ezp-printerSelection-box-boxShadow:none;--ezp-printerSelection-footer-boxShadowPosition:0 0 0 0;--ezp-printerSelection-footer-padding:var(--ezp-spacing-2) 0;--ezp-printerSelection-header-boxShadowPosition:0 0 0 0;--ezp-printerSelection-header-padding:var(--ezp-spacing-4) 0;--ezp-printerSelection-justifyContent:stretch;--ezp-printerSelection-position:static}#box{background:var(--ezp-printerSelection-box-background, var(--ezp-core-surface-tertiary));border-radius:var(--ezp-printerSelection-box-borderRadius, 6px);-webkit-box-shadow:var(--ezp-printerSelection-box-boxShadow, 0 0 0 1px var(--ezp-black-10));box-shadow:var(--ezp-printerSelection-box-boxShadow, 0 0 0 1px var(--ezp-black-10));padding:var(--ezp-printerSelection-padding, 0);position:relative}#header{border-radius:6px 6px 0 0;-webkit-box-shadow:var(--ezp-printerSelection-header-boxShadowPosition, 0 1px 0 0) var(--ezp-core-outline);box-shadow:var(--ezp-printerSelection-header-boxShadowPosition, 0 1px 0 0) var(--ezp-core-outline);color:var(--ezp-core-foreground-primary);display:grid;grid-column-gap:var(--ezp-spacing-2);grid-template-columns:auto 1fr auto;padding:var(--ezp-printerSelection-header-padding, var(--ezp-spacing-4) var(--ezp-spacing-3) var(--ezp-spacing-4) var(--ezp-spacing-4));position:relative;z-index:3}#toggle-menu{margin:calc(var(--ezp-spacing-3) * -1) 0;position:relative;z-index:2}#body{background:var(--ezp-printerSelection-body-background, var(--ezp-core-surface-secondary));-webkit-box-shadow:var(--ezp-printerSelection-body-boxShadow, none);box-shadow:var(--ezp-printerSelection-body-boxShadow, none);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-2);padding:var(--ezp-printerSelection-body-padding, var(--ezp-spacing-2))}#footer{border-radius:0 0 6px 6px;-webkit-box-shadow:var(--ezp-printerSelection-footer-boxShadowPosition, 0 -1px 0 0) var(--ezp-core-outline);box-shadow:var(--ezp-printerSelection-footer-boxShadowPosition, 0 -1px 0 0) var(--ezp-core-outline);display:grid;gap:var(--ezp-spacing-2);grid-template-areas:var(--ezp-printerSelection-footer-areas, "cancel print");grid-template-columns:var(--ezp-printerSelection-footer-columns, repeat(2, 1fr));grid-template-rows:var(--ezp-printerSelection-footer-rows, auto);-ms-flex-pack:center;justify-content:center;justify-items:stretch;padding:var(--ezp-printerSelection-footer-padding, var(--ezp-spacing-2));position:relative;z-index:3}#cancel{grid-area:cancel}#print{grid-area:print}';var yv=e("ezp_printer_selection",function(){function e(e){var t=this;n(this,e);this.printCancel=a(this,"printCancel",7);this.printSubmit=a(this,"printSubmit",7);this.sasUri="";this.fileExtension="";this.duplexOptions=[{id:1,title:ze.t("printer_selection.duplex_none")},{id:2,title:ze.t("printer_selection.duplex_long")},{id:3,title:ze.t("printer_selection.duplex_short")}];this.hidemenu=false;this.hideheader=false;this.loading=true;this.printProcessing=false;this.uploading=false;this.preparingUpload=false;this.printSuccess=false;this.printFailed=false;this.notSupported=false;this.noPrinters=false;this.userMenuOpen=false;this.printStopped=false;this.selectedPrinterConfig={OrientationsSupported:[],PaperFormats:[],Resolutions:[],DuplexSupported:false,Color:false};this.selectedProperties={paper:"",paperid:"",color:false,duplex:true,duplexmode:1,orientation:1,copies:"",resolution:0};this.handleCancel=function(){t.printCancel.emit()};this.validateData=function(e){if(e.jobstatus===0){t.printSuccess=true;t.printProcessing=false;return true}return false};this.POLL_INTERVAL=2e3;this.MAX_POLL_ATTEMPTS=Infinity;this.handlePrint=function(){return __awaiter(t,void 0,void 0,(function(){var e;var t=this;return __generator(this,(function(r){switch(r.label){case 0:this.printButton.blur();this.printProcessing=true;e=De(this.selectedProperties);mv.state.fileUrl=this.fileurl;mv.state.fileID=this.fileid;mv.state.fileType=this.filetype;mv.state.printerID=this.selectedPrinter.id;mv.state.printerProperties=this.selectedProperties;mv.state.fileName=this.filename;if(this.fileurl){this.printService.printFileByUrl(Ue.state.accessToken,this.fileurl,this.filetype,this.selectedPrinter.id,e,this.filename).then((function(r){if(r.status===200&&t.selectedPrinter.is_queue){t.printProcessing=false;t.printSuccess=true}if(r.status===412){r.json().then((function(e){return t.fileid=e.fileid}));t.printService.printByFileID(Ue.state.accessToken,t.fileid,t.filetype,t.selectedPrinter.id,e,t.filename)}else{return r.json()}})).then((function(e){if(e.code===804){t.printFailed=true;t.printProcessing=false}if(e.jobid){mv.state.jobID=e.jobid;Le({fn:t.printService.getPrintStatus,validate:t.validateData,interval:t.POLL_INTERVAL,maxAttempts:t.MAX_POLL_ATTEMPTS}).catch((function(e){console.warn(e);t.printFailed=true;t.printProcessing=false}))}else{t.printFailed=true;t.printProcessing=false}})).catch((function(e){console.log(e);t.printFailed=true;t.printProcessing=false}))}if(!this.file)return[3,2];return[4,this.handleFiles(this.file,e)];case 1:r.sent();r.label=2;case 2:localStorage.setItem("properties",JSON.stringify(this.selectedProperties));localStorage.setItem("printer",JSON.stringify(this.selectedPrinter));this.printStopped=false;return[2]}}))}))};this.handleUserMenu=function(){t.userMenuOpen=true};this.validateFileType=function(e){return __awaiter(t,void 0,void 0,(function(){var t;return __generator(this,(function(r){t=e.split(".").pop();this.fileExtension=t.toLowerCase();return[2,mv.state.supportedFileExtensions.includes("".concat(this.fileExtension))]}))}))}}e.prototype.listenSelectSelection=function(e){this.setSelectedProperties(e.detail)};e.prototype.listenStepperChanged=function(e){this.selectedProperties.copies=e.detail};e.prototype.listenUserMenuClosure=function(){this.userMenuOpen=false};e.prototype.listenLogout=function(){this.printCancel.emit()};e.prototype.listenStatusCancel=function(e){if(e.detail==="print-processing"){this.printStopped=true;this.printProcessing=false}};e.prototype.listenStatusClose=function(e){switch(e.detail){case"print-success":this.printSuccess=false;this.printCancel.emit();break;case"print-failed":this.printProcessing=false;this.printFailed=false;break;case"no-printers":this.noPrinters=false;break}};e.prototype.listenStatusRetry=function(e){switch(e.detail){case"not-supported":this.printCancel.emit();break;case"print-failed":this.printFailed=false;this.printProcessing=false;this.handlePrint();break}};e.prototype.getPropertiesFromLocalStorage=function(){if(localStorage.getItem("properties")){this.selectedProperties=JSON.parse(localStorage.getItem("properties"))}if(localStorage.getItem("printer")){var e=JSON.parse(localStorage.getItem("printer"));if(this.printers.some((function(t){return t.id===e.id}))){this.selectedPrinter=e}else{this.selectedPrinter={id:"",location:"",name:"",is_queue:false};localStorage.removeItem("printer");localStorage.removeItem("properties")}}else{this.selectedPrinter={id:"",location:"",name:"",is_queue:false}}};e.prototype.getUserInfo=function(){var e=this;var t=new fv;return t.getUserInfo().then((function(t){hv.state.user=t;e.userName=hv.state.user.display_name}))};e.prototype.setSelectedProperties=function(e){return __awaiter(this,void 0,void 0,(function(){var t;var r=this;return __generator(this,(function(n){switch(n.label){case 0:t=e.type;switch(t){case"printer":return[3,1];case"color":return[3,3];case"orientation":return[3,4];case"format":return[3,5];case"quality":return[3,6];case"duplex":return[3,7]}return[3,8];case 1:this.selectedPrinter.id=e.id;this.selectedPrinter.name=e.title;this.selectedPrinter.is_queue=e.is_queue;return[4,this.printService.getPrinterProperties(Ue.state.accessToken,this.selectedPrinter.id).then((function(e){return r.selectedPrinterConfig=e[0]}))];case 2:n.sent();this.setDefaultPaperFormat();return[3,8];case 3:this.selectedProperties.color=!!e.id;return[3,8];case 4:this.selectedProperties.orientation=e.id;return[3,8];case 5:this.selectedProperties.paper=e.title;this.selectedProperties.paperid=e.id;return[3,8];case 6:this.selectedProperties.resolution=e.title;return[3,8];case 7:if(e.title==="None"){this.selectedProperties.duplex=false}else{this.selectedProperties.duplex=true}this.selectedProperties.duplexmode=e.id;return[3,8];case 8:return[2]}}))}))};e.prototype.handleFiles=function(e,t){return __awaiter(this,void 0,void 0,(function(){var r,n,a;var i=this;return __generator(this,(function(o){switch(o.label){case 0:this.preparingUpload=true;return[4,this.printService.prepareFileUpload(Ue.state.accessToken)];case 1:r=o.sent();this.preparingUpload=false;this.fileid=r.fileid;this.sasUri=r.sasUri;this.filetype=this.fileExtension;this.uploading=true;o.label=2;case 2:o.trys.push([2,4,,5]);return[4,this.printService.uploadBlobFiles(this.sasUri,e)];case 3:n=o.sent();return[3,5];case 4:a=o.sent();this.printProcessing=false;this.printFailed=true;return[3,5];case 5:this.uploading=false;if(n._response.status===201){this.printService.printByFileID(Ue.state.accessToken,this.fileid,this.filetype,this.selectedPrinter.id,t,this.filename).then((function(e){if(e.code===804){i.printFailed=true;i.printProcessing=false}if(e.jobid){mv.state.jobID=e.jobid;Le({fn:i.printService.getPrintStatus,validate:i.validateData,interval:i.POLL_INTERVAL,maxAttempts:i.MAX_POLL_ATTEMPTS}).catch((function(e){console.log(e);i.printFailed=true;i.printProcessing=false}))}else{i.printFailed=true;i.printProcessing=false}})).catch((function(e){console.log(e);i.printFailed=true;i.printProcessing=false}))}else{this.printFailed=true;this.printProcessing=false}return[2]}}))}))};e.prototype.setDefaultPaperFormat=function(){var e;var t=navigator.language;if(t==="en-US"){e="Letter"}else if(t==="my"){e="Letter"}else{e="A4"}if(this.selectedPrinterConfig.PaperFormats.find((function(t){return t.Name.includes(e)}))){this.selectedProperties.paper=this.selectedPrinterConfig.PaperFormats.find((function(t){return t.Name.includes(e)})).Name;this.selectedProperties.paperid=this.selectedPrinterConfig.PaperFormats.find((function(t){return t.Name.includes(e)})).Id}};e.prototype.connectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){switch(t.label){case 0:this.printService=new uv(this.redirectURI,this.clientID);this.printService.registerFetchInterceptor();return[4,this.getUserInfo()];case 1:t.sent();return[4,this.printService.getPrinterList(Ue.state.accessToken).then((function(t){e.printers=t;if(!(e.printers.length>0)){e.noPrinters=true}}))];case 2:t.sent();this.getPropertiesFromLocalStorage();if(!(this.selectedPrinter.id!=""))return[3,4];return[4,this.printService.getPrinterProperties(Ue.state.accessToken,this.selectedPrinter.id).then((function(t){return e.selectedPrinterConfig=t[0]}))];case 3:t.sent();if(this.selectedProperties.paper===""){this.setDefaultPaperFormat()}t.label=4;case 4:return[4,this.printService.getConfig(Ue.state.accessToken)];case 5:return[4,t.sent().json().then((function(e){mv.state.supportedFileExtensions=e.System.FILEEXT}))];case 6:t.sent();return[4,this.printService.getAllPrinterProperties(Ue.state.accessToken).then((function(t){e.printerConfig=t}))];case 7:t.sent();if(!this.file)return[3,9];return[4,this.validateFileType(this.filename).then((function(t){e.notSupported=!t?true:false}))];case 8:t.sent();t.label=9;case 9:this.loading=false;return[2]}}))}))};e.prototype.render=function(){var e=this;return this.loading?i("ezp-status",{processing:true,description:ze.t("printer_selection.loading"),instance:"loading"}):i(o,{class:{seamless:this.seamless}},i("div",{id:"box","data-backdrop-surface":true},!this.printStopped&&i(c,null,this.printProcessing?i("ezp-status",{processing:true,description:this.preparingUpload?ze.t("printer_selection.prepare_upload"):this.uploading?ze.t("printer_selection.uploading"):ze.t("printer_selection.print_processing"),instance:"print-processing",cancel:true}):this.selectedPrinter.is_queue&&this.printSuccess?i("ezp-status",{icon:"checkmark-alt",description:ze.t("printer_selection.pull_print_success"),instance:"print-success",close:true}):this.printSuccess?i("ezp-status",{icon:"checkmark-alt",description:ze.t("printer_selection.print_success"),instance:"print-success",close:true}):this.printFailed?i("ezp-status",{icon:"exclamation-mark",description:ze.t("printer_selection.print_failed"),instance:"print-failed",close:true,retry:true}):this.notSupported?i("ezp-status",{icon:"exclamation-mark",description:ze.t("printer_selection.not_supported"),instance:"not-supported",retry:true}):this.noPrinters?i("ezp-status",{icon:"exclamation-mark",description:ze.t("printer_selection.no_printers"),instance:"no-printers",close:true}):null),!this.hideheader&&i("div",{id:"header"},i("ezp-label",{weight:"heavy",text:ze.t("printer_selection.print")+"".concat(!this.notSupported?":":"")}),i("ezp-label",{text:!this.notSupported?this.filename:"",ellipsis:true}),!this.hidemenu&&i("ezp-icon-button",{level:"tertiary",icon:"menu",id:"toggle-menu",type:"button",onClick:this.handleUserMenu})),i("div",{id:"body"},i("div",{id:"printer"},i("ezp-select",{label:ze.t("printer_selection.printer"),icon:"printer",placeholder:this.printers.length>0?ze.t("printer_selection.select_printer"):ze.t("printer_selection.no_printers"),toggleFlow:"vertical",optionFlow:"vertical",options:this.printers.map((function(e){return{id:e.id,title:e.name,meta:e.location!==""?e.location:"",type:"printer",is_queue:e.is_queue}})),preSelected:this.selectedPrinter.id?this.selectedPrinter.name:null,disabled:!(this.printers.length>0)})),i("div",{id:"options"},i("ezp-select",{label:ze.t("printer_selection.color"),icon:"color",placeholder:ze.t("printer_selection.select_color"),toggleFlow:"horizontal",options:this.selectedPrinterConfig.Color?[{id:1,title:ze.t("printer_selection.color_color"),meta:"",type:"color"},{id:0,title:ze.t("printer_selection.color_grayscale"),meta:"",type:"color"}]:[{id:0,title:ze.t("printer_selection.color_grayscale"),meta:"",type:"color"}],preSelected:this.selectedPrinter.id?this.selectedProperties.color?ze.t("printer_selection.color_color"):ze.t("printer_selection.color_grayscale"):null,disabled:!this.selectedPrinterConfig.Color}),i("ezp-select",{label:ze.t("printer_selection.duplex"),icon:"duplex",placeholder:ze.t("printer_selection.select_duplex"),toggleFlow:"horizontal",options:this.duplexOptions.map((function(e){return{id:e.id,title:e.title,meta:"",type:"duplex"}})),preSelected:this.selectedPrinter.id&&this.selectedProperties.duplex?this.duplexOptions.find((function(t){return t.id===e.selectedProperties.duplexmode})).id:null,disabled:!this.selectedPrinterConfig.DuplexSupported}),i("ezp-select",{label:ze.t("printer_selection.size"),icon:"size",placeholder:ze.t("printer_selection.select_size"),toggleFlow:"horizontal",optionFlow:"horizontal",options:this.selectedPrinterConfig.PaperFormats.map((function(e){return{id:e.Id,title:e.Name,meta:"".concat(e.XRes," x ").concat(e.YRes),type:"format"}})),preSelected:this.selectedPrinter.id?this.selectedProperties.paper:null,disabled:!(this.selectedPrinterConfig.PaperFormats.length>0)}),i("ezp-select",{label:ze.t("printer_selection.orientation"),icon:"orientation",placeholder:ze.t("printer_selection.select_orientation"),toggleFlow:"horizontal",options:this.selectedPrinterConfig.OrientationsSupported.map((function(e,t){return{id:t+1,title:ze.t("printer_selection.orientation_".concat(e)),meta:"",type:"orientation"}})),preSelected:this.selectedPrinter.id?this.selectedProperties.orientation:null,disabled:!(this.selectedPrinterConfig.OrientationsSupported.length>0)}),i("ezp-select",{label:ze.t("printer_selection.quality"),icon:"quality",placeholder:ze.t("printer_selection.select_quality"),toggleFlow:"horizontal",options:this.selectedPrinterConfig.Resolutions.map((function(e,t){return{id:t,title:e,meta:"",type:"quality"}})),preSelected:this.selectedPrinter.id?this.selectedProperties.resolution:null,disabled:!(this.selectedPrinterConfig.Resolutions.length>0)})),i("ezp-stepper",{label:ze.t("printer_selection.copies"),max:10,icon:"copies"})),i("div",{id:"footer"},i("ezp-text-button",{type:"button",level:"secondary",onClick:this.handleCancel,label:ze.t("button_actions.cancel"),class:"action",id:"cancel"}),i("ezp-text-button",{disabled:this.selectedPrinter.id===""||this.printProcessing,type:"button",onClick:this.handlePrint,label:ze.t("button_actions.print"),ref:function(t){return e.printButton=t},class:"action",id:"print"})),!this.hidemenu&&i("ezp-user-menu",{open:this.userMenuOpen,name:this.userName})))};return e}());yv.style=gv;var vv="account.ezeep.com";var bv="printapi.ezeep.com";var xv={authApiHostUrl:vv,printingApiHostUrl:bv};var Nv=':host{--ezp-black-5:rgba(0, 0, 0, 0.05);--ezp-black-10:rgba(0, 0, 0, 0.1);--ezp-black-20:rgba(0, 0, 0, 0.2);--ezp-black-30:rgba(0, 0, 0, 0.3);--ezp-black-40:rgba(0, 0, 0, 0.4);--ezp-black-50:rgba(0, 0, 0, 0.5);--ezp-black-60:rgba(0, 0, 0, 0.6);--ezp-black-70:rgba(0, 0, 0, 0.7);--ezp-black-80:rgba(0, 0, 0, 0.8);--ezp-black-90:rgba(0, 0, 0, 0.9);--ezp-black-95:rgba(0, 0, 0, 0.95);--ezp-black-100:black}:host{--ezp-white-5:rgba(255, 255, 255, 0.05);--ezp-white-10:rgba(255, 255, 255, 0.1);--ezp-white-20:rgba(255, 255, 255, 0.2);--ezp-white-30:rgba(255, 255, 255, 0.3);--ezp-white-40:rgba(255, 255, 255, 0.4);--ezp-white-50:rgba(255, 255, 255, 0.5);--ezp-white-60:rgba(255, 255, 255, 0.6);--ezp-white-70:rgba(255, 255, 255, 0.7);--ezp-white-80:rgba(255, 255, 255, 0.8);--ezp-white-90:rgba(255, 255, 255, 0.9);--ezp-white-95:rgba(255, 255, 255, 0.95);--ezp-white-100:white}:host{font-family:"Inter", sans-serif;-webkit-font-feature-settings:"calt", "liga", "ss03", "zero", "cv05", "cv10";font-feature-settings:"calt", "liga", "ss03", "zero", "cv05", "cv10";-webkit-font-kerning:normal;font-kerning:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0;-webkit-tap-highlight-color:transparent;text-rendering:optimizeLegibility;-webkit-text-size-adjust:none;--ezp-duration-1:0.1s;--ezp-duration-2:0.16s;--ezp-duration-3:0.26s;--ezp-duration-4:0.42s;--ezp-duration-5:0.68s;--ezp-duration-6:1s;--ezp-spacing-1:4px;--ezp-spacing-2:6px;--ezp-spacing-3:10px;--ezp-spacing-4:16px;--ezp-spacing-5:26px;--ezp-spacing-6:42px;--ezp-spacing-7:68px;--ezp-spacing-8:110px;--ezp-easing-in-quart:cubic-bezier(0.11, 0, 0.5, 0);--ezp-easing-in-out-quart:cubic-bezier(0.76, 0, 0.24, 1);--ezp-easing-in-out-cubic:cubic-bezier(0.65, 0, 0.35, 1);--ezp-easing-in-expo:cubic-bezier(0.7, 0, 0.84, 0);--ezp-easing-out-quart:cubic-bezier(0.25, 1, 0.5, 1);--ezp-easing-out-expo:cubic-bezier(0.16, 1, 0.3, 1)}:host(.light){--ezp-accent-pink-solid:#f23267;--ezp-accent-pink-solid-alt:#df1559;--ezp-accent-pink-translucent:rgba(242, 50, 103, 0.16);--ezp-accent-red-solid:#f23b22;--ezp-accent-red-solid-alt:#de2313;--ezp-accent-red-translucent:rgba(242, 59, 34, 0.16);--ezp-accent-orange-solid:#fe7200;--ezp-accent-orange-solid-alt:#f56200;--ezp-accent-orange-translucent:rgba(254, 114, 0, 0.16);--ezp-accent-yellow-solid:#ffa200;--ezp-accent-yellow-solid-alt:#fe9000;--ezp-accent-yellow-translucent:rgba(255, 162, 0, 0.16);--ezp-accent-green-solid:#5d9200;--ezp-accent-green-solid-alt:#518100;--ezp-accent-green-translucent:rgba(93, 146, 0, 0.16);--ezp-accent-teal-solid:#00967c;--ezp-accent-teal-solid-alt:#00846e;--ezp-accent-teal-translucent:rgba(0, 150, 124, 0.16);--ezp-accent-cyan-solid:#0091b4;--ezp-accent-cyan-solid-alt:#0080a0;--ezp-accent-cyan-translucent:rgba(0, 145, 180, 0.16);--ezp-accent-blue-solid:#5081f1;--ezp-accent-blue-solid-alt:#3b72df;--ezp-accent-blue-translucent:rgba(80, 129, 241, 0.16);--ezp-accent-violet-solid:#ae5ef3;--ezp-accent-violet-solid-alt:#9d4ee2;--ezp-accent-violet-translucent:rgba(174, 94, 243, 0.16);--ezp-core-surface-primary:white;--ezp-core-surface-secondary:#f3f3f3;--ezp-core-surface-tertiary:white;--ezp-core-foreground-primary:rgba(0, 0, 0, 0.94);--ezp-core-foreground-secondary:rgba(62, 62, 62, 0.68);--ezp-core-foreground-tertiary:rgba(62, 62, 62, 0.42);--ezp-core-shade-primary:rgba(139, 139, 139, 0.1);--ezp-core-shade-secondary:rgba(139, 139, 139, 0.16);--ezp-core-shade-tertiary:rgba(139, 139, 139, 0.22);--ezp-core-outline:rgba(99, 99, 99, 0.16);--ezp-core-edge:rgba(0, 0, 0, 0.1);--ezp-core-backdrop:rgba(0, 0, 0, 0.26)}@media (color-gamut: p3){@supports (color: color(display-p3 1 1 1)){:host(.light){--ezp-accent-pink-solid:color(display-p3 0.949 0.196 0.404/100%);--ezp-accent-pink-solid-alt:color(display-p3 0.875 0.082 0.349/100%);--ezp-accent-pink-translucent:color(display-p3 0.949 0.196 0.404/16%);--ezp-accent-red-solid:color(display-p3 0.949 0.231 0.133/100%);--ezp-accent-red-solid-alt:color(display-p3 0.871 0.137 0.075/100%);--ezp-accent-red-translucent:color(display-p3 0.949 0.231 0.133/16%);--ezp-accent-orange-solid:color(display-p3 0.996 0.447 0/100%);--ezp-accent-orange-solid-alt:color(display-p3 0.961 0.384 0/100%);--ezp-accent-orange-translucent:color(display-p3 0.996 0.447 0/16%);--ezp-accent-yellow-solid:color(display-p3 1 0.635 0/100%);--ezp-accent-yellow-solid-alt:color(display-p3 0.996 0.565 0/100%);--ezp-accent-yellow-translucent:color(display-p3 1 0.635 0/16%);--ezp-accent-green-solid:color(display-p3 0.365 0.573 0/100%);--ezp-accent-green-solid-alt:color(display-p3 0.318 0.506 0/100%);--ezp-accent-green-translucent:color(display-p3 0.365 0.573 0/16%);--ezp-accent-teal-solid:color(display-p3 0 0.588 0.486/100%);--ezp-accent-teal-solid-alt:color(display-p3 0 0.518 0.431/100%);--ezp-accent-teal-translucent:color(display-p3 0 0.588 0.486/16%);--ezp-accent-cyan-solid:color(display-p3 0 0.569 0.706/100%);--ezp-accent-cyan-solid-alt:color(display-p3 0 0.502 0.627/100%);--ezp-accent-cyan-translucent:color(display-p3 0 0.569 0.706/16%);--ezp-accent-blue-solid:color(display-p3 0.314 0.506 0.945/100%);--ezp-accent-blue-solid-alt:color(display-p3 0.231 0.447 0.875/100%);--ezp-accent-blue-translucent:color(display-p3 0.314 0.506 0.945/16%);--ezp-accent-violet-solid:color(display-p3 0.682 0.369 0.953/100%);--ezp-accent-violet-solid-alt:color(display-p3 0.616 0.306 0.886/100%);--ezp-accent-violet-translucent:color(display-p3 0.682 0.369 0.953/16%)}}}@media (color-gamut: p3){@supports (color: color(display-p3 1 1 1)){:host(.light){--ezp-core-surface-primary:color(display-p3 1 1 1/100%);--ezp-core-surface-secondary:color(display-p3 0.953 0.953 0.953/100%);--ezp-core-surface-tertiary:color(display-p3 1 1 1/100%);--ezp-core-foreground-primary:color(display-p3 0 0 0/94%);--ezp-core-foreground-secondary:color(display-p3 0.243 0.243 0.243/68%);--ezp-core-foreground-tertiary:color(display-p3 0.243 0.243 0.243/42%);--ezp-core-shade-primary:color(display-p3 0.545 0.545 0.545/10%);--ezp-core-shade-secondary:color(display-p3 0.545 0.545 0.545/16%);--ezp-core-shade-tertiary:color(display-p3 0.545 0.545 0.545/22%);--ezp-core-outline:color(display-p3 0.388 0.388 0.388/16%);--ezp-core-edge:color(display-p3 0 0 0/10%);--ezp-core-backdrop:color(display-p3 0 0 0/26%)}}}:host(.dark){--ezp-dialog-box-boxShadow:inset 0 0 0 1px var(--ezp-core-outline),\n 0 0 0 1px var(--ezp-black-60);--ezp-printerSelection-body-boxShadow:inset 1px 0 0 0 var(--ezp-core-outline),\n inset -1px 0 0 0 var(--ezp-core-outline);--ezp-printerSelection-box-boxShadow:0 0 0 1px var(--ezp-black-60);--ezp-printerSelection-footer-boxShadowPosition:inset 0 0 0 1px;--ezp-printerSelection-header-boxShadowPosition:inset 0 0 0 1px;--ezp-select-wrap-boxShadowPositionBottom:inset 0 -1px 0 0;--ezp-select-wrap-boxShadowPositionLeft:inset 1px 0 0 0;--ezp-select-wrap-boxShadowPositionRight:inset -1px 0 0 0;--ezp-select-wrap-boxShadowPositionTop:inset 0 1px 0 0;--ezp-status-box-boxShadow:inset 0 0 0 1px var(--ezp-core-outline),\n 0 0 0 1px var(--ezp-black-60);--ezp-stepper-boxShadowPosition:inset 0 0 0 1px;--ezp-userMenu-boxShadow:inset 0 0 0 1px var(--ezp-core-outline),\n 0 0 0 1px var(--ezp-black-60);--ezp-userMenu-header-boxShadowPosition:inset 0 -1px 0 0;--ezp-userMenu-links-boxShadowPosition:inset 0 -1px 0 0;--ezp-userMenu-theme-boxShadowPosition:inset 0 -1px 0 0;--ezp-accent-pink-solid:#ff4171;--ezp-accent-pink-translucent:rgba(255, 65, 113, 0.26);--ezp-accent-red-solid:#ff482c;--ezp-accent-red-translucent:rgba(255, 72, 44, 0.26);--ezp-accent-orange-solid:#ff811c;--ezp-accent-orange-translucent:rgba(255, 129, 28, 0.26);--ezp-accent-yellow-solid:#ffaf3a;--ezp-accent-yellow-translucent:rgba(255, 175, 58, 0.26);--ezp-accent-green-solid:#679c15;--ezp-accent-green-translucent:rgba(103, 156, 21, 0.26);--ezp-accent-teal-solid:#1da086;--ezp-accent-teal-translucent:rgba(29, 160, 134, 0.26);--ezp-accent-cyan-solid:#209bbf;--ezp-accent-cyan-translucent:rgba(32, 155, 191, 0.26);--ezp-accent-blue-solid:#5d8bfd;--ezp-accent-blue-translucent:rgba(93, 139, 253, 0.26);--ezp-accent-violet-solid:#ba69ff;--ezp-accent-violet-translucent:rgba(186, 105, 255, 0.26);--ezp-core-surface-primary:black;--ezp-core-surface-secondary:#1b1b1b;--ezp-core-surface-tertiary:#282828;--ezp-core-foreground-primary:rgba(255, 255, 255, 0.94);--ezp-core-foreground-secondary:rgba(182, 182, 182, 0.68);--ezp-core-foreground-tertiary:rgba(182, 182, 182, 0.42);--ezp-core-shade-primary:rgba(99, 99, 99, 0.26);--ezp-core-shade-secondary:rgba(99, 99, 99, 0.32);--ezp-core-shade-tertiary:rgba(99, 99, 99, 0.38);--ezp-core-outline:rgba(139, 139, 139, 0.26);--ezp-core-edge:rgba(255, 255, 255, 0.16);--ezp-core-backdrop:rgba(0, 0, 0, 0.68)}@media (color-gamut: p3){@supports (color: color(display-p3 1 1 1)){:host(.dark){--ezp-accent-pink-solid:color(display-p3 1 0.255 0.443/100%);--ezp-accent-pink-translucent:color(display-p3 1 0.255 0.443/26%);--ezp-accent-red-solid:color(display-p3 1 0.282 0.173/100%);--ezp-accent-red-translucent:color(display-p3 1 0.282 0.173/26%);--ezp-accent-orange-solid:color(display-p3 1 0.506 0.11/100%);--ezp-accent-orange-translucent:color(display-p3 1 0.506 0.11/26%);--ezp-accent-yellow-solid:color(display-p3 1 0.686 0.227/100%);--ezp-accent-yellow-translucent:color(display-p3 1 0.686 0.227/26%);--ezp-accent-green-solid:color(display-p3 0.404 0.612 0.082/100%);--ezp-accent-green-translucent:color(display-p3 0.404 0.612 0.082/26%);--ezp-accent-teal-solid:color(display-p3 0.114 0.627 0.525/100%);--ezp-accent-teal-translucent:color(display-p3 0.114 0.627 0.525/26%);--ezp-accent-cyan-solid:color(display-p3 0.125 0.608 0.749/100%);--ezp-accent-cyan-translucent:color(display-p3 0.125 0.608 0.749/26%);--ezp-accent-blue-solid:color(display-p3 0.365 0.545 0.992/100%);--ezp-accent-blue-translucent:color(display-p3 0.365 0.545 0.992/26%);--ezp-accent-violet-solid:color(display-p3 0.729 0.412 1/100%);--ezp-accent-violet-translucent:color(display-p3 0.729 0.412 1/26%)}}}@media (color-gamut: p3){@supports (color: color(display-p3 1 1 1)){:host(.dark){--ezp-core-surface-primary:color(display-p3 0 0 0/100%);--ezp-core-surface-secondary:color(display-p3 0.106 0.106 0.106/100%);--ezp-core-surface-tertiary:color(display-p3 0.157 0.157 0.157/100%);--ezp-core-foreground-primary:color(display-p3 1 1 1/94%);--ezp-core-foreground-secondary:color(display-p3 0.714 0.714 0.714/68%);--ezp-core-foreground-tertiary:color(display-p3 0.714 0.714 0.714/42%);--ezp-core-shade-primary:color(display-p3 0.388 0.388 0.388/26%);--ezp-core-shade-secondary:color(display-p3 0.388 0.388 0.388/32%);--ezp-core-shade-tertiary:color(display-p3 0.388 0.388 0.388/38%);--ezp-core-outline:color(display-p3 0.545 0.545 0.545/26%);--ezp-core-edge:color(display-p3 1 1 1/16%);--ezp-core-backdrop:color(display-p3 0 0 0/68%)}}}:host(.seamless){--ezp-status-border-radius:0;--ezp-backdrop-border-radius:0}:host(.blue){--ezp-theme-solid:var(--ezp-accent-blue-solid);--ezp-theme-translucent:var(--ezp-accent-blue-translucent)}:host(.cyan){--ezp-theme-solid:var(--ezp-accent-cyan-solid);--ezp-theme-translucent:var(--ezp-accent-cyan-translucent)}:host(.green){--ezp-theme-solid:var(--ezp-accent-green-solid);--ezp-theme-translucent:var(--ezp-accent-green-translucent)}:host(.teal){--ezp-theme-solid:var(--ezp-accent-teal-solid);--ezp-theme-translucent:var(--ezp-accent-teal-translucent)}:host(.orange){--ezp-theme-solid:var(--ezp-accent-orange-solid);--ezp-theme-translucent:var(--ezp-accent-orange-translucent)}:host(.pink){--ezp-theme-solid:var(--ezp-accent-pink-solid);--ezp-theme-translucent:var(--ezp-accent-pink-translucent)}:host(.red){--ezp-theme-solid:var(--ezp-accent-red-solid);--ezp-theme-translucent:var(--ezp-accent-red-translucent)}:host(.violet){--ezp-theme-solid:var(--ezp-accent-violet-solid);--ezp-theme-translucent:var(--ezp-accent-violet-translucent)}';var zv=e("ezp_printing",function(){function e(e){n(this,e);this.printFinished=a(this,"printFinished",7);this.filename="";this.hidemenu=false;this.hideheader=false;this.theme="cyan";this.appearance="system";this.language="";this.seamless=false;this.printOpen=false;this.authOpen=false;this.onlyGetSasUri=false;this.noDocumentOpen=false}e.prototype.watchFileData=function(e,t){console.log(e);if(e!==t&&e.length>0){var r=new Uint8Array(e.length);for(var n=0;n<e.length;n++){r[n]=e.charCodeAt(n)}this.file=new File([r],this.filename)}};e.prototype.watchFilename=function(e,t){if(e!==t&&e.length>0){this.filename=e}};e.prototype.watchFileUrl=function(e,t){if(e!==t&&e.length>0){this.fileurl=e}};e.prototype.watchLanguage=function(e,t){if(e!==t&&e.length>0){this.language=e}};e.prototype.listenPrintCancel=function(){this.printOpen=false;this.printFinished.emit()};e.prototype.listenPrintSubmit=function(){this.printOpen=false;this.printFinished.emit();this.checkAuth()};e.prototype.listenAuthCancel=function(){this.authOpen=false;this.checkAuth()};e.prototype.listenAuthSuccess=function(){if(this.onlyGetSasUri){this.printOpen=false;this.onlyGetSasUri=false}else if(this.filename!=""){this.printOpen=true}else{this.noDocumentOpen=true}};e.prototype.listenUploadFile=function(e){this.filename=e.detail[0].name;this.file=e.detail[0];this.open()};e.prototype.listenDialogClose=function(e){if(e.detail==="no-document-selected"){this.noDocumentOpen=false}};e.prototype.listenDialogAction=function(e){if(e.detail==="no-document-selected"){this.noDocumentOpen=false}};e.prototype.open=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(Ue.state.isAuthorized){if(this.filename){this.printOpen=true}else{this.noDocumentOpen=true}}else{this.authOpen=true}return[2]}))}))};e.prototype.logOut=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){localStorage.removeItem("properties");localStorage.removeItem("refreshToken");localStorage.removeItem("access_token");localStorage.removeItem("printer");localStorage.removeItem("isAuthorized");this.printOpen=false;return[2]}))}))};e.prototype.logOutandRevokeToken=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.auth.revokeRefreshToken();this.logOut();return[2]}))}))};e.prototype.getSasUri=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,r;var n=this;return __generator(this,(function(a){switch(a.label){case 0:this.onlyGetSasUri=true;e=new uv(this.redirecturi,this.clientid);return[4,e.prepareFileUpload(Ue.state.accessToken).catch((function(){n.open();return null}))];case 1:t=a.sent();if(t){r=t.sasUri;return[2,r]}return[2]}}))}))};e.prototype.getAuthUri=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:this.auth.generateCodeVerifier();return[4,this.auth.generateCodeChallenge(Ue.state.codeVerifier)];case 1:e.sent();this.auth.buildAuthURI();return[2,Ue.state.authUri]}}))}))};e.prototype.checkAuth=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(r){switch(r.label){case 0:e=new uv(this.redirecturi,this.clientid);t=Ue.state.accessToken;if(t===""){t=localStorage.getItem("access_token");Ue.state.accessToken=t}if(localStorage.getItem("isAuthorized")){Ue.state.isAuthorized=localStorage.getItem("isAuthorized")==="true"}return[4,e.getConfig(Ue.state.accessToken).then((function(e){if(e.ok){Ue.state.isAuthorized=true}if(!e.ok){Ue.state.isAuthorized=false;throw new Error("http status "+e.status)}})).catch((function(){Ue.state.isAuthorized=false}))];case 1:r.sent();localStorage.setItem("isAuthorized",Ue.state.isAuthorized.toString());return[2,Ue.state.isAuthorized]}}))}))};e.prototype.refreshTokensPeriodically=function(e){var t=new je(this.redirecturi,this.clientid);setInterval((function(){t.refreshTokens()}),e*1e3)};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;var t=this;return __generator(this,(function(r){e=window.matchMedia("(prefers-color-scheme: dark)");this.systemAppearance=e.matches?"dark":"light";e.addEventListener("change",(function(e){t.systemAppearance=e.matches?"dark":"light"}));Ue.state.redirectUri=this.redirecturi;hv.state.theme=this.theme;hv.state.appearance=this.appearance;if(this.authapihosturl){Ue.state.authApiHostUrl=this.authapihosturl}else{Ue.state.authApiHostUrl=xv.authApiHostUrl}if(this.printapihosturl){mv.state.printApiHostUrl=this.printapihosturl}else{mv.state.printApiHostUrl=xv.printingApiHostUrl}this.auth=new je(this.redirecturi,this.clientid);Fe();He(this.language);this.checkAuth();return[2]}))}))};e.prototype.componentDidLoad=function(){this.refreshTokensPeriodically(1800)};e.prototype.render=function(){var e=this;return i(o,{class:"".concat(hv.state.theme," ").concat(hv.state.appearance==="system"?this.systemAppearance:hv.state.appearance," ").concat(this.seamless?"seamless":"")},this.trigger==="custom"?i("slot",null):this.trigger==="file"?i("ezp-upload",null):this.trigger==="button"&&i("ezp-icon-button",{id:"print-trigger",icon:"printer",slot:"trigger",type:"button",onClick:function(){return e.open()}}),this.authOpen?i("ezp-auth",{clientID:this.clientid,redirectURI:this.redirecturi,hidelogin:this.hidelogin,trigger:this.trigger,code:this.code}):this.printOpen?i("ezp-printer-selection",{clientID:this.clientid,redirectURI:this.redirecturi,filename:this.filename,fileurl:this.fileurl,filetype:this.filetype,fileid:this.fileid,file:this.file,hidemenu:this.hidemenu,hideheader:this.hideheader,seamless:this.seamless}):this.noDocumentOpen?i("ezp-dialog",{heading:ze.t("no_document_dialog.heading"),description:ze.t("no_document_dialog.description"),action:ze.t("no_document_dialog.action"),iconName:"question-mark",instance:"no-document-selected"}):null)};Object.defineProperty(e,"watchers",{get:function(){return{filedata:["watchFileData"],filename:["watchFilename"],fileurl:["watchFileUrl"],language:["watchLanguage"]}},enumerable:false,configurable:true});return e}());zv.style=Nv;var Sv=':host{--ezp-select-duration:var(--ezp-duration-3);display:block;height:var(--ezp-select-toggle-height);position:relative;-webkit-transition:var(--ezp-select-transition, z-index 0s var(--ezp-select-duration));transition:var(--ezp-select-transition, z-index 0s var(--ezp-select-duration));z-index:var(--ezp-select-zIndex, 3)}:host(:first-child){--ezp-select-wrap-borderRadius:3px 3px 0 0}:host(:last-child){--ezp-select-wrap-borderRadius:0 0 3px 3px}:host(:first-child:last-child){--ezp-select-wrap-borderRadius:3px}:host(:not(:last-child):not(.is-expanded)){--ezp-select-wrap-boxShadowPositionBottom:0 0 0 0}:host(.toggle-horizontal){--ezp-select-label-alignSelf:start;--ezp-select-toggle-gridTemplateAreas:"label value accessory";--ezp-select-toggle-gridTemplateColumns:1fr repeat(2, auto);--ezp-select-toggle-height:30px;--ezp-select-toggle-gridTemplateRows:auto;--ezp-select-value-alignSelf:end}:host(.toggle-horizontal.has-icon){--ezp-select-toggle-gridTemplateAreas:"icon label value accessory";--ezp-select-toggle-gridTemplateColumns:auto 1fr repeat(2, auto)}:host(.toggle-vertical){--ezp-select-label-alignSelf:center;--ezp-select-toggle-gridTemplateAreas:"label accessory" "value accessory";--ezp-select-toggle-gridTemplateColumns:1fr auto;--ezp-select-toggle-height:48px;--ezp-select-toggle-gridTemplateRows:repeat(2, auto);--ezp-select-value-alignSelf:center}:host(.toggle-vertical.has-icon){--ezp-select-toggle-gridTemplateAreas:"icon label accessory" "icon value accessory";--ezp-select-toggle-gridTemplateColumns:auto 1fr auto}:host(.option-horizontal){--ezp-select-details-gridTemplateColumns:repeat(2, 1fr);--ezp-select-details-gridTemplateRows:auto;--ezp-select-option-height:30px}:host(.option-vertical){--ezp-select-details-gridTemplateColumns:1fr;--ezp-select-details-gridTemplateRows:repeat(2, auto);--ezp-select-option-height:48px}:host(.is-expanded){--ezp-select-accessory-color:var(--ezp-theme-solid);--ezp-select-transition:z-index 0s 0s;--ezp-select-zIndex:9999;--ezp-select-icon-color:var(--ezp-theme-solid);--ezp-select-label-color:var(--ezp-theme-solid);--ezp-select-wrap-borderRadius:3px}:host(.disabled){--ezp-select-accessory-color:var(--ezp-core-foreground-tertiary);--ezp-select-icon-color:var(--ezp-core-foreground-tertiary);--ezp-select-label-color:var(--ezp-core-foreground-tertiary);--ezp-select-toggle-background-hover:transparent;--ezp-select-toggle-cursor:default;--value-color:var(--ezp-core-foreground-tertiary)}#wrap{background:var(--ezp-core-surface-tertiary);border-radius:var(--ezp-select-wrap-borderRadius, 0);-webkit-box-shadow:var(--ezp-select-wrap-boxShadowPositionTop, 0 -1px 0 0) var(--ezp-core-outline), var(--ezp-select-wrap-boxShadowPositionRight, 1px 0 0 0) var(--ezp-core-outline), var(--ezp-select-wrap-boxShadowPositionBottom, 0 1px 0 0) var(--ezp-core-outline), var(--ezp-select-wrap-boxShadowPositionLeft, -1px 0 0 0) var(--ezp-core-outline);box-shadow:var(--ezp-select-wrap-boxShadowPositionTop, 0 -1px 0 0) var(--ezp-core-outline), var(--ezp-select-wrap-boxShadowPositionRight, 1px 0 0 0) var(--ezp-core-outline), var(--ezp-select-wrap-boxShadowPositionBottom, 0 1px 0 0) var(--ezp-core-outline), var(--ezp-select-wrap-boxShadowPositionLeft, -1px 0 0 0) var(--ezp-core-outline);-webkit-transform:translateY(var(--ezp-select-wrap-translateY, 0));transform:translateY(var(--ezp-select-wrap-translateY, 0));-webkit-transition:border-radius var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-transform var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart);transition:border-radius var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-transform var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart);transition:transform var(--ezp-select-duration) var(--ezp-easing-out-quart), border-radius var(--ezp-select-duration) var(--ezp-easing-out-quart), box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart);transition:transform var(--ezp-select-duration) var(--ezp-easing-out-quart), border-radius var(--ezp-select-duration) var(--ezp-easing-out-quart), box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-transform var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart)}#toggle{background:var(--ezp-select-toggle-background, transparent);-webkit-box-sizing:border-box;box-sizing:border-box;cursor:var(--ezp-select-toggle-cursor, pointer);display:grid;gap:var(--ezp-spacing-2) var(--ezp-spacing-3);grid-template-areas:var(--ezp-select-toggle-gridTemplateAreas, none);grid-template-columns:var(--ezp-select-toggle-gridTemplateColumns, none);grid-template-rows:var(--ezp-select-toggle-gridTemplateRows, auto);height:var(--ezp-select-toggle-height, auto);padding:var(--ezp-spacing-3)}#toggle:hover{--ezp-select-toggle-background:var(\n --ezp-select-toggle-background-hover,\n var(--ezp-core-shade-primary)\n )}#icon{align-self:center;color:var(--ezp-select-icon-color, var(--ezp-core-foreground-secondary));grid-area:icon;margin:calc(var(--ezp-spacing-2) * -1) 0}#label{align-self:var(--ezp-select-label-alignSelf, auto);color:var(--ezp-select-label-color, var(--ezp-core-foreground-secondary));grid-area:label}#value{align-self:var(--ezp-select-value-alignSelf, auto);color:var(--value-color, var(--ezp-core-foreground-primary));grid-area:value}#accessory{align-self:center;color:var(--ezp-select-accessory-color, var(--ezp-core-foreground-secondary));grid-area:accessory;margin:calc(var(--ezp-spacing-2) * -1) 0}#list{-webkit-box-shadow:inset 0 1px 0 0 var(--ezp-core-outline);box-shadow:inset 0 1px 0 0 var(--ezp-core-outline);height:var(--ezp-select-list-height, 0);overflow:auto;-webkit-transition:height var(--ezp-select-duration) var(--ezp-easing-out-quart);transition:height var(--ezp-select-duration) var(--ezp-easing-out-quart)}.option{background:var(--ezp-select-option-background);-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:grid;gap:var(--ezp-spacing-3);grid-template:auto/auto 1fr;height:var(--ezp-select-option-height, auto);padding:0 0 0 var(--ezp-spacing-3)}.option:not(:last-child){--ezp-select-details-boxShadow:inset 0 -1px 0 0 var(--ezp-core-outline)}.option:hover{--ezp-select-option-background:var(--ezp-core-shade-primary)}.option:active{--ezp-select-option-background:var(--ezp-core-shade-secondary)}.option.is-selected{--ezp-select-indicator-opacity:1;--ezp-select-indicator-transform:translateX(0);--ezp-select-indicator-transition:opacity var(--ezp-select-duration)\n var(--ezp-easing-out-quart),\n transform var(--ezp-select-duration) var(--ezp-easing-out-quart), visibility 0s 0s;--ezp-select-indicator-visibility:visible}.indicator{-ms-flex-item-align:center;align-self:center;color:var(--ezp-theme-solid);margin:calc(var(--ezp-spacing-2) * -1) 0;opacity:var(--ezp-select-indicator-opacity, 0);-webkit-transform:var(--ezp-select-indicator-transform, translateX(var(--ezp-spacing-3)));transform:var(--ezp-select-indicator-transform, translateX(var(--ezp-spacing-3)));-webkit-transition:var(--ezp-select-indicator-transition, opacity var(--ezp-select-duration) var(--ezp-easing-out-quart), transform var(--ezp-select-duration) var(--ezp-easing-out-quart), visibility 0s var(--ezp-select-duration));transition:var(--ezp-select-indicator-transition, opacity var(--ezp-select-duration) var(--ezp-easing-out-quart), transform var(--ezp-select-duration) var(--ezp-easing-out-quart), visibility 0s var(--ezp-select-duration));visibility:var(--ezp-select-indicator-visibility, hidden)}.details{-webkit-box-shadow:var(--ezp-select-details-boxShadow);box-shadow:var(--ezp-select-details-boxShadow);display:grid;gap:var(--ezp-spacing-2);grid-template-columns:var(--ezp-select-details-gridTemplateColumns, 1fr);grid-template-rows:var(--ezp-select-details-gridTemplateRows, auto);padding:var(--ezp-spacing-3) var(--ezp-spacing-3) var(--ezp-spacing-3) 0}.title{-ms-flex-item-align:start;align-self:start;color:var(--ezp-core-foreground-primary)}.meta{-ms-flex-item-align:end;align-self:end;color:var(--ezp-core-foreground-secondary)}';var wv=e("ezp_select",function(){function e(e){var t=this;n(this,e);this.selectToggle=a(this,"selectToggle",7);this.selectSelection=a(this,"selectSelection",7);this.backdrop=document.createElement("ezp-backdrop");this.containerHeight=0;this.expandCover=false;this.expandRise=false;this.listHeight=0;this.spacing=6;this.toggleHeight=0;this.wrapDiff=0;this.wrapHeight=0;this.wrapTop=0;this.duration=0;this.label="Label";this.placeholder="Placeholder";this.toggleFlow="horizontal";this.disabled=false;this.expanded=false;this.selected={id:false,title:"",meta:""};this.toggle=function(){t.containerHeight=t.container.clientHeight-t.spacing*2;t.listHeight=t.list.scrollHeight;t.wrapTop=t.component.offsetTop;t.wrapHeight=t.toggleHeight+t.listHeight;t.expandCover=t.wrapHeight>t.containerHeight;t.expandRise=t.wrapHeight>t.containerHeight-t.wrapTop;t.wrapDiff=t.containerHeight-t.wrapHeight-t.wrapTop;t.expanded=!t.expanded;t.selectToggle.emit(t.expanded)};this.select=function(e){var r=t.selected.id===e?0:t.duration*1e3;t.selected=t.options.find((function(t){return t.id===e}));t.selectSelection.emit(t.selected);window.setTimeout((function(){t.toggle()}),r)};this.preSelect=function(){t.selected=t.options.find((function(e){return typeof t.preSelected==="number"?e.id===t.preSelected:typeof t.preSelected==="string"?e.title===t.preSelected:null}))}}e.prototype.watchExpanded=function(){if(this.expandCover){this.component.style.setProperty("--ezp-select-list-height",this.expanded?"".concat(this.containerHeight-this.toggleHeight,"px"):"0px");this.component.style.setProperty("--ezp-select-wrap-translateY",this.expanded?"".concat(this.wrapTop*-1+this.spacing,"px"):"0px")}else if(this.expandRise){this.component.style.setProperty("--ezp-select-list-height",this.expanded?"".concat(this.listHeight,"px"):"0px");this.component.style.setProperty("--ezp-select-wrap-translateY",this.expanded?"".concat(this.wrapDiff+this.spacing,"px"):"0px")}else{this.component.style.setProperty("--ezp-select-list-height",this.expanded?"".concat(this.listHeight,"px"):"0px")}if(this.expanded){this.backdrop.visible=true;this.container.appendChild(this.backdrop)}else{this.backdrop.visible=false}};e.prototype.componentWillLoad=function(){var e=this;this.container=this.component.closest("[data-backdrop-surface]");this.backdrop.addEventListener("backdropHideStart",(function(){e.expanded=false}));this.backdrop.addEventListener("backdropHideEnd",(function(){e.container.removeChild(e.backdrop)}));if(this.preSelected!==undefined&&this.preSelected!==""&&this.preSelected!==null){this.preSelect()}};e.prototype.componentDidLoad=function(){var e=getComputedStyle(this.component);this.toggleHeight=parseInt(e.getPropertyValue("--ezp-select-toggle-height"));this.duration=parseFloat(e.getPropertyValue("--ezp-select-duration"))};e.prototype.componentWillUpdate=function(){if(this.selected.id===false&&this.preSelected!==undefined&&this.preSelected!==""&&this.preSelected!==null){this.preSelect()}};e.prototype.render=function(){var e=this;var t=[this.expanded?"is-expanded":"",this.icon?"has-icon":"","toggle-".concat(this.toggleFlow),this.optionFlow?"option-".concat(this.optionFlow):"",this.disabled?"disabled":""];var r=this.toggleFlow==="horizontal"?"secondary":"tertiary";return i(o,{class:t.join(" ")},i("div",{id:"wrap"},i("div",{id:"toggle",onClick:function(){return!e.disabled&&e.toggle()}},this.icon?i("ezp-icon",{id:"icon",name:this.icon}):null,i("ezp-label",{id:"label",noWrap:true,level:r,text:this.label}),i("ezp-label",{id:"value",ellipsis:true,text:this.selected.title!==""?this.selected.title:this.placeholder}),i("ezp-icon",{id:"accessory",name:"expand"})),i("div",{id:"list",ref:function(t){return e.list=t}},this.options.map((function(t){if(t.title!==""){return i("div",{class:"option ".concat(t.id===e.selected.id?"is-selected":""," ").concat(t.meta!==""?"has-meta":""," "),onClick:function(){return e.select(t.id)}},i("ezp-icon",{name:"checkmark",class:"indicator"}),i("div",{class:"details"},i("ezp-label",{class:"title",ellipsis:true,text:t.title}),t.meta!==""?i("ezp-label",{level:"tertiary",class:"meta",text:t.meta,ellipsis:true}):null))}})))))};Object.defineProperty(e.prototype,"component",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{expanded:["watchExpanded"]}},enumerable:false,configurable:true});return e}());wv.style=Sv;var Pv=":host{-ms-flex-align:center;align-items:center;background:var(--ezp-core-backdrop);border-radius:var(--ezp-status-border-radius, 6px);-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;height:100%;-ms-flex-pack:center;justify-content:center;left:0;padding:var(--ezp-spacing-6);position:absolute;top:0;width:100%;z-index:9999}@media (prefers-color-scheme: dark){:host{--box-separator-position:inset 0 0 0 var(--hairline-width-positive)}}#box{--ezp-icon-fill:var(--ezp-theme-solid);-ms-flex-align:center;align-items:center;background:var(--ezp-core-surface-tertiary);border-radius:3px;-webkit-box-shadow:var(--ezp-status-box-boxShadow, 0 0 0 1px var(--ezp-black-10));box-shadow:var(--ezp-status-box-boxShadow, 0 0 0 1px var(--ezp-black-10));display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-4);padding:var(--ezp-spacing-4) var(--ezp-spacing-5)}#indicator{-webkit-animation:rotate var(--ezp-duration-6) linear infinite;animation:rotate var(--ezp-duration-6) linear infinite;display:block;height:42px;-webkit-transform:rotate(0);transform:rotate(0);width:42px}#track{fill:none;stroke:var(--ezp-core-outline);stroke-width:4px}#value{-webkit-animation:offset var(--ezp-duration-6) linear alternate infinite;animation:offset var(--ezp-duration-6) linear alternate infinite;fill:none;stroke:var(--ezp-theme-solid);stroke-dasharray:110;stroke-dashoffset:110;stroke-linecap:round;stroke-width:4px}#description{color:var(--ezp-core-foreground-primary)}#footer{display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-2)}@-webkit-keyframes offset{100%{stroke-dashoffset:55}}@keyframes offset{100%{stroke-dashoffset:55}}@-webkit-keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}";var Cv=e("ezp_status",function(){function e(e){var t=this;n(this,e);this.statusCancel=a(this,"statusCancel",7);this.statusClose=a(this,"statusClose",7);this.statusRetry=a(this,"statusRetry",7);this.description="Description";this.processing=false;this.handleCancel=function(){t.statusCancel.emit(t.instance)};this.handleClose=function(){t.statusClose.emit(t.instance)};this.handleRetry=function(){t.statusRetry.emit(t.instance)}}e.prototype.componentWillLoad=function(){};e.prototype.render=function(){return i(o,null,i("div",{id:"box"},this.processing?i("svg",{id:"indicator",viewBox:"0 0 42 42",xmlns:"http://www.w3.org/2000/svg"},i("circle",{id:"track",cx:"21",cy:"21",r:"18"}),i("circle",{id:"value",cx:"21",cy:"21",r:"18"})):this.icon?i("ezp-icon",{name:this.icon,framed:true}):null,i("ezp-label",{id:"description",level:"tertiary",weight:"strong",text:this.description}),(this.cancel||this.close||this.retry)&&i("div",{id:"footer"},this.cancel&&i("ezp-text-button",{level:"secondary",small:true,onClick:this.handleCancel,label:typeof this.cancel==="string"?this.cancel:ze.t("button_actions.cancel")}),this.close&&i("ezp-text-button",{level:this.retry?"secondary":"primary",small:true,onClick:this.handleClose,label:typeof this.close==="string"?this.close:ze.t("button_actions.close")}),this.retry&&i("ezp-text-button",{level:"primary",small:true,onClick:this.handleRetry,label:typeof this.retry==="string"?this.retry:ze.t("button_actions.retry")}))))};return e}());Cv.style=Pv;var Rv=':host{-ms-flex-align:center;align-items:center;background:var(--ezp-core-surface-tertiary);border-radius:3px;-webkit-box-shadow:var(--ezp-stepper-boxShadowPosition, 0 0 0 1px) var(--ezp-core-outline);box-shadow:var(--ezp-stepper-boxShadowPosition, 0 0 0 1px) var(--ezp-core-outline);display:grid;gap:var(--ezp-spacing-3);grid-template:var(--ezp-stepper-gridTemplate, auto/auto 1fr auto);padding:0 var(--ezp-spacing-2) 0 var(--ezp-spacing-3);position:relative;z-index:0}:host(.focused){--ezp-stepper-icon-color:var(--ezp-theme-solid);--ezp-stepper-label-color:var(--ezp-theme-solid)}:host(.has-icon){--ezp-stepper-gridTemplate:auto / repeat(2, auto) 1fr auto}#toggle{background:var(--ezp-stepper-toggle-background, transparent);border-radius:3px;cursor:pointer;height:100%;left:0;position:absolute;top:0;width:100%;z-index:-1}@media (hover: hover){#toggle:hover{--ezp-stepper-toggle-background:var(--ezp-core-shade-primary)}}#icon{color:var(--ezp-stepper-icon-color, var(--ezp-core-foreground-secondary));pointer-events:none}#label{color:var(--ezp-stepper-label-color, var(--ezp-core-foreground-secondary));pointer-events:none}#input{-moz-appearance:textfield;-webkit-appearance:none;appearance:none;background:transparent;border:0;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--ezp-core-foreground-primary);cursor:inherit;font-family:inherit;-webkit-font-feature-settings:"tnum";font-feature-settings:"tnum";font-size:14px;-webkit-font-smoothing:antialiased;height:30px;letter-spacing:-0.0062235443em;margin:0;outline:none;padding:0;pointer-events:none;text-align:right;width:100%}#input::-webkit-outer-spin-button,#input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.buttons{display:-ms-flexbox;display:flex}.button{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-stepper-button-background, transparent);border:0;border-radius:50%;-webkit-box-shadow:none;box-shadow:none;color:var(--ezp-stepper-button-color, var(--ezp-theme-solid));cursor:var(--ezp-stepper-button-cursor, pointer);display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;margin:0;outline:none;padding:var(--ezp-spacing-1)}@media (hover: hover){.button:not(:disabled):hover{--ezp-stepper-button-background:var(--ezp-core-shade-primary)}.button:not(:disabled):active{--ezp-stepper-button-background:var(--ezp-core-shade-secondary)}}.button:disabled{--ezp-stepper-button-color:var(--ezp-core-foreground-tertiary);--ezp-stepper-button-cursor:default}';var _v=e("ezp_stepper",function(){function e(e){var t=this;n(this,e);this.stepperChanged=a(this,"stepperChanged",7);this.label="Label";this.min=1;this.canDecrease=true;this.canIncrease=true;this.focused=false;this.value=1;this.handleDecrease=function(){t.value--};this.handleIncrease=function(){t.value++};this.handleInput=function(){t.value=t.input.value!==""?parseInt(t.input.value):t.min};this.setFocus=function(){t.input.focus()};this.handleBlur=function(){t.focused=false};this.handleFocus=function(){t.focused=true}}e.prototype.watchValue=function(){this.canIncrease=this.max!==undefined?this.value<this.max:true;this.canDecrease=this.min!==undefined?this.value>this.min:true;this.stepperChanged.emit(this.value)};e.prototype.componentWillLoad=function(){this.watchValue()};e.prototype.render=function(){var e=this;return i(o,{class:"".concat(this.focused?"focused":""," ").concat(this.icon?"has-icon":"")},i("div",{id:"toggle",onClick:this.setFocus}),this.icon?i("ezp-icon",{id:"icon",name:this.icon}):null,i("ezp-label",{id:"label",noWrap:true,text:this.label}),i("input",{id:"input",type:"number",ref:function(t){return e.input=t},min:this.min.toString(),max:this.max.toString(),value:this.value.toString(),onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur}),i("div",{class:"buttons"},i("button",{class:"button",disabled:!this.canDecrease,onClick:this.handleDecrease},i("ezp-icon",{name:"minus"})),i("button",{class:"button",disabled:!this.canIncrease,onClick:this.handleIncrease},i("ezp-icon",{name:"plus"}))))};Object.defineProperty(e,"watchers",{get:function(){return{value:["watchValue"]}},enumerable:false,configurable:true});return e}());_v.style=Rv;var Ev=":host{display:-ms-flexbox;display:flex}:host(.primary){--ezp-textButton-background-disabled:var(--ezp-core-shade-primary);--ezp-textButton-background-init:var(--ezp-theme-solid);--ezp-textButton-color-disabled:var(--ezp-core-foreground-tertiary);--ezp-textButton-color-init:var(--ezp-white-100);--ezp-textButton-opacity-active:0.74;--ezp-textButton-opacity-hover:0.84}:host(.secondary){--ezp-textButton-background-active:var(--ezp-core-shade-tertiary);--ezp-textButton-background-disabled:var(--ezp-core-shade-primary);--ezp-textButton-background-hover:var(--ezp-core-shade-secondary);--ezp-textButton-background-init:var(--ezp-core-shade-primary);--ezp-textButton-color-disabled:var(--ezp-core-foreground-tertiary);--ezp-textButton-color-init:var(--ezp-theme-solid)}:host(.tertiary){--ezp-textButton-background-active:var(--ezp-core-shade-secondary);--ezp-textButton-background-disabled:transparent;--ezp-textButton-background-hover:var(--ezp-core-shade-primary);--ezp-textButton-background-init:transparent;--ezp-textButton-color-disabled:var(--ezp-core-foreground-tertiary);--ezp-textButton-color-init:var(--ezp-theme-solid)}#button{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-textButton-background, var(--ezp-textButton-background-init));border:0;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;color:var(--ezp-textButton-color, var(--ezp-textButton-color-init));cursor:var(--ezp-textButton-cursor, pointer);display:-ms-flexbox;display:flex;font-family:inherit;-ms-flex-pack:center;justify-content:center;margin:0;opacity:var(--ezp-textButton-opacity, 1);outline:none;padding:var(--ezp-spacing-3);white-space:nowrap;width:100%}@media (hover: hover){#button:not(:disabled):hover{--ezp-textButton-background:var(\n --ezp-textButton-background-hover,\n var(--ezp-textButton-background-init)\n );--ezp-textButton-opacity:var(--ezp-textButton-opacity-hover, 1)}#button:not(:disabled):active{--ezp-textButton-background:var(\n --ezp-textButton-background-active,\n var(--ezp-textButton-background-init)\n );--ezp-textButton-opacity:var(--ezp-textButton-opacity-active, 1)}}#button:disabled{--ezp-textButton-background:var(--ezp-textButton-background-disabled);--ezp-textButton-color:var(--ezp-textButton-color-disabled);--ezp-textButton-cursor:default}#label{pointer-events:none}";var kv=e("ezp_text_button",function(){function e(e){n(this,e);this.blank=false;this.disabled=false;this.level="primary";this.small=false}e.prototype.render=function(){var e=this.type!==undefined?"button":"a";var t=this.type!==undefined?{type:this.type,disabled:this.disabled}:{href:this.href,target:this.blank?"_blank":"_self"};return i(o,{class:"".concat(this.level)},i(e,Object.assign({id:"button"},t),i("ezp-label",{id:"label",weight:"heavy",text:this.label,level:this.small?"tertiary":"secondary"})))};return e}());kv.style=Ev;var Ov=":host{-ms-flex-line-pack:center;align-content:center;background:var(--ezp-upload-background, transparent);border:1px dashed var(--ezp-upload-border-color, var(--ezp-core-foreground-tertiary));border-radius:3px;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--ezp-core-foreground-primary);display:grid;grid-template:auto/minmax(auto, 280px);height:var(--ezp-upload-height, auto);-ms-flex-pack:center;justify-content:center;padding:var(--ezp-spacing-3);position:relative;-webkit-transition:background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart);width:var(--ezp-upload-width, auto)}:host(.dragging){--ezp-upload-background:var(--ezp-theme-translucent);--ezp-upload-border-color:var(--ezp-theme-translucent);--ezp-upload-header-blur:16px;--ezp-upload-header-opacity:0.42}#header{--ezp-icon-fill:var(--ezp-theme-solid);-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-webkit-filter:blur(var(--ezp-upload-header-blur, 0));filter:blur(var(--ezp-upload-header-blur, 0));-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-5);opacity:var(--ezp-upload-header-opacity, 1);text-align:center;-webkit-transition:opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:filter var(--ezp-duration-3) var(--ezp-easing-out-quart), opacity var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:filter var(--ezp-duration-3) var(--ezp-easing-out-quart), opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart)}#meta{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--ezp-spacing-3) 3px;-ms-flex-pack:center;justify-content:center}#select{color:var(--ezp-theme-solid);cursor:pointer;opacity:var(--ezp-upload-select-opacity, 1);text-decoration:underline;white-space:nowrap}@media (hover: hover){#select:hover{--ezp-upload-select-opacity:0.58}}#input{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:0;opacity:0;pointer-events:none;position:absolute;width:0}";var Tv=e("ezp_upload",function(){function e(e){var t=this;n(this,e);this.uploadFile=a(this,"uploadFile",7);this.filename="";this.dragging=false;this.handleInput=function(){t.filename=t.input.files[0].name;t.uploadFile.emit(t.input.files)}}e.prototype.handleDragEnter=function(){this.dragging=true};e.prototype.handleDragOver=function(e){e.stopPropagation();e.preventDefault();e.dataTransfer.dropEffect="copy"};e.prototype.handleDragLeave=function(){this.dragging=false};e.prototype.handleDrop=function(e){e.stopPropagation();e.preventDefault();this.dragging=false;this.filename=e.dataTransfer.files[0].name;this.uploadFile.emit(e.dataTransfer.files)};e.prototype.listenPrintCancel=function(){this.form.reset();this.filename=""};e.prototype.render=function(){var e=this;return i(o,{class:{dragging:this.dragging}},i("form",{id:"form",ref:function(t){return e.form=t}},i("div",{id:"header"},i("ezp-icon",{name:"drag-drop",size:"huge",framed:true}),i("ezp-label",{weight:"strong",text:ze.t("upload.description")}),i("div",{id:"meta"},i("ezp-label",{level:"tertiary",text:ze.t("upload.meta_leading")}),i("label",{htmlFor:"input",id:"select"},i("ezp-label",{level:"tertiary",weight:"strong",text:ze.t("upload.meta_select")})),i("input",{type:"file",name:"input",id:"input",ref:function(t){return e.input=t},onInput:this.handleInput}),i("ezp-label",{level:"tertiary",text:ze.t("upload.meta_trailing")})),this.filename!=""&&i(c,null,i("ezp-label",{level:"secondary",text:ze.t("upload.selected_file")}),i("ezp-label",{level:"tertiary",text:this.filename})))))};return e}());Tv.style=Ov;var Bv=":host{background:var(--ezp-core-surface-tertiary);border-radius:6px;-webkit-box-shadow:var(--ezp-userMenu-boxShadow, 0 0 0 1px var(--ezp-black-10));box-shadow:var(--ezp-userMenu-boxShadow, 0 0 0 1px var(--ezp-black-10));display:block;opacity:var(--ezp-userMenu-opacity, 0);position:absolute;right:0;top:0;-webkit-transform:scale(var(--ezp-userMenu-scale, 0.94, 0.94));transform:scale(var(--ezp-userMenu-scale, 0.94, 0.94));-webkit-transform-origin:right top;transform-origin:right top;-webkit-transition:var(--ezp-userMenu-transition, opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), transform var(--ezp-duration-3) var(--ezp-easing-out-quart), visibility 0s var(--ezp-duration-3));transition:var(--ezp-userMenu-transition, opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), transform var(--ezp-duration-3) var(--ezp-easing-out-quart), visibility 0s var(--ezp-duration-3));visibility:var(--ezp-userMenu-visibility, hidden);z-index:5}:host(.is-open){--ezp-userMenu-opacity:1;--ezp-userMenu-scale:1, 1;--ezp-userMenu-transition:opacity var(--ezp-duration-3) var(--ezp-easing-out-quart),\n transform var(--ezp-duration-3) var(--ezp-easing-out-quart), visibility 0s 0s;--ezp-userMenu-visibility:visible}@media (prefers-color-scheme: dark){:host{--ezp-userMenu-separator-position:inset 0 0 0 var(--hairline-width-positive)}}#header{-ms-flex-align:center;align-items:center;-webkit-box-shadow:var(--ezp-userMenu-header-boxShadowPosition, 0 1px 0 0) var(--ezp-core-outline);box-shadow:var(--ezp-userMenu-header-boxShadowPosition, 0 1px 0 0) var(--ezp-core-outline);-webkit-box-shadow:0;box-shadow:0;display:grid;grid-template:auto/1fr auto;padding:var(--ezp-spacing-4) var(--ezp-spacing-3) var(--ezp-spacing-4) var(--ezp-spacing-4)}#name{color:var(--ezp-core-foreground-primary)}#close{margin:calc(var(--ezp-spacing-3) * -1) 0}#links{-webkit-box-shadow:var(--ezp-userMenu-links-boxShadowPosition, 0 1px 0 0) var(--ezp-core-outline);box-shadow:var(--ezp-userMenu-links-boxShadowPosition, 0 1px 0 0) var(--ezp-core-outline);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding:var(--ezp-spacing-2)}.link{-ms-flex-align:center;align-items:center;background:var(--ezp-userMenu-link-background, transparent);border-radius:3px;color:var(--ezp-core-foreground-primary);cursor:pointer;display:grid;gap:var(--ezp-spacing-3);grid-template:auto/auto 1fr;padding:var(--ezp-spacing-3);text-decoration:none}.link:hover{--ezp-userMenu-link-background:var(--ezp-core-shade-primary)}.link__icon{color:var(--ezp-theme-solid);margin:calc(var(--ezp-spacing-2) * -1) 0}.caption{color:var(--ezp-core-foreground-primary)}#theme{-webkit-box-shadow:var(--ezp-userMenu-theme-boxShadowPosition, 0 1px 0 0) var(--ezp-core-outline);box-shadow:var(--ezp-userMenu-theme-boxShadowPosition, 0 1px 0 0) var(--ezp-core-outline);display:grid;gap:var(--ezp-spacing-3);grid-template:repeat(2, auto)/1fr;padding:var(--ezp-spacing-4) var(--ezp-spacing-4) var(--ezp-spacing-3)}#swatches{display:-ms-flexbox;display:flex;margin:0 calc(var(--ezp-spacing-2) * -1)}.swatch{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-userMenu-swatch-background, transparent);border:0;border-radius:50%;color:var(--ezp-userMenu-swatch-color);cursor:var(--ezp-userMenu-swatch-cursor, pointer);display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;margin:0;opacity:var(--ezp-userMenu-swatch-opacity, 1);outline:none;padding:var(--ezp-spacing-2)}@media (hover: hover){.swatch:not(.selected):hover{--ezp-userMenu-swatch-background:var(--ezp-userMenu-swatch-theme-translucent)}.swatch:not(.selected):active{--ezp-userMenu-swatch-opacity:0.74}}.swatch.selected{--ezp-userMenu-dot-boxShadowSize:10px;--ezp-userMenu-swatch-background:var(--ezp-userMenu-swatch-theme-translucent);--ezp-userMenu-swatch-cursor:normal}.swatch.selected>.dot{-webkit-animation:dot-bounce var(--ezp-duration-2) ease-in-out;animation:dot-bounce var(--ezp-duration-2) ease-in-out}.swatch--blue{--ezp-userMenu-swatch-theme-solid:var(--ezp-accent-blue-solid);--ezp-userMenu-swatch-theme-translucent:var(--ezp-accent-blue-translucent)}.swatch--cyan{--ezp-userMenu-swatch-theme-solid:var(--ezp-accent-cyan-solid);--ezp-userMenu-swatch-theme-translucent:var(--ezp-accent-cyan-translucent)}.swatch--green{--ezp-userMenu-swatch-theme-solid:var(--ezp-accent-green-solid);--ezp-userMenu-swatch-theme-translucent:var(--ezp-accent-green-translucent)}.swatch--teal{--ezp-userMenu-swatch-theme-solid:var(--ezp-accent-teal-solid);--ezp-userMenu-swatch-theme-translucent:var(--ezp-accent-teal-translucent)}.swatch--orange{--ezp-userMenu-swatch-theme-solid:var(--ezp-accent-orange-solid);--ezp-userMenu-swatch-theme-translucent:var(--ezp-accent-orange-translucent)}.swatch--pink{--ezp-userMenu-swatch-theme-solid:var(--ezp-accent-pink-solid);--ezp-userMenu-swatch-theme-translucent:var(--ezp-accent-pink-translucent)}.swatch--red{--ezp-userMenu-swatch-theme-solid:var(--ezp-accent-red-solid);--ezp-userMenu-swatch-theme-translucent:var(--ezp-accent-red-translucent)}.swatch--violet{--ezp-userMenu-swatch-theme-solid:var(--ezp-accent-violet-solid);--ezp-userMenu-swatch-theme-translucent:var(--ezp-accent-violet-translucent)}.dot{background:var(--ezp-userMenu-dot-background, transparent);border-radius:50%;-webkit-box-shadow:inset 0 0 0 var(--ezp-userMenu-dot-boxShadowSize, 4px) var(--ezp-userMenu-swatch-theme-solid);box-shadow:inset 0 0 0 var(--ezp-userMenu-dot-boxShadowSize, 4px) var(--ezp-userMenu-swatch-theme-solid);height:18px;-webkit-transition:-webkit-box-shadow var(--ezp-duration-2);transition:-webkit-box-shadow var(--ezp-duration-2);transition:box-shadow var(--ezp-duration-2);transition:box-shadow var(--ezp-duration-2), -webkit-box-shadow var(--ezp-duration-2);width:18px}#appearance{display:grid;gap:var(--ezp-spacing-3);grid-template:repeat(2, auto)/1fr;padding:var(--ezp-spacing-4) var(--ezp-spacing-4) var(--ezp-spacing-3)}#tabs{display:grid;grid-template:auto/repeat(3, 1fr);margin:0 calc(var(--ezp-spacing-2) * -1)}.tab{--ezp-icon-height:8px;-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-userMenu-tab-background, transparent);border:0;border-radius:14px;color:var(--ezp-userMenu-tab-color, var(--ezp-core-foreground-secondary));cursor:var(--ezp-userMenu-tab-cursor, pointer);display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-2);-ms-flex-pack:center;justify-content:center;margin:0;outline:none;padding:var(--ezp-spacing-3) var(--ezp-spacing-3) var(--ezp-spacing-3) var(--ezp-spacing-2)}@media (hover: hover){.tab:not(.selected):hover{--ezp-userMenu-tab-background:var(--ezp-core-shade-primary)}.tab:not(.selected):active{--ezp-userMenu-tab-background:var(--ezp-core-shade-secondary)}}.tab.selected{--ezp-userMenu-tab-background:var(--ezp-theme-translucent);--ezp-userMenu-tab-color:var(--ezp-theme-solid);--ezp-userMenu-tab-cursor:normal}@-webkit-keyframes dot-bounce{0%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}50%{-webkit-transform:scale(0.84, 0.84);transform:scale(0.84, 0.84)}100%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}}@keyframes dot-bounce{0%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}50%{-webkit-transform:scale(0.84, 0.84);transform:scale(0.84, 0.84)}100%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}}";var qv=e("ezp_user_menu",function(){function e(e){var t=this;n(this,e);this.userMenuClosure=a(this,"userMenuClosure",7);this.logoutEmitter=a(this,"logoutEmitter",7);this.backdrop=document.createElement("ezp-backdrop");this.links=[{title:ze.t("user_menu.account"),icon:"account",href:"https://app.ezeep.com"},{title:ze.t("user_menu.help"),icon:"help",href:"https://support.ezeep.com"}];this.themes=["pink","red","orange","green","teal","cyan","blue","violet"];this.appearances=[{title:ze.t("user_menu.system"),name:"system"},{title:ze.t("user_menu.light"),name:"light"},{title:ze.t("user_menu.dark"),name:"dark"}];this.name="John Doe";this.open=false;this.handleClose=function(){t.userMenuClosure.emit()};this.logOut=function(){localStorage.removeItem("properties");localStorage.removeItem("refreshToken");localStorage.removeItem("access_token");localStorage.removeItem("printer");localStorage.removeItem("isAuthorized");Ue.state.isAuthorized=false;t.logoutEmitter.emit()};this.handleTheme=function(e){hv.state.theme=e};this.handleAppearance=function(e){hv.state.appearance=e}}e.prototype.watchOpen=function(){if(this.open){this.backdrop.visible=true;this.container.appendChild(this.backdrop)}else{this.backdrop.visible=false;this.userMenuClosure.emit()}};e.prototype.componentWillLoad=function(){var e=this;this.container=this.component.closest("[data-backdrop-surface]");this.backdrop.addEventListener("backdropHideStart",(function(){e.open=false}));this.backdrop.addEventListener("backdropHideEnd",(function(){e.container.removeChild(e.backdrop)}))};e.prototype.render=function(){var e=this;return i(o,{class:this.open?"is-open":""},i("div",{id:"header"},i("ezp-label",{ellipsis:true,id:"name",weight:"heavy",text:this.name}),i("ezp-icon-button",{id:"close",level:"tertiary",icon:"close",onClick:this.handleClose})),i("div",{id:"links"},this.links.map((function(e){return i("a",{class:"link",href:e.href,target:"_blank",rel:"noopener noreferrer"},i("ezp-icon",{class:"link__icon",name:e.icon}),i("ezp-label",{text:e.title}))})),i("a",{class:"link",onClick:this.logOut},i("ezp-icon",{class:"link__icon",name:"logout"}),i("ezp-label",{text:ze.t("user_menu.logout")}))),i("div",{id:"theme"},i("ezp-label",{class:"caption",text:"".concat(ze.t("user_menu.theme"),":"),weight:"heavy"}),i("div",{id:"swatches"},this.themes.map((function(t){return i("button",{class:"swatch swatch--".concat(t," ").concat(t===hv.state.theme?"selected":""),onClick:function(){return e.handleTheme(t)}},i("span",{class:"dot"}))})))),i("div",{id:"appearance"},i("ezp-label",{class:"caption",text:"".concat(ze.t("user_menu.appearance"),":"),weight:"heavy"}),i("div",{id:"tabs"},this.appearances.map((function(t){return i("button",{class:"tab ".concat(t.name===hv.state.appearance?"selected":""),onClick:function(){return e.handleAppearance(t.name)}},i("ezp-icon",{name:t.name}),i("ezp-label",{text:t.title,level:"tertiary",weight:"strong"}))})))))};Object.defineProperty(e.prototype,"component",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{open:["watchOpen"]}},enumerable:false,configurable:true});return e}());qv.style=Bv}}}));
21
+ */var sh=50;ph.TYPED_ARRAY_SUPPORT=Mi.TYPED_ARRAY_SUPPORT!==undefined?Mi.TYPED_ARRAY_SUPPORT:true;function lh(){return ph.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function ch(e,t){if(lh()<t){throw new RangeError("Invalid typed array length")}if(ph.TYPED_ARRAY_SUPPORT){e=new Uint8Array(t);e.__proto__=ph.prototype}else{if(e===null){e=new ph(t)}e.length=t}return e}function ph(e,t,r){if(!ph.TYPED_ARRAY_SUPPORT&&!(this instanceof ph)){return new ph(e,t,r)}if(typeof e==="number"){if(typeof t==="string"){throw new Error("If encoding is specified then the first argument must be a string")}return fh(this,e)}return dh(this,e,t,r)}ph.poolSize=8192;ph._augment=function(e){e.__proto__=ph.prototype;return e};function dh(e,t,r,n){if(typeof t==="number"){throw new TypeError('"value" argument must not be a number')}if(typeof ArrayBuffer!=="undefined"&&t instanceof ArrayBuffer){return yh(e,t,r,n)}if(typeof t==="string"){return hh(e,t,r)}return vh(e,t)}ph.from=function(e,t,r){return dh(null,e,t,r)};if(ph.TYPED_ARRAY_SUPPORT){ph.prototype.__proto__=Uint8Array.prototype;ph.__proto__=Uint8Array}function uh(e){if(typeof e!=="number"){throw new TypeError('"size" argument must be a number')}else if(e<0){throw new RangeError('"size" argument must not be negative')}}function mh(e,t,r,n){uh(t);if(t<=0){return ch(e,t)}if(r!==undefined){return typeof n==="string"?ch(e,t).fill(r,n):ch(e,t).fill(r)}return ch(e,t)}ph.alloc=function(e,t,r){return mh(null,e,t,r)};function fh(e,t){uh(t);e=ch(e,t<0?0:bh(t)|0);if(!ph.TYPED_ARRAY_SUPPORT){for(var r=0;r<t;++r){e[r]=0}}return e}ph.allocUnsafe=function(e){return fh(null,e)};ph.allocUnsafeSlow=function(e){return fh(null,e)};function hh(e,t,r){if(typeof r!=="string"||r===""){r="utf8"}if(!ph.isEncoding(r)){throw new TypeError('"encoding" must be a valid string encoding')}var n=Nh(t,r)|0;e=ch(e,n);var a=e.write(t,r);if(a!==n){e=e.slice(0,a)}return e}function gh(e,t){var r=t.length<0?0:bh(t.length)|0;e=ch(e,r);for(var n=0;n<r;n+=1){e[n]=t[n]&255}return e}function yh(e,t,r,n){if(r<0||t.byteLength<r){throw new RangeError("'offset' is out of bounds")}if(t.byteLength<r+(n||0)){throw new RangeError("'length' is out of bounds")}if(r===undefined&&n===undefined){t=new Uint8Array(t)}else if(n===undefined){t=new Uint8Array(t,r)}else{t=new Uint8Array(t,r,n)}if(ph.TYPED_ARRAY_SUPPORT){e=t;e.__proto__=ph.prototype}else{e=gh(e,t)}return e}function vh(e,t){if(xh(t)){var r=bh(t.length)|0;e=ch(e,r);if(e.length===0){return e}t.copy(e,0,0,r);return e}if(t){if(typeof ArrayBuffer!=="undefined"&&t.buffer instanceof ArrayBuffer||"length"in t){if(typeof t.length!=="number"||rg(t.length)){return ch(e,0)}return gh(e,t)}if(t.type==="Buffer"&&oh(t.data)){return gh(e,t.data)}}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function bh(e){if(e>=lh()){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+lh().toString(16)+" bytes")}return e|0}ph.isBuffer=ng;function xh(e){return!!(e!=null&&e._isBuffer)}ph.compare=function e(t,r){if(!xh(t)||!xh(r)){throw new TypeError("Arguments must be Buffers")}if(t===r)return 0;var n=t.length;var a=r.length;for(var i=0,o=Math.min(n,a);i<o;++i){if(t[i]!==r[i]){n=t[i];a=r[i];break}}if(n<a)return-1;if(a<n)return 1;return 0};ph.isEncoding=function e(t){switch(String(t).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 true;default:return false}};ph.concat=function e(t,r){if(!oh(t)){throw new TypeError('"list" argument must be an Array of Buffers')}if(t.length===0){return ph.alloc(0)}var n;if(r===undefined){r=0;for(n=0;n<t.length;++n){r+=t[n].length}}var a=ph.allocUnsafe(r);var i=0;for(n=0;n<t.length;++n){var o=t[n];if(!xh(o)){throw new TypeError('"list" argument must be an Array of Buffers')}o.copy(a,i);i+=o.length}return a};function Nh(e,t){if(xh(e)){return e.length}if(typeof ArrayBuffer!=="undefined"&&typeof ArrayBuffer.isView==="function"&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer)){return e.byteLength}if(typeof e!=="string"){e=""+e}var r=e.length;if(r===0)return 0;var n=false;for(;;){switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case undefined:return Jh(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return eg(e).length;default:if(n)return Jh(e).length;t=(""+t).toLowerCase();n=true}}}ph.byteLength=Nh;function zh(e,t,r){var n=false;if(t===undefined||t<0){t=0}if(t>this.length){return""}if(r===undefined||r>this.length){r=this.length}if(r<=0){return""}r>>>=0;t>>>=0;if(r<=t){return""}if(!e)e="utf8";while(true){switch(e){case"hex":return Hh(this,t,r);case"utf8":case"utf-8":return Bh(this,t,r);case"ascii":return Ah(this,t,r);case"latin1":case"binary":return Ih(this,t,r);case"base64":return Th(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Lh(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase();n=true}}}ph.prototype._isBuffer=true;function Sh(e,t,r){var n=e[t];e[t]=e[r];e[r]=n}ph.prototype.swap16=function e(){var t=this.length;if(t%2!==0){throw new RangeError("Buffer size must be a multiple of 16-bits")}for(var r=0;r<t;r+=2){Sh(this,r,r+1)}return this};ph.prototype.swap32=function e(){var t=this.length;if(t%4!==0){throw new RangeError("Buffer size must be a multiple of 32-bits")}for(var r=0;r<t;r+=4){Sh(this,r,r+3);Sh(this,r+1,r+2)}return this};ph.prototype.swap64=function e(){var t=this.length;if(t%8!==0){throw new RangeError("Buffer size must be a multiple of 64-bits")}for(var r=0;r<t;r+=8){Sh(this,r,r+7);Sh(this,r+1,r+6);Sh(this,r+2,r+5);Sh(this,r+3,r+4)}return this};ph.prototype.toString=function e(){var t=this.length|0;if(t===0)return"";if(arguments.length===0)return Bh(this,0,t);return zh.apply(this,arguments)};ph.prototype.equals=function e(t){if(!xh(t))throw new TypeError("Argument must be a Buffer");if(this===t)return true;return ph.compare(this,t)===0};ph.prototype.inspect=function e(){var t="";var r=sh;if(this.length>0){t=this.toString("hex",0,r).match(/.{2}/g).join(" ");if(this.length>r)t+=" ... "}return"<Buffer "+t+">"};ph.prototype.compare=function e(t,r,n,a,i){if(!xh(t)){throw new TypeError("Argument must be a Buffer")}if(r===undefined){r=0}if(n===undefined){n=t?t.length:0}if(a===undefined){a=0}if(i===undefined){i=this.length}if(r<0||n>t.length||a<0||i>this.length){throw new RangeError("out of range index")}if(a>=i&&r>=n){return 0}if(a>=i){return-1}if(r>=n){return 1}r>>>=0;n>>>=0;a>>>=0;i>>>=0;if(this===t)return 0;var o=i-a;var s=n-r;var l=Math.min(o,s);var c=this.slice(a,i);var p=t.slice(r,n);for(var d=0;d<l;++d){if(c[d]!==p[d]){o=c[d];s=p[d];break}}if(o<s)return-1;if(s<o)return 1;return 0};function wh(e,t,r,n,a){if(e.length===0)return-1;if(typeof r==="string"){n=r;r=0}else if(r>2147483647){r=2147483647}else if(r<-2147483648){r=-2147483648}r=+r;if(isNaN(r)){r=a?0:e.length-1}if(r<0)r=e.length+r;if(r>=e.length){if(a)return-1;else r=e.length-1}else if(r<0){if(a)r=0;else return-1}if(typeof t==="string"){t=ph.from(t,n)}if(xh(t)){if(t.length===0){return-1}return Ph(e,t,r,n,a)}else if(typeof t==="number"){t=t&255;if(ph.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf==="function"){if(a){return Uint8Array.prototype.indexOf.call(e,t,r)}else{return Uint8Array.prototype.lastIndexOf.call(e,t,r)}}return Ph(e,[t],r,n,a)}throw new TypeError("val must be string, number or Buffer")}function Ph(e,t,r,n,a){var i=1;var o=e.length;var s=t.length;if(n!==undefined){n=String(n).toLowerCase();if(n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le"){if(e.length<2||t.length<2){return-1}i=2;o/=2;s/=2;r/=2}}function l(e,t){if(i===1){return e[t]}else{return e.readUInt16BE(t*i)}}var c;if(a){var p=-1;for(c=r;c<o;c++){if(l(e,c)===l(t,p===-1?0:c-p)){if(p===-1)p=c;if(c-p+1===s)return p*i}else{if(p!==-1)c-=c-p;p=-1}}}else{if(r+s>o)r=o-s;for(c=r;c>=0;c--){var d=true;for(var u=0;u<s;u++){if(l(e,c+u)!==l(t,u)){d=false;break}}if(d)return c}}return-1}ph.prototype.includes=function e(t,r,n){return this.indexOf(t,r,n)!==-1};ph.prototype.indexOf=function e(t,r,n){return wh(this,t,r,n,true)};ph.prototype.lastIndexOf=function e(t,r,n){return wh(this,t,r,n,false)};function Ch(e,t,r,n){r=Number(r)||0;var a=e.length-r;if(!n){n=a}else{n=Number(n);if(n>a){n=a}}var i=t.length;if(i%2!==0)throw new TypeError("Invalid hex string");if(n>i/2){n=i/2}for(var o=0;o<n;++o){var s=parseInt(t.substr(o*2,2),16);if(isNaN(s))return o;e[r+o]=s}return o}function Rh(e,t,r,n){return tg(Jh(t,e.length-r),e,r,n)}function _h(e,t,r,n){return tg($h(t),e,r,n)}function Eh(e,t,r,n){return _h(e,t,r,n)}function kh(e,t,r,n){return tg(eg(t),e,r,n)}function Oh(e,t,r,n){return tg(Zh(t,e.length-r),e,r,n)}ph.prototype.write=function e(t,r,n,a){if(r===undefined){a="utf8";n=this.length;r=0}else if(n===undefined&&typeof r==="string"){a=r;n=this.length;r=0}else if(isFinite(r)){r=r|0;if(isFinite(n)){n=n|0;if(a===undefined)a="utf8"}else{a=n;n=undefined}}else{throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported")}var i=this.length-r;if(n===undefined||n>i)n=i;if(t.length>0&&(n<0||r<0)||r>this.length){throw new RangeError("Attempt to write outside buffer bounds")}if(!a)a="utf8";var o=false;for(;;){switch(a){case"hex":return Ch(this,t,r,n);case"utf8":case"utf-8":return Rh(this,t,r,n);case"ascii":return _h(this,t,r,n);case"latin1":case"binary":return Eh(this,t,r,n);case"base64":return kh(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Oh(this,t,r,n);default:if(o)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase();o=true}}};ph.prototype.toJSON=function e(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Th(e,t,r){if(t===0&&r===e.length){return rh(e)}else{return rh(e.slice(t,r))}}function Bh(e,t,r){r=Math.min(e.length,r);var n=[];var a=t;while(a<r){var i=e[a];var o=null;var s=i>239?4:i>223?3:i>191?2:1;if(a+s<=r){var l,c,p,d;switch(s){case 1:if(i<128){o=i}break;case 2:l=e[a+1];if((l&192)===128){d=(i&31)<<6|l&63;if(d>127){o=d}}break;case 3:l=e[a+1];c=e[a+2];if((l&192)===128&&(c&192)===128){d=(i&15)<<12|(l&63)<<6|c&63;if(d>2047&&(d<55296||d>57343)){o=d}}break;case 4:l=e[a+1];c=e[a+2];p=e[a+3];if((l&192)===128&&(c&192)===128&&(p&192)===128){d=(i&15)<<18|(l&63)<<12|(c&63)<<6|p&63;if(d>65535&&d<1114112){o=d}}}}if(o===null){o=65533;s=1}else if(o>65535){o-=65536;n.push(o>>>10&1023|55296);o=56320|o&1023}n.push(o);a+=s}return Mh(n)}var qh=4096;function Mh(e){var t=e.length;if(t<=qh){return String.fromCharCode.apply(String,e)}var r="";var n=0;while(n<t){r+=String.fromCharCode.apply(String,e.slice(n,n+=qh))}return r}function Ah(e,t,r){var n="";r=Math.min(e.length,r);for(var a=t;a<r;++a){n+=String.fromCharCode(e[a]&127)}return n}function Ih(e,t,r){var n="";r=Math.min(e.length,r);for(var a=t;a<r;++a){n+=String.fromCharCode(e[a])}return n}function Hh(e,t,r){var n=e.length;if(!t||t<0)t=0;if(!r||r<0||r>n)r=n;var a="";for(var i=t;i<r;++i){a+=Yh(e[i])}return a}function Lh(e,t,r){var n=e.slice(t,r);var a="";for(var i=0;i<n.length;i+=2){a+=String.fromCharCode(n[i]+n[i+1]*256)}return a}ph.prototype.slice=function e(t,r){var n=this.length;t=~~t;r=r===undefined?n:~~r;if(t<0){t+=n;if(t<0)t=0}else if(t>n){t=n}if(r<0){r+=n;if(r<0)r=0}else if(r>n){r=n}if(r<t)r=t;var a;if(ph.TYPED_ARRAY_SUPPORT){a=this.subarray(t,r);a.__proto__=ph.prototype}else{var i=r-t;a=new ph(i,undefined);for(var o=0;o<i;++o){a[o]=this[o+t]}}return a};function Dh(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}ph.prototype.readUIntLE=function e(t,r,n){t=t|0;r=r|0;if(!n)Dh(t,r,this.length);var a=this[t];var i=1;var o=0;while(++o<r&&(i*=256)){a+=this[t+o]*i}return a};ph.prototype.readUIntBE=function e(t,r,n){t=t|0;r=r|0;if(!n){Dh(t,r,this.length)}var a=this[t+--r];var i=1;while(r>0&&(i*=256)){a+=this[t+--r]*i}return a};ph.prototype.readUInt8=function e(t,r){if(!r)Dh(t,1,this.length);return this[t]};ph.prototype.readUInt16LE=function e(t,r){if(!r)Dh(t,2,this.length);return this[t]|this[t+1]<<8};ph.prototype.readUInt16BE=function e(t,r){if(!r)Dh(t,2,this.length);return this[t]<<8|this[t+1]};ph.prototype.readUInt32LE=function e(t,r){if(!r)Dh(t,4,this.length);return(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};ph.prototype.readUInt32BE=function e(t,r){if(!r)Dh(t,4,this.length);return this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};ph.prototype.readIntLE=function e(t,r,n){t=t|0;r=r|0;if(!n)Dh(t,r,this.length);var a=this[t];var i=1;var o=0;while(++o<r&&(i*=256)){a+=this[t+o]*i}i*=128;if(a>=i)a-=Math.pow(2,8*r);return a};ph.prototype.readIntBE=function e(t,r,n){t=t|0;r=r|0;if(!n)Dh(t,r,this.length);var a=r;var i=1;var o=this[t+--a];while(a>0&&(i*=256)){o+=this[t+--a]*i}i*=128;if(o>=i)o-=Math.pow(2,8*r);return o};ph.prototype.readInt8=function e(t,r){if(!r)Dh(t,1,this.length);if(!(this[t]&128))return this[t];return(255-this[t]+1)*-1};ph.prototype.readInt16LE=function e(t,r){if(!r)Dh(t,2,this.length);var n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};ph.prototype.readInt16BE=function e(t,r){if(!r)Dh(t,2,this.length);var n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};ph.prototype.readInt32LE=function e(t,r){if(!r)Dh(t,4,this.length);return this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};ph.prototype.readInt32BE=function e(t,r){if(!r)Dh(t,4,this.length);return this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};ph.prototype.readFloatLE=function e(t,r){if(!r)Dh(t,4,this.length);return nh(this,t,true,23,4)};ph.prototype.readFloatBE=function e(t,r){if(!r)Dh(t,4,this.length);return nh(this,t,false,23,4)};ph.prototype.readDoubleLE=function e(t,r){if(!r)Dh(t,8,this.length);return nh(this,t,true,52,8)};ph.prototype.readDoubleBE=function e(t,r){if(!r)Dh(t,8,this.length);return nh(this,t,false,52,8)};function jh(e,t,r,n,a,i){if(!xh(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}ph.prototype.writeUIntLE=function e(t,r,n,a){t=+t;r=r|0;n=n|0;if(!a){var i=Math.pow(2,8*n)-1;jh(this,t,r,n,i,0)}var o=1;var s=0;this[r]=t&255;while(++s<n&&(o*=256)){this[r+s]=t/o&255}return r+n};ph.prototype.writeUIntBE=function e(t,r,n,a){t=+t;r=r|0;n=n|0;if(!a){var i=Math.pow(2,8*n)-1;jh(this,t,r,n,i,0)}var o=n-1;var s=1;this[r+o]=t&255;while(--o>=0&&(s*=256)){this[r+o]=t/s&255}return r+n};ph.prototype.writeUInt8=function e(t,r,n){t=+t;r=r|0;if(!n)jh(this,t,r,1,255,0);if(!ph.TYPED_ARRAY_SUPPORT)t=Math.floor(t);this[r]=t&255;return r+1};function Uh(e,t,r,n){if(t<0)t=65535+t+1;for(var a=0,i=Math.min(e.length-r,2);a<i;++a){e[r+a]=(t&255<<8*(n?a:1-a))>>>(n?a:1-a)*8}}ph.prototype.writeUInt16LE=function e(t,r,n){t=+t;r=r|0;if(!n)jh(this,t,r,2,65535,0);if(ph.TYPED_ARRAY_SUPPORT){this[r]=t&255;this[r+1]=t>>>8}else{Uh(this,t,r,true)}return r+2};ph.prototype.writeUInt16BE=function e(t,r,n){t=+t;r=r|0;if(!n)jh(this,t,r,2,65535,0);if(ph.TYPED_ARRAY_SUPPORT){this[r]=t>>>8;this[r+1]=t&255}else{Uh(this,t,r,false)}return r+2};function Fh(e,t,r,n){if(t<0)t=4294967295+t+1;for(var a=0,i=Math.min(e.length-r,4);a<i;++a){e[r+a]=t>>>(n?a:3-a)*8&255}}ph.prototype.writeUInt32LE=function e(t,r,n){t=+t;r=r|0;if(!n)jh(this,t,r,4,4294967295,0);if(ph.TYPED_ARRAY_SUPPORT){this[r+3]=t>>>24;this[r+2]=t>>>16;this[r+1]=t>>>8;this[r]=t&255}else{Fh(this,t,r,true)}return r+4};ph.prototype.writeUInt32BE=function e(t,r,n){t=+t;r=r|0;if(!n)jh(this,t,r,4,4294967295,0);if(ph.TYPED_ARRAY_SUPPORT){this[r]=t>>>24;this[r+1]=t>>>16;this[r+2]=t>>>8;this[r+3]=t&255}else{Fh(this,t,r,false)}return r+4};ph.prototype.writeIntLE=function e(t,r,n,a){t=+t;r=r|0;if(!a){var i=Math.pow(2,8*n-1);jh(this,t,r,n,i-1,-i)}var o=0;var s=1;var l=0;this[r]=t&255;while(++o<n&&(s*=256)){if(t<0&&l===0&&this[r+o-1]!==0){l=1}this[r+o]=(t/s>>0)-l&255}return r+n};ph.prototype.writeIntBE=function e(t,r,n,a){t=+t;r=r|0;if(!a){var i=Math.pow(2,8*n-1);jh(this,t,r,n,i-1,-i)}var o=n-1;var s=1;var l=0;this[r+o]=t&255;while(--o>=0&&(s*=256)){if(t<0&&l===0&&this[r+o+1]!==0){l=1}this[r+o]=(t/s>>0)-l&255}return r+n};ph.prototype.writeInt8=function e(t,r,n){t=+t;r=r|0;if(!n)jh(this,t,r,1,127,-128);if(!ph.TYPED_ARRAY_SUPPORT)t=Math.floor(t);if(t<0)t=255+t+1;this[r]=t&255;return r+1};ph.prototype.writeInt16LE=function e(t,r,n){t=+t;r=r|0;if(!n)jh(this,t,r,2,32767,-32768);if(ph.TYPED_ARRAY_SUPPORT){this[r]=t&255;this[r+1]=t>>>8}else{Uh(this,t,r,true)}return r+2};ph.prototype.writeInt16BE=function e(t,r,n){t=+t;r=r|0;if(!n)jh(this,t,r,2,32767,-32768);if(ph.TYPED_ARRAY_SUPPORT){this[r]=t>>>8;this[r+1]=t&255}else{Uh(this,t,r,false)}return r+2};ph.prototype.writeInt32LE=function e(t,r,n){t=+t;r=r|0;if(!n)jh(this,t,r,4,2147483647,-2147483648);if(ph.TYPED_ARRAY_SUPPORT){this[r]=t&255;this[r+1]=t>>>8;this[r+2]=t>>>16;this[r+3]=t>>>24}else{Fh(this,t,r,true)}return r+4};ph.prototype.writeInt32BE=function e(t,r,n){t=+t;r=r|0;if(!n)jh(this,t,r,4,2147483647,-2147483648);if(t<0)t=4294967295+t+1;if(ph.TYPED_ARRAY_SUPPORT){this[r]=t>>>24;this[r+1]=t>>>16;this[r+2]=t>>>8;this[r+3]=t&255}else{Fh(this,t,r,false)}return r+4};function Vh(e,t,r,n,a,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Kh(e,t,r,n,a){if(!a){Vh(e,t,r,4)}ah(e,t,r,n,23,4);return r+4}ph.prototype.writeFloatLE=function e(t,r,n){return Kh(this,t,r,true,n)};ph.prototype.writeFloatBE=function e(t,r,n){return Kh(this,t,r,false,n)};function Gh(e,t,r,n,a){if(!a){Vh(e,t,r,8)}ah(e,t,r,n,52,8);return r+8}ph.prototype.writeDoubleLE=function e(t,r,n){return Gh(this,t,r,true,n)};ph.prototype.writeDoubleBE=function e(t,r,n){return Gh(this,t,r,false,n)};ph.prototype.copy=function e(t,r,n,a){if(!n)n=0;if(!a&&a!==0)a=this.length;if(r>=t.length)r=t.length;if(!r)r=0;if(a>0&&a<n)a=n;if(a===n)return 0;if(t.length===0||this.length===0)return 0;if(r<0){throw new RangeError("targetStart out of bounds")}if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(a<0)throw new RangeError("sourceEnd out of bounds");if(a>this.length)a=this.length;if(t.length-r<a-n){a=t.length-r+n}var i=a-n;var o;if(this===t&&n<r&&r<a){for(o=i-1;o>=0;--o){t[o+r]=this[o+n]}}else if(i<1e3||!ph.TYPED_ARRAY_SUPPORT){for(o=0;o<i;++o){t[o+r]=this[o+n]}}else{Uint8Array.prototype.set.call(t,this.subarray(n,n+i),r)}return i};ph.prototype.fill=function e(t,r,n,a){if(typeof t==="string"){if(typeof r==="string"){a=r;r=0;n=this.length}else if(typeof n==="string"){a=n;n=this.length}if(t.length===1){var i=t.charCodeAt(0);if(i<256){t=i}}if(a!==undefined&&typeof a!=="string"){throw new TypeError("encoding must be a string")}if(typeof a==="string"&&!ph.isEncoding(a)){throw new TypeError("Unknown encoding: "+a)}}else if(typeof t==="number"){t=t&255}if(r<0||this.length<r||this.length<n){throw new RangeError("Out of range index")}if(n<=r){return this}r=r>>>0;n=n===undefined?this.length:n>>>0;if(!t)t=0;var o;if(typeof t==="number"){for(o=r;o<n;++o){this[o]=t}}else{var s=xh(t)?t:Jh(new ph(t,a).toString());var l=s.length;for(o=0;o<n-r;++o){this[o+r]=s[o%l]}}return this};var Wh=/[^+\/0-9A-Za-z-_]/g;function Xh(e){e=Qh(e).replace(Wh,"");if(e.length<2)return"";while(e.length%4!==0){e=e+"="}return e}function Qh(e){if(e.trim)return e.trim();return e.replace(/^\s+|\s+$/g,"")}function Yh(e){if(e<16)return"0"+e.toString(16);return e.toString(16)}function Jh(e,t){t=t||Infinity;var r;var n=e.length;var a=null;var i=[];for(var o=0;o<n;++o){r=e.charCodeAt(o);if(r>55295&&r<57344){if(!a){if(r>56319){if((t-=3)>-1)i.push(239,191,189);continue}else if(o+1===n){if((t-=3)>-1)i.push(239,191,189);continue}a=r;continue}if(r<56320){if((t-=3)>-1)i.push(239,191,189);a=r;continue}r=(a-55296<<10|r-56320)+65536}else if(a){if((t-=3)>-1)i.push(239,191,189)}a=null;if(r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else{throw new Error("Invalid code point")}}return i}function $h(e){var t=[];for(var r=0;r<e.length;++r){t.push(e.charCodeAt(r)&255)}return t}function Zh(e,t){var r,n,a;var i=[];for(var o=0;o<e.length;++o){if((t-=2)<0)break;r=e.charCodeAt(o);n=r>>8;a=r%256;i.push(a);i.push(n)}return i}function eg(e){return Zf(Xh(e))}function tg(e,t,r,n){for(var a=0;a<n;++a){if(a+r>=t.length||a>=e.length)break;t[a+r]=e[a]}return a}function rg(e){return e!==e}function ng(e){return e!=null&&(!!e._isBuffer||ag(e)||ig(e))}function ag(e){return!!e.constructor&&typeof e.constructor.isBuffer==="function"&&e.constructor.isBuffer(e)}function ig(e){return typeof e.readFloatLE==="function"&&typeof e.slice==="function"&&ag(e.slice(0,0))}function og(e){var t=Vr.parse(e);var r=t.getPath();r=r||"/";r=pg(r);t.setPath(r);return t.toString()}function sg(e){var t="";if(e.search("DevelopmentStorageProxyUri=")!==-1){var r=e.split(";");for(var n=0,a=r;n<a.length;n++){var i=a[n];if(i.trim().startsWith("DevelopmentStorageProxyUri=")){t=i.trim().match("DevelopmentStorageProxyUri=(.*)")[1]}}}return t}function lg(e,t){var r=e.split(";");for(var n=0,a=r;n<a.length;n++){var i=a[n];if(i.trim().startsWith(t)){return i.trim().match(t+"=(.*)")[1]}}return""}function cg(e){var t="";if(e.startsWith("UseDevelopmentStorage=true")){t=sg(e);e=Kf}var r=lg(e,"BlobEndpoint");r=r.endsWith("/")?r.slice(0,-1):r;if(e.search("DefaultEndpointsProtocol=")!==-1&&e.search("AccountKey=")!==-1){var n="";var a="";var i=ph.from("accountKey","base64");var o="";a=lg(e,"AccountName");i=ph.from(lg(e,"AccountKey"),"base64");if(!r){n=lg(e,"DefaultEndpointsProtocol");var s=n.toLowerCase();if(s!=="https"&&s!=="http"){throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'")}o=lg(e,"EndpointSuffix");if(!o){throw new Error("Invalid EndpointSuffix in the provided Connection String")}r="".concat(n,"://").concat(a,".blob.").concat(o)}if(!a){throw new Error("Invalid AccountName in the provided Connection String")}else if(i.length===0){throw new Error("Invalid AccountKey in the provided Connection String")}return{kind:"AccountConnString",url:r,accountName:a,accountKey:i,proxyUri:t}}else{var l=lg(e,"SharedAccessSignature");var a=Sg(r);if(!r){throw new Error("Invalid BlobEndpoint in the provided SAS Connection String")}else if(!l){throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String")}return{kind:"SASConnString",url:r,accountName:a,accountSas:l}}}function pg(e){return encodeURIComponent(e).replace(/%2F/g,"/").replace(/'/g,"%27").replace(/\+/g,"%20").replace(/%25/g,"%")}function dg(e,t){var r=Vr.parse(e);var n=r.getPath();n=n?n.endsWith("/")?"".concat(n).concat(t):"".concat(n,"/").concat(t):t;r.setPath(n);return r.toString()}function ug(e,t,r){var n=Vr.parse(e);n.setQueryParameter(t,r);return n.toString()}function mg(e,t){var r=Vr.parse(e);return r.getQueryParameterValue(t)}function fg(e,t){var r=Vr.parse(e);r.setHost(t);return r.toString()}function hg(e){var t=Vr.parse(e);return t.getScheme()}function gg(e,t){var r=Vr.parse(e);var n=r.getQuery();if(n){n+="&"+t}else{n=t}r.setQuery(n);return r.toString()}function yg(e,t){if(t===void 0){t=true}var r=e.toISOString();return t?r.substring(0,r.length-1)+"0000"+"Z":r.substring(0,r.length-5)+"Z"}function vg(e){return!Qt?btoa(e):ph.from(e).toString("base64")}function bg(e,t){var r=48;var n=6;var a=r-n;if(e.length>a){e=e.slice(0,a)}var i=e+Ng(t.toString(),r-e.length,"0");return vg(i)}function xg(e,t,r){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){return[2,new Promise((function(n,a){var i;var o=function(){if(i!==undefined){clearTimeout(i)}a(r)};var s=function(){if(t!==undefined){t.removeEventListener("abort",o)}n()};i=setTimeout(s,e);if(t!==undefined){t.addEventListener("abort",o)}}))]}))}))}function Ng(e,t,r){if(r===void 0){r=" "}if(String.prototype.padStart){return e.padStart(t,r)}r=r||" ";if(e.length>t){return e}else{t=t-e.length;if(t>r.length){r+=r.repeat(t/r.length)}return r.slice(0,t)+e}}function zg(e,t){return e.toLocaleLowerCase()===t.toLocaleLowerCase()}function Sg(e){var t=Vr.parse(e);var r;try{if(t.getHost().split(".")[1]==="blob"){r=t.getHost().split(".")[0]}else if(wg(t)){r=t.getPath().split("/")[1]}else{r=""}return r}catch(e){throw new Error("Unable to extract accountName with provided information.")}}function wg(e){if(e.getHost()===undefined){return false}var t=e.getHost()+(e.getPort()===undefined?"":":"+e.getPort());return/^.*:.*:.*$|^localhost(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(t)}function Pg(e){if(e===undefined){return undefined}var t=[];for(var r in e){if(Object.prototype.hasOwnProperty.call(e,r)){var n=e[r];t.push("".concat(encodeURIComponent(r),"=").concat(encodeURIComponent(n)))}}return t.join("&")}function Cg(e){if(e===undefined){return undefined}var t={blobTagSet:[]};for(var r in e){if(Object.prototype.hasOwnProperty.call(e,r)){var n=e[r];t.blobTagSet.push({key:r,value:n})}}return t}function Rg(e){if(e===undefined){return undefined}var t={};for(var r=0,n=e.blobTagSet;r<n.length;r++){var a=n[r];t[a.key]=a.value}return t}function _g(e){if(e===undefined){return undefined}switch(e.kind){case"csv":return{format:{type:"delimited",delimitedTextConfiguration:{columnSeparator:e.columnSeparator||",",fieldQuote:e.fieldQuote||"",recordSeparator:e.recordSeparator,escapeChar:e.escapeCharacter||"",headersPresent:e.hasHeaders||false}}};case"json":return{format:{type:"json",jsonTextConfiguration:{recordSeparator:e.recordSeparator}}};case"arrow":return{format:{type:"arrow",arrowConfiguration:{schema:e.schema}}};case"parquet":return{format:{type:"parquet"}};default:throw Error("Invalid BlobQueryTextConfiguration.")}}function Eg(e){if(!e){return undefined}if("policy-id"in e){return undefined}var t=[];var r=function(r){var n=r.split("_");var a="or-";if(n[0].startsWith(a)){n[0]=n[0].substring(a.length)}var i={ruleId:n[1],replicationStatus:e[r]};var o=t.findIndex((function(e){return e.policyId===n[0]}));if(o>-1){t[o].rules.push(i)}else{t.push({policyId:n[0],rules:[i]})}};for(var n in e){r(n)}return t}function kg(e,t){e.credential=t;return e}function Og(e){return e?e.scheme+" "+e.value:undefined}var Tg=function(e){Mr(t,e);function t(t,r){return e.call(this,t,r)||this}t.prototype.sendRequest=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(Qt){return[2,this._nextPolicy.sendRequest(e)]}if(e.method.toUpperCase()==="GET"||e.method.toUpperCase()==="HEAD"){e.url=ug(e.url,Df.Parameters.FORCE_BROWSER_NO_CACHE,(new Date).getTime().toString())}e.headers.remove(jf.COOKIE);e.headers.remove(jf.CONTENT_LENGTH);return[2,this._nextPolicy.sendRequest(e)]}))}))};return t}(Sn);var Bg=function(){function e(){}e.prototype.create=function(e,t){return new Tg(e,t)};return e}();var qg;(function(e){e[e["EXPONENTIAL"]=0]="EXPONENTIAL";e[e["FIXED"]=1]="FIXED"})(qg||(qg={}));var Mg={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:qg.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:undefined};var Ag=new jr("The operation was aborted.");var Ig=function(e){Mr(t,e);function t(t,r,n){if(n===void 0){n=Mg}var a=e.call(this,t,r)||this;a.retryOptions={retryPolicyType:n.retryPolicyType?n.retryPolicyType:Mg.retryPolicyType,maxTries:n.maxTries&&n.maxTries>=1?Math.floor(n.maxTries):Mg.maxTries,tryTimeoutInMs:n.tryTimeoutInMs&&n.tryTimeoutInMs>=0?n.tryTimeoutInMs:Mg.tryTimeoutInMs,retryDelayInMs:n.retryDelayInMs&&n.retryDelayInMs>=0?Math.min(n.retryDelayInMs,n.maxRetryDelayInMs?n.maxRetryDelayInMs:Mg.maxRetryDelayInMs):Mg.retryDelayInMs,maxRetryDelayInMs:n.maxRetryDelayInMs&&n.maxRetryDelayInMs>=0?n.maxRetryDelayInMs:Mg.maxRetryDelayInMs,secondaryHost:n.secondaryHost?n.secondaryHost:Mg.secondaryHost};return a}t.prototype.sendRequest=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.attemptSendRequest(e,false,1)]}))}))};t.prototype.attemptSendRequest=function(e,t,r){return __awaiter(this,void 0,void 0,(function(){var n,a,i,o;return __generator(this,(function(s){switch(s.label){case 0:n=e.clone();a=t||!this.retryOptions.secondaryHost||!(e.method==="GET"||e.method==="HEAD"||e.method==="OPTIONS")||r%2===1;if(!a){n.url=fg(n.url,this.retryOptions.secondaryHost)}if(this.retryOptions.tryTimeoutInMs){n.url=ug(n.url,Df.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString())}s.label=1;case 1:s.trys.push([1,3,,4]);kf.info("RetryPolicy: =====> Try=".concat(r," ").concat(a?"Primary":"Secondary"));return[4,this._nextPolicy.sendRequest(n)];case 2:i=s.sent();if(!this.shouldRetry(a,r,i)){return[2,i]}t=t||!a&&i.status===404;return[3,4];case 3:o=s.sent();kf.error("RetryPolicy: Caught error, message: ".concat(o.message,", code: ").concat(o.code));if(!this.shouldRetry(a,r,i,o)){throw o}return[3,4];case 4:return[4,this.delay(a,r,e.abortSignal)];case 5:s.sent();return[2,this.attemptSendRequest(e,t,++r)]}}))}))};t.prototype.shouldRetry=function(e,t,r,n){if(t>=this.retryOptions.maxTries){kf.info("RetryPolicy: Attempt(s) ".concat(t," >= maxTries ").concat(this.retryOptions.maxTries,", no further try."));return false}var a=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(n){for(var i=0,o=a;i<o.length;i++){var s=o[i];if(n.name.toUpperCase().includes(s)||n.message.toUpperCase().includes(s)||n.code&&n.code.toString().toUpperCase()===s){kf.info("RetryPolicy: Network error ".concat(s," found, will retry."));return true}}}if(r||n){var l=r?r.status:n?n.statusCode:0;if(!e&&l===404){kf.info("RetryPolicy: Secondary access with 404, will retry.");return true}if(l===503||l===500){kf.info("RetryPolicy: Will retry for status code ".concat(l,"."));return true}}if((n===null||n===void 0?void 0:n.code)==="PARSE_ERROR"&&(n===null||n===void 0?void 0:n.message.startsWith('Error "Error: Unclosed root tag'))){kf.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry.");return true}return false};t.prototype.delay=function(e,t,r){return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(a){n=0;if(e){switch(this.retryOptions.retryPolicyType){case qg.EXPONENTIAL:n=Math.min((Math.pow(2,t-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case qg.FIXED:n=this.retryOptions.retryDelayInMs;break}}else{n=Math.random()*1e3}kf.info("RetryPolicy: Delay for ".concat(n,"ms"));return[2,xg(n,r,Ag)]}))}))};return t}(Sn);var Hg=function(){function e(e){this.retryOptions=e}e.prototype.create=function(e,t){return new Ig(e,t,this.retryOptions)};return e}();var Lg=function(e){Mr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.sendRequest=function(e){return this._nextPolicy.sendRequest(this.signRequest(e))};t.prototype.signRequest=function(e){return e};return t}(Sn);var Dg=function(e){Mr(t,e);function t(t,r){return e.call(this,t,r)||this}return t}(Lg);var jg=function(){function e(){}e.prototype.create=function(e,t){throw new Error("Method should be implemented in children classes.")};return e}();var Ug=function(e){Mr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.create=function(e,t){return new Dg(e,t)};return t}(jg);var Fg=function(e){Mr(t,e);function t(t,r,n){var a=e.call(this,t,r)||this;a.telemetry=n;return a}t.prototype.sendRequest=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(Qt){if(!e.headers){e.headers=new Tt}if(!e.headers.get(jf.USER_AGENT)){e.headers.set(jf.USER_AGENT,this.telemetry)}}return[2,this._nextPolicy.sendRequest(e)]}))}))};return t}(Sn);var Vg=function(){function e(e){var t=[];if(Qt){if(e){var r=e.userAgentPrefix||"";if(r.length>0&&t.indexOf(r)===-1){t.push(r)}}var n="azsdk-js-storageblob/".concat(Of);if(t.indexOf(n)===-1){t.push(n)}var a="(NODE-VERSION ".concat(da.version,"; ").concat(undefined()," ").concat(undefined(),")");if(t.indexOf(a)===-1){t.push(a)}}this.telemetryString=t.join(" ")}e.prototype.create=function(e,t){return new Fg(e,t,this.telemetryString)};return e}();var Kg=new gn;function Gg(){return Kg}function Wg(e){if(!e||typeof e!=="object"){return false}var t=e;return Array.isArray(t.factories)&&typeof t.options==="object"&&typeof t.toServiceClientOptions==="function"}var Xg=function(){function e(e,t){if(t===void 0){t={}}this.factories=e;this.options=Object.assign(Object.assign({},t),{httpClient:t.httpClient||Gg()})}e.prototype.toServiceClientOptions=function(){return{httpClient:this.options.httpClient,requestPolicyFactories:this.factories}};return e}();function Qg(e,t){if(t===void 0){t={}}if(e===undefined){e=new Ug}var r=new Vg(t.userAgentOptions);var n=[ps({userAgent:r.telemetryString}),Qn(t.keepAliveOptions),r,pi(),new Bg,new Hg(t.retryOptions),Hn(undefined,{xmlCharKey:"#"}),Fa({logger:kf.info,allowedHeaderNames:Gf,allowedQueryParameters:Wf})];if(Qt){n.push(gi());n.push(ci())}n.push(Xa(e)?kg(si(e,Lf),e):e);return new Xg(n,t)}var Yg=function(){function e(){}return e}();var Jg="azure-storage-blob";var $g="12.8.0";var Zg=function(e){Mr(t,e);function t(t,r){var n=this;if(t===undefined){throw new Error("'url' cannot be null")}if(!r){r={}}if(!r.userAgent){var a=ei();r.userAgent="".concat(Jg,"/").concat($g," ").concat(a)}n=e.call(this,undefined,r)||this;n.requestContentType="application/json; charset=utf-8";n.baseUri=r.endpoint||"{url}";n.url=t;n.version=r.version||"2020-10-02";return n}return t}(us);var ey=function(){function e(e,t){this.url=og(e);this.accountName=Sg(e);this.pipeline=t;this.storageClientContext=new Zg(this.url,t.toServiceClientOptions());this.isHttps=zg(hg(this.url)||"","https");this.credential=new Ug;for(var r=0,n=this.pipeline.factories;r<n.length;r++){var a=n[r];if(Qt&&a instanceof Yg||a instanceof Ug){this.credential=a}else if(Xa(a.credential)){this.credential=a.credential}}var i=this.storageClientContext;i.requestContentType=undefined}return e}();var ty=os({packagePrefix:"Azure.Storage.Blob",namespace:"Microsoft.Storage"});function ry(e){var t,r;return{spanOptions:(t=e===null||e===void 0?void 0:e.tracingOptions)===null||t===void 0?void 0:t.spanOptions,tracingContext:(r=e===null||e===void 0?void 0:e.tracingOptions)===null||r===void 0?void 0:r.tracingContext}}var ny=function(){function e(){this.read=false;this.add=false;this.create=false;this.write=false;this.delete=false;this.deleteVersion=false;this.tag=false;this.move=false;this.execute=false;this.setImmutabilityPolicy=false}e.parse=function(t){var r=new e;for(var n=0,a=t;n<a.length;n++){var i=a[n];switch(i){case"r":r.read=true;break;case"a":r.add=true;break;case"c":r.create=true;break;case"w":r.write=true;break;case"d":r.delete=true;break;case"x":r.deleteVersion=true;break;case"t":r.tag=true;break;case"m":r.move=true;break;case"e":r.execute=true;break;case"i":r.setImmutabilityPolicy=true;break;default:throw new RangeError("Invalid permission: ".concat(i))}}return r};e.from=function(t){var r=new e;if(t.read){r.read=true}if(t.add){r.add=true}if(t.create){r.create=true}if(t.write){r.write=true}if(t.delete){r.delete=true}if(t.deleteVersion){r.deleteVersion=true}if(t.tag){r.tag=true}if(t.move){r.move=true}if(t.execute){r.execute=true}if(t.setImmutabilityPolicy){r.setImmutabilityPolicy=true}return r};e.prototype.toString=function(){var e=[];if(this.read){e.push("r")}if(this.add){e.push("a")}if(this.create){e.push("c")}if(this.write){e.push("w")}if(this.delete){e.push("d")}if(this.deleteVersion){e.push("x")}if(this.tag){e.push("t")}if(this.move){e.push("m")}if(this.execute){e.push("e")}if(this.setImmutabilityPolicy){e.push("i")}return e.join("")};return e}();var ay=function(){function e(){this.read=false;this.add=false;this.create=false;this.write=false;this.delete=false;this.deleteVersion=false;this.list=false;this.tag=false;this.move=false;this.execute=false;this.setImmutabilityPolicy=false}e.parse=function(t){var r=new e;for(var n=0,a=t;n<a.length;n++){var i=a[n];switch(i){case"r":r.read=true;break;case"a":r.add=true;break;case"c":r.create=true;break;case"w":r.write=true;break;case"d":r.delete=true;break;case"l":r.list=true;break;case"t":r.tag=true;break;case"x":r.deleteVersion=true;break;case"m":r.move=true;break;case"e":r.execute=true;break;case"i":r.setImmutabilityPolicy=true;break;default:throw new RangeError("Invalid permission ".concat(i))}}return r};e.from=function(t){var r=new e;if(t.read){r.read=true}if(t.add){r.add=true}if(t.create){r.create=true}if(t.write){r.write=true}if(t.delete){r.delete=true}if(t.list){r.list=true}if(t.deleteVersion){r.deleteVersion=true}if(t.tag){r.tag=true}if(t.move){r.move=true}if(t.execute){r.execute=true}if(t.setImmutabilityPolicy){r.setImmutabilityPolicy=true}return r};e.prototype.toString=function(){var e=[];if(this.read){e.push("r")}if(this.add){e.push("a")}if(this.create){e.push("c")}if(this.write){e.push("w")}if(this.delete){e.push("d")}if(this.deleteVersion){e.push("x")}if(this.list){e.push("l")}if(this.tag){e.push("t")}if(this.move){e.push("m")}if(this.execute){e.push("e")}if(this.setImmutabilityPolicy){e.push("i")}return e.join("")};return e}();var iy=function(){function e(){}return e}();function oy(e){return e.end?"".concat(e.start,"-").concat(e.end):e.start}var sy;(function(e){e["Https"]="https";e["HttpsAndHttp"]="https,http"})(sy||(sy={}));var ly=function(){function e(e,t,r,n,a,i,o,s,l,c,p,d,u,m,f,h,g,y,v){this.version=e;this.signature=t;if(r!==undefined&&typeof r!=="string"){this.permissions=r.permissions;this.services=r.services;this.resourceTypes=r.resourceTypes;this.protocol=r.protocol;this.startsOn=r.startsOn;this.expiresOn=r.expiresOn;this.ipRangeInner=r.ipRange;this.identifier=r.identifier;this.resource=r.resource;this.cacheControl=r.cacheControl;this.contentDisposition=r.contentDisposition;this.contentEncoding=r.contentEncoding;this.contentLanguage=r.contentLanguage;this.contentType=r.contentType;if(r.userDelegationKey){this.signedOid=r.userDelegationKey.signedObjectId;this.signedTenantId=r.userDelegationKey.signedTenantId;this.signedStartsOn=r.userDelegationKey.signedStartsOn;this.signedExpiresOn=r.userDelegationKey.signedExpiresOn;this.signedService=r.userDelegationKey.signedService;this.signedVersion=r.userDelegationKey.signedVersion;this.preauthorizedAgentObjectId=r.preauthorizedAgentObjectId;this.correlationId=r.correlationId}}else{this.services=n;this.resourceTypes=a;this.expiresOn=s;this.permissions=r;this.protocol=i;this.startsOn=o;this.ipRangeInner=l;this.identifier=c;this.resource=p;this.cacheControl=d;this.contentDisposition=u;this.contentEncoding=m;this.contentLanguage=f;this.contentType=h;if(g){this.signedOid=g.signedObjectId;this.signedTenantId=g.signedTenantId;this.signedStartsOn=g.signedStartsOn;this.signedExpiresOn=g.signedExpiresOn;this.signedService=g.signedService;this.signedVersion=g.signedVersion;this.preauthorizedAgentObjectId=y;this.correlationId=v}}}Object.defineProperty(e.prototype,"ipRange",{get:function(){if(this.ipRangeInner){return{end:this.ipRangeInner.end,start:this.ipRangeInner.start}}return undefined},enumerable:false,configurable:true});e.prototype.toString=function(){var e=["sv","ss","srt","spr","st","se","sip","si","skoid","sktid","skt","ske","sks","skv","sr","sp","sig","rscc","rscd","rsce","rscl","rsct","saoid","scid"];var t=[];for(var r=0,n=e;r<n.length;r++){var a=n[r];switch(a){case"sv":this.tryAppendQueryParameter(t,a,this.version);break;case"ss":this.tryAppendQueryParameter(t,a,this.services);break;case"srt":this.tryAppendQueryParameter(t,a,this.resourceTypes);break;case"spr":this.tryAppendQueryParameter(t,a,this.protocol);break;case"st":this.tryAppendQueryParameter(t,a,this.startsOn?yg(this.startsOn,false):undefined);break;case"se":this.tryAppendQueryParameter(t,a,this.expiresOn?yg(this.expiresOn,false):undefined);break;case"sip":this.tryAppendQueryParameter(t,a,this.ipRange?oy(this.ipRange):undefined);break;case"si":this.tryAppendQueryParameter(t,a,this.identifier);break;case"skoid":this.tryAppendQueryParameter(t,a,this.signedOid);break;case"sktid":this.tryAppendQueryParameter(t,a,this.signedTenantId);break;case"skt":this.tryAppendQueryParameter(t,a,this.signedStartsOn?yg(this.signedStartsOn,false):undefined);break;case"ske":this.tryAppendQueryParameter(t,a,this.signedExpiresOn?yg(this.signedExpiresOn,false):undefined);break;case"sks":this.tryAppendQueryParameter(t,a,this.signedService);break;case"skv":this.tryAppendQueryParameter(t,a,this.signedVersion);break;case"sr":this.tryAppendQueryParameter(t,a,this.resource);break;case"sp":this.tryAppendQueryParameter(t,a,this.permissions);break;case"sig":this.tryAppendQueryParameter(t,a,this.signature);break;case"rscc":this.tryAppendQueryParameter(t,a,this.cacheControl);break;case"rscd":this.tryAppendQueryParameter(t,a,this.contentDisposition);break;case"rsce":this.tryAppendQueryParameter(t,a,this.contentEncoding);break;case"rscl":this.tryAppendQueryParameter(t,a,this.contentLanguage);break;case"rsct":this.tryAppendQueryParameter(t,a,this.contentType);break;case"saoid":this.tryAppendQueryParameter(t,a,this.preauthorizedAgentObjectId);break;case"scid":this.tryAppendQueryParameter(t,a,this.correlationId);break}}return t.join("&")};e.prototype.tryAppendQueryParameter=function(e,t,r){if(!r){return}t=encodeURIComponent(t);r=encodeURIComponent(r);if(t.length>0&&r.length>0){e.push("".concat(t,"=").concat(r))}};return e}();function cy(e,t,r){var n=e.version?e.version:Tf;var a=t instanceof Yg?t:undefined;var i;if(a===undefined&&r!==undefined){i=new iy(r,t)}if(a===undefined&&i===undefined){throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName.")}if(n>="2018-11-09"){if(a!==undefined){return dy(e,a)}else{if(n>="2020-02-10"){return my(e,i)}else{return uy(e,i)}}}if(n>="2015-04-05"){if(a!==undefined){return py(e,a)}else{throw new RangeError("'version' must be >= '2018-11-09' when generating user delegation SAS using user delegation key.")}}throw new RangeError("'version' must be >= '2015-04-05'.")}function py(e,t){e=hy(e);if(!e.identifier&&!(e.permissions&&e.expiresOn)){throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.")}var r="c";if(e.blobName){r="b"}var n;if(e.permissions){if(e.blobName){n=ny.parse(e.permissions.toString()).toString()}else{n=ay.parse(e.permissions.toString()).toString()}}var a=[n?n:"",e.startsOn?yg(e.startsOn,false):"",e.expiresOn?yg(e.expiresOn,false):"",fy(t.accountName,e.containerName,e.blobName),e.identifier,e.ipRange?oy(e.ipRange):"",e.protocol?e.protocol:"",e.version,e.cacheControl?e.cacheControl:"",e.contentDisposition?e.contentDisposition:"",e.contentEncoding?e.contentEncoding:"",e.contentLanguage?e.contentLanguage:"",e.contentType?e.contentType:""].join("\n");var i=t.computeHMACSHA256(a);return new ly(e.version,i,n,undefined,undefined,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,r,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType)}function dy(e,t){e=hy(e);if(!e.identifier&&!(e.permissions&&e.expiresOn)){throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.")}var r="c";var n=e.snapshotTime;if(e.blobName){r="b";if(e.snapshotTime){r="bs"}else if(e.versionId){r="bv";n=e.versionId}}var a;if(e.permissions){if(e.blobName){a=ny.parse(e.permissions.toString()).toString()}else{a=ay.parse(e.permissions.toString()).toString()}}var i=[a?a:"",e.startsOn?yg(e.startsOn,false):"",e.expiresOn?yg(e.expiresOn,false):"",fy(t.accountName,e.containerName,e.blobName),e.identifier,e.ipRange?oy(e.ipRange):"",e.protocol?e.protocol:"",e.version,r,n,e.cacheControl?e.cacheControl:"",e.contentDisposition?e.contentDisposition:"",e.contentEncoding?e.contentEncoding:"",e.contentLanguage?e.contentLanguage:"",e.contentType?e.contentType:""].join("\n");var o=t.computeHMACSHA256(i);return new ly(e.version,o,a,undefined,undefined,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,r,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType)}function uy(e,t){e=hy(e);if(!e.permissions||!e.expiresOn){throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.")}var r="c";var n=e.snapshotTime;if(e.blobName){r="b";if(e.snapshotTime){r="bs"}else if(e.versionId){r="bv";n=e.versionId}}var a;if(e.permissions){if(e.blobName){a=ny.parse(e.permissions.toString()).toString()}else{a=ay.parse(e.permissions.toString()).toString()}}var i=[a?a:"",e.startsOn?yg(e.startsOn,false):"",e.expiresOn?yg(e.expiresOn,false):"",fy(t.accountName,e.containerName,e.blobName),t.userDelegationKey.signedObjectId,t.userDelegationKey.signedTenantId,t.userDelegationKey.signedStartsOn?yg(t.userDelegationKey.signedStartsOn,false):"",t.userDelegationKey.signedExpiresOn?yg(t.userDelegationKey.signedExpiresOn,false):"",t.userDelegationKey.signedService,t.userDelegationKey.signedVersion,e.ipRange?oy(e.ipRange):"",e.protocol?e.protocol:"",e.version,r,n,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType].join("\n");var o=t.computeHMACSHA256(i);return new ly(e.version,o,a,undefined,undefined,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,r,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,t.userDelegationKey)}function my(e,t){e=hy(e);if(!e.permissions||!e.expiresOn){throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.")}var r="c";var n=e.snapshotTime;if(e.blobName){r="b";if(e.snapshotTime){r="bs"}else if(e.versionId){r="bv";n=e.versionId}}var a;if(e.permissions){if(e.blobName){a=ny.parse(e.permissions.toString()).toString()}else{a=ay.parse(e.permissions.toString()).toString()}}var i=[a?a:"",e.startsOn?yg(e.startsOn,false):"",e.expiresOn?yg(e.expiresOn,false):"",fy(t.accountName,e.containerName,e.blobName),t.userDelegationKey.signedObjectId,t.userDelegationKey.signedTenantId,t.userDelegationKey.signedStartsOn?yg(t.userDelegationKey.signedStartsOn,false):"",t.userDelegationKey.signedExpiresOn?yg(t.userDelegationKey.signedExpiresOn,false):"",t.userDelegationKey.signedService,t.userDelegationKey.signedVersion,e.preauthorizedAgentObjectId,undefined,e.correlationId,e.ipRange?oy(e.ipRange):"",e.protocol?e.protocol:"",e.version,r,n,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType].join("\n");var o=t.computeHMACSHA256(i);return new ly(e.version,o,a,undefined,undefined,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,r,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,t.userDelegationKey,e.preauthorizedAgentObjectId,e.correlationId)}function fy(e,t,r){var n=["/blob/".concat(e,"/").concat(t)];if(r){n.push("/".concat(r))}return n.join("")}function hy(e){var t=e.version?e.version:Tf;if(e.snapshotTime&&t<"2018-11-09"){throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.")}if(e.blobName===undefined&&e.snapshotTime){throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.")}if(e.versionId&&t<"2019-10-10"){throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.")}if(e.blobName===undefined&&e.versionId){throw RangeError("Must provide 'blobName' when providing 'versionId'.")}if(e.permissions&&e.permissions.setImmutabilityPolicy&&t<"2020-08-04"){throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.")}if(e.permissions&&e.permissions.deleteVersion&&t<"2019-10-10"){throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.")}if(e.permissions&&e.permissions.tag&&t<"2019-12-12"){throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.")}if(t<"2020-02-10"&&e.permissions&&(e.permissions.move||e.permissions.execute)){throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.")}if(t<"2020-02-10"&&(e.preauthorizedAgentObjectId||e.correlationId)){throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.")}e.version=t;return e}var gy=function(){function e(e,t){var r=new Zg(e.url,e.pipeline.toServiceClientOptions());this._url=e.url;if(e.name===undefined){this._isContainer=true;this._containerOrBlobOperation=new pm(r)}else{this._isContainer=false;this._containerOrBlobOperation=new Em(r)}if(!t){t=Jt()}this._leaseId=t}Object.defineProperty(e.prototype,"leaseId",{get:function(){return this._leaseId},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"url",{get:function(){return this._url},enumerable:false,configurable:true});e.prototype.acquireLease=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o,s,l,c,p,d;return __generator(this,(function(u){switch(u.label){case 0:l=ty("BlobLeaseClient-acquireLease",t),c=l.span,p=l.updatedOptions;if(this._isContainer&&(((r=t.conditions)===null||r===void 0?void 0:r.ifMatch)&&((n=t.conditions)===null||n===void 0?void 0:n.ifMatch)!==Uf||((a=t.conditions)===null||a===void 0?void 0:a.ifNoneMatch)&&((i=t.conditions)===null||i===void 0?void 0:i.ifNoneMatch)!==Uf||((o=t.conditions)===null||o===void 0?void 0:o.tagConditions))){throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.")}u.label=1;case 1:u.trys.push([1,3,4,5]);return[4,this._containerOrBlobOperation.acquireLease(Object.assign({abortSignal:t.abortSignal,duration:e,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(s=t.conditions)===null||s===void 0?void 0:s.tagConditions}),proposedLeaseId:this._leaseId},ry(p)))];case 2:return[2,u.sent()];case 3:d=u.sent();c.setStatus({code:as.ERROR,message:d.message});throw d;case 4:c.end();return[7];case 5:return[2]}}))}))};e.prototype.changeLease=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o,s,l,c,p,d,u;return __generator(this,(function(m){switch(m.label){case 0:l=ty("BlobLeaseClient-changeLease",t),c=l.span,p=l.updatedOptions;if(this._isContainer&&(((r=t.conditions)===null||r===void 0?void 0:r.ifMatch)&&((n=t.conditions)===null||n===void 0?void 0:n.ifMatch)!==Uf||((a=t.conditions)===null||a===void 0?void 0:a.ifNoneMatch)&&((i=t.conditions)===null||i===void 0?void 0:i.ifNoneMatch)!==Uf||((o=t.conditions)===null||o===void 0?void 0:o.tagConditions))){throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.")}m.label=1;case 1:m.trys.push([1,3,4,5]);return[4,this._containerOrBlobOperation.changeLease(this._leaseId,e,Object.assign({abortSignal:t.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(s=t.conditions)===null||s===void 0?void 0:s.tagConditions})},ry(p)))];case 2:d=m.sent();this._leaseId=e;return[2,d];case 3:u=m.sent();c.setStatus({code:as.ERROR,message:u.message});throw u;case 4:c.end();return[7];case 5:return[2]}}))}))};e.prototype.releaseLease=function(e){if(e===void 0){e={}}return __awaiter(this,void 0,void 0,(function(){var t,r,n,a,i,o,s,l,c,p;return __generator(this,(function(d){switch(d.label){case 0:s=ty("BlobLeaseClient-releaseLease",e),l=s.span,c=s.updatedOptions;if(this._isContainer&&(((t=e.conditions)===null||t===void 0?void 0:t.ifMatch)&&((r=e.conditions)===null||r===void 0?void 0:r.ifMatch)!==Uf||((n=e.conditions)===null||n===void 0?void 0:n.ifNoneMatch)&&((a=e.conditions)===null||a===void 0?void 0:a.ifNoneMatch)!==Uf||((i=e.conditions)===null||i===void 0?void 0:i.tagConditions))){throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.")}d.label=1;case 1:d.trys.push([1,3,4,5]);return[4,this._containerOrBlobOperation.releaseLease(this._leaseId,Object.assign({abortSignal:e.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(o=e.conditions)===null||o===void 0?void 0:o.tagConditions})},ry(c)))];case 2:return[2,d.sent()];case 3:p=d.sent();l.setStatus({code:as.ERROR,message:p.message});throw p;case 4:l.end();return[7];case 5:return[2]}}))}))};e.prototype.renewLease=function(e){if(e===void 0){e={}}return __awaiter(this,void 0,void 0,(function(){var t,r,n,a,i,o,s,l,c,p;return __generator(this,(function(d){switch(d.label){case 0:s=ty("BlobLeaseClient-renewLease",e),l=s.span,c=s.updatedOptions;if(this._isContainer&&(((t=e.conditions)===null||t===void 0?void 0:t.ifMatch)&&((r=e.conditions)===null||r===void 0?void 0:r.ifMatch)!==Uf||((n=e.conditions)===null||n===void 0?void 0:n.ifNoneMatch)&&((a=e.conditions)===null||a===void 0?void 0:a.ifNoneMatch)!==Uf||((i=e.conditions)===null||i===void 0?void 0:i.tagConditions))){throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.")}d.label=1;case 1:d.trys.push([1,3,4,5]);return[4,this._containerOrBlobOperation.renewLease(this._leaseId,Object.assign({abortSignal:e.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(o=e.conditions)===null||o===void 0?void 0:o.tagConditions})},ry(c)))];case 2:return[2,d.sent()];case 3:p=d.sent();l.setStatus({code:as.ERROR,message:p.message});throw p;case 4:l.end();return[7];case 5:return[2]}}))}))};e.prototype.breakLease=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o,s,l,c,p,d,u;return __generator(this,(function(m){switch(m.label){case 0:l=ty("BlobLeaseClient-breakLease",t),c=l.span,p=l.updatedOptions;if(this._isContainer&&(((r=t.conditions)===null||r===void 0?void 0:r.ifMatch)&&((n=t.conditions)===null||n===void 0?void 0:n.ifMatch)!==Uf||((a=t.conditions)===null||a===void 0?void 0:a.ifNoneMatch)&&((i=t.conditions)===null||i===void 0?void 0:i.ifNoneMatch)!==Uf||((o=t.conditions)===null||o===void 0?void 0:o.tagConditions))){throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.")}m.label=1;case 1:m.trys.push([1,3,4,5]);d=Object.assign({abortSignal:t.abortSignal,breakPeriod:e,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(s=t.conditions)===null||s===void 0?void 0:s.tagConditions})},ry(p));return[4,this._containerOrBlobOperation.breakLease(d)];case 2:return[2,m.sent()];case 3:u=m.sent();c.setStatus({code:as.ERROR,message:u.message});throw u;case 4:c.end();return[7];case 5:return[2]}}))}))};return e}();var yy=1;var vy=function(){function e(e,t){if(t===void 0){t={}}this.originalResponse=e}Object.defineProperty(e.prototype,"acceptRanges",{get:function(){return this.originalResponse.acceptRanges},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"cacheControl",{get:function(){return this.originalResponse.cacheControl},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"contentDisposition",{get:function(){return this.originalResponse.contentDisposition},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"contentEncoding",{get:function(){return this.originalResponse.contentEncoding},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"contentLanguage",{get:function(){return this.originalResponse.contentLanguage},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"blobSequenceNumber",{get:function(){return this.originalResponse.blobSequenceNumber},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"blobType",{get:function(){return this.originalResponse.blobType},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"contentLength",{get:function(){return this.originalResponse.contentLength},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"contentMD5",{get:function(){return this.originalResponse.contentMD5},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"contentRange",{get:function(){return this.originalResponse.contentRange},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"contentType",{get:function(){return this.originalResponse.contentType},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"copyCompletedOn",{get:function(){return undefined},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"copyId",{get:function(){return this.originalResponse.copyId},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"copyProgress",{get:function(){return this.originalResponse.copyProgress},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"copySource",{get:function(){return this.originalResponse.copySource},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"copyStatus",{get:function(){return this.originalResponse.copyStatus},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"copyStatusDescription",{get:function(){return this.originalResponse.copyStatusDescription},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"leaseDuration",{get:function(){return this.originalResponse.leaseDuration},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"leaseState",{get:function(){return this.originalResponse.leaseState},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"leaseStatus",{get:function(){return this.originalResponse.leaseStatus},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"date",{get:function(){return this.originalResponse.date},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"blobCommittedBlockCount",{get:function(){return this.originalResponse.blobCommittedBlockCount},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"etag",{get:function(){return this.originalResponse.etag},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"errorCode",{get:function(){return this.originalResponse.errorCode},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isServerEncrypted",{get:function(){return this.originalResponse.isServerEncrypted},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"blobContentMD5",{get:function(){return this.originalResponse.blobContentMD5},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"lastModified",{get:function(){return this.originalResponse.lastModified},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"metadata",{get:function(){return this.originalResponse.metadata},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"requestId",{get:function(){return this.originalResponse.requestId},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"clientRequestId",{get:function(){return this.originalResponse.clientRequestId},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"version",{get:function(){return this.originalResponse.version},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"encryptionKeySha256",{get:function(){return this.originalResponse.encryptionKeySha256},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"contentCrc64",{get:function(){return this.originalResponse.contentCrc64},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"blobBody",{get:function(){throw Error("Quick query in browser is not supported yet.")},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"readableStreamBody",{get:function(){return undefined},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"_response",{get:function(){return this.originalResponse._response},enumerable:false,configurable:true});return e}();var by;(function(e){e["Hot"]="Hot";e["Cool"]="Cool";e["Archive"]="Archive"})(by||(by={}));var xy;(function(e){e["P4"]="P4";e["P6"]="P6";e["P10"]="P10";e["P15"]="P15";e["P20"]="P20";e["P30"]="P30";e["P40"]="P40";e["P50"]="P50";e["P60"]="P60";e["P70"]="P70";e["P80"]="P80"})(xy||(xy={}));function Ny(e){if(e===undefined){return undefined}return e}function zy(e,t){if(e&&!t){throw new RangeError("Customer-provided encryption key must be used over HTTPS.")}if(e&&!e.encryptionAlgorithm){e.encryptionAlgorithm=Vf}}function Sy(e){var t=(e._response.parsedBody.pageRange||[]).map((function(e){return{offset:e.start,count:e.end-e.start}}));var r=(e._response.parsedBody.clearRange||[]).map((function(e){return{offset:e.start,count:e.end-e.start}}));return Object.assign(Object.assign({},e),{pageRange:t,clearRange:r,_response:Object.assign(Object.assign({},e._response),{parsedBody:{pageRange:t,clearRange:r}})})}var wy=function(e){Mr(t,e);function t(r){var n=e.call(this,r)||this;n.name="PollerStoppedError";Object.setPrototypeOf(n,t.prototype);return n}return t}(Error);var Py=function(e){Mr(t,e);function t(r){var n=e.call(this,r)||this;n.name="PollerCancelledError";Object.setPrototypeOf(n,t.prototype);return n}return t}(Error);var Cy=function(){function e(e){var t=this;this.stopped=true;this.pollProgressCallbacks=[];this.operation=e;this.promise=new Promise((function(e,r){t.resolve=e;t.reject=r}));this.promise.catch((function(){}))}e.prototype.startPolling=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:if(this.stopped){this.stopped=false}e.label=1;case 1:if(!(!this.isStopped()&&!this.isDone()))return[3,4];return[4,this.poll()];case 2:e.sent();return[4,this.delay()];case 3:e.sent();return[3,1];case 4:return[2]}}))}))};e.prototype.pollOnce=function(e){if(e===void 0){e={}}return __awaiter(this,void 0,void 0,(function(){var t,r;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);if(!!this.isDone())return[3,2];t=this;return[4,this.operation.update({abortSignal:e.abortSignal,fireProgress:this.fireProgress.bind(this)})];case 1:t.operation=n.sent();if(this.isDone()&&this.resolve){this.resolve(this.operation.state.result)}n.label=2;case 2:return[3,4];case 3:r=n.sent();this.operation.state.error=r;if(this.reject){this.reject(r)}throw r;case 4:return[2]}}))}))};e.prototype.fireProgress=function(e){for(var t=0,r=this.pollProgressCallbacks;t<r.length;t++){var n=r[t];n(e)}};e.prototype.cancelOnce=function(e){if(e===void 0){e={}}return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(r){switch(r.label){case 0:t=this;return[4,this.operation.cancel(e)];case 1:t.operation=r.sent();if(this.reject){this.reject(new Py("Poller cancelled"))}return[2]}}))}))};e.prototype.poll=function(e){var t=this;if(e===void 0){e={}}if(!this.pollOncePromise){this.pollOncePromise=this.pollOnce(e);var r=function(){t.pollOncePromise=undefined};this.pollOncePromise.then(r,r).catch(this.reject)}return this.pollOncePromise};e.prototype.pollUntilDone=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(this.stopped){this.startPolling().catch(this.reject)}return[2,this.promise]}))}))};e.prototype.onProgress=function(e){var t=this;this.pollProgressCallbacks.push(e);return function(){t.pollProgressCallbacks=t.pollProgressCallbacks.filter((function(t){return t!==e}))}};e.prototype.isDone=function(){var e=this.operation.state;return Boolean(e.isCompleted||e.isCancelled||e.error)};e.prototype.stopPolling=function(){if(!this.stopped){this.stopped=true;if(this.reject){this.reject(new wy("This poller is already stopped"))}}};e.prototype.isStopped=function(){return this.stopped};e.prototype.cancelOperation=function(e){if(e===void 0){e={}}if(!this.stopped){this.stopped=true}if(!this.cancelPromise){this.cancelPromise=this.cancelOnce(e)}else if(e.abortSignal){throw new Error("A cancel request is currently pending")}return this.cancelPromise};e.prototype.getOperationState=function(){return this.operation.state};e.prototype.getResult=function(){var e=this.operation.state;return e.result};e.prototype.toString=function(){return this.operation.toString()};return e}();var Ry=function(e){Mr(t,e);function t(t){var r=this;var n=t.blobClient,a=t.copySource,i=t.intervalInMs,o=i===void 0?15e3:i,s=t.onProgress,l=t.resumeFrom,c=t.startCopyFromURLOptions;var p;if(l){p=JSON.parse(l).state}var d=Oy(Object.assign(Object.assign({},p),{blobClient:n,copySource:a,startCopyFromURLOptions:c}));r=e.call(this,d)||this;if(typeof s==="function"){r.onProgress(s)}r.intervalInMs=o;return r}t.prototype.delay=function(){return pa(this.intervalInMs)};return t}(Cy);var _y=function e(t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var e,r;return __generator(this,(function(n){switch(n.label){case 0:e=this.state;r=e.copyId;if(e.isCompleted){return[2,Oy(e)]}if(!r){e.isCancelled=true;return[2,Oy(e)]}return[4,e.blobClient.abortCopyFromURL(r,{abortSignal:t.abortSignal})];case 1:n.sent();e.isCancelled=true;return[2,Oy(e)]}}))}))};var Ey=function e(t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var e,r,n,a,i,i,o,s,l,c;return __generator(this,(function(p){switch(p.label){case 0:e=this.state;r=e.blobClient,n=e.copySource,a=e.startCopyFromURLOptions;if(!!e.isStarted)return[3,2];e.isStarted=true;return[4,r.startCopyFromURL(n,a)];case 1:i=p.sent();e.copyId=i.copyId;if(i.copyStatus==="success"){e.result=i;e.isCompleted=true}return[3,6];case 2:if(!!e.isCompleted)return[3,6];p.label=3;case 3:p.trys.push([3,5,,6]);return[4,e.blobClient.getProperties({abortSignal:t.abortSignal})];case 4:i=p.sent();o=i.copyStatus,s=i.copyProgress;l=e.copyProgress;if(s){e.copyProgress=s}if(o==="pending"&&s!==l&&typeof t.fireProgress==="function"){t.fireProgress(e)}else if(o==="success"){e.result=i;e.isCompleted=true}else if(o==="failed"){e.error=new Error('Blob copy failed with reason: "'.concat(i.copyStatusDescription||"unknown",'"'));e.isCompleted=true}return[3,6];case 5:c=p.sent();e.error=c;e.isCompleted=true;return[3,6];case 6:return[2,Oy(e)]}}))}))};var ky=function e(){return JSON.stringify({state:this.state},(function(e,t){if(e==="blobClient"){return undefined}return t}))};function Oy(e){return{state:Object.assign({},e),cancel:_y,toString:ky,update:Ey}}function Ty(e){if(e.offset<0){throw new RangeError("Range.offset cannot be smaller than 0.")}if(e.count&&e.count<=0){throw new RangeError("Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end.")}return e.count?"bytes=".concat(e.offset,"-").concat(e.offset+e.count-1):"bytes=".concat(e.offset,"-")}var By=typeof Reflect==="object"?Reflect:null;var qy=By&&typeof By.apply==="function"?By.apply:function e(t,r,n){return Function.prototype.apply.call(t,r,n)};var My;if(By&&typeof By.ownKeys==="function"){My=By.ownKeys}else if(Object.getOwnPropertySymbols){My=function e(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}}else{My=function e(t){return Object.getOwnPropertyNames(t)}}function Ay(e){if(console&&console.warn)console.warn(e)}var Iy=Number.isNaN||function e(t){return t!==t};function Hy(){Hy.init.call(this)}var Ly=Hy;var Dy=$y;Hy.EventEmitter=Hy;Hy.prototype._events=undefined;Hy.prototype._eventsCount=0;Hy.prototype._maxListeners=undefined;var jy=10;function Uy(e){if(typeof e!=="function"){throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}}Object.defineProperty(Hy,"defaultMaxListeners",{enumerable:true,get:function(){return jy},set:function(e){if(typeof e!=="number"||e<0||Iy(e)){throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".")}jy=e}});Hy.init=function(){if(this._events===undefined||this._events===Object.getPrototypeOf(this)._events){this._events=Object.create(null);this._eventsCount=0}this._maxListeners=this._maxListeners||undefined};Hy.prototype.setMaxListeners=function e(t){if(typeof t!=="number"||t<0||Iy(t)){throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".")}this._maxListeners=t;return this};function Fy(e){if(e._maxListeners===undefined)return Hy.defaultMaxListeners;return e._maxListeners}Hy.prototype.getMaxListeners=function e(){return Fy(this)};Hy.prototype.emit=function e(t){var r=[];for(var n=1;n<arguments.length;n++)r.push(arguments[n]);var a=t==="error";var i=this._events;if(i!==undefined)a=a&&i.error===undefined;else if(!a)return false;if(a){var o;if(r.length>0)o=r[0];if(o instanceof Error){throw o}var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));s.context=o;throw s}var l=i[t];if(l===undefined)return false;if(typeof l==="function"){qy(l,this,r)}else{var c=l.length;var p=Qy(l,c);for(var n=0;n<c;++n)qy(p[n],this,r)}return true};function Vy(e,t,r,n){var a;var i;var o;Uy(r);i=e._events;if(i===undefined){i=e._events=Object.create(null);e._eventsCount=0}else{if(i.newListener!==undefined){e.emit("newListener",t,r.listener?r.listener:r);i=e._events}o=i[t]}if(o===undefined){o=i[t]=r;++e._eventsCount}else{if(typeof o==="function"){o=i[t]=n?[r,o]:[o,r]}else if(n){o.unshift(r)}else{o.push(r)}a=Fy(e);if(a>0&&o.length>a&&!o.warned){o.warned=true;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners "+"added. Use emitter.setMaxListeners() to "+"increase limit");s.name="MaxListenersExceededWarning";s.emitter=e;s.type=t;s.count=o.length;Ay(s)}}return e}Hy.prototype.addListener=function e(t,r){return Vy(this,t,r,false)};Hy.prototype.on=Hy.prototype.addListener;Hy.prototype.prependListener=function e(t,r){return Vy(this,t,r,true)};function Ky(){if(!this.fired){this.target.removeListener(this.type,this.wrapFn);this.fired=true;if(arguments.length===0)return this.listener.call(this.target);return this.listener.apply(this.target,arguments)}}function Gy(e,t,r){var n={fired:false,wrapFn:undefined,target:e,type:t,listener:r};var a=Ky.bind(n);a.listener=r;n.wrapFn=a;return a}Hy.prototype.once=function e(t,r){Uy(r);this.on(t,Gy(this,t,r));return this};Hy.prototype.prependOnceListener=function e(t,r){Uy(r);this.prependListener(t,Gy(this,t,r));return this};Hy.prototype.removeListener=function e(t,r){var n,a,i,o,s;Uy(r);a=this._events;if(a===undefined)return this;n=a[t];if(n===undefined)return this;if(n===r||n.listener===r){if(--this._eventsCount===0)this._events=Object.create(null);else{delete a[t];if(a.removeListener)this.emit("removeListener",t,n.listener||r)}}else if(typeof n!=="function"){i=-1;for(o=n.length-1;o>=0;o--){if(n[o]===r||n[o].listener===r){s=n[o].listener;i=o;break}}if(i<0)return this;if(i===0)n.shift();else{Yy(n,i)}if(n.length===1)a[t]=n[0];if(a.removeListener!==undefined)this.emit("removeListener",t,s||r)}return this};Hy.prototype.off=Hy.prototype.removeListener;Hy.prototype.removeAllListeners=function e(t){var r,n,a;n=this._events;if(n===undefined)return this;if(n.removeListener===undefined){if(arguments.length===0){this._events=Object.create(null);this._eventsCount=0}else if(n[t]!==undefined){if(--this._eventsCount===0)this._events=Object.create(null);else delete n[t]}return this}if(arguments.length===0){var i=Object.keys(n);var o;for(a=0;a<i.length;++a){o=i[a];if(o==="removeListener")continue;this.removeAllListeners(o)}this.removeAllListeners("removeListener");this._events=Object.create(null);this._eventsCount=0;return this}r=n[t];if(typeof r==="function"){this.removeListener(t,r)}else if(r!==undefined){for(a=r.length-1;a>=0;a--){this.removeListener(t,r[a])}}return this};function Wy(e,t,r){var n=e._events;if(n===undefined)return[];var a=n[t];if(a===undefined)return[];if(typeof a==="function")return r?[a.listener||a]:[a];return r?Jy(a):Qy(a,a.length)}Hy.prototype.listeners=function e(t){return Wy(this,t,true)};Hy.prototype.rawListeners=function e(t){return Wy(this,t,false)};Hy.listenerCount=function(e,t){if(typeof e.listenerCount==="function"){return e.listenerCount(t)}else{return Xy.call(e,t)}};Hy.prototype.listenerCount=Xy;function Xy(e){var t=this._events;if(t!==undefined){var r=t[e];if(typeof r==="function"){return 1}else if(r!==undefined){return r.length}}return 0}Hy.prototype.eventNames=function e(){return this._eventsCount>0?My(this._events):[]};function Qy(e,t){var r=new Array(t);for(var n=0;n<t;++n)r[n]=e[n];return r}function Yy(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function Jy(e){var t=new Array(e.length);for(var r=0;r<t.length;++r){t[r]=e[r].listener||e[r]}return t}function $y(e,t){return new Promise((function(r,n){function a(r){e.removeListener(t,i);n(r)}function i(){if(typeof e.removeListener==="function"){e.removeListener("error",a)}r([].slice.call(arguments))}ev(e,t,i,{once:true});if(t!=="error"){Zy(e,a,{once:true})}}))}function Zy(e,t,r){if(typeof e.on==="function"){ev(e,"error",t,r)}}function ev(e,t,r,n){if(typeof e.on==="function"){if(n.once){e.once(t,r)}else{e.on(t,r)}}else if(typeof e.addEventListener==="function"){e.addEventListener(t,(function a(i){if(n.once){e.removeEventListener(t,a)}r(i)}))}else{throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}}Ly.once=Dy;var tv;(function(e){e[e["Good"]=0]="Good";e[e["Error"]=1]="Error"})(tv||(tv={}));var rv=function(){function e(e){if(e===void 0){e=5}this.actives=0;this.completed=0;this.offset=0;this.operations=[];this.state=tv.Good;if(e<1){throw new RangeError("concurrency must be larger than 0")}this.concurrency=e;this.emitter=new Ly.EventEmitter}e.prototype.addOperation=function(e){var t=this;this.operations.push((function(){return __awaiter(t,void 0,void 0,(function(){var t;return __generator(this,(function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);this.actives++;return[4,e()];case 1:r.sent();this.actives--;this.completed++;this.parallelExecute();return[3,3];case 2:t=r.sent();this.emitter.emit("error",t);return[3,3];case 3:return[2]}}))}))}))};e.prototype.do=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){if(this.operations.length===0){return[2,Promise.resolve()]}this.parallelExecute();return[2,new Promise((function(t,r){e.emitter.on("finish",t);e.emitter.on("error",(function(t){e.state=tv.Error;r(t)}))}))]}))}))};e.prototype.nextOperation=function(){if(this.offset<this.operations.length){return this.operations[this.offset++]}return null};e.prototype.parallelExecute=function(){if(this.state===tv.Error){return}if(this.completed>=this.operations.length){this.emitter.emit("finish");return}while(this.actives<this.concurrency){var e=this.nextOperation();if(e){e()}else{return}}};return e}();var nv=function(){function e(){}return e}();function av(){}function iv(){}var ov=function e(){};var sv=function e(){};var lv=function(e){Mr(t,e);function t(t,r,n,a){var i;var o=this;a=a||{};var s;var l;if(Wg(r)){l=t;s=r}else if(Qt&&r instanceof Yg||r instanceof Ug||Xa(r)){l=t;a=n;s=Qg(r,a)}else if(!r&&typeof r!=="string"){l=t;s=Qg(new Ug,a)}else if(r&&typeof r==="string"&&n&&typeof n==="string"){var c=r;var p=n;var d=cg(t);if(d.kind==="AccountConnString"){if(Qt){var u=new Yg(d.accountName,d.accountKey);l=dg(dg(d.url,encodeURIComponent(c)),encodeURIComponent(p));a.proxyOptions=hi();s=Qg(u,a)}else{throw new Error("Account connection string is only supported in Node.js environment")}}else if(d.kind==="SASConnString"){l=dg(dg(d.url,encodeURIComponent(c)),encodeURIComponent(p))+"?"+d.accountSas;s=Qg(new Ug,a)}else{throw new Error("Connection string must be either an Account connection string or a SAS connection string")}}else{throw new Error("Expecting non-empty strings for containerName and blobName parameters")}o=e.call(this,l,s)||this;i=o.getBlobAndContainerNamesFromUrl(),o._name=i.blobName,o._containerName=i.containerName;o.blobContext=new Em(o.storageClientContext);o._snapshot=mg(o.url,Df.Parameters.SNAPSHOT);o._versionId=mg(o.url,Df.Parameters.VERSIONID);return o}Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"containerName",{get:function(){return this._containerName},enumerable:false,configurable:true});t.prototype.withSnapshot=function(e){return new t(ug(this.url,Df.Parameters.SNAPSHOT,e.length===0?undefined:e),this.pipeline)};t.prototype.withVersion=function(e){return new t(ug(this.url,Df.Parameters.VERSIONID,e.length===0?undefined:e),this.pipeline)};t.prototype.getAppendBlobClient=function(){return new cv(this.url,this.pipeline)};t.prototype.getBlockBlobClient=function(){return new pv(this.url,this.pipeline)};t.prototype.getPageBlobClient=function(){return new dv(this.url,this.pipeline)};t.prototype.download=function(e,t,r){if(e===void 0){e=0}if(r===void 0){r={}}return __awaiter(this,void 0,void 0,(function(){var n,a,i,o,s,l,c;var p=this;return __generator(this,(function(d){switch(d.label){case 0:r.conditions=r.conditions||{};r.conditions=r.conditions||{};zy(r.customerProvidedKey,this.isHttps);a=ty("BlobClient-download",r),i=a.span,o=a.updatedOptions;d.label=1;case 1:d.trys.push([1,3,4,5]);return[4,this.blobContext.download(Object.assign({abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:(n=r.conditions)===null||n===void 0?void 0:n.tagConditions}),requestOptions:{onDownloadProgress:Qt?undefined:r.onProgress},range:e===0&&!t?undefined:Ty({offset:e,count:t}),rangeGetContentMD5:r.rangeGetContentMD5,rangeGetContentCRC64:r.rangeGetContentCrc64,snapshot:r.snapshot,cpkInfo:r.customerProvidedKey},ry(o)))];case 2:s=d.sent();l=Object.assign(Object.assign({},s),{_response:s._response,objectReplicationDestinationPolicyId:s.objectReplicationPolicyId,objectReplicationSourceProperties:Eg(s.objectReplicationRules)});if(!Qt){return[2,l]}if(r.maxRetryRequests===undefined||r.maxRetryRequests<0){r.maxRetryRequests=Hf}if(s.contentLength===undefined){throw new RangeError("File download response doesn't contain valid content length header")}if(!s.etag){throw new RangeError("File download response doesn't contain valid etag header")}return[2,new yy(l,(function(t){return __awaiter(p,void 0,void 0,(function(){var n,a;return __generator(this,(function(i){switch(i.label){case 0:a={leaseAccessConditions:r.conditions,modifiedAccessConditions:{ifMatch:r.conditions.ifMatch||s.etag,ifModifiedSince:r.conditions.ifModifiedSince,ifNoneMatch:r.conditions.ifNoneMatch,ifUnmodifiedSince:r.conditions.ifUnmodifiedSince,ifTags:(n=r.conditions)===null||n===void 0?void 0:n.tagConditions},range:Ty({count:e+s.contentLength-t,offset:t}),rangeGetContentMD5:r.rangeGetContentMD5,rangeGetContentCRC64:r.rangeGetContentCrc64,snapshot:r.snapshot,cpkInfo:r.customerProvidedKey};return[4,this.blobContext.download(Object.assign({abortSignal:r.abortSignal},a))];case 1:return[2,i.sent().readableStreamBody]}}))}))}),e,s.contentLength,{maxRetryRequests:r.maxRetryRequests,onProgress:r.onProgress})];case 3:c=d.sent();i.setStatus({code:as.ERROR,message:c.message});throw c;case 4:i.end();return[7];case 5:return[2]}}))}))};t.prototype.exists=function(e){if(e===void 0){e={}}return __awaiter(this,void 0,void 0,(function(){var t,r,n,a;return __generator(this,(function(i){switch(i.label){case 0:t=ty("BlobClient-exists",e),r=t.span,n=t.updatedOptions;i.label=1;case 1:i.trys.push([1,3,4,5]);zy(e.customerProvidedKey,this.isHttps);return[4,this.getProperties({abortSignal:e.abortSignal,customerProvidedKey:e.customerProvidedKey,conditions:e.conditions,tracingOptions:n.tracingOptions})];case 2:i.sent();return[2,true];case 3:a=i.sent();if(a.statusCode===404){r.setStatus({code:as.ERROR,message:"Expected exception when checking blob existence"});return[2,false]}r.setStatus({code:as.ERROR,message:a.message});throw a;case 4:r.end();return[7];case 5:return[2]}}))}))};t.prototype.getProperties=function(e){if(e===void 0){e={}}return __awaiter(this,void 0,void 0,(function(){var t,r,n,a,i,o;return __generator(this,(function(s){switch(s.label){case 0:r=ty("BlobClient-getProperties",e),n=r.span,a=r.updatedOptions;s.label=1;case 1:s.trys.push([1,3,4,5]);e.conditions=e.conditions||{};zy(e.customerProvidedKey,this.isHttps);return[4,this.blobContext.getProperties(Object.assign({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(t=e.conditions)===null||t===void 0?void 0:t.tagConditions}),cpkInfo:e.customerProvidedKey},ry(a)))];case 2:i=s.sent();return[2,Object.assign(Object.assign({},i),{_response:i._response,objectReplicationDestinationPolicyId:i.objectReplicationPolicyId,objectReplicationSourceProperties:Eg(i.objectReplicationRules)})];case 3:o=s.sent();n.setStatus({code:as.ERROR,message:o.message});throw o;case 4:n.end();return[7];case 5:return[2]}}))}))};t.prototype.delete=function(e){if(e===void 0){e={}}return __awaiter(this,void 0,void 0,(function(){var t,r,n,a,i;return __generator(this,(function(o){switch(o.label){case 0:r=ty("BlobClient-delete",e),n=r.span,a=r.updatedOptions;e.conditions=e.conditions||{};o.label=1;case 1:o.trys.push([1,3,4,5]);return[4,this.blobContext.delete(Object.assign({abortSignal:e.abortSignal,deleteSnapshots:e.deleteSnapshots,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(t=e.conditions)===null||t===void 0?void 0:t.tagConditions})},ry(a)))];case 2:return[2,o.sent()];case 3:i=o.sent();n.setStatus({code:as.ERROR,message:i.message});throw i;case 4:n.end();return[7];case 5:return[2]}}))}))};t.prototype.deleteIfExists=function(e){if(e===void 0){e={}}return __awaiter(this,void 0,void 0,(function(){var t,r,n,a,i,o,s;return __generator(this,(function(l){switch(l.label){case 0:n=ty("BlobClient-deleteIfExists",e),a=n.span,i=n.updatedOptions;l.label=1;case 1:l.trys.push([1,3,4,5]);return[4,this.delete(i)];case 2:o=l.sent();return[2,Object.assign(Object.assign({succeeded:true},o),{_response:o._response})];case 3:s=l.sent();if(((t=s.details)===null||t===void 0?void 0:t.errorCode)==="BlobNotFound"){a.setStatus({code:as.ERROR,message:"Expected exception when deleting a blob or snapshot only if it exists."});return[2,Object.assign(Object.assign({succeeded:false},(r=s.response)===null||r===void 0?void 0:r.parsedHeaders),{_response:s.response})]}a.setStatus({code:as.ERROR,message:s.message});throw s;case 4:a.end();return[7];case 5:return[2]}}))}))};t.prototype.undelete=function(e){if(e===void 0){e={}}return __awaiter(this,void 0,void 0,(function(){var t,r,n,a;return __generator(this,(function(i){switch(i.label){case 0:t=ty("BlobClient-undelete",e),r=t.span,n=t.updatedOptions;i.label=1;case 1:i.trys.push([1,3,4,5]);return[4,this.blobContext.undelete(Object.assign({abortSignal:e.abortSignal},ry(n)))];case 2:return[2,i.sent()];case 3:a=i.sent();r.setStatus({code:as.ERROR,message:a.message});throw a;case 4:r.end();return[7];case 5:return[2]}}))}))};t.prototype.setHTTPHeaders=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o;return __generator(this,(function(s){switch(s.label){case 0:n=ty("BlobClient-setHTTPHeaders",t),a=n.span,i=n.updatedOptions;t.conditions=t.conditions||{};s.label=1;case 1:s.trys.push([1,3,4,5]);zy(t.customerProvidedKey,this.isHttps);return[4,this.blobContext.setHttpHeaders(Object.assign({abortSignal:t.abortSignal,blobHttpHeaders:e,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions})},ry(i)))];case 2:return[2,s.sent()];case 3:o=s.sent();a.setStatus({code:as.ERROR,message:o.message});throw o;case 4:a.end();return[7];case 5:return[2]}}))}))};t.prototype.setMetadata=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o;return __generator(this,(function(s){switch(s.label){case 0:n=ty("BlobClient-setMetadata",t),a=n.span,i=n.updatedOptions;t.conditions=t.conditions||{};s.label=1;case 1:s.trys.push([1,3,4,5]);zy(t.customerProvidedKey,this.isHttps);return[4,this.blobContext.setMetadata(Object.assign({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,metadata:e,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions}),cpkInfo:t.customerProvidedKey,encryptionScope:t.encryptionScope},ry(i)))];case 2:return[2,s.sent()];case 3:o=s.sent();a.setStatus({code:as.ERROR,message:o.message});throw o;case 4:a.end();return[7];case 5:return[2]}}))}))};t.prototype.setTags=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o;return __generator(this,(function(s){switch(s.label){case 0:n=ty("BlobClient-setTags",t),a=n.span,i=n.updatedOptions;s.label=1;case 1:s.trys.push([1,3,4,5]);return[4,this.blobContext.setTags(Object.assign(Object.assign({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions})},ry(i)),{tags:Cg(e)}))];case 2:return[2,s.sent()];case 3:o=s.sent();a.setStatus({code:as.ERROR,message:o.message});throw o;case 4:a.end();return[7];case 5:return[2]}}))}))};t.prototype.getTags=function(e){if(e===void 0){e={}}return __awaiter(this,void 0,void 0,(function(){var t,r,n,a,i,o,s;return __generator(this,(function(l){switch(l.label){case 0:r=ty("BlobClient-getTags",e),n=r.span,a=r.updatedOptions;l.label=1;case 1:l.trys.push([1,3,4,5]);return[4,this.blobContext.getTags(Object.assign({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(t=e.conditions)===null||t===void 0?void 0:t.tagConditions})},ry(a)))];case 2:i=l.sent();o=Object.assign(Object.assign({},i),{_response:i._response,tags:Rg({blobTagSet:i.blobTagSet})||{}});return[2,o];case 3:s=l.sent();n.setStatus({code:as.ERROR,message:s.message});throw s;case 4:n.end();return[7];case 5:return[2]}}))}))};t.prototype.getBlobLeaseClient=function(e){return new gy(this,e)};t.prototype.createSnapshot=function(e){if(e===void 0){e={}}return __awaiter(this,void 0,void 0,(function(){var t,r,n,a,i;return __generator(this,(function(o){switch(o.label){case 0:r=ty("BlobClient-createSnapshot",e),n=r.span,a=r.updatedOptions;e.conditions=e.conditions||{};o.label=1;case 1:o.trys.push([1,3,4,5]);zy(e.customerProvidedKey,this.isHttps);return[4,this.blobContext.createSnapshot(Object.assign({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,metadata:e.metadata,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(t=e.conditions)===null||t===void 0?void 0:t.tagConditions}),cpkInfo:e.customerProvidedKey,encryptionScope:e.encryptionScope},ry(a)))];case 2:return[2,o.sent()];case 3:i=o.sent();n.setStatus({code:as.ERROR,message:i.message});throw i;case 4:n.end();return[7];case 5:return[2]}}))}))};t.prototype.beginCopyFromURL=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n;var a=this;return __generator(this,(function(i){switch(i.label){case 0:r={abortCopyFromURL:function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return a.abortCopyFromURL.apply(a,e)},getProperties:function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return a.getProperties.apply(a,e)},startCopyFromURL:function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return a.startCopyFromURL.apply(a,e)}};n=new Ry({blobClient:r,copySource:e,intervalInMs:t.intervalInMs,onProgress:t.onProgress,resumeFrom:t.resumeFrom,startCopyFromURLOptions:t});return[4,n.poll()];case 1:i.sent();return[2,n]}}))}))};t.prototype.abortCopyFromURL=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i;return __generator(this,(function(o){switch(o.label){case 0:r=ty("BlobClient-abortCopyFromURL",t),n=r.span,a=r.updatedOptions;o.label=1;case 1:o.trys.push([1,3,4,5]);return[4,this.blobContext.abortCopyFromURL(e,Object.assign({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions},ry(a)))];case 2:return[2,o.sent()];case 3:i=o.sent();n.setStatus({code:as.ERROR,message:i.message});throw i;case 4:n.end();return[7];case 5:return[2]}}))}))};t.prototype.syncCopyFromURL=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o,s,l;return __generator(this,(function(c){switch(c.label){case 0:i=ty("BlobClient-syncCopyFromURL",t),o=i.span,s=i.updatedOptions;t.conditions=t.conditions||{};t.sourceConditions=t.sourceConditions||{};c.label=1;case 1:c.trys.push([1,3,4,5]);return[4,this.blobContext.copyFromURL(e,Object.assign({abortSignal:t.abortSignal,metadata:t.metadata,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:t.sourceConditions.ifMatch,sourceIfModifiedSince:t.sourceConditions.ifModifiedSince,sourceIfNoneMatch:t.sourceConditions.ifNoneMatch,sourceIfUnmodifiedSince:t.sourceConditions.ifUnmodifiedSince},sourceContentMD5:t.sourceContentMD5,copySourceAuthorization:Og(t.sourceAuthorization),blobTagsString:Pg(t.tags),immutabilityPolicyExpiry:(n=t.immutabilityPolicy)===null||n===void 0?void 0:n.expiriesOn,immutabilityPolicyMode:(a=t.immutabilityPolicy)===null||a===void 0?void 0:a.policyMode,legalHold:t.legalHold},ry(s)))];case 2:return[2,c.sent()];case 3:l=c.sent();o.setStatus({code:as.ERROR,message:l.message});throw l;case 4:o.end();return[7];case 5:return[2]}}))}))};t.prototype.setAccessTier=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o;return __generator(this,(function(s){switch(s.label){case 0:n=ty("BlobClient-setAccessTier",t),a=n.span,i=n.updatedOptions;s.label=1;case 1:s.trys.push([1,3,4,5]);return[4,this.blobContext.setTier(Ny(e),Object.assign({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions}),rehydratePriority:t.rehydratePriority},ry(i)))];case 2:return[2,s.sent()];case 3:o=s.sent();a.setStatus({code:as.ERROR,message:o.message});throw o;case 4:a.end();return[7];case 5:return[2]}}))}))};t.prototype.downloadToBuffer=function(e,t,r,n){if(n===void 0){n={}}return __awaiter(this,void 0,void 0,(function(){var a,i,o,s,l,c,p,d,u,m,f,h,g;var y=this;return __generator(this,(function(v){switch(v.label){case 0:i=0;o=0;s=n;if(e instanceof ph){a=e;i=t||0;o=typeof r==="number"?r:0}else{i=typeof e==="number"?e:0;o=typeof t==="number"?t:0;s=r||{}}l=ty("BlobClient-downloadToBuffer",s),c=l.span,p=l.updatedOptions;v.label=1;case 1:v.trys.push([1,5,6,7]);if(!s.blockSize){s.blockSize=0}if(s.blockSize<0){throw new RangeError("blockSize option must be >= 0")}if(s.blockSize===0){s.blockSize=If}if(i<0){throw new RangeError("offset option must be >= 0")}if(o&&o<=0){throw new RangeError("count option must be greater than 0")}if(!s.conditions){s.conditions={}}if(!!o)return[3,3];return[4,this.getProperties(Object.assign(Object.assign({},s),{tracingOptions:Object.assign(Object.assign({},s.tracingOptions),ry(p))}))];case 2:d=v.sent();o=d.contentLength-i;if(o<0){throw new RangeError("offset ".concat(i," shouldn't be larger than blob size ").concat(d.contentLength))}v.label=3;case 3:if(!a){try{a=ph.alloc(o)}catch(e){throw new Error("Unable to allocate the buffer of size: ".concat(o,'(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile".\t ').concat(e.message))}}if(a.length<o){throw new RangeError("The buffer's size should be equal to or larger than the request count of bytes: ".concat(o))}u=0;m=new rv(s.concurrency);f=function(e){m.addOperation((function(){return __awaiter(y,void 0,void 0,(function(){var t;return __generator(this,(function(r){switch(r.label){case 0:t=i+o;if(e+s.blockSize<t){t=e+s.blockSize}return[4,this.download(e,t-e,{abortSignal:s.abortSignal,conditions:s.conditions,maxRetryRequests:s.maxRetryRequestsPerBlock,customerProvidedKey:s.customerProvidedKey,tracingOptions:Object.assign(Object.assign({},s.tracingOptions),ry(p))})];case 1:r.sent();return[4,av()];case 2:r.sent();u+=t-e;if(s.onProgress){s.onProgress({loadedBytes:u})}return[2]}}))}))}))};for(h=i;h<i+o;h=h+s.blockSize){f(h)}return[4,m.do()];case 4:v.sent();return[2,a];case 5:g=v.sent();c.setStatus({code:as.ERROR,message:g.message});throw g;case 6:c.end();return[7];case 7:return[2]}}))}))};t.prototype.downloadToFile=function(e,t,r,n){if(t===void 0){t=0}if(n===void 0){n={}}return __awaiter(this,void 0,void 0,(function(){var e,a,i,o,s;return __generator(this,(function(l){switch(l.label){case 0:e=ty("BlobClient-downloadToFile",n),a=e.span,i=e.updatedOptions;l.label=1;case 1:l.trys.push([1,5,6,7]);return[4,this.download(t,r,Object.assign(Object.assign({},n),{tracingOptions:Object.assign(Object.assign({},n.tracingOptions),ry(i))}))];case 2:o=l.sent();if(!o.readableStreamBody)return[3,4];return[4,iv()];case 3:l.sent();l.label=4;case 4:o.blobDownloadStream=undefined;return[2,o];case 5:s=l.sent();a.setStatus({code:as.ERROR,message:s.message});throw s;case 6:a.end();return[7];case 7:return[2]}}))}))};t.prototype.getBlobAndContainerNamesFromUrl=function(){var e;var t;try{var r=Vr.parse(this.url);if(r.getHost().split(".")[1]==="blob"){var n=r.getPath().match("/([^/]*)(/(.*))?");e=n[1];t=n[3]}else if(wg(r)){var n=r.getPath().match("/([^/]*)/([^/]*)(/(.*))?");e=n[2];t=n[4]}else{var n=r.getPath().match("/([^/]*)(/(.*))?");e=n[1];t=n[3]}e=decodeURIComponent(e);t=decodeURIComponent(t);t=t.replace(/\\/g,"/");if(!e){throw new Error("Provided containerName is invalid.")}return{blobName:t,containerName:e}}catch(e){throw new Error("Unable to extract blobName and containerName with provided information.")}};t.prototype.startCopyFromURL=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o,s,l;return __generator(this,(function(c){switch(c.label){case 0:i=ty("BlobClient-startCopyFromURL",t),o=i.span,s=i.updatedOptions;t.conditions=t.conditions||{};t.sourceConditions=t.sourceConditions||{};c.label=1;case 1:c.trys.push([1,3,4,5]);return[4,this.blobContext.startCopyFromURL(e,Object.assign({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,metadata:t.metadata,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:t.sourceConditions.ifMatch,sourceIfModifiedSince:t.sourceConditions.ifModifiedSince,sourceIfNoneMatch:t.sourceConditions.ifNoneMatch,sourceIfUnmodifiedSince:t.sourceConditions.ifUnmodifiedSince,sourceIfTags:t.sourceConditions.tagConditions},immutabilityPolicyExpiry:(n=t.immutabilityPolicy)===null||n===void 0?void 0:n.expiriesOn,immutabilityPolicyMode:(a=t.immutabilityPolicy)===null||a===void 0?void 0:a.policyMode,legalHold:t.legalHold,rehydratePriority:t.rehydratePriority,tier:Ny(t.tier),blobTagsString:Pg(t.tags),sealBlob:t.sealBlob},ry(s)))];case 2:return[2,c.sent()];case 3:l=c.sent();o.setStatus({code:as.ERROR,message:l.message});throw l;case 4:o.end();return[7];case 5:return[2]}}))}))};t.prototype.generateSasUrl=function(e){var t=this;return new Promise((function(r){if(!(t.credential instanceof Yg)){throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential")}var n=cy(Object.assign({containerName:t._containerName,blobName:t._name,snapshotTime:t._snapshot,versionId:t._versionId},e),t.credential).toString();r(gg(t.url,n))}))};t.prototype.deleteImmutabilityPolicy=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,n,a;return __generator(this,(function(i){switch(i.label){case 0:t=ty("BlobClient-deleteImmutabilityPolicy",e),r=t.span,n=t.updatedOptions;i.label=1;case 1:i.trys.push([1,3,4,5]);return[4,this.blobContext.deleteImmutabilityPolicy(Object.assign({abortSignal:e===null||e===void 0?void 0:e.abortSignal},ry(n)))];case 2:return[2,i.sent()];case 3:a=i.sent();r.setStatus({code:as.ERROR,message:a.message});throw a;case 4:r.end();return[7];case 5:return[2]}}))}))};t.prototype.setImmutabilityPolicy=function(e,t){return __awaiter(this,void 0,void 0,(function(){var r,n,a,i;return __generator(this,(function(o){switch(o.label){case 0:r=ty("BlobClient-setImmutabilityPolicy",t),n=r.span,a=r.updatedOptions;o.label=1;case 1:o.trys.push([1,3,4,5]);return[4,this.blobContext.setImmutabilityPolicy(Object.assign({abortSignal:t===null||t===void 0?void 0:t.abortSignal,immutabilityPolicyExpiry:e.expiriesOn,immutabilityPolicyMode:e.policyMode,modifiedAccessConditions:t===null||t===void 0?void 0:t.modifiedAccessCondition},ry(a)))];case 2:return[2,o.sent()];case 3:i=o.sent();n.setStatus({code:as.ERROR,message:i.message});throw i;case 4:n.end();return[7];case 5:return[2]}}))}))};t.prototype.setLegalHold=function(e,t){return __awaiter(this,void 0,void 0,(function(){var r,n,a,i;return __generator(this,(function(o){switch(o.label){case 0:r=ty("BlobClient-setLegalHold",t),n=r.span,a=r.updatedOptions;o.label=1;case 1:o.trys.push([1,3,4,5]);return[4,this.blobContext.setLegalHold(e,Object.assign({abortSignal:t===null||t===void 0?void 0:t.abortSignal},ry(a)))];case 2:return[2,o.sent()];case 3:i=o.sent();n.setStatus({code:as.ERROR,message:i.message});throw i;case 4:n.end();return[7];case 5:return[2]}}))}))};return t}(ey);var cv=function(e){Mr(t,e);function t(t,r,n,a){var i=this;var o;var s;a=a||{};if(Wg(r)){s=t;o=r}else if(Qt&&r instanceof Yg||r instanceof Ug||Xa(r)){s=t;a=n;o=Qg(r,a)}else if(!r&&typeof r!=="string"){s=t;o=Qg(new Ug,a)}else if(r&&typeof r==="string"&&n&&typeof n==="string"){var l=r;var c=n;var p=cg(t);if(p.kind==="AccountConnString"){if(Qt){var d=new Yg(p.accountName,p.accountKey);s=dg(dg(p.url,encodeURIComponent(l)),encodeURIComponent(c));a.proxyOptions=hi();o=Qg(d,a)}else{throw new Error("Account connection string is only supported in Node.js environment")}}else if(p.kind==="SASConnString"){s=dg(dg(p.url,encodeURIComponent(l)),encodeURIComponent(c))+"?"+p.accountSas;o=Qg(new Ug,a)}else{throw new Error("Connection string must be either an Account connection string or a SAS connection string")}}else{throw new Error("Expecting non-empty strings for containerName and blobName parameters")}i=e.call(this,s,o)||this;i.appendBlobContext=new ff(i.storageClientContext);return i}t.prototype.withSnapshot=function(e){return new t(ug(this.url,Df.Parameters.SNAPSHOT,e.length===0?undefined:e),this.pipeline)};t.prototype.create=function(e){if(e===void 0){e={}}return __awaiter(this,void 0,void 0,(function(){var t,r,n,a,i,o,s;return __generator(this,(function(l){switch(l.label){case 0:a=ty("AppendBlobClient-create",e),i=a.span,o=a.updatedOptions;e.conditions=e.conditions||{};l.label=1;case 1:l.trys.push([1,3,4,5]);zy(e.customerProvidedKey,this.isHttps);return[4,this.appendBlobContext.create(0,Object.assign({abortSignal:e.abortSignal,blobHttpHeaders:e.blobHTTPHeaders,leaseAccessConditions:e.conditions,metadata:e.metadata,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(t=e.conditions)===null||t===void 0?void 0:t.tagConditions}),cpkInfo:e.customerProvidedKey,encryptionScope:e.encryptionScope,immutabilityPolicyExpiry:(r=e.immutabilityPolicy)===null||r===void 0?void 0:r.expiriesOn,immutabilityPolicyMode:(n=e.immutabilityPolicy)===null||n===void 0?void 0:n.policyMode,legalHold:e.legalHold,blobTagsString:Pg(e.tags)},ry(o)))];case 2:return[2,l.sent()];case 3:s=l.sent();i.setStatus({code:as.ERROR,message:s.message});throw s;case 4:i.end();return[7];case 5:return[2]}}))}))};t.prototype.createIfNotExists=function(e){if(e===void 0){e={}}return __awaiter(this,void 0,void 0,(function(){var t,r,n,a,i,o,s,l;return __generator(this,(function(c){switch(c.label){case 0:n=ty("AppendBlobClient-createIfNotExists",e),a=n.span,i=n.updatedOptions;o={ifNoneMatch:Ff};c.label=1;case 1:c.trys.push([1,3,4,5]);return[4,this.create(Object.assign(Object.assign({},i),{conditions:o}))];case 2:s=c.sent();return[2,Object.assign(Object.assign({succeeded:true},s),{_response:s._response})];case 3:l=c.sent();if(((t=l.details)===null||t===void 0?void 0:t.errorCode)==="BlobAlreadyExists"){a.setStatus({code:as.ERROR,message:"Expected exception when creating a blob only if it does not already exist."});return[2,Object.assign(Object.assign({succeeded:false},(r=l.response)===null||r===void 0?void 0:r.parsedHeaders),{_response:l.response})]}a.setStatus({code:as.ERROR,message:l.message});throw l;case 4:a.end();return[7];case 5:return[2]}}))}))};t.prototype.seal=function(e){if(e===void 0){e={}}return __awaiter(this,void 0,void 0,(function(){var t,r,n,a,i;return __generator(this,(function(o){switch(o.label){case 0:r=ty("AppendBlobClient-seal",e),n=r.span,a=r.updatedOptions;e.conditions=e.conditions||{};o.label=1;case 1:o.trys.push([1,3,4,5]);return[4,this.appendBlobContext.seal(Object.assign({abortSignal:e.abortSignal,appendPositionAccessConditions:e.conditions,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:(t=e.conditions)===null||t===void 0?void 0:t.tagConditions})},ry(a)))];case 2:return[2,o.sent()];case 3:i=o.sent();n.setStatus({code:as.ERROR,message:i.message});throw i;case 4:n.end();return[7];case 5:return[2]}}))}))};t.prototype.appendBlock=function(e,t,r){if(r===void 0){r={}}return __awaiter(this,void 0,void 0,(function(){var n,a,i,o,s;return __generator(this,(function(l){switch(l.label){case 0:a=ty("AppendBlobClient-appendBlock",r),i=a.span,o=a.updatedOptions;r.conditions=r.conditions||{};l.label=1;case 1:l.trys.push([1,3,4,5]);zy(r.customerProvidedKey,this.isHttps);return[4,this.appendBlobContext.appendBlock(t,e,Object.assign({abortSignal:r.abortSignal,appendPositionAccessConditions:r.conditions,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:(n=r.conditions)===null||n===void 0?void 0:n.tagConditions}),requestOptions:{onUploadProgress:r.onProgress},transactionalContentMD5:r.transactionalContentMD5,transactionalContentCrc64:r.transactionalContentCrc64,cpkInfo:r.customerProvidedKey,encryptionScope:r.encryptionScope},ry(o)))];case 2:return[2,l.sent()];case 3:s=l.sent();i.setStatus({code:as.ERROR,message:s.message});throw s;case 4:i.end();return[7];case 5:return[2]}}))}))};t.prototype.appendBlockFromURL=function(e,t,r,n){if(n===void 0){n={}}return __awaiter(this,void 0,void 0,(function(){var a,i,o,s,l;return __generator(this,(function(c){switch(c.label){case 0:i=ty("AppendBlobClient-appendBlockFromURL",n),o=i.span,s=i.updatedOptions;n.conditions=n.conditions||{};n.sourceConditions=n.sourceConditions||{};c.label=1;case 1:c.trys.push([1,3,4,5]);zy(n.customerProvidedKey,this.isHttps);return[4,this.appendBlobContext.appendBlockFromUrl(e,0,Object.assign({abortSignal:n.abortSignal,sourceRange:Ty({offset:t,count:r}),sourceContentMD5:n.sourceContentMD5,sourceContentCrc64:n.sourceContentCrc64,leaseAccessConditions:n.conditions,appendPositionAccessConditions:n.conditions,modifiedAccessConditions:Object.assign(Object.assign({},n.conditions),{ifTags:(a=n.conditions)===null||a===void 0?void 0:a.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:n.sourceConditions.ifMatch,sourceIfModifiedSince:n.sourceConditions.ifModifiedSince,sourceIfNoneMatch:n.sourceConditions.ifNoneMatch,sourceIfUnmodifiedSince:n.sourceConditions.ifUnmodifiedSince},copySourceAuthorization:Og(n.sourceAuthorization),cpkInfo:n.customerProvidedKey,encryptionScope:n.encryptionScope},ry(s)))];case 2:return[2,c.sent()];case 3:l=c.sent();o.setStatus({code:as.ERROR,message:l.message});throw l;case 4:o.end();return[7];case 5:return[2]}}))}))};return t}(lv);var pv=function(e){Mr(t,e);function t(t,r,n,a){var i=this;var o;var s;a=a||{};if(Wg(r)){s=t;o=r}else if(Qt&&r instanceof Yg||r instanceof Ug||Xa(r)){s=t;a=n;o=Qg(r,a)}else if(!r&&typeof r!=="string"){s=t;o=Qg(new Ug,a)}else if(r&&typeof r==="string"&&n&&typeof n==="string"){var l=r;var c=n;var p=cg(t);if(p.kind==="AccountConnString"){if(Qt){var d=new Yg(p.accountName,p.accountKey);s=dg(dg(p.url,encodeURIComponent(l)),encodeURIComponent(c));a.proxyOptions=hi();o=Qg(d,a)}else{throw new Error("Account connection string is only supported in Node.js environment")}}else if(p.kind==="SASConnString"){s=dg(dg(p.url,encodeURIComponent(l)),encodeURIComponent(c))+"?"+p.accountSas;o=Qg(new Ug,a)}else{throw new Error("Connection string must be either an Account connection string or a SAS connection string")}}else{throw new Error("Expecting non-empty strings for containerName and blobName parameters")}i=e.call(this,s,o)||this;i.blockBlobContext=new Nf(i.storageClientContext);i._blobContext=new Em(i.storageClientContext);return i}t.prototype.withSnapshot=function(e){return new t(ug(this.url,Df.Parameters.SNAPSHOT,e.length===0?undefined:e),this.pipeline)};t.prototype.query=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o,s;return __generator(this,(function(l){switch(l.label){case 0:zy(t.customerProvidedKey,this.isHttps);n=ty("BlockBlobClient-query",t),a=n.span,i=n.updatedOptions;l.label=1;case 1:l.trys.push([1,3,4,5]);if(!Qt){throw new Error("This operation currently is only supported in Node.js.")}return[4,this._blobContext.query(Object.assign({abortSignal:t.abortSignal,queryRequest:{queryType:"SQL",expression:e,inputSerialization:_g(t.inputTextConfiguration),outputSerialization:_g(t.outputTextConfiguration)},leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions})},ry(i)))];case 2:o=l.sent();return[2,new vy(o,{abortSignal:t.abortSignal,onProgress:t.onProgress,onError:t.onError})];case 3:s=l.sent();a.setStatus({code:as.ERROR,message:s.message});throw s;case 4:a.end();return[7];case 5:return[2]}}))}))};t.prototype.upload=function(e,t,r){if(r===void 0){r={}}return __awaiter(this,void 0,void 0,(function(){var n,a,i,o,s,l,c;return __generator(this,(function(p){switch(p.label){case 0:r.conditions=r.conditions||{};o=ty("BlockBlobClient-upload",r),s=o.span,l=o.updatedOptions;p.label=1;case 1:p.trys.push([1,3,4,5]);zy(r.customerProvidedKey,this.isHttps);return[4,this.blockBlobContext.upload(t,e,Object.assign({abortSignal:r.abortSignal,blobHttpHeaders:r.blobHTTPHeaders,leaseAccessConditions:r.conditions,metadata:r.metadata,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:(n=r.conditions)===null||n===void 0?void 0:n.tagConditions}),requestOptions:{onUploadProgress:r.onProgress},cpkInfo:r.customerProvidedKey,encryptionScope:r.encryptionScope,immutabilityPolicyExpiry:(a=r.immutabilityPolicy)===null||a===void 0?void 0:a.expiriesOn,immutabilityPolicyMode:(i=r.immutabilityPolicy)===null||i===void 0?void 0:i.policyMode,legalHold:r.legalHold,tier:Ny(r.tier),blobTagsString:Pg(r.tags)},ry(l)))];case 2:return[2,p.sent()];case 3:c=p.sent();s.setStatus({code:as.ERROR,message:c.message});throw c;case 4:s.end();return[7];case 5:return[2]}}))}))};t.prototype.syncUploadFromURL=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o,s,l,c,p;return __generator(this,(function(d){switch(d.label){case 0:t.conditions=t.conditions||{};s=ty("BlockBlobClient-syncUploadFromURL",t),l=s.span,c=s.updatedOptions;d.label=1;case 1:d.trys.push([1,3,4,5]);zy(t.customerProvidedKey,this.isHttps);return[4,this.blockBlobContext.putBlobFromUrl(0,e,Object.assign(Object.assign(Object.assign({},t),{blobHttpHeaders:t.blobHTTPHeaders,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:t.conditions.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:(r=t.sourceConditions)===null||r===void 0?void 0:r.ifMatch,sourceIfModifiedSince:(n=t.sourceConditions)===null||n===void 0?void 0:n.ifModifiedSince,sourceIfNoneMatch:(a=t.sourceConditions)===null||a===void 0?void 0:a.ifNoneMatch,sourceIfUnmodifiedSince:(i=t.sourceConditions)===null||i===void 0?void 0:i.ifUnmodifiedSince,sourceIfTags:(o=t.sourceConditions)===null||o===void 0?void 0:o.tagConditions},cpkInfo:t.customerProvidedKey,copySourceAuthorization:Og(t.sourceAuthorization),tier:Ny(t.tier),blobTagsString:Pg(t.tags)}),ry(c)))];case 2:return[2,d.sent()];case 3:p=d.sent();l.setStatus({code:as.ERROR,message:p.message});throw p;case 4:l.end();return[7];case 5:return[2]}}))}))};t.prototype.stageBlock=function(e,t,r,n){if(n===void 0){n={}}return __awaiter(this,void 0,void 0,(function(){var a,i,o,s;return __generator(this,(function(l){switch(l.label){case 0:a=ty("BlockBlobClient-stageBlock",n),i=a.span,o=a.updatedOptions;l.label=1;case 1:l.trys.push([1,3,4,5]);zy(n.customerProvidedKey,this.isHttps);return[4,this.blockBlobContext.stageBlock(e,r,t,Object.assign({abortSignal:n.abortSignal,leaseAccessConditions:n.conditions,requestOptions:{onUploadProgress:n.onProgress},transactionalContentMD5:n.transactionalContentMD5,transactionalContentCrc64:n.transactionalContentCrc64,cpkInfo:n.customerProvidedKey,encryptionScope:n.encryptionScope},ry(o)))];case 2:return[2,l.sent()];case 3:s=l.sent();i.setStatus({code:as.ERROR,message:s.message});throw s;case 4:i.end();return[7];case 5:return[2]}}))}))};t.prototype.stageBlockFromURL=function(e,t,r,n,a){if(r===void 0){r=0}if(a===void 0){a={}}return __awaiter(this,void 0,void 0,(function(){var i,o,s,l;return __generator(this,(function(c){switch(c.label){case 0:i=ty("BlockBlobClient-stageBlockFromURL",a),o=i.span,s=i.updatedOptions;c.label=1;case 1:c.trys.push([1,3,4,5]);zy(a.customerProvidedKey,this.isHttps);return[4,this.blockBlobContext.stageBlockFromURL(e,0,t,Object.assign({abortSignal:a.abortSignal,leaseAccessConditions:a.conditions,sourceContentMD5:a.sourceContentMD5,sourceContentCrc64:a.sourceContentCrc64,sourceRange:r===0&&!n?undefined:Ty({offset:r,count:n}),cpkInfo:a.customerProvidedKey,encryptionScope:a.encryptionScope,copySourceAuthorization:Og(a.sourceAuthorization)},ry(s)))];case 2:return[2,c.sent()];case 3:l=c.sent();o.setStatus({code:as.ERROR,message:l.message});throw l;case 4:o.end();return[7];case 5:return[2]}}))}))};t.prototype.commitBlockList=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o,s,l;return __generator(this,(function(c){switch(c.label){case 0:t.conditions=t.conditions||{};i=ty("BlockBlobClient-commitBlockList",t),o=i.span,s=i.updatedOptions;c.label=1;case 1:c.trys.push([1,3,4,5]);zy(t.customerProvidedKey,this.isHttps);return[4,this.blockBlobContext.commitBlockList({latest:e},Object.assign({abortSignal:t.abortSignal,blobHttpHeaders:t.blobHTTPHeaders,leaseAccessConditions:t.conditions,metadata:t.metadata,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions}),cpkInfo:t.customerProvidedKey,encryptionScope:t.encryptionScope,immutabilityPolicyExpiry:(n=t.immutabilityPolicy)===null||n===void 0?void 0:n.expiriesOn,immutabilityPolicyMode:(a=t.immutabilityPolicy)===null||a===void 0?void 0:a.policyMode,legalHold:t.legalHold,tier:Ny(t.tier),blobTagsString:Pg(t.tags)},ry(s)))];case 2:return[2,c.sent()];case 3:l=c.sent();o.setStatus({code:as.ERROR,message:l.message});throw l;case 4:o.end();return[7];case 5:return[2]}}))}))};t.prototype.getBlockList=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o,s;return __generator(this,(function(l){switch(l.label){case 0:n=ty("BlockBlobClient-getBlockList",t),a=n.span,i=n.updatedOptions;l.label=1;case 1:l.trys.push([1,3,4,5]);return[4,this.blockBlobContext.getBlockList(e,Object.assign({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions})},ry(i)))];case 2:o=l.sent();if(!o.committedBlocks){o.committedBlocks=[]}if(!o.uncommittedBlocks){o.uncommittedBlocks=[]}return[2,o];case 3:s=l.sent();a.setStatus({code:as.ERROR,message:s.message});throw s;case 4:a.end();return[7];case 5:return[2]}}))}))};t.prototype.uploadData=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o;return __generator(this,(function(s){r=ty("BlockBlobClient-uploadData",t),n=r.span,a=r.updatedOptions;try{if(Qt){if(e instanceof ph){i=e}else if(e instanceof ArrayBuffer){i=ph.from(e)}else{e=e;i=ph.from(e.buffer,e.byteOffset,e.byteLength)}return[2,this.uploadSeekableInternal((function(e,t){return i.slice(e,e+t)}),i.byteLength,a)]}else{o=new Blob([e]);return[2,this.uploadSeekableInternal((function(e,t){return o.slice(e,e+t)}),o.size,a)]}}catch(e){n.setStatus({code:as.ERROR,message:e.message});throw e}finally{n.end()}return[2]}))}))};t.prototype.uploadBrowserData=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o;return __generator(this,(function(s){switch(s.label){case 0:r=ty("BlockBlobClient-uploadBrowserData",t),n=r.span,a=r.updatedOptions;s.label=1;case 1:s.trys.push([1,3,4,5]);i=new Blob([e]);return[4,this.uploadSeekableInternal((function(e,t){return i.slice(e,e+t)}),i.size,a)];case 2:return[2,s.sent()];case 3:o=s.sent();n.setStatus({code:as.ERROR,message:o.message});throw o;case 4:n.end();return[7];case 5:return[2]}}))}))};t.prototype.uploadSeekableInternal=function(e,t,r){if(r===void 0){r={}}return __awaiter(this,void 0,void 0,(function(){var n,a,i,o,s,l,c,p,d,u,m;var f=this;return __generator(this,(function(h){switch(h.label){case 0:if(!r.blockSize){r.blockSize=0}if(r.blockSize<0||r.blockSize>qf){throw new RangeError("blockSize option must be >= 0 and <= ".concat(qf))}if(r.maxSingleShotSize!==0&&!r.maxSingleShotSize){r.maxSingleShotSize=Bf}if(r.maxSingleShotSize<0||r.maxSingleShotSize>Bf){throw new RangeError("maxSingleShotSize option must be >= 0 and <= ".concat(Bf))}if(r.blockSize===0){if(t>qf*Mf){throw new RangeError("".concat(t," is too larger to upload to a block blob."))}if(t>r.maxSingleShotSize){r.blockSize=Math.ceil(t/Mf);if(r.blockSize<If){r.blockSize=If}}}if(!r.blobHTTPHeaders){r.blobHTTPHeaders={}}if(!r.conditions){r.conditions={}}n=ty("BlockBlobClient-uploadSeekableInternal",r),a=n.span,i=n.updatedOptions;h.label=1;case 1:h.trys.push([1,5,6,7]);if(!(t<=r.maxSingleShotSize))return[3,3];return[4,this.upload(e(0,t),t,i)];case 2:return[2,h.sent()];case 3:o=Math.floor((t-1)/r.blockSize)+1;if(o>Mf){throw new RangeError("The buffer's size is too big or the BlockSize is too small;"+"the number of blocks must be <= ".concat(Mf))}s=[];l=Jt();c=0;p=new rv(r.concurrency);d=function(n){p.addOperation((function(){return __awaiter(f,void 0,void 0,(function(){var a,p,d,u;return __generator(this,(function(m){switch(m.label){case 0:a=bg(l,n);p=r.blockSize*n;d=n===o-1?t:p+r.blockSize;u=d-p;s.push(a);return[4,this.stageBlock(a,e(p,u),u,{abortSignal:r.abortSignal,conditions:r.conditions,encryptionScope:r.encryptionScope,tracingOptions:i.tracingOptions})];case 1:m.sent();c+=u;if(r.onProgress){r.onProgress({loadedBytes:c})}return[2]}}))}))}))};for(u=0;u<o;u++){d(u)}return[4,p.do()];case 4:h.sent();return[2,this.commitBlockList(s,i)];case 5:m=h.sent();a.setStatus({code:as.ERROR,message:m.message});throw m;case 6:a.end();return[7];case 7:return[2]}}))}))};t.prototype.uploadFile=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var e,r,n,a,i;return __generator(this,(function(o){switch(o.label){case 0:e=ty("BlockBlobClient-uploadFile",t),r=e.span,n=e.updatedOptions;o.label=1;case 1:o.trys.push([1,4,5,6]);return[4,ov()];case 2:a=o.sent().size;return[4,this.uploadSeekableInternal((function(e,t){return function(){return sv()}}),a,Object.assign(Object.assign({},t),{tracingOptions:Object.assign(Object.assign({},t.tracingOptions),ry(n))}))];case 3:return[2,o.sent()];case 4:i=o.sent();r.setStatus({code:as.ERROR,message:i.message});throw i;case 5:r.end();return[7];case 6:return[2]}}))}))};t.prototype.uploadStream=function(e,t,r,n){if(t===void 0){t=Af}if(r===void 0){r=5}if(n===void 0){n={}}return __awaiter(this,void 0,void 0,(function(){var a,i,o,s,l,c,p,d,u;var m=this;return __generator(this,(function(f){switch(f.label){case 0:if(!n.blobHTTPHeaders){n.blobHTTPHeaders={}}if(!n.conditions){n.conditions={}}a=ty("BlockBlobClient-uploadStream",n),i=a.span,o=a.updatedOptions;f.label=1;case 1:f.trys.push([1,4,5,6]);s=0;l=Jt();c=0;p=[];d=new nv(e,t,r,(function(e,t){return __awaiter(m,void 0,void 0,(function(){var r;return __generator(this,(function(a){switch(a.label){case 0:r=bg(l,s);p.push(r);s++;return[4,this.stageBlock(r,e,t,{conditions:n.conditions,encryptionScope:n.encryptionScope,tracingOptions:o.tracingOptions})];case 1:a.sent();c+=t;if(n.onProgress){n.onProgress({loadedBytes:c})}return[2]}}))}))}),Math.ceil(r/4*3));return[4,d.do()];case 2:f.sent();return[4,this.commitBlockList(p,Object.assign(Object.assign({},n),{tracingOptions:Object.assign(Object.assign({},n.tracingOptions),ry(o))}))];case 3:return[2,f.sent()];case 4:u=f.sent();i.setStatus({code:as.ERROR,message:u.message});throw u;case 5:i.end();return[7];case 6:return[2]}}))}))};return t}(lv);var dv=function(e){Mr(t,e);function t(t,r,n,a){var i=this;var o;var s;a=a||{};if(Wg(r)){s=t;o=r}else if(Qt&&r instanceof Yg||r instanceof Ug||Xa(r)){s=t;a=n;o=Qg(r,a)}else if(!r&&typeof r!=="string"){s=t;o=Qg(new Ug,a)}else if(r&&typeof r==="string"&&n&&typeof n==="string"){var l=r;var c=n;var p=cg(t);if(p.kind==="AccountConnString"){if(Qt){var d=new Yg(p.accountName,p.accountKey);s=dg(dg(p.url,encodeURIComponent(l)),encodeURIComponent(c));a.proxyOptions=hi();o=Qg(d,a)}else{throw new Error("Account connection string is only supported in Node.js environment")}}else if(p.kind==="SASConnString"){s=dg(dg(p.url,encodeURIComponent(l)),encodeURIComponent(c))+"?"+p.accountSas;o=Qg(new Ug,a)}else{throw new Error("Connection string must be either an Account connection string or a SAS connection string")}}else{throw new Error("Expecting non-empty strings for containerName and blobName parameters")}i=e.call(this,s,o)||this;i.pageBlobContext=new tf(i.storageClientContext);return i}t.prototype.withSnapshot=function(e){return new t(ug(this.url,Df.Parameters.SNAPSHOT,e.length===0?undefined:e),this.pipeline)};t.prototype.create=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o,s,l;return __generator(this,(function(c){switch(c.label){case 0:t.conditions=t.conditions||{};i=ty("PageBlobClient-create",t),o=i.span,s=i.updatedOptions;c.label=1;case 1:c.trys.push([1,3,4,5]);zy(t.customerProvidedKey,this.isHttps);return[4,this.pageBlobContext.create(0,e,Object.assign({abortSignal:t.abortSignal,blobHttpHeaders:t.blobHTTPHeaders,blobSequenceNumber:t.blobSequenceNumber,leaseAccessConditions:t.conditions,metadata:t.metadata,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions}),cpkInfo:t.customerProvidedKey,encryptionScope:t.encryptionScope,immutabilityPolicyExpiry:(n=t.immutabilityPolicy)===null||n===void 0?void 0:n.expiriesOn,immutabilityPolicyMode:(a=t.immutabilityPolicy)===null||a===void 0?void 0:a.policyMode,legalHold:t.legalHold,tier:Ny(t.tier),blobTagsString:Pg(t.tags)},ry(s)))];case 2:return[2,c.sent()];case 3:l=c.sent();o.setStatus({code:as.ERROR,message:l.message});throw l;case 4:o.end();return[7];case 5:return[2]}}))}))};t.prototype.createIfNotExists=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o,s,l,c;return __generator(this,(function(p){switch(p.label){case 0:a=ty("PageBlobClient-createIfNotExists",t),i=a.span,o=a.updatedOptions;p.label=1;case 1:p.trys.push([1,3,4,5]);s={ifNoneMatch:Ff};return[4,this.create(e,Object.assign(Object.assign({},t),{conditions:s,tracingOptions:o.tracingOptions}))];case 2:l=p.sent();return[2,Object.assign(Object.assign({succeeded:true},l),{_response:l._response})];case 3:c=p.sent();if(((r=c.details)===null||r===void 0?void 0:r.errorCode)==="BlobAlreadyExists"){i.setStatus({code:as.ERROR,message:"Expected exception when creating a blob only if it does not already exist."});return[2,Object.assign(Object.assign({succeeded:false},(n=c.response)===null||n===void 0?void 0:n.parsedHeaders),{_response:c.response})]}i.setStatus({code:as.ERROR,message:c.message});throw c;case 4:i.end();return[7];case 5:return[2]}}))}))};t.prototype.uploadPages=function(e,t,r,n){if(n===void 0){n={}}return __awaiter(this,void 0,void 0,(function(){var a,i,o,s,l;return __generator(this,(function(c){switch(c.label){case 0:n.conditions=n.conditions||{};i=ty("PageBlobClient-uploadPages",n),o=i.span,s=i.updatedOptions;c.label=1;case 1:c.trys.push([1,3,4,5]);zy(n.customerProvidedKey,this.isHttps);return[4,this.pageBlobContext.uploadPages(r,e,Object.assign({abortSignal:n.abortSignal,leaseAccessConditions:n.conditions,modifiedAccessConditions:Object.assign(Object.assign({},n.conditions),{ifTags:(a=n.conditions)===null||a===void 0?void 0:a.tagConditions}),requestOptions:{onUploadProgress:n.onProgress},range:Ty({offset:t,count:r}),sequenceNumberAccessConditions:n.conditions,transactionalContentMD5:n.transactionalContentMD5,transactionalContentCrc64:n.transactionalContentCrc64,cpkInfo:n.customerProvidedKey,encryptionScope:n.encryptionScope},ry(s)))];case 2:return[2,c.sent()];case 3:l=c.sent();o.setStatus({code:as.ERROR,message:l.message});throw l;case 4:o.end();return[7];case 5:return[2]}}))}))};t.prototype.uploadPagesFromURL=function(e,t,r,n,a){if(a===void 0){a={}}return __awaiter(this,void 0,void 0,(function(){var i,o,s,l,c;return __generator(this,(function(p){switch(p.label){case 0:a.conditions=a.conditions||{};a.sourceConditions=a.sourceConditions||{};o=ty("PageBlobClient-uploadPagesFromURL",a),s=o.span,l=o.updatedOptions;p.label=1;case 1:p.trys.push([1,3,4,5]);zy(a.customerProvidedKey,this.isHttps);return[4,this.pageBlobContext.uploadPagesFromURL(e,Ty({offset:t,count:n}),0,Ty({offset:r,count:n}),Object.assign({abortSignal:a.abortSignal,sourceContentMD5:a.sourceContentMD5,sourceContentCrc64:a.sourceContentCrc64,leaseAccessConditions:a.conditions,sequenceNumberAccessConditions:a.conditions,modifiedAccessConditions:Object.assign(Object.assign({},a.conditions),{ifTags:(i=a.conditions)===null||i===void 0?void 0:i.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:a.sourceConditions.ifMatch,sourceIfModifiedSince:a.sourceConditions.ifModifiedSince,sourceIfNoneMatch:a.sourceConditions.ifNoneMatch,sourceIfUnmodifiedSince:a.sourceConditions.ifUnmodifiedSince},cpkInfo:a.customerProvidedKey,encryptionScope:a.encryptionScope,copySourceAuthorization:Og(a.sourceAuthorization)},ry(l)))];case 2:return[2,p.sent()];case 3:c=p.sent();s.setStatus({code:as.ERROR,message:c.message});throw c;case 4:s.end();return[7];case 5:return[2]}}))}))};t.prototype.clearPages=function(e,t,r){if(e===void 0){e=0}if(r===void 0){r={}}return __awaiter(this,void 0,void 0,(function(){var n,a,i,o,s;return __generator(this,(function(l){switch(l.label){case 0:r.conditions=r.conditions||{};a=ty("PageBlobClient-clearPages",r),i=a.span,o=a.updatedOptions;l.label=1;case 1:l.trys.push([1,3,4,5]);return[4,this.pageBlobContext.clearPages(0,Object.assign({abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:(n=r.conditions)===null||n===void 0?void 0:n.tagConditions}),range:Ty({offset:e,count:t}),sequenceNumberAccessConditions:r.conditions,cpkInfo:r.customerProvidedKey,encryptionScope:r.encryptionScope},ry(o)))];case 2:return[2,l.sent()];case 3:s=l.sent();i.setStatus({code:as.ERROR,message:s.message});throw s;case 4:i.end();return[7];case 5:return[2]}}))}))};t.prototype.getPageRanges=function(e,t,r){if(e===void 0){e=0}if(r===void 0){r={}}return __awaiter(this,void 0,void 0,(function(){var n,a,i,o,s;return __generator(this,(function(l){switch(l.label){case 0:r.conditions=r.conditions||{};a=ty("PageBlobClient-getPageRanges",r),i=a.span,o=a.updatedOptions;l.label=1;case 1:l.trys.push([1,3,4,5]);return[4,this.pageBlobContext.getPageRanges(Object.assign({abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:(n=r.conditions)===null||n===void 0?void 0:n.tagConditions}),range:Ty({offset:e,count:t})},ry(o))).then(Sy)];case 2:return[2,l.sent()];case 3:s=l.sent();i.setStatus({code:as.ERROR,message:s.message});throw s;case 4:i.end();return[7];case 5:return[2]}}))}))};t.prototype.getPageRangesDiff=function(e,t,r,n){if(n===void 0){n={}}return __awaiter(this,void 0,void 0,(function(){var a,i,o,s,l;return __generator(this,(function(c){switch(c.label){case 0:n.conditions=n.conditions||{};i=ty("PageBlobClient-getPageRangesDiff",n),o=i.span,s=i.updatedOptions;c.label=1;case 1:c.trys.push([1,3,4,5]);return[4,this.pageBlobContext.getPageRangesDiff(Object.assign({abortSignal:n.abortSignal,leaseAccessConditions:n.conditions,modifiedAccessConditions:Object.assign(Object.assign({},n.conditions),{ifTags:(a=n.conditions)===null||a===void 0?void 0:a.tagConditions}),prevsnapshot:r,range:Ty({offset:e,count:t})},ry(s))).then(Sy)];case 2:return[2,c.sent()];case 3:l=c.sent();o.setStatus({code:as.ERROR,message:l.message});throw l;case 4:o.end();return[7];case 5:return[2]}}))}))};t.prototype.getPageRangesDiffForManagedDisks=function(e,t,r,n){if(n===void 0){n={}}return __awaiter(this,void 0,void 0,(function(){var a,i,o,s,l;return __generator(this,(function(c){switch(c.label){case 0:n.conditions=n.conditions||{};i=ty("PageBlobClient-GetPageRangesDiffForManagedDisks",n),o=i.span,s=i.updatedOptions;c.label=1;case 1:c.trys.push([1,3,4,5]);return[4,this.pageBlobContext.getPageRangesDiff(Object.assign({abortSignal:n.abortSignal,leaseAccessConditions:n.conditions,modifiedAccessConditions:Object.assign(Object.assign({},n.conditions),{ifTags:(a=n.conditions)===null||a===void 0?void 0:a.tagConditions}),prevSnapshotUrl:r,range:Ty({offset:e,count:t})},ry(s))).then(Sy)];case 2:return[2,c.sent()];case 3:l=c.sent();o.setStatus({code:as.ERROR,message:l.message});throw l;case 4:o.end();return[7];case 5:return[2]}}))}))};t.prototype.resize=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o;return __generator(this,(function(s){switch(s.label){case 0:t.conditions=t.conditions||{};n=ty("PageBlobClient-resize",t),a=n.span,i=n.updatedOptions;s.label=1;case 1:s.trys.push([1,3,4,5]);return[4,this.pageBlobContext.resize(e,Object.assign({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions}),encryptionScope:t.encryptionScope},ry(i)))];case 2:return[2,s.sent()];case 3:o=s.sent();a.setStatus({code:as.ERROR,message:o.message});throw o;case 4:a.end();return[7];case 5:return[2]}}))}))};t.prototype.updateSequenceNumber=function(e,t,r){if(r===void 0){r={}}return __awaiter(this,void 0,void 0,(function(){var n,a,i,o,s;return __generator(this,(function(l){switch(l.label){case 0:r.conditions=r.conditions||{};a=ty("PageBlobClient-updateSequenceNumber",r),i=a.span,o=a.updatedOptions;l.label=1;case 1:l.trys.push([1,3,4,5]);return[4,this.pageBlobContext.updateSequenceNumber(e,Object.assign({abortSignal:r.abortSignal,blobSequenceNumber:t,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:(n=r.conditions)===null||n===void 0?void 0:n.tagConditions})},ry(o)))];case 2:return[2,l.sent()];case 3:s=l.sent();i.setStatus({code:as.ERROR,message:s.message});throw s;case 4:i.end();return[7];case 5:return[2]}}))}))};t.prototype.startCopyIncremental=function(e,t){if(t===void 0){t={}}return __awaiter(this,void 0,void 0,(function(){var r,n,a,i,o;return __generator(this,(function(s){switch(s.label){case 0:n=ty("PageBlobClient-startCopyIncremental",t),a=n.span,i=n.updatedOptions;s.label=1;case 1:s.trys.push([1,3,4,5]);return[4,this.pageBlobContext.copyIncremental(e,Object.assign({abortSignal:t.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(r=t.conditions)===null||r===void 0?void 0:r.tagConditions})},ry(i)))];case 2:return[2,s.sent()];case 3:o=s.sent();a.setStatus({code:as.ERROR,message:o.message});throw o;case 4:a.end();return[7];case 5:return[2]}}))}))};return t}(lv);var uv=function(){function e(e,t){var r=this;this.getPrintStatus=function(){return fetch("https://".concat(r.printingApi,"/sfapi/Status/?id=").concat(encodeURIComponent(mv.state.jobID)),{headers:{Authorization:"Bearer "+Ue.state.accessToken}}).then((function(e){return e.json()}))};this.redirectURI=e;this.clientID=t;this.printingApi=mv.state.printApiHostUrl;this.checkStoredRefreshToken()}e.prototype.checkStoredRefreshToken=function(){if(Ue.state.refreshToken!==""){return}if(localStorage.getItem("refreshToken")===null){Ue.state.refreshToken=""}else{Ue.state.refreshToken=localStorage.getItem("refreshToken")}};e.prototype.registerFetchInterceptor=function(){var e=this;Et.register({request:function(e,t){return[e,t]},requestError:function(e){return Promise.reject(e)},response:function(t){if(t.status===401){if(Ue.state.refreshToken===""){return t}var r=new je(e.redirectURI,e.clientID);r.refreshTokens()}return t},responseError:function(e){return Promise.reject(e)}})};e.prototype.getPrinterList=function(e){return fetch("https://".concat(this.printingApi,"/sfapi/GetPrinter/"),{method:"GET",headers:{Authorization:"Bearer "+e}}).then((function(e){return e.json()}))};e.prototype.getConfig=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,fetch("https://".concat(this.printingApi,"/sfapi/GetConfiguration/"),{method:"GET",headers:{Authorization:"Bearer "+e}})]}))}))};e.prototype.getPrinterProperties=function(e,t){return fetch("https://".concat(this.printingApi,"/sfapi/GetPrinterProperties/?id=").concat(t),{method:"GET",headers:{Authorization:"Bearer "+e}}).then((function(e){return e.json()}))};e.prototype.getAllPrinterProperties=function(e){return fetch("https://".concat(this.printingApi,"/sfapi/GetPrinterProperties/"),{method:"GET",headers:{Authorization:"Bearer "+e}}).then((function(e){return e.json()}))};e.prototype.printFileByUrl=function(e,t,r,n,a,i,o){return fetch("https://".concat(this.printingApi,"/sfapi/Print/"),{method:"POST",headers:{Authorization:"Bearer "+e,"Content-Type":"application/json"},body:JSON.stringify(Object.assign(Object.assign(Object.assign({fileurl:t,type:r,printerid:n},i&&{alias:i}),o&&{printanddelete:o}),{properties:a}))})};e.prototype.printByFileID=function(e,t,r,n,a,i,o){return fetch("https://".concat(this.printingApi,"/sfapi/Print/"),{method:"POST",headers:{Authorization:"Bearer "+e,"Content-Type":"application/json"},body:JSON.stringify(Object.assign(Object.assign(Object.assign({fileid:t,type:r,printerid:n},i&&{alias:i}),o&&{printanddelete:o}),{properties:a}))}).then((function(e){return e.json()}))};e.prototype.prepareFileUpload=function(e){return fetch("https://".concat(this.printingApi,"/sfapi/PrepareUpload/"),{method:"GET",headers:{Authorization:"Bearer "+e}}).then((function(e){return e.json()}))};e.prototype.uploadFile=function(e,t){return fetch("".concat(e),{method:"PUT",headers:{"x-ms-blob-type":"BlockBlob","Content-Type:":"multipart/form-data"},body:t}).then((function(e){return e.json()}))};e.prototype.uploadBlobFiles=function(e,t){return __awaiter(this,void 0,void 0,(function(){var r,n,a;return __generator(this,(function(i){switch(i.label){case 0:mv.state.uploadProgress=0;r=Qg(new Ug,{retryOptions:{maxTries:4},userAgentOptions:{userAgentPrefix:"AdvancedSample V1.0.0"},keepAliveOptions:{enable:false}});n=new pv(e,r);return[4,n.uploadData(t,{blockSize:4*1024*1024,concurrency:20,onProgress:function(e){var r=100*e.loadedBytes/t.size;mv.state.uploadProgress=r},blobHTTPHeaders:{blobContentType:"application/octet-stream"}})];case 1:a=i.sent();return[2,a]}}))}))};return e}();var mv=v({printers:[],jobID:"",printFinished:false,printApiHostUrl:"",printerProperties:{},fileID:"",fileUrl:"",fileType:"",printerID:"",fileName:"",uploadProgress:0,supportedFileExtensions:""});var fv=function(){function e(){}e.prototype.getUserInfo=function(){return fetch("https://".concat(Ue.state.authApiHostUrl,"/v1/users/me"),{headers:{Authorization:"Bearer "+Ue.state.accessToken,"Content-Type":"application/json"},method:"GET"}).then((function(e){return e.json()}))};return e}();var hv=v({user:null,theme:"",appearance:""});var gv=':host{-ms-flex-line-pack:var(--ezp-printerSelection-alignContent, center);align-content:var(--ezp-printerSelection-alignContent, center);background:var(--ezp-printerSelection-background, var(--ezp-core-backdrop));display:grid;grid-template:auto/var(--ezp-printerSelection-width, 320px);height:var(--ezp-printerSelection-height, 100vh);-ms-flex-pack:var(--ezp-printerSelection-justifyContent, center);justify-content:var(--ezp-printerSelection-justifyContent, center);left:0;position:var(--ezp-printerSelection-position, fixed);top:0;width:100%;z-index:1}:host(.seamless){--ezp-printerSelection-alignContent:stretch;--ezp-printerSelection-background:transparent;--ezp-printerSelection-body-background:transparent;--ezp-printerSelection-body-padding:0;--ezp-printerSelection-box-background:transparent;--ezp-printerSelection-box-borderRadius:0;--ezp-printerSelection-box-boxShadow:none;--ezp-printerSelection-footer-boxShadowPosition:0 0 0 0;--ezp-printerSelection-footer-padding:var(--ezp-spacing-2) 0;--ezp-printerSelection-header-boxShadowPosition:0 0 0 0;--ezp-printerSelection-header-padding:var(--ezp-spacing-4) 0;--ezp-printerSelection-justifyContent:stretch;--ezp-printerSelection-position:static}#box{background:var(--ezp-printerSelection-box-background, var(--ezp-core-surface-tertiary));border-radius:var(--ezp-printerSelection-box-borderRadius, 6px);-webkit-box-shadow:var(--ezp-printerSelection-box-boxShadow, 0 0 0 1px var(--ezp-black-10));box-shadow:var(--ezp-printerSelection-box-boxShadow, 0 0 0 1px var(--ezp-black-10));padding:var(--ezp-printerSelection-padding, 0);position:relative}#header{border-radius:6px 6px 0 0;-webkit-box-shadow:var(--ezp-printerSelection-header-boxShadowPosition, 0 1px 0 0) var(--ezp-core-outline);box-shadow:var(--ezp-printerSelection-header-boxShadowPosition, 0 1px 0 0) var(--ezp-core-outline);color:var(--ezp-core-foreground-primary);display:grid;grid-column-gap:var(--ezp-spacing-2);grid-template-columns:auto 1fr auto;padding:var(--ezp-printerSelection-header-padding, var(--ezp-spacing-4) var(--ezp-spacing-3) var(--ezp-spacing-4) var(--ezp-spacing-4));position:relative;z-index:3}#toggle-menu{margin:calc(var(--ezp-spacing-3) * -1) 0;position:relative;z-index:2}#body{background:var(--ezp-printerSelection-body-background, var(--ezp-core-surface-secondary));-webkit-box-shadow:var(--ezp-printerSelection-body-boxShadow, none);box-shadow:var(--ezp-printerSelection-body-boxShadow, none);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-2);padding:var(--ezp-printerSelection-body-padding, var(--ezp-spacing-2))}#footer{border-radius:0 0 6px 6px;-webkit-box-shadow:var(--ezp-printerSelection-footer-boxShadowPosition, 0 -1px 0 0) var(--ezp-core-outline);box-shadow:var(--ezp-printerSelection-footer-boxShadowPosition, 0 -1px 0 0) var(--ezp-core-outline);display:grid;gap:var(--ezp-spacing-2);grid-template-areas:var(--ezp-printerSelection-footer-areas, "cancel print");grid-template-columns:var(--ezp-printerSelection-footer-columns, repeat(2, 1fr));grid-template-rows:var(--ezp-printerSelection-footer-rows, auto);-ms-flex-pack:center;justify-content:center;justify-items:stretch;padding:var(--ezp-printerSelection-footer-padding, var(--ezp-spacing-2));position:relative;z-index:3}#cancel{grid-area:cancel}#print{grid-area:print}';var yv=e("ezp_printer_selection",function(){function e(e){var t=this;n(this,e);this.printCancel=a(this,"printCancel",7);this.printSubmit=a(this,"printSubmit",7);this.logout=a(this,"logout",7);this.sasUri="";this.fileExtension="";this.duplexOptions=[{id:1,title:ze.t("printer_selection.duplex_none")},{id:2,title:ze.t("printer_selection.duplex_long")},{id:3,title:ze.t("printer_selection.duplex_short")}];this.hidemenu=false;this.hideheader=false;this.loading=true;this.printProcessing=false;this.uploading=false;this.preparingUpload=false;this.printSuccess=false;this.printFailed=false;this.notSupported=false;this.noPrinters=false;this.userMenuOpen=false;this.printStopped=false;this.selectedPrinterConfig={OrientationsSupported:[],PaperFormats:[],Resolutions:[],DuplexSupported:false,Color:false};this.selectedProperties={paper:"",paperid:"",color:false,duplex:true,duplexmode:1,orientation:1,copies:"",resolution:0};this.handleCancel=function(){t.printCancel.emit()};this.validateData=function(e){if(e.jobstatus===0){t.printSuccess=true;t.printProcessing=false;return true}return false};this.POLL_INTERVAL=2e3;this.MAX_POLL_ATTEMPTS=Infinity;this.handlePrint=function(){return __awaiter(t,void 0,void 0,(function(){var e;var t=this;return __generator(this,(function(r){switch(r.label){case 0:this.printButton.blur();this.printProcessing=true;e=De(this.selectedProperties);mv.state.fileUrl=this.fileurl;mv.state.fileID=this.fileid;mv.state.fileType=this.filetype;mv.state.printerID=this.selectedPrinter.id;mv.state.printerProperties=this.selectedProperties;mv.state.fileName=this.filename;if(this.fileurl){this.printService.printFileByUrl(Ue.state.accessToken,this.fileurl,this.filetype,this.selectedPrinter.id,e,this.filename).then((function(r){if(r.status===200&&t.selectedPrinter.is_queue){t.printProcessing=false;t.printSuccess=true}if(r.status===412){r.json().then((function(e){return t.fileid=e.fileid}));t.printService.printByFileID(Ue.state.accessToken,t.fileid,t.filetype,t.selectedPrinter.id,e,t.filename)}else{return r.json()}})).then((function(e){if(e.code===804){t.printFailed=true;t.printProcessing=false}if(e.jobid){mv.state.jobID=e.jobid;Le({fn:t.printService.getPrintStatus,validate:t.validateData,interval:t.POLL_INTERVAL,maxAttempts:t.MAX_POLL_ATTEMPTS}).catch((function(e){console.warn(e);t.printFailed=true;t.printProcessing=false}))}else{t.printFailed=true;t.printProcessing=false}})).catch((function(e){console.log(e);t.printFailed=true;t.printProcessing=false}))}if(!this.file)return[3,2];return[4,this.handleFiles(this.file,e)];case 1:r.sent();r.label=2;case 2:localStorage.setItem("properties",JSON.stringify(this.selectedProperties));localStorage.setItem("printer",JSON.stringify(this.selectedPrinter));this.printStopped=false;return[2]}}))}))};this.handleUserMenu=function(){t.userMenuOpen=true};this.validateFileType=function(e){return __awaiter(t,void 0,void 0,(function(){var t;return __generator(this,(function(r){t=e.split(".").pop();this.fileExtension=t.toLowerCase();return[2,mv.state.supportedFileExtensions.includes("".concat(this.fileExtension))]}))}))}}e.prototype.listenSelectSelection=function(e){this.setSelectedProperties(e.detail)};e.prototype.listenStepperChanged=function(e){this.selectedProperties.copies=e.detail};e.prototype.listenUserMenuClosure=function(){this.userMenuOpen=false};e.prototype.listenLogout=function(){this.printCancel.emit();this.logout.emit()};e.prototype.listenStatusCancel=function(e){if(e.detail==="print-processing"){this.printStopped=true;this.printProcessing=false}};e.prototype.listenStatusClose=function(e){switch(e.detail){case"print-success":this.printSuccess=false;this.printCancel.emit();break;case"print-failed":this.printProcessing=false;this.printFailed=false;break;case"no-printers":this.noPrinters=false;break}};e.prototype.listenStatusRetry=function(e){switch(e.detail){case"not-supported":this.printCancel.emit();break;case"print-failed":this.printFailed=false;this.printProcessing=false;this.handlePrint();break}};e.prototype.getPropertiesFromLocalStorage=function(){if(localStorage.getItem("properties")){this.selectedProperties=JSON.parse(localStorage.getItem("properties"))}if(localStorage.getItem("printer")){var e=JSON.parse(localStorage.getItem("printer"));if(this.printers.some((function(t){return t.id===e.id}))){this.selectedPrinter=e}else{this.selectedPrinter={id:"",location:"",name:"",is_queue:false};localStorage.removeItem("printer");localStorage.removeItem("properties")}}else{this.selectedPrinter={id:"",location:"",name:"",is_queue:false}}};e.prototype.getUserInfo=function(){var e=this;var t=new fv;return t.getUserInfo().then((function(t){hv.state.user=t;e.userName=hv.state.user.display_name}))};e.prototype.setSelectedProperties=function(e){return __awaiter(this,void 0,void 0,(function(){var t;var r=this;return __generator(this,(function(n){switch(n.label){case 0:t=e.type;switch(t){case"printer":return[3,1];case"color":return[3,3];case"orientation":return[3,4];case"format":return[3,5];case"quality":return[3,6];case"duplex":return[3,7]}return[3,8];case 1:this.selectedPrinter.id=e.id;this.selectedPrinter.name=e.title;this.selectedPrinter.is_queue=e.is_queue;return[4,this.printService.getPrinterProperties(Ue.state.accessToken,this.selectedPrinter.id).then((function(e){return r.selectedPrinterConfig=e[0]}))];case 2:n.sent();this.setDefaultPaperFormat();return[3,8];case 3:this.selectedProperties.color=!!e.id;return[3,8];case 4:this.selectedProperties.orientation=e.id;return[3,8];case 5:this.selectedProperties.paper=e.title;this.selectedProperties.paperid=e.id;return[3,8];case 6:this.selectedProperties.resolution=e.title;return[3,8];case 7:if(e.title==="None"){this.selectedProperties.duplex=false}else{this.selectedProperties.duplex=true}this.selectedProperties.duplexmode=e.id;return[3,8];case 8:return[2]}}))}))};e.prototype.handleFiles=function(e,t){return __awaiter(this,void 0,void 0,(function(){var r,n,a;var i=this;return __generator(this,(function(o){switch(o.label){case 0:this.preparingUpload=true;return[4,this.printService.prepareFileUpload(Ue.state.accessToken)];case 1:r=o.sent();this.preparingUpload=false;this.fileid=r.fileid;this.sasUri=r.sasUri;this.filetype=this.fileExtension;this.uploading=true;o.label=2;case 2:o.trys.push([2,4,,5]);return[4,this.printService.uploadBlobFiles(this.sasUri,e)];case 3:n=o.sent();return[3,5];case 4:a=o.sent();this.printProcessing=false;this.printFailed=true;return[3,5];case 5:this.uploading=false;if(n._response.status===201){this.printService.printByFileID(Ue.state.accessToken,this.fileid,this.filetype,this.selectedPrinter.id,t,this.filename).then((function(e){if(e.code===804){i.printFailed=true;i.printProcessing=false}if(e.jobid){mv.state.jobID=e.jobid;Le({fn:i.printService.getPrintStatus,validate:i.validateData,interval:i.POLL_INTERVAL,maxAttempts:i.MAX_POLL_ATTEMPTS}).catch((function(e){console.log(e);i.printFailed=true;i.printProcessing=false}))}else{i.printFailed=true;i.printProcessing=false}})).catch((function(e){console.log(e);i.printFailed=true;i.printProcessing=false}))}else{this.printFailed=true;this.printProcessing=false}return[2]}}))}))};e.prototype.setDefaultPaperFormat=function(){var e;var t=navigator.language;if(t==="en-US"){e="Letter"}else if(t==="my"){e="Letter"}else{e="A4"}if(this.selectedPrinterConfig.PaperFormats.find((function(t){return t.Name.includes(e)}))){this.selectedProperties.paper=this.selectedPrinterConfig.PaperFormats.find((function(t){return t.Name.includes(e)})).Name;this.selectedProperties.paperid=this.selectedPrinterConfig.PaperFormats.find((function(t){return t.Name.includes(e)})).Id}};e.prototype.connectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){switch(t.label){case 0:this.printService=new uv(this.redirectURI,this.clientID);this.printService.registerFetchInterceptor();return[4,this.getUserInfo()];case 1:t.sent();return[4,this.printService.getPrinterList(Ue.state.accessToken).then((function(t){e.printers=t;if(!(e.printers.length>0)){e.noPrinters=true}}))];case 2:t.sent();this.getPropertiesFromLocalStorage();if(!(this.selectedPrinter.id!=""))return[3,4];return[4,this.printService.getPrinterProperties(Ue.state.accessToken,this.selectedPrinter.id).then((function(t){return e.selectedPrinterConfig=t[0]}))];case 3:t.sent();if(this.selectedProperties.paper===""){this.setDefaultPaperFormat()}t.label=4;case 4:return[4,this.printService.getConfig(Ue.state.accessToken)];case 5:return[4,t.sent().json().then((function(e){mv.state.supportedFileExtensions=e.System.FILEEXT}))];case 6:t.sent();return[4,this.printService.getAllPrinterProperties(Ue.state.accessToken).then((function(t){e.printerConfig=t}))];case 7:t.sent();if(!this.file)return[3,9];return[4,this.validateFileType(this.filename).then((function(t){e.notSupported=!t?true:false}))];case 8:t.sent();t.label=9;case 9:this.loading=false;return[2]}}))}))};e.prototype.render=function(){var e=this;return this.loading?i("ezp-status",{processing:true,description:ze.t("printer_selection.loading"),instance:"loading"}):i(o,{class:{seamless:this.seamless}},i("div",{id:"box","data-backdrop-surface":true},!this.printStopped&&i(c,null,this.printProcessing?i("ezp-status",{processing:true,description:this.preparingUpload?ze.t("printer_selection.prepare_upload"):this.uploading?ze.t("printer_selection.uploading"):ze.t("printer_selection.print_processing"),instance:"print-processing",cancel:true}):this.selectedPrinter.is_queue&&this.printSuccess?i("ezp-status",{icon:"checkmark-alt",description:ze.t("printer_selection.pull_print_success"),instance:"print-success",close:true}):this.printSuccess?i("ezp-status",{icon:"checkmark-alt",description:ze.t("printer_selection.print_success"),instance:"print-success",close:true}):this.printFailed?i("ezp-status",{icon:"exclamation-mark",description:ze.t("printer_selection.print_failed"),instance:"print-failed",close:true,retry:true}):this.notSupported?i("ezp-status",{icon:"exclamation-mark",description:ze.t("printer_selection.not_supported"),instance:"not-supported",retry:true}):this.noPrinters?i("ezp-status",{icon:"exclamation-mark",description:ze.t("printer_selection.no_printers"),instance:"no-printers",close:true}):null),!this.hideheader&&i("div",{id:"header"},i("ezp-label",{weight:"heavy",text:ze.t("printer_selection.print")+"".concat(!this.notSupported?":":"")}),i("ezp-label",{text:!this.notSupported?this.filename:"",ellipsis:true}),!this.hidemenu&&i("ezp-icon-button",{level:"tertiary",icon:"menu",id:"toggle-menu",type:"button",onClick:this.handleUserMenu})),i("div",{id:"body"},i("div",{id:"printer"},i("ezp-select",{label:ze.t("printer_selection.printer"),icon:"printer",placeholder:this.printers.length>0?ze.t("printer_selection.select_printer"):ze.t("printer_selection.no_printers"),toggleFlow:"vertical",optionFlow:"vertical",options:this.printers.map((function(e){return{id:e.id,title:e.name,meta:e.location!==""?e.location:"",type:"printer",is_queue:e.is_queue}})),preSelected:this.selectedPrinter.id?this.selectedPrinter.name:null,disabled:!(this.printers.length>0)})),i("div",{id:"options"},i("ezp-select",{label:ze.t("printer_selection.color"),icon:"color",placeholder:ze.t("printer_selection.select_color"),toggleFlow:"horizontal",options:this.selectedPrinterConfig.Color?[{id:1,title:ze.t("printer_selection.color_color"),meta:"",type:"color"},{id:0,title:ze.t("printer_selection.color_grayscale"),meta:"",type:"color"}]:[{id:0,title:ze.t("printer_selection.color_grayscale"),meta:"",type:"color"}],preSelected:this.selectedPrinter.id?this.selectedProperties.color?ze.t("printer_selection.color_color"):ze.t("printer_selection.color_grayscale"):null,disabled:!this.selectedPrinterConfig.Color}),i("ezp-select",{label:ze.t("printer_selection.duplex"),icon:"duplex",placeholder:ze.t("printer_selection.select_duplex"),toggleFlow:"horizontal",options:this.duplexOptions.map((function(e){return{id:e.id,title:e.title,meta:"",type:"duplex"}})),preSelected:this.selectedPrinter.id&&this.selectedProperties.duplex?this.duplexOptions.find((function(t){return t.id===e.selectedProperties.duplexmode})).id:null,disabled:!this.selectedPrinterConfig.DuplexSupported}),i("ezp-select",{label:ze.t("printer_selection.size"),icon:"size",placeholder:ze.t("printer_selection.select_size"),toggleFlow:"horizontal",optionFlow:"horizontal",options:this.selectedPrinterConfig.PaperFormats.map((function(e){return{id:e.Id,title:e.Name,meta:"".concat(e.XRes," x ").concat(e.YRes),type:"format"}})),preSelected:this.selectedPrinter.id?this.selectedProperties.paper:null,disabled:!(this.selectedPrinterConfig.PaperFormats.length>0)}),i("ezp-select",{label:ze.t("printer_selection.orientation"),icon:"orientation",placeholder:ze.t("printer_selection.select_orientation"),toggleFlow:"horizontal",options:this.selectedPrinterConfig.OrientationsSupported.map((function(e,t){return{id:t+1,title:ze.t("printer_selection.orientation_".concat(e)),meta:"",type:"orientation"}})),preSelected:this.selectedPrinter.id?this.selectedProperties.orientation:null,disabled:!(this.selectedPrinterConfig.OrientationsSupported.length>0)}),i("ezp-select",{label:ze.t("printer_selection.quality"),icon:"quality",placeholder:ze.t("printer_selection.select_quality"),toggleFlow:"horizontal",options:this.selectedPrinterConfig.Resolutions.map((function(e,t){return{id:t,title:e,meta:"",type:"quality"}})),preSelected:this.selectedPrinter.id?this.selectedProperties.resolution:null,disabled:!(this.selectedPrinterConfig.Resolutions.length>0)})),i("ezp-stepper",{label:ze.t("printer_selection.copies"),max:10,icon:"copies"})),i("div",{id:"footer"},i("ezp-text-button",{type:"button",level:"secondary",onClick:this.handleCancel,label:ze.t("button_actions.cancel"),class:"action",id:"cancel"}),i("ezp-text-button",{disabled:this.selectedPrinter.id===""||this.printProcessing,type:"button",onClick:this.handlePrint,label:ze.t("button_actions.print"),ref:function(t){return e.printButton=t},class:"action",id:"print"})),!this.hidemenu&&i("ezp-user-menu",{open:this.userMenuOpen,name:this.userName})))};return e}());yv.style=gv;var vv="account.ezeep.com";var bv="printapi.ezeep.com";var xv={authApiHostUrl:vv,printingApiHostUrl:bv};var Nv=':host{--ezp-black-5:rgba(0, 0, 0, 0.05);--ezp-black-10:rgba(0, 0, 0, 0.1);--ezp-black-20:rgba(0, 0, 0, 0.2);--ezp-black-30:rgba(0, 0, 0, 0.3);--ezp-black-40:rgba(0, 0, 0, 0.4);--ezp-black-50:rgba(0, 0, 0, 0.5);--ezp-black-60:rgba(0, 0, 0, 0.6);--ezp-black-70:rgba(0, 0, 0, 0.7);--ezp-black-80:rgba(0, 0, 0, 0.8);--ezp-black-90:rgba(0, 0, 0, 0.9);--ezp-black-95:rgba(0, 0, 0, 0.95);--ezp-black-100:black}:host{--ezp-white-5:rgba(255, 255, 255, 0.05);--ezp-white-10:rgba(255, 255, 255, 0.1);--ezp-white-20:rgba(255, 255, 255, 0.2);--ezp-white-30:rgba(255, 255, 255, 0.3);--ezp-white-40:rgba(255, 255, 255, 0.4);--ezp-white-50:rgba(255, 255, 255, 0.5);--ezp-white-60:rgba(255, 255, 255, 0.6);--ezp-white-70:rgba(255, 255, 255, 0.7);--ezp-white-80:rgba(255, 255, 255, 0.8);--ezp-white-90:rgba(255, 255, 255, 0.9);--ezp-white-95:rgba(255, 255, 255, 0.95);--ezp-white-100:white}:host{font-family:"Inter", sans-serif;-webkit-font-feature-settings:"calt", "liga", "ss03", "zero", "cv05", "cv10";font-feature-settings:"calt", "liga", "ss03", "zero", "cv05", "cv10";-webkit-font-kerning:normal;font-kerning:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0;-webkit-tap-highlight-color:transparent;text-rendering:optimizeLegibility;-webkit-text-size-adjust:none;--ezp-duration-1:0.1s;--ezp-duration-2:0.16s;--ezp-duration-3:0.26s;--ezp-duration-4:0.42s;--ezp-duration-5:0.68s;--ezp-duration-6:1s;--ezp-spacing-1:4px;--ezp-spacing-2:6px;--ezp-spacing-3:10px;--ezp-spacing-4:16px;--ezp-spacing-5:26px;--ezp-spacing-6:42px;--ezp-spacing-7:68px;--ezp-spacing-8:110px;--ezp-easing-in-quart:cubic-bezier(0.11, 0, 0.5, 0);--ezp-easing-in-out-quart:cubic-bezier(0.76, 0, 0.24, 1);--ezp-easing-in-out-cubic:cubic-bezier(0.65, 0, 0.35, 1);--ezp-easing-in-expo:cubic-bezier(0.7, 0, 0.84, 0);--ezp-easing-out-quart:cubic-bezier(0.25, 1, 0.5, 1);--ezp-easing-out-expo:cubic-bezier(0.16, 1, 0.3, 1)}:host(.light){--ezp-accent-pink-solid:#f23267;--ezp-accent-pink-solid-alt:#df1559;--ezp-accent-pink-translucent:rgba(242, 50, 103, 0.16);--ezp-accent-red-solid:#f23b22;--ezp-accent-red-solid-alt:#de2313;--ezp-accent-red-translucent:rgba(242, 59, 34, 0.16);--ezp-accent-orange-solid:#fe7200;--ezp-accent-orange-solid-alt:#f56200;--ezp-accent-orange-translucent:rgba(254, 114, 0, 0.16);--ezp-accent-yellow-solid:#ffa200;--ezp-accent-yellow-solid-alt:#fe9000;--ezp-accent-yellow-translucent:rgba(255, 162, 0, 0.16);--ezp-accent-green-solid:#5d9200;--ezp-accent-green-solid-alt:#518100;--ezp-accent-green-translucent:rgba(93, 146, 0, 0.16);--ezp-accent-teal-solid:#00967c;--ezp-accent-teal-solid-alt:#00846e;--ezp-accent-teal-translucent:rgba(0, 150, 124, 0.16);--ezp-accent-cyan-solid:#0091b4;--ezp-accent-cyan-solid-alt:#0080a0;--ezp-accent-cyan-translucent:rgba(0, 145, 180, 0.16);--ezp-accent-blue-solid:#5081f1;--ezp-accent-blue-solid-alt:#3b72df;--ezp-accent-blue-translucent:rgba(80, 129, 241, 0.16);--ezp-accent-violet-solid:#ae5ef3;--ezp-accent-violet-solid-alt:#9d4ee2;--ezp-accent-violet-translucent:rgba(174, 94, 243, 0.16);--ezp-core-surface-primary:white;--ezp-core-surface-secondary:#f3f3f3;--ezp-core-surface-tertiary:white;--ezp-core-foreground-primary:rgba(0, 0, 0, 0.94);--ezp-core-foreground-secondary:rgba(62, 62, 62, 0.68);--ezp-core-foreground-tertiary:rgba(62, 62, 62, 0.42);--ezp-core-shade-primary:rgba(139, 139, 139, 0.1);--ezp-core-shade-secondary:rgba(139, 139, 139, 0.16);--ezp-core-shade-tertiary:rgba(139, 139, 139, 0.22);--ezp-core-outline:rgba(99, 99, 99, 0.16);--ezp-core-edge:rgba(0, 0, 0, 0.1);--ezp-core-backdrop:rgba(0, 0, 0, 0.26)}@media (color-gamut: p3){@supports (color: color(display-p3 1 1 1)){:host(.light){--ezp-accent-pink-solid:color(display-p3 0.949 0.196 0.404/100%);--ezp-accent-pink-solid-alt:color(display-p3 0.875 0.082 0.349/100%);--ezp-accent-pink-translucent:color(display-p3 0.949 0.196 0.404/16%);--ezp-accent-red-solid:color(display-p3 0.949 0.231 0.133/100%);--ezp-accent-red-solid-alt:color(display-p3 0.871 0.137 0.075/100%);--ezp-accent-red-translucent:color(display-p3 0.949 0.231 0.133/16%);--ezp-accent-orange-solid:color(display-p3 0.996 0.447 0/100%);--ezp-accent-orange-solid-alt:color(display-p3 0.961 0.384 0/100%);--ezp-accent-orange-translucent:color(display-p3 0.996 0.447 0/16%);--ezp-accent-yellow-solid:color(display-p3 1 0.635 0/100%);--ezp-accent-yellow-solid-alt:color(display-p3 0.996 0.565 0/100%);--ezp-accent-yellow-translucent:color(display-p3 1 0.635 0/16%);--ezp-accent-green-solid:color(display-p3 0.365 0.573 0/100%);--ezp-accent-green-solid-alt:color(display-p3 0.318 0.506 0/100%);--ezp-accent-green-translucent:color(display-p3 0.365 0.573 0/16%);--ezp-accent-teal-solid:color(display-p3 0 0.588 0.486/100%);--ezp-accent-teal-solid-alt:color(display-p3 0 0.518 0.431/100%);--ezp-accent-teal-translucent:color(display-p3 0 0.588 0.486/16%);--ezp-accent-cyan-solid:color(display-p3 0 0.569 0.706/100%);--ezp-accent-cyan-solid-alt:color(display-p3 0 0.502 0.627/100%);--ezp-accent-cyan-translucent:color(display-p3 0 0.569 0.706/16%);--ezp-accent-blue-solid:color(display-p3 0.314 0.506 0.945/100%);--ezp-accent-blue-solid-alt:color(display-p3 0.231 0.447 0.875/100%);--ezp-accent-blue-translucent:color(display-p3 0.314 0.506 0.945/16%);--ezp-accent-violet-solid:color(display-p3 0.682 0.369 0.953/100%);--ezp-accent-violet-solid-alt:color(display-p3 0.616 0.306 0.886/100%);--ezp-accent-violet-translucent:color(display-p3 0.682 0.369 0.953/16%)}}}@media (color-gamut: p3){@supports (color: color(display-p3 1 1 1)){:host(.light){--ezp-core-surface-primary:color(display-p3 1 1 1/100%);--ezp-core-surface-secondary:color(display-p3 0.953 0.953 0.953/100%);--ezp-core-surface-tertiary:color(display-p3 1 1 1/100%);--ezp-core-foreground-primary:color(display-p3 0 0 0/94%);--ezp-core-foreground-secondary:color(display-p3 0.243 0.243 0.243/68%);--ezp-core-foreground-tertiary:color(display-p3 0.243 0.243 0.243/42%);--ezp-core-shade-primary:color(display-p3 0.545 0.545 0.545/10%);--ezp-core-shade-secondary:color(display-p3 0.545 0.545 0.545/16%);--ezp-core-shade-tertiary:color(display-p3 0.545 0.545 0.545/22%);--ezp-core-outline:color(display-p3 0.388 0.388 0.388/16%);--ezp-core-edge:color(display-p3 0 0 0/10%);--ezp-core-backdrop:color(display-p3 0 0 0/26%)}}}:host(.dark){--ezp-dialog-box-boxShadow:inset 0 0 0 1px var(--ezp-core-outline),\n 0 0 0 1px var(--ezp-black-60);--ezp-printerSelection-body-boxShadow:inset 1px 0 0 0 var(--ezp-core-outline),\n inset -1px 0 0 0 var(--ezp-core-outline);--ezp-printerSelection-box-boxShadow:0 0 0 1px var(--ezp-black-60);--ezp-printerSelection-footer-boxShadowPosition:inset 0 0 0 1px;--ezp-printerSelection-header-boxShadowPosition:inset 0 0 0 1px;--ezp-select-wrap-boxShadowPositionBottom:inset 0 -1px 0 0;--ezp-select-wrap-boxShadowPositionLeft:inset 1px 0 0 0;--ezp-select-wrap-boxShadowPositionRight:inset -1px 0 0 0;--ezp-select-wrap-boxShadowPositionTop:inset 0 1px 0 0;--ezp-status-box-boxShadow:inset 0 0 0 1px var(--ezp-core-outline),\n 0 0 0 1px var(--ezp-black-60);--ezp-stepper-boxShadowPosition:inset 0 0 0 1px;--ezp-userMenu-boxShadow:inset 0 0 0 1px var(--ezp-core-outline),\n 0 0 0 1px var(--ezp-black-60);--ezp-userMenu-header-boxShadowPosition:inset 0 -1px 0 0;--ezp-userMenu-links-boxShadowPosition:inset 0 -1px 0 0;--ezp-userMenu-theme-boxShadowPosition:inset 0 -1px 0 0;--ezp-accent-pink-solid:#ff4171;--ezp-accent-pink-translucent:rgba(255, 65, 113, 0.26);--ezp-accent-red-solid:#ff482c;--ezp-accent-red-translucent:rgba(255, 72, 44, 0.26);--ezp-accent-orange-solid:#ff811c;--ezp-accent-orange-translucent:rgba(255, 129, 28, 0.26);--ezp-accent-yellow-solid:#ffaf3a;--ezp-accent-yellow-translucent:rgba(255, 175, 58, 0.26);--ezp-accent-green-solid:#679c15;--ezp-accent-green-translucent:rgba(103, 156, 21, 0.26);--ezp-accent-teal-solid:#1da086;--ezp-accent-teal-translucent:rgba(29, 160, 134, 0.26);--ezp-accent-cyan-solid:#209bbf;--ezp-accent-cyan-translucent:rgba(32, 155, 191, 0.26);--ezp-accent-blue-solid:#5d8bfd;--ezp-accent-blue-translucent:rgba(93, 139, 253, 0.26);--ezp-accent-violet-solid:#ba69ff;--ezp-accent-violet-translucent:rgba(186, 105, 255, 0.26);--ezp-core-surface-primary:black;--ezp-core-surface-secondary:#1b1b1b;--ezp-core-surface-tertiary:#282828;--ezp-core-foreground-primary:rgba(255, 255, 255, 0.94);--ezp-core-foreground-secondary:rgba(182, 182, 182, 0.68);--ezp-core-foreground-tertiary:rgba(182, 182, 182, 0.42);--ezp-core-shade-primary:rgba(99, 99, 99, 0.26);--ezp-core-shade-secondary:rgba(99, 99, 99, 0.32);--ezp-core-shade-tertiary:rgba(99, 99, 99, 0.38);--ezp-core-outline:rgba(139, 139, 139, 0.26);--ezp-core-edge:rgba(255, 255, 255, 0.16);--ezp-core-backdrop:rgba(0, 0, 0, 0.68)}@media (color-gamut: p3){@supports (color: color(display-p3 1 1 1)){:host(.dark){--ezp-accent-pink-solid:color(display-p3 1 0.255 0.443/100%);--ezp-accent-pink-translucent:color(display-p3 1 0.255 0.443/26%);--ezp-accent-red-solid:color(display-p3 1 0.282 0.173/100%);--ezp-accent-red-translucent:color(display-p3 1 0.282 0.173/26%);--ezp-accent-orange-solid:color(display-p3 1 0.506 0.11/100%);--ezp-accent-orange-translucent:color(display-p3 1 0.506 0.11/26%);--ezp-accent-yellow-solid:color(display-p3 1 0.686 0.227/100%);--ezp-accent-yellow-translucent:color(display-p3 1 0.686 0.227/26%);--ezp-accent-green-solid:color(display-p3 0.404 0.612 0.082/100%);--ezp-accent-green-translucent:color(display-p3 0.404 0.612 0.082/26%);--ezp-accent-teal-solid:color(display-p3 0.114 0.627 0.525/100%);--ezp-accent-teal-translucent:color(display-p3 0.114 0.627 0.525/26%);--ezp-accent-cyan-solid:color(display-p3 0.125 0.608 0.749/100%);--ezp-accent-cyan-translucent:color(display-p3 0.125 0.608 0.749/26%);--ezp-accent-blue-solid:color(display-p3 0.365 0.545 0.992/100%);--ezp-accent-blue-translucent:color(display-p3 0.365 0.545 0.992/26%);--ezp-accent-violet-solid:color(display-p3 0.729 0.412 1/100%);--ezp-accent-violet-translucent:color(display-p3 0.729 0.412 1/26%)}}}@media (color-gamut: p3){@supports (color: color(display-p3 1 1 1)){:host(.dark){--ezp-core-surface-primary:color(display-p3 0 0 0/100%);--ezp-core-surface-secondary:color(display-p3 0.106 0.106 0.106/100%);--ezp-core-surface-tertiary:color(display-p3 0.157 0.157 0.157/100%);--ezp-core-foreground-primary:color(display-p3 1 1 1/94%);--ezp-core-foreground-secondary:color(display-p3 0.714 0.714 0.714/68%);--ezp-core-foreground-tertiary:color(display-p3 0.714 0.714 0.714/42%);--ezp-core-shade-primary:color(display-p3 0.388 0.388 0.388/26%);--ezp-core-shade-secondary:color(display-p3 0.388 0.388 0.388/32%);--ezp-core-shade-tertiary:color(display-p3 0.388 0.388 0.388/38%);--ezp-core-outline:color(display-p3 0.545 0.545 0.545/26%);--ezp-core-edge:color(display-p3 1 1 1/16%);--ezp-core-backdrop:color(display-p3 0 0 0/68%)}}}:host(.seamless){--ezp-status-border-radius:0;--ezp-backdrop-border-radius:0}:host(.blue){--ezp-theme-solid:var(--ezp-accent-blue-solid);--ezp-theme-translucent:var(--ezp-accent-blue-translucent)}:host(.cyan){--ezp-theme-solid:var(--ezp-accent-cyan-solid);--ezp-theme-translucent:var(--ezp-accent-cyan-translucent)}:host(.green){--ezp-theme-solid:var(--ezp-accent-green-solid);--ezp-theme-translucent:var(--ezp-accent-green-translucent)}:host(.teal){--ezp-theme-solid:var(--ezp-accent-teal-solid);--ezp-theme-translucent:var(--ezp-accent-teal-translucent)}:host(.orange){--ezp-theme-solid:var(--ezp-accent-orange-solid);--ezp-theme-translucent:var(--ezp-accent-orange-translucent)}:host(.pink){--ezp-theme-solid:var(--ezp-accent-pink-solid);--ezp-theme-translucent:var(--ezp-accent-pink-translucent)}:host(.red){--ezp-theme-solid:var(--ezp-accent-red-solid);--ezp-theme-translucent:var(--ezp-accent-red-translucent)}:host(.violet){--ezp-theme-solid:var(--ezp-accent-violet-solid);--ezp-theme-translucent:var(--ezp-accent-violet-translucent)}';var zv=e("ezp_printing",function(){function e(e){n(this,e);this.printFinished=a(this,"printFinished",7);this.filename="";this.hidemenu=false;this.hideheader=false;this.theme="cyan";this.appearance="system";this.language="";this.seamless=false;this.printOpen=false;this.authOpen=false;this.onlyGetSasUri=false;this.noDocumentOpen=false}e.prototype.watchFileData=function(e,t){console.log(e);if(e!==t&&e.length>0){var r=new Uint8Array(e.length);for(var n=0;n<e.length;n++){r[n]=e.charCodeAt(n)}this.file=new File([r],this.filename)}};e.prototype.watchFilename=function(e,t){if(e!==t&&e.length>0){this.filename=e}};e.prototype.watchFileUrl=function(e,t){if(e!==t&&e.length>0){this.fileurl=e}};e.prototype.watchLanguage=function(e,t){if(e!==t&&e.length>0){this.language=e}};e.prototype.listenPrintCancel=function(){this.printOpen=false;this.printFinished.emit()};e.prototype.listenPrintSubmit=function(){this.printOpen=false;this.printFinished.emit();this.checkAuth()};e.prototype.listenAuthCancel=function(){this.authOpen=false;this.checkAuth()};e.prototype.listenAuthSuccess=function(){if(this.onlyGetSasUri){this.printOpen=false;this.onlyGetSasUri=false}else if(this.filename!=""){this.printOpen=true}else{this.noDocumentOpen=true}};e.prototype.listenUploadFile=function(e){this.filename=e.detail[0].name;this.file=e.detail[0];this.open()};e.prototype.listenDialogClose=function(e){if(e.detail==="no-document-selected"){this.noDocumentOpen=false}};e.prototype.listenDialogAction=function(e){if(e.detail==="no-document-selected"){this.noDocumentOpen=false}};e.prototype.listenLogout=function(){this.logOut()};e.prototype.open=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(Ue.state.isAuthorized){if(this.filename){this.printOpen=true}else{this.noDocumentOpen=true}}else{this.authOpen=true}return[2]}))}))};e.prototype.logOut=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.auth.revokeRefreshToken();localStorage.removeItem("properties");localStorage.removeItem("refreshToken");localStorage.removeItem("access_token");localStorage.removeItem("printer");localStorage.removeItem("isAuthorized");this.printOpen=false;return[2]}))}))};e.prototype.getSasUri=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,r;var n=this;return __generator(this,(function(a){switch(a.label){case 0:this.onlyGetSasUri=true;e=new uv(this.redirecturi,this.clientid);return[4,e.prepareFileUpload(Ue.state.accessToken).catch((function(){n.open();return null}))];case 1:t=a.sent();if(t){r=t.sasUri;return[2,r]}return[2]}}))}))};e.prototype.getAuthUri=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:this.auth.generateCodeVerifier();return[4,this.auth.generateCodeChallenge(Ue.state.codeVerifier)];case 1:e.sent();this.auth.buildAuthURI();return[2,Ue.state.authUri]}}))}))};e.prototype.checkAuth=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(r){switch(r.label){case 0:e=new uv(this.redirecturi,this.clientid);t=Ue.state.accessToken;if(t===""){t=localStorage.getItem("access_token");Ue.state.accessToken=t}if(localStorage.getItem("isAuthorized")){Ue.state.isAuthorized=localStorage.getItem("isAuthorized")==="true"}return[4,e.getConfig(Ue.state.accessToken).then((function(e){if(e.ok){Ue.state.isAuthorized=true}if(!e.ok){Ue.state.isAuthorized=false;throw new Error("http status "+e.status)}})).catch((function(){Ue.state.isAuthorized=false}))];case 1:r.sent();localStorage.setItem("isAuthorized",Ue.state.isAuthorized.toString());return[2,Ue.state.isAuthorized]}}))}))};e.prototype.refreshTokensPeriodically=function(e){var t=new je(this.redirecturi,this.clientid);setInterval((function(){t.refreshTokens()}),e*1e3)};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;var t=this;return __generator(this,(function(r){e=window.matchMedia("(prefers-color-scheme: dark)");this.systemAppearance=e.matches?"dark":"light";e.addEventListener("change",(function(e){t.systemAppearance=e.matches?"dark":"light"}));Ue.state.redirectUri=this.redirecturi;hv.state.theme=this.theme;hv.state.appearance=this.appearance;if(this.authapihosturl){Ue.state.authApiHostUrl=this.authapihosturl}else{Ue.state.authApiHostUrl=xv.authApiHostUrl}if(this.printapihosturl){mv.state.printApiHostUrl=this.printapihosturl}else{mv.state.printApiHostUrl=xv.printingApiHostUrl}this.auth=new je(this.redirecturi,this.clientid);Fe();He(this.language);this.checkAuth();return[2]}))}))};e.prototype.componentDidLoad=function(){this.refreshTokensPeriodically(1800)};e.prototype.render=function(){var e=this;return i(o,{class:"".concat(hv.state.theme," ").concat(hv.state.appearance==="system"?this.systemAppearance:hv.state.appearance," ").concat(this.seamless?"seamless":"")},this.trigger==="custom"?i("slot",null):this.trigger==="file"?i("ezp-upload",null):this.trigger==="button"&&i("ezp-icon-button",{id:"print-trigger",icon:"printer",slot:"trigger",type:"button",onClick:function(){return e.open()}}),this.authOpen?i("ezp-auth",{clientID:this.clientid,redirectURI:this.redirecturi,hidelogin:this.hidelogin,trigger:this.trigger,code:this.code}):this.printOpen?i("ezp-printer-selection",{clientID:this.clientid,redirectURI:this.redirecturi,filename:this.filename,fileurl:this.fileurl,filetype:this.filetype,fileid:this.fileid,file:this.file,hidemenu:this.hidemenu,hideheader:this.hideheader,seamless:this.seamless}):this.noDocumentOpen?i("ezp-dialog",{heading:ze.t("no_document_dialog.heading"),description:ze.t("no_document_dialog.description"),action:ze.t("no_document_dialog.action"),iconName:"question-mark",instance:"no-document-selected"}):null)};Object.defineProperty(e,"watchers",{get:function(){return{filedata:["watchFileData"],filename:["watchFilename"],fileurl:["watchFileUrl"],language:["watchLanguage"]}},enumerable:false,configurable:true});return e}());zv.style=Nv;var Sv=':host{--ezp-select-duration:var(--ezp-duration-3);display:block;height:var(--ezp-select-toggle-height);position:relative;-webkit-transition:var(--ezp-select-transition, z-index 0s var(--ezp-select-duration));transition:var(--ezp-select-transition, z-index 0s var(--ezp-select-duration));z-index:var(--ezp-select-zIndex, 3)}:host(:first-child){--ezp-select-wrap-borderRadius:3px 3px 0 0}:host(:last-child){--ezp-select-wrap-borderRadius:0 0 3px 3px}:host(:first-child:last-child){--ezp-select-wrap-borderRadius:3px}:host(:not(:last-child):not(.is-expanded)){--ezp-select-wrap-boxShadowPositionBottom:0 0 0 0}:host(.toggle-horizontal){--ezp-select-label-alignSelf:start;--ezp-select-toggle-gridTemplateAreas:"label value accessory";--ezp-select-toggle-gridTemplateColumns:1fr repeat(2, auto);--ezp-select-toggle-height:30px;--ezp-select-toggle-gridTemplateRows:auto;--ezp-select-value-alignSelf:end}:host(.toggle-horizontal.has-icon){--ezp-select-toggle-gridTemplateAreas:"icon label value accessory";--ezp-select-toggle-gridTemplateColumns:auto 1fr repeat(2, auto)}:host(.toggle-vertical){--ezp-select-label-alignSelf:center;--ezp-select-toggle-gridTemplateAreas:"label accessory" "value accessory";--ezp-select-toggle-gridTemplateColumns:1fr auto;--ezp-select-toggle-height:48px;--ezp-select-toggle-gridTemplateRows:repeat(2, auto);--ezp-select-value-alignSelf:center}:host(.toggle-vertical.has-icon){--ezp-select-toggle-gridTemplateAreas:"icon label accessory" "icon value accessory";--ezp-select-toggle-gridTemplateColumns:auto 1fr auto}:host(.option-horizontal){--ezp-select-details-gridTemplateColumns:repeat(2, 1fr);--ezp-select-details-gridTemplateRows:auto;--ezp-select-option-height:30px}:host(.option-vertical){--ezp-select-details-gridTemplateColumns:1fr;--ezp-select-details-gridTemplateRows:repeat(2, auto);--ezp-select-option-height:48px}:host(.is-expanded){--ezp-select-accessory-color:var(--ezp-theme-solid);--ezp-select-transition:z-index 0s 0s;--ezp-select-zIndex:9999;--ezp-select-icon-color:var(--ezp-theme-solid);--ezp-select-label-color:var(--ezp-theme-solid);--ezp-select-wrap-borderRadius:3px}:host(.disabled){--ezp-select-accessory-color:var(--ezp-core-foreground-tertiary);--ezp-select-icon-color:var(--ezp-core-foreground-tertiary);--ezp-select-label-color:var(--ezp-core-foreground-tertiary);--ezp-select-toggle-background-hover:transparent;--ezp-select-toggle-cursor:default;--value-color:var(--ezp-core-foreground-tertiary)}#wrap{background:var(--ezp-core-surface-tertiary);border-radius:var(--ezp-select-wrap-borderRadius, 0);-webkit-box-shadow:var(--ezp-select-wrap-boxShadowPositionTop, 0 -1px 0 0) var(--ezp-core-outline), var(--ezp-select-wrap-boxShadowPositionRight, 1px 0 0 0) var(--ezp-core-outline), var(--ezp-select-wrap-boxShadowPositionBottom, 0 1px 0 0) var(--ezp-core-outline), var(--ezp-select-wrap-boxShadowPositionLeft, -1px 0 0 0) var(--ezp-core-outline);box-shadow:var(--ezp-select-wrap-boxShadowPositionTop, 0 -1px 0 0) var(--ezp-core-outline), var(--ezp-select-wrap-boxShadowPositionRight, 1px 0 0 0) var(--ezp-core-outline), var(--ezp-select-wrap-boxShadowPositionBottom, 0 1px 0 0) var(--ezp-core-outline), var(--ezp-select-wrap-boxShadowPositionLeft, -1px 0 0 0) var(--ezp-core-outline);-webkit-transform:translateY(var(--ezp-select-wrap-translateY, 0));transform:translateY(var(--ezp-select-wrap-translateY, 0));-webkit-transition:border-radius var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-transform var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart);transition:border-radius var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-transform var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart);transition:transform var(--ezp-select-duration) var(--ezp-easing-out-quart), border-radius var(--ezp-select-duration) var(--ezp-easing-out-quart), box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart);transition:transform var(--ezp-select-duration) var(--ezp-easing-out-quart), border-radius var(--ezp-select-duration) var(--ezp-easing-out-quart), box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-transform var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart)}#toggle{background:var(--ezp-select-toggle-background, transparent);-webkit-box-sizing:border-box;box-sizing:border-box;cursor:var(--ezp-select-toggle-cursor, pointer);display:grid;gap:var(--ezp-spacing-2) var(--ezp-spacing-3);grid-template-areas:var(--ezp-select-toggle-gridTemplateAreas, none);grid-template-columns:var(--ezp-select-toggle-gridTemplateColumns, none);grid-template-rows:var(--ezp-select-toggle-gridTemplateRows, auto);height:var(--ezp-select-toggle-height, auto);padding:var(--ezp-spacing-3)}#toggle:hover{--ezp-select-toggle-background:var(\n --ezp-select-toggle-background-hover,\n var(--ezp-core-shade-primary)\n )}#icon{align-self:center;color:var(--ezp-select-icon-color, var(--ezp-core-foreground-secondary));grid-area:icon;margin:calc(var(--ezp-spacing-2) * -1) 0}#label{align-self:var(--ezp-select-label-alignSelf, auto);color:var(--ezp-select-label-color, var(--ezp-core-foreground-secondary));grid-area:label}#value{align-self:var(--ezp-select-value-alignSelf, auto);color:var(--value-color, var(--ezp-core-foreground-primary));grid-area:value}#accessory{align-self:center;color:var(--ezp-select-accessory-color, var(--ezp-core-foreground-secondary));grid-area:accessory;margin:calc(var(--ezp-spacing-2) * -1) 0}#list{-webkit-box-shadow:inset 0 1px 0 0 var(--ezp-core-outline);box-shadow:inset 0 1px 0 0 var(--ezp-core-outline);height:var(--ezp-select-list-height, 0);overflow:auto;-webkit-transition:height var(--ezp-select-duration) var(--ezp-easing-out-quart);transition:height var(--ezp-select-duration) var(--ezp-easing-out-quart)}.option{background:var(--ezp-select-option-background);-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:grid;gap:var(--ezp-spacing-3);grid-template:auto/auto 1fr;height:var(--ezp-select-option-height, auto);padding:0 0 0 var(--ezp-spacing-3)}.option:not(:last-child){--ezp-select-details-boxShadow:inset 0 -1px 0 0 var(--ezp-core-outline)}.option:hover{--ezp-select-option-background:var(--ezp-core-shade-primary)}.option:active{--ezp-select-option-background:var(--ezp-core-shade-secondary)}.option.is-selected{--ezp-select-indicator-opacity:1;--ezp-select-indicator-transform:translateX(0);--ezp-select-indicator-transition:opacity var(--ezp-select-duration)\n var(--ezp-easing-out-quart),\n transform var(--ezp-select-duration) var(--ezp-easing-out-quart), visibility 0s 0s;--ezp-select-indicator-visibility:visible}.indicator{-ms-flex-item-align:center;align-self:center;color:var(--ezp-theme-solid);margin:calc(var(--ezp-spacing-2) * -1) 0;opacity:var(--ezp-select-indicator-opacity, 0);-webkit-transform:var(--ezp-select-indicator-transform, translateX(var(--ezp-spacing-3)));transform:var(--ezp-select-indicator-transform, translateX(var(--ezp-spacing-3)));-webkit-transition:var(--ezp-select-indicator-transition, opacity var(--ezp-select-duration) var(--ezp-easing-out-quart), transform var(--ezp-select-duration) var(--ezp-easing-out-quart), visibility 0s var(--ezp-select-duration));transition:var(--ezp-select-indicator-transition, opacity var(--ezp-select-duration) var(--ezp-easing-out-quart), transform var(--ezp-select-duration) var(--ezp-easing-out-quart), visibility 0s var(--ezp-select-duration));visibility:var(--ezp-select-indicator-visibility, hidden)}.details{-webkit-box-shadow:var(--ezp-select-details-boxShadow);box-shadow:var(--ezp-select-details-boxShadow);display:grid;gap:var(--ezp-spacing-2);grid-template-columns:var(--ezp-select-details-gridTemplateColumns, 1fr);grid-template-rows:var(--ezp-select-details-gridTemplateRows, auto);padding:var(--ezp-spacing-3) var(--ezp-spacing-3) var(--ezp-spacing-3) 0}.title{-ms-flex-item-align:start;align-self:start;color:var(--ezp-core-foreground-primary)}.meta{-ms-flex-item-align:end;align-self:end;color:var(--ezp-core-foreground-secondary)}';var wv=e("ezp_select",function(){function e(e){var t=this;n(this,e);this.selectToggle=a(this,"selectToggle",7);this.selectSelection=a(this,"selectSelection",7);this.backdrop=document.createElement("ezp-backdrop");this.containerHeight=0;this.expandCover=false;this.expandRise=false;this.listHeight=0;this.spacing=6;this.toggleHeight=0;this.wrapDiff=0;this.wrapHeight=0;this.wrapTop=0;this.duration=0;this.label="Label";this.placeholder="Placeholder";this.toggleFlow="horizontal";this.disabled=false;this.expanded=false;this.selected={id:false,title:"",meta:""};this.toggle=function(){t.containerHeight=t.container.clientHeight-t.spacing*2;t.listHeight=t.list.scrollHeight;t.wrapTop=t.component.offsetTop;t.wrapHeight=t.toggleHeight+t.listHeight;t.expandCover=t.wrapHeight>t.containerHeight;t.expandRise=t.wrapHeight>t.containerHeight-t.wrapTop;t.wrapDiff=t.containerHeight-t.wrapHeight-t.wrapTop;t.expanded=!t.expanded;t.selectToggle.emit(t.expanded)};this.select=function(e){var r=t.selected.id===e?0:t.duration*1e3;t.selected=t.options.find((function(t){return t.id===e}));t.selectSelection.emit(t.selected);window.setTimeout((function(){t.toggle()}),r)};this.preSelect=function(){t.selected=t.options.find((function(e){return typeof t.preSelected==="number"?e.id===t.preSelected:typeof t.preSelected==="string"?e.title===t.preSelected:null}))}}e.prototype.watchExpanded=function(){if(this.expandCover){this.component.style.setProperty("--ezp-select-list-height",this.expanded?"".concat(this.containerHeight-this.toggleHeight,"px"):"0px");this.component.style.setProperty("--ezp-select-wrap-translateY",this.expanded?"".concat(this.wrapTop*-1+this.spacing,"px"):"0px")}else if(this.expandRise){this.component.style.setProperty("--ezp-select-list-height",this.expanded?"".concat(this.listHeight,"px"):"0px");this.component.style.setProperty("--ezp-select-wrap-translateY",this.expanded?"".concat(this.wrapDiff+this.spacing,"px"):"0px")}else{this.component.style.setProperty("--ezp-select-list-height",this.expanded?"".concat(this.listHeight,"px"):"0px")}if(this.expanded){this.backdrop.visible=true;this.container.appendChild(this.backdrop)}else{this.backdrop.visible=false}};e.prototype.componentWillLoad=function(){var e=this;this.container=this.component.closest("[data-backdrop-surface]");this.backdrop.addEventListener("backdropHideStart",(function(){e.expanded=false}));this.backdrop.addEventListener("backdropHideEnd",(function(){e.container.removeChild(e.backdrop)}));if(this.preSelected!==undefined&&this.preSelected!==""&&this.preSelected!==null){this.preSelect()}};e.prototype.componentDidLoad=function(){var e=getComputedStyle(this.component);this.toggleHeight=parseInt(e.getPropertyValue("--ezp-select-toggle-height"));this.duration=parseFloat(e.getPropertyValue("--ezp-select-duration"))};e.prototype.componentWillUpdate=function(){if(this.selected.id===false&&this.preSelected!==undefined&&this.preSelected!==""&&this.preSelected!==null){this.preSelect()}};e.prototype.render=function(){var e=this;var t=[this.expanded?"is-expanded":"",this.icon?"has-icon":"","toggle-".concat(this.toggleFlow),this.optionFlow?"option-".concat(this.optionFlow):"",this.disabled?"disabled":""];var r=this.toggleFlow==="horizontal"?"secondary":"tertiary";return i(o,{class:t.join(" ")},i("div",{id:"wrap"},i("div",{id:"toggle",onClick:function(){return!e.disabled&&e.toggle()}},this.icon?i("ezp-icon",{id:"icon",name:this.icon}):null,i("ezp-label",{id:"label",noWrap:true,level:r,text:this.label}),i("ezp-label",{id:"value",ellipsis:true,text:this.selected.title!==""?this.selected.title:this.placeholder}),i("ezp-icon",{id:"accessory",name:"expand"})),i("div",{id:"list",ref:function(t){return e.list=t}},this.options.map((function(t){if(t.title!==""){return i("div",{class:"option ".concat(t.id===e.selected.id?"is-selected":""," ").concat(t.meta!==""?"has-meta":""," "),onClick:function(){return e.select(t.id)}},i("ezp-icon",{name:"checkmark",class:"indicator"}),i("div",{class:"details"},i("ezp-label",{class:"title",ellipsis:true,text:t.title}),t.meta!==""?i("ezp-label",{level:"tertiary",class:"meta",text:t.meta,ellipsis:true}):null))}})))))};Object.defineProperty(e.prototype,"component",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{expanded:["watchExpanded"]}},enumerable:false,configurable:true});return e}());wv.style=Sv;var Pv=":host{-ms-flex-align:center;align-items:center;background:var(--ezp-core-backdrop);border-radius:var(--ezp-status-border-radius, 6px);-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;height:100%;-ms-flex-pack:center;justify-content:center;left:0;padding:var(--ezp-spacing-6);position:absolute;top:0;width:100%;z-index:9999}@media (prefers-color-scheme: dark){:host{--box-separator-position:inset 0 0 0 var(--hairline-width-positive)}}#box{--ezp-icon-fill:var(--ezp-theme-solid);-ms-flex-align:center;align-items:center;background:var(--ezp-core-surface-tertiary);border-radius:3px;-webkit-box-shadow:var(--ezp-status-box-boxShadow, 0 0 0 1px var(--ezp-black-10));box-shadow:var(--ezp-status-box-boxShadow, 0 0 0 1px var(--ezp-black-10));display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-4);padding:var(--ezp-spacing-4) var(--ezp-spacing-5)}#indicator{-webkit-animation:rotate var(--ezp-duration-6) linear infinite;animation:rotate var(--ezp-duration-6) linear infinite;display:block;height:42px;-webkit-transform:rotate(0);transform:rotate(0);width:42px}#track{fill:none;stroke:var(--ezp-core-outline);stroke-width:4px}#value{-webkit-animation:offset var(--ezp-duration-6) linear alternate infinite;animation:offset var(--ezp-duration-6) linear alternate infinite;fill:none;stroke:var(--ezp-theme-solid);stroke-dasharray:110;stroke-dashoffset:110;stroke-linecap:round;stroke-width:4px}#description{color:var(--ezp-core-foreground-primary)}#footer{display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-2)}@-webkit-keyframes offset{100%{stroke-dashoffset:55}}@keyframes offset{100%{stroke-dashoffset:55}}@-webkit-keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}";var Cv=e("ezp_status",function(){function e(e){var t=this;n(this,e);this.statusCancel=a(this,"statusCancel",7);this.statusClose=a(this,"statusClose",7);this.statusRetry=a(this,"statusRetry",7);this.description="Description";this.processing=false;this.handleCancel=function(){t.statusCancel.emit(t.instance)};this.handleClose=function(){t.statusClose.emit(t.instance)};this.handleRetry=function(){t.statusRetry.emit(t.instance)}}e.prototype.componentWillLoad=function(){};e.prototype.render=function(){return i(o,null,i("div",{id:"box"},this.processing?i("svg",{id:"indicator",viewBox:"0 0 42 42",xmlns:"http://www.w3.org/2000/svg"},i("circle",{id:"track",cx:"21",cy:"21",r:"18"}),i("circle",{id:"value",cx:"21",cy:"21",r:"18"})):this.icon?i("ezp-icon",{name:this.icon,framed:true}):null,i("ezp-label",{id:"description",level:"tertiary",weight:"strong",text:this.description}),(this.cancel||this.close||this.retry)&&i("div",{id:"footer"},this.cancel&&i("ezp-text-button",{level:"secondary",small:true,onClick:this.handleCancel,label:typeof this.cancel==="string"?this.cancel:ze.t("button_actions.cancel")}),this.close&&i("ezp-text-button",{level:this.retry?"secondary":"primary",small:true,onClick:this.handleClose,label:typeof this.close==="string"?this.close:ze.t("button_actions.close")}),this.retry&&i("ezp-text-button",{level:"primary",small:true,onClick:this.handleRetry,label:typeof this.retry==="string"?this.retry:ze.t("button_actions.retry")}))))};return e}());Cv.style=Pv;var Rv=':host{-ms-flex-align:center;align-items:center;background:var(--ezp-core-surface-tertiary);border-radius:3px;-webkit-box-shadow:var(--ezp-stepper-boxShadowPosition, 0 0 0 1px) var(--ezp-core-outline);box-shadow:var(--ezp-stepper-boxShadowPosition, 0 0 0 1px) var(--ezp-core-outline);display:grid;gap:var(--ezp-spacing-3);grid-template:var(--ezp-stepper-gridTemplate, auto/auto 1fr auto);padding:0 var(--ezp-spacing-2) 0 var(--ezp-spacing-3);position:relative;z-index:0}:host(.focused){--ezp-stepper-icon-color:var(--ezp-theme-solid);--ezp-stepper-label-color:var(--ezp-theme-solid)}:host(.has-icon){--ezp-stepper-gridTemplate:auto / repeat(2, auto) 1fr auto}#toggle{background:var(--ezp-stepper-toggle-background, transparent);border-radius:3px;cursor:pointer;height:100%;left:0;position:absolute;top:0;width:100%;z-index:-1}@media (hover: hover){#toggle:hover{--ezp-stepper-toggle-background:var(--ezp-core-shade-primary)}}#icon{color:var(--ezp-stepper-icon-color, var(--ezp-core-foreground-secondary));pointer-events:none}#label{color:var(--ezp-stepper-label-color, var(--ezp-core-foreground-secondary));pointer-events:none}#input{-moz-appearance:textfield;-webkit-appearance:none;appearance:none;background:transparent;border:0;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--ezp-core-foreground-primary);cursor:inherit;font-family:inherit;-webkit-font-feature-settings:"tnum";font-feature-settings:"tnum";font-size:14px;-webkit-font-smoothing:antialiased;height:30px;letter-spacing:-0.0062235443em;margin:0;outline:none;padding:0;pointer-events:none;text-align:right;width:100%}#input::-webkit-outer-spin-button,#input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.buttons{display:-ms-flexbox;display:flex}.button{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-stepper-button-background, transparent);border:0;border-radius:50%;-webkit-box-shadow:none;box-shadow:none;color:var(--ezp-stepper-button-color, var(--ezp-theme-solid));cursor:var(--ezp-stepper-button-cursor, pointer);display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;margin:0;outline:none;padding:var(--ezp-spacing-1)}@media (hover: hover){.button:not(:disabled):hover{--ezp-stepper-button-background:var(--ezp-core-shade-primary)}.button:not(:disabled):active{--ezp-stepper-button-background:var(--ezp-core-shade-secondary)}}.button:disabled{--ezp-stepper-button-color:var(--ezp-core-foreground-tertiary);--ezp-stepper-button-cursor:default}';var _v=e("ezp_stepper",function(){function e(e){var t=this;n(this,e);this.stepperChanged=a(this,"stepperChanged",7);this.label="Label";this.min=1;this.canDecrease=true;this.canIncrease=true;this.focused=false;this.value=1;this.handleDecrease=function(){t.value--};this.handleIncrease=function(){t.value++};this.handleInput=function(){t.value=t.input.value!==""?parseInt(t.input.value):t.min};this.setFocus=function(){t.input.focus()};this.handleBlur=function(){t.focused=false};this.handleFocus=function(){t.focused=true}}e.prototype.watchValue=function(){this.canIncrease=this.max!==undefined?this.value<this.max:true;this.canDecrease=this.min!==undefined?this.value>this.min:true;this.stepperChanged.emit(this.value)};e.prototype.componentWillLoad=function(){this.watchValue()};e.prototype.render=function(){var e=this;return i(o,{class:"".concat(this.focused?"focused":""," ").concat(this.icon?"has-icon":"")},i("div",{id:"toggle",onClick:this.setFocus}),this.icon?i("ezp-icon",{id:"icon",name:this.icon}):null,i("ezp-label",{id:"label",noWrap:true,text:this.label}),i("input",{id:"input",type:"number",ref:function(t){return e.input=t},min:this.min.toString(),max:this.max.toString(),value:this.value.toString(),onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur}),i("div",{class:"buttons"},i("button",{class:"button",disabled:!this.canDecrease,onClick:this.handleDecrease},i("ezp-icon",{name:"minus"})),i("button",{class:"button",disabled:!this.canIncrease,onClick:this.handleIncrease},i("ezp-icon",{name:"plus"}))))};Object.defineProperty(e,"watchers",{get:function(){return{value:["watchValue"]}},enumerable:false,configurable:true});return e}());_v.style=Rv;var Ev=":host{display:-ms-flexbox;display:flex}:host(.primary){--ezp-textButton-background-disabled:var(--ezp-core-shade-primary);--ezp-textButton-background-init:var(--ezp-theme-solid);--ezp-textButton-color-disabled:var(--ezp-core-foreground-tertiary);--ezp-textButton-color-init:var(--ezp-white-100);--ezp-textButton-opacity-active:0.74;--ezp-textButton-opacity-hover:0.84}:host(.secondary){--ezp-textButton-background-active:var(--ezp-core-shade-tertiary);--ezp-textButton-background-disabled:var(--ezp-core-shade-primary);--ezp-textButton-background-hover:var(--ezp-core-shade-secondary);--ezp-textButton-background-init:var(--ezp-core-shade-primary);--ezp-textButton-color-disabled:var(--ezp-core-foreground-tertiary);--ezp-textButton-color-init:var(--ezp-theme-solid)}:host(.tertiary){--ezp-textButton-background-active:var(--ezp-core-shade-secondary);--ezp-textButton-background-disabled:transparent;--ezp-textButton-background-hover:var(--ezp-core-shade-primary);--ezp-textButton-background-init:transparent;--ezp-textButton-color-disabled:var(--ezp-core-foreground-tertiary);--ezp-textButton-color-init:var(--ezp-theme-solid)}#button{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-textButton-background, var(--ezp-textButton-background-init));border:0;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;color:var(--ezp-textButton-color, var(--ezp-textButton-color-init));cursor:var(--ezp-textButton-cursor, pointer);display:-ms-flexbox;display:flex;font-family:inherit;-ms-flex-pack:center;justify-content:center;margin:0;opacity:var(--ezp-textButton-opacity, 1);outline:none;padding:var(--ezp-spacing-3);white-space:nowrap;width:100%}@media (hover: hover){#button:not(:disabled):hover{--ezp-textButton-background:var(\n --ezp-textButton-background-hover,\n var(--ezp-textButton-background-init)\n );--ezp-textButton-opacity:var(--ezp-textButton-opacity-hover, 1)}#button:not(:disabled):active{--ezp-textButton-background:var(\n --ezp-textButton-background-active,\n var(--ezp-textButton-background-init)\n );--ezp-textButton-opacity:var(--ezp-textButton-opacity-active, 1)}}#button:disabled{--ezp-textButton-background:var(--ezp-textButton-background-disabled);--ezp-textButton-color:var(--ezp-textButton-color-disabled);--ezp-textButton-cursor:default}#label{pointer-events:none}";var kv=e("ezp_text_button",function(){function e(e){n(this,e);this.blank=false;this.disabled=false;this.level="primary";this.small=false}e.prototype.render=function(){var e=this.type!==undefined?"button":"a";var t=this.type!==undefined?{type:this.type,disabled:this.disabled}:{href:this.href,target:this.blank?"_blank":"_self"};return i(o,{class:"".concat(this.level)},i(e,Object.assign({id:"button"},t),i("ezp-label",{id:"label",weight:"heavy",text:this.label,level:this.small?"tertiary":"secondary"})))};return e}());kv.style=Ev;var Ov=":host{-ms-flex-line-pack:center;align-content:center;background:var(--ezp-upload-background, transparent);border:1px dashed var(--ezp-upload-border-color, var(--ezp-core-foreground-tertiary));border-radius:3px;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--ezp-core-foreground-primary);display:grid;grid-template:auto/minmax(auto, 280px);height:var(--ezp-upload-height, auto);-ms-flex-pack:center;justify-content:center;padding:var(--ezp-spacing-3);position:relative;-webkit-transition:background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart);width:var(--ezp-upload-width, auto)}:host(.dragging){--ezp-upload-background:var(--ezp-theme-translucent);--ezp-upload-border-color:var(--ezp-theme-translucent);--ezp-upload-header-blur:16px;--ezp-upload-header-opacity:0.42}#header{--ezp-icon-fill:var(--ezp-theme-solid);-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-webkit-filter:blur(var(--ezp-upload-header-blur, 0));filter:blur(var(--ezp-upload-header-blur, 0));-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-5);opacity:var(--ezp-upload-header-opacity, 1);text-align:center;-webkit-transition:opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:filter var(--ezp-duration-3) var(--ezp-easing-out-quart), opacity var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:filter var(--ezp-duration-3) var(--ezp-easing-out-quart), opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-filter var(--ezp-duration-3) var(--ezp-easing-out-quart)}#meta{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--ezp-spacing-3) 3px;-ms-flex-pack:center;justify-content:center}#select{color:var(--ezp-theme-solid);cursor:pointer;opacity:var(--ezp-upload-select-opacity, 1);text-decoration:underline;white-space:nowrap}@media (hover: hover){#select:hover{--ezp-upload-select-opacity:0.58}}#input{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:0;opacity:0;pointer-events:none;position:absolute;width:0}";var Tv=e("ezp_upload",function(){function e(e){var t=this;n(this,e);this.uploadFile=a(this,"uploadFile",7);this.filename="";this.dragging=false;this.handleInput=function(){t.filename=t.input.files[0].name;t.uploadFile.emit(t.input.files)}}e.prototype.handleDragEnter=function(){this.dragging=true};e.prototype.handleDragOver=function(e){e.stopPropagation();e.preventDefault();e.dataTransfer.dropEffect="copy"};e.prototype.handleDragLeave=function(){this.dragging=false};e.prototype.handleDrop=function(e){e.stopPropagation();e.preventDefault();this.dragging=false;this.filename=e.dataTransfer.files[0].name;this.uploadFile.emit(e.dataTransfer.files)};e.prototype.listenPrintCancel=function(){this.form.reset();this.filename=""};e.prototype.render=function(){var e=this;return i(o,{class:{dragging:this.dragging}},i("form",{id:"form",ref:function(t){return e.form=t}},i("div",{id:"header"},i("ezp-icon",{name:"drag-drop",size:"huge",framed:true}),i("ezp-label",{weight:"strong",text:ze.t("upload.description")}),i("div",{id:"meta"},i("ezp-label",{level:"tertiary",text:ze.t("upload.meta_leading")}),i("label",{htmlFor:"input",id:"select"},i("ezp-label",{level:"tertiary",weight:"strong",text:ze.t("upload.meta_select")})),i("input",{type:"file",name:"input",id:"input",ref:function(t){return e.input=t},onInput:this.handleInput}),i("ezp-label",{level:"tertiary",text:ze.t("upload.meta_trailing")})),this.filename!=""&&i(c,null,i("ezp-label",{level:"secondary",text:ze.t("upload.selected_file")}),i("ezp-label",{level:"tertiary",text:this.filename})))))};return e}());Tv.style=Ov;var Bv=":host{background:var(--ezp-core-surface-tertiary);border-radius:6px;-webkit-box-shadow:var(--ezp-userMenu-boxShadow, 0 0 0 1px var(--ezp-black-10));box-shadow:var(--ezp-userMenu-boxShadow, 0 0 0 1px var(--ezp-black-10));display:block;opacity:var(--ezp-userMenu-opacity, 0);position:absolute;right:0;top:0;-webkit-transform:scale(var(--ezp-userMenu-scale, 0.94, 0.94));transform:scale(var(--ezp-userMenu-scale, 0.94, 0.94));-webkit-transform-origin:right top;transform-origin:right top;-webkit-transition:var(--ezp-userMenu-transition, opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), transform var(--ezp-duration-3) var(--ezp-easing-out-quart), visibility 0s var(--ezp-duration-3));transition:var(--ezp-userMenu-transition, opacity var(--ezp-duration-3) var(--ezp-easing-out-quart), transform var(--ezp-duration-3) var(--ezp-easing-out-quart), visibility 0s var(--ezp-duration-3));visibility:var(--ezp-userMenu-visibility, hidden);z-index:5}:host(.is-open){--ezp-userMenu-opacity:1;--ezp-userMenu-scale:1, 1;--ezp-userMenu-transition:opacity var(--ezp-duration-3) var(--ezp-easing-out-quart),\n transform var(--ezp-duration-3) var(--ezp-easing-out-quart), visibility 0s 0s;--ezp-userMenu-visibility:visible}@media (prefers-color-scheme: dark){:host{--ezp-userMenu-separator-position:inset 0 0 0 var(--hairline-width-positive)}}#header{-ms-flex-align:center;align-items:center;-webkit-box-shadow:var(--ezp-userMenu-header-boxShadowPosition, 0 1px 0 0) var(--ezp-core-outline);box-shadow:var(--ezp-userMenu-header-boxShadowPosition, 0 1px 0 0) var(--ezp-core-outline);-webkit-box-shadow:0;box-shadow:0;display:grid;grid-template:auto/1fr auto;padding:var(--ezp-spacing-4) var(--ezp-spacing-3) var(--ezp-spacing-4) var(--ezp-spacing-4)}#name{color:var(--ezp-core-foreground-primary)}#close{margin:calc(var(--ezp-spacing-3) * -1) 0}#links{-webkit-box-shadow:var(--ezp-userMenu-links-boxShadowPosition, 0 1px 0 0) var(--ezp-core-outline);box-shadow:var(--ezp-userMenu-links-boxShadowPosition, 0 1px 0 0) var(--ezp-core-outline);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding:var(--ezp-spacing-2)}.link{-ms-flex-align:center;align-items:center;background:var(--ezp-userMenu-link-background, transparent);border-radius:3px;color:var(--ezp-core-foreground-primary);cursor:pointer;display:grid;gap:var(--ezp-spacing-3);grid-template:auto/auto 1fr;padding:var(--ezp-spacing-3);text-decoration:none}.link:hover{--ezp-userMenu-link-background:var(--ezp-core-shade-primary)}.link__icon{color:var(--ezp-theme-solid);margin:calc(var(--ezp-spacing-2) * -1) 0}.caption{color:var(--ezp-core-foreground-primary)}#theme{-webkit-box-shadow:var(--ezp-userMenu-theme-boxShadowPosition, 0 1px 0 0) var(--ezp-core-outline);box-shadow:var(--ezp-userMenu-theme-boxShadowPosition, 0 1px 0 0) var(--ezp-core-outline);display:grid;gap:var(--ezp-spacing-3);grid-template:repeat(2, auto)/1fr;padding:var(--ezp-spacing-4) var(--ezp-spacing-4) var(--ezp-spacing-3)}#swatches{display:-ms-flexbox;display:flex;margin:0 calc(var(--ezp-spacing-2) * -1)}.swatch{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-userMenu-swatch-background, transparent);border:0;border-radius:50%;color:var(--ezp-userMenu-swatch-color);cursor:var(--ezp-userMenu-swatch-cursor, pointer);display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;margin:0;opacity:var(--ezp-userMenu-swatch-opacity, 1);outline:none;padding:var(--ezp-spacing-2)}@media (hover: hover){.swatch:not(.selected):hover{--ezp-userMenu-swatch-background:var(--ezp-userMenu-swatch-theme-translucent)}.swatch:not(.selected):active{--ezp-userMenu-swatch-opacity:0.74}}.swatch.selected{--ezp-userMenu-dot-boxShadowSize:10px;--ezp-userMenu-swatch-background:var(--ezp-userMenu-swatch-theme-translucent);--ezp-userMenu-swatch-cursor:normal}.swatch.selected>.dot{-webkit-animation:dot-bounce var(--ezp-duration-2) ease-in-out;animation:dot-bounce var(--ezp-duration-2) ease-in-out}.swatch--blue{--ezp-userMenu-swatch-theme-solid:var(--ezp-accent-blue-solid);--ezp-userMenu-swatch-theme-translucent:var(--ezp-accent-blue-translucent)}.swatch--cyan{--ezp-userMenu-swatch-theme-solid:var(--ezp-accent-cyan-solid);--ezp-userMenu-swatch-theme-translucent:var(--ezp-accent-cyan-translucent)}.swatch--green{--ezp-userMenu-swatch-theme-solid:var(--ezp-accent-green-solid);--ezp-userMenu-swatch-theme-translucent:var(--ezp-accent-green-translucent)}.swatch--teal{--ezp-userMenu-swatch-theme-solid:var(--ezp-accent-teal-solid);--ezp-userMenu-swatch-theme-translucent:var(--ezp-accent-teal-translucent)}.swatch--orange{--ezp-userMenu-swatch-theme-solid:var(--ezp-accent-orange-solid);--ezp-userMenu-swatch-theme-translucent:var(--ezp-accent-orange-translucent)}.swatch--pink{--ezp-userMenu-swatch-theme-solid:var(--ezp-accent-pink-solid);--ezp-userMenu-swatch-theme-translucent:var(--ezp-accent-pink-translucent)}.swatch--red{--ezp-userMenu-swatch-theme-solid:var(--ezp-accent-red-solid);--ezp-userMenu-swatch-theme-translucent:var(--ezp-accent-red-translucent)}.swatch--violet{--ezp-userMenu-swatch-theme-solid:var(--ezp-accent-violet-solid);--ezp-userMenu-swatch-theme-translucent:var(--ezp-accent-violet-translucent)}.dot{background:var(--ezp-userMenu-dot-background, transparent);border-radius:50%;-webkit-box-shadow:inset 0 0 0 var(--ezp-userMenu-dot-boxShadowSize, 4px) var(--ezp-userMenu-swatch-theme-solid);box-shadow:inset 0 0 0 var(--ezp-userMenu-dot-boxShadowSize, 4px) var(--ezp-userMenu-swatch-theme-solid);height:18px;-webkit-transition:-webkit-box-shadow var(--ezp-duration-2);transition:-webkit-box-shadow var(--ezp-duration-2);transition:box-shadow var(--ezp-duration-2);transition:box-shadow var(--ezp-duration-2), -webkit-box-shadow var(--ezp-duration-2);width:18px}#appearance{display:grid;gap:var(--ezp-spacing-3);grid-template:repeat(2, auto)/1fr;padding:var(--ezp-spacing-4) var(--ezp-spacing-4) var(--ezp-spacing-3)}#tabs{display:grid;grid-template:auto/repeat(3, 1fr);margin:0 calc(var(--ezp-spacing-2) * -1)}.tab{--ezp-icon-height:8px;-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-userMenu-tab-background, transparent);border:0;border-radius:14px;color:var(--ezp-userMenu-tab-color, var(--ezp-core-foreground-secondary));cursor:var(--ezp-userMenu-tab-cursor, pointer);display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-2);-ms-flex-pack:center;justify-content:center;margin:0;outline:none;padding:var(--ezp-spacing-3) var(--ezp-spacing-3) var(--ezp-spacing-3) var(--ezp-spacing-2)}@media (hover: hover){.tab:not(.selected):hover{--ezp-userMenu-tab-background:var(--ezp-core-shade-primary)}.tab:not(.selected):active{--ezp-userMenu-tab-background:var(--ezp-core-shade-secondary)}}.tab.selected{--ezp-userMenu-tab-background:var(--ezp-theme-translucent);--ezp-userMenu-tab-color:var(--ezp-theme-solid);--ezp-userMenu-tab-cursor:normal}@-webkit-keyframes dot-bounce{0%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}50%{-webkit-transform:scale(0.84, 0.84);transform:scale(0.84, 0.84)}100%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}}@keyframes dot-bounce{0%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}50%{-webkit-transform:scale(0.84, 0.84);transform:scale(0.84, 0.84)}100%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}}";var qv=e("ezp_user_menu",function(){function e(e){var t=this;n(this,e);this.userMenuClosure=a(this,"userMenuClosure",7);this.logoutEmitter=a(this,"logoutEmitter",7);this.backdrop=document.createElement("ezp-backdrop");this.links=[{title:ze.t("user_menu.account"),icon:"account",href:"https://app.ezeep.com"},{title:ze.t("user_menu.help"),icon:"help",href:"https://support.ezeep.com"}];this.themes=["pink","red","orange","green","teal","cyan","blue","violet"];this.appearances=[{title:ze.t("user_menu.system"),name:"system"},{title:ze.t("user_menu.light"),name:"light"},{title:ze.t("user_menu.dark"),name:"dark"}];this.name="John Doe";this.open=false;this.handleClose=function(){t.userMenuClosure.emit()};this.logOut=function(){localStorage.removeItem("properties");localStorage.removeItem("refreshToken");localStorage.removeItem("access_token");localStorage.removeItem("printer");localStorage.removeItem("isAuthorized");Ue.state.isAuthorized=false;t.logoutEmitter.emit()};this.handleTheme=function(e){hv.state.theme=e};this.handleAppearance=function(e){hv.state.appearance=e}}e.prototype.watchOpen=function(){if(this.open){this.backdrop.visible=true;this.container.appendChild(this.backdrop)}else{this.backdrop.visible=false;this.userMenuClosure.emit()}};e.prototype.componentWillLoad=function(){var e=this;this.container=this.component.closest("[data-backdrop-surface]");this.backdrop.addEventListener("backdropHideStart",(function(){e.open=false}));this.backdrop.addEventListener("backdropHideEnd",(function(){e.container.removeChild(e.backdrop)}))};e.prototype.render=function(){var e=this;return i(o,{class:this.open?"is-open":""},i("div",{id:"header"},i("ezp-label",{ellipsis:true,id:"name",weight:"heavy",text:this.name}),i("ezp-icon-button",{id:"close",level:"tertiary",icon:"close",onClick:this.handleClose})),i("div",{id:"links"},this.links.map((function(e){return i("a",{class:"link",href:e.href,target:"_blank",rel:"noopener noreferrer"},i("ezp-icon",{class:"link__icon",name:e.icon}),i("ezp-label",{text:e.title}))})),i("a",{class:"link",onClick:this.logOut},i("ezp-icon",{class:"link__icon",name:"logout"}),i("ezp-label",{text:ze.t("user_menu.logout")}))),i("div",{id:"theme"},i("ezp-label",{class:"caption",text:"".concat(ze.t("user_menu.theme"),":"),weight:"heavy"}),i("div",{id:"swatches"},this.themes.map((function(t){return i("button",{class:"swatch swatch--".concat(t," ").concat(t===hv.state.theme?"selected":""),onClick:function(){return e.handleTheme(t)}},i("span",{class:"dot"}))})))),i("div",{id:"appearance"},i("ezp-label",{class:"caption",text:"".concat(ze.t("user_menu.appearance"),":"),weight:"heavy"}),i("div",{id:"tabs"},this.appearances.map((function(t){return i("button",{class:"tab ".concat(t.name===hv.state.appearance?"selected":""),onClick:function(){return e.handleAppearance(t.name)}},i("ezp-icon",{name:t.name}),i("ezp-label",{text:t.title,level:"tertiary",weight:"strong"}))})))))};Object.defineProperty(e.prototype,"component",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{open:["watchOpen"]}},enumerable:false,configurable:true});return e}());qv.style=Bv}}}));