@redocly/reference-docs 2.7.5 → 2.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli/commands/redocly-docs-cli.min.js +19 -19
- package/dist/console.redocly-reference-docs.min.js +1 -1
- package/dist/oauth2-redirect.js +1 -1
- package/dist/redocly-reference-docs.min.js +4 -4
- package/lib/services/ProMenu.js +1 -1
- package/lib-esm/services/ProMenu.js +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Redocly Reference Docs
|
|
3
3
|
* (c) Copyright 2018 Redocly LLC, all rights reserved.
|
|
4
4
|
* -------------------------------------------------------------
|
|
5
|
-
* Version: "2.7.
|
|
5
|
+
* Version: "2.7.6"
|
|
6
6
|
*/
|
|
7
7
|
(this.webpackJsonpRedoclyReferenceDocs=this.webpackJsonpRedoclyReferenceDocs||[]).push([[0],Array(571).concat([function(e,t,n){"use strict";n.r(t),n.d(t,"Console",(function(){return Ul}));var r={};n.r(r),n.d(r,"JsonPatchError",(function(){return ma})),n.d(r,"deepClone",(function(){return ya})),n.d(r,"getValueByPointer",(function(){return wa})),n.d(r,"applyOperation",(function(){return Ca})),n.d(r,"applyPatch",(function(){return Aa})),n.d(r,"applyReducer",(function(){return ka})),n.d(r,"validator",(function(){return Oa})),n.d(r,"validate",(function(){return Sa})),n.d(r,"_areEquals",(function(){return Ea}));var o={};n.r(o),n.d(o,"unobserve",(function(){return Pa})),n.d(o,"observe",(function(){return Ia})),n.d(o,"generate",(function(){return Fa})),n.d(o,"compare",(function(){return Na}));var i={};n.r(i),n.d(i,"path",(function(){return xl})),n.d(i,"query",(function(){return wl})),n.d(i,"header",(function(){return Al})),n.d(i,"cookie",(function(){return kl}));var a=n(1),s=n(0),l=n.n(s),c=n(599),u=n(9),f=n(18),p=n(180),d=n(4),h=n(149),v=n(3),g=Object(v.d)(A||(A=Object(a.f)(["\n border: none;\n outline: none;\n padding: 8px;\n border-radius: ",";\n background-color: ",";\n ","\n\n &::placeholder {\n opacity: 0.6;\n color: ",";\n }\n\n &:-webkit-autofill {\n background-color: ",";\n }\n"],["\n border: none;\n outline: none;\n padding: 8px;\n border-radius: ",";\n background-color: ",";\n ","\n\n &::placeholder {\n opacity: 0.6;\n color: ",";\n }\n\n &:-webkit-autofill {\n background-color: ",";\n }\n"])),(function(e){return e.theme.shape.borderRadius}),(function(e){return e.theme.rightPanel.panelControlsBackgroundColor}),(function(e){var t=e.theme;return Object(v.h)({color:t.colors.text.light,fontFamily:t.typography.code.fontFamily,fontSize:t.typography.fontSize})}),(function(e){return e.theme.colors.text.light}),(function(e){return e.theme.rightPanel.panelBackgroundColor})),m=v.e.div(k||(k=Object(a.f)(["\n display: ",";\n ","\n"],["\n display: ",";\n ","\n"])),(function(e){return"hidden"===e.type?"none":"inline-block"}),(function(e){return e.fullWidth?"width: 100%;":""})),y=v.e.div(O||(O=Object(a.f)(["\n position: relative;\n"],["\n position: relative;\n"]))),b=v.e.input(S||(S=Object(a.f)(["\n ","\n ",";\n ","\n"],["\n ","\n ",";\n ","\n"])),g,(function(e){var t=e.inputType,n=e.inputActionButton;return"password"===t||n?"padding-right: 40px;":""}),(function(e){return e.fullWidth?"width: 100%;":""})),x=v.e.span(E||(E=Object(a.f)(["\n position: absolute;\n right: 0;\n line-height: normal;\n\n font-size: 0.8em;\n padding: calc(8px / 0.8);\n cursor: pointer;\n text-align: center;\n ","\n"],["\n position: absolute;\n right: 0;\n line-height: normal;\n\n font-size: 0.8em;\n padding: calc(8px / 0.8);\n cursor: pointer;\n text-align: center;\n ","\n"])),(function(e){var t=e.theme;return Object(v.h)({color:t.rightPanel.textColor})}));var w=l.a.forwardRef((function(e,t){var n=e.fullWidth,r=e.errorMessage,o=e.type,i=l.a.useState("password"===o),s=i[0],c=i[1],u=l.a.useCallback((function(){c(!s)}),[s]);return l.a.createElement(m,{fullWidth:n,type:o},l.a.createElement(y,null,l.a.createElement(b,Object(a.a)({},e,{type:s?"password":"text",inputType:o,ref:t})),e.inputActionButton?l.a.createElement(x,{onClick:e.inputActionButton.onClick},e.inputActionButton.label):"password"===o?l.a.createElement(x,{onClick:u},s?"show":"hide"):null),r?l.a.createElement(h.b,null,r):null)}));function C(e){var t=Object(c.c)(Object(a.a)({fieldType:"text"},e)),n=t.userProps,r=t.render,o=t.fieldState,i=t.informed;return r(l.a.createElement(w,Object(a.a)({},n,i,{errorMessage:o.error})))}var A,k,O,S,E,j=Object(c.b)((function(e){var t=e.initValue,n=e.options,r=e.fieldApi,o=e.fieldState,i=n.map((function(e,t){return{value:e.title||e.value,idx:t,origValue:e.value}})),a=i.find((function(e){return e.origValue===t})),s=l.a.useState(null==a?void 0:a.value),c=s[0],u=s[1];l.a.useEffect((function(){t&&r.setValue(t)}),[]);var f=l.a.useCallback((function(e){r.setValue(i[e.idx].origValue),u(i[e.idx].value)}),[i]);return l.a.createElement(m,{fullWidth:!0},l.a.createElement(d.f,{fullWidth:!0,variant:"dark",value:c,options:i,onChange:f}),o.error?l.a.createElement(h.b,null,o.error):null)}));function T(e){var t=e.name,n=e.value,r=e.description,o=e.variableEnum,i=e.onChange,a=e.defaultValue,l=o?o.map((function(e,t){return{value:e,idx:t}})):[];return s.createElement(h.a,null,s.createElement(h.d,null,t,":"),l&&l.length?s.createElement(d.f,{fullWidth:!0,variant:"dark",openUp:!0,value:n,options:l,onChange:function(e){return i(e.value)}}):s.createElement(w,{fullWidth:!0,value:n,onChange:function(e){return i(e.target.value)},placeholder:a}),r&&s.createElement(F,null,r))}var M,P,I,F=d.nb.small(M||(M=Object(a.f)(["\n display: inline-block;\n margin-top: 5px;\n color: #d0d0d0;\n"],["\n display: inline-block;\n margin-top: 5px;\n color: #d0d0d0;\n"]))),L=n(224),N=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return Object.defineProperty(t,"state",{enumerable:!0,configurable:!0,writable:!0,value:{activeIdx:0,variables:{}}}),Object.defineProperty(t,"handleServerChange",{enumerable:!0,configurable:!0,writable:!0,value:function(e){var n=t.props.operation.servers.find((function(t){return t.url===e.serverUrl})),r=Object(L.c)(n);t.props.onChange({url:e.serverUrl,variables:r}),Object(f.p)("serverUrl",e.serverUrl),t.setState({variables:r})}}),Object.defineProperty(t,"handleVariableChange",{enumerable:!0,configurable:!0,writable:!0,value:function(e,n){var r,o=t.props.operation.servers[t.state.activeIdx],i=Object(a.a)(Object(a.a)({},t.state.variables),((r={})[e]=n||Object(L.c)(o)[e],r));t.setState({variables:i}),Object(L.i)(e,n),t.props.onChange(Object(a.a)(Object(a.a)({},o),{variables:i}))}}),t}return Object(a.d)(t,e),Object.defineProperty(t,"getDerivedStateFromProps",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=e.operation,n=Object(f.e)("serverUrl"),r=t.servers.findIndex((function(e){return e.url===n}));return{activeIdx:r<0?0:r}}}),Object.defineProperty(t.prototype,"componentDidMount",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=Object(L.f)(this.props.operation.servers,this.state.activeIdx);this.props.onChange(e),this.setState({variables:e.variables})}}),Object.defineProperty(t.prototype,"render",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this,t=this.state.activeIdx,n=this.props.operation.servers.map((function(t){return{serverUrl:t.url,value:"\n "+Object(L.a)(Object(L.b)(t.url,e.state.variables),t.variables)+"\n - "+(t.description||"Default")+"\n "}})),r=Object.keys(this.state.variables);return s.createElement(_,null,s.createElement(h.d,{htmlFor:"server"},"Target server: "),s.createElement(h.a,null,s.createElement(d.f,{openUp:!0,variant:"dark",value:n[t].value,options:n,onChange:this.handleServerChange})),r.length?r.map((function(t){var n=e.props.operation.servers[e.state.activeIdx].variables[t];return s.createElement(T,{key:t,name:t,value:e.state.variables[t],defaultValue:n.default,onChange:function(n){return e.handleVariableChange(t,n)},variableEnum:n.enum,description:n.description})})):null)}}),t=Object(a.c)([u.a],t)}(s.Component),_=d.nb.div(P||(P=Object(a.f)(["\n margin-top: 20px;\n"],["\n margin-top: 20px;\n"]))),D=Object(c.b)((function(e){var t=e.initValue,n=e.paramEnum,r=e.fieldApi,o=s.useState(t),i=o[0],a=o[1],l=n.map((function(e,t){return{id:String(t),value:e}}));return s.useEffect((function(){t&&r.setValue(t)}),[]),s.createElement(d.f,{fullWidth:!0,variant:"dark",value:i,options:l,onChange:function(e){r.setValue(e.value),a(e.value)}})}));!function(e){e.ARRAY="array",e.OBJECT="object"}(I||(I={}));var R=function(e){return"("+e.schema.type+")"+(e.example?" "+e.example:"")};var V=["path","query","cookie","header"];function B(e){var t=e.values,n=e.operation;function r(e,n){var r=s.useMemo((function(){return function(e){return function(t){if(e.required&&!t)return"Field is required";if(e.required&&e.schema.type===I.ARRAY&&Array.isArray(t)){if(t.length>(e.schema.rawSchema&&e.schema.rawSchema.maxItems||1/0))return"Too many items selected, maximum "+e.schema.rawSchema.maxItems;if(t.length<(e.schema.rawSchema&&e.schema.rawSchema.minItems||0)){var n=e.schema.rawSchema.minItems;return"You should select at least "+(1===n?n+" item":n+" items")}}}}(n)}),[n]),o=Array.isArray(n.schema.enum)&&n.schema.enum.length?n.schema.enum:void 0,i=function(e){if(e.schema.type===I.ARRAY){var t=e.schema.default||e.schema.example;if(!t&&e.schema.rawSchema.items){if(e.schema.rawSchema.items.default)return[e.schema.rawSchema.items.default];if(e.schema.rawSchema.items.example)return[e.schema.rawSchema.items.example]}return t||[]}return e.schema.default||e.schema.example}(n);return o?s.createElement(h.a,null,s.createElement(D,{initValue:i,paramEnum:o,field:e})):s.createElement(C,{fullWidth:!0,"data-cy":"parameter-input",id:e,field:e,placeholder:R(n),validate:r,initialValue:i||Object(f.f)(t,e),validateOnBlur:!0,validateOnChange:!0})}function o(e,t,n){var i,l=n?Object(f.b)(n,e.name):e.name,c=function(e){var t=e.oneOfType,n=e.type,r=e.items;return t||n===I.ARRAY&&(null==r?void 0:r.type)===I.OBJECT&&"Array of objects"}(e.schema);if(c&&console.warn('Unsupported parameter definition: "'+c+'"'),e.schema.type===I.OBJECT)return null===(i=e.schema.fields)||void 0===i?void 0:i.map((function(e){return o(e,t,l)}));var u=n?[t,n]:[e.in],p=f.b.apply(void 0,Object(a.h)(Object(a.h)([],u,!1),[e.name],!1));return s.createElement(h.a,{key:p},s.createElement(h.d,{required:e.required},l,":"),c?s.createElement(h.e,null,"Unsupported field schema definition"):r(p,e))}var i,l,c=(i=n.parameters||[],l={},i.forEach((function(e){var t,n,r;t=l,n=e.in,r=e,t[n]||(t[n]=[]),t[n].push(r)})),l);return s.createElement(h.h,null,V.map((function(e){return function(e,t){return t&&t.length?s.createElement(s.Fragment,{key:e},s.createElement(h.a,null,s.createElement(h.g,null," # ",e," parameters "),s.createElement("span",null," ")),t.map((function(t){return o(t,e)}))):null}(e,c[e])})))}var U=n(16),W=n(217),z=n(29);function H(e,t,n){var r=t.path||{},o=t.query||{},i=Object.keys(o),a=Object(L.b)(e,r);return i.length&&(a+="?"+i.map((function(e){if(!o[e])return"";var t=function(e){return n.find((function(t){return t.name===e&&"query"===t.in}))}(e);return t?Object(d.mb)(t,o[e]):e+"="+encodeURIComponent(o[e])})).filter(Boolean).join("&")),a}var q,G,$,K,J,Y,X,Q,Z,ee,te,ne=function(e){var t=e.loading,n=e.operation,r=e.hasResponse,o=e.execute,i=e.params,a=void 0===i?{}:i;return s.createElement(oe,null,s.createElement(W.b,null,s.createElement(z.b,{type:n.httpVerb},n.httpVerb),s.createElement(W.a,{wrap:"true"},H(n.path,a,n.parameters))),s.createElement(re,{"data-cy":"send-button",color:"primary",blinking:t,onClick:function(){t||o()}},t?"Sending...":r?"Resend":"Send"))},re=Object(d.nb)(z.a)(q||(q=Object(a.f)(["\n width: ",";\n"],["\n width: ",";\n"])),(function(e){return e.theme.components.tryItSendButton.fullWidth?"100%":"auto"})),oe=Object(d.nb)(U.c)(G||(G=Object(a.f)(["\n ",";\n"],["\n ",";\n"])),(function(e){return e.theme.components.tryItSendButton.fullWidth?"\n flex-direction: column;\n align-items: flex-start;":""})),ie=n(8),ae=d.nb.div($||($=Object(a.f)(["\n margin-bottom: 10px;\n"],["\n margin-bottom: 10px;\n"]))),se=d.nb.div(K||(K=Object(a.f)(["\n display: inline-block;\n margin-right: 20px;\n padding: 2px 0;\n text-align: center;\n color: ",";\n"],["\n display: inline-block;\n margin-right: 20px;\n padding: 2px 0;\n text-align: center;\n color: ",";\n"])),(function(e){return e.theme.colors.text.light})),le=Object(d.nb)(se)(J||(J=Object(a.f)(["\n color: ",";\n"],["\n color: ",";\n"])),(function(e){var t=e.theme,n=e.code;return n>=200&&n<300?t.colors.responses.success.tabTextColor:n>=300&&n<400?t.colors.responses.redirect.tabTextColor:n>400?t.colors.responses.error.tabTextColor:t.colors.responses.info.tabTextColor})),ce=d.nb.strong(Y||(Y=Object(a.f)(["\n text-transform: capitalize;\n display: inline-block;\n padding-right: 5px;\n"],["\n text-transform: capitalize;\n display: inline-block;\n padding-right: 5px;\n"]))),ue=d.nb.header(X||(X=Object(a.f)(["\n font-weight: bold;\n margin-bottom: 10px;\n"],["\n font-weight: bold;\n margin-bottom: 10px;\n"]))),fe=d.nb.code(Q||(Q=Object(a.f)(["\n border-left: 3px solid #ff4040;\n padding-left: 5px;\n"],["\n border-left: 3px solid #ff4040;\n padding-left: 5px;\n"]))),pe=d.nb.div(Z||(Z=Object(a.f)(["\n margin-bottom: 10px;\n\n &:not(:first-child) {\n margin-top: 10px;\n }\n"],["\n margin-bottom: 10px;\n\n &:not(:first-child) {\n margin-top: 10px;\n }\n"]))),de=Object(d.nb)(ie.t)(ee||(ee=Object(a.f)(["\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n"],["\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n"]))),he=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.d)(t,e),Object.defineProperty(t.prototype,"render",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e,t=this.props,n=t.error,r=t.response,o=t.time,i=r||n&&n.response,a=i&&i.data&&i.data.length||0;if(e=a>1e6?(a/1e6).toFixed(2)+" MB":a>1e3?(a/1e3).toFixed(2)+" KB":a+" B",n&&!n.response||!i)return s.createElement(s.Fragment,null,s.createElement(ue,null," Could not get any response "),s.createElement(fe,null,n&&n.message||"Unknown error"),s.createElement("br",null),s.createElement(ue,null," Why this might have happened:"),s.createElement("div",null," - CORS is misconfigured on the server"),s.createElement("div",null," - ","The server couldn't sent a response"),s.createElement("div",null," - No internet access"),s.createElement("div",null," - Documentation issue - contact API owner"),s.createElement("div",null," - Misconfigured security definition"));if(!i)return"Something went wrong";var l=Object.keys(i.headers);return s.createElement(s.Fragment,null,s.createElement(ae,null,s.createElement(le,{code:i.status},s.createElement("span",null," Status: "),i.status," ",i.statusText),s.createElement(se,null,s.createElement("span",null," Time: "),o,"ms"),s.createElement(se,null,s.createElement("span",null," Size: "),e)),s.createElement("div",null,s.createElement(pe,null," Headers: "),s.createElement(de,null,l.map((function(e){return s.createElement("div",{key:e},s.createElement(ce,null,e,":"),s.createElement("code",null," ",i.headers[e]))}))),s.createElement(pe,null," Body: "),i.body&&s.createElement(d.o,{data:i.body})||null,!i.body&&null!=i.data&&(i.data?s.createElement(d.U,{lang:Object(d.hb)(i.headers["Content-Type"]||"text/plain"),source:i.data}):s.createElement(de,null,s.createElement("i",null,"(no content)")))||null))}}),t}(s.PureComponent),ve=n(81),ge=n.n(ve),me=n(794),ye=n(597);function be(e,t){void 0===t&&(t=!1);var n=e.length,r=0,o="",i=0,a=16,s=0,l=0,c=0,u=0,f=0;function p(t,n){for(var o=0,i=0;o<t||!n;){var a=e.charCodeAt(r);if(a>=48&&a<=57)i=16*i+a-48;else if(a>=65&&a<=70)i=16*i+a-65+10;else{if(!(a>=97&&a<=102))break;i=16*i+a-97+10}r++,o++}return o<t&&(i=-1),i}function d(){if(o="",f=0,i=r,l=s,u=c,r>=n)return i=n,a=17;var t=e.charCodeAt(r);if(xe(t)){do{r++,o+=String.fromCharCode(t),t=e.charCodeAt(r)}while(xe(t));return a=15}if(we(t))return r++,o+=String.fromCharCode(t),13===t&&10===e.charCodeAt(r)&&(r++,o+="\n"),s++,c=r,a=14;switch(t){case 123:return r++,a=1;case 125:return r++,a=2;case 91:return r++,a=3;case 93:return r++,a=4;case 58:return r++,a=6;case 44:return r++,a=5;case 34:return r++,o=function(){for(var t="",o=r;;){if(r>=n){t+=e.substring(o,r),f=2;break}var i=e.charCodeAt(r);if(34===i){t+=e.substring(o,r),r++;break}if(92!==i){if(i>=0&&i<=31){if(we(i)){t+=e.substring(o,r),f=2;break}f=6}r++}else{if(t+=e.substring(o,r),++r>=n){f=2;break}switch(e.charCodeAt(r++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:var a=p(4,!0);a>=0?t+=String.fromCharCode(a):f=4;break;default:f=5}o=r}}return t}(),a=10;case 47:var d=r-1;if(47===e.charCodeAt(r+1)){for(r+=2;r<n&&!we(e.charCodeAt(r));)r++;return o=e.substring(d,r),a=12}if(42===e.charCodeAt(r+1)){r+=2;for(var v=n-1,g=!1;r<v;){var m=e.charCodeAt(r);if(42===m&&47===e.charCodeAt(r+1)){r+=2,g=!0;break}r++,we(m)&&(13===m&&10===e.charCodeAt(r)&&r++,s++,c=r)}return g||(r++,f=1),o=e.substring(d,r),a=13}return o+=String.fromCharCode(t),r++,a=16;case 45:if(o+=String.fromCharCode(t),++r===n||!Ce(e.charCodeAt(r)))return a=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return o+=function(){var t=r;if(48===e.charCodeAt(r))r++;else for(r++;r<e.length&&Ce(e.charCodeAt(r));)r++;if(r<e.length&&46===e.charCodeAt(r)){if(!(++r<e.length&&Ce(e.charCodeAt(r))))return f=3,e.substring(t,r);for(r++;r<e.length&&Ce(e.charCodeAt(r));)r++}var n=r;if(r<e.length&&(69===e.charCodeAt(r)||101===e.charCodeAt(r)))if((++r<e.length&&43===e.charCodeAt(r)||45===e.charCodeAt(r))&&r++,r<e.length&&Ce(e.charCodeAt(r))){for(r++;r<e.length&&Ce(e.charCodeAt(r));)r++;n=r}else f=3;return e.substring(t,n)}(),a=11;default:for(;r<n&&h(t);)r++,t=e.charCodeAt(r);if(i!==r){switch(o=e.substring(i,r)){case"true":return a=8;case"false":return a=9;case"null":return a=7}return a=16}return o+=String.fromCharCode(t),r++,a=16}}function h(e){if(xe(e)||we(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}return{setPosition:function(e){r=e,o="",i=0,a=16,f=0},getPosition:function(){return r},scan:t?function(){var e;do{e=d()}while(e>=12&&e<=15);return e}:d,getToken:function(){return a},getTokenValue:function(){return o},getTokenOffset:function(){return i},getTokenLength:function(){return r-i},getTokenStartLine:function(){return l},getTokenStartCharacter:function(){return i-u},getTokenError:function(){return f}}}function xe(e){return 32===e||9===e||11===e||12===e||160===e||5760===e||e>=8192&&e<=8203||8239===e||8287===e||12288===e||65279===e}function we(e){return 10===e||13===e||8232===e||8233===e}function Ce(e){return e>=48&&e<=57}function Ae(e,t,n){var r,o,i,a,s;if(t){for(a=t.offset,s=a+t.length,i=a;i>0&&!Oe(e,i-1);)i--;for(var l=s;l<e.length&&!Oe(e,l);)l++;o=e.substring(i,l),r=function(e,t){var n=0,r=0,o=t.tabSize||4;for(;n<e.length;){var i=e.charAt(n);if(" "===i)r++;else{if("\t"!==i)break;r+=o}n++}return Math.floor(r/o)}(o,n)}else o=e,r=0,i=0,a=0,s=e.length;var c,u=function(e,t){for(var n=0;n<t.length;n++){var r=t.charAt(n);if("\r"===r)return n+1<t.length&&"\n"===t.charAt(n+1)?"\r\n":"\r";if("\n"===r)return"\n"}return e&&e.eol||"\n"}(n,e),f=!1,p=0;c=n.insertSpaces?ke(" ",n.tabSize||4):"\t";var d=be(o,!1),h=!1;function v(){return u+ke(c,r+p)}function g(){var e=d.scan();for(f=!1;15===e||14===e;)f=f||14===e,e=d.scan();return h=16===e||0!==d.getTokenError(),e}var m=[];function y(t,n,r){!h&&n<s&&r>a&&e.substring(n,r)!==t&&m.push({offset:n,length:r-n,content:t})}var b=g();if(17!==b){var x=d.getTokenOffset()+i;y(ke(c,r),i,x)}for(;17!==b;){for(var w=d.getTokenOffset()+d.getTokenLength()+i,C=g(),A="";!f&&(12===C||13===C);){y(" ",w,d.getTokenOffset()+i),w=d.getTokenOffset()+d.getTokenLength()+i,A=12===C?v():"",C=g()}if(2===C)1!==b&&(p--,A=v());else if(4===C)3!==b&&(p--,A=v());else{switch(b){case 3:case 1:p++,A=v();break;case 5:case 12:A=v();break;case 13:A=f?v():" ";break;case 6:A=" ";break;case 10:if(6===C){A="";break}case 7:case 8:case 9:case 11:case 2:case 4:12===C||13===C?A=" ":5!==C&&17!==C&&(h=!0);break;case 16:h=!0}!f||12!==C&&13!==C||(A=v())}y(A,w,d.getTokenOffset()+i),b=C}return m}function ke(e,t){for(var n="",r=0;r<t;r++)n+=e;return n}function Oe(e,t){return-1!=="\r\n".indexOf(e.charAt(t))}function Se(e,t,n){void 0===n&&(n=te.DEFAULT);var r=be(e,!1);function o(e){return e?function(){return e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:function(){return!0}}function i(e){return e?function(t){return e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:function(){return!0}}var a=o(t.onObjectBegin),s=i(t.onObjectProperty),l=o(t.onObjectEnd),c=o(t.onArrayBegin),u=o(t.onArrayEnd),f=i(t.onLiteralValue),p=i(t.onSeparator),d=o(t.onComment),h=i(t.onError),v=n&&n.disallowComments,g=n&&n.allowTrailingComma;function m(){for(;;){var e=r.scan();switch(r.getTokenError()){case 4:y(14);break;case 5:y(15);break;case 3:y(13);break;case 1:v||y(11);break;case 2:y(12);break;case 6:y(16)}switch(e){case 12:case 13:v?y(10):d();break;case 16:y(1);break;case 15:case 14:break;default:return e}}}function y(e,t,n){if(void 0===t&&(t=[]),void 0===n&&(n=[]),h(e),t.length+n.length>0)for(var o=r.getToken();17!==o;){if(-1!==t.indexOf(o)){m();break}if(-1!==n.indexOf(o))break;o=m()}}function b(e){var t=r.getTokenValue();return e?f(t):s(t),m(),!0}function x(){switch(r.getToken()){case 3:return function(){c(),m();for(var e=!1;4!==r.getToken()&&17!==r.getToken();){if(5===r.getToken()){if(e||y(4,[],[]),p(","),m(),4===r.getToken()&&g)break}else e&&y(6,[],[]);x()||y(4,[],[4,5]),e=!0}return u(),4!==r.getToken()?y(8,[4],[]):m(),!0}();case 1:return function(){a(),m();for(var e=!1;2!==r.getToken()&&17!==r.getToken();){if(5===r.getToken()){if(e||y(4,[],[]),p(","),m(),2===r.getToken()&&g)break}else e&&y(6,[],[]);(10!==r.getToken()?(y(3,[],[2,5]),0):(b(!1),6===r.getToken()?(p(":"),m(),x()||y(4,[],[2,5])):y(5,[],[2,5]),1))||y(4,[],[2,5]),e=!0}return l(),2!==r.getToken()?y(7,[2],[]):m(),!0}();case 10:return b(!0);default:return function(){switch(r.getToken()){case 11:var e=r.getTokenValue(),t=Number(e);isNaN(t)&&(y(2),t=0),f(t);break;case 7:f(null);break;case 8:f(!0);break;case 9:f(!1);break;default:return!1}return m(),!0}()}}return m(),17===r.getToken()?!!n.allowEmptyContent||(y(4,[],[]),!1):x()?(17!==r.getToken()&&y(9,[],[]),!0):(y(4,[],[]),!1)}!function(e){e.DEFAULT={allowTrailingComma:!1}}(te||(te={}));var Ee,je,Te,Me,Pe,Ie,Fe,Le,Ne,_e,De,Re,Ve,Be,Ue,We,ze,He,qe,Ge,$e,Ke,Je,Ye,Xe,Qe,Ze=be,et=function(e,t,n){void 0===t&&(t=[]),void 0===n&&(n=te.DEFAULT);var r=null,o=[],i=[];function a(e){Array.isArray(o)?o.push(e):null!==r&&(o[r]=e)}return Se(e,{onObjectBegin:function(){var e={};a(e),i.push(o),o=e,r=null},onObjectProperty:function(e){r=e},onObjectEnd:function(){o=i.pop()},onArrayBegin:function(){var e=[];a(e),i.push(o),o=e,r=null},onArrayEnd:function(){o=i.pop()},onLiteralValue:a,onError:function(e,n,r){t.push({error:e,offset:n,length:r})}},n),o[0]},tt=function e(t,n,r){if(void 0===r&&(r=!1),function(e,t,n){return void 0===n&&(n=!1),t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}(t,n,r)){var o=t.children;if(Array.isArray(o))for(var i=0;i<o.length&&o[i].offset<=n;i++){var a=e(o[i],n,r);if(a)return a}return t}},nt=function e(t){if(!t.parent||!t.parent.children)return[];var n=e(t.parent);if("property"===t.parent.type){var r=t.parent.children[0].value;n.push(r)}else if("array"===t.parent.type){var o=t.parent.children.indexOf(t);-1!==o&&n.push(o)}return n},rt=function e(t){switch(t.type){case"array":return t.children.map(e);case"object":for(var n=Object.create(null),r=0,o=t.children;r<o.length;r++){var i=o[r],a=i.children[1];a&&(n[i.children[0].value]=e(a))}return n;case"null":case"string":case"number":case"boolean":return t.value;default:return}};function ot(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;var n,r;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!ot(e[n],t[n]))return!1}else{var o=[];for(r in e)o.push(r);o.sort();var i=[];for(r in t)i.push(r);if(i.sort(),!ot(o,i))return!1;for(n=0;n<o.length;n++)if(!ot(e[o[n]],t[o[n]]))return!1}return!0}function it(e){return"number"==typeof e}function at(e){return void 0!==e}function st(e){return"boolean"==typeof e}!function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647}(Ee||(Ee={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647}(je||(je={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=je.MAX_VALUE),t===Number.MAX_VALUE&&(t=je.MAX_VALUE),{line:e,character:t}},e.is=function(e){var t=e;return Ut.objectLiteral(t)&&Ut.uinteger(t.line)&&Ut.uinteger(t.character)}}(Te||(Te={})),function(e){e.create=function(e,t,n,r){if(Ut.uinteger(e)&&Ut.uinteger(t)&&Ut.uinteger(n)&&Ut.uinteger(r))return{start:Te.create(e,t),end:Te.create(n,r)};if(Te.is(e)&&Te.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments["+e+", "+t+", "+n+", "+r+"]")},e.is=function(e){var t=e;return Ut.objectLiteral(t)&&Te.is(t.start)&&Te.is(t.end)}}(Me||(Me={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return Ut.defined(t)&&Me.is(t.range)&&(Ut.string(t.uri)||Ut.undefined(t.uri))}}(Pe||(Pe={})),function(e){e.create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},e.is=function(e){var t=e;return Ut.defined(t)&&Me.is(t.targetRange)&&Ut.string(t.targetUri)&&(Me.is(t.targetSelectionRange)||Ut.undefined(t.targetSelectionRange))&&(Me.is(t.originSelectionRange)||Ut.undefined(t.originSelectionRange))}}(Ie||(Ie={})),function(e){e.create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},e.is=function(e){var t=e;return Ut.numberRange(t.red,0,1)&&Ut.numberRange(t.green,0,1)&&Ut.numberRange(t.blue,0,1)&&Ut.numberRange(t.alpha,0,1)}}(Fe||(Fe={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return Me.is(t.range)&&Fe.is(t.color)}}(Le||(Le={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){var t=e;return Ut.string(t.label)&&(Ut.undefined(t.textEdit)||He.is(t))&&(Ut.undefined(t.additionalTextEdits)||Ut.typedArray(t.additionalTextEdits,He.is))}}(Ne||(Ne={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(_e||(_e={})),function(e){e.create=function(e,t,n,r,o){var i={startLine:e,endLine:t};return Ut.defined(n)&&(i.startCharacter=n),Ut.defined(r)&&(i.endCharacter=r),Ut.defined(o)&&(i.kind=o),i},e.is=function(e){var t=e;return Ut.uinteger(t.startLine)&&Ut.uinteger(t.startLine)&&(Ut.undefined(t.startCharacter)||Ut.uinteger(t.startCharacter))&&(Ut.undefined(t.endCharacter)||Ut.uinteger(t.endCharacter))&&(Ut.undefined(t.kind)||Ut.string(t.kind))}}(De||(De={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return Ut.defined(t)&&Pe.is(t.location)&&Ut.string(t.message)}}(Re||(Re={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(Ve||(Ve={})),function(e){e.Unnecessary=1,e.Deprecated=2}(Be||(Be={})),function(e){e.is=function(e){var t=e;return null!=t&&Ut.string(t.href)}}(Ue||(Ue={})),function(e){e.create=function(e,t,n,r,o,i){var a={range:e,message:t};return Ut.defined(n)&&(a.severity=n),Ut.defined(r)&&(a.code=r),Ut.defined(o)&&(a.source=o),Ut.defined(i)&&(a.relatedInformation=i),a},e.is=function(e){var t,n=e;return Ut.defined(n)&&Me.is(n.range)&&Ut.string(n.message)&&(Ut.number(n.severity)||Ut.undefined(n.severity))&&(Ut.integer(n.code)||Ut.string(n.code)||Ut.undefined(n.code))&&(Ut.undefined(n.codeDescription)||Ut.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(Ut.string(n.source)||Ut.undefined(n.source))&&(Ut.undefined(n.relatedInformation)||Ut.typedArray(n.relatedInformation,Re.is))}}(We||(We={})),function(e){e.create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o={title:e,command:t};return Ut.defined(n)&&n.length>0&&(o.arguments=n),o},e.is=function(e){var t=e;return Ut.defined(t)&&Ut.string(t.title)&&Ut.string(t.command)}}(ze||(ze={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){var t=e;return Ut.objectLiteral(t)&&Ut.string(t.newText)&&Me.is(t.range)}}(He||(He={})),function(e){e.create=function(e,t,n){var r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},e.is=function(e){var t=e;return void 0!==t&&Ut.objectLiteral(t)&&Ut.string(t.label)&&(Ut.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Ut.string(t.description)||void 0===t.description)}}(qe||(qe={})),function(e){e.is=function(e){return"string"==typeof e}}(Ge||(Ge={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){var t=e;return He.is(t)&&(qe.is(t.annotationId)||Ge.is(t.annotationId))}}($e||($e={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return Ut.defined(t)&&ut.is(t.textDocument)&&Array.isArray(t.edits)}}(Ke||(Ke={})),function(e){e.create=function(e,t,n){var r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){var t=e;return t&&"create"===t.kind&&Ut.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Ut.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Ut.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Ge.is(t.annotationId))}}(Je||(Je={})),function(e){e.create=function(e,t,n,r){var o={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(o.options=n),void 0!==r&&(o.annotationId=r),o},e.is=function(e){var t=e;return t&&"rename"===t.kind&&Ut.string(t.oldUri)&&Ut.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Ut.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Ut.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Ge.is(t.annotationId))}}(Ye||(Ye={})),function(e){e.create=function(e,t,n){var r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){var t=e;return t&&"delete"===t.kind&&Ut.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Ut.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Ut.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||Ge.is(t.annotationId))}}(Xe||(Xe={})),function(e){e.is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return Ut.string(e.kind)?Je.is(e)||Ye.is(e)||Xe.is(e):Ke.is(e)})))}}(Qe||(Qe={}));var lt,ct,ut,ft,pt,dt,ht,vt,gt,mt,yt,bt,xt,wt,Ct,At,kt,Ot,St,Et,jt,Tt,Mt,Pt,It,Ft,Lt,Nt,_t,Dt,Rt=function(){function e(e,t){this.edits=e,this.changeAnnotations=t}return e.prototype.insert=function(e,t,n){var r,o;if(void 0===n?r=He.insert(e,t):Ge.is(n)?(o=n,r=$e.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=$e.insert(e,t,o)),this.edits.push(r),void 0!==o)return o},e.prototype.replace=function(e,t,n){var r,o;if(void 0===n?r=He.replace(e,t):Ge.is(n)?(o=n,r=$e.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=$e.replace(e,t,o)),this.edits.push(r),void 0!==o)return o},e.prototype.delete=function(e,t){var n,r;if(void 0===t?n=He.del(e):Ge.is(t)?(r=t,n=$e.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=$e.del(e,r)),this.edits.push(n),void 0!==r)return r},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),Vt=function(){function e(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(e,t){var n;if(Ge.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error("Id "+n+" is already in use.");if(void 0===t)throw new Error("No annotation provided for id "+n);return this._annotations[n]=t,this._size++,n},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}();!function(){function e(e){var t=this;this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Vt(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(Ke.is(e)){var n=new Rt(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=n}}))):e.changes&&Object.keys(e.changes).forEach((function(n){var r=new Rt(e.changes[n]);t._textEditChanges[n]=r}))):this._workspaceEdit={}}Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(e){if(ut.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version};if(!(r=this._textEditChanges[t.uri])){var n={textDocument:t,edits:o=[]};this._workspaceEdit.documentChanges.push(n),r=new Rt(o,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var r;if(!(r=this._textEditChanges[e])){var o=[];this._workspaceEdit.changes[e]=o,r=new Rt(o),this._textEditChanges[e]=r}return r},e.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new Vt,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r,o,i;if(qe.is(t)||Ge.is(t)?r=t:n=t,void 0===r?o=Je.create(e,n):(i=Ge.is(r)?r:this._changeAnnotations.manage(r),o=Je.create(e,n,i)),this._workspaceEdit.documentChanges.push(o),void 0!==i)return i},e.prototype.renameFile=function(e,t,n,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var o,i,a;if(qe.is(n)||Ge.is(n)?o=n:r=n,void 0===o?i=Ye.create(e,t,r):(a=Ge.is(o)?o:this._changeAnnotations.manage(o),i=Ye.create(e,t,r,a)),this._workspaceEdit.documentChanges.push(i),void 0!==a)return a},e.prototype.deleteFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r,o,i;if(qe.is(t)||Ge.is(t)?r=t:n=t,void 0===r?o=Xe.create(e,n):(i=Ge.is(r)?r:this._changeAnnotations.manage(r),o=Xe.create(e,n,i)),this._workspaceEdit.documentChanges.push(o),void 0!==i)return i}}();!function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return Ut.defined(t)&&Ut.string(t.uri)}}(lt||(lt={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return Ut.defined(t)&&Ut.string(t.uri)&&Ut.integer(t.version)}}(ct||(ct={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return Ut.defined(t)&&Ut.string(t.uri)&&(null===t.version||Ut.integer(t.version))}}(ut||(ut={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){var t=e;return Ut.defined(t)&&Ut.string(t.uri)&&Ut.string(t.languageId)&&Ut.integer(t.version)&&Ut.string(t.text)}}(ft||(ft={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(pt||(pt={})),function(e){e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(pt||(pt={})),function(e){e.is=function(e){var t=e;return Ut.objectLiteral(e)&&pt.is(t.kind)&&Ut.string(t.value)}}(dt||(dt={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(ht||(ht={})),function(e){e.PlainText=1,e.Snippet=2}(vt||(vt={})),function(e){e.Deprecated=1}(gt||(gt={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){var t=e;return t&&Ut.string(t.newText)&&Me.is(t.insert)&&Me.is(t.replace)}}(mt||(mt={})),function(e){e.asIs=1,e.adjustIndentation=2}(yt||(yt={})),function(e){e.create=function(e){return{label:e}}}(bt||(bt={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(xt||(xt={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return Ut.string(t)||Ut.objectLiteral(t)&&Ut.string(t.language)&&Ut.string(t.value)}}(wt||(wt={})),function(e){e.is=function(e){var t=e;return!!t&&Ut.objectLiteral(t)&&(dt.is(t.contents)||wt.is(t.contents)||Ut.typedArray(t.contents,wt.is))&&(void 0===e.range||Me.is(e.range))}}(Ct||(Ct={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(At||(At={})),function(e){e.create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o={label:e};return Ut.defined(t)&&(o.documentation=t),Ut.defined(n)?o.parameters=n:o.parameters=[],o}}(kt||(kt={})),function(e){e.Text=1,e.Read=2,e.Write=3}(Ot||(Ot={})),function(e){e.create=function(e,t){var n={range:e};return Ut.number(t)&&(n.kind=t),n}}(St||(St={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(Et||(Et={})),function(e){e.Deprecated=1}(jt||(jt={})),function(e){e.create=function(e,t,n,r,o){var i={name:e,kind:t,location:{uri:r,range:n}};return o&&(i.containerName=o),i}}(Tt||(Tt={})),function(e){e.create=function(e,t,n,r,o,i){var a={name:e,detail:t,kind:n,range:r,selectionRange:o};return void 0!==i&&(a.children=i),a},e.is=function(e){var t=e;return t&&Ut.string(t.name)&&Ut.number(t.kind)&&Me.is(t.range)&&Me.is(t.selectionRange)&&(void 0===t.detail||Ut.string(t.detail))&&(void 0===t.deprecated||Ut.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(Mt||(Mt={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(Pt||(Pt={})),function(e){e.create=function(e,t){var n={diagnostics:e};return null!=t&&(n.only=t),n},e.is=function(e){var t=e;return Ut.defined(t)&&Ut.typedArray(t.diagnostics,We.is)&&(void 0===t.only||Ut.typedArray(t.only,Ut.string))}}(It||(It={})),function(e){e.create=function(e,t,n){var r={title:e},o=!0;return"string"==typeof t?(o=!1,r.kind=t):ze.is(t)?r.command=t:r.edit=t,o&&void 0!==n&&(r.kind=n),r},e.is=function(e){var t=e;return t&&Ut.string(t.title)&&(void 0===t.diagnostics||Ut.typedArray(t.diagnostics,We.is))&&(void 0===t.kind||Ut.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||ze.is(t.command))&&(void 0===t.isPreferred||Ut.boolean(t.isPreferred))&&(void 0===t.edit||Qe.is(t.edit))}}(Ft||(Ft={})),function(e){e.create=function(e,t){var n={range:e};return Ut.defined(t)&&(n.data=t),n},e.is=function(e){var t=e;return Ut.defined(t)&&Me.is(t.range)&&(Ut.undefined(t.command)||ze.is(t.command))}}(Lt||(Lt={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){var t=e;return Ut.defined(t)&&Ut.uinteger(t.tabSize)&&Ut.boolean(t.insertSpaces)}}(Nt||(Nt={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){var t=e;return Ut.defined(t)&&Me.is(t.range)&&(Ut.undefined(t.target)||Ut.string(t.target))}}(_t||(_t={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){var n=t;return void 0!==n&&Me.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(Dt||(Dt={}));var Bt;!function(e){e.create=function(e,t,n,r){return new Wt(e,t,n,r)},e.is=function(e){var t=e;return!!(Ut.defined(t)&&Ut.string(t.uri)&&(Ut.undefined(t.languageId)||Ut.string(t.languageId))&&Ut.uinteger(t.lineCount)&&Ut.func(t.getText)&&Ut.func(t.positionAt)&&Ut.func(t.offsetAt))},e.applyEdits=function(e,t){for(var n=e.getText(),r=function e(t,n){if(t.length<=1)return t;var r=t.length/2|0,o=t.slice(0,r),i=t.slice(r);e(o,n),e(i,n);var a=0,s=0,l=0;for(;a<o.length&&s<i.length;){var c=n(o[a],i[s]);t[l++]=c<=0?o[a++]:i[s++]}for(;a<o.length;)t[l++]=o[a++];for(;s<i.length;)t[l++]=i[s++];return t}(t,(function(e,t){var n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),o=n.length,i=r.length-1;i>=0;i--){var a=r[i],s=e.offsetAt(a.range.start),l=e.offsetAt(a.range.end);if(!(l<=o))throw new Error("Overlapping edit");n=n.substring(0,s)+a.newText+n.substring(l,n.length),o=s}return n}}(Bt||(Bt={}));var Ut,Wt=function(){function e(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var e=[],t=this._content,n=!0,r=0;r<t.length;r++){n&&(e.push(r),n=!1);var o=t.charAt(r);n="\r"===o||"\n"===o,"\r"===o&&r+1<t.length&&"\n"===t.charAt(r+1)&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return Te.create(0,e);for(;n<r;){var o=Math.floor((n+r)/2);t[o]>e?r=o:n=o+1}var i=n-1;return Te.create(i,e-t[i])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e}();!function(e){var t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.numberRange=function(e,n,r){return"[object Number]"===t.call(e)&&n<=e&&e<=r},e.integer=function(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647},e.uinteger=function(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647},e.func=function(e){return"[object Function]"===t.call(e)},e.objectLiteral=function(e){return null!==e&&"object"==typeof e},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(Ut||(Ut={}));var zt,Ht,qt,Gt=function(){function e(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},e.prototype.update=function(t,n){for(var r=0,o=t;r<o.length;r++){var i=o[r];if(e.isIncremental(i)){var a=Kt(i.range),s=this.offsetAt(a.start),l=this.offsetAt(a.end);this._content=this._content.substring(0,s)+i.text+this._content.substring(l,this._content.length);var c=Math.max(a.start.line,0),u=Math.max(a.end.line,0),f=this._lineOffsets,p=$t(i.text,!1,s);if(u-c===p.length)for(var d=0,h=p.length;d<h;d++)f[d+c+1]=p[d];else p.length<1e4?f.splice.apply(f,[c+1,u-c].concat(p)):this._lineOffsets=f=f.slice(0,c+1).concat(p,f.slice(u+1));var v=i.text.length-(l-s);if(0!==v)for(d=c+1+p.length,h=f.length;d<h;d++)f[d]=f[d]+v}else{if(!e.isFull(i))throw new Error("Unknown change event received");this._content=i.text,this._lineOffsets=void 0}}this._version=n},e.prototype.getLineOffsets=function(){return void 0===this._lineOffsets&&(this._lineOffsets=$t(this._content,!0)),this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return{line:0,character:e};for(;n<r;){var o=Math.floor((n+r)/2);t[o]>e?r=o:n=o+1}var i=n-1;return{line:i,character:e-t[i]}},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!0,configurable:!0}),e.isIncremental=function(e){var t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)},e.isFull=function(e){var t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength},e}();function $t(e,t,n){void 0===n&&(n=0);for(var r=t?[n]:[],o=0;o<e.length;o++){var i=e.charCodeAt(o);13!==i&&10!==i||(13===i&&o+1<e.length&&10===e.charCodeAt(o+1)&&o++,r.push(n+o+1))}return r}function Kt(e){var t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Jt(e){var t=Kt(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,n,r){return new Gt(e,t,n,r)},e.update=function(e,t,n){if(e instanceof Gt)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){for(var n=e.getText(),r=0,o=[],i=0,a=function e(t,n){if(t.length<=1)return t;var r=t.length/2|0,o=t.slice(0,r),i=t.slice(r);e(o,n),e(i,n);var a=0,s=0,l=0;for(;a<o.length&&s<i.length;){var c=n(o[a],i[s]);t[l++]=c<=0?o[a++]:i[s++]}for(;a<o.length;)t[l++]=o[a++];for(;s<i.length;)t[l++]=i[s++];return t}(t.map(Jt),(function(e,t){var n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}));i<a.length;i++){var s=a[i],l=e.offsetAt(s.range.start);if(l<r)throw new Error("Overlapping edit");l>r&&o.push(n.substring(r,l)),s.newText.length&&o.push(s.newText),r=e.offsetAt(s.range.end)}return o.push(n.substr(r)),o.join("")}}(zt||(zt={})),function(e){e[e.Undefined=0]="Undefined",e[e.EnumValueMismatch=1]="EnumValueMismatch",e[e.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=258]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",e[e.InvalidUnicode=260]="InvalidUnicode",e[e.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",e[e.InvalidCharacter=262]="InvalidCharacter",e[e.PropertyExpected=513]="PropertyExpected",e[e.CommaExpected=514]="CommaExpected",e[e.ColonExpected=515]="ColonExpected",e[e.ValueExpected=516]="ValueExpected",e[e.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",e[e.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",e[e.TrailingComma=519]="TrailingComma",e[e.DuplicateKey=520]="DuplicateKey",e[e.CommentNotPermitted=521]="CommentNotPermitted",e[e.SchemaResolveError=768]="SchemaResolveError"}(Ht||(Ht={})),(qt||(qt={})).LATEST={textDocument:{completion:{completionItem:{documentationFormat:[pt.Markdown,pt.PlainText],commitCharactersSupport:!0}}}};var Yt,Xt,Qt=(Yt=function(e,t){return(Yt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}Yt(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Zt={"color-hex":{errorMessage:"Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA.",pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:"String is not a RFC3339 date-time.",pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:"String is not a RFC3339 date.",pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:"String is not a RFC3339 time.",pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:"String is not an e-mail address.",pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/}},en=function(){function e(e,t,n){this.offset=t,this.length=n,this.parent=e}return Object.defineProperty(e.prototype,"children",{get:function(){return[]},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")},e}(),tn=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="null",r.value=null,r}return Qt(t,e),t}(en),nn=function(e){function t(t,n,r){var o=e.call(this,t,r)||this;return o.type="boolean",o.value=n,o}return Qt(t,e),t}(en),rn=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="array",r.items=[],r}return Qt(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return this.items},enumerable:!0,configurable:!0}),t}(en),on=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="number",r.isInteger=!0,r.value=Number.NaN,r}return Qt(t,e),t}(en),an=function(e){function t(t,n,r){var o=e.call(this,t,n,r)||this;return o.type="string",o.value="",o}return Qt(t,e),t}(en),sn=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="property",r.colonOffset=-1,r}return Qt(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!0,configurable:!0}),t}(en),ln=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="object",r.properties=[],r}return Qt(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return this.properties},enumerable:!0,configurable:!0}),t}(en);function cn(e){return st(e)?e?{}:{not:{}}:e}!function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"}(Xt||(Xt={}));var un=function(){function e(e,t){void 0===e&&(e=-1),void 0===t&&(t=null),this.focusOffset=e,this.exclude=t,this.schemas=[]}return e.prototype.add=function(e){this.schemas.push(e)},e.prototype.merge=function(e){var t;(t=this.schemas).push.apply(t,e.schemas)},e.prototype.include=function(e){return(-1===this.focusOffset||vn(e,this.focusOffset))&&e!==this.exclude},e.prototype.newSub=function(){return new e(-1,this.exclude)},e}(),fn=function(){function e(){}return Object.defineProperty(e.prototype,"schemas",{get:function(){return[]},enumerable:!0,configurable:!0}),e.prototype.add=function(e){},e.prototype.merge=function(e){},e.prototype.include=function(e){return!0},e.prototype.newSub=function(){return this},e.instance=new e,e}(),pn=function(){function e(){this.problems=[],this.propertiesMatches=0,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=null}return e.prototype.hasProblems=function(){return!!this.problems.length},e.prototype.mergeAll=function(e){for(var t=0,n=e;t<n.length;t++){var r=n[t];this.merge(r)}},e.prototype.merge=function(e){this.problems=this.problems.concat(e.problems)},e.prototype.mergeEnumValues=function(e){if(!this.enumValueMatch&&!e.enumValueMatch&&this.enumValues&&e.enumValues){this.enumValues=this.enumValues.concat(e.enumValues);for(var t=0,n=this.problems;t<n.length;t++){var r=n[t];r.code===Ht.EnumValueMismatch&&(r.message="Value is not accepted. Valid values: "+this.enumValues.map((function(e){return JSON.stringify(e)})).join(", ")+".")}}},e.prototype.mergePropertyMatch=function(e){this.merge(e),this.propertiesMatches++,(e.enumValueMatch||!e.hasProblems()&&e.propertiesMatches)&&this.propertiesValueMatches++,e.enumValueMatch&&e.enumValues&&1===e.enumValues.length&&this.primaryValueMatches++},e.prototype.compare=function(e){var t=this.hasProblems();return t!==e.hasProblems()?t?-1:1:this.enumValueMatch!==e.enumValueMatch?e.enumValueMatch?-1:1:this.primaryValueMatches!==e.primaryValueMatches?this.primaryValueMatches-e.primaryValueMatches:this.propertiesValueMatches!==e.propertiesValueMatches?this.propertiesValueMatches-e.propertiesValueMatches:this.propertiesMatches-e.propertiesMatches},e}();function dn(e){return rt(e)}function hn(e){return nt(e)}function vn(e,t,n){return void 0===n&&(n=!1),t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}var gn=function(){function e(e,t,n){void 0===t&&(t=[]),void 0===n&&(n=[]),this.root=e,this.syntaxErrors=t,this.comments=n}return e.prototype.getNodeFromOffset=function(e,t){if(void 0===t&&(t=!1),this.root)return tt(this.root,e,t)},e.prototype.visit=function(e){if(this.root){var t=function(n){var r=e(n),o=n.children;if(Array.isArray(o))for(var i=0;i<o.length&&r;i++)r=t(o[i]);return r};t(this.root)}},e.prototype.validate=function(e,t){if(this.root&&t){var n=new pn;return mn(this.root,t,n,fn.instance),n.problems.map((function(t){var n=Me.create(e.positionAt(t.location.offset),e.positionAt(t.location.offset+t.location.length));return We.create(n,t.message,t.severity,t.code)}))}return null},e.prototype.getMatchingSchemas=function(e,t,n){void 0===t&&(t=-1),void 0===n&&(n=null);var r=new un(t,n);return this.root&&e&&mn(this.root,e,new pn,r),r.schemas},e}();function mn(e,t,n,r){if(e&&r.include(e)){switch(e.type){case"object":!function(e,t,n,r){for(var o=Object.create(null),i=[],a=0,s=e.properties;a<s.length;a++){var l=(y=s[a]).keyNode.value;o[l]=y.valueNode,i.push(l)}if(Array.isArray(t.required))for(var c=0,u=t.required;c<u.length;c++){var f=u[c];if(!o[f]){var p=e.parent&&"property"===e.parent.type&&e.parent.keyNode,d=p?{offset:p.offset,length:p.length}:{offset:e.offset,length:1};n.problems.push({location:d,severity:Ve.Warning,message:'Missing property "'+f+'".'})}}var h=function(e){for(var t=i.indexOf(e);t>=0;)i.splice(t,1),t=i.indexOf(e)};if(t.properties)for(var v=0,g=Object.keys(t.properties);v<g.length;v++){f=g[v];h(f);var m=t.properties[f];if(M=o[f])if(st(m))if(m)n.propertiesMatches++,n.propertiesValueMatches++;else{var y=M.parent;n.problems.push({location:{offset:y.keyNode.offset,length:y.keyNode.length},severity:Ve.Warning,message:t.errorMessage||"Property "+f+" is not allowed."})}else{var b=new pn;mn(M,m,b,r),n.mergePropertyMatch(b)}}if(t.patternProperties)for(var x=0,w=Object.keys(t.patternProperties);x<w.length;x++)for(var C=w[x],A=new RegExp(C),k=0,O=i.slice(0);k<O.length;k++){f=O[k];if(A.test(f))if(h(f),M=o[f])if(st(m=t.patternProperties[C]))if(m)n.propertiesMatches++,n.propertiesValueMatches++;else{y=M.parent;n.problems.push({location:{offset:y.keyNode.offset,length:y.keyNode.length},severity:Ve.Warning,message:t.errorMessage||"Property "+f+" is not allowed."})}else{b=new pn;mn(M,m,b,r),n.mergePropertyMatch(b)}}if("object"==typeof t.additionalProperties)for(var S=0,E=i;S<E.length;S++){f=E[S];if(M=o[f]){b=new pn;mn(M,t.additionalProperties,b,r),n.mergePropertyMatch(b)}}else if(!1===t.additionalProperties&&i.length>0)for(var j=0,T=i;j<T.length;j++){var M;f=T[j];if(M=o[f]){y=M.parent;n.problems.push({location:{offset:y.keyNode.offset,length:y.keyNode.length},severity:Ve.Warning,message:t.errorMessage||"Property "+f+" is not allowed."})}}it(t.maxProperties)&&e.properties.length>t.maxProperties&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:"Object has more properties than limit of "+t.maxProperties+"."});it(t.minProperties)&&e.properties.length<t.minProperties&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:"Object has fewer properties than the required number of "+t.minProperties});if(t.dependencies)for(var P=0,I=Object.keys(t.dependencies);P<I.length;P++){l=I[P];if(o[l]){var F=t.dependencies[l];if(Array.isArray(F))for(var L=0,N=F;L<N.length;L++){var _=N[L];o[_]?n.propertiesValueMatches++:n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:"Object is missing property "+_+" required by property {$key}."})}else if(m=cn(F)){b=new pn;mn(e,m,b,r),n.mergePropertyMatch(b)}}}var D=cn(t.propertyNames);if(D)for(var R=0,V=e.properties;R<V.length;R++){var B=V[R];(l=B.keyNode)&&mn(l,D,n,fn.instance)}}(e,t,n,r);break;case"array":!function(e,t,n,r){if(Array.isArray(t.items)){for(var o=t.items,i=0;i<o.length;i++){var a=cn(o[i]),s=new pn;(p=e.items[i])?(mn(p,a,s,r),n.mergePropertyMatch(s)):e.items.length>=o.length&&n.propertiesValueMatches++}if(e.items.length>o.length)if("object"==typeof t.additionalItems)for(var l=o.length;l<e.items.length;l++){s=new pn;mn(e.items[l],t.additionalItems,s,r),n.mergePropertyMatch(s)}else!1===t.additionalItems&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:"Array has too many items according to schema. Expected "+o.length+" or fewer."})}else{var c=cn(t.items);if(c)for(var u=0,f=e.items;u<f.length;u++){var p=f[u];s=new pn;mn(p,c,s,r),n.mergePropertyMatch(s)}}var d=cn(t.contains);if(d){e.items.some((function(e){var t=new pn;return mn(e,d,t,fn.instance),!t.hasProblems()}))||n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:t.errorMessage||"Array does not contain required item."})}it(t.minItems)&&e.items.length<t.minItems&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:"Array has too few items. Expected "+t.minItems+" or more."});it(t.maxItems)&&e.items.length>t.maxItems&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:"Array has too many items. Expected "+t.maxItems+" or fewer."});if(!0===t.uniqueItems){var h=dn(e);h.some((function(e,t){return t!==h.lastIndexOf(e)}))&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:"Array has duplicate items."})}}(e,t,n,r);break;case"string":!function(e,t,n,r){it(t.minLength)&&e.value.length<t.minLength&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:"String is shorter than the minimum length of "+t.minLength+"."});it(t.maxLength)&&e.value.length>t.maxLength&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:"String is longer than the maximum length of "+t.maxLength+"."});if(o=t.pattern,"string"==typeof o){new RegExp(t.pattern).test(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:t.patternErrorMessage||t.errorMessage||'String does not match the pattern of "'+t.pattern+'".'})}var o;if(t.format)switch(t.format){case"uri":case"uri-reference":var i=void 0;if(e.value){var a=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(e.value);a?a[2]||"uri"!==t.format||(i="URI with a scheme is expected."):i="URI is expected."}else i="URI expected.";i&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:t.patternErrorMessage||t.errorMessage||"String is not a URI: "+i});break;case"color-hex":case"date-time":case"date":case"time":case"email":var s=Zt[t.format];e.value&&s.pattern.exec(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:t.patternErrorMessage||t.errorMessage||s.errorMessage})}}(e,t,n);break;case"number":!function(e,t,n,r){var o=e.value;it(t.multipleOf)&&o%t.multipleOf!=0&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:"Value is not divisible by "+t.multipleOf+"."});function i(e,t){return it(t)?t:st(t)&&t?e:void 0}function a(e,t){if(!st(t)||!t)return e}var s=i(t.minimum,t.exclusiveMinimum);it(s)&&o<=s&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:"Value is below the exclusive minimum of "+s+"."});var l=i(t.maximum,t.exclusiveMaximum);it(l)&&o>=l&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:"Value is above the exclusive maximum of "+l+"."});var c=a(t.minimum,t.exclusiveMinimum);it(c)&&o<c&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:"Value is below the minimum of "+c+"."});var u=a(t.maximum,t.exclusiveMaximum);it(u)&&o>u&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:"Value is above the maximum of "+u+"."})}(e,t,n);break;case"property":return mn(e.valueNode,t,n,r)}!function(){function o(n){return e.type===n||"integer"===n&&"number"===e.type&&e.isInteger||t.nullable&&null===e.value}Array.isArray(t.type)?t.type.some(o)||n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:t.errorMessage||"Incorrect type. Expected one of "+t.type.join(", ")+"."}):t.type&&(o(t.type)||n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:t.errorMessage||'Incorrect type. Expected "'+t.type+'".'}));if(Array.isArray(t.allOf))for(var i=0,a=t.allOf;i<a.length;i++){var s=a[i];mn(e,cn(s),n,r)}var l=cn(t.not);if(l){var c=new pn,u=r.newSub();mn(e,l,c,u),c.hasProblems()||n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:"Matches a schema that is not allowed."});for(var f=0,p=u.schemas;f<p.length;f++){var d=p[f];d.inverted=!d.inverted,r.add(d)}}var h=function(t,o){for(var i=[],a=null,s=0,l=t;s<l.length;s++){var c=cn(l[s]),u=new pn,f=r.newSub();if(mn(e,c,u,f),u.hasProblems()||i.push(c),a)if(o||u.hasProblems()||a.validationResult.hasProblems()){var p=u.compare(a.validationResult);p>0?a={schema:c,validationResult:u,matchingSchemas:f}:0===p&&(a.matchingSchemas.merge(f),a.validationResult.mergeEnumValues(u))}else a.matchingSchemas.merge(f),a.validationResult.propertiesMatches+=u.propertiesMatches,a.validationResult.propertiesValueMatches+=u.propertiesValueMatches;else a={schema:c,validationResult:u,matchingSchemas:f}}return i.length>1&&o&&n.problems.push({location:{offset:e.offset,length:1},severity:Ve.Warning,message:"Matches multiple schemas when only one must validate."}),null!==a&&(n.merge(a.validationResult),n.propertiesMatches+=a.validationResult.propertiesMatches,n.propertiesValueMatches+=a.validationResult.propertiesValueMatches,r.merge(a.matchingSchemas)),i.length};Array.isArray(t.anyOf)&&h(t.anyOf,!1);Array.isArray(t.oneOf)&&h(t.oneOf,!0);var v=function(t){var o=new pn,i=r.newSub();mn(e,cn(t),o,i),n.merge(o),n.propertiesMatches+=o.propertiesMatches,n.propertiesValueMatches+=o.propertiesValueMatches,r.merge(i)},g=cn(t.if);g&&function(t,n,o){var i=cn(t),a=new pn,s=r.newSub();mn(e,i,a,s),r.merge(s),a.hasProblems()?o&&v(o):n&&v(n)}(g,cn(t.then),cn(t.else));if(Array.isArray(t.enum)){for(var m=dn(e),y=!1,b=0,x=t.enum;b<x.length;b++){var w=x[b];if(ot(m,w)){y=!0;break}}n.enumValues=t.enum,n.enumValueMatch=y,y||n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,code:Ht.EnumValueMismatch,message:t.errorMessage||"Value is not accepted. Valid values: "+t.enum.map((function(e){return JSON.stringify(e)})).join(", ")+"."})}if(at(t.const)){ot(m=dn(e),t.const)?n.enumValueMatch=!0:(n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,code:Ht.EnumValueMismatch,message:t.errorMessage||"Value must be "+JSON.stringify(t.const)+"."}),n.enumValueMatch=!1),n.enumValues=[t.const]}t.deprecationMessage&&e.parent&&n.problems.push({location:{offset:e.parent.offset,length:e.parent.length},severity:Ve.Warning,message:t.deprecationMessage})}(),r.add({node:e,schema:t})}}function yn(e,t){var n=[],r=-1,o=e.getText(),i=Ze(o,!1),a=t&&t.collectComments?[]:void 0;function s(){for(;;){var t=i.scan();switch(u(),t){case 12:case 13:Array.isArray(a)&&a.push(Me.create(e.positionAt(i.getTokenOffset()),e.positionAt(i.getTokenOffset()+i.getTokenLength())));break;case 15:case 14:break;default:return t}}}function l(t,o,i,a,s){if(void 0===s&&(s=Ve.Error),0===n.length||i!==r){var l=Me.create(e.positionAt(i),e.positionAt(a));n.push(We.create(l,t,s,o,e.languageId)),r=i}}function c(e,t,n,r,a){void 0===n&&(n=null),void 0===r&&(r=[]),void 0===a&&(a=[]);var c=i.getTokenOffset(),u=i.getTokenOffset()+i.getTokenLength();if(c===u&&c>0){for(c--;c>0&&/\s/.test(o.charAt(c));)c--;u=c+1}if(l(e,t,c,u),n&&f(n,!1),r.length+a.length>0)for(var p=i.getToken();17!==p;){if(-1!==r.indexOf(p)){s();break}if(-1!==a.indexOf(p))break;p=s()}return n}function u(){switch(i.getTokenError()){case 4:return c("Invalid unicode sequence in string.",Ht.InvalidUnicode),!0;case 5:return c("Invalid escape character in string.",Ht.InvalidEscapeCharacter),!0;case 3:return c("Unexpected end of number.",Ht.UnexpectedEndOfNumber),!0;case 1:return c("Unexpected end of comment.",Ht.UnexpectedEndOfComment),!0;case 2:return c("Unexpected end of string.",Ht.UnexpectedEndOfString),!0;case 6:return c("Invalid characters in string. Control characters must be escaped.",Ht.InvalidCharacter),!0}return!1}function f(e,t){return e.length=i.getTokenOffset()+i.getTokenLength()-e.offset,t&&s(),e}function p(t,n){var r=new sn(t,i.getTokenOffset()),o=d(r);if(!o){if(16!==i.getToken())return null;c("Property keys must be doublequoted",Ht.Undefined);var a=new an(r,i.getTokenOffset(),i.getTokenLength());a.value=i.getTokenValue(),o=a,s()}r.keyNode=o;var u=n[o.value];if(u?(l("Duplicate object key",Ht.DuplicateKey,r.keyNode.offset,r.keyNode.offset+r.keyNode.length,Ve.Warning),"object"==typeof u&&l("DuplicateKeyWarning",Ht.DuplicateKey,u.keyNode.offset,u.keyNode.offset+u.keyNode.length,Ve.Warning),n[o.value]=!0):n[o.value]=r,6===i.getToken())r.colonOffset=i.getTokenOffset(),s();else if(c("Colon expected",Ht.ColonExpected),10===i.getToken()&&e.positionAt(o.offset+o.length).line<e.positionAt(i.getTokenOffset()).line)return r.length=o.length,r;var f=h(r,o.value);return f?(r.valueNode=f,r.length=f.offset+f.length-r.offset,r):c("Value expected",Ht.ValueExpected,r,[],[2,5])}function d(e){if(10!==i.getToken())return null;var t=new an(e,i.getTokenOffset());return t.value=i.getTokenValue(),f(t,!0)}function h(e,t){return function(e){if(3!==i.getToken())return null;var t=new rn(e,i.getTokenOffset());s();for(var n=0,r=!1;4!==i.getToken()&&17!==i.getToken();){if(5===i.getToken()){r||c("Value expected",Ht.ValueExpected);var o=i.getTokenOffset();if(s(),4===i.getToken()){r&&l("Trailing comma",Ht.TrailingComma,o,o+1);continue}}else r&&c("Expected comma",Ht.CommaExpected);var a=h(t,n++);a?t.items.push(a):c("Value expected",Ht.ValueExpected,null,[],[4,5]),r=!0}return 4!==i.getToken()?c("Expected comma or closing bracket",Ht.CommaOrCloseBacketExpected,t):f(t,!0)}(e)||function(e){if(1!==i.getToken())return null;var t=new ln(e,i.getTokenOffset()),n=Object.create(null);s();for(var r=!1;2!==i.getToken()&&17!==i.getToken();){if(5===i.getToken()){r||c("Property expected",Ht.PropertyExpected);var o=i.getTokenOffset();if(s(),2===i.getToken()){r&&l("Trailing comma",Ht.TrailingComma,o,o+1);continue}}else r&&c("Expected comma",Ht.CommaExpected);var a=p(t,n);a?t.properties.push(a):c("Property expected",Ht.PropertyExpected,null,[],[2,5]),r=!0}return 2!==i.getToken()?c("Expected comma or closing brace",Ht.CommaOrCloseBraceExpected,t):f(t,!0)}(e)||d(e)||function(e){if(11!==i.getToken())return null;var t=new on(e,i.getTokenOffset());if(0===i.getTokenError()){var n=i.getTokenValue();try{var r=JSON.parse(n);if(!it(r))return c("Invalid number format.",Ht.Undefined,t);t.value=r}catch(e){return c("Invalid number format.",Ht.Undefined,t)}t.isInteger=-1===n.indexOf(".")}return f(t,!0)}(e)||function(e){switch(i.getToken()){case 7:return f(new tn(e,i.getTokenOffset()),!0);case 8:return f(new nn(e,!0,i.getTokenOffset()),!0);case 9:return f(new nn(e,!1,i.getTokenOffset()),!0);default:return null}}(e)}var v=null;return 17!==s()&&((v=h(null))?17!==i.getToken()&&c("End of file expected.",Ht.Undefined):c("Expected a JSON object, array or literal.",Ht.Undefined)),new gn(v,n,a)}function bn(e,t){var n=e.length-t.length;return n>0?e.lastIndexOf(t)===n:0===n&&e===t}var xn=[",","}","]"],wn=[":"],Cn=function(){function e(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=Promise),void 0===r&&(r={}),this.schemaService=e,this.contributions=t,this.promiseConstructor=n,this.clientCapabilities=r,this.templateVarIdCounter=0}return e.prototype.doResolve=function(e){for(var t=this.contributions.length-1;t>=0;t--)if(this.contributions[t].resolveCompletion){var n=this.contributions[t].resolveCompletion(e);if(n)return n}return this.promiseConstructor.resolve(e)},e.prototype.doComplete=function(e,t,n){var r=this,o={items:[],isIncomplete:!1},i=e.getText(),a=e.offsetAt(t),s=n.getNodeFromOffset(a,!0);if(this.isInComment(e,s?s.offset:0,a))return Promise.resolve(o);if(s&&a===s.offset+s.length&&a>0){var l=i[a-1];("object"===s.type&&"}"===l||"array"===s.type&&"]"===l)&&(s=s.parent)}var c=this.getCurrentWord(e,a),u=null;if(!s||"string"!==s.type&&"number"!==s.type&&"boolean"!==s.type&&"null"!==s.type){var f=a-c.length;f>0&&'"'===i[f-1]&&f--,u=Me.create(e.positionAt(f),t)}else u=Me.create(e.positionAt(s.offset),e.positionAt(s.offset+s.length));var p=this.doesSupportsCommitCharacters(),d={},h={add:function(e){var t=d[e.label];t?t.documentation||(t.documentation=e.documentation):(d[e.label]=e,u&&(e.textEdit=He.replace(u,e.insertText)),p&&(e.commitCharacters=e.kind===ht.Property?wn:xn),o.items.push(e))},setAsIncomplete:function(){o.isIncomplete=!0},error:function(e){console.error(e)},log:function(e){console.log(e)},getNumberOfProposals:function(){return o.items.length}};return this.schemaService.getSchemaForResource(e.uri,n).then((function(t){var l=[],f=!0,p="",v=null;if(s&&"string"===s.type){var g=s.parent;g&&"property"===g.type&&g.keyNode===s&&(f=!g.valueNode,v=g,p=i.substr(s.offset+1,s.length-2),g&&(s=g.parent))}if(s&&"object"===s.type){if(s.offset===a)return o;s.properties.forEach((function(e){v&&v===e||(d[e.keyNode.value]=bt.create("__"))}));var m="";f&&(m=r.evaluateSeparatorAfter(e,e.offsetAt(u.end))),t?r.getPropertyCompletions(t,n,s,f,m,h):r.getSchemaLessPropertyCompletions(n,s,p,h);var y=hn(s);r.contributions.forEach((function(t){var n=t.collectPropertyCompletions(e.uri,y,c,f,""===m,h);n&&l.push(n)})),!t&&c.length>0&&'"'!==i.charAt(a-c.length-1)&&(h.add({kind:ht.Property,label:r.getLabelForValue(c),insertText:r.getInsertTextForProperty(c,null,!1,m),insertTextFormat:vt.Snippet,documentation:""}),h.setAsIncomplete())}var b={};return t?r.getValueCompletions(t,n,s,a,e,h,b):r.getSchemaLessValueCompletions(n,s,a,e,h),r.contributions.length>0&&r.getContributedValueCompletions(n,s,a,e,h,l),r.promiseConstructor.all(l).then((function(){if(0===h.getNumberOfProposals()){var t=a;!s||"string"!==s.type&&"number"!==s.type&&"boolean"!==s.type&&"null"!==s.type||(t=s.offset+s.length);var n=r.evaluateSeparatorAfter(e,t);r.addFillerValueCompletions(b,n,h)}return o}))}))},e.prototype.getPropertyCompletions=function(e,t,n,r,o,i){var a=this;t.getMatchingSchemas(e.schema,n.offset).forEach((function(e){if(e.node===n&&!e.inverted){var t=e.schema.properties;t&&Object.keys(t).forEach((function(e){var n=t[e],s=!1;if("object"==typeof n&&n.allOf)for(var l=0,c=n.allOf;l<c.length;l++){if(c[l].readOnly){s=!0;break}}if("object"==typeof n&&!n.deprecationMessage&&!n.doNotSuggest&&!s){var u={kind:ht.Property,label:a.sanitizeLabel(e),insertText:a.getInsertTextForProperty(e,n,r,o),insertTextFormat:vt.Snippet,filterText:a.getFilterTextForValue(e),documentation:a.fromMarkup(n.markdownDescription)||n.description||""};bn(u.insertText,"$1"+o)&&(u.command={title:"Suggest",command:"editor.action.triggerSuggest"}),i.add(u)}}))}}))},e.prototype.getSchemaLessPropertyCompletions=function(e,t,n,r){var o=this,i=function(e){e.properties.forEach((function(e){var t=e.keyNode.value;r.add({kind:ht.Property,label:o.sanitizeLabel(t),insertText:o.getInsertTextForValue(t,""),insertTextFormat:vt.Snippet,filterText:o.getFilterTextForValue(t),documentation:""})}))};if(t.parent)if("property"===t.parent.type){var a=t.parent.keyNode.value;e.visit((function(e){return"property"===e.type&&e!==t.parent&&e.keyNode.value===a&&e.valueNode&&"object"===e.valueNode.type&&i(e.valueNode),!0}))}else"array"===t.parent.type&&t.parent.items.forEach((function(e){"object"===e.type&&e!==t&&i(e)}));else"object"===t.type&&r.add({kind:ht.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",null,!0,""),insertTextFormat:vt.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})},e.prototype.getSchemaLessValueCompletions=function(e,t,n,r,o){var i=this,a=n;if(!t||"string"!==t.type&&"number"!==t.type&&"boolean"!==t.type&&"null"!==t.type||(a=t.offset+t.length,t=t.parent),!t)return o.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:vt.Snippet,documentation:""}),void o.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:vt.Snippet,documentation:""});var s=this.evaluateSeparatorAfter(r,a),l=function(e){vn(e.parent,n,!0)||o.add({kind:i.getSuggestionKind(e.type),label:i.getLabelTextForMatchingNode(e,r),insertText:i.getInsertTextForMatchingNode(e,r,s),insertTextFormat:vt.Snippet,documentation:""}),"boolean"===e.type&&i.addBooleanValueCompletion(!e.value,s,o)};if("property"===t.type&&n>t.colonOffset){var c=t.valueNode;if(c&&(n>c.offset+c.length||"object"===c.type||"array"===c.type))return;var u=t.keyNode.value;e.visit((function(e){return"property"===e.type&&e.keyNode.value===u&&e.valueNode&&l(e.valueNode),!0})),"$schema"===u&&t.parent&&!t.parent.parent&&this.addDollarSchemaCompletions(s,o)}if("array"===t.type)if(t.parent&&"property"===t.parent.type){var f=t.parent.keyNode.value;e.visit((function(e){return"property"===e.type&&e.keyNode.value===f&&e.valueNode&&"array"===e.valueNode.type&&e.valueNode.items.forEach(l),!0}))}else t.items.forEach(l)},e.prototype.getValueCompletions=function(e,t,n,r,o,i,a){var s=this,l=r,c=null,u=null;if(!n||"string"!==n.type&&"number"!==n.type&&"boolean"!==n.type&&"null"!==n.type||(l=n.offset+n.length,u=n,n=n.parent),n){if("property"===n.type&&r>n.colonOffset){var f=n.valueNode;if(f&&r>f.offset+f.length)return;c=n.keyNode.value,n=n.parent}if(n&&(null!==c||"array"===n.type)){var p=this.evaluateSeparatorAfter(o,l);t.getMatchingSchemas(e.schema,n.offset,u).forEach((function(e){if(e.node===n&&!e.inverted&&e.schema){if("array"===n.type&&e.schema.items)if(Array.isArray(e.schema.items)){var t=s.findItemAtOffset(n,o,r);t<e.schema.items.length&&s.addSchemaValueCompletions(e.schema.items[t],p,i,a)}else s.addSchemaValueCompletions(e.schema.items,p,i,a);if(e.schema.properties){var l=e.schema.properties[c];l&&s.addSchemaValueCompletions(l,p,i,a)}}})),"$schema"!==c||n.parent||this.addDollarSchemaCompletions(p,i),a.boolean&&(this.addBooleanValueCompletion(!0,p,i),this.addBooleanValueCompletion(!1,p,i)),a.null&&this.addNullValueCompletion(p,i)}}else this.addSchemaValueCompletions(e.schema,"",i,a)},e.prototype.getContributedValueCompletions=function(e,t,n,r,o,i){if(t){if("string"!==t.type&&"number"!==t.type&&"boolean"!==t.type&&"null"!==t.type||(t=t.parent),"property"===t.type&&n>t.colonOffset){var a=t.keyNode.value,s=t.valueNode;if(!s||n<=s.offset+s.length){var l=hn(t.parent);this.contributions.forEach((function(e){var t=e.collectValueCompletions(r.uri,l,a,o);t&&i.push(t)}))}}}else this.contributions.forEach((function(e){var t=e.collectDefaultCompletions(r.uri,o);t&&i.push(t)}))},e.prototype.addSchemaValueCompletions=function(e,t,n,r){var o=this;"object"==typeof e&&(this.addEnumValueCompletions(e,t,n),this.addDefaultValueCompletions(e,t,n),this.collectTypes(e,r),Array.isArray(e.allOf)&&e.allOf.forEach((function(e){return o.addSchemaValueCompletions(e,t,n,r)})),Array.isArray(e.anyOf)&&e.anyOf.forEach((function(e){return o.addSchemaValueCompletions(e,t,n,r)})),Array.isArray(e.oneOf)&&e.oneOf.forEach((function(e){return o.addSchemaValueCompletions(e,t,n,r)})))},e.prototype.addDefaultValueCompletions=function(e,t,n,r){var o=this;void 0===r&&(r=0);var i=!1;if(at(e.default)){for(var a=e.type,s=e.default,l=r;l>0;l--)s=[s],a="array";n.add({kind:this.getSuggestionKind(a),label:this.getLabelForValue(s),insertText:this.getInsertTextForValue(s,t),insertTextFormat:vt.Snippet}),i=!0}Array.isArray(e.examples)&&e.examples.forEach((function(a){for(var s=e.type,l=a,c=r;c>0;c--)l=[l],s="array";n.add({kind:o.getSuggestionKind(s),label:o.getLabelForValue(l),insertText:o.getInsertTextForValue(l,t),insertTextFormat:vt.Snippet}),i=!0})),Array.isArray(e.defaultSnippets)&&e.defaultSnippets.forEach((function(a){var s,l,c=e.type,u=a.body,f=a.label;if(at(u)){e.type;for(var p=r;p>0;p--)u=[u],"array";s=o.getInsertTextForSnippetValue(u,t),l=o.getFilterTextForSnippetValue(u),f=f||o.getLabelForSnippetValue(u)}else if("string"==typeof a.bodyText){var d="",h="",v="";for(p=r;p>0;p--)d=d+v+"[\n",h=h+"\n"+v+"]",v+="\t",c="array";s=d+v+a.bodyText.split("\n").join("\n"+v)+h+t,f=f||o.sanitizeLabel(s),l=s.replace(/[\n]/g,"")}n.add({kind:o.getSuggestionKind(c),label:f,documentation:o.fromMarkup(a.markdownDescription)||a.description,insertText:s,insertTextFormat:vt.Snippet,filterText:l}),i=!0})),i||"object"!=typeof e.items||Array.isArray(e.items)||this.addDefaultValueCompletions(e.items,t,n,r+1)},e.prototype.addEnumValueCompletions=function(e,t,n){if(at(e.const)&&n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(e.const),insertText:this.getInsertTextForValue(e.const,t),insertTextFormat:vt.Snippet,documentation:this.fromMarkup(e.markdownDescription)||e.description}),Array.isArray(e.enum))for(var r=0,o=e.enum.length;r<o;r++){var i=e.enum[r],a=this.fromMarkup(e.markdownDescription)||e.description;e.markdownEnumDescriptions&&r<e.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?a=this.fromMarkup(e.markdownEnumDescriptions[r]):e.enumDescriptions&&r<e.enumDescriptions.length&&(a=e.enumDescriptions[r]),n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(i),insertText:this.getInsertTextForValue(i,t),insertTextFormat:vt.Snippet,documentation:a})}},e.prototype.collectTypes=function(e,t){if(!Array.isArray(e.enum)&&!at(e.const)){var n=e.type;Array.isArray(n)?n.forEach((function(e){return t[e]=!0})):t[n]=!0}},e.prototype.addFillerValueCompletions=function(e,t,n){e.object&&n.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},t),insertTextFormat:vt.Snippet,detail:"New object",documentation:""}),e.array&&n.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],t),insertTextFormat:vt.Snippet,detail:"New array",documentation:""})},e.prototype.addBooleanValueCompletion=function(e,t,n){n.add({kind:this.getSuggestionKind("boolean"),label:e?"true":"false",insertText:this.getInsertTextForValue(e,t),insertTextFormat:vt.Snippet,documentation:""})},e.prototype.addNullValueCompletion=function(e,t){t.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+e,insertTextFormat:vt.Snippet,documentation:""})},e.prototype.addDollarSchemaCompletions=function(e,t){var n=this;this.schemaService.getRegisteredSchemaIds((function(e){return"http"===e||"https"===e})).forEach((function(r){return t.add({kind:ht.Module,label:n.getLabelForValue(r),filterText:n.getFilterTextForValue(r),insertText:n.getInsertTextForValue(r,e),insertTextFormat:vt.Snippet,documentation:""})}))},e.prototype.sanitizeLabel=function(e){return(e=e.replace(/[\n]/g,"↵")).length>57&&(e=e.substr(0,57).trim()+"..."),e},e.prototype.getLabelForValue=function(e){return this.sanitizeLabel(JSON.stringify(e))},e.prototype.getFilterTextForValue=function(e){return JSON.stringify(e)},e.prototype.getFilterTextForSnippetValue=function(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")},e.prototype.getLabelForSnippetValue=function(e){var t=JSON.stringify(e);return t=t.replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1"),this.sanitizeLabel(t)},e.prototype.getInsertTextForPlainText=function(e){return e.replace(/[\\\$\}]/g,"\\$&")},e.prototype.getInsertTextForValue=function(e,t){var n=JSON.stringify(e,null,"\t");return"{}"===n?"{$1}"+t:"[]"===n?"[$1]"+t:this.getInsertTextForPlainText(n+t)},e.prototype.getInsertTextForSnippetValue=function(e,t){return function e(t,n,r){if(null!==t&&"object"==typeof t){var o=n+"\t";if(Array.isArray(t)){if(0===t.length)return"[]";for(var i="[\n",a=0;a<t.length;a++)i+=o+e(t[a],o,r),a<t.length-1&&(i+=","),i+="\n";return i+=n+"]"}var s=Object.keys(t);if(0===s.length)return"{}";for(i="{\n",a=0;a<s.length;a++){var l=s[a];i+=o+JSON.stringify(l)+": "+e(t[l],o,r),a<s.length-1&&(i+=","),i+="\n"}return i+=n+"}"}return r(t)}(e,"",(function(e){return"string"==typeof e&&"^"===e[0]?e.substr(1):JSON.stringify(e)}))+t},e.prototype.getInsertTextForGuessedValue=function(e,t){switch(typeof e){case"object":return null===e?"${1:null}"+t:this.getInsertTextForValue(e,t);case"string":var n=JSON.stringify(e);return n=n.substr(1,n.length-2),'"${1:'+(n=this.getInsertTextForPlainText(n))+'}"'+t;case"number":case"boolean":return"${1:"+JSON.stringify(e)+"}"+t}return this.getInsertTextForValue(e,t)},e.prototype.getSuggestionKind=function(e){if(Array.isArray(e)){var t=e;e=t.length>0?t[0]:null}if(!e)return ht.Value;switch(e){case"string":return ht.Value;case"object":return ht.Module;case"property":return ht.Property;default:return ht.Value}},e.prototype.getLabelTextForMatchingNode=function(e,t){switch(e.type){case"array":return"[]";case"object":return"{}";default:return t.getText().substr(e.offset,e.length)}},e.prototype.getInsertTextForMatchingNode=function(e,t,n){switch(e.type){case"array":return this.getInsertTextForValue([],n);case"object":return this.getInsertTextForValue({},n);default:var r=t.getText().substr(e.offset,e.length)+n;return this.getInsertTextForPlainText(r)}},e.prototype.getInsertTextForProperty=function(e,t,n,r){var o=this.getInsertTextForValue(e,"");if(!n)return o;var i,a=o+": ",s=0;if(t){if(Array.isArray(t.defaultSnippets)){if(1===t.defaultSnippets.length){var l=t.defaultSnippets[0].body;at(l)&&(i=this.getInsertTextForSnippetValue(l,""))}s+=t.defaultSnippets.length}if(t.enum&&(i||1!==t.enum.length||(i=this.getInsertTextForGuessedValue(t.enum[0],"")),s+=t.enum.length),at(t.default)&&(i||(i=this.getInsertTextForGuessedValue(t.default,"")),s++),0===s){var c=Array.isArray(t.type)?t.type[0]:t.type;switch(c||(t.properties?c="object":t.items&&(c="array")),c){case"boolean":i="$1";break;case"string":i='"$1"';break;case"object":i="{$1}";break;case"array":i="[$1]";break;case"number":case"integer":i="${1:0}";break;case"null":i="${1:null}";break;default:return o}}}return(!i||s>1)&&(i="$1"),a+i+r},e.prototype.getCurrentWord=function(e,t){for(var n=t-1,r=e.getText();n>=0&&-1===' \t\n\r\v":{[,]}'.indexOf(r.charAt(n));)n--;return r.substring(n+1,t)},e.prototype.evaluateSeparatorAfter=function(e,t){var n=Ze(e.getText(),!0);switch(n.setPosition(t),n.scan()){case 5:case 2:case 4:case 17:return"";default:return","}},e.prototype.findItemAtOffset=function(e,t,n){for(var r=Ze(t.getText(),!0),o=e.items,i=o.length-1;i>=0;i--){var a=o[i];if(n>a.offset+a.length)return r.setPosition(a.offset+a.length),5===r.scan()&&n>=r.getTokenOffset()+r.getTokenLength()?i+1:i;if(n>=a.offset)return i}return 0},e.prototype.isInComment=function(e,t,n){var r=Ze(e.getText(),!1);r.setPosition(t);for(var o=r.scan();17!==o&&r.getTokenOffset()+r.getTokenLength()<n;)o=r.scan();return(12===o||13===o)&&r.getTokenOffset()<=n},e.prototype.fromMarkup=function(e){if(e&&this.doesSupportMarkdown())return{kind:pt.Markdown,value:e}},e.prototype.doesSupportMarkdown=function(){if(!at(this.supportsMarkdown)){var e=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsMarkdown=e&&e.completionItem&&Array.isArray(e.completionItem.documentationFormat)&&-1!==e.completionItem.documentationFormat.indexOf(pt.Markdown)}return this.supportsMarkdown},e.prototype.doesSupportsCommitCharacters=function(){if(!at(this.supportsCommitCharacters)){var e=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsCommitCharacters=e&&e.completionItem&&!!e.completionItem.commitCharactersSupport}return this.supportsCommitCharacters},e}(),An=function(){function e(e,t,n){void 0===t&&(t=[]),this.schemaService=e,this.contributions=t,this.promise=n||Promise}return e.prototype.doHover=function(e,t,n){var r=e.offsetAt(t),o=n.getNodeFromOffset(r);if(!o||("object"===o.type||"array"===o.type)&&r>o.offset+1&&r<o.offset+o.length-1)return this.promise.resolve(null);var i=o;if("string"===o.type){var a=o.parent;if(a&&"property"===a.type&&a.keyNode===o&&!(o=a.valueNode))return this.promise.resolve(null)}for(var s=Me.create(e.positionAt(i.offset),e.positionAt(i.offset+i.length)),l=function(e){return{contents:e,range:s}},c=hn(o),u=this.contributions.length-1;u>=0;u--){var f=this.contributions[u].getInfoContribution(e.uri,c);if(f)return f.then((function(e){return l(e)}))}return this.schemaService.getSchemaForResource(e.uri,n).then((function(e){if(e){var t=n.getMatchingSchemas(e.schema,o.offset),r=null,i=null,a=null,s=null;t.every((function(e){if(e.node===o&&!e.inverted&&e.schema&&(r=r||e.schema.title,i=i||e.schema.markdownDescription||kn(e.schema.description),e.schema.enum)){var t=e.schema.enum.indexOf(dn(o));e.schema.markdownEnumDescriptions?a=e.schema.markdownEnumDescriptions[t]:e.schema.enumDescriptions&&(a=kn(e.schema.enumDescriptions[t])),a&&"string"!=typeof(s=e.schema.enum[t])&&(s=JSON.stringify(s))}return!0}));var c="";return r&&(c=kn(r)),i&&(c.length>0&&(c+="\n\n"),c+=i),a&&(c.length>0&&(c+="\n\n"),c+="`"+function(e){if(-1!==e.indexOf("`"))return"`` "+e+" ``";return e}(s)+"`: "+a),l([c])}return null}))},e}();function kn(e){if(e)return e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,"$1\n\n$3").replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}var On=n(795),Sn=function(){function e(e){try{this.patternRegExp=new RegExp(function(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}(e)+"$")}catch(e){this.patternRegExp=null}this.schemas=[]}return e.prototype.addSchema=function(e){this.schemas.push(e)},e.prototype.matchesPattern=function(e){return this.patternRegExp&&this.patternRegExp.test(e)},e.prototype.getSchemas=function(){return this.schemas},e}(),En=function(){function e(e,t,n){this.service=e,this.url=t,this.dependencies={},n&&(this.unresolvedSchema=this.service.promise.resolve(new jn(n)))}return e.prototype.getUnresolvedSchema=function(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.url)),this.unresolvedSchema},e.prototype.getResolvedSchema=function(){var e=this;return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then((function(t){return e.service.resolveSchemaContent(t,e.url,e.dependencies)}))),this.resolvedSchema},e.prototype.clearSchema=function(){this.resolvedSchema=null,this.unresolvedSchema=null,this.dependencies={}},e}(),jn=function(e,t){void 0===t&&(t=[]),this.schema=e,this.errors=t},Tn=function(){function e(e,t){void 0===t&&(t=[]),this.schema=e,this.errors=t}return e.prototype.getSection=function(e){return cn(this.getSectionRecursive(e,this.schema))},e.prototype.getSectionRecursive=function(e,t){if(!t||"boolean"==typeof t||0===e.length)return t;var n=e.shift();if(t.properties&&(t.properties[n],1))return this.getSectionRecursive(e,t.properties[n]);if(t.patternProperties)for(var r=0,o=Object.keys(t.patternProperties);r<o.length;r++){var i=o[r];if(new RegExp(i).test(n))return this.getSectionRecursive(e,t.patternProperties[i])}else{if("object"==typeof t.additionalProperties)return this.getSectionRecursive(e,t.additionalProperties);if(n.match("[0-9]+"))if(Array.isArray(t.items)){var a=parseInt(n,10);if(!isNaN(a)&&t.items[a])return this.getSectionRecursive(e,t.items[a])}else if(t.items)return this.getSectionRecursive(e,t.items)}return null},e}(),Mn=function(){function e(e,t,n){this.contextService=t,this.requestService=e,this.promiseConstructor=n||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations={},this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={}}return e.prototype.getRegisteredSchemaIds=function(e){return Object.keys(this.registeredSchemasIds).filter((function(t){var n=On.a.parse(t).scheme;return"schemaservice"!==n&&(!e||e(n))}))},Object.defineProperty(e.prototype,"promise",{get:function(){return this.promiseConstructor},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()},e.prototype.onResourceChange=function(e){for(var t=this,n=!1,r=[e=this.normalizeId(e)],o=Object.keys(this.schemasById).map((function(e){return t.schemasById[e]}));r.length;)for(var i=r.pop(),a=0;a<o.length;a++){var s=o[a];s&&(s.url===i||s.dependencies[i])&&(s.url!==i&&r.push(s.url),s.clearSchema(),o[a]=void 0,n=!0)}return n},e.prototype.normalizeId=function(e){try{return On.a.parse(e).toString()}catch(t){return e}},e.prototype.setSchemaContributions=function(e){if(e.schemas){var t=e.schemas;for(var n in t){var r=this.normalizeId(n);this.contributionSchemas[r]=this.addSchemaHandle(r,t[n])}}if(e.schemaAssociations){var o=e.schemaAssociations;for(var i in o){var a=o[i];this.contributionAssociations[i]=a;for(var s=this.getOrAddFilePatternAssociation(i),l=0,c=a;l<c.length;l++){var u=c[l];n=this.normalizeId(u);s.addSchema(n)}}}},e.prototype.addSchemaHandle=function(e,t){var n=new En(this,e,t);return this.schemasById[e]=n,n},e.prototype.getOrAddSchemaHandle=function(e,t){return this.schemasById[e]||this.addSchemaHandle(e,t)},e.prototype.getOrAddFilePatternAssociation=function(e){var t=this.filePatternAssociationById[e];return t||(t=new Sn(e),this.filePatternAssociationById[e]=t,this.filePatternAssociations.push(t)),t},e.prototype.registerExternalSchema=function(e,t,n){void 0===t&&(t=null);var r=this.normalizeId(e);if(this.registeredSchemasIds[r]=!0,t)for(var o=0,i=t;o<i.length;o++){var a=i[o];this.getOrAddFilePatternAssociation(a).addSchema(r)}return n?this.addSchemaHandle(r,n):this.getOrAddSchemaHandle(r)},e.prototype.clearExternalSchemas=function(){for(var e in this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={},this.contributionSchemas)this.schemasById[e]=this.contributionSchemas[e],this.registeredSchemasIds[e]=!0;for(var t in this.contributionAssociations)for(var n=this.getOrAddFilePatternAssociation(t),r=0,o=this.contributionAssociations[t];r<o.length;r++){var i=o[r];e=this.normalizeId(i);n.addSchema(e)}},e.prototype.getResolvedSchema=function(e){var t=this.normalizeId(e),n=this.schemasById[t];return n?n.getResolvedSchema():this.promise.resolve(null)},e.prototype.loadSchema=function(e){if(!this.requestService){var t="Unable to load schema from '"+Pn(e)+"'. No schema request service available";return this.promise.resolve(new jn({},[t]))}return this.requestService(e).then((function(t){if(!t){var n="Unable to load schema from '"+Pn(e)+"': No content.";return new jn({},[n])}var r,o=[];r=et(t,o);var i=o.length?["Unable to parse content from '"+Pn(e)+"': Parse error at offset "+o[0].offset]:[];return new jn(r,i)}),(function(t){var n="Unable to load schema from '"+Pn(e)+"': "+t.toString();return new jn({},[n])}))},e.prototype.resolveSchemaContent=function(e,t,n){var r=this,o=e.errors.slice(0),i=e.schema;if(i.$schema){var a=this.normalizeId(i.$schema);if("http://json-schema.org/draft-03/schema"===a)return this.promise.resolve(new Tn({},["Draft-03 schemas are not supported."]));"https://json-schema.org/draft/2019-09/schema"===a&&e.errors.push("Draft 2019-09 schemas are not yet fully supported.")}var s=this.contextService,l=function(e,t,n,r){var i=function(e,t){if(!t)return e;var n=e;return"/"===t[0]&&(t=t.substr(1)),t.split("/").some((function(e){return!(n=n[e])})),n}(t,r);if(i)for(var a in i)i.hasOwnProperty(a)&&!e.hasOwnProperty(a)&&(e[a]=i[a]);else o.push("$ref '"+r+"' in '"+n+"' can not be resolved.")},c=function(e,t,n,i,a){s&&!/^\w+:\/\/.*/.test(t)&&(t=s.resolveRelativePath(t,i)),t=r.normalizeId(t);var c=r.getOrAddSchemaHandle(t);return c.getUnresolvedSchema().then((function(r){if(a[t]=!0,r.errors.length){var i=n?t+"#"+n:t;o.push("Problems loading reference '"+i+"': "+r.errors[0]+".")}return l(e,r.schema,t,n),u(e,r.schema,t,c.dependencies)}))},u=function(e,t,n,o){if(!e||"object"!=typeof e)return Promise.resolve(null);for(var i=[e],a=[],s=[],u=function(e){for(var r=[];e.$ref;){var a=e.$ref,u=a.split("#",2);if(delete e.$ref,u[0].length>0)return void s.push(c(e,u[0],u[1],n,o));-1===r.indexOf(a)&&(l(e,t,n,u[1]),r.push(a))}!function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++){var o=r[n];"object"==typeof o&&i.push(o)}}(e.items,e.additionalProperties,e.not,e.contains,e.propertyNames,e.if,e.then,e.else),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++){var o=r[n];if("object"==typeof o)for(var a in o){var s=o[a];"object"==typeof s&&i.push(s)}}}(e.definitions,e.properties,e.patternProperties,e.dependencies),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++){var o=r[n];if(Array.isArray(o))for(var a=0,s=o;a<s.length;a++){var l=s[a];"object"==typeof l&&i.push(l)}}}(e.anyOf,e.allOf,e.oneOf,e.items)};i.length;){var f=i.pop();a.indexOf(f)>=0||(a.push(f),u(f))}return r.promise.all(s)};return u(i,i,t,n).then((function(e){return new Tn(i,o)}))},e.prototype.getSchemaForResource=function(e,t){if(t&&t.root&&"object"===t.root.type){var n=t.root.properties.filter((function(e){return"$schema"===e.keyNode.value&&e.valueNode&&"string"===e.valueNode.type}));if(n.length>0){var r=dn(n[0].valueNode);if(r&&function(e,t){if(e.length<t.length)return!1;for(var n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0}(r,".")&&this.contextService&&(r=this.contextService.resolveRelativePath(r,e)),r){var o=this.normalizeId(r);return this.getOrAddSchemaHandle(o).getResolvedSchema()}}}for(var i=Object.create(null),a=[],s=0,l=this.filePatternAssociations;s<l.length;s++){var c=l[s];if(c.matchesPattern(e))for(var u=0,f=c.getSchemas();u<f.length;u++){var p=f[u];i[p]||(a.push(p),i[p]=!0)}}return a.length>0?this.createCombinedSchema(e,a).getResolvedSchema():this.promise.resolve(null)},e.prototype.createCombinedSchema=function(e,t){if(1===t.length)return this.getOrAddSchemaHandle(t[0]);var n="schemaservice://combinedSchema/"+encodeURIComponent(e),r={allOf:t.map((function(e){return{$ref:e}}))};return this.addSchemaHandle(n,r)},e}();function Pn(e){return e}var In=function(){function e(e,t){this.jsonSchemaService=e,this.promise=t,this.validationEnabled=!0}return e.prototype.configure=function(e){e&&(this.validationEnabled=e.validate,this.commentSeverity=e.allowComments?void 0:Ve.Error)},e.prototype.doValidation=function(e,t,n,r){var o=this;if(!this.validationEnabled)return this.promise.resolve([]);var i=[],a={},s=function(e){var t=e.range.start.line+" "+e.range.start.character+" "+e.message;a[t]||(a[t]=!0,i.push(e))},l=function(r){var a=n?Ln(n.trailingCommas):Ve.Error,l=n?Ln(n.comments):o.commentSeverity;if(r){if(r.errors.length&&t.root){var c=t.root,u="object"===c.type?c.properties[0]:null;if(u&&"$schema"===u.keyNode.value){var f=u.valueNode||u,p=Me.create(e.positionAt(f.offset),e.positionAt(f.offset+f.length));s(We.create(p,r.errors[0],Ve.Warning,Ht.SchemaResolveError))}else{p=Me.create(e.positionAt(c.offset),e.positionAt(c.offset+1));s(We.create(p,r.errors[0],Ve.Warning,Ht.SchemaResolveError))}}else{var d=t.validate(e,r.schema);d&&d.forEach(s)}(function e(t){if(t&&"object"==typeof t){if(st(t.allowComments))return t.allowComments;if(t.allOf)for(var n=0,r=t.allOf;n<r.length;n++){var o=r[n],i=e(o);if(st(i))return i}}return})(r.schema)&&(l=void 0),function e(t){if(t&&"object"==typeof t){if(st(t.allowTrailingCommas))return t.allowTrailingCommas;if(st(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(t.allOf)for(var n=0,r=t.allOf;n<r.length;n++){var o=r[n],i=e(o);if(st(i))return i}}return}(r.schema)&&(a=void 0)}for(var h=0,v=t.syntaxErrors;h<v.length;h++){var g=v[h];if(g.code===Ht.TrailingComma){if("number"!=typeof a)continue;g.severity=a}s(g)}if("number"==typeof l){t.comments.forEach((function(e){s(We.create(e,"Comments are not permitted in JSON.",l,Ht.CommentNotPermitted))}))}return i};if(r){var c=r.id||"schemaservice://untitled/"+Fn++;return this.jsonSchemaService.resolveSchemaContent(new jn(r),c,{}).then((function(e){return l(e)}))}return this.jsonSchemaService.getSchemaForResource(e.uri,t).then((function(e){return l(e)}))},e}(),Fn=0;function Ln(e){switch(e){case"error":return Ve.Error;case"warning":return Ve.Warning;case"ignore":return}}function Nn(e){return e<48?0:e<=57?e-48:(e<97&&(e+=32),e>=97&&e<=102?e-97+10:0)}function _n(e){if("#"!==e[0])return null;switch(e.length){case 4:return{red:17*Nn(e.charCodeAt(1))/255,green:17*Nn(e.charCodeAt(2))/255,blue:17*Nn(e.charCodeAt(3))/255,alpha:1};case 5:return{red:17*Nn(e.charCodeAt(1))/255,green:17*Nn(e.charCodeAt(2))/255,blue:17*Nn(e.charCodeAt(3))/255,alpha:17*Nn(e.charCodeAt(4))/255};case 7:return{red:(16*Nn(e.charCodeAt(1))+Nn(e.charCodeAt(2)))/255,green:(16*Nn(e.charCodeAt(3))+Nn(e.charCodeAt(4)))/255,blue:(16*Nn(e.charCodeAt(5))+Nn(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(16*Nn(e.charCodeAt(1))+Nn(e.charCodeAt(2)))/255,green:(16*Nn(e.charCodeAt(3))+Nn(e.charCodeAt(4)))/255,blue:(16*Nn(e.charCodeAt(5))+Nn(e.charCodeAt(6)))/255,alpha:(16*Nn(e.charCodeAt(7))+Nn(e.charCodeAt(8)))/255}}return null}var Dn=function(){function e(e){this.schemaService=e}return e.prototype.findDocumentSymbols=function(e,t,n){var r=this;void 0===n&&(n={resultLimit:Number.MAX_VALUE});var o=t.root;if(!o)return null;var i=n.resultLimit,a=e.uri;if(("vscode://defaultsettings/keybindings.json"===a||bn(a.toLowerCase(),"/user/keybindings.json"))&&"array"===o.type){for(var s=[],l=0,c=o.items;l<c.length;l++){var u=c[l];if("object"===u.type)for(var f=0,p=u.properties;f<p.length;f++){var d=p[f];if("key"===d.keyNode.value&&d.valueNode){var h=Pe.create(e.uri,Rn(e,u));if(s.push({name:dn(d.valueNode),kind:Et.Function,location:h}),--i<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(a),s}}}return s}var v=function(t,n,o){return i>=0&&("array"===n.type?n.items.forEach((function(e){return v(t,e,o)})):"object"===n.type&&n.properties.forEach((function(n){if(i>=0){var a=n.valueNode;if(a){i--;var s=Pe.create(e.uri,Rn(e,n)),l=o?o+"."+n.keyNode.value:n.keyNode.value;t.push({name:r.getKeyLabel(n),kind:r.getSymbolKind(a.type),location:s,containerName:o}),v(t,a,l)}}}))),t},g=v([],o,void 0);return i<0&&(g.pop(),n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(a)),g},e.prototype.findDocumentSymbols2=function(e,t,n){var r=this;void 0===n&&(n={resultLimit:Number.MAX_VALUE});var o=t.root;if(!o)return null;var i=n.resultLimit,a=e.uri;if(("vscode://defaultsettings/keybindings.json"===a||bn(a.toLowerCase(),"/user/keybindings.json"))&&"array"===o.type){for(var s=[],l=0,c=o.items;l<c.length;l++){var u=c[l];if("object"===u.type)for(var f=0,p=u.properties;f<p.length;f++){var d=p[f];if("key"===d.keyNode.value&&d.valueNode){var h=Rn(e,u),v=Rn(e,d.keyNode);if(s.push({name:dn(d.valueNode),kind:Et.Function,range:h,selectionRange:v}),--i<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(a),s}}}return s}var g=function(t,n){return i>=0&&("array"===n.type?n.items.forEach((function(n,o){if(n&&i>=0){i--;var a=Rn(e,n),s=a,l=String(o),c=g([],n);t.push({name:l,kind:r.getSymbolKind(n.type),range:a,selectionRange:s,children:c})}})):"object"===n.type&&n.properties.forEach((function(n){var o=n.valueNode;if(o&&i>=0){i--;var a=Rn(e,n),s=Rn(e,n.keyNode),l=g([],o);t.push({name:r.getKeyLabel(n),kind:r.getSymbolKind(o.type),range:a,selectionRange:s,children:l})}}))),t},m=g([],o);return i<0&&(m.pop(),n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(a)),m},e.prototype.getSymbolKind=function(e){switch(e){case"object":return Et.Module;case"string":return Et.String;case"number":return Et.Number;case"array":return Et.Array;case"boolean":return Et.Boolean;default:return Et.Variable}},e.prototype.getKeyLabel=function(e){var t=e.keyNode.value;return t&&(t=t.replace(/[\n]/g,"↵")),t&&t.trim()?t:'"'+t+'"'},e.prototype.findDocumentColors=function(e,t,n){return this.schemaService.getSchemaForResource(e.uri,t).then((function(r){var o=[];if(r)for(var i=n&&"number"==typeof n.resultLimit?n.resultLimit:Number.MAX_VALUE,a={},s=0,l=t.getMatchingSchemas(r.schema);s<l.length;s++){var c=l[s];if(!c.inverted&&c.schema&&("color"===c.schema.format||"color-hex"===c.schema.format)&&c.node&&"string"===c.node.type){var u=String(c.node.offset);if(!a[u]){var f=_n(dn(c.node));if(f){var p=Rn(e,c.node);o.push({color:f,range:p})}if(a[u]=!0,--i<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(e.uri),o}}}return o}))},e.prototype.getColorPresentations=function(e,t,n,r){var o,i=[],a=Math.round(255*n.red),s=Math.round(255*n.green),l=Math.round(255*n.blue);function c(e){var t=e.toString(16);return 2!==t.length?"0"+t:t}return o=1===n.alpha?"#"+c(a)+c(s)+c(l):"#"+c(a)+c(s)+c(l)+c(Math.round(255*n.alpha)),i.push({label:o,textEdit:He.replace(r,JSON.stringify(o))}),i},e}();function Rn(e,t){return Me.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}var Vn={schemaAssociations:{},schemas:{}};function Bn(e,t){var n=[],r=[],o=[],i=-1,a=Ze(e.getText(),!1),s=a.scan();function l(e){n.push(e),r.push(o.length)}for(;17!==s;){switch(s){case 1:case 3:var c={startLine:p=e.positionAt(a.getTokenOffset()).line,endLine:p,kind:1===s?"object":"array"};o.push(c);break;case 2:case 4:var u=2===s?"object":"array";if(o.length>0&&o[o.length-1].kind===u){c=o.pop();var f=e.positionAt(a.getTokenOffset()).line;c&&f>c.startLine+1&&i!==c.startLine&&(c.endLine=f-1,l(c),i=c.startLine)}break;case 13:var p=e.positionAt(a.getTokenOffset()).line,d=e.positionAt(a.getTokenOffset()+a.getTokenLength()).line;1===a.getTokenError()&&p+1<e.lineCount?a.setPosition(e.offsetAt(Te.create(p+1,0))):p<d&&(l({startLine:p,endLine:d,kind:_e.Comment}),i=p);break;case 12:var h=e.getText().substr(a.getTokenOffset(),a.getTokenLength()).match(/^\/\/\s*#(region\b)|(endregion\b)/);if(h){f=e.positionAt(a.getTokenOffset()).line;if(h[1]){c={startLine:f,endLine:f,kind:_e.Region};o.push(c)}else{for(var v=o.length-1;v>=0&&o[v].kind!==_e.Region;)v--;if(v>=0){c=o[v];o.length=v,f>c.startLine&&i!==c.startLine&&(c.endLine=f,l(c),i=c.startLine)}}}}s=a.scan()}var g=t&&t.rangeLimit;if("number"!=typeof g||n.length<=g)return n;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);for(var m=[],y=0,b=r;y<b.length;y++){(k=b[y])<30&&(m[k]=(m[k]||0)+1)}var x=0,w=0;for(v=0;v<m.length;v++){var C=m[v];if(C){if(C+x>g){w=v;break}x+=C}}var A=[];for(v=0;v<n.length;v++){var k;"number"==typeof(k=r[v])&&(k<w||k===w&&x++<g)&&A.push(n[v])}return A}function Un(e,t,n){function r(t,n){return Me.create(e.positionAt(t),e.positionAt(n))}var o=Ze(e.getText(),!0);function i(e,t){return o.setPosition(e),o.scan()===t?o.getTokenOffset()+o.getTokenLength():-1}return t.map((function(t){for(var o=e.offsetAt(t),a=n.getNodeFromOffset(o,!0),s=[];a;){switch(a.type){case"string":case"object":case"array":var l=a.offset+1,c=a.offset+a.length-1;l<c&&o>=l&&o<=c&&s.push(r(l,c)),s.push(r(a.offset,a.offset+a.length));break;case"number":case"boolean":case"null":case"property":s.push(r(a.offset,a.offset+a.length))}if("property"===a.type||a.parent&&"array"===a.parent.type){var u=i(a.offset+a.length,5);-1!==u&&s.push(r(a.offset,u))}a=a.parent}for(var f=void 0,p=s.length-1;p>=0;p--)f=Dt.create(s[p],f);return f||(f=Dt.create(Me.create(t,t))),f}))}n(796),n(797),n(798),n(799),n(800),n(801),n(802),n(804),n(806),n(808);var Wn=function(e){var t=e.promiseConstructor||Promise,n=new Mn(e.schemaRequestService,e.workspaceContext,t);n.setSchemaContributions(Vn);var r=new Cn(n,e.contributions,t,e.clientCapabilities),o=new An(n,e.contributions,t),i=new Dn(n),a=new In(n,t);return{configure:function(e){n.clearExternalSchemas(),e.schemas&&e.schemas.forEach((function(e){n.registerExternalSchema(e.uri,e.fileMatch,e.schema)})),a.configure(e)},resetSchema:function(e){return n.onResourceChange(e)},doValidation:a.doValidation.bind(a),parseJSONDocument:function(e){return yn(e,{collectComments:!0})},newJSONDocument:function(e,t){return function(e,t){return void 0===t&&(t=[]),new gn(e,t,[])}(e,t)},doComplete:r.doComplete.bind(r),findDocumentSymbols:i.findDocumentSymbols.bind(i),findDocumentSymbols2:i.findDocumentSymbols2.bind(i),findColorSymbols:function(e,t){return i.findDocumentColors(e,t).then((function(e){return e.map((function(e){return e.range}))}))},findDocumentColors:i.findDocumentColors.bind(i),getColorPresentations:i.getColorPresentations.bind(i),doHover:o.doHover.bind(o),getFoldingRanges:Bn,getSelectionRanges:Un,format:function(e,t,n){var r=void 0;if(t){var o=e.offsetAt(t.start);r={offset:o,length:e.offsetAt(t.end)-o}}var i={tabSize:n?n.tabSize:4,insertSpaces:!n||n.insertSpaces,eol:"\n"};return function(e,t,n){return Ae(e,t,n)}(e.getText(),r,i).map((function(t){return He.replace(Me.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length)),t.content)}))}}}({});ye.registerHelper("lint","json",(function(e,t){return Object(a.b)(this,void 0,void 0,(function(){var n,r,o,i,s;return Object(a.e)(this,(function(a){switch(a.label){case 0:return n=t.schema,r=t.setError,Wn.configure({validate:!0,schemas:[{uri:"stub://"+t.id,fileMatch:["*"],schema:n}]}),o=zt.create(t.id+".json","json",0,e),i=Wn.parseJSONDocument(o),[4,Wn.doValidation(o,i)];case 1:return(s=a.sent()).length?r&&r(s[0].message):r&&r(void 0),[2,s.map((function(e){return{from:ye.Pos(e.range.start.line,e.range.start.character),to:ye.Pos(e.range.end.line,e.range.end.character),message:e.message}}))]}}))}))})),ye.registerHelper("hint","json",(function(e,t){return Object(a.b)(void 0,void 0,void 0,(function(){var n,r,o,i,s,l,c,u;return Object(a.e)(this,(function(a){switch(a.label){case 0:return(n=t.schema)?(Wn.configure({validate:!0,schemas:[{uri:"stub://"+t.id,fileMatch:["*"],schema:n}]}),r=e.getDoc().getCursor(),o=e.getTokenAt(r),i=zt.create(t.id+".json","json",0,e.getValue()),s=Wn.parseJSONDocument(i),[4,Wn.doComplete(i,{line:r.line,character:r.ch},s)]):[2];case 1:return l=a.sent(),c=function(e){for(var t="";e--;)t+=" ";return t},u=l?l.items.map((function(e){return{text:e.insertText,displayText:e.label,filter:e.filterText||e.label,from:{line:e.textEdit.range.start.line,ch:e.textEdit.range.start.character},to:{line:e.textEdit.range.end.line,ch:e.textEdit.range.end.character},hint:function(e,t,n){var r=n.text.replace(/(\$1|\${1:[^}]+})/,"_$__REDOC_CURSOR_HERE")||"";if(r=r.replace(/(\$\d+|\${[^}]+})/g,"")||"",e.setSelection(n.from,n.to),r.indexOf("\n")>-1){var o=e.getLine(e.getCursor().line).search(/(\S|$)/);r=r.replace(/\n/g,"\n"+c(o))}e.replaceSelection(r);var i=e.getSearchCursor("_$__REDOC_CURSOR_HERE",n.from);i.findNext()&&(e.setCursor(i.from()),i.replace(""))}}})):[],/(property|string)/.test(o.type||"")&&(u=u.filter((function(e){return e.filter.replace(/(^"|"$)/g,"").startsWith(o.string.replace(/(^"|"$)/g,""))}))),[2,{from:ye.Pos(r.line,o.start),to:ye.Pos(r.line,r.ch),list:u}]}}))}))}));var zn,Hn,qn,Gn,$n,Kn=Object(d.db)(zn||(zn=Object(a.f)(["\n .cm-s-material.CodeMirror {\n background-color: ","!important;\n color: ","!important;\n font-family: ",";\n line-height: 18px;\n padding: 10px;\n }\n\n .CodeMirror-lint-mark-error {\n background-size: 4px;\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAGCAYAAAD+Bd/7AAAAVUlEQVR42mNgQAL/GRjigPg/EP8FYntkCX4gtoVKgvE/BoabcEVAhj6S5DUgfgFl/wFJ2gPxL6iuT1DF+kD2R5AYA5KRj6CS/FAMYvszIBltz4AFAAD9fz0YtLg13wAAAABJRU5ErkJggg==') !important;\n }\n\n .cm-s-material.CodeMirror-focused div.CodeMirror-selected {\n background: rgba(255, 255, 255, 0.3) !important;\n }\n\n .cm-s-material .CodeMirror-code .cm-string.cm-property {\n color: #9EFAA7;\n }\n\n .cm-s-material .CodeMirror-code .cm-string {\n color: #FEE39E;\n }\n\n .cm-s-material .CodeMirror-code .cm-atom {\n color: ",";\n }\n\n div .cm-s-material .CodeMirror-matchingbracket {\n outline: 1px solid grey;\n text-decoration: none;\n }\n\n .react-codemirror2 {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n border-bottom-right-radius: ",";\n border-bottom-left-radius: ",";\n overflow: hidden;\n\n flex: 1;\n }\n\n .CodeMirror {\n flex: 1;\n max-height: 65vh !important; /* it fixes performance bug if we pass big data to CodeMirror */\n border-radius: ",";\n }\n"],["\n .cm-s-material.CodeMirror {\n background-color: ","!important;\n color: ","!important;\n font-family: ",";\n line-height: 18px;\n padding: 10px;\n }\n\n .CodeMirror-lint-mark-error {\n background-size: 4px;\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAGCAYAAAD+Bd/7AAAAVUlEQVR42mNgQAL/GRjigPg/EP8FYntkCX4gtoVKgvE/BoabcEVAhj6S5DUgfgFl/wFJ2gPxL6iuT1DF+kD2R5AYA5KRj6CS/FAMYvszIBltz4AFAAD9fz0YtLg13wAAAABJRU5ErkJggg==') !important;\n }\n\n .cm-s-material.CodeMirror-focused div.CodeMirror-selected {\n background: rgba(255, 255, 255, 0.3) !important;\n }\n\n .cm-s-material .CodeMirror-code .cm-string.cm-property {\n color: #9EFAA7;\n }\n\n .cm-s-material .CodeMirror-code .cm-string {\n color: #FEE39E;\n }\n\n .cm-s-material .CodeMirror-code .cm-atom {\n color: ",";\n }\n\n div .cm-s-material .CodeMirror-matchingbracket {\n outline: 1px solid grey;\n text-decoration: none;\n }\n\n .react-codemirror2 {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n border-bottom-right-radius: ",";\n border-bottom-left-radius: ",";\n overflow: hidden;\n\n flex: 1;\n }\n\n .CodeMirror {\n flex: 1;\n max-height: 65vh !important; /* it fixes performance bug if we pass big data to CodeMirror */\n border-radius: ",";\n }\n"])),(function(e){return e.theme.rightPanel.panelControlsBackgroundColor}),(function(e){return e.theme.colors.text.light}),(function(e){return e.theme.typography.code.fontFamily}),(function(e){return e.theme.colors.text.light}),(function(e){return e.theme.components.panels.borderRadius}),(function(e){return e.theme.components.panels.borderRadius}),(function(e){return e.theme.components.panels.borderRadius})),Jn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return Object.defineProperty(t,"editor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(t,"_onKeyUp",{enumerable:!0,configurable:!0,writable:!0,value:function(e,n){/^[a-zA-Z0-9_":]$/.test(n.key)&&t.editor.execCommand("autocomplete")}}),Object.defineProperty(t,"initEditor",{enumerable:!0,configurable:!0,writable:!0,value:function(e){t.editor=e,e.on("keyup",t._onKeyUp)}}),Object.defineProperty(t,"refreshEditor",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.editor.refresh()}}),t}return Object(a.d)(t,e),Object.defineProperty(t.prototype,"componentDidMount",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;setTimeout((function(){e.editor.refresh()}),0),document.addEventListener("click",this.refreshEditor)}}),Object.defineProperty(t.prototype,"componentWillUnmount",{enumerable:!1,configurable:!0,writable:!0,value:function(){document.removeEventListener("click",this.refreshEditor)}}),Object.defineProperty(t.prototype,"render",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this,t=this.props.fieldState.value,n=this.props.fieldApi,r=n.setValue,o=n.setTouched,i=n.setError,a=this.props,l=a.onChange,c=a.onBlur,u=a.forwardedRef;return s.createElement(s.Fragment,null,s.createElement(Kn,null),s.createElement(me.Controlled,{editorDidMount:this.initEditor,value:t||"",ref:u||void 0,onBeforeChange:function(e,t,n){r(n),l&&l(n)},onBlur:function(e){o(),c&&c(e)},options:{mode:this.props.mode||"application/json",theme:"material",matchBrackets:!0,autoCloseBrackets:!0,tabSize:2,foldGutter:!0,extraKeys:{"Cmd-Space":function(){return e.editor.showHint({completeSingle:!0})},"Ctrl-Space":function(){return e.editor.showHint({completeSingle:!0})}},hintOptions:{id:this.props.id,completeSingle:!1,schema:this.props.schema},lint:{id:this.props.id,schema:this.props.schema,setError:i}}}))}}),t}(s.Component),Yn=Object(c.b)(Jn),Xn=Object(v.e)(z.c)(Hn||(Hn=Object(a.f)(["\n border-radius: ",";\n margin-bottom: 10px;\n"],["\n border-radius: ",";\n margin-bottom: 10px;\n"])),(function(e){return e.theme.components.panels.borderRadius})),Qn=n(94),Zn=n(11);!function(e){e.STRING="string",e.ARRAY="array",e.OBJECT="object"}(qn||(qn={})),function(e){e.BYTE="byte",e.BASE64="base64",e.BINARY="binary"}(Gn||(Gn={})),function(e){e.OCTET_STREAM="application/octet-stream",e.MULTIPART="multipart/form-data",e.URL_ENCODED="application/x-www-form-urlencoded"}($n||($n={}));var er=Object.values(Gn),tr=["application/octet-stream","application/pdf","application/gzip","application/zip"],nr=["image/","audio/","video/"];function rr(e){if(nr.some((function(t){return e.startsWith(t)})))return e}function or(e){return!!tr.includes(e)||nr.some((function(t){return e.startsWith(t)}))}function ir(e,t){if(!e||!e.type)return or(t);var n=e.format||e.contentEncoding||"";return e.type===qn.STRING&&er.includes(n)}function ar(e){return new Promise((function(t,n){var r=new FileReader;r.onload=function(){var e=r.result.replace(/data:.*\/.*;base64,/g,"");t(e)},r.onerror=function(){return n(r.error)},r.readAsDataURL(e)}))}function sr(e){return[e.format,e.contentEncoding,e.contentMediaType].includes(Gn.BASE64)}function lr(e,t,n){return Object(a.b)(this,void 0,void 0,(function(){var r,o,i,s=this;return Object(a.e)(this,(function(l){switch(l.label){case 0:return r=Object.values(e),o=1===r.length?r[0]:r,i=t.properties?t.properties[n]:t,i.type===qn.STRING&&sr(i)?[4,ar(r[0])]:[3,2];case 1:return o=l.sent(),[3,5];case 2:return i.type===qn.ARRAY&&i.items?sr(i.items)?[4,Promise.all(r.map((function(e){return Object(a.b)(s,void 0,void 0,(function(){return Object(a.e)(this,(function(t){switch(t.label){case 0:return[4,ar(e)];case 1:return[2,t.sent()]}}))}))})))]:[3,4]:[3,5];case 3:return o=l.sent(),[3,5];case 4:o=r,l.label=5;case 5:return[2,o]}}))}))}var cr=s.forwardRef((function(e,t){var n=Object(a.g)(e,[]),r=n.schema,o=n.contentName,i=n.onChange,l=n.name;return(0,Object(c.c)(Object(a.a)({field:l},n)).render)(s.createElement("input",{"data-cy":"file-upload-input",type:"file",id:n.id,className:n.className,name:n.name,onChange:function(e){return Object(a.b)(void 0,void 0,void 0,(function(){var t;return Object(a.e)(this,(function(n){switch(n.label){case 0:return[4,lr(e.target.files,r,o)];case 1:return t=n.sent(),i(o,t),[2]}}))}))},multiple:n.multiple,accept:n.accept,ref:t}))}));function ur(e){var t=e.schema,n=void 0===t?{}:t,r=e.mediaType,o=e.onChange,i=n.properties||{};return ir(n,r.name)?s.createElement(vr,null,s.createElement(h.a,null,s.createElement(gr,{fullWidth:!0,id:"body."+r.name,name:"body."+r.name,accept:rr(r.name),schema:n,contentName:r.name,onChange:o}))):n.type===qn.OBJECT&&i?s.createElement(vr,null,Object.entries(i).map((function(e){var t=e[0],i=e[1],a=r.name===$n.MULTIPART&&function(e){var t="array"===e.type?e.items:e;if(!t||!t.type)return!0;var n=t.contentMediaType||"",r=t.format||t.contentEncoding||(or(n)?"binary":"");return t.type===qn.STRING&&er.includes(r)}(i),l=i.contentMediaType||"",c=a?s.createElement(gr,{fullWidth:!0,id:"body."+t,name:"body."+t,accept:rr(l),multiple:"array"===i.type,schema:n,contentName:t,onChange:o}):s.createElement(C,{fullWidth:!0,id:"body."+t,field:"body."+t,placeholder:i.description||t});return s.createElement(h.a,{key:t},s.createElement(h.d,null,t,":"),c)}))):(console.warn('Invalid schema for request body and mime type: "'+r.name+'"',n),null)}var fr,pr,dr,hr,vr=d.nb.div(fr||(fr=Object(a.f)(["\n > div {\n margin-top: 10px;\n }\n"],["\n > div {\n margin-top: 10px;\n }\n"]))),gr=Object(d.nb)(cr)(pr||(pr=Object(a.f)(["\n ","\n ",";\n ","\n"],["\n ","\n ",";\n ","\n"])),g,(function(e){return"password"===e.inputType?"padding-right: 40px;":""}),(function(e){return e.fullWidth?"width: 100%;":""})),mr=Object(u.a)((function(e){var t,n,r=e.properties,o=void 0===r?{}:r,i=Object(a.g)(e,["properties"]),l=function(e){var t,n=i.body.content;if(!n||!n.hasSample)return"";var r=null===(t=n.active)||void 0===t?void 0:t.examples;if(null==r||!r[e])return"";var a=ge()(null==r?void 0:r[e].value,o,{arrayMerge:Zn.a});return JSON.stringify(a,null,2)},c=null===(t=i.body.content)||void 0===t||null===(n=t.operation)||void 0===n?void 0:n.activeExampleName,u=function(e){var t,n;null===(t=i.body.content)||void 0===t||null===(n=t.operation)||void 0===n||n.activateExampleName(e),i.console.formApi.setValue("body",l(e))},f=function(e){if(!e)return"";if("application/x-www-form-urlencoded"===e.mime)return e.value;var t=ge()(e.value,o,{arrayMerge:Zn.a});return JSON.stringify(t,null,2)},p=function(e,t){return Object(a.b)(void 0,void 0,void 0,(function(){var n;return Object(a.e)(this,(function(r){return n=i.console.formApi,(0,n.setValue)("body."+e,t),[2]}))}))};Object(s.useEffect)((function(){!1!==c?c&&i.console.formApi.setValue("body",l(c)):i.console.formApi.setValue("body",JSON.stringify(o,null,2))}),[c]);var h=i.validate,v=i.body;return s.createElement(s.Fragment,null,s.createElement(d.t,{content:v.content,renderDropdown:function(e){return s.createElement(d.g,Object(a.a)({},e,{variant:"dark",fullWidth:!0,Label:Xn,Dropdown:d.f}))}},(function(e){var t,n=e.examples||{},r=Object.keys(n);i.resolvedBody&&(t=(i.resolvedBody.content[e.name]||{}).schema);var o=ir(t,e.name)||e.name===$n.MULTIPART||e.name===$n.URL_ENCODED,a=Object(Qn.c)(e.operation,n).exampleKey,l=n[a];return s.createElement(s.Fragment,null,r.length&&1!==r.length&&s.createElement(Qn.a,{examples:n,onChange:u,exampleKey:a})||null,o?s.createElement(ur,{schema:t,mediaType:e,onChange:p.bind(void 0)}):s.createElement(Yn,{id:"body"+i.id,field:"body",initialValue:f(l),schema:t,mode:e.name,validate:h}))})))})),yr=n(10),br=d.nb.div(dr||(dr=Object(a.f)(["\n display: flex;\n font-size: 12px;\n button {\n margin: 0;\n }\n"],["\n display: flex;\n font-size: 12px;\n button {\n margin: 0;\n }\n"]))),xr=d.nb.button(hr||(hr=Object(a.f)(["\n outline: none;\n border: none;\n background-color: ",";\n text-align: center;\n cursor: pointer;\n color: ",";\n min-width: 80px;\n min-height: 30px;\n border-radius: ",";\n font-size: 12px;\n\n padding: 0 10px;\n\n border-top: 4px solid transparent;\n border-bottom: 4px solid transparent;\n\n &:first-child {\n border-top-left-radius: ",";\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: ",";\n }\n\n &:last-child {\n border-top-left-radius: 0;\n border-top-right-radius: ",";\n border-bottom-right-radius: ",";\n border-bottom-left-radius: 0;\n }\n\n ","\n\n ","\n"],["\n outline: none;\n border: none;\n background-color: ",";\n text-align: center;\n cursor: pointer;\n color: ",";\n min-width: 80px;\n min-height: 30px;\n border-radius: ",";\n font-size: 12px;\n\n padding: 0 10px;\n\n border-top: 4px solid transparent;\n border-bottom: 4px solid transparent;\n\n &:first-child {\n border-top-left-radius: ",";\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: ",";\n }\n\n &:last-child {\n border-top-left-radius: 0;\n border-top-right-radius: ",";\n border-bottom-right-radius: ",";\n border-bottom-left-radius: 0;\n }\n\n ","\n\n ","\n"])),(function(e){return e.theme.rightPanel.panelBackgroundColor}),(function(e){return e.theme.colors.text.light}),(function(e){return e.theme.shape.borderRadius}),(function(e){return e.theme.shape.borderRadius}),(function(e){return e.theme.shape.borderRadius}),(function(e){return e.theme.shape.borderRadius}),(function(e){return e.theme.shape.borderRadius}),(function(e){var t=e.active,n=e.theme;return t&&"\n border-bottom: 4px solid "+n.colors.accent.main+";\n background-color: "+Object(yr.a)(.05,n.rightPanel.panelBackgroundColor)+";\n "||""}),(function(e){var t=e.disabled,n=e.theme;return t&&"\n cursor: default;\n color: "+Object(yr.f)(.3,n.colors.text.light)+";\n "||""})),wr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.d)(t,e),Object.defineProperty(t.prototype,"render",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this.props,t=e.onChange,n=e.active,r=e.hasResponse;return s.createElement(br,null,s.createElement(xr,{onClick:function(){return t(0)},active:0===n},r?"Edit Request":"Request"),s.createElement(xr,{onClick:function(){return r&&t(1)},active:1===n,disabled:!r}," ","Response"," "))}}),t}(s.Component),Cr=v.e.input(Or||(Or=Object(a.f)(["\n cursor: pointer;\n vertical-align: middle;\n margin-left: 0;\n margin-right: 5px;\n height: 20px;\n"],["\n cursor: pointer;\n vertical-align: middle;\n margin-left: 0;\n margin-right: 5px;\n height: 20px;\n"]))),Ar=v.e.label(Sr||(Sr=Object(a.f)(["\n display: inline-block;\n cursor: pointer;\n vertical-align: middle;\n position: relative;\n text-overflow: ellipsis;\n overflow: hidden;\n\n overflow-wrap: break-word;\n line-height: 20px;\n"],["\n display: inline-block;\n cursor: pointer;\n vertical-align: middle;\n position: relative;\n text-overflow: ellipsis;\n overflow: hidden;\n\n overflow-wrap: break-word;\n line-height: 20px;\n"]))),kr=v.e.div(Er||(Er=Object(a.f)(["\n width: ",";\n display: inline-flex;\n align-items: center;\n\n & > label {\n white-space: ",";\n }\n"],["\n width: ",";\n display: inline-flex;\n align-items: center;\n\n & > label {\n white-space: ",";\n }\n"])),(function(e){return e.fullWidth?"100%":"50%"}),(function(e){return e.nowrap?"nowrap":"normal"}));var Or,Sr,Er,jr,Tr,Mr=s.forwardRef((function(e,t){var n=e.fullWidth,r=e.id,o=e.label,i=e.nowrap;return s.createElement(kr,{fullWidth:n,nowrap:i},s.createElement(Cr,Object(a.a)({},e,{type:"checkbox",ref:t})),s.createElement(Ar,{htmlFor:r},o))})),Pr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return Object.defineProperty(t,"state",{enumerable:!0,configurable:!0,writable:!0,value:{collapsed:!0}}),t}return Object(a.d)(t,e),Object.defineProperty(t.prototype,"onCheckBoxClick",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=e.target.value,n=e.target.checked;this.props.fieldApi.setTouched(!0);var r,o=this.props.fieldApi.getValue()||[];if(n)r=Object(a.h)(Object(a.h)([],o,!0),[t],!1);else{var i=o.indexOf(t);r=Object(a.h)(Object(a.h)([],o.slice(0,i),!0),o.slice(i+1),!0)}this.props.fieldApi.setValue(r)}}),Object.defineProperty(t.prototype,"isFieldChecked",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.props.fieldApi.getValue().includes(e)}}),Object.defineProperty(t.prototype,"toggle",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.setState({collapsed:!this.state.collapsed})}}),Object.defineProperty(t.prototype,"selectAll",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.props.fieldApi.setValue(this.props.items)}}),Object.defineProperty(t.prototype,"clearAll",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.props.fieldApi.setValue([])}}),Object.defineProperty(t.prototype,"render",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this,t=this.props,n=t.items,r=t.fieldApi,o=t.validateOnChange,i=t.maxDisplayedItems,a=t.showControls,l=t.trimItemsLength,c=this.state.collapsed,u=r.getError(),f=i||11,p=l&&this.state.collapsed?n.slice(0,f):n;return s.createElement("div",null,a?s.createElement(Fr,null,s.createElement(ie.p,{onClick:function(){e.selectAll()}},"Select all"),s.createElement(ie.p,{onClick:function(){e.clearAll()}},"Clear")):null,s.createElement("div",null,p.map((function(t){return s.createElement(Mr,{nowrap:!0,id:t,value:t,checked:e.isFieldChecked(t),label:t,key:t,onChange:function(t){e.onCheckBoxClick(t),o&&r.validate()}})})),n.length>f&&l?s.createElement(Lr,{onClick:function(){e.toggle()}},c?"Show all":"Collapse"):null),u?s.createElement(h.b,null,u):"")}}),t}(s.Component),Ir=Object(c.b)(Pr),Fr=Object(d.nb)(ie.n)(jr||(jr=Object(a.f)(["\n opacity: 1;\n text-align: left;\n"],["\n opacity: 1;\n text-align: left;\n"]))),Lr=Object(d.nb)(ie.p)(Tr||(Tr=Object(a.f)(["\n float: right;\n"],["\n float: right;\n"])));function Nr(e){var t=e.scopes,n=e.id,r=[];try{r=JSON.parse(Object(f.e)("auth."+n+".scopes"))}catch(e){}return t&&t.length?s.createElement(h.a,null,s.createElement(h.d,null," Scopes: "),s.createElement(Ir,{field:"auth."+n+".scopes",initialValue:r,items:t,showControls:!0,trimItemsLength:!0})):s.createElement(s.Fragment,null)}var _r=n(174),Dr=n(312),Rr=function(){function e(){}return Object.defineProperty(e,"authorizeImplicit",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=t.authorizationUrl,r=t.clientId,o=t.scopes,i=t.extraParams,a=void 0===i?{}:i,s=t.routingBasePath,l=t.redirectUri,c=t.successCallback,u=t.errorCallback,f=Ur({date:(new Date).toString()}),p=new URL(n),d="/"===s?"":s,h=""+window.location.origin+d+"/oauth2-redirect.html";for(var v in p.searchParams.set("client_id",r),p.searchParams.set("redirect_uri",l||h),p.searchParams.set("response_type","token"),p.searchParams.set("state",f),Array.isArray(o)&&p.searchParams.set("scope",o.join(" ")),a)p.searchParams.set(v,a[v]);window.redirectOAuth2={flow:"implicit",data:{authorizationUrl:n,clientId:r,scopes:o},state:f,successCallback:function(t){c(t),e.clearRedirectData("implicit")},errorCallback:function(t){u(t),e.clearRedirectData("implicit")}},window.open(p.toString())}}),Object.defineProperty(e,"authorizeAuthorizationCode",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this,r=t.authorizationUrl,o=t.tokenUrl,i=t.clientId,s=t.clientSecret,l=t.codeVerifier,c=t.codeChallenge,u=t.scopes,f=t.extraParams,p=void 0===f?{}:f,d=t.routingBasePath,h=t.redirectUri,v=t.successCallback,g=t.errorCallback,m=new URL(r),y="/"===d?"":d,b=""+window.location.origin+y+"/oauth2-redirect.html",x=Ur({date:(new Date).toString()});for(var w in m.searchParams.set("client_id",i),m.searchParams.set("redirect_uri",h||b),m.searchParams.set("response_type","code"),m.searchParams.set("state",x),Array.isArray(u)&&m.searchParams.set("scope",u.join(" ")),c&&(m.searchParams.set("code_challenge",c),m.searchParams.set("code_challenge_method","S256")),p)m.searchParams.set(w,p[w]);window.redirectOAuth2={flow:"authorizationCode",data:{authorizationUrl:r,clientId:i,scopes:u},state:x,successCallback:function(t){var r=t.auth_code;return Object(a.b)(n,void 0,void 0,(function(){var t;return Object(a.e)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),[4,fetch(o,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},body:_r.stringify(Object(a.a)(Object(a.a)(Object(a.a)({client_id:i,client_secret:s},l&&{code_verifier:l}),{code:r,grant_type:"authorization_code",redirect_uri:h||b}),p))})];case 1:return[4,Vr(n.sent(),v,g)];case 2:return n.sent(),[3,4];case 3:return t=n.sent(),g(t),[3,4];case 4:return e.clearRedirectData("authorizationCode"),[2]}}))}))},errorCallback:function(t){g(t),e.clearRedirectData("authorizationCode")}},window.open(m.toString())}}),Object.defineProperty(e,"clearRedirectData",{enumerable:!1,configurable:!0,writable:!0,value:function(e){window.redirectOAuth2={flow:e,data:{authorizationUrl:"",clientId:"",scopes:[]},state:"",successCallback:function(){},errorCallback:function(){}}}}),Object.defineProperty(e,"authorizeClientCredentials",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=e.tokenUrl,n=e.clientId,r=e.clientSecret,o=e.scopes,i=void 0===o?[]:o,s=e.extraParams,l=void 0===s?{}:s,c=e.successCallback,u=e.errorCallback;return Object(a.b)(this,void 0,void 0,(function(){var e;return Object(a.e)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),[4,fetch(t,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},body:_r.stringify(Object(a.a)({client_id:n,client_secret:r,grant_type:"client_credentials",scope:Array.isArray(i)?i.join(" "):void 0},l))})];case 1:return[4,Vr(o.sent(),c,u)];case 2:return o.sent(),[3,4];case 3:return e=o.sent(),u(e),[3,4];case 4:return[2]}}))}))}}),e}();new Rr;function Vr(e,t,n){return Object(a.b)(this,void 0,void 0,(function(){var r,o,i,s,l,c;return Object(a.e)(this,(function(a){switch(a.label){case 0:return e.ok?[4,e.json()]:[3,2];case 1:return r=a.sent(),t(r),[3,7];case 2:return o=n,i=Error.bind,(e.headers.get("Content-Type")||"").indexOf("json")>-1?(c=(l=JSON).stringify,[4,e.json()]):[3,4];case 3:return s=c.apply(l,[a.sent()]),[3,6];case 4:return[4,e.text()];case 5:s=a.sent(),a.label=6;case 6:o.apply(void 0,[new(i.apply(Error,[void 0,s]))]),a.label=7;case 7:return[2]}}))}))}function Br(e){void 0===e&&(e=32);for(var t="";t.length<e;)t+=Math.random().toString(32).substring(2);return t.substring(0,e)}function Ur(e){var t=Object(a.a)({randomStr:Br()},e);return btoa(JSON.stringify(t))}function Wr(e){return Object(a.b)(this,void 0,void 0,(function(){var t;return Object(a.e)(this,(function(n){return t=(new TextEncoder).encode(e),[2,null===Dr.a||void 0===Dr.a?void 0:Dr.a.subtle.digest("SHA-256",t)]}))}))}function zr(e){if(e)return btoa(String.fromCharCode.apply(null,new Uint8Array(e))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function Hr(e){return Object(a.b)(this,void 0,void 0,(function(){var t;return Object(a.e)(this,(function(n){switch(n.label){case 0:return t=zr,[4,Wr(e)];case 1:return[2,t.apply(void 0,[n.sent()])]}}))}))}function qr(e){if(!e)return"Token is required"}var Gr,$r=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return Object.defineProperty(t,"state",{enumerable:!0,configurable:!0,writable:!0,value:{error:"",loading:!1,tokenMasked:!0}}),Object.defineProperty(t,"clearToken",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.props.formApi.setValue("auth."+t.props.id+".token",""),Object(f.p)("auth."+t.props.id+".token","")}}),Object.defineProperty(t,"toggleTokenMask",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.setState({tokenMasked:!t.state.tokenMasked})}}),Object.defineProperty(t,"requestToken",{enumerable:!0,configurable:!0,writable:!0,value:function(){return Object(a.b)(t,void 0,void 0,(function(){var e,t,n,r,o,i,s,l=this;return Object(a.e)(this,(function(a){switch(a.label){case 0:return this.state.loading?[2]:(e=this.props,t=e.server,n=e.flow,r=e.authCorsProxyUrl,o=r&&n.tokenUrl?r+Object(L.g)(n.tokenUrl):n.tokenUrl,this.errors.client_id||this.errors.client_secret?(console.log("Provide client_id and client_secret"),[2]):(i=this.values.client_id,s=this.values.client_secret,i&&s?(this.setState({loading:!0}),[4,Rr.authorizeClientCredentials({tokenUrl:o.startsWith("http")?o:t+o,clientId:i,clientSecret:s,scopes:this.values.scopes,successCallback:function(e){l.props.formApi.setValue("auth."+l.props.id+".token",e),l.setState({loading:!1})},errorCallback:function(e){l.clearToken(),l.setState({error:e.message,loading:!1})}})]):(console.log("Provide client_id and client_secret"),[2])));case 1:return a.sent(),[2]}}))}))}}),t}return Object(a.d)(t,e),Object.defineProperty(t.prototype,"values",{get:function(){return this.props.form.values&&this.props.form.values.auth&&this.props.form.values.auth[this.props.id]||{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"errors",{get:function(){return this.props.form.errors&&this.props.form.errors.auth&&this.props.form.errors.auth[this.props.id]||{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"render",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this.state,t=e.loading,n=e.error,r=e.tokenMasked,o=this.props,i=o.id,l=o.defaultValues,c=Object.keys(this.props.flow.scopes),u=Object(f.e)("auth."+i+".token")||JSON.stringify(null==l?void 0:l.token);u=u?JSON.parse(u):"";var p=Object(f.j)(i,"client_id"),d={field:"auth."+i+".client_id",fullWidth:!0,initialValue:Object(f.e)("auth."+i+".client_id")||this.props.clientId||(null==l?void 0:l.client_id),initValue:Object(f.e)("auth."+i+".client_id")||this.props.clientId||(null==l?void 0:l.client_id),placeholder:"Your OAuth2 app Client ID"};return s.createElement(s.Fragment,null,s.createElement(h.f,null,s.createElement(h.a,null,s.createElement(h.d,null,"Client ID:"),p?s.createElement(j,Object(a.a)({},d,{options:p})):s.createElement(C,Object(a.a)({},d,{type:"password"}))),s.createElement(h.a,null,s.createElement(h.d,null,"Client Secret:"),s.createElement(C,{type:"password",fullWidth:!0,field:"auth."+i+".client_secret",initialValue:Object(f.e)("auth."+i+".client_secret")||(null==l?void 0:l.client_secret)})),s.createElement(C,{fullWidth:!0,field:"auth."+i+".token",type:"hidden",initialValue:u,validate:qr}),s.createElement(Nr,{id:i,scopes:c})),s.createElement(z.a,{color:"primary",onClick:this.requestToken,blinking:t},t?"Loading...":"Request Token"),s.createElement(h.c,null," Access Token "),n?s.createElement(h.b,{style:{marginBottom:"1em"}},"Failed to request token: ",s.createElement("pre",null,n)," "):this.values.token&&this.values.token.access_token?s.createElement(h.j,null,s.createElement(h.l,{length:this.values.token.access_token.length,masked:r},this.values.token.access_token),s.createElement(h.k,{onClick:this.toggleTokenMask},r?"Show":"Hide"," "),s.createElement(h.i,{onClick:this.clearToken}," Clear ")):s.createElement(h.b,{style:{marginBottom:"1em"}},"No token"))}}),t}(s.Component),Kr=d.nb.div(Gr||(Gr=Object(a.f)(["\n position: relative;\n height: 4px;\n display: block;\n width: 100%;\n background-color: ",";\n border-radius: ",";\n background-clip: padding-box;\n margin: 0.5rem 0 1rem 0;\n overflow: hidden;\n\n .determinate {\n position: absolute;\n background-color: inherit;\n top: 0;\n bottom: 0;\n background-color: ",";\n transition: width 0.3s linear;\n }\n .indeterminate {\n background-color: ",";\n }\n .indeterminate:before {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n animation: indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n }\n .indeterminate:after {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n -webkit-animation-delay: 1.15s;\n animation-delay: 1.15s;\n }\n\n @-webkit-keyframes indeterminate {\n 0% {\n left: -35%;\n right: 100%;\n }\n 60% {\n left: 100%;\n right: -90%;\n }\n 100% {\n left: 100%;\n right: -90%;\n }\n }\n @keyframes indeterminate {\n 0% {\n left: -35%;\n right: 100%;\n }\n 60% {\n left: 100%;\n right: -90%;\n }\n 100% {\n left: 100%;\n right: -90%;\n }\n }\n @-webkit-keyframes indeterminate-short {\n 0% {\n left: -200%;\n right: 100%;\n }\n 60% {\n left: 107%;\n right: -8%;\n }\n 100% {\n left: 107%;\n right: -8%;\n }\n }\n @keyframes indeterminate-short {\n 0% {\n left: -200%;\n right: 100%;\n }\n 60% {\n left: 107%;\n right: -8%;\n }\n 100% {\n left: 107%;\n right: -8%;\n }\n }\n"],["\n position: relative;\n height: 4px;\n display: block;\n width: 100%;\n background-color: ",";\n border-radius: ",";\n background-clip: padding-box;\n margin: 0.5rem 0 1rem 0;\n overflow: hidden;\n\n .determinate {\n position: absolute;\n background-color: inherit;\n top: 0;\n bottom: 0;\n background-color: ",";\n transition: width 0.3s linear;\n }\n .indeterminate {\n background-color: ",";\n }\n .indeterminate:before {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n animation: indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n }\n .indeterminate:after {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n -webkit-animation-delay: 1.15s;\n animation-delay: 1.15s;\n }\n\n @-webkit-keyframes indeterminate {\n 0% {\n left: -35%;\n right: 100%;\n }\n 60% {\n left: 100%;\n right: -90%;\n }\n 100% {\n left: 100%;\n right: -90%;\n }\n }\n @keyframes indeterminate {\n 0% {\n left: -35%;\n right: 100%;\n }\n 60% {\n left: 100%;\n right: -90%;\n }\n 100% {\n left: 100%;\n right: -90%;\n }\n }\n @-webkit-keyframes indeterminate-short {\n 0% {\n left: -200%;\n right: 100%;\n }\n 60% {\n left: 107%;\n right: -8%;\n }\n 100% {\n left: 107%;\n right: -8%;\n }\n }\n @keyframes indeterminate-short {\n 0% {\n left: -200%;\n right: 100%;\n }\n 60% {\n left: 107%;\n right: -8%;\n }\n 100% {\n left: 107%;\n right: -8%;\n }\n }\n"])),(function(e){return e.theme.colors.accent.light}),(function(e){return e.theme.shape.borderRadius}),(function(e){return e.theme.colors.accent.main}),(function(e){return e.theme.colors.accent.main})),Jr=function(){return s.createElement(Kr,null,s.createElement("div",{className:"indeterminate"}))};function Yr(e){if(!e)return"Field is required"}var Xr,Qr,Zr,eo,to=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return Object.defineProperty(t,"state",{enumerable:!0,configurable:!0,writable:!0,value:{error:null,loading:!1,showPkceOptions:!1}}),Object.defineProperty(t,"clearToken",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.props.formApi.setValue("auth."+t.props.id+".token","")}}),Object.defineProperty(t,"togglePkceOptions",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.setState((function(e){return{showPkceOptions:!e.showPkceOptions}}))}}),Object.defineProperty(t,"handleCodeVerifierChange",{enumerable:!0,configurable:!0,writable:!0,value:function(e){var n=e.target.value;return Object(a.b)(t,void 0,void 0,(function(){var e;return Object(a.e)(this,(function(t){switch(t.label){case 0:return[4,Hr(n)];case 1:return e=t.sent(),this.setState({codeVerifier:n,validCodeChallenge:e}),[2]}}))}))}}),t}return Object(a.d)(t,e),Object.defineProperty(t.prototype,"values",{get:function(){var e,t;return(null===(e=this.props.form.values)||void 0===e||null===(t=e.auth)||void 0===t?void 0:t[this.props.id])||{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"errors",{get:function(){var e,t;return(null===(e=this.props.form.errors)||void 0===e||null===(t=e.auth)||void 0===t?void 0:t[this.props.id])||{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pkceInputActionButtonProps",{get:function(){var e=this;return void 0!==this.state.codeVerifier&&this.state.codeChallenge!==this.state.validCodeChallenge?{label:"sync",onClick:function(){e.state.codeVerifier&&e.setState({codeChallenge:e.state.validCodeChallenge})}}:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"componentDidMount",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;if(this.props.usePkce){var t=Br(43);Hr(t).then((function(n){e.setState({codeVerifier:t,codeChallenge:n,validCodeChallenge:n})}))}}}),Object.defineProperty(t.prototype,"handleAuthorize",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;if(e){this.props.formApi.validate();var n=this.props,r=n.flow,o=n.usePkce,i=n.id,s=n.tokenUrl,l=n.authCorsProxyUrl;if(Object(Zn.b)(this.errors)){this.setState({loading:!0,error:null});var c=l?l+Object(L.g)(e):e,u=l&&s?l+Object(L.g)(s):s,f=this.props.formApi.getValue("auth."+i+".scopes"),p={authorizationUrl:c.startsWith("http")?c:this.props.server+c,clientId:this.values.client_id,scopes:f,redirectUri:this.context.oAuth2RedirectURI,routingBasePath:this.context.routingBasePath,successCallback:function(e){t.props.formApi.setValue("auth."+t.props.id+".token",e),t.setState({loading:!1,error:null})},errorCallback:function(e){t.setState({loading:!1,error:(null==e?void 0:e.message)||"Failed to retrieve the access token"})}};"implicit"===r&&Rr.authorizeImplicit(p),"authorizationCode"===r&&Rr.authorizeAuthorizationCode(Object(a.a)(Object(a.a)(Object(a.a)({},p),{tokenUrl:null!=u&&u.startsWith("http")?u:this.props.server+u,clientSecret:this.values.client_secret}),o&&{codeVerifier:this.state.codeVerifier,codeChallenge:this.state.codeChallenge}))}}}}),Object.defineProperty(t.prototype,"handleLogout",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.clearToken(),this.setState({error:null})}}),Object.defineProperty(t.prototype,"handleCancel",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.setState({loading:!1,error:null}),Rr.clearRedirectData(this.props.flow)}}),Object.defineProperty(t.prototype,"render",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this,t=this.state,n=t.error,r=t.loading,o=this.props,i=o.id,l=o.scopes,c=o.authorizationUrl,u=o.flow,p=o.usePkce,d=o.defaultValues;if(!c)return s.createElement(h.b,null,"No flow info");var v=Object(f.e)("auth."+i+".token")||JSON.stringify(null==d?void 0:d.token);v=v?JSON.parse(v):"";var g=Object(f.j)(i,"client_id"),m={field:"auth."+i+".client_id",fullWidth:!0,initialValue:Object(f.e)("auth."+i+".client_id")||this.props.clientId||(null==d?void 0:d.client_id),initValue:Object(f.e)("auth."+i+".client_id")||this.props.clientId||(null==d?void 0:d.client_id),placeholder:"Your OAuth2 app Client ID",validate:Yr,validateOnBlur:!0,validateOnChange:!0};return s.createElement("div",null,s.createElement(h.f,null,s.createElement(h.a,null,s.createElement(h.d,null," Client ID: "),g?s.createElement(j,Object(a.a)({},m,{options:g})):s.createElement(C,Object(a.a)({},m,{"data-cy":"client-id-input"}))),"authorizationCode"===u&&s.createElement(s.Fragment,null,s.createElement(h.a,null,s.createElement(h.d,null,"Client Secret:"),s.createElement(C,{type:"password",fullWidth:!0,field:"auth."+i+".client_secret",initialValue:Object(f.e)("auth."+i+".client_secret")||(null==d?void 0:d.client_secret),validate:Yr,validateOnBlur:!0,validateOnChange:!0,"data-cy":"client-secret-input"})),p&&s.createElement(oo,null,s.createElement(Mr,{id:"pkce-opitons-toggle",label:"Configure PKCE manually",checked:this.state.showPkceOptions,onChange:this.togglePkceOptions,"data-cy":"pkce-options-toggle"}),this.state.showPkceOptions&&s.createElement(io,null,s.createElement(h.a,null,s.createElement(h.d,null,"Code Verifier"),s.createElement(w,{fullWidth:!0,value:this.state.codeVerifier,onChange:this.handleCodeVerifierChange,"data-cy":"code-verifier-input"})),s.createElement(h.a,null,s.createElement(h.d,null,"Code Challenge"),s.createElement(w,{fullWidth:!0,value:this.state.codeChallenge,onChange:function(t){var n=t.target.value;e.setState({codeChallenge:n})},inputActionButton:this.pkceInputActionButtonProps,"data-cy":"code-challenge-input"}))))),s.createElement(C,{fullWidth:!0,field:"auth."+i+".token",type:"hidden",initialValue:v}),s.createElement(Nr,{id:i,scopes:l}),this.values.token&&this.values.token.access_token?s.createElement(h.a,null,s.createElement(h.d,null," Access Token: "),s.createElement(w,{disabled:!0,type:"password",fullWidth:!0,value:this.values.token.access_token})):null),s.createElement(ro,null,this.values.token&&this.values.token.access_token?s.createElement(z.a,{fullWidth:!0,onClick:function(){e.handleLogout()}},"Log out"):r?s.createElement(s.Fragment,null,s.createElement(z.a,{fullWidth:!0,onClick:function(){e.handleCancel()}},"Cancel"),s.createElement(Jr,null)):s.createElement(z.a,{fullWidth:!0,disabled:!Object(Zn.b)(this.errors),onClick:function(){e.handleAuthorize(c)}},"Authorize")),r||n||!this.values.token||!this.values.token.access_token&&s.createElement(h.f,null,s.createElement(h.a,null,r?s.createElement(h.e,null,"Please, finish your authorization flow or cancel authorization."):n?s.createElement(s.Fragment,null,s.createElement(no,null,s.createElement(h.b,null,n))):this.values.token&&this.values.token.access_token?null:s.createElement(h.e,null," No Access Token. Please, Authorize. "))))}}),Object.defineProperty(t,"contextType",{enumerable:!0,configurable:!0,writable:!0,value:d.z}),t}(s.Component),no=d.nb.div(Xr||(Xr=Object(a.f)(["\n font-family: monospace;\n margin-top: 10px;\n line-height: 1;\n padding-left: 10px;\n border-left: 1px solid gray;\n"],["\n font-family: monospace;\n margin-top: 10px;\n line-height: 1;\n padding-left: 10px;\n border-left: 1px solid gray;\n"]))),ro=d.nb.div(Qr||(Qr=Object(a.f)(["\n margin-bottom: 15px;\n"],["\n margin-bottom: 15px;\n"]))),oo=d.nb.div(Zr||(Zr=Object(a.f)(["\n padding: 8px 0 20px;\n"],["\n padding: 8px 0 20px;\n"]))),io=d.nb.div(eo||(eo=Object(a.f)(["\n padding: 4px 0;\n"],["\n padding: 4px 0;\n"])));function ao(e){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.e)(this,(function(t){switch(t.label){case 0:return[4,fetch(e)];case 1:return[2,t.sent().json()]}}))}))}function so(e){var t,n=this,r=e.scheme,o=e.defaultValues,i=s.useState({}),l=i[0],c=i[1],u=s.useState(),f=u[0],p=u[1],d=s.useState(!1),v=d[0],g=d[1];s.useEffect((function(){m(r.openIdConnectUrl)}),[r.openIdConnectUrl]);var m=function(e){return Object(a.b)(n,void 0,void 0,(function(){var t,n;return Object(a.e)(this,(function(r){switch(r.label){case 0:g(!0),p(""),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,ao(e)];case 2:return t=r.sent(),c(t),[3,4];case 3:return n=r.sent(),p(n.message),[3,4];case 4:return g(!1),[2]}}))}))};return s.createElement("div",null,v?s.createElement("div",null,s.createElement("div",null,"Fetching OpenID Connect metadata..."),s.createElement(Jr,null)):s.createElement("div",null,f?s.createElement(h.b,null,f):null!=l&&null!==(t=l.response_types_supported)&&void 0!==t&&t.includes("token")?s.createElement(s.Fragment,null,s.createElement(co,null,"OAuth2 Implicit Flow"),s.createElement(to,{key:e.id,authorizationUrl:l.authorization_endpoint,authCorsProxyUrl:e.authCorsProxyUrl,scopes:l.scopes_supported,server:e.server,id:e.id,form:e.form,formApi:e.formApi,clientId:e.clientId,flow:"implicit",defaultValues:o})):s.createElement("div",null,"Unsupported flow")))}var lo,co=d.nb.div(lo||(lo=Object(a.f)(["\n margin-top: 5px;\n margin-bottom: 10px;\n"],["\n margin-top: 5px;\n margin-bottom: 10px;\n"]))),uo=n(12);function fo(e){if(!e)return"Field is required"}function po(e){var t,n;if("cookie"===e.in)return t=e.name,(n=document.cookie.match("\\b"+t+"=([^;]*)\\b"))?n[1]:void 0}var ho=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return Object.defineProperty(t,"state",{enumerable:!0,configurable:!0,writable:!0,value:{activeScheme:0}}),Object.defineProperty(t,"handleSchemeChange",{enumerable:!0,configurable:!0,writable:!0,value:function(e){t.setState({activeScheme:e.idx}),Object(f.p)("securityRequirementName",e.value)}}),t}return Object(a.d)(t,e),Object.defineProperty(t,"getDerivedStateFromProps",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=e.operation.security.map((function(e){return e.schemes.map((function(e){return e.id})).join(" and ")})),n=Object(f.e)("securityRequirementName"),r=t.findIndex((function(e){return e===n}));return{activeScheme:r<0?0:r}}}),Object.defineProperty(t.prototype,"render",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this,t=this.props.securityDefaults,n=this.state.activeScheme,r=this.props.operation.security,o=r.map((function(e){return e.schemes.map((function(e){return e.id})).join(" and ")})).map((function(e,t){return{value:e,idx:t}}));return 0===o.length?null:s.createElement(s.Fragment,null,s.createElement(h.f,null,o.length>1&&s.createElement(h.a,null,s.createElement(d.f,{variant:"dark",fullWidth:!0,prefix:"Security scheme: ",options:o,value:o[n].value,onChange:this.handleSchemeChange}))||null,r[n].schemes.map((function(n){var r=Object(f.c)(n.id);if("apiKey"===n.type){var o=Object(f.j)(r,""),i={field:"auth."+r,fullWidth:!0,initialValue:po(n)||Object(f.e)("auth."+r)||(null==t?void 0:t[r]),initValue:po(n)||Object(f.e)("auth."+r)||(null==t?void 0:t[r]),validate:fo,validateOnBlur:!0,validateOnChange:!0};return s.createElement(h.a,{key:r},s.createElement(h.d,null," ",n.name,": "),o?s.createElement(j,Object(a.a)({},i,{options:o})):s.createElement(C,Object(a.a)({},i,{type:"password","data-cy":"apiKey-auth-password"})))}if("http"===n.type){if("basic"===n.scheme){var l,c,u,p=Object(f.j)(r,"username");i={field:"auth."+r+".username",fullWidth:!0,initialValue:Object(f.e)("auth."+r+".username")||(null==t||null===(l=t[r])||void 0===l?void 0:l.username),initValue:Object(f.e)("auth."+r+".username")||(null==t||null===(c=t[r])||void 0===c?void 0:c.username),validate:fo,validateOnBlur:!0,validateOnChange:!0};return s.createElement(s.Fragment,{key:r},s.createElement(h.a,null,s.createElement(h.d,null," ",Object(uo.a)("tryItAuthBasicUsername"),": "),p?s.createElement(j,Object(a.a)({},i,{options:p})):s.createElement(C,Object(a.a)({},i))),s.createElement(h.a,null,s.createElement(h.d,null," ",Object(uo.a)("tryItAuthBasicPassword"),": "),s.createElement(C,{type:"password","data-cy":"http-auth-password",fullWidth:!0,field:"auth."+r+".password",validate:fo,initialValue:Object(f.e)("auth."+r+".password")||(null==t||null===(u=t[r])||void 0===u?void 0:u.password),validateOnBlur:!0,validateOnChange:!0})))}if("bearer"===n.scheme){var d=Object(f.j)(r,"");i={field:"auth."+r,fullWidth:!0,initialValue:Object(f.e)("auth."+r)||(null==t?void 0:t[r]),initValue:Object(f.e)("auth."+r)||(null==t?void 0:t[r]),validate:fo,validateOnBlur:!0,validateOnChange:!0};return s.createElement(s.Fragment,{key:r},s.createElement(h.a,null,s.createElement(h.d,null," Bearer Token: "),d?s.createElement(j,Object(a.a)({},i,{options:d})):s.createElement(C,Object(a.a)({},i,{type:"password",placeholder:"(without 'Bearer')"}))))}}else{if("oauth2"===n.type&&n.flows&&n.flows.clientCredentials)return s.createElement($r,{key:r,flow:n.flows.clientCredentials,server:e.props.activeServer,authCorsProxyUrl:e.props.authCorsProxyUrl,id:r,form:e.props.form,formApi:e.props.formApi,clientId:n.flows.clientCredentials["x-defaultClientId"]||n["x-defaultClientId"],defaultValues:null==t?void 0:t[r]});var v,g,m;if("oauth2"===n.type&&n.flows&&n.flows.implicit)return s.createElement(to,{key:r,authorizationUrl:n.flows.implicit.authorizationUrl,authCorsProxyUrl:e.props.authCorsProxyUrl,scopes:Object.keys((null==n||null===(v=n.flows)||void 0===v||null===(g=v.implicit)||void 0===g?void 0:g.scopes)||{}),server:e.props.activeServer,id:r,form:e.props.form,formApi:e.props.formApi,clientId:n.flows.implicit["x-defaultClientId"]||n["x-defaultClientId"],flow:"implicit",defaultValues:null==t?void 0:t[r]});if("oauth2"===n.type&&n.flows&&n.flows.authorizationCode)return s.createElement(to,{key:r,authorizationUrl:n.flows.authorizationCode.authorizationUrl,tokenUrl:n.flows.authorizationCode.tokenUrl,authCorsProxyUrl:e.props.authCorsProxyUrl,scopes:Object.keys((null===(m=n.flows.authorizationCode)||void 0===m?void 0:m.scopes)||{}),server:e.props.activeServer,id:r,form:e.props.form,formApi:e.props.formApi,clientId:n.flows.authorizationCode["x-defaultClientId"]||n["x-defaultClientId"],flow:"authorizationCode",usePkce:n.flows.authorizationCode["x-usePkce"],defaultValues:null==t?void 0:t[r]});if("oauth2"===n.type){var y,b=Object(f.e)("auth."+r+".token")||JSON.stringify(null==t||null===(y=t[r])||void 0===y?void 0:y.token);return b=b?JSON.parse(b):{},s.createElement(s.Fragment,{key:r},s.createElement(h.a,null,s.createElement(h.d,null," Access Token Type: "),s.createElement(C,{fullWidth:!0,field:"auth."+r+".token.token_type",initialValue:b.token_type||"Bearer"})),s.createElement(h.a,null,s.createElement(h.d,null," Access Token: "),s.createElement(C,{type:"password",fullWidth:!0,field:"auth."+r+".token.access_token",validate:fo,initialValue:b.access_token,validateOnBlur:!0,validateOnChange:!0})))}if("openIdConnect"===n.type)return s.createElement(so,{key:r,server:e.props.activeServer,authCorsProxyUrl:e.props.authCorsProxyUrl,id:r,form:e.props.form,formApi:e.props.formApi,scheme:n,clientId:n["x-defaultClientId"],defaultValues:null==t?void 0:t[r]})}}))),s.createElement("small",null,s.createElement("strong",null,"Note"),": Your credentials will be saved until the end of the browser session"))}}),t}(s.Component),vo=n(95),go=n(587),mo=n.n(go),yo=n(683),bo=n.n(yo),xo=n(749),wo=n.n(xo),Co=n(37),Ao=n.n(Co),ko=n(689),Oo=n.n(ko),So=n(596),Eo=n.n(So),jo=n(633),To=n.n(jo),Mo=n(695),Po=n.n(Mo),Io=n(658),Fo=n.n(Io),Lo=n(699),No=n.n(Lo),_o=n(937),Do=n.n(_o),Ro=n(941),Vo=n.n(Ro),Bo=n(700),Uo=n.n(Bo),Wo=n(605),zo=n.n(Wo),Ho=n(594),qo=n.n(Ho),Go=n(584),$o=n.n(Go),Ko=n(771),Jo=n.n(Ko),Yo=n(606),Xo=n.n(Yo),Qo=(n(959),n(960)),Zo=n.n(Qo),ei=n(773),ti=n.n(ei),ni=n(705),ri=n.n(ni),oi=n(649),ii=n.n(oi),ai=n(83),si=n(711),li=n.n(si),ci=n(712),ui=n.n(ci),fi=n(1021),pi=n.n(fi),di=n(713),hi=n.n(di),vi=n(1034),gi=n.n(vi),mi=n(1040),yi=n.n(mi),bi=n(1048),xi=n.n(bi),wi=n(1053),Ci=function(e){var t=function(e,t){return{name:e,value:t}};return ii()(e.prototype.set)||ii()(e.prototype.get)||ii()(e.prototype.getAll)||ii()(e.prototype.has)?e:function(e){gi()(r,e);var n=yi()(r);function r(e){var t;return li()(this,r),(t=n.call(this,e)).entryList=[],t}return ui()(r,[{key:"append",value:function(e,n,o){return this.entryList.push(t(e,n)),pi()(hi()(r.prototype),"append",this).call(this,e,n,o)}},{key:"set",value:function(e,n){var r,o=t(e,n);this.entryList=Xo()(r=this.entryList).call(r,(function(t){return t.name!==e})),this.entryList.push(o)}},{key:"get",value:function(e){var t,n=xi()(t=this.entryList).call(t,(function(t){return t.name===e}));return void 0===n?null:n}},{key:"getAll",value:function(e){var t,n;return zo()(t=Xo()(n=this.entryList).call(n,(function(t){return t.name===e}))).call(t,(function(e){return e.value}))}},{key:"has",value:function(e){return this.entryList.some((function(t){return t.name===e}))}}]),r}(e)}(n.n(wi).a),Ai=n(665),ki=n.n(Ai),Oi=n(607),Si=n.n(Oi),Ei=n(83).Buffer,ji=function(e){return":/?#[]@!$&'()*+,;=".indexOf(e)>-1},Ti=function(e){return/^[a-z0-9\-._~]+$/i.test(e)};function Mi(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.escape,o=arguments.length>2?arguments[2]:void 0;return"number"==typeof e&&(e=e.toString()),"string"==typeof e&&e.length&&r?o?JSON.parse(e):zo()(t=ki()(e)).call(t,(function(e){var t,n;return Ti(e)||ji(e)&&"unsafe"===r?e:zo()(t=zo()(n=Ei.from(e).toJSON().data||[]).call(n,(function(e){var t;return Si()(t="0".concat(e.toString(16).toUpperCase())).call(t,-2)}))).call(t,(function(e){return"%".concat(e)})).join("")})).join(""):e}function Pi(e){var t=e.value;return Array.isArray(t)?function(e){var t=e.key,n=e.value,r=e.style,o=e.explode,i=e.escape,a=function(e){return Mi(e,{escape:i})};if("simple"===r)return zo()(n).call(n,(function(e){return a(e)})).join(",");if("label"===r)return".".concat(zo()(n).call(n,(function(e){return a(e)})).join("."));if("matrix"===r)return zo()(n).call(n,(function(e){return a(e)})).reduce((function(e,n){var r,i,a;return!e||o?$o()(i=$o()(a="".concat(e||"",";")).call(a,t,"=")).call(i,n):$o()(r="".concat(e,",")).call(r,n)}),"");if("form"===r){var s=o?"&".concat(t,"="):",";return zo()(n).call(n,(function(e){return a(e)})).join(s)}if("spaceDelimited"===r){var l=o?"".concat(t,"="):"";return zo()(n).call(n,(function(e){return a(e)})).join(" ".concat(l))}if("pipeDelimited"===r){var c=o?"".concat(t,"="):"";return zo()(n).call(n,(function(e){return a(e)})).join("|".concat(c))}return}(e):"object"===Eo()(t)?function(e){var t=e.key,n=e.value,r=e.style,o=e.explode,i=e.escape,a=function(e){return Mi(e,{escape:i})},s=qo()(n);if("simple"===r)return s.reduce((function(e,t){var r,i,s,l=a(n[t]),c=o?"=":",",u=e?"".concat(e,","):"";return $o()(r=$o()(i=$o()(s="".concat(u)).call(s,t)).call(i,c)).call(r,l)}),"");if("label"===r)return s.reduce((function(e,t){var r,i,s,l=a(n[t]),c=o?"=":".",u=e?"".concat(e,"."):".";return $o()(r=$o()(i=$o()(s="".concat(u)).call(s,t)).call(i,c)).call(r,l)}),"");if("matrix"===r&&o)return s.reduce((function(e,t){var r,o,i=a(n[t]),s=e?"".concat(e,";"):";";return $o()(r=$o()(o="".concat(s)).call(o,t,"=")).call(r,i)}),"");if("matrix"===r)return s.reduce((function(e,r){var o,i,s=a(n[r]),l=e?"".concat(e,","):";".concat(t,"=");return $o()(o=$o()(i="".concat(l)).call(i,r,",")).call(o,s)}),"");if("form"===r)return s.reduce((function(e,t){var r,i,s,l,c=a(n[t]),u=e?$o()(r="".concat(e)).call(r,o?"&":","):"",f=o?"=":",";return $o()(i=$o()(s=$o()(l="".concat(u)).call(l,t)).call(s,f)).call(i,c)}),"");return}(e):function(e){var t,n=e.key,r=e.value,o=e.style,i=e.escape,a=function(e){return Mi(e,{escape:i})};if("simple"===o)return a(r);if("label"===o)return".".concat(a(r));if("matrix"===o)return $o()(t=";".concat(n,"=")).call(t,a(r));if("form"===o)return a(r);if("deepObject"===o)return a(r);return}(e)}var Ii={serializeRes:Di,mergeInQueryOrForm:Ki};function Fi(e){return Li.apply(this,arguments)}function Li(){return(Li=Po()(Fo.a.mark((function e(t){var n,r,o,i,a,s=arguments;return Fo.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=s.length>1&&void 0!==s[1]?s[1]:{},"object"===Eo()(t)&&(t=(n=t).url),n.headers=n.headers||{},Ii.mergeInQueryOrForm(n),n.headers&&qo()(n.headers).forEach((function(e){var t=n.headers[e];"string"==typeof t&&(n.headers[e]=t.replace(/\n+/g," "))})),!n.requestInterceptor){e.next=12;break}return e.next=8,n.requestInterceptor(n);case 8:if(e.t0=e.sent,e.t0){e.next=11;break}e.t0=n;case 11:n=e.t0;case 12:return r=n.headers["content-type"]||n.headers["Content-Type"],/multipart\/form-data/i.test(r)&&(delete n.headers["content-type"],delete n.headers["Content-Type"]),e.prev=14,e.next=17,(n.userFetch||fetch)(n.url,n);case 17:return o=e.sent,e.next=20,Ii.serializeRes(o,t,n);case 20:if(o=e.sent,!n.responseInterceptor){e.next=28;break}return e.next=24,n.responseInterceptor(o);case 24:if(e.t1=e.sent,e.t1){e.next=27;break}e.t1=o;case 27:o=e.t1;case 28:e.next=39;break;case 30:if(e.prev=30,e.t2=e.catch(14),o){e.next=34;break}throw e.t2;case 34:throw(i=new Error(o.statusText)).status=o.status,i.statusCode=o.status,i.responseError=e.t2,i;case 39:if(o.ok){e.next=45;break}throw(a=new Error(o.statusText)).status=o.status,a.statusCode=o.status,a.response=o,a;case 45:return e.abrupt("return",o);case 46:case"end":return e.stop()}}),e,null,[[14,30]])})))).apply(this,arguments)}var Ni=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return/(json|xml|yaml|text)\b/.test(e)};function _i(e,t){return t&&(0===t.indexOf("application/json")||t.indexOf("+json")>0)?JSON.parse(e):ti.a.safeLoad(e)}function Di(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.loadSpec,o=void 0!==r&&r,i={ok:e.ok,url:e.url||t,status:e.status,statusText:e.statusText,headers:Vi(e.headers)},a=i.headers["content-type"],s=o||Ni(a),l=s?e.text:e.blob||e.buffer;return l.call(e).then((function(e){if(i.text=e,i.data=e,s)try{var t=_i(e,a);i.body=t,i.obj=t}catch(e){i.parseError=e}return i}))}function Ri(e){return No()(e).call(e,", ")?e.split(", "):e}function Vi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ii()(Do()(e))?Vo()(Do()(e).call(e)).reduce((function(e,t){var n=To()(t,2),r=n[0],o=n[1];return e[r]=Ri(o),e}),{}):{}}function Bi(e,t){return t||"undefined"==typeof navigator||(t=navigator),t&&"ReactNative"===t.product?!(!e||"object"!==Eo()(e)||"string"!=typeof e.uri):"undefined"!=typeof File&&e instanceof File||("undefined"!=typeof Blob&&e instanceof Blob||(void 0!==ai.Buffer&&e instanceof ai.Buffer||null!==e&&"object"===Eo()(e)&&"function"==typeof e.pipe))}function Ui(e,t){return Array.isArray(e)&&e.some((function(e){return Bi(e,t)}))}var Wi={form:",",spaceDelimited:"%20",pipeDelimited:"|"},zi={csv:",",ssv:"%20",tsv:"%09",pipes:"|"};function Hi(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=t.collectionFormat,o=t.allowEmptyValue,i=t.serializationOption,a=t.encoding,s="object"!==Eo()(t)||Array.isArray(t)?t:t.value,l=n?function(e){return e.toString()}:function(e){return encodeURIComponent(e)},c=l(e);if(void 0===s&&o)return[[c,""]];if(Bi(s)||Ui(s))return[[c,s]];if(i)return qi(e,s,n,i);if(a){if([Eo()(a.style),Eo()(a.explode),Eo()(a.allowReserved)].some((function(e){return"undefined"!==e})))return qi(e,s,n,ri()(a,["style","explode","allowReserved"]));if(a.contentType){if("application/json"===a.contentType){var u="string"==typeof s?s:Uo()(s);return[[c,l(u)]]}return[[c,l(s.toString())]]}return"object"!==Eo()(s)?[[c,l(s)]]:Array.isArray(s)&&s.every((function(e){return"object"!==Eo()(e)}))?[[c,zo()(s).call(s,l).join(",")]]:[[c,l(Uo()(s))]]}return"object"!==Eo()(s)?[[c,l(s)]]:Array.isArray(s)?"multi"===r?[[c,zo()(s).call(s,l)]]:[[c,zo()(s).call(s,l).join(zi[r||"csv"])]]:[[c,""]]}function qi(e,t,n,r){var o,i,a,s=r.style||"form",l=void 0===r.explode?"form"===s:r.explode,c=!n&&(r&&r.allowReserved?"unsafe":"reserved"),u=function(e){return Mi(e,{escape:c})},f=n?function(e){return e}:function(e){return Mi(e,{escape:c})};return"object"!==Eo()(t)?[[f(e),u(t)]]:Array.isArray(t)?l?[[f(e),zo()(t).call(t,u)]]:[[f(e),zo()(t).call(t,u).join(Wi[s])]]:"deepObject"===s?zo()(i=qo()(t)).call(i,(function(n){var r;return[f($o()(r="".concat(e,"[")).call(r,n,"]")),u(t[n])]})):l?zo()(a=qo()(t)).call(a,(function(e){return[f(e),u(t[e])]})):[[f(e),zo()(o=qo()(t)).call(o,(function(e){var n;return[$o()(n="".concat(f(e),",")).call(n,u(t[e]))]})).join(",")]]}function Gi(e){return Jo()(e).reduce((function(e,t){var n,r=To()(t,2),o=r[0],i=r[1],a=Oo()(Hi(o,i,!0));try{for(a.s();!(n=a.n()).done;){var s=To()(n.value,2),l=s[0],c=s[1];if(Array.isArray(c)){var u,f=Oo()(c);try{for(f.s();!(u=f.n()).done;){var p=u.value;e.append(l,p)}}catch(e){f.e(e)}finally{f.f()}}else e.append(l,c)}}catch(e){a.e(e)}finally{a.f()}return e}),new Ci)}function $i(e){var t=qo()(e).reduce((function(t,n){var r,o=Oo()(Hi(n,e[n]));try{for(o.s();!(r=o.n()).done;){var i=To()(r.value,2),a=i[0],s=i[1];t[a]=s}}catch(e){o.e(e)}finally{o.f()}return t}),{});return Zo.a.stringify(t,{encode:!1,indices:!1})||""}function Ki(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.url,n=void 0===t?"":t,r=e.query,o=e.form,i=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Xo()(t).call(t,(function(e){return e})).join("&");return r?"?".concat(r):""};if(o){var a=qo()(o).some((function(e){var t=o[e].value;return Bi(t)||Ui(t)})),s=e.headers["content-type"]||e.headers["Content-Type"];a||/multipart\/form-data/i.test(s)?e.body=Gi(e.form):e.body=$i(o),delete e.form}if(r){var l=n.split("?"),c=To()(l,2),u=c[0],f=c[1],p="";if(f){var d=Zo.a.parse(f),h=qo()(r);h.forEach((function(e){return delete d[e]})),p=Zo.a.stringify(d,{encode:!0})}var v=i(p,$i(r));e.url=u+v,delete e.query}return e}var Ji=n(638),Yi=n.n(Ji),Xi=n(779),Qi=n.n(Xi),Zi=n(1063),ea=n.n(Zi),ta=n(1068),na=n.n(ta),ra=n(1099),oa=n.n(ra),ia=n(739),aa=n.n(ia),sa=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),la=Object.prototype.hasOwnProperty;function ca(e,t){return la.call(e,t)}function ua(e){if(Array.isArray(e)){for(var t=new Array(e.length),n=0;n<t.length;n++)t[n]=""+n;return t}if(Object.keys)return Object.keys(e);t=[];for(var r in e)ca(e,r)&&t.push(r);return t}function fa(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}}function pa(e){for(var t,n=0,r=e.length;n<r;){if(!((t=e.charCodeAt(n))>=48&&t<=57))return!1;n++}return!0}function da(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function ha(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function va(e,t){var n=[e];for(var r in t){var o="object"==typeof t[r]?JSON.stringify(t[r],null,2):t[r];void 0!==o&&n.push(r+": "+o)}return n.join("\n")}var ga=function(e){function t(t,n,r,o,i){var a=this.constructor,s=e.call(this,va(t,{name:n,index:r,operation:o,tree:i}))||this;return s.name=n,s.index=r,s.operation=o,s.tree=i,Object.setPrototypeOf(s,a.prototype),s.message=va(t,{name:n,index:r,operation:o,tree:i}),s}return sa(t,e),t}(Error),ma=ga,ya=fa,ba={add:function(e,t,n){return e[t]=this.value,{newDocument:n}},remove:function(e,t,n){var r=e[t];return delete e[t],{newDocument:n,removed:r}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:function(e,t,n){var r=wa(n,this.path);r&&(r=fa(r));var o=Ca(n,{op:"remove",path:this.from}).removed;return Ca(n,{op:"add",path:this.path,value:o}),{newDocument:n,removed:r}},copy:function(e,t,n){var r=wa(n,this.from);return Ca(n,{op:"add",path:this.path,value:fa(r)}),{newDocument:n}},test:function(e,t,n){return{newDocument:n,test:Ea(e[t],this.value)}},_get:function(e,t,n){return this.value=e[t],{newDocument:n}}},xa={add:function(e,t,n){return pa(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:n,index:t}},remove:function(e,t,n){return{newDocument:n,removed:e.splice(t,1)[0]}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:ba.move,copy:ba.copy,test:ba.test,_get:ba._get};function wa(e,t){if(""==t)return e;var n={op:"_get",path:t};return Ca(e,n),n.value}function Ca(e,t,n,r,o,i){if(void 0===n&&(n=!1),void 0===r&&(r=!0),void 0===o&&(o=!0),void 0===i&&(i=0),n&&("function"==typeof n?n(t,0,e,t.path):Oa(t,0)),""===t.path){var a={newDocument:e};if("add"===t.op)return a.newDocument=t.value,a;if("replace"===t.op)return a.newDocument=t.value,a.removed=e,a;if("move"===t.op||"copy"===t.op)return a.newDocument=wa(e,t.from),"move"===t.op&&(a.removed=e),a;if("test"===t.op){if(a.test=Ea(e,t.value),!1===a.test)throw new ma("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return a.newDocument=e,a}if("remove"===t.op)return a.removed=e,a.newDocument=null,a;if("_get"===t.op)return t.value=e,a;if(n)throw new ma("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",i,t,e);return a}r||(e=fa(e));var s=(t.path||"").split("/"),l=e,c=1,u=s.length,f=void 0,p=void 0,d=void 0;for(d="function"==typeof n?n:Oa;;){if(p=s[c],o&&"__proto__"==p)throw new TypeError("JSON-Patch: modifying `__proto__` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(n&&void 0===f&&(void 0===l[p]?f=s.slice(0,c).join("/"):c==u-1&&(f=t.path),void 0!==f&&d(t,0,e,f)),c++,Array.isArray(l)){if("-"===p)p=l.length;else{if(n&&!pa(p))throw new ma("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",i,t,e);pa(p)&&(p=~~p)}if(c>=u){if(n&&"add"===t.op&&p>l.length)throw new ma("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",i,t,e);if(!1===(a=xa[t.op].call(t,l,p,e)).test)throw new ma("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return a}}else if(p&&-1!=p.indexOf("~")&&(p=ha(p)),c>=u){if(!1===(a=ba[t.op].call(t,l,p,e)).test)throw new ma("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return a}l=l[p]}}function Aa(e,t,n,r,o){if(void 0===r&&(r=!0),void 0===o&&(o=!0),n&&!Array.isArray(t))throw new ma("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");r||(e=fa(e));for(var i=new Array(t.length),a=0,s=t.length;a<s;a++)i[a]=Ca(e,t[a],n,!0,o,a),e=i[a].newDocument;return i.newDocument=e,i}function ka(e,t,n){var r=Ca(e,t);if(!1===r.test)throw new ma("Test operation failed","TEST_OPERATION_FAILED",n,t,e);return r.newDocument}function Oa(e,t,n,r){if("object"!=typeof e||null===e||Array.isArray(e))throw new ma("Operation is not an object","OPERATION_NOT_AN_OBJECT",t,e,n);if(!ba[e.op])throw new ma("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,n);if("string"!=typeof e.path)throw new ma("Operation `path` property is not a string","OPERATION_PATH_INVALID",t,e,n);if(0!==e.path.indexOf("/")&&e.path.length>0)throw new ma('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,n);if(("move"===e.op||"copy"===e.op)&&"string"!=typeof e.from)throw new ma("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,n);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&void 0===e.value)throw new ma("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,n);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&function e(t){if(void 0===t)return!0;if(t)if(Array.isArray(t)){for(var n=0,r=t.length;n<r;n++)if(e(t[n]))return!0}else if("object"==typeof t){var o=ua(t),i=o.length;for(n=0;n<i;n++)if(e(t[o[n]]))return!0}return!1}(e.value))throw new ma("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,n);if(n)if("add"==e.op){var o=e.path.split("/").length,i=r.split("/").length;if(o!==i+1&&o!==i)throw new ma("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,n)}else if("replace"===e.op||"remove"===e.op||"_get"===e.op){if(e.path!==r)throw new ma("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,n)}else if("move"===e.op||"copy"===e.op){var a=Sa([{op:"_get",path:e.from,value:void 0}],n);if(a&&"OPERATION_PATH_UNRESOLVABLE"===a.name)throw new ma("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,n)}}function Sa(e,t,n){try{if(!Array.isArray(e))throw new ma("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)Aa(fa(t),fa(e),n||!0);else{n=n||Oa;for(var r=0;r<e.length;r++)n(e[r],r,t,void 0)}}catch(e){if(e instanceof ma)return e;throw e}}function Ea(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){var n,r,o,i=Array.isArray(e),a=Array.isArray(t);if(i&&a){if((r=e.length)!=t.length)return!1;for(n=r;0!=n--;)if(!Ea(e[n],t[n]))return!1;return!0}if(i!=a)return!1;var s=Object.keys(e);if((r=s.length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!t.hasOwnProperty(s[n]))return!1;for(n=r;0!=n--;)if(!Ea(e[o=s[n]],t[o]))return!1;return!0}return e!=e&&t!=t}
|
|
8
8
|
/*!
|
package/dist/oauth2-redirect.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
* Redocly Reference Docs
|
|
3
3
|
* (c) Copyright 2018 Redocly LLC, all rights reserved.
|
|
4
4
|
* -------------------------------------------------------------
|
|
5
|
-
* Version: "2.7.
|
|
5
|
+
* Version: "2.7.6"
|
|
6
6
|
*/
|
|
7
7
|
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.RedoclyReferenceDocs=e():t.RedoclyReferenceDocs=e()}(this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=568)}({100:function(t,e){var r=0,n=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++r+n).toString(36)}},101:function(t,e){var r=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:r)(t)}},102:function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},103:function(t,e,r){var n=r(132),o=r(102);t.exports=Object.keys||function(t){return n(t,o)}},106:function(t,e,r){var n=r(22),o=r(84),i="".split;t.exports=n((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},107:function(t,e,r){var n=r(14),o=r(25),i=n.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},108:function(t,e,r){var n=r(99),o=Function.toString;"function"!=typeof n.inspectSource&&(n.inspectSource=function(t){return o.call(t)}),t.exports=n.inspectSource},109:function(t,e,r){var n=r(50),o=r(99);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.14.0",mode:n?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},110:function(t,e){e.f=Object.getOwnPropertySymbols},111:function(t,e,r){var n=r(112),o=r(22);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},112:function(t,e,r){var n,o,i=r(14),a=r(134),u=i.process,c=u&&u.versions,s=c&&c.v8;s?o=(n=s.split("."))[0]<4?1:n[0]+n[1]:a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(o=n[1]),t.exports=o&&+o},113:function(t,e,r){var n=r(19),o=r(78),i=r(32),a=n("unscopables"),u=Array.prototype;null==u[a]&&i.f(u,a,{configurable:!0,value:o(null)}),t.exports=function(t){u[a][t]=!0}},115:function(t,e){t.exports=function(t,e,r){if(!(t instanceof e))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return t}},116:function(t,e,r){var n=r(28),o=r(196);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),e=r instanceof Array}catch(t){}return function(r,i){return n(r),o(i),e?t.call(r,i):r.__proto__=i,r}}():void 0)},117:function(t,e,r){"use strict";var n=r(21),o=r(156),i=r(118),a=r(116),u=r(53),c=r(39),s=r(44),f=r(19),l=r(50),h=r(62),p=r(139),v=p.IteratorPrototype,y=p.BUGGY_SAFARI_ITERATORS,g=f("iterator"),d=function(){return this};t.exports=function(t,e,r,f,p,m,b){o(r,e,f);var w,x,S,O=function(t){if(t===p&&L)return L;if(!y&&t in A)return A[t];switch(t){case"keys":case"values":case"entries":return function(){return new r(this,t)}}return function(){return new r(this)}},k=e+" Iterator",j=!1,A=t.prototype,R=A[g]||A["@@iterator"]||p&&A[p],L=!y&&R||O(p),P="Array"==e&&A.entries||R;if(P&&(w=i(P.call(new t)),v!==Object.prototype&&w.next&&(l||i(w)===v||(a?a(w,v):"function"!=typeof w[g]&&c(w,g,d)),u(w,k,!0,!0),l&&(h[k]=d))),"values"==p&&R&&"values"!==R.name&&(j=!0,L=function(){return R.call(this)}),l&&!b||A[g]===L||c(A,g,L),h[e]=L,p)if(x={values:O("values"),keys:m?L:O("keys"),entries:O("entries")},b)for(S in x)(y||j||!(S in A))&&s(A,S,x[S]);else n({target:e,proto:!0,forced:y||j},x);return x}},118:function(t,e,r){var n=r(23),o=r(61),i=r(86),a=r(197),u=i("IE_PROTO"),c=Object.prototype;t.exports=a?Object.getPrototypeOf:function(t){return t=o(t),n(t,u)?t[u]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?c:null}},130:function(t,e,r){var n=r(31),o=r(22),i=r(107);t.exports=!n&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},131:function(t,e,r){var n=r(132),o=r(102).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},132:function(t,e,r){var n=r(23),o=r(57),i=r(151).indexOf,a=r(76);t.exports=function(t,e){var r,u=o(t),c=0,s=[];for(r in u)!n(a,r)&&n(u,r)&&s.push(r);for(;e.length>c;)n(u,r=e[c++])&&(~i(s,r)||s.push(r));return s}},133:function(t,e,r){var n=r(22),o=/#|\.prototype\./,i=function(t,e){var r=u[a(t)];return r==s||r!=c&&("function"==typeof e?n(e):!!e)},a=i.normalize=function(t){return String(t).replace(o,".").toLowerCase()},u=i.data={},c=i.NATIVE="N",s=i.POLYFILL="P";t.exports=i},134:function(t,e,r){var n=r(51);t.exports=n("navigator","userAgent")||""},136:function(t,e,r){var n=r(137),o=r(62),i=r(19)("iterator");t.exports=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[n(t)]}},137:function(t,e,r){var n=r(138),o=r(84),i=r(19)("toStringTag"),a="Arguments"==o(function(){return arguments}());t.exports=n?o:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?r:a?o(e):"Object"==(n=o(e))&&"function"==typeof e.callee?"Arguments":n}},138:function(t,e,r){var n={};n[r(19)("toStringTag")]="z",t.exports="[object z]"===String(n)},139:function(t,e,r){"use strict";var n,o,i,a=r(22),u=r(118),c=r(39),s=r(23),f=r(19),l=r(50),h=f("iterator"),p=!1;[].keys&&("next"in(i=[].keys())?(o=u(u(i)))!==Object.prototype&&(n=o):p=!0);var v=null==n||a((function(){var t={};return n[h].call(t)!==t}));v&&(n={}),l&&!v||s(n,h)||c(n,h,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:p}},14:function(t,e,r){(function(e){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,r(27))},150:function(t,e,r){var n=r(23),o=r(190),i=r(74),a=r(32);t.exports=function(t,e){for(var r=o(e),u=a.f,c=i.f,s=0;s<r.length;s++){var f=r[s];n(t,f)||u(t,f,c(e,f))}}},151:function(t,e,r){var n=r(57),o=r(77),i=r(191),a=function(t){return function(e,r,a){var u,c=n(e),s=o(c.length),f=i(a,s);if(t&&r!=r){for(;s>f;)if((u=c[f++])!=u)return!0}else for(;s>f;f++)if((t||f in c)&&c[f]===r)return t||f||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},152:function(t,e,r){var n=r(111);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},153:function(t,e,r){var n=r(31),o=r(32),i=r(28),a=r(103);t.exports=n?Object.defineProperties:function(t,e){i(t);for(var r,n=a(e),u=n.length,c=0;u>c;)o.f(t,r=n[c++],e[r]);return t}},154:function(t,e,r){var n=r(51);t.exports=n("document","documentElement")},155:function(t,e,r){var n=r(44);t.exports=function(t,e,r){for(var o in e)n(t,o,e[o],r);return t}},156:function(t,e,r){"use strict";var n=r(139).IteratorPrototype,o=r(78),i=r(56),a=r(53),u=r(62),c=function(){return this};t.exports=function(t,e,r){var s=e+" Iterator";return t.prototype=o(n,{next:i(1,r)}),a(t,s,!1,!0),u[s]=c,t}},157:function(t,e,r){"use strict";var n=r(158).charAt,o=r(58),i=r(117),a=o.set,u=o.getterFor("String Iterator");i(String,"String",(function(t){a(this,{type:"String Iterator",string:String(t),index:0})}),(function(){var t,e=u(this),r=e.string,o=e.index;return o>=r.length?{value:void 0,done:!0}:(t=n(r,o),e.index+=t.length,{value:t,done:!1})}))},158:function(t,e,r){var n=r(101),o=r(75),i=function(t){return function(e,r){var i,a,u=String(o(e)),c=n(r),s=u.length;return c<0||c>=s?t?"":void 0:(i=u.charCodeAt(c))<55296||i>56319||c+1===s||(a=u.charCodeAt(c+1))<56320||a>57343?t?u.charAt(c):i:t?u.slice(c,c+2):a-56320+(i-55296<<10)+65536}};t.exports={codeAt:i(!1),charAt:i(!0)}},189:function(t,e,r){var n=r(14),o=r(108),i=n.WeakMap;t.exports="function"==typeof i&&/native code/.test(o(i))},19:function(t,e,r){var n=r(14),o=r(109),i=r(23),a=r(100),u=r(111),c=r(152),s=o("wks"),f=n.Symbol,l=c?f:f&&f.withoutSetter||a;t.exports=function(t){return i(s,t)&&(u||"string"==typeof s[t])||(u&&i(f,t)?s[t]=f[t]:s[t]=l("Symbol."+t)),s[t]}},190:function(t,e,r){var n=r(51),o=r(131),i=r(110),a=r(28);t.exports=n("Reflect","ownKeys")||function(t){var e=o.f(a(t)),r=i.f;return r?e.concat(r(t)):e}},191:function(t,e,r){var n=r(101),o=Math.max,i=Math.min;t.exports=function(t,e){var r=n(t);return r<0?o(r+e,0):i(r,e)}},194:function(t,e,r){var n=r(19),o=r(62),i=n("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},195:function(t,e,r){var n=r(28);t.exports=function(t){var e=t.return;if(void 0!==e)return n(e.call(t)).value}},196:function(t,e,r){var n=r(25);t.exports=function(t){if(!n(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},197:function(t,e,r){var n=r(22);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},199:function(t,e,r){"use strict";var n=r(57),o=r(113),i=r(62),a=r(58),u=r(117),c=a.set,s=a.getterFor("Array Iterator");t.exports=u(Array,"Array",(function(t,e){c(this,{type:"Array Iterator",target:n(t),index:0,kind:e})}),(function(){var t=s(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},200:function(t,e,r){"use strict";var n=r(31),o=r(22),i=r(103),a=r(110),u=r(97),c=r(61),s=r(106),f=Object.assign,l=Object.defineProperty;t.exports=!f||o((function(){if(n&&1!==f({b:1},f(l({},"a",{enumerable:!0,get:function(){l(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol();return t[r]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=f({},t)[r]||"abcdefghijklmnopqrst"!=i(f({},e)).join("")}))?function(t,e){for(var r=c(t),o=arguments.length,f=1,l=a.f,h=u.f;o>f;)for(var p,v=s(arguments[f++]),y=l?i(v).concat(l(v)):i(v),g=y.length,d=0;g>d;)p=y[d++],n&&!h.call(v,p)||(r[p]=v[p]);return r}:f},203:function(t,e,r){"use strict";var n=r(85),o=r(32),i=r(56);t.exports=function(t,e,r){var a=n(e);a in t?o.f(t,a,i(0,r)):t[a]=r}},21:function(t,e,r){var n=r(14),o=r(74).f,i=r(39),a=r(44),u=r(98),c=r(150),s=r(133);t.exports=function(t,e){var r,f,l,h,p,v=t.target,y=t.global,g=t.stat;if(r=y?n:g?n[v]||u(v,{}):(n[v]||{}).prototype)for(f in e){if(h=e[f],l=t.noTargetGet?(p=o(r,f))&&p.value:r[f],!s(y?f:v+(g?".":"#")+f,t.forced)&&void 0!==l){if(typeof h==typeof l)continue;c(h,l)}(t.sham||l&&l.sham)&&i(h,"sham",!0),a(r,f,h,t)}}},22:function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},23:function(t,e,r){var n=r(61),o={}.hasOwnProperty;t.exports=Object.hasOwn||function(t,e){return o.call(n(t),e)}},25:function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},27:function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},28:function(t,e,r){var n=r(25);t.exports=function(t){if(!n(t))throw TypeError(String(t)+" is not an object");return t}},31:function(t,e,r){var n=r(22);t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},313:function(t,e,r){var n=r(22),o=r(19),i=r(50),a=o("iterator");t.exports=!n((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,r="";return t.pathname="c%20d",e.forEach((function(t,n){e.delete("b"),r+=n+t})),i&&!t.toJSON||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host}))},314:function(t,e,r){"use strict";r(199);var n=r(21),o=r(51),i=r(313),a=r(44),u=r(155),c=r(53),s=r(156),f=r(58),l=r(115),h=r(23),p=r(87),v=r(137),y=r(28),g=r(25),d=r(78),m=r(56),b=r(565),w=r(136),x=r(19),S=o("fetch"),O=o("Headers"),k=x("iterator"),j=f.set,A=f.getterFor("URLSearchParams"),R=f.getterFor("URLSearchParamsIterator"),L=/\+/g,P=Array(4),U=function(t){return P[t-1]||(P[t-1]=RegExp("((?:%[\\da-f]{2}){"+t+"})","gi"))},_=function(t){try{return decodeURIComponent(t)}catch(e){return t}},I=function(t){var e=t.replace(L," "),r=4;try{return decodeURIComponent(e)}catch(t){for(;r;)e=e.replace(U(r--),_);return e}},E=/[!'()~]|%20/g,T={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},q=function(t){return T[t]},B=function(t){return encodeURIComponent(t).replace(E,q)},C=function(t,e){if(e)for(var r,n,o=e.split("&"),i=0;i<o.length;)(r=o[i++]).length&&(n=r.split("="),t.push({key:I(n.shift()),value:I(n.join("="))}))},F=function(t){this.entries.length=0,C(this.entries,t)},M=function(t,e){if(t<e)throw TypeError("Not enough arguments")},z=s((function(t,e){j(this,{type:"URLSearchParamsIterator",iterator:b(A(t).entries),kind:e})}),"Iterator",(function(){var t=R(this),e=t.kind,r=t.iterator.next(),n=r.value;return r.done||(r.value="keys"===e?n.key:"values"===e?n.value:[n.key,n.value]),r})),N=function(){l(this,N,"URLSearchParams");var t,e,r,n,o,i,a,u,c,s=arguments.length>0?arguments[0]:void 0,f=this,p=[];if(j(f,{type:"URLSearchParams",entries:p,updateURL:function(){},updateSearchParams:F}),void 0!==s)if(g(s))if("function"==typeof(t=w(s)))for(r=(e=t.call(s)).next;!(n=r.call(e)).done;){if((a=(i=(o=b(y(n.value))).next).call(o)).done||(u=i.call(o)).done||!i.call(o).done)throw TypeError("Expected sequence with length 2");p.push({key:a.value+"",value:u.value+""})}else for(c in s)h(s,c)&&p.push({key:c,value:s[c]+""});else C(p,"string"==typeof s?"?"===s.charAt(0)?s.slice(1):s:s+"")},D=N.prototype;u(D,{append:function(t,e){M(arguments.length,2);var r=A(this);r.entries.push({key:t+"",value:e+""}),r.updateURL()},delete:function(t){M(arguments.length,1);for(var e=A(this),r=e.entries,n=t+"",o=0;o<r.length;)r[o].key===n?r.splice(o,1):o++;e.updateURL()},get:function(t){M(arguments.length,1);for(var e=A(this).entries,r=t+"",n=0;n<e.length;n++)if(e[n].key===r)return e[n].value;return null},getAll:function(t){M(arguments.length,1);for(var e=A(this).entries,r=t+"",n=[],o=0;o<e.length;o++)e[o].key===r&&n.push(e[o].value);return n},has:function(t){M(arguments.length,1);for(var e=A(this).entries,r=t+"",n=0;n<e.length;)if(e[n++].key===r)return!0;return!1},set:function(t,e){M(arguments.length,1);for(var r,n=A(this),o=n.entries,i=!1,a=t+"",u=e+"",c=0;c<o.length;c++)(r=o[c]).key===a&&(i?o.splice(c--,1):(i=!0,r.value=u));i||o.push({key:a,value:u}),n.updateURL()},sort:function(){var t,e,r,n=A(this),o=n.entries,i=o.slice();for(o.length=0,r=0;r<i.length;r++){for(t=i[r],e=0;e<r;e++)if(o[e].key>t.key){o.splice(e,0,t);break}e===r&&o.push(t)}n.updateURL()},forEach:function(t){for(var e,r=A(this).entries,n=p(t,arguments.length>1?arguments[1]:void 0,3),o=0;o<r.length;)n((e=r[o++]).value,e.key,this)},keys:function(){return new z(this,"keys")},values:function(){return new z(this,"values")},entries:function(){return new z(this,"entries")}},{enumerable:!0}),a(D,k,D.entries),a(D,"toString",(function(){for(var t,e=A(this).entries,r=[],n=0;n<e.length;)t=e[n++],r.push(B(t.key)+"="+B(t.value));return r.join("&")}),{enumerable:!0}),c(N,"URLSearchParams"),n({global:!0,forced:!i},{URLSearchParams:N}),i||"function"!=typeof S||"function"!=typeof O||n({global:!0,enumerable:!0,forced:!0},{fetch:function(t){var e,r,n,o=[t];return arguments.length>1&&(g(e=arguments[1])&&(r=e.body,"URLSearchParams"===v(r)&&((n=e.headers?new O(e.headers):new O).has("content-type")||n.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),e=d(e,{body:m(0,String(r)),headers:m(0,n)}))),o.push(e)),S.apply(this,o)}}),t.exports={URLSearchParams:N,getState:A}},32:function(t,e,r){var n=r(31),o=r(130),i=r(28),a=r(85),u=Object.defineProperty;e.f=n?u:function(t,e,r){if(i(t),e=a(e,!0),i(r),o)try{return u(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},39:function(t,e,r){var n=r(31),o=r(32),i=r(56);t.exports=n?function(t,e,r){return o.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},44:function(t,e,r){var n=r(14),o=r(39),i=r(23),a=r(98),u=r(108),c=r(58),s=c.get,f=c.enforce,l=String(String).split("String");(t.exports=function(t,e,r,u){var c,s=!!u&&!!u.unsafe,h=!!u&&!!u.enumerable,p=!!u&&!!u.noTargetGet;"function"==typeof r&&("string"!=typeof e||i(r,"name")||o(r,"name",e),(c=f(r)).source||(c.source=l.join("string"==typeof e?e:""))),t!==n?(s?!p&&t[e]&&(h=!0):delete t[e],h?t[e]=r:o(t,e,r)):h?t[e]=r:a(e,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&s(this).source||u(this)}))},50:function(t,e){t.exports=!1},51:function(t,e,r){var n=r(52),o=r(14),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?i(n[t])||i(o[t]):n[t]&&n[t][e]||o[t]&&o[t][e]}},52:function(t,e,r){var n=r(14);t.exports=n},53:function(t,e,r){var n=r(32).f,o=r(23),i=r(19)("toStringTag");t.exports=function(t,e,r){t&&!o(t=r?t:t.prototype,i)&&n(t,i,{configurable:!0,value:e})}},56:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},560:function(t,e,r){r(561),r(566),r(314);var n=r(52);t.exports=n.URL},561:function(t,e,r){"use strict";r(157);var n,o=r(21),i=r(31),a=r(313),u=r(14),c=r(153),s=r(44),f=r(115),l=r(23),h=r(200),p=r(562),v=r(158).codeAt,y=r(564),g=r(53),d=r(314),m=r(58),b=u.URL,w=d.URLSearchParams,x=d.getState,S=m.set,O=m.getterFor("URL"),k=Math.floor,j=Math.pow,A=/[A-Za-z]/,R=/[\d+-.A-Za-z]/,L=/\d/,P=/^(0x|0X)/,U=/^[0-7]+$/,_=/^\d+$/,I=/^[\dA-Fa-f]+$/,E=/[\0\t\n\r #%/:?@[\\]]/,T=/[\0\t\n\r #/:?@[\\]]/,q=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,B=/[\t\n\r]/g,C=function(t,e){var r,n,o;if("["==e.charAt(0)){if("]"!=e.charAt(e.length-1))return"Invalid host";if(!(r=M(e.slice(1,-1))))return"Invalid host";t.host=r}else if(J(t)){if(e=y(e),E.test(e))return"Invalid host";if(null===(r=F(e)))return"Invalid host";t.host=r}else{if(T.test(e))return"Invalid host";for(r="",n=p(e),o=0;o<n.length;o++)r+=W(n[o],N);t.host=r}},F=function(t){var e,r,n,o,i,a,u,c=t.split(".");if(c.length&&""==c[c.length-1]&&c.pop(),(e=c.length)>4)return t;for(r=[],n=0;n<e;n++){if(""==(o=c[n]))return t;if(i=10,o.length>1&&"0"==o.charAt(0)&&(i=P.test(o)?16:8,o=o.slice(8==i?1:2)),""===o)a=0;else{if(!(10==i?_:8==i?U:I).test(o))return t;a=parseInt(o,i)}r.push(a)}for(n=0;n<e;n++)if(a=r[n],n==e-1){if(a>=j(256,5-e))return null}else if(a>255)return null;for(u=r.pop(),n=0;n<r.length;n++)u+=r[n]*j(256,3-n);return u},M=function(t){var e,r,n,o,i,a,u,c=[0,0,0,0,0,0,0,0],s=0,f=null,l=0,h=function(){return t.charAt(l)};if(":"==h()){if(":"!=t.charAt(1))return;l+=2,f=++s}for(;h();){if(8==s)return;if(":"!=h()){for(e=r=0;r<4&&I.test(h());)e=16*e+parseInt(h(),16),l++,r++;if("."==h()){if(0==r)return;if(l-=r,s>6)return;for(n=0;h();){if(o=null,n>0){if(!("."==h()&&n<4))return;l++}if(!L.test(h()))return;for(;L.test(h());){if(i=parseInt(h(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;l++}c[s]=256*c[s]+o,2!=++n&&4!=n||s++}if(4!=n)return;break}if(":"==h()){if(l++,!h())return}else if(h())return;c[s++]=e}else{if(null!==f)return;l++,f=++s}}if(null!==f)for(a=s-f,s=7;0!=s&&a>0;)u=c[s],c[s--]=c[f+a-1],c[f+--a]=u;else if(8!=s)return;return c},z=function(t){var e,r,n,o;if("number"==typeof t){for(e=[],r=0;r<4;r++)e.unshift(t%256),t=k(t/256);return e.join(".")}if("object"==typeof t){for(e="",n=function(t){for(var e=null,r=1,n=null,o=0,i=0;i<8;i++)0!==t[i]?(o>r&&(e=n,r=o),n=null,o=0):(null===n&&(n=i),++o);return o>r&&(e=n,r=o),e}(t),r=0;r<8;r++)o&&0===t[r]||(o&&(o=!1),n===r?(e+=r?":":"::",o=!0):(e+=t[r].toString(16),r<7&&(e+=":")));return"["+e+"]"}return t},N={},D=h({},N,{" ":1,'"':1,"<":1,">":1,"`":1}),G=h({},D,{"#":1,"?":1,"{":1,"}":1}),Y=h({},G,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),W=function(t,e){var r=v(t,0);return r>32&&r<127&&!l(e,t)?t:encodeURIComponent(t)},$={ftp:21,file:null,http:80,https:443,ws:80,wss:443},J=function(t){return l($,t.scheme)},X=function(t){return""!=t.username||""!=t.password},Z=function(t){return!t.host||t.cannotBeABaseURL||"file"==t.scheme},H=function(t,e){var r;return 2==t.length&&A.test(t.charAt(0))&&(":"==(r=t.charAt(1))||!e&&"|"==r)},K=function(t){var e;return t.length>1&&H(t.slice(0,2))&&(2==t.length||"/"===(e=t.charAt(2))||"\\"===e||"?"===e||"#"===e)},V=function(t){var e=t.path,r=e.length;!r||"file"==t.scheme&&1==r&&H(e[0],!0)||e.pop()},Q=function(t){return"."===t||"%2e"===t.toLowerCase()},tt={},et={},rt={},nt={},ot={},it={},at={},ut={},ct={},st={},ft={},lt={},ht={},pt={},vt={},yt={},gt={},dt={},mt={},bt={},wt={},xt=function(t,e,r,o){var i,a,u,c,s,f=r||tt,h=0,v="",y=!1,g=!1,d=!1;for(r||(t.scheme="",t.username="",t.password="",t.host=null,t.port=null,t.path=[],t.query=null,t.fragment=null,t.cannotBeABaseURL=!1,e=e.replace(q,"")),e=e.replace(B,""),i=p(e);h<=i.length;){switch(a=i[h],f){case tt:if(!a||!A.test(a)){if(r)return"Invalid scheme";f=rt;continue}v+=a.toLowerCase(),f=et;break;case et:if(a&&(R.test(a)||"+"==a||"-"==a||"."==a))v+=a.toLowerCase();else{if(":"!=a){if(r)return"Invalid scheme";v="",f=rt,h=0;continue}if(r&&(J(t)!=l($,v)||"file"==v&&(X(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;if(t.scheme=v,r)return void(J(t)&&$[t.scheme]==t.port&&(t.port=null));v="","file"==t.scheme?f=pt:J(t)&&o&&o.scheme==t.scheme?f=nt:J(t)?f=ut:"/"==i[h+1]?(f=ot,h++):(t.cannotBeABaseURL=!0,t.path.push(""),f=mt)}break;case rt:if(!o||o.cannotBeABaseURL&&"#"!=a)return"Invalid scheme";if(o.cannotBeABaseURL&&"#"==a){t.scheme=o.scheme,t.path=o.path.slice(),t.query=o.query,t.fragment="",t.cannotBeABaseURL=!0,f=wt;break}f="file"==o.scheme?pt:it;continue;case nt:if("/"!=a||"/"!=i[h+1]){f=it;continue}f=ct,h++;break;case ot:if("/"==a){f=st;break}f=dt;continue;case it:if(t.scheme=o.scheme,a==n)t.username=o.username,t.password=o.password,t.host=o.host,t.port=o.port,t.path=o.path.slice(),t.query=o.query;else if("/"==a||"\\"==a&&J(t))f=at;else if("?"==a)t.username=o.username,t.password=o.password,t.host=o.host,t.port=o.port,t.path=o.path.slice(),t.query="",f=bt;else{if("#"!=a){t.username=o.username,t.password=o.password,t.host=o.host,t.port=o.port,t.path=o.path.slice(),t.path.pop(),f=dt;continue}t.username=o.username,t.password=o.password,t.host=o.host,t.port=o.port,t.path=o.path.slice(),t.query=o.query,t.fragment="",f=wt}break;case at:if(!J(t)||"/"!=a&&"\\"!=a){if("/"!=a){t.username=o.username,t.password=o.password,t.host=o.host,t.port=o.port,f=dt;continue}f=st}else f=ct;break;case ut:if(f=ct,"/"!=a||"/"!=v.charAt(h+1))continue;h++;break;case ct:if("/"!=a&&"\\"!=a){f=st;continue}break;case st:if("@"==a){y&&(v="%40"+v),y=!0,u=p(v);for(var m=0;m<u.length;m++){var b=u[m];if(":"!=b||d){var w=W(b,Y);d?t.password+=w:t.username+=w}else d=!0}v=""}else if(a==n||"/"==a||"?"==a||"#"==a||"\\"==a&&J(t)){if(y&&""==v)return"Invalid authority";h-=p(v).length+1,v="",f=ft}else v+=a;break;case ft:case lt:if(r&&"file"==t.scheme){f=yt;continue}if(":"!=a||g){if(a==n||"/"==a||"?"==a||"#"==a||"\\"==a&&J(t)){if(J(t)&&""==v)return"Invalid host";if(r&&""==v&&(X(t)||null!==t.port))return;if(c=C(t,v))return c;if(v="",f=gt,r)return;continue}"["==a?g=!0:"]"==a&&(g=!1),v+=a}else{if(""==v)return"Invalid host";if(c=C(t,v))return c;if(v="",f=ht,r==lt)return}break;case ht:if(!L.test(a)){if(a==n||"/"==a||"?"==a||"#"==a||"\\"==a&&J(t)||r){if(""!=v){var x=parseInt(v,10);if(x>65535)return"Invalid port";t.port=J(t)&&x===$[t.scheme]?null:x,v=""}if(r)return;f=gt;continue}return"Invalid port"}v+=a;break;case pt:if(t.scheme="file","/"==a||"\\"==a)f=vt;else{if(!o||"file"!=o.scheme){f=dt;continue}if(a==n)t.host=o.host,t.path=o.path.slice(),t.query=o.query;else if("?"==a)t.host=o.host,t.path=o.path.slice(),t.query="",f=bt;else{if("#"!=a){K(i.slice(h).join(""))||(t.host=o.host,t.path=o.path.slice(),V(t)),f=dt;continue}t.host=o.host,t.path=o.path.slice(),t.query=o.query,t.fragment="",f=wt}}break;case vt:if("/"==a||"\\"==a){f=yt;break}o&&"file"==o.scheme&&!K(i.slice(h).join(""))&&(H(o.path[0],!0)?t.path.push(o.path[0]):t.host=o.host),f=dt;continue;case yt:if(a==n||"/"==a||"\\"==a||"?"==a||"#"==a){if(!r&&H(v))f=dt;else if(""==v){if(t.host="",r)return;f=gt}else{if(c=C(t,v))return c;if("localhost"==t.host&&(t.host=""),r)return;v="",f=gt}continue}v+=a;break;case gt:if(J(t)){if(f=dt,"/"!=a&&"\\"!=a)continue}else if(r||"?"!=a)if(r||"#"!=a){if(a!=n&&(f=dt,"/"!=a))continue}else t.fragment="",f=wt;else t.query="",f=bt;break;case dt:if(a==n||"/"==a||"\\"==a&&J(t)||!r&&("?"==a||"#"==a)){if(".."===(s=(s=v).toLowerCase())||"%2e."===s||".%2e"===s||"%2e%2e"===s?(V(t),"/"==a||"\\"==a&&J(t)||t.path.push("")):Q(v)?"/"==a||"\\"==a&&J(t)||t.path.push(""):("file"==t.scheme&&!t.path.length&&H(v)&&(t.host&&(t.host=""),v=v.charAt(0)+":"),t.path.push(v)),v="","file"==t.scheme&&(a==n||"?"==a||"#"==a))for(;t.path.length>1&&""===t.path[0];)t.path.shift();"?"==a?(t.query="",f=bt):"#"==a&&(t.fragment="",f=wt)}else v+=W(a,G);break;case mt:"?"==a?(t.query="",f=bt):"#"==a?(t.fragment="",f=wt):a!=n&&(t.path[0]+=W(a,N));break;case bt:r||"#"!=a?a!=n&&("'"==a&&J(t)?t.query+="%27":t.query+="#"==a?"%23":W(a,N)):(t.fragment="",f=wt);break;case wt:a!=n&&(t.fragment+=W(a,D))}h++}},St=function(t){var e,r,n=f(this,St,"URL"),o=arguments.length>1?arguments[1]:void 0,a=String(t),u=S(n,{type:"URL"});if(void 0!==o)if(o instanceof St)e=O(o);else if(r=xt(e={},String(o)))throw TypeError(r);if(r=xt(u,a,null,e))throw TypeError(r);var c=u.searchParams=new w,s=x(c);s.updateSearchParams(u.query),s.updateURL=function(){u.query=String(c)||null},i||(n.href=kt.call(n),n.origin=jt.call(n),n.protocol=At.call(n),n.username=Rt.call(n),n.password=Lt.call(n),n.host=Pt.call(n),n.hostname=Ut.call(n),n.port=_t.call(n),n.pathname=It.call(n),n.search=Et.call(n),n.searchParams=Tt.call(n),n.hash=qt.call(n))},Ot=St.prototype,kt=function(){var t=O(this),e=t.scheme,r=t.username,n=t.password,o=t.host,i=t.port,a=t.path,u=t.query,c=t.fragment,s=e+":";return null!==o?(s+="//",X(t)&&(s+=r+(n?":"+n:"")+"@"),s+=z(o),null!==i&&(s+=":"+i)):"file"==e&&(s+="//"),s+=t.cannotBeABaseURL?a[0]:a.length?"/"+a.join("/"):"",null!==u&&(s+="?"+u),null!==c&&(s+="#"+c),s},jt=function(){var t=O(this),e=t.scheme,r=t.port;if("blob"==e)try{return new St(e.path[0]).origin}catch(t){return"null"}return"file"!=e&&J(t)?e+"://"+z(t.host)+(null!==r?":"+r:""):"null"},At=function(){return O(this).scheme+":"},Rt=function(){return O(this).username},Lt=function(){return O(this).password},Pt=function(){var t=O(this),e=t.host,r=t.port;return null===e?"":null===r?z(e):z(e)+":"+r},Ut=function(){var t=O(this).host;return null===t?"":z(t)},_t=function(){var t=O(this).port;return null===t?"":String(t)},It=function(){var t=O(this),e=t.path;return t.cannotBeABaseURL?e[0]:e.length?"/"+e.join("/"):""},Et=function(){var t=O(this).query;return t?"?"+t:""},Tt=function(){return O(this).searchParams},qt=function(){var t=O(this).fragment;return t?"#"+t:""},Bt=function(t,e){return{get:t,set:e,configurable:!0,enumerable:!0}};if(i&&c(Ot,{href:Bt(kt,(function(t){var e=O(this),r=String(t),n=xt(e,r);if(n)throw TypeError(n);x(e.searchParams).updateSearchParams(e.query)})),origin:Bt(jt),protocol:Bt(At,(function(t){var e=O(this);xt(e,String(t)+":",tt)})),username:Bt(Rt,(function(t){var e=O(this),r=p(String(t));if(!Z(e)){e.username="";for(var n=0;n<r.length;n++)e.username+=W(r[n],Y)}})),password:Bt(Lt,(function(t){var e=O(this),r=p(String(t));if(!Z(e)){e.password="";for(var n=0;n<r.length;n++)e.password+=W(r[n],Y)}})),host:Bt(Pt,(function(t){var e=O(this);e.cannotBeABaseURL||xt(e,String(t),ft)})),hostname:Bt(Ut,(function(t){var e=O(this);e.cannotBeABaseURL||xt(e,String(t),lt)})),port:Bt(_t,(function(t){var e=O(this);Z(e)||(""==(t=String(t))?e.port=null:xt(e,t,ht))})),pathname:Bt(It,(function(t){var e=O(this);e.cannotBeABaseURL||(e.path=[],xt(e,t+"",gt))})),search:Bt(Et,(function(t){var e=O(this);""==(t=String(t))?e.query=null:("?"==t.charAt(0)&&(t=t.slice(1)),e.query="",xt(e,t,bt)),x(e.searchParams).updateSearchParams(e.query)})),searchParams:Bt(Tt),hash:Bt(qt,(function(t){var e=O(this);""!=(t=String(t))?("#"==t.charAt(0)&&(t=t.slice(1)),e.fragment="",xt(e,t,wt)):e.fragment=null}))}),s(Ot,"toJSON",(function(){return kt.call(this)}),{enumerable:!0}),s(Ot,"toString",(function(){return kt.call(this)}),{enumerable:!0}),b){var Ct=b.createObjectURL,Ft=b.revokeObjectURL;Ct&&s(St,"createObjectURL",(function(t){return Ct.apply(b,arguments)})),Ft&&s(St,"revokeObjectURL",(function(t){return Ft.apply(b,arguments)}))}g(St,"URL"),o({global:!0,forced:!a,sham:!i},{URL:St})},562:function(t,e,r){"use strict";var n=r(87),o=r(61),i=r(563),a=r(194),u=r(77),c=r(203),s=r(136);t.exports=function(t){var e,r,f,l,h,p,v=o(t),y="function"==typeof this?this:Array,g=arguments.length,d=g>1?arguments[1]:void 0,m=void 0!==d,b=s(v),w=0;if(m&&(d=n(d,g>2?arguments[2]:void 0,2)),null==b||y==Array&&a(b))for(r=new y(e=u(v.length));e>w;w++)p=m?d(v[w],w):v[w],c(r,w,p);else for(h=(l=b.call(v)).next,r=new y;!(f=h.call(l)).done;w++)p=m?i(l,d,[f.value,w],!0):f.value,c(r,w,p);return r.length=w,r}},563:function(t,e,r){var n=r(28),o=r(195);t.exports=function(t,e,r,i){try{return i?e(n(r)[0],r[1]):e(r)}catch(e){throw o(t),e}}},564:function(t,e,r){"use strict";var n=/[^\0-\u007E]/,o=/[.\u3002\uFF0E\uFF61]/g,i="Overflow: input needs wider integers to process",a=Math.floor,u=String.fromCharCode,c=function(t){return t+22+75*(t<26)},s=function(t,e,r){var n=0;for(t=r?a(t/700):t>>1,t+=a(t/e);t>455;n+=36)t=a(t/35);return a(n+36*t/(t+38))},f=function(t){var e,r,n=[],o=(t=function(t){for(var e=[],r=0,n=t.length;r<n;){var o=t.charCodeAt(r++);if(o>=55296&&o<=56319&&r<n){var i=t.charCodeAt(r++);56320==(64512&i)?e.push(((1023&o)<<10)+(1023&i)+65536):(e.push(o),r--)}else e.push(o)}return e}(t)).length,f=128,l=0,h=72;for(e=0;e<t.length;e++)(r=t[e])<128&&n.push(u(r));var p=n.length,v=p;for(p&&n.push("-");v<o;){var y=2147483647;for(e=0;e<t.length;e++)(r=t[e])>=f&&r<y&&(y=r);var g=v+1;if(y-f>a((2147483647-l)/g))throw RangeError(i);for(l+=(y-f)*g,f=y,e=0;e<t.length;e++){if((r=t[e])<f&&++l>2147483647)throw RangeError(i);if(r==f){for(var d=l,m=36;;m+=36){var b=m<=h?1:m>=h+26?26:m-h;if(d<b)break;var w=d-b,x=36-b;n.push(u(c(b+w%x))),d=a(w/x)}n.push(u(c(d))),h=s(l,g,v==p),l=0,++v}}++l,++f}return n.join("")};t.exports=function(t){var e,r,i=[],a=t.toLowerCase().replace(o,".").split(".");for(e=0;e<a.length;e++)r=a[e],i.push(n.test(r)?"xn--"+f(r):r);return i.join(".")}},565:function(t,e,r){var n=r(28),o=r(136);t.exports=function(t){var e=o(t);if("function"!=typeof e)throw TypeError(String(t)+" is not iterable");return n(e.call(t))}},566:function(t,e,r){"use strict";r(21)({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}})},568:function(t,e,r){"use strict";r.r(e);r(560);function n(t){var e;if(!(e=/code|token|error/.test(window.location.hash)?window.location.hash.substring(1):location.search.substring(1)))throw console.error("No query string in OAuth 2 redirect URL"),new Error("Something went wrong, please, try again.");var r,n,o=new URLSearchParams(e),i=o.get("access_token"),a=o.get("code"),u=o.get("token_type"),c=o.get("expires_in"),s=o.get("state"),f=o.get("error"),l=o.get("error_description")||"Something went wrong, please, try again.";if(f)throw new Error(l);if(r=s,n=null==t?void 0:t.state,!Boolean(r)||!Boolean(n)||r!==n)throw new Error("Outdated OAuth2 state");if("implicit"===(null==t?void 0:t.flow)){if(!i)throw new Error('Your OAuth2 authentication service provider redirected you without an "access_token".\nPlease, try again or make sure your OAuth2 settings are correct.');if(!u)throw new Error('Your OAuth2 authentication service provider redirected you without a "token_type".\nPlease, try again or make sure your OAuth2 settings are correct.');null==t||t.successCallback({access_token:i,token_type:u,expires_in:c,auth_code:""})}if("authorizationCode"===(null==t?void 0:t.flow)){if(!a)throw new Error('Your OAuth2 authentication service provider redirected you without authorization "code".\nPlease, try again or make sure your OAuth2 settings are correct.');null==t||t.successCallback({auth_code:a,access_token:"",token_type:"bearer"})}}window.onload=function(){var t,e=null===(t=window.opener)||void 0===t?void 0:t.redirectOAuth2;try{n(e)}catch(t){null==e||e.errorCallback(t)}window.close()}},57:function(t,e,r){var n=r(106),o=r(75);t.exports=function(t){return n(o(t))}},58:function(t,e,r){var n,o,i,a=r(189),u=r(14),c=r(25),s=r(39),f=r(23),l=r(99),h=r(86),p=r(76),v=u.WeakMap;if(a||l.state){var y=l.state||(l.state=new v),g=y.get,d=y.has,m=y.set;n=function(t,e){if(d.call(y,t))throw new TypeError("Object already initialized");return e.facade=t,m.call(y,t,e),e},o=function(t){return g.call(y,t)||{}},i=function(t){return d.call(y,t)}}else{var b=h("state");p[b]=!0,n=function(t,e){if(f(t,b))throw new TypeError("Object already initialized");return e.facade=t,s(t,b,e),e},o=function(t){return f(t,b)?t[b]:{}},i=function(t){return f(t,b)}}t.exports={set:n,get:o,has:i,enforce:function(t){return i(t)?o(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!c(e)||(r=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}}},61:function(t,e,r){var n=r(75);t.exports=function(t){return Object(n(t))}},62:function(t,e){t.exports={}},74:function(t,e,r){var n=r(31),o=r(97),i=r(56),a=r(57),u=r(85),c=r(23),s=r(130),f=Object.getOwnPropertyDescriptor;e.f=n?f:function(t,e){if(t=a(t),e=u(e,!0),s)try{return f(t,e)}catch(t){}if(c(t,e))return i(!o.f.call(t,e),t[e])}},75:function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},76:function(t,e){t.exports={}},77:function(t,e,r){var n=r(101),o=Math.min;t.exports=function(t){return t>0?o(n(t),9007199254740991):0}},78:function(t,e,r){var n,o=r(28),i=r(153),a=r(102),u=r(76),c=r(154),s=r(107),f=r(86),l=f("IE_PROTO"),h=function(){},p=function(t){return"<script>"+t+"<\/script>"},v=function(){try{n=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;v=n?function(t){t.write(p("")),t.close();var e=t.parentWindow.Object;return t=null,e}(n):((e=s("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F);for(var r=a.length;r--;)delete v.prototype[a[r]];return v()};u[l]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(h.prototype=o(t),r=new h,h.prototype=null,r[l]=t):r=v(),void 0===e?r:i(r,e)}},84:function(t,e){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},85:function(t,e,r){var n=r(25);t.exports=function(t,e){if(!n(t))return t;var r,o;if(e&&"function"==typeof(r=t.toString)&&!n(o=r.call(t)))return o;if("function"==typeof(r=t.valueOf)&&!n(o=r.call(t)))return o;if(!e&&"function"==typeof(r=t.toString)&&!n(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},86:function(t,e,r){var n=r(109),o=r(100),i=n("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},87:function(t,e,r){var n=r(88);t.exports=function(t,e,r){if(n(t),void 0===e)return t;switch(r){case 0:return function(){return t.call(e)};case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,o){return t.call(e,r,n,o)}}return function(){return t.apply(e,arguments)}}},88:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},97:function(t,e,r){"use strict";var n={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!n.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:n},98:function(t,e,r){var n=r(14),o=r(39);t.exports=function(t,e){try{o(n,t,e)}catch(r){n[t]=e}return e}},99:function(t,e,r){var n=r(14),o=r(98),i=n["__core-js_shared__"]||o("__core-js_shared__",{});t.exports=i}})}));
|