Socket
Socket
Sign inDemoInstall

@azure/ms-rest-js

Package Overview
Dependencies
33
Maintainers
7
Versions
66
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.8.7 to 1.9.0-alpha.2

es/lib/browserFetchHttpClient.d.ts

2

dist/msRest.browser.min.js

@@ -5,2 +5,2 @@ /** @license ms-rest-js

*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.msRest={})}(this,function(N){"use strict";function r(e){return e.toLowerCase()}var p=(e.prototype.set=function(e,t){this._headersMap[r(e)]={name:e,value:t.toString()}},e.prototype.get=function(e){var t=this._headersMap[r(e)];return t?t.value:void 0},e.prototype.contains=function(e){return!!this._headersMap[r(e)]},e.prototype.remove=function(e){var t=this.contains(e);return delete this._headersMap[r(e)],t},e.prototype.rawHeaders=function(){var e={};for(var t in this._headersMap){var r=this._headersMap[t];e[r.name.toLowerCase()]=r.value}return e},e.prototype.headersArray=function(){var e=[];for(var t in this._headersMap)e.push(this._headersMap[t]);return e},e.prototype.headerNames=function(){for(var e=[],t=this.headersArray(),r=0;r<t.length;++r)e.push(t[r].name);return e},e.prototype.headerValues=function(){for(var e=[],t=this.headersArray(),r=0;r<t.length;++r)e.push(t[r].value);return e},e.prototype.toJson=function(){return this.rawHeaders()},e.prototype.toString=function(){return JSON.stringify(this.toJson())},e.prototype.clone=function(){return new e(this.rawHeaders())},e);function e(e){if(this._headersMap={},e)for(var t in e)this.set(t,e[t])}function s(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function i(e){for(var t=atob(e),r=new Uint8Array(t.length),n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}for(var t,a=(function(e){var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var r=new Uint8Array(16);e.exports=function(){return t(r),r}}else{var n=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),n[t]=e>>>((3&t)<<3)&255;return n}}}(t={exports:{}},t.exports),t.exports),o=[],n=0;n<256;++n)o[n]=(n+256).toString(16).substr(1);var u=function(e,t){var r=t||0,n=o;return[n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]]].join("")};var l=function(e,t,r){var n=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||a)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var i=0;i<16;++i)t[n+i]=o[i];return t||u(o)},c={msRestVersion:"1.8.7",HTTP:"http:",HTTPS:"https:",HTTP_PROXY:"HTTP_PROXY",HTTPS_PROXY:"HTTPS_PROXY",HttpConstants:{HttpVerbs:{PUT:"PUT",GET:"GET",DELETE:"DELETE",POST:"POST",MERGE:"MERGE",HEAD:"HEAD",PATCH:"PATCH"},StatusCodes:{TooManyRequests:429}},HeaderConstants:{AUTHORIZATION:"authorization",AUTHORIZATION_SCHEME:"Bearer",RETRY_AFTER:"Retry-After",USER_AGENT:"User-Agent"}},f="undefined"!=typeof process&&!!process.version&&!!process.versions&&!!process.versions.node;function y(e){var t={};return t.body=e.bodyAsText,t.headers=e.headers,t.status=e.status,t}function m(e){var t=e.clone();return t.headers&&t.headers.remove("authorization"),t}function h(e){return new RegExp("^[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}$","ig").test(e)}function v(){return l()}function d(t,r){return new Promise(function(e){return setTimeout(function(){return e(r)},t)})}var g=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function b(e){return g.test(e)}function E(e,t,r){return e&&t?e.split(t).join(r||""):e}var w=(R.prototype.validateConstraints=function(e,r,n){function t(e,t){throw new Error('"'+n+'" with value "'+r+'" should satisfy the constraint "'+e+'": '+t+".")}if(e.constraints&&null!=r){var o=e.constraints,i=o.ExclusiveMaximum,a=o.ExclusiveMinimum,s=o.InclusiveMaximum,u=o.InclusiveMinimum,l=o.MaxItems,c=o.MaxLength,f=o.MinItems,p=o.MinLength,h=o.MultipleOf,d=o.Pattern,y=o.UniqueItems;null!=i&&i<=r&&t("ExclusiveMaximum",i),null!=a&&r<=a&&t("ExclusiveMinimum",a),null!=s&&s<r&&t("InclusiveMaximum",s),null!=u&&r<u&&t("InclusiveMinimum",u),null!=l&&r.length>l&&t("MaxItems",l),null!=c&&r.length>c&&t("MaxLength",c),null!=f&&r.length<f&&t("MinItems",f),null!=p&&r.length<p&&t("MinLength",p),null!=h&&r%h!=0&&t("MultipleOf",h),d&&null===r.match(d)&&t("Pattern",d),y&&r.some(function(e,t,r){return r.indexOf(e)!==t})&&t("UniqueItems",y)}},R.prototype.serialize=function(e,t,r){var n={},o=e.type.name;r||(r=e.serializedName),null!==o.match(/^Sequence$/gi)&&(n=[]),null!=t||null==e.defaultValue&&!e.isConstant||(t=e.defaultValue);var i=e.required,a=e.nullable;if(i&&a&&void 0===t)throw new Error(r+" cannot be undefined.");if(i&&!a&&null==t)throw new Error(r+" cannot be null or undefined.");if(!i&&!1===a&&null===t)throw new Error(r+" cannot be null.");return null==t?n=t:(this.validateConstraints(e,t,r),null!==o.match(/^any$/gi)?n=t:null!==o.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/gi)?n=function(e,t,r){if(null!=r)if(null!==e.match(/^Number$/gi)){if("number"!=typeof r)throw new Error(t+" with value "+r+" must be of type number.")}else if(null!==e.match(/^String$/gi)){if("string"!=typeof r.valueOf())throw new Error(t+' with value "'+r+'" must be of type string.')}else if(null!==e.match(/^Uuid$/gi)){if("string"!=typeof r.valueOf()||!h(r))throw new Error(t+' with value "'+r+'" must be of type string and a valid uuid.')}else if(null!==e.match(/^Boolean$/gi)){if("boolean"!=typeof r)throw new Error(t+" with value "+r+" must be of type boolean.")}else if(null!==e.match(/^Stream$/gi)){var n=typeof r;if(!("string"==n||"function"==n||r instanceof ArrayBuffer||ArrayBuffer.isView(r)||"function"==typeof Blob&&r instanceof Blob))throw new Error(t+" must be a string, Blob, ArrayBuffer, ArrayBufferView, or a function returning NodeJS.ReadableStream.")}return r}(o,r,t):null!==o.match(/^Enum$/gi)?n=function(e,t,r){if(!t)throw new Error("Please provide a set of allowedValues to validate "+e+" as an Enum Type.");if(t.some(function(e){return"string"==typeof e.valueOf()?e.toLowerCase()===r.toLowerCase():e===r}))return r;throw new Error(r+" is not a valid value for "+e+". The valid values are: "+JSON.stringify(t)+".")}(r,e.type.allowedValues,t):null!==o.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/gi)?n=function(e,t,r){if(null!=t)if(null!==e.match(/^Date$/gi)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(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(null!==e.match(/^DateTime$/gi)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(r+" must be an instanceof Date or a string in ISO8601 format.");t=t instanceof Date?t.toISOString():new Date(t).toISOString()}else if(null!==e.match(/^DateTimeRfc1123$/gi)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(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(null!==e.match(/^UnixTime$/gi)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(r+" must be an instanceof Date or a string in RFC-1123/ISO8601 format for it to be serialized in UnixTime/Epoch format.");t=function(e){if(e)return"string"==typeof e.valueOf()&&(e=new Date(e)),Math.floor(e.getTime()/1e3)}(t)}else if(null!==e.match(/^TimeSpan$/gi)){if(!b(t))throw new Error(r+' must be a string in ISO 8601 format. Instead was "'+t+'".');t=t}return t}(o,t,r):null!==o.match(/^ByteArray$/gi)?n=function(e,t){if(null!=t){if(!(t instanceof Uint8Array))throw new Error(e+" must be of type Uint8Array.");t=s(t)}return t}(r,t):null!==o.match(/^Base64Url$/gi)?n=function(e,t){if(null!=t){if(!(t instanceof Uint8Array))throw new Error(e+" must be of type Uint8Array.");t=function(e){if(e){if(e instanceof Uint8Array)return function(e,t){for(var r=e.length;0<=r-1&&e[r-1]===t;)--r;return e.substr(0,r)}(s(e),"=").replace(/\+/g,"-").replace(/\//g,"_");throw new Error("Please provide an input of type Uint8Array for converting to Base64Url.")}}(t)}return t}(r,t):null!==o.match(/^Sequence$/gi)?n=function(e,t,r,n){if(!Array.isArray(r))throw new Error(n+" must be of type Array.");var o=t.type.element;if(!o||"object"!=typeof o)throw new Error('element" metadata for an Array must be defined in the mapper and it must of type "object" in '+n+".");for(var i=[],a=0;a<r.length;a++)i[a]=e.serialize(o,r[a],n);return i}(this,e,t,r):null!==o.match(/^Dictionary$/gi)?n=function(e,t,r,n){if("object"!=typeof r)throw new Error(n+" must be of type object.");var o=t.type.value;if(!o||"object"!=typeof o)throw new Error('"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in '+n+".");for(var i={},a=0,s=Object.keys(r);a<s.length;a++){var u=s[a];i[u]=e.serialize(o,r[u],n+"."+u)}return i}(this,e,t,r):null!==o.match(/^Composite$/gi)&&(n=function(e,t,r,n){var o;if(M(e,t)&&(t=H(e,t,r,"clientName")),null==r)return r;for(var i={},a=U(e,t,n),s=0,u=Object.keys(a);s<u.length;s++){var l=u[s],c=a[l];if(!c.readOnly){var f=void 0,p=i;if(e.isXML)f=c.xmlIsWrapped?c.xmlName:c.xmlElementName||c.xmlName;else{var h=I(c.serializedName);f=h.pop();for(var d=0,y=h;d<y.length;d++){var m=y[d];null==p[m]&&null!=r[l]&&(p[m]={}),p=p[m]}}if(null!=p){var v=""!==c.serializedName?n+"."+c.serializedName:n,g=r[l],b=M(e,t);b&&b.clientName===l&&null==g&&(g=t.serializedName);var E=e.serialize(c,g,v);void 0!==E&&null!=f&&(c.xmlIsAttribute?(p.$=p.$||{},p.$[f]=E):c.xmlIsWrapped?p[f]=((o={})[c.xmlElementName]=E,o):p[f]=E)}}}var w=t.type.additionalProperties;if(w){var R=Object.keys(a),_=function(t){R.every(function(e){return e!==t})&&(i[t]=e.serialize(w,r[t],n+'["'+t+'"]'))};for(var T in r)_(T)}return i}(this,e,t,r))),n},R.prototype.deserialize=function(e,t,r){if(null==t)return this.isXML&&"Sequence"===e.type.name&&!e.xmlIsWrapped&&(t=[]),t;var n,o=e.type.name;return r||(r=e.serializedName),null!==o.match(/^Composite$/gi)?n=function(e,t,r,n){M(e,t)&&(t=H(e,t,r,"serializedName"));for(var o=U(e,t,n),i={},a=[],s=0,u=Object.keys(o);s<u.length;s++){var l=u[s],c=o[l],f=I(o[l].serializedName);a.push(f[0]);var p=c.serializedName,h=c.xmlName,d=c.xmlElementName,y=n;""!==p&&void 0!==p&&(y=n+"."+p);var m=c.headerCollectionPrefix;if(m){for(var v={},g=0,b=Object.keys(r);g<b.length;g++){var E=b[g];E.startsWith(m)&&(v[E.substring(m.length)]=e.deserialize(c.type.value,r[E],y)),a.push(E)}i[l]=v}else if(e.isXML)if(c.xmlIsAttribute&&r.$)i[l]=e.deserialize(c,r.$[h],y);else{var w=r[d||h||p];c.xmlIsWrapped&&void 0===(w=(w=r[h])&&w[d])&&(w=[]),i[l]=e.deserialize(c,w,y)}else{for(var R=void 0,_=r,T=0,P=f;T<P.length;T++){var S=P[T];if(!_)break;_=_[S]}R=_;var O=t.type.polymorphicDiscriminator;O&&c.serializedName===O.serializedName&&null==R&&(R=t.serializedName);var x=void 0;Array.isArray(r[l])&&""===o[l].serializedName?(R=r[l],i=e.deserialize(c,R,y)):void 0!==R&&(x=e.deserialize(c,R,y),i[l]=x)}}var N=t.type.additionalProperties;if(N){var q=function(e){for(var t in o)if(I(o[t].serializedName)[0]===e)return!1;return!0};for(var A in r)q(A)&&(i[A]=e.deserialize(N,r[A],n+'["'+A+'"]'))}else if(r)for(var C=0,D=Object.keys(r);C<D.length;C++)l=D[C],void 0!==i[l]||a.includes(l)||["$","_"].includes(l)||(i[l]=r[l]);return i}(this,e,t,r):(this.isXML&&null!=t.$&&null!=t._&&(t=t._),null!==o.match(/^Number$/gi)?(n=parseFloat(t),isNaN(n)&&(n=t)):null!==o.match(/^Boolean$/gi)?n="true"===t||"false"!==t&&t:null!==o.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/gi)?n=t:null!==o.match(/^(Date|DateTime|DateTimeRfc1123)$/gi)?n=new Date(t):null!==o.match(/^UnixTime$/gi)?n=function(e){return e?new Date(1e3*e):void 0}(t):null!==o.match(/^ByteArray$/gi)?n=i(t):null!==o.match(/^Base64Url$/gi)?n=function(e){if(e){if(e&&"string"!=typeof e.valueOf())throw new Error("Please provide an input of type string for converting to Uint8Array");return i(e=e.replace(/\-/g,"+").replace(/\_/g,"/"))}}(t):null!==o.match(/^Sequence$/gi)?n=function(e,t,r,n){var o=t.type.element;if(!o||"object"!=typeof o)throw new Error('element" metadata for an Array must be defined in the mapper and it must of type "object" in '+n);if(r){Array.isArray(r)||(r=[r]);for(var i=[],a=0;a<r.length;a++)i[a]=e.deserialize(o,r[a],n+"["+a+"]");return i}return r}(this,e,t,r):null!==o.match(/^Dictionary$/gi)&&(n=function(e,t,r,n){var o=t.type.value;if(!o||"object"!=typeof o)throw new Error('"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in '+n);if(r){for(var i={},a=0,s=Object.keys(r);a<s.length;a++){var u=s[a];i[u]=e.deserialize(o,r[u],n)}return i}return r}(this,e,t,r))),e.isConstant&&(n=e.defaultValue),n},R);function R(e,t){void 0===e&&(e={}),this.modelMappers=e,this.isXML=t}function I(e){var t=[],r="";if(e)for(var n=0,o=e.split(".");n<o.length;n++){var i=o[n];"\\"===i.charAt(i.length-1)?r+=i.substr(0,i.length-1)+".":(r+=i,t.push(r),r="")}return t}function U(e,t,r){var n=t.type.modelProperties;if(!n){var o=t.type.className;if(!o)throw new Error('Class name for model "'+r+'" is not provided in the mapper "'+JSON.stringify(t,void 0,2)+'".');var i=e.modelMappers[o];if(!i)throw new Error('mapper() cannot be null or undefined for model "'+o+'".');if(!(n=i.type.modelProperties))throw new Error('modelProperties cannot be null or undefined in the mapper "'+JSON.stringify(i)+'" of type "'+o+'" for object "'+r+'".')}return n}function H(e,t,r,n){var o=M(e,t);if(o){var i=o[n];if(null!=i){var a=r[i];if(null!=a){var s=t.type.uberParent||t.type.className,u=a===s?a:s+"."+a,l=e.modelMappers.discriminators[u];l&&(t=l)}}}return t}function M(e,t){return t.type.polymorphicDiscriminator||_(e,t.type.uberParent)||_(e,t.type.className)}function _(e,t){return t&&e.modelMappers[t]&&e.modelMappers[t].type.polymorphicDiscriminator}var q=function(e){for(var t={},r=0,n=e;r<n.length;r++){var o=n[r];t[o]=o}return t}(["Base64Url","Boolean","ByteArray","Composite","Date","DateTime","DateTimeRfc1123","Dictionary","Enum","Number","Object","Sequence","String","Stream","TimeSpan","UnixTime"]),A=(T.prototype.validateRequestProperties=function(){if(!this.method)throw new Error("WebResource.method is required.");if(!this.url)throw new Error("WebResource.url is required.")},T.prototype.prepare=function(e){if(!e)throw new Error("options object is required");if(null==e.method||"string"!=typeof e.method.valueOf())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(!(null!=e.pathTemplate&&"string"==typeof e.pathTemplate.valueOf()||null!=e.url&&"string"==typeof e.url.valueOf()))throw new Error("Please provide exactly one of options.pathTemplate or options.url.");if(e.url){if("string"!=typeof e.url)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(-1===t.indexOf(e.method.toUpperCase()))throw new Error('The provided method "'+e.method+'" is invalid. Supported HTTP methods are: '+JSON.stringify(t))}if(this.method=e.method.toUpperCase(),e.pathTemplate){var n=e.pathTemplate,o=e.pathParameters;if("string"!=typeof n)throw new Error('options.pathTemplate must be of type "string".');e.baseUrl||(e.baseUrl="https://management.azure.com");var r=e.baseUrl,i=r+(r.endsWith("/")?"":"/")+(n.startsWith("/")?n.slice(1):n),a=i.match(/({\w*\s*\w*})/gi);if(a&&a.length){if(!o)throw new Error("pathTemplate: "+n+" has been provided. Hence, options.pathParameters must also be provided.");a.forEach(function(e){var t=e.slice(1,-1),r=o[t];if(null==r||"string"!=typeof r&&"object"!=typeof r)throw new Error("pathTemplate: "+n+" contains the path parameter "+t+" however, it is not present in "+o+" - "+JSON.stringify(o,void 0,2)+'.The value of the path parameter can either be a "string" of the form { '+t+': "some sample value" } or it can be an "object" of the form { "'+t+'": { value: "some sample value", skipUrlEncoding: true } }.');if("string"==typeof r.valueOf()&&(i=i.replace(e,encodeURIComponent(r))),"object"==typeof r.valueOf()){if(!r.value)throw new Error("options.pathParameters["+t+'] is of type "object" but it does not contain a "value" property.');i=r.skipUrlEncoding?i.replace(e,r.value):i.replace(e,encodeURIComponent(r.value))}})}this.url=i}if(e.queryParameters){var s=e.queryParameters;if("object"!=typeof s)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 }.');this.url&&-1===this.url.indexOf("?")&&(this.url+="?");var u=[];for(var l in this.query={},s){var c=s[l];if(c)if("string"==typeof c)u.push(l+"="+encodeURIComponent(c)),this.query[l]=encodeURIComponent(c);else if("object"==typeof c){if(!c.value)throw new Error("options.queryParameters["+l+'] is of type "object" but it does not contain a "value" property.');c.skipUrlEncoding?(u.push(l+"="+c.value),this.query[l]=c.value):(u.push(l+"="+encodeURIComponent(c.value)),this.query[l]=encodeURIComponent(c.value))}}this.url+=u.join("&")}if(e.headers)for(var f=e.headers,p=0,h=Object.keys(e.headers);p<h.length;p++){var d=h[p];this.headers.set(d,f[d])}return this.headers.get("accept-language")||this.headers.set("accept-language","en-US"),this.headers.get("x-ms-client-request-id")||e.disableClientRequestId||this.headers.set("x-ms-client-request-id",v()),this.headers.get("Content-Type")||this.headers.set("Content-Type","application/json; charset=utf-8"),this.body=e.body,null!=e.body&&(e.bodyIsStream?(this.headers.get("Transfer-Encoding")||this.headers.set("Transfer-Encoding","chunked"),"application/octet-stream"!==this.headers.get("Content-Type")&&this.headers.set("Content-Type","application/octet-stream")):(e.serializationMapper&&(this.body=new w(e.mappers).serialize(e.serializationMapper,e.body,"requestBody")),e.disableJsonStringifyOnBody||(this.body=JSON.stringify(e.body)))),this.abortSignal=e.abortSignal,this.onDownloadProgress=e.onDownloadProgress,this.onUploadProgress=e.onUploadProgress,this},T.prototype.clone=function(){var e=new T(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);return this.formData&&(e.formData=this.formData),this.operationSpec&&(e.operationSpec=this.operationSpec),this.shouldDeserialize&&(e.shouldDeserialize=this.shouldDeserialize),this.operationResponseGetter&&(e.operationResponseGetter=this.operationResponseGetter),e},T);function T(e,t,r,n,o,i,a,s,u,l,c,f){this.streamResponseBody=i,this.url=e||"",this.method=t||"GET",this.headers=o instanceof p?o:new p(o),this.body=r,this.query=n,this.formData=void 0,this.withCredentials=a||!1,this.abortSignal=s,this.timeout=u||0,this.onUploadProgress=l,this.onDownloadProgress=c,this.proxySettings=f}var P=function(e,t){return(P=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function S(e,t){function r(){this.constructor=e}P(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var O=function(){return(O=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function x(i,a,s,u){return new(s||(s=Promise))(function(e,t){function r(e){try{o(u.next(e))}catch(e){t(e)}}function n(e){try{o(u.throw(e))}catch(e){t(e)}}function o(t){t.done?e(t.value):new s(function(e){e(t.value)}).then(r,n)}o((u=u.apply(i,a||[])).next())})}function C(r,n){var o,i,a,e,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return e={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,i&&(a=2&t[0]?i.return:t[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,t[1])).done)return a;switch(i=0,a&&(t=[2&t[0],a.value]),t[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,i=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=n.call(r,s)}catch(e){t=[6,e],i=0}finally{o=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}}var D,z=(S(j,D=Error),j.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR",j.REQUEST_ABORTED_ERROR="REQUEST_ABORTED_ERROR",j.PARSE_ERROR="PARSE_ERROR",j);function j(e,t,r,n,o,i){var a=D.call(this,e)||this;return a.code=t,a.statusCode=r,a.request=n,a.response=o,a.body=i,Object.setPrototypeOf(a,j.prototype),a}var L,k=(B.prototype.sendRequest=function(r){var n=new XMLHttpRequest;if(r.proxySettings)throw new Error("HTTP proxy is not supported in browser environment");var e=r.abortSignal;if(e){var t=function(){n.abort()};e.addEventListener("abort",t),n.addEventListener("readystatechange",function(){n.readyState===XMLHttpRequest.DONE&&e.removeEventListener("abort",t)})}if(F(n.upload,r.onUploadProgress),F(n,r.onDownloadProgress),r.formData){for(var o=r.formData,i=new FormData,a=function(e,t){t&&t.hasOwnProperty("value")&&t.hasOwnProperty("options")?i.append(e,t.value,t.options):i.append(e,t)},s=0,u=Object.keys(o);s<u.length;s++){var l=u[s],c=o[l];if(Array.isArray(c))for(var f=0;f<c.length;f++)a(l,c[f]);else a(l,c)}r.body=i,r.formData=void 0;var p=r.headers.get("Content-Type");p&&-1!==p.indexOf("multipart/form-data")&&r.headers.remove("Content-Type")}n.open(r.method,r.url),n.timeout=r.timeout,n.withCredentials=r.withCredentials;for(var h=0,d=r.headers.headersArray();h<d.length;h++){var y=d[h];n.setRequestHeader(y.name,y.value)}return n.responseType=r.streamResponseBody?"blob":"text",n.send(void 0===r.body?null:r.body),r.streamResponseBody?new Promise(function(t,e){n.addEventListener("readystatechange",function(){if(n.readyState===XMLHttpRequest.HEADERS_RECEIVED){var e=new Promise(function(e,t){n.addEventListener("load",function(){e(n.response)}),Q(r,n,t)});t({request:r,status:n.status,headers:$(n),blobBody:e})}}),Q(r,n,e)}):new Promise(function(e,t){n.addEventListener("load",function(){return e({request:r,status:n.status,headers:$(n),bodyAsText:n.responseText})}),Q(r,n,t)})},B);function B(){}function F(e,t){t&&e.addEventListener("progress",function(e){return t({loadedBytes:e.loaded})})}function $(e){for(var t=new p,r=0,n=e.getAllResponseHeaders().trim().split(/[\r\n]+/);r<n.length;r++){var o=n[r],i=o.indexOf(":"),a=o.slice(0,i),s=o.slice(i+2);t.set(a,s)}return t}function Q(e,t,r){t.addEventListener("error",function(){return r(new z("Failed to send request to "+e.url,z.REQUEST_SEND_ERROR,void 0,e))}),t.addEventListener("abort",function(){return r(new z("The request was aborted",z.REQUEST_ABORTED_ERROR,void 0,e))}),t.addEventListener("timeout",function(){return r(new z("timeout of "+t.timeout+"ms exceeded",z.REQUEST_SEND_ERROR,void 0,e))})}function V(e){return Y(e.parameterPath,e.mapper)}function Y(e,t){return"string"==typeof e?e:Array.isArray(e)?e.join("."):t.serializedName}function X(e){var t=!1;for(var r in e.responses){var n=e.responses[r];if(n.bodyMapper&&n.bodyMapper.type.name===q.Stream){t=!0;break}}return t}(L=N.HttpPipelineLogLevel||(N.HttpPipelineLogLevel={}))[L.OFF=0]="OFF",L[L.ERROR=1]="ERROR",L[L.WARNING=2]="WARNING",L[L.INFO=3]="INFO";var W=new DOMParser;function J(e){try{var t=W.parseFromString(e,"application/xml");!function(e){if(G){var t=e.getElementsByTagNameNS(G,"parsererror");if(t.length)throw new Error(t.item(0).innerHTML)}}(t);var r=function e(t){var r={};var n=t.childNodes.length;var o=t.childNodes[0];var i=o&&1===n&&o.nodeType===Node.TEXT_NODE&&o.nodeValue||void 0;var a=(s=t,function(e){return!!e.attributes}(s)&&s.hasAttributes()?s:void 0);var s;if(a){r.$={};for(var u=0;u<a.attributes.length;u++){var l=a.attributes[u];r.$[l.nodeName]=l.nodeValue}i&&(r._=i)}else 0===n?r="":i&&(r=i);if(!i)for(var u=0;u<n;u++){var c=t.childNodes[u];if(c.nodeType!==Node.TEXT_NODE){var f=e(c);r[c.nodeName]?Array.isArray(r[c.nodeName])?r[c.nodeName].push(f):r[c.nodeName]=[r[c.nodeName],f]:r[c.nodeName]=f}}return r}(t.childNodes[0]);return Promise.resolve(r)}catch(e){return Promise.reject(e)}}var G="";try{G=W.parseFromString("INVALID","text/xml").getElementsByTagName("parsererror")[0].namespaceURI}catch(e){}var K=document.implementation.createDocument(null,null,null),Z=new XMLSerializer;function ee(e,t){var r=function e(t,r){{if("string"==typeof t||"number"==typeof t||"boolean"==typeof t){var n=K.createElement(r);return n.textContent=t.toString(),[n]}if(Array.isArray(t)){for(var o=[],i=0,a=t;i<a.length;i++)for(var s=a[i],u=0,l=e(s,r);u<l.length;u++){var c=l[u];o.push(c)}return o}if("object"!=typeof t)throw new Error("Illegal value passed to buildObject: "+t);for(var n=K.createElement(r),f=0,p=Object.keys(t);f<p.length;f++){var h=p[f];if("$"===h)for(var d=0,y=te(t[h]);d<y.length;d++){var m=y[d];n.attributes.setNamedItem(m)}else for(var v=0,g=e(t[h],h);v<g.length;v++){var c=g[v];n.appendChild(c)}}return[n]}}(e,t&&t.rootName||"root")[0];return'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'+Z.serializeToString(r)}function te(e){for(var t=[],r=0,n=Object.keys(e);r<n.length;r++){var o=n[r],i=K.createAttribute(o);i.value=e[o].toString(),t.push(i)}return t}var re=(ne.prototype.shouldLog=function(e){return this._options.shouldLog(e)},ne.prototype.log=function(e,t){this._options.log(e,t)},ne);function ne(e,t){this._nextPolicy=e,this._options=t}var oe=(ie.prototype.shouldLog=function(e){return!!this._logger&&e!==N.HttpPipelineLogLevel.OFF&&e<=this._logger.minimumLogLevel},ie.prototype.log=function(e,t){this._logger&&this.shouldLog(e)&&this._logger.log(e,t)},ie);function ie(e){this._logger=e}function ae(r){return{create:function(e,t){return new ce(e,r,t)}}}var se,ue=["application/json","text/json"],le=["application/xml","application/atom+xml"],ce=(S(fe,se=re),fe.prototype.sendRequest=function(r){return x(this,void 0,void 0,function(){var t=this;return C(this,function(e){return[2,this._nextPolicy.sendRequest(r).then(function(e){return pe(t.jsonContentTypes,t.xmlContentTypes,e)})]})})},fe);function fe(e,t,r){var n=se.call(this,e,r)||this;return n.jsonContentTypes=t&&t.json||ue,n.xmlContentTypes=t&&t.xml||le,n}function pe(e,t,d){return function(t,r,o){function e(e){var t='Error "'+e+'" occurred while parsing the response body - '+o.bodyAsText+".",r=e.code||z.PARSE_ERROR,n=new z(t,r,o.status,o.request,o,o.bodyAsText);return Promise.reject(n)}if(!o.request.streamResponseBody&&o.bodyAsText){var n=o.bodyAsText,i=o.headers.get("Content-Type")||"",a=i?i.split(";").map(function(e){return e.toLowerCase()}):[];if(0===a.length||a.some(function(e){return-1!==t.indexOf(e)}))return new Promise(function(e){o.parsedBody=JSON.parse(n),e(o)}).catch(e);if(a.some(function(e){return-1!==r.indexOf(e)}))return J(n).then(function(e){return o.parsedBody=e,o}).catch(e)}return Promise.resolve(o)}(e,t,d).then(function(t){if(function(e){var t=e.request.shouldDeserialize;return void 0===t||("boolean"==typeof t?t:t(e))}(t)){var e=t.request.operationSpec;if(e&&e.responses){var r=t.status,n=Object.keys(e.responses),o=0===n.length||1===n.length&&"default"===n[0],i=function(e){var t,r=e.request,n=r.operationSpec;if(n){var o=r.operationResponseGetter;t=o?o(n,e):n.responses[e.status]}return t}(t);if(o?200<=r&&r<300:!!i){if(i){if(i.bodyMapper){h=t.parsedBody;e.isXML&&i.bodyMapper.type.name===q.Sequence&&(h="object"==typeof h?h[i.bodyMapper.xmlElementName]:[]);try{t.parsedBody=e.serializer.deserialize(i.bodyMapper,h,"operationRes.parsedBody")}catch(l){var a=new z("Error "+l+" occurred in deserializing the responseBody - "+t.bodyAsText);return a.request=m(t.request),a.response=y(t),Promise.reject(a)}}else"HEAD"===e.httpMethod&&(t.parsedBody=200<=d.status&&d.status<300);i.headersMapper&&(t.parsedHeaders=e.serializer.deserialize(i.headersMapper,t.headers.rawHeaders(),"operationRes.parsedHeaders"))}}else{var s=e.responses.default;if(s){var u=X(e)?"Unexpected status code: "+r:t.bodyAsText,l=new z(u);l.statusCode=r,l.request=m(t.request),l.response=y(t);var c=t.parsedBody;try{if(c){var f=s.bodyMapper;if(f&&"CloudError"===f.serializedName)c.error&&(c=c.error),c.code&&(l.code=c.code),c.message&&(l.message=c.message);else{var p=c;c.error&&(p=c.error),l.code=p.code,p.message&&(l.message=p.message)}if(f){var h=c;e.isXML&&f.type.name===q.Sequence&&(h="object"==typeof c?c[f.xmlElementName]:[]),l.body=e.serializer.deserialize(f,h,"error.body")}}}catch(e){l.message='Error "'+e.message+'" occurred in deserializing the responseBody - "'+t.bodyAsText+'" for the default response.'}return Promise.reject(l)}}}}return Promise.resolve(t)})}function he(r,n,o,i){return{create:function(e,t){return new ye(e,t,r,n,o,i)}}}var de,ye=(S(me,de=re),me.prototype.sendRequest=function(t){var r=this;return this._nextPolicy.sendRequest(t.clone()).then(function(e){return ve(r,t,e)}).catch(function(e){return ve(r,t,e.response,void 0,e)})},me);function me(e,t,r,n,o,i){var a=de.call(this,e,t)||this;function s(e){return"number"==typeof e}return a.retryCount=s(r)?r:3,a.retryInterval=s(n)?n:3e4,a.minRetryInterval=s(o)?o:3e3,a.maxRetryInterval=s(i)?i:9e4,a}function ve(t,r,n,o,e){o=function(e,t,r){t||(t={retryCount:0,retryInterval:0}),r&&(t.error&&(r.innerError=t.error),t.error=r),t.retryCount++;var n=Math.pow(2,t.retryCount)-1;return n*=.8*e.retryInterval+Math.floor(Math.random()*(1.2*e.retryInterval-.8*e.retryInterval)),t.retryInterval=Math.min(e.minRetryInterval+n,e.maxRetryInterval),t}(t,o,e);var i=r.abortSignal&&r.abortSignal.aborted;if(!i&&function(e,t,r){if(null==t||t<500&&408!==t||501===t||505===t)return!1;if(!r)throw new Error("retryData for the ExponentialRetryPolicyFilter cannot be null.");return(r&&r.retryCount)<e.retryCount}(t,n&&n.status,o))return d(o.retryInterval).then(function(){return t._nextPolicy.sendRequest(r.clone())}).then(function(e){return ve(t,r,e,o,void 0)}).catch(function(e){return ve(t,r,n,o,e)});if(i||e||!n){var a=o.error||new z("Failed to send the request.",z.REQUEST_SEND_ERROR,n&&n.status,n&&n.request,n);return Promise.reject(a)}return Promise.resolve(n)}function ge(r){return void 0===r&&(r="x-ms-client-request-id"),{create:function(e,t){return new Ee(e,t,r)}}}var be,Ee=(S(we,be=re),we.prototype.sendRequest=function(e){return e.headers.contains(this._requestIdHeaderName)||e.headers.set(this._requestIdHeaderName,v()),this._nextPolicy.sendRequest(e)},we);function we(e,t,r){var n=be.call(this,e,t)||this;return n._requestIdHeaderName=r,n}function Re(){return"x-ms-command-name"}var _e=Re;function Te(){var e=[{key:"ms-rest-js",value:c.msRestVersion}],t=function(){var e=window.navigator;return[{key:"OS",value:(e.oscpu||e.platform).replace(" ","")}]}();return function(e,t,r){return void 0===t&&(t=" "),void 0===r&&(r="/"),e.map(function(e){var t=e.value?""+r+e.value:"";return e.key+t}).join(t)}(e.concat(t))}function Pe(e){var r=e&&null!=e.key?e.key:"x-ms-command-name",n=e&&null!=e.value?e.value:Te();return{create:function(e,t){return new Oe(e,t,r,n)}}}var Se,Oe=(S(xe,Se=re),xe.prototype.sendRequest=function(e){return this.addUserAgentHeader(e),this._nextPolicy.sendRequest(e)},xe.prototype.addUserAgentHeader=function(e){e.headers||(e.headers=new p),!e.headers.get(this.headerKey)&&this.headerValue&&e.headers.set(this.headerKey,this.headerValue)},xe);function xe(e,t,r,n){var o=Se.call(this,e,t)||this;return o._nextPolicy=e,o._options=t,o.headerKey=r,o.headerValue=n,o}var Ne=(qe.prototype.any=function(){return 0<Object.keys(this._rawQuery).length},qe.prototype.set=function(e,t){if(e)if(null!=t){var r=Array.isArray(t)?t:t.toString();this._rawQuery[e]=r}else delete this._rawQuery[e]},qe.prototype.get=function(e){return e?this._rawQuery[e]:void 0},qe.prototype.toString=function(){var e="";for(var t in this._rawQuery){e&&(e+="&");var r=this._rawQuery[t];if(Array.isArray(r)){for(var n=[],o=0,i=r;o<i.length;o++){var a=i[o];n.push(t+"="+a)}e+=n.join("&")}else e+=t+"="+r}return e},qe.parse=function(e){var t=new qe;if(e){e.startsWith("?")&&(e=e.substring(1));for(var r="ParameterName",n="",o="",i=0;i<e.length;++i){var a=e[i];switch(r){case"ParameterName":switch(a){case"=":r="ParameterValue";break;case"&":o=n="";break;default:n+=a}break;case"ParameterValue":switch(a){case"=":o=n="",r="Invalid";break;case"&":t.set(n,o),o=n="",r="ParameterName";break;default:o+=a}break;case"Invalid":"&"===a&&(r="ParameterName");break;default:throw new Error("Unrecognized URLQuery parse state: "+r)}}"ParameterValue"===r&&t.set(n,o)}return t},qe);function qe(){this._rawQuery={}}var Ae=(Ce.prototype.setScheme=function(e){e?this.set(e,"SCHEME"):this._scheme=void 0},Ce.prototype.getScheme=function(){return this._scheme},Ce.prototype.setHost=function(e){e?this.set(e,"SCHEME_OR_HOST"):this._host=void 0},Ce.prototype.getHost=function(){return this._host},Ce.prototype.setPort=function(e){null==e||""===e?this._port=void 0:this.set(e.toString(),"PORT")},Ce.prototype.getPort=function(){return this._port},Ce.prototype.setPath=function(e){e?-1!==e.indexOf("://")?this.set(e,"SCHEME"):this.set(e,"PATH"):this._path=void 0},Ce.prototype.appendPath=function(e){if(e){var t=this.getPath();t&&(t.endsWith("/")||(t+="/"),e.startsWith("/")&&(e=e.substring(1)),e=t+e),this.set(e,"PATH")}},Ce.prototype.getPath=function(){return this._path},Ce.prototype.setQuery=function(e){this._query=e?Ne.parse(e):void 0},Ce.prototype.setQueryParameter=function(e,t){e&&(this._query||(this._query=new Ne),this._query.set(e,t))},Ce.prototype.getQueryParameterValue=function(e){return this._query?this._query.get(e):void 0},Ce.prototype.getQuery=function(){return this._query?this._query.toString():void 0},Ce.prototype.set=function(e,t){for(var r=new Ue(e,t);r.next();){var n=r.current();if(n)switch(n.type){case"SCHEME":this._scheme=n.text||void 0;break;case"HOST":this._host=n.text||void 0;break;case"PORT":this._port=n.text||void 0;break;case"PATH":var o=n.text||void 0;this._path&&"/"!==this._path&&"/"===o||(this._path=o);break;case"QUERY":this._query=Ne.parse(n.text);break;default:throw new Error("Unrecognized URLTokenType: "+n.type)}}},Ce.prototype.toString=function(){var e="";return this._scheme&&(e+=this._scheme+"://"),this._host&&(e+=this._host),this._port&&(e+=":"+this._port),this._path&&(this._path.startsWith("/")||(e+="/"),e+=this._path),this._query&&this._query.any()&&(e+="?"+this._query.toString()),e},Ce.prototype.replaceAll=function(e,t){e&&(this.setScheme(E(this.getScheme(),e,t)),this.setHost(E(this.getHost(),e,t)),this.setPort(E(this.getPort(),e,t)),this.setPath(E(this.getPath(),e,t)),this.setQuery(E(this.getQuery(),e,t)))},Ce.parse=function(e){var t=new Ce;return t.set(e,"SCHEME_OR_HOST"),t},Ce);function Ce(){}var De=(Ie.scheme=function(e){return new Ie(e,"SCHEME")},Ie.host=function(e){return new Ie(e,"HOST")},Ie.port=function(e){return new Ie(e,"PORT")},Ie.path=function(e){return new Ie(e,"PATH")},Ie.query=function(e){return new Ie(e,"QUERY")},Ie);function Ie(e,t){this.text=e,this.type=t}var Ue=(He.prototype.current=function(){return this._currentToken},He.prototype.next=function(){if(Me(this))switch(this._currentState){case"SCHEME":!function(e){var t=function(e){return ke(e,function(e){return function(e){var t=e.charCodeAt(0);return 48<=t&&t<=57||65<=t&&t<=90||97<=t&&t<=122}(e)})}(e);e._currentToken=De.scheme(t),Me(e)?e._currentState="HOST":e._currentState="DONE"}(this);break;case"SCHEME_OR_HOST":!function(e){var t=Be(e,":","/","?");Me(e)?":"===ze(e)?"://"===Le(e,3)?(e._currentToken=De.scheme(t),e._currentState="HOST"):(e._currentToken=De.host(t),e._currentState="PORT"):(e._currentToken=De.host(t),"/"===ze(e)?e._currentState="PATH":e._currentState="QUERY"):(e._currentToken=De.host(t),e._currentState="DONE")}(this);break;case"HOST":!function(e){"://"===Le(e,3)&&je(e,3);var t=Be(e,":","/","?");e._currentToken=De.host(t),Me(e)?":"===ze(e)?e._currentState="PORT":"/"===ze(e)?e._currentState="PATH":e._currentState="QUERY":e._currentState="DONE"}(this);break;case"PORT":!function(e){":"===ze(e)&&je(e);var t=Be(e,"/","?");e._currentToken=De.port(t),Me(e)?"/"===ze(e)?e._currentState="PATH":e._currentState="QUERY":e._currentState="DONE"}(this);break;case"PATH":!function(e){var t=Be(e,"?");e._currentToken=De.path(t),Me(e)?e._currentState="QUERY":e._currentState="DONE"}(this);break;case"QUERY":!function(e){"?"===ze(e)&&je(e);var t=function(e){var t="";return e._currentIndex<e._textLength&&(t=e._text.substring(e._currentIndex),e._currentIndex=e._textLength),t}(e);e._currentToken=De.query(t),e._currentState="DONE"}(this);break;default:throw new Error("Unrecognized URLTokenizerState: "+this._currentState)}else this._currentToken=void 0;return!!this._currentToken},He);function He(e,t){this._text=e,this._textLength=e?e.length:0,this._currentState=null!=t?t:"SCHEME_OR_HOST",this._currentIndex=0}function Me(e){return e._currentIndex<e._textLength}function ze(e){return e._text[e._currentIndex]}function je(e,t){Me(e)&&(t||(t=1),e._currentIndex+=t)}function Le(e,t){var r=e._currentIndex+t;return e._textLength<r&&(r=e._textLength),e._text.substring(e._currentIndex,r)}function ke(e,t){for(var r="";Me(e);){var n=ze(e);if(!t(n))break;r+=n,je(e)}return r}function Be(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return ke(e,function(e){return-1===t.indexOf(e)})}function Fe(r){return void 0===r&&(r=20),{create:function(e,t){return new Qe(e,t,r)}}}var $e,Qe=(S(Ve,$e=re),Ve.prototype.sendRequest=function(e){var t=this;return this._nextPolicy.sendRequest(e).then(function(e){return function t(r,e,n){var o=e.request,i=e.status,a=e.headers.get("location");if(a&&(300===i||307===i||303===i&&"POST"===o.method)&&(!r.maxRetries||n<r.maxRetries)){var s=Ae.parse(o.url);return s.setPath(a),o.url=s.toString(),303===i&&(o.method="GET"),r._nextPolicy.sendRequest(o).then(function(e){return t(r,e,n+1)})}return Promise.resolve(e)}(t,e,0)})},Ve);function Ve(e,t,r){void 0===r&&(r=20);var n=$e.call(this,e,t)||this;return n.maxRetries=r,n}var Ye,Xe=(S(We,Ye=re),We.prototype.sendRequest=function(t){var r=this;return this._nextPolicy.sendRequest(t.clone()).then(function(e){return function(t,r,n){if(409===n.status){var e=function(e){var t,r;if(e){try{r=JSON.parse(e)}catch(e){}if(r&&r.error&&r.error.message&&r.error.code&&"MissingSubscriptionRegistration"===r.error.code){var n=r.error.message.match(/.*'(.*)'/i);n&&(t=n.pop())}}return t}(n.bodyAsText);if(e){var o=function(e){var t=e.match(/.*\/subscriptions\/[a-f0-9-]+\//gi);if(!t||!t[0])throw new Error("Unable to extract subscriptionId from the given url - "+e+".");return t[0]}(r.url);return function(t,e,r,n){var o=e+"providers/"+r+"/register?api-version=2016-02-01",i=e+"providers/"+r+"?api-version=2016-02-01",a=Je(n);return a.method="POST",a.url=o,t._nextPolicy.sendRequest(a).then(function(e){if(200!==e.status)throw new Error("Autoregistration of "+r+" failed. Please try registering manually.");return function r(n,o,i){var e=Je(i);return e.url=o,e.method="GET",n._nextPolicy.sendRequest(e).then(function(e){var t=e.parsedBody;return!(!e.parsedBody||!t.registrationState||"Registered"!==t.registrationState)||d(1e3*n._retryTimeout).then(function(){return r(n,o,i)})})}(t,i,n)})}(t,o,e,r).catch(function(){return!1}).then(function(e){return e?(r.headers.set("x-ms-client-request-id",v()),t._nextPolicy.sendRequest(r.clone())):n})}}return Promise.resolve(n)}(r,t,e)})},We);function We(e,t,r){void 0===r&&(r=30);var n=Ye.call(this,e,t)||this;return n._retryTimeout=r,n}function Je(e,t){void 0===t&&(t=!1);var r=e.clone();return t&&(r.url=e.url),r.headers.set("x-ms-client-request-id",v()),r.headers.set("Content-Type","application/json; charset=utf-8"),r}function Ge(r){return{create:function(e,t){return new Ze(e,t,r)}}}var Ke,Ze=(S(et,Ke=re),et.prototype.signRequest=function(e){return this.authenticationProvider.signRequest(e)},et.prototype.sendRequest=function(e){var t=this;return this.signRequest(e).then(function(e){return t._nextPolicy.sendRequest(e)})},et);function et(e,t,r){var n=Ke.call(this,e,t)||this;return n.authenticationProvider=r,n}function tt(r,n,o,i){return{create:function(e,t){return new ot(e,t,r,n,o,i)}}}var rt,nt,ot=(S(it,rt=re),it.prototype.sendRequest=function(t){var r=this;return this._nextPolicy.sendRequest(t.clone()).then(function(e){return function t(r,n,o,i,a){return i=st(r,i,a),a&&a.code&&at(r,i)&&("ETIMEDOUT"===a.code||"ESOCKETTIMEDOUT"===a.code||"ECONNREFUSED"===a.code||"ECONNRESET"===a.code||"ENOENT"===a.code)?d(i.retryInterval).then(function(){return r._nextPolicy.sendRequest(n.clone())}).then(function(e){return t(r,n,e,i,a)}).catch(function(e){return t(r,n,o,i,e)}):null!=a?(a=i.error,Promise.reject(a)):Promise.resolve(o)}(r,t,e)})},it);function it(e,t,r,n,o,i){var a=rt.call(this,e,t)||this;return a.DEFAULT_CLIENT_RETRY_INTERVAL=3e4,a.DEFAULT_CLIENT_RETRY_COUNT=3,a.DEFAULT_CLIENT_MAX_RETRY_INTERVAL=9e4,a.DEFAULT_CLIENT_MIN_RETRY_INTERVAL=3e3,a.retryCount="number"==typeof r?r:a.DEFAULT_CLIENT_RETRY_COUNT,a.retryInterval="number"==typeof n?n:a.DEFAULT_CLIENT_RETRY_INTERVAL,a.minRetryInterval="number"==typeof o?o:a.DEFAULT_CLIENT_MIN_RETRY_INTERVAL,a.maxRetryInterval="number"==typeof i?i:a.DEFAULT_CLIENT_MAX_RETRY_INTERVAL,a}function at(e,t){if(!t)throw new Error("retryData for the SystemErrorRetryPolicyFilter cannot be null.");return(t&&t.retryCount)<e.retryCount}function st(e,t,r){t||(t={retryCount:0,retryInterval:0}),r&&(t.error&&(r.innerError=t.error),t.error=r),t.retryCount++;var n=Math.pow(2,t.retryCount)-1;return n*=.8*e.retryInterval+Math.floor(Math.random()*(1.2*e.retryInterval-.8*e.retryInterval)),t.retryInterval=Math.min(e.minRetryInterval+n,e.maxRetryInterval),t}(nt=N.QueryCollectionFormat||(N.QueryCollectionFormat={})).Csv=",",nt.Ssv=" ",nt.Tsv="\t",nt.Pipes="|",nt.Multi="Multi";var ut=new Error("ProxyPolicy is not supported in browser environment");function lt(e){}function ct(e){return{create:function(e,t){throw ut}}}var ft;S(pt,ft=re),pt.prototype.sendRequest=function(e){throw ut};function pt(e,t){ft.call(this,e,t);throw ut}var ht=c.HttpConstants.StatusCodes;function dt(){return{create:function(e,t){return new mt(e,t)}}}var yt,mt=(S(vt,yt=re),vt.prototype.sendRequest=function(r){return x(this,void 0,void 0,function(){var t=this;return C(this,function(e){return[2,this._nextPolicy.sendRequest(r.clone()).then(function(e){return e.status!==ht.TooManyRequests?e:t._handleResponse(r,e)})]})})},vt.prototype._defaultResponseHandler=function(o,i){return x(this,void 0,void 0,function(){var t,r,n=this;return C(this,function(e){return(t=i.headers.get(c.HeaderConstants.RETRY_AFTER))&&(r=vt.parseRetryAfterHeader(t))?[2,d(r).then(function(e){return n._nextPolicy.sendRequest(o)})]:[2,i]})})},vt.parseRetryAfterHeader=function(e){var t=Number(e);return Number.isNaN(t)?vt.parseDateRetryAfterHeader(e):1e3*t},vt.parseDateRetryAfterHeader=function(e){try{var t=Date.now(),r=Date.parse(e)-t;return Number.isNaN(r)?void 0:r}catch(e){return}},vt);function vt(e,t,r){var n=yt.call(this,e,t)||this;return n._handleResponse=r||n._defaultResponseHandler,n}var gt=(bt.prototype.sendRequest=function(e){if(null==e||"object"!=typeof e)throw new Error("options cannot be null or undefined and it must be of type object.");var t;try{t=e instanceof A?(e.validateRequestProperties(),e):(t=new A).prepare(e)}catch(e){return Promise.reject(e)}var r=this._httpClient;if(this._requestPolicyFactories&&0<this._requestPolicyFactories.length)for(var n=this._requestPolicyFactories.length-1;0<=n;--n)r=this._requestPolicyFactories[n].create(r,this._requestPolicyOptions);return r.sendRequest(t)},bt.prototype.sendOperationRequest=function(e,t,r){"function"==typeof e.options&&(r=e.options,e.options=void 0);var n,o=new A;try{var i=t.baseUrl||this.baseUri;if(!i)throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a baseUri string property that contains the base URL to use.");o.method=t.httpMethod,o.operationSpec=t;var a=Ae.parse(i);if(t.path&&a.appendPath(t.path),t.urlParameters&&0<t.urlParameters.length)for(var s=0,u=t.urlParameters;s<u.length;s++){var l=u[s],c=wt(this,e,l,t.serializer);c=t.serializer.serialize(l.mapper,c,V(l)),l.skipEncoding||(c=encodeURIComponent(c)),a.replaceAll("{"+(l.mapper.serializedName||V(l))+"}",c)}if(t.queryParameters&&0<t.queryParameters.length)for(var f=0,p=t.queryParameters;f<p.length;f++){var h=p[f],d=wt(this,e,h,t.serializer);if(null!=d){if(d=t.serializer.serialize(h.mapper,d,V(h)),null!=h.collectionFormat)if(h.collectionFormat===N.QueryCollectionFormat.Multi)if(0===d.length)d="";else for(var y in d){var m=d[y];d[y]=null==m?"":m.toString()}else d=d.join(h.collectionFormat);if(!h.skipEncoding)if(Array.isArray(d))for(var y in d)d[y]=encodeURIComponent(d[y]);else d=encodeURIComponent(d);a.setQueryParameter(h.mapper.serializedName||V(h),d)}}o.url=a.toString();var v=t.contentType||this.requestContentType;if(v&&o.headers.set("Content-Type",v),t.headerParameters)for(var g=0,b=t.headerParameters;g<b.length;g++){var E=b[g],w=wt(this,e,E,t.serializer);if(null!=w){w=t.serializer.serialize(E.mapper,w,V(E));var R=E.mapper.headerCollectionPrefix;if(R)for(var _=0,T=Object.keys(w);_<T.length;_++){var P=T[_];o.headers.set(R+P,w[P])}else o.headers.set(E.mapper.serializedName||V(E),w)}}var S=e.options;if(S){if(S.customHeaders)for(var O in S.customHeaders)o.headers.set(O,S.customHeaders[O]);S.abortSignal&&(o.abortSignal=S.abortSignal),S.timeout&&(o.timeout=S.timeout),S.onUploadProgress&&(o.onUploadProgress=S.onUploadProgress),S.onDownloadProgress&&(o.onDownloadProgress=S.onDownloadProgress)}o.withCredentials=this._withCredentials,function(e,t,r,n){if(n.requestBody&&n.requestBody.mapper){t.body=wt(e,r,n.requestBody,n.serializer);var o=n.requestBody.mapper,i=o.required,a=o.xmlName,s=o.xmlElementName,u=o.serializedName,l=o.type.name;try{if(null!=t.body||i){var c=V(n.requestBody);t.body=n.serializer.serialize(o,t.body,c);var f=l===q.Stream;n.isXML?l===q.Sequence?t.body=ee(function(e,t){var r;return Array.isArray(e)||(e=[e]),(r={})[t]=e,r}(t.body,s||a||u),{rootName:a||u}):f||(t.body=ee(t.body,{rootName:a||u})):f||(t.body=JSON.stringify(t.body))}}catch(e){throw new Error('Error "'+e.message+'" occurred in serializing the payload - '+JSON.stringify(u,void 0," ")+".")}}else if(n.formDataParameters&&0<n.formDataParameters.length){t.formData={};for(var p=0,h=n.formDataParameters;p<h.length;p++){var d=h[p],y=wt(e,r,d,n.serializer);if(null!=y){var m=d.mapper.serializedName||V(d);t.formData[m]=n.serializer.serialize(d.mapper,y,V(d))}}}}(this,o,e,t),null==o.streamResponseBody&&(o.streamResponseBody=X(t)),n=this.sendRequest(o).then(function(e){return _t(e,t.responses[e.status])})}catch(e){n=Promise.reject(e)}var x=r;return x&&n.then(function(e){return x(null,e._response.parsedBody,e._response.request,e._response)}).catch(function(e){return x(e)}),n},bt);function bt(e,t){if(t||(t={}),e&&!e.signRequest)throw new Error("credentials argument needs to implement signRequest method");var r;if(this._withCredentials=t.withCredentials||!1,this._httpClient=t.httpClient||new k,this._requestPolicyOptions=new oe(t.httpPipelineLogger),Array.isArray(t.requestPolicyFactories))r=t.requestPolicyFactories;else if(r=function(e,t){var r=[];t.generateClientRequestIdHeader&&r.push(ge(t.clientRequestIdHeaderName));e&&(!function(e){return"function"==typeof e.create}(e)?r.push(Ge(e)):r.push(e));var n=Et(t.userAgentHeaderName,_e),o=Et(t.userAgent,Te);n&&o&&r.push(Pe({key:n,value:o}));r.push(Fe()),r.push(function(r){return void 0===r&&(r=30),{create:function(e,t){return new Xe(e,t,r)}}}(t.rpRegistrationRetryTimeout)),t.noRetryPolicy||(r.push(he()),r.push(tt()),r.push(dt()));r.push(ae(t.deserializationContentTypes));var i=t.proxySettings||void 0;i&&r.push(ct());return r}(e,t),t.requestPolicyFactories){var n=t.requestPolicyFactories(r);n&&(r=n)}this._requestPolicyFactories=r}function Et(e,t){var r;return"string"==typeof e?r=e:(r=t(),"function"==typeof e&&(r=e(r))),r}function wt(e,t,r,n){return function e(t,r,n,o,i){var a;"string"==typeof n&&(n=[n]);if(Array.isArray(n)){if(0<n.length){if(o.isConstant)a=o.defaultValue;else{var s=Rt(r,n);s.propertyFound||(s=Rt(t,n));var u=!1;s.propertyFound||(u=o.required||"options"===n[0]&&2===n.length),a=u?o.defaultValue:s.propertyValue}var l=Y(n,o);i.serialize(o,a,l)}}else for(var c in o.required&&(a={}),n){var f=o.type.modelProperties[c],p=n[c],h=e(t,r,p,f,i),d=Y(p,f);i.serialize(f,h,d),void 0!==h&&(a||(a={}),a[c]=h)}return a}(e,t,r.parameterPath,r.mapper,n)}function Rt(e,t){for(var r={propertyFound:!1},n=0;n<t.length;++n){var o=t[n];if(!(null!=e&&o in e))break;e=e[o]}return n===t.length&&(r.propertyValue=e,r.propertyFound=!0),r}function _t(t,e){function r(e){return Object.defineProperty(e,"_response",{value:t})}var n=t.parsedHeaders,o=e&&e.bodyMapper;if(o){var i=o.type.name;if("Stream"===i)return r(O({},n,{blobBody:t.blobBody,readableStreamBody:t.readableStreamBody}));var a="Composite"===i&&o.type.modelProperties||{},s=Object.keys(a).some(function(e){return""===a[e].serializedName});if("Sequence"===i||s){for(var u=(t.parsedBody||[]).slice(),l=0,c=Object.keys(a);l<c.length;l++){var f=c[l];a[f].serializedName&&(u[f]=t.parsedBody[f])}if(n)for(var p=0,h=Object.keys(n);p<h.length;p++){u[f=h[p]]=n[f]}return r(u),u}if("Composite"===i||"Dictionary"===i)return r(O({},n,t.parsedBody))}return o||"HEAD"===t.request.method?r(O({},n,{body:t.parsedBody})):r(O({},n,t.parsedBody))}var Tt,Pt=(S(St,Tt=re),St.prototype.sendRequest=function(e){var t=this;return this._nextPolicy.sendRequest(e).then(function(e){return function(e,t){e.logger(">> Request: "+JSON.stringify(t.request,void 0,2)),e.logger(">> Response status code: "+t.status);var r=t.bodyAsText;return e.logger(">> Body: "+r),Promise.resolve(t)}(t,e)})},St);function St(e,t,r){void 0===r&&(r=console.log);var n=Tt.call(this,e,t)||this;return n.logger=r,n}var Ot=c.HeaderConstants,xt=(Nt.prototype.signRequest=function(e){return e.headers||(e.headers=new p),e.headers.set(Ot.AUTHORIZATION,this.authorizationScheme+" "+this.token),Promise.resolve(e)},Nt);function Nt(e,t){if(void 0===t&&(t="Bearer"),this.authorizationScheme="Bearer",!e)throw new Error("token cannot be null or undefined.");this.token=e,this.authorizationScheme=t}var qt=c.HeaderConstants,At=(Ct.prototype.signRequest=function(e){var t=this.userName+":"+this.password,r=this.authorizationScheme+" "+function(e){return btoa(e)}(t);return e.headers||(e.headers=new p),e.headers.set(qt.AUTHORIZATION,r),Promise.resolve(e)},Ct);function Ct(e,t,r){if(void 0===r&&(r="Basic"),this.authorizationScheme="Basic",null==e||"string"!=typeof e.valueOf())throw new Error("userName cannot be null or undefined and must be of type string.");if(null==t||"string"!=typeof t.valueOf())throw new Error("password cannot be null or undefined and must be of type string.");this.userName=e,this.password=t,this.authorizationScheme=r}var Dt=(It.prototype.signRequest=function(e){if(!e)return Promise.reject(new Error('webResource cannot be null or undefined and must be of type "object".'));if(this.inHeader)for(var t in e.headers||(e.headers=new p),this.inHeader)e.headers.set(t,this.inHeader[t]);if(this.inQuery){if(!e.url)return Promise.reject(new Error("url cannot be null in the request object."));for(var r in e.url.indexOf("?")<0&&(e.url+="?"),this.inQuery)e.url.endsWith("?")||(e.url+="&"),e.url+=r+"="+this.inQuery[r]}return Promise.resolve(e)},It);function It(e){if(!e||e&&!e.inHeader&&!e.inQuery)throw new Error('options cannot be null or undefined. Either "inHeader" or "inQuery" property of the options object needs to be provided.');this.inHeader=e.inHeader,this.inQuery=e.inQuery}var Ut,Ht=(S(Mt,Ut=Dt),Mt);function Mt(e){if(!e||e&&"string"!=typeof e)throw new Error("topicKey cannot be null or undefined and must be of type string.");var t={inHeader:{"aeg-sas-key":e}};return Ut.call(this,t)||this}N.WebResource=A,N.DefaultHttpClient=k,N.HttpHeaders=p,N.RestError=z,N.ServiceClient=gt,N.flattenResponse=_t,N.Constants=c,N.logPolicy=function(r){return void 0===r&&(r=console.log),{create:function(e,t){return new Pt(e,t,r)}}},N.BaseRequestPolicy=re,N.RequestPolicyOptions=oe,N.generateClientRequestIdPolicy=ge,N.exponentialRetryPolicy=he,N.systemErrorRetryPolicy=tt,N.throttlingRetryPolicy=dt,N.getDefaultProxySettings=lt,N.proxyPolicy=ct,N.redirectPolicy=Fe,N.signingPolicy=Ge,N.userAgentPolicy=Pe,N.getDefaultUserAgentValue=Te,N.deserializationPolicy=ae,N.deserializeResponseBody=pe,N.MapperType=q,N.Serializer=w,N.serializeObject=function e(t){if(null!=t){if(t instanceof Uint8Array)return t=s(t);if(t instanceof Date)return t.toISOString();if(Array.isArray(t)){for(var r=[],n=0;n<t.length;n++)r.push(e(t[n]));return r}if("object"!=typeof t)return t;var o={};for(var i in t)o[i]=e(t[i]);return o}},N.stripRequest=m,N.stripResponse=y,N.delay=d,N.executePromisesSequentially=function(e,t){var r=Promise.resolve(t);return e.forEach(function(e){r=r.then(e)}),r},N.generateUuid=v,N.encodeUri=function(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/"/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")},N.promiseToCallback=function(e){if("function"!=typeof e.then)throw new Error("The provided input is not a Promise.");return function(t){e.then(function(e){t(void 0,e)},function(e){t(e)})}},N.promiseToServiceCallback=function(e){if("function"!=typeof e.then)throw new Error("The provided input is not a Promise.");return function(t){e.then(function(e){process.nextTick(t,void 0,e.parsedBody,e.request,e)},function(e){process.nextTick(t,e)})}},N.isValidUuid=h,N.applyMixins=function(r,e){e.forEach(function(t){Object.getOwnPropertyNames(t.prototype).forEach(function(e){r.prototype[e]=t.prototype[e]})})},N.isNode=f,N.isDuration=b,N.URLBuilder=Ae,N.URLQuery=Ne,N.TokenCredentials=xt,N.BasicAuthenticationCredentials=At,N.ApiKeyCredentials=Dt,N.TopicCredentials=Ht,Object.defineProperty(N,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("stream")):"function"==typeof define&&define.amd?define(["exports","stream"],t):t(e.msRest={},e.stream)}(this,function(e,t){"use strict";function r(e){return e.toLowerCase()}var n=function(){function e(e){if(this._headersMap={},e)for(var t in e)this.set(t,e[t])}return e.prototype.set=function(e,t){this._headersMap[r(e)]={name:e,value:t.toString()}},e.prototype.get=function(e){var t=this._headersMap[r(e)];return t?t.value:void 0},e.prototype.contains=function(e){return!!this._headersMap[r(e)]},e.prototype.remove=function(e){var t=this.contains(e);return delete this._headersMap[r(e)],t},e.prototype.rawHeaders=function(){var e={};for(var t in this._headersMap){var r=this._headersMap[t];e[r.name.toLowerCase()]=r.value}return e},e.prototype.headersArray=function(){var e=[];for(var t in this._headersMap)e.push(this._headersMap[t]);return e},e.prototype.headerNames=function(){for(var e=[],t=this.headersArray(),r=0;r<t.length;++r)e.push(t[r].name);return e},e.prototype.headerValues=function(){for(var e=[],t=this.headersArray(),r=0;r<t.length;++r)e.push(t[r].value);return e},e.prototype.toJson=function(){return this.rawHeaders()},e.prototype.toString=function(){return JSON.stringify(this.toJson())},e.prototype.clone=function(){return new e(this.rawHeaders())},e}();function o(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function i(e){for(var t=atob(e),r=new Uint8Array(t.length),n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};for(var s,u=(function(e){var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var r=new Uint8Array(16);e.exports=function(){return t(r),r}}else{var n=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),n[t]=e>>>((3&t)<<3)&255;return n}}}(s={exports:{}},s.exports),s.exports),l=[],c=0;c<256;++c)l[c]=(c+256).toString(16).substr(1);var f=function(e,t){var r=t||0,n=l;return[n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]]].join("")};var h=function(e,t,r){var n=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||u)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var i=0;i<16;++i)t[n+i]=o[i];return t||f(o)},p={msRestVersion:"1.8.7",HTTP:"http:",HTTPS:"https:",HTTP_PROXY:"HTTP_PROXY",HTTPS_PROXY:"HTTPS_PROXY",HttpConstants:{HttpVerbs:{PUT:"PUT",GET:"GET",DELETE:"DELETE",POST:"POST",MERGE:"MERGE",HEAD:"HEAD",PATCH:"PATCH"},StatusCodes:{TooManyRequests:429}},HeaderConstants:{AUTHORIZATION:"authorization",AUTHORIZATION_SCHEME:"Bearer",RETRY_AFTER:"Retry-After",USER_AGENT:"User-Agent"}},d="undefined"!=typeof process&&!!process.version&&!!process.versions&&!!process.versions.node;function y(e){var t={};return t.body=e.bodyAsText,t.headers=e.headers,t.status=e.status,t}function m(e){var t=e.clone();return t.headers&&t.headers.remove("authorization"),t}function v(e){return new RegExp("^[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}$","ig").test(e)}function g(){return h()}function b(e,t){return new Promise(function(r){return setTimeout(function(){return r(t)},e)})}var w=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function E(e){return w.test(e)}function R(e,t,r){return e&&t?e.split(t).join(r||""):e}var T=function(){function e(e,t){void 0===e&&(e={}),this.modelMappers=e,this.isXML=t}return e.prototype.validateConstraints=function(e,t,r){var n=function(e,n){throw new Error('"'+r+'" with value "'+t+'" should satisfy the constraint "'+e+'": '+n+".")};if(e.constraints&&null!=t){var o=e.constraints,i=o.ExclusiveMaximum,a=o.ExclusiveMinimum,s=o.InclusiveMaximum,u=o.InclusiveMinimum,l=o.MaxItems,c=o.MaxLength,f=o.MinItems,h=o.MinLength,p=o.MultipleOf,d=o.Pattern,y=o.UniqueItems;null!=i&&t>=i&&n("ExclusiveMaximum",i),null!=a&&t<=a&&n("ExclusiveMinimum",a),null!=s&&t>s&&n("InclusiveMaximum",s),null!=u&&t<u&&n("InclusiveMinimum",u),null!=l&&t.length>l&&n("MaxItems",l),null!=c&&t.length>c&&n("MaxLength",c),null!=f&&t.length<f&&n("MinItems",f),null!=h&&t.length<h&&n("MinLength",h),null!=p&&t%p!=0&&n("MultipleOf",p),d&&null===t.match(d)&&n("Pattern",d),y&&t.some(function(e,t,r){return r.indexOf(e)!==t})&&n("UniqueItems",y)}},e.prototype.serialize=function(e,t,r){var n={},i=e.type.name;r||(r=e.serializedName),null!==i.match(/^Sequence$/gi)&&(n=[]),null!=t||null==e.defaultValue&&!e.isConstant||(t=e.defaultValue);var a=e.required,s=e.nullable;if(a&&s&&void 0===t)throw new Error(r+" cannot be undefined.");if(a&&!s&&null==t)throw new Error(r+" cannot be null or undefined.");if(!a&&!1===s&&null===t)throw new Error(r+" cannot be null.");if(null==t)n=t;else if(this.validateConstraints(e,t,r),null!==i.match(/^any$/gi))n=t;else if(null!==i.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/gi))n=function(e,t,r){if(null!=r)if(null!==e.match(/^Number$/gi)){if("number"!=typeof r)throw new Error(t+" with value "+r+" must be of type number.")}else if(null!==e.match(/^String$/gi)){if("string"!=typeof r.valueOf())throw new Error(t+' with value "'+r+'" must be of type string.')}else if(null!==e.match(/^Uuid$/gi)){if("string"!=typeof r.valueOf()||!v(r))throw new Error(t+' with value "'+r+'" must be of type string and a valid uuid.')}else if(null!==e.match(/^Boolean$/gi)){if("boolean"!=typeof r)throw new Error(t+" with value "+r+" must be of type boolean.")}else if(null!==e.match(/^Stream$/gi)){var n=typeof r;if(!("string"===n||"function"===n||r instanceof ArrayBuffer||ArrayBuffer.isView(r)||"function"==typeof Blob&&r instanceof Blob))throw new Error(t+" must be a string, Blob, ArrayBuffer, ArrayBufferView, or a function returning NodeJS.ReadableStream.")}return r}(i,r,t);else if(null!==i.match(/^Enum$/gi)){n=function(e,t,r){if(!t)throw new Error("Please provide a set of allowedValues to validate "+e+" as an Enum Type.");if(!t.some(function(e){return"string"==typeof e.valueOf()?e.toLowerCase()===r.toLowerCase():e===r}))throw new Error(r+" is not a valid value for "+e+". The valid values are: "+JSON.stringify(t)+".");return r}(r,e.type.allowedValues,t)}else null!==i.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/gi)?n=function(e,t,r){if(null!=t)if(null!==e.match(/^Date$/gi)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(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(null!==e.match(/^DateTime$/gi)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(r+" must be an instanceof Date or a string in ISO8601 format.");t=t instanceof Date?t.toISOString():new Date(t).toISOString()}else if(null!==e.match(/^DateTimeRfc1123$/gi)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(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(null!==e.match(/^UnixTime$/gi)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(r+" must be an instanceof Date or a string in RFC-1123/ISO8601 format for it to be serialized in UnixTime/Epoch format.");t=function(e){if(!e)return;"string"==typeof e.valueOf()&&(e=new Date(e));return Math.floor(e.getTime()/1e3)}(t)}else if(null!==e.match(/^TimeSpan$/gi)){if(!E(t))throw new Error(r+' must be a string in ISO 8601 format. Instead was "'+t+'".');t=t}return t}(i,t,r):null!==i.match(/^ByteArray$/gi)?n=function(e,t){if(null!=t){if(!(t instanceof Uint8Array))throw new Error(e+" must be of type Uint8Array.");t=o(t)}return t}(r,t):null!==i.match(/^Base64Url$/gi)?n=function(e,t){if(null!=t){if(!(t instanceof Uint8Array))throw new Error(e+" must be of type Uint8Array.");t=function(e){if(!e)return;if(!(e instanceof Uint8Array))throw new Error("Please provide an input of type Uint8Array for converting to Base64Url.");return function(e,t){var r=e.length;for(;r-1>=0&&e[r-1]===t;)--r;return e.substr(0,r)}(o(e),"=").replace(/\+/g,"-").replace(/\//g,"_")}(t)}return t}(r,t):null!==i.match(/^Sequence$/gi)?n=function(e,t,r,n){if(!Array.isArray(r))throw new Error(n+" must be of type Array.");var o=t.type.element;if(!o||"object"!=typeof o)throw new Error('element" metadata for an Array must be defined in the mapper and it must of type "object" in '+n+".");for(var i=[],a=0;a<r.length;a++)i[a]=e.serialize(o,r[a],n);return i}(this,e,t,r):null!==i.match(/^Dictionary$/gi)?n=function(e,t,r,n){if("object"!=typeof r)throw new Error(n+" must be of type object.");var o=t.type.value;if(!o||"object"!=typeof o)throw new Error('"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in '+n+".");for(var i={},a=0,s=Object.keys(r);a<s.length;a++){var u=s[a];i[u]=e.serialize(o,r[u],n+"."+u)}return i}(this,e,t,r):null!==i.match(/^Composite$/gi)&&(n=function(e,t,r,n){var o;x(e,t)&&(t=O(e,t,r,"clientName"));if(null!=r){for(var i={},a=P(e,t,n),s=0,u=Object.keys(a);s<u.length;s++){var l=u[s],c=a[l];if(!c.readOnly){var f=void 0,h=i;if(e.isXML)f=c.xmlIsWrapped?c.xmlName:c.xmlElementName||c.xmlName;else{var p=_(c.serializedName);f=p.pop();for(var d=0,y=p;d<y.length;d++){var m=y[d],v=h[m];null==v&&null!=r[l]&&(h[m]={}),h=h[m]}}if(null!=h){var g=""!==c.serializedName?n+"."+c.serializedName:n,b=r[l],w=x(e,t);w&&w.clientName===l&&null==b&&(b=t.serializedName);var E=e.serialize(c,b,g);void 0!==E&&null!=f&&(c.xmlIsAttribute?(h.$=h.$||{},h.$[f]=E):c.xmlIsWrapped?h[f]=((o={})[c.xmlElementName]=E,o):h[f]=E)}}}var R=t.type.additionalProperties;if(R){var T=Object.keys(a),S=function(t){var o=T.every(function(e){return e!==t});o&&(i[t]=e.serialize(R,r[t],n+'["'+t+'"]'))};for(var A in r)S(A)}return i}return r}(this,e,t,r));return n},e.prototype.deserialize=function(e,t,r){if(null==t)return this.isXML&&"Sequence"===e.type.name&&!e.xmlIsWrapped&&(t=[]),t;var n,o=e.type.name;return r||(r=e.serializedName),null!==o.match(/^Composite$/gi)?n=function(e,t,r,n){x(e,t)&&(t=O(e,t,r,"serializedName"));for(var o=P(e,t,n),i={},a=[],s=0,u=Object.keys(o);s<u.length;s++){var l=u[s],c=o[l],f=_(o[l].serializedName);a.push(f[0]);var h=c.serializedName,p=c.xmlName,d=c.xmlElementName,y=n;""!==h&&void 0!==h&&(y=n+"."+h);var m=c.headerCollectionPrefix;if(m){for(var v={},g=0,b=Object.keys(r);g<b.length;g++){var w=b[g];w.startsWith(m)&&(v[w.substring(m.length)]=e.deserialize(c.type.value,r[w],y)),a.push(w)}i[l]=v}else if(e.isXML)if(c.xmlIsAttribute&&r.$)i[l]=e.deserialize(c,r.$[p],y);else{var E=d||p||h,R=r[E];if(c.xmlIsWrapped){var T=void 0===(R=(R=r[p])&&R[d]);T&&(R=[])}i[l]=e.deserialize(c,R,y)}else{for(var A=void 0,N=r,q=0,C=f;q<C.length;q++){var D=C[q];if(!N)break;N=N[D]}A=N;var U=t.type.polymorphicDiscriminator;U&&c.serializedName===U.serializedName&&null==A&&(A=t.serializedName);var I=void 0;Array.isArray(r[l])&&""===o[l].serializedName?(A=r[l],i=e.deserialize(c,A,y)):void 0!==A&&(I=e.deserialize(c,A,y),i[l]=I)}}var j=t.type.additionalProperties;if(j){var B=function(e){for(var t in o){var r=_(o[t].serializedName);if(r[0]===e)return!1}return!0};for(var H in r)B(H)&&(i[H]=e.deserialize(j,r[H],n+'["'+H+'"]'))}else if(r)for(var M=0,z=Object.keys(r);M<z.length;M++){var l=z[M];void 0!==i[l]||a.includes(l)||S(l)||(i[l]=r[l])}return i}(this,e,t,r):(this.isXML&&null!=t.$&&null!=t._&&(t=t._),null!==o.match(/^Number$/gi)?(n=parseFloat(t),isNaN(n)&&(n=t)):null!==o.match(/^Boolean$/gi)?n="true"===t||"false"!==t&&t:null!==o.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/gi)?n=t:null!==o.match(/^(Date|DateTime|DateTimeRfc1123)$/gi)?n=new Date(t):null!==o.match(/^UnixTime$/gi)?n=function(e){if(!e)return;return new Date(1e3*e)}(t):null!==o.match(/^ByteArray$/gi)?n=i(t):null!==o.match(/^Base64Url$/gi)?n=function(e){if(!e)return;if(e&&"string"!=typeof e.valueOf())throw new Error("Please provide an input of type string for converting to Uint8Array");return i(e=e.replace(/\-/g,"+").replace(/\_/g,"/"))}(t):null!==o.match(/^Sequence$/gi)?n=function(e,t,r,n){var o=t.type.element;if(!o||"object"!=typeof o)throw new Error('element" metadata for an Array must be defined in the mapper and it must of type "object" in '+n);if(r){Array.isArray(r)||(r=[r]);for(var i=[],a=0;a<r.length;a++)i[a]=e.deserialize(o,r[a],n+"["+a+"]");return i}return r}(this,e,t,r):null!==o.match(/^Dictionary$/gi)&&(n=function(e,t,r,n){var o=t.type.value;if(!o||"object"!=typeof o)throw new Error('"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in '+n);if(r){for(var i={},a=0,s=Object.keys(r);a<s.length;a++){var u=s[a];i[u]=e.deserialize(o,r[u],n)}return i}return r}(this,e,t,r))),e.isConstant&&(n=e.defaultValue),n},e}();function _(e){var t=[],r="";if(e)for(var n=0,o=e.split(".");n<o.length;n++){var i=o[n];"\\"===i.charAt(i.length-1)?r+=i.substr(0,i.length-1)+".":(r+=i,t.push(r),r="")}return t}function P(e,t,r){var n=t.type.modelProperties;if(!n){var o=t.type.className;if(!o)throw new Error('Class name for model "'+r+'" is not provided in the mapper "'+JSON.stringify(t,void 0,2)+'".');var i=e.modelMappers[o];if(!i)throw new Error('mapper() cannot be null or undefined for model "'+o+'".');if(!(n=i.type.modelProperties))throw new Error('modelProperties cannot be null or undefined in the mapper "'+JSON.stringify(i)+'" of type "'+o+'" for object "'+r+'".')}return n}function S(e){return["$","_"].includes(e)}function O(e,t,r,n){var o=x(e,t);if(o){var i=o[n];if(null!=i){var a=r[i];if(null!=a){var s=t.type.uberParent||t.type.className,u=a===s?a:s+"."+a,l=e.modelMappers.discriminators[u];l&&(t=l)}}}return t}function x(e,t){return t.type.polymorphicDiscriminator||A(e,t.type.uberParent)||A(e,t.type.className)}function A(e,t){return t&&e.modelMappers[t]&&e.modelMappers[t].type.polymorphicDiscriminator}var N=function(e){for(var t={},r=0,n=e;r<n.length;r++){var o=n[r];t[o]=o}return t}(["Base64Url","Boolean","ByteArray","Composite","Date","DateTime","DateTimeRfc1123","Dictionary","Enum","Number","Object","Sequence","String","Stream","TimeSpan","UnixTime"]),q=function(){function e(e,t,r,o,i,a,s,u,l,c,f,h){this.streamResponseBody=a,this.url=e||"",this.method=t||"GET",this.headers=i instanceof n?i:new n(i),this.body=r,this.query=o,this.formData=void 0,this.withCredentials=s||!1,this.abortSignal=u,this.timeout=l||0,this.onUploadProgress=c,this.onDownloadProgress=f,this.proxySettings=h}return 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(null==e.method||"string"!=typeof e.method.valueOf())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(!(null!=e.pathTemplate&&"string"==typeof e.pathTemplate.valueOf()||null!=e.url&&"string"==typeof e.url.valueOf()))throw new Error("Please provide exactly one of options.pathTemplate or options.url.");if(e.url){if("string"!=typeof e.url)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(-1===t.indexOf(e.method.toUpperCase()))throw new Error('The provided method "'+e.method+'" is invalid. Supported HTTP methods are: '+JSON.stringify(t))}if(this.method=e.method.toUpperCase(),e.pathTemplate){var r=e.pathTemplate,n=e.pathParameters;if("string"!=typeof r)throw new Error('options.pathTemplate must be of type "string".');e.baseUrl||(e.baseUrl="https://management.azure.com");var o=e.baseUrl,i=o+(o.endsWith("/")?"":"/")+(r.startsWith("/")?r.slice(1):r),a=i.match(/({\w*\s*\w*})/gi);if(a&&a.length){if(!n)throw new Error("pathTemplate: "+r+" has been provided. Hence, options.pathParameters must also be provided.");a.forEach(function(e){var t=e.slice(1,-1),o=n[t];if(null==o||"string"!=typeof o&&"object"!=typeof o)throw new Error("pathTemplate: "+r+" contains the path parameter "+t+" however, it is not present in "+n+" - "+JSON.stringify(n,void 0,2)+'.The value of the path parameter can either be a "string" of the form { '+t+': "some sample value" } or it can be an "object" of the form { "'+t+'": { value: "some sample value", skipUrlEncoding: true } }.');if("string"==typeof o.valueOf()&&(i=i.replace(e,encodeURIComponent(o))),"object"==typeof o.valueOf()){if(!o.value)throw new Error("options.pathParameters["+t+'] is of type "object" but it does not contain a "value" property.');i=o.skipUrlEncoding?i.replace(e,o.value):i.replace(e,encodeURIComponent(o.value))}})}this.url=i}if(e.queryParameters){var s=e.queryParameters;if("object"!=typeof s)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 }.');this.url&&-1===this.url.indexOf("?")&&(this.url+="?");var u=[];for(var l in this.query={},s){var c=s[l];if(c)if("string"==typeof c)u.push(l+"="+encodeURIComponent(c)),this.query[l]=encodeURIComponent(c);else if("object"==typeof c){if(!c.value)throw new Error("options.queryParameters["+l+'] is of type "object" but it does not contain a "value" property.');c.skipUrlEncoding?(u.push(l+"="+c.value),this.query[l]=c.value):(u.push(l+"="+encodeURIComponent(c.value)),this.query[l]=encodeURIComponent(c.value))}}this.url+=u.join("&")}if(e.headers)for(var f=e.headers,h=0,p=Object.keys(e.headers);h<p.length;h++){var d=p[h];this.headers.set(d,f[d])}return this.headers.get("accept-language")||this.headers.set("accept-language","en-US"),this.headers.get("x-ms-client-request-id")||e.disableClientRequestId||this.headers.set("x-ms-client-request-id",g()),this.headers.get("Content-Type")||this.headers.set("Content-Type","application/json; charset=utf-8"),this.body=e.body,null!=e.body&&(e.bodyIsStream?(this.headers.get("Transfer-Encoding")||this.headers.set("Transfer-Encoding","chunked"),"application/octet-stream"!==this.headers.get("Content-Type")&&this.headers.set("Content-Type","application/octet-stream")):(e.serializationMapper&&(this.body=new T(e.mappers).serialize(e.serializationMapper,e.body,"requestBody")),e.disableJsonStringifyOnBody||(this.body=JSON.stringify(e.body)))),this.abortSignal=e.abortSignal,this.onDownloadProgress=e.onDownloadProgress,this.onUploadProgress=e.onUploadProgress,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);return this.formData&&(t.formData=this.formData),this.operationSpec&&(t.operationSpec=this.operationSpec),this.shouldDeserialize&&(t.shouldDeserialize=this.shouldDeserialize),this.operationResponseGetter&&(t.operationResponseGetter=this.operationResponseGetter),t},e}(),C=function(e,t){return(C=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function D(e,t){function r(){this.constructor=e}C(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var U=function(){return(U=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function I(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new r(function(t){t(e.value)}).then(a,s)}u((n=n.apply(e,t||[])).next())})}function j(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}!function(e){!function(t){var r={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(r.arrayBuffer)var n=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],o=ArrayBuffer.isView||function(e){return e&&n.indexOf(Object.prototype.toString.call(e))>-1};function i(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function a(e){return"string"!=typeof e&&(e=String(e)),e}function s(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r.iterable&&(t[Symbol.iterator]=function(){return t}),t}function u(e){this.map={},e instanceof u?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function l(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function c(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function f(e){var t=new FileReader,r=c(t);return t.readAsArrayBuffer(e),r}function h(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function p(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:r.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:r.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():r.arrayBuffer&&r.blob&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=h(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):r.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||o(e))?this._bodyArrayBuffer=h(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r.blob&&(this.blob=function(){var e=l(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?l(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(f)}),this.text=function(){var e,t,r,n=l(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,r=c(t),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},r.formData&&(this.formData=function(){return this.text().then(m)}),this.json=function(){return this.text().then(JSON.parse)},this}u.prototype.append=function(e,t){e=i(e),t=a(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},u.prototype.delete=function(e){delete this.map[i(e)]},u.prototype.get=function(e){return e=i(e),this.has(e)?this.map[e]:null},u.prototype.has=function(e){return this.map.hasOwnProperty(i(e))},u.prototype.set=function(e,t){this.map[i(e)]=a(t)},u.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},u.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),s(e)},u.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),s(e)},u.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),s(e)},r.iterable&&(u.prototype[Symbol.iterator]=u.prototype.entries);var d=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function y(e,t){var r,n,o=(t=t||{}).body;if(e instanceof y){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new u(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new u(t.headers)),this.method=(r=t.method||this.method||"GET",n=r.toUpperCase(),d.indexOf(n)>-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function m(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(o))}}),t}function v(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new u(t.headers),this.url=t.url||"",this._initBody(e)}y.prototype.clone=function(){return new y(this,{body:this._bodyInit})},p.call(y.prototype),p.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},v.error=function(){var e=new v(null,{status:0,statusText:""});return e.type="error",e};var g=[301,302,303,307,308];v.redirect=function(e,t){if(-1===g.indexOf(t))throw new RangeError("Invalid status code");return new v(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function b(e,n){return new Promise(function(o,i){var a=new y(e,n);if(a.signal&&a.signal.aborted)return i(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function l(){s.abort()}s.onload=function(){var e,t,r={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new u,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(e){var r=e.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();t.append(n,o)}}),t)};r.url="responseURL"in s?s.responseURL:r.headers.get("X-Request-URL");var n="response"in s?s.response:s.responseText;o(new v(n,r))},s.onerror=function(){i(new TypeError("Network request failed"))},s.ontimeout=function(){i(new TypeError("Network request failed"))},s.onabort=function(){i(new t.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&r.blob&&(s.responseType="blob"),a.headers.forEach(function(e,t){s.setRequestHeader(t,e)}),a.signal&&(a.signal.addEventListener("abort",l),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",l)}),s.send(void 0===a._bodyInit?null:a._bodyInit)})}b.polyfill=!0,e.fetch||(e.fetch=b,e.Headers=u,e.Request=y,e.Response=v),t.Headers=u,t.Request=y,t.Response=v,t.fetch=b}({})}("undefined"!=typeof self?self:a);const{AbortController:B,AbortSignal:H}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;var M=B,z=H,k=B;M.AbortSignal=z,M.default=k;var L="object"==typeof self?self.FormData:window.FormData,F=function(e){function t(r,n,o,i,a,s){var u=e.call(this,r)||this;return u.code=n,u.statusCode=o,u.request=i,u.response=a,u.body=s,Object.setPrototypeOf(u,t.prototype),u}return D(t,e),t.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR",t.REQUEST_ABORTED_ERROR="REQUEST_ABORTED_ERROR",t.PARSE_ERROR="PARSE_ERROR",t}(Error);function $(e){return"function"==typeof e.pipe}var Q,V=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return D(t,e),t.prototype.prepareRequest=function(e){return Promise.resolve()},t.prototype.processRequest=function(e){return Promise.resolve()},t}(function(){function e(){}return e.prototype.sendRequest=function(e){return I(this,void 0,void 0,function(){var r,o,i,a,s,u,l,c,f,h,p,d,y,m,v,g,b,w,E,R,T,_,P,S,O,x;return j(this,function(A){switch(A.label){case 0:if(!e&&"object"!=typeof e)throw new Error("'httpRequest' (WebResource) cannot be null or undefined and must be of type object.");if(r=new M,e.abortSignal){if(e.abortSignal.aborted)throw new F("The request was aborted",F.REQUEST_ABORTED_ERROR,void 0,e);e.abortSignal.addEventListener("abort",function(e){"abort"===e.type&&r.abort()})}if(e.timeout&&setTimeout(function(){r.abort()},e.timeout),e.formData){for(o=e.formData,i=new L,a=function(e,t){"function"==typeof t&&(t=t()),t&&t.hasOwnProperty("value")&&t.hasOwnProperty("options")?i.append(e,t.value,t.options):i.append(e,t)},s=0,u=Object.keys(o);s<u.length;s++)if(l=u[s],c=o[l],Array.isArray(c))for(f=0;f<c.length;f++)a(l,c[f]);else a(l,c);e.body=i,e.formData=void 0,(h=e.headers.get("Content-Type"))&&-1!==h.indexOf("multipart/form-data")&&("function"==typeof i.getBoundary?e.headers.set("Content-Type","multipart/form-data; boundary="+i.getBoundary()):e.headers.remove("Content-Type"))}return p=e.body?"function"==typeof e.body?e.body():e.body:void 0,e.onUploadProgress&&e.body&&(d=0,y=new t.Transform({transform:function(t,r,n){d+=t.length,e.onUploadProgress({loadedBytes:d}),n(void 0,t)}}),$(p)?p.pipe(y):y.end(p),p=y),[4,this.prepareRequest(e)];case 1:A.sent(),m={body:p,headers:e.headers.rawHeaders(),method:e.method,signal:r.signal},A.label=2;case 2:return A.trys.push([2,10,11,12]),[4,fetch(e.url,m)];case 3:return v=A.sent(),g=function(e){var t=new n;return e.forEach(function(e,r){t.set(r,e)}),t}(v.headers),b={headers:g,request:e,status:v.status},(w=e.onDownloadProgress)?[3,7]:v.body?[4,v.text()]:[3,5];case 4:return R=A.sent(),[3,6];case 5:R=void 0,A.label=6;case 6:return E=R,b.bodyAsText=E,[3,8];case 7:$(T=v.body||void 0)?(_=0,P=new t.Transform({transform:function(e,t,r){_+=e.length,w({loadedBytes:_}),r(void 0,e)}}),T.pipe(P),b.readableStreamBody=P):(S=parseInt(g.get("Content-Length"))||void 0)&&w({loadedBytes:S}),A.label=8;case 8:return[4,this.processRequest(b)];case 9:return A.sent(),[2,b];case 10:if(O=A.sent(),(x=O).code="ENOTFOUND")throw new F(x.message,F.REQUEST_SEND_ERROR);throw x;case 11:return[7];case 12:return[2]}})})},e}());function Y(e){return G(e.parameterPath,e.mapper)}function G(e,t){return"string"==typeof e?e:Array.isArray(e)?e.join("."):t.serializedName}function W(e){var t=!1;for(var r in e.responses){var n=e.responses[r];if(n.bodyMapper&&n.bodyMapper.type.name===N.Stream){t=!0;break}}return t}(Q=e.HttpPipelineLogLevel||(e.HttpPipelineLogLevel={}))[Q.OFF=0]="OFF",Q[Q.ERROR=1]="ERROR",Q[Q.WARNING=2]="WARNING",Q[Q.INFO=3]="INFO";var X=new DOMParser;function J(e){try{var t=X.parseFromString(e,"application/xml");!function(e){if(K){var t=e.getElementsByTagNameNS(K,"parsererror");if(t.length)throw new Error(t.item(0).innerHTML)}}(t);var r=function e(t){var r={};var n=t.childNodes.length;var o=t.childNodes[0];var i=o&&1===n&&o.nodeType===Node.TEXT_NODE&&o.nodeValue||void 0;var a=function(e){return function(e){return!!e.attributes}(e)&&e.hasAttributes()?e:void 0}(t);if(a){r.$={};for(var s=0;s<a.attributes.length;s++){var u=a.attributes[s];r.$[u.nodeName]=u.nodeValue}i&&(r._=i)}else 0===n?r="":i&&(r=i);if(!i)for(var s=0;s<n;s++){var l=t.childNodes[s];if(l.nodeType!==Node.TEXT_NODE){var c=e(l);r[l.nodeName]?Array.isArray(r[l.nodeName])?r[l.nodeName].push(c):r[l.nodeName]=[r[l.nodeName],c]:r[l.nodeName]=c}}return r}(t.childNodes[0]);return Promise.resolve(r)}catch(e){return Promise.reject(e)}}var K="";try{K=X.parseFromString("INVALID","text/xml").getElementsByTagName("parsererror")[0].namespaceURI}catch(e){}var Z=document.implementation.createDocument(null,null,null),ee=new XMLSerializer;function te(e,t){var r=function e(t,r){if("string"==typeof t||"number"==typeof t||"boolean"==typeof t){var n=Z.createElement(r);return n.textContent=t.toString(),[n]}if(Array.isArray(t)){for(var o=[],i=0,a=t;i<a.length;i++)for(var s=a[i],u=0,l=e(s,r);u<l.length;u++){var c=l[u];o.push(c)}return o}if("object"==typeof t){for(var n=Z.createElement(r),f=0,h=Object.keys(t);f<h.length;f++){var p=h[f];if("$"===p)for(var d=0,y=re(t[p]);d<y.length;d++){var m=y[d];n.attributes.setNamedItem(m)}else for(var v=0,g=e(t[p],p);v<g.length;v++){var c=g[v];n.appendChild(c)}}return[n]}throw new Error("Illegal value passed to buildObject: "+t)}(e,t&&t.rootName||"root")[0];return'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'+ee.serializeToString(r)}function re(e){for(var t=[],r=0,n=Object.keys(e);r<n.length;r++){var o=n[r],i=Z.createAttribute(o);i.value=e[o].toString(),t.push(i)}return t}var ne=function(){function e(e,t){this._nextPolicy=e,this._options=t}return e.prototype.shouldLog=function(e){return this._options.shouldLog(e)},e.prototype.log=function(e,t){this._options.log(e,t)},e}(),oe=function(){function t(e){this._logger=e}return t.prototype.shouldLog=function(t){return!!this._logger&&t!==e.HttpPipelineLogLevel.OFF&&t<=this._logger.minimumLogLevel},t.prototype.log=function(e,t){this._logger&&this.shouldLog(e)&&this._logger.log(e,t)},t}();function ie(e){return{create:function(t,r){return new ue(t,e,r)}}}var ae=["application/json","text/json"],se=["application/xml","application/atom+xml"],ue=function(e){function t(t,r,n){var o=e.call(this,t,n)||this;return o.jsonContentTypes=r&&r.json||ae,o.xmlContentTypes=r&&r.xml||se,o}return D(t,e),t.prototype.sendRequest=function(e){return I(this,void 0,void 0,function(){var t=this;return j(this,function(r){return[2,this._nextPolicy.sendRequest(e).then(function(e){return le(t.jsonContentTypes,t.xmlContentTypes,e)})]})})},t}(ne);function le(e,t,r){return function(e,t,r){var n=function(e){var t='Error "'+e+'" occurred while parsing the response body - '+r.bodyAsText+".",n=e.code||F.PARSE_ERROR,o=new F(t,n,r.status,r.request,r,r.bodyAsText);return Promise.reject(o)};if(!r.request.streamResponseBody&&r.bodyAsText){var o=r.bodyAsText,i=r.headers.get("Content-Type")||"",a=i?i.split(";").map(function(e){return e.toLowerCase()}):[];if(0===a.length||a.some(function(t){return-1!==e.indexOf(t)}))return new Promise(function(e){r.parsedBody=JSON.parse(o),e(r)}).catch(n);if(a.some(function(e){return-1!==t.indexOf(e)}))return J(o).then(function(e){return r.parsedBody=e,r}).catch(n)}return Promise.resolve(r)}(e,t,r).then(function(e){if(function(e){var t=e.request.shouldDeserialize;return void 0===t||("boolean"==typeof t?t:t(e))}(e)){var t=e.request.operationSpec;if(t&&t.responses){var n=e.status,o=Object.keys(t.responses),i=0===o.length||1===o.length&&"default"===o[0],a=function(e){var t,r=e.request,n=r.operationSpec;if(n){var o=r.operationResponseGetter;t=o?o(n,e):n.responses[e.status]}return t}(e);if(i?200<=n&&n<300:!!a){if(a){if(a.bodyMapper){d=e.parsedBody;t.isXML&&a.bodyMapper.type.name===N.Sequence&&(d="object"==typeof d?d[a.bodyMapper.xmlElementName]:[]);try{e.parsedBody=t.serializer.deserialize(a.bodyMapper,d,"operationRes.parsedBody")}catch(c){var s=new F("Error "+c+" occurred in deserializing the responseBody - "+e.bodyAsText);return s.request=m(e.request),s.response=y(e),Promise.reject(s)}}else"HEAD"===t.httpMethod&&(e.parsedBody=r.status>=200&&r.status<300);a.headersMapper&&(e.parsedHeaders=t.serializer.deserialize(a.headersMapper,e.headers.rawHeaders(),"operationRes.parsedHeaders"))}}else{var u=t.responses.default;if(u){var l=W(t)?"Unexpected status code: "+n:e.bodyAsText,c=new F(l);c.statusCode=n,c.request=m(e.request),c.response=y(e);var f=e.parsedBody;try{if(f){var h=u.bodyMapper;if(h&&"CloudError"===h.serializedName)f.error&&(f=f.error),f.code&&(c.code=f.code),f.message&&(c.message=f.message);else{var p=f;f.error&&(p=f.error),c.code=p.code,p.message&&(c.message=p.message)}if(h){var d=f;t.isXML&&h.type.name===N.Sequence&&(d="object"==typeof f?f[h.xmlElementName]:[]),c.body=t.serializer.deserialize(h,d,"error.body")}}}catch(t){c.message='Error "'+t.message+'" occurred in deserializing the responseBody - "'+e.bodyAsText+'" for the default response.'}return Promise.reject(c)}}}}return Promise.resolve(e)})}function ce(e,t,r,n){return{create:function(o,i){return new ye(o,i,e,t,r,n)}}}var fe=3e4,he=3,pe=9e4,de=3e3,ye=function(e){function t(t,r,n,o,i,a){var s=e.call(this,t,r)||this;function u(e){return"number"==typeof e}return s.retryCount=u(n)?n:he,s.retryInterval=u(o)?o:fe,s.minRetryInterval=u(i)?i:de,s.maxRetryInterval=u(a)?a:pe,s}return D(t,e),t.prototype.sendRequest=function(e){var t=this;return this._nextPolicy.sendRequest(e.clone()).then(function(r){return me(t,e,r)}).catch(function(r){return me(t,e,r.response,void 0,r)})},t}(ne);function me(e,t,r,n,o){n=function(e,t,r){t||(t={retryCount:0,retryInterval:0}),r&&(t.error&&(r.innerError=t.error),t.error=r),t.retryCount++;var n=Math.pow(2,t.retryCount)-1;return n*=.8*e.retryInterval+Math.floor(Math.random()*(1.2*e.retryInterval-.8*e.retryInterval)),t.retryInterval=Math.min(e.minRetryInterval+n,e.maxRetryInterval),t}(e,n,o);var i=t.abortSignal&&t.abortSignal.aborted;if(!i&&function(e,t,r){if(null==t||t<500&&408!==t||501===t||505===t)return!1;if(!r)throw new Error("retryData for the ExponentialRetryPolicyFilter cannot be null.");return(r&&r.retryCount)<e.retryCount}(e,r&&r.status,n))return b(n.retryInterval).then(function(){return e._nextPolicy.sendRequest(t.clone())}).then(function(r){return me(e,t,r,n,void 0)}).catch(function(o){return me(e,t,r,n,o)});if(i||o||!r){var a=n.error||new F("Failed to send the request.",F.REQUEST_SEND_ERROR,r&&r.status,r&&r.request,r);return Promise.reject(a)}return Promise.resolve(r)}function ve(e){return void 0===e&&(e="x-ms-client-request-id"),{create:function(t,r){return new ge(t,r,e)}}}var ge=function(e){function t(t,r,n){var o=e.call(this,t,r)||this;return o._requestIdHeaderName=n,o}return D(t,e),t.prototype.sendRequest=function(e){return e.headers.contains(this._requestIdHeaderName)||e.headers.set(this._requestIdHeaderName,g()),this._nextPolicy.sendRequest(e)},t}(ne);function be(){return"x-ms-command-name"}var we=be;function Ee(){var e,t,r,n,o=[{key:"ms-rest-js",value:p.msRestVersion}],i=[{key:"OS",value:((e=window.navigator).oscpu||e.platform).replace(" ","")}];return t=o.concat(i),void 0===r&&(r=" "),void 0===n&&(n="/"),t.map(function(e){var t=e.value?""+n+e.value:"";return""+e.key+t}).join(r)}function Re(e){var t=e&&null!=e.key?e.key:"x-ms-command-name",r=e&&null!=e.value?e.value:Ee();return{create:function(e,n){return new Te(e,n,t,r)}}}var Te=function(e){function t(t,r,n,o){var i=e.call(this,t,r)||this;return i._nextPolicy=t,i._options=r,i.headerKey=n,i.headerValue=o,i}return D(t,e),t.prototype.sendRequest=function(e){return this.addUserAgentHeader(e),this._nextPolicy.sendRequest(e)},t.prototype.addUserAgentHeader=function(e){e.headers||(e.headers=new n),!e.headers.get(this.headerKey)&&this.headerValue&&e.headers.set(this.headerKey,this.headerValue)},t}(ne),_e=function(){function e(){this._rawQuery={}}return e.prototype.any=function(){return Object.keys(this._rawQuery).length>0},e.prototype.set=function(e,t){if(e)if(null!=t){var r=Array.isArray(t)?t:t.toString();this._rawQuery[e]=r}else delete this._rawQuery[e]},e.prototype.get=function(e){return e?this._rawQuery[e]:void 0},e.prototype.toString=function(){var e="";for(var t in this._rawQuery){e&&(e+="&");var r=this._rawQuery[t];if(Array.isArray(r)){for(var n=[],o=0,i=r;o<i.length;o++){var a=i[o];n.push(t+"="+a)}e+=n.join("&")}else e+=t+"="+r}return e},e.parse=function(t){var r=new e;if(t){t.startsWith("?")&&(t=t.substring(1));for(var n="ParameterName",o="",i="",a=0;a<t.length;++a){var s=t[a];switch(n){case"ParameterName":switch(s){case"=":n="ParameterValue";break;case"&":o="",i="";break;default:o+=s}break;case"ParameterValue":switch(s){case"=":o="",i="",n="Invalid";break;case"&":r.set(o,i),o="",i="",n="ParameterName";break;default:i+=s}break;case"Invalid":"&"===s&&(n="ParameterName");break;default:throw new Error("Unrecognized URLQuery parse state: "+n)}}"ParameterValue"===n&&r.set(o,i)}return r},e}(),Pe=function(){function e(){}return e.prototype.setScheme=function(e){e?this.set(e,"SCHEME"):this._scheme=void 0},e.prototype.getScheme=function(){return this._scheme},e.prototype.setHost=function(e){e?this.set(e,"SCHEME_OR_HOST"):this._host=void 0},e.prototype.getHost=function(){return this._host},e.prototype.setPort=function(e){null==e||""===e?this._port=void 0:this.set(e.toString(),"PORT")},e.prototype.getPort=function(){return this._port},e.prototype.setPath=function(e){e?-1!==e.indexOf("://")?this.set(e,"SCHEME"):this.set(e,"PATH"):this._path=void 0},e.prototype.appendPath=function(e){if(e){var t=this.getPath();t&&(t.endsWith("/")||(t+="/"),e.startsWith("/")&&(e=e.substring(1)),e=t+e),this.set(e,"PATH")}},e.prototype.getPath=function(){return this._path},e.prototype.setQuery=function(e){this._query=e?_e.parse(e):void 0},e.prototype.setQueryParameter=function(e,t){e&&(this._query||(this._query=new _e),this._query.set(e,t))},e.prototype.getQueryParameterValue=function(e){return this._query?this._query.get(e):void 0},e.prototype.getQuery=function(){return this._query?this._query.toString():void 0},e.prototype.set=function(e,t){for(var r=new Oe(e,t);r.next();){var n=r.current();if(n)switch(n.type){case"SCHEME":this._scheme=n.text||void 0;break;case"HOST":this._host=n.text||void 0;break;case"PORT":this._port=n.text||void 0;break;case"PATH":var o=n.text||void 0;this._path&&"/"!==this._path&&"/"===o||(this._path=o);break;case"QUERY":this._query=_e.parse(n.text);break;default:throw new Error("Unrecognized URLTokenType: "+n.type)}}},e.prototype.toString=function(){var e="";return this._scheme&&(e+=this._scheme+"://"),this._host&&(e+=this._host),this._port&&(e+=":"+this._port),this._path&&(this._path.startsWith("/")||(e+="/"),e+=this._path),this._query&&this._query.any()&&(e+="?"+this._query.toString()),e},e.prototype.replaceAll=function(e,t){e&&(this.setScheme(R(this.getScheme(),e,t)),this.setHost(R(this.getHost(),e,t)),this.setPort(R(this.getPort(),e,t)),this.setPath(R(this.getPath(),e,t)),this.setQuery(R(this.getQuery(),e,t)))},e.parse=function(t){var r=new e;return r.set(t,"SCHEME_OR_HOST"),r},e}(),Se=function(){function e(e,t){this.text=e,this.type=t}return e.scheme=function(t){return new e(t,"SCHEME")},e.host=function(t){return new e(t,"HOST")},e.port=function(t){return new e(t,"PORT")},e.path=function(t){return new e(t,"PATH")},e.query=function(t){return new e(t,"QUERY")},e}();var Oe=function(){function e(e,t){this._text=e,this._textLength=e?e.length:0,this._currentState=null!=t?t:"SCHEME_OR_HOST",this._currentIndex=0}return e.prototype.current=function(){return this._currentToken},e.prototype.next=function(){if(xe(this))switch(this._currentState){case"SCHEME":t=function(e){return Ce(e,function(e){return function(e){var t=e.charCodeAt(0);return 48<=t&&t<=57||65<=t&&t<=90||97<=t&&t<=122}(e)})}(e=this),e._currentToken=Se.scheme(t),xe(e)?e._currentState="HOST":e._currentState="DONE";break;case"SCHEME_OR_HOST":!function(e){var t=De(e,":","/","?");xe(e)?":"===Ae(e)?"://"===qe(e,3)?(e._currentToken=Se.scheme(t),e._currentState="HOST"):(e._currentToken=Se.host(t),e._currentState="PORT"):(e._currentToken=Se.host(t),"/"===Ae(e)?e._currentState="PATH":e._currentState="QUERY"):(e._currentToken=Se.host(t),e._currentState="DONE")}(this);break;case"HOST":!function(e){"://"===qe(e,3)&&Ne(e,3);var t=De(e,":","/","?");e._currentToken=Se.host(t),xe(e)?":"===Ae(e)?e._currentState="PORT":"/"===Ae(e)?e._currentState="PATH":e._currentState="QUERY":e._currentState="DONE"}(this);break;case"PORT":!function(e){":"===Ae(e)&&Ne(e);var t=De(e,"/","?");e._currentToken=Se.port(t),xe(e)?"/"===Ae(e)?e._currentState="PATH":e._currentState="QUERY":e._currentState="DONE"}(this);break;case"PATH":!function(e){var t=De(e,"?");e._currentToken=Se.path(t),xe(e)?e._currentState="QUERY":e._currentState="DONE"}(this);break;case"QUERY":!function(e){"?"===Ae(e)&&Ne(e);var t=function(e){var t="";e._currentIndex<e._textLength&&(t=e._text.substring(e._currentIndex),e._currentIndex=e._textLength);return t}(e);e._currentToken=Se.query(t),e._currentState="DONE"}(this);break;default:throw new Error("Unrecognized URLTokenizerState: "+this._currentState)}else this._currentToken=void 0;var e,t;return!!this._currentToken},e}();function xe(e){return e._currentIndex<e._textLength}function Ae(e){return e._text[e._currentIndex]}function Ne(e,t){xe(e)&&(t||(t=1),e._currentIndex+=t)}function qe(e,t){var r=e._currentIndex+t;return e._textLength<r&&(r=e._textLength),e._text.substring(e._currentIndex,r)}function Ce(e,t){for(var r="";xe(e);){var n=Ae(e);if(!t(n))break;r+=n,Ne(e)}return r}function De(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return Ce(e,function(e){return-1===t.indexOf(e)})}function Ue(e){return void 0===e&&(e=20),{create:function(t,r){return new Ie(t,r,e)}}}var Ie=function(e){function t(t,r,n){void 0===n&&(n=20);var o=e.call(this,t,r)||this;return o.maxRetries=n,o}return D(t,e),t.prototype.sendRequest=function(e){var t=this;return this._nextPolicy.sendRequest(e).then(function(e){return function e(t,r,n){var o=r.request,i=r.status;var a=r.headers.get("location");if(a&&(300===i||307===i||303===i&&"POST"===o.method)&&(!t.maxRetries||n<t.maxRetries)){var s=Pe.parse(o.url);return s.setPath(a),o.url=s.toString(),303===i&&(o.method="GET"),t._nextPolicy.sendRequest(o).then(function(r){return e(t,r,n+1)})}return Promise.resolve(r)}(t,e,0)})},t}(ne);var je=function(e){function t(t,r,n){void 0===n&&(n=30);var o=e.call(this,t,r)||this;return o._retryTimeout=n,o}return D(t,e),t.prototype.sendRequest=function(e){var t=this;return this._nextPolicy.sendRequest(e.clone()).then(function(r){return function(e,t,r){if(409===r.status){var n=function(e){var t,r;if(e){try{r=JSON.parse(e)}catch(e){}if(r&&r.error&&r.error.message&&r.error.code&&"MissingSubscriptionRegistration"===r.error.code){var n=r.error.message.match(/.*'(.*)'/i);n&&(t=n.pop())}}return t}(r.bodyAsText);if(n){var o=function(e){var t,r=e.match(/.*\/subscriptions\/[a-f0-9-]+\//gi);if(!r||!r[0])throw new Error("Unable to extract subscriptionId from the given url - "+e+".");t=r[0];return t}(t.url);return function(e,t,r,n){var o=t+"providers/"+r+"/register?api-version=2016-02-01",i=t+"providers/"+r+"?api-version=2016-02-01",a=Be(n);return a.method="POST",a.url=o,e._nextPolicy.sendRequest(a).then(function(t){if(200!==t.status)throw new Error("Autoregistration of "+r+" failed. Please try registering manually.");return function e(t,r,n){var o=Be(n);return o.url=r,o.method="GET",t._nextPolicy.sendRequest(o).then(function(o){var i=o.parsedBody;return!(!o.parsedBody||!i.registrationState||"Registered"!==i.registrationState)||b(1e3*t._retryTimeout).then(function(){return e(t,r,n)})})}(e,i,n)})}(e,o,n,t).catch(function(){return!1}).then(function(n){return n?(t.headers.set("x-ms-client-request-id",g()),e._nextPolicy.sendRequest(t.clone())):r})}}return Promise.resolve(r)}(t,e,r)})},t}(ne);function Be(e,t){void 0===t&&(t=!1);var r=e.clone();return t&&(r.url=e.url),r.headers.set("x-ms-client-request-id",g()),r.headers.set("Content-Type","application/json; charset=utf-8"),r}function He(e){return{create:function(t,r){return new Me(t,r,e)}}}var Me=function(e){function t(t,r,n){var o=e.call(this,t,r)||this;return o.authenticationProvider=n,o}return D(t,e),t.prototype.signRequest=function(e){return this.authenticationProvider.signRequest(e)},t.prototype.sendRequest=function(e){var t=this;return this.signRequest(e).then(function(e){return t._nextPolicy.sendRequest(e)})},t}(ne);function ze(e,t,r,n){return{create:function(o,i){return new Le(o,i,e,t,r,n)}}}var ke,Le=function(e){function t(t,r,n,o,i,a){var s=e.call(this,t,r)||this;return s.DEFAULT_CLIENT_RETRY_INTERVAL=3e4,s.DEFAULT_CLIENT_RETRY_COUNT=3,s.DEFAULT_CLIENT_MAX_RETRY_INTERVAL=9e4,s.DEFAULT_CLIENT_MIN_RETRY_INTERVAL=3e3,s.retryCount="number"==typeof n?n:s.DEFAULT_CLIENT_RETRY_COUNT,s.retryInterval="number"==typeof o?o:s.DEFAULT_CLIENT_RETRY_INTERVAL,s.minRetryInterval="number"==typeof i?i:s.DEFAULT_CLIENT_MIN_RETRY_INTERVAL,s.maxRetryInterval="number"==typeof a?a:s.DEFAULT_CLIENT_MAX_RETRY_INTERVAL,s}return D(t,e),t.prototype.sendRequest=function(e){var t=this;return this._nextPolicy.sendRequest(e.clone()).then(function(r){return function e(t,r,n,o,i){o=function(e,t,r){t||(t={retryCount:0,retryInterval:0});r&&(t.error&&(r.innerError=t.error),t.error=r);t.retryCount++;var n=Math.pow(2,t.retryCount)-1,o=.8*e.retryInterval+Math.floor(Math.random()*(1.2*e.retryInterval-.8*e.retryInterval));return n*=o,t.retryInterval=Math.min(e.minRetryInterval+n,e.maxRetryInterval),t}(t,o,i);return i&&i.code&&function(e,t){var r;if(!t)throw new Error("retryData for the SystemErrorRetryPolicyFilter cannot be null.");r=t&&t.retryCount;return r<e.retryCount}(t,o)&&("ETIMEDOUT"===i.code||"ESOCKETTIMEDOUT"===i.code||"ECONNREFUSED"===i.code||"ECONNRESET"===i.code||"ENOENT"===i.code)?b(o.retryInterval).then(function(){return t._nextPolicy.sendRequest(r.clone())}).then(function(n){return e(t,r,n,o,i)}).catch(function(i){return e(t,r,n,o,i)}):null!=i?(i=o.error,Promise.reject(i)):Promise.resolve(n)}(t,e,r)})},t}(ne);(ke=e.QueryCollectionFormat||(e.QueryCollectionFormat={})).Csv=",",ke.Ssv=" ",ke.Tsv="\t",ke.Pipes="|",ke.Multi="Multi";var Fe=new Error("ProxyPolicy is not supported in browser environment");function $e(e){}function Qe(e){return{create:function(e,t){throw Fe}}}!function(e){function t(t,r){e.call(this,t,r);throw Fe}D(t,e),t.prototype.sendRequest=function(e){throw Fe}}(ne);var Ve=p.HttpConstants.StatusCodes;function Ye(){return{create:function(e,t){return new Ge(e,t)}}}var Ge=function(e){function t(t,r,n){var o=e.call(this,t,r)||this;return o._handleResponse=n||o._defaultResponseHandler,o}return D(t,e),t.prototype.sendRequest=function(e){return I(this,void 0,void 0,function(){var t=this;return j(this,function(r){return[2,this._nextPolicy.sendRequest(e.clone()).then(function(r){return r.status!==Ve.TooManyRequests?r:t._handleResponse(e,r)})]})})},t.prototype._defaultResponseHandler=function(e,r){return I(this,void 0,void 0,function(){var n,o,i=this;return j(this,function(a){return(n=r.headers.get(p.HeaderConstants.RETRY_AFTER))&&(o=t.parseRetryAfterHeader(n))?[2,b(o).then(function(t){return i._nextPolicy.sendRequest(e)})]:[2,r]})})},t.parseRetryAfterHeader=function(e){var r=Number(e);return Number.isNaN(r)?t.parseDateRetryAfterHeader(e):1e3*r},t.parseDateRetryAfterHeader=function(e){try{var t=Date.now(),r=Date.parse(e)-t;return Number.isNaN(r)?void 0:r}catch(e){return}},t}(ne),We=function(){function t(e,t){if(t||(t={}),e&&!e.signRequest)throw new Error("credentials argument needs to implement signRequest method");var r;if(this._withCredentials=t.withCredentials||!1,this._httpClient=t.httpClient||new V,this._requestPolicyOptions=new oe(t.httpPipelineLogger),Array.isArray(t.requestPolicyFactories))r=t.requestPolicyFactories;else if(r=function(e,t){var r=[];t.generateClientRequestIdHeader&&r.push(ve(t.clientRequestIdHeaderName));e&&("function"==typeof e.create?r.push(e):r.push(He(e)));var n=Xe(t.userAgentHeaderName,we),o=Xe(t.userAgent,Ee);n&&o&&r.push(Re({key:n,value:o}));r.push(Ue()),r.push((i=t.rpRegistrationRetryTimeout,void 0===i&&(i=30),{create:function(e,t){return new je(e,t,i)}})),t.noRetryPolicy||(r.push(ce()),r.push(ze()),r.push(Ye()));var i;r.push(ie(t.deserializationContentTypes));var a=t.proxySettings||void 0;a&&r.push(Qe());return r}(e,t),t.requestPolicyFactories){var n=t.requestPolicyFactories(r);n&&(r=n)}this._requestPolicyFactories=r}return t.prototype.sendRequest=function(e){if(null==e||"object"!=typeof e)throw new Error("options cannot be null or undefined and it must be of type object.");var t;try{e instanceof q?(e.validateRequestProperties(),t=e):t=(t=new q).prepare(e)}catch(e){return Promise.reject(e)}var r=this._httpClient;if(this._requestPolicyFactories&&this._requestPolicyFactories.length>0)for(var n=this._requestPolicyFactories.length-1;n>=0;--n)r=this._requestPolicyFactories[n].create(r,this._requestPolicyOptions);return r.sendRequest(t)},t.prototype.sendOperationRequest=function(t,r,n){"function"==typeof t.options&&(n=t.options,t.options=void 0);var o,i=new q;try{var a=r.baseUrl||this.baseUri;if(!a)throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a baseUri string property that contains the base URL to use.");i.method=r.httpMethod,i.operationSpec=r;var s=Pe.parse(a);if(r.path&&s.appendPath(r.path),r.urlParameters&&r.urlParameters.length>0)for(var u=0,l=r.urlParameters;u<l.length;u++){var c=l[u],f=Je(this,t,c,r.serializer);f=r.serializer.serialize(c.mapper,f,Y(c)),c.skipEncoding||(f=encodeURIComponent(f)),s.replaceAll("{"+(c.mapper.serializedName||Y(c))+"}",f)}if(r.queryParameters&&r.queryParameters.length>0)for(var h=0,p=r.queryParameters;h<p.length;h++){var d=p[h],y=Je(this,t,d,r.serializer);if(null!=y){if(y=r.serializer.serialize(d.mapper,y,Y(d)),null!=d.collectionFormat)if(d.collectionFormat===e.QueryCollectionFormat.Multi)if(0===y.length)y="";else for(var m in y){var v=y[m];y[m]=null==v?"":v.toString()}else y=y.join(d.collectionFormat);if(!d.skipEncoding)if(Array.isArray(y))for(var m in y)y[m]=encodeURIComponent(y[m]);else y=encodeURIComponent(y);s.setQueryParameter(d.mapper.serializedName||Y(d),y)}}i.url=s.toString();var g=r.contentType||this.requestContentType;if(g&&i.headers.set("Content-Type",g),r.headerParameters)for(var b=0,w=r.headerParameters;b<w.length;b++){var E=w[b],R=Je(this,t,E,r.serializer);if(null!=R){R=r.serializer.serialize(E.mapper,R,Y(E));var T=E.mapper.headerCollectionPrefix;if(T)for(var _=0,P=Object.keys(R);_<P.length;_++){var S=P[_];i.headers.set(T+S,R[S])}else i.headers.set(E.mapper.serializedName||Y(E),R)}}var O=t.options;if(O){if(O.customHeaders)for(var x in O.customHeaders)i.headers.set(x,O.customHeaders[x]);O.abortSignal&&(i.abortSignal=O.abortSignal),O.timeout&&(i.timeout=O.timeout),O.onUploadProgress&&(i.onUploadProgress=O.onUploadProgress),O.onDownloadProgress&&(i.onDownloadProgress=O.onDownloadProgress)}i.withCredentials=this._withCredentials,function(e,t,r,n){if(n.requestBody&&n.requestBody.mapper){t.body=Je(e,r,n.requestBody,n.serializer);var o=n.requestBody.mapper,i=o.required,a=o.xmlName,s=o.xmlElementName,u=o.serializedName,l=o.type.name;try{if(null!=t.body||i){var c=Y(n.requestBody);t.body=n.serializer.serialize(o,t.body,c);var f=l===N.Stream;n.isXML?l===N.Sequence?t.body=te(function(e,t){var r;return Array.isArray(e)||(e=[e]),(r={})[t]=e,r}(t.body,s||a||u),{rootName:a||u}):f||(t.body=te(t.body,{rootName:a||u})):f||(t.body=JSON.stringify(t.body))}}catch(e){throw new Error('Error "'+e.message+'" occurred in serializing the payload - '+JSON.stringify(u,void 0," ")+".")}}else if(n.formDataParameters&&n.formDataParameters.length>0){t.formData={};for(var h=0,p=n.formDataParameters;h<p.length;h++){var d=p[h],y=Je(e,r,d,n.serializer);if(null!=y){var m=d.mapper.serializedName||Y(d);t.formData[m]=n.serializer.serialize(d.mapper,y,Y(d))}}}}(this,i,t,r),null==i.streamResponseBody&&(i.streamResponseBody=W(r)),o=this.sendRequest(i).then(function(e){return Ze(e,r.responses[e.status])})}catch(e){o=Promise.reject(e)}var A=n;return A&&o.then(function(e){return A(null,e._response.parsedBody,e._response.request,e._response)}).catch(function(e){return A(e)}),o},t}();function Xe(e,t){var r;return"string"==typeof e?r=e:(r=t(),"function"==typeof e&&(r=e(r))),r}function Je(e,t,r,n){return function e(t,r,n,o,i){var a;"string"==typeof n&&(n=[n]);if(Array.isArray(n)){if(n.length>0){if(o.isConstant)a=o.defaultValue;else{var s=Ke(r,n);s.propertyFound||(s=Ke(t,n));var u=!1;s.propertyFound||(u=o.required||"options"===n[0]&&2===n.length),a=u?o.defaultValue:s.propertyValue}var l=G(n,o);i.serialize(o,a,l)}}else for(var c in o.required&&(a={}),n){var f=o.type.modelProperties[c],h=n[c],p=e(t,r,h,f,i),d=G(h,f);i.serialize(f,p,d),void 0!==p&&(a||(a={}),a[c]=p)}return a}(e,t,r.parameterPath,r.mapper,n)}function Ke(e,t){for(var r={propertyFound:!1},n=0;n<t.length;++n){var o=t[n];if(!(null!=e&&o in e))break;e=e[o]}return n===t.length&&(r.propertyValue=e,r.propertyFound=!0),r}function Ze(e,t){var r=e.parsedHeaders,n=t&&t.bodyMapper,o=function(t){return Object.defineProperty(t,"_response",{value:e})};if(n){var i=n.type.name;if("Stream"===i)return o(U({},r,{blobBody:e.blobBody,readableStreamBody:e.readableStreamBody}));var a="Composite"===i&&n.type.modelProperties||{},s=Object.keys(a).some(function(e){return""===a[e].serializedName});if("Sequence"===i||s){for(var u=(e.parsedBody||[]).slice(),l=0,c=Object.keys(a);l<c.length;l++){var f=c[l];a[f].serializedName&&(u[f]=e.parsedBody[f])}if(r)for(var h=0,p=Object.keys(r);h<p.length;h++){u[f=p[h]]=r[f]}return o(u),u}if("Composite"===i||"Dictionary"===i)return o(U({},r,e.parsedBody))}return n||"HEAD"===e.request.method?o(U({},r,{body:e.parsedBody})):o(U({},r,e.parsedBody))}var et=function(e){function t(t,r,n){void 0===n&&(n=console.log);var o=e.call(this,t,r)||this;return o.logger=n,o}return D(t,e),t.prototype.sendRequest=function(e){var t=this;return this._nextPolicy.sendRequest(e).then(function(e){return function(e,t){e.logger(">> Request: "+JSON.stringify(t.request,void 0,2)),e.logger(">> Response status code: "+t.status);var r=t.bodyAsText;return e.logger(">> Body: "+r),Promise.resolve(t)}(t,e)})},t}(ne);var tt=p.HeaderConstants,rt="Bearer",nt=function(){function e(e,t){if(void 0===t&&(t=rt),this.authorizationScheme=rt,!e)throw new Error("token cannot be null or undefined.");this.token=e,this.authorizationScheme=t}return e.prototype.signRequest=function(e){return e.headers||(e.headers=new n),e.headers.set(tt.AUTHORIZATION,this.authorizationScheme+" "+this.token),Promise.resolve(e)},e}(),ot=p.HeaderConstants,it="Basic",at=function(){function e(e,t,r){if(void 0===r&&(r=it),this.authorizationScheme=it,null==e||"string"!=typeof e.valueOf())throw new Error("userName cannot be null or undefined and must be of type string.");if(null==t||"string"!=typeof t.valueOf())throw new Error("password cannot be null or undefined and must be of type string.");this.userName=e,this.password=t,this.authorizationScheme=r}return e.prototype.signRequest=function(e){var t=this.userName+":"+this.password,r=this.authorizationScheme+" "+btoa(t);return e.headers||(e.headers=new n),e.headers.set(ot.AUTHORIZATION,r),Promise.resolve(e)},e}(),st=function(){function e(e){if(!e||e&&!e.inHeader&&!e.inQuery)throw new Error('options cannot be null or undefined. Either "inHeader" or "inQuery" property of the options object needs to be provided.');this.inHeader=e.inHeader,this.inQuery=e.inQuery}return e.prototype.signRequest=function(e){if(!e)return Promise.reject(new Error('webResource cannot be null or undefined and must be of type "object".'));if(this.inHeader)for(var t in e.headers||(e.headers=new n),this.inHeader)e.headers.set(t,this.inHeader[t]);if(this.inQuery){if(!e.url)return Promise.reject(new Error("url cannot be null in the request object."));for(var r in e.url.indexOf("?")<0&&(e.url+="?"),this.inQuery)e.url.endsWith("?")||(e.url+="&"),e.url+=r+"="+this.inQuery[r]}return Promise.resolve(e)},e}(),ut=function(e){function t(t){if(!t||t&&"string"!=typeof t)throw new Error("topicKey cannot be null or undefined and must be of type string.");var r={inHeader:{"aeg-sas-key":t}};return e.call(this,r)||this}return D(t,e),t}(st);e.WebResource=q,e.DefaultHttpClient=V,e.HttpHeaders=n,e.RestError=F,e.ServiceClient=We,e.flattenResponse=Ze,e.Constants=p,e.logPolicy=function(e){return void 0===e&&(e=console.log),{create:function(t,r){return new et(t,r,e)}}},e.BaseRequestPolicy=ne,e.RequestPolicyOptions=oe,e.generateClientRequestIdPolicy=ve,e.exponentialRetryPolicy=ce,e.systemErrorRetryPolicy=ze,e.throttlingRetryPolicy=Ye,e.getDefaultProxySettings=$e,e.proxyPolicy=Qe,e.redirectPolicy=Ue,e.signingPolicy=He,e.userAgentPolicy=Re,e.getDefaultUserAgentValue=Ee,e.deserializationPolicy=ie,e.deserializeResponseBody=le,e.MapperType=N,e.Serializer=T,e.serializeObject=function e(t){if(null!=t){if(t instanceof Uint8Array)return t=o(t);if(t instanceof Date)return t.toISOString();if(Array.isArray(t)){for(var r=[],n=0;n<t.length;n++)r.push(e(t[n]));return r}if("object"==typeof t){var i={};for(var a in t)i[a]=e(t[a]);return i}return t}},e.stripRequest=m,e.stripResponse=y,e.delay=b,e.executePromisesSequentially=function(e,t){var r=Promise.resolve(t);return e.forEach(function(e){r=r.then(e)}),r},e.generateUuid=g,e.encodeUri=function(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/"/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")},e.promiseToCallback=function(e){if("function"!=typeof e.then)throw new Error("The provided input is not a Promise.");return function(t){e.then(function(e){t(void 0,e)},function(e){t(e)})}},e.promiseToServiceCallback=function(e){if("function"!=typeof e.then)throw new Error("The provided input is not a Promise.");return function(t){e.then(function(e){process.nextTick(t,void 0,e.parsedBody,e.request,e)},function(e){process.nextTick(t,e)})}},e.isValidUuid=v,e.applyMixins=function(e,t){t.forEach(function(t){Object.getOwnPropertyNames(t.prototype).forEach(function(r){e.prototype[r]=t.prototype[r]})})},e.isNode=d,e.isDuration=E,e.URLBuilder=Pe,e.URLQuery=_e,e.TokenCredentials=nt,e.BasicAuthenticationCredentials=at,e.ApiKeyCredentials=st,e.TopicCredentials=ut,Object.defineProperty(e,"__esModule",{value:!0})});

@@ -1,2 +0,2 @@

export { XhrHttpClient as DefaultHttpClient } from "./xhrHttpClient";
export { BrowserFetchHttpClient as DefaultHttpClient } from "./browserFetchHttpClient";
//# sourceMappingURL=defaultHttpClient.browser.d.ts.map
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
export { XhrHttpClient as DefaultHttpClient } from "./xhrHttpClient";
export { BrowserFetchHttpClient as DefaultHttpClient } from "./browserFetchHttpClient";
//# sourceMappingURL=defaultHttpClient.browser.js.map

@@ -1,2 +0,2 @@

export { AxiosHttpClient as DefaultHttpClient } from "./axiosHttpClient";
export { NodeFetchHttpClient as DefaultHttpClient } from "./nodeFetchHttpClient";
//# sourceMappingURL=defaultHttpClient.d.ts.map
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
export { AxiosHttpClient as DefaultHttpClient } from "./axiosHttpClient";
export { NodeFetchHttpClient as DefaultHttpClient } from "./nodeFetchHttpClient";
//# sourceMappingURL=defaultHttpClient.js.map

@@ -25,4 +25,6 @@ /// <reference types="node" />

readonly aborted: boolean;
addEventListener(type: "abort", listener: (this: AbortSignalLike, ev: any) => any, options?: any): void;
removeEventListener(type: "abort", listener: (this: AbortSignalLike, ev: any) => any, options?: any): void;
dispatchEvent(event: Event): boolean;
onabort: ((this: AbortSignalLike, ev: Event) => any) | null;
addEventListener(type: "abort", listener: (this: AbortSignalLike, ev: Event) => any, options?: any): void;
removeEventListener(type: "abort", listener: (this: AbortSignalLike, ev: Event) => any, options?: any): void;
}

@@ -29,0 +31,0 @@ /**

@@ -9,3 +9,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

import { HttpClient } from "./httpClient";
import { HttpHeaders } from "./httpHeaders";
import { HttpHeaders, RawHttpHeaders } from "./httpHeaders";
import { HttpOperationResponse } from "./httpOperationResponse";

@@ -94,3 +94,3 @@ import { RestError } from "./restError";

const rawHeaders: { [headerName: string]: string } = httpRequest.headers.rawHeaders();
const rawHeaders: RawHttpHeaders = httpRequest.headers.rawHeaders();

@@ -97,0 +97,0 @@ const httpRequestBody: HttpRequestBody = httpRequest.body;

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
export { XhrHttpClient as DefaultHttpClient } from "./xhrHttpClient";
export { BrowserFetchHttpClient as DefaultHttpClient } from "./browserFetchHttpClient";
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
export { AxiosHttpClient as DefaultHttpClient } from "./axiosHttpClient";
export { NodeFetchHttpClient as DefaultHttpClient } from "./nodeFetchHttpClient";

@@ -31,4 +31,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

readonly aborted: boolean;
addEventListener(type: "abort", listener: (this: AbortSignalLike, ev: any) => any, options?: any): void;
removeEventListener(type: "abort", listener: (this: AbortSignalLike, ev: any) => any, options?: any): void;
dispatchEvent(event: Event): boolean;
onabort: ((this: AbortSignalLike, ev: Event) => any) | null;
addEventListener(type: "abort", listener: (this: AbortSignalLike, ev: Event) => any, options?: any): void;
removeEventListener(type: "abort", listener: (this: AbortSignalLike, ev: Event) => any, options?: any): void;
}

@@ -35,0 +37,0 @@

@@ -8,3 +8,3 @@ {

},
"version": "1.8.7",
"version": "1.9.0-alpha.2",
"description": "Isomorphic client Runtime for Typescript/node.js/browser javascript client libraries generated using AutoRest",

@@ -52,3 +52,6 @@ "tags": [

"dependencies": {
"@types/tunnel": "0.0.0",
"abort-controller": "^3.0.0",
"axios": "^0.18.0",
"cross-fetch": "^3.0.2",
"form-data": "^2.3.2",

@@ -58,3 +61,2 @@ "tough-cookie": "^2.4.3",

"tunnel": "0.0.6",
"@types/tunnel": "0.0.0",
"uuid": "^3.2.1",

@@ -68,2 +70,3 @@ "xml2js": "^0.4.19"

"@types/express": "^4.16.0",
"@types/fetch-mock": "^7.2.5",
"@types/form-data": "^2.2.1",

@@ -85,2 +88,3 @@ "@types/glob": "^7.1.1",

"express": "^4.16.3",
"fetch-mock": "^7.3.3",
"glob": "^7.1.2",

@@ -90,2 +94,3 @@ "karma": "^4.1.0",

"karma-chrome-launcher": "^2.2.0",
"karma-firefox-launcher": "^1.1.0",
"karma-mocha": "^1.3.0",

@@ -115,2 +120,3 @@ "karma-rollup-preprocessor": "^6.1.1",

"sinon": "^7.1.1",
"terser": "^3.17.0",
"ts-loader": "^5.3.1",

@@ -121,3 +127,2 @@ "ts-node": "^7.0.0",

"typescript": "^3.4.5",
"uglify-js": "^3.4.9",
"webpack": "^4.27.1",

@@ -143,3 +148,3 @@ "webpack-cli": "^3.1.2",

"build:rollup": "rollup -c rollup.config.ts",
"build:minify-browser": "uglifyjs -c -m --comments --source-map \"content='./dist/msRest.browser.js.map'\" -o ./dist/msRest.browser.min.js ./dist/msRest.browser.js",
"build:minify-browser": "terser -c -m --comments --source-map \"content='./dist/msRest.browser.js.map'\" -o ./dist/msRest.browser.min.js ./dist/msRest.browser.js",
"build:test-browser": "webpack --config webpack.testconfig.ts",

@@ -151,2 +156,3 @@ "test": "run-p test:tslint test:unit test:karma",

"test:karma:debug": "npm run build:test-browser && node ./node_modules/karma/bin/karma start karma.conf.ts --log-level debug --browsers ChromeDebugging --debug --auto-watch",
"test:karma:debugff": "npm run build:test-browser && node ./node_modules/karma/bin/karma start karma.conf.ts --log-level debug --browsers FirefoxDebugging --debug --auto-watch",
"dep:autorest.typescript": "npx ts-node .scripts/testDependentProjects.ts autorest.typescript 'gulp build' 'gulp regenerate' 'npm run local'",

@@ -153,0 +159,0 @@ "dep:ms-rest-azure-js": "npx ts-node .scripts/testDependentProjects.ts ms-rest-azure-js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc