@redocly/reference-docs 3.0.0-alpha.6 → 3.0.0-alpha.7
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 +447 -448
- package/bin/cli/commands/redocly-docs-cli.min.js.LICENSE.txt +1 -1
- package/dist/console.redocly-reference-docs.min.js +59 -59
- package/dist/oauth2-redirect.js +1 -1
- package/dist/redocly-reference-docs.min.js +1051 -1052
- package/lib/components/Panel/ResponsePanel.js +1 -1
- package/lib/components/console/Console.js +1 -1
- package/lib/components/console/RequestBody/RequestBody.js +1 -1
- package/lib/components/console/RequestBody/types.d.ts +1 -1
- package/lib/components/styled.elements.js +1 -1
- package/lib/redoc-lib/src/common-elements/LinkToField.js +1 -1
- package/lib/redoc-lib/src/common-elements/icons.d.ts +0 -5
- package/lib/redoc-lib/src/common-elements/icons.js +1 -1
- package/lib/redoc-lib/src/common-elements/mixins.js +1 -1
- package/lib/redoc-lib/src/components/ContentItem/ContentItem.js +1 -1
- package/lib/redoc-lib/src/components/DiscriminatorDropdown/DiscriminatorDropdown.js +1 -1
- package/lib/redoc-lib/src/components/Markdown/Markdown.js +1 -1
- package/lib/redoc-lib/src/components/Markdown/index.d.ts +1 -0
- package/lib/redoc-lib/src/components/Markdown/index.js +1 -1
- package/lib/redoc-lib/src/components/MediaTypeSwitch/MediaTypesSwitch.js +1 -1
- package/lib/redoc-lib/src/components/Operation/index.d.ts +1 -0
- package/lib/redoc-lib/src/components/Responses/ResponseDetails.d.ts +2 -0
- package/lib/redoc-lib/src/components/Responses/ResponseDetails.js +1 -1
- package/lib/redoc-lib/src/components/Schema/OneOfSchema.js +1 -1
- package/lib/redoc-lib/src/components/SideMenu/styled.elements.js +1 -1
- package/lib/redoc-lib/src/components/index.d.ts +3 -2
- package/lib/redoc-lib/src/components/index.js +1 -1
- package/lib/redoc-lib/src/services/models/Schema.js +1 -1
- package/lib-esm/components/Panel/ResponsePanel.js +1 -1
- package/lib-esm/components/console/Console.js +1 -1
- package/lib-esm/components/console/RequestBody/RequestBody.js +1 -1
- package/lib-esm/components/console/RequestBody/types.d.ts +1 -1
- package/lib-esm/components/styled.elements.js +1 -1
- package/lib-esm/redoc-lib/src/common-elements/LinkToField.js +1 -1
- package/lib-esm/redoc-lib/src/common-elements/icons.d.ts +0 -5
- package/lib-esm/redoc-lib/src/common-elements/icons.js +1 -1
- package/lib-esm/redoc-lib/src/common-elements/mixins.js +1 -1
- package/lib-esm/redoc-lib/src/components/ContentItem/ContentItem.js +1 -1
- package/lib-esm/redoc-lib/src/components/DiscriminatorDropdown/DiscriminatorDropdown.js +1 -1
- package/lib-esm/redoc-lib/src/components/Markdown/Markdown.js +1 -1
- package/lib-esm/redoc-lib/src/components/Markdown/index.d.ts +1 -0
- package/lib-esm/redoc-lib/src/components/Markdown/index.js +1 -1
- package/lib-esm/redoc-lib/src/components/MediaTypeSwitch/MediaTypesSwitch.js +1 -1
- package/lib-esm/redoc-lib/src/components/Operation/index.d.ts +1 -0
- package/lib-esm/redoc-lib/src/components/Responses/ResponseDetails.d.ts +2 -0
- package/lib-esm/redoc-lib/src/components/Responses/ResponseDetails.js +1 -1
- package/lib-esm/redoc-lib/src/components/Schema/OneOfSchema.js +1 -1
- package/lib-esm/redoc-lib/src/components/SideMenu/styled.elements.js +1 -1
- package/lib-esm/redoc-lib/src/components/index.d.ts +3 -2
- package/lib-esm/redoc-lib/src/components/index.js +1 -1
- package/lib-esm/redoc-lib/src/services/models/Schema.js +1 -1
- package/package.json +3 -3
- package/lib/redoc-lib/src/components/OperationItem/OperationItem.d.ts +0 -7
- package/lib/redoc-lib/src/components/OperationItem/OperationItem.js +0 -2
- package/lib/redoc-lib/src/components/OperationItem/index.d.ts +0 -1
- package/lib/redoc-lib/src/components/OperationItem/index.js +0 -2
- package/lib-esm/redoc-lib/src/components/OperationItem/OperationItem.d.ts +0 -7
- package/lib-esm/redoc-lib/src/components/OperationItem/OperationItem.js +0 -2
- package/lib-esm/redoc-lib/src/components/OperationItem/index.d.ts +0 -1
- package/lib-esm/redoc-lib/src/components/OperationItem/index.js +0 -2
|
@@ -2,7 +2,7 @@ var mr=Math.pow;/*!
|
|
|
2
2
|
* Redocly Reference Docs
|
|
3
3
|
* (c) Copyright 2018 Redocly LLC, all rights reserved.
|
|
4
4
|
* -------------------------------------------------------------
|
|
5
|
-
* Version: "3.0.0-alpha.
|
|
5
|
+
* Version: "3.0.0-alpha.7"
|
|
6
6
|
*/(this.webpackChunkRedoclyReferenceDocs=this.webpackChunkRedoclyReferenceDocs||[]).push([[290],{66419:(h,I,a)=>{h.exports=a(27698)},77766:(h,I,a)=>{h.exports=a(8065)},72119:(h,I,a)=>{h.exports=a(57448)},20116:(h,I,a)=>{h.exports=a(11955)},94473:(h,I,a)=>{h.exports=a(61577)},78580:(h,I,a)=>{h.exports=a(33778)},2991:(h,I,a)=>{h.exports=a(61798)},3649:(h,I,a)=>{h.exports=a(82073)},92762:(h,I,a)=>{h.exports=a(2348)},59340:(h,I,a)=>{h.exports=a(8933)},51942:(h,I,a)=>{h.exports=a(63383)},26295:(h,I,a)=>{h.exports=a(86209)},86902:(h,I,a)=>{h.exports=a(23059)},93476:(h,I,a)=>{h.exports=a(27460)},52424:(h,I,a)=>{h.exports=a(72010)},53592:(h,I,a)=>{h.exports=a(27385)},78363:(h,I,a)=>{h.exports=a(81522)},19996:(h,I,a)=>{h.exports=a(32209)},30699:(h,I,a)=>{h.exports=a(44442)},28834:(h,I,a)=>{h.exports=a(57152)},95683:(h,I,a)=>{h.exports=a(69447)},95238:(h,I,a)=>{h.exports=a(81493)},189:(h,I,a)=>{h.exports=a(76094)},32752:(h,I,a)=>{h.exports=a(70573)},44341:(h,I,a)=>{h.exports=a(73685)},58377:(h,I,a)=>{h.exports=a(27533)},13038:(h,I,a)=>{h.exports=a(39057)},63263:(h,I,a)=>{h.exports=a(84710)},24889:(h,I,a)=>{h.exports=a(74303)},89356:(h,I,a)=>{h.exports=a(93799)},79542:(h,I,a)=>{h.exports=a(55122)},69798:(h,I,a)=>{h.exports=a(29531)},13535:(h,I,a)=>{h.exports=a(10856)},83863:(h,I,a)=>{h.exports=a(31524)},51446:(h,I,a)=>{h.exports=a(86600)},23882:(h,I,a)=>{h.exports=a(9759)},63109:(h,I,a)=>{h.exports=a(35666)},79742:(h,I)=>{"use strict";I.byteLength=g,I.toByteArray=D,I.fromByteArray=q;for(var a=[],c=[],v=typeof Uint8Array!="undefined"?Uint8Array:Array,x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,b=x.length;d<b;++d)a[d]=x[d],c[x.charCodeAt(d)]=d;c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63;function S(W){var M=W.length;if(M%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var X=W.indexOf("=");X===-1&&(X=M);var R=X===M?0:4-X%4;return[X,R]}function g(W){var M=S(W),X=M[0],R=M[1];return(X+R)*3/4-R}function L(W,M,X){return(M+X)*3/4-X}function D(W){var M,X=S(W),R=X[0],C=X[1],V=new v(L(W,R,C)),J=0,_=C>0?R-4:R,Q;for(Q=0;Q<_;Q+=4)M=c[W.charCodeAt(Q)]<<18|c[W.charCodeAt(Q+1)]<<12|c[W.charCodeAt(Q+2)]<<6|c[W.charCodeAt(Q+3)],V[J++]=M>>16&255,V[J++]=M>>8&255,V[J++]=M&255;return C===2&&(M=c[W.charCodeAt(Q)]<<2|c[W.charCodeAt(Q+1)]>>4,V[J++]=M&255),C===1&&(M=c[W.charCodeAt(Q)]<<10|c[W.charCodeAt(Q+1)]<<4|c[W.charCodeAt(Q+2)]>>2,V[J++]=M>>8&255,V[J++]=M&255),V}function B(W){return a[W>>18&63]+a[W>>12&63]+a[W>>6&63]+a[W&63]}function j(W,M,X){for(var R,C=[],V=M;V<X;V+=3)R=(W[V]<<16&16711680)+(W[V+1]<<8&65280)+(W[V+2]&255),C.push(B(R));return C.join("")}function q(W){for(var M,X=W.length,R=X%3,C=[],V=16383,J=0,_=X-R;J<_;J+=V)C.push(j(W,J,J+V>_?_:J+V));return R===1?(M=W[X-1],C.push(a[M>>2]+a[M<<4&63]+"==")):R===2&&(M=(W[X-2]<<8)+W[X-1],C.push(a[M>>10]+a[M>>4&63]+a[M<<2&63]+"=")),C.join("")}},50706:(h,I,a)=>{var c=a(48764).Buffer;(function(){"use strict";function v(x){var d;return x instanceof c?d=x:d=c.from(x.toString(),"binary"),d.toString("base64")}h.exports=v})()},48764:(h,I,a)=>{"use strict";/*!
|
|
7
7
|
* The buffer module from node.js, for the browser.
|
|
8
8
|
*
|
|
@@ -72,29 +72,29 @@ b`.split(/\n/).length!=3?function(e){for(var n=0,u=[],l=e.length;n<=l;){var f=e.
|
|
|
72
72
|
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
73
73
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
74
74
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
75
|
-
*/function v(g){return g instanceof c||g instanceof Date||g instanceof RegExp}function x(g){if(g instanceof c){var L=c.alloc?c.alloc(g.length):new c(g.length);return g.copy(L),L}else{if(g instanceof Date)return new Date(g.getTime());if(g instanceof RegExp)return new RegExp(g);throw new Error("Unexpected situation")}}function d(g){var L=[];return g.forEach(function(D,B){typeof D=="object"&&D!==null?Array.isArray(D)?L[B]=d(D):v(D)?L[B]=x(D):L[B]=S({},D):L[B]=D}),L}function b(g,L){return L==="__proto__"?void 0:g[L]}var S=h.exports=function(){if(arguments.length<1||typeof arguments[0]!="object")return!1;if(arguments.length<2)return arguments[0];var g=arguments[0],L=Array.prototype.slice.call(arguments,1),D,B,j;return L.forEach(function(q){typeof q!="object"||q===null||Array.isArray(q)||Object.keys(q).forEach(function(W){if(B=b(g,W),D=b(q,W),D!==g)if(typeof D!="object"||D===null){g[W]=D;return}else if(Array.isArray(D)){g[W]=d(D);return}else if(v(D)){g[W]=x(D);return}else if(typeof B!="object"||B===null||Array.isArray(B)){g[W]=S({},D);return}else{g[W]=S(B,D);return}})}),g}},19167:(h,I,a)=>{"use strict";a.r(I),a.d(I,{Console:()=>ud});var c={};a.r(c),a.d(c,{JsonPatchError:()=>Pr,_areEquals:()=>Ka,applyOperation:()=>pr,applyPatch:()=>zn,applyReducer:()=>rc,deepClone:()=>tc,getValueByPointer:()=>Rr,validate:()=>yu,validator:()=>ea});var v={};a.r(v),a.d(v,{compare:()=>bu,generate:()=>Do,observe:()=>xu,unobserve:()=>tl});var x={};a.r(x),a.d(x,{cookie:()=>yl,header:()=>Qu,path:()=>Xu,query:()=>Ic});var d=a(67294);function b(r
|
|
75
|
+
*/function v(g){return g instanceof c||g instanceof Date||g instanceof RegExp}function x(g){if(g instanceof c){var L=c.alloc?c.alloc(g.length):new c(g.length);return g.copy(L),L}else{if(g instanceof Date)return new Date(g.getTime());if(g instanceof RegExp)return new RegExp(g);throw new Error("Unexpected situation")}}function d(g){var L=[];return g.forEach(function(D,B){typeof D=="object"&&D!==null?Array.isArray(D)?L[B]=d(D):v(D)?L[B]=x(D):L[B]=S({},D):L[B]=D}),L}function b(g,L){return L==="__proto__"?void 0:g[L]}var S=h.exports=function(){if(arguments.length<1||typeof arguments[0]!="object")return!1;if(arguments.length<2)return arguments[0];var g=arguments[0],L=Array.prototype.slice.call(arguments,1),D,B,j;return L.forEach(function(q){typeof q!="object"||q===null||Array.isArray(q)||Object.keys(q).forEach(function(W){if(B=b(g,W),D=b(q,W),D!==g)if(typeof D!="object"||D===null){g[W]=D;return}else if(Array.isArray(D)){g[W]=d(D);return}else if(v(D)){g[W]=x(D);return}else if(typeof B!="object"||B===null||Array.isArray(B)){g[W]=S({},D);return}else{g[W]=S(B,D);return}})}),g}},19167:(h,I,a)=>{"use strict";a.r(I),a.d(I,{Console:()=>ud});var c={};a.r(c),a.d(c,{JsonPatchError:()=>Pr,_areEquals:()=>Ka,applyOperation:()=>pr,applyPatch:()=>zn,applyReducer:()=>rc,deepClone:()=>tc,getValueByPointer:()=>Rr,validate:()=>yu,validator:()=>ea});var v={};a.r(v),a.d(v,{compare:()=>bu,generate:()=>Do,observe:()=>xu,unobserve:()=>tl});var x={};a.r(x),a.d(x,{cookie:()=>yl,header:()=>Qu,path:()=>Xu,query:()=>Ic});var d=a(67294);function b(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function S(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function g(t,r,i){return r&&S(t.prototype,r),i&&S(t,i),t}function L(t,r,i){return r in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function D(){return D=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])}return t},D.apply(this,arguments)}function B(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);r&&(o=o.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),i.push.apply(i,o)}return i}function j(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?B(Object(i),!0).forEach(function(o){L(t,o,i[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):B(Object(i)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(i,o))})}return t}function q(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),r&&M(t,r)}function W(t){return W=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},W(t)}function M(t,r){return M=Object.setPrototypeOf||function(o,s){return o.__proto__=s,o},M(t,r)}function X(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}function R(t,r){if(t==null)return{};var i={},o=Object.keys(t),s,p;for(p=0;p<o.length;p++)s=o[p],!(r.indexOf(s)>=0)&&(i[s]=t[s]);return i}function C(t,r){if(t==null)return{};var i=R(t,r),o,s;if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(t);for(s=0;s<p.length;s++)o=p[s],!(r.indexOf(o)>=0)&&(!Object.prototype.propertyIsEnumerable.call(t,o)||(i[o]=t[o]))}return i}function V(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function J(t,r){return r&&(typeof r=="object"||typeof r=="function")?r:V(t)}function _(t){var r=X();return function(){var o=W(t),s;if(r){var p=W(this).constructor;s=Reflect.construct(o,arguments,p)}else s=o.apply(this,arguments);return J(this,s)}}function Q(t,r){return ee(t)||xe(t,r)||we(t,r)||oe()}function Y(t){return ce(t)||ie(t)||we(t)||fe()}function ce(t){if(Array.isArray(t))return he(t)}function ee(t){if(Array.isArray(t))return t}function ie(t){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(t))return Array.from(t)}function xe(t,r){if(!(typeof Symbol=="undefined"||!(Symbol.iterator in Object(t)))){var i=[],o=!0,s=!1,p=void 0;try{for(var y=t[Symbol.iterator](),A;!(o=(A=y.next()).done)&&(i.push(A.value),!(r&&i.length===r));o=!0);}catch(w){s=!0,p=w}finally{try{!o&&y.return!=null&&y.return()}finally{if(s)throw p}}return i}}function we(t,r){if(!!t){if(typeof t=="string")return he(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set")return Array.from(t);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return he(t,r)}}function he(t,r){(r==null||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function fe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
76
76
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
77
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fe(r
|
|
78
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var p=!0,y=!1,A;return{s:function(){i=
|
|
77
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fe(t,r){var i;if(typeof Symbol=="undefined"||t[Symbol.iterator]==null){if(Array.isArray(t)||(i=we(t))||r&&t&&typeof t.length=="number"){i&&(t=i);var o=0,s=function(){};return{s,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(w){throw w},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
78
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var p=!0,y=!1,A;return{s:function(){i=t[Symbol.iterator]()},n:function(){var w=i.next();return p=w.done,w},e:function(w){y=!0,A=w},f:function(){try{!p&&i.return!=null&&i.return()}finally{if(y)throw A}}}}function Le(t,r){return r={exports:{}},t(r,r.exports),r.exports}var Me=Le(function(t){function r(F,G){for(var te=0,ne=0;ne<F.length;ne++)te=(te<<5)-te+F.charCodeAt(ne),te|=0;return G[Math.abs(te)%G.length]}function i(F,G){var te=G.namespace;if(G.useColors){var ne=G.color,se="[3"+(ne<8?ne:"8;5;"+ne),ye=" ".concat(se,";1m").concat(te," [0m");F[0]=ye+F[0].split(`
|
|
79
79
|
`).join(`
|
|
80
|
-
`+ye)}else F[0]=te+" "+F[0]}function o(F,G){if(F[0]=(G.useColors?"%c":"")+G.namespace,!!G.useColors){var te="color: "+G.color,ne=0,se=0;F[0].replace(/%[a-zA-Z%]/g,function(ye){ye!=="%%"&&(ne++,ye==="%c"&&(se=ne))}),F.splice(se,0,te)}}var s=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function p(){var F;try{F=localStorage.getItem("debug")}catch(G){}return!F&&typeof process!="undefined"&&"env"in process&&(F={}.DEBUG),{namespaces:F||"",colors:s,useColors:!0,formatArgs:o}}function y(){return{namespaces:{}.DEBUG||"",colors:[6,2,3,4,5,1],useColors:!0,formatArgs:i}}function A(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,G=arguments.length>1?arguments[1]:void 0;return function(){for(var te=arguments.length,ne=new Array(te),se=0;se<te;se++)ne[se]=arguments[se];F&&ne.unshift(F);var ye=G.namespaces.split(",").map(function(Te){return Te[Te.length-1]==="*"?new RegExp("^"+Te.slice(0,Te.length-1)+".*$"):new RegExp("^"+Te+"$")}),ge=ye.some(function(Te){return Te.test(F)}),Ae={color:t(F,G.colors),namespace:F,useColors:G.useColors};if(!1)var me}}function w(F){return A(F,y())}function E(F){return A(F,p())}typeof process=="undefined"||process.type==="renderer"||process.browser===!0||process.__nwjs?r.exports=E:r.exports=w}),Pe=Me("informed:ObjMap "),rt=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return String.prototype.replace.call(t,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean)},Ze=function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",o=arguments.length>2?arguments[2]:void 0,s=String.prototype.replace.call(i,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(p,y){return p!=null?p[y]:p},t);return s===void 0||s===t?o:s},Xe=function(t){return".".concat(t).replace(/(.*)[.[].*/,"$1").replace(/\./,"")},ft=function(t){return t.replace(Xe(t),"").replace(/\./,"")},ht=function(t,i){var o=Xe(i),s=ft(i),p=o?Ze(t,o):t;return!!(p&&Object.hasOwnProperty.call(p,s.replace(/\[(.*)\]/,"$1")))},wt=function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",o=arguments.length>2?arguments[2]:void 0;String.prototype.replace.call(i,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(s,p,y,A){return y===A.length-1?(s[p]=o,s[p]):s[p]===void 0?(Number.isInteger(+A[y+1])?s[p]=[]:s[p]={},s[p]):(Number.isInteger(+A[y+1])&&!Array.isArray(s[p])&&(s[p]=[]),s[p])},t)},nt=function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",o=!1;return String.prototype.replace.call(i,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(s,p,y,A){return s===void 0?s:(y===A.length-1&&(delete s[p],o=!0),s[p])},t),o},ut=function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",o;return String.prototype.replace.call(i,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(s,p,y,A){return s===void 0?s:(y===A.length-1&&Array.isArray(s)&&(o=s.splice(p,1)),s[p])},t),o},mt=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=Object.keys(t);return i.map(function(o){return t[o]})},xt=function(t){var i=rt(t);return Number.isInteger(+i[i.length-1])},pt=function(){function r(){b(this,r)}return g(r,null,[{key:"empty",value:function(i){return mt(i).length===0}},{key:"get",value:function(i,o){var s=Ze(i,o);return s}},{key:"has",value:function(i,o){return ht(i,o)}},{key:"set",value:function(i,o,s){if(s!==void 0)Pe("SETTING",o,s),wt(i,o,s);else if(xt(o)&&r.get(i,o)!==void 0){Pe("Special case SETTING",o,"to undefined"),wt(i,o,void 0);var p=rt(o);p=p.slice(0,p.length-1),Mt(i,p)}else!xt(o)&&r.get(i,o)!==void 0&&(Pe("Special case REMOVING",o,"from object completley"),r.delete(i,o))}},{key:"delete",value:function(i,o){Pe("DELETE",o),xt(o)?(Pe("ARRAY",o),this.pullOut(i,o)):nt(i,o);var s=rt(o);s=s.slice(0,s.length-1),Mt(i,s)}},{key:"pullOut",value:function(i,o){var s=rt(o),p=s[s.length-1];s=s.slice(0,s.length-1),Pe("Pulling out:",s,"index",p);var y=Ze(i,s);Pe("Array",y),Array.isArray(y)&&ut(y,p),Mt(i,s)}}]),r}();function Mt(r,t){if(t.length!==0){var i=Ze(r,t);(Array.isArray(i)?i.every(function(o){return o==null}):JSON.stringify(i)==="{}")&&nt(r,t),Mt(r,t.slice(0,t.length-1))}}var kt=d.createContext({register:function(){},deregister:function(){},setValue:function(){},setTouched:function(){},setError:function(){},update:function(){},getField:function(){},expectRemoval:function(){},getInitialValue:function(){},getSavedValue:function(){}}),Et=d.createContext({}),Ht=d.createContext({getFullField:function(){},getValues:function(){},getOptions:function(){return{}},setInitialValue:function(){},getInitialValue:function(){},getDerrivedValue:function(){},getSavedValue:function(){},removeSavedState:function(){}}),jt=d.createContext(),Vt=d.createContext(),St=d.createContext(),Dt=d.createContext(),ve=d.createContext(),z=d.createContext(),$=d.createContext(),Se=d.createContext();function Ie(){var r=(0,d.useContext)(Ht);return r}function Ge(r){var t=(0,d.useRef)(),i=(0,d.useRef)(!0),o=(0,d.useState)(r),s=Q(o,2),p=s[0],y=s[1];t.current=p;var A=function(F){t.current=F,i.current&&y(F)},w=function(){return t.current};return(0,d.useEffect)(function(){return function(){i.current=!1}},[]),[p,A,w]}var Ke=function(t){return t.type&&t.type.name?t.type.name:t.displayName||t.name||"Component"},P=function(t){var i={};if(t.inner){if(t.inner.length===0){pt.set(i,t.path,t.message);return}var o=Fe(t.inner),s;try{for(o.s();!(s=o.n()).done;){var p=s.value;pt.get(i,p.path)||pt.set(i,p.path,p.message)}}catch(y){o.e(y)}finally{o.f()}}return i},Re=function(t,i){try{t.validateSync(i,{abortEarly:!1})}catch(s){var o=P(s);return o}},K=function(t){if(t.inner){if(t.inner.length===0)return;var i=t.inner[0];return i.message}},T=function(t,i){try{t.validateSync(i,{abortEarly:!1})}catch(o){return K(o)}},O=function(t,i){t(i);var o={};return t.errors&&t.errors.forEach(function(s){var p=s.message,y=s.dataPath,A=s.keyword,w=s.params,E=y;A==="required"&&(E="".concat(E,".").concat(w.missingProperty)),E=E.replace(".",""),pt.set(o,E,p)}),o},le=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var i=Math.random()*16|0,o=t=="x"?i:i&3|8;return o.toString(16)})},N=function(t,i){var o;return function(){for(var p=arguments.length,y=new Array(p),A=0;A<p;A++)y[A]=arguments[A];var w=function(){clearTimeout(o),t.apply(void 0,y)};clearTimeout(o),o=setTimeout(w,i)}},re=function(t,i,o){var s=i["ui:control"],p=i["informed:props"],y=i["input:props"],A=i["ui:before"],w=i["ui:after"],E=i.oneOf,F=i.items,G=i.enum,te=i.title,ne=i.minimum,se=i.maximum,ye=i.minLength,ge=i.maxLength,Ae=i.pattern,me=i.type,Te=i.properties,He=le();y&&y.id&&(He=y.id);var Be={componentType:s,field:o?"".concat(o,".").concat(t):t,type:me,uiBefore:A,uiAfter:w,properties:me==="object"?Te:void 0,items:me==="array"?F:void 0,props:j(j({label:te,id:He,min:ne,max:se,minLength:ye,maxLength:ge,pattern:Ae},p),y)};if(E){var ze=i.oneOf.map(function(We){var Je=We["input:props"],et=Je===void 0?{}:Je;return j({value:We.const,label:We.title},et)});Be.props.options=ze}if(G){var De=i.enum.map(function(We){return{value:We,label:We}});Be.props.options=De}if(F&&F.oneOf){var Ue=F.oneOf.map(function(We){var Je=We["input:props"],et=Je===void 0?{}:Je;return j({value:We.const,label:We.title},et)});Be.props.options=Ue}return Be},de=function(t,i,o){if(!t||i)return[];var s=t.properties,p=s===void 0?{}:s,y=t.allOf,A=t.propertyOrder,w=A===void 0?[]:A;if(Object.keys(p).length>0){var E=Object.keys(p).sort(function(F,G){var te=w.indexOf(F),ne=w.indexOf(G);return(te>-1?te:w.length+1)-(ne>-1?ne:w.length+1)}).map(function(F){var G=p[F],te=re(F,G,o);return te});return y&&E.push({componentType:"conditionals",allOf:y}),E}return[]},ae=function(t){var i=t.replace(/\./g,".properties.").replace(/\[/g,".itmes[");return i="properties.".concat(i),i},pe=function(t,i){if(typeof t=="string")return t.split("").map(function(o){return o==="#"?/\d/:o==="*"?/[\w]/:o});if(typeof t=="function")return t(i);if(Array.isArray(t))return t;throw new Error("Formatter must be string, array, or function")},Ee=function(t,i){for(var o=0,s=-1,p=!0;p&&o<t.length;)t[o]==i[o]?s=o:p=!1,o=o+1;return s},je=function(t,i){if(!t)return{val:t,offset:0};var o="".concat(t),s=pe(i,o),p=s.findIndex(function(ge){return typeof ge!="string"}),y=s.length-Y(s).reverse().findIndex(function(ge){return typeof ge!="string"}),A=[],w=o.split(""),E=0,F=0,G=Ee(s.slice(0,p),w.slice(0,p));G>-1&&(E=G+1,A=A.concat(s.slice(0,G+1)),F=G+1),G<0&&(A=A.concat(s.slice(0,p)),F=p);for(var te=F;te<s.length;te++){var ne=s[te];if(E!=w.length){var se=w[E];if(typeof ne=="function")A.push(ne(se)),E=E+1;else{var ye=typeof ne=="string"?ne===se:ne.test(se);ye&&typeof ne=="string"?(A.push(ne),E=E+1):!ye&&typeof ne=="string"?E!=w.length&&A.push(ne):ye&&typeof ne!="string"?(A.push(se),E=E+1):!ye&&typeof ne!="string"&&(E=E+1,te=te-1)}}else if(typeof ne=="string"&&te>=y)A.push(ne);else break}return{value:A.join(""),offset:o?A.length-o.length:0}},Ve=function(t,i){var o,s,p=new Intl.NumberFormat(t,i),y=new Intl.NumberFormat(t),A=(o=(s=y.formatToParts(.1).find(function(ge){var Ae=ge.type;return Ae==="decimal"}))===null||s===void 0?void 0:s.value)!==null&&o!==void 0?o:".";function w(ge,Ae){return ge instanceof RegExp&&Ae instanceof RegExp&&ge.source===Ae.source&&ge.global===Ae.global&&ge.ignoreCase===Ae.ignoreCase&&ge.multiline===Ae.multiline}function E(ge,Ae){for(var me=ge.length;me--;)if(Ae(ge[me]))return me;return-1}function F(ge,Ae,me){var Te=Y(ge);return Array.isArray(me)?Te.splice.apply(Te,[Ae,0].concat(Y(me))):Te.splice(Ae,0,me),Te}function G(ge){return"".concat(ge).replace(/\D/g,"")}function te(ge){return"".concat(ge).split(A).map(function(Ae){return G(Ae)}).join(".")}function ne(ge){if(typeof ge=="number")return ge;var Ae=parseFloat(te(ge));return Number.isNaN(Ae)?void 0:Ae}function se(ge){var Ae=te(ge),me="".concat(Ae).split(".")[1],Te=p.formatToParts(Number(Ae));me==="0"&&Te.push({type:"decimal",value:A},{type:"fraction",value:me});var He=Te.reduce(function(De,Ue){var We=Ue.type,Je=Ue.value;return["decimal","fraction"].includes(We)&&me==null?De:["integer","fraction"].includes(We)?[].concat(Y(De),Y(Je.split("").filter(function(et,$e){return We==="fraction"?$e<me.length:!0}).map(function(){return/\d/}))):We==="currency"?[].concat(Y(De),Y(Je.split(""))):[].concat(Y(De),[Je])},[]),Be=E(He,function(De){return w(De,/\d/)});He.indexOf(A)===-1&&"".concat(ge).indexOf(A)!==-1&&(He=F(He,Be+1,[A,"[]"]),Be+=2);var ze=He.slice(Be+1).join("");return He=[].concat(Y(He.slice(0,Be+1)),[ze]),He}var ye=function(Ae){if(Ae!=null)return ne(Ae)};return{formatter:se,parser:ye}},Qe=Object.freeze({__proto__:null,getChildDisplayName:Ke,yupToFormErrors:P,validateYupSchema:Re,yupToFormError:K,validateYupField:T,validateAjvSchema:O,uuidv4:le,debounce:N,computeFieldFromProperty:re,computeFieldsFromSchema:de,getSchemaPathFromJsonPath:ae,informedFormat:je,createIntlNumberFormatter:Ve}),vt=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?d.useLayoutEffect:d.useEffect,At=function(t){var i=t.value,o=t.inputRef,s=t.maintainCursor,p=s===void 0?!0:s,y=Ge(0),A=Q(y,3),w=A[0],E=A[1],F=A[2],G=Ge(0),te=Q(G,3),ne=te[0],se=te[1],ye=te[2];return vt(function(){if(o.current!=null&&F()){var ge=F()+ye();ye()!=0&&p?o.current.setSelectionRange(ge+1,ge+1):p&&o.current.setSelectionRange(ge,ge)}},[i]),{setCursorOffset:se,setCursor:E,cursor:w,getCursor:F,cursorOffset:ne}},Bt=function(t,i){var o=(0,d.useRef)(!0),s=o.current;(0,d.useEffect)(function(){if(s)o.current=!1;else return t()},i)},Pt=Me("informed:useField "),hn=function(t,i,o,s,p){if(t!=null){if(p)return p(t);if(i)return i(t);if(o&&!s){var y=je(t,o);return y.value}return t}},Nr=function(t,i,o,s){if(i&&o)return i(t);if(s){var p=je(t,s);return p.value}return t},Cr=function(t,i,o){var s=o.required;if(t||i)return function(p,y){if(i)return T(i,p);if(t)return t(p,y)};if(s)return function(p){return vn(p,s)}},Si=function(t){var i=t.fieldType,o=t.setValue,s=t.onChange,p=t.multiple,y=t.ref,A=function(E){return o(E)};return(i==="text"||i==="textArea"||i==="number")&&(A=function(E){return o(E.target.value,E)}),i==="select"&&(A=function(){var E=Array.from(y.current).filter(function(F){return F.selected}).map(function(F){return F.value});o(p?E:E[0]||"")}),i==="checkbox"&&(A=function(E){o(E.target.checked),s&&s(E)}),function(w){A(w)}},Gr=function(t){var i=t.setTouched,o=t.onBlur;return function(s){i(!0),o&&o(s)}},Vi=function(t){var i=t.fieldType,o=t.maskedValue,s=t.multiple,p=t.value;switch(i){case"text":case"number":return!o&&o!==0?"":o;case"textArea":return o||"";case"select":return p||(s?[]:"");case"checkbox":return!!p;default:return p}},Nn=function(t){switch(t){case"text":return t;case"number":return t;case"checkbox":return t;default:return}},vn=function(t,i){if(i&&(t==null||t===""))return typeof i=="string"?i:"This field is required"};function Tn(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,i=r.field,o=r.validate,s=r.asyncValidate,p=r.validationSchema,y=r.mask,A=r.maskWithCursorOffset,w=r.format,E=r.parse,F=r.formatter,G=r.parser,te=r.initialValue,ne=r.validateOnChange,se=r.validateOnBlur,ye=r.validateOnMount,ge=r.asyncValidateOnBlur,Ae=r.maskOnBlur,me=r.allowEmptyString,Te=r.onValueChange,He=r.notify,Be=r.keepState,ze=r.maintainCursor,De=r.debug,Ue=r.shadow,We=r.step,Je=r.fieldType,et=r.multiple,$e=r.onChange,gt=r.onBlur,Nt=r.formController,zt=r.relevant,or=r.required,kr=r.keepStateIfRelevant,Er=r.initialize,Qr=r.formatterDependencies,br=Qr===void 0?[]:Qr,Dr=C(r,["field","validate","asyncValidate","validationSchema","mask","maskWithCursorOffset","format","parse","formatter","parser","initialValue","validateOnChange","validateOnBlur","validateOnMount","asyncValidateOnBlur","maskOnBlur","allowEmptyString","onValueChange","notify","keepState","maintainCursor","debug","shadow","step","fieldType","multiple","onChange","onBlur","formController","relevant","required","keepStateIfRelevant","initialize","formatterDependencies"]),An=(0,d.useState)(le()),Yt=Q(An,1),Rt=Yt[0],Ut=(0,d.useContext)(kt),sr=(0,d.useContext)(Se),on=sr||kr,yr=Ie(),gs=(0,d.useRef)(),Ll=(0,d.useRef)(!0),ho=(0,d.useRef)(),Ui=(0,d.useRef)(!1),Dl=function(){return!Ui.current},If=function(){return Ui.current};Nt&&(Ut=Nt.updater,yr=Nt.getFormApi());var wi=Cr(o,p,{required:or}),Nl=(0,d.useState)(function(){return Ut.getInitialValue(i)}),Qy=Q(Nl,1),Zy=Qy[0],Ff=Ut.getSavedValue(i),kf,xh;(Be||on)&&Ff?(Pt("Setting field ".concat(Ed,"'s kept state"),Ff),kf=Ff.value,xh=Ff.touched,yr.removeSavedState(Ed)):te!=null?kf=te:kf=Zy;var _y=Ge(hn(kf,y,F,G,Er)),fd=Q(_y,3),Bl=fd[0],cd=fd[1],qy=fd[2],em=Ge(ye?wi(Bl):void 0),dd=Q(em,3),bh=dd[0],wh=dd[1],tm=dd[2],rm=Ge(xh),pd=Q(rm,3),Sh=pd[0],nm=pd[1],Ah=pd[2],im=(0,d.useState)(function(){return Nr(Bl,w,E,F)}),Eh=Q(im,2),hd=Eh[0],vd=Eh[1],Ch=(0,d.useRef)();Ch.current=hd;var Oh=(0,d.useRef)(te),vo=(0,d.useRef)(i),Th=(0,d.useRef)();Oh.current=te,vo.current=i;var am=(0,d.useRef)(null),ji=d.useMemo(function(){return t||am},[]),gd=At({value:Bl,inputRef:ji,maintainCursor:!!ze}),yd=gd.getCursor,om=gd.setCursor,md=gd.setCursorOffset,sm=function(){return!0},xd=function(lr){var sn=zt||sm,Ln=yr.getFullField(vo.current)||vo.current,Jt={path:Ln,parentPath:Ln.replace(/(.*)[.[].*/,"$1"),get:function(Dn,Vl){return pt.get(Dn,Vl)}};return sr&&sr.relevant?sn(lr,Jt)&&sr.relevant(lr,Jt):sn(lr,Jt)},lm=Ge(xd(yr.getValues())),bd=Q(lm,3),Mf=bd[0],um=bd[1],Ph=bd[2],fm=function(lr){return sr&&sr.relevant?sr.relevant(lr):!0},cm=function(){var lr=xd(yr.getValues()),sn=Ph();return lr!=sn&&um(lr),lr};(0,d.useEffect)(function(){!Mf&&!Be&&gs.current.reset()},[Mf]);var ii=function(){return Ue?yr.getDerrivedValue(i):qy()},Ul=function(lr){var sn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ln=sn.preventUpdate;We&&yr.getStep()<We?(Pt("Setting ".concat(i,"'s error to undefined as we are not at that step")),wh(void 0),Ut.setError(Rt,void 0,!Ln)):(Pt("Setting ".concat(i,"'s error to ").concat(lr)),wh(lr),Ut.setError(Rt,lr,!Ln))},wd=function(lr,sn){var Ln=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Jt=lr;Ui.current=!0,Pt("Setting ".concat(i," to ").concat(Jt)),Er&&(Jt=Er(Jt));var go=yr.getOptions(),Dn=Jt;if(Jt===""&&!me&&!Ln.allowEmptyString&&!go.allowEmptyStrings&&(Jt=void 0),(r.type==="number"||Je==="number")&&Jt!==void 0&&(Jt=+Jt),sn&&sn.target&&sn.target.selectionStart&&om(sn.target.selectionStart),y&&!Ae&&(Dn=y(Jt,yd()),Jt=y(Jt,yd())),A&&!Ae){var Vl=A(Jt,yd());Dn=Vl.value,Jt=Vl.value,md(Vl.offset)}if(w&&E&&(Jt=E(Jt),Dn=w(Jt)),F){var Ih=je(Jt,F);md(Ih.offset),Dn=Ih.value,Jt=Dn}G&&(Jt=Jt!=null?G(Jt):Jt),wi&&ne&&!Ln.initial&&(Pt("Validating after change ".concat(i," ").concat(Jt)),Ul(wi(Jt,yr.getValues()))),cd(Jt),vd(Dn),Te&&Te(Jt),Ut.setValue(Rt,Jt,!Ln.preventUpdate)};Bt(function(){gs.current.setValue(Ch.current)},Y(br));var Sd=function(lr,sn){var Ln=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Jt=Ln.preventUpdate;if(Pt("Field ".concat(i," has been touched")),wi&&se&&!sn&&lr&&(Pt("Validating after blur ".concat(i," ").concat(ii())),Ul(wi(ii(),yr.getValues()))),s&&ge&&!sn&&lr&&(Pt("Validating async after blur ".concat(i," ").concat(ii())),s(ii(),yr.getValues())),y&&Ae){var go=y(ii());cd(go),vd(go),Te&&Te(go),Ut.setValue(Rt,go,!Jt)}if(A&&Ae){var Dn=A(ii());md(Dn.offset),cd(Dn.value),vd(Dn.value),Te&&Te(Dn.value),Ut.setValue(Rt,Dn.value,!Jt)}nm(lr),Ut.setTouched(Rt,lr,!Jt)},dm=function(){var lr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},sn=lr.preventUpdate,Ln=hn(Oh.current||Ut.getInitialValue(vo.current),y,F,G,Er);wd(Ln,null,{initial:!0,preventUpdate:sn}),Ul(ye?wi(Ln):void 0,{preventUpdate:sn}),Sd(void 0,!0,{preventUpdate:sn}),Ui.current=!1},pm=function(lr){wi&&(Pt("Field validating ".concat(i," ").concat(ii())),Ul(wi(ii(),lr||yr.getValues())))},hm=function(lr){s&&(Pt("Field async validating ".concat(i," ").concat(ii())),s(ii(),lr||yr.getValues()))},Ad={setValue:wd,setTouched:Sd,setError:Ul,reset:dm,validate:pm,asyncValidate:hm,getValue:ii,getTouched:Ah,getError:tm,getIsRelevant:Ph,getDirty:If,getPristine:Dl,getFieldState:function(){return{value:ii(),touched:Ah(),dirty:If(),pristine:Dl()}},relevant:xd,multistepRelevant:fm,checkRelevant:cm};gs.current=Ad;var jl={value:Bl,error:bh,touched:Sh,maskedValue:hd,isRelevant:Mf,dirty:Ui.current,pristine:!Ui.current};Ue&&(jl={error:bh,touched:Sh}),Pt("Render",yr.getFullField(i),jl),vt(function(){var qr=yr.getFullField(vo.current);return Pt("Register",Rt,vo.current),ho.current={field:qr,fieldId:Rt,fieldApi:Ad,fieldState:jl,notify:He,keepState:Be,inMultistep:on,shadow:Ue},Ut.register(Rt,ho.current),function(){var lr=yr.getFullField(vo.current);Pt("Deregister",Rt,lr),Ut.deregister(Rt)}},[]),(0,d.useEffect)(function(){var qr=yr.getFullField(i);return Ll.current?Ll.current=!1:(Pt("Update",i,on),ho.current.field=qr,Ut.update(Rt,ho.current,Th.current)),function(){Th.current=qr}},[i]),vt(function(){De&&ji&&(ji.current.style.border="5px solid orange",setTimeout(function(){ji.current.style.borderWidth="2px",ji.current.style.borderStyle="inset",ji.current.style.borderColor="initial",ji.current.style.borderImage="initial"},500))});var vm=[].concat(Y(Object.values(jl)),Y(Object.values(r)),Y(Object.values(Dr))),gm=function(lr){return(0,d.useMemo)(function(){return Mf?lr:null},Y(vm))},Ed=i,ym=Si({fieldType:Je,setValue:wd,onChange:$e,multiple:et,ref:ji}),mm=Gr({setTouched:Sd,onBlur:gt}),xm=Vi({fieldType:Je,maskedValue:hd,multiple:et,value:Bl}),bm=Nn(Je);return{fieldState:jl,fieldApi:Ad,render:gm,ref:ji,userProps:j(j({},Dr),{},{multiple:et,onChange:$e,onBlur:gt,id:Dr.id||Rt}),informed:j({name:Ed,multiple:et,onChange:ym,onBlur:mm,value:xm,ref:ji,type:bm,id:Dr.id||Rt},Dr)}}var $r=function(t){var i=d.forwardRef(function(o,s){var p=Tn(o,s),y=p.fieldState,A=p.fieldApi,w=p.render,E=p.ref,F=p.userProps;return w(d.createElement(t,D({fieldApi:A,fieldState:y,field:o.field,forwardedRef:E,debug:o.debug,type:o.type},F)))});return i.displayName="asField(".concat(Ke(t),")"),i},Ai=Me("informed:Text "),Ei=function(t){var i=t.fieldApi,o=t.fieldState,s=C(t,["fieldApi","fieldState"]),p=o.maskedValue,y=i.setValue,A=i.setTouched,w=s.onChange,E=s.onBlur,F=s.field,G=s.initialValue,te=s.forwardedRef,ne=s.debug,se=s.label,ye=s.title,ge=s.id,Ae=C(s,["onChange","onBlur","field","initialValue","forwardedRef","debug","label","title","id"]);return Ai("Render",F),vt(function(){ne&&te&&(te.current.style.background="red",setTimeout(function(){te.current.style.background="white"},500))}),d.createElement(d.Fragment,null,se?d.createElement("label",{htmlFor:ge}," ",se," "):null,d.createElement("input",D({},Ae,{id:ge,name:F,ref:te,value:!p&&p!==0?"":p,onChange:function(Te){y(Te.target.value,Te),w&&w(Te)},onBlur:function(Te){A(!0),E&&E(Te)}})))},en=$r(Ei),gn=function(t){var i=t.fieldApi,o=t.fieldState,s=C(t,["fieldApi","fieldState"]),p=o.maskedValue,y=i.setValue,A=i.setTouched,w=s.onChange,E=s.onBlur,F=s.field,G=s.initialValue,te=s.forwardedRef,ne=s.debug,se=s.label,ye=s.id,ge=C(s,["onChange","onBlur","field","initialValue","forwardedRef","debug","label","id"]);return vt(function(){ne&&te&&(te.current.style.background="red",setTimeout(function(){te.current.style.background="white"},500))}),d.createElement(d.Fragment,null,se?d.createElement("label",{htmlFor:ye}," ",se," "):null,d.createElement("textarea",D({},ge,{id:ye,name:F,ref:te,value:p||"",onChange:function(me){y(me.target.value,me),w&&w(me)},onBlur:function(me){A(!0),E&&E(me)}})))},Bn=$r(gn),Un=Me("informed:Select "),yn=function(t){var i=t.fieldApi,o=t.fieldState,s=C(t,["fieldApi","fieldState"]),p=o.value,y=i.setTouched,A=s.onChange,w=s.onBlur,E=s.field,F=s.initialValue,G=s.options,te=s.children,ne=s.forwardedRef,se=s.debug,ye=s.multiple,ge=s.label,Ae=s.id,me=C(s,["onChange","onBlur","field","initialValue","options","children","forwardedRef","debug","multiple","label","id"]),Te=(0,d.useRef)(),He=function(ze){var De=Array.from((ne||Te).current).filter(function(Ue){return Ue.selected}).map(function(Ue){return Ue.value});i.setValue(ye?De:De[0]||""),A&&ze&&A(ze)};return vt(function(){se&&ne&&(ne.current.style.background="red",setTimeout(function(){ne.current.style.background="white"},500))}),Un("Render",E,p),d.createElement(d.Fragment,null,ge?d.createElement("label",{htmlFor:Ae}," ",ge," "):null,d.createElement("select",D({},me,{id:Ae,multiple:ye,name:E,ref:ne||Te,value:p||(ye?[]:""),onChange:He,onBlur:function(ze){y(!0),w&&w(ze)}}),G?G.map(function(Be){return d.createElement("option",{key:Be.value,value:Be.value,disabled:Be.disabled},Be.label)}):te))},Jn=$r(yn),Ci=function(t){var i=t.fieldApi,o=t.fieldState,s=C(t,["fieldApi","fieldState"]),p=o.value,y=i.setValue,A=i.setTouched,w=s.onChange,E=s.onBlur,F=s.field,G=s.initialValue,te=s.debug,ne=s.forwardedRef,se=s.id,ye=s.label,ge=C(s,["onChange","onBlur","field","initialValue","debug","forwardedRef","id","label"]);return d.createElement(d.Fragment,null,ye?d.createElement("label",{htmlFor:se}," ",ye," "):null,d.createElement("input",D({},ge,{id:se,name:F,ref:ne,checked:!!p,onChange:function(me){y(me.target.checked),w&&w(me)},onBlur:function(me){A(!0),E&&E(me)},type:"checkbox"})))},Br=$r(Ci),Kr=function(t){return d.forwardRef(function(i,o){return d.createElement(jt.Consumer,null,function(s){var p=s.radioGroupApi,y=s.radioGroupState;return d.createElement(t,D({radioGroupApi:p,radioGroupState:y,ref:o},i))})})},Xn=function(t){var i=t.radioGroupApi,o=t.radioGroupState,s=C(t,["radioGroupApi","radioGroupState"]),p=o.value,y=i.setValue,A=i.setTouched,w=i.onChange,E=i.onBlur,F=s.value,G=s.onChange,te=s.onBlur,ne=s.field,se=s.initialValue,ye=s.forwardedRef,ge=C(s,["value","onChange","onBlur","field","initialValue","forwardedRef"]);return d.createElement("input",D({},ge,{name:ne,ref:ye,value:F,checked:p===F,onChange:function(me){!me.target.checked||(y(F),G&&G(me),w&&w(me))},onBlur:function(me){A(!0),te&&te(me),E&&E(me)},type:"radio"}))},fr=Kr(Xn),Ot=function(r){q(i,r);var t=_(i);function i(){return b(this,i),t.apply(this,arguments)}return g(i,[{key:"render",value:function(){var s=this.props,p=s.options,y=s.children;return d.createElement(jt.Provider,{value:this.groupContext},p?p.map(function(A){return d.createElement("label",{key:A.value},A.label," ",d.createElement(fr,{value:A.value}))}):y)}},{key:"groupContext",get:function(){return{radioGroupApi:j(j({},this.props.fieldApi),{},{onChange:this.props.onChange,onBlur:this.props.onBlur}),radioGroupState:this.props.fieldState}}}]),i}(d.Component),ai=$r(Ot);function Oi(){return(0,d.useContext)(St)}var En=function(){var t=Oi(),i=t.add;return d.createElement("button",{onClick:function(){i()},type:"button"},"Add")};function Zt(){return(0,d.useContext)(Dt)}var jn=function(){var t=Zt(),i=t.remove;return d.createElement("button",{onClick:function(){i()},type:"button"},"Remove")},Qn=Me("informed:useArrayField "),fa=function(t){var i=t.field,o=t.initialValue,s=t.validate,p=t.arrayFieldApiRef,y=C(t,["field","initialValue","validate","arrayFieldApiRef"]),A=Ie(),w=(0,d.useState)(new Map),E=Q(w,1),F=E[0],G=(0,d.useContext)(kt),te=A.getFullField(i),ne=G.getInitialValue(i)||o||[],se=A.getSavedValue(te)&&A.getSavedValue(te).value,ye=Ge(se||ne),ge=Q(ye,3),Ae=ge[0],me=ge[1],Te=ge[2],He=Ae?Ae.map(function(){return le()}):[],Be=Ge(He),ze=Q(Be,3),De=ze[0],Ue=ze[1],We=ze[2],Je=(0,d.useMemo)(function(){return function(Yt,Rt){var Ut=We()==null?0:We().length;return s?s(Yt,Ut,Rt):void 0}}),et=Tn(j({field:i,validate:s?Je:void 0,shadow:!0},y)),$e=et.fieldApi;vt(function(){var Yt=function(Ut){Ut!==te&&(Qn("".concat(te," changed")),RegExp("".concat(te,"\\[[0-9]+\\]")).test(Ut)&&$e.validate())};return A.emitter.on("value",Yt),function(){A.emitter.removeListener("value",Yt)}},[i]);var gt=function(Rt){Qn("EXPECTING REMOVAL OF","".concat(i,"[").concat(Rt,"] and ").concat(i,"[").concat(De.length-1,"]")),G.expectRemoval("".concat(i,"[").concat(Rt,"]")),G.expectRemoval("".concat(i,"[").concat(De.length-1,"]"));var Ut=De.slice(0,Rt).concat(De.slice(Rt+1,De.length));Ue(Ut);var sr=Te(),on=sr.slice(0,Rt).concat(sr.slice(Rt+1,sr.length));me(on)},Nt=function(Rt,Ut){Qn("Swapping","".concat(i,"[").concat(Rt,"] and ").concat(i,"[").concat(Ut,"]"));var sr=Y(De);De[Rt]&&De[Ut]?(sr[Rt]=De[Ut],sr[Ut]=De[Rt]):console.warn("Attempted to swap ".concat(Rt," with ").concat(Ut," but one of them does not exist :(")),Ue(sr)},zt=function(){De.push(le()),Ue(Y(De))},or=function(Rt){De.push(le()),Ue(Y(De));var Ut=Y(Te());Ut[De.length-1]=Rt,me(Ut)},kr=function(){var Rt=G.getInitialValue(i)||o||[];me(Rt);var Ut=Rt?Rt.map(function(){return le()}):[];Ue(Ut)},Er=De.map(function(Yt,Rt){var Ut={remove:function(){return gt(Rt)}},sr={initialValue:Ae&&Ae[Rt],key:Yt,field:"".concat(i,"[").concat(Rt,"]"),index:Rt};return j(j({arrayFieldItemApi:Ut,arrayFieldItemState:sr},Ut),sr)}),Qr={add:zt,swap:Nt,addWithInitialValue:or,reset:kr};p&&(p.current=Qr);var br={fields:Er,field:i},Dr=j(j({},G),{},{register:function(Rt,Ut){F.set(Rt,Ut);for(var sr=arguments.length,on=new Array(sr>2?sr-2:0),yr=2;yr<sr;yr++)on[yr-2]=arguments[yr];G.register.apply(G,[Rt,Ut].concat(on))},deregister:function(Rt){F.delete(Rt);for(var Ut=arguments.length,sr=new Array(Ut>1?Ut-1:0),on=1;on<Ut;on++)sr[on-1]=arguments[on];G.deregister.apply(G,[Rt].concat(sr))},getInitialValue:function(Rt){if(RegExp("".concat(te,"\\[[0-9]+\\]")).test(Rt)){var Ut=Rt.replace(i,""),sr=pt.get(Te(),Ut);return Qn("Resetting ".concat(Ut," to ").concat(sr)),sr}return G.getInitialValue(Rt)}}),An=function(Rt){return d.createElement(kt.Provider,{value:Dr},d.createElement(St.Provider,{value:Qr},d.createElement(Vt.Provider,{value:br},Rt)))};return{render:An,add:zt,swap:Nt,addWithInitialValue:or,fields:Er,arrayFieldState:br,arrayFieldApi:Qr,field:i}},at=function(t,i){return j(j({},i),{},{getValue:function(s){return i.getValue("".concat(t,".").concat(s))},getTouched:function(s){return i.getTouched("".concat(t,".").concat(s))},getError:function(s){return i.getError("".concat(t,".").concat(s))},setValue:function(s,p){return i.setValue("".concat(t,".").concat(s),p)},setTouched:function(s,p){return i.setTouched("".concat(t,".").concat(s),p)},setError:function(s,p){return i.setError("".concat(t,".").concat(s),p)},getInitialValue:function(s){return i.getInitialValue("".concat(t,".").concat(s))},getSavedValue:function(s){return i.getSavedValue("".concat(t,".").concat(s))},getFullField:function(s){return"".concat(i.getFullField(t),".").concat(s)}})};function Lt(r){var t=Ie(),i=(0,d.useMemo)(function(){return at(r,t)},[r]);return i}function oi(){var r=(0,d.useContext)(Et);return r}var ue=function(t){var i=t.when,o=t.children,s=oi(),p=i(s);return p?o:null},Oe=function(t){var i=t.relevant,o=t.field,s=C(t,["relevant","field"]),p=Ie();if(i){var y=p.getFullField(o),A={path:y,parentPath:y.replace(/(.*)[.[].*/,"$1"),get:function(F,G){return pt.get(F,G)}},w=function(F){var G=F.values;return i(G,A)};return d.createElement(ue,{when:w},d.createElement(qe,D({field:o},s)))}else return d.createElement(qe,D({field:o},s))},qe=function(t){var i=t.children,o=C(t,["children"]),s=fa(o),p=s.render,y=s.arrayFieldState,A=s.arrayFieldApi,w=s.field;return p(typeof i=="function"?i(j(j({field:w,arrayFieldApi:A,arrayFieldState:y},A),y)):i)},st=function(t){var i=t.arrayFieldItemState,o=t.arrayFieldItemApi,s=t.children,p=(0,d.useContext)(kt),y=Ie(),A=(0,d.useState)(0),w=Q(A,2),E=w[0],F=w[1],G=(0,d.useState)(new Map),te=Q(G,1),ne=te[0],se=i.field,ye=Lt(se),ge=function(){var De=y.getState(),Ue=De.values,We=De.errors,Je=De.touched,et={values:pt.get(Ue,se),errors:pt.get(We,se),touched:pt.get(Je,se)};return et};(0,d.useEffect)(function(){var ze=function(Ue){var We=Ue.slice(0,Ue.lastIndexOf("[")!=-1?Ue.lastIndexOf("]")+1:Ue.length);We===se&&F(Math.random())};return y.emitter.on("value",ze),function(){y.emitter.removeListener("value",ze)}},[se]);var Ae=function(){ne.forEach(function(De){De.fieldApi.reset()})},me=ge(),Te=j(j({},p),{},{register:function(De,Ue,We){ne.set(De,Ue),p.register(De,Ue,We)},deregister:function(De){ne.delete(De);for(var Ue=arguments.length,We=new Array(Ue>1?Ue-1:0),Je=1;Je<Ue;Je++)We[Je-1]=arguments[Je];p.deregister.apply(p,[De].concat(We))}}),He=j(j(j({},o),ye),{},{reset:Ae}),Be=j(j({},i),me);return typeof s=="function"?d.createElement(kt.Provider,{value:Te},d.createElement(Dt.Provider,{value:He},d.createElement(ve.Provider,{value:Be},s(j(j({arrayFieldItemApi:He,arrayFieldItemState:Be},He),Be))))):d.createElement(kt.Provider,{value:Te},d.createElement(Dt.Provider,{value:He},d.createElement(ve.Provider,{value:Be},s)))};Oe.Items=function(r){var t=r.children,i=(0,d.useContext)(Vt),o=i.fields;return o.map(function(s){var p=s.arrayFieldItemState,y=s.arrayFieldItemApi,A=p.key;return d.createElement(st,{key:A,arrayFieldItemApi:y,arrayFieldItemState:p},t)})};var lt=function(t){var i=t.components,o=(0,d.useContext)(kt),s=o.fieldMap;return i?i.map(function(p,y){var A=p["ui:control"],w=s[A];return d.createElement(w,{key:"ui-comp-".concat(y)})}):null},Kt=Me("informed:FormFields "),Xt=function r(t){var i=t.schema,o=t.prefix,s=t.onlyValidateSchema,p=(0,d.useContext)(kt),y=p.fieldMap,A=(0,d.useMemo)(function(){var w=de(i,s,o),E=w.map(function(F,G){var te=F.field,ne=F.props,se=F.type,ye=F.properties,ge=F.items,Ae=F.componentType,me=F.uiBefore,Te=F.uiAfter,He=F.allOf,Be=y[Ae];return Kt("Rendering Field",te,F),!Be&&se==="object"&&ye?d.createElement(r,{schema:F,prefix:te,key:"ScheamField-".concat(G)}):!Be&&se==="array"&&ge?d.createElement(Or,D({key:"ScheamField-".concat(G),field:te,items:ge,uiBefore:me,uiAfter:Te},ne)):Be&&Ae==="array"&&ge&&se==="array"?d.createElement(Be,D({key:"ScheamField-".concat(G),field:te,items:ge,uiBefore:me,uiAfter:Te},ne)):Ae==="conditionals"?He.map(function(ze){var De=ze.then,Ue=ze.if.properties,We=function(et){var $e=et.values;return Object.keys(Ue).every(function(gt){var Nt=Ue[gt];return $e[gt]===Nt.const})};return d.createElement(ue,{key:"ScheamField-".concat(G),when:We},d.createElement(r,{schema:De}))}):Be?d.createElement(Be,D({key:"ScheamField-".concat(G),field:te},ne)):null});return E},[i,o]);return A},Or=function(t){var i=t.field,o=t.items,s=t.uiBefore,p=t.uiAfter,y=C(t,["field","items","uiBefore","uiAfter"]);return d.createElement(Oe,D({field:i},y),d.createElement(lt,{components:s}),d.createElement(Oe.Items,null,function(A){var w=A.field;return d.createElement(d.Fragment,null,d.createElement(lt,{components:o["ui:before"]}),d.createElement(Xt,{schema:o,prefix:w}),d.createElement(lt,{components:o["ui:after"]}))}),d.createElement(lt,{components:p}))},Tr={select:Jn,input:en,textarea:Bn,checkbox:Br,radio:ai,add:En,remove:jn,array:Or},_t=Me("informed:Controller "),Wl=function(t,i){var o=Object.keys(i).find(function(p){return t.includes(p)});if(!!o){var s=t.slice(0,o.length);return s===o}},tn=function(){},ys=function(){function r(){var t=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};b(this,r),this.options=i,this.subscriptions=new Map;var o=i.ajv,s=i.schema,p=i.fieldMap;this.ajv=o?new o({allErrors:!0}):null,this.ajvValidate=o?this.ajv.compile(s):null,this.fieldMap=p||Tr,this.fieldsById=new Map,this.fieldsByName={get:function(A){var w;return t.fieldsById.forEach(function(E){E&&E.field===A&&(w=E)}),w}},this.onScreen={},this.expectedRemovals={},this.pulledOut={},this.savedValues={},this.state={pristine:!0,dirty:!1,invalid:!1,submits:0,step:0,validating:0,submitting:!1,values:{},errors:{},touched:{}},this.dummyField={fieldApi:{setValue:tn,setTouched:tn,setError:tn,reset:tn,validate:tn,getValue:tn,getTouched:tn,getError:tn,getFieldState:tn,checkRelevant:tn,getPristine:tn,getDirty:tn}},this.deregister=this.deregister.bind(this),this.register=this.register.bind(this),this.getValue=this.getValue.bind(this),this.getTouched=this.getTouched.bind(this),this.getError=this.getError.bind(this),this.getErrors=this.getErrors.bind(this),this.setValue=this.setValue.bind(this),this.getValues=this.getValues.bind(this),this.getStep=this.getStep.bind(this),this.setStep=this.setStep.bind(this),this.back=this.back.bind(this),this.next=this.next.bind(this),this.setCurrent=this.setCurrent.bind(this),this.setTouched=this.setTouched.bind(this),this.setError=this.setError.bind(this),this.setFormError=this.setFormError.bind(this),this.submitForm=this.submitForm.bind(this),this.reset=this.reset.bind(this),this.update=this.update.bind(this),this.validate=this.validate.bind(this),this.screenValid=this.screenValid.bind(this),this.keyDown=this.keyDown.bind(this),this.getField=this.getField.bind(this),this.getInitialValue=this.getInitialValue.bind(this),this.setInitialValue=this.setInitialValue.bind(this),this.getOptions=this.getOptions.bind(this),this.getFormState=this.getFormState.bind(this),this.expectRemoval=this.expectRemoval.bind(this),this.getSavedValue=this.getSavedValue.bind(this),this.removeSavedState=this.removeSavedState.bind(this),this.getDerrivedValue=this.getDerrivedValue.bind(this),this.setValues=this.setValues.bind(this),this.resetField=this.resetField.bind(this),this.fieldExists=this.fieldExists.bind(this),this.validateField=this.validateField.bind(this),this.notify=this.notify.bind(this),this.validating=this.validating.bind(this),this.validated=this.validated.bind(this),this.getDirty=this.getDirty.bind(this),this.getPristine=this.getPristine.bind(this),this.on=this.on.bind(this),this.emit=this.emit.bind(this),this.removeListener=this.removeListener.bind(this),this.updater={register:this.register,deregister:this.deregister,getField:this.getField,update:this.update,fieldMap:this.fieldMap,setValue:function(A,w){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,F=t.fieldsById.get(A);F.shadow||pt.set(t.state.values,F.field,F.fieldApi.getValue()),F.fieldApi.relevant(t.state.values)||pt.delete(t.state.values,F.field),t.fieldsById.forEach(function(G){var te=G.fieldApi.checkRelevant();(!G.fieldApi.multistepRelevant(t.state.values)||!te&&!G.keepState)&&(pt.delete(t.state.values,G.field),pt.delete(t.state.touched,G.field),pt.delete(t.state.errors,G.field))}),E&&(t.emit("change"),t.emit("field",F.field),t.emit("value",F.field,w))},setTouched:function(A,w){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,F=t.fieldsById.get(A);!F.shadow&&F.fieldApi.getIsRelevant()&&pt.set(t.state.touched,F.field,F.fieldApi.getTouched()),F.shadow&&F.fieldApi.getError()!=null&&F.fieldApi.relevant(t.state.values)&&pt.set(t.state.touched,F.field,F.fieldApi.getTouched()),E&&(t.emit("change"),t.emit("field",F.field))},setError:function(A,w){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,F=t.fieldsById.get(A);!F.shadow&&F.fieldApi.getIsRelevant()&&pt.set(t.state.errors,F.field,F.fieldApi.getError());var G=pt.get(t.state.errors,F.field);(F.shadow&&F.fieldApi.getError()!=null&&F.fieldApi.relevant(t.state.values)||F.shadow&&F.fieldApi.getError()===void 0&&F.fieldApi.relevant(t.state.values)&&typeof G=="string")&&pt.set(t.state.errors,F.field,F.fieldApi.getError()),E&&(t.emit("change"),t.emit("field",F.field))},expectRemoval:this.expectRemoval,getInitialValue:this.getInitialValue,getSavedValue:this.getSavedValue},this.formApi={setValue:this.setValue,setTouched:this.setTouched,setError:this.setError,setFormError:this.setFormError,setValues:this.setValues,setInitialValue:this.setInitialValue,getValue:this.getValue,getTouched:this.getTouched,getError:this.getError,reset:this.reset,submitForm:this.submitForm,getState:this.getFormState,getValues:this.getValues,getFullField:this.getFullField,fieldExists:this.fieldExists,getInitialValue:this.getInitialValue,validate:this.validate,validateField:this.validateField,screenValid:this.screenValid,resetField:this.resetField,getOptions:this.getOptions,emitter:this,getSavedValue:this.getSavedValue,removeSavedState:this.removeSavedState,getDerrivedValue:this.getDerrivedValue,getStep:this.getStep,setStep:this.setStep,next:this.next,back:this.back,setCurrent:this.setCurrent,validated:this.validated,validating:this.validating,getDirty:this.getDirty,getPristine:this.getPristine,getField:this.getField},this.on("value",function(y){delete t.state.error,t.notify(y)})}return g(r,[{key:"emit",value:function(i){for(var o=arguments.length,s=new Array(o>1?o-1:0),p=1;p<o;p++)s[p-1]=arguments[p];var y=this.subscriptions.get(i);y&&y.forEach(function(A){return A.apply(void 0,s)})}},{key:"on",value:function(i,o){this.subscriptions.get(i)||this.subscriptions.set(i,new Set);var s=this.subscriptions.get(i);s.add(o)}},{key:"removeListener",value:function(i,o){var s=this.subscriptions.get(i);s.delete(o)}},{key:"setOptions",value:function(i){this.options=i}},{key:"setValue",value:function(i,o,s){this.getField(i).fieldApi.setValue(o,null,j({allowEmptyString:this.options.allowEmptyStrings},s))}},{key:"setTouched",value:function(i,o){this.getField(i).fieldApi.setTouched(o)}},{key:"setError",value:function(i,o){this.getField(i).fieldApi.setError(o)}},{key:"setFormError",value:function(i){this.state.error=i,this.emit("change")}},{key:"validating",value:function(){this.state.validating=this.state.validating+1,this.emit("change")}},{key:"validated",value:function(i,o){if(this.state.validating=this.state.validating-1,this.getError(i)||this.setError(i,o),this.state.validating>0){this.emit("change");return}this.state.submitting&&(this.valid()?(_t("Submit",this.state),this.emit("submit")):(_t("Submit",this.state),this.emit("failure")),this.state.submitting=!1),this.emit("change")}},{key:"setStep",value:function(i){this.state.step=i,this.emit("change")}},{key:"setCurrent",value:function(i){this.state.Current=i,this.emit("change")}},{key:"back",value:function(i){this.state.step=this.state.step-1,this.state.Current=i,this.emit("change")}},{key:"next",value:function(i){this.validate(),this.screenValid()&&(this.state.step=this.state.step+1,this.state.Current=i),this.emit("change")}},{key:"setInitialValue",value:function(i,o){pt.set(this.options.initialValues,i,o)}},{key:"getFormState",value:function(){return _t("Returning form state"),j(j({},this.state),{},{pristine:this.pristine(),dirty:this.dirty(),invalid:this.invalid()})}},{key:"getFormApi",value:function(){return this.formApi}},{key:"getDerrivedValue",value:function(i){var o=this.getValues();return pt.get(o,i)}},{key:"getValue",value:function(i){var o=this.getField(i).fieldApi.getValue();return _t("Getting value for",i,o),o}},{key:"getTouched",value:function(i){var o=this.getField(i).fieldApi.getTouched();return _t("Getting touched for",i,o),o}},{key:"getError",value:function(i){var o=this.getField(i).fieldApi.getError();return _t("Getting error for",i,o),o}},{key:"getDirty",value:function(i){var o=this.getField(i).fieldApi.getDirty();return _t("Getting dirty for",i,o),o}},{key:"getPristine",value:function(i){var o=this.getField(i).fieldApi.getPristine();return _t("Getting pristine for",i,o),o}},{key:"getValues",value:function(){return _t("Gettings values"),this.state.values}},{key:"getAllTouched",value:function(){return _t("Gettings touched"),this.state.touched}},{key:"getErrors",value:function(){return _t("Gettings errors"),this.state.errors}},{key:"getOptions",value:function(){return this.options}},{key:"getStep",value:function(){return this.state.step}},{key:"getSavedValue",value:function(i){var o=this.fieldsByName.get(i);return o&&o.shadow?pt.get(this.savedValues,"shadow-".concat(i)):pt.get(this.savedValues,i)}},{key:"removeSavedState",value:function(i){var o=this.fieldsByName.get(i);return o&&o.shadow?pt.delete(this.savedValues,"shadow-".concat(i)):pt.delete(this.savedValues,i)}},{key:"getFullField",value:function(i){return i}},{key:"getInitialValue",value:function(i){return pt.get(this.options.initialValues,i)}},{key:"getField",value:function(i){_t("Getting Field",i);var o=this.fieldsByName.get(i);return o||(console.warn("Attempting to get field ".concat(i," but it does not exist")),this.dummyField)}},{key:"notify",value:function(i){var o=this,s=this.getField(i);s&&s.notify&&s.notify.forEach(function(p){var y=".".concat(i),A="".concat(y.replace(/(.*)[.[].*/,"$1"),".").concat(p).slice(1),w=o.getField(A);w&&(_t("Notifying",w.field),w.fieldApi.validate(),w.fieldApi.checkRelevant())})}},{key:"validateField",value:function(i){this.getField(i).fieldApi.validate()}},{key:"resetField",value:function(i){this.getField(i).fieldApi.reset()}},{key:"fieldExists",value:function(i){return this.fieldsByName.get(i)!=null}},{key:"valid",value:function(){var i=this.getErrors();return!!(pt.empty(i)&&!this.state.error)}},{key:"screenValid",value:function(){var i=Object.entries(this.onScreen).some(function(o){var s=Q(o,2),p=s[1];return p.fieldApi.getError()});return!i}},{key:"invalid",value:function(){var i=this.getErrors();return!!(!pt.empty(i)||this.state.error)}},{key:"pristine",value:function(){var i=!0;return this.fieldsById.forEach(function(o){o.fieldApi.getPristine()||(i=!1)}),i}},{key:"dirty",value:function(){return!this.pristine()}},{key:"reset",value:function(){_t("Resetting"),this.fieldsById.forEach(function(i){i.fieldApi.reset({preventUpdate:!0})}),this.emit("reset"),this.emit("change")}},{key:"setValues",value:function(i){_t("Setting values"),this.fieldsById.forEach(function(o){var s=pt.get(i,o.field);s!==void 0&&o.fieldApi.setValue(s,null,{preventUpdate:!0})}),this.emit("change")}},{key:"validate",value:function(){var i=this;_t("Validating all fields");var o=this.getValues();if(this.options.validationSchema){var s=Re(this.options.validationSchema,o);this.fieldsById.forEach(function(w){if(pt.has(s,w.field)){var E=pt.get(s,w.field);i.setError(w.field,E)}else i.setError(w.field,void 0)})}if(this.options.schema&&this.options.ajv){var p=O(this.ajvValidate,o);this.fieldsById.forEach(function(w){if(pt.has(p,w.field)){var E=pt.get(p,w.field);i.setError(w.field,E)}else i.setError(w.field,void 0)})}if(this.fieldsById.forEach(function(w){w.fieldApi.validate(o),w.fieldApi.setTouched(!0,!0)}),this.options.validate){var y=this.options.validate(o);this.setFormError(y)}if(this.options.validateFields){var A=this.options.validateFields(o);this.fieldsById.forEach(function(w){if(pt.has(A,w.field)){var E=pt.get(A,w.field);i.setError(w.field,E)}})}}},{key:"asyncValidate",value:function(){_t("Async Validating all fields");var i=this.getValues();this.fieldsById.forEach(function(o){o.fieldApi.asyncValidate(i)})}},{key:"keyDown",value:function(i){if(i.keyCode==13&&this.options.preventEnter)return i.preventDefault(i),!1}},{key:"submitForm",value:function(i){this.state.submits=this.state.submits+1,this.state.submitting=!0,!this.options.dontPreventDefault&&i&&i.preventDefault(i),this.validate(),this.emit("change"),this.asyncValidate(),!(this.state.validating>0)&&(this.valid()?(_t("Submit",this.state),this.emit("submit")):(_t("Submit",this.state),this.emit("failure")),this.state.submitting=!1,this.emit("change"))}},{key:"mount",value:function(){var i=this;this.fieldsById.forEach(function(o){i.emit("field",o.field)})}},{key:"register",value:function(i,o,s){var p=o.field,y=o.state;_t("Register ID:",i,"Name:",p,y,"Initial",s);var A=p.slice(0,p.lastIndexOf("[")!=-1?p.lastIndexOf("]")+1:p.length),w;this.fieldsById.forEach(function(E,F){E&&E.field===p&&(w=F)}),w&&(o.keepState||o.inMultistep)?(_t("Already Registered",p),this.fieldsById.delete(w)):w&&(!o.keepState||!o.inMultistep)&&console.warn("Check to make sure you have not registered two fields with the fieldName",p),_t("Fields Registered",this.fieldsById.size),this.onScreen[i]=o,this.fieldsById.set(i,o),_t("clearing expected removal",A),delete this.expectedRemovals[A],delete this.pulledOut[A],!o.shadow&&(this.updater.setValue(i,o.fieldApi.getValue(),!1),this.updater.setError(i,o.fieldApi.getError(),!1),this.updater.setTouched(i,o.fieldApi.getTouched(),!1),s||this.emit("change"),this.emit("field",p))}},{key:"deregister",value:function(i){var o=this.fieldsById.get(i),s=o.field;_t("Deregister",i,s),delete this.onScreen[i];var p=Wl(s,this.expectedRemovals),y=s.slice(0,s.lastIndexOf("[")!=-1?s.lastIndexOf("]")+1:s.length);(o.keepState||o.inMultistep)&&!p&&(_t("Saving field ".concat(s,"'s value"),o.fieldApi.getFieldState()),o.shadow?pt.set(this.savedValues,"shadow-".concat(s),o.fieldApi.getFieldState()):pt.set(this.savedValues,s,o.fieldApi.getFieldState())),(p||!o.keepState&&!o.inMultistep||!o.fieldApi.getIsRelevant()&&!o.keepState)&&(_t("Removing field",s),this.fieldsById.delete(i),p||(pt.delete(this.state.values,s),pt.delete(this.state.touched,s),pt.delete(this.state.errors,s),o.shadow?pt.delete(this.savedValues,"shadow-".concat(s)):pt.delete(this.savedValues,s)),p&&this.pulledOut[y]&&(_t("Pulling out",s,"with magic value",y),pt.pullOut(this.state.values,y),pt.pullOut(this.state.touched,y),pt.pullOut(this.state.errors,y),pt.pullOut(this.savedValues,y),delete this.pulledOut[y])),this.emit("change")}},{key:"expectRemoval",value:function(i){_t("Expecting removal of",i),this.expectedRemovals[i]=!0,this.pulledOut[i]=!0}},{key:"update",value:function(i,o,s){_t("Update",i,o.field,s,o.fieldState.value);var p=o.fieldApi.getValue(),y=o.fieldApi.getError(),A=o.fieldApi.getTouched(),w=this.fieldsByName.get(s);s&&!w&&(pt.set(this.state.values,s),pt.set(this.state.errors,s),pt.set(this.state.touched,s)),pt.set(this.state.values,o.field,p),pt.set(this.state.errors,o.field,y),pt.set(this.state.touched,o.field,A),this.emit("change")}}]),r}(),yo=Me("informed:FormProvider "),ms=function(t){var i=t.children,o=t.formApi,s=t.formController,p=t.formState,y=C(t,["children","formApi","formController","formState"]);if(yo("Render FormProvider"),o)return yo("Render FormProvider with given values"),d.createElement(kt.Provider,{value:s.updater},d.createElement(Ht.Provider,{value:o},d.createElement(Et.Provider,{value:p},i)));yo("Render FormProvider with generated values");var A=bs(y);return d.createElement(kt.Provider,{value:A.formController.updater},d.createElement(Ht.Provider,{value:A.formApi},d.createElement(Et.Provider,{value:A.formState},i)))},xs=Me("informed:useForm "),bs=function(t){var i=t.dontPreventDefault,o=t.initialValues,s=t.validate,p=t.validateFields,y=t.allowEmptyStrings,A=t.preventEnter,w=t.getApi,E=t.apiRef,F=t.onChange,G=t.onReset,te=t.onSubmit,ne=t.onValueChange,se=t.onSubmitFailure,ye=t.validationSchema,ge=t.schema,Ae=t.ajv,me=t.fieldMap,Te=t.onlyValidateSchema,He=C(t,["dontPreventDefault","initialValues","validate","validateFields","allowEmptyStrings","preventEnter","getApi","apiRef","onChange","onReset","onSubmit","onValueChange","onSubmitFailure","validationSchema","schema","ajv","fieldMap","onlyValidateSchema"]);xs("Render useForm");var Be=(0,d.useMemo)(function(){return{dontPreventDefault:i,initialValues:o,validate:s,validateFields:p,allowEmptyStrings:y,preventEnter:A,validationSchema:ye,schema:ge,ajv:Ae,fieldMap:me}},[i,o,s,p,y,A,ye,ge,Ae,me]),ze=(0,d.useState)(function(){return new ys(Be)}),De=Q(ze,1),Ue=De[0];(0,d.useEffect)(function(){Ue.setOptions(Be)},[Be]),vt(function(){Ue.mount()},[]);var We=(0,d.useState)(function(){return Ue.getFormState()}),Je=Q(We,2),et=Je[0],$e=Je[1];vt(function(){var kr=function(){return F&&F(Ue.getFormState())},Er=function(){return G&&G()},Qr=function(){return te&&te(Ue.getFormState().values)},br=function(){return ne&&ne(Ue.getFormState().values)},Dr=function(){return se&&se(Ue.getFormState().errors)};return Ue.on("change",kr),Ue.on("reset",Er),Ue.on("submit",Qr),Ue.on("value",br),Ue.on("failure",Dr),function(){Ue.removeListener("change",kr),Ue.removeListener("reset",Er),Ue.removeListener("submit",Qr),Ue.removeListener("value",br),Ue.removeListener("failure",Dr)}},[F,G,te,ne,se]),(0,d.useState)(function(){var kr=function(){xs("Setting form state"),$e(Ue.getFormState())};Ue.on("change",kr),w&&w(Ue.getFormApi()),E&&(E.current=Ue.getFormApi())});var gt=(0,d.useState)(function(){return Ue.getFormApi()}),Nt=Q(gt,1),zt=Nt[0],or=function(Er){return d.createElement(ms,{formApi:zt,formState:et,formController:Ue},d.createElement(d.Fragment,null,Er||d.createElement(Xt,{schema:ge,onlyValidateSchema:Te})))};return{formApi:zt,formState:et,formController:Ue,render:or,userProps:He}},Hl=Me("informed:Form "),zl=function(t){var i=t.children,o=t.render,s=t.component,p=C(t,["children","render","component"]);Hl("Render FORM");var y=bs(p),A=y.formApi,w=y.formController,E=y.formState,F=y.render,G=y.userProps,te=function(){var se={formState:E,formApi:A};return s?d.createElement(s,se,i):o?o(se):typeof i=="function"?i(se):i};return F(d.createElement("form",D({},G,{onReset:w.reset,onSubmit:w.submitForm,onKeyDown:w.keyDown}),te()))},Rf=function(t,i){return j(j({},i),{},{getValue:function(s){return i.getValue("".concat(t,".").concat(s))},getTouched:function(s){return i.getTouched("".concat(t,".").concat(s))},getError:function(s){return i.getError("".concat(t,".").concat(s))},setValue:function(s,p){return i.setValue("".concat(t,".").concat(s),p)},setTouched:function(s,p){return i.setTouched("".concat(t,".").concat(s),p)},setError:function(s,p){return i.setError("".concat(t,".").concat(s),p)},getInitialValue:function(s){return i.getInitialValue("".concat(t,".").concat(s))},getFullField:function(s){return"".concat(i.getFullField(t),".").concat(s)}})},Lf=function(t,i){var o=i.register,s=i.deregister,p=i.setValue,y=i.setTouched,A=i.setError,w=i.update,E=i.getField,F=i.expectRemoval,G=i.getInitialValue,te=i.fieldMap,ne=i.getSavedValue;return{register:function(ye){for(var ge=arguments.length,Ae=new Array(ge>1?ge-1:0),me=1;me<ge;me++)Ae[me-1]=arguments[me];return o.apply(void 0,["".concat(t,".").concat(ye)].concat(Ae))},deregister:function(ye){for(var ge=arguments.length,Ae=new Array(ge>1?ge-1:0),me=1;me<ge;me++)Ae[me-1]=arguments[me];return s.apply(void 0,["".concat(t,".").concat(ye)].concat(Ae))},update:function(ye){for(var ge=arguments.length,Ae=new Array(ge>1?ge-1:0),me=1;me<ge;me++)Ae[me-1]=arguments[me];return w.apply(void 0,["".concat(t,".").concat(ye)].concat(Ae))},setValue:function(ye){for(var ge=arguments.length,Ae=new Array(ge>1?ge-1:0),me=1;me<ge;me++)Ae[me-1]=arguments[me];return p.apply(void 0,["".concat(t,".").concat(ye)].concat(Ae))},setTouched:function(ye){for(var ge=arguments.length,Ae=new Array(ge>1?ge-1:0),me=1;me<ge;me++)Ae[me-1]=arguments[me];return y.apply(void 0,["".concat(t,".").concat(ye)].concat(Ae))},setError:function(ye){for(var ge=arguments.length,Ae=new Array(ge>1?ge-1:0),me=1;me<ge;me++)Ae[me-1]=arguments[me];return A.apply(void 0,["".concat(t,".").concat(ye)].concat(Ae))},getField:function(ye){for(var ge=arguments.length,Ae=new Array(ge>1?ge-1:0),me=1;me<ge;me++)Ae[me-1]=arguments[me];return E.apply(void 0,["".concat(t,".").concat(ye)].concat(Ae))},expectRemoval:function(ye){for(var ge=arguments.length,Ae=new Array(ge>1?ge-1:0),me=1;me<ge;me++)Ae[me-1]=arguments[me];return F.apply(void 0,["".concat(t,".").concat(ye)].concat(Ae))},getInitialValue:function(ye){return G("".concat(t,".").concat(ye))},getSavedValue:function(ye){return ne("".concat(t,".").concat(ye))},fieldMap:te}},Df=function(t){var i=t.scope,o=t.children,s=useContext(kt),p=Ie(),y=oi(),A=useMemo(function(){return Rf(i,p)},[i]),w=useMemo(function(){return Lf(i,s)},[i]);return React.createElement(kt.Provider,{value:w},React.createElement(Ht.Provider,{value:A},React.createElement(Et.Provider,{value:y},o)))},Ti=function(t){var i=oi(),o={};Object.keys(t).length>0?Object.keys(t).forEach(function(ne){o[ne]=i[ne]}):o=i;var s=o,p=s.pristine,y=s.dirty,A=s.invalid,w=s.values,E=s.errors,F=s.touched,G=s.validating,te=s.submitting;return React.createElement("pre",null,React.createElement("code",null,JSON.stringify({pristine:p,dirty:y,invalid:A,values:w,errors:E,touched:F,validating:G,submitting:te},null,2)))},Nf=function(t){var i=t.initialStep,o=t.multistepApiRef,s=Ie(),p=s.getValues,y=s.validate,A=s.screenValid,w=(0,d.useState)(new Map),E=Q(w,1),F=E[0],G=(0,d.useRef)(0),te=Ge({current:i,steps:[],goal:null}),ne=Q(te,3),se=ne[0],ye=ne[1],ge=ne[2],Ae=(0,d.useState)(function(){var Be=function(){var Ue=ge(),We=Ue.current,Je=F.get(We);return Je},ze={getState:function(){return ge()},getCurrentStep:Be,getStep:function(Ue){return F.get(Ue)},getNumberOfSteps:function(){return F.size},next:function(){if(y(),A()){var Ue=Be(),We=Ue.getNext,Je=We(),et=typeof Je=="function"?Je(p()):Je;et&&ye(function($e){return j(j({},$e),{},{current:et})})}},back:function(){var Ue=Be(),We=Ue.getPrevious,Je=We(),et=typeof Je=="function"?Je(p()):Je;et&&ye(function($e){return j(j({},$e),{},{current:et})})},setCurrent:function(Ue){if(Ue){var We=F.get(Ue).index;We<Be().index?ye(function(Je){return j(j({},Je),{},{current:Ue,goal:null})}):ye(function(Je){return j(j({},Je),{},{goal:Ue})})}},register:function(Ue,We,Je){Je?(G.current=G.current+1,F.set(Ue,j(j({},We),{},{index:G.current}))):ye(function(et){return j(j({},et),{},{steps:Array.from(F.keys())})})},deregister:function(Ue){F.delete(Ue),G.current=G.current-1,ye(function(We){return j(j({},We),{},{steps:Array.from(F.keys())})})}};return o&&(o.current=ze),ze}),me=Q(Ae,1),Te=me[0],He=function(ze){return d.createElement($.Provider,{value:Te},d.createElement(z.Provider,{value:se},ze))};return j(j(j({},Te),se),{},{render:He})};function Bf(){return(0,d.useContext)(z)}function mo(){return(0,d.useContext)($)}var Ia=function(t){var i=t.step,o=t.next,s=t.previous,p=t.relevant,y=oi(),A=y.values,w=Bf(),E=w.current,F=w.goal,G=mo(),te=G.register,ne=G.deregister,se=G.next,ye=i===E,ge=p?p(A):!0,Ae=(0,d.useRef)(o),me=(0,d.useRef)(s),Te=(0,d.useRef)();Ae.current=o,me.current=s,Te.current=p,(0,d.useState)(function(){te(i,{name:i,getNext:function(){return Ae.current},getPrevious:function(){return me.current}},!0)}),(0,d.useEffect)(function(){return te(i,{name:i,getNext:function(){return Ae.current},getPrevious:function(){return me.current}}),function(){ne(i)}},[i]),(0,d.useEffect)(function(){F&&ye&&F!==i&&se()},[F,ye]);var He=function(ze){return d.createElement(Se.Provider,{value:{relevant:function(Ue){return Te.current?Te.current(Ue):!0},multistep:!0}},ye&&ge?ze:null)};return{isCurrent:ye,isRelevant:ge,step:i,render:He}};function Uf(r){var t=r.children,i=C(r,["children"]),o=Nf(i),s=o.render,p=C(o,["render"]);return s(typeof t=="function"?t(p):t)}Uf.Step=function(t){var i=t.children,o=C(t,["children"]),s=Ia(o),p=s.render;return p(i)};var Cd=function(t){var i=t.field,o=useContext(kt),s=o.fieldMap,p=Ie(),y=p.getFullField,A=p.getOptions,w=y(i),E=A(),F=E.schema,G=ae(w),te=pt.get(F,G);if(!te)return null;var ne=re(i,te),se=ne.props,ye=ne.componentType,ge=s[ye];return React.createElement(ge,D({field:i},se))},Od=function(){var t=Ie(),i=t.getOptions,o=i(),s=o.schema;return React.createElement(Xt,{schema:s})},Td=function(t){return React.forwardRef(function(i,o){return React.createElement(Ht.Consumer,null,function(s){return React.createElement(t,D({formApi:s,ref:o},i))})})},Gl=function(t){return React.forwardRef(function(i,o){return React.createElement(Et.Consumer,null,function(s){return React.createElement(t,D({formState:s,ref:o},i))})})},$l=function(t,i){return{getValue:function(){return t.getValue(i)},setValue:function(s){return t.setValue(i,s)},getTouched:function(){return t.getTouched(i)},setTouched:function(s){return t.setTouched(i,s)},getError:function(){return t.getError(i)},setError:function(s){return t.setError(i,s)},reset:function(){return t.resetField(i)},validate:function(){return t.validateField(i)},exists:function(){return t.fieldExists(i)},getDirty:function(){return t.getDirty(i)},getPristine:function(){return t.getPristine(i)},getFieldState:function(){return t.getField(i).fieldApi.getFieldState()}}};function Kl(r){var t=Ie(),i=useMemo(function(){return $l(t,r)},[r]);return i}function Yl(r){var t=Kl(r),i=Ie(),o=React.useState(),s=Q(o,2),p=s[1],y=React.useCallback(function(){return p({})},[]);return vt(function(){var A=function(E){E===r&&y()};return i.emitter.on("field",A),function(){i.emitter.removeListener("field",A)}},[]),vt(function(){y()},[]),t.getFieldState()||{}}var jf=function(t){return function(i){return function(o){var s=Yl(t);return React.createElement(i,D({fieldState:s},o))}}},ws=function(t){return function(i){return function(o){var s=Kl(t);return React.createElement(i,D({fieldApi:s},o))}}},Ss=function(t){var i=t.value,o=t.forwardedRef,s=t.children,p=C(t,["value","forwardedRef","children"]);return React.createElement("option",D({ref:o,value:i,key:i},p),s)},Jl=null,Fa=a(80150),As=a(89356),Wi=a(63263),Vf=a(30699),xo=a(58377),Vn=a(28834),Xl=a(13038),Wf=a(32752),ka=a(44341);function Es(r,t,i){return t in r?ka(r,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[t]=i,r}function si(r,t){var i=As(r);if(Wi){var o=Wi(r);t&&(o=Vf(o).call(o,function(s){return xo(r,s).enumerable})),i.push.apply(i,o)}return i}function cr(r){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};if(t%2){var o;Vn(o=si(Object(i),!0)).call(o,function(p){Es(r,p,i[p])})}else if(Xl)Wf(r,Xl(i));else{var s;Vn(s=si(Object(i))).call(s,function(p){ka(r,p,xo(i,p))})}}return r}var li=a(28583),Hi=a.n(li),Cs=a(10240),zi=a.n(Cs),Pi=a(8575),Gi=a(51446),Os=a(19996),Ts=a(78363),Ql=a(95238),Ps=a(53592);function Is(r,t){(t==null||t>r.length)&&(t=r.length);for(var i=0,o=new Array(t);i<t;i++)o[i]=r[i];return o}function Fs(r,t){var i;if(!!r){if(typeof r=="string")return Is(r,t);var o=Ql(i=Object.prototype.toString.call(r)).call(i,8,-1);if(o==="Object"&&r.constructor&&(o=r.constructor.name),o==="Map"||o==="Set")return Ps(r);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return Is(r,t)}}function $i(r,t){var i=typeof Gi!="undefined"&&Os(r)||r["@@iterator"];if(!i){if(Ts(r)||(i=Fs(r))||t&&r&&typeof r.length=="number"){i&&(r=i);var o=0,s=function(){};return{s,n:function(){return o>=r.length?{done:!0}:{done:!1,value:r[o++]}},e:function(E){throw E},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
81
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var p=!0,y=!1,A;return{s:function(){i=i.call(
|
|
82
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rn(r
|
|
83
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pn(
|
|
80
|
+
`+ye)}else F[0]=te+" "+F[0]}function o(F,G){if(F[0]=(G.useColors?"%c":"")+G.namespace,!!G.useColors){var te="color: "+G.color,ne=0,se=0;F[0].replace(/%[a-zA-Z%]/g,function(ye){ye!=="%%"&&(ne++,ye==="%c"&&(se=ne))}),F.splice(se,0,te)}}var s=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function p(){var F;try{F=localStorage.getItem("debug")}catch(G){}return!F&&typeof process!="undefined"&&"env"in process&&(F={}.DEBUG),{namespaces:F||"",colors:s,useColors:!0,formatArgs:o}}function y(){return{namespaces:{}.DEBUG||"",colors:[6,2,3,4,5,1],useColors:!0,formatArgs:i}}function A(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,G=arguments.length>1?arguments[1]:void 0;return function(){for(var te=arguments.length,ne=new Array(te),se=0;se<te;se++)ne[se]=arguments[se];F&&ne.unshift(F);var ye=G.namespaces.split(",").map(function(Te){return Te[Te.length-1]==="*"?new RegExp("^"+Te.slice(0,Te.length-1)+".*$"):new RegExp("^"+Te+"$")}),ge=ye.some(function(Te){return Te.test(F)}),Ae={color:r(F,G.colors),namespace:F,useColors:G.useColors};if(!1)var me}}function w(F){return A(F,y())}function E(F){return A(F,p())}typeof process=="undefined"||process.type==="renderer"||process.browser===!0||process.__nwjs?t.exports=E:t.exports=w}),Pe=Me("informed:ObjMap "),rt=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return String.prototype.replace.call(r,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean)},Ze=function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",o=arguments.length>2?arguments[2]:void 0,s=String.prototype.replace.call(i,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(p,y){return p!=null?p[y]:p},r);return s===void 0||s===r?o:s},Xe=function(r){return".".concat(r).replace(/(.*)[.[].*/,"$1").replace(/\./,"")},ft=function(r){return r.replace(Xe(r),"").replace(/\./,"")},ht=function(r,i){var o=Xe(i),s=ft(i),p=o?Ze(r,o):r;return!!(p&&Object.hasOwnProperty.call(p,s.replace(/\[(.*)\]/,"$1")))},wt=function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",o=arguments.length>2?arguments[2]:void 0;String.prototype.replace.call(i,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(s,p,y,A){return y===A.length-1?(s[p]=o,s[p]):s[p]===void 0?(Number.isInteger(+A[y+1])?s[p]=[]:s[p]={},s[p]):(Number.isInteger(+A[y+1])&&!Array.isArray(s[p])&&(s[p]=[]),s[p])},r)},nt=function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",o=!1;return String.prototype.replace.call(i,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(s,p,y,A){return s===void 0?s:(y===A.length-1&&(delete s[p],o=!0),s[p])},r),o},ut=function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",o;return String.prototype.replace.call(i,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(s,p,y,A){return s===void 0?s:(y===A.length-1&&Array.isArray(s)&&(o=s.splice(p,1)),s[p])},r),o},mt=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=Object.keys(r);return i.map(function(o){return r[o]})},xt=function(r){var i=rt(r);return Number.isInteger(+i[i.length-1])},pt=function(){function t(){b(this,t)}return g(t,null,[{key:"empty",value:function(i){return mt(i).length===0}},{key:"get",value:function(i,o){var s=Ze(i,o);return s}},{key:"has",value:function(i,o){return ht(i,o)}},{key:"set",value:function(i,o,s){if(s!==void 0)Pe("SETTING",o,s),wt(i,o,s);else if(xt(o)&&t.get(i,o)!==void 0){Pe("Special case SETTING",o,"to undefined"),wt(i,o,void 0);var p=rt(o);p=p.slice(0,p.length-1),Mt(i,p)}else!xt(o)&&t.get(i,o)!==void 0&&(Pe("Special case REMOVING",o,"from object completley"),t.delete(i,o))}},{key:"delete",value:function(i,o){Pe("DELETE",o),xt(o)?(Pe("ARRAY",o),this.pullOut(i,o)):nt(i,o);var s=rt(o);s=s.slice(0,s.length-1),Mt(i,s)}},{key:"pullOut",value:function(i,o){var s=rt(o),p=s[s.length-1];s=s.slice(0,s.length-1),Pe("Pulling out:",s,"index",p);var y=Ze(i,s);Pe("Array",y),Array.isArray(y)&&ut(y,p),Mt(i,s)}}]),t}();function Mt(t,r){if(r.length!==0){var i=Ze(t,r);(Array.isArray(i)?i.every(function(o){return o==null}):JSON.stringify(i)==="{}")&&nt(t,r),Mt(t,r.slice(0,r.length-1))}}var kt=d.createContext({register:function(){},deregister:function(){},setValue:function(){},setTouched:function(){},setError:function(){},update:function(){},getField:function(){},expectRemoval:function(){},getInitialValue:function(){},getSavedValue:function(){}}),Et=d.createContext({}),Ht=d.createContext({getFullField:function(){},getValues:function(){},getOptions:function(){return{}},setInitialValue:function(){},getInitialValue:function(){},getDerrivedValue:function(){},getSavedValue:function(){},removeSavedState:function(){}}),jt=d.createContext(),Vt=d.createContext(),St=d.createContext(),Dt=d.createContext(),ve=d.createContext(),z=d.createContext(),$=d.createContext(),Se=d.createContext();function Ie(){var t=(0,d.useContext)(Ht);return t}function Ge(t){var r=(0,d.useRef)(),i=(0,d.useRef)(!0),o=(0,d.useState)(t),s=Q(o,2),p=s[0],y=s[1];r.current=p;var A=function(F){r.current=F,i.current&&y(F)},w=function(){return r.current};return(0,d.useEffect)(function(){return function(){i.current=!1}},[]),[p,A,w]}var Ke=function(r){return r.type&&r.type.name?r.type.name:r.displayName||r.name||"Component"},P=function(r){var i={};if(r.inner){if(r.inner.length===0){pt.set(i,r.path,r.message);return}var o=Fe(r.inner),s;try{for(o.s();!(s=o.n()).done;){var p=s.value;pt.get(i,p.path)||pt.set(i,p.path,p.message)}}catch(y){o.e(y)}finally{o.f()}}return i},Re=function(r,i){try{r.validateSync(i,{abortEarly:!1})}catch(s){var o=P(s);return o}},K=function(r){if(r.inner){if(r.inner.length===0)return;var i=r.inner[0];return i.message}},T=function(r,i){try{r.validateSync(i,{abortEarly:!1})}catch(o){return K(o)}},O=function(r,i){r(i);var o={};return r.errors&&r.errors.forEach(function(s){var p=s.message,y=s.dataPath,A=s.keyword,w=s.params,E=y;A==="required"&&(E="".concat(E,".").concat(w.missingProperty)),E=E.replace(".",""),pt.set(o,E,p)}),o},le=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(r){var i=Math.random()*16|0,o=r=="x"?i:i&3|8;return o.toString(16)})},N=function(r,i){var o;return function(){for(var p=arguments.length,y=new Array(p),A=0;A<p;A++)y[A]=arguments[A];var w=function(){clearTimeout(o),r.apply(void 0,y)};clearTimeout(o),o=setTimeout(w,i)}},re=function(r,i,o){var s=i["ui:control"],p=i["informed:props"],y=i["input:props"],A=i["ui:before"],w=i["ui:after"],E=i.oneOf,F=i.items,G=i.enum,te=i.title,ne=i.minimum,se=i.maximum,ye=i.minLength,ge=i.maxLength,Ae=i.pattern,me=i.type,Te=i.properties,He=le();y&&y.id&&(He=y.id);var Be={componentType:s,field:o?"".concat(o,".").concat(r):r,type:me,uiBefore:A,uiAfter:w,properties:me==="object"?Te:void 0,items:me==="array"?F:void 0,props:j(j({label:te,id:He,min:ne,max:se,minLength:ye,maxLength:ge,pattern:Ae},p),y)};if(E){var ze=i.oneOf.map(function(We){var Je=We["input:props"],et=Je===void 0?{}:Je;return j({value:We.const,label:We.title},et)});Be.props.options=ze}if(G){var De=i.enum.map(function(We){return{value:We,label:We}});Be.props.options=De}if(F&&F.oneOf){var Ue=F.oneOf.map(function(We){var Je=We["input:props"],et=Je===void 0?{}:Je;return j({value:We.const,label:We.title},et)});Be.props.options=Ue}return Be},de=function(r,i,o){if(!r||i)return[];var s=r.properties,p=s===void 0?{}:s,y=r.allOf,A=r.propertyOrder,w=A===void 0?[]:A;if(Object.keys(p).length>0){var E=Object.keys(p).sort(function(F,G){var te=w.indexOf(F),ne=w.indexOf(G);return(te>-1?te:w.length+1)-(ne>-1?ne:w.length+1)}).map(function(F){var G=p[F],te=re(F,G,o);return te});return y&&E.push({componentType:"conditionals",allOf:y}),E}return[]},ae=function(r){var i=r.replace(/\./g,".properties.").replace(/\[/g,".itmes[");return i="properties.".concat(i),i},pe=function(r,i){if(typeof r=="string")return r.split("").map(function(o){return o==="#"?/\d/:o==="*"?/[\w]/:o});if(typeof r=="function")return r(i);if(Array.isArray(r))return r;throw new Error("Formatter must be string, array, or function")},Ee=function(r,i){for(var o=0,s=-1,p=!0;p&&o<r.length;)r[o]==i[o]?s=o:p=!1,o=o+1;return s},je=function(r,i){if(!r)return{val:r,offset:0};var o="".concat(r),s=pe(i,o),p=s.findIndex(function(ge){return typeof ge!="string"}),y=s.length-Y(s).reverse().findIndex(function(ge){return typeof ge!="string"}),A=[],w=o.split(""),E=0,F=0,G=Ee(s.slice(0,p),w.slice(0,p));G>-1&&(E=G+1,A=A.concat(s.slice(0,G+1)),F=G+1),G<0&&(A=A.concat(s.slice(0,p)),F=p);for(var te=F;te<s.length;te++){var ne=s[te];if(E!=w.length){var se=w[E];if(typeof ne=="function")A.push(ne(se)),E=E+1;else{var ye=typeof ne=="string"?ne===se:ne.test(se);ye&&typeof ne=="string"?(A.push(ne),E=E+1):!ye&&typeof ne=="string"?E!=w.length&&A.push(ne):ye&&typeof ne!="string"?(A.push(se),E=E+1):!ye&&typeof ne!="string"&&(E=E+1,te=te-1)}}else if(typeof ne=="string"&&te>=y)A.push(ne);else break}return{value:A.join(""),offset:o?A.length-o.length:0}},Ve=function(r,i){var o,s,p=new Intl.NumberFormat(r,i),y=new Intl.NumberFormat(r),A=(o=(s=y.formatToParts(.1).find(function(ge){var Ae=ge.type;return Ae==="decimal"}))===null||s===void 0?void 0:s.value)!==null&&o!==void 0?o:".";function w(ge,Ae){return ge instanceof RegExp&&Ae instanceof RegExp&&ge.source===Ae.source&&ge.global===Ae.global&&ge.ignoreCase===Ae.ignoreCase&&ge.multiline===Ae.multiline}function E(ge,Ae){for(var me=ge.length;me--;)if(Ae(ge[me]))return me;return-1}function F(ge,Ae,me){var Te=Y(ge);return Array.isArray(me)?Te.splice.apply(Te,[Ae,0].concat(Y(me))):Te.splice(Ae,0,me),Te}function G(ge){return"".concat(ge).replace(/\D/g,"")}function te(ge){return"".concat(ge).split(A).map(function(Ae){return G(Ae)}).join(".")}function ne(ge){if(typeof ge=="number")return ge;var Ae=parseFloat(te(ge));return Number.isNaN(Ae)?void 0:Ae}function se(ge){var Ae=te(ge),me="".concat(Ae).split(".")[1],Te=p.formatToParts(Number(Ae));me==="0"&&Te.push({type:"decimal",value:A},{type:"fraction",value:me});var He=Te.reduce(function(De,Ue){var We=Ue.type,Je=Ue.value;return["decimal","fraction"].includes(We)&&me==null?De:["integer","fraction"].includes(We)?[].concat(Y(De),Y(Je.split("").filter(function(et,$e){return We==="fraction"?$e<me.length:!0}).map(function(){return/\d/}))):We==="currency"?[].concat(Y(De),Y(Je.split(""))):[].concat(Y(De),[Je])},[]),Be=E(He,function(De){return w(De,/\d/)});He.indexOf(A)===-1&&"".concat(ge).indexOf(A)!==-1&&(He=F(He,Be+1,[A,"[]"]),Be+=2);var ze=He.slice(Be+1).join("");return He=[].concat(Y(He.slice(0,Be+1)),[ze]),He}var ye=function(Ae){if(Ae!=null)return ne(Ae)};return{formatter:se,parser:ye}},Qe=Object.freeze({__proto__:null,getChildDisplayName:Ke,yupToFormErrors:P,validateYupSchema:Re,yupToFormError:K,validateYupField:T,validateAjvSchema:O,uuidv4:le,debounce:N,computeFieldFromProperty:re,computeFieldsFromSchema:de,getSchemaPathFromJsonPath:ae,informedFormat:je,createIntlNumberFormatter:Ve}),vt=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?d.useLayoutEffect:d.useEffect,At=function(r){var i=r.value,o=r.inputRef,s=r.maintainCursor,p=s===void 0?!0:s,y=Ge(0),A=Q(y,3),w=A[0],E=A[1],F=A[2],G=Ge(0),te=Q(G,3),ne=te[0],se=te[1],ye=te[2];return vt(function(){if(o.current!=null&&F()){var ge=F()+ye();ye()!=0&&p?o.current.setSelectionRange(ge+1,ge+1):p&&o.current.setSelectionRange(ge,ge)}},[i]),{setCursorOffset:se,setCursor:E,cursor:w,getCursor:F,cursorOffset:ne}},Bt=function(r,i){var o=(0,d.useRef)(!0),s=o.current;(0,d.useEffect)(function(){if(s)o.current=!1;else return r()},i)},Pt=Me("informed:useField "),hn=function(r,i,o,s,p){if(r!=null){if(p)return p(r);if(i)return i(r);if(o&&!s){var y=je(r,o);return y.value}return r}},Nr=function(r,i,o,s){if(i&&o)return i(r);if(s){var p=je(r,s);return p.value}return r},Cr=function(r,i,o){var s=o.required;if(r||i)return function(p,y){if(i)return T(i,p);if(r)return r(p,y)};if(s)return function(p){return vn(p,s)}},Si=function(r){var i=r.fieldType,o=r.setValue,s=r.onChange,p=r.multiple,y=r.ref,A=function(E){return o(E)};return(i==="text"||i==="textArea"||i==="number")&&(A=function(E){return o(E.target.value,E)}),i==="select"&&(A=function(){var E=Array.from(y.current).filter(function(F){return F.selected}).map(function(F){return F.value});o(p?E:E[0]||"")}),i==="checkbox"&&(A=function(E){o(E.target.checked),s&&s(E)}),function(w){A(w)}},Gr=function(r){var i=r.setTouched,o=r.onBlur;return function(s){i(!0),o&&o(s)}},Vi=function(r){var i=r.fieldType,o=r.maskedValue,s=r.multiple,p=r.value;switch(i){case"text":case"number":return!o&&o!==0?"":o;case"textArea":return o||"";case"select":return p||(s?[]:"");case"checkbox":return!!p;default:return p}},Nn=function(r){switch(r){case"text":return r;case"number":return r;case"checkbox":return r;default:return}},vn=function(r,i){if(i&&(r==null||r===""))return typeof i=="string"?i:"This field is required"};function Tn(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,i=t.field,o=t.validate,s=t.asyncValidate,p=t.validationSchema,y=t.mask,A=t.maskWithCursorOffset,w=t.format,E=t.parse,F=t.formatter,G=t.parser,te=t.initialValue,ne=t.validateOnChange,se=t.validateOnBlur,ye=t.validateOnMount,ge=t.asyncValidateOnBlur,Ae=t.maskOnBlur,me=t.allowEmptyString,Te=t.onValueChange,He=t.notify,Be=t.keepState,ze=t.maintainCursor,De=t.debug,Ue=t.shadow,We=t.step,Je=t.fieldType,et=t.multiple,$e=t.onChange,gt=t.onBlur,Nt=t.formController,zt=t.relevant,or=t.required,kr=t.keepStateIfRelevant,Er=t.initialize,Qr=t.formatterDependencies,br=Qr===void 0?[]:Qr,Dr=C(t,["field","validate","asyncValidate","validationSchema","mask","maskWithCursorOffset","format","parse","formatter","parser","initialValue","validateOnChange","validateOnBlur","validateOnMount","asyncValidateOnBlur","maskOnBlur","allowEmptyString","onValueChange","notify","keepState","maintainCursor","debug","shadow","step","fieldType","multiple","onChange","onBlur","formController","relevant","required","keepStateIfRelevant","initialize","formatterDependencies"]),An=(0,d.useState)(le()),Yt=Q(An,1),Rt=Yt[0],Ut=(0,d.useContext)(kt),sr=(0,d.useContext)(Se),on=sr||kr,yr=Ie(),gs=(0,d.useRef)(),Ll=(0,d.useRef)(!0),ho=(0,d.useRef)(),Ui=(0,d.useRef)(!1),Dl=function(){return!Ui.current},If=function(){return Ui.current};Nt&&(Ut=Nt.updater,yr=Nt.getFormApi());var wi=Cr(o,p,{required:or}),Nl=(0,d.useState)(function(){return Ut.getInitialValue(i)}),Qy=Q(Nl,1),Zy=Qy[0],Ff=Ut.getSavedValue(i),kf,xh;(Be||on)&&Ff?(Pt("Setting field ".concat(Ed,"'s kept state"),Ff),kf=Ff.value,xh=Ff.touched,yr.removeSavedState(Ed)):te!=null?kf=te:kf=Zy;var _y=Ge(hn(kf,y,F,G,Er)),fd=Q(_y,3),Bl=fd[0],cd=fd[1],qy=fd[2],em=Ge(ye?wi(Bl):void 0),dd=Q(em,3),bh=dd[0],wh=dd[1],tm=dd[2],rm=Ge(xh),pd=Q(rm,3),Sh=pd[0],nm=pd[1],Ah=pd[2],im=(0,d.useState)(function(){return Nr(Bl,w,E,F)}),Eh=Q(im,2),hd=Eh[0],vd=Eh[1],Ch=(0,d.useRef)();Ch.current=hd;var Oh=(0,d.useRef)(te),vo=(0,d.useRef)(i),Th=(0,d.useRef)();Oh.current=te,vo.current=i;var am=(0,d.useRef)(null),ji=d.useMemo(function(){return r||am},[]),gd=At({value:Bl,inputRef:ji,maintainCursor:!!ze}),yd=gd.getCursor,om=gd.setCursor,md=gd.setCursorOffset,sm=function(){return!0},xd=function(lr){var sn=zt||sm,Ln=yr.getFullField(vo.current)||vo.current,Jt={path:Ln,parentPath:Ln.replace(/(.*)[.[].*/,"$1"),get:function(Dn,Vl){return pt.get(Dn,Vl)}};return sr&&sr.relevant?sn(lr,Jt)&&sr.relevant(lr,Jt):sn(lr,Jt)},lm=Ge(xd(yr.getValues())),bd=Q(lm,3),Mf=bd[0],um=bd[1],Ph=bd[2],fm=function(lr){return sr&&sr.relevant?sr.relevant(lr):!0},cm=function(){var lr=xd(yr.getValues()),sn=Ph();return lr!=sn&&um(lr),lr};(0,d.useEffect)(function(){!Mf&&!Be&&gs.current.reset()},[Mf]);var ii=function(){return Ue?yr.getDerrivedValue(i):qy()},Ul=function(lr){var sn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ln=sn.preventUpdate;We&&yr.getStep()<We?(Pt("Setting ".concat(i,"'s error to undefined as we are not at that step")),wh(void 0),Ut.setError(Rt,void 0,!Ln)):(Pt("Setting ".concat(i,"'s error to ").concat(lr)),wh(lr),Ut.setError(Rt,lr,!Ln))},wd=function(lr,sn){var Ln=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Jt=lr;Ui.current=!0,Pt("Setting ".concat(i," to ").concat(Jt)),Er&&(Jt=Er(Jt));var go=yr.getOptions(),Dn=Jt;if(Jt===""&&!me&&!Ln.allowEmptyString&&!go.allowEmptyStrings&&(Jt=void 0),(t.type==="number"||Je==="number")&&Jt!==void 0&&(Jt=+Jt),sn&&sn.target&&sn.target.selectionStart&&om(sn.target.selectionStart),y&&!Ae&&(Dn=y(Jt,yd()),Jt=y(Jt,yd())),A&&!Ae){var Vl=A(Jt,yd());Dn=Vl.value,Jt=Vl.value,md(Vl.offset)}if(w&&E&&(Jt=E(Jt),Dn=w(Jt)),F){var Ih=je(Jt,F);md(Ih.offset),Dn=Ih.value,Jt=Dn}G&&(Jt=Jt!=null?G(Jt):Jt),wi&&ne&&!Ln.initial&&(Pt("Validating after change ".concat(i," ").concat(Jt)),Ul(wi(Jt,yr.getValues()))),cd(Jt),vd(Dn),Te&&Te(Jt),Ut.setValue(Rt,Jt,!Ln.preventUpdate)};Bt(function(){gs.current.setValue(Ch.current)},Y(br));var Sd=function(lr,sn){var Ln=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Jt=Ln.preventUpdate;if(Pt("Field ".concat(i," has been touched")),wi&&se&&!sn&&lr&&(Pt("Validating after blur ".concat(i," ").concat(ii())),Ul(wi(ii(),yr.getValues()))),s&&ge&&!sn&&lr&&(Pt("Validating async after blur ".concat(i," ").concat(ii())),s(ii(),yr.getValues())),y&&Ae){var go=y(ii());cd(go),vd(go),Te&&Te(go),Ut.setValue(Rt,go,!Jt)}if(A&&Ae){var Dn=A(ii());md(Dn.offset),cd(Dn.value),vd(Dn.value),Te&&Te(Dn.value),Ut.setValue(Rt,Dn.value,!Jt)}nm(lr),Ut.setTouched(Rt,lr,!Jt)},dm=function(){var lr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},sn=lr.preventUpdate,Ln=hn(Oh.current||Ut.getInitialValue(vo.current),y,F,G,Er);wd(Ln,null,{initial:!0,preventUpdate:sn}),Ul(ye?wi(Ln):void 0,{preventUpdate:sn}),Sd(void 0,!0,{preventUpdate:sn}),Ui.current=!1},pm=function(lr){wi&&(Pt("Field validating ".concat(i," ").concat(ii())),Ul(wi(ii(),lr||yr.getValues())))},hm=function(lr){s&&(Pt("Field async validating ".concat(i," ").concat(ii())),s(ii(),lr||yr.getValues()))},Ad={setValue:wd,setTouched:Sd,setError:Ul,reset:dm,validate:pm,asyncValidate:hm,getValue:ii,getTouched:Ah,getError:tm,getIsRelevant:Ph,getDirty:If,getPristine:Dl,getFieldState:function(){return{value:ii(),touched:Ah(),dirty:If(),pristine:Dl()}},relevant:xd,multistepRelevant:fm,checkRelevant:cm};gs.current=Ad;var jl={value:Bl,error:bh,touched:Sh,maskedValue:hd,isRelevant:Mf,dirty:Ui.current,pristine:!Ui.current};Ue&&(jl={error:bh,touched:Sh}),Pt("Render",yr.getFullField(i),jl),vt(function(){var qr=yr.getFullField(vo.current);return Pt("Register",Rt,vo.current),ho.current={field:qr,fieldId:Rt,fieldApi:Ad,fieldState:jl,notify:He,keepState:Be,inMultistep:on,shadow:Ue},Ut.register(Rt,ho.current),function(){var lr=yr.getFullField(vo.current);Pt("Deregister",Rt,lr),Ut.deregister(Rt)}},[]),(0,d.useEffect)(function(){var qr=yr.getFullField(i);return Ll.current?Ll.current=!1:(Pt("Update",i,on),ho.current.field=qr,Ut.update(Rt,ho.current,Th.current)),function(){Th.current=qr}},[i]),vt(function(){De&&ji&&(ji.current.style.border="5px solid orange",setTimeout(function(){ji.current.style.borderWidth="2px",ji.current.style.borderStyle="inset",ji.current.style.borderColor="initial",ji.current.style.borderImage="initial"},500))});var vm=[].concat(Y(Object.values(jl)),Y(Object.values(t)),Y(Object.values(Dr))),gm=function(lr){return(0,d.useMemo)(function(){return Mf?lr:null},Y(vm))},Ed=i,ym=Si({fieldType:Je,setValue:wd,onChange:$e,multiple:et,ref:ji}),mm=Gr({setTouched:Sd,onBlur:gt}),xm=Vi({fieldType:Je,maskedValue:hd,multiple:et,value:Bl}),bm=Nn(Je);return{fieldState:jl,fieldApi:Ad,render:gm,ref:ji,userProps:j(j({},Dr),{},{multiple:et,onChange:$e,onBlur:gt,id:Dr.id||Rt}),informed:j({name:Ed,multiple:et,onChange:ym,onBlur:mm,value:xm,ref:ji,type:bm,id:Dr.id||Rt},Dr)}}var $r=function(r){var i=d.forwardRef(function(o,s){var p=Tn(o,s),y=p.fieldState,A=p.fieldApi,w=p.render,E=p.ref,F=p.userProps;return w(d.createElement(r,D({fieldApi:A,fieldState:y,field:o.field,forwardedRef:E,debug:o.debug,type:o.type},F)))});return i.displayName="asField(".concat(Ke(r),")"),i},Ai=Me("informed:Text "),Ei=function(r){var i=r.fieldApi,o=r.fieldState,s=C(r,["fieldApi","fieldState"]),p=o.maskedValue,y=i.setValue,A=i.setTouched,w=s.onChange,E=s.onBlur,F=s.field,G=s.initialValue,te=s.forwardedRef,ne=s.debug,se=s.label,ye=s.title,ge=s.id,Ae=C(s,["onChange","onBlur","field","initialValue","forwardedRef","debug","label","title","id"]);return Ai("Render",F),vt(function(){ne&&te&&(te.current.style.background="red",setTimeout(function(){te.current.style.background="white"},500))}),d.createElement(d.Fragment,null,se?d.createElement("label",{htmlFor:ge}," ",se," "):null,d.createElement("input",D({},Ae,{id:ge,name:F,ref:te,value:!p&&p!==0?"":p,onChange:function(Te){y(Te.target.value,Te),w&&w(Te)},onBlur:function(Te){A(!0),E&&E(Te)}})))},en=$r(Ei),gn=function(r){var i=r.fieldApi,o=r.fieldState,s=C(r,["fieldApi","fieldState"]),p=o.maskedValue,y=i.setValue,A=i.setTouched,w=s.onChange,E=s.onBlur,F=s.field,G=s.initialValue,te=s.forwardedRef,ne=s.debug,se=s.label,ye=s.id,ge=C(s,["onChange","onBlur","field","initialValue","forwardedRef","debug","label","id"]);return vt(function(){ne&&te&&(te.current.style.background="red",setTimeout(function(){te.current.style.background="white"},500))}),d.createElement(d.Fragment,null,se?d.createElement("label",{htmlFor:ye}," ",se," "):null,d.createElement("textarea",D({},ge,{id:ye,name:F,ref:te,value:p||"",onChange:function(me){y(me.target.value,me),w&&w(me)},onBlur:function(me){A(!0),E&&E(me)}})))},Bn=$r(gn),Un=Me("informed:Select "),yn=function(r){var i=r.fieldApi,o=r.fieldState,s=C(r,["fieldApi","fieldState"]),p=o.value,y=i.setTouched,A=s.onChange,w=s.onBlur,E=s.field,F=s.initialValue,G=s.options,te=s.children,ne=s.forwardedRef,se=s.debug,ye=s.multiple,ge=s.label,Ae=s.id,me=C(s,["onChange","onBlur","field","initialValue","options","children","forwardedRef","debug","multiple","label","id"]),Te=(0,d.useRef)(),He=function(ze){var De=Array.from((ne||Te).current).filter(function(Ue){return Ue.selected}).map(function(Ue){return Ue.value});i.setValue(ye?De:De[0]||""),A&&ze&&A(ze)};return vt(function(){se&&ne&&(ne.current.style.background="red",setTimeout(function(){ne.current.style.background="white"},500))}),Un("Render",E,p),d.createElement(d.Fragment,null,ge?d.createElement("label",{htmlFor:Ae}," ",ge," "):null,d.createElement("select",D({},me,{id:Ae,multiple:ye,name:E,ref:ne||Te,value:p||(ye?[]:""),onChange:He,onBlur:function(ze){y(!0),w&&w(ze)}}),G?G.map(function(Be){return d.createElement("option",{key:Be.value,value:Be.value,disabled:Be.disabled},Be.label)}):te))},Jn=$r(yn),Ci=function(r){var i=r.fieldApi,o=r.fieldState,s=C(r,["fieldApi","fieldState"]),p=o.value,y=i.setValue,A=i.setTouched,w=s.onChange,E=s.onBlur,F=s.field,G=s.initialValue,te=s.debug,ne=s.forwardedRef,se=s.id,ye=s.label,ge=C(s,["onChange","onBlur","field","initialValue","debug","forwardedRef","id","label"]);return d.createElement(d.Fragment,null,ye?d.createElement("label",{htmlFor:se}," ",ye," "):null,d.createElement("input",D({},ge,{id:se,name:F,ref:ne,checked:!!p,onChange:function(me){y(me.target.checked),w&&w(me)},onBlur:function(me){A(!0),E&&E(me)},type:"checkbox"})))},Br=$r(Ci),Kr=function(r){return d.forwardRef(function(i,o){return d.createElement(jt.Consumer,null,function(s){var p=s.radioGroupApi,y=s.radioGroupState;return d.createElement(r,D({radioGroupApi:p,radioGroupState:y,ref:o},i))})})},Xn=function(r){var i=r.radioGroupApi,o=r.radioGroupState,s=C(r,["radioGroupApi","radioGroupState"]),p=o.value,y=i.setValue,A=i.setTouched,w=i.onChange,E=i.onBlur,F=s.value,G=s.onChange,te=s.onBlur,ne=s.field,se=s.initialValue,ye=s.forwardedRef,ge=C(s,["value","onChange","onBlur","field","initialValue","forwardedRef"]);return d.createElement("input",D({},ge,{name:ne,ref:ye,value:F,checked:p===F,onChange:function(me){!me.target.checked||(y(F),G&&G(me),w&&w(me))},onBlur:function(me){A(!0),te&&te(me),E&&E(me)},type:"radio"}))},fr=Kr(Xn),Ot=function(t){q(i,t);var r=_(i);function i(){return b(this,i),r.apply(this,arguments)}return g(i,[{key:"render",value:function(){var s=this.props,p=s.options,y=s.children;return d.createElement(jt.Provider,{value:this.groupContext},p?p.map(function(A){return d.createElement("label",{key:A.value},A.label," ",d.createElement(fr,{value:A.value}))}):y)}},{key:"groupContext",get:function(){return{radioGroupApi:j(j({},this.props.fieldApi),{},{onChange:this.props.onChange,onBlur:this.props.onBlur}),radioGroupState:this.props.fieldState}}}]),i}(d.Component),ai=$r(Ot);function Oi(){return(0,d.useContext)(St)}var En=function(){var r=Oi(),i=r.add;return d.createElement("button",{onClick:function(){i()},type:"button"},"Add")};function Zt(){return(0,d.useContext)(Dt)}var jn=function(){var r=Zt(),i=r.remove;return d.createElement("button",{onClick:function(){i()},type:"button"},"Remove")},Qn=Me("informed:useArrayField "),fa=function(r){var i=r.field,o=r.initialValue,s=r.validate,p=r.arrayFieldApiRef,y=C(r,["field","initialValue","validate","arrayFieldApiRef"]),A=Ie(),w=(0,d.useState)(new Map),E=Q(w,1),F=E[0],G=(0,d.useContext)(kt),te=A.getFullField(i),ne=G.getInitialValue(i)||o||[],se=A.getSavedValue(te)&&A.getSavedValue(te).value,ye=Ge(se||ne),ge=Q(ye,3),Ae=ge[0],me=ge[1],Te=ge[2],He=Ae?Ae.map(function(){return le()}):[],Be=Ge(He),ze=Q(Be,3),De=ze[0],Ue=ze[1],We=ze[2],Je=(0,d.useMemo)(function(){return function(Yt,Rt){var Ut=We()==null?0:We().length;return s?s(Yt,Ut,Rt):void 0}}),et=Tn(j({field:i,validate:s?Je:void 0,shadow:!0},y)),$e=et.fieldApi;vt(function(){var Yt=function(Ut){Ut!==te&&(Qn("".concat(te," changed")),RegExp("".concat(te,"\\[[0-9]+\\]")).test(Ut)&&$e.validate())};return A.emitter.on("value",Yt),function(){A.emitter.removeListener("value",Yt)}},[i]);var gt=function(Rt){Qn("EXPECTING REMOVAL OF","".concat(i,"[").concat(Rt,"] and ").concat(i,"[").concat(De.length-1,"]")),G.expectRemoval("".concat(i,"[").concat(Rt,"]")),G.expectRemoval("".concat(i,"[").concat(De.length-1,"]"));var Ut=De.slice(0,Rt).concat(De.slice(Rt+1,De.length));Ue(Ut);var sr=Te(),on=sr.slice(0,Rt).concat(sr.slice(Rt+1,sr.length));me(on)},Nt=function(Rt,Ut){Qn("Swapping","".concat(i,"[").concat(Rt,"] and ").concat(i,"[").concat(Ut,"]"));var sr=Y(De);De[Rt]&&De[Ut]?(sr[Rt]=De[Ut],sr[Ut]=De[Rt]):console.warn("Attempted to swap ".concat(Rt," with ").concat(Ut," but one of them does not exist :(")),Ue(sr)},zt=function(){De.push(le()),Ue(Y(De))},or=function(Rt){De.push(le()),Ue(Y(De));var Ut=Y(Te());Ut[De.length-1]=Rt,me(Ut)},kr=function(){var Rt=G.getInitialValue(i)||o||[];me(Rt);var Ut=Rt?Rt.map(function(){return le()}):[];Ue(Ut)},Er=De.map(function(Yt,Rt){var Ut={remove:function(){return gt(Rt)}},sr={initialValue:Ae&&Ae[Rt],key:Yt,field:"".concat(i,"[").concat(Rt,"]"),index:Rt};return j(j({arrayFieldItemApi:Ut,arrayFieldItemState:sr},Ut),sr)}),Qr={add:zt,swap:Nt,addWithInitialValue:or,reset:kr};p&&(p.current=Qr);var br={fields:Er,field:i},Dr=j(j({},G),{},{register:function(Rt,Ut){F.set(Rt,Ut);for(var sr=arguments.length,on=new Array(sr>2?sr-2:0),yr=2;yr<sr;yr++)on[yr-2]=arguments[yr];G.register.apply(G,[Rt,Ut].concat(on))},deregister:function(Rt){F.delete(Rt);for(var Ut=arguments.length,sr=new Array(Ut>1?Ut-1:0),on=1;on<Ut;on++)sr[on-1]=arguments[on];G.deregister.apply(G,[Rt].concat(sr))},getInitialValue:function(Rt){if(RegExp("".concat(te,"\\[[0-9]+\\]")).test(Rt)){var Ut=Rt.replace(i,""),sr=pt.get(Te(),Ut);return Qn("Resetting ".concat(Ut," to ").concat(sr)),sr}return G.getInitialValue(Rt)}}),An=function(Rt){return d.createElement(kt.Provider,{value:Dr},d.createElement(St.Provider,{value:Qr},d.createElement(Vt.Provider,{value:br},Rt)))};return{render:An,add:zt,swap:Nt,addWithInitialValue:or,fields:Er,arrayFieldState:br,arrayFieldApi:Qr,field:i}},at=function(r,i){return j(j({},i),{},{getValue:function(s){return i.getValue("".concat(r,".").concat(s))},getTouched:function(s){return i.getTouched("".concat(r,".").concat(s))},getError:function(s){return i.getError("".concat(r,".").concat(s))},setValue:function(s,p){return i.setValue("".concat(r,".").concat(s),p)},setTouched:function(s,p){return i.setTouched("".concat(r,".").concat(s),p)},setError:function(s,p){return i.setError("".concat(r,".").concat(s),p)},getInitialValue:function(s){return i.getInitialValue("".concat(r,".").concat(s))},getSavedValue:function(s){return i.getSavedValue("".concat(r,".").concat(s))},getFullField:function(s){return"".concat(i.getFullField(r),".").concat(s)}})};function Lt(t){var r=Ie(),i=(0,d.useMemo)(function(){return at(t,r)},[t]);return i}function oi(){var t=(0,d.useContext)(Et);return t}var ue=function(r){var i=r.when,o=r.children,s=oi(),p=i(s);return p?o:null},Oe=function(r){var i=r.relevant,o=r.field,s=C(r,["relevant","field"]),p=Ie();if(i){var y=p.getFullField(o),A={path:y,parentPath:y.replace(/(.*)[.[].*/,"$1"),get:function(F,G){return pt.get(F,G)}},w=function(F){var G=F.values;return i(G,A)};return d.createElement(ue,{when:w},d.createElement(qe,D({field:o},s)))}else return d.createElement(qe,D({field:o},s))},qe=function(r){var i=r.children,o=C(r,["children"]),s=fa(o),p=s.render,y=s.arrayFieldState,A=s.arrayFieldApi,w=s.field;return p(typeof i=="function"?i(j(j({field:w,arrayFieldApi:A,arrayFieldState:y},A),y)):i)},st=function(r){var i=r.arrayFieldItemState,o=r.arrayFieldItemApi,s=r.children,p=(0,d.useContext)(kt),y=Ie(),A=(0,d.useState)(0),w=Q(A,2),E=w[0],F=w[1],G=(0,d.useState)(new Map),te=Q(G,1),ne=te[0],se=i.field,ye=Lt(se),ge=function(){var De=y.getState(),Ue=De.values,We=De.errors,Je=De.touched,et={values:pt.get(Ue,se),errors:pt.get(We,se),touched:pt.get(Je,se)};return et};(0,d.useEffect)(function(){var ze=function(Ue){var We=Ue.slice(0,Ue.lastIndexOf("[")!=-1?Ue.lastIndexOf("]")+1:Ue.length);We===se&&F(Math.random())};return y.emitter.on("value",ze),function(){y.emitter.removeListener("value",ze)}},[se]);var Ae=function(){ne.forEach(function(De){De.fieldApi.reset()})},me=ge(),Te=j(j({},p),{},{register:function(De,Ue,We){ne.set(De,Ue),p.register(De,Ue,We)},deregister:function(De){ne.delete(De);for(var Ue=arguments.length,We=new Array(Ue>1?Ue-1:0),Je=1;Je<Ue;Je++)We[Je-1]=arguments[Je];p.deregister.apply(p,[De].concat(We))}}),He=j(j(j({},o),ye),{},{reset:Ae}),Be=j(j({},i),me);return typeof s=="function"?d.createElement(kt.Provider,{value:Te},d.createElement(Dt.Provider,{value:He},d.createElement(ve.Provider,{value:Be},s(j(j({arrayFieldItemApi:He,arrayFieldItemState:Be},He),Be))))):d.createElement(kt.Provider,{value:Te},d.createElement(Dt.Provider,{value:He},d.createElement(ve.Provider,{value:Be},s)))};Oe.Items=function(t){var r=t.children,i=(0,d.useContext)(Vt),o=i.fields;return o.map(function(s){var p=s.arrayFieldItemState,y=s.arrayFieldItemApi,A=p.key;return d.createElement(st,{key:A,arrayFieldItemApi:y,arrayFieldItemState:p},r)})};var lt=function(r){var i=r.components,o=(0,d.useContext)(kt),s=o.fieldMap;return i?i.map(function(p,y){var A=p["ui:control"],w=s[A];return d.createElement(w,{key:"ui-comp-".concat(y)})}):null},Kt=Me("informed:FormFields "),Xt=function t(r){var i=r.schema,o=r.prefix,s=r.onlyValidateSchema,p=(0,d.useContext)(kt),y=p.fieldMap,A=(0,d.useMemo)(function(){var w=de(i,s,o),E=w.map(function(F,G){var te=F.field,ne=F.props,se=F.type,ye=F.properties,ge=F.items,Ae=F.componentType,me=F.uiBefore,Te=F.uiAfter,He=F.allOf,Be=y[Ae];return Kt("Rendering Field",te,F),!Be&&se==="object"&&ye?d.createElement(t,{schema:F,prefix:te,key:"ScheamField-".concat(G)}):!Be&&se==="array"&&ge?d.createElement(Or,D({key:"ScheamField-".concat(G),field:te,items:ge,uiBefore:me,uiAfter:Te},ne)):Be&&Ae==="array"&&ge&&se==="array"?d.createElement(Be,D({key:"ScheamField-".concat(G),field:te,items:ge,uiBefore:me,uiAfter:Te},ne)):Ae==="conditionals"?He.map(function(ze){var De=ze.then,Ue=ze.if.properties,We=function(et){var $e=et.values;return Object.keys(Ue).every(function(gt){var Nt=Ue[gt];return $e[gt]===Nt.const})};return d.createElement(ue,{key:"ScheamField-".concat(G),when:We},d.createElement(t,{schema:De}))}):Be?d.createElement(Be,D({key:"ScheamField-".concat(G),field:te},ne)):null});return E},[i,o]);return A},Or=function(r){var i=r.field,o=r.items,s=r.uiBefore,p=r.uiAfter,y=C(r,["field","items","uiBefore","uiAfter"]);return d.createElement(Oe,D({field:i},y),d.createElement(lt,{components:s}),d.createElement(Oe.Items,null,function(A){var w=A.field;return d.createElement(d.Fragment,null,d.createElement(lt,{components:o["ui:before"]}),d.createElement(Xt,{schema:o,prefix:w}),d.createElement(lt,{components:o["ui:after"]}))}),d.createElement(lt,{components:p}))},Tr={select:Jn,input:en,textarea:Bn,checkbox:Br,radio:ai,add:En,remove:jn,array:Or},_t=Me("informed:Controller "),Wl=function(r,i){var o=Object.keys(i).find(function(p){return r.includes(p)});if(!!o){var s=r.slice(0,o.length);return s===o}},tn=function(){},ys=function(){function t(){var r=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};b(this,t),this.options=i,this.subscriptions=new Map;var o=i.ajv,s=i.schema,p=i.fieldMap;this.ajv=o?new o({allErrors:!0}):null,this.ajvValidate=o?this.ajv.compile(s):null,this.fieldMap=p||Tr,this.fieldsById=new Map,this.fieldsByName={get:function(A){var w;return r.fieldsById.forEach(function(E){E&&E.field===A&&(w=E)}),w}},this.onScreen={},this.expectedRemovals={},this.pulledOut={},this.savedValues={},this.state={pristine:!0,dirty:!1,invalid:!1,submits:0,step:0,validating:0,submitting:!1,values:{},errors:{},touched:{}},this.dummyField={fieldApi:{setValue:tn,setTouched:tn,setError:tn,reset:tn,validate:tn,getValue:tn,getTouched:tn,getError:tn,getFieldState:tn,checkRelevant:tn,getPristine:tn,getDirty:tn}},this.deregister=this.deregister.bind(this),this.register=this.register.bind(this),this.getValue=this.getValue.bind(this),this.getTouched=this.getTouched.bind(this),this.getError=this.getError.bind(this),this.getErrors=this.getErrors.bind(this),this.setValue=this.setValue.bind(this),this.getValues=this.getValues.bind(this),this.getStep=this.getStep.bind(this),this.setStep=this.setStep.bind(this),this.back=this.back.bind(this),this.next=this.next.bind(this),this.setCurrent=this.setCurrent.bind(this),this.setTouched=this.setTouched.bind(this),this.setError=this.setError.bind(this),this.setFormError=this.setFormError.bind(this),this.submitForm=this.submitForm.bind(this),this.reset=this.reset.bind(this),this.update=this.update.bind(this),this.validate=this.validate.bind(this),this.screenValid=this.screenValid.bind(this),this.keyDown=this.keyDown.bind(this),this.getField=this.getField.bind(this),this.getInitialValue=this.getInitialValue.bind(this),this.setInitialValue=this.setInitialValue.bind(this),this.getOptions=this.getOptions.bind(this),this.getFormState=this.getFormState.bind(this),this.expectRemoval=this.expectRemoval.bind(this),this.getSavedValue=this.getSavedValue.bind(this),this.removeSavedState=this.removeSavedState.bind(this),this.getDerrivedValue=this.getDerrivedValue.bind(this),this.setValues=this.setValues.bind(this),this.resetField=this.resetField.bind(this),this.fieldExists=this.fieldExists.bind(this),this.validateField=this.validateField.bind(this),this.notify=this.notify.bind(this),this.validating=this.validating.bind(this),this.validated=this.validated.bind(this),this.getDirty=this.getDirty.bind(this),this.getPristine=this.getPristine.bind(this),this.on=this.on.bind(this),this.emit=this.emit.bind(this),this.removeListener=this.removeListener.bind(this),this.updater={register:this.register,deregister:this.deregister,getField:this.getField,update:this.update,fieldMap:this.fieldMap,setValue:function(A,w){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,F=r.fieldsById.get(A);F.shadow||pt.set(r.state.values,F.field,F.fieldApi.getValue()),F.fieldApi.relevant(r.state.values)||pt.delete(r.state.values,F.field),r.fieldsById.forEach(function(G){var te=G.fieldApi.checkRelevant();(!G.fieldApi.multistepRelevant(r.state.values)||!te&&!G.keepState)&&(pt.delete(r.state.values,G.field),pt.delete(r.state.touched,G.field),pt.delete(r.state.errors,G.field))}),E&&(r.emit("change"),r.emit("field",F.field),r.emit("value",F.field,w))},setTouched:function(A,w){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,F=r.fieldsById.get(A);!F.shadow&&F.fieldApi.getIsRelevant()&&pt.set(r.state.touched,F.field,F.fieldApi.getTouched()),F.shadow&&F.fieldApi.getError()!=null&&F.fieldApi.relevant(r.state.values)&&pt.set(r.state.touched,F.field,F.fieldApi.getTouched()),E&&(r.emit("change"),r.emit("field",F.field))},setError:function(A,w){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,F=r.fieldsById.get(A);!F.shadow&&F.fieldApi.getIsRelevant()&&pt.set(r.state.errors,F.field,F.fieldApi.getError());var G=pt.get(r.state.errors,F.field);(F.shadow&&F.fieldApi.getError()!=null&&F.fieldApi.relevant(r.state.values)||F.shadow&&F.fieldApi.getError()===void 0&&F.fieldApi.relevant(r.state.values)&&typeof G=="string")&&pt.set(r.state.errors,F.field,F.fieldApi.getError()),E&&(r.emit("change"),r.emit("field",F.field))},expectRemoval:this.expectRemoval,getInitialValue:this.getInitialValue,getSavedValue:this.getSavedValue},this.formApi={setValue:this.setValue,setTouched:this.setTouched,setError:this.setError,setFormError:this.setFormError,setValues:this.setValues,setInitialValue:this.setInitialValue,getValue:this.getValue,getTouched:this.getTouched,getError:this.getError,reset:this.reset,submitForm:this.submitForm,getState:this.getFormState,getValues:this.getValues,getFullField:this.getFullField,fieldExists:this.fieldExists,getInitialValue:this.getInitialValue,validate:this.validate,validateField:this.validateField,screenValid:this.screenValid,resetField:this.resetField,getOptions:this.getOptions,emitter:this,getSavedValue:this.getSavedValue,removeSavedState:this.removeSavedState,getDerrivedValue:this.getDerrivedValue,getStep:this.getStep,setStep:this.setStep,next:this.next,back:this.back,setCurrent:this.setCurrent,validated:this.validated,validating:this.validating,getDirty:this.getDirty,getPristine:this.getPristine,getField:this.getField},this.on("value",function(y){delete r.state.error,r.notify(y)})}return g(t,[{key:"emit",value:function(i){for(var o=arguments.length,s=new Array(o>1?o-1:0),p=1;p<o;p++)s[p-1]=arguments[p];var y=this.subscriptions.get(i);y&&y.forEach(function(A){return A.apply(void 0,s)})}},{key:"on",value:function(i,o){this.subscriptions.get(i)||this.subscriptions.set(i,new Set);var s=this.subscriptions.get(i);s.add(o)}},{key:"removeListener",value:function(i,o){var s=this.subscriptions.get(i);s.delete(o)}},{key:"setOptions",value:function(i){this.options=i}},{key:"setValue",value:function(i,o,s){this.getField(i).fieldApi.setValue(o,null,j({allowEmptyString:this.options.allowEmptyStrings},s))}},{key:"setTouched",value:function(i,o){this.getField(i).fieldApi.setTouched(o)}},{key:"setError",value:function(i,o){this.getField(i).fieldApi.setError(o)}},{key:"setFormError",value:function(i){this.state.error=i,this.emit("change")}},{key:"validating",value:function(){this.state.validating=this.state.validating+1,this.emit("change")}},{key:"validated",value:function(i,o){if(this.state.validating=this.state.validating-1,this.getError(i)||this.setError(i,o),this.state.validating>0){this.emit("change");return}this.state.submitting&&(this.valid()?(_t("Submit",this.state),this.emit("submit")):(_t("Submit",this.state),this.emit("failure")),this.state.submitting=!1),this.emit("change")}},{key:"setStep",value:function(i){this.state.step=i,this.emit("change")}},{key:"setCurrent",value:function(i){this.state.Current=i,this.emit("change")}},{key:"back",value:function(i){this.state.step=this.state.step-1,this.state.Current=i,this.emit("change")}},{key:"next",value:function(i){this.validate(),this.screenValid()&&(this.state.step=this.state.step+1,this.state.Current=i),this.emit("change")}},{key:"setInitialValue",value:function(i,o){pt.set(this.options.initialValues,i,o)}},{key:"getFormState",value:function(){return _t("Returning form state"),j(j({},this.state),{},{pristine:this.pristine(),dirty:this.dirty(),invalid:this.invalid()})}},{key:"getFormApi",value:function(){return this.formApi}},{key:"getDerrivedValue",value:function(i){var o=this.getValues();return pt.get(o,i)}},{key:"getValue",value:function(i){var o=this.getField(i).fieldApi.getValue();return _t("Getting value for",i,o),o}},{key:"getTouched",value:function(i){var o=this.getField(i).fieldApi.getTouched();return _t("Getting touched for",i,o),o}},{key:"getError",value:function(i){var o=this.getField(i).fieldApi.getError();return _t("Getting error for",i,o),o}},{key:"getDirty",value:function(i){var o=this.getField(i).fieldApi.getDirty();return _t("Getting dirty for",i,o),o}},{key:"getPristine",value:function(i){var o=this.getField(i).fieldApi.getPristine();return _t("Getting pristine for",i,o),o}},{key:"getValues",value:function(){return _t("Gettings values"),this.state.values}},{key:"getAllTouched",value:function(){return _t("Gettings touched"),this.state.touched}},{key:"getErrors",value:function(){return _t("Gettings errors"),this.state.errors}},{key:"getOptions",value:function(){return this.options}},{key:"getStep",value:function(){return this.state.step}},{key:"getSavedValue",value:function(i){var o=this.fieldsByName.get(i);return o&&o.shadow?pt.get(this.savedValues,"shadow-".concat(i)):pt.get(this.savedValues,i)}},{key:"removeSavedState",value:function(i){var o=this.fieldsByName.get(i);return o&&o.shadow?pt.delete(this.savedValues,"shadow-".concat(i)):pt.delete(this.savedValues,i)}},{key:"getFullField",value:function(i){return i}},{key:"getInitialValue",value:function(i){return pt.get(this.options.initialValues,i)}},{key:"getField",value:function(i){_t("Getting Field",i);var o=this.fieldsByName.get(i);return o||(console.warn("Attempting to get field ".concat(i," but it does not exist")),this.dummyField)}},{key:"notify",value:function(i){var o=this,s=this.getField(i);s&&s.notify&&s.notify.forEach(function(p){var y=".".concat(i),A="".concat(y.replace(/(.*)[.[].*/,"$1"),".").concat(p).slice(1),w=o.getField(A);w&&(_t("Notifying",w.field),w.fieldApi.validate(),w.fieldApi.checkRelevant())})}},{key:"validateField",value:function(i){this.getField(i).fieldApi.validate()}},{key:"resetField",value:function(i){this.getField(i).fieldApi.reset()}},{key:"fieldExists",value:function(i){return this.fieldsByName.get(i)!=null}},{key:"valid",value:function(){var i=this.getErrors();return!!(pt.empty(i)&&!this.state.error)}},{key:"screenValid",value:function(){var i=Object.entries(this.onScreen).some(function(o){var s=Q(o,2),p=s[1];return p.fieldApi.getError()});return!i}},{key:"invalid",value:function(){var i=this.getErrors();return!!(!pt.empty(i)||this.state.error)}},{key:"pristine",value:function(){var i=!0;return this.fieldsById.forEach(function(o){o.fieldApi.getPristine()||(i=!1)}),i}},{key:"dirty",value:function(){return!this.pristine()}},{key:"reset",value:function(){_t("Resetting"),this.fieldsById.forEach(function(i){i.fieldApi.reset({preventUpdate:!0})}),this.emit("reset"),this.emit("change")}},{key:"setValues",value:function(i){_t("Setting values"),this.fieldsById.forEach(function(o){var s=pt.get(i,o.field);s!==void 0&&o.fieldApi.setValue(s,null,{preventUpdate:!0})}),this.emit("change")}},{key:"validate",value:function(){var i=this;_t("Validating all fields");var o=this.getValues();if(this.options.validationSchema){var s=Re(this.options.validationSchema,o);this.fieldsById.forEach(function(w){if(pt.has(s,w.field)){var E=pt.get(s,w.field);i.setError(w.field,E)}else i.setError(w.field,void 0)})}if(this.options.schema&&this.options.ajv){var p=O(this.ajvValidate,o);this.fieldsById.forEach(function(w){if(pt.has(p,w.field)){var E=pt.get(p,w.field);i.setError(w.field,E)}else i.setError(w.field,void 0)})}if(this.fieldsById.forEach(function(w){w.fieldApi.validate(o),w.fieldApi.setTouched(!0,!0)}),this.options.validate){var y=this.options.validate(o);this.setFormError(y)}if(this.options.validateFields){var A=this.options.validateFields(o);this.fieldsById.forEach(function(w){if(pt.has(A,w.field)){var E=pt.get(A,w.field);i.setError(w.field,E)}})}}},{key:"asyncValidate",value:function(){_t("Async Validating all fields");var i=this.getValues();this.fieldsById.forEach(function(o){o.fieldApi.asyncValidate(i)})}},{key:"keyDown",value:function(i){if(i.keyCode==13&&this.options.preventEnter)return i.preventDefault(i),!1}},{key:"submitForm",value:function(i){this.state.submits=this.state.submits+1,this.state.submitting=!0,!this.options.dontPreventDefault&&i&&i.preventDefault(i),this.validate(),this.emit("change"),this.asyncValidate(),!(this.state.validating>0)&&(this.valid()?(_t("Submit",this.state),this.emit("submit")):(_t("Submit",this.state),this.emit("failure")),this.state.submitting=!1,this.emit("change"))}},{key:"mount",value:function(){var i=this;this.fieldsById.forEach(function(o){i.emit("field",o.field)})}},{key:"register",value:function(i,o,s){var p=o.field,y=o.state;_t("Register ID:",i,"Name:",p,y,"Initial",s);var A=p.slice(0,p.lastIndexOf("[")!=-1?p.lastIndexOf("]")+1:p.length),w;this.fieldsById.forEach(function(E,F){E&&E.field===p&&(w=F)}),w&&(o.keepState||o.inMultistep)?(_t("Already Registered",p),this.fieldsById.delete(w)):w&&(!o.keepState||!o.inMultistep)&&console.warn("Check to make sure you have not registered two fields with the fieldName",p),_t("Fields Registered",this.fieldsById.size),this.onScreen[i]=o,this.fieldsById.set(i,o),_t("clearing expected removal",A),delete this.expectedRemovals[A],delete this.pulledOut[A],!o.shadow&&(this.updater.setValue(i,o.fieldApi.getValue(),!1),this.updater.setError(i,o.fieldApi.getError(),!1),this.updater.setTouched(i,o.fieldApi.getTouched(),!1),s||this.emit("change"),this.emit("field",p))}},{key:"deregister",value:function(i){var o=this.fieldsById.get(i),s=o.field;_t("Deregister",i,s),delete this.onScreen[i];var p=Wl(s,this.expectedRemovals),y=s.slice(0,s.lastIndexOf("[")!=-1?s.lastIndexOf("]")+1:s.length);(o.keepState||o.inMultistep)&&!p&&(_t("Saving field ".concat(s,"'s value"),o.fieldApi.getFieldState()),o.shadow?pt.set(this.savedValues,"shadow-".concat(s),o.fieldApi.getFieldState()):pt.set(this.savedValues,s,o.fieldApi.getFieldState())),(p||!o.keepState&&!o.inMultistep||!o.fieldApi.getIsRelevant()&&!o.keepState)&&(_t("Removing field",s),this.fieldsById.delete(i),p||(pt.delete(this.state.values,s),pt.delete(this.state.touched,s),pt.delete(this.state.errors,s),o.shadow?pt.delete(this.savedValues,"shadow-".concat(s)):pt.delete(this.savedValues,s)),p&&this.pulledOut[y]&&(_t("Pulling out",s,"with magic value",y),pt.pullOut(this.state.values,y),pt.pullOut(this.state.touched,y),pt.pullOut(this.state.errors,y),pt.pullOut(this.savedValues,y),delete this.pulledOut[y])),this.emit("change")}},{key:"expectRemoval",value:function(i){_t("Expecting removal of",i),this.expectedRemovals[i]=!0,this.pulledOut[i]=!0}},{key:"update",value:function(i,o,s){_t("Update",i,o.field,s,o.fieldState.value);var p=o.fieldApi.getValue(),y=o.fieldApi.getError(),A=o.fieldApi.getTouched(),w=this.fieldsByName.get(s);s&&!w&&(pt.set(this.state.values,s),pt.set(this.state.errors,s),pt.set(this.state.touched,s)),pt.set(this.state.values,o.field,p),pt.set(this.state.errors,o.field,y),pt.set(this.state.touched,o.field,A),this.emit("change")}}]),t}(),yo=Me("informed:FormProvider "),ms=function(r){var i=r.children,o=r.formApi,s=r.formController,p=r.formState,y=C(r,["children","formApi","formController","formState"]);if(yo("Render FormProvider"),o)return yo("Render FormProvider with given values"),d.createElement(kt.Provider,{value:s.updater},d.createElement(Ht.Provider,{value:o},d.createElement(Et.Provider,{value:p},i)));yo("Render FormProvider with generated values");var A=bs(y);return d.createElement(kt.Provider,{value:A.formController.updater},d.createElement(Ht.Provider,{value:A.formApi},d.createElement(Et.Provider,{value:A.formState},i)))},xs=Me("informed:useForm "),bs=function(r){var i=r.dontPreventDefault,o=r.initialValues,s=r.validate,p=r.validateFields,y=r.allowEmptyStrings,A=r.preventEnter,w=r.getApi,E=r.apiRef,F=r.onChange,G=r.onReset,te=r.onSubmit,ne=r.onValueChange,se=r.onSubmitFailure,ye=r.validationSchema,ge=r.schema,Ae=r.ajv,me=r.fieldMap,Te=r.onlyValidateSchema,He=C(r,["dontPreventDefault","initialValues","validate","validateFields","allowEmptyStrings","preventEnter","getApi","apiRef","onChange","onReset","onSubmit","onValueChange","onSubmitFailure","validationSchema","schema","ajv","fieldMap","onlyValidateSchema"]);xs("Render useForm");var Be=(0,d.useMemo)(function(){return{dontPreventDefault:i,initialValues:o,validate:s,validateFields:p,allowEmptyStrings:y,preventEnter:A,validationSchema:ye,schema:ge,ajv:Ae,fieldMap:me}},[i,o,s,p,y,A,ye,ge,Ae,me]),ze=(0,d.useState)(function(){return new ys(Be)}),De=Q(ze,1),Ue=De[0];(0,d.useEffect)(function(){Ue.setOptions(Be)},[Be]),vt(function(){Ue.mount()},[]);var We=(0,d.useState)(function(){return Ue.getFormState()}),Je=Q(We,2),et=Je[0],$e=Je[1];vt(function(){var kr=function(){return F&&F(Ue.getFormState())},Er=function(){return G&&G()},Qr=function(){return te&&te(Ue.getFormState().values)},br=function(){return ne&&ne(Ue.getFormState().values)},Dr=function(){return se&&se(Ue.getFormState().errors)};return Ue.on("change",kr),Ue.on("reset",Er),Ue.on("submit",Qr),Ue.on("value",br),Ue.on("failure",Dr),function(){Ue.removeListener("change",kr),Ue.removeListener("reset",Er),Ue.removeListener("submit",Qr),Ue.removeListener("value",br),Ue.removeListener("failure",Dr)}},[F,G,te,ne,se]),(0,d.useState)(function(){var kr=function(){xs("Setting form state"),$e(Ue.getFormState())};Ue.on("change",kr),w&&w(Ue.getFormApi()),E&&(E.current=Ue.getFormApi())});var gt=(0,d.useState)(function(){return Ue.getFormApi()}),Nt=Q(gt,1),zt=Nt[0],or=function(Er){return d.createElement(ms,{formApi:zt,formState:et,formController:Ue},d.createElement(d.Fragment,null,Er||d.createElement(Xt,{schema:ge,onlyValidateSchema:Te})))};return{formApi:zt,formState:et,formController:Ue,render:or,userProps:He}},Hl=Me("informed:Form "),zl=function(r){var i=r.children,o=r.render,s=r.component,p=C(r,["children","render","component"]);Hl("Render FORM");var y=bs(p),A=y.formApi,w=y.formController,E=y.formState,F=y.render,G=y.userProps,te=function(){var se={formState:E,formApi:A};return s?d.createElement(s,se,i):o?o(se):typeof i=="function"?i(se):i};return F(d.createElement("form",D({},G,{onReset:w.reset,onSubmit:w.submitForm,onKeyDown:w.keyDown}),te()))},Rf=function(r,i){return j(j({},i),{},{getValue:function(s){return i.getValue("".concat(r,".").concat(s))},getTouched:function(s){return i.getTouched("".concat(r,".").concat(s))},getError:function(s){return i.getError("".concat(r,".").concat(s))},setValue:function(s,p){return i.setValue("".concat(r,".").concat(s),p)},setTouched:function(s,p){return i.setTouched("".concat(r,".").concat(s),p)},setError:function(s,p){return i.setError("".concat(r,".").concat(s),p)},getInitialValue:function(s){return i.getInitialValue("".concat(r,".").concat(s))},getFullField:function(s){return"".concat(i.getFullField(r),".").concat(s)}})},Lf=function(r,i){var o=i.register,s=i.deregister,p=i.setValue,y=i.setTouched,A=i.setError,w=i.update,E=i.getField,F=i.expectRemoval,G=i.getInitialValue,te=i.fieldMap,ne=i.getSavedValue;return{register:function(ye){for(var ge=arguments.length,Ae=new Array(ge>1?ge-1:0),me=1;me<ge;me++)Ae[me-1]=arguments[me];return o.apply(void 0,["".concat(r,".").concat(ye)].concat(Ae))},deregister:function(ye){for(var ge=arguments.length,Ae=new Array(ge>1?ge-1:0),me=1;me<ge;me++)Ae[me-1]=arguments[me];return s.apply(void 0,["".concat(r,".").concat(ye)].concat(Ae))},update:function(ye){for(var ge=arguments.length,Ae=new Array(ge>1?ge-1:0),me=1;me<ge;me++)Ae[me-1]=arguments[me];return w.apply(void 0,["".concat(r,".").concat(ye)].concat(Ae))},setValue:function(ye){for(var ge=arguments.length,Ae=new Array(ge>1?ge-1:0),me=1;me<ge;me++)Ae[me-1]=arguments[me];return p.apply(void 0,["".concat(r,".").concat(ye)].concat(Ae))},setTouched:function(ye){for(var ge=arguments.length,Ae=new Array(ge>1?ge-1:0),me=1;me<ge;me++)Ae[me-1]=arguments[me];return y.apply(void 0,["".concat(r,".").concat(ye)].concat(Ae))},setError:function(ye){for(var ge=arguments.length,Ae=new Array(ge>1?ge-1:0),me=1;me<ge;me++)Ae[me-1]=arguments[me];return A.apply(void 0,["".concat(r,".").concat(ye)].concat(Ae))},getField:function(ye){for(var ge=arguments.length,Ae=new Array(ge>1?ge-1:0),me=1;me<ge;me++)Ae[me-1]=arguments[me];return E.apply(void 0,["".concat(r,".").concat(ye)].concat(Ae))},expectRemoval:function(ye){for(var ge=arguments.length,Ae=new Array(ge>1?ge-1:0),me=1;me<ge;me++)Ae[me-1]=arguments[me];return F.apply(void 0,["".concat(r,".").concat(ye)].concat(Ae))},getInitialValue:function(ye){return G("".concat(r,".").concat(ye))},getSavedValue:function(ye){return ne("".concat(r,".").concat(ye))},fieldMap:te}},Df=function(r){var i=r.scope,o=r.children,s=useContext(kt),p=Ie(),y=oi(),A=useMemo(function(){return Rf(i,p)},[i]),w=useMemo(function(){return Lf(i,s)},[i]);return React.createElement(kt.Provider,{value:w},React.createElement(Ht.Provider,{value:A},React.createElement(Et.Provider,{value:y},o)))},Ti=function(r){var i=oi(),o={};Object.keys(r).length>0?Object.keys(r).forEach(function(ne){o[ne]=i[ne]}):o=i;var s=o,p=s.pristine,y=s.dirty,A=s.invalid,w=s.values,E=s.errors,F=s.touched,G=s.validating,te=s.submitting;return React.createElement("pre",null,React.createElement("code",null,JSON.stringify({pristine:p,dirty:y,invalid:A,values:w,errors:E,touched:F,validating:G,submitting:te},null,2)))},Nf=function(r){var i=r.initialStep,o=r.multistepApiRef,s=Ie(),p=s.getValues,y=s.validate,A=s.screenValid,w=(0,d.useState)(new Map),E=Q(w,1),F=E[0],G=(0,d.useRef)(0),te=Ge({current:i,steps:[],goal:null}),ne=Q(te,3),se=ne[0],ye=ne[1],ge=ne[2],Ae=(0,d.useState)(function(){var Be=function(){var Ue=ge(),We=Ue.current,Je=F.get(We);return Je},ze={getState:function(){return ge()},getCurrentStep:Be,getStep:function(Ue){return F.get(Ue)},getNumberOfSteps:function(){return F.size},next:function(){if(y(),A()){var Ue=Be(),We=Ue.getNext,Je=We(),et=typeof Je=="function"?Je(p()):Je;et&&ye(function($e){return j(j({},$e),{},{current:et})})}},back:function(){var Ue=Be(),We=Ue.getPrevious,Je=We(),et=typeof Je=="function"?Je(p()):Je;et&&ye(function($e){return j(j({},$e),{},{current:et})})},setCurrent:function(Ue){if(Ue){var We=F.get(Ue).index;We<Be().index?ye(function(Je){return j(j({},Je),{},{current:Ue,goal:null})}):ye(function(Je){return j(j({},Je),{},{goal:Ue})})}},register:function(Ue,We,Je){Je?(G.current=G.current+1,F.set(Ue,j(j({},We),{},{index:G.current}))):ye(function(et){return j(j({},et),{},{steps:Array.from(F.keys())})})},deregister:function(Ue){F.delete(Ue),G.current=G.current-1,ye(function(We){return j(j({},We),{},{steps:Array.from(F.keys())})})}};return o&&(o.current=ze),ze}),me=Q(Ae,1),Te=me[0],He=function(ze){return d.createElement($.Provider,{value:Te},d.createElement(z.Provider,{value:se},ze))};return j(j(j({},Te),se),{},{render:He})};function Bf(){return(0,d.useContext)(z)}function mo(){return(0,d.useContext)($)}var Ia=function(r){var i=r.step,o=r.next,s=r.previous,p=r.relevant,y=oi(),A=y.values,w=Bf(),E=w.current,F=w.goal,G=mo(),te=G.register,ne=G.deregister,se=G.next,ye=i===E,ge=p?p(A):!0,Ae=(0,d.useRef)(o),me=(0,d.useRef)(s),Te=(0,d.useRef)();Ae.current=o,me.current=s,Te.current=p,(0,d.useState)(function(){te(i,{name:i,getNext:function(){return Ae.current},getPrevious:function(){return me.current}},!0)}),(0,d.useEffect)(function(){return te(i,{name:i,getNext:function(){return Ae.current},getPrevious:function(){return me.current}}),function(){ne(i)}},[i]),(0,d.useEffect)(function(){F&&ye&&F!==i&&se()},[F,ye]);var He=function(ze){return d.createElement(Se.Provider,{value:{relevant:function(Ue){return Te.current?Te.current(Ue):!0},multistep:!0}},ye&&ge?ze:null)};return{isCurrent:ye,isRelevant:ge,step:i,render:He}};function Uf(t){var r=t.children,i=C(t,["children"]),o=Nf(i),s=o.render,p=C(o,["render"]);return s(typeof r=="function"?r(p):r)}Uf.Step=function(r){var i=r.children,o=C(r,["children"]),s=Ia(o),p=s.render;return p(i)};var Cd=function(r){var i=r.field,o=useContext(kt),s=o.fieldMap,p=Ie(),y=p.getFullField,A=p.getOptions,w=y(i),E=A(),F=E.schema,G=ae(w),te=pt.get(F,G);if(!te)return null;var ne=re(i,te),se=ne.props,ye=ne.componentType,ge=s[ye];return React.createElement(ge,D({field:i},se))},Od=function(){var r=Ie(),i=r.getOptions,o=i(),s=o.schema;return React.createElement(Xt,{schema:s})},Td=function(r){return React.forwardRef(function(i,o){return React.createElement(Ht.Consumer,null,function(s){return React.createElement(r,D({formApi:s,ref:o},i))})})},Gl=function(r){return React.forwardRef(function(i,o){return React.createElement(Et.Consumer,null,function(s){return React.createElement(r,D({formState:s,ref:o},i))})})},$l=function(r,i){return{getValue:function(){return r.getValue(i)},setValue:function(s){return r.setValue(i,s)},getTouched:function(){return r.getTouched(i)},setTouched:function(s){return r.setTouched(i,s)},getError:function(){return r.getError(i)},setError:function(s){return r.setError(i,s)},reset:function(){return r.resetField(i)},validate:function(){return r.validateField(i)},exists:function(){return r.fieldExists(i)},getDirty:function(){return r.getDirty(i)},getPristine:function(){return r.getPristine(i)},getFieldState:function(){return r.getField(i).fieldApi.getFieldState()}}};function Kl(t){var r=Ie(),i=useMemo(function(){return $l(r,t)},[t]);return i}function Yl(t){var r=Kl(t),i=Ie(),o=React.useState(),s=Q(o,2),p=s[1],y=React.useCallback(function(){return p({})},[]);return vt(function(){var A=function(E){E===t&&y()};return i.emitter.on("field",A),function(){i.emitter.removeListener("field",A)}},[]),vt(function(){y()},[]),r.getFieldState()||{}}var jf=function(r){return function(i){return function(o){var s=Yl(r);return React.createElement(i,D({fieldState:s},o))}}},ws=function(r){return function(i){return function(o){var s=Kl(r);return React.createElement(i,D({fieldApi:s},o))}}},Ss=function(r){var i=r.value,o=r.forwardedRef,s=r.children,p=C(r,["value","forwardedRef","children"]);return React.createElement("option",D({ref:o,value:i,key:i},p),s)},Jl=null,Fa=a(80150),As=a(89356),Wi=a(63263),Vf=a(30699),xo=a(58377),Vn=a(28834),Xl=a(13038),Wf=a(32752),ka=a(44341);function Es(t,r,i){return r in t?ka(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function si(t,r){var i=As(t);if(Wi){var o=Wi(t);r&&(o=Vf(o).call(o,function(s){return xo(t,s).enumerable})),i.push.apply(i,o)}return i}function cr(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};if(r%2){var o;Vn(o=si(Object(i),!0)).call(o,function(p){Es(t,p,i[p])})}else if(Xl)Wf(t,Xl(i));else{var s;Vn(s=si(Object(i))).call(s,function(p){ka(t,p,xo(i,p))})}}return t}var li=a(28583),Hi=a.n(li),Cs=a(10240),zi=a.n(Cs),Pi=a(8575),Gi=a(51446),Os=a(19996),Ts=a(78363),Ql=a(95238),Ps=a(53592);function Is(t,r){(r==null||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function Fs(t,r){var i;if(!!t){if(typeof t=="string")return Is(t,r);var o=Ql(i=Object.prototype.toString.call(t)).call(i,8,-1);if(o==="Object"&&t.constructor&&(o=t.constructor.name),o==="Map"||o==="Set")return Ps(t);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return Is(t,r)}}function $i(t,r){var i=typeof Gi!="undefined"&&Os(t)||t["@@iterator"];if(!i){if(Ts(t)||(i=Fs(t))||r&&t&&typeof t.length=="number"){i&&(t=i);var o=0,s=function(){};return{s,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(E){throw E},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
81
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var p=!0,y=!1,A;return{s:function(){i=i.call(t)},n:function(){var E=i.next();return p=E.done,E},e:function(E){y=!0,A=E},f:function(){try{!p&&i.return!=null&&i.return()}finally{if(y)throw A}}}}var Hf=a(23882);function ir(t){return typeof Gi=="function"&&typeof Hf=="symbol"?ir=function(i){return typeof i}:ir=function(i){return i&&typeof Gi=="function"&&i.constructor===Gi&&i!==Gi.prototype?"symbol":typeof i},ir(t)}function zf(t){if(Ts(t))return t}function Zl(t,r){var i=t&&(typeof Gi!="undefined"&&Os(t)||t["@@iterator"]);if(i!=null){var o=[],s=!0,p=!1,y,A;try{for(i=i.call(t);!(s=(y=i.next()).done)&&(o.push(y.value),!(r&&o.length===r));s=!0);}catch(w){p=!0,A=w}finally{try{!s&&i.return!=null&&i.return()}finally{if(p)throw A}}return o}}function bo(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
82
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rn(t,r){return zf(t)||Zl(t,r)||Fs(t,r)||bo()}var _l=a(69798);function ql(t,r,i,o,s,p,y){try{var A=t[p](y),w=A.value}catch(E){i(E);return}A.done?r(w):_l.resolve(w).then(o,s)}function ks(t){return function(){var r=this,i=arguments;return new _l(function(o,s){var p=t.apply(r,i);function y(w){ql(p,o,s,y,A,"next",w)}function A(w){ql(p,o,s,y,A,"throw",w)}y(void 0)})}}var Ma=a(63109),ar=a.n(Ma),Gf=a(78580),wo=a.n(Gf),Ra=a(72119),eu=a.n(Ra),tu=a(66419),$f=a.n(tu),Ms=a(59340),La=a.n(Ms),Kf=a(2991),qt=a.n(Kf),ru=a(86902),Qt=a.n(ru),Yf=a(77766),Ct=a.n(Yf),ui=a(26295),Da=a.n(ui),Rs=a(20116),ln=a.n(Rs),fi=a(31905),Ki=a(92495),Na=a.n(Ki),Jf=a(93320),Ls=a.n(Jf),Xf=a(78718),So=a.n(Xf),Ds=a(23560),Zn=a.n(Ds),Wn=a(88996);function Ao(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function Ns(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),ka(t,o.key,o)}}function Bs(t,r,i){return r&&Ns(t.prototype,r),i&&Ns(t,i),t}var nu=a(83863),iu=a(79542),Us=a(24889);function Yi(t){return Yi=iu?Us:function(i){return i.__proto__||Us(i)},Yi(t)}function Ba(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&(t=Yi(t),t!==null););return t}function Ua(t,r,i){return typeof Reflect!="undefined"&&nu?Ua=nu:Ua=function(s,p,y){var A=Ba(s,p);if(!!A){var w=xo(A,p);return w.get?w.get.call(y):w.value}},Ua(t,r,i||t)}var au=a(189);function ja(t,r){return ja=iu||function(o,s){return o.__proto__=s,o},ja(t,r)}function Eo(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=au(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),r&&ja(t,r)}var Va=a(13535);function Co(){if(typeof Reflect=="undefined"||!Va||Va.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Va(Boolean,[],function(){})),!0}catch(t){return!1}}function Hn(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ou(t,r){return r&&(ir(r)==="object"||typeof r=="function")?r:Hn(t)}function js(t){var r=Co();return function(){var o=Yi(t),s;if(r){var p=Yi(this).constructor;s=Va(o,arguments,p)}else s=o.apply(this,arguments);return ou(this,s)}}var Vs=a(94473),su=a.n(Vs),lu=a(57514),Ws=a.n(lu),Qf=function(r){var i=function(p,y){return{name:p,value:y}};if(Zn()(r.prototype.set)||Zn()(r.prototype.get)||Zn()(r.prototype.getAll)||Zn()(r.prototype.has))return r;var o=function(s){Eo(y,s);var p=js(y);function y(A){var w;return Ao(this,y),w=p.call(this,A),w.entryList=[],w}return Bs(y,[{key:"append",value:function(w,E,F){return this.entryList.push(i(w,E)),Ua(Yi(y.prototype),"append",this).call(this,w,E,F)}},{key:"set",value:function(w,E){var F,G=i(w,E);this.entryList=ln()(F=this.entryList).call(F,function(te){return te.name!==w}),this.entryList.push(G)}},{key:"get",value:function(w){var E,F=su()(E=this.entryList).call(E,function(G){return G.name===w});return F===void 0?null:F}},{key:"getAll",value:function(w){var E,F;return qt()(E=ln()(F=this.entryList).call(F,function(G){return G.name===w})).call(E,function(G){return G.value})}},{key:"has",value:function(w){return this.entryList.some(function(E){return E.name===w})}}]),y}(r);return o};const Zf=Qf(Ws());function _f(t){if(Ts(t))return Is(t)}function Ji(t){if(typeof Gi!="undefined"&&Os(t)!=null||t["@@iterator"]!=null)return Ps(t)}function ca(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
83
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pn(t){return _f(t)||Ji(t)||Fs(t)||ca()}var Hs=a(3649),In=a.n(Hs),uu=a(88996),zs=uu.Buffer,Xi=function(r){return":/?#[]@!$&'()*+,;=".indexOf(r)>-1},Qi=function(r){return/^[a-z0-9\-._~]+$/i.test(r)};function Mr(t){var r,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.escape,s=arguments.length>2?arguments[2]:void 0;return typeof t=="number"&&(t=t.toString()),typeof t!="string"||!t.length||!o?t:s?JSON.parse(t):qt()(r=Pn(t)).call(r,function(p){var y,A;if(Qi(p)||Xi(p)&&o==="unsafe")return p;var w=qt()(y=qt()(A=zs.from(p).toJSON().data||[]).call(A,function(E){var F;return In()(F="0".concat(E.toString(16).toUpperCase())).call(F,-2)})).call(y,function(E){return"%".concat(E)}).join("");return w}).join("")}function _n(t){var r=t.value;return Array.isArray(r)?Ii(t):ir(r)==="object"?Oo(t):qf(t)}function Ii(t){var r=t.key,i=t.value,o=t.style,s=t.explode,p=t.escape,y=function(G){return Mr(G,{escape:p})};if(o==="simple")return qt()(i).call(i,function(F){return y(F)}).join(",");if(o==="label")return".".concat(qt()(i).call(i,function(F){return y(F)}).join("."));if(o==="matrix")return qt()(i).call(i,function(F){return y(F)}).reduce(function(F,G){var te;if(!F||s){var ne,se;return Ct()(ne=Ct()(se="".concat(F||"",";")).call(se,r,"=")).call(ne,G)}return Ct()(te="".concat(F,",")).call(te,G)},"");if(o==="form"){var A=s?"&".concat(r,"="):",";return qt()(i).call(i,function(F){return y(F)}).join(A)}if(o==="spaceDelimited"){var w=s?"".concat(r,"="):"";return qt()(i).call(i,function(F){return y(F)}).join(" ".concat(w))}if(o==="pipeDelimited"){var E=s?"".concat(r,"="):"";return qt()(i).call(i,function(F){return y(F)}).join("|".concat(E))}}function Oo(t){var r=t.key,i=t.value,o=t.style,s=t.explode,p=t.escape,y=function(E){return Mr(E,{escape:p})},A=Qt()(i);if(o==="simple")return A.reduce(function(w,E){var F,G,te,ne=y(i[E]),se=s?"=":",",ye=w?"".concat(w,","):"";return Ct()(F=Ct()(G=Ct()(te="".concat(ye)).call(te,E)).call(G,se)).call(F,ne)},"");if(o==="label")return A.reduce(function(w,E){var F,G,te,ne=y(i[E]),se=s?"=":".",ye=w?"".concat(w,"."):".";return Ct()(F=Ct()(G=Ct()(te="".concat(ye)).call(te,E)).call(G,se)).call(F,ne)},"");if(o==="matrix"&&s)return A.reduce(function(w,E){var F,G,te=y(i[E]),ne=w?"".concat(w,";"):";";return Ct()(F=Ct()(G="".concat(ne)).call(G,E,"=")).call(F,te)},"");if(o==="matrix")return A.reduce(function(w,E){var F,G,te=y(i[E]),ne=w?"".concat(w,","):";".concat(r,"=");return Ct()(F=Ct()(G="".concat(ne)).call(G,E,",")).call(F,te)},"");if(o==="form")return A.reduce(function(w,E){var F,G,te,ne,se=y(i[E]),ye=w?Ct()(F="".concat(w)).call(F,s?"&":","):"",ge=s?"=":",";return Ct()(G=Ct()(te=Ct()(ne="".concat(ye)).call(ne,E)).call(te,ge)).call(G,se)},"")}function qf(t){var r=t.key,i=t.value,o=t.style,s=t.escape,p=function(w){return Mr(w,{escape:s})};if(o==="simple")return p(i);if(o==="label")return".".concat(p(i));if(o==="matrix"){var y;return Ct()(y=";".concat(r,"=")).call(y,p(i))}if(o==="form")return p(i);if(o==="deepObject")return p(i,{},!0)}var To={serializeRes:fu,mergeInQueryOrForm:du};function Fi(t){return Po.apply(this,arguments)}function Po(){return Po=ks(ar().mark(function t(r){var i,o,s,p,y,A=arguments;return ar().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:if(i=A.length>1&&A[1]!==void 0?A[1]:{},ir(r)==="object"&&(i=r,r=i.url),i.headers=i.headers||{},To.mergeInQueryOrForm(i),i.headers&&Qt()(i.headers).forEach(function(F){var G=i.headers[F];typeof G=="string"&&(i.headers[F]=G.replace(/\n+/g," "))}),!i.requestInterceptor){E.next=12;break}return E.next=8,i.requestInterceptor(i);case 8:if(E.t0=E.sent,E.t0){E.next=11;break}E.t0=i;case 11:i=E.t0;case 12:return o=i.headers["content-type"]||i.headers["Content-Type"],/multipart\/form-data/i.test(o)&&(delete i.headers["content-type"],delete i.headers["Content-Type"]),E.prev=14,E.next=17,(i.userFetch||fetch)(i.url,i);case 17:return s=E.sent,E.next=20,To.serializeRes(s,r,i);case 20:if(s=E.sent,!i.responseInterceptor){E.next=28;break}return E.next=24,i.responseInterceptor(s);case 24:if(E.t1=E.sent,E.t1){E.next=27;break}E.t1=s;case 27:s=E.t1;case 28:E.next=39;break;case 30:if(E.prev=30,E.t2=E.catch(14),s){E.next=34;break}throw E.t2;case 34:throw p=new Error(s.statusText),p.status=s.status,p.statusCode=s.status,p.responseError=E.t2,p;case 39:if(s.ok){E.next=45;break}throw y=new Error(s.statusText),y.status=s.status,y.statusCode=s.status,y.response=s,y;case 45:return E.abrupt("return",s);case 46:case"end":return E.stop()}},t,null,[[14,30]])})),Po.apply(this,arguments)}var Gs=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return/(json|xml|yaml|text)\b/.test(r)};function Io(t,r){return r&&(r.indexOf("application/json")===0||r.indexOf("+json")>0)?JSON.parse(t):Ls().safeLoad(t)}function fu(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.loadSpec,s=o===void 0?!1:o,p={ok:t.ok,url:t.url||r,status:t.status,statusText:t.statusText,headers:Ks(t.headers)},y=p.headers["content-type"],A=s||Gs(y),w=A?t.text:t.blob||t.buffer;return w.call(t).then(function(E){if(p.text=E,p.data=E,A)try{var F=Io(E,y);p.body=F,p.obj=F}catch(G){p.parseError=G}return p})}function $s(t){var r=wo()(t).call(t,", ");return r?t.split(", "):t}function Ks(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Zn()(eu()(t))?$f()(eu()(t).call(t)).reduce(function(r,i){var o=rn(i,2),s=o[0],p=o[1];return r[s]=$s(p),r},{}):{}}function Wa(t,r){return!r&&typeof navigator!="undefined"&&(r=navigator),r&&r.product==="ReactNative"?!!(t&&ir(t)==="object"&&typeof t.uri=="string"):typeof File!="undefined"&&t instanceof File||typeof Blob!="undefined"&&t instanceof Blob||typeof Wn.Buffer!="undefined"&&t instanceof Wn.Buffer?!0:t!==null&&ir(t)==="object"&&typeof t.pipe=="function"}function Fo(t,r){return Array.isArray(t)&&t.some(function(i){return Wa(i,r)})}var da={form:",",spaceDelimited:"%20",pipeDelimited:"|"},ko={csv:",",ssv:"%20",tsv:"%09",pipes:"|"};function Ys(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,o=r.collectionFormat,s=r.allowEmptyValue,p=r.serializationOption,y=r.encoding,A=ir(r)==="object"&&!Array.isArray(r)?r.value:r,w=i?function(G){return G.toString()}:function(G){return encodeURIComponent(G)},E=w(t);if(typeof A=="undefined"&&s)return[[E,""]];if(Wa(A)||Fo(A))return[[E,A]];if(p)return Ha(t,A,i,p);if(y){if([ir(y.style),ir(y.explode),ir(y.allowReserved)].some(function(G){return G!=="undefined"}))return Ha(t,A,i,So()(y,["style","explode","allowReserved"]));if(y.contentType){if(y.contentType==="application/json"){var F=typeof A=="string"?A:La()(A);return[[E,w(F)]]}return[[E,w(A.toString())]]}return ir(A)!=="object"?[[E,w(A)]]:Array.isArray(A)&&A.every(function(G){return ir(G)!=="object"})?[[E,qt()(A).call(A,w).join(",")]]:[[E,w(La()(A))]]}return ir(A)!=="object"?[[E,w(A)]]:Array.isArray(A)?o==="multi"?[[E,qt()(A).call(A,w)]]:[[E,qt()(A).call(A,w).join(ko[o||"csv"])]]:[[E,""]]}function Ha(t,r,i,o){var s,p=o.style||"form",y=typeof o.explode=="undefined"?p==="form":o.explode,A=i?!1:o&&o.allowReserved?"unsafe":"reserved",w=function(ne){return Mr(ne,{escape:A})},E=i?function(te){return te}:function(te){return Mr(te,{escape:A})};if(ir(r)!=="object")return[[E(t),w(r)]];if(Array.isArray(r))return y?[[E(t),qt()(r).call(r,w)]]:[[E(t),qt()(r).call(r,w).join(da[p])]];if(p==="deepObject"){var F;return qt()(F=Qt()(r)).call(F,function(te){var ne;return[E(Ct()(ne="".concat(t,"[")).call(ne,te,"]")),w(r[te])]})}if(y){var G;return qt()(G=Qt()(r)).call(G,function(te){return[E(te),w(r[te])]})}return[[E(t),qt()(s=Qt()(r)).call(s,function(te){var ne;return[Ct()(ne="".concat(E(te),",")).call(ne,w(r[te]))]}).join(",")]]}function ec(t){return Da()(t).reduce(function(r,i){var o=rn(i,2),s=o[0],p=o[1],y=$i(Ys(s,p,!0)),A;try{for(y.s();!(A=y.n()).done;){var w=rn(A.value,2),E=w[0],F=w[1];if(Array.isArray(F)){var G=$i(F),te;try{for(G.s();!(te=G.n()).done;){var ne=te.value;r.append(E,ne)}}catch(se){G.e(se)}finally{G.f()}}else r.append(E,F)}}catch(se){y.e(se)}finally{y.f()}return r},new Zf)}function cu(t){var r=Qt()(t).reduce(function(i,o){var s=$i(Ys(o,t[o])),p;try{for(s.s();!(p=s.n()).done;){var y=rn(p.value,2),A=y[0],w=y[1];i[A]=w}}catch(E){s.e(E)}finally{s.f()}return i},{});return Na().stringify(r,{encode:!1,indices:!1})||""}function du(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.url,i=r===void 0?"":r,o=t.query,s=t.form,p=function(){for(var Ae=arguments.length,me=new Array(Ae),Te=0;Te<Ae;Te++)me[Te]=arguments[Te];var He=ln()(me).call(me,function(Be){return Be}).join("&");return He?"?".concat(He):""};if(s){var y=Qt()(s).some(function(ge){var Ae=s[ge].value;return Wa(Ae)||Fo(Ae)}),A=t.headers["content-type"]||t.headers["Content-Type"];y||/multipart\/form-data/i.test(A)?t.body=ec(t.form):t.body=cu(s),delete t.form}if(o){var w=i.split("?"),E=rn(w,2),F=E[0],G=E[1],te="";if(G){var ne=Na().parse(G),se=Qt()(o);se.forEach(function(ge){return delete ne[ge]}),te=Na().stringify(ne,{encode:!0})}var ye=p(te,cu(o));t.url=F+ye,delete t.query}return t}function Js(t,r,i){return i=i||function(o){return o},r=r||function(o){return o},function(o){return typeof o=="string"&&(o={url:o}),To.mergeInQueryOrForm(o),o=r(o),i(t(o))}}var Xs=a(51942),nn=a.n(Xs),za=a(93476),Zi=a.n(za),Mo=a(92762),pu=a.n(Mo),Ga=a(13311),hu=a.n(Ga),_i=a(50308),pa=a.n(_i);/*!
|
|
84
84
|
* https://github.com/Starcounter-Jack/JSON-Patch
|
|
85
85
|
* (c) 2017 Joachim Wester
|
|
86
86
|
* MIT license
|
|
87
|
-
*/var qi=function(){var
|
|
88
|
-
`)}var gu=function(
|
|
87
|
+
*/var qi=function(){var t=function(r,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,s){o.__proto__=s}||function(o,s){for(var p in s)s.hasOwnProperty(p)&&(o[p]=s[p])},t(r,i)};return function(r,i){t(r,i);function o(){this.constructor=r}r.prototype=i===null?Object.create(i):(o.prototype=i.prototype,new o)}}(),$a=Object.prototype.hasOwnProperty;function ci(t,r){return $a.call(t,r)}function Ro(t){if(Array.isArray(t)){for(var i=new Array(t.length),r=0;r<i.length;r++)i[r]=""+r;return i}if(Object.keys)return Object.keys(t);var i=[];for(var o in t)ci(t,o)&&i.push(o);return i}function mn(t){switch(typeof t){case"object":return JSON.parse(JSON.stringify(t));case"undefined":return null;default:return t}}function Lo(t){for(var r=0,i=t.length,o;r<i;){if(o=t.charCodeAt(r),o>=48&&o<=57){r++;continue}return!1}return!0}function di(t){return t.indexOf("/")===-1&&t.indexOf("~")===-1?t:t.replace(/~/g,"~0").replace(/\//g,"~1")}function ki(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}function Mi(t,r){var i;for(var o in t)if(ci(t,o)){if(t[o]===r)return di(o)+"/";if(typeof t[o]=="object"&&(i=Mi(t[o],r),i!=""))return di(o)+"/"+i}return""}function Pd(t,r){if(t===r)return"/";var i=Mi(t,r);if(i==="")throw new Error("Object not found in root");return"/"+i}function Qs(t){if(t===void 0)return!0;if(t){if(Array.isArray(t)){for(var r=0,i=t.length;r<i;r++)if(Qs(t[r]))return!0}else if(typeof t=="object"){for(var o=Ro(t),s=o.length,r=0;r<s;r++)if(Qs(t[o[r]]))return!0}}return!1}function vu(t,r){var i=[t];for(var o in r){var s=typeof r[o]=="object"?JSON.stringify(r[o],null,2):r[o];typeof s!="undefined"&&i.push(o+": "+s)}return i.join(`
|
|
88
|
+
`)}var gu=function(t){qi(r,t);function r(i,o,s,p,y){var A=this.constructor,w=t.call(this,vu(i,{name:o,index:s,operation:p,tree:y}))||this;return w.name=o,w.index=s,w.operation=p,w.tree=y,Object.setPrototypeOf(w,A.prototype),w.message=vu(i,{name:o,index:s,operation:p,tree:y}),w}return r}(Error),Pr=gu,tc=mn,Ur={add:function(t,r,i){return t[r]=this.value,{newDocument:i}},remove:function(t,r,i){var o=t[r];return delete t[r],{newDocument:i,removed:o}},replace:function(t,r,i){var o=t[r];return t[r]=this.value,{newDocument:i,removed:o}},move:function(t,r,i){var o=Rr(i,this.path);o&&(o=mn(o));var s=pr(i,{op:"remove",path:this.from}).removed;return pr(i,{op:"add",path:this.path,value:s}),{newDocument:i,removed:o}},copy:function(t,r,i){var o=Rr(i,this.from);return pr(i,{op:"add",path:this.path,value:mn(o)}),{newDocument:i}},test:function(t,r,i){return{newDocument:i,test:Ka(t[r],this.value)}},_get:function(t,r,i){return this.value=t[r],{newDocument:i}}},jr={add:function(t,r,i){return Lo(r)?t.splice(r,0,this.value):t[r]=this.value,{newDocument:i,index:r}},remove:function(t,r,i){var o=t.splice(r,1);return{newDocument:i,removed:o[0]}},replace:function(t,r,i){var o=t[r];return t[r]=this.value,{newDocument:i,removed:o}},move:Ur.move,copy:Ur.copy,test:Ur.test,_get:Ur._get};function Rr(t,r){if(r=="")return t;var i={op:"_get",path:r};return pr(t,i),i.value}function pr(t,r,i,o,s,p){if(i===void 0&&(i=!1),o===void 0&&(o=!0),s===void 0&&(s=!0),p===void 0&&(p=0),i&&(typeof i=="function"?i(r,0,t,r.path):ea(r,0)),r.path===""){var y={newDocument:t};if(r.op==="add")return y.newDocument=r.value,y;if(r.op==="replace")return y.newDocument=r.value,y.removed=t,y;if(r.op==="move"||r.op==="copy")return y.newDocument=Rr(t,r.from),r.op==="move"&&(y.removed=t),y;if(r.op==="test"){if(y.test=Ka(t,r.value),y.test===!1)throw new Pr("Test operation failed","TEST_OPERATION_FAILED",p,r,t);return y.newDocument=t,y}else{if(r.op==="remove")return y.removed=t,y.newDocument=null,y;if(r.op==="_get")return r.value=t,y;if(i)throw new Pr("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",p,r,t);return y}}else{o||(t=mn(t));var A=r.path||"",w=A.split("/"),E=t,F=1,G=w.length,te=void 0,ne=void 0,se=void 0;for(typeof i=="function"?se=i:se=ea;;){if(ne=w[F],s&&ne=="__proto__")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(i&&te===void 0&&(E[ne]===void 0?te=w.slice(0,F).join("/"):F==G-1&&(te=r.path),te!==void 0&&se(r,0,t,te)),F++,Array.isArray(E)){if(ne==="-")ne=E.length;else{if(i&&!Lo(ne))throw new Pr("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",p,r,t);Lo(ne)&&(ne=~~ne)}if(F>=G){if(i&&r.op==="add"&&ne>E.length)throw new Pr("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",p,r,t);var y=jr[r.op].call(r,E,ne,t);if(y.test===!1)throw new Pr("Test operation failed","TEST_OPERATION_FAILED",p,r,t);return y}}else if(ne&&ne.indexOf("~")!=-1&&(ne=ki(ne)),F>=G){var y=Ur[r.op].call(r,E,ne,t);if(y.test===!1)throw new Pr("Test operation failed","TEST_OPERATION_FAILED",p,r,t);return y}E=E[ne]}}}function zn(t,r,i,o,s){if(o===void 0&&(o=!0),s===void 0&&(s=!0),i&&!Array.isArray(r))throw new Pr("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");o||(t=mn(t));for(var p=new Array(r.length),y=0,A=r.length;y<A;y++)p[y]=pr(t,r[y],i,!0,s,y),t=p[y].newDocument;return p.newDocument=t,p}function rc(t,r,i){var o=pr(t,r);if(o.test===!1)throw new Pr("Test operation failed","TEST_OPERATION_FAILED",i,r,t);return o.newDocument}function ea(t,r,i,o){if(typeof t!="object"||t===null||Array.isArray(t))throw new Pr("Operation is not an object","OPERATION_NOT_AN_OBJECT",r,t,i);if(Ur[t.op]){if(typeof t.path!="string")throw new Pr("Operation `path` property is not a string","OPERATION_PATH_INVALID",r,t,i);if(t.path.indexOf("/")!==0&&t.path.length>0)throw new Pr('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",r,t,i);if((t.op==="move"||t.op==="copy")&&typeof t.from!="string")throw new Pr("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",r,t,i);if((t.op==="add"||t.op==="replace"||t.op==="test")&&t.value===void 0)throw new Pr("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",r,t,i);if((t.op==="add"||t.op==="replace"||t.op==="test")&&Qs(t.value))throw new Pr("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",r,t,i);if(i){if(t.op=="add"){var s=t.path.split("/").length,p=o.split("/").length;if(s!==p+1&&s!==p)throw new Pr("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",r,t,i)}else if(t.op==="replace"||t.op==="remove"||t.op==="_get"){if(t.path!==o)throw new Pr("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",r,t,i)}else if(t.op==="move"||t.op==="copy"){var y={op:"_get",path:t.from,value:void 0},A=yu([y],i);if(A&&A.name==="OPERATION_PATH_UNRESOLVABLE")throw new Pr("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",r,t,i)}}}else throw new Pr("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",r,t,i)}function yu(t,r,i){try{if(!Array.isArray(t))throw new Pr("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(r)zn(mn(r),mn(t),i||!0);else{i=i||ea;for(var o=0;o<t.length;o++)i(t[o],o,r,void 0)}}catch(s){if(s instanceof Pr)return s;throw s}}function Ka(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){var i=Array.isArray(t),o=Array.isArray(r),s,p,y;if(i&&o){if(p=t.length,p!=r.length)return!1;for(s=p;s--!=0;)if(!Ka(t[s],r[s]))return!1;return!0}if(i!=o)return!1;var A=Object.keys(t);if(p=A.length,p!==Object.keys(r).length)return!1;for(s=p;s--!=0;)if(!r.hasOwnProperty(A[s]))return!1;for(s=p;s--!=0;)if(y=A[s],!Ka(t[y],r[y]))return!1;return!0}return t!==t&&r!==r}/*!
|
|
89
89
|
* https://github.com/Starcounter-Jack/JSON-Patch
|
|
90
90
|
* (c) 2017 Joachim Wester
|
|
91
91
|
* MIT license
|
|
92
|
-
*/var Zs=new WeakMap,_s=function(){function r(t){this.observers=new Map,this.obj=t}return r}(),mu=function(){function r(t,i){this.callback=t,this.observer=i}return r}();function qs(r){return Zs.get(r)}function nc(r,t){return r.observers.get(t)}function el(r,t){r.observers.delete(t.callback)}function tl(r,t){t.unobserve()}function xu(r,t){var i=[],o,s=qs(r);if(!s)s=new _s(r),Zs.set(r,s);else{var p=nc(s,t);o=p&&p.observer}if(o)return o;if(o={},s.value=mn(r),t){o.callback=t,o.next=null;var y=function(){Do(o)},A=function(){clearTimeout(o.next),o.next=setTimeout(y)};typeof window!="undefined"&&(window.addEventListener("mouseup",A),window.addEventListener("keyup",A),window.addEventListener("mousedown",A),window.addEventListener("keydown",A),window.addEventListener("change",A))}return o.patches=i,o.object=r,o.unobserve=function(){Do(o),clearTimeout(o.next),el(s,o),typeof window!="undefined"&&(window.removeEventListener("mouseup",A),window.removeEventListener("keyup",A),window.removeEventListener("mousedown",A),window.removeEventListener("keydown",A),window.removeEventListener("change",A))},s.observers.set(t,new mu(t,o)),o}function Do(r,t){t===void 0&&(t=!1);var i=Zs.get(r.object);Ya(i.value,r.object,r.patches,"",t),r.patches.length&&zn(i.value,r.patches);var o=r.patches;return o.length>0&&(r.patches=[],r.callback&&r.callback(o)),o}function Ya(r,t,i,o,s){if(t!==r){typeof t.toJSON=="function"&&(t=t.toJSON());for(var p=Ro(t),y=Ro(r),A=!1,w=!1,E=y.length-1;E>=0;E--){var F=y[E],G=r[F];if(ci(t,F)&&!(t[F]===void 0&&G!==void 0&&Array.isArray(t)===!1)){var te=t[F];typeof G=="object"&&G!=null&&typeof te=="object"&&te!=null?Ya(G,te,i,o+"/"+di(F),s):G!==te&&(A=!0,s&&i.push({op:"test",path:o+"/"+di(F),value:mn(G)}),i.push({op:"replace",path:o+"/"+di(F),value:mn(te)}))}else Array.isArray(r)===Array.isArray(t)?(s&&i.push({op:"test",path:o+"/"+di(F),value:mn(G)}),i.push({op:"remove",path:o+"/"+di(F)}),w=!0):(s&&i.push({op:"test",path:o,value:r}),i.push({op:"replace",path:o,value:t}),A=!0)}if(!(!w&&p.length==y.length))for(var E=0;E<p.length;E++){var F=p[E];!ci(r,F)&&t[F]!==void 0&&i.push({op:"add",path:o+"/"+di(F),value:mn(t[F])})}}}function bu(r,t,i){i===void 0&&(i=!1);var o=[];return Ya(r,t,o,"",i),o}const No=Object.assign({},c,v,{JsonPatchError:gu,deepClone:mn,escapePathComponent:di,unescapePathComponent:ki});var ic=a(31312),Bo=a.n(ic),pi=a(50361),wu=a.n(pi);const nr={add:er,replace:Cn,remove:Ri,merge:Li,mergeDeep:Au,context:rl,getIn:Di,applyPatch:Su,parentPathMatch:nl,flatten:Ja,fullyNormalizeArray:Cu,normalizeArray:il,isPromise:Ou,forEachNew:Eu,forEachNewPrimitive:ac,isJsonPatch:Iu,isContextPatch:sc,isPatch:Vo,isMutation:Qa,isAdditiveMutation:Za,isGenerator:oc,isFunction:Tu,isObject:qn,isError:Pu};function Su(r,t,i){if(i=i||{},t=cr(cr({},t),{},{path:t.path&&xn(t.path)}),t.op==="merge"){var o=Wo(r,t.path);nn()(o,t.value),zn(r,[Cn(t.path,o)])}else if(t.op==="mergeDeep"){var s=Wo(r,t.path);for(var p in t.value){var y=t.value[p],A=Array.isArray(y);if(A){var w=s[p]||[];s[p]=Ct()(w).call(w,y)}else if(qn(y)&&!A){var E=cr({},s[p]);for(var F in y)if(Object.prototype.hasOwnProperty.call(E,F)){E=Bo()(wu()(E),y);break}else nn()(E,Es({},F,y[F]));s[p]=E}else s[p]=y}}else if(t.op==="add"&&t.path===""&&qn(t.value)){var G=Qt()(t.value).reduce(function(ge,Ae){return ge.push({op:"add",path:"/".concat(xn(Ae)),value:t.value[Ae]}),ge},[]);zn(r,G)}else if(t.op==="replace"&&t.path===""){var te=t,ne=te.value;i.allowMetaPatches&&t.meta&&Za(t)&&(Array.isArray(t.value)||qn(t.value))&&(ne=cr(cr({},ne),t.meta)),r=ne}else if(zn(r,[t]),i.allowMetaPatches&&t.meta&&Za(t)&&(Array.isArray(t.value)||qn(t.value))){var se=Wo(r,t.path),ye=cr(cr({},se),t.meta);zn(r,[Cn(t.path,ye)])}return r}function xn(r){return Array.isArray(r)?r.length<1?"":"/".concat(qt()(r).call(r,function(t){return(t+"").replace(/~/g,"~0").replace(/\//g,"~1")}).join("/")):r}function er(r,t){return{op:"add",path:r,value:t}}function Cn(r,t,i){return{op:"replace",path:r,value:t,meta:i}}function Ri(r){return{op:"remove",path:r}}function Li(r,t){return{type:"mutation",op:"merge",path:r,value:t}}function Au(r,t){return{type:"mutation",op:"mergeDeep",path:r,value:t}}function rl(r,t){return{type:"context",path:r,value:t}}function Eu(r,t){try{return Uo(r,jo,t)}catch(i){return i}}function ac(r,t){try{return Uo(r,ta,t)}catch(i){return i}}function Uo(r,t,i){var o,s=qt()(o=ln()(r).call(r,Za)).call(o,function(A){return t(A.value,i,A.path)})||[],p=Ja(s),y=Xa(p);return y}function ta(r,t,i){if(i=i||[],Array.isArray(r))return qt()(r).call(r,function(s,p){return ta(s,t,Ct()(i).call(i,p))});if(qn(r)){var o;return qt()(o=Qt()(r)).call(o,function(s){return ta(r[s],t,Ct()(i).call(i,s))})}return t(r,i[i.length-1],i)}function jo(r,t,i){i=i||[];var o=[];if(i.length>0){var s=t(r,i[i.length-1],i);s&&(o=Ct()(o).call(o,s))}if(Array.isArray(r)){var p=qt()(r).call(r,function(w,E){return jo(w,t,Ct()(i).call(i,E))});p&&(o=Ct()(o).call(o,p))}else if(qn(r)){var y,A=qt()(y=Qt()(r)).call(y,function(w){return jo(r[w],t,Ct()(i).call(i,w))});A&&(o=Ct()(o).call(o,A))}return o=Ja(o),o}function nl(r,t){if(!Array.isArray(t))return!1;for(var i=0,o=t.length;i<o;i+=1)if(t[i]!==r[i])return!1;return!0}function Di(r,t){return t.reduce(function(i,o){return typeof o!="undefined"&&i?i[o]:i},r)}function Cu(r){return Xa(Ja(il(r)))}function il(r){return Array.isArray(r)?r:[r]}function Ja(r){var t;return Ct()(t=[]).apply(t,Pn(qt()(r).call(r,function(i){return Array.isArray(i)?Ja(i):i})))}function Xa(r){return ln()(r).call(r,function(t){return typeof t!="undefined"})}function qn(r){return r&&ir(r)==="object"}function Ou(r){return qn(r)&&Tu(r.then)}function Tu(r){return r&&typeof r=="function"}function Pu(r){return r instanceof Error}function Iu(r){if(Vo(r)){var t=r.op;return t==="add"||t==="remove"||t==="replace"}return!1}function oc(r){return Object.prototype.toString.call(r)==="[object GeneratorFunction]"}function Qa(r){return Iu(r)||Vo(r)&&r.type==="mutation"}function Za(r){return Qa(r)&&(r.op==="add"||r.op==="replace"||r.op==="merge"||r.op==="mergeDeep")}function sc(r){return Vo(r)&&r.type==="context"}function Vo(r){return r&&ir(r)==="object"}function Wo(r,t){try{return Rr(r,t)}catch(i){return console.error(i),{}}}var ha=a(52424),al=a.n(ha),Ho=a(54098),Fu=a(9779),zo=a.n(Fu);function ol(r,t){function i(){Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack;for(var o=arguments.length,s=new Array(o),p=0;p<o;p++)s[p]=arguments[p];this.message=s[0],t&&t.apply(this,s)}return i.prototype=new Error,i.prototype.name=r,i.prototype.constructor=i,i}var lc=a(13692),ku=a.n(lc),Zr=a(47037),Go=a.n(Zr),Mu=["properties"],Ru=["properties"],Lu=["definitions","parameters","responses","securityDefinitions","components/schemas","components/responses","components/parameters","components/securitySchemes"],va=["schema/example","items/example"];function _a(r){var t=r[r.length-1],i=r[r.length-2],o=r.join("/");return Mu.indexOf(t)>-1&&Ru.indexOf(i)===-1||Lu.indexOf(o)>-1||va.some(function(s){return o.indexOf(s)>-1})}function Du(r,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.specmap,s=i.getBaseUrlForNodePath,p=s===void 0?function(E){var F;return o.getContext(Ct()(F=[]).call(F,Pn(t),Pn(E))).baseDoc}:s,y=i.targetKeys,A=y===void 0?["$ref","$$ref"]:y,w=[];return ku()(r).forEach(function(){if(wo()(A).call(A,this.key)&&Go()(this.node)){var F=this.path,G=Ct()(t).call(t,this.path),te=$o(this.node,p(F));w.push(o.replace(G,te))}}),w}function $o(r,t){var i,o=r.split("#"),s=rn(o,2),p=s[0],y=s[1],A=Pi.resolve(p||"",t||"");return y?Ct()(i="".concat(A,"#")).call(i,y):A}var sl="application/json, application/yaml",ga=new RegExp("^([a-z]+://|//)","i"),ra=ol("JSONRefError",function(t,i,o){this.originalError=o,nn()(this,i||{})}),Fn={},ll=new(al()),qa=[function(r){return r[0]==="paths"&&r[3]==="responses"&&r[5]==="examples"},function(r){return r[0]==="paths"&&r[3]==="responses"&&r[5]==="content"&&r[7]==="example"},function(r){return r[0]==="paths"&&r[3]==="responses"&&r[5]==="content"&&r[7]==="examples"&&r[9]==="value"},function(r){return r[0]==="paths"&&r[3]==="requestBody"&&r[4]==="content"&&r[6]==="example"},function(r){return r[0]==="paths"&&r[3]==="requestBody"&&r[4]==="content"&&r[6]==="examples"&&r[8]==="value"},function(r){return r[0]==="paths"&&r[2]==="parameters"&&r[4]==="example"},function(r){return r[0]==="paths"&&r[3]==="parameters"&&r[5]==="example"},function(r){return r[0]==="paths"&&r[2]==="parameters"&&r[4]==="examples"&&r[6]==="value"},function(r){return r[0]==="paths"&&r[3]==="parameters"&&r[5]==="examples"&&r[7]==="value"},function(r){return r[0]==="paths"&&r[2]==="parameters"&&r[4]==="content"&&r[6]==="example"},function(r){return r[0]==="paths"&&r[2]==="parameters"&&r[4]==="content"&&r[6]==="examples"&&r[8]==="value"},function(r){return r[0]==="paths"&&r[3]==="parameters"&&r[4]==="content"&&r[7]==="example"},function(r){return r[0]==="paths"&&r[3]==="parameters"&&r[5]==="content"&&r[7]==="examples"&&r[9]==="value"}],uc=function(t){return qa.some(function(i){return i(t)})},ya={key:"$ref",plugin:function(t,i,o,s){var p=s.getInstance(),y=In()(o).call(o,0,-1);if(!(_a(y)||uc(y))){var A=s.getContext(o),w=A.baseDoc;if(typeof t!="string")return new ra("$ref: must be a string (JSON-Ref)",{$ref:t,baseDoc:w,fullPath:o});var E=ma(t),F=E[0],G=E[1]||"",te;try{te=w||F?fl(F,w):null}catch(me){return na(me,{pointer:G,$ref:t,basePath:te,fullPath:o})}var ne,se;if(dc(G,te,y,s)&&!p.useCircularStructures){var ye=$o(t,te);return t===ye?null:nr.replace(o,ye)}if(te==null?(se=ei(G),ne=s.get(se),typeof ne=="undefined"&&(ne=new ra("Could not resolve reference: ".concat(t),{pointer:G,$ref:t,baseDoc:w,fullPath:o}))):(ne=xa(te,G),ne.__value!=null?ne=ne.__value:ne=ne.catch(function(me){throw na(me,{pointer:G,$ref:t,baseDoc:w,fullPath:o})})),ne instanceof Error)return[nr.remove(o),ne];var ge=$o(t,te),Ae=nr.replace(y,ne,{$$ref:ge});if(te&&te!==w)return[Ae,nr.context(y,{baseDoc:te})];try{if(!pc(s.state,Ae)||p.useCircularStructures)return Ae}catch(me){return null}}}},ul=nn()(ya,{docCache:Fn,absoluteify:fl,clearCache:eo,JSONRefError:ra,wrapError:na,getDoc:cl,split:ma,extractFromDoc:xa,fetchJSON:fc,extract:Ko,jsonPointerToArray:ei,unescapeJsonPointerToken:ia});const Nu=ul;function fl(r,t){if(!ga.test(r)){if(!t){var i;throw new ra(Ct()(i="Tried to resolve a relative URL, without having a basePath. path: '".concat(r,"' basePath: '")).call(i,t,"'"))}return Pi.resolve(t,r)}return r}function na(r,t){var i;if(r&&r.response&&r.response.body){var o;i=Ct()(o="".concat(r.response.body.code," ")).call(o,r.response.body.message)}else i=r.message;return new ra("Could not resolve reference: ".concat(i),t,r)}function ma(r){return(r+"").split("#")}function xa(r,t){var i=Fn[r];if(i&&!nr.isPromise(i))try{var o=Ko(t,i);return nn()(Zi().resolve(o),{__value:o})}catch(s){return Zi().reject(s)}return cl(r).then(function(s){return Ko(t,s)})}function eo(r){typeof r!="undefined"?delete Fn[r]:Qt()(Fn).forEach(function(t){delete Fn[t]})}function cl(r){var t=Fn[r];return t?nr.isPromise(t)?t:Zi().resolve(t):(Fn[r]=ul.fetchJSON(r).then(function(i){return Fn[r]=i,i}),Fn[r])}function fc(r){return(0,Ho.fetch)(r,{headers:{Accept:sl},loadSpec:!0}).then(function(t){return t.text()}).then(function(t){return Ls().safeLoad(t)})}function Ko(r,t){var i=ei(r);if(i.length<1)return t;var o=nr.getIn(t,i);if(typeof o=="undefined")throw new ra("Could not resolve pointer: ".concat(r," does not exist in document"),{pointer:r});return o}function ei(r){var t;if(typeof r!="string")throw new TypeError("Expected a string, got a ".concat(ir(r)));return r[0]==="/"&&(r=r.substr(1)),r===""?[]:qt()(t=r.split("/")).call(t,ia)}function ia(r){return typeof r!="string"?r:zo().unescape(r.replace(/~1/g,"/").replace(/~0/g,"~"))}function ba(r){return zo().escape(r.replace(/~/g,"~0").replace(/\//g,"~1"))}function cc(r){return r.length===0?"":"/".concat(qt()(r).call(r,ba).join("/"))}var Bu=function(t){return!t||t==="/"||t==="#"};function dl(r,t){if(Bu(t))return!0;var i=r.charAt(t.length),o=In()(t).call(t,-1);return r.indexOf(t)===0&&(!i||i==="/"||i==="#")&&o!=="#"}function dc(r,t,i,o){var s,p,y=ll.get(o);y||(y={},ll.set(o,y));var A=cc(i),w=Ct()(s="".concat(t||"<specmap-base>","#")).call(s,r),E=A.replace(/allOf\/\d+\/?/g,""),F=o.contextTree.get([]).baseDoc;if(t==F&&dl(E,r))return!0;var G="",te=i.some(function(ne){var se;return G=Ct()(se="".concat(G,"/")).call(se,ba(ne)),y[G]&&y[G].some(function(ye){return dl(ye,w)||dl(w,ye)})});if(te)return!0;y[E]=Ct()(p=y[E]||[]).call(p,w)}function pc(r,t){var i=[r];return t.path.reduce(function(s,p){return i.push(s[p]),s[p]},r),o(t.value);function o(s){return nr.isObject(s)&&(i.indexOf(s)>=0||Qt()(s).some(function(p){return o(s[p])}))}}var un=a(41609),Uu=a.n(un);const hc={key:"allOf",plugin:function(t,i,o,s,p){if(!(p.meta&&p.meta.$$ref)){var y=In()(o).call(o,0,-1);if(!_a(y)){if(!Array.isArray(t)){var A=new TypeError("allOf must be an array");return A.fullPath=o,A}var w=!1,E=p.value;if(y.forEach(function(te){!E||(E=E[te])}),E=cr({},E),!Uu()(E)){delete E.allOf;var F=[];if(F.push(s.replace(y,{})),t.forEach(function(te,ne){if(!s.isObject(te)){if(w)return null;w=!0;var se=new TypeError("Elements in allOf must be objects");return se.fullPath=o,F.push(se)}F.push(s.mergeDeep(y,te));var ye=In()(o).call(o,0,-1),ge=Du(te,ye,{getBaseUrlForNodePath:function(me){var Te;return s.getContext(Ct()(Te=[]).call(Te,Pn(o),[ne],Pn(me))).baseDoc},specmap:s});F.push.apply(F,Pn(ge))}),F.push(s.mergeDeep(y,E)),!E.$$ref){var G;F.push(s.remove(Ct()(G=[]).call(G,y,"$$ref")))}return F}}}}},vc={key:"parameters",plugin:function(t,i,o,s){if(Array.isArray(t)&&t.length){var p=nn()([],t),y=In()(o).call(o,0,-1),A=cr({},nr.getIn(s.spec,y));return t.forEach(function(w,E){try{p[E].default=s.parameterMacro(A,w)}catch(G){var F=new Error(G);return F.fullPath=o,F}}),nr.replace(o,p)}return nr.replace(o,t)}},gc={key:"properties",plugin:function(t,i,o,s){var p=cr({},t);for(var y in t)try{p[y].default=s.modelPropertyMacro(p[y])}catch(E){var A=new Error(E);return A.fullPath=o,A}var w=nr.replace(o,p);return w}};var ju=function(){function r(t){Ao(this,r),this.root=Yo(t||{})}return Bs(r,[{key:"set",value:function(i,o){var s=this.getParent(i,!0);if(!s){to(this.root,o,null);return}var p=i[i.length-1],y=s.children;if(y[p]){to(y[p],o,s);return}y[p]=Yo(o,s)}},{key:"get",value:function(i){if(i=i||[],i.length<1)return this.root.value;for(var o=this.root,s,p,y=0;y<i.length&&(p=i[y],s=o.children,!!s[p]);y+=1)o=s[p];return o&&o.protoValue}},{key:"getParent",value:function(i,o){return!i||i.length<1?null:i.length<2?this.root:In()(i).call(i,0,-1).reduce(function(s,p){if(!s)return s;var y=s.children;return!y[p]&&o&&(y[p]=Yo(null,s)),y[p]},this.root)}}]),r}();function Yo(r,t){return to({children:{}},r,t)}function to(r,t,i){return r.value=t||{},r.protoValue=i?cr(cr({},i.protoValue),r.value):r.value,Qt()(r.children).forEach(function(o){var s=r.children[o];r.children[o]=to(s,s.value,r)}),r}var Vu=100,yc=function(){function r(t){var i=this,o,s;Ao(this,r),nn()(this,{spec:"",debugLevel:"info",plugins:[],pluginHistory:{},errors:[],mutations:[],promisedPatches:[],state:{},patches:[],context:{},contextTree:new ju,showDebug:!1,allPatches:[],pluginProp:"specMap",libMethods:nn()(Object.create(this),nr,{getInstance:function(){return i}}),allowMetaPatches:!1},t),this.get=this._get.bind(this),this.getContext=this._getContext.bind(this),this.hasRun=this._hasRun.bind(this),this.wrappedPlugins=ln()(o=qt()(s=this.plugins).call(s,this.wrapPlugin.bind(this))).call(o,nr.isFunction),this.patches.push(nr.add([],this.spec)),this.patches.push(nr.context([],this.context)),this.updatePatches(this.patches)}return Bs(r,[{key:"debug",value:function(i){if(this.debugLevel===i){for(var o,s=arguments.length,p=new Array(s>1?s-1:0),y=1;y<s;y++)p[y-1]=arguments[y];(o=console).log.apply(o,p)}}},{key:"verbose",value:function(i){if(this.debugLevel==="verbose"){for(var o,s,p=arguments.length,y=new Array(p>1?p-1:0),A=1;A<p;A++)y[A-1]=arguments[A];(o=console).log.apply(o,Ct()(s=["[".concat(i,"] ")]).call(s,y))}}},{key:"wrapPlugin",value:function(i,o){var s=this.pathDiscriminator,p=null,y;return i[this.pluginProp]?(p=i,y=i[this.pluginProp]):nr.isFunction(i)?y=i:nr.isObject(i)&&(y=A(i)),nn()(y.bind(p),{pluginName:i.name||o,isGenerator:nr.isGenerator(y)});function A(w){var E=function(G,te){return Array.isArray(G)?G.every(function(ne,se){return ne===te[se]}):!0};return ar().mark(function F(G,te){var ne,se,ye,ge,Ae,me;return ar().wrap(function(He){for(;;)switch(He.prev=He.next){case 0:me=function(ze,De,Ue){var We,Je,et,$e,gt,Nt,zt,or,kr,Er,Qr,br,Dr;return ar().wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:if(nr.isObject(ze)){Yt.next=6;break}if(w.key!==De[De.length-1]){Yt.next=4;break}return Yt.next=4,w.plugin(ze,w.key,De,te);case 4:Yt.next=30;break;case 6:We=De.length-1,Je=De[We],et=De.indexOf("properties"),$e=Je==="properties"&&We===et,gt=te.allowMetaPatches&&se[ze.$$ref],Nt=0,zt=Qt()(ze);case 12:if(!(Nt<zt.length)){Yt.next=30;break}if(or=zt[Nt],kr=ze[or],Er=Ct()(De).call(De,or),Qr=nr.isObject(kr),br=ze.$$ref,gt){Yt.next=22;break}if(!Qr){Yt.next=22;break}return te.allowMetaPatches&&br&&(se[br]=!0),Yt.delegateYield(me(kr,Er,Ue),"t0",22);case 22:if(!(!$e&&or===w.key)){Yt.next=27;break}if(Dr=E(s,De),!(!s||Dr)){Yt.next=27;break}return Yt.next=27,w.plugin(kr,or,Er,te,Ue);case 27:Nt++,Yt.next=12;break;case 30:case"end":return Yt.stop()}},ne)},ne=ar().mark(me),se={},ye=$i(ln()(G).call(G,nr.isAdditiveMutation)),He.prev=4,ye.s();case 6:if((ge=ye.n()).done){He.next=11;break}return Ae=ge.value,He.delegateYield(me(Ae.value,Ae.path,Ae),"t0",9);case 9:He.next=6;break;case 11:He.next=16;break;case 13:He.prev=13,He.t1=He.catch(4),ye.e(He.t1);case 16:return He.prev=16,ye.f(),He.finish(16);case 19:case"end":return He.stop()}},F,null,[[4,13,16,19]])})}}},{key:"nextPlugin",value:function(){var i=this;return hu()(this.wrappedPlugins,function(o){var s=i.getMutationsForPlugin(o);return s.length>0})}},{key:"nextPromisedPatch",value:function(){if(this.promisedPatches.length>0){var i;return Zi().race(qt()(i=this.promisedPatches).call(i,function(o){return o.value}))}}},{key:"getPluginHistory",value:function(i){var o=this.constructor.getPluginName(i);return this.pluginHistory[o]||[]}},{key:"getPluginRunCount",value:function(i){return this.getPluginHistory(i).length}},{key:"getPluginHistoryTip",value:function(i){var o=this.getPluginHistory(i),s=o&&o[o.length-1];return s||{}}},{key:"getPluginMutationIndex",value:function(i){var o=this.getPluginHistoryTip(i).mutationIndex;return typeof o!="number"?-1:o}},{key:"updatePluginHistory",value:function(i,o){var s=this.constructor.getPluginName(i);this.pluginHistory[s]=this.pluginHistory[s]||[],this.pluginHistory[s].push(o)}},{key:"updatePatches",value:function(i){var o=this;nr.normalizeArray(i).forEach(function(s){if(s instanceof Error){o.errors.push(s);return}try{if(!nr.isObject(s)){o.debug("updatePatches","Got a non-object patch",s);return}if(o.showDebug&&o.allPatches.push(s),nr.isPromise(s.value)){o.promisedPatches.push(s),o.promisedPatchThen(s);return}if(nr.isContextPatch(s)){o.setContext(s.path,s.value);return}if(nr.isMutation(s)){o.updateMutations(s);return}}catch(p){console.error(p),o.errors.push(p)}})}},{key:"updateMutations",value:function(i){ir(i.value)==="object"&&!Array.isArray(i.value)&&this.allowMetaPatches&&(i.value=cr({},i.value));var o=nr.applyPatch(this.state,i,{allowMetaPatches:this.allowMetaPatches});o&&(this.mutations.push(i),this.state=o)}},{key:"removePromisedPatch",value:function(i){var o,s=this.promisedPatches.indexOf(i);if(s<0){this.debug("Tried to remove a promisedPatch that isn't there!");return}pu()(o=this.promisedPatches).call(o,s,1)}},{key:"promisedPatchThen",value:function(i){var o=this;return i.value=i.value.then(function(s){var p=cr(cr({},i),{},{value:s});o.removePromisedPatch(i),o.updatePatches(p)}).catch(function(s){o.removePromisedPatch(i),o.updatePatches(s)}),i.value}},{key:"getMutations",value:function(i,o){var s;return i=i||0,typeof o!="number"&&(o=this.mutations.length),In()(s=this.mutations).call(s,i,o)}},{key:"getCurrentMutations",value:function(){return this.getMutationsForPlugin(this.getCurrentPlugin())}},{key:"getMutationsForPlugin",value:function(i){var o=this.getPluginMutationIndex(i);return this.getMutations(o+1)}},{key:"getCurrentPlugin",value:function(){return this.currentPlugin}},{key:"getLib",value:function(){return this.libMethods}},{key:"_get",value:function(i){return nr.getIn(this.state,i)}},{key:"_getContext",value:function(i){return this.contextTree.get(i)}},{key:"setContext",value:function(i,o){return this.contextTree.set(i,o)}},{key:"_hasRun",value:function(i){var o=this.getPluginRunCount(this.getCurrentPlugin());return o>(i||0)}},{key:"dispatch",value:function(){var i=this,o=this,s=this.nextPlugin();if(!s){var p=this.nextPromisedPatch();if(p)return p.then(function(){return i.dispatch()}).catch(function(){return i.dispatch()});var y={spec:this.state,errors:this.errors};return this.showDebug&&(y.patches=this.allPatches),Zi().resolve(y)}if(o.pluginCount=o.pluginCount||{},o.pluginCount[s]=(o.pluginCount[s]||0)+1,o.pluginCount[s]>Vu){var A;return Zi().resolve({spec:o.state,errors:Ct()(A=o.errors).call(A,new Error("We've reached a hard limit of ".concat(Vu," plugin runs")))})}if(s!==this.currentPlugin&&this.promisedPatches.length){var w,E=qt()(w=this.promisedPatches).call(w,function(te){return te.value});return Zi().all(qt()(E).call(E,function(te){return te.then(pa(),pa())})).then(function(){return i.dispatch()})}return F();function F(){o.currentPlugin=s;var te=o.getCurrentMutations(),ne=o.mutations.length-1;try{if(s.isGenerator){var se=$i(s(te,o.getLib())),ye;try{for(se.s();!(ye=se.n()).done;){var ge=ye.value;G(ge)}}catch(me){se.e(me)}finally{se.f()}}else{var Ae=s(te,o.getLib());G(Ae)}}catch(me){console.error(me),G([nn()(Object.create(me),{plugin:s})])}finally{o.updatePluginHistory(s,{mutationIndex:ne})}return o.dispatch()}function G(te){te&&(te=nr.fullyNormalizeArray(te),o.updatePatches(te,s))}}}],[{key:"getPluginName",value:function(i){return i.pluginName}},{key:"getPatchesOfType",value:function(i,o){return ln()(i).call(i,o)}}]),r}();function mc(r){return new yc(r).dispatch()}var bn={refs:Nu,allOf:hc,parameters:vc,properties:gc},ro=a(13218),no=a.n(ro),wa=function(t){return String.prototype.toLowerCase.call(t)},ti=function(t){return t.replace(/[^\w]/gi,"_")};function Wu(r){var t=r.openapi;return t?zi()(t,"3"):!1}function Id(r){var t=r.swagger;return t?startsWith(t,"2"):!1}function hi(r,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=o.v2OperationIdCompatibilityMode;if(!r||ir(r)!=="object")return null;var p=(r.operationId||"").replace(/\s/g,"");return p.length?ti(r.operationId):Hu(t,i,{v2OperationIdCompatibilityMode:s})}function Hu(r,t){var i,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=o.v2OperationIdCompatibilityMode;if(s){var p,y,A=Ct()(p="".concat(t.toLowerCase(),"_")).call(p,r).replace(/[\s!@#$%^&*()_+=[{\]};:<>|./?,\\'""-]/g,"_");return A=A||Ct()(y="".concat(r.substring(1),"_")).call(y,t),A.replace(/((_){2,})/g,"_").replace(/^(_)*/g,"").replace(/([_])*$/g,"")}return Ct()(i="".concat(wa(t))).call(i,ti(r))}function pl(r,t){var i;return Ct()(i="".concat(wa(t),"-")).call(i,r)}function zu(r,t){return!r||!r.paths?null:Jo(r,function(i){var o=i.pathName,s=i.method,p=i.operation;if(!p||ir(p)!=="object")return!1;var y=p.operationId,A=hi(p,o,s),w=pl(o,s);return[A,w,y].some(function(E){return E&&E===t})})}function Jo(r,t){return aa(r,t,!0)||null}function aa(r,t,i){if(!r||ir(r)!=="object"||!r.paths||ir(r.paths)!=="object")return null;var o=r.paths;for(var s in o)for(var p in o[s])if(p.toUpperCase()!=="PARAMETERS"){var y=o[s][p];if(!(!y||ir(y)!=="object")){var A={spec:r,pathName:s,method:p.toUpperCase(),operation:y},w=t(A);if(i&&w)return A}}}function Xo(r){var t=r.spec,i=t.paths,o={};if(!i||t.$$normalized)return r;for(var s in i){var p=i[s];if(!!no()(p)){var y=p.parameters,A=function(G){var te=p[G];if(!no()(te))return"continue";var ne=hi(te,s,G);if(ne){o[ne]?o[ne].push(te):o[ne]=[te];var se=o[ne];if(se.length>1)se.forEach(function(Je,et){var $e;Je.__originalOperationId=Je.__originalOperationId||Je.operationId,Je.operationId=Ct()($e="".concat(ne)).call($e,et+1)});else if(typeof te.operationId!="undefined"){var ye=se[0];ye.__originalOperationId=ye.__originalOperationId||te.operationId,ye.operationId=ne}}if(G!=="parameters"){var ge=[],Ae={};for(var me in t)(me==="produces"||me==="consumes"||me==="security")&&(Ae[me]=t[me],ge.push(Ae));if(y&&(Ae.parameters=y,ge.push(Ae)),ge.length){var Te=$i(ge),He;try{for(Te.s();!(He=Te.n()).done;){var Be=He.value;for(var ze in Be)if(!te[ze])te[ze]=Be[ze];else if(ze==="parameters"){var De=$i(Be[ze]),Ue;try{var We=function(){var et=Ue.value,$e=te[ze].some(function(gt){return gt.name&>.name===et.name||gt.$ref&>.$ref===et.$ref||gt.$$ref&>.$$ref===et.$$ref||gt===et});$e||te[ze].push(et)};for(De.s();!(Ue=De.n()).done;)We()}catch(Je){De.e(Je)}finally{De.f()}}}}catch(Je){Te.e(Je)}finally{Te.f()}}}};for(var w in p)var E=A(w)}}return t.$$normalized=!0,r}function Qo(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=t.requestInterceptor,o=t.responseInterceptor,s=r.withCredentials?"include":"same-origin";return function(p){return r({url:p,loadSpec:!0,requestInterceptor:i,responseInterceptor:o,headers:{Accept:sl},credentials:s}).then(function(y){return y.body})}}function hl(){bn.refs.clearCache()}function Gu(r){var t=r.fetch,i=r.spec,o=r.url,s=r.mode,p=r.allowMetaPatches,y=p===void 0?!0:p,A=r.pathDiscriminator,w=r.modelPropertyMacro,E=r.parameterMacro,F=r.requestInterceptor,G=r.responseInterceptor,te=r.skipNormalization,ne=r.useCircularStructures,se=r.http,ye=r.baseDoc;if(ye=ye||o,se=t||se||Fi,!i)return Qo(se,{requestInterceptor:F,responseInterceptor:G})(ye).then(ge);return ge(i);function ge(Ae){ye&&(bn.refs.docCache[ye]=Ae),bn.refs.fetchJSON=Qo(se,{requestInterceptor:F,responseInterceptor:G});var me=[bn.refs];return typeof E=="function"&&me.push(bn.parameters),typeof w=="function"&&me.push(bn.properties),s!=="strict"&&me.push(bn.allOf),mc({spec:Ae,context:{baseDoc:ye},plugins:me,allowMetaPatches:y,pathDiscriminator:A,parameterMacro:E,modelPropertyMacro:w,useCircularStructures:ne}).then(te?function(){var Te=ks(ar().mark(function He(Be){return ar().wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return De.abrupt("return",Be);case 1:case"end":return De.stop()}},He)}));return function(He){return Te.apply(this,arguments)}}():Xo)}}var io=a(27361),Sa=a.n(io);function xc(r,t){return Zo.apply(this,arguments)}function Zo(){return Zo=ks(ar().mark(function r(t,i){var o,s,p,y,A,w,E,F,G,te,ne,se,ye=arguments;return ar().wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:return o=ye.length>2&&ye[2]!==void 0?ye[2]:{},s=o.returnEntireTree,p=o.baseDoc,y=o.requestInterceptor,A=o.responseInterceptor,w=o.parameterMacro,E=o.modelPropertyMacro,F=o.useCircularStructures,G={pathDiscriminator:i,baseDoc:p,requestInterceptor:y,responseInterceptor:A,parameterMacro:w,modelPropertyMacro:E,useCircularStructures:F},te=Xo({spec:t}),ne=te.spec,Ae.next=6,Gu(cr(cr({},G),{},{spec:ne,allowMetaPatches:!0,skipNormalization:!0}));case 6:return se=Ae.sent,!s&&Array.isArray(i)&&i.length&&(se.spec=Sa()(se.spec,i)||null),Ae.abrupt("return",se);case 9:case"end":return Ae.stop()}},r)})),Zo.apply(this,arguments)}var _o=function(){return null},bc=function(t){return Array.isArray(t)?t:[t]},qo={mapTagOperations:Sc,makeExecute:ao};function ao(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return function(t){var i=t.pathName,o=t.method,s=t.operationId;return function(p){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return r.execute(cr(cr({spec:r.spec},So()(r,"requestInterceptor","responseInterceptor","userFetch")),{},{pathName:i,method:o,parameters:p,operationId:s},y))}}}function wc(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=qo.makeExecute(r),i=qo.mapTagOperations({v2OperationIdCompatibilityMode:r.v2OperationIdCompatibilityMode,spec:r.spec,cb:t}),o={};for(var s in i){o[s]={operations:{}};for(var p in i[s])o[s].operations[p]={execute:i[s][p]}}return{apis:o}}function $u(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=qo.makeExecute(r);return{apis:qo.mapTagOperations({v2OperationIdCompatibilityMode:r.v2OperationIdCompatibilityMode,spec:r.spec,cb:t})}}function Sc(r){var t=r.spec,i=r.cb,o=i===void 0?_o:i,s=r.defaultTag,p=s===void 0?"default":s,y=r.v2OperationIdCompatibilityMode,A={},w={};return aa(t,function(E){var F=E.pathName,G=E.method,te=E.operation,ne=te.tags?bc(te.tags):[p];ne.forEach(function(se){if(typeof se=="string"){w[se]=w[se]||{};var ye=w[se],ge=hi(te,F,G,{v2OperationIdCompatibilityMode:y}),Ae=o({spec:t,pathName:F,method:G,operation:te,operationId:ge});if(A[ge]){var me;A[ge]+=1,ye[Ct()(me="".concat(ge)).call(me,A[ge])]=Ae}else if(typeof ye[ge]!="undefined"){var Te,He,Be=A[ge]||1;A[ge]=Be+1,ye[Ct()(Te="".concat(ge)).call(Te,A[ge])]=Ae;var ze=ye[ge];delete ye[ge],ye[Ct()(He="".concat(ge)).call(He,Be)]=ze}else ye[ge]=Ae}})}),w}var es=a(95683);function Ku(r,t){if(r==null)return{};var i={},o=As(r),s,p;for(p=0;p<o.length;p++)s=o[p],!(es(t).call(t,s)>=0)&&(i[s]=r[s]);return i}function Ac(r,t){if(r==null)return{};var i=Ku(r,t),o,s;if(Wi){var p=Wi(r);for(s=0;s<p.length;s++)o=p[s],!(es(t).call(t,o)>=0)&&(!Object.prototype.propertyIsEnumerable.call(r,o)||(i[o]=r[o]))}return i}var Yu=a(68630),vl=a.n(Yu),Ec=a(1469),gl=a.n(Ec),oo=a(76489);const so={body:Cc,header:Oc,query:Pc,path:Tc,formData:Ju};function Cc(r){var t=r.req,i=r.value;t.body=i}function Ju(r){var t=r.req,i=r.value,o=r.parameter;(i||o.allowEmptyValue)&&(t.form=t.form||{},t.form[o.name]={value:i,allowEmptyValue:o.allowEmptyValue,collectionFormat:o.collectionFormat})}function Oc(r){var t=r.req,i=r.parameter,o=r.value;t.headers=t.headers||{},typeof o!="undefined"&&(t.headers[i.name]=o)}function Tc(r){var t=r.req,i=r.value,o=r.parameter;t.url=t.url.split("{".concat(o.name,"}")).join(encodeURIComponent(i))}function Pc(r){var t=r.req,i=r.value,o=r.parameter;if(t.query=t.query||{},i===!1&&o.type==="boolean"&&(i="false"),i===0&&["number","integer"].indexOf(o.type)>-1&&(i="0"),i)t.query[o.name]={collectionFormat:o.collectionFormat,value:i};else if(o.allowEmptyValue&&i!==void 0){var s=o.name;t.query[s]=t.query[s]||{},t.query[s].allowEmptyValue=!0}}function ts(r,t){return wo()(t).call(t,"application/json")?typeof r=="string"?r:La()(r):r.toString()}function Xu(r){var t=r.req,i=r.value,o=r.parameter,s=o.name,p=o.style,y=o.explode,A=o.content;if(A){var w=Qt()(A)[0];t.url=t.url.split("{".concat(s,"}")).join(Mr(ts(i,w),{escape:!0}));return}var E=_n({key:o.name,value:i,style:p||"simple",explode:y||!1,escape:!0});t.url=t.url.split("{".concat(s,"}")).join(E)}function Ic(r){var t=r.req,i=r.value,o=r.parameter;if(t.query=t.query||{},o.content){var s=Qt()(o.content)[0];t.query[o.name]=ts(i,s);return}if(i===!1&&(i="false"),i===0&&(i="0"),i)t.query[o.name]={value:i,serializationOption:So()(o,["style","explode","allowReserved"])};else if(o.allowEmptyValue&&i!==void 0){var p=o.name;t.query[p]=t.query[p]||{},t.query[p].allowEmptyValue=!0}}var Fc=["accept","authorization","content-type"];function Qu(r){var t=r.req,i=r.parameter,o=r.value;if(t.headers=t.headers||{},!(Fc.indexOf(i.name.toLowerCase())>-1)){if(i.content){var s=Qt()(i.content)[0];t.headers[i.name]=ts(o,s);return}typeof o!="undefined"&&(t.headers[i.name]=_n({key:i.name,value:o,style:i.style||"simple",explode:typeof i.explode=="undefined"?!1:i.explode,escape:!1}))}}function yl(r){var t=r.req,i=r.parameter,o=r.value;t.headers=t.headers||{};var s=ir(o);if(i.content){var p,y=Qt()(i.content)[0];t.headers.Cookie=Ct()(p="".concat(i.name,"=")).call(p,ts(o,y));return}if(s!=="undefined"){var A=s==="object"&&!Array.isArray(o)&&i.explode?"":"".concat(i.name,"=");t.headers.Cookie=A+_n({key:i.name,value:o,escape:!1,style:i.style||"form",explode:typeof i.explode=="undefined"?!1:i.explode})}}var Zu=a(50706),_u=a.n(Zu);function qu(r,t){var i=r.operation,o=r.requestBody,s=r.securities,p=r.spec,y=r.attachContentTypeForEmptyPayload,A=r.requestContentType;t=Aa({request:t,securities:s,operation:i,spec:p});var w=i.requestBody||{},E=Qt()(w.content||{}),F=A&&E.indexOf(A)>-1;if(o||y){if(A&&F)t.headers["Content-Type"]=A;else if(!A){var G=E[0];G&&(t.headers["Content-Type"]=G,A=G)}}else A&&F&&(t.headers["Content-Type"]=A);if(!r.responseContentType&&i.responses){var te,ne=ln()(te=Da()(i.responses)).call(te,function(ye){var ge=rn(ye,2),Ae=ge[0],me=ge[1],Te=parseInt(Ae,10);return Te>=200&&Te<300&&vl()(me.content)}).reduce(function(ye,ge){var Ae=rn(ge,2),me=Ae[1];return Ct()(ye).call(ye,Qt()(me.content))},[]);ne.length>0&&(t.headers.accept=ne.join(", "))}if(o)if(A){if(E.indexOf(A)>-1)if(A==="application/x-www-form-urlencoded"||A==="multipart/form-data")if(ir(o)==="object"){var se=(w.content[A]||{}).encoding||{};t.form={},Qt()(o).forEach(function(ye){t.form[ye]={value:o[ye],encoding:se[ye]||{}}})}else t.form=o;else t.body=o}else t.body=o;return t}function Aa(r){var t=r.request,i=r.securities,o=i===void 0?{}:i,s=r.operation,p=s===void 0?{}:s,y=r.spec,A=Hi()({},t),w=o.authorized,E=w===void 0?{}:w,F=p.security||y.security||[],G=E&&!!Qt()(E).length,te=Sa()(y,["components","securitySchemes"])||{};return A.headers=A.headers||{},A.query=A.query||{},!Qt()(o).length||!G||!F||Array.isArray(p.security)&&!p.security.length?t:(F.forEach(function(ne){Qt()(ne).forEach(function(se){var ye=E[se],ge=te[se];if(!!ye){var Ae=ye.value||ye,me=ge.type;if(ye){if(me==="apiKey")ge.in==="query"&&(A.query[ge.name]=Ae),ge.in==="header"&&(A.headers[ge.name]=Ae),ge.in==="cookie"&&(A.cookies[ge.name]=Ae);else if(me==="http"){if(/^basic$/i.test(ge.scheme)){var Te,He=Ae.username||"",Be=Ae.password||"",ze=_u()(Ct()(Te="".concat(He,":")).call(Te,Be));A.headers.Authorization="Basic ".concat(ze)}/^bearer$/i.test(ge.scheme)&&(A.headers.Authorization="Bearer ".concat(Ae))}else if(me==="oauth2"||me==="openIdConnect"){var De,Ue=ye.token||{},We=ge["x-tokenName"]||"access_token",Je=Ue[We],et=Ue.token_type;(!et||et.toLowerCase()==="bearer")&&(et="Bearer"),A.headers.Authorization=Ct()(De="".concat(et," ")).call(De,Je)}}}})}),A)}function ef(r,t){var i=r.spec,o=r.operation,s=r.securities,p=r.requestContentType,y=r.responseContentType,A=r.attachContentTypeForEmptyPayload;if(t=rs({request:t,securities:s,operation:o,spec:i}),t.body||t.form||A){var w,E;if(p)t.headers["Content-Type"]=p;else if(Array.isArray(o.consumes)){var F=rn(o.consumes,1);t.headers["Content-Type"]=F[0]}else if(Array.isArray(i.consumes)){var G=rn(i.consumes,1);t.headers["Content-Type"]=G[0]}else o.parameters&&ln()(w=o.parameters).call(w,function(ge){return ge.type==="file"}).length?t.headers["Content-Type"]="multipart/form-data":o.parameters&&ln()(E=o.parameters).call(E,function(ge){return ge.in==="formData"}).length&&(t.headers["Content-Type"]="application/x-www-form-urlencoded")}else if(p){var te,ne,se=o.parameters&&ln()(te=o.parameters).call(te,function(ge){return ge.in==="body"}).length>0,ye=o.parameters&&ln()(ne=o.parameters).call(ne,function(ge){return ge.in==="formData"}).length>0;(se||ye)&&(t.headers["Content-Type"]=p)}return!y&&Array.isArray(o.produces)&&o.produces.length>0&&(t.headers.accept=o.produces.join(", ")),t}function rs(r){var t=r.request,i=r.securities,o=i===void 0?{}:i,s=r.operation,p=s===void 0?{}:s,y=r.spec,A=Hi()({},t),w=o.authorized,E=w===void 0?{}:w,F=o.specSecurity,G=F===void 0?[]:F,te=p.security||G,ne=E&&!!Qt()(E).length,se=y.securityDefinitions;return A.headers=A.headers||{},A.query=A.query||{},!Qt()(o).length||!ne||!te||Array.isArray(p.security)&&!p.security.length?t:(te.forEach(function(ye){Qt()(ye).forEach(function(ge){var Ae=E[ge];if(!!Ae){var me=Ae.token,Te=Ae.value||Ae,He=se[ge],Be=He.type,ze=He["x-tokenName"]||"access_token",De=me&&me[ze],Ue=me&&me.token_type;if(Ae){if(Be==="apiKey"){var We=He.in==="query"?"query":"headers";A[We]=A[We]||{},A[We][He.name]=Te}else if(Be==="basic")if(Te.header)A.headers.authorization=Te.header;else{var Je,et=Te.username||"",$e=Te.password||"";Te.base64=_u()(Ct()(Je="".concat(et,":")).call(Je,$e)),A.headers.authorization="Basic ".concat(Te.base64)}else if(Be==="oauth2"&&De){var gt;Ue=!Ue||Ue.toLowerCase()==="bearer"?"Bearer":Ue,A.headers.authorization=Ct()(gt="".concat(Ue," ")).call(gt,De)}}}})}),A)}var tf=function(t){return Array.isArray(t)?t:[]},kc=ol("OperationNotFoundError",function(t,i,o){this.originalError=o,nn()(this,i||{})}),Mc=function(t,i){return ln()(i).call(i,function(o){return o.name===t})},hr=function(t){var i={};t.forEach(function(s){i[s.in]||(i[s.in]={}),i[s.in][s.name]=s});var o=[];return Qt()(i).forEach(function(s){Qt()(i[s]).forEach(function(p){o.push(i[s][p])})}),o},Rc={buildRequest:Ea};function ml(r){var t=r.http,i=r.fetch,o=r.spec,s=r.operationId,p=r.pathName,y=r.method,A=r.parameters,w=r.securities,E=Ac(r,["http","fetch","spec","operationId","pathName","method","parameters","securities"]),F=t||i||Fi;p&&y&&!s&&(s=pl(p,y));var G=Rc.buildRequest(cr({spec:o,operationId:s,parameters:A,securities:w,http:F},E));return G.body&&(vl()(G.body)||gl()(G.body))&&(G.body=La()(G.body)),F(G)}function Ea(r){var t,i,o=r.spec,s=r.operationId,p=r.responseContentType,y=r.scheme,A=r.requestInterceptor,w=r.responseInterceptor,E=r.contextUrl,F=r.userFetch,G=r.server,te=r.serverVariables,ne=r.http,se=r.parameters,ye=r.parameterBuilders,ge=Wu(o);ye||(ge?ye=x:ye=so);var Ae=ne&&ne.withCredentials?"include":"same-origin",me={url:"",credentials:Ae,headers:{},cookies:{}};A&&(me.requestInterceptor=A),w&&(me.responseInterceptor=w),F&&(me.userFetch=F);var Te=zu(o,s);if(!Te)throw new kc("Operation ".concat(s," not found"));var He=Te.operation,Be=He===void 0?{}:He,ze=Te.method,De=Te.pathName;if(me.url+=lo({spec:o,scheme:y,contextUrl:E,server:G,serverVariables:te,pathName:De,method:ze}),!s)return delete me.cookies,me;me.url+=De,me.method="".concat(ze).toUpperCase(),se=se||{};var Ue=o.paths[De]||{};p&&(me.headers.accept=p);var We=hr(Ct()(t=Ct()(i=[]).call(i,tf(Be.parameters))).call(t,tf(Ue.parameters)));We.forEach(function($e){var gt=ye[$e.in],Nt;if($e.in==="body"&&$e.schema&&$e.schema.properties&&(Nt=se),Nt=$e&&$e.name&&se[$e.name],typeof Nt=="undefined"){var zt;Nt=$e&&$e.name&&se[Ct()(zt="".concat($e.in,".")).call(zt,$e.name)]}else if(Mc($e.name,We).length>1){var or;console.warn(Ct()(or="Parameter '".concat($e.name,"' is ambiguous because the defined spec has more than one parameter with the name: '")).call(or,$e.name,"' and the passed-in parameter values did not define an 'in' value."))}if(Nt!==null){if(typeof $e.default!="undefined"&&typeof Nt=="undefined"&&(Nt=$e.default),typeof Nt=="undefined"&&$e.required&&!$e.allowEmptyValue)throw new Error("Required parameter ".concat($e.name," is not provided"));if(ge&&$e.schema&&$e.schema.type==="object"&&typeof Nt=="string")try{Nt=JSON.parse(Nt)}catch(kr){throw new Error("Could not parse object parameter value string as JSON")}gt&>({req:me,parameter:$e,value:Nt,operation:Be,spec:o})}});var Je=cr(cr({},r),{},{operation:Be});if(ge?me=qu(Je,me):me=ef(Je,me),me.cookies&&Qt()(me.cookies).length){var et=Qt()(me.cookies).reduce(function($e,gt){var Nt=me.cookies[gt],zt=$e?"&":"",or=oo.serialize(gt,Nt);return $e+zt+or},"");me.headers.Cookie=et}return me.cookies&&delete me.cookies,du(me),me}var On=function(t){return t?t.replace(/\W/g,""):null};function lo(r){var t=Wu(r.spec);return t?xl(r):af(r)}function xl(r){var t=r.spec,i=r.pathName,o=r.method,s=r.server,p=r.contextUrl,y=r.serverVariables,A=y===void 0?{}:y,w=Sa()(t,["paths",i,(o||"").toLowerCase(),"servers"])||Sa()(t,["paths",i,"servers"])||Sa()(t,["servers"]),E="",F=null;if(s&&w&&w.length){var G=qt()(w).call(w,function(se){return se.url});G.indexOf(s)>-1&&(E=s,F=w[G.indexOf(s)])}if(!E&&w&&w.length){E=w[0].url;var te=rn(w,1);F=te[0]}if(E.indexOf("{")>-1){var ne=nf(E);ne.forEach(function(se){if(F.variables&&F.variables[se]){var ye=F.variables[se],ge=A[se]||ye.default,Ae=new RegExp("{".concat(se,"}"),"g");E=E.replace(Ae,ge)}})}return rf(E,p)}function rf(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",i=r&&t?Pi.parse(Pi.resolve(t,r)):Pi.parse(r),o=Pi.parse(t),s=On(i.protocol)||On(o.protocol)||"",p=i.host||o.host,y=i.pathname||"",A;if(s&&p){var w;A=Ct()(w="".concat(s,"://")).call(w,p+y)}else A=y;return A[A.length-1]==="/"?In()(A).call(A,0,-1):A}function nf(r){for(var t=[],i=/{([^}]+)}/g,o;o=i.exec(r);)t.push(o[1]);return t}function af(r){var t=r.spec,i=r.scheme,o=r.contextUrl,s=o===void 0?"":o,p=Pi.parse(s),y=Array.isArray(t.schemes)?t.schemes[0]:null,A=i||y||On(p.protocol)||"http",w=t.host||p.host||"",E=t.basePath||"",F;if(A&&w){var G;F=Ct()(G="".concat(A,"://")).call(G,w+E)}else F=E;return F[F.length-1]==="/"?In()(F).call(F,0,-1):F}xr.http=Fi,xr.makeHttp=Js.bind(null,xr.http),xr.resolve=Gu,xr.resolveSubtree=xc,xr.execute=ml,xr.serializeRes=fu,xr.serializeHeaders=Ks,xr.clearCache=hl,xr.makeApisTagOperation=$u,xr.buildRequest=Ea,xr.helpers={opId:hi},xr.getBaseUrl=lo;function xr(r){var t=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof r=="string"?i.url=r:i=r,!(this instanceof xr))return new xr(i);Hi()(this,i);var o=this.resolve().then(function(){return t.disableInterfaces||Hi()(t,xr.makeApisTagOperation(t)),t});return o.client=this,o}xr.prototype={http:Fi,execute:function(t){return this.applyDefaults(),xr.execute(cr({spec:this.spec,http:this.http,securities:{authorized:this.authorizations},contextUrl:typeof this.url=="string"?this.url:void 0,requestInterceptor:this.requestInterceptor||null,responseInterceptor:this.responseInterceptor||null},t))},resolve:function(){var t=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return xr.resolve(cr({spec:this.spec,url:this.url,http:this.http||this.fetch,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,requestInterceptor:this.requestInterceptor||null,responseInterceptor:this.responseInterceptor||null},i)).then(function(o){return t.originalSpec=t.spec,t.spec=o.spec,t.errors=o.errors,t})}},xr.prototype.applyDefaults=function(){var t=this.spec,i=this.url;if(i&&zi()(i,"http")){var o=Pi.parse(i);t.host||(t.host=o.host),t.schemes||(t.schemes=[o.protocol.replace(":","")]),t.basePath||(t.basePath="/")}};var Lc=xr.helpers;const Dc=xr;var Gt=a(25446),bl=a(11429),Wt=a(76671),of=a(7930),uo=a(51027),vi=a(50771),sf=a(17673),Gn=a(64776),Nc=Object.defineProperty,wr=Object.defineProperties,Bc=Object.getOwnPropertyDescriptors,lf=Object.getOwnPropertySymbols,Uc=Object.prototype.hasOwnProperty,ns=Object.prototype.propertyIsEnumerable,e=(r,t,i)=>t in r?Nc(r,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[t]=i,n=(r,t)=>{for(var i in t||(t={}))Uc.call(t,i)&&e(r,i,t[i]);if(lf)for(var i of lf(t))ns.call(t,i)&&e(r,i,t[i]);return r},u=(r,t)=>wr(r,Bc(t)),l=(r,t,i)=>new Promise((o,s)=>{var p=w=>{try{A(i.next(w))}catch(E){s(E)}},y=w=>{try{A(i.throw(w))}catch(E){s(E)}},A=w=>w.done?o(w.value):Promise.resolve(w.value).then(p,y);A((i=i.apply(r,t)).next())});const f="/oauth2-redirect.html";class m{static authorizeImplicit({authorizationUrl:t,clientId:i,scopes:o,extraParams:s={},routingBasePath:p,redirectUri:y,successCallback:A,errorCallback:w}){const E=(0,Gn.p8)({date:new Date().toString()}),F=new URL(t),G=p==="/"?"":p,te=`${window.location.origin}${G}${f}`;F.searchParams.set("client_id",i),F.searchParams.set("redirect_uri",y||te),F.searchParams.set("response_type","token"),F.searchParams.set("state",E),Array.isArray(o)&&F.searchParams.set("scope",o.join(" "));for(const ne in s)F.searchParams.set(ne,s[ne]);window.redirectOAuth2={flow:"implicit",data:{authorizationUrl:t,clientId:i,scopes:o},state:E,successCallback:ne=>{A(ne),m.clearRedirectData("implicit")},errorCallback:ne=>{w(ne),m.clearRedirectData("implicit")}},window.open(F.toString())}static authorizeAuthorizationCode({authorizationUrl:t,tokenUrl:i,clientId:o,clientSecret:s,codeVerifier:p,codeChallenge:y,scopes:A,extraParams:w={},extraHeaders:E={},routingBasePath:F,redirectUri:G,successCallback:te,errorCallback:ne}){const se=new URL(t),ye=F==="/"?"":F,ge=`${window.location.origin}${ye}${f}`,Ae=(0,Gn.p8)({date:new Date().toString()});se.searchParams.set("client_id",o),se.searchParams.set("redirect_uri",G||ge),se.searchParams.set("response_type","code"),se.searchParams.set("state",Ae),Array.isArray(A)&&se.searchParams.set("scope",A.join(" ")),y&&(se.searchParams.set("code_challenge",y),se.searchParams.set("code_challenge_method","S256"));for(const me in w)se.searchParams.set(me,w[me]);window.redirectOAuth2={flow:"authorizationCode",data:{authorizationUrl:t,clientId:o,scopes:A},state:Ae,successCallback:me=>l(this,[me],function*({auth_code:Te}){try{const He=yield fetch(i,{method:"POST",headers:n({"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},E),body:sf.stringify(n(u(n({client_id:o,client_secret:s},p&&{code_verifier:p}),{code:Te,grant_type:"authorization_code",redirect_uri:G||ge}),w))});yield U(He,te,ne)}catch(He){ne(He)}m.clearRedirectData("authorizationCode")}),errorCallback:me=>{ne(me),m.clearRedirectData("authorizationCode")}},window.open(se.toString())}static clearRedirectData(t){window.redirectOAuth2={flow:t,data:{authorizationUrl:"",clientId:"",scopes:[]},state:"",successCallback:()=>{},errorCallback:()=>{}}}static authorizeClientCredentials(t){return l(this,arguments,function*({tokenUrl:i,clientId:o,clientSecret:s,scopes:p=[],extraParams:y={},extraHeaders:A={},successCallback:w,errorCallback:E}){try{const F=JSON.parse(JSON.stringify(n({client_id:o,client_secret:s,grant_type:"client_credentials",scope:Array.isArray(p)&&p.length?p.join(" "):void 0},y))),G=yield fetch(i,{method:"POST",headers:n({"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},A),body:sf.stringify(F)});yield U(G,w,E)}catch(F){E(F)}})}}const k=new m;function U(r,t,i){return l(this,null,function*(){if(r.ok){const o=yield r.json();t(o)}else i(new Error((r.headers.get("Content-Type")||"").indexOf("json")>-1?JSON.stringify(yield r.json()):yield r.text()))})}function H(r){return l(this,null,function*(){return(0,Gn.rS)(yield(0,Gn.JQ)(r))})}var Z=a(68929),be;(function(r){r.STRING="string",r.ARRAY="array",r.OBJECT="object"})(be||(be={}));var Ce;(function(r){r.BYTE="byte",r.BASE64="base64",r.BINARY="binary"})(Ce||(Ce={}));var Ne=(r,t,i)=>new Promise((o,s)=>{var p=w=>{try{A(i.next(w))}catch(E){s(E)}},y=w=>{try{A(i.throw(w))}catch(E){s(E)}},A=w=>w.done?o(w.value):Promise.resolve(w.value).then(p,y);A((i=i.apply(r,t)).next())});const ke=Object.values(Ce),Ye=["application/octet-stream","application/pdf","application/gzip","application/zip"],tt=["image/","audio/","video/"];function ot(r){if(tt.some(t=>r.startsWith(t)))return r}function ct(r){return Ye.includes(r)?!0:tt.some(t=>r.startsWith(t))}function yt(r){const t=r.type==="array"?r.items:r;if(!t||!t.type||(t==null?void 0:t.type)==="any")return!0;const i=t.contentMediaType||"",o=t.format||t.contentEncoding||(ct(i)?"binary":"");return t.type===be.STRING&&ke.includes(o)}function dt(r,t){if(!r||!r.type||r.type==="any")return ct(t);const i=r.format||r.contentEncoding||"";return r.type===be.STRING&&ke.includes(i)}function bt(r){return new Promise((t,i)=>{const o=new FileReader;o.onload=()=>{const p=o.result.replace(/data:.*\/.*;base64,/g,"");t(p)},o.onerror=()=>i(o.error),o.readAsDataURL(r)})}function Ft({format:r,contentEncoding:t,contentMediaType:i}){return[r,t,i].includes(Ce.BASE64)}function It(r,t){return Ne(this,null,function*(){const i=Object.values(r);let o=i.length===1?i[0]:i;return t.type===be.STRING&&Ft(t)?o=yield bt(i[0]):t.type===be.ARRAY&&t.items&&(Ft(t.items)?o=yield Promise.all(i.map(p=>Ne(this,null,function*(){return yield bt(p)}))):o=i),o})}var it=a(39713),Tt=a(58804),Sr=a(8418),vr=a(32335),wn=Object.defineProperty,fn=Object.defineProperties,Ir=Object.getOwnPropertyDescriptors,Yr=Object.getOwnPropertySymbols,Vr=Object.prototype.hasOwnProperty,Fr=Object.prototype.propertyIsEnumerable,Ar=(r,t,i)=>t in r?wn(r,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[t]=i,dr=(r,t)=>{for(var i in t||(t={}))Vr.call(t,i)&&Ar(r,i,t[i]);if(Yr)for(var i of Yr(t))Fr.call(t,i)&&Ar(r,i,t[i]);return r},cn=(r,t)=>fn(r,Ir(t)),Ca=(r,t)=>{var i={};for(var o in r)Vr.call(r,o)&&t.indexOf(o)<0&&(i[o]=r[o]);if(r!=null&&Yr)for(var o of Yr(r))t.indexOf(o)<0&&Fr.call(r,o)&&(i[o]=r[o]);return i};const gi=r=>Tt.css`
|
|
92
|
+
*/var Zs=new WeakMap,_s=function(){function t(r){this.observers=new Map,this.obj=r}return t}(),mu=function(){function t(r,i){this.callback=r,this.observer=i}return t}();function qs(t){return Zs.get(t)}function nc(t,r){return t.observers.get(r)}function el(t,r){t.observers.delete(r.callback)}function tl(t,r){r.unobserve()}function xu(t,r){var i=[],o,s=qs(t);if(!s)s=new _s(t),Zs.set(t,s);else{var p=nc(s,r);o=p&&p.observer}if(o)return o;if(o={},s.value=mn(t),r){o.callback=r,o.next=null;var y=function(){Do(o)},A=function(){clearTimeout(o.next),o.next=setTimeout(y)};typeof window!="undefined"&&(window.addEventListener("mouseup",A),window.addEventListener("keyup",A),window.addEventListener("mousedown",A),window.addEventListener("keydown",A),window.addEventListener("change",A))}return o.patches=i,o.object=t,o.unobserve=function(){Do(o),clearTimeout(o.next),el(s,o),typeof window!="undefined"&&(window.removeEventListener("mouseup",A),window.removeEventListener("keyup",A),window.removeEventListener("mousedown",A),window.removeEventListener("keydown",A),window.removeEventListener("change",A))},s.observers.set(r,new mu(r,o)),o}function Do(t,r){r===void 0&&(r=!1);var i=Zs.get(t.object);Ya(i.value,t.object,t.patches,"",r),t.patches.length&&zn(i.value,t.patches);var o=t.patches;return o.length>0&&(t.patches=[],t.callback&&t.callback(o)),o}function Ya(t,r,i,o,s){if(r!==t){typeof r.toJSON=="function"&&(r=r.toJSON());for(var p=Ro(r),y=Ro(t),A=!1,w=!1,E=y.length-1;E>=0;E--){var F=y[E],G=t[F];if(ci(r,F)&&!(r[F]===void 0&&G!==void 0&&Array.isArray(r)===!1)){var te=r[F];typeof G=="object"&&G!=null&&typeof te=="object"&&te!=null?Ya(G,te,i,o+"/"+di(F),s):G!==te&&(A=!0,s&&i.push({op:"test",path:o+"/"+di(F),value:mn(G)}),i.push({op:"replace",path:o+"/"+di(F),value:mn(te)}))}else Array.isArray(t)===Array.isArray(r)?(s&&i.push({op:"test",path:o+"/"+di(F),value:mn(G)}),i.push({op:"remove",path:o+"/"+di(F)}),w=!0):(s&&i.push({op:"test",path:o,value:t}),i.push({op:"replace",path:o,value:r}),A=!0)}if(!(!w&&p.length==y.length))for(var E=0;E<p.length;E++){var F=p[E];!ci(t,F)&&r[F]!==void 0&&i.push({op:"add",path:o+"/"+di(F),value:mn(r[F])})}}}function bu(t,r,i){i===void 0&&(i=!1);var o=[];return Ya(t,r,o,"",i),o}const No=Object.assign({},c,v,{JsonPatchError:gu,deepClone:mn,escapePathComponent:di,unescapePathComponent:ki});var ic=a(31312),Bo=a.n(ic),pi=a(50361),wu=a.n(pi);const nr={add:er,replace:Cn,remove:Ri,merge:Li,mergeDeep:Au,context:rl,getIn:Di,applyPatch:Su,parentPathMatch:nl,flatten:Ja,fullyNormalizeArray:Cu,normalizeArray:il,isPromise:Ou,forEachNew:Eu,forEachNewPrimitive:ac,isJsonPatch:Iu,isContextPatch:sc,isPatch:Vo,isMutation:Qa,isAdditiveMutation:Za,isGenerator:oc,isFunction:Tu,isObject:qn,isError:Pu};function Su(t,r,i){if(i=i||{},r=cr(cr({},r),{},{path:r.path&&xn(r.path)}),r.op==="merge"){var o=Wo(t,r.path);nn()(o,r.value),zn(t,[Cn(r.path,o)])}else if(r.op==="mergeDeep"){var s=Wo(t,r.path);for(var p in r.value){var y=r.value[p],A=Array.isArray(y);if(A){var w=s[p]||[];s[p]=Ct()(w).call(w,y)}else if(qn(y)&&!A){var E=cr({},s[p]);for(var F in y)if(Object.prototype.hasOwnProperty.call(E,F)){E=Bo()(wu()(E),y);break}else nn()(E,Es({},F,y[F]));s[p]=E}else s[p]=y}}else if(r.op==="add"&&r.path===""&&qn(r.value)){var G=Qt()(r.value).reduce(function(ge,Ae){return ge.push({op:"add",path:"/".concat(xn(Ae)),value:r.value[Ae]}),ge},[]);zn(t,G)}else if(r.op==="replace"&&r.path===""){var te=r,ne=te.value;i.allowMetaPatches&&r.meta&&Za(r)&&(Array.isArray(r.value)||qn(r.value))&&(ne=cr(cr({},ne),r.meta)),t=ne}else if(zn(t,[r]),i.allowMetaPatches&&r.meta&&Za(r)&&(Array.isArray(r.value)||qn(r.value))){var se=Wo(t,r.path),ye=cr(cr({},se),r.meta);zn(t,[Cn(r.path,ye)])}return t}function xn(t){return Array.isArray(t)?t.length<1?"":"/".concat(qt()(t).call(t,function(r){return(r+"").replace(/~/g,"~0").replace(/\//g,"~1")}).join("/")):t}function er(t,r){return{op:"add",path:t,value:r}}function Cn(t,r,i){return{op:"replace",path:t,value:r,meta:i}}function Ri(t){return{op:"remove",path:t}}function Li(t,r){return{type:"mutation",op:"merge",path:t,value:r}}function Au(t,r){return{type:"mutation",op:"mergeDeep",path:t,value:r}}function rl(t,r){return{type:"context",path:t,value:r}}function Eu(t,r){try{return Uo(t,jo,r)}catch(i){return i}}function ac(t,r){try{return Uo(t,ta,r)}catch(i){return i}}function Uo(t,r,i){var o,s=qt()(o=ln()(t).call(t,Za)).call(o,function(A){return r(A.value,i,A.path)})||[],p=Ja(s),y=Xa(p);return y}function ta(t,r,i){if(i=i||[],Array.isArray(t))return qt()(t).call(t,function(s,p){return ta(s,r,Ct()(i).call(i,p))});if(qn(t)){var o;return qt()(o=Qt()(t)).call(o,function(s){return ta(t[s],r,Ct()(i).call(i,s))})}return r(t,i[i.length-1],i)}function jo(t,r,i){i=i||[];var o=[];if(i.length>0){var s=r(t,i[i.length-1],i);s&&(o=Ct()(o).call(o,s))}if(Array.isArray(t)){var p=qt()(t).call(t,function(w,E){return jo(w,r,Ct()(i).call(i,E))});p&&(o=Ct()(o).call(o,p))}else if(qn(t)){var y,A=qt()(y=Qt()(t)).call(y,function(w){return jo(t[w],r,Ct()(i).call(i,w))});A&&(o=Ct()(o).call(o,A))}return o=Ja(o),o}function nl(t,r){if(!Array.isArray(r))return!1;for(var i=0,o=r.length;i<o;i+=1)if(r[i]!==t[i])return!1;return!0}function Di(t,r){return r.reduce(function(i,o){return typeof o!="undefined"&&i?i[o]:i},t)}function Cu(t){return Xa(Ja(il(t)))}function il(t){return Array.isArray(t)?t:[t]}function Ja(t){var r;return Ct()(r=[]).apply(r,Pn(qt()(t).call(t,function(i){return Array.isArray(i)?Ja(i):i})))}function Xa(t){return ln()(t).call(t,function(r){return typeof r!="undefined"})}function qn(t){return t&&ir(t)==="object"}function Ou(t){return qn(t)&&Tu(t.then)}function Tu(t){return t&&typeof t=="function"}function Pu(t){return t instanceof Error}function Iu(t){if(Vo(t)){var r=t.op;return r==="add"||r==="remove"||r==="replace"}return!1}function oc(t){return Object.prototype.toString.call(t)==="[object GeneratorFunction]"}function Qa(t){return Iu(t)||Vo(t)&&t.type==="mutation"}function Za(t){return Qa(t)&&(t.op==="add"||t.op==="replace"||t.op==="merge"||t.op==="mergeDeep")}function sc(t){return Vo(t)&&t.type==="context"}function Vo(t){return t&&ir(t)==="object"}function Wo(t,r){try{return Rr(t,r)}catch(i){return console.error(i),{}}}var ha=a(52424),al=a.n(ha),Ho=a(54098),Fu=a(9779),zo=a.n(Fu);function ol(t,r){function i(){Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack;for(var o=arguments.length,s=new Array(o),p=0;p<o;p++)s[p]=arguments[p];this.message=s[0],r&&r.apply(this,s)}return i.prototype=new Error,i.prototype.name=t,i.prototype.constructor=i,i}var lc=a(13692),ku=a.n(lc),Zr=a(47037),Go=a.n(Zr),Mu=["properties"],Ru=["properties"],Lu=["definitions","parameters","responses","securityDefinitions","components/schemas","components/responses","components/parameters","components/securitySchemes"],va=["schema/example","items/example"];function _a(t){var r=t[t.length-1],i=t[t.length-2],o=t.join("/");return Mu.indexOf(r)>-1&&Ru.indexOf(i)===-1||Lu.indexOf(o)>-1||va.some(function(s){return o.indexOf(s)>-1})}function Du(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.specmap,s=i.getBaseUrlForNodePath,p=s===void 0?function(E){var F;return o.getContext(Ct()(F=[]).call(F,Pn(r),Pn(E))).baseDoc}:s,y=i.targetKeys,A=y===void 0?["$ref","$$ref"]:y,w=[];return ku()(t).forEach(function(){if(wo()(A).call(A,this.key)&&Go()(this.node)){var F=this.path,G=Ct()(r).call(r,this.path),te=$o(this.node,p(F));w.push(o.replace(G,te))}}),w}function $o(t,r){var i,o=t.split("#"),s=rn(o,2),p=s[0],y=s[1],A=Pi.resolve(p||"",r||"");return y?Ct()(i="".concat(A,"#")).call(i,y):A}var sl="application/json, application/yaml",ga=new RegExp("^([a-z]+://|//)","i"),ra=ol("JSONRefError",function(r,i,o){this.originalError=o,nn()(this,i||{})}),Fn={},ll=new(al()),qa=[function(t){return t[0]==="paths"&&t[3]==="responses"&&t[5]==="examples"},function(t){return t[0]==="paths"&&t[3]==="responses"&&t[5]==="content"&&t[7]==="example"},function(t){return t[0]==="paths"&&t[3]==="responses"&&t[5]==="content"&&t[7]==="examples"&&t[9]==="value"},function(t){return t[0]==="paths"&&t[3]==="requestBody"&&t[4]==="content"&&t[6]==="example"},function(t){return t[0]==="paths"&&t[3]==="requestBody"&&t[4]==="content"&&t[6]==="examples"&&t[8]==="value"},function(t){return t[0]==="paths"&&t[2]==="parameters"&&t[4]==="example"},function(t){return t[0]==="paths"&&t[3]==="parameters"&&t[5]==="example"},function(t){return t[0]==="paths"&&t[2]==="parameters"&&t[4]==="examples"&&t[6]==="value"},function(t){return t[0]==="paths"&&t[3]==="parameters"&&t[5]==="examples"&&t[7]==="value"},function(t){return t[0]==="paths"&&t[2]==="parameters"&&t[4]==="content"&&t[6]==="example"},function(t){return t[0]==="paths"&&t[2]==="parameters"&&t[4]==="content"&&t[6]==="examples"&&t[8]==="value"},function(t){return t[0]==="paths"&&t[3]==="parameters"&&t[4]==="content"&&t[7]==="example"},function(t){return t[0]==="paths"&&t[3]==="parameters"&&t[5]==="content"&&t[7]==="examples"&&t[9]==="value"}],uc=function(r){return qa.some(function(i){return i(r)})},ya={key:"$ref",plugin:function(r,i,o,s){var p=s.getInstance(),y=In()(o).call(o,0,-1);if(!(_a(y)||uc(y))){var A=s.getContext(o),w=A.baseDoc;if(typeof r!="string")return new ra("$ref: must be a string (JSON-Ref)",{$ref:r,baseDoc:w,fullPath:o});var E=ma(r),F=E[0],G=E[1]||"",te;try{te=w||F?fl(F,w):null}catch(me){return na(me,{pointer:G,$ref:r,basePath:te,fullPath:o})}var ne,se;if(dc(G,te,y,s)&&!p.useCircularStructures){var ye=$o(r,te);return r===ye?null:nr.replace(o,ye)}if(te==null?(se=ei(G),ne=s.get(se),typeof ne=="undefined"&&(ne=new ra("Could not resolve reference: ".concat(r),{pointer:G,$ref:r,baseDoc:w,fullPath:o}))):(ne=xa(te,G),ne.__value!=null?ne=ne.__value:ne=ne.catch(function(me){throw na(me,{pointer:G,$ref:r,baseDoc:w,fullPath:o})})),ne instanceof Error)return[nr.remove(o),ne];var ge=$o(r,te),Ae=nr.replace(y,ne,{$$ref:ge});if(te&&te!==w)return[Ae,nr.context(y,{baseDoc:te})];try{if(!pc(s.state,Ae)||p.useCircularStructures)return Ae}catch(me){return null}}}},ul=nn()(ya,{docCache:Fn,absoluteify:fl,clearCache:eo,JSONRefError:ra,wrapError:na,getDoc:cl,split:ma,extractFromDoc:xa,fetchJSON:fc,extract:Ko,jsonPointerToArray:ei,unescapeJsonPointerToken:ia});const Nu=ul;function fl(t,r){if(!ga.test(t)){if(!r){var i;throw new ra(Ct()(i="Tried to resolve a relative URL, without having a basePath. path: '".concat(t,"' basePath: '")).call(i,r,"'"))}return Pi.resolve(r,t)}return t}function na(t,r){var i;if(t&&t.response&&t.response.body){var o;i=Ct()(o="".concat(t.response.body.code," ")).call(o,t.response.body.message)}else i=t.message;return new ra("Could not resolve reference: ".concat(i),r,t)}function ma(t){return(t+"").split("#")}function xa(t,r){var i=Fn[t];if(i&&!nr.isPromise(i))try{var o=Ko(r,i);return nn()(Zi().resolve(o),{__value:o})}catch(s){return Zi().reject(s)}return cl(t).then(function(s){return Ko(r,s)})}function eo(t){typeof t!="undefined"?delete Fn[t]:Qt()(Fn).forEach(function(r){delete Fn[r]})}function cl(t){var r=Fn[t];return r?nr.isPromise(r)?r:Zi().resolve(r):(Fn[t]=ul.fetchJSON(t).then(function(i){return Fn[t]=i,i}),Fn[t])}function fc(t){return(0,Ho.fetch)(t,{headers:{Accept:sl},loadSpec:!0}).then(function(r){return r.text()}).then(function(r){return Ls().safeLoad(r)})}function Ko(t,r){var i=ei(t);if(i.length<1)return r;var o=nr.getIn(r,i);if(typeof o=="undefined")throw new ra("Could not resolve pointer: ".concat(t," does not exist in document"),{pointer:t});return o}function ei(t){var r;if(typeof t!="string")throw new TypeError("Expected a string, got a ".concat(ir(t)));return t[0]==="/"&&(t=t.substr(1)),t===""?[]:qt()(r=t.split("/")).call(r,ia)}function ia(t){return typeof t!="string"?t:zo().unescape(t.replace(/~1/g,"/").replace(/~0/g,"~"))}function ba(t){return zo().escape(t.replace(/~/g,"~0").replace(/\//g,"~1"))}function cc(t){return t.length===0?"":"/".concat(qt()(t).call(t,ba).join("/"))}var Bu=function(r){return!r||r==="/"||r==="#"};function dl(t,r){if(Bu(r))return!0;var i=t.charAt(r.length),o=In()(r).call(r,-1);return t.indexOf(r)===0&&(!i||i==="/"||i==="#")&&o!=="#"}function dc(t,r,i,o){var s,p,y=ll.get(o);y||(y={},ll.set(o,y));var A=cc(i),w=Ct()(s="".concat(r||"<specmap-base>","#")).call(s,t),E=A.replace(/allOf\/\d+\/?/g,""),F=o.contextTree.get([]).baseDoc;if(r==F&&dl(E,t))return!0;var G="",te=i.some(function(ne){var se;return G=Ct()(se="".concat(G,"/")).call(se,ba(ne)),y[G]&&y[G].some(function(ye){return dl(ye,w)||dl(w,ye)})});if(te)return!0;y[E]=Ct()(p=y[E]||[]).call(p,w)}function pc(t,r){var i=[t];return r.path.reduce(function(s,p){return i.push(s[p]),s[p]},t),o(r.value);function o(s){return nr.isObject(s)&&(i.indexOf(s)>=0||Qt()(s).some(function(p){return o(s[p])}))}}var un=a(41609),Uu=a.n(un);const hc={key:"allOf",plugin:function(r,i,o,s,p){if(!(p.meta&&p.meta.$$ref)){var y=In()(o).call(o,0,-1);if(!_a(y)){if(!Array.isArray(r)){var A=new TypeError("allOf must be an array");return A.fullPath=o,A}var w=!1,E=p.value;if(y.forEach(function(te){!E||(E=E[te])}),E=cr({},E),!Uu()(E)){delete E.allOf;var F=[];if(F.push(s.replace(y,{})),r.forEach(function(te,ne){if(!s.isObject(te)){if(w)return null;w=!0;var se=new TypeError("Elements in allOf must be objects");return se.fullPath=o,F.push(se)}F.push(s.mergeDeep(y,te));var ye=In()(o).call(o,0,-1),ge=Du(te,ye,{getBaseUrlForNodePath:function(me){var Te;return s.getContext(Ct()(Te=[]).call(Te,Pn(o),[ne],Pn(me))).baseDoc},specmap:s});F.push.apply(F,Pn(ge))}),F.push(s.mergeDeep(y,E)),!E.$$ref){var G;F.push(s.remove(Ct()(G=[]).call(G,y,"$$ref")))}return F}}}}},vc={key:"parameters",plugin:function(r,i,o,s){if(Array.isArray(r)&&r.length){var p=nn()([],r),y=In()(o).call(o,0,-1),A=cr({},nr.getIn(s.spec,y));return r.forEach(function(w,E){try{p[E].default=s.parameterMacro(A,w)}catch(G){var F=new Error(G);return F.fullPath=o,F}}),nr.replace(o,p)}return nr.replace(o,r)}},gc={key:"properties",plugin:function(r,i,o,s){var p=cr({},r);for(var y in r)try{p[y].default=s.modelPropertyMacro(p[y])}catch(E){var A=new Error(E);return A.fullPath=o,A}var w=nr.replace(o,p);return w}};var ju=function(){function t(r){Ao(this,t),this.root=Yo(r||{})}return Bs(t,[{key:"set",value:function(i,o){var s=this.getParent(i,!0);if(!s){to(this.root,o,null);return}var p=i[i.length-1],y=s.children;if(y[p]){to(y[p],o,s);return}y[p]=Yo(o,s)}},{key:"get",value:function(i){if(i=i||[],i.length<1)return this.root.value;for(var o=this.root,s,p,y=0;y<i.length&&(p=i[y],s=o.children,!!s[p]);y+=1)o=s[p];return o&&o.protoValue}},{key:"getParent",value:function(i,o){return!i||i.length<1?null:i.length<2?this.root:In()(i).call(i,0,-1).reduce(function(s,p){if(!s)return s;var y=s.children;return!y[p]&&o&&(y[p]=Yo(null,s)),y[p]},this.root)}}]),t}();function Yo(t,r){return to({children:{}},t,r)}function to(t,r,i){return t.value=r||{},t.protoValue=i?cr(cr({},i.protoValue),t.value):t.value,Qt()(t.children).forEach(function(o){var s=t.children[o];t.children[o]=to(s,s.value,t)}),t}var Vu=100,yc=function(){function t(r){var i=this,o,s;Ao(this,t),nn()(this,{spec:"",debugLevel:"info",plugins:[],pluginHistory:{},errors:[],mutations:[],promisedPatches:[],state:{},patches:[],context:{},contextTree:new ju,showDebug:!1,allPatches:[],pluginProp:"specMap",libMethods:nn()(Object.create(this),nr,{getInstance:function(){return i}}),allowMetaPatches:!1},r),this.get=this._get.bind(this),this.getContext=this._getContext.bind(this),this.hasRun=this._hasRun.bind(this),this.wrappedPlugins=ln()(o=qt()(s=this.plugins).call(s,this.wrapPlugin.bind(this))).call(o,nr.isFunction),this.patches.push(nr.add([],this.spec)),this.patches.push(nr.context([],this.context)),this.updatePatches(this.patches)}return Bs(t,[{key:"debug",value:function(i){if(this.debugLevel===i){for(var o,s=arguments.length,p=new Array(s>1?s-1:0),y=1;y<s;y++)p[y-1]=arguments[y];(o=console).log.apply(o,p)}}},{key:"verbose",value:function(i){if(this.debugLevel==="verbose"){for(var o,s,p=arguments.length,y=new Array(p>1?p-1:0),A=1;A<p;A++)y[A-1]=arguments[A];(o=console).log.apply(o,Ct()(s=["[".concat(i,"] ")]).call(s,y))}}},{key:"wrapPlugin",value:function(i,o){var s=this.pathDiscriminator,p=null,y;return i[this.pluginProp]?(p=i,y=i[this.pluginProp]):nr.isFunction(i)?y=i:nr.isObject(i)&&(y=A(i)),nn()(y.bind(p),{pluginName:i.name||o,isGenerator:nr.isGenerator(y)});function A(w){var E=function(G,te){return Array.isArray(G)?G.every(function(ne,se){return ne===te[se]}):!0};return ar().mark(function F(G,te){var ne,se,ye,ge,Ae,me;return ar().wrap(function(He){for(;;)switch(He.prev=He.next){case 0:me=function(ze,De,Ue){var We,Je,et,$e,gt,Nt,zt,or,kr,Er,Qr,br,Dr;return ar().wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:if(nr.isObject(ze)){Yt.next=6;break}if(w.key!==De[De.length-1]){Yt.next=4;break}return Yt.next=4,w.plugin(ze,w.key,De,te);case 4:Yt.next=30;break;case 6:We=De.length-1,Je=De[We],et=De.indexOf("properties"),$e=Je==="properties"&&We===et,gt=te.allowMetaPatches&&se[ze.$$ref],Nt=0,zt=Qt()(ze);case 12:if(!(Nt<zt.length)){Yt.next=30;break}if(or=zt[Nt],kr=ze[or],Er=Ct()(De).call(De,or),Qr=nr.isObject(kr),br=ze.$$ref,gt){Yt.next=22;break}if(!Qr){Yt.next=22;break}return te.allowMetaPatches&&br&&(se[br]=!0),Yt.delegateYield(me(kr,Er,Ue),"t0",22);case 22:if(!(!$e&&or===w.key)){Yt.next=27;break}if(Dr=E(s,De),!(!s||Dr)){Yt.next=27;break}return Yt.next=27,w.plugin(kr,or,Er,te,Ue);case 27:Nt++,Yt.next=12;break;case 30:case"end":return Yt.stop()}},ne)},ne=ar().mark(me),se={},ye=$i(ln()(G).call(G,nr.isAdditiveMutation)),He.prev=4,ye.s();case 6:if((ge=ye.n()).done){He.next=11;break}return Ae=ge.value,He.delegateYield(me(Ae.value,Ae.path,Ae),"t0",9);case 9:He.next=6;break;case 11:He.next=16;break;case 13:He.prev=13,He.t1=He.catch(4),ye.e(He.t1);case 16:return He.prev=16,ye.f(),He.finish(16);case 19:case"end":return He.stop()}},F,null,[[4,13,16,19]])})}}},{key:"nextPlugin",value:function(){var i=this;return hu()(this.wrappedPlugins,function(o){var s=i.getMutationsForPlugin(o);return s.length>0})}},{key:"nextPromisedPatch",value:function(){if(this.promisedPatches.length>0){var i;return Zi().race(qt()(i=this.promisedPatches).call(i,function(o){return o.value}))}}},{key:"getPluginHistory",value:function(i){var o=this.constructor.getPluginName(i);return this.pluginHistory[o]||[]}},{key:"getPluginRunCount",value:function(i){return this.getPluginHistory(i).length}},{key:"getPluginHistoryTip",value:function(i){var o=this.getPluginHistory(i),s=o&&o[o.length-1];return s||{}}},{key:"getPluginMutationIndex",value:function(i){var o=this.getPluginHistoryTip(i).mutationIndex;return typeof o!="number"?-1:o}},{key:"updatePluginHistory",value:function(i,o){var s=this.constructor.getPluginName(i);this.pluginHistory[s]=this.pluginHistory[s]||[],this.pluginHistory[s].push(o)}},{key:"updatePatches",value:function(i){var o=this;nr.normalizeArray(i).forEach(function(s){if(s instanceof Error){o.errors.push(s);return}try{if(!nr.isObject(s)){o.debug("updatePatches","Got a non-object patch",s);return}if(o.showDebug&&o.allPatches.push(s),nr.isPromise(s.value)){o.promisedPatches.push(s),o.promisedPatchThen(s);return}if(nr.isContextPatch(s)){o.setContext(s.path,s.value);return}if(nr.isMutation(s)){o.updateMutations(s);return}}catch(p){console.error(p),o.errors.push(p)}})}},{key:"updateMutations",value:function(i){ir(i.value)==="object"&&!Array.isArray(i.value)&&this.allowMetaPatches&&(i.value=cr({},i.value));var o=nr.applyPatch(this.state,i,{allowMetaPatches:this.allowMetaPatches});o&&(this.mutations.push(i),this.state=o)}},{key:"removePromisedPatch",value:function(i){var o,s=this.promisedPatches.indexOf(i);if(s<0){this.debug("Tried to remove a promisedPatch that isn't there!");return}pu()(o=this.promisedPatches).call(o,s,1)}},{key:"promisedPatchThen",value:function(i){var o=this;return i.value=i.value.then(function(s){var p=cr(cr({},i),{},{value:s});o.removePromisedPatch(i),o.updatePatches(p)}).catch(function(s){o.removePromisedPatch(i),o.updatePatches(s)}),i.value}},{key:"getMutations",value:function(i,o){var s;return i=i||0,typeof o!="number"&&(o=this.mutations.length),In()(s=this.mutations).call(s,i,o)}},{key:"getCurrentMutations",value:function(){return this.getMutationsForPlugin(this.getCurrentPlugin())}},{key:"getMutationsForPlugin",value:function(i){var o=this.getPluginMutationIndex(i);return this.getMutations(o+1)}},{key:"getCurrentPlugin",value:function(){return this.currentPlugin}},{key:"getLib",value:function(){return this.libMethods}},{key:"_get",value:function(i){return nr.getIn(this.state,i)}},{key:"_getContext",value:function(i){return this.contextTree.get(i)}},{key:"setContext",value:function(i,o){return this.contextTree.set(i,o)}},{key:"_hasRun",value:function(i){var o=this.getPluginRunCount(this.getCurrentPlugin());return o>(i||0)}},{key:"dispatch",value:function(){var i=this,o=this,s=this.nextPlugin();if(!s){var p=this.nextPromisedPatch();if(p)return p.then(function(){return i.dispatch()}).catch(function(){return i.dispatch()});var y={spec:this.state,errors:this.errors};return this.showDebug&&(y.patches=this.allPatches),Zi().resolve(y)}if(o.pluginCount=o.pluginCount||{},o.pluginCount[s]=(o.pluginCount[s]||0)+1,o.pluginCount[s]>Vu){var A;return Zi().resolve({spec:o.state,errors:Ct()(A=o.errors).call(A,new Error("We've reached a hard limit of ".concat(Vu," plugin runs")))})}if(s!==this.currentPlugin&&this.promisedPatches.length){var w,E=qt()(w=this.promisedPatches).call(w,function(te){return te.value});return Zi().all(qt()(E).call(E,function(te){return te.then(pa(),pa())})).then(function(){return i.dispatch()})}return F();function F(){o.currentPlugin=s;var te=o.getCurrentMutations(),ne=o.mutations.length-1;try{if(s.isGenerator){var se=$i(s(te,o.getLib())),ye;try{for(se.s();!(ye=se.n()).done;){var ge=ye.value;G(ge)}}catch(me){se.e(me)}finally{se.f()}}else{var Ae=s(te,o.getLib());G(Ae)}}catch(me){console.error(me),G([nn()(Object.create(me),{plugin:s})])}finally{o.updatePluginHistory(s,{mutationIndex:ne})}return o.dispatch()}function G(te){te&&(te=nr.fullyNormalizeArray(te),o.updatePatches(te,s))}}}],[{key:"getPluginName",value:function(i){return i.pluginName}},{key:"getPatchesOfType",value:function(i,o){return ln()(i).call(i,o)}}]),t}();function mc(t){return new yc(t).dispatch()}var bn={refs:Nu,allOf:hc,parameters:vc,properties:gc},ro=a(13218),no=a.n(ro),wa=function(r){return String.prototype.toLowerCase.call(r)},ti=function(r){return r.replace(/[^\w]/gi,"_")};function Wu(t){var r=t.openapi;return r?zi()(r,"3"):!1}function Id(t){var r=t.swagger;return r?startsWith(r,"2"):!1}function hi(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=o.v2OperationIdCompatibilityMode;if(!t||ir(t)!=="object")return null;var p=(t.operationId||"").replace(/\s/g,"");return p.length?ti(t.operationId):Hu(r,i,{v2OperationIdCompatibilityMode:s})}function Hu(t,r){var i,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=o.v2OperationIdCompatibilityMode;if(s){var p,y,A=Ct()(p="".concat(r.toLowerCase(),"_")).call(p,t).replace(/[\s!@#$%^&*()_+=[{\]};:<>|./?,\\'""-]/g,"_");return A=A||Ct()(y="".concat(t.substring(1),"_")).call(y,r),A.replace(/((_){2,})/g,"_").replace(/^(_)*/g,"").replace(/([_])*$/g,"")}return Ct()(i="".concat(wa(r))).call(i,ti(t))}function pl(t,r){var i;return Ct()(i="".concat(wa(r),"-")).call(i,t)}function zu(t,r){return!t||!t.paths?null:Jo(t,function(i){var o=i.pathName,s=i.method,p=i.operation;if(!p||ir(p)!=="object")return!1;var y=p.operationId,A=hi(p,o,s),w=pl(o,s);return[A,w,y].some(function(E){return E&&E===r})})}function Jo(t,r){return aa(t,r,!0)||null}function aa(t,r,i){if(!t||ir(t)!=="object"||!t.paths||ir(t.paths)!=="object")return null;var o=t.paths;for(var s in o)for(var p in o[s])if(p.toUpperCase()!=="PARAMETERS"){var y=o[s][p];if(!(!y||ir(y)!=="object")){var A={spec:t,pathName:s,method:p.toUpperCase(),operation:y},w=r(A);if(i&&w)return A}}}function Xo(t){var r=t.spec,i=r.paths,o={};if(!i||r.$$normalized)return t;for(var s in i){var p=i[s];if(!!no()(p)){var y=p.parameters,A=function(G){var te=p[G];if(!no()(te))return"continue";var ne=hi(te,s,G);if(ne){o[ne]?o[ne].push(te):o[ne]=[te];var se=o[ne];if(se.length>1)se.forEach(function(Je,et){var $e;Je.__originalOperationId=Je.__originalOperationId||Je.operationId,Je.operationId=Ct()($e="".concat(ne)).call($e,et+1)});else if(typeof te.operationId!="undefined"){var ye=se[0];ye.__originalOperationId=ye.__originalOperationId||te.operationId,ye.operationId=ne}}if(G!=="parameters"){var ge=[],Ae={};for(var me in r)(me==="produces"||me==="consumes"||me==="security")&&(Ae[me]=r[me],ge.push(Ae));if(y&&(Ae.parameters=y,ge.push(Ae)),ge.length){var Te=$i(ge),He;try{for(Te.s();!(He=Te.n()).done;){var Be=He.value;for(var ze in Be)if(!te[ze])te[ze]=Be[ze];else if(ze==="parameters"){var De=$i(Be[ze]),Ue;try{var We=function(){var et=Ue.value,$e=te[ze].some(function(gt){return gt.name&>.name===et.name||gt.$ref&>.$ref===et.$ref||gt.$$ref&>.$$ref===et.$$ref||gt===et});$e||te[ze].push(et)};for(De.s();!(Ue=De.n()).done;)We()}catch(Je){De.e(Je)}finally{De.f()}}}}catch(Je){Te.e(Je)}finally{Te.f()}}}};for(var w in p)var E=A(w)}}return r.$$normalized=!0,t}function Qo(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.requestInterceptor,o=r.responseInterceptor,s=t.withCredentials?"include":"same-origin";return function(p){return t({url:p,loadSpec:!0,requestInterceptor:i,responseInterceptor:o,headers:{Accept:sl},credentials:s}).then(function(y){return y.body})}}function hl(){bn.refs.clearCache()}function Gu(t){var r=t.fetch,i=t.spec,o=t.url,s=t.mode,p=t.allowMetaPatches,y=p===void 0?!0:p,A=t.pathDiscriminator,w=t.modelPropertyMacro,E=t.parameterMacro,F=t.requestInterceptor,G=t.responseInterceptor,te=t.skipNormalization,ne=t.useCircularStructures,se=t.http,ye=t.baseDoc;if(ye=ye||o,se=r||se||Fi,!i)return Qo(se,{requestInterceptor:F,responseInterceptor:G})(ye).then(ge);return ge(i);function ge(Ae){ye&&(bn.refs.docCache[ye]=Ae),bn.refs.fetchJSON=Qo(se,{requestInterceptor:F,responseInterceptor:G});var me=[bn.refs];return typeof E=="function"&&me.push(bn.parameters),typeof w=="function"&&me.push(bn.properties),s!=="strict"&&me.push(bn.allOf),mc({spec:Ae,context:{baseDoc:ye},plugins:me,allowMetaPatches:y,pathDiscriminator:A,parameterMacro:E,modelPropertyMacro:w,useCircularStructures:ne}).then(te?function(){var Te=ks(ar().mark(function He(Be){return ar().wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return De.abrupt("return",Be);case 1:case"end":return De.stop()}},He)}));return function(He){return Te.apply(this,arguments)}}():Xo)}}var io=a(27361),Sa=a.n(io);function xc(t,r){return Zo.apply(this,arguments)}function Zo(){return Zo=ks(ar().mark(function t(r,i){var o,s,p,y,A,w,E,F,G,te,ne,se,ye=arguments;return ar().wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:return o=ye.length>2&&ye[2]!==void 0?ye[2]:{},s=o.returnEntireTree,p=o.baseDoc,y=o.requestInterceptor,A=o.responseInterceptor,w=o.parameterMacro,E=o.modelPropertyMacro,F=o.useCircularStructures,G={pathDiscriminator:i,baseDoc:p,requestInterceptor:y,responseInterceptor:A,parameterMacro:w,modelPropertyMacro:E,useCircularStructures:F},te=Xo({spec:r}),ne=te.spec,Ae.next=6,Gu(cr(cr({},G),{},{spec:ne,allowMetaPatches:!0,skipNormalization:!0}));case 6:return se=Ae.sent,!s&&Array.isArray(i)&&i.length&&(se.spec=Sa()(se.spec,i)||null),Ae.abrupt("return",se);case 9:case"end":return Ae.stop()}},t)})),Zo.apply(this,arguments)}var _o=function(){return null},bc=function(r){return Array.isArray(r)?r:[r]},qo={mapTagOperations:Sc,makeExecute:ao};function ao(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return function(r){var i=r.pathName,o=r.method,s=r.operationId;return function(p){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.execute(cr(cr({spec:t.spec},So()(t,"requestInterceptor","responseInterceptor","userFetch")),{},{pathName:i,method:o,parameters:p,operationId:s},y))}}}function wc(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=qo.makeExecute(t),i=qo.mapTagOperations({v2OperationIdCompatibilityMode:t.v2OperationIdCompatibilityMode,spec:t.spec,cb:r}),o={};for(var s in i){o[s]={operations:{}};for(var p in i[s])o[s].operations[p]={execute:i[s][p]}}return{apis:o}}function $u(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=qo.makeExecute(t);return{apis:qo.mapTagOperations({v2OperationIdCompatibilityMode:t.v2OperationIdCompatibilityMode,spec:t.spec,cb:r})}}function Sc(t){var r=t.spec,i=t.cb,o=i===void 0?_o:i,s=t.defaultTag,p=s===void 0?"default":s,y=t.v2OperationIdCompatibilityMode,A={},w={};return aa(r,function(E){var F=E.pathName,G=E.method,te=E.operation,ne=te.tags?bc(te.tags):[p];ne.forEach(function(se){if(typeof se=="string"){w[se]=w[se]||{};var ye=w[se],ge=hi(te,F,G,{v2OperationIdCompatibilityMode:y}),Ae=o({spec:r,pathName:F,method:G,operation:te,operationId:ge});if(A[ge]){var me;A[ge]+=1,ye[Ct()(me="".concat(ge)).call(me,A[ge])]=Ae}else if(typeof ye[ge]!="undefined"){var Te,He,Be=A[ge]||1;A[ge]=Be+1,ye[Ct()(Te="".concat(ge)).call(Te,A[ge])]=Ae;var ze=ye[ge];delete ye[ge],ye[Ct()(He="".concat(ge)).call(He,Be)]=ze}else ye[ge]=Ae}})}),w}var es=a(95683);function Ku(t,r){if(t==null)return{};var i={},o=As(t),s,p;for(p=0;p<o.length;p++)s=o[p],!(es(r).call(r,s)>=0)&&(i[s]=t[s]);return i}function Ac(t,r){if(t==null)return{};var i=Ku(t,r),o,s;if(Wi){var p=Wi(t);for(s=0;s<p.length;s++)o=p[s],!(es(r).call(r,o)>=0)&&(!Object.prototype.propertyIsEnumerable.call(t,o)||(i[o]=t[o]))}return i}var Yu=a(68630),vl=a.n(Yu),Ec=a(1469),gl=a.n(Ec),oo=a(76489);const so={body:Cc,header:Oc,query:Pc,path:Tc,formData:Ju};function Cc(t){var r=t.req,i=t.value;r.body=i}function Ju(t){var r=t.req,i=t.value,o=t.parameter;(i||o.allowEmptyValue)&&(r.form=r.form||{},r.form[o.name]={value:i,allowEmptyValue:o.allowEmptyValue,collectionFormat:o.collectionFormat})}function Oc(t){var r=t.req,i=t.parameter,o=t.value;r.headers=r.headers||{},typeof o!="undefined"&&(r.headers[i.name]=o)}function Tc(t){var r=t.req,i=t.value,o=t.parameter;r.url=r.url.split("{".concat(o.name,"}")).join(encodeURIComponent(i))}function Pc(t){var r=t.req,i=t.value,o=t.parameter;if(r.query=r.query||{},i===!1&&o.type==="boolean"&&(i="false"),i===0&&["number","integer"].indexOf(o.type)>-1&&(i="0"),i)r.query[o.name]={collectionFormat:o.collectionFormat,value:i};else if(o.allowEmptyValue&&i!==void 0){var s=o.name;r.query[s]=r.query[s]||{},r.query[s].allowEmptyValue=!0}}function ts(t,r){return wo()(r).call(r,"application/json")?typeof t=="string"?t:La()(t):t.toString()}function Xu(t){var r=t.req,i=t.value,o=t.parameter,s=o.name,p=o.style,y=o.explode,A=o.content;if(A){var w=Qt()(A)[0];r.url=r.url.split("{".concat(s,"}")).join(Mr(ts(i,w),{escape:!0}));return}var E=_n({key:o.name,value:i,style:p||"simple",explode:y||!1,escape:!0});r.url=r.url.split("{".concat(s,"}")).join(E)}function Ic(t){var r=t.req,i=t.value,o=t.parameter;if(r.query=r.query||{},o.content){var s=Qt()(o.content)[0];r.query[o.name]=ts(i,s);return}if(i===!1&&(i="false"),i===0&&(i="0"),i)r.query[o.name]={value:i,serializationOption:So()(o,["style","explode","allowReserved"])};else if(o.allowEmptyValue&&i!==void 0){var p=o.name;r.query[p]=r.query[p]||{},r.query[p].allowEmptyValue=!0}}var Fc=["accept","authorization","content-type"];function Qu(t){var r=t.req,i=t.parameter,o=t.value;if(r.headers=r.headers||{},!(Fc.indexOf(i.name.toLowerCase())>-1)){if(i.content){var s=Qt()(i.content)[0];r.headers[i.name]=ts(o,s);return}typeof o!="undefined"&&(r.headers[i.name]=_n({key:i.name,value:o,style:i.style||"simple",explode:typeof i.explode=="undefined"?!1:i.explode,escape:!1}))}}function yl(t){var r=t.req,i=t.parameter,o=t.value;r.headers=r.headers||{};var s=ir(o);if(i.content){var p,y=Qt()(i.content)[0];r.headers.Cookie=Ct()(p="".concat(i.name,"=")).call(p,ts(o,y));return}if(s!=="undefined"){var A=s==="object"&&!Array.isArray(o)&&i.explode?"":"".concat(i.name,"=");r.headers.Cookie=A+_n({key:i.name,value:o,escape:!1,style:i.style||"form",explode:typeof i.explode=="undefined"?!1:i.explode})}}var Zu=a(50706),_u=a.n(Zu);function qu(t,r){var i=t.operation,o=t.requestBody,s=t.securities,p=t.spec,y=t.attachContentTypeForEmptyPayload,A=t.requestContentType;r=Aa({request:r,securities:s,operation:i,spec:p});var w=i.requestBody||{},E=Qt()(w.content||{}),F=A&&E.indexOf(A)>-1;if(o||y){if(A&&F)r.headers["Content-Type"]=A;else if(!A){var G=E[0];G&&(r.headers["Content-Type"]=G,A=G)}}else A&&F&&(r.headers["Content-Type"]=A);if(!t.responseContentType&&i.responses){var te,ne=ln()(te=Da()(i.responses)).call(te,function(ye){var ge=rn(ye,2),Ae=ge[0],me=ge[1],Te=parseInt(Ae,10);return Te>=200&&Te<300&&vl()(me.content)}).reduce(function(ye,ge){var Ae=rn(ge,2),me=Ae[1];return Ct()(ye).call(ye,Qt()(me.content))},[]);ne.length>0&&(r.headers.accept=ne.join(", "))}if(o)if(A){if(E.indexOf(A)>-1)if(A==="application/x-www-form-urlencoded"||A==="multipart/form-data")if(ir(o)==="object"){var se=(w.content[A]||{}).encoding||{};r.form={},Qt()(o).forEach(function(ye){r.form[ye]={value:o[ye],encoding:se[ye]||{}}})}else r.form=o;else r.body=o}else r.body=o;return r}function Aa(t){var r=t.request,i=t.securities,o=i===void 0?{}:i,s=t.operation,p=s===void 0?{}:s,y=t.spec,A=Hi()({},r),w=o.authorized,E=w===void 0?{}:w,F=p.security||y.security||[],G=E&&!!Qt()(E).length,te=Sa()(y,["components","securitySchemes"])||{};return A.headers=A.headers||{},A.query=A.query||{},!Qt()(o).length||!G||!F||Array.isArray(p.security)&&!p.security.length?r:(F.forEach(function(ne){Qt()(ne).forEach(function(se){var ye=E[se],ge=te[se];if(!!ye){var Ae=ye.value||ye,me=ge.type;if(ye){if(me==="apiKey")ge.in==="query"&&(A.query[ge.name]=Ae),ge.in==="header"&&(A.headers[ge.name]=Ae),ge.in==="cookie"&&(A.cookies[ge.name]=Ae);else if(me==="http"){if(/^basic$/i.test(ge.scheme)){var Te,He=Ae.username||"",Be=Ae.password||"",ze=_u()(Ct()(Te="".concat(He,":")).call(Te,Be));A.headers.Authorization="Basic ".concat(ze)}/^bearer$/i.test(ge.scheme)&&(A.headers.Authorization="Bearer ".concat(Ae))}else if(me==="oauth2"||me==="openIdConnect"){var De,Ue=ye.token||{},We=ge["x-tokenName"]||"access_token",Je=Ue[We],et=Ue.token_type;(!et||et.toLowerCase()==="bearer")&&(et="Bearer"),A.headers.Authorization=Ct()(De="".concat(et," ")).call(De,Je)}}}})}),A)}function ef(t,r){var i=t.spec,o=t.operation,s=t.securities,p=t.requestContentType,y=t.responseContentType,A=t.attachContentTypeForEmptyPayload;if(r=rs({request:r,securities:s,operation:o,spec:i}),r.body||r.form||A){var w,E;if(p)r.headers["Content-Type"]=p;else if(Array.isArray(o.consumes)){var F=rn(o.consumes,1);r.headers["Content-Type"]=F[0]}else if(Array.isArray(i.consumes)){var G=rn(i.consumes,1);r.headers["Content-Type"]=G[0]}else o.parameters&&ln()(w=o.parameters).call(w,function(ge){return ge.type==="file"}).length?r.headers["Content-Type"]="multipart/form-data":o.parameters&&ln()(E=o.parameters).call(E,function(ge){return ge.in==="formData"}).length&&(r.headers["Content-Type"]="application/x-www-form-urlencoded")}else if(p){var te,ne,se=o.parameters&&ln()(te=o.parameters).call(te,function(ge){return ge.in==="body"}).length>0,ye=o.parameters&&ln()(ne=o.parameters).call(ne,function(ge){return ge.in==="formData"}).length>0;(se||ye)&&(r.headers["Content-Type"]=p)}return!y&&Array.isArray(o.produces)&&o.produces.length>0&&(r.headers.accept=o.produces.join(", ")),r}function rs(t){var r=t.request,i=t.securities,o=i===void 0?{}:i,s=t.operation,p=s===void 0?{}:s,y=t.spec,A=Hi()({},r),w=o.authorized,E=w===void 0?{}:w,F=o.specSecurity,G=F===void 0?[]:F,te=p.security||G,ne=E&&!!Qt()(E).length,se=y.securityDefinitions;return A.headers=A.headers||{},A.query=A.query||{},!Qt()(o).length||!ne||!te||Array.isArray(p.security)&&!p.security.length?r:(te.forEach(function(ye){Qt()(ye).forEach(function(ge){var Ae=E[ge];if(!!Ae){var me=Ae.token,Te=Ae.value||Ae,He=se[ge],Be=He.type,ze=He["x-tokenName"]||"access_token",De=me&&me[ze],Ue=me&&me.token_type;if(Ae){if(Be==="apiKey"){var We=He.in==="query"?"query":"headers";A[We]=A[We]||{},A[We][He.name]=Te}else if(Be==="basic")if(Te.header)A.headers.authorization=Te.header;else{var Je,et=Te.username||"",$e=Te.password||"";Te.base64=_u()(Ct()(Je="".concat(et,":")).call(Je,$e)),A.headers.authorization="Basic ".concat(Te.base64)}else if(Be==="oauth2"&&De){var gt;Ue=!Ue||Ue.toLowerCase()==="bearer"?"Bearer":Ue,A.headers.authorization=Ct()(gt="".concat(Ue," ")).call(gt,De)}}}})}),A)}var tf=function(r){return Array.isArray(r)?r:[]},kc=ol("OperationNotFoundError",function(r,i,o){this.originalError=o,nn()(this,i||{})}),Mc=function(r,i){return ln()(i).call(i,function(o){return o.name===r})},hr=function(r){var i={};r.forEach(function(s){i[s.in]||(i[s.in]={}),i[s.in][s.name]=s});var o=[];return Qt()(i).forEach(function(s){Qt()(i[s]).forEach(function(p){o.push(i[s][p])})}),o},Rc={buildRequest:Ea};function ml(t){var r=t.http,i=t.fetch,o=t.spec,s=t.operationId,p=t.pathName,y=t.method,A=t.parameters,w=t.securities,E=Ac(t,["http","fetch","spec","operationId","pathName","method","parameters","securities"]),F=r||i||Fi;p&&y&&!s&&(s=pl(p,y));var G=Rc.buildRequest(cr({spec:o,operationId:s,parameters:A,securities:w,http:F},E));return G.body&&(vl()(G.body)||gl()(G.body))&&(G.body=La()(G.body)),F(G)}function Ea(t){var r,i,o=t.spec,s=t.operationId,p=t.responseContentType,y=t.scheme,A=t.requestInterceptor,w=t.responseInterceptor,E=t.contextUrl,F=t.userFetch,G=t.server,te=t.serverVariables,ne=t.http,se=t.parameters,ye=t.parameterBuilders,ge=Wu(o);ye||(ge?ye=x:ye=so);var Ae=ne&&ne.withCredentials?"include":"same-origin",me={url:"",credentials:Ae,headers:{},cookies:{}};A&&(me.requestInterceptor=A),w&&(me.responseInterceptor=w),F&&(me.userFetch=F);var Te=zu(o,s);if(!Te)throw new kc("Operation ".concat(s," not found"));var He=Te.operation,Be=He===void 0?{}:He,ze=Te.method,De=Te.pathName;if(me.url+=lo({spec:o,scheme:y,contextUrl:E,server:G,serverVariables:te,pathName:De,method:ze}),!s)return delete me.cookies,me;me.url+=De,me.method="".concat(ze).toUpperCase(),se=se||{};var Ue=o.paths[De]||{};p&&(me.headers.accept=p);var We=hr(Ct()(r=Ct()(i=[]).call(i,tf(Be.parameters))).call(r,tf(Ue.parameters)));We.forEach(function($e){var gt=ye[$e.in],Nt;if($e.in==="body"&&$e.schema&&$e.schema.properties&&(Nt=se),Nt=$e&&$e.name&&se[$e.name],typeof Nt=="undefined"){var zt;Nt=$e&&$e.name&&se[Ct()(zt="".concat($e.in,".")).call(zt,$e.name)]}else if(Mc($e.name,We).length>1){var or;console.warn(Ct()(or="Parameter '".concat($e.name,"' is ambiguous because the defined spec has more than one parameter with the name: '")).call(or,$e.name,"' and the passed-in parameter values did not define an 'in' value."))}if(Nt!==null){if(typeof $e.default!="undefined"&&typeof Nt=="undefined"&&(Nt=$e.default),typeof Nt=="undefined"&&$e.required&&!$e.allowEmptyValue)throw new Error("Required parameter ".concat($e.name," is not provided"));if(ge&&$e.schema&&$e.schema.type==="object"&&typeof Nt=="string")try{Nt=JSON.parse(Nt)}catch(kr){throw new Error("Could not parse object parameter value string as JSON")}gt&>({req:me,parameter:$e,value:Nt,operation:Be,spec:o})}});var Je=cr(cr({},t),{},{operation:Be});if(ge?me=qu(Je,me):me=ef(Je,me),me.cookies&&Qt()(me.cookies).length){var et=Qt()(me.cookies).reduce(function($e,gt){var Nt=me.cookies[gt],zt=$e?"&":"",or=oo.serialize(gt,Nt);return $e+zt+or},"");me.headers.Cookie=et}return me.cookies&&delete me.cookies,du(me),me}var On=function(r){return r?r.replace(/\W/g,""):null};function lo(t){var r=Wu(t.spec);return r?xl(t):af(t)}function xl(t){var r=t.spec,i=t.pathName,o=t.method,s=t.server,p=t.contextUrl,y=t.serverVariables,A=y===void 0?{}:y,w=Sa()(r,["paths",i,(o||"").toLowerCase(),"servers"])||Sa()(r,["paths",i,"servers"])||Sa()(r,["servers"]),E="",F=null;if(s&&w&&w.length){var G=qt()(w).call(w,function(se){return se.url});G.indexOf(s)>-1&&(E=s,F=w[G.indexOf(s)])}if(!E&&w&&w.length){E=w[0].url;var te=rn(w,1);F=te[0]}if(E.indexOf("{")>-1){var ne=nf(E);ne.forEach(function(se){if(F.variables&&F.variables[se]){var ye=F.variables[se],ge=A[se]||ye.default,Ae=new RegExp("{".concat(se,"}"),"g");E=E.replace(Ae,ge)}})}return rf(E,p)}function rf(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",i=t&&r?Pi.parse(Pi.resolve(r,t)):Pi.parse(t),o=Pi.parse(r),s=On(i.protocol)||On(o.protocol)||"",p=i.host||o.host,y=i.pathname||"",A;if(s&&p){var w;A=Ct()(w="".concat(s,"://")).call(w,p+y)}else A=y;return A[A.length-1]==="/"?In()(A).call(A,0,-1):A}function nf(t){for(var r=[],i=/{([^}]+)}/g,o;o=i.exec(t);)r.push(o[1]);return r}function af(t){var r=t.spec,i=t.scheme,o=t.contextUrl,s=o===void 0?"":o,p=Pi.parse(s),y=Array.isArray(r.schemes)?r.schemes[0]:null,A=i||y||On(p.protocol)||"http",w=r.host||p.host||"",E=r.basePath||"",F;if(A&&w){var G;F=Ct()(G="".concat(A,"://")).call(G,w+E)}else F=E;return F[F.length-1]==="/"?In()(F).call(F,0,-1):F}xr.http=Fi,xr.makeHttp=Js.bind(null,xr.http),xr.resolve=Gu,xr.resolveSubtree=xc,xr.execute=ml,xr.serializeRes=fu,xr.serializeHeaders=Ks,xr.clearCache=hl,xr.makeApisTagOperation=$u,xr.buildRequest=Ea,xr.helpers={opId:hi},xr.getBaseUrl=lo;function xr(t){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof t=="string"?i.url=t:i=t,!(this instanceof xr))return new xr(i);Hi()(this,i);var o=this.resolve().then(function(){return r.disableInterfaces||Hi()(r,xr.makeApisTagOperation(r)),r});return o.client=this,o}xr.prototype={http:Fi,execute:function(r){return this.applyDefaults(),xr.execute(cr({spec:this.spec,http:this.http,securities:{authorized:this.authorizations},contextUrl:typeof this.url=="string"?this.url:void 0,requestInterceptor:this.requestInterceptor||null,responseInterceptor:this.responseInterceptor||null},r))},resolve:function(){var r=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return xr.resolve(cr({spec:this.spec,url:this.url,http:this.http||this.fetch,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,requestInterceptor:this.requestInterceptor||null,responseInterceptor:this.responseInterceptor||null},i)).then(function(o){return r.originalSpec=r.spec,r.spec=o.spec,r.errors=o.errors,r})}},xr.prototype.applyDefaults=function(){var r=this.spec,i=this.url;if(i&&zi()(i,"http")){var o=Pi.parse(i);r.host||(r.host=o.host),r.schemes||(r.schemes=[o.protocol.replace(":","")]),r.basePath||(r.basePath="/")}};var Lc=xr.helpers;const Dc=xr;var Gt=a(25446),bl=a(11429),Wt=a(76671),of=a(7930),uo=a(51027),vi=a(50771),sf=a(17673),Gn=a(64776),Nc=Object.defineProperty,wr=Object.defineProperties,Bc=Object.getOwnPropertyDescriptors,lf=Object.getOwnPropertySymbols,Uc=Object.prototype.hasOwnProperty,ns=Object.prototype.propertyIsEnumerable,e=(t,r,i)=>r in t?Nc(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,n=(t,r)=>{for(var i in r||(r={}))Uc.call(r,i)&&e(t,i,r[i]);if(lf)for(var i of lf(r))ns.call(r,i)&&e(t,i,r[i]);return t},u=(t,r)=>wr(t,Bc(r)),l=(t,r,i)=>new Promise((o,s)=>{var p=w=>{try{A(i.next(w))}catch(E){s(E)}},y=w=>{try{A(i.throw(w))}catch(E){s(E)}},A=w=>w.done?o(w.value):Promise.resolve(w.value).then(p,y);A((i=i.apply(t,r)).next())});const f="/oauth2-redirect.html";class m{static authorizeImplicit({authorizationUrl:r,clientId:i,scopes:o,extraParams:s={},routingBasePath:p,redirectUri:y,successCallback:A,errorCallback:w}){const E=(0,Gn.p8)({date:new Date().toString()}),F=new URL(r),G=p==="/"?"":p,te=`${window.location.origin}${G}${f}`;F.searchParams.set("client_id",i),F.searchParams.set("redirect_uri",y||te),F.searchParams.set("response_type","token"),F.searchParams.set("state",E),Array.isArray(o)&&F.searchParams.set("scope",o.join(" "));for(const ne in s)F.searchParams.set(ne,s[ne]);window.redirectOAuth2={flow:"implicit",data:{authorizationUrl:r,clientId:i,scopes:o},state:E,successCallback:ne=>{A(ne),m.clearRedirectData("implicit")},errorCallback:ne=>{w(ne),m.clearRedirectData("implicit")}},window.open(F.toString())}static authorizeAuthorizationCode({authorizationUrl:r,tokenUrl:i,clientId:o,clientSecret:s,codeVerifier:p,codeChallenge:y,scopes:A,extraParams:w={},extraHeaders:E={},routingBasePath:F,redirectUri:G,successCallback:te,errorCallback:ne}){const se=new URL(r),ye=F==="/"?"":F,ge=`${window.location.origin}${ye}${f}`,Ae=(0,Gn.p8)({date:new Date().toString()});se.searchParams.set("client_id",o),se.searchParams.set("redirect_uri",G||ge),se.searchParams.set("response_type","code"),se.searchParams.set("state",Ae),Array.isArray(A)&&se.searchParams.set("scope",A.join(" ")),y&&(se.searchParams.set("code_challenge",y),se.searchParams.set("code_challenge_method","S256"));for(const me in w)se.searchParams.set(me,w[me]);window.redirectOAuth2={flow:"authorizationCode",data:{authorizationUrl:r,clientId:o,scopes:A},state:Ae,successCallback:me=>l(this,[me],function*({auth_code:Te}){try{const He=yield fetch(i,{method:"POST",headers:n({"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},E),body:sf.stringify(n(u(n({client_id:o,client_secret:s},p&&{code_verifier:p}),{code:Te,grant_type:"authorization_code",redirect_uri:G||ge}),w))});yield U(He,te,ne)}catch(He){ne(He)}m.clearRedirectData("authorizationCode")}),errorCallback:me=>{ne(me),m.clearRedirectData("authorizationCode")}},window.open(se.toString())}static clearRedirectData(r){window.redirectOAuth2={flow:r,data:{authorizationUrl:"",clientId:"",scopes:[]},state:"",successCallback:()=>{},errorCallback:()=>{}}}static authorizeClientCredentials(r){return l(this,arguments,function*({tokenUrl:i,clientId:o,clientSecret:s,scopes:p=[],extraParams:y={},extraHeaders:A={},successCallback:w,errorCallback:E}){try{const F=JSON.parse(JSON.stringify(n({client_id:o,client_secret:s,grant_type:"client_credentials",scope:Array.isArray(p)&&p.length?p.join(" "):void 0},y))),G=yield fetch(i,{method:"POST",headers:n({"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},A),body:sf.stringify(F)});yield U(G,w,E)}catch(F){E(F)}})}}const k=new m;function U(t,r,i){return l(this,null,function*(){if(t.ok){const o=yield t.json();r(o)}else i(new Error((t.headers.get("Content-Type")||"").indexOf("json")>-1?JSON.stringify(yield t.json()):yield t.text()))})}function H(t){return l(this,null,function*(){return(0,Gn.rS)(yield(0,Gn.JQ)(t))})}var Z=a(68929),be;(function(t){t.STRING="string",t.ARRAY="array",t.OBJECT="object"})(be||(be={}));var Ce;(function(t){t.BYTE="byte",t.BASE64="base64",t.BINARY="binary"})(Ce||(Ce={}));var Ne=(t,r,i)=>new Promise((o,s)=>{var p=w=>{try{A(i.next(w))}catch(E){s(E)}},y=w=>{try{A(i.throw(w))}catch(E){s(E)}},A=w=>w.done?o(w.value):Promise.resolve(w.value).then(p,y);A((i=i.apply(t,r)).next())});const ke=Object.values(Ce),Ye=["application/octet-stream","application/pdf","application/gzip","application/zip"],tt=["image/","audio/","video/"];function ot(t){if(tt.some(r=>t.startsWith(r)))return t}function ct(t){return Ye.includes(t)?!0:tt.some(r=>t.startsWith(r))}function yt(t){const r=t.type==="array"?t.items:t;if(!r||!r.type||(r==null?void 0:r.type)==="any")return!0;const i=r.contentMediaType||"",o=r.format||r.contentEncoding||(ct(i)?"binary":"");return r.type===be.STRING&&ke.includes(o)}function dt(t,r){if(!t||!t.type||t.type==="any")return ct(r);const i=t.format||t.contentEncoding||"";return t.type===be.STRING&&ke.includes(i)}function bt(t){return new Promise((r,i)=>{const o=new FileReader;o.onload=()=>{const p=o.result.replace(/data:.*\/.*;base64,/g,"");r(p)},o.onerror=()=>i(o.error),o.readAsDataURL(t)})}function Ft({format:t,contentEncoding:r,contentMediaType:i}){return[t,r,i].includes(Ce.BASE64)}function It(t,r){return Ne(this,null,function*(){const i=Object.values(t);let o=i.length===1?i[0]:i;return r.type===be.STRING&&Ft(r)?o=yield bt(i[0]):r.type===be.ARRAY&&r.items&&(Ft(r.items)?o=yield Promise.all(i.map(p=>Ne(this,null,function*(){return yield bt(p)}))):o=i),o})}var it=a(39713),Tt=a(58804),Sr=a(8418),vr=a(32335),wn=Object.defineProperty,fn=Object.defineProperties,Ir=Object.getOwnPropertyDescriptors,Yr=Object.getOwnPropertySymbols,Vr=Object.prototype.hasOwnProperty,Fr=Object.prototype.propertyIsEnumerable,Ar=(t,r,i)=>r in t?wn(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,dr=(t,r)=>{for(var i in r||(r={}))Vr.call(r,i)&&Ar(t,i,r[i]);if(Yr)for(var i of Yr(r))Fr.call(r,i)&&Ar(t,i,r[i]);return t},cn=(t,r)=>fn(t,Ir(r)),Ca=(t,r)=>{var i={};for(var o in t)Vr.call(t,o)&&r.indexOf(o)<0&&(i[o]=t[o]);if(t!=null&&Yr)for(var o of Yr(t))r.indexOf(o)<0&&Fr.call(t,o)&&(i[o]=t[o]);return i};const gi=t=>Tt.css`
|
|
93
93
|
border: var(--input-border);
|
|
94
94
|
outline: none;
|
|
95
95
|
padding: var(--input-padding);
|
|
96
96
|
border-radius: var(--input-border-radius);
|
|
97
|
-
background-color: var(--panel-${
|
|
97
|
+
background-color: var(--panel-${t}-input-background-color);
|
|
98
98
|
color: var(--input-text-color);
|
|
99
99
|
font-family: var(--input-font-family);
|
|
100
100
|
font-size: var(--input-font-size);
|
|
@@ -116,17 +116,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
&:-webkit-autofill {
|
|
119
|
-
background-color: var(--panel-${
|
|
119
|
+
background-color: var(--panel-${t}-input-background-color);
|
|
120
120
|
}
|
|
121
121
|
`,Jr=Tt.default.div`
|
|
122
|
-
display: ${({type:
|
|
123
|
-
${({fullWidth:
|
|
122
|
+
display: ${({type:t})=>t==="hidden"?"none":"inline-block"};
|
|
123
|
+
${({fullWidth:t})=>t?"width: 100%;":""}
|
|
124
124
|
`,ri=Tt.default.div`
|
|
125
125
|
position: relative;
|
|
126
126
|
`,Wr=Tt.default.input`
|
|
127
|
-
${({panel:
|
|
128
|
-
${({inputType:
|
|
129
|
-
${({fullWidth:
|
|
127
|
+
${({panel:t})=>gi(t)}
|
|
128
|
+
${({inputType:t,inputActionButton:r})=>t==="password"||r?"padding-right: 40px;":""};
|
|
129
|
+
${({fullWidth:t})=>t?"width: 100%;":""}
|
|
130
130
|
`,is=Tt.default.span`
|
|
131
131
|
position: absolute;
|
|
132
132
|
right: 0;
|
|
@@ -137,7 +137,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
137
137
|
cursor: pointer;
|
|
138
138
|
text-align: center;
|
|
139
139
|
color: var(--panel-samples-text-color);
|
|
140
|
-
`;function yi(r
|
|
140
|
+
`;function yi(t,r){var i=t,{fullWidth:o,errorMessage:s,type:p,inputActionButton:y,panel:A="samples"}=i,w=Ca(i,["fullWidth","errorMessage","type","inputActionButton","panel"]);const[E,F]=d.useState(p==="password"),G=d.useCallback(()=>{F(!E)},[E]);return d.createElement(Jr,{fullWidth:o,type:p},d.createElement(ri,null,d.createElement(Wr,dr({fullWidth:o,inputActionButton:y,type:E?"password":"text",inputType:p,ref:r,panel:A},w)),y?d.createElement(is,{onClick:y.onClick},y.label):p==="password"?d.createElement(is,{onClick:G},E?"show":"hide"):null),s?d.createElement(it.Xq,null,s):null)}const $n=d.forwardRef(yi);function Lr(t){const r=Tn(dr({fieldType:"text"},t)),{userProps:i,render:o,fieldState:s}=r,p=r.informed;return o(d.createElement($n,cn(dr(dr({},i),p),{errorMessage:s.error})))}const ni=$r(({initValue:t,options:r,fieldApi:i,fieldState:o})=>{const s=r.map((E,F)=>({value:E.title||E.value,idx:F,origValue:E.value})),p=s.find(E=>E.origValue===t),[y,A]=d.useState(p==null?void 0:p.value);(0,Sr.b6)(()=>{t&&i.setValue(t)});const w=d.useCallback(E=>{i.setValue(s[E.idx].origValue),A(s[E.idx].value)},[s,i]);return d.createElement(Jr,{fullWidth:!0},d.createElement(vr.Dropdown,{fullWidth:!0,variant:"dark",value:y,options:s,onChange:w}),o.error?d.createElement(it.Xq,null,o.error):null)});var an=a(25973);const Fh=$r(({initValue:t,paramEnum:r,fieldApi:i})=>{const[o,s]=d.useState(),p=r.map((w,E)=>({idx:E,value:w})),y=w=>{i.setValue(w.value),s(w.value)};(0,Sr.b6)(()=>{if(!!t)if(Array.isArray(t)){const w=t.length?t[0]:"";s(w),i.setValue(w)}else s(t),i.setValue(t)});const A=()=>{i.setValue(""),s("")};return d.createElement(an.VD,{clearable:!0,fullWidth:!0,variant:"dark",value:o,options:p,handleClear:A,onChange:y})}),kh=({name:t,param:r,place:i,renderParameter:o})=>{var s,p,y,A,w;const[E,F]=d.useState([]),G=()=>{F([...E,E.length?E[E.length-1]+1:0])},te=se=>{F(E.filter(ye=>ye!==se))},ne=((s=r.schema.items)==null?void 0:s.fields)?(p=r.schema.items)==null?void 0:p.fields:[{schema:((y=r.schema.items)==null?void 0:y.schema)||r.schema.items,name:"",required:r.required,description:(A=r.schema.items)==null?void 0:A.description,externalDocs:(w=r.schema.items)==null?void 0:w.externalDocs,deprecated:!1,toggle:()=>null,expanded:!1}];return d.createElement(d.Fragment,null,d.createElement(Fd,null,d.createElement(it.lX,{required:r.required},t,"(",E.length," items)"),d.createElement("span",{onClick:G},"Add item +")),E==null?void 0:E.map((se,ye)=>d.createElement(Fd,{key:se},d.createElement(Mh,{onClick:()=>te(se)},"delete"),ne.map(ge=>o(ge,i,`${t}.[${se}]`,`[${ye}]${ge.name&&"."+ge.name}`)))))},Fd=Tt.default.div`
|
|
141
141
|
display: flex;
|
|
142
142
|
width: 100%;
|
|
143
143
|
align-items: center;
|
|
@@ -163,7 +163,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
163
163
|
border: none;
|
|
164
164
|
cursor: pointer;
|
|
165
165
|
position: relative;
|
|
166
|
-
`;var as;(function(
|
|
166
|
+
`;var as;(function(t){t.ARRAY="array",t.OBJECT="object"})(as||(as={}));function Rh({schema:t,example:r}){return`(${t.type})`+(r?` ${r}`:"")}function Lh(t){const r={};return t.forEach(i=>{i.in&&(r[i.in]||(r[i.in]=[]),r[i.in].push(i))}),r}function Dh({schema:t,required:r}){return i=>{if(r&&!i)return"Field is required";if(r&&t.type===as.ARRAY&&Array.isArray(i)){if(i.length>(t.rawSchema&&t.rawSchema.maxItems||1/0))return`Too many items selected, maximum ${t.rawSchema.maxItems}`;if(i.length<(t.rawSchema&&t.rawSchema.minItems||0)){const o=t.rawSchema.minItems;return`You should select at least ${o===1?`${o} item`:`${o} items`}`}}}}function Nh(t){if(t.type===as.ARRAY){const r=t.default||t.example;if(!r&&typeof t.rawSchema.items!="boolean"&&Array.isArray(t.rawSchema.items)){if(t.rawSchema.items[0].default)return[t.rawSchema.items[0].default];if(t.rawSchema.items[0].example)return[t.rawSchema.items[0].example]}if(!r&&typeof t.rawSchema.items!="boolean"&&!Array.isArray(t.rawSchema.items)&&(0,Wt.isObject)(t.rawSchema.items)){if(t.rawSchema.items.default)return[t.rawSchema.items.default];if(t.rawSchema.items.example)return[t.rawSchema.items.example]}return r||[]}else return(Number.isInteger(t.default)?t.default.toString():t.default)||t.example}function Bh({oneOfType:t}){return t}const Uh=["path","query","cookie","header"];function jh({id:t,param:r,values:i}){const o=(0,d.useMemo)(()=>Dh(r),[r]),s=Array.isArray(r.schema.enum)&&r.schema.enum.length?r.schema.enum:void 0,p=Nh(r.schema),y=t.split(".").map(A=>(0,Gt.dw)(A));return s?d.createElement(it.NI,null,d.createElement(Fh,{initValue:p,paramEnum:s,field:t})):d.createElement(Lr,{fullWidth:!0,"data-cy":"parameter-input",id:t,field:t,placeholder:Rh(r),validate:o,initialValue:p||(0,Gt.U2)(i,y),validateOnBlur:!0,validateOnChange:!0})}function Vh({values:t,operation:r}){const i=(0,d.useMemo)(()=>Lh(r.parameters||[]),[r]),o=(p,y,A,w)=>{var E;const F=A?(0,Gt.s1)(A,p.name):p.name,G=Bh(p.schema),te=A?[y,A]:[p.in],ne=(0,Gt.s1)(...te,(0,Gt.A8)(p.name));return G&&console.warn(`Unsupported parameter definition: "${G}"`),p.schema.type===as.ARRAY?d.createElement(kh,{key:ne,name:F,param:p,place:y,renderParameter:o}):p.schema.type===as.OBJECT?(E=p.schema.fields)==null?void 0:E.map(se=>o(se,y,F)):d.createElement(it.NI,{key:ne},d.createElement(it.lX,{required:p.required},w||F,":"),G?d.createElement(it.GE,null,"Unsupported field schema definition"):d.createElement(jh,{id:ne,param:p,values:t}))},s=p=>{const y=i[p];return!y||!y.length?null:d.createElement(d.Fragment,{key:p},d.createElement(it.NI,null,d.createElement(it.iG,null," # ",p," parameters "),d.createElement("span",null,"\xA0")),y.map(A=>o(A,p)))};return d.createElement(it.iA,null,Uh.map(s))}var tr=a(7241),Wh=(t,r,i)=>new Promise((o,s)=>{var p=w=>{try{A(i.next(w))}catch(E){s(E)}},y=w=>{try{A(i.throw(w))}catch(E){s(E)}},A=w=>w.done?o(w.value):Promise.resolve(w.value).then(p,y);A((i=i.apply(t,r)).next())});function Hh(t){return Wh(this,null,function*(){return(yield fetch(t)).json()})}const zh=Tt.default.div`
|
|
167
167
|
position: relative;
|
|
168
168
|
height: 4px;
|
|
169
169
|
display: block;
|
|
@@ -265,7 +265,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
265
265
|
right: -8%;
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
|
-
`,kd=()=>d.createElement(zh,null,d.createElement("div",{className:"indeterminate"}));var uf=a(96283),Gh=Object.defineProperty,$h=Object.defineProperties,Kh=Object.getOwnPropertyDescriptors,Md=Object.getOwnPropertySymbols,Yh=Object.prototype.hasOwnProperty,Jh=Object.prototype.propertyIsEnumerable,Rd=(r,
|
|
268
|
+
`,kd=()=>d.createElement(zh,null,d.createElement("div",{className:"indeterminate"}));var uf=a(96283),Gh=Object.defineProperty,$h=Object.defineProperties,Kh=Object.getOwnPropertyDescriptors,Md=Object.getOwnPropertySymbols,Yh=Object.prototype.hasOwnProperty,Jh=Object.prototype.propertyIsEnumerable,Rd=(t,r,i)=>r in t?Gh(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,Xh=(t,r)=>{for(var i in r||(r={}))Yh.call(r,i)&&Rd(t,i,r[i]);if(Md)for(var i of Md(r))Jh.call(r,i)&&Rd(t,i,r[i]);return t},Qh=(t,r)=>$h(t,Kh(r));const Zh=Tt.default.input`
|
|
269
269
|
cursor: pointer;
|
|
270
270
|
margin-left: 0;
|
|
271
271
|
margin-right: 5px;
|
|
@@ -285,25 +285,25 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
285
285
|
overflow-wrap: break-word;
|
|
286
286
|
line-height: 20px;
|
|
287
287
|
`,qh=Tt.default.div`
|
|
288
|
-
width: ${({fullWidth:
|
|
288
|
+
width: ${({fullWidth:t})=>t?"100%":"50%"};
|
|
289
289
|
display: inline-flex;
|
|
290
290
|
align-items: center;
|
|
291
291
|
|
|
292
292
|
& > label {
|
|
293
|
-
white-space: ${({nowrap:
|
|
293
|
+
white-space: ${({nowrap:t})=>t?"nowrap":"normal"};
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
-
${({nowrap:
|
|
296
|
+
${({nowrap:t})=>t?"":`
|
|
297
297
|
:not(:first-child) {
|
|
298
298
|
margin-top: 5px;
|
|
299
299
|
}
|
|
300
300
|
`}
|
|
301
|
-
`;function ev(r
|
|
301
|
+
`;function ev(t,r){const{fullWidth:i,id:o,label:s,nowrap:p}=t;return d.createElement(qh,{fullWidth:i,nowrap:p},d.createElement(Zh,Qh(Xh({},t),{type:"checkbox",ref:r})),d.createElement(_h,{htmlFor:o},s))}const Ld=d.forwardRef(ev);var ff=a(44349),tv=Object.defineProperty,rv=(t,r,i)=>r in t?tv(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,nv=(t,r,i)=>(rv(t,typeof r!="symbol"?r+"":r,i),i);const iv=11;class av extends d.Component{constructor(){super(...arguments);nv(this,"state",{collapsed:!0})}onCheckBoxClick(r){const i=r.target.value,o=r.target.checked;this.props.fieldApi.setTouched(!0);const s=this.props.fieldApi.getValue()||[];let p;if(o)p=[...s,i];else{const y=s.indexOf(i);p=[...s.slice(0,y),...s.slice(y+1)]}this.props.fieldApi.setValue(p)}isFieldChecked(r){return this.props.fieldApi.getValue().includes(r)}toggle(){this.setState({collapsed:!this.state.collapsed})}selectAll(){this.props.fieldApi.setValue(this.props.items)}clearAll(){this.props.fieldApi.setValue([])}render(){const{items:r,fieldApi:i,validateOnChange:o,maxDisplayedItems:s,showControls:p,trimItemsLength:y}=this.props,{collapsed:A}=this.state,w=i.getError(),E=s||iv,F=y&&this.state.collapsed?r.slice(0,E):r;return d.createElement("div",null,p?d.createElement(sv,null,d.createElement(ff.SamplesControlButton,{onClick:()=>{this.selectAll()}},"Select all"),d.createElement(ff.SamplesControlButton,{onClick:()=>{this.clearAll()}},"Clear")):null,d.createElement("div",null,F.map(G=>d.createElement(Ld,{fullWidth:!0,id:G,value:G,checked:this.isFieldChecked(G),label:G,key:G,onChange:te=>{this.onCheckBoxClick(te),o&&i.validate()}})),r.length>E&&y?d.createElement(lv,{onClick:()=>{this.toggle()}},A?"Show all":"Collapse"):null),w?d.createElement(it.Xq,null,w):"")}}const ov=$r(av),sv=(0,Tt.default)(ff.SampleControls)`
|
|
302
302
|
opacity: 1;
|
|
303
303
|
text-align: left;
|
|
304
304
|
`,lv=(0,Tt.default)(ff.SamplesControlButton)`
|
|
305
305
|
float: right;
|
|
306
|
-
`;function Dd(
|
|
306
|
+
`;function Dd(t){const{scopes:r,id:i}=t;let o=[];try{o=JSON.parse((0,Gt.YQ)(`auth.${i}.scopes`))}catch(s){}return!r||!r.length?d.createElement(d.Fragment,null):d.createElement(it.NI,null,d.createElement(it.lX,null," Scopes: "),d.createElement(ov,{field:`auth.${i}.scopes`,initialValue:o,items:r,showControls:!0,trimItemsLength:!0}))}var uv=Object.defineProperty,fv=Object.defineProperties,cv=Object.getOwnPropertyDescriptors,Nd=Object.getOwnPropertySymbols,dv=Object.prototype.hasOwnProperty,pv=Object.prototype.propertyIsEnumerable,jc=(t,r,i)=>r in t?uv(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,cf=(t,r)=>{for(var i in r||(r={}))dv.call(r,i)&&jc(t,i,r[i]);if(Nd)for(var i of Nd(r))pv.call(r,i)&&jc(t,i,r[i]);return t},Vc=(t,r)=>fv(t,cv(r)),wl=(t,r,i)=>(jc(t,typeof r!="symbol"?r+"":r,i),i),hv=(t,r,i)=>new Promise((o,s)=>{var p=w=>{try{A(i.next(w))}catch(E){s(E)}},y=w=>{try{A(i.throw(w))}catch(E){s(E)}},A=w=>w.done?o(w.value):Promise.resolve(w.value).then(p,y);A((i=i.apply(t,r)).next())});function vv(t){if(!t)return"Field is required"}class Sl extends d.Component{constructor(){super(...arguments);wl(this,"state",{error:null,loading:!1,showPkceOptions:!1}),wl(this,"clearToken",()=>{this.props.formApi.setValue(`auth.${this.props.id}.token`,"")}),wl(this,"togglePkceOptions",()=>{this.setState(({showPkceOptions:r})=>({showPkceOptions:!r}))}),wl(this,"handleCodeVerifierChange",r=>hv(this,[r],function*({target:{value:i}}){const o=yield H(i);this.setState({codeVerifier:i,validCodeChallenge:o})}))}get values(){var r,i;return((i=(r=this.props.form.values)==null?void 0:r.auth)==null?void 0:i[this.props.id])||{}}get errors(){var r,i;return((i=(r=this.props.form.errors)==null?void 0:r.auth)==null?void 0:i[this.props.id])||{}}get pkceInputActionButtonProps(){if(this.state.codeVerifier!==void 0&&this.state.codeChallenge!==this.state.validCodeChallenge)return{label:"sync",onClick:()=>{this.state.codeVerifier&&this.setState({codeChallenge:this.state.validCodeChallenge})}}}componentDidMount(){if(this.props.usePkce){const r=(0,Gn.CY)(43);H(r).then(i=>{this.setState({codeVerifier:r,codeChallenge:i,validCodeChallenge:i})})}}handleAuthorize(r){if(!r)return;this.props.formApi.validate();const{flow:i,usePkce:o,id:s,tokenUrl:p,authCorsProxyUrl:y,tokenEndpointAuthMethod:A}=this.props;if(!(0,Gn.Qr)(this.errors))return;this.setState({loading:!0,error:null});const w=y?y+(0,tr.jg)(r):r,E=y&&p?y+(0,tr.jg)(p):p,F=this.props.formApi.getValue(`auth.${s}.scopes`),G={authorizationUrl:w.startsWith("http")?w:this.props.server+w,clientId:this.values.client_id,scopes:F,redirectUri:this.context.oAuth2RedirectURI,routingBasePath:this.context.routingBasePath,successCallback:te=>{this.props.formApi.setValue(`auth.${this.props.id}.token`,te),this.setState({loading:!1,error:null})},errorCallback:te=>{this.setState({loading:!1,error:(te==null?void 0:te.message)||"Failed to retrieve the access token"})}};if(i==="implicit"&&m.authorizeImplicit(G),!(0,tr.xl)(A)){console.log(`Unsupported token endpoint auth method: ${A}`);return}i==="authorizationCode"&&m.authorizeAuthorizationCode(cf(Vc(cf({},G),{tokenUrl:(E==null?void 0:E.startsWith("http"))?E:this.props.server+E,clientSecret:this.values.client_secret,extraHeaders:(0,tr.Or)({authMethod:A,clientId:this.values.client_id,clientSecret:this.values.client_secret})}),o&&{codeVerifier:this.state.codeVerifier,codeChallenge:this.state.codeChallenge}))}handleLogout(){this.clearToken(),this.setState({error:null})}handleCancel(){this.setState({loading:!1,error:null}),m.clearRedirectData(this.props.flow)}render(){const{error:r,loading:i}=this.state,{id:o,scopes:s,authorizationUrl:p,flow:y,usePkce:A,defaultValues:w}=this.props;if(!p)return d.createElement(it.Xq,null,"No flow info");let E=(0,Gt.YQ)(`auth.${o}.token`)||JSON.stringify(w==null?void 0:w.token);E=E?JSON.parse(E):"";const F=(0,Gt.Al)(o,"client_id"),G={field:`auth.${o}.client_id`,fullWidth:!0,initialValue:(0,Gt.YQ)(`auth.${o}.client_id`)||this.props.clientId||(w==null?void 0:w.client_id),initValue:(0,Gt.YQ)(`auth.${o}.client_id`)||this.props.clientId||(w==null?void 0:w.client_id),placeholder:"Your OAuth2 app Client ID",validate:vv,validateOnBlur:!0,validateOnChange:!0};return d.createElement("div",null,d.createElement(it.n5,null,d.createElement(it.NI,null,d.createElement(it.lX,null," Client ID: "),F?d.createElement(ni,Vc(cf({},G),{options:F})):d.createElement(Lr,Vc(cf({},G),{"data-cy":"client-id-input",panel:"try-it"}))),y==="authorizationCode"&&d.createElement(d.Fragment,null,(!(A==null?void 0:A.hideClientSecretInput)||!A)&&d.createElement(it.NI,null,d.createElement(it.lX,null,"Client Secret:"),d.createElement(Lr,{type:"password",fullWidth:!0,field:`auth.${o}.client_secret`,initialValue:(0,Gt.YQ)(`auth.${o}.client_secret`)||(w==null?void 0:w.client_secret),validateOnBlur:!0,validateOnChange:!0,panel:"try-it","data-cy":"client-secret-input"})),A&&!A.disableManualConfiguration&&d.createElement(mv,null,d.createElement(Ld,{id:"pkce-opitons-toggle",label:"Configure PKCE manually",checked:this.state.showPkceOptions,onChange:this.togglePkceOptions,"data-cy":"pkce-options-toggle"}),this.state.showPkceOptions&&d.createElement(xv,null,d.createElement(it.NI,null,d.createElement(it.lX,null,"Code Verifier"),d.createElement($n,{fullWidth:!0,value:this.state.codeVerifier,onChange:this.handleCodeVerifierChange,panel:"try-it","data-cy":"code-verifier-input"})),d.createElement(it.NI,null,d.createElement(it.lX,null,"Code Challenge"),d.createElement($n,{fullWidth:!0,value:this.state.codeChallenge,onChange:({target:{value:te}})=>{this.setState({codeChallenge:te})},inputActionButton:this.pkceInputActionButtonProps,panel:"try-it","data-cy":"code-challenge-input"}))))),d.createElement(Lr,{fullWidth:!0,field:`auth.${o}.token`,type:"hidden",initialValue:E,panel:"try-it"}),d.createElement(Dd,{id:o,scopes:s}),this.values.token&&this.values.token.access_token?d.createElement(it.NI,null,d.createElement(it.lX,null," Access Token: "),d.createElement($n,{disabled:!0,type:"password",fullWidth:!0,value:this.values.token.access_token,panel:"try-it"})):null),d.createElement(yv,null,this.values.token&&this.values.token.access_token?d.createElement(uf.Button,{fullWidth:!0,onClick:()=>{this.handleLogout()}},"Log out"):i?d.createElement(d.Fragment,null,d.createElement(uf.Button,{fullWidth:!0,onClick:()=>{this.handleCancel()}},"Cancel"),d.createElement(kd,null)):d.createElement(uf.Button,{fullWidth:!0,disabled:!(0,Gn.Qr)(this.errors),onClick:()=>{this.handleAuthorize(p)}},"Authorize")),i||r||!this.values.token||!this.values.token.access_token&&d.createElement(it.n5,null,d.createElement(it.NI,null,i?d.createElement(it.GE,null,"Please, finish your authorization flow or cancel authorization."):r?d.createElement(d.Fragment,null,d.createElement(gv,null,d.createElement(it.Xq,null,r))):!this.values.token||!this.values.token.access_token?d.createElement(it.GE,null," No Access Token. Please, Authorize. "):null)))}}wl(Sl,"contextType",Wt.OptionsContext);const gv=Tt.default.div`
|
|
307
307
|
font-family: var(--font-family-monospaced);
|
|
308
308
|
margin-top: 10px;
|
|
309
309
|
line-height: 1;
|
|
@@ -315,47 +315,47 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
315
315
|
padding: 8px 0 20px;
|
|
316
316
|
`,xv=Tt.default.div`
|
|
317
317
|
padding: 4px 0;
|
|
318
|
-
`;var bv=(r,t,i)=>new Promise((o,s)=>{var p=w=>{try{A(i.next(w))}catch(E){s(E)}},y=w=>{try{A(i.throw(w))}catch(E){s(E)}},A=w=>w.done?o(w.value):Promise.resolve(w.value).then(p,y);A((i=i.apply(r,t)).next())});function wv(r){var t,i;const{scheme:o,defaultValues:s}=r,[p,y]=(0,d.useState)({}),[A,w]=(0,d.useState)(),[E,F]=(0,d.useState)(!1);(0,d.useEffect)(()=>{G(o.openIdConnectUrl)},[o.openIdConnectUrl]);const G=te=>bv(this,null,function*(){F(!0),w("");try{const ne=yield Hh(te);y(ne)}catch(ne){w(ne.message)}F(!1)});return E?d.createElement(Sv,null):A?d.createElement(Bd,{message:A}):d.createElement("div",null,d.createElement("div",null,((t=p==null?void 0:p.response_types_supported)==null?void 0:t.includes("token"))?d.createElement(d.Fragment,null,d.createElement(an.S6,null,"OAuth2 Implicit Flow"),d.createElement(Sl,{key:r.id,authorizationUrl:p.authorization_endpoint,authCorsProxyUrl:r.authCorsProxyUrl,scopes:p.scopes_supported,server:r.server,id:r.id,form:r.form,formApi:r.formApi,clientId:r.clientId,flow:"implicit",defaultValues:s})):((i=p==null?void 0:p.response_types_supported)==null?void 0:i.includes("code"))?d.createElement(d.Fragment,null,d.createElement(an.S6,null,"OAuth2 Authorization Flow"),d.createElement(Sl,{key:r.id,authorizationUrl:p.authorization_endpoint,tokenUrl:p.token_endpoint,authCorsProxyUrl:r.authCorsProxyUrl,scopes:p.scopes_supported,server:r.server,id:r.id,form:r.form,formApi:r.formApi,clientId:r.clientId,tokenEndpointAuthMethod:p==null?void 0:p.token_endpoint_auth_methods_supported,flow:"authorizationCode",defaultValues:s})):d.createElement("div",null,"Unsupported flow")))}function Sv(){return d.createElement("div",null,d.createElement("div",null,d.createElement("div",null,"Fetching OpenID Connect metadata..."),d.createElement(kd,null)))}function Bd({message:r}){return d.createElement("div",null,d.createElement("div",null,d.createElement(it.Xq,null,r)))}var oa=a(45756),Av=Object.defineProperty,Ev=Object.defineProperties,Cv=Object.getOwnPropertyDescriptors,Ud=Object.getOwnPropertySymbols,Ov=Object.prototype.hasOwnProperty,Tv=Object.prototype.propertyIsEnumerable,Wc=(r,t,i)=>t in r?Av(r,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[t]=i,jd=(r,t)=>{for(var i in t||(t={}))Ov.call(t,i)&&Wc(r,i,t[i]);if(Ud)for(var i of Ud(t))Tv.call(t,i)&&Wc(r,i,t[i]);return r},Vd=(r,t)=>Ev(r,Cv(t)),df=(r,t,i)=>(Wc(r,typeof t!="symbol"?t+"":t,i),i),Pv=(r,t,i)=>new Promise((o,s)=>{var p=w=>{try{A(i.next(w))}catch(E){s(E)}},y=w=>{try{A(i.throw(w))}catch(E){s(E)}},A=w=>w.done?o(w.value):Promise.resolve(w.value).then(p,y);A((i=i.apply(r,t)).next())});function Iv(r){if(!r)return"Token is required"}class Fv extends d.Component{constructor(){super(...arguments);df(this,"state",{error:"",loading:!1,tokenMasked:!0}),df(this,"clearToken",()=>{this.props.formApi.setValue(`auth.${this.props.id}.token`,""),(0,Gt.WW)(`auth.${this.props.id}.token`,"")}),df(this,"toggleTokenMask",()=>{this.setState({tokenMasked:!this.state.tokenMasked})}),df(this,"requestToken",()=>Pv(this,null,function*(){if(this.state.loading)return;const{server:t,flow:i,authCorsProxyUrl:o}=this.props,s=o&&i.tokenUrl?o+(0,tr.jg)(i.tokenUrl):i.tokenUrl;if(this.errors.client_id||this.errors.client_secret){console.log("Provide client_id and client_secret");return}const p=this.values.client_id,y=this.values.client_secret;if(!p||!y){console.log("Provide client_id and client_secret");return}this.setState({loading:!0});const A=i["x-tokenEndpointAuthMethod"];if(!(0,tr.xl)(A)){console.log(`Unsupported token endpoint auth method: ${A}`);return}yield m.authorizeClientCredentials({tokenUrl:s.startsWith("http")?s:t+s,clientId:p,clientSecret:y,scopes:this.values.scopes,extraHeaders:(0,tr.Or)({authMethod:A,clientId:p,clientSecret:y}),successCallback:w=>{this.props.formApi.setValue(`auth.${this.props.id}.token`,w),this.setState({loading:!1})},errorCallback:w=>{this.clearToken(),this.setState({error:w.message,loading:!1})}})}))}get values(){var t,i,o;return((o=(i=(t=this.props.form)==null?void 0:t.values)==null?void 0:i.auth)==null?void 0:o[this.props.id])||{}}get errors(){var t,i;return((i=(t=this.props.form.errors)==null?void 0:t.auth)==null?void 0:i[this.props.id])||{}}render(){const{loading:t,error:i,tokenMasked:o}=this.state,{id:s,defaultValues:p}=this.props,y=Object.keys(this.props.flow.scopes);let A=(0,Gt.YQ)(`auth.${s}.token`)||JSON.stringify(p==null?void 0:p.token);A=A?JSON.parse(A):"";const w=(0,Gt.Al)(s,"client_id"),E={field:`auth.${s}.client_id`,fullWidth:!0,initialValue:(0,Gt.YQ)(`auth.${s}.client_id`)||this.props.clientId||(p==null?void 0:p.client_id),initValue:(0,Gt.YQ)(`auth.${s}.client_id`)||this.props.clientId||(p==null?void 0:p.client_id),placeholder:"Your OAuth2 app Client ID"};return d.createElement(d.Fragment,null,d.createElement(it.n5,null,d.createElement(it.NI,null,d.createElement(it.lX,null,"Client ID:"),w?d.createElement(ni,Vd(jd({},E),{options:w})):d.createElement(Lr,Vd(jd({},E),{type:"password",panel:"try-it"}))),d.createElement(it.NI,null,d.createElement(it.lX,null,"Client Secret:"),d.createElement(Lr,{type:"password",fullWidth:!0,field:`auth.${s}.client_secret`,initialValue:(0,Gt.YQ)(`auth.${s}.client_secret`)||(p==null?void 0:p.client_secret),panel:"try-it"})),d.createElement(Lr,{fullWidth:!0,field:`auth.${s}.token`,type:"hidden",initialValue:A,validate:Iv}),d.createElement(Dd,{id:s,scopes:y})),d.createElement(oa.Button,{color:"primary",onClick:this.requestToken,blinking:t},t?"Loading...":"Request Token"),d.createElement(it.ph,null," Access Token "),i?d.createElement(it.Xq,{style:{marginBottom:"1em"}},"Failed to request token: ",d.createElement("pre",null,i)," "):this.values.token&&this.values.token.access_token?d.createElement(it.TR,null,d.createElement(it.WA,{length:this.values.token.access_token.length,masked:o},this.values.token.access_token),d.createElement(it.lf,{onClick:this.toggleTokenMask},o?"Show":"Hide"," "),d.createElement(it.h,{onClick:this.clearToken}," Clear ")):d.createElement(it.Xq,{style:{marginBottom:"1em"}},"No token"))}}const kv=Fv;var Mv=Object.defineProperty,Rv=Object.defineProperties,Lv=Object.getOwnPropertyDescriptors,Wd=Object.getOwnPropertySymbols,Dv=Object.prototype.hasOwnProperty,Nv=Object.prototype.propertyIsEnumerable,Hc=(r,t,i)=>t in r?Mv(r,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[t]=i,os=(r,t)=>{for(var i in t||(t={}))Dv.call(t,i)&&Hc(r,i,t[i]);if(Wd)for(var i of Wd(t))Nv.call(t,i)&&Hc(r,i,t[i]);return r},ss=(r,t)=>Rv(r,Lv(t)),Hd=(r,t,i)=>(Hc(r,typeof t!="symbol"?t+"":t,i),i);class Bv extends d.Component{constructor(){super(...arguments);Hd(this,"state",{activeScheme:0}),Hd(this,"handleSchemeChange",t=>{this.setState({activeScheme:t.idx}),(0,Gt.WW)("securityRequirementName",t.value)})}static getDerivedStateFromProps(t){const o=t.operation.security.map(y=>y.schemes.map(A=>A.id).join(" and ")),s=(0,Gt.YQ)("securityRequirementName"),p=o.findIndex(y=>y===s);return{activeScheme:p<0?0:p}}render(){const{securityDefaults:t}=this.props,{activeScheme:i}=this.state,o=this.props.operation.security,p=o.map(y=>y.schemes.map(A=>A.id).join(" and ")).filter(Boolean).map((y,A)=>({value:y,idx:A}));return p.length===0?d.createElement(Bd,{message:"Cannot find security schema in the definition"}):d.createElement(d.Fragment,null,d.createElement(it.n5,null,p.length>1&&d.createElement(it.NI,null,d.createElement(it.lX,null," Security scheme: "),d.createElement(an.VD,{variant:"dark",fullWidth:!0,options:p,value:p[i].value,onChange:this.handleSchemeChange}))||null,o[i].schemes.map(y=>{var A,w,E,F,G,te,ne;const se=(0,Gt.A8)(y.id);if(y.type==="apiKey"){const ye=(0,Gt.Al)(se,""),ge={field:`auth.${se}`,fullWidth:!0,initialValue:(0,tr.NG)(y)||(0,Gt.YQ)(`auth.${se}`)||(t==null?void 0:t[se]),initValue:(0,tr.NG)(y)||(0,Gt.YQ)(`auth.${se}`)||(t==null?void 0:t[se]),validate:tr.np,validateOnBlur:!0,validateOnChange:!0};return d.createElement(it.NI,{key:se},d.createElement(it.lX,null," ",y.name,": "),ye?d.createElement(ni,ss(os({},ge),{options:ye})):d.createElement(Lr,ss(os({},ge),{type:"password",panel:"try-it","data-cy":"apiKey-auth-password"})))}else if(y.type==="http"){if(y.scheme==="basic"){const ye=(0,Gt.Al)(se,"username"),ge={field:`auth.${se}.username`,fullWidth:!0,initialValue:(0,Gt.YQ)(`auth.${se}.username`)||((A=t==null?void 0:t[se])==null?void 0:A.username),initValue:(0,Gt.YQ)(`auth.${se}.username`)||((w=t==null?void 0:t[se])==null?void 0:w.username),validate:tr.np,validateOnBlur:!0,validateOnChange:!0};return d.createElement(d.Fragment,{key:se},d.createElement(it.NI,null,d.createElement(it.lX,null," ",(0,uo.l)("tryItAuthBasicUsername"),": "),ye?d.createElement(ni,ss(os({},ge),{options:ye})):d.createElement(Lr,ss(os({},ge),{panel:"try-it"}))),d.createElement(it.NI,null,d.createElement(it.lX,null," ",(0,uo.l)("tryItAuthBasicPassword"),": "),d.createElement(Lr,{type:"password","data-cy":"http-auth-password",fullWidth:!0,field:`auth.${se}.password`,initialValue:(0,Gt.YQ)(`auth.${se}.password`)||((E=t==null?void 0:t[se])==null?void 0:E.password)||"",validateOnBlur:!0,validateOnChange:!0,panel:"try-it"})))}else if(y.scheme==="bearer"){const ye=(0,Gt.Al)(se,""),ge={field:`auth.${se}`,fullWidth:!0,initialValue:(0,Gt.YQ)(`auth.${se}`)||(t==null?void 0:t[se]),initValue:(0,Gt.YQ)(`auth.${se}`)||(t==null?void 0:t[se]),validate:tr.np,validateOnBlur:!0,validateOnChange:!0};return d.createElement(d.Fragment,{key:se},d.createElement(it.NI,null,d.createElement(it.lX,null," Bearer Token: "),ye?d.createElement(ni,ss(os({},ge),{options:ye})):d.createElement(Lr,ss(os({},ge),{type:"password",placeholder:"(without 'Bearer')",panel:"try-it"}))))}}else{if(y.type==="oauth2"&&y.flows&&y.flows.clientCredentials)return d.createElement(kv,{key:se,flow:y.flows.clientCredentials,server:this.props.activeServer,authCorsProxyUrl:this.props.authCorsProxyUrl,id:se,form:this.props.form,formApi:this.props.formApi,clientId:y.flows.clientCredentials["x-defaultClientId"]||y["x-defaultClientId"],defaultValues:t==null?void 0:t[se]});if(y.type==="oauth2"&&y.flows&&y.flows.implicit)return d.createElement(Sl,{key:se,authorizationUrl:y.flows.implicit.authorizationUrl,authCorsProxyUrl:this.props.authCorsProxyUrl,scopes:Object.keys(((G=(F=y==null?void 0:y.flows)==null?void 0:F.implicit)==null?void 0:G.scopes)||{}),server:this.props.activeServer,id:se,form:this.props.form,formApi:this.props.formApi,clientId:y.flows.implicit["x-defaultClientId"]||y["x-defaultClientId"],flow:"implicit",defaultValues:t==null?void 0:t[se]});if(y.type==="oauth2"&&y.flows&&y.flows.authorizationCode)return d.createElement(Sl,{key:se,authorizationUrl:y.flows.authorizationCode.authorizationUrl,tokenUrl:y.flows.authorizationCode.tokenUrl,authCorsProxyUrl:this.props.authCorsProxyUrl,scopes:Object.keys(((te=y.flows.authorizationCode)==null?void 0:te.scopes)||{}),server:this.props.activeServer,id:se,form:this.props.form,formApi:this.props.formApi,clientId:y.flows.authorizationCode["x-defaultClientId"]||y["x-defaultClientId"],flow:"authorizationCode",tokenEndpointAuthMethod:y.flows.authorizationCode["x-tokenEndpointAuthMethod"],usePkce:y.flows.authorizationCode["x-usePkce"],defaultValues:t==null?void 0:t[se]});if(y.type==="oauth2"){let ye=(0,Gt.YQ)(`auth.${se}.token`)||JSON.stringify((ne=t==null?void 0:t[se])==null?void 0:ne.token);return ye=ye?JSON.parse(ye):{},d.createElement(d.Fragment,{key:se},d.createElement(it.NI,null,d.createElement(it.lX,null," Access Token Type: "),d.createElement(Lr,{fullWidth:!0,field:`auth.${se}.token.token_type`,initialValue:ye.token_type||"Bearer",panel:"try-it"})),d.createElement(it.NI,null,d.createElement(it.lX,null," Access Token: "),d.createElement(Lr,{type:"password",fullWidth:!0,field:`auth.${se}.token.access_token`,validate:tr.np,initialValue:ye.access_token,validateOnBlur:!0,validateOnChange:!0,panel:"try-it"})))}else if(y.type==="openIdConnect")return d.createElement(wv,{key:se,server:this.props.activeServer,authCorsProxyUrl:this.props.authCorsProxyUrl,id:se,form:this.props.form,formApi:this.props.formApi,scheme:y,clientId:y["x-defaultClientId"],defaultValues:t==null?void 0:t[se]})}})),d.createElement("small",null,d.createElement("strong",null,"Note"),": Your credentials will be saved until the end of the browser session"))}}var Uv=a(9996),jv=a.n(Uv),zc=a(67897),pf=a(49376),Vv=Object.defineProperty,hf=Object.getOwnPropertySymbols,zd=Object.prototype.hasOwnProperty,Gd=Object.prototype.propertyIsEnumerable,$d=(r,t,i)=>t in r?Vv(r,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[t]=i,Wv=(r,t)=>{for(var i in t||(t={}))zd.call(t,i)&&$d(r,i,t[i]);if(hf)for(var i of hf(t))Gd.call(t,i)&&$d(r,i,t[i]);return r},Kd=(r,t)=>{var i={};for(var o in r)zd.call(r,o)&&t.indexOf(o)<0&&(i[o]=r[o]);if(r!=null&&hf)for(var o of hf(r))t.indexOf(o)<0&&Gd.call(r,o)&&(i[o]=r[o]);return i},Hv=(r,t,i)=>new Promise((o,s)=>{var p=w=>{try{A(i.next(w))}catch(E){s(E)}},y=w=>{try{A(i.throw(w))}catch(E){s(E)}},A=w=>w.done?o(w.value):Promise.resolve(w.value).then(p,y);A((i=i.apply(r,t)).next())});const Yd=d.forwardRef((r,t)=>{var i=Kd(r,[]);const o=i,{schema:s,contentName:p,onChange:y,name:A}=o,w=Kd(o,["schema","contentName","onChange","name"]),{render:E}=Tn(Wv({field:A},w)),F=G=>Hv(void 0,null,function*(){const te=yield It(G.target.files,s);y(p,te)});return E(d.createElement("input",{"data-cy":"file-upload-input",type:"file",id:i.id,className:i.className,name:i.name,onChange:F,multiple:i.multiple,accept:i.accept,ref:t}))});Yd.displayName="FileUpload";const zv=(0,Fa.Pi)(r=>{var t;const{mediaType:i,onChange:o,formApi:s}=r,p=i.examples||{},{exampleKey:y}=(0,zc.C6)(i.operation,p),A=(t=p[y])==null?void 0:t.rawValue,w=Gv(i);(0,d.useEffect)(()=>s&&w.forEach(F=>{var G,te;const ne=A==null?void 0:A[F.name],se=(te=(G=F.example)!=null?G:ne==null?void 0:ne.example)!=null?te:ne,ye=typeof se=="object"?JSON.stringify(se):se;se!==void 0&&s.setValue("body."+F.name,`${ye}`)}),[y]);const E=i.schema||{};return dt(E,i.name)?d.createElement(Jd,null,d.createElement(it.NI,null,d.createElement(Xd,{fullWidth:!0,id:`body.${i.name}`,name:`body.${i.name}`,accept:ot(i.name),schema:E,contentName:i.name,onChange:o}))):E.type!==be.OBJECT&&!w?(console.warn(`Invalid schema for request body and mime type: "${i.name}"`,E),null):d.createElement(Jd,null,w.map(F=>{const G=F.schema||{},te=i.name===pf.T.MULTIPART&&yt(G),ne=G.contentMediaType||"",se=te?d.createElement(Xd,{fullWidth:!0,id:"body."+F.name,name:"body."+F.name,accept:ot(ne),multiple:G.type==="array",schema:G,contentName:F.name,onChange:o}):d.createElement(Lr,{fullWidth:!0,id:"body."+F.name,field:"body."+F.name,placeholder:G.description||F.name,panel:"try-it"});return d.createElement(it.NI,{key:F.name},d.createElement(it.lX,null,F.name,":"),se)}))});function Gv(r){var t,i,o,s,p;return(((i=(t=r.schema)==null?void 0:t.oneOf)==null?void 0:i.length)?((s=r.schema)==null?void 0:s.oneOf[(o=r.schema)==null?void 0:o.activeOneOf].fields)||[]:((p=r.schema)==null?void 0:p.fields)||[]).filter(y=>!y.schema.readOnly)}const Jd=Tt.default.div`
|
|
318
|
+
`;var bv=(t,r,i)=>new Promise((o,s)=>{var p=w=>{try{A(i.next(w))}catch(E){s(E)}},y=w=>{try{A(i.throw(w))}catch(E){s(E)}},A=w=>w.done?o(w.value):Promise.resolve(w.value).then(p,y);A((i=i.apply(t,r)).next())});function wv(t){var r,i;const{scheme:o,defaultValues:s}=t,[p,y]=(0,d.useState)({}),[A,w]=(0,d.useState)(),[E,F]=(0,d.useState)(!1);(0,d.useEffect)(()=>{G(o.openIdConnectUrl)},[o.openIdConnectUrl]);const G=te=>bv(this,null,function*(){F(!0),w("");try{const ne=yield Hh(te);y(ne)}catch(ne){w(ne.message)}F(!1)});return E?d.createElement(Sv,null):A?d.createElement(Bd,{message:A}):d.createElement("div",null,d.createElement("div",null,((r=p==null?void 0:p.response_types_supported)==null?void 0:r.includes("token"))?d.createElement(d.Fragment,null,d.createElement(an.S6,null,"OAuth2 Implicit Flow"),d.createElement(Sl,{key:t.id,authorizationUrl:p.authorization_endpoint,authCorsProxyUrl:t.authCorsProxyUrl,scopes:p.scopes_supported,server:t.server,id:t.id,form:t.form,formApi:t.formApi,clientId:t.clientId,flow:"implicit",defaultValues:s})):((i=p==null?void 0:p.response_types_supported)==null?void 0:i.includes("code"))?d.createElement(d.Fragment,null,d.createElement(an.S6,null,"OAuth2 Authorization Flow"),d.createElement(Sl,{key:t.id,authorizationUrl:p.authorization_endpoint,tokenUrl:p.token_endpoint,authCorsProxyUrl:t.authCorsProxyUrl,scopes:p.scopes_supported,server:t.server,id:t.id,form:t.form,formApi:t.formApi,clientId:t.clientId,tokenEndpointAuthMethod:p==null?void 0:p.token_endpoint_auth_methods_supported,flow:"authorizationCode",defaultValues:s})):d.createElement("div",null,"Unsupported flow")))}function Sv(){return d.createElement("div",null,d.createElement("div",null,d.createElement("div",null,"Fetching OpenID Connect metadata..."),d.createElement(kd,null)))}function Bd({message:t}){return d.createElement("div",null,d.createElement("div",null,d.createElement(it.Xq,null,t)))}var oa=a(45756),Av=Object.defineProperty,Ev=Object.defineProperties,Cv=Object.getOwnPropertyDescriptors,Ud=Object.getOwnPropertySymbols,Ov=Object.prototype.hasOwnProperty,Tv=Object.prototype.propertyIsEnumerable,Wc=(t,r,i)=>r in t?Av(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,jd=(t,r)=>{for(var i in r||(r={}))Ov.call(r,i)&&Wc(t,i,r[i]);if(Ud)for(var i of Ud(r))Tv.call(r,i)&&Wc(t,i,r[i]);return t},Vd=(t,r)=>Ev(t,Cv(r)),df=(t,r,i)=>(Wc(t,typeof r!="symbol"?r+"":r,i),i),Pv=(t,r,i)=>new Promise((o,s)=>{var p=w=>{try{A(i.next(w))}catch(E){s(E)}},y=w=>{try{A(i.throw(w))}catch(E){s(E)}},A=w=>w.done?o(w.value):Promise.resolve(w.value).then(p,y);A((i=i.apply(t,r)).next())});function Iv(t){if(!t)return"Token is required"}class Fv extends d.Component{constructor(){super(...arguments);df(this,"state",{error:"",loading:!1,tokenMasked:!0}),df(this,"clearToken",()=>{this.props.formApi.setValue(`auth.${this.props.id}.token`,""),(0,Gt.WW)(`auth.${this.props.id}.token`,"")}),df(this,"toggleTokenMask",()=>{this.setState({tokenMasked:!this.state.tokenMasked})}),df(this,"requestToken",()=>Pv(this,null,function*(){if(this.state.loading)return;const{server:r,flow:i,authCorsProxyUrl:o}=this.props,s=o&&i.tokenUrl?o+(0,tr.jg)(i.tokenUrl):i.tokenUrl;if(this.errors.client_id||this.errors.client_secret){console.log("Provide client_id and client_secret");return}const p=this.values.client_id,y=this.values.client_secret;if(!p||!y){console.log("Provide client_id and client_secret");return}this.setState({loading:!0});const A=i["x-tokenEndpointAuthMethod"];if(!(0,tr.xl)(A)){console.log(`Unsupported token endpoint auth method: ${A}`);return}yield m.authorizeClientCredentials({tokenUrl:s.startsWith("http")?s:r+s,clientId:p,clientSecret:y,scopes:this.values.scopes,extraHeaders:(0,tr.Or)({authMethod:A,clientId:p,clientSecret:y}),successCallback:w=>{this.props.formApi.setValue(`auth.${this.props.id}.token`,w),this.setState({loading:!1})},errorCallback:w=>{this.clearToken(),this.setState({error:w.message,loading:!1})}})}))}get values(){var r,i,o;return((o=(i=(r=this.props.form)==null?void 0:r.values)==null?void 0:i.auth)==null?void 0:o[this.props.id])||{}}get errors(){var r,i;return((i=(r=this.props.form.errors)==null?void 0:r.auth)==null?void 0:i[this.props.id])||{}}render(){const{loading:r,error:i,tokenMasked:o}=this.state,{id:s,defaultValues:p}=this.props,y=Object.keys(this.props.flow.scopes);let A=(0,Gt.YQ)(`auth.${s}.token`)||JSON.stringify(p==null?void 0:p.token);A=A?JSON.parse(A):"";const w=(0,Gt.Al)(s,"client_id"),E={field:`auth.${s}.client_id`,fullWidth:!0,initialValue:(0,Gt.YQ)(`auth.${s}.client_id`)||this.props.clientId||(p==null?void 0:p.client_id),initValue:(0,Gt.YQ)(`auth.${s}.client_id`)||this.props.clientId||(p==null?void 0:p.client_id),placeholder:"Your OAuth2 app Client ID"};return d.createElement(d.Fragment,null,d.createElement(it.n5,null,d.createElement(it.NI,null,d.createElement(it.lX,null,"Client ID:"),w?d.createElement(ni,Vd(jd({},E),{options:w})):d.createElement(Lr,Vd(jd({},E),{type:"password",panel:"try-it"}))),d.createElement(it.NI,null,d.createElement(it.lX,null,"Client Secret:"),d.createElement(Lr,{type:"password",fullWidth:!0,field:`auth.${s}.client_secret`,initialValue:(0,Gt.YQ)(`auth.${s}.client_secret`)||(p==null?void 0:p.client_secret),panel:"try-it"})),d.createElement(Lr,{fullWidth:!0,field:`auth.${s}.token`,type:"hidden",initialValue:A,validate:Iv}),d.createElement(Dd,{id:s,scopes:y})),d.createElement(oa.Button,{color:"primary",onClick:this.requestToken,blinking:r},r?"Loading...":"Request Token"),d.createElement(it.ph,null," Access Token "),i?d.createElement(it.Xq,{style:{marginBottom:"1em"}},"Failed to request token: ",d.createElement("pre",null,i)," "):this.values.token&&this.values.token.access_token?d.createElement(it.TR,null,d.createElement(it.WA,{length:this.values.token.access_token.length,masked:o},this.values.token.access_token),d.createElement(it.lf,{onClick:this.toggleTokenMask},o?"Show":"Hide"," "),d.createElement(it.h,{onClick:this.clearToken}," Clear ")):d.createElement(it.Xq,{style:{marginBottom:"1em"}},"No token"))}}const kv=Fv;var Mv=Object.defineProperty,Rv=Object.defineProperties,Lv=Object.getOwnPropertyDescriptors,Wd=Object.getOwnPropertySymbols,Dv=Object.prototype.hasOwnProperty,Nv=Object.prototype.propertyIsEnumerable,Hc=(t,r,i)=>r in t?Mv(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,os=(t,r)=>{for(var i in r||(r={}))Dv.call(r,i)&&Hc(t,i,r[i]);if(Wd)for(var i of Wd(r))Nv.call(r,i)&&Hc(t,i,r[i]);return t},ss=(t,r)=>Rv(t,Lv(r)),Hd=(t,r,i)=>(Hc(t,typeof r!="symbol"?r+"":r,i),i);class Bv extends d.Component{constructor(){super(...arguments);Hd(this,"state",{activeScheme:0}),Hd(this,"handleSchemeChange",r=>{this.setState({activeScheme:r.idx}),(0,Gt.WW)("securityRequirementName",r.value)})}static getDerivedStateFromProps(r){const o=r.operation.security.map(y=>y.schemes.map(A=>A.id).join(" and ")),s=(0,Gt.YQ)("securityRequirementName"),p=o.findIndex(y=>y===s);return{activeScheme:p<0?0:p}}render(){const{securityDefaults:r}=this.props,{activeScheme:i}=this.state,o=this.props.operation.security,p=o.map(y=>y.schemes.map(A=>A.id).join(" and ")).filter(Boolean).map((y,A)=>({value:y,idx:A}));return p.length===0?d.createElement(Bd,{message:"Cannot find security schema in the definition"}):d.createElement(d.Fragment,null,d.createElement(it.n5,null,p.length>1&&d.createElement(it.NI,null,d.createElement(it.lX,null," Security scheme: "),d.createElement(an.VD,{variant:"dark",fullWidth:!0,options:p,value:p[i].value,onChange:this.handleSchemeChange}))||null,o[i].schemes.map(y=>{var A,w,E,F,G,te,ne;const se=(0,Gt.A8)(y.id);if(y.type==="apiKey"){const ye=(0,Gt.Al)(se,""),ge={field:`auth.${se}`,fullWidth:!0,initialValue:(0,tr.NG)(y)||(0,Gt.YQ)(`auth.${se}`)||(r==null?void 0:r[se]),initValue:(0,tr.NG)(y)||(0,Gt.YQ)(`auth.${se}`)||(r==null?void 0:r[se]),validate:tr.np,validateOnBlur:!0,validateOnChange:!0};return d.createElement(it.NI,{key:se},d.createElement(it.lX,null," ",y.name,": "),ye?d.createElement(ni,ss(os({},ge),{options:ye})):d.createElement(Lr,ss(os({},ge),{type:"password",panel:"try-it","data-cy":"apiKey-auth-password"})))}else if(y.type==="http"){if(y.scheme==="basic"){const ye=(0,Gt.Al)(se,"username"),ge={field:`auth.${se}.username`,fullWidth:!0,initialValue:(0,Gt.YQ)(`auth.${se}.username`)||((A=r==null?void 0:r[se])==null?void 0:A.username),initValue:(0,Gt.YQ)(`auth.${se}.username`)||((w=r==null?void 0:r[se])==null?void 0:w.username),validate:tr.np,validateOnBlur:!0,validateOnChange:!0};return d.createElement(d.Fragment,{key:se},d.createElement(it.NI,null,d.createElement(it.lX,null," ",(0,uo.l)("tryItAuthBasicUsername"),": "),ye?d.createElement(ni,ss(os({},ge),{options:ye})):d.createElement(Lr,ss(os({},ge),{panel:"try-it"}))),d.createElement(it.NI,null,d.createElement(it.lX,null," ",(0,uo.l)("tryItAuthBasicPassword"),": "),d.createElement(Lr,{type:"password","data-cy":"http-auth-password",fullWidth:!0,field:`auth.${se}.password`,initialValue:(0,Gt.YQ)(`auth.${se}.password`)||((E=r==null?void 0:r[se])==null?void 0:E.password)||"",validateOnBlur:!0,validateOnChange:!0,panel:"try-it"})))}else if(y.scheme==="bearer"){const ye=(0,Gt.Al)(se,""),ge={field:`auth.${se}`,fullWidth:!0,initialValue:(0,Gt.YQ)(`auth.${se}`)||(r==null?void 0:r[se]),initValue:(0,Gt.YQ)(`auth.${se}`)||(r==null?void 0:r[se]),validate:tr.np,validateOnBlur:!0,validateOnChange:!0};return d.createElement(d.Fragment,{key:se},d.createElement(it.NI,null,d.createElement(it.lX,null," Bearer Token: "),ye?d.createElement(ni,ss(os({},ge),{options:ye})):d.createElement(Lr,ss(os({},ge),{type:"password",placeholder:"(without 'Bearer')",panel:"try-it"}))))}}else{if(y.type==="oauth2"&&y.flows&&y.flows.clientCredentials)return d.createElement(kv,{key:se,flow:y.flows.clientCredentials,server:this.props.activeServer,authCorsProxyUrl:this.props.authCorsProxyUrl,id:se,form:this.props.form,formApi:this.props.formApi,clientId:y.flows.clientCredentials["x-defaultClientId"]||y["x-defaultClientId"],defaultValues:r==null?void 0:r[se]});if(y.type==="oauth2"&&y.flows&&y.flows.implicit)return d.createElement(Sl,{key:se,authorizationUrl:y.flows.implicit.authorizationUrl,authCorsProxyUrl:this.props.authCorsProxyUrl,scopes:Object.keys(((G=(F=y==null?void 0:y.flows)==null?void 0:F.implicit)==null?void 0:G.scopes)||{}),server:this.props.activeServer,id:se,form:this.props.form,formApi:this.props.formApi,clientId:y.flows.implicit["x-defaultClientId"]||y["x-defaultClientId"],flow:"implicit",defaultValues:r==null?void 0:r[se]});if(y.type==="oauth2"&&y.flows&&y.flows.authorizationCode)return d.createElement(Sl,{key:se,authorizationUrl:y.flows.authorizationCode.authorizationUrl,tokenUrl:y.flows.authorizationCode.tokenUrl,authCorsProxyUrl:this.props.authCorsProxyUrl,scopes:Object.keys(((te=y.flows.authorizationCode)==null?void 0:te.scopes)||{}),server:this.props.activeServer,id:se,form:this.props.form,formApi:this.props.formApi,clientId:y.flows.authorizationCode["x-defaultClientId"]||y["x-defaultClientId"],flow:"authorizationCode",tokenEndpointAuthMethod:y.flows.authorizationCode["x-tokenEndpointAuthMethod"],usePkce:y.flows.authorizationCode["x-usePkce"],defaultValues:r==null?void 0:r[se]});if(y.type==="oauth2"){let ye=(0,Gt.YQ)(`auth.${se}.token`)||JSON.stringify((ne=r==null?void 0:r[se])==null?void 0:ne.token);return ye=ye?JSON.parse(ye):{},d.createElement(d.Fragment,{key:se},d.createElement(it.NI,null,d.createElement(it.lX,null," Access Token Type: "),d.createElement(Lr,{fullWidth:!0,field:`auth.${se}.token.token_type`,initialValue:ye.token_type||"Bearer",panel:"try-it"})),d.createElement(it.NI,null,d.createElement(it.lX,null," Access Token: "),d.createElement(Lr,{type:"password",fullWidth:!0,field:`auth.${se}.token.access_token`,validate:tr.np,initialValue:ye.access_token,validateOnBlur:!0,validateOnChange:!0,panel:"try-it"})))}else if(y.type==="openIdConnect")return d.createElement(wv,{key:se,server:this.props.activeServer,authCorsProxyUrl:this.props.authCorsProxyUrl,id:se,form:this.props.form,formApi:this.props.formApi,scheme:y,clientId:y["x-defaultClientId"],defaultValues:r==null?void 0:r[se]})}})),d.createElement("small",null,d.createElement("strong",null,"Note"),": Your credentials will be saved until the end of the browser session"))}}var Uv=a(9996),jv=a.n(Uv),zc=a(67897),pf=a(49376),Vv=Object.defineProperty,hf=Object.getOwnPropertySymbols,zd=Object.prototype.hasOwnProperty,Gd=Object.prototype.propertyIsEnumerable,$d=(t,r,i)=>r in t?Vv(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,Wv=(t,r)=>{for(var i in r||(r={}))zd.call(r,i)&&$d(t,i,r[i]);if(hf)for(var i of hf(r))Gd.call(r,i)&&$d(t,i,r[i]);return t},Kd=(t,r)=>{var i={};for(var o in t)zd.call(t,o)&&r.indexOf(o)<0&&(i[o]=t[o]);if(t!=null&&hf)for(var o of hf(t))r.indexOf(o)<0&&Gd.call(t,o)&&(i[o]=t[o]);return i},Hv=(t,r,i)=>new Promise((o,s)=>{var p=w=>{try{A(i.next(w))}catch(E){s(E)}},y=w=>{try{A(i.throw(w))}catch(E){s(E)}},A=w=>w.done?o(w.value):Promise.resolve(w.value).then(p,y);A((i=i.apply(t,r)).next())});const Yd=d.forwardRef((t,r)=>{var i=Kd(t,[]);const o=i,{schema:s,contentName:p,onChange:y,name:A}=o,w=Kd(o,["schema","contentName","onChange","name"]),{render:E}=Tn(Wv({field:A},w)),F=G=>Hv(void 0,null,function*(){const te=yield It(G.target.files,s);y(p,te)});return E(d.createElement("input",{"data-cy":"file-upload-input",type:"file",id:i.id,className:i.className,name:i.name,onChange:F,multiple:i.multiple,accept:i.accept,ref:r}))});Yd.displayName="FileUpload";const zv=(0,Fa.Pi)(t=>{var r;const{mediaType:i,onChange:o,formApi:s}=t,p=i.examples||{},{exampleKey:y}=(0,zc.C6)(i.operation,p),A=(r=p[y])==null?void 0:r.rawValue,w=Gv(i);(0,d.useEffect)(()=>s&&w.forEach(F=>{var G,te;const ne=A==null?void 0:A[F.name],se=(te=(G=F.example)!=null?G:ne==null?void 0:ne.example)!=null?te:ne,ye=typeof se=="object"?JSON.stringify(se):se;se!==void 0&&s.setValue("body."+F.name,`${ye}`)}),[y]);const E=i.schema||{};return dt(E,i.name)?d.createElement(Jd,null,d.createElement(it.NI,null,d.createElement(Xd,{fullWidth:!0,id:`body.${i.name}`,name:`body.${i.name}`,accept:ot(i.name),schema:E,contentName:i.name,onChange:o}))):E.type!==be.OBJECT&&!w?(console.warn(`Invalid schema for request body and mime type: "${i.name}"`,E),null):d.createElement(Jd,null,w.map(F=>{const G=F.schema||{},te=i.name===pf.T.MULTIPART&&yt(G),ne=G.contentMediaType||"",se=te?d.createElement(Xd,{fullWidth:!0,id:"body."+F.name,name:"body."+F.name,accept:ot(ne),multiple:G.type==="array",schema:G,contentName:F.name,onChange:o}):d.createElement(Lr,{fullWidth:!0,id:"body."+F.name,field:"body."+F.name,placeholder:G.description||F.name,panel:"try-it"});return d.createElement(it.NI,{key:F.name},d.createElement(it.lX,null,F.name,":"),se)}))});function Gv(t){var r,i,o,s,p;return(((i=(r=t.schema)==null?void 0:r.oneOf)==null?void 0:i.length)?((s=t.schema)==null?void 0:s.oneOf[(o=t.schema)==null?void 0:o.activeOneOf].fields)||[]:((p=t.schema)==null?void 0:p.fields)||[]).filter(y=>!y.schema.readOnly)}const Jd=Tt.default.div`
|
|
319
319
|
> div {
|
|
320
320
|
margin-top: 10px;
|
|
321
321
|
}
|
|
322
322
|
`,Xd=(0,Tt.default)(Yd)`
|
|
323
323
|
${gi("try-it")};
|
|
324
|
-
${({inputType:
|
|
325
|
-
${({fullWidth:
|
|
324
|
+
${({inputType:t})=>t==="password"?"padding-right: 40px;":""};
|
|
325
|
+
${({fullWidth:t})=>t?"width: 100%;":""}
|
|
326
326
|
`;var Qd=a(72409);const $v=(0,Tt.default)(Qd.A3)`
|
|
327
327
|
border-radius: var(--panel-border-radius);
|
|
328
328
|
margin-bottom: 10px;
|
|
329
|
-
`;var Kv=a(35310),ls=a(4631);function vf(r
|
|
330
|
-
`;break;case 114:Te+="\r";break;case 116:Te+=" ";break;case 117:var De=te(4,!0);De>=0?Te+=String.fromCharCode(De):G=4;break;default:G=5}He=o;continue}if(Be>=0&&Be<=31)if(Al(Be)){Te+=
|
|
331
|
-
`),A++,E=o,y=14;switch(Te){case 123:return o++,y=1;case 125:return o++,y=2;case 91:return o++,y=3;case 93:return o++,y=4;case 58:return o++,y=6;case 44:return o++,y=5;case 34:return o++,s=ye(),y=10;case 47:var He=o-1;if(
|
|
329
|
+
`;var Kv=a(35310),ls=a(4631);function vf(t,r){r===void 0&&(r=!1);var i=t.length,o=0,s="",p=0,y=16,A=0,w=0,E=0,F=0,G=0;function te(Te,He){for(var Be=0,ze=0;Be<Te||!He;){var De=t.charCodeAt(o);if(De>=48&&De<=57)ze=ze*16+De-48;else if(De>=65&&De<=70)ze=ze*16+De-65+10;else if(De>=97&&De<=102)ze=ze*16+De-97+10;else break;o++,Be++}return Be<Te&&(ze=-1),ze}function ne(Te){o=Te,s="",p=0,y=16,G=0}function se(){var Te=o;if(t.charCodeAt(o)===48)o++;else for(o++;o<t.length&&us(t.charCodeAt(o));)o++;if(o<t.length&&t.charCodeAt(o)===46)if(o++,o<t.length&&us(t.charCodeAt(o)))for(o++;o<t.length&&us(t.charCodeAt(o));)o++;else return G=3,t.substring(Te,o);var He=o;if(o<t.length&&(t.charCodeAt(o)===69||t.charCodeAt(o)===101))if(o++,(o<t.length&&t.charCodeAt(o)===43||t.charCodeAt(o)===45)&&o++,o<t.length&&us(t.charCodeAt(o))){for(o++;o<t.length&&us(t.charCodeAt(o));)o++;He=o}else G=3;return t.substring(Te,He)}function ye(){for(var Te="",He=o;;){if(o>=i){Te+=t.substring(He,o),G=2;break}var Be=t.charCodeAt(o);if(Be===34){Te+=t.substring(He,o),o++;break}if(Be===92){if(Te+=t.substring(He,o),o++,o>=i){G=2;break}var ze=t.charCodeAt(o++);switch(ze){case 34:Te+='"';break;case 92:Te+="\\";break;case 47:Te+="/";break;case 98:Te+="\b";break;case 102:Te+="\f";break;case 110:Te+=`
|
|
330
|
+
`;break;case 114:Te+="\r";break;case 116:Te+=" ";break;case 117:var De=te(4,!0);De>=0?Te+=String.fromCharCode(De):G=4;break;default:G=5}He=o;continue}if(Be>=0&&Be<=31)if(Al(Be)){Te+=t.substring(He,o),G=2;break}else G=6;o++}return Te}function ge(){if(s="",G=0,p=o,w=A,F=E,o>=i)return p=i,y=17;var Te=t.charCodeAt(o);if(Gc(Te)){do o++,s+=String.fromCharCode(Te),Te=t.charCodeAt(o);while(Gc(Te));return y=15}if(Al(Te))return o++,s+=String.fromCharCode(Te),Te===13&&t.charCodeAt(o)===10&&(o++,s+=`
|
|
331
|
+
`),A++,E=o,y=14;switch(Te){case 123:return o++,y=1;case 125:return o++,y=2;case 91:return o++,y=3;case 93:return o++,y=4;case 58:return o++,y=6;case 44:return o++,y=5;case 34:return o++,s=ye(),y=10;case 47:var He=o-1;if(t.charCodeAt(o+1)===47){for(o+=2;o<i&&!Al(t.charCodeAt(o));)o++;return s=t.substring(He,o),y=12}if(t.charCodeAt(o+1)===42){o+=2;for(var Be=i-1,ze=!1;o<Be;){var De=t.charCodeAt(o);if(De===42&&t.charCodeAt(o+1)===47){o+=2,ze=!0;break}o++,Al(De)&&(De===13&&t.charCodeAt(o)===10&&o++,A++,E=o)}return ze||(o++,G=1),s=t.substring(He,o),y=13}return s+=String.fromCharCode(Te),o++,y=16;case 45:if(s+=String.fromCharCode(Te),o++,o===i||!us(t.charCodeAt(o)))return y=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return s+=se(),y=11;default:for(;o<i&&Ae(Te);)o++,Te=t.charCodeAt(o);if(p!==o){switch(s=t.substring(p,o),s){case"true":return y=8;case"false":return y=9;case"null":return y=7}return y=16}return s+=String.fromCharCode(Te),o++,y=16}}function Ae(Te){if(Gc(Te)||Al(Te))return!1;switch(Te){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function me(){var Te;do Te=ge();while(Te>=12&&Te<=15);return Te}return{setPosition:ne,getPosition:function(){return o},scan:r?me:ge,getToken:function(){return y},getTokenValue:function(){return s},getTokenOffset:function(){return p},getTokenLength:function(){return o-p},getTokenStartLine:function(){return w},getTokenStartCharacter:function(){return p-F},getTokenError:function(){return G}}}function Gc(t){return t===32||t===9||t===11||t===12||t===160||t===5760||t>=8192&&t<=8203||t===8239||t===8287||t===12288||t===65279}function Al(t){return t===10||t===13||t===8232||t===8233}function us(t){return t>=48&&t<=57}function Yv(t,r,i){var o,s,p,y,A;if(r){for(y=r.offset,A=y+r.length,p=y;p>0&&!Zd(t,p-1);)p--;for(var w=A;w<t.length&&!Zd(t,w);)w++;s=t.substring(p,w),o=Jv(s,i)}else s=t,o=0,p=0,y=0,A=t.length;var E=Xv(i,t),F=!1,G=0,te;i.insertSpaces?te=$c(" ",i.tabSize||4):te=" ";var ne=vf(s,!1),se=!1;function ye(){return E+$c(te,o+G)}function ge(){var et=ne.scan();for(F=!1;et===15||et===14;)F=F||et===14,et=ne.scan();return se=et===16||ne.getTokenError()!==0,et}var Ae=[];function me(et,$e,gt){!se&&$e<A&>>y&&t.substring($e,gt)!==et&&Ae.push({offset:$e,length:gt-$e,content:et})}var Te=ge();if(Te!==17){var He=ne.getTokenOffset()+p,Be=$c(te,o);me(Be,p,He)}for(;Te!==17;){for(var ze=ne.getTokenOffset()+ne.getTokenLength()+p,De=ge(),Ue="";!F&&(De===12||De===13);){var We=ne.getTokenOffset()+p;me(" ",ze,We),ze=ne.getTokenOffset()+ne.getTokenLength()+p,Ue=De===12?ye():"",De=ge()}if(De===2)Te!==1&&(G--,Ue=ye());else if(De===4)Te!==3&&(G--,Ue=ye());else{switch(Te){case 3:case 1:G++,Ue=ye();break;case 5:case 12:Ue=ye();break;case 13:F?Ue=ye():Ue=" ";break;case 6:Ue=" ";break;case 10:if(De===6){Ue="";break}case 7:case 8:case 9:case 11:case 2:case 4:De===12||De===13?Ue=" ":De!==5&&De!==17&&(se=!0);break;case 16:se=!0;break}F&&(De===12||De===13)&&(Ue=ye())}var Je=ne.getTokenOffset()+p;me(Ue,ze,Je),Te=De}return Ae}function $c(t,r){for(var i="",o=0;o<r;o++)i+=t;return i}function Jv(t,r){for(var i=0,o=0,s=r.tabSize||4;i<t.length;){var p=t.charAt(i);if(p===" ")o++;else if(p===" ")o+=s;else break;i++}return Math.floor(o/s)}function Xv(t,r){for(var i=0;i<r.length;i++){var o=r.charAt(i);if(o==="\r")return i+1<r.length&&r.charAt(i+1)===`
|
|
332
332
|
`?`\r
|
|
333
333
|
`:"\r";if(o===`
|
|
334
334
|
`)return`
|
|
335
|
-
`}return
|
|
336
|
-
`}function Zd(r
|
|
337
|
-
`.indexOf(r.charAt(t))!==-1}var El;(function(r){r.DEFAULT={allowTrailingComma:!1}})(El||(El={}));function Qv(r,t){var i=[],o=new Object,s=void 0,p={value:{},offset:0,length:0,type:"object",parent:void 0},y=!1;function A(w,E,F,G){p.value=w,p.offset=E,p.length=F,p.type=G,p.colonOffset=void 0,s=p}try{gf(r,{onObjectBegin:function(w,E){if(t<=w)throw o;s=void 0,y=t>w,i.push("")},onObjectProperty:function(w,E,F){if(t<E||(A(w,E,F,"property"),i[i.length-1]=w,t<=E+F))throw o},onObjectEnd:function(w,E){if(t<=w)throw o;s=void 0,i.pop()},onArrayBegin:function(w,E){if(t<=w)throw o;s=void 0,i.push(0)},onArrayEnd:function(w,E){if(t<=w)throw o;s=void 0,i.pop()},onLiteralValue:function(w,E,F){if(t<E||(A(w,E,F,ep(w)),t<=E+F))throw o},onSeparator:function(w,E,F){if(t<=E)throw o;if(w===":"&&s&&s.type==="property")s.colonOffset=E,y=!1,s=void 0;else if(w===","){var G=i[i.length-1];typeof G=="number"?i[i.length-1]=G+1:(y=!0,i[i.length-1]=""),s=void 0}}})}catch(w){if(w!==o)throw w}return{path:i,previousNode:s,isAtPropertyKey:y,matches:function(w){for(var E=0,F=0;E<w.length&&F<i.length;F++)if(w[E]===i[F]||w[E]==="*")E++;else if(w[E]!=="**")return!1;return E===w.length}}}function Zv(r,t,i){t===void 0&&(t=[]),i===void 0&&(i=El.DEFAULT);var o=null,s=[],p=[];function y(w){Array.isArray(s)?s.push(w):o!==null&&(s[o]=w)}var A={onObjectBegin:function(){var w={};y(w),p.push(s),s=w,o=null},onObjectProperty:function(w){o=w},onObjectEnd:function(){s=p.pop()},onArrayBegin:function(){var w=[];y(w),p.push(s),s=w,o=null},onArrayEnd:function(){s=p.pop()},onLiteralValue:y,onError:function(w,E,F){t.push({error:w,offset:E,length:F})}};return gf(r,A,i),s[0]}function _v(r,t,i){t===void 0&&(t=[]),i===void 0&&(i=El.DEFAULT);var o={type:"array",offset:-1,length:-1,children:[],parent:void 0};function s(w){o.type==="property"&&(o.length=w-o.offset,o=o.parent)}function p(w){return o.children.push(w),w}var y={onObjectBegin:function(w){o=p({type:"object",offset:w,length:-1,parent:o,children:[]})},onObjectProperty:function(w,E,F){o=p({type:"property",offset:E,length:-1,parent:o,children:[]}),o.children.push({type:"string",value:w,offset:E,length:F,parent:o})},onObjectEnd:function(w,E){s(w+E),o.length=w+E-o.offset,o=o.parent,s(w+E)},onArrayBegin:function(w,E){o=p({type:"array",offset:w,length:-1,parent:o,children:[]})},onArrayEnd:function(w,E){o.length=w+E-o.offset,o=o.parent,s(w+E)},onLiteralValue:function(w,E,F){p({type:ep(w),offset:E,length:F,parent:o,value:w}),s(E+F)},onSeparator:function(w,E,F){o.type==="property"&&(w===":"?o.colonOffset=E:w===","&&s(E))},onError:function(w,E,F){t.push({error:w,offset:E,length:F})}};gf(r,y,i);var A=o.children[0];return A&&delete A.parent,A}function qv(r,t){if(!!r){for(var i=r,o=0,s=t;o<s.length;o++){var p=s[o];if(typeof p=="string"){if(i.type!=="object"||!Array.isArray(i.children))return;for(var y=!1,A=0,w=i.children;A<w.length;A++){var E=w[A];if(Array.isArray(E.children)&&E.children[0].value===p){i=E.children[1],y=!0;break}}if(!y)return}else{var F=p;if(i.type!=="array"||F<0||!Array.isArray(i.children)||F>=i.children.length)return;i=i.children[F]}}return i}}function _d(r){if(!r.parent||!r.parent.children)return[];var t=_d(r.parent);if(r.parent.type==="property"){var i=r.parent.children[0].value;t.push(i)}else if(r.parent.type==="array"){var o=r.parent.children.indexOf(r);o!==-1&&t.push(o)}return t}function Kc(r){switch(r.type){case"array":return r.children.map(Kc);case"object":for(var t=Object.create(null),i=0,o=r.children;i<o.length;i++){var s=o[i],p=s.children[1];p&&(t[s.children[0].value]=Kc(p))}return t;case"null":case"string":case"number":case"boolean":return r.value;default:return}}function eg(r,t,i){return i===void 0&&(i=!1),t>=r.offset&&t<r.offset+r.length||i&&t===r.offset+r.length}function qd(r,t,i){if(i===void 0&&(i=!1),eg(r,t,i)){var o=r.children;if(Array.isArray(o))for(var s=0;s<o.length&&o[s].offset<=t;s++){var p=qd(o[s],t,i);if(p)return p}return r}}function gf(r,t,i){i===void 0&&(i=El.DEFAULT);var o=vf(r,!1);function s(We){return We?function(){return We(o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter())}:function(){return!0}}function p(We){return We?function(Je){return We(Je,o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter())}:function(){return!0}}var y=s(t.onObjectBegin),A=p(t.onObjectProperty),w=s(t.onObjectEnd),E=s(t.onArrayBegin),F=s(t.onArrayEnd),G=p(t.onLiteralValue),te=p(t.onSeparator),ne=s(t.onComment),se=p(t.onError),ye=i&&i.disallowComments,ge=i&&i.allowTrailingComma;function Ae(){for(;;){var We=o.scan();switch(o.getTokenError()){case 4:me(14);break;case 5:me(15);break;case 3:me(13);break;case 1:ye||me(11);break;case 2:me(12);break;case 6:me(16);break}switch(We){case 12:case 13:ye?me(10):ne();break;case 16:me(1);break;case 15:case 14:break;default:return We}}}function me(We,Je,et){if(Je===void 0&&(Je=[]),et===void 0&&(et=[]),se(We),Je.length+et.length>0)for(var $e=o.getToken();$e!==17;){if(Je.indexOf($e)!==-1){Ae();break}else if(et.indexOf($e)!==-1)break;$e=Ae()}}function Te(We){var Je=o.getTokenValue();return We?G(Je):A(Je),Ae(),!0}function He(){switch(o.getToken()){case 11:var We=o.getTokenValue(),Je=Number(We);isNaN(Je)&&(me(2),Je=0),G(Je);break;case 7:G(null);break;case 8:G(!0);break;case 9:G(!1);break;default:return!1}return Ae(),!0}function Be(){return o.getToken()!==10?(me(3,[],[2,5]),!1):(Te(!1),o.getToken()===6?(te(":"),Ae(),Ue()||me(4,[],[2,5])):me(5,[],[2,5]),!0)}function ze(){y(),Ae();for(var We=!1;o.getToken()!==2&&o.getToken()!==17;){if(o.getToken()===5){if(We||me(4,[],[]),te(","),Ae(),o.getToken()===2&&ge)break}else We&&me(6,[],[]);Be()||me(4,[],[2,5]),We=!0}return w(),o.getToken()!==2?me(7,[2],[]):Ae(),!0}function De(){E(),Ae();for(var We=!1;o.getToken()!==4&&o.getToken()!==17;){if(o.getToken()===5){if(We||me(4,[],[]),te(","),Ae(),o.getToken()===4&&ge)break}else We&&me(6,[],[]);Ue()||me(4,[],[4,5]),We=!0}return F(),o.getToken()!==4?me(8,[4],[]):Ae(),!0}function Ue(){switch(o.getToken()){case 3:return De();case 1:return ze();case 10:return Te(!0);default:return He()}}return Ae(),o.getToken()===17?i.allowEmptyContent?!0:(me(4,[],[]),!1):Ue()?(o.getToken()!==17&&me(9,[],[]),!0):(me(4,[],[]),!1)}function tg(r,t){var i=vf(r),o=[],s,p=0,y;do switch(y=i.getPosition(),s=i.scan(),s){case 12:case 13:case 17:p!==y&&o.push(r.substring(p,y)),t!==void 0&&o.push(i.getTokenValue().replace(/[^\r\n]/g,t)),p=i.getPosition();break}while(s!==17);return o.join("")}function ep(r){switch(typeof r){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(r){if(Array.isArray(r))return"array"}else return"null";return"object"}default:return"null"}}function Sm(r,t,i){return rg(r,t,void 0,i)}function rg(r,t,i,o){for(var s,p=t.slice(),y=[],A=parseTree(r,y),w=void 0,E=void 0;p.length>0&&(E=p.pop(),w=findNodeAtLocation(A,p),w===void 0&&i!==void 0);)typeof E=="string"?i=(s={},s[E]=i,s):i=[i];if(w)if(w.type==="object"&&typeof E=="string"&&Array.isArray(w.children)){var F=findNodeAtLocation(w,[E]);if(F!==void 0)if(i===void 0){if(!F.parent)throw new Error("Malformed AST");var G=w.children.indexOf(F.parent),te=void 0,ne=F.parent.offset+F.parent.length;if(G>0){var se=w.children[G-1];te=se.offset+se.length}else if(te=w.offset+1,w.children.length>1){var ye=w.children[1];ne=ye.offset}return fo(r,{offset:te,length:ne-te,content:""},o)}else return fo(r,{offset:F.offset,length:F.length,content:JSON.stringify(i)},o);else{if(i===void 0)return[];var ge=JSON.stringify(E)+": "+JSON.stringify(i),Ae=o.getInsertionIndex?o.getInsertionIndex(w.children.map(function(We){return We.children[0].value})):w.children.length,me=void 0;if(Ae>0){var se=w.children[Ae-1];me={offset:se.offset+se.length,length:0,content:","+ge}}else w.children.length===0?me={offset:w.offset+1,length:0,content:ge}:me={offset:w.offset+1,length:0,content:ge+","};return fo(r,me,o)}}else if(w.type==="array"&&typeof E=="number"&&Array.isArray(w.children)){var Te=E;if(Te===-1){var ge=""+JSON.stringify(i),me=void 0;if(w.children.length===0)me={offset:w.offset+1,length:0,content:ge};else{var se=w.children[w.children.length-1];me={offset:se.offset+se.length,length:0,content:","+ge}}return fo(r,me,o)}else if(i===void 0&&w.children.length>=0){var He=E,Be=w.children[He],me=void 0;if(w.children.length===1)me={offset:w.offset+1,length:w.length-2,content:""};else if(w.children.length-1===He){var se=w.children[He-1],ze=se.offset+se.length,De=w.offset+w.length;me={offset:ze,length:De-2-ze,content:""}}else me={offset:Be.offset,length:w.children[He+1].offset-Be.offset,content:""};return fo(r,me,o)}else if(i!==void 0){var me=void 0,ge=""+JSON.stringify(i);if(!o.isArrayInsertion&&w.children.length>E){var Ue=w.children[E];me={offset:Ue.offset,length:Ue.length,content:ge}}else if(w.children.length===0||E===0)me={offset:w.offset+1,length:0,content:w.children.length===0?ge:ge+","};else{var Ae=E>w.children.length?w.children.length:E,se=w.children[Ae-1];me={offset:se.offset+se.length,length:0,content:","+ge}}return fo(r,me,o)}else throw new Error("Can not "+(i===void 0?"remove":o.isArrayInsertion?"insert":"modify")+" Array index "+Te+" as length is not sufficient")}else throw new Error("Can not add "+(typeof E!="number"?"index":"property")+" to parent of type "+w.type);else{if(i===void 0)throw new Error("Can not delete in empty document");return fo(r,{offset:A?A.offset:0,length:A?A.length:0,content:JSON.stringify(i)},o)}}function fo(r,t,i){if(!i.formattingOptions)return[t];var o=tp(r,t),s=t.offset,p=t.offset+t.content.length;if(t.length===0||t.content.length===0){for(;s>0&&!isEOL(o,s-1);)s--;for(;p<o.length&&!isEOL(o,p);)p++}for(var y=format(o,{offset:s,length:p-s},i.formattingOptions),A=y.length-1;A>=0;A--){var w=y[A];o=tp(o,w),s=Math.min(s,w.offset),p=Math.max(p,w.offset+w.length),p+=w.content.length-w.length}var E=r.length-(o.length-p)-s;return[{offset:s,length:E,content:o.substring(s,p)}]}function tp(r,t){return r.substring(0,t.offset)+t.content+r.substring(t.offset+t.length)}function Am(r,t){return`\r
|
|
338
|
-
`.indexOf(r.charAt(t))!==-1}var fs=vf,Em=Qv,ng=Zv,Cm=_v,Om=qv,ig=qd,ag=_d,og=Kc,Tm=gf,Pm=tg;function Im(r){switch(r){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return"<unknown ParseErrorCode>"}function sg(r,t,i){return Yv(r,t,i)}function Fm(r,t,i,o){return edit.setProperty(r,t,i,o)}function km(r,t){for(var i=t.length-1;i>=0;i--)r=edit.applyEdit(r,t[i]);return r}function Cl(r,t){if(r===t)return!0;if(r==null||t===null||t===void 0||typeof r!=typeof t||typeof r!="object"||Array.isArray(r)!==Array.isArray(t))return!1;var i,o;if(Array.isArray(r)){if(r.length!==t.length)return!1;for(i=0;i<r.length;i++)if(!Cl(r[i],t[i]))return!1}else{var s=[];for(o in r)s.push(o);s.sort();var p=[];for(o in t)p.push(o);if(p.sort(),!Cl(s,p))return!1;for(i=0;i<s.length;i++)if(!Cl(r[s[i]],t[s[i]]))return!1}return!0}function Kn(r){return typeof r=="number"}function sa(r){return typeof r!="undefined"}function Ni(r){return typeof r=="boolean"}function lg(r){return typeof r=="string"}var rp;(function(r){r.MIN_VALUE=-2147483648,r.MAX_VALUE=2147483647})(rp||(rp={}));var yf;(function(r){r.MIN_VALUE=0,r.MAX_VALUE=2147483647})(yf||(yf={}));var mi;(function(r){function t(o,s){return o===Number.MAX_VALUE&&(o=yf.MAX_VALUE),s===Number.MAX_VALUE&&(s=yf.MAX_VALUE),{line:o,character:s}}r.create=t;function i(o){var s=o;return _e.objectLiteral(s)&&_e.uinteger(s.line)&&_e.uinteger(s.character)}r.is=i})(mi||(mi={}));var ur;(function(r){function t(o,s,p,y){if(_e.uinteger(o)&&_e.uinteger(s)&&_e.uinteger(p)&&_e.uinteger(y))return{start:mi.create(o,s),end:mi.create(p,y)};if(mi.is(o)&&mi.is(s))return{start:o,end:s};throw new Error("Range#create called with invalid arguments["+o+", "+s+", "+p+", "+y+"]")}r.create=t;function i(o){var s=o;return _e.objectLiteral(s)&&mi.is(s.start)&&mi.is(s.end)}r.is=i})(ur||(ur={}));var Ol;(function(r){function t(o,s){return{uri:o,range:s}}r.create=t;function i(o){var s=o;return _e.defined(s)&&ur.is(s.range)&&(_e.string(s.uri)||_e.undefined(s.uri))}r.is=i})(Ol||(Ol={}));var np;(function(r){function t(o,s,p,y){return{targetUri:o,targetRange:s,targetSelectionRange:p,originSelectionRange:y}}r.create=t;function i(o){var s=o;return _e.defined(s)&&ur.is(s.targetRange)&&_e.string(s.targetUri)&&(ur.is(s.targetSelectionRange)||_e.undefined(s.targetSelectionRange))&&(ur.is(s.originSelectionRange)||_e.undefined(s.originSelectionRange))}r.is=i})(np||(np={}));var Yc;(function(r){function t(o,s,p,y){return{red:o,green:s,blue:p,alpha:y}}r.create=t;function i(o){var s=o;return _e.numberRange(s.red,0,1)&&_e.numberRange(s.green,0,1)&&_e.numberRange(s.blue,0,1)&&_e.numberRange(s.alpha,0,1)}r.is=i})(Yc||(Yc={}));var ip;(function(r){function t(o,s){return{range:o,color:s}}r.create=t;function i(o){var s=o;return ur.is(s.range)&&Yc.is(s.color)}r.is=i})(ip||(ip={}));var ap;(function(r){function t(o,s,p){return{label:o,textEdit:s,additionalTextEdits:p}}r.create=t;function i(o){var s=o;return _e.string(s.label)&&(_e.undefined(s.textEdit)||xi.is(s))&&(_e.undefined(s.additionalTextEdits)||_e.typedArray(s.additionalTextEdits,xi.is))}r.is=i})(ap||(ap={}));var Tl;(function(r){r.Comment="comment",r.Imports="imports",r.Region="region"})(Tl||(Tl={}));var op;(function(r){function t(o,s,p,y,A){var w={startLine:o,endLine:s};return _e.defined(p)&&(w.startCharacter=p),_e.defined(y)&&(w.endCharacter=y),_e.defined(A)&&(w.kind=A),w}r.create=t;function i(o){var s=o;return _e.uinteger(s.startLine)&&_e.uinteger(s.startLine)&&(_e.undefined(s.startCharacter)||_e.uinteger(s.startCharacter))&&(_e.undefined(s.endCharacter)||_e.uinteger(s.endCharacter))&&(_e.undefined(s.kind)||_e.string(s.kind))}r.is=i})(op||(op={}));var Jc;(function(r){function t(o,s){return{location:o,message:s}}r.create=t;function i(o){var s=o;return _e.defined(s)&&Ol.is(s.location)&&_e.string(s.message)}r.is=i})(Jc||(Jc={}));var $t;(function(r){r.Error=1,r.Warning=2,r.Information=3,r.Hint=4})($t||($t={}));var sp;(function(r){r.Unnecessary=1,r.Deprecated=2})(sp||(sp={}));var lp;(function(r){function t(i){var o=i;return o!=null&&_e.string(o.href)}r.is=t})(lp||(lp={}));var la;(function(r){function t(o,s,p,y,A,w){var E={range:o,message:s};return _e.defined(p)&&(E.severity=p),_e.defined(y)&&(E.code=y),_e.defined(A)&&(E.source=A),_e.defined(w)&&(E.relatedInformation=w),E}r.create=t;function i(o){var s,p=o;return _e.defined(p)&&ur.is(p.range)&&_e.string(p.message)&&(_e.number(p.severity)||_e.undefined(p.severity))&&(_e.integer(p.code)||_e.string(p.code)||_e.undefined(p.code))&&(_e.undefined(p.codeDescription)||_e.string((s=p.codeDescription)===null||s===void 0?void 0:s.href))&&(_e.string(p.source)||_e.undefined(p.source))&&(_e.undefined(p.relatedInformation)||_e.typedArray(p.relatedInformation,Jc.is))}r.is=i})(la||(la={}));var Pl;(function(r){function t(o,s){for(var p=[],y=2;y<arguments.length;y++)p[y-2]=arguments[y];var A={title:o,command:s};return _e.defined(p)&&p.length>0&&(A.arguments=p),A}r.create=t;function i(o){var s=o;return _e.defined(s)&&_e.string(s.title)&&_e.string(s.command)}r.is=i})(Pl||(Pl={}));var xi;(function(r){function t(p,y){return{range:p,newText:y}}r.replace=t;function i(p,y){return{range:{start:p,end:p},newText:y}}r.insert=i;function o(p){return{range:p,newText:""}}r.del=o;function s(p){var y=p;return _e.objectLiteral(y)&&_e.string(y.newText)&&ur.is(y.range)}r.is=s})(xi||(xi={}));var cs;(function(r){function t(o,s,p){var y={label:o};return s!==void 0&&(y.needsConfirmation=s),p!==void 0&&(y.description=p),y}r.create=t;function i(o){var s=o;return s!==void 0&&_e.objectLiteral(s)&&_e.string(s.label)&&(_e.boolean(s.needsConfirmation)||s.needsConfirmation===void 0)&&(_e.string(s.description)||s.description===void 0)}r.is=i})(cs||(cs={}));var Sn;(function(r){function t(i){var o=i;return typeof o=="string"}r.is=t})(Sn||(Sn={}));var Oa;(function(r){function t(p,y,A){return{range:p,newText:y,annotationId:A}}r.replace=t;function i(p,y,A){return{range:{start:p,end:p},newText:y,annotationId:A}}r.insert=i;function o(p,y){return{range:p,newText:"",annotationId:y}}r.del=o;function s(p){var y=p;return xi.is(y)&&(cs.is(y.annotationId)||Sn.is(y.annotationId))}r.is=s})(Oa||(Oa={}));var mf;(function(r){function t(o,s){return{textDocument:o,edits:s}}r.create=t;function i(o){var s=o;return _e.defined(s)&&bf.is(s.textDocument)&&Array.isArray(s.edits)}r.is=i})(mf||(mf={}));var Il;(function(r){function t(o,s,p){var y={kind:"create",uri:o};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(y.options=s),p!==void 0&&(y.annotationId=p),y}r.create=t;function i(o){var s=o;return s&&s.kind==="create"&&_e.string(s.uri)&&(s.options===void 0||(s.options.overwrite===void 0||_e.boolean(s.options.overwrite))&&(s.options.ignoreIfExists===void 0||_e.boolean(s.options.ignoreIfExists)))&&(s.annotationId===void 0||Sn.is(s.annotationId))}r.is=i})(Il||(Il={}));var Fl;(function(r){function t(o,s,p,y){var A={kind:"rename",oldUri:o,newUri:s};return p!==void 0&&(p.overwrite!==void 0||p.ignoreIfExists!==void 0)&&(A.options=p),y!==void 0&&(A.annotationId=y),A}r.create=t;function i(o){var s=o;return s&&s.kind==="rename"&&_e.string(s.oldUri)&&_e.string(s.newUri)&&(s.options===void 0||(s.options.overwrite===void 0||_e.boolean(s.options.overwrite))&&(s.options.ignoreIfExists===void 0||_e.boolean(s.options.ignoreIfExists)))&&(s.annotationId===void 0||Sn.is(s.annotationId))}r.is=i})(Fl||(Fl={}));var kl;(function(r){function t(o,s,p){var y={kind:"delete",uri:o};return s!==void 0&&(s.recursive!==void 0||s.ignoreIfNotExists!==void 0)&&(y.options=s),p!==void 0&&(y.annotationId=p),y}r.create=t;function i(o){var s=o;return s&&s.kind==="delete"&&_e.string(s.uri)&&(s.options===void 0||(s.options.recursive===void 0||_e.boolean(s.options.recursive))&&(s.options.ignoreIfNotExists===void 0||_e.boolean(s.options.ignoreIfNotExists)))&&(s.annotationId===void 0||Sn.is(s.annotationId))}r.is=i})(kl||(kl={}));var Xc;(function(r){function t(i){var o=i;return o&&(o.changes!==void 0||o.documentChanges!==void 0)&&(o.documentChanges===void 0||o.documentChanges.every(function(s){return _e.string(s.kind)?Il.is(s)||Fl.is(s)||kl.is(s):mf.is(s)}))}r.is=t})(Xc||(Xc={}));var xf=function(){function r(t,i){this.edits=t,this.changeAnnotations=i}return r.prototype.insert=function(t,i,o){var s,p;if(o===void 0?s=xi.insert(t,i):Sn.is(o)?(p=o,s=Oa.insert(t,i,o)):(this.assertChangeAnnotations(this.changeAnnotations),p=this.changeAnnotations.manage(o),s=Oa.insert(t,i,p)),this.edits.push(s),p!==void 0)return p},r.prototype.replace=function(t,i,o){var s,p;if(o===void 0?s=xi.replace(t,i):Sn.is(o)?(p=o,s=Oa.replace(t,i,o)):(this.assertChangeAnnotations(this.changeAnnotations),p=this.changeAnnotations.manage(o),s=Oa.replace(t,i,p)),this.edits.push(s),p!==void 0)return p},r.prototype.delete=function(t,i){var o,s;if(i===void 0?o=xi.del(t):Sn.is(i)?(s=i,o=Oa.del(t,i)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(i),o=Oa.del(t,s)),this.edits.push(o),s!==void 0)return s},r.prototype.add=function(t){this.edits.push(t)},r.prototype.all=function(){return this.edits},r.prototype.clear=function(){this.edits.splice(0,this.edits.length)},r.prototype.assertChangeAnnotations=function(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},r}(),up=function(){function r(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}return r.prototype.all=function(){return this._annotations},Object.defineProperty(r.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),r.prototype.manage=function(t,i){var o;if(Sn.is(t)?o=t:(o=this.nextId(),i=t),this._annotations[o]!==void 0)throw new Error("Id "+o+" is already in use.");if(i===void 0)throw new Error("No annotation provided for id "+o);return this._annotations[o]=i,this._size++,o},r.prototype.nextId=function(){return this._counter++,this._counter.toString()},r}(),Mm=function(){function r(t){var i=this;this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new up(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(function(o){if(mf.is(o)){var s=new xf(o.edits,i._changeAnnotations);i._textEditChanges[o.textDocument.uri]=s}})):t.changes&&Object.keys(t.changes).forEach(function(o){var s=new xf(t.changes[o]);i._textEditChanges[o]=s})):this._workspaceEdit={}}return Object.defineProperty(r.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),r.prototype.getTextEditChange=function(t){if(bf.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i={uri:t.uri,version:t.version},o=this._textEditChanges[i.uri];if(!o){var s=[],p={textDocument:i,edits:s};this._workspaceEdit.documentChanges.push(p),o=new xf(s,this._changeAnnotations),this._textEditChanges[i.uri]=o}return o}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var o=this._textEditChanges[t];if(!o){var s=[];this._workspaceEdit.changes[t]=s,o=new xf(s),this._textEditChanges[t]=o}return o}},r.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new up,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},r.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},r.prototype.createFile=function(t,i,o){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var s;cs.is(i)||Sn.is(i)?s=i:o=i;var p,y;if(s===void 0?p=Il.create(t,o):(y=Sn.is(s)?s:this._changeAnnotations.manage(s),p=Il.create(t,o,y)),this._workspaceEdit.documentChanges.push(p),y!==void 0)return y},r.prototype.renameFile=function(t,i,o,s){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var p;cs.is(o)||Sn.is(o)?p=o:s=o;var y,A;if(p===void 0?y=Fl.create(t,i,s):(A=Sn.is(p)?p:this._changeAnnotations.manage(p),y=Fl.create(t,i,s,A)),this._workspaceEdit.documentChanges.push(y),A!==void 0)return A},r.prototype.deleteFile=function(t,i,o){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var s;cs.is(i)||Sn.is(i)?s=i:o=i;var p,y;if(s===void 0?p=kl.create(t,o):(y=Sn.is(s)?s:this._changeAnnotations.manage(s),p=kl.create(t,o,y)),this._workspaceEdit.documentChanges.push(p),y!==void 0)return y},r}(),fp;(function(r){function t(o){return{uri:o}}r.create=t;function i(o){var s=o;return _e.defined(s)&&_e.string(s.uri)}r.is=i})(fp||(fp={}));var cp;(function(r){function t(o,s){return{uri:o,version:s}}r.create=t;function i(o){var s=o;return _e.defined(s)&&_e.string(s.uri)&&_e.integer(s.version)}r.is=i})(cp||(cp={}));var bf;(function(r){function t(o,s){return{uri:o,version:s}}r.create=t;function i(o){var s=o;return _e.defined(s)&&_e.string(s.uri)&&(s.version===null||_e.integer(s.version))}r.is=i})(bf||(bf={}));var dp;(function(r){function t(o,s,p,y){return{uri:o,languageId:s,version:p,text:y}}r.create=t;function i(o){var s=o;return _e.defined(s)&&_e.string(s.uri)&&_e.string(s.languageId)&&_e.integer(s.version)&&_e.string(s.text)}r.is=i})(dp||(dp={}));var ua;(function(r){r.PlainText="plaintext",r.Markdown="markdown"})(ua||(ua={})),function(r){function t(i){var o=i;return o===r.PlainText||o===r.Markdown}r.is=t}(ua||(ua={}));var Qc;(function(r){function t(i){var o=i;return _e.objectLiteral(i)&&ua.is(o.kind)&&_e.string(o.value)}r.is=t})(Qc||(Qc={}));var Yn;(function(r){r.Text=1,r.Method=2,r.Function=3,r.Constructor=4,r.Field=5,r.Variable=6,r.Class=7,r.Interface=8,r.Module=9,r.Property=10,r.Unit=11,r.Value=12,r.Enum=13,r.Keyword=14,r.Snippet=15,r.Color=16,r.File=17,r.Reference=18,r.Folder=19,r.EnumMember=20,r.Constant=21,r.Struct=22,r.Event=23,r.Operator=24,r.TypeParameter=25})(Yn||(Yn={}));var _r;(function(r){r.PlainText=1,r.Snippet=2})(_r||(_r={}));var pp;(function(r){r.Deprecated=1})(pp||(pp={}));var hp;(function(r){function t(o,s,p){return{newText:o,insert:s,replace:p}}r.create=t;function i(o){var s=o;return s&&_e.string(s.newText)&&ur.is(s.insert)&&ur.is(s.replace)}r.is=i})(hp||(hp={}));var vp;(function(r){r.asIs=1,r.adjustIndentation=2})(vp||(vp={}));var Zc;(function(r){function t(i){return{label:i}}r.create=t})(Zc||(Zc={}));var gp;(function(r){function t(i,o){return{items:i||[],isIncomplete:!!o}}r.create=t})(gp||(gp={}));var wf;(function(r){function t(o){return o.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}r.fromPlainText=t;function i(o){var s=o;return _e.string(s)||_e.objectLiteral(s)&&_e.string(s.language)&&_e.string(s.value)}r.is=i})(wf||(wf={}));var yp;(function(r){function t(i){var o=i;return!!o&&_e.objectLiteral(o)&&(Qc.is(o.contents)||wf.is(o.contents)||_e.typedArray(o.contents,wf.is))&&(i.range===void 0||ur.is(i.range))}r.is=t})(yp||(yp={}));var mp;(function(r){function t(i,o){return o?{label:i,documentation:o}:{label:i}}r.create=t})(mp||(mp={}));var xp;(function(r){function t(i,o){for(var s=[],p=2;p<arguments.length;p++)s[p-2]=arguments[p];var y={label:i};return _e.defined(o)&&(y.documentation=o),_e.defined(s)?y.parameters=s:y.parameters=[],y}r.create=t})(xp||(xp={}));var bp;(function(r){r.Text=1,r.Read=2,r.Write=3})(bp||(bp={}));var wp;(function(r){function t(i,o){var s={range:i};return _e.number(o)&&(s.kind=o),s}r.create=t})(wp||(wp={}));var Bi;(function(r){r.File=1,r.Module=2,r.Namespace=3,r.Package=4,r.Class=5,r.Method=6,r.Property=7,r.Field=8,r.Constructor=9,r.Enum=10,r.Interface=11,r.Function=12,r.Variable=13,r.Constant=14,r.String=15,r.Number=16,r.Boolean=17,r.Array=18,r.Object=19,r.Key=20,r.Null=21,r.EnumMember=22,r.Struct=23,r.Event=24,r.Operator=25,r.TypeParameter=26})(Bi||(Bi={}));var Sp;(function(r){r.Deprecated=1})(Sp||(Sp={}));var Ap;(function(r){function t(i,o,s,p,y){var A={name:i,kind:o,location:{uri:p,range:s}};return y&&(A.containerName=y),A}r.create=t})(Ap||(Ap={}));var Ep;(function(r){function t(o,s,p,y,A,w){var E={name:o,detail:s,kind:p,range:y,selectionRange:A};return w!==void 0&&(E.children=w),E}r.create=t;function i(o){var s=o;return s&&_e.string(s.name)&&_e.number(s.kind)&&ur.is(s.range)&&ur.is(s.selectionRange)&&(s.detail===void 0||_e.string(s.detail))&&(s.deprecated===void 0||_e.boolean(s.deprecated))&&(s.children===void 0||Array.isArray(s.children))&&(s.tags===void 0||Array.isArray(s.tags))}r.is=i})(Ep||(Ep={}));var Cp;(function(r){r.Empty="",r.QuickFix="quickfix",r.Refactor="refactor",r.RefactorExtract="refactor.extract",r.RefactorInline="refactor.inline",r.RefactorRewrite="refactor.rewrite",r.Source="source",r.SourceOrganizeImports="source.organizeImports",r.SourceFixAll="source.fixAll"})(Cp||(Cp={}));var Op;(function(r){function t(o,s){var p={diagnostics:o};return s!=null&&(p.only=s),p}r.create=t;function i(o){var s=o;return _e.defined(s)&&_e.typedArray(s.diagnostics,la.is)&&(s.only===void 0||_e.typedArray(s.only,_e.string))}r.is=i})(Op||(Op={}));var Tp;(function(r){function t(o,s,p){var y={title:o},A=!0;return typeof s=="string"?(A=!1,y.kind=s):Pl.is(s)?y.command=s:y.edit=s,A&&p!==void 0&&(y.kind=p),y}r.create=t;function i(o){var s=o;return s&&_e.string(s.title)&&(s.diagnostics===void 0||_e.typedArray(s.diagnostics,la.is))&&(s.kind===void 0||_e.string(s.kind))&&(s.edit!==void 0||s.command!==void 0)&&(s.command===void 0||Pl.is(s.command))&&(s.isPreferred===void 0||_e.boolean(s.isPreferred))&&(s.edit===void 0||Xc.is(s.edit))}r.is=i})(Tp||(Tp={}));var Pp;(function(r){function t(o,s){var p={range:o};return _e.defined(s)&&(p.data=s),p}r.create=t;function i(o){var s=o;return _e.defined(s)&&ur.is(s.range)&&(_e.undefined(s.command)||Pl.is(s.command))}r.is=i})(Pp||(Pp={}));var Ip;(function(r){function t(o,s){return{tabSize:o,insertSpaces:s}}r.create=t;function i(o){var s=o;return _e.defined(s)&&_e.uinteger(s.tabSize)&&_e.boolean(s.insertSpaces)}r.is=i})(Ip||(Ip={}));var Fp;(function(r){function t(o,s,p){return{range:o,target:s,data:p}}r.create=t;function i(o){var s=o;return _e.defined(s)&&ur.is(s.range)&&(_e.undefined(s.target)||_e.string(s.target))}r.is=i})(Fp||(Fp={}));var Sf;(function(r){function t(o,s){return{range:o,parent:s}}r.create=t;function i(o){var s=o;return s!==void 0&&ur.is(s.range)&&(s.parent===void 0||r.is(s.parent))}r.is=i})(Sf||(Sf={}));var Rm=null,kp;(function(r){function t(p,y,A,w){return new ug(p,y,A,w)}r.create=t;function i(p){var y=p;return!!(_e.defined(y)&&_e.string(y.uri)&&(_e.undefined(y.languageId)||_e.string(y.languageId))&&_e.uinteger(y.lineCount)&&_e.func(y.getText)&&_e.func(y.positionAt)&&_e.func(y.offsetAt))}r.is=i;function o(p,y){for(var A=p.getText(),w=s(y,function(se,ye){var ge=se.range.start.line-ye.range.start.line;return ge===0?se.range.start.character-ye.range.start.character:ge}),E=A.length,F=w.length-1;F>=0;F--){var G=w[F],te=p.offsetAt(G.range.start),ne=p.offsetAt(G.range.end);if(ne<=E)A=A.substring(0,te)+G.newText+A.substring(ne,A.length);else throw new Error("Overlapping edit");E=te}return A}r.applyEdits=o;function s(p,y){if(p.length<=1)return p;var A=p.length/2|0,w=p.slice(0,A),E=p.slice(A);s(w,y),s(E,y);for(var F=0,G=0,te=0;F<w.length&&G<E.length;){var ne=y(w[F],E[G]);ne<=0?p[te++]=w[F++]:p[te++]=E[G++]}for(;F<w.length;)p[te++]=w[F++];for(;G<E.length;)p[te++]=E[G++];return p}})(kp||(kp={}));var ug=function(){function r(t,i,o,s){this._uri=t,this._languageId=i,this._version=o,this._content=s,this._lineOffsets=void 0}return Object.defineProperty(r.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),r.prototype.getText=function(t){if(t){var i=this.offsetAt(t.start),o=this.offsetAt(t.end);return this._content.substring(i,o)}return this._content},r.prototype.update=function(t,i){this._content=t.text,this._version=i,this._lineOffsets=void 0},r.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var t=[],i=this._content,o=!0,s=0;s<i.length;s++){o&&(t.push(s),o=!1);var p=i.charAt(s);o=p==="\r"||p===`
|
|
335
|
+
`}return t&&t.eol||`
|
|
336
|
+
`}function Zd(t,r){return`\r
|
|
337
|
+
`.indexOf(t.charAt(r))!==-1}var El;(function(t){t.DEFAULT={allowTrailingComma:!1}})(El||(El={}));function Qv(t,r){var i=[],o=new Object,s=void 0,p={value:{},offset:0,length:0,type:"object",parent:void 0},y=!1;function A(w,E,F,G){p.value=w,p.offset=E,p.length=F,p.type=G,p.colonOffset=void 0,s=p}try{gf(t,{onObjectBegin:function(w,E){if(r<=w)throw o;s=void 0,y=r>w,i.push("")},onObjectProperty:function(w,E,F){if(r<E||(A(w,E,F,"property"),i[i.length-1]=w,r<=E+F))throw o},onObjectEnd:function(w,E){if(r<=w)throw o;s=void 0,i.pop()},onArrayBegin:function(w,E){if(r<=w)throw o;s=void 0,i.push(0)},onArrayEnd:function(w,E){if(r<=w)throw o;s=void 0,i.pop()},onLiteralValue:function(w,E,F){if(r<E||(A(w,E,F,ep(w)),r<=E+F))throw o},onSeparator:function(w,E,F){if(r<=E)throw o;if(w===":"&&s&&s.type==="property")s.colonOffset=E,y=!1,s=void 0;else if(w===","){var G=i[i.length-1];typeof G=="number"?i[i.length-1]=G+1:(y=!0,i[i.length-1]=""),s=void 0}}})}catch(w){if(w!==o)throw w}return{path:i,previousNode:s,isAtPropertyKey:y,matches:function(w){for(var E=0,F=0;E<w.length&&F<i.length;F++)if(w[E]===i[F]||w[E]==="*")E++;else if(w[E]!=="**")return!1;return E===w.length}}}function Zv(t,r,i){r===void 0&&(r=[]),i===void 0&&(i=El.DEFAULT);var o=null,s=[],p=[];function y(w){Array.isArray(s)?s.push(w):o!==null&&(s[o]=w)}var A={onObjectBegin:function(){var w={};y(w),p.push(s),s=w,o=null},onObjectProperty:function(w){o=w},onObjectEnd:function(){s=p.pop()},onArrayBegin:function(){var w=[];y(w),p.push(s),s=w,o=null},onArrayEnd:function(){s=p.pop()},onLiteralValue:y,onError:function(w,E,F){r.push({error:w,offset:E,length:F})}};return gf(t,A,i),s[0]}function _v(t,r,i){r===void 0&&(r=[]),i===void 0&&(i=El.DEFAULT);var o={type:"array",offset:-1,length:-1,children:[],parent:void 0};function s(w){o.type==="property"&&(o.length=w-o.offset,o=o.parent)}function p(w){return o.children.push(w),w}var y={onObjectBegin:function(w){o=p({type:"object",offset:w,length:-1,parent:o,children:[]})},onObjectProperty:function(w,E,F){o=p({type:"property",offset:E,length:-1,parent:o,children:[]}),o.children.push({type:"string",value:w,offset:E,length:F,parent:o})},onObjectEnd:function(w,E){s(w+E),o.length=w+E-o.offset,o=o.parent,s(w+E)},onArrayBegin:function(w,E){o=p({type:"array",offset:w,length:-1,parent:o,children:[]})},onArrayEnd:function(w,E){o.length=w+E-o.offset,o=o.parent,s(w+E)},onLiteralValue:function(w,E,F){p({type:ep(w),offset:E,length:F,parent:o,value:w}),s(E+F)},onSeparator:function(w,E,F){o.type==="property"&&(w===":"?o.colonOffset=E:w===","&&s(E))},onError:function(w,E,F){r.push({error:w,offset:E,length:F})}};gf(t,y,i);var A=o.children[0];return A&&delete A.parent,A}function qv(t,r){if(!!t){for(var i=t,o=0,s=r;o<s.length;o++){var p=s[o];if(typeof p=="string"){if(i.type!=="object"||!Array.isArray(i.children))return;for(var y=!1,A=0,w=i.children;A<w.length;A++){var E=w[A];if(Array.isArray(E.children)&&E.children[0].value===p){i=E.children[1],y=!0;break}}if(!y)return}else{var F=p;if(i.type!=="array"||F<0||!Array.isArray(i.children)||F>=i.children.length)return;i=i.children[F]}}return i}}function _d(t){if(!t.parent||!t.parent.children)return[];var r=_d(t.parent);if(t.parent.type==="property"){var i=t.parent.children[0].value;r.push(i)}else if(t.parent.type==="array"){var o=t.parent.children.indexOf(t);o!==-1&&r.push(o)}return r}function Kc(t){switch(t.type){case"array":return t.children.map(Kc);case"object":for(var r=Object.create(null),i=0,o=t.children;i<o.length;i++){var s=o[i],p=s.children[1];p&&(r[s.children[0].value]=Kc(p))}return r;case"null":case"string":case"number":case"boolean":return t.value;default:return}}function eg(t,r,i){return i===void 0&&(i=!1),r>=t.offset&&r<t.offset+t.length||i&&r===t.offset+t.length}function qd(t,r,i){if(i===void 0&&(i=!1),eg(t,r,i)){var o=t.children;if(Array.isArray(o))for(var s=0;s<o.length&&o[s].offset<=r;s++){var p=qd(o[s],r,i);if(p)return p}return t}}function gf(t,r,i){i===void 0&&(i=El.DEFAULT);var o=vf(t,!1);function s(We){return We?function(){return We(o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter())}:function(){return!0}}function p(We){return We?function(Je){return We(Je,o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter())}:function(){return!0}}var y=s(r.onObjectBegin),A=p(r.onObjectProperty),w=s(r.onObjectEnd),E=s(r.onArrayBegin),F=s(r.onArrayEnd),G=p(r.onLiteralValue),te=p(r.onSeparator),ne=s(r.onComment),se=p(r.onError),ye=i&&i.disallowComments,ge=i&&i.allowTrailingComma;function Ae(){for(;;){var We=o.scan();switch(o.getTokenError()){case 4:me(14);break;case 5:me(15);break;case 3:me(13);break;case 1:ye||me(11);break;case 2:me(12);break;case 6:me(16);break}switch(We){case 12:case 13:ye?me(10):ne();break;case 16:me(1);break;case 15:case 14:break;default:return We}}}function me(We,Je,et){if(Je===void 0&&(Je=[]),et===void 0&&(et=[]),se(We),Je.length+et.length>0)for(var $e=o.getToken();$e!==17;){if(Je.indexOf($e)!==-1){Ae();break}else if(et.indexOf($e)!==-1)break;$e=Ae()}}function Te(We){var Je=o.getTokenValue();return We?G(Je):A(Je),Ae(),!0}function He(){switch(o.getToken()){case 11:var We=o.getTokenValue(),Je=Number(We);isNaN(Je)&&(me(2),Je=0),G(Je);break;case 7:G(null);break;case 8:G(!0);break;case 9:G(!1);break;default:return!1}return Ae(),!0}function Be(){return o.getToken()!==10?(me(3,[],[2,5]),!1):(Te(!1),o.getToken()===6?(te(":"),Ae(),Ue()||me(4,[],[2,5])):me(5,[],[2,5]),!0)}function ze(){y(),Ae();for(var We=!1;o.getToken()!==2&&o.getToken()!==17;){if(o.getToken()===5){if(We||me(4,[],[]),te(","),Ae(),o.getToken()===2&&ge)break}else We&&me(6,[],[]);Be()||me(4,[],[2,5]),We=!0}return w(),o.getToken()!==2?me(7,[2],[]):Ae(),!0}function De(){E(),Ae();for(var We=!1;o.getToken()!==4&&o.getToken()!==17;){if(o.getToken()===5){if(We||me(4,[],[]),te(","),Ae(),o.getToken()===4&&ge)break}else We&&me(6,[],[]);Ue()||me(4,[],[4,5]),We=!0}return F(),o.getToken()!==4?me(8,[4],[]):Ae(),!0}function Ue(){switch(o.getToken()){case 3:return De();case 1:return ze();case 10:return Te(!0);default:return He()}}return Ae(),o.getToken()===17?i.allowEmptyContent?!0:(me(4,[],[]),!1):Ue()?(o.getToken()!==17&&me(9,[],[]),!0):(me(4,[],[]),!1)}function tg(t,r){var i=vf(t),o=[],s,p=0,y;do switch(y=i.getPosition(),s=i.scan(),s){case 12:case 13:case 17:p!==y&&o.push(t.substring(p,y)),r!==void 0&&o.push(i.getTokenValue().replace(/[^\r\n]/g,r)),p=i.getPosition();break}while(s!==17);return o.join("")}function ep(t){switch(typeof t){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(t){if(Array.isArray(t))return"array"}else return"null";return"object"}default:return"null"}}function Sm(t,r,i){return rg(t,r,void 0,i)}function rg(t,r,i,o){for(var s,p=r.slice(),y=[],A=parseTree(t,y),w=void 0,E=void 0;p.length>0&&(E=p.pop(),w=findNodeAtLocation(A,p),w===void 0&&i!==void 0);)typeof E=="string"?i=(s={},s[E]=i,s):i=[i];if(w)if(w.type==="object"&&typeof E=="string"&&Array.isArray(w.children)){var F=findNodeAtLocation(w,[E]);if(F!==void 0)if(i===void 0){if(!F.parent)throw new Error("Malformed AST");var G=w.children.indexOf(F.parent),te=void 0,ne=F.parent.offset+F.parent.length;if(G>0){var se=w.children[G-1];te=se.offset+se.length}else if(te=w.offset+1,w.children.length>1){var ye=w.children[1];ne=ye.offset}return fo(t,{offset:te,length:ne-te,content:""},o)}else return fo(t,{offset:F.offset,length:F.length,content:JSON.stringify(i)},o);else{if(i===void 0)return[];var ge=JSON.stringify(E)+": "+JSON.stringify(i),Ae=o.getInsertionIndex?o.getInsertionIndex(w.children.map(function(We){return We.children[0].value})):w.children.length,me=void 0;if(Ae>0){var se=w.children[Ae-1];me={offset:se.offset+se.length,length:0,content:","+ge}}else w.children.length===0?me={offset:w.offset+1,length:0,content:ge}:me={offset:w.offset+1,length:0,content:ge+","};return fo(t,me,o)}}else if(w.type==="array"&&typeof E=="number"&&Array.isArray(w.children)){var Te=E;if(Te===-1){var ge=""+JSON.stringify(i),me=void 0;if(w.children.length===0)me={offset:w.offset+1,length:0,content:ge};else{var se=w.children[w.children.length-1];me={offset:se.offset+se.length,length:0,content:","+ge}}return fo(t,me,o)}else if(i===void 0&&w.children.length>=0){var He=E,Be=w.children[He],me=void 0;if(w.children.length===1)me={offset:w.offset+1,length:w.length-2,content:""};else if(w.children.length-1===He){var se=w.children[He-1],ze=se.offset+se.length,De=w.offset+w.length;me={offset:ze,length:De-2-ze,content:""}}else me={offset:Be.offset,length:w.children[He+1].offset-Be.offset,content:""};return fo(t,me,o)}else if(i!==void 0){var me=void 0,ge=""+JSON.stringify(i);if(!o.isArrayInsertion&&w.children.length>E){var Ue=w.children[E];me={offset:Ue.offset,length:Ue.length,content:ge}}else if(w.children.length===0||E===0)me={offset:w.offset+1,length:0,content:w.children.length===0?ge:ge+","};else{var Ae=E>w.children.length?w.children.length:E,se=w.children[Ae-1];me={offset:se.offset+se.length,length:0,content:","+ge}}return fo(t,me,o)}else throw new Error("Can not "+(i===void 0?"remove":o.isArrayInsertion?"insert":"modify")+" Array index "+Te+" as length is not sufficient")}else throw new Error("Can not add "+(typeof E!="number"?"index":"property")+" to parent of type "+w.type);else{if(i===void 0)throw new Error("Can not delete in empty document");return fo(t,{offset:A?A.offset:0,length:A?A.length:0,content:JSON.stringify(i)},o)}}function fo(t,r,i){if(!i.formattingOptions)return[r];var o=tp(t,r),s=r.offset,p=r.offset+r.content.length;if(r.length===0||r.content.length===0){for(;s>0&&!isEOL(o,s-1);)s--;for(;p<o.length&&!isEOL(o,p);)p++}for(var y=format(o,{offset:s,length:p-s},i.formattingOptions),A=y.length-1;A>=0;A--){var w=y[A];o=tp(o,w),s=Math.min(s,w.offset),p=Math.max(p,w.offset+w.length),p+=w.content.length-w.length}var E=t.length-(o.length-p)-s;return[{offset:s,length:E,content:o.substring(s,p)}]}function tp(t,r){return t.substring(0,r.offset)+r.content+t.substring(r.offset+r.length)}function Am(t,r){return`\r
|
|
338
|
+
`.indexOf(t.charAt(r))!==-1}var fs=vf,Em=Qv,ng=Zv,Cm=_v,Om=qv,ig=qd,ag=_d,og=Kc,Tm=gf,Pm=tg;function Im(t){switch(t){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return"<unknown ParseErrorCode>"}function sg(t,r,i){return Yv(t,r,i)}function Fm(t,r,i,o){return edit.setProperty(t,r,i,o)}function km(t,r){for(var i=r.length-1;i>=0;i--)t=edit.applyEdit(t,r[i]);return t}function Cl(t,r){if(t===r)return!0;if(t==null||r===null||r===void 0||typeof t!=typeof r||typeof t!="object"||Array.isArray(t)!==Array.isArray(r))return!1;var i,o;if(Array.isArray(t)){if(t.length!==r.length)return!1;for(i=0;i<t.length;i++)if(!Cl(t[i],r[i]))return!1}else{var s=[];for(o in t)s.push(o);s.sort();var p=[];for(o in r)p.push(o);if(p.sort(),!Cl(s,p))return!1;for(i=0;i<s.length;i++)if(!Cl(t[s[i]],r[s[i]]))return!1}return!0}function Kn(t){return typeof t=="number"}function sa(t){return typeof t!="undefined"}function Ni(t){return typeof t=="boolean"}function lg(t){return typeof t=="string"}var rp;(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647})(rp||(rp={}));var yf;(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647})(yf||(yf={}));var mi;(function(t){function r(o,s){return o===Number.MAX_VALUE&&(o=yf.MAX_VALUE),s===Number.MAX_VALUE&&(s=yf.MAX_VALUE),{line:o,character:s}}t.create=r;function i(o){var s=o;return _e.objectLiteral(s)&&_e.uinteger(s.line)&&_e.uinteger(s.character)}t.is=i})(mi||(mi={}));var ur;(function(t){function r(o,s,p,y){if(_e.uinteger(o)&&_e.uinteger(s)&&_e.uinteger(p)&&_e.uinteger(y))return{start:mi.create(o,s),end:mi.create(p,y)};if(mi.is(o)&&mi.is(s))return{start:o,end:s};throw new Error("Range#create called with invalid arguments["+o+", "+s+", "+p+", "+y+"]")}t.create=r;function i(o){var s=o;return _e.objectLiteral(s)&&mi.is(s.start)&&mi.is(s.end)}t.is=i})(ur||(ur={}));var Ol;(function(t){function r(o,s){return{uri:o,range:s}}t.create=r;function i(o){var s=o;return _e.defined(s)&&ur.is(s.range)&&(_e.string(s.uri)||_e.undefined(s.uri))}t.is=i})(Ol||(Ol={}));var np;(function(t){function r(o,s,p,y){return{targetUri:o,targetRange:s,targetSelectionRange:p,originSelectionRange:y}}t.create=r;function i(o){var s=o;return _e.defined(s)&&ur.is(s.targetRange)&&_e.string(s.targetUri)&&(ur.is(s.targetSelectionRange)||_e.undefined(s.targetSelectionRange))&&(ur.is(s.originSelectionRange)||_e.undefined(s.originSelectionRange))}t.is=i})(np||(np={}));var Yc;(function(t){function r(o,s,p,y){return{red:o,green:s,blue:p,alpha:y}}t.create=r;function i(o){var s=o;return _e.numberRange(s.red,0,1)&&_e.numberRange(s.green,0,1)&&_e.numberRange(s.blue,0,1)&&_e.numberRange(s.alpha,0,1)}t.is=i})(Yc||(Yc={}));var ip;(function(t){function r(o,s){return{range:o,color:s}}t.create=r;function i(o){var s=o;return ur.is(s.range)&&Yc.is(s.color)}t.is=i})(ip||(ip={}));var ap;(function(t){function r(o,s,p){return{label:o,textEdit:s,additionalTextEdits:p}}t.create=r;function i(o){var s=o;return _e.string(s.label)&&(_e.undefined(s.textEdit)||xi.is(s))&&(_e.undefined(s.additionalTextEdits)||_e.typedArray(s.additionalTextEdits,xi.is))}t.is=i})(ap||(ap={}));var Tl;(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(Tl||(Tl={}));var op;(function(t){function r(o,s,p,y,A){var w={startLine:o,endLine:s};return _e.defined(p)&&(w.startCharacter=p),_e.defined(y)&&(w.endCharacter=y),_e.defined(A)&&(w.kind=A),w}t.create=r;function i(o){var s=o;return _e.uinteger(s.startLine)&&_e.uinteger(s.startLine)&&(_e.undefined(s.startCharacter)||_e.uinteger(s.startCharacter))&&(_e.undefined(s.endCharacter)||_e.uinteger(s.endCharacter))&&(_e.undefined(s.kind)||_e.string(s.kind))}t.is=i})(op||(op={}));var Jc;(function(t){function r(o,s){return{location:o,message:s}}t.create=r;function i(o){var s=o;return _e.defined(s)&&Ol.is(s.location)&&_e.string(s.message)}t.is=i})(Jc||(Jc={}));var $t;(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})($t||($t={}));var sp;(function(t){t.Unnecessary=1,t.Deprecated=2})(sp||(sp={}));var lp;(function(t){function r(i){var o=i;return o!=null&&_e.string(o.href)}t.is=r})(lp||(lp={}));var la;(function(t){function r(o,s,p,y,A,w){var E={range:o,message:s};return _e.defined(p)&&(E.severity=p),_e.defined(y)&&(E.code=y),_e.defined(A)&&(E.source=A),_e.defined(w)&&(E.relatedInformation=w),E}t.create=r;function i(o){var s,p=o;return _e.defined(p)&&ur.is(p.range)&&_e.string(p.message)&&(_e.number(p.severity)||_e.undefined(p.severity))&&(_e.integer(p.code)||_e.string(p.code)||_e.undefined(p.code))&&(_e.undefined(p.codeDescription)||_e.string((s=p.codeDescription)===null||s===void 0?void 0:s.href))&&(_e.string(p.source)||_e.undefined(p.source))&&(_e.undefined(p.relatedInformation)||_e.typedArray(p.relatedInformation,Jc.is))}t.is=i})(la||(la={}));var Pl;(function(t){function r(o,s){for(var p=[],y=2;y<arguments.length;y++)p[y-2]=arguments[y];var A={title:o,command:s};return _e.defined(p)&&p.length>0&&(A.arguments=p),A}t.create=r;function i(o){var s=o;return _e.defined(s)&&_e.string(s.title)&&_e.string(s.command)}t.is=i})(Pl||(Pl={}));var xi;(function(t){function r(p,y){return{range:p,newText:y}}t.replace=r;function i(p,y){return{range:{start:p,end:p},newText:y}}t.insert=i;function o(p){return{range:p,newText:""}}t.del=o;function s(p){var y=p;return _e.objectLiteral(y)&&_e.string(y.newText)&&ur.is(y.range)}t.is=s})(xi||(xi={}));var cs;(function(t){function r(o,s,p){var y={label:o};return s!==void 0&&(y.needsConfirmation=s),p!==void 0&&(y.description=p),y}t.create=r;function i(o){var s=o;return s!==void 0&&_e.objectLiteral(s)&&_e.string(s.label)&&(_e.boolean(s.needsConfirmation)||s.needsConfirmation===void 0)&&(_e.string(s.description)||s.description===void 0)}t.is=i})(cs||(cs={}));var Sn;(function(t){function r(i){var o=i;return typeof o=="string"}t.is=r})(Sn||(Sn={}));var Oa;(function(t){function r(p,y,A){return{range:p,newText:y,annotationId:A}}t.replace=r;function i(p,y,A){return{range:{start:p,end:p},newText:y,annotationId:A}}t.insert=i;function o(p,y){return{range:p,newText:"",annotationId:y}}t.del=o;function s(p){var y=p;return xi.is(y)&&(cs.is(y.annotationId)||Sn.is(y.annotationId))}t.is=s})(Oa||(Oa={}));var mf;(function(t){function r(o,s){return{textDocument:o,edits:s}}t.create=r;function i(o){var s=o;return _e.defined(s)&&bf.is(s.textDocument)&&Array.isArray(s.edits)}t.is=i})(mf||(mf={}));var Il;(function(t){function r(o,s,p){var y={kind:"create",uri:o};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(y.options=s),p!==void 0&&(y.annotationId=p),y}t.create=r;function i(o){var s=o;return s&&s.kind==="create"&&_e.string(s.uri)&&(s.options===void 0||(s.options.overwrite===void 0||_e.boolean(s.options.overwrite))&&(s.options.ignoreIfExists===void 0||_e.boolean(s.options.ignoreIfExists)))&&(s.annotationId===void 0||Sn.is(s.annotationId))}t.is=i})(Il||(Il={}));var Fl;(function(t){function r(o,s,p,y){var A={kind:"rename",oldUri:o,newUri:s};return p!==void 0&&(p.overwrite!==void 0||p.ignoreIfExists!==void 0)&&(A.options=p),y!==void 0&&(A.annotationId=y),A}t.create=r;function i(o){var s=o;return s&&s.kind==="rename"&&_e.string(s.oldUri)&&_e.string(s.newUri)&&(s.options===void 0||(s.options.overwrite===void 0||_e.boolean(s.options.overwrite))&&(s.options.ignoreIfExists===void 0||_e.boolean(s.options.ignoreIfExists)))&&(s.annotationId===void 0||Sn.is(s.annotationId))}t.is=i})(Fl||(Fl={}));var kl;(function(t){function r(o,s,p){var y={kind:"delete",uri:o};return s!==void 0&&(s.recursive!==void 0||s.ignoreIfNotExists!==void 0)&&(y.options=s),p!==void 0&&(y.annotationId=p),y}t.create=r;function i(o){var s=o;return s&&s.kind==="delete"&&_e.string(s.uri)&&(s.options===void 0||(s.options.recursive===void 0||_e.boolean(s.options.recursive))&&(s.options.ignoreIfNotExists===void 0||_e.boolean(s.options.ignoreIfNotExists)))&&(s.annotationId===void 0||Sn.is(s.annotationId))}t.is=i})(kl||(kl={}));var Xc;(function(t){function r(i){var o=i;return o&&(o.changes!==void 0||o.documentChanges!==void 0)&&(o.documentChanges===void 0||o.documentChanges.every(function(s){return _e.string(s.kind)?Il.is(s)||Fl.is(s)||kl.is(s):mf.is(s)}))}t.is=r})(Xc||(Xc={}));var xf=function(){function t(r,i){this.edits=r,this.changeAnnotations=i}return t.prototype.insert=function(r,i,o){var s,p;if(o===void 0?s=xi.insert(r,i):Sn.is(o)?(p=o,s=Oa.insert(r,i,o)):(this.assertChangeAnnotations(this.changeAnnotations),p=this.changeAnnotations.manage(o),s=Oa.insert(r,i,p)),this.edits.push(s),p!==void 0)return p},t.prototype.replace=function(r,i,o){var s,p;if(o===void 0?s=xi.replace(r,i):Sn.is(o)?(p=o,s=Oa.replace(r,i,o)):(this.assertChangeAnnotations(this.changeAnnotations),p=this.changeAnnotations.manage(o),s=Oa.replace(r,i,p)),this.edits.push(s),p!==void 0)return p},t.prototype.delete=function(r,i){var o,s;if(i===void 0?o=xi.del(r):Sn.is(i)?(s=i,o=Oa.del(r,i)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(i),o=Oa.del(r,s)),this.edits.push(o),s!==void 0)return s},t.prototype.add=function(r){this.edits.push(r)},t.prototype.all=function(){return this.edits},t.prototype.clear=function(){this.edits.splice(0,this.edits.length)},t.prototype.assertChangeAnnotations=function(r){if(r===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},t}(),up=function(){function t(r){this._annotations=r===void 0?Object.create(null):r,this._counter=0,this._size=0}return t.prototype.all=function(){return this._annotations},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),t.prototype.manage=function(r,i){var o;if(Sn.is(r)?o=r:(o=this.nextId(),i=r),this._annotations[o]!==void 0)throw new Error("Id "+o+" is already in use.");if(i===void 0)throw new Error("No annotation provided for id "+o);return this._annotations[o]=i,this._size++,o},t.prototype.nextId=function(){return this._counter++,this._counter.toString()},t}(),Mm=function(){function t(r){var i=this;this._textEditChanges=Object.create(null),r!==void 0?(this._workspaceEdit=r,r.documentChanges?(this._changeAnnotations=new up(r.changeAnnotations),r.changeAnnotations=this._changeAnnotations.all(),r.documentChanges.forEach(function(o){if(mf.is(o)){var s=new xf(o.edits,i._changeAnnotations);i._textEditChanges[o.textDocument.uri]=s}})):r.changes&&Object.keys(r.changes).forEach(function(o){var s=new xf(r.changes[o]);i._textEditChanges[o]=s})):this._workspaceEdit={}}return Object.defineProperty(t.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),t.prototype.getTextEditChange=function(r){if(bf.is(r)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i={uri:r.uri,version:r.version},o=this._textEditChanges[i.uri];if(!o){var s=[],p={textDocument:i,edits:s};this._workspaceEdit.documentChanges.push(p),o=new xf(s,this._changeAnnotations),this._textEditChanges[i.uri]=o}return o}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var o=this._textEditChanges[r];if(!o){var s=[];this._workspaceEdit.changes[r]=s,o=new xf(s),this._textEditChanges[r]=o}return o}},t.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new up,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},t.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},t.prototype.createFile=function(r,i,o){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var s;cs.is(i)||Sn.is(i)?s=i:o=i;var p,y;if(s===void 0?p=Il.create(r,o):(y=Sn.is(s)?s:this._changeAnnotations.manage(s),p=Il.create(r,o,y)),this._workspaceEdit.documentChanges.push(p),y!==void 0)return y},t.prototype.renameFile=function(r,i,o,s){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var p;cs.is(o)||Sn.is(o)?p=o:s=o;var y,A;if(p===void 0?y=Fl.create(r,i,s):(A=Sn.is(p)?p:this._changeAnnotations.manage(p),y=Fl.create(r,i,s,A)),this._workspaceEdit.documentChanges.push(y),A!==void 0)return A},t.prototype.deleteFile=function(r,i,o){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var s;cs.is(i)||Sn.is(i)?s=i:o=i;var p,y;if(s===void 0?p=kl.create(r,o):(y=Sn.is(s)?s:this._changeAnnotations.manage(s),p=kl.create(r,o,y)),this._workspaceEdit.documentChanges.push(p),y!==void 0)return y},t}(),fp;(function(t){function r(o){return{uri:o}}t.create=r;function i(o){var s=o;return _e.defined(s)&&_e.string(s.uri)}t.is=i})(fp||(fp={}));var cp;(function(t){function r(o,s){return{uri:o,version:s}}t.create=r;function i(o){var s=o;return _e.defined(s)&&_e.string(s.uri)&&_e.integer(s.version)}t.is=i})(cp||(cp={}));var bf;(function(t){function r(o,s){return{uri:o,version:s}}t.create=r;function i(o){var s=o;return _e.defined(s)&&_e.string(s.uri)&&(s.version===null||_e.integer(s.version))}t.is=i})(bf||(bf={}));var dp;(function(t){function r(o,s,p,y){return{uri:o,languageId:s,version:p,text:y}}t.create=r;function i(o){var s=o;return _e.defined(s)&&_e.string(s.uri)&&_e.string(s.languageId)&&_e.integer(s.version)&&_e.string(s.text)}t.is=i})(dp||(dp={}));var ua;(function(t){t.PlainText="plaintext",t.Markdown="markdown"})(ua||(ua={})),function(t){function r(i){var o=i;return o===t.PlainText||o===t.Markdown}t.is=r}(ua||(ua={}));var Qc;(function(t){function r(i){var o=i;return _e.objectLiteral(i)&&ua.is(o.kind)&&_e.string(o.value)}t.is=r})(Qc||(Qc={}));var Yn;(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(Yn||(Yn={}));var _r;(function(t){t.PlainText=1,t.Snippet=2})(_r||(_r={}));var pp;(function(t){t.Deprecated=1})(pp||(pp={}));var hp;(function(t){function r(o,s,p){return{newText:o,insert:s,replace:p}}t.create=r;function i(o){var s=o;return s&&_e.string(s.newText)&&ur.is(s.insert)&&ur.is(s.replace)}t.is=i})(hp||(hp={}));var vp;(function(t){t.asIs=1,t.adjustIndentation=2})(vp||(vp={}));var Zc;(function(t){function r(i){return{label:i}}t.create=r})(Zc||(Zc={}));var gp;(function(t){function r(i,o){return{items:i||[],isIncomplete:!!o}}t.create=r})(gp||(gp={}));var wf;(function(t){function r(o){return o.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=r;function i(o){var s=o;return _e.string(s)||_e.objectLiteral(s)&&_e.string(s.language)&&_e.string(s.value)}t.is=i})(wf||(wf={}));var yp;(function(t){function r(i){var o=i;return!!o&&_e.objectLiteral(o)&&(Qc.is(o.contents)||wf.is(o.contents)||_e.typedArray(o.contents,wf.is))&&(i.range===void 0||ur.is(i.range))}t.is=r})(yp||(yp={}));var mp;(function(t){function r(i,o){return o?{label:i,documentation:o}:{label:i}}t.create=r})(mp||(mp={}));var xp;(function(t){function r(i,o){for(var s=[],p=2;p<arguments.length;p++)s[p-2]=arguments[p];var y={label:i};return _e.defined(o)&&(y.documentation=o),_e.defined(s)?y.parameters=s:y.parameters=[],y}t.create=r})(xp||(xp={}));var bp;(function(t){t.Text=1,t.Read=2,t.Write=3})(bp||(bp={}));var wp;(function(t){function r(i,o){var s={range:i};return _e.number(o)&&(s.kind=o),s}t.create=r})(wp||(wp={}));var Bi;(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(Bi||(Bi={}));var Sp;(function(t){t.Deprecated=1})(Sp||(Sp={}));var Ap;(function(t){function r(i,o,s,p,y){var A={name:i,kind:o,location:{uri:p,range:s}};return y&&(A.containerName=y),A}t.create=r})(Ap||(Ap={}));var Ep;(function(t){function r(o,s,p,y,A,w){var E={name:o,detail:s,kind:p,range:y,selectionRange:A};return w!==void 0&&(E.children=w),E}t.create=r;function i(o){var s=o;return s&&_e.string(s.name)&&_e.number(s.kind)&&ur.is(s.range)&&ur.is(s.selectionRange)&&(s.detail===void 0||_e.string(s.detail))&&(s.deprecated===void 0||_e.boolean(s.deprecated))&&(s.children===void 0||Array.isArray(s.children))&&(s.tags===void 0||Array.isArray(s.tags))}t.is=i})(Ep||(Ep={}));var Cp;(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll"})(Cp||(Cp={}));var Op;(function(t){function r(o,s){var p={diagnostics:o};return s!=null&&(p.only=s),p}t.create=r;function i(o){var s=o;return _e.defined(s)&&_e.typedArray(s.diagnostics,la.is)&&(s.only===void 0||_e.typedArray(s.only,_e.string))}t.is=i})(Op||(Op={}));var Tp;(function(t){function r(o,s,p){var y={title:o},A=!0;return typeof s=="string"?(A=!1,y.kind=s):Pl.is(s)?y.command=s:y.edit=s,A&&p!==void 0&&(y.kind=p),y}t.create=r;function i(o){var s=o;return s&&_e.string(s.title)&&(s.diagnostics===void 0||_e.typedArray(s.diagnostics,la.is))&&(s.kind===void 0||_e.string(s.kind))&&(s.edit!==void 0||s.command!==void 0)&&(s.command===void 0||Pl.is(s.command))&&(s.isPreferred===void 0||_e.boolean(s.isPreferred))&&(s.edit===void 0||Xc.is(s.edit))}t.is=i})(Tp||(Tp={}));var Pp;(function(t){function r(o,s){var p={range:o};return _e.defined(s)&&(p.data=s),p}t.create=r;function i(o){var s=o;return _e.defined(s)&&ur.is(s.range)&&(_e.undefined(s.command)||Pl.is(s.command))}t.is=i})(Pp||(Pp={}));var Ip;(function(t){function r(o,s){return{tabSize:o,insertSpaces:s}}t.create=r;function i(o){var s=o;return _e.defined(s)&&_e.uinteger(s.tabSize)&&_e.boolean(s.insertSpaces)}t.is=i})(Ip||(Ip={}));var Fp;(function(t){function r(o,s,p){return{range:o,target:s,data:p}}t.create=r;function i(o){var s=o;return _e.defined(s)&&ur.is(s.range)&&(_e.undefined(s.target)||_e.string(s.target))}t.is=i})(Fp||(Fp={}));var Sf;(function(t){function r(o,s){return{range:o,parent:s}}t.create=r;function i(o){var s=o;return s!==void 0&&ur.is(s.range)&&(s.parent===void 0||t.is(s.parent))}t.is=i})(Sf||(Sf={}));var Rm=null,kp;(function(t){function r(p,y,A,w){return new ug(p,y,A,w)}t.create=r;function i(p){var y=p;return!!(_e.defined(y)&&_e.string(y.uri)&&(_e.undefined(y.languageId)||_e.string(y.languageId))&&_e.uinteger(y.lineCount)&&_e.func(y.getText)&&_e.func(y.positionAt)&&_e.func(y.offsetAt))}t.is=i;function o(p,y){for(var A=p.getText(),w=s(y,function(se,ye){var ge=se.range.start.line-ye.range.start.line;return ge===0?se.range.start.character-ye.range.start.character:ge}),E=A.length,F=w.length-1;F>=0;F--){var G=w[F],te=p.offsetAt(G.range.start),ne=p.offsetAt(G.range.end);if(ne<=E)A=A.substring(0,te)+G.newText+A.substring(ne,A.length);else throw new Error("Overlapping edit");E=te}return A}t.applyEdits=o;function s(p,y){if(p.length<=1)return p;var A=p.length/2|0,w=p.slice(0,A),E=p.slice(A);s(w,y),s(E,y);for(var F=0,G=0,te=0;F<w.length&&G<E.length;){var ne=y(w[F],E[G]);ne<=0?p[te++]=w[F++]:p[te++]=E[G++]}for(;F<w.length;)p[te++]=w[F++];for(;G<E.length;)p[te++]=E[G++];return p}})(kp||(kp={}));var ug=function(){function t(r,i,o,s){this._uri=r,this._languageId=i,this._version=o,this._content=s,this._lineOffsets=void 0}return Object.defineProperty(t.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),t.prototype.getText=function(r){if(r){var i=this.offsetAt(r.start),o=this.offsetAt(r.end);return this._content.substring(i,o)}return this._content},t.prototype.update=function(r,i){this._content=r.text,this._version=i,this._lineOffsets=void 0},t.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var r=[],i=this._content,o=!0,s=0;s<i.length;s++){o&&(r.push(s),o=!1);var p=i.charAt(s);o=p==="\r"||p===`
|
|
339
339
|
`,p==="\r"&&s+1<i.length&&i.charAt(s+1)===`
|
|
340
|
-
`&&s++}o&&i.length>0&&t.push(i.length),this._lineOffsets=t}return this._lineOffsets},r.prototype.positionAt=function(t){t=Math.max(Math.min(t,this._content.length),0);var i=this.getLineOffsets(),o=0,s=i.length;if(s===0)return mi.create(0,t);for(;o<s;){var p=Math.floor((o+s)/2);i[p]>t?s=p:o=p+1}var y=o-1;return mi.create(y,t-i[y])},r.prototype.offsetAt=function(t){var i=this.getLineOffsets();if(t.line>=i.length)return this._content.length;if(t.line<0)return 0;var o=i[t.line],s=t.line+1<i.length?i[t.line+1]:this._content.length;return Math.max(Math.min(o+t.character,s),o)},Object.defineProperty(r.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),r}(),_e;(function(r){var t=Object.prototype.toString;function i(ne){return typeof ne!="undefined"}r.defined=i;function o(ne){return typeof ne=="undefined"}r.undefined=o;function s(ne){return ne===!0||ne===!1}r.boolean=s;function p(ne){return t.call(ne)==="[object String]"}r.string=p;function y(ne){return t.call(ne)==="[object Number]"}r.number=y;function A(ne,se,ye){return t.call(ne)==="[object Number]"&&se<=ne&&ne<=ye}r.numberRange=A;function w(ne){return t.call(ne)==="[object Number]"&&-2147483648<=ne&&ne<=2147483647}r.integer=w;function E(ne){return t.call(ne)==="[object Number]"&&0<=ne&&ne<=2147483647}r.uinteger=E;function F(ne){return t.call(ne)==="[object Function]"}r.func=F;function G(ne){return ne!==null&&typeof ne=="object"}r.objectLiteral=G;function te(ne,se){return Array.isArray(ne)&&ne.every(se)}r.typedArray=te})(_e||(_e={}));var Mp=function(){function r(t,i,o,s){this._uri=t,this._languageId=i,this._version=o,this._content=s,this._lineOffsets=void 0}return Object.defineProperty(r.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),r.prototype.getText=function(t){if(t){var i=this.offsetAt(t.start),o=this.offsetAt(t.end);return this._content.substring(i,o)}return this._content},r.prototype.update=function(t,i){for(var o=0,s=t;o<s.length;o++){var p=s[o];if(r.isIncremental(p)){var y=Lp(p.range),A=this.offsetAt(y.start),w=this.offsetAt(y.end);this._content=this._content.substring(0,A)+p.text+this._content.substring(w,this._content.length);var E=Math.max(y.start.line,0),F=Math.max(y.end.line,0),G=this._lineOffsets,te=Rp(p.text,!1,A);if(F-E===te.length)for(var ne=0,se=te.length;ne<se;ne++)G[ne+E+1]=te[ne];else te.length<1e4?G.splice.apply(G,[E+1,F-E].concat(te)):this._lineOffsets=G=G.slice(0,E+1).concat(te,G.slice(F+1));var ye=p.text.length-(w-A);if(ye!==0)for(var ne=E+1+te.length,se=G.length;ne<se;ne++)G[ne]=G[ne]+ye}else if(r.isFull(p))this._content=p.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received")}this._version=i},r.prototype.getLineOffsets=function(){return this._lineOffsets===void 0&&(this._lineOffsets=Rp(this._content,!0)),this._lineOffsets},r.prototype.positionAt=function(t){t=Math.max(Math.min(t,this._content.length),0);var i=this.getLineOffsets(),o=0,s=i.length;if(s===0)return{line:0,character:t};for(;o<s;){var p=Math.floor((o+s)/2);i[p]>t?s=p:o=p+1}var y=o-1;return{line:y,character:t-i[y]}},r.prototype.offsetAt=function(t){var i=this.getLineOffsets();if(t.line>=i.length)return this._content.length;if(t.line<0)return 0;var o=i[t.line],s=t.line+1<i.length?i[t.line+1]:this._content.length;return Math.max(Math.min(o+t.character,s),o)},Object.defineProperty(r.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!0,configurable:!0}),r.isIncremental=function(t){var i=t;return i!=null&&typeof i.text=="string"&&i.range!==void 0&&(i.rangeLength===void 0||typeof i.rangeLength=="number")},r.isFull=function(t){var i=t;return i!=null&&typeof i.text=="string"&&i.range===void 0&&i.rangeLength===void 0},r}(),Af;(function(r){function t(s,p,y,A){return new Mp(s,p,y,A)}r.create=t;function i(s,p,y){if(s instanceof Mp)return s.update(p,y),s;throw new Error("TextDocument.update: document must be created by TextDocument.create")}r.update=i;function o(s,p){for(var y=s.getText(),A=_c(p.map(fg),function(se,ye){var ge=se.range.start.line-ye.range.start.line;return ge===0?se.range.start.character-ye.range.start.character:ge}),w=0,E=[],F=0,G=A;F<G.length;F++){var te=G[F],ne=s.offsetAt(te.range.start);if(ne<w)throw new Error("Overlapping edit");ne>w&&E.push(y.substring(w,ne)),te.newText.length&&E.push(te.newText),w=s.offsetAt(te.range.end)}return E.push(y.substr(w)),E.join("")}r.applyEdits=o})(Af||(Af={}));function _c(r,t){if(r.length<=1)return r;var i=r.length/2|0,o=r.slice(0,i),s=r.slice(i);_c(o,t),_c(s,t);for(var p=0,y=0,A=0;p<o.length&&y<s.length;){var w=t(o[p],s[y]);w<=0?r[A++]=o[p++]:r[A++]=s[y++]}for(;p<o.length;)r[A++]=o[p++];for(;y<s.length;)r[A++]=s[y++];return r}function Rp(r,t,i){i===void 0&&(i=0);for(var o=t?[i]:[],s=0;s<r.length;s++){var p=r.charCodeAt(s);(p===13||p===10)&&(p===13&&s+1<r.length&&r.charCodeAt(s+1)===10&&s++,o.push(i+s+1))}return o}function Lp(r){var t=r.start,i=r.end;return t.line>i.line||t.line===i.line&&t.character>i.character?{start:i,end:t}:r}function fg(r){var t=Lp(r.range);return t!==r.range?{newText:r.newText,range:t}:r}var rr;(function(r){r[r.Undefined=0]="Undefined",r[r.EnumValueMismatch=1]="EnumValueMismatch",r[r.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",r[r.UnexpectedEndOfString=258]="UnexpectedEndOfString",r[r.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",r[r.InvalidUnicode=260]="InvalidUnicode",r[r.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",r[r.InvalidCharacter=262]="InvalidCharacter",r[r.PropertyExpected=513]="PropertyExpected",r[r.CommaExpected=514]="CommaExpected",r[r.ColonExpected=515]="ColonExpected",r[r.ValueExpected=516]="ValueExpected",r[r.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",r[r.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",r[r.TrailingComma=519]="TrailingComma",r[r.DuplicateKey=520]="DuplicateKey",r[r.CommentNotPermitted=521]="CommentNotPermitted",r[r.SchemaResolveError=768]="SchemaResolveError"})(rr||(rr={}));var Dp;(function(r){r.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[ua.Markdown,ua.PlainText],commitCharactersSupport:!0}}}}})(Dp||(Dp={}));var co=function(){var r=function(t,i){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,s){o.__proto__=s}||function(o,s){for(var p in s)s.hasOwnProperty(p)&&(o[p]=s[p])},r(t,i)};return function(t,i){r(t,i);function o(){this.constructor=t}t.prototype=i===null?Object.create(i):(o.prototype=i.prototype,new o)}}(),cg={"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,}))$/}},po=function(){function r(t,i,o){this.offset=i,this.length=o,this.parent=t}return Object.defineProperty(r.prototype,"children",{get:function(){return[]},enumerable:!0,configurable:!0}),r.prototype.toString=function(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")},r}(),dg=function(r){co(t,r);function t(i,o){var s=r.call(this,i,o)||this;return s.type="null",s.value=null,s}return t}(po),Np=function(r){co(t,r);function t(i,o,s){var p=r.call(this,i,s)||this;return p.type="boolean",p.value=o,p}return t}(po),pg=function(r){co(t,r);function t(i,o){var s=r.call(this,i,o)||this;return s.type="array",s.items=[],s}return Object.defineProperty(t.prototype,"children",{get:function(){return this.items},enumerable:!0,configurable:!0}),t}(po),hg=function(r){co(t,r);function t(i,o){var s=r.call(this,i,o)||this;return s.type="number",s.isInteger=!0,s.value=Number.NaN,s}return t}(po),Bp=function(r){co(t,r);function t(i,o,s){var p=r.call(this,i,o,s)||this;return p.type="string",p.value="",p}return t}(po),vg=function(r){co(t,r);function t(i,o){var s=r.call(this,i,o)||this;return s.type="property",s.colonOffset=-1,s}return Object.defineProperty(t.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!0,configurable:!0}),t}(po),gg=function(r){co(t,r);function t(i,o){var s=r.call(this,i,o)||this;return s.type="object",s.properties=[],s}return Object.defineProperty(t.prototype,"children",{get:function(){return this.properties},enumerable:!0,configurable:!0}),t}(po);function kn(r){return Ni(r)?r?{}:{not:{}}:r}var Up;(function(r){r[r.Key=0]="Key",r[r.Enum=1]="Enum"})(Up||(Up={}));var yg=function(){function r(t,i){t===void 0&&(t=-1),i===void 0&&(i=null),this.focusOffset=t,this.exclude=i,this.schemas=[]}return r.prototype.add=function(t){this.schemas.push(t)},r.prototype.merge=function(t){var i;(i=this.schemas).push.apply(i,t.schemas)},r.prototype.include=function(t){return(this.focusOffset===-1||jp(t,this.focusOffset))&&t!==this.exclude},r.prototype.newSub=function(){return new r(-1,this.exclude)},r}(),qc=function(){function r(){}return Object.defineProperty(r.prototype,"schemas",{get:function(){return[]},enumerable:!0,configurable:!0}),r.prototype.add=function(t){},r.prototype.merge=function(t){},r.prototype.include=function(t){return!0},r.prototype.newSub=function(){return this},r.instance=new r,r}(),Mn=function(){function r(){this.problems=[],this.propertiesMatches=0,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=null}return r.prototype.hasProblems=function(){return!!this.problems.length},r.prototype.mergeAll=function(t){for(var i=0,o=t;i<o.length;i++){var s=o[i];this.merge(s)}},r.prototype.merge=function(t){this.problems=this.problems.concat(t.problems)},r.prototype.mergeEnumValues=function(t){if(!this.enumValueMatch&&!t.enumValueMatch&&this.enumValues&&t.enumValues){this.enumValues=this.enumValues.concat(t.enumValues);for(var i=0,o=this.problems;i<o.length;i++){var s=o[i];s.code===rr.EnumValueMismatch&&(s.message="Value is not accepted. Valid values: "+this.enumValues.map(function(p){return JSON.stringify(p)}).join(", ")+".")}}},r.prototype.mergePropertyMatch=function(t){this.merge(t),this.propertiesMatches++,(t.enumValueMatch||!t.hasProblems()&&t.propertiesMatches)&&this.propertiesValueMatches++,t.enumValueMatch&&t.enumValues&&t.enumValues.length===1&&this.primaryValueMatches++},r.prototype.compare=function(t){var i=this.hasProblems();return i!==t.hasProblems()?i?-1:1:this.enumValueMatch!==t.enumValueMatch?t.enumValueMatch?-1:1:this.primaryValueMatches!==t.primaryValueMatches?this.primaryValueMatches-t.primaryValueMatches:this.propertiesValueMatches!==t.propertiesValueMatches?this.propertiesValueMatches-t.propertiesValueMatches:this.propertiesMatches-t.propertiesMatches},r}();function mg(r,t){return t===void 0&&(t=[]),new Vp(r,t,[])}function Ta(r){return og(r)}function ed(r){return ag(r)}function jp(r,t,i){return i===void 0&&(i=!1),t>=r.offset&&t<r.offset+r.length||i&&t===r.offset+r.length}var Vp=function(){function r(t,i,o){i===void 0&&(i=[]),o===void 0&&(o=[]),this.root=t,this.syntaxErrors=i,this.comments=o}return r.prototype.getNodeFromOffset=function(t,i){if(i===void 0&&(i=!1),this.root)return ig(this.root,t,i)},r.prototype.visit=function(t){if(this.root){var i=function(o){var s=t(o),p=o.children;if(Array.isArray(p))for(var y=0;y<p.length&&s;y++)s=i(p[y]);return s};i(this.root)}},r.prototype.validate=function(t,i){if(this.root&&i){var o=new Mn;return pn(this.root,i,o,qc.instance),o.problems.map(function(s){var p=ur.create(t.positionAt(s.location.offset),t.positionAt(s.location.offset+s.location.length));return la.create(p,s.message,s.severity,s.code)})}return null},r.prototype.getMatchingSchemas=function(t,i,o){i===void 0&&(i=-1),o===void 0&&(o=null);var s=new yg(i,o);return this.root&&t&&pn(this.root,t,new Mn,s),s.schemas},r}();function pn(r,t,i,o){if(!r||!o.include(r))return;switch(r.type){case"object":w(r,t,i,o);break;case"array":A(r,t,i,o);break;case"string":y(r,t,i,o);break;case"number":p(r,t,i,o);break;case"property":return pn(r.valueNode,t,i,o)}s(),o.add({node:r,schema:t});function s(){function E($e){return r.type===$e||$e==="integer"&&r.type==="number"&&r.isInteger||t.nullable&&r.value===null}if(Array.isArray(t.type)?t.type.some(E)||i.problems.push({location:{offset:r.offset,length:r.length},severity:$t.Warning,message:t.errorMessage||"Incorrect type. Expected one of "+t.type.join(", ")+"."}):t.type&&(E(t.type)||i.problems.push({location:{offset:r.offset,length:r.length},severity:$t.Warning,message:t.errorMessage||'Incorrect type. Expected "'+t.type+'".'})),Array.isArray(t.allOf))for(var F=0,G=t.allOf;F<G.length;F++){var te=G[F];pn(r,kn(te),i,o)}var ne=kn(t.not);if(ne){var se=new Mn,ye=o.newSub();pn(r,ne,se,ye),se.hasProblems()||i.problems.push({location:{offset:r.offset,length:r.length},severity:$t.Warning,message:"Matches a schema that is not allowed."});for(var ge=0,Ae=ye.schemas;ge<Ae.length;ge++){var me=Ae[ge];me.inverted=!me.inverted,o.add(me)}}var Te=function($e,gt){for(var Nt=[],zt=null,or=0,kr=$e;or<kr.length;or++){var Er=kr[or],Qr=kn(Er),br=new Mn,Dr=o.newSub();if(pn(r,Qr,br,Dr),br.hasProblems()||Nt.push(Qr),!zt)zt={schema:Qr,validationResult:br,matchingSchemas:Dr};else if(!gt&&!br.hasProblems()&&!zt.validationResult.hasProblems())zt.matchingSchemas.merge(Dr),zt.validationResult.propertiesMatches+=br.propertiesMatches,zt.validationResult.propertiesValueMatches+=br.propertiesValueMatches;else{var An=br.compare(zt.validationResult);An>0?zt={schema:Qr,validationResult:br,matchingSchemas:Dr}:An===0&&(zt.matchingSchemas.merge(Dr),zt.validationResult.mergeEnumValues(br))}}return Nt.length>1&>&&i.problems.push({location:{offset:r.offset,length:1},severity:$t.Warning,message:"Matches multiple schemas when only one must validate."}),zt!==null&&(i.merge(zt.validationResult),i.propertiesMatches+=zt.validationResult.propertiesMatches,i.propertiesValueMatches+=zt.validationResult.propertiesValueMatches,o.merge(zt.matchingSchemas)),Nt.length};Array.isArray(t.anyOf)&&Te(t.anyOf,!1),Array.isArray(t.oneOf)&&Te(t.oneOf,!0);var He=function($e){var gt=new Mn,Nt=o.newSub();pn(r,kn($e),gt,Nt),i.merge(gt),i.propertiesMatches+=gt.propertiesMatches,i.propertiesValueMatches+=gt.propertiesValueMatches,o.merge(Nt)},Be=function($e,gt,Nt){var zt=kn($e),or=new Mn,kr=o.newSub();pn(r,zt,or,kr),o.merge(kr),or.hasProblems()?Nt&&He(Nt):gt&&He(gt)},ze=kn(t.if);if(ze&&Be(ze,kn(t.then),kn(t.else)),Array.isArray(t.enum)){for(var De=Ta(r),Ue=!1,We=0,Je=t.enum;We<Je.length;We++){var et=Je[We];if(Cl(De,et)){Ue=!0;break}}i.enumValues=t.enum,i.enumValueMatch=Ue,Ue||i.problems.push({location:{offset:r.offset,length:r.length},severity:$t.Warning,code:rr.EnumValueMismatch,message:t.errorMessage||"Value is not accepted. Valid values: "+t.enum.map(function($e){return JSON.stringify($e)}).join(", ")+"."})}if(sa(t.const)){var De=Ta(r);Cl(De,t.const)?i.enumValueMatch=!0:(i.problems.push({location:{offset:r.offset,length:r.length},severity:$t.Warning,code:rr.EnumValueMismatch,message:t.errorMessage||"Value must be "+JSON.stringify(t.const)+"."}),i.enumValueMatch=!1),i.enumValues=[t.const]}t.deprecationMessage&&r.parent&&i.problems.push({location:{offset:r.parent.offset,length:r.parent.length},severity:$t.Warning,message:t.deprecationMessage})}function p(E,F,G,te){var ne=E.value;Kn(F.multipleOf)&&ne%F.multipleOf!=0&&G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:"Value is not divisible by "+F.multipleOf+"."});function se(He,Be){if(Kn(Be))return Be;if(Ni(Be)&&Be)return He}function ye(He,Be){if(!Ni(Be)||!Be)return He}var ge=se(F.minimum,F.exclusiveMinimum);Kn(ge)&&ne<=ge&&G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:"Value is below the exclusive minimum of "+ge+"."});var Ae=se(F.maximum,F.exclusiveMaximum);Kn(Ae)&&ne>=Ae&&G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:"Value is above the exclusive maximum of "+Ae+"."});var me=ye(F.minimum,F.exclusiveMinimum);Kn(me)&&ne<me&&G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:"Value is below the minimum of "+me+"."});var Te=ye(F.maximum,F.exclusiveMaximum);Kn(Te)&&ne>Te&&G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:"Value is above the maximum of "+Te+"."})}function y(E,F,G,te){if(Kn(F.minLength)&&E.value.length<F.minLength&&G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:"String is shorter than the minimum length of "+F.minLength+"."}),Kn(F.maxLength)&&E.value.length>F.maxLength&&G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:"String is longer than the maximum length of "+F.maxLength+"."}),lg(F.pattern)){var ne=new RegExp(F.pattern);ne.test(E.value)||G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:F.patternErrorMessage||F.errorMessage||'String does not match the pattern of "'+F.pattern+'".'})}if(F.format)switch(F.format){case"uri":case"uri-reference":{var se=void 0;if(!E.value)se="URI expected.";else{var ye=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(E.value);ye?!ye[2]&&F.format==="uri"&&(se="URI with a scheme is expected."):se="URI is expected."}se&&G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:F.patternErrorMessage||F.errorMessage||"String is not a URI: "+se})}break;case"color-hex":case"date-time":case"date":case"time":case"email":var ge=cg[F.format];(!E.value||!ge.pattern.exec(E.value))&&G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:F.patternErrorMessage||F.errorMessage||ge.errorMessage});break;default:}}function A(E,F,G,te){if(Array.isArray(F.items)){for(var ne=F.items,se=0;se<ne.length;se++){var ye=ne[se],ge=kn(ye),Ae=new Mn,me=E.items[se];me?(pn(me,ge,Ae,te),G.mergePropertyMatch(Ae)):E.items.length>=ne.length&&G.propertiesValueMatches++}if(E.items.length>ne.length)if(typeof F.additionalItems=="object")for(var Te=ne.length;Te<E.items.length;Te++){var Ae=new Mn;pn(E.items[Te],F.additionalItems,Ae,te),G.mergePropertyMatch(Ae)}else F.additionalItems===!1&&G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:"Array has too many items according to schema. Expected "+ne.length+" or fewer."})}else{var He=kn(F.items);if(He)for(var Be=0,ze=E.items;Be<ze.length;Be++){var me=ze[Be],Ae=new Mn;pn(me,He,Ae,te),G.mergePropertyMatch(Ae)}}var De=kn(F.contains);if(De){var Ue=E.items.some(function(et){var $e=new Mn;return pn(et,De,$e,qc.instance),!$e.hasProblems()});Ue||G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:F.errorMessage||"Array does not contain required item."})}if(Kn(F.minItems)&&E.items.length<F.minItems&&G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:"Array has too few items. Expected "+F.minItems+" or more."}),Kn(F.maxItems)&&E.items.length>F.maxItems&&G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:"Array has too many items. Expected "+F.maxItems+" or fewer."}),F.uniqueItems===!0){var We=Ta(E),Je=We.some(function(et,$e){return $e!==We.lastIndexOf(et)});Je&&G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:"Array has duplicate items."})}}function w(E,F,G,te){for(var ne=Object.create(null),se=[],ye=0,ge=E.properties;ye<ge.length;ye++){var Ae=ge[ye],me=Ae.keyNode.value;ne[me]=Ae.valueNode,se.push(me)}if(Array.isArray(F.required))for(var Te=0,He=F.required;Te<He.length;Te++){var Be=He[Te];if(!ne[Be]){var ze=E.parent&&E.parent.type==="property"&&E.parent.keyNode,De=ze?{offset:ze.offset,length:ze.length}:{offset:E.offset,length:1};G.problems.push({location:De,severity:$t.Warning,message:'Missing property "'+Be+'".'})}}var Ue=function(wi){for(var Nl=se.indexOf(wi);Nl>=0;)se.splice(Nl,1),Nl=se.indexOf(wi)};if(F.properties)for(var We=0,Je=Object.keys(F.properties);We<Je.length;We++){var Be=Je[We];Ue(Be);var et=F.properties[Be],$e=ne[Be];if($e)if(Ni(et))if(et)G.propertiesMatches++,G.propertiesValueMatches++;else{var Ae=$e.parent;G.problems.push({location:{offset:Ae.keyNode.offset,length:Ae.keyNode.length},severity:$t.Warning,message:F.errorMessage||"Property "+Be+" is not allowed."})}else{var gt=new Mn;pn($e,et,gt,te),G.mergePropertyMatch(gt)}}if(F.patternProperties)for(var Nt=0,zt=Object.keys(F.patternProperties);Nt<zt.length;Nt++)for(var or=zt[Nt],kr=new RegExp(or),Er=0,Qr=se.slice(0);Er<Qr.length;Er++){var Be=Qr[Er];if(kr.test(Be)){Ue(Be);var $e=ne[Be];if($e){var et=F.patternProperties[or];if(Ni(et))if(et)G.propertiesMatches++,G.propertiesValueMatches++;else{var Ae=$e.parent;G.problems.push({location:{offset:Ae.keyNode.offset,length:Ae.keyNode.length},severity:$t.Warning,message:F.errorMessage||"Property "+Be+" is not allowed."})}else{var gt=new Mn;pn($e,et,gt,te),G.mergePropertyMatch(gt)}}}}if(typeof F.additionalProperties=="object")for(var br=0,Dr=se;br<Dr.length;br++){var Be=Dr[br],$e=ne[Be];if($e){var gt=new Mn;pn($e,F.additionalProperties,gt,te),G.mergePropertyMatch(gt)}}else if(F.additionalProperties===!1&&se.length>0)for(var An=0,Yt=se;An<Yt.length;An++){var Be=Yt[An],$e=ne[Be];if($e){var Ae=$e.parent;G.problems.push({location:{offset:Ae.keyNode.offset,length:Ae.keyNode.length},severity:$t.Warning,message:F.errorMessage||"Property "+Be+" is not allowed."})}}if(Kn(F.maxProperties)&&E.properties.length>F.maxProperties&&G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:"Object has more properties than limit of "+F.maxProperties+"."}),Kn(F.minProperties)&&E.properties.length<F.minProperties&&G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:"Object has fewer properties than the required number of "+F.minProperties}),F.dependencies)for(var Rt=0,Ut=Object.keys(F.dependencies);Rt<Ut.length;Rt++){var me=Ut[Rt],sr=ne[me];if(sr){var on=F.dependencies[me];if(Array.isArray(on))for(var yr=0,gs=on;yr<gs.length;yr++){var Ll=gs[yr];ne[Ll]?G.propertiesValueMatches++:G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:"Object is missing property "+Ll+" required by property {$key}."})}else{var et=kn(on);if(et){var gt=new Mn;pn(E,et,gt,te),G.mergePropertyMatch(gt)}}}}var ho=kn(F.propertyNames);if(ho)for(var Ui=0,Dl=E.properties;Ui<Dl.length;Ui++){var If=Dl[Ui],me=If.keyNode;me&&pn(me,ho,G,qc.instance)}}}function xg(r,t){var i=[],o=-1,s=r.getText(),p=fs(s,!1),y=t&&t.collectComments?[]:void 0;function A(){for(;;){var ze=p.scan();switch(G(),ze){case 12:case 13:Array.isArray(y)&&y.push(ur.create(r.positionAt(p.getTokenOffset()),r.positionAt(p.getTokenOffset()+p.getTokenLength())));break;case 15:case 14:break;default:return ze}}}function w(ze){return p.getToken()===ze?(A(),!0):!1}function E(ze,De,Ue,We,Je){if(Je===void 0&&(Je=$t.Error),i.length===0||Ue!==o){var et=ur.create(r.positionAt(Ue),r.positionAt(We));i.push(la.create(et,ze,Je,De,r.languageId)),o=Ue}}function F(ze,De,Ue,We,Je){Ue===void 0&&(Ue=null),We===void 0&&(We=[]),Je===void 0&&(Je=[]);var et=p.getTokenOffset(),$e=p.getTokenOffset()+p.getTokenLength();if(et===$e&&et>0){for(et--;et>0&&/\s/.test(s.charAt(et));)et--;$e=et+1}if(E(ze,De,et,$e),Ue&&te(Ue,!1),We.length+Je.length>0)for(var gt=p.getToken();gt!==17;){if(We.indexOf(gt)!==-1){A();break}else if(Je.indexOf(gt)!==-1)break;gt=A()}return Ue}function G(){switch(p.getTokenError()){case 4:return F("Invalid unicode sequence in string.",rr.InvalidUnicode),!0;case 5:return F("Invalid escape character in string.",rr.InvalidEscapeCharacter),!0;case 3:return F("Unexpected end of number.",rr.UnexpectedEndOfNumber),!0;case 1:return F("Unexpected end of comment.",rr.UnexpectedEndOfComment),!0;case 2:return F("Unexpected end of string.",rr.UnexpectedEndOfString),!0;case 6:return F("Invalid characters in string. Control characters must be escaped.",rr.InvalidCharacter),!0}return!1}function te(ze,De){return ze.length=p.getTokenOffset()+p.getTokenLength()-ze.offset,De&&A(),ze}function ne(ze){if(p.getToken()!==3)return null;var De=new pg(ze,p.getTokenOffset());A();for(var Ue=0,We=!1;p.getToken()!==4&&p.getToken()!==17;){if(p.getToken()===5){We||F("Value expected",rr.ValueExpected);var Je=p.getTokenOffset();if(A(),p.getToken()===4){We&&E("Trailing comma",rr.TrailingComma,Je,Je+1);continue}}else We&&F("Expected comma",rr.CommaExpected);var et=Te(De,Ue++);et?De.items.push(et):F("Value expected",rr.ValueExpected,null,[],[4,5]),We=!0}return p.getToken()!==4?F("Expected comma or closing bracket",rr.CommaOrCloseBacketExpected,De):te(De,!0)}function se(ze,De){var Ue=new vg(ze,p.getTokenOffset()),We=ge(Ue);if(!We)if(p.getToken()===16){F("Property keys must be doublequoted",rr.Undefined);var Je=new Bp(Ue,p.getTokenOffset(),p.getTokenLength());Je.value=p.getTokenValue(),We=Je,A()}else return null;Ue.keyNode=We;var et=De[We.value];if(et?(E("Duplicate object key",rr.DuplicateKey,Ue.keyNode.offset,Ue.keyNode.offset+Ue.keyNode.length,$t.Warning),typeof et=="object"&&E("DuplicateKeyWarning",rr.DuplicateKey,et.keyNode.offset,et.keyNode.offset+et.keyNode.length,$t.Warning),De[We.value]=!0):De[We.value]=Ue,p.getToken()===6)Ue.colonOffset=p.getTokenOffset(),A();else if(F("Colon expected",rr.ColonExpected),p.getToken()===10&&r.positionAt(We.offset+We.length).line<r.positionAt(p.getTokenOffset()).line)return Ue.length=We.length,Ue;var $e=Te(Ue,We.value);return $e?(Ue.valueNode=$e,Ue.length=$e.offset+$e.length-Ue.offset,Ue):F("Value expected",rr.ValueExpected,Ue,[],[2,5])}function ye(ze){if(p.getToken()!==1)return null;var De=new gg(ze,p.getTokenOffset()),Ue=Object.create(null);A();for(var We=!1;p.getToken()!==2&&p.getToken()!==17;){if(p.getToken()===5){We||F("Property expected",rr.PropertyExpected);var Je=p.getTokenOffset();if(A(),p.getToken()===2){We&&E("Trailing comma",rr.TrailingComma,Je,Je+1);continue}}else We&&F("Expected comma",rr.CommaExpected);var et=se(De,Ue);et?De.properties.push(et):F("Property expected",rr.PropertyExpected,null,[],[2,5]),We=!0}return p.getToken()!==2?F("Expected comma or closing brace",rr.CommaOrCloseBraceExpected,De):te(De,!0)}function ge(ze){if(p.getToken()!==10)return null;var De=new Bp(ze,p.getTokenOffset());return De.value=p.getTokenValue(),te(De,!0)}function Ae(ze){if(p.getToken()!==11)return null;var De=new hg(ze,p.getTokenOffset());if(p.getTokenError()===0){var Ue=p.getTokenValue();try{var We=JSON.parse(Ue);if(!Kn(We))return F("Invalid number format.",rr.Undefined,De);De.value=We}catch(Je){return F("Invalid number format.",rr.Undefined,De)}De.isInteger=Ue.indexOf(".")===-1}return te(De,!0)}function me(ze){var De;switch(p.getToken()){case 7:return te(new dg(ze,p.getTokenOffset()),!0);case 8:return te(new Np(ze,!0,p.getTokenOffset()),!0);case 9:return te(new Np(ze,!1,p.getTokenOffset()),!0);default:return null}}function Te(ze,De){return ne(ze)||ye(ze)||ge(ze)||Ae(ze)||me(ze)}var He=null,Be=A();return Be!==17&&(He=Te(null,null),He?p.getToken()!==17&&F("End of file expected.",rr.Undefined):F("Expected a JSON object, array or literal.",rr.Undefined)),new Vp(He,i,y)}function td(r,t,i){if(r!==null&&typeof r=="object"){var o=t+" ";if(Array.isArray(r)){if(r.length===0)return"[]";for(var s=`[
|
|
341
|
-
`,p=0;p<
|
|
342
|
-
`;return s+=
|
|
343
|
-
`,p=0;p<y.length;p++){var A=y[p];s+=o+JSON.stringify(A)+": "+td(
|
|
344
|
-
`}return s+=
|
|
340
|
+
`&&s++}o&&i.length>0&&r.push(i.length),this._lineOffsets=r}return this._lineOffsets},t.prototype.positionAt=function(r){r=Math.max(Math.min(r,this._content.length),0);var i=this.getLineOffsets(),o=0,s=i.length;if(s===0)return mi.create(0,r);for(;o<s;){var p=Math.floor((o+s)/2);i[p]>r?s=p:o=p+1}var y=o-1;return mi.create(y,r-i[y])},t.prototype.offsetAt=function(r){var i=this.getLineOffsets();if(r.line>=i.length)return this._content.length;if(r.line<0)return 0;var o=i[r.line],s=r.line+1<i.length?i[r.line+1]:this._content.length;return Math.max(Math.min(o+r.character,s),o)},Object.defineProperty(t.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),t}(),_e;(function(t){var r=Object.prototype.toString;function i(ne){return typeof ne!="undefined"}t.defined=i;function o(ne){return typeof ne=="undefined"}t.undefined=o;function s(ne){return ne===!0||ne===!1}t.boolean=s;function p(ne){return r.call(ne)==="[object String]"}t.string=p;function y(ne){return r.call(ne)==="[object Number]"}t.number=y;function A(ne,se,ye){return r.call(ne)==="[object Number]"&&se<=ne&&ne<=ye}t.numberRange=A;function w(ne){return r.call(ne)==="[object Number]"&&-2147483648<=ne&&ne<=2147483647}t.integer=w;function E(ne){return r.call(ne)==="[object Number]"&&0<=ne&&ne<=2147483647}t.uinteger=E;function F(ne){return r.call(ne)==="[object Function]"}t.func=F;function G(ne){return ne!==null&&typeof ne=="object"}t.objectLiteral=G;function te(ne,se){return Array.isArray(ne)&&ne.every(se)}t.typedArray=te})(_e||(_e={}));var Mp=function(){function t(r,i,o,s){this._uri=r,this._languageId=i,this._version=o,this._content=s,this._lineOffsets=void 0}return Object.defineProperty(t.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),t.prototype.getText=function(r){if(r){var i=this.offsetAt(r.start),o=this.offsetAt(r.end);return this._content.substring(i,o)}return this._content},t.prototype.update=function(r,i){for(var o=0,s=r;o<s.length;o++){var p=s[o];if(t.isIncremental(p)){var y=Lp(p.range),A=this.offsetAt(y.start),w=this.offsetAt(y.end);this._content=this._content.substring(0,A)+p.text+this._content.substring(w,this._content.length);var E=Math.max(y.start.line,0),F=Math.max(y.end.line,0),G=this._lineOffsets,te=Rp(p.text,!1,A);if(F-E===te.length)for(var ne=0,se=te.length;ne<se;ne++)G[ne+E+1]=te[ne];else te.length<1e4?G.splice.apply(G,[E+1,F-E].concat(te)):this._lineOffsets=G=G.slice(0,E+1).concat(te,G.slice(F+1));var ye=p.text.length-(w-A);if(ye!==0)for(var ne=E+1+te.length,se=G.length;ne<se;ne++)G[ne]=G[ne]+ye}else if(t.isFull(p))this._content=p.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received")}this._version=i},t.prototype.getLineOffsets=function(){return this._lineOffsets===void 0&&(this._lineOffsets=Rp(this._content,!0)),this._lineOffsets},t.prototype.positionAt=function(r){r=Math.max(Math.min(r,this._content.length),0);var i=this.getLineOffsets(),o=0,s=i.length;if(s===0)return{line:0,character:r};for(;o<s;){var p=Math.floor((o+s)/2);i[p]>r?s=p:o=p+1}var y=o-1;return{line:y,character:r-i[y]}},t.prototype.offsetAt=function(r){var i=this.getLineOffsets();if(r.line>=i.length)return this._content.length;if(r.line<0)return 0;var o=i[r.line],s=r.line+1<i.length?i[r.line+1]:this._content.length;return Math.max(Math.min(o+r.character,s),o)},Object.defineProperty(t.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!0,configurable:!0}),t.isIncremental=function(r){var i=r;return i!=null&&typeof i.text=="string"&&i.range!==void 0&&(i.rangeLength===void 0||typeof i.rangeLength=="number")},t.isFull=function(r){var i=r;return i!=null&&typeof i.text=="string"&&i.range===void 0&&i.rangeLength===void 0},t}(),Af;(function(t){function r(s,p,y,A){return new Mp(s,p,y,A)}t.create=r;function i(s,p,y){if(s instanceof Mp)return s.update(p,y),s;throw new Error("TextDocument.update: document must be created by TextDocument.create")}t.update=i;function o(s,p){for(var y=s.getText(),A=_c(p.map(fg),function(se,ye){var ge=se.range.start.line-ye.range.start.line;return ge===0?se.range.start.character-ye.range.start.character:ge}),w=0,E=[],F=0,G=A;F<G.length;F++){var te=G[F],ne=s.offsetAt(te.range.start);if(ne<w)throw new Error("Overlapping edit");ne>w&&E.push(y.substring(w,ne)),te.newText.length&&E.push(te.newText),w=s.offsetAt(te.range.end)}return E.push(y.substr(w)),E.join("")}t.applyEdits=o})(Af||(Af={}));function _c(t,r){if(t.length<=1)return t;var i=t.length/2|0,o=t.slice(0,i),s=t.slice(i);_c(o,r),_c(s,r);for(var p=0,y=0,A=0;p<o.length&&y<s.length;){var w=r(o[p],s[y]);w<=0?t[A++]=o[p++]:t[A++]=s[y++]}for(;p<o.length;)t[A++]=o[p++];for(;y<s.length;)t[A++]=s[y++];return t}function Rp(t,r,i){i===void 0&&(i=0);for(var o=r?[i]:[],s=0;s<t.length;s++){var p=t.charCodeAt(s);(p===13||p===10)&&(p===13&&s+1<t.length&&t.charCodeAt(s+1)===10&&s++,o.push(i+s+1))}return o}function Lp(t){var r=t.start,i=t.end;return r.line>i.line||r.line===i.line&&r.character>i.character?{start:i,end:r}:t}function fg(t){var r=Lp(t.range);return r!==t.range?{newText:t.newText,range:r}:t}var rr;(function(t){t[t.Undefined=0]="Undefined",t[t.EnumValueMismatch=1]="EnumValueMismatch",t[t.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=258]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",t[t.InvalidUnicode=260]="InvalidUnicode",t[t.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",t[t.InvalidCharacter=262]="InvalidCharacter",t[t.PropertyExpected=513]="PropertyExpected",t[t.CommaExpected=514]="CommaExpected",t[t.ColonExpected=515]="ColonExpected",t[t.ValueExpected=516]="ValueExpected",t[t.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",t[t.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",t[t.TrailingComma=519]="TrailingComma",t[t.DuplicateKey=520]="DuplicateKey",t[t.CommentNotPermitted=521]="CommentNotPermitted",t[t.SchemaResolveError=768]="SchemaResolveError"})(rr||(rr={}));var Dp;(function(t){t.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[ua.Markdown,ua.PlainText],commitCharactersSupport:!0}}}}})(Dp||(Dp={}));var co=function(){var t=function(r,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,s){o.__proto__=s}||function(o,s){for(var p in s)s.hasOwnProperty(p)&&(o[p]=s[p])},t(r,i)};return function(r,i){t(r,i);function o(){this.constructor=r}r.prototype=i===null?Object.create(i):(o.prototype=i.prototype,new o)}}(),cg={"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,}))$/}},po=function(){function t(r,i,o){this.offset=i,this.length=o,this.parent=r}return Object.defineProperty(t.prototype,"children",{get:function(){return[]},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")},t}(),dg=function(t){co(r,t);function r(i,o){var s=t.call(this,i,o)||this;return s.type="null",s.value=null,s}return r}(po),Np=function(t){co(r,t);function r(i,o,s){var p=t.call(this,i,s)||this;return p.type="boolean",p.value=o,p}return r}(po),pg=function(t){co(r,t);function r(i,o){var s=t.call(this,i,o)||this;return s.type="array",s.items=[],s}return Object.defineProperty(r.prototype,"children",{get:function(){return this.items},enumerable:!0,configurable:!0}),r}(po),hg=function(t){co(r,t);function r(i,o){var s=t.call(this,i,o)||this;return s.type="number",s.isInteger=!0,s.value=Number.NaN,s}return r}(po),Bp=function(t){co(r,t);function r(i,o,s){var p=t.call(this,i,o,s)||this;return p.type="string",p.value="",p}return r}(po),vg=function(t){co(r,t);function r(i,o){var s=t.call(this,i,o)||this;return s.type="property",s.colonOffset=-1,s}return Object.defineProperty(r.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!0,configurable:!0}),r}(po),gg=function(t){co(r,t);function r(i,o){var s=t.call(this,i,o)||this;return s.type="object",s.properties=[],s}return Object.defineProperty(r.prototype,"children",{get:function(){return this.properties},enumerable:!0,configurable:!0}),r}(po);function kn(t){return Ni(t)?t?{}:{not:{}}:t}var Up;(function(t){t[t.Key=0]="Key",t[t.Enum=1]="Enum"})(Up||(Up={}));var yg=function(){function t(r,i){r===void 0&&(r=-1),i===void 0&&(i=null),this.focusOffset=r,this.exclude=i,this.schemas=[]}return t.prototype.add=function(r){this.schemas.push(r)},t.prototype.merge=function(r){var i;(i=this.schemas).push.apply(i,r.schemas)},t.prototype.include=function(r){return(this.focusOffset===-1||jp(r,this.focusOffset))&&r!==this.exclude},t.prototype.newSub=function(){return new t(-1,this.exclude)},t}(),qc=function(){function t(){}return Object.defineProperty(t.prototype,"schemas",{get:function(){return[]},enumerable:!0,configurable:!0}),t.prototype.add=function(r){},t.prototype.merge=function(r){},t.prototype.include=function(r){return!0},t.prototype.newSub=function(){return this},t.instance=new t,t}(),Mn=function(){function t(){this.problems=[],this.propertiesMatches=0,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=null}return t.prototype.hasProblems=function(){return!!this.problems.length},t.prototype.mergeAll=function(r){for(var i=0,o=r;i<o.length;i++){var s=o[i];this.merge(s)}},t.prototype.merge=function(r){this.problems=this.problems.concat(r.problems)},t.prototype.mergeEnumValues=function(r){if(!this.enumValueMatch&&!r.enumValueMatch&&this.enumValues&&r.enumValues){this.enumValues=this.enumValues.concat(r.enumValues);for(var i=0,o=this.problems;i<o.length;i++){var s=o[i];s.code===rr.EnumValueMismatch&&(s.message="Value is not accepted. Valid values: "+this.enumValues.map(function(p){return JSON.stringify(p)}).join(", ")+".")}}},t.prototype.mergePropertyMatch=function(r){this.merge(r),this.propertiesMatches++,(r.enumValueMatch||!r.hasProblems()&&r.propertiesMatches)&&this.propertiesValueMatches++,r.enumValueMatch&&r.enumValues&&r.enumValues.length===1&&this.primaryValueMatches++},t.prototype.compare=function(r){var i=this.hasProblems();return i!==r.hasProblems()?i?-1:1:this.enumValueMatch!==r.enumValueMatch?r.enumValueMatch?-1:1:this.primaryValueMatches!==r.primaryValueMatches?this.primaryValueMatches-r.primaryValueMatches:this.propertiesValueMatches!==r.propertiesValueMatches?this.propertiesValueMatches-r.propertiesValueMatches:this.propertiesMatches-r.propertiesMatches},t}();function mg(t,r){return r===void 0&&(r=[]),new Vp(t,r,[])}function Ta(t){return og(t)}function ed(t){return ag(t)}function jp(t,r,i){return i===void 0&&(i=!1),r>=t.offset&&r<t.offset+t.length||i&&r===t.offset+t.length}var Vp=function(){function t(r,i,o){i===void 0&&(i=[]),o===void 0&&(o=[]),this.root=r,this.syntaxErrors=i,this.comments=o}return t.prototype.getNodeFromOffset=function(r,i){if(i===void 0&&(i=!1),this.root)return ig(this.root,r,i)},t.prototype.visit=function(r){if(this.root){var i=function(o){var s=r(o),p=o.children;if(Array.isArray(p))for(var y=0;y<p.length&&s;y++)s=i(p[y]);return s};i(this.root)}},t.prototype.validate=function(r,i){if(this.root&&i){var o=new Mn;return pn(this.root,i,o,qc.instance),o.problems.map(function(s){var p=ur.create(r.positionAt(s.location.offset),r.positionAt(s.location.offset+s.location.length));return la.create(p,s.message,s.severity,s.code)})}return null},t.prototype.getMatchingSchemas=function(r,i,o){i===void 0&&(i=-1),o===void 0&&(o=null);var s=new yg(i,o);return this.root&&r&&pn(this.root,r,new Mn,s),s.schemas},t}();function pn(t,r,i,o){if(!t||!o.include(t))return;switch(t.type){case"object":w(t,r,i,o);break;case"array":A(t,r,i,o);break;case"string":y(t,r,i,o);break;case"number":p(t,r,i,o);break;case"property":return pn(t.valueNode,r,i,o)}s(),o.add({node:t,schema:r});function s(){function E($e){return t.type===$e||$e==="integer"&&t.type==="number"&&t.isInteger||r.nullable&&t.value===null}if(Array.isArray(r.type)?r.type.some(E)||i.problems.push({location:{offset:t.offset,length:t.length},severity:$t.Warning,message:r.errorMessage||"Incorrect type. Expected one of "+r.type.join(", ")+"."}):r.type&&(E(r.type)||i.problems.push({location:{offset:t.offset,length:t.length},severity:$t.Warning,message:r.errorMessage||'Incorrect type. Expected "'+r.type+'".'})),Array.isArray(r.allOf))for(var F=0,G=r.allOf;F<G.length;F++){var te=G[F];pn(t,kn(te),i,o)}var ne=kn(r.not);if(ne){var se=new Mn,ye=o.newSub();pn(t,ne,se,ye),se.hasProblems()||i.problems.push({location:{offset:t.offset,length:t.length},severity:$t.Warning,message:"Matches a schema that is not allowed."});for(var ge=0,Ae=ye.schemas;ge<Ae.length;ge++){var me=Ae[ge];me.inverted=!me.inverted,o.add(me)}}var Te=function($e,gt){for(var Nt=[],zt=null,or=0,kr=$e;or<kr.length;or++){var Er=kr[or],Qr=kn(Er),br=new Mn,Dr=o.newSub();if(pn(t,Qr,br,Dr),br.hasProblems()||Nt.push(Qr),!zt)zt={schema:Qr,validationResult:br,matchingSchemas:Dr};else if(!gt&&!br.hasProblems()&&!zt.validationResult.hasProblems())zt.matchingSchemas.merge(Dr),zt.validationResult.propertiesMatches+=br.propertiesMatches,zt.validationResult.propertiesValueMatches+=br.propertiesValueMatches;else{var An=br.compare(zt.validationResult);An>0?zt={schema:Qr,validationResult:br,matchingSchemas:Dr}:An===0&&(zt.matchingSchemas.merge(Dr),zt.validationResult.mergeEnumValues(br))}}return Nt.length>1&>&&i.problems.push({location:{offset:t.offset,length:1},severity:$t.Warning,message:"Matches multiple schemas when only one must validate."}),zt!==null&&(i.merge(zt.validationResult),i.propertiesMatches+=zt.validationResult.propertiesMatches,i.propertiesValueMatches+=zt.validationResult.propertiesValueMatches,o.merge(zt.matchingSchemas)),Nt.length};Array.isArray(r.anyOf)&&Te(r.anyOf,!1),Array.isArray(r.oneOf)&&Te(r.oneOf,!0);var He=function($e){var gt=new Mn,Nt=o.newSub();pn(t,kn($e),gt,Nt),i.merge(gt),i.propertiesMatches+=gt.propertiesMatches,i.propertiesValueMatches+=gt.propertiesValueMatches,o.merge(Nt)},Be=function($e,gt,Nt){var zt=kn($e),or=new Mn,kr=o.newSub();pn(t,zt,or,kr),o.merge(kr),or.hasProblems()?Nt&&He(Nt):gt&&He(gt)},ze=kn(r.if);if(ze&&Be(ze,kn(r.then),kn(r.else)),Array.isArray(r.enum)){for(var De=Ta(t),Ue=!1,We=0,Je=r.enum;We<Je.length;We++){var et=Je[We];if(Cl(De,et)){Ue=!0;break}}i.enumValues=r.enum,i.enumValueMatch=Ue,Ue||i.problems.push({location:{offset:t.offset,length:t.length},severity:$t.Warning,code:rr.EnumValueMismatch,message:r.errorMessage||"Value is not accepted. Valid values: "+r.enum.map(function($e){return JSON.stringify($e)}).join(", ")+"."})}if(sa(r.const)){var De=Ta(t);Cl(De,r.const)?i.enumValueMatch=!0:(i.problems.push({location:{offset:t.offset,length:t.length},severity:$t.Warning,code:rr.EnumValueMismatch,message:r.errorMessage||"Value must be "+JSON.stringify(r.const)+"."}),i.enumValueMatch=!1),i.enumValues=[r.const]}r.deprecationMessage&&t.parent&&i.problems.push({location:{offset:t.parent.offset,length:t.parent.length},severity:$t.Warning,message:r.deprecationMessage})}function p(E,F,G,te){var ne=E.value;Kn(F.multipleOf)&&ne%F.multipleOf!=0&&G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:"Value is not divisible by "+F.multipleOf+"."});function se(He,Be){if(Kn(Be))return Be;if(Ni(Be)&&Be)return He}function ye(He,Be){if(!Ni(Be)||!Be)return He}var ge=se(F.minimum,F.exclusiveMinimum);Kn(ge)&&ne<=ge&&G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:"Value is below the exclusive minimum of "+ge+"."});var Ae=se(F.maximum,F.exclusiveMaximum);Kn(Ae)&&ne>=Ae&&G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:"Value is above the exclusive maximum of "+Ae+"."});var me=ye(F.minimum,F.exclusiveMinimum);Kn(me)&&ne<me&&G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:"Value is below the minimum of "+me+"."});var Te=ye(F.maximum,F.exclusiveMaximum);Kn(Te)&&ne>Te&&G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:"Value is above the maximum of "+Te+"."})}function y(E,F,G,te){if(Kn(F.minLength)&&E.value.length<F.minLength&&G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:"String is shorter than the minimum length of "+F.minLength+"."}),Kn(F.maxLength)&&E.value.length>F.maxLength&&G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:"String is longer than the maximum length of "+F.maxLength+"."}),lg(F.pattern)){var ne=new RegExp(F.pattern);ne.test(E.value)||G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:F.patternErrorMessage||F.errorMessage||'String does not match the pattern of "'+F.pattern+'".'})}if(F.format)switch(F.format){case"uri":case"uri-reference":{var se=void 0;if(!E.value)se="URI expected.";else{var ye=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(E.value);ye?!ye[2]&&F.format==="uri"&&(se="URI with a scheme is expected."):se="URI is expected."}se&&G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:F.patternErrorMessage||F.errorMessage||"String is not a URI: "+se})}break;case"color-hex":case"date-time":case"date":case"time":case"email":var ge=cg[F.format];(!E.value||!ge.pattern.exec(E.value))&&G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:F.patternErrorMessage||F.errorMessage||ge.errorMessage});break;default:}}function A(E,F,G,te){if(Array.isArray(F.items)){for(var ne=F.items,se=0;se<ne.length;se++){var ye=ne[se],ge=kn(ye),Ae=new Mn,me=E.items[se];me?(pn(me,ge,Ae,te),G.mergePropertyMatch(Ae)):E.items.length>=ne.length&&G.propertiesValueMatches++}if(E.items.length>ne.length)if(typeof F.additionalItems=="object")for(var Te=ne.length;Te<E.items.length;Te++){var Ae=new Mn;pn(E.items[Te],F.additionalItems,Ae,te),G.mergePropertyMatch(Ae)}else F.additionalItems===!1&&G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:"Array has too many items according to schema. Expected "+ne.length+" or fewer."})}else{var He=kn(F.items);if(He)for(var Be=0,ze=E.items;Be<ze.length;Be++){var me=ze[Be],Ae=new Mn;pn(me,He,Ae,te),G.mergePropertyMatch(Ae)}}var De=kn(F.contains);if(De){var Ue=E.items.some(function(et){var $e=new Mn;return pn(et,De,$e,qc.instance),!$e.hasProblems()});Ue||G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:F.errorMessage||"Array does not contain required item."})}if(Kn(F.minItems)&&E.items.length<F.minItems&&G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:"Array has too few items. Expected "+F.minItems+" or more."}),Kn(F.maxItems)&&E.items.length>F.maxItems&&G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:"Array has too many items. Expected "+F.maxItems+" or fewer."}),F.uniqueItems===!0){var We=Ta(E),Je=We.some(function(et,$e){return $e!==We.lastIndexOf(et)});Je&&G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:"Array has duplicate items."})}}function w(E,F,G,te){for(var ne=Object.create(null),se=[],ye=0,ge=E.properties;ye<ge.length;ye++){var Ae=ge[ye],me=Ae.keyNode.value;ne[me]=Ae.valueNode,se.push(me)}if(Array.isArray(F.required))for(var Te=0,He=F.required;Te<He.length;Te++){var Be=He[Te];if(!ne[Be]){var ze=E.parent&&E.parent.type==="property"&&E.parent.keyNode,De=ze?{offset:ze.offset,length:ze.length}:{offset:E.offset,length:1};G.problems.push({location:De,severity:$t.Warning,message:'Missing property "'+Be+'".'})}}var Ue=function(wi){for(var Nl=se.indexOf(wi);Nl>=0;)se.splice(Nl,1),Nl=se.indexOf(wi)};if(F.properties)for(var We=0,Je=Object.keys(F.properties);We<Je.length;We++){var Be=Je[We];Ue(Be);var et=F.properties[Be],$e=ne[Be];if($e)if(Ni(et))if(et)G.propertiesMatches++,G.propertiesValueMatches++;else{var Ae=$e.parent;G.problems.push({location:{offset:Ae.keyNode.offset,length:Ae.keyNode.length},severity:$t.Warning,message:F.errorMessage||"Property "+Be+" is not allowed."})}else{var gt=new Mn;pn($e,et,gt,te),G.mergePropertyMatch(gt)}}if(F.patternProperties)for(var Nt=0,zt=Object.keys(F.patternProperties);Nt<zt.length;Nt++)for(var or=zt[Nt],kr=new RegExp(or),Er=0,Qr=se.slice(0);Er<Qr.length;Er++){var Be=Qr[Er];if(kr.test(Be)){Ue(Be);var $e=ne[Be];if($e){var et=F.patternProperties[or];if(Ni(et))if(et)G.propertiesMatches++,G.propertiesValueMatches++;else{var Ae=$e.parent;G.problems.push({location:{offset:Ae.keyNode.offset,length:Ae.keyNode.length},severity:$t.Warning,message:F.errorMessage||"Property "+Be+" is not allowed."})}else{var gt=new Mn;pn($e,et,gt,te),G.mergePropertyMatch(gt)}}}}if(typeof F.additionalProperties=="object")for(var br=0,Dr=se;br<Dr.length;br++){var Be=Dr[br],$e=ne[Be];if($e){var gt=new Mn;pn($e,F.additionalProperties,gt,te),G.mergePropertyMatch(gt)}}else if(F.additionalProperties===!1&&se.length>0)for(var An=0,Yt=se;An<Yt.length;An++){var Be=Yt[An],$e=ne[Be];if($e){var Ae=$e.parent;G.problems.push({location:{offset:Ae.keyNode.offset,length:Ae.keyNode.length},severity:$t.Warning,message:F.errorMessage||"Property "+Be+" is not allowed."})}}if(Kn(F.maxProperties)&&E.properties.length>F.maxProperties&&G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:"Object has more properties than limit of "+F.maxProperties+"."}),Kn(F.minProperties)&&E.properties.length<F.minProperties&&G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:"Object has fewer properties than the required number of "+F.minProperties}),F.dependencies)for(var Rt=0,Ut=Object.keys(F.dependencies);Rt<Ut.length;Rt++){var me=Ut[Rt],sr=ne[me];if(sr){var on=F.dependencies[me];if(Array.isArray(on))for(var yr=0,gs=on;yr<gs.length;yr++){var Ll=gs[yr];ne[Ll]?G.propertiesValueMatches++:G.problems.push({location:{offset:E.offset,length:E.length},severity:$t.Warning,message:"Object is missing property "+Ll+" required by property {$key}."})}else{var et=kn(on);if(et){var gt=new Mn;pn(E,et,gt,te),G.mergePropertyMatch(gt)}}}}var ho=kn(F.propertyNames);if(ho)for(var Ui=0,Dl=E.properties;Ui<Dl.length;Ui++){var If=Dl[Ui],me=If.keyNode;me&&pn(me,ho,G,qc.instance)}}}function xg(t,r){var i=[],o=-1,s=t.getText(),p=fs(s,!1),y=r&&r.collectComments?[]:void 0;function A(){for(;;){var ze=p.scan();switch(G(),ze){case 12:case 13:Array.isArray(y)&&y.push(ur.create(t.positionAt(p.getTokenOffset()),t.positionAt(p.getTokenOffset()+p.getTokenLength())));break;case 15:case 14:break;default:return ze}}}function w(ze){return p.getToken()===ze?(A(),!0):!1}function E(ze,De,Ue,We,Je){if(Je===void 0&&(Je=$t.Error),i.length===0||Ue!==o){var et=ur.create(t.positionAt(Ue),t.positionAt(We));i.push(la.create(et,ze,Je,De,t.languageId)),o=Ue}}function F(ze,De,Ue,We,Je){Ue===void 0&&(Ue=null),We===void 0&&(We=[]),Je===void 0&&(Je=[]);var et=p.getTokenOffset(),$e=p.getTokenOffset()+p.getTokenLength();if(et===$e&&et>0){for(et--;et>0&&/\s/.test(s.charAt(et));)et--;$e=et+1}if(E(ze,De,et,$e),Ue&&te(Ue,!1),We.length+Je.length>0)for(var gt=p.getToken();gt!==17;){if(We.indexOf(gt)!==-1){A();break}else if(Je.indexOf(gt)!==-1)break;gt=A()}return Ue}function G(){switch(p.getTokenError()){case 4:return F("Invalid unicode sequence in string.",rr.InvalidUnicode),!0;case 5:return F("Invalid escape character in string.",rr.InvalidEscapeCharacter),!0;case 3:return F("Unexpected end of number.",rr.UnexpectedEndOfNumber),!0;case 1:return F("Unexpected end of comment.",rr.UnexpectedEndOfComment),!0;case 2:return F("Unexpected end of string.",rr.UnexpectedEndOfString),!0;case 6:return F("Invalid characters in string. Control characters must be escaped.",rr.InvalidCharacter),!0}return!1}function te(ze,De){return ze.length=p.getTokenOffset()+p.getTokenLength()-ze.offset,De&&A(),ze}function ne(ze){if(p.getToken()!==3)return null;var De=new pg(ze,p.getTokenOffset());A();for(var Ue=0,We=!1;p.getToken()!==4&&p.getToken()!==17;){if(p.getToken()===5){We||F("Value expected",rr.ValueExpected);var Je=p.getTokenOffset();if(A(),p.getToken()===4){We&&E("Trailing comma",rr.TrailingComma,Je,Je+1);continue}}else We&&F("Expected comma",rr.CommaExpected);var et=Te(De,Ue++);et?De.items.push(et):F("Value expected",rr.ValueExpected,null,[],[4,5]),We=!0}return p.getToken()!==4?F("Expected comma or closing bracket",rr.CommaOrCloseBacketExpected,De):te(De,!0)}function se(ze,De){var Ue=new vg(ze,p.getTokenOffset()),We=ge(Ue);if(!We)if(p.getToken()===16){F("Property keys must be doublequoted",rr.Undefined);var Je=new Bp(Ue,p.getTokenOffset(),p.getTokenLength());Je.value=p.getTokenValue(),We=Je,A()}else return null;Ue.keyNode=We;var et=De[We.value];if(et?(E("Duplicate object key",rr.DuplicateKey,Ue.keyNode.offset,Ue.keyNode.offset+Ue.keyNode.length,$t.Warning),typeof et=="object"&&E("DuplicateKeyWarning",rr.DuplicateKey,et.keyNode.offset,et.keyNode.offset+et.keyNode.length,$t.Warning),De[We.value]=!0):De[We.value]=Ue,p.getToken()===6)Ue.colonOffset=p.getTokenOffset(),A();else if(F("Colon expected",rr.ColonExpected),p.getToken()===10&&t.positionAt(We.offset+We.length).line<t.positionAt(p.getTokenOffset()).line)return Ue.length=We.length,Ue;var $e=Te(Ue,We.value);return $e?(Ue.valueNode=$e,Ue.length=$e.offset+$e.length-Ue.offset,Ue):F("Value expected",rr.ValueExpected,Ue,[],[2,5])}function ye(ze){if(p.getToken()!==1)return null;var De=new gg(ze,p.getTokenOffset()),Ue=Object.create(null);A();for(var We=!1;p.getToken()!==2&&p.getToken()!==17;){if(p.getToken()===5){We||F("Property expected",rr.PropertyExpected);var Je=p.getTokenOffset();if(A(),p.getToken()===2){We&&E("Trailing comma",rr.TrailingComma,Je,Je+1);continue}}else We&&F("Expected comma",rr.CommaExpected);var et=se(De,Ue);et?De.properties.push(et):F("Property expected",rr.PropertyExpected,null,[],[2,5]),We=!0}return p.getToken()!==2?F("Expected comma or closing brace",rr.CommaOrCloseBraceExpected,De):te(De,!0)}function ge(ze){if(p.getToken()!==10)return null;var De=new Bp(ze,p.getTokenOffset());return De.value=p.getTokenValue(),te(De,!0)}function Ae(ze){if(p.getToken()!==11)return null;var De=new hg(ze,p.getTokenOffset());if(p.getTokenError()===0){var Ue=p.getTokenValue();try{var We=JSON.parse(Ue);if(!Kn(We))return F("Invalid number format.",rr.Undefined,De);De.value=We}catch(Je){return F("Invalid number format.",rr.Undefined,De)}De.isInteger=Ue.indexOf(".")===-1}return te(De,!0)}function me(ze){var De;switch(p.getToken()){case 7:return te(new dg(ze,p.getTokenOffset()),!0);case 8:return te(new Np(ze,!0,p.getTokenOffset()),!0);case 9:return te(new Np(ze,!1,p.getTokenOffset()),!0);default:return null}}function Te(ze,De){return ne(ze)||ye(ze)||ge(ze)||Ae(ze)||me(ze)}var He=null,Be=A();return Be!==17&&(He=Te(null,null),He?p.getToken()!==17&&F("End of file expected.",rr.Undefined):F("Expected a JSON object, array or literal.",rr.Undefined)),new Vp(He,i,y)}function td(t,r,i){if(t!==null&&typeof t=="object"){var o=r+" ";if(Array.isArray(t)){if(t.length===0)return"[]";for(var s=`[
|
|
341
|
+
`,p=0;p<t.length;p++)s+=o+td(t[p],o,i),p<t.length-1&&(s+=","),s+=`
|
|
342
|
+
`;return s+=r+"]",s}else{var y=Object.keys(t);if(y.length===0)return"{}";for(var s=`{
|
|
343
|
+
`,p=0;p<y.length;p++){var A=y[p];s+=o+JSON.stringify(A)+": "+td(t[A],o,i),p<y.length-1&&(s+=","),s+=`
|
|
344
|
+
`}return s+=r+"}",s}}return i(t)}function bg(t,r){if(t.length<r.length)return!1;for(var i=0;i<r.length;i++)if(t[i]!==r[i])return!1;return!0}function rd(t,r){var i=t.length-r.length;return i>0?t.lastIndexOf(r)===i:i===0?t===r:!1}function wg(t){return t.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function Lm(t,r){for(var i="";r>0;)(r&1)==1&&(i+=t),t+=t,r=r>>>1;return i}var Sg=[",","}","]"],Ag=[":"],Eg=function(){function t(r,i,o,s){i===void 0&&(i=[]),o===void 0&&(o=Promise),s===void 0&&(s={}),this.schemaService=r,this.contributions=i,this.promiseConstructor=o,this.clientCapabilities=s,this.templateVarIdCounter=0}return t.prototype.doResolve=function(r){for(var i=this.contributions.length-1;i>=0;i--)if(this.contributions[i].resolveCompletion){var o=this.contributions[i].resolveCompletion(r);if(o)return o}return this.promiseConstructor.resolve(r)},t.prototype.doComplete=function(r,i,o){var s=this,p={items:[],isIncomplete:!1},y=r.getText(),A=r.offsetAt(i),w=o.getNodeFromOffset(A,!0);if(this.isInComment(r,w?w.offset:0,A))return Promise.resolve(p);if(w&&A===w.offset+w.length&&A>0){var E=y[A-1];(w.type==="object"&&E==="}"||w.type==="array"&&E==="]")&&(w=w.parent)}var F=this.getCurrentWord(r,A),G=null;if(w&&(w.type==="string"||w.type==="number"||w.type==="boolean"||w.type==="null"))G=ur.create(r.positionAt(w.offset),r.positionAt(w.offset+w.length));else{var te=A-F.length;te>0&&y[te-1]==='"'&&te--,G=ur.create(r.positionAt(te),i)}var ne=this.doesSupportsCommitCharacters(),se={},ye={add:function(ge){var Ae=se[ge.label];Ae?Ae.documentation||(Ae.documentation=ge.documentation):(se[ge.label]=ge,G&&(ge.textEdit=xi.replace(G,ge.insertText)),ne&&(ge.commitCharacters=ge.kind===Yn.Property?Ag:Sg),p.items.push(ge))},setAsIncomplete:function(){p.isIncomplete=!0},error:function(ge){console.error(ge)},log:function(ge){console.log(ge)},getNumberOfProposals:function(){return p.items.length}};return this.schemaService.getSchemaForResource(r.uri,o).then(function(ge){var Ae=[],me=!0,Te="",He=null;if(w&&w.type==="string"){var Be=w.parent;Be&&Be.type==="property"&&Be.keyNode===w&&(me=!Be.valueNode,He=Be,Te=y.substr(w.offset+1,w.length-2),Be&&(w=Be.parent))}if(w&&w.type==="object"){if(w.offset===A)return p;var ze=w.properties;ze.forEach(function(Je){(!He||He!==Je)&&(se[Je.keyNode.value]=Zc.create("__"))});var De="";me&&(De=s.evaluateSeparatorAfter(r,r.offsetAt(G.end))),ge?s.getPropertyCompletions(ge,o,w,me,De,ye):s.getSchemaLessPropertyCompletions(o,w,Te,ye);var Ue=ed(w);s.contributions.forEach(function(Je){var et=Je.collectPropertyCompletions(r.uri,Ue,F,me,De==="",ye);et&&Ae.push(et)}),!ge&&F.length>0&&y.charAt(A-F.length-1)!=='"'&&(ye.add({kind:Yn.Property,label:s.getLabelForValue(F),insertText:s.getInsertTextForProperty(F,null,!1,De),insertTextFormat:_r.Snippet,documentation:""}),ye.setAsIncomplete())}var We={};return ge?s.getValueCompletions(ge,o,w,A,r,ye,We):s.getSchemaLessValueCompletions(o,w,A,r,ye),s.contributions.length>0&&s.getContributedValueCompletions(o,w,A,r,ye,Ae),s.promiseConstructor.all(Ae).then(function(){if(ye.getNumberOfProposals()===0){var Je=A;w&&(w.type==="string"||w.type==="number"||w.type==="boolean"||w.type==="null")&&(Je=w.offset+w.length);var et=s.evaluateSeparatorAfter(r,Je);s.addFillerValueCompletions(We,et,ye)}return p})})},t.prototype.getPropertyCompletions=function(r,i,o,s,p,y){var A=this,w=i.getMatchingSchemas(r.schema,o.offset);w.forEach(function(E){if(E.node===o&&!E.inverted){var F=E.schema.properties;F&&Object.keys(F).forEach(function(G){var te=F[G],ne=!1;if(typeof te=="object"&&te.allOf)for(var se=0,ye=te.allOf;se<ye.length;se++){var ge=ye[se];if(ge.readOnly){ne=!0;break}}if(typeof te=="object"&&!te.deprecationMessage&&!te.doNotSuggest&&!ne){var Ae={kind:Yn.Property,label:A.sanitizeLabel(G),insertText:A.getInsertTextForProperty(G,te,s,p),insertTextFormat:_r.Snippet,filterText:A.getFilterTextForValue(G),documentation:A.fromMarkup(te.markdownDescription)||te.description||""};rd(Ae.insertText,"$1"+p)&&(Ae.command={title:"Suggest",command:"editor.action.triggerSuggest"}),y.add(Ae)}})}})},t.prototype.getSchemaLessPropertyCompletions=function(r,i,o,s){var p=this,y=function(w){w.properties.forEach(function(E){var F=E.keyNode.value;s.add({kind:Yn.Property,label:p.sanitizeLabel(F),insertText:p.getInsertTextForValue(F,""),insertTextFormat:_r.Snippet,filterText:p.getFilterTextForValue(F),documentation:""})})};if(i.parent)if(i.parent.type==="property"){var A=i.parent.keyNode.value;r.visit(function(w){return w.type==="property"&&w!==i.parent&&w.keyNode.value===A&&w.valueNode&&w.valueNode.type==="object"&&y(w.valueNode),!0})}else i.parent.type==="array"&&i.parent.items.forEach(function(w){w.type==="object"&&w!==i&&y(w)});else i.type==="object"&&s.add({kind:Yn.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",null,!0,""),insertTextFormat:_r.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})},t.prototype.getSchemaLessValueCompletions=function(r,i,o,s,p){var y=this,A=o;if(i&&(i.type==="string"||i.type==="number"||i.type==="boolean"||i.type==="null")&&(A=i.offset+i.length,i=i.parent),!i){p.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:_r.Snippet,documentation:""}),p.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:_r.Snippet,documentation:""});return}var w=this.evaluateSeparatorAfter(s,A),E=function(ne){jp(ne.parent,o,!0)||p.add({kind:y.getSuggestionKind(ne.type),label:y.getLabelTextForMatchingNode(ne,s),insertText:y.getInsertTextForMatchingNode(ne,s,w),insertTextFormat:_r.Snippet,documentation:""}),ne.type==="boolean"&&y.addBooleanValueCompletion(!ne.value,w,p)};if(i.type==="property"&&o>i.colonOffset){var F=i.valueNode;if(F&&(o>F.offset+F.length||F.type==="object"||F.type==="array"))return;var G=i.keyNode.value;r.visit(function(ne){return ne.type==="property"&&ne.keyNode.value===G&&ne.valueNode&&E(ne.valueNode),!0}),G==="$schema"&&i.parent&&!i.parent.parent&&this.addDollarSchemaCompletions(w,p)}if(i.type==="array")if(i.parent&&i.parent.type==="property"){var te=i.parent.keyNode.value;r.visit(function(ne){return ne.type==="property"&&ne.keyNode.value===te&&ne.valueNode&&ne.valueNode.type==="array"&&ne.valueNode.items.forEach(E),!0})}else i.items.forEach(E)},t.prototype.getValueCompletions=function(r,i,o,s,p,y,A){var w=this,E=s,F=null,G=null;if(o&&(o.type==="string"||o.type==="number"||o.type==="boolean"||o.type==="null")&&(E=o.offset+o.length,G=o,o=o.parent),!o){this.addSchemaValueCompletions(r.schema,"",y,A);return}if(o.type==="property"&&s>o.colonOffset){var te=o.valueNode;if(te&&s>te.offset+te.length)return;F=o.keyNode.value,o=o.parent}if(o&&(F!==null||o.type==="array")){var ne=this.evaluateSeparatorAfter(p,E),se=i.getMatchingSchemas(r.schema,o.offset,G);se.forEach(function(ye){if(ye.node===o&&!ye.inverted&&ye.schema){if(o.type==="array"&&ye.schema.items)if(Array.isArray(ye.schema.items)){var ge=w.findItemAtOffset(o,p,s);ge<ye.schema.items.length&&w.addSchemaValueCompletions(ye.schema.items[ge],ne,y,A)}else w.addSchemaValueCompletions(ye.schema.items,ne,y,A);if(ye.schema.properties){var Ae=ye.schema.properties[F];Ae&&w.addSchemaValueCompletions(Ae,ne,y,A)}}}),F==="$schema"&&!o.parent&&this.addDollarSchemaCompletions(ne,y),A.boolean&&(this.addBooleanValueCompletion(!0,ne,y),this.addBooleanValueCompletion(!1,ne,y)),A.null&&this.addNullValueCompletion(ne,y)}},t.prototype.getContributedValueCompletions=function(r,i,o,s,p,y){if(!i)this.contributions.forEach(function(F){var G=F.collectDefaultCompletions(s.uri,p);G&&y.push(G)});else if((i.type==="string"||i.type==="number"||i.type==="boolean"||i.type==="null")&&(i=i.parent),i.type==="property"&&o>i.colonOffset){var A=i.keyNode.value,w=i.valueNode;if(!w||o<=w.offset+w.length){var E=ed(i.parent);this.contributions.forEach(function(F){var G=F.collectValueCompletions(s.uri,E,A,p);G&&y.push(G)})}}},t.prototype.addSchemaValueCompletions=function(r,i,o,s){var p=this;typeof r=="object"&&(this.addEnumValueCompletions(r,i,o),this.addDefaultValueCompletions(r,i,o),this.collectTypes(r,s),Array.isArray(r.allOf)&&r.allOf.forEach(function(y){return p.addSchemaValueCompletions(y,i,o,s)}),Array.isArray(r.anyOf)&&r.anyOf.forEach(function(y){return p.addSchemaValueCompletions(y,i,o,s)}),Array.isArray(r.oneOf)&&r.oneOf.forEach(function(y){return p.addSchemaValueCompletions(y,i,o,s)}))},t.prototype.addDefaultValueCompletions=function(r,i,o,s){var p=this;s===void 0&&(s=0);var y=!1;if(sa(r.default)){for(var A=r.type,w=r.default,E=s;E>0;E--)w=[w],A="array";o.add({kind:this.getSuggestionKind(A),label:this.getLabelForValue(w),insertText:this.getInsertTextForValue(w,i),insertTextFormat:_r.Snippet}),y=!0}Array.isArray(r.examples)&&r.examples.forEach(function(F){for(var G=r.type,te=F,ne=s;ne>0;ne--)te=[te],G="array";o.add({kind:p.getSuggestionKind(G),label:p.getLabelForValue(te),insertText:p.getInsertTextForValue(te,i),insertTextFormat:_r.Snippet}),y=!0}),Array.isArray(r.defaultSnippets)&&r.defaultSnippets.forEach(function(F){var G=r.type,te=F.body,ne=F.label,se,ye;if(sa(te)){for(var ge=r.type,Ae=s;Ae>0;Ae--)te=[te],ge="array";se=p.getInsertTextForSnippetValue(te,i),ye=p.getFilterTextForSnippetValue(te),ne=ne||p.getLabelForSnippetValue(te)}else if(typeof F.bodyText=="string"){for(var me="",Te="",He="",Ae=s;Ae>0;Ae--)me=me+He+`[
|
|
345
345
|
`,Te=Te+`
|
|
346
346
|
`+He+"]",He+=" ",G="array";se=me+He+F.bodyText.split(`
|
|
347
347
|
`).join(`
|
|
348
|
-
`+He)+Te+i,ne=ne||p.sanitizeLabel(se),ye=se.replace(/[\n]/g,"")}o.add({kind:p.getSuggestionKind(G),label:ne,documentation:p.fromMarkup(F.markdownDescription)||F.description,insertText:se,insertTextFormat:_r.Snippet,filterText:ye}),y=!0}),!y&&typeof
|
|
349
|
-
\r\v":{[,]}`.indexOf(s.charAt(o))===-1;)o--;return s.substring(o+1,i)},
|
|
348
|
+
`+He)+Te+i,ne=ne||p.sanitizeLabel(se),ye=se.replace(/[\n]/g,"")}o.add({kind:p.getSuggestionKind(G),label:ne,documentation:p.fromMarkup(F.markdownDescription)||F.description,insertText:se,insertTextFormat:_r.Snippet,filterText:ye}),y=!0}),!y&&typeof r.items=="object"&&!Array.isArray(r.items)&&this.addDefaultValueCompletions(r.items,i,o,s+1)},t.prototype.addEnumValueCompletions=function(r,i,o){if(sa(r.const)&&o.add({kind:this.getSuggestionKind(r.type),label:this.getLabelForValue(r.const),insertText:this.getInsertTextForValue(r.const,i),insertTextFormat:_r.Snippet,documentation:this.fromMarkup(r.markdownDescription)||r.description}),Array.isArray(r.enum))for(var s=0,p=r.enum.length;s<p;s++){var y=r.enum[s],A=this.fromMarkup(r.markdownDescription)||r.description;r.markdownEnumDescriptions&&s<r.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?A=this.fromMarkup(r.markdownEnumDescriptions[s]):r.enumDescriptions&&s<r.enumDescriptions.length&&(A=r.enumDescriptions[s]),o.add({kind:this.getSuggestionKind(r.type),label:this.getLabelForValue(y),insertText:this.getInsertTextForValue(y,i),insertTextFormat:_r.Snippet,documentation:A})}},t.prototype.collectTypes=function(r,i){if(!(Array.isArray(r.enum)||sa(r.const))){var o=r.type;Array.isArray(o)?o.forEach(function(s){return i[s]=!0}):i[o]=!0}},t.prototype.addFillerValueCompletions=function(r,i,o){r.object&&o.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},i),insertTextFormat:_r.Snippet,detail:"New object",documentation:""}),r.array&&o.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],i),insertTextFormat:_r.Snippet,detail:"New array",documentation:""})},t.prototype.addBooleanValueCompletion=function(r,i,o){o.add({kind:this.getSuggestionKind("boolean"),label:r?"true":"false",insertText:this.getInsertTextForValue(r,i),insertTextFormat:_r.Snippet,documentation:""})},t.prototype.addNullValueCompletion=function(r,i){i.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+r,insertTextFormat:_r.Snippet,documentation:""})},t.prototype.addDollarSchemaCompletions=function(r,i){var o=this,s=this.schemaService.getRegisteredSchemaIds(function(p){return p==="http"||p==="https"});s.forEach(function(p){return i.add({kind:Yn.Module,label:o.getLabelForValue(p),filterText:o.getFilterTextForValue(p),insertText:o.getInsertTextForValue(p,r),insertTextFormat:_r.Snippet,documentation:""})})},t.prototype.sanitizeLabel=function(r){return r=r.replace(/[\n]/g,"\u21B5"),r.length>57&&(r=r.substr(0,57).trim()+"..."),r},t.prototype.getLabelForValue=function(r){return this.sanitizeLabel(JSON.stringify(r))},t.prototype.getFilterTextForValue=function(r){return JSON.stringify(r)},t.prototype.getFilterTextForSnippetValue=function(r){return JSON.stringify(r).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")},t.prototype.getLabelForSnippetValue=function(r){var i=JSON.stringify(r);return i=i.replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1"),this.sanitizeLabel(i)},t.prototype.getInsertTextForPlainText=function(r){return r.replace(/[\\\$\}]/g,"\\$&")},t.prototype.getInsertTextForValue=function(r,i){var o=JSON.stringify(r,null," ");return o==="{}"?"{$1}"+i:o==="[]"?"[$1]"+i:this.getInsertTextForPlainText(o+i)},t.prototype.getInsertTextForSnippetValue=function(r,i){var o=function(s){return typeof s=="string"&&s[0]==="^"?s.substr(1):JSON.stringify(s)};return td(r,"",o)+i},t.prototype.getInsertTextForGuessedValue=function(r,i){switch(typeof r){case"object":return r===null?"${1:null}"+i:this.getInsertTextForValue(r,i);case"string":var o=JSON.stringify(r);return o=o.substr(1,o.length-2),o=this.getInsertTextForPlainText(o),'"${1:'+o+'}"'+i;case"number":case"boolean":return"${1:"+JSON.stringify(r)+"}"+i}return this.getInsertTextForValue(r,i)},t.prototype.getSuggestionKind=function(r){if(Array.isArray(r)){var i=r;r=i.length>0?i[0]:null}if(!r)return Yn.Value;switch(r){case"string":return Yn.Value;case"object":return Yn.Module;case"property":return Yn.Property;default:return Yn.Value}},t.prototype.getLabelTextForMatchingNode=function(r,i){switch(r.type){case"array":return"[]";case"object":return"{}";default:var o=i.getText().substr(r.offset,r.length);return o}},t.prototype.getInsertTextForMatchingNode=function(r,i,o){switch(r.type){case"array":return this.getInsertTextForValue([],o);case"object":return this.getInsertTextForValue({},o);default:var s=i.getText().substr(r.offset,r.length)+o;return this.getInsertTextForPlainText(s)}},t.prototype.getInsertTextForProperty=function(r,i,o,s){var p=this.getInsertTextForValue(r,"");if(!o)return p;var y=p+": ",A,w=0;if(i){if(Array.isArray(i.defaultSnippets)){if(i.defaultSnippets.length===1){var E=i.defaultSnippets[0].body;sa(E)&&(A=this.getInsertTextForSnippetValue(E,""))}w+=i.defaultSnippets.length}if(i.enum&&(!A&&i.enum.length===1&&(A=this.getInsertTextForGuessedValue(i.enum[0],"")),w+=i.enum.length),sa(i.default)&&(A||(A=this.getInsertTextForGuessedValue(i.default,"")),w++),w===0){var F=Array.isArray(i.type)?i.type[0]:i.type;switch(F||(i.properties?F="object":i.items&&(F="array")),F){case"boolean":A="$1";break;case"string":A='"$1"';break;case"object":A="{$1}";break;case"array":A="[$1]";break;case"number":case"integer":A="${1:0}";break;case"null":A="${1:null}";break;default:return p}}}return(!A||w>1)&&(A="$1"),y+A+s},t.prototype.getCurrentWord=function(r,i){for(var o=i-1,s=r.getText();o>=0&&`
|
|
349
|
+
\r\v":{[,]}`.indexOf(s.charAt(o))===-1;)o--;return s.substring(o+1,i)},t.prototype.evaluateSeparatorAfter=function(r,i){var o=fs(r.getText(),!0);o.setPosition(i);var s=o.scan();switch(s){case 5:case 2:case 4:case 17:return"";default:return","}},t.prototype.findItemAtOffset=function(r,i,o){for(var s=fs(i.getText(),!0),p=r.items,y=p.length-1;y>=0;y--){var A=p[y];if(o>A.offset+A.length){s.setPosition(A.offset+A.length);var w=s.scan();return w===5&&o>=s.getTokenOffset()+s.getTokenLength()?y+1:y}else if(o>=A.offset)return y}return 0},t.prototype.isInComment=function(r,i,o){var s=fs(r.getText(),!1);s.setPosition(i);for(var p=s.scan();p!==17&&s.getTokenOffset()+s.getTokenLength()<o;)p=s.scan();return(p===12||p===13)&&s.getTokenOffset()<=o},t.prototype.fromMarkup=function(r){if(r&&this.doesSupportMarkdown())return{kind:ua.Markdown,value:r}},t.prototype.doesSupportMarkdown=function(){if(!sa(this.supportsMarkdown)){var r=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsMarkdown=r&&r.completionItem&&Array.isArray(r.completionItem.documentationFormat)&&r.completionItem.documentationFormat.indexOf(ua.Markdown)!==-1}return this.supportsMarkdown},t.prototype.doesSupportsCommitCharacters=function(){if(!sa(this.supportsCommitCharacters)){var r=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsCommitCharacters=r&&r.completionItem&&!!r.completionItem.commitCharactersSupport}return this.supportsCommitCharacters},t}(),Cg=function(){function t(r,i,o){i===void 0&&(i=[]),this.schemaService=r,this.contributions=i,this.promise=o||Promise}return t.prototype.doHover=function(r,i,o){var s=r.offsetAt(i),p=o.getNodeFromOffset(s);if(!p||(p.type==="object"||p.type==="array")&&s>p.offset+1&&s<p.offset+p.length-1)return this.promise.resolve(null);var y=p;if(p.type==="string"){var A=p.parent;if(A&&A.type==="property"&&A.keyNode===p&&(p=A.valueNode,!p))return this.promise.resolve(null)}for(var w=ur.create(r.positionAt(y.offset),r.positionAt(y.offset+y.length)),E=function(se){var ye={contents:se,range:w};return ye},F=ed(p),G=this.contributions.length-1;G>=0;G--){var te=this.contributions[G],ne=te.getInfoContribution(r.uri,F);if(ne)return ne.then(function(se){return E(se)})}return this.schemaService.getSchemaForResource(r.uri,o).then(function(se){if(se){var ye=o.getMatchingSchemas(se.schema,p.offset),ge=null,Ae=null,me=null,Te=null;ye.every(function(Be){if(Be.node===p&&!Be.inverted&&Be.schema&&(ge=ge||Be.schema.title,Ae=Ae||Be.schema.markdownDescription||nd(Be.schema.description),Be.schema.enum)){var ze=Be.schema.enum.indexOf(Ta(p));Be.schema.markdownEnumDescriptions?me=Be.schema.markdownEnumDescriptions[ze]:Be.schema.enumDescriptions&&(me=nd(Be.schema.enumDescriptions[ze])),me&&(Te=Be.schema.enum[ze],typeof Te!="string"&&(Te=JSON.stringify(Te)))}return!0});var He="";return ge&&(He=nd(ge)),Ae&&(He.length>0&&(He+=`
|
|
350
350
|
|
|
351
351
|
`),He+=Ae),me&&(He.length>0&&(He+=`
|
|
352
352
|
|
|
353
|
-
`),He+="`"+Og(Te)+"`: "+me),E([He])}return null})},
|
|
353
|
+
`),He+="`"+Og(Te)+"`: "+me),E([He])}return null})},t}();function nd(t){if(t){var r=t.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1
|
|
354
354
|
|
|
355
|
-
$3`);return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function Og(r){return r.indexOf("`")!==-1?"`` "+r+" ``":r}var Tg=function(){var r=function(t,i){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,s){o.__proto__=s}||function(o,s){for(var p in s)s.hasOwnProperty(p)&&(o[p]=s[p])},r(t,i)};return function(t,i){r(t,i);function o(){this.constructor=t}t.prototype=i===null?Object.create(i):(o.prototype=i.prototype,new o)}}(),Hr,Ml;if(typeof process=="object")Ml=!1;else if(typeof navigator=="object"){var Pg=navigator.userAgent;Ml=Pg.indexOf("Windows")>=0}function Dm(r){return 55296<=r&&r<=56319}function Nm(r){return 56320<=r&&r<=57343}function Bm(r){return r>=97&&r<=102}function Ig(r){return r>=97&&r<=122}function Fg(r){return r>=65&&r<=90}function Um(r){return Ig(r)||Fg(r)}var kg=/^\w[\w\d+.-]*$/,Mg=/^\//,Rg=/^\/\//;function Lg(r,t){if(!r.scheme&&t)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+r.authority+'", path: "'+r.path+'", query: "'+r.query+'", fragment: "'+r.fragment+'"}');if(r.scheme&&!kg.test(r.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(r.path){if(r.authority){if(!Mg.test(r.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(Rg.test(r.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function Dg(r,t){return!r&&!t?"file":r}function Ng(r,t){switch(r){case"https":case"http":case"file":t?t[0]!==bi&&(t=bi+t):t=bi;break}return t}var gr="",bi="/",Bg=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,id=function(){function r(t,i,o,s,p,y){y===void 0&&(y=!1),typeof t=="object"?(this.scheme=t.scheme||gr,this.authority=t.authority||gr,this.path=t.path||gr,this.query=t.query||gr,this.fragment=t.fragment||gr):(this.scheme=Dg(t,y),this.authority=i||gr,this.path=Ng(this.scheme,o||gr),this.query=s||gr,this.fragment=p||gr,Lg(this,y))}return r.isUri=function(t){return t instanceof r?!0:t?typeof t.authority=="string"&&typeof t.fragment=="string"&&typeof t.path=="string"&&typeof t.query=="string"&&typeof t.scheme=="string"&&typeof t.fsPath=="function"&&typeof t.with=="function"&&typeof t.toString=="function":!1},Object.defineProperty(r.prototype,"fsPath",{get:function(){return Gp(this,!1)},enumerable:!0,configurable:!0}),r.prototype.with=function(t){if(!t)return this;var i=t.scheme,o=t.authority,s=t.path,p=t.query,y=t.fragment;return i===void 0?i=this.scheme:i===null&&(i=gr),o===void 0?o=this.authority:o===null&&(o=gr),s===void 0?s=this.path:s===null&&(s=gr),p===void 0?p=this.query:p===null&&(p=gr),y===void 0?y=this.fragment:y===null&&(y=gr),i===this.scheme&&o===this.authority&&s===this.path&&p===this.query&&y===this.fragment?this:new ds(i,o,s,p,y)},r.parse=function(t,i){i===void 0&&(i=!1);var o=Bg.exec(t);return o?new ds(o[2]||gr,Ef(o[4]||gr),Ef(o[5]||gr),Ef(o[7]||gr),Ef(o[9]||gr),i):new ds(gr,gr,gr,gr,gr)},r.file=function(t){var i=gr;if(Ml&&(t=t.replace(/\\/g,bi)),t[0]===bi&&t[1]===bi){var o=t.indexOf(bi,2);o===-1?(i=t.substring(2),t=bi):(i=t.substring(2,o),t=t.substring(o)||bi)}return new ds("file",i,t,gr,gr)},r.from=function(t){return new ds(t.scheme,t.authority,t.path,t.query,t.fragment)},r.prototype.toString=function(t){return t===void 0&&(t=!1),ad(this,t)},r.prototype.toJSON=function(){return this},r.revive=function(t){if(t){if(t instanceof r)return t;var i=new ds(t);return i._formatted=t.external,i._fsPath=t._sep===Wp?t.fsPath:null,i}else return t},r}(),Wp=Ml?1:void 0,ds=function(r){Tg(t,r);function t(){var i=r!==null&&r.apply(this,arguments)||this;return i._formatted=null,i._fsPath=null,i}return Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=Gp(this,!1)),this._fsPath},enumerable:!0,configurable:!0}),t.prototype.toString=function(i){return i===void 0&&(i=!1),i?ad(this,!0):(this._formatted||(this._formatted=ad(this,!1)),this._formatted)},t.prototype.toJSON=function(){var i={$mid:1};return this._fsPath&&(i.fsPath=this._fsPath,i._sep=Wp),this._formatted&&(i.external=this._formatted),this.path&&(i.path=this.path),this.scheme&&(i.scheme=this.scheme),this.authority&&(i.authority=this.authority),this.query&&(i.query=this.query),this.fragment&&(i.fragment=this.fragment),i},t}(id),Hp=(Hr={},Hr[58]="%3A",Hr[47]="%2F",Hr[63]="%3F",Hr[35]="%23",Hr[91]="%5B",Hr[93]="%5D",Hr[64]="%40",Hr[33]="%21",Hr[36]="%24",Hr[38]="%26",Hr[39]="%27",Hr[40]="%28",Hr[41]="%29",Hr[42]="%2A",Hr[43]="%2B",Hr[44]="%2C",Hr[59]="%3B",Hr[61]="%3D",Hr[32]="%20",Hr);function zp(r,t){for(var i=void 0,o=-1,s=0;s<r.length;s++){var p=r.charCodeAt(s);if(p>=97&&p<=122||p>=65&&p<=90||p>=48&&p<=57||p===45||p===46||p===95||p===126||t&&p===47)o!==-1&&(i+=encodeURIComponent(r.substring(o,s)),o=-1),i!==void 0&&(i+=r.charAt(s));else{i===void 0&&(i=r.substr(0,s));var y=Hp[p];y!==void 0?(o!==-1&&(i+=encodeURIComponent(r.substring(o,s)),o=-1),i+=y):o===-1&&(o=s)}}return o!==-1&&(i+=encodeURIComponent(r.substring(o))),i!==void 0?i:r}function Ug(r){for(var t=void 0,i=0;i<r.length;i++){var o=r.charCodeAt(i);o===35||o===63?(t===void 0&&(t=r.substr(0,i)),t+=Hp[o]):t!==void 0&&(t+=r[i])}return t!==void 0?t:r}function Gp(r,t){var i;return r.authority&&r.path.length>1&&r.scheme==="file"?i="//"+r.authority+r.path:r.path.charCodeAt(0)===47&&(r.path.charCodeAt(1)>=65&&r.path.charCodeAt(1)<=90||r.path.charCodeAt(1)>=97&&r.path.charCodeAt(1)<=122)&&r.path.charCodeAt(2)===58?t?i=r.path.substr(1):i=r.path[1].toLowerCase()+r.path.substr(2):i=r.path,Ml&&(i=i.replace(/\//g,"\\")),i}function ad(r,t){var i=t?Ug:zp,o="",s=r.scheme,p=r.authority,y=r.path,A=r.query,w=r.fragment;if(s&&(o+=s,o+=":"),(p||s==="file")&&(o+=bi,o+=bi),p){var E=p.indexOf("@");if(E!==-1){var F=p.substr(0,E);p=p.substr(E+1),E=F.indexOf(":"),E===-1?o+=i(F,!1):(o+=i(F.substr(0,E),!1),o+=":",o+=i(F.substr(E+1),!1)),o+="@"}p=p.toLowerCase(),E=p.indexOf(":"),E===-1?o+=i(p,!1):(o+=i(p.substr(0,E),!1),o+=p.substr(E))}if(y){if(y.length>=3&&y.charCodeAt(0)===47&&y.charCodeAt(2)===58){var G=y.charCodeAt(1);G>=65&&G<=90&&(y="/"+String.fromCharCode(G+32)+":"+y.substr(3))}else if(y.length>=2&&y.charCodeAt(1)===58){var G=y.charCodeAt(0);G>=65&&G<=90&&(y=String.fromCharCode(G+32)+":"+y.substr(2))}o+=i(y,!0)}return A&&(o+="?",o+=i(A,!1)),w&&(o+="#",o+=t?w:zp(w,!1)),o}function $p(r){try{return decodeURIComponent(r)}catch(t){return r.length>3?r.substr(0,3)+$p(r.substr(3)):r}}var Kp=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Ef(r){return r.match(Kp)?r.replace(Kp,function(t){return $p(t)}):r}var jg=function(){function r(t){try{this.patternRegExp=new RegExp(wg(t)+"$")}catch(i){this.patternRegExp=null}this.schemas=[]}return r.prototype.addSchema=function(t){this.schemas.push(t)},r.prototype.matchesPattern=function(t){return this.patternRegExp&&this.patternRegExp.test(t)},r.prototype.getSchemas=function(){return this.schemas},r}(),Vg=function(){function r(t,i,o){this.service=t,this.url=i,this.dependencies={},o&&(this.unresolvedSchema=this.service.promise.resolve(new ps(o)))}return r.prototype.getUnresolvedSchema=function(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.url)),this.unresolvedSchema},r.prototype.getResolvedSchema=function(){var t=this;return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(function(i){return t.service.resolveSchemaContent(i,t.url,t.dependencies)})),this.resolvedSchema},r.prototype.clearSchema=function(){this.resolvedSchema=null,this.unresolvedSchema=null,this.dependencies={}},r}(),ps=function(){function r(t,i){i===void 0&&(i=[]),this.schema=t,this.errors=i}return r}(),Yp=function(){function r(t,i){i===void 0&&(i=[]),this.schema=t,this.errors=i}return r.prototype.getSection=function(t){return kn(this.getSectionRecursive(t,this.schema))},r.prototype.getSectionRecursive=function(t,i){if(!i||typeof i=="boolean"||t.length===0)return i;var o=t.shift();if(i.properties&&typeof i.properties[o])return this.getSectionRecursive(t,i.properties[o]);if(i.patternProperties)for(var s=0,p=Object.keys(i.patternProperties);s<p.length;s++){var y=p[s],A=new RegExp(y);if(A.test(o))return this.getSectionRecursive(t,i.patternProperties[y])}else{if(typeof i.additionalProperties=="object")return this.getSectionRecursive(t,i.additionalProperties);if(o.match("[0-9]+")){if(Array.isArray(i.items)){var w=parseInt(o,10);if(!isNaN(w)&&i.items[w])return this.getSectionRecursive(t,i.items[w])}else if(i.items)return this.getSectionRecursive(t,i.items)}}return null},r}(),Wg=function(){function r(t,i,o){this.contextService=i,this.requestService=t,this.promiseConstructor=o||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations={},this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={}}return r.prototype.getRegisteredSchemaIds=function(t){return Object.keys(this.registeredSchemasIds).filter(function(i){var o=id.parse(i).scheme;return o!=="schemaservice"&&(!t||t(o))})},Object.defineProperty(r.prototype,"promise",{get:function(){return this.promiseConstructor},enumerable:!0,configurable:!0}),r.prototype.dispose=function(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()},r.prototype.onResourceChange=function(t){var i=this,o=!1;t=this.normalizeId(t);for(var s=[t],p=Object.keys(this.schemasById).map(function(E){return i.schemasById[E]});s.length;)for(var y=s.pop(),A=0;A<p.length;A++){var w=p[A];w&&(w.url===y||w.dependencies[y])&&(w.url!==y&&s.push(w.url),w.clearSchema(),p[A]=void 0,o=!0)}return o},r.prototype.normalizeId=function(t){try{return id.parse(t).toString()}catch(i){return t}},r.prototype.setSchemaContributions=function(t){if(t.schemas){var i=t.schemas;for(var o in i){var s=this.normalizeId(o);this.contributionSchemas[s]=this.addSchemaHandle(s,i[o])}}if(t.schemaAssociations){var p=t.schemaAssociations;for(var y in p){var A=p[y];this.contributionAssociations[y]=A;for(var w=this.getOrAddFilePatternAssociation(y),E=0,F=A;E<F.length;E++){var G=F[E],o=this.normalizeId(G);w.addSchema(o)}}}},r.prototype.addSchemaHandle=function(t,i){var o=new Vg(this,t,i);return this.schemasById[t]=o,o},r.prototype.getOrAddSchemaHandle=function(t,i){return this.schemasById[t]||this.addSchemaHandle(t,i)},r.prototype.getOrAddFilePatternAssociation=function(t){var i=this.filePatternAssociationById[t];return i||(i=new jg(t),this.filePatternAssociationById[t]=i,this.filePatternAssociations.push(i)),i},r.prototype.registerExternalSchema=function(t,i,o){i===void 0&&(i=null);var s=this.normalizeId(t);if(this.registeredSchemasIds[s]=!0,i)for(var p=0,y=i;p<y.length;p++){var A=y[p];this.getOrAddFilePatternAssociation(A).addSchema(s)}return o?this.addSchemaHandle(s,o):this.getOrAddSchemaHandle(s)},r.prototype.clearExternalSchemas=function(){this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={};for(var t in this.contributionSchemas)this.schemasById[t]=this.contributionSchemas[t],this.registeredSchemasIds[t]=!0;for(var i in this.contributionAssociations)for(var o=this.getOrAddFilePatternAssociation(i),s=0,p=this.contributionAssociations[i];s<p.length;s++){var y=p[s],t=this.normalizeId(y);o.addSchema(t)}},r.prototype.getResolvedSchema=function(t){var i=this.normalizeId(t),o=this.schemasById[i];return o?o.getResolvedSchema():this.promise.resolve(null)},r.prototype.loadSchema=function(t){if(!this.requestService){var i="Unable to load schema from '"+Cf(t)+"'. No schema request service available";return this.promise.resolve(new ps({},[i]))}return this.requestService(t).then(function(o){if(!o){var s="Unable to load schema from '"+Cf(t)+"': No content.";return new ps({},[s])}var p={},y=[];p=ng(o,y);var A=y.length?["Unable to parse content from '"+Cf(t)+"': Parse error at offset "+y[0].offset]:[];return new ps(p,A)},function(o){var s="Unable to load schema from '"+Cf(t)+"': "+o.toString();return new ps({},[s])})},r.prototype.resolveSchemaContent=function(t,i,o){var s=this,p=t.errors.slice(0),y=t.schema;if(y.$schema){var A=this.normalizeId(y.$schema);if(A==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new Yp({},["Draft-03 schemas are not supported."]));A==="https://json-schema.org/draft/2019-09/schema"&&t.errors.push("Draft 2019-09 schemas are not yet fully supported.")}var w=this.contextService,E=function(ne,se){if(!se)return ne;var ye=ne;return se[0]==="/"&&(se=se.substr(1)),se.split("/").some(function(ge){return ye=ye[ge],!ye}),ye},F=function(ne,se,ye,ge){var Ae=E(se,ge);if(Ae)for(var me in Ae)Ae.hasOwnProperty(me)&&!ne.hasOwnProperty(me)&&(ne[me]=Ae[me]);else p.push("$ref '"+ge+"' in '"+ye+"' can not be resolved.")},G=function(ne,se,ye,ge,Ae){w&&!/^\w+:\/\/.*/.test(se)&&(se=w.resolveRelativePath(se,ge)),se=s.normalizeId(se);var me=s.getOrAddSchemaHandle(se);return me.getUnresolvedSchema().then(function(Te){if(Ae[se]=!0,Te.errors.length){var He=ye?se+"#"+ye:se;p.push("Problems loading reference '"+He+"': "+Te.errors[0]+".")}return F(ne,Te.schema,se,ye),te(ne,Te.schema,se,me.dependencies)})},te=function(ne,se,ye,ge){if(!ne||typeof ne!="object")return Promise.resolve(null);for(var Ae=[ne],me=[],Te=[],He=function(){for(var We=[],Je=0;Je<arguments.length;Je++)We[Je]=arguments[Je];for(var et=0,$e=We;et<$e.length;et++){var gt=$e[et];typeof gt=="object"&&Ae.push(gt)}},Be=function(){for(var We=[],Je=0;Je<arguments.length;Je++)We[Je]=arguments[Je];for(var et=0,$e=We;et<$e.length;et++){var gt=$e[et];if(typeof gt=="object")for(var Nt in gt){var zt=gt[Nt];typeof zt=="object"&&Ae.push(zt)}}},ze=function(){for(var We=[],Je=0;Je<arguments.length;Je++)We[Je]=arguments[Je];for(var et=0,$e=We;et<$e.length;et++){var gt=$e[et];if(Array.isArray(gt))for(var Nt=0,zt=gt;Nt<zt.length;Nt++){var or=zt[Nt];typeof or=="object"&&Ae.push(or)}}},De=function(We){for(var Je=[];We.$ref;){var et=We.$ref,$e=et.split("#",2);if(delete We.$ref,$e[0].length>0){Te.push(G(We,$e[0],$e[1],ye,ge));return}else Je.indexOf(et)===-1&&(F(We,se,ye,$e[1]),Je.push(et))}He(We.items,We.additionalProperties,We.not,We.contains,We.propertyNames,We.if,We.then,We.else),Be(We.definitions,We.properties,We.patternProperties,We.dependencies),ze(We.anyOf,We.allOf,We.oneOf,We.items)};Ae.length;){var Ue=Ae.pop();me.indexOf(Ue)>=0||(me.push(Ue),De(Ue))}return s.promise.all(Te)};return te(y,y,i,o).then(function(ne){return new Yp(y,p)})},r.prototype.getSchemaForResource=function(t,i){if(i&&i.root&&i.root.type==="object"){var o=i.root.properties.filter(function(se){return se.keyNode.value==="$schema"&&se.valueNode&&se.valueNode.type==="string"});if(o.length>0){var s=Ta(o[0].valueNode);if(s&&bg(s,".")&&this.contextService&&(s=this.contextService.resolveRelativePath(s,t)),s){var p=this.normalizeId(s);return this.getOrAddSchemaHandle(p).getResolvedSchema()}}}for(var y=Object.create(null),A=[],w=0,E=this.filePatternAssociations;w<E.length;w++){var F=E[w];if(F.matchesPattern(t))for(var G=0,te=F.getSchemas();G<te.length;G++){var ne=te[G];y[ne]||(A.push(ne),y[ne]=!0)}}return A.length>0?this.createCombinedSchema(t,A).getResolvedSchema():this.promise.resolve(null)},r.prototype.createCombinedSchema=function(t,i){if(i.length===1)return this.getOrAddSchemaHandle(i[0]);var o="schemaservice://combinedSchema/"+encodeURIComponent(t),s={allOf:i.map(function(p){return{$ref:p}})};return this.addSchemaHandle(o,s)},r}();function Cf(r){try{}catch(t){}return r}var Hg=function(){function r(t,i){this.jsonSchemaService=t,this.promise=i,this.validationEnabled=!0}return r.prototype.configure=function(t){t&&(this.validationEnabled=t.validate,this.commentSeverity=t.allowComments?void 0:$t.Error)},r.prototype.doValidation=function(t,i,o,s){var p=this;if(!this.validationEnabled)return this.promise.resolve([]);var y=[],A={},w=function(G){var te=G.range.start.line+" "+G.range.start.character+" "+G.message;A[te]||(A[te]=!0,y.push(G))},E=function(G){var te=o?Qp(o.trailingCommas):$t.Error,ne=o?Qp(o.comments):p.commentSeverity;if(G){if(G.errors.length&&i.root){var se=i.root,ye=se.type==="object"?se.properties[0]:null;if(ye&&ye.keyNode.value==="$schema"){var ge=ye.valueNode||ye,Ae=ur.create(t.positionAt(ge.offset),t.positionAt(ge.offset+ge.length));w(la.create(Ae,G.errors[0],$t.Warning,rr.SchemaResolveError))}else{var Ae=ur.create(t.positionAt(se.offset),t.positionAt(se.offset+1));w(la.create(Ae,G.errors[0],$t.Warning,rr.SchemaResolveError))}}else{var me=i.validate(t,G.schema);me&&me.forEach(w)}Jp(G.schema)&&(ne=void 0),Xp(G.schema)&&(te=void 0)}for(var Te=0,He=i.syntaxErrors;Te<He.length;Te++){var Be=He[Te];if(Be.code===rr.TrailingComma){if(typeof te!="number")continue;Be.severity=te}w(Be)}if(typeof ne=="number"){var ze="Comments are not permitted in JSON.";i.comments.forEach(function(De){w(la.create(De,ze,ne,rr.CommentNotPermitted))})}return y};if(s){var F=s.id||"schemaservice://untitled/"+zg++;return this.jsonSchemaService.resolveSchemaContent(new ps(s),F,{}).then(function(G){return E(G)})}return this.jsonSchemaService.getSchemaForResource(t.uri,i).then(function(G){return E(G)})},r}(),zg=0;function Jp(r){if(r&&typeof r=="object"){if(Ni(r.allowComments))return r.allowComments;if(r.allOf)for(var t=0,i=r.allOf;t<i.length;t++){var o=i[t],s=Jp(o);if(Ni(s))return s}}}function Xp(r){if(r&&typeof r=="object"){if(Ni(r.allowTrailingCommas))return r.allowTrailingCommas;if(Ni(r.allowsTrailingCommas))return r.allowsTrailingCommas;if(r.allOf)for(var t=0,i=r.allOf;t<i.length;t++){var o=i[t],s=Xp(o);if(Ni(s))return s}}}function Qp(r){switch(r){case"error":return $t.Error;case"warning":return $t.Warning;case"ignore":return}}var Zp=48,Gg=57,$g=65,Of=97,Kg=102;function zr(r){return r<Zp?0:r<=Gg?r-Zp:(r<Of&&(r+=Of-$g),r>=Of&&r<=Kg?r-Of+10:0)}function Yg(r){if(r[0]!=="#")return null;switch(r.length){case 4:return{red:zr(r.charCodeAt(1))*17/255,green:zr(r.charCodeAt(2))*17/255,blue:zr(r.charCodeAt(3))*17/255,alpha:1};case 5:return{red:zr(r.charCodeAt(1))*17/255,green:zr(r.charCodeAt(2))*17/255,blue:zr(r.charCodeAt(3))*17/255,alpha:zr(r.charCodeAt(4))*17/255};case 7:return{red:(zr(r.charCodeAt(1))*16+zr(r.charCodeAt(2)))/255,green:(zr(r.charCodeAt(3))*16+zr(r.charCodeAt(4)))/255,blue:(zr(r.charCodeAt(5))*16+zr(r.charCodeAt(6)))/255,alpha:1};case 9:return{red:(zr(r.charCodeAt(1))*16+zr(r.charCodeAt(2)))/255,green:(zr(r.charCodeAt(3))*16+zr(r.charCodeAt(4)))/255,blue:(zr(r.charCodeAt(5))*16+zr(r.charCodeAt(6)))/255,alpha:(zr(r.charCodeAt(7))*16+zr(r.charCodeAt(8)))/255}}return null}function jm(r,t,i,o){return o===void 0&&(o=1),{red:r/255,green:t/255,blue:i/255,alpha:o}}var Jg=function(){function r(t){this.schemaService=t}return r.prototype.findDocumentSymbols=function(t,i,o){var s=this;o===void 0&&(o={resultLimit:Number.MAX_VALUE});var p=i.root;if(!p)return null;var y=o.resultLimit,A=t.uri;if((A==="vscode://defaultsettings/keybindings.json"||rd(A.toLowerCase(),"/user/keybindings.json"))&&p.type==="array"){for(var w=[],E=0,F=p.items;E<F.length;E++){var G=F[E];if(G.type==="object")for(var te=0,ne=G.properties;te<ne.length;te++){var se=ne[te];if(se.keyNode.value==="key"&&se.valueNode){var ye=Ol.create(t.uri,Pa(t,G));if(w.push({name:Ta(se.valueNode),kind:Bi.Function,location:ye}),y--,y<=0)return o&&o.onResultLimitExceeded&&o.onResultLimitExceeded(A),w}}}return w}var ge=function(me,Te,He){return y>=0&&(Te.type==="array"?Te.items.forEach(function(Be){return ge(me,Be,He)}):Te.type==="object"&&Te.properties.forEach(function(Be){if(y>=0){var ze=Be.valueNode;if(ze){y--;var De=Ol.create(t.uri,Pa(t,Be)),Ue=He?He+"."+Be.keyNode.value:Be.keyNode.value;me.push({name:s.getKeyLabel(Be),kind:s.getSymbolKind(ze.type),location:De,containerName:He}),ge(me,ze,Ue)}}})),me},Ae=ge([],p,void 0);return y<0&&(Ae.pop(),o&&o.onResultLimitExceeded&&o.onResultLimitExceeded(A)),Ae},r.prototype.findDocumentSymbols2=function(t,i,o){var s=this;o===void 0&&(o={resultLimit:Number.MAX_VALUE});var p=i.root;if(!p)return null;var y=o.resultLimit,A=t.uri;if((A==="vscode://defaultsettings/keybindings.json"||rd(A.toLowerCase(),"/user/keybindings.json"))&&p.type==="array"){for(var w=[],E=0,F=p.items;E<F.length;E++){var G=F[E];if(G.type==="object")for(var te=0,ne=G.properties;te<ne.length;te++){var se=ne[te];if(se.keyNode.value==="key"&&se.valueNode){var ye=Pa(t,G),ge=Pa(t,se.keyNode);if(w.push({name:Ta(se.valueNode),kind:Bi.Function,range:ye,selectionRange:ge}),y--,y<=0)return o&&o.onResultLimitExceeded&&o.onResultLimitExceeded(A),w}}}return w}var Ae=function(Te,He){return y>=0&&(He.type==="array"?He.items.forEach(function(Be,ze){if(Be&&y>=0){y--;var De=Pa(t,Be),Ue=De,We=String(ze),Je=Ae([],Be);Te.push({name:We,kind:s.getSymbolKind(Be.type),range:De,selectionRange:Ue,children:Je})}}):He.type==="object"&&He.properties.forEach(function(Be){var ze=Be.valueNode;if(ze&&y>=0){y--;var De=Pa(t,Be),Ue=Pa(t,Be.keyNode),We=Ae([],ze);Te.push({name:s.getKeyLabel(Be),kind:s.getSymbolKind(ze.type),range:De,selectionRange:Ue,children:We})}})),Te},me=Ae([],p);return y<0&&(me.pop(),o&&o.onResultLimitExceeded&&o.onResultLimitExceeded(A)),me},r.prototype.getSymbolKind=function(t){switch(t){case"object":return Bi.Module;case"string":return Bi.String;case"number":return Bi.Number;case"array":return Bi.Array;case"boolean":return Bi.Boolean;default:return Bi.Variable}},r.prototype.getKeyLabel=function(t){var i=t.keyNode.value;return i&&(i=i.replace(/[\n]/g,"\u21B5")),i&&i.trim()?i:'"'+i+'"'},r.prototype.findDocumentColors=function(t,i,o){return this.schemaService.getSchemaForResource(t.uri,i).then(function(s){var p=[];if(s)for(var y=o&&typeof o.resultLimit=="number"?o.resultLimit:Number.MAX_VALUE,A=i.getMatchingSchemas(s.schema),w={},E=0,F=A;E<F.length;E++){var G=F[E];if(!G.inverted&&G.schema&&(G.schema.format==="color"||G.schema.format==="color-hex")&&G.node&&G.node.type==="string"){var te=String(G.node.offset);if(!w[te]){var ne=Yg(Ta(G.node));if(ne){var se=Pa(t,G.node);p.push({color:ne,range:se})}if(w[te]=!0,y--,y<=0)return o&&o.onResultLimitExceeded&&o.onResultLimitExceeded(t.uri),p}}}return p})},r.prototype.getColorPresentations=function(t,i,o,s){var p=[],y=Math.round(o.red*255),A=Math.round(o.green*255),w=Math.round(o.blue*255);function E(G){var te=G.toString(16);return te.length!==2?"0"+te:te}var F;return o.alpha===1?F="#"+E(y)+E(A)+E(w):F="#"+E(y)+E(A)+E(w)+E(Math.round(o.alpha*255)),p.push({label:F,textEdit:xi.replace(s,JSON.stringify(F))}),p},r}();function Pa(r,t){return ur.create(r.positionAt(t.offset),r.positionAt(t.offset+t.length))}var Xg={schemaAssociations:{},schemas:{}};function Qg(r,t){var i=[],o=[],s=[],p=-1,y=fs(r.getText(),!1),A=y.scan();function w(Je){i.push(Je),o.push(s.length)}for(;A!==17;){switch(A){case 1:case 3:{var E=r.positionAt(y.getTokenOffset()).line,F={startLine:E,endLine:E,kind:A===1?"object":"array"};s.push(F);break}case 2:case 4:{var G=A===2?"object":"array";if(s.length>0&&s[s.length-1].kind===G){var F=s.pop(),te=r.positionAt(y.getTokenOffset()).line;F&&te>F.startLine+1&&p!==F.startLine&&(F.endLine=te-1,w(F),p=F.startLine)}break}case 13:{var E=r.positionAt(y.getTokenOffset()).line,ne=r.positionAt(y.getTokenOffset()+y.getTokenLength()).line;y.getTokenError()===1&&E+1<r.lineCount?y.setPosition(r.offsetAt(mi.create(E+1,0))):E<ne&&(w({startLine:E,endLine:ne,kind:Tl.Comment}),p=E);break}case 12:{var se=r.getText().substr(y.getTokenOffset(),y.getTokenLength()),ye=se.match(/^\/\/\s*#(region\b)|(endregion\b)/);if(ye){var te=r.positionAt(y.getTokenOffset()).line;if(ye[1]){var F={startLine:te,endLine:te,kind:Tl.Region};s.push(F)}else{for(var ge=s.length-1;ge>=0&&s[ge].kind!==Tl.Region;)ge--;if(ge>=0){var F=s[ge];s.length=ge,te>F.startLine&&p!==F.startLine&&(F.endLine=te,w(F),p=F.startLine)}}}break}}A=y.scan()}var Ae=t&&t.rangeLimit;if(typeof Ae!="number"||i.length<=Ae)return i;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(r.uri);for(var me=[],Te=0,He=o;Te<He.length;Te++){var Be=He[Te];Be<30&&(me[Be]=(me[Be]||0)+1)}for(var ze=0,De=0,ge=0;ge<me.length;ge++){var Ue=me[ge];if(Ue){if(Ue+ze>Ae){De=ge;break}ze+=Ue}}for(var We=[],ge=0;ge<i.length;ge++){var Be=o[ge];typeof Be=="number"&&(Be<De||Be===De&&ze++<Ae)&&We.push(i[ge])}return We}function Zg(r,t,i){function o(A){for(var w=r.offsetAt(A),E=i.getNodeFromOffset(w,!0),F=[];E;){switch(E.type){case"string":case"object":case"array":var G=E.offset+1,te=E.offset+E.length-1;G<te&&w>=G&&w<=te&&F.push(s(G,te)),F.push(s(E.offset,E.offset+E.length));break;case"number":case"boolean":case"null":case"property":F.push(s(E.offset,E.offset+E.length));break}if(E.type==="property"||E.parent&&E.parent.type==="array"){var ne=y(E.offset+E.length,5);ne!==-1&&F.push(s(E.offset,ne))}E=E.parent}for(var se=void 0,ye=F.length-1;ye>=0;ye--)se=Sf.create(F[ye],se);return se||(se=Sf.create(ur.create(A,A))),se}function s(A,w){return ur.create(r.positionAt(A),r.positionAt(w))}var p=fs(r.getText(),!0);function y(A,w){p.setPosition(A);var E=p.scan();return E===w?p.getTokenOffset()+p.getTokenLength():-1}return t.map(o)}function _g(r){var t=r.promiseConstructor||Promise,i=new Wg(r.schemaRequestService,r.workspaceContext,t);i.setSchemaContributions(Xg);var o=new Eg(i,r.contributions,t,r.clientCapabilities),s=new Cg(i,r.contributions,t),p=new Jg(i),y=new Hg(i,t);return{configure:function(A){i.clearExternalSchemas(),A.schemas&&A.schemas.forEach(function(w){i.registerExternalSchema(w.uri,w.fileMatch,w.schema)}),y.configure(A)},resetSchema:function(A){return i.onResourceChange(A)},doValidation:y.doValidation.bind(y),parseJSONDocument:function(A){return xg(A,{collectComments:!0})},newJSONDocument:function(A,w){return mg(A,w)},doComplete:o.doComplete.bind(o),findDocumentSymbols:p.findDocumentSymbols.bind(p),findDocumentSymbols2:p.findDocumentSymbols2.bind(p),findColorSymbols:function(A,w){return p.findDocumentColors(A,w).then(function(E){return E.map(function(F){return F.range})})},findDocumentColors:p.findDocumentColors.bind(p),getColorPresentations:p.getColorPresentations.bind(p),doHover:s.doHover.bind(s),getFoldingRanges:Qg,getSelectionRanges:Zg,format:function(A,w,E){var F=void 0;if(w){var G=A.offsetAt(w.start),te=A.offsetAt(w.end)-G;F={offset:G,length:te}}var ne={tabSize:E?E.tabSize:4,insertSpaces:E?E.insertSpaces:!0,eol:`
|
|
356
|
-
`};return sg(A.getText(),F,ne).map(function(se){return xi.replace(ur.create(A.positionAt(se.offset),A.positionAt(se.offset+se.length)),se.content)})}}}var Vm=a(96876),Wm=a(4328),Hm=a(3256),zm=a(71707),Gm=a(82801),$m=a(32095),Km=a(86081),Ym=a(44254),Jm=a(75019),Xm=a(13837),_p=(r,
|
|
355
|
+
$3`);return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function Og(t){return t.indexOf("`")!==-1?"`` "+t+" ``":t}var Tg=function(){var t=function(r,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,s){o.__proto__=s}||function(o,s){for(var p in s)s.hasOwnProperty(p)&&(o[p]=s[p])},t(r,i)};return function(r,i){t(r,i);function o(){this.constructor=r}r.prototype=i===null?Object.create(i):(o.prototype=i.prototype,new o)}}(),Hr,Ml;if(typeof process=="object")Ml=!1;else if(typeof navigator=="object"){var Pg=navigator.userAgent;Ml=Pg.indexOf("Windows")>=0}function Dm(t){return 55296<=t&&t<=56319}function Nm(t){return 56320<=t&&t<=57343}function Bm(t){return t>=97&&t<=102}function Ig(t){return t>=97&&t<=122}function Fg(t){return t>=65&&t<=90}function Um(t){return Ig(t)||Fg(t)}var kg=/^\w[\w\d+.-]*$/,Mg=/^\//,Rg=/^\/\//;function Lg(t,r){if(!t.scheme&&r)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+t.authority+'", path: "'+t.path+'", query: "'+t.query+'", fragment: "'+t.fragment+'"}');if(t.scheme&&!kg.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path){if(t.authority){if(!Mg.test(t.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(Rg.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function Dg(t,r){return!t&&!r?"file":t}function Ng(t,r){switch(t){case"https":case"http":case"file":r?r[0]!==bi&&(r=bi+r):r=bi;break}return r}var gr="",bi="/",Bg=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,id=function(){function t(r,i,o,s,p,y){y===void 0&&(y=!1),typeof r=="object"?(this.scheme=r.scheme||gr,this.authority=r.authority||gr,this.path=r.path||gr,this.query=r.query||gr,this.fragment=r.fragment||gr):(this.scheme=Dg(r,y),this.authority=i||gr,this.path=Ng(this.scheme,o||gr),this.query=s||gr,this.fragment=p||gr,Lg(this,y))}return t.isUri=function(r){return r instanceof t?!0:r?typeof r.authority=="string"&&typeof r.fragment=="string"&&typeof r.path=="string"&&typeof r.query=="string"&&typeof r.scheme=="string"&&typeof r.fsPath=="function"&&typeof r.with=="function"&&typeof r.toString=="function":!1},Object.defineProperty(t.prototype,"fsPath",{get:function(){return Gp(this,!1)},enumerable:!0,configurable:!0}),t.prototype.with=function(r){if(!r)return this;var i=r.scheme,o=r.authority,s=r.path,p=r.query,y=r.fragment;return i===void 0?i=this.scheme:i===null&&(i=gr),o===void 0?o=this.authority:o===null&&(o=gr),s===void 0?s=this.path:s===null&&(s=gr),p===void 0?p=this.query:p===null&&(p=gr),y===void 0?y=this.fragment:y===null&&(y=gr),i===this.scheme&&o===this.authority&&s===this.path&&p===this.query&&y===this.fragment?this:new ds(i,o,s,p,y)},t.parse=function(r,i){i===void 0&&(i=!1);var o=Bg.exec(r);return o?new ds(o[2]||gr,Ef(o[4]||gr),Ef(o[5]||gr),Ef(o[7]||gr),Ef(o[9]||gr),i):new ds(gr,gr,gr,gr,gr)},t.file=function(r){var i=gr;if(Ml&&(r=r.replace(/\\/g,bi)),r[0]===bi&&r[1]===bi){var o=r.indexOf(bi,2);o===-1?(i=r.substring(2),r=bi):(i=r.substring(2,o),r=r.substring(o)||bi)}return new ds("file",i,r,gr,gr)},t.from=function(r){return new ds(r.scheme,r.authority,r.path,r.query,r.fragment)},t.prototype.toString=function(r){return r===void 0&&(r=!1),ad(this,r)},t.prototype.toJSON=function(){return this},t.revive=function(r){if(r){if(r instanceof t)return r;var i=new ds(r);return i._formatted=r.external,i._fsPath=r._sep===Wp?r.fsPath:null,i}else return r},t}(),Wp=Ml?1:void 0,ds=function(t){Tg(r,t);function r(){var i=t!==null&&t.apply(this,arguments)||this;return i._formatted=null,i._fsPath=null,i}return Object.defineProperty(r.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=Gp(this,!1)),this._fsPath},enumerable:!0,configurable:!0}),r.prototype.toString=function(i){return i===void 0&&(i=!1),i?ad(this,!0):(this._formatted||(this._formatted=ad(this,!1)),this._formatted)},r.prototype.toJSON=function(){var i={$mid:1};return this._fsPath&&(i.fsPath=this._fsPath,i._sep=Wp),this._formatted&&(i.external=this._formatted),this.path&&(i.path=this.path),this.scheme&&(i.scheme=this.scheme),this.authority&&(i.authority=this.authority),this.query&&(i.query=this.query),this.fragment&&(i.fragment=this.fragment),i},r}(id),Hp=(Hr={},Hr[58]="%3A",Hr[47]="%2F",Hr[63]="%3F",Hr[35]="%23",Hr[91]="%5B",Hr[93]="%5D",Hr[64]="%40",Hr[33]="%21",Hr[36]="%24",Hr[38]="%26",Hr[39]="%27",Hr[40]="%28",Hr[41]="%29",Hr[42]="%2A",Hr[43]="%2B",Hr[44]="%2C",Hr[59]="%3B",Hr[61]="%3D",Hr[32]="%20",Hr);function zp(t,r){for(var i=void 0,o=-1,s=0;s<t.length;s++){var p=t.charCodeAt(s);if(p>=97&&p<=122||p>=65&&p<=90||p>=48&&p<=57||p===45||p===46||p===95||p===126||r&&p===47)o!==-1&&(i+=encodeURIComponent(t.substring(o,s)),o=-1),i!==void 0&&(i+=t.charAt(s));else{i===void 0&&(i=t.substr(0,s));var y=Hp[p];y!==void 0?(o!==-1&&(i+=encodeURIComponent(t.substring(o,s)),o=-1),i+=y):o===-1&&(o=s)}}return o!==-1&&(i+=encodeURIComponent(t.substring(o))),i!==void 0?i:t}function Ug(t){for(var r=void 0,i=0;i<t.length;i++){var o=t.charCodeAt(i);o===35||o===63?(r===void 0&&(r=t.substr(0,i)),r+=Hp[o]):r!==void 0&&(r+=t[i])}return r!==void 0?r:t}function Gp(t,r){var i;return t.authority&&t.path.length>1&&t.scheme==="file"?i="//"+t.authority+t.path:t.path.charCodeAt(0)===47&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&t.path.charCodeAt(2)===58?r?i=t.path.substr(1):i=t.path[1].toLowerCase()+t.path.substr(2):i=t.path,Ml&&(i=i.replace(/\//g,"\\")),i}function ad(t,r){var i=r?Ug:zp,o="",s=t.scheme,p=t.authority,y=t.path,A=t.query,w=t.fragment;if(s&&(o+=s,o+=":"),(p||s==="file")&&(o+=bi,o+=bi),p){var E=p.indexOf("@");if(E!==-1){var F=p.substr(0,E);p=p.substr(E+1),E=F.indexOf(":"),E===-1?o+=i(F,!1):(o+=i(F.substr(0,E),!1),o+=":",o+=i(F.substr(E+1),!1)),o+="@"}p=p.toLowerCase(),E=p.indexOf(":"),E===-1?o+=i(p,!1):(o+=i(p.substr(0,E),!1),o+=p.substr(E))}if(y){if(y.length>=3&&y.charCodeAt(0)===47&&y.charCodeAt(2)===58){var G=y.charCodeAt(1);G>=65&&G<=90&&(y="/"+String.fromCharCode(G+32)+":"+y.substr(3))}else if(y.length>=2&&y.charCodeAt(1)===58){var G=y.charCodeAt(0);G>=65&&G<=90&&(y=String.fromCharCode(G+32)+":"+y.substr(2))}o+=i(y,!0)}return A&&(o+="?",o+=i(A,!1)),w&&(o+="#",o+=r?w:zp(w,!1)),o}function $p(t){try{return decodeURIComponent(t)}catch(r){return t.length>3?t.substr(0,3)+$p(t.substr(3)):t}}var Kp=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Ef(t){return t.match(Kp)?t.replace(Kp,function(r){return $p(r)}):t}var jg=function(){function t(r){try{this.patternRegExp=new RegExp(wg(r)+"$")}catch(i){this.patternRegExp=null}this.schemas=[]}return t.prototype.addSchema=function(r){this.schemas.push(r)},t.prototype.matchesPattern=function(r){return this.patternRegExp&&this.patternRegExp.test(r)},t.prototype.getSchemas=function(){return this.schemas},t}(),Vg=function(){function t(r,i,o){this.service=r,this.url=i,this.dependencies={},o&&(this.unresolvedSchema=this.service.promise.resolve(new ps(o)))}return t.prototype.getUnresolvedSchema=function(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.url)),this.unresolvedSchema},t.prototype.getResolvedSchema=function(){var r=this;return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(function(i){return r.service.resolveSchemaContent(i,r.url,r.dependencies)})),this.resolvedSchema},t.prototype.clearSchema=function(){this.resolvedSchema=null,this.unresolvedSchema=null,this.dependencies={}},t}(),ps=function(){function t(r,i){i===void 0&&(i=[]),this.schema=r,this.errors=i}return t}(),Yp=function(){function t(r,i){i===void 0&&(i=[]),this.schema=r,this.errors=i}return t.prototype.getSection=function(r){return kn(this.getSectionRecursive(r,this.schema))},t.prototype.getSectionRecursive=function(r,i){if(!i||typeof i=="boolean"||r.length===0)return i;var o=r.shift();if(i.properties&&typeof i.properties[o])return this.getSectionRecursive(r,i.properties[o]);if(i.patternProperties)for(var s=0,p=Object.keys(i.patternProperties);s<p.length;s++){var y=p[s],A=new RegExp(y);if(A.test(o))return this.getSectionRecursive(r,i.patternProperties[y])}else{if(typeof i.additionalProperties=="object")return this.getSectionRecursive(r,i.additionalProperties);if(o.match("[0-9]+")){if(Array.isArray(i.items)){var w=parseInt(o,10);if(!isNaN(w)&&i.items[w])return this.getSectionRecursive(r,i.items[w])}else if(i.items)return this.getSectionRecursive(r,i.items)}}return null},t}(),Wg=function(){function t(r,i,o){this.contextService=i,this.requestService=r,this.promiseConstructor=o||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations={},this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={}}return t.prototype.getRegisteredSchemaIds=function(r){return Object.keys(this.registeredSchemasIds).filter(function(i){var o=id.parse(i).scheme;return o!=="schemaservice"&&(!r||r(o))})},Object.defineProperty(t.prototype,"promise",{get:function(){return this.promiseConstructor},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()},t.prototype.onResourceChange=function(r){var i=this,o=!1;r=this.normalizeId(r);for(var s=[r],p=Object.keys(this.schemasById).map(function(E){return i.schemasById[E]});s.length;)for(var y=s.pop(),A=0;A<p.length;A++){var w=p[A];w&&(w.url===y||w.dependencies[y])&&(w.url!==y&&s.push(w.url),w.clearSchema(),p[A]=void 0,o=!0)}return o},t.prototype.normalizeId=function(r){try{return id.parse(r).toString()}catch(i){return r}},t.prototype.setSchemaContributions=function(r){if(r.schemas){var i=r.schemas;for(var o in i){var s=this.normalizeId(o);this.contributionSchemas[s]=this.addSchemaHandle(s,i[o])}}if(r.schemaAssociations){var p=r.schemaAssociations;for(var y in p){var A=p[y];this.contributionAssociations[y]=A;for(var w=this.getOrAddFilePatternAssociation(y),E=0,F=A;E<F.length;E++){var G=F[E],o=this.normalizeId(G);w.addSchema(o)}}}},t.prototype.addSchemaHandle=function(r,i){var o=new Vg(this,r,i);return this.schemasById[r]=o,o},t.prototype.getOrAddSchemaHandle=function(r,i){return this.schemasById[r]||this.addSchemaHandle(r,i)},t.prototype.getOrAddFilePatternAssociation=function(r){var i=this.filePatternAssociationById[r];return i||(i=new jg(r),this.filePatternAssociationById[r]=i,this.filePatternAssociations.push(i)),i},t.prototype.registerExternalSchema=function(r,i,o){i===void 0&&(i=null);var s=this.normalizeId(r);if(this.registeredSchemasIds[s]=!0,i)for(var p=0,y=i;p<y.length;p++){var A=y[p];this.getOrAddFilePatternAssociation(A).addSchema(s)}return o?this.addSchemaHandle(s,o):this.getOrAddSchemaHandle(s)},t.prototype.clearExternalSchemas=function(){this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={};for(var r in this.contributionSchemas)this.schemasById[r]=this.contributionSchemas[r],this.registeredSchemasIds[r]=!0;for(var i in this.contributionAssociations)for(var o=this.getOrAddFilePatternAssociation(i),s=0,p=this.contributionAssociations[i];s<p.length;s++){var y=p[s],r=this.normalizeId(y);o.addSchema(r)}},t.prototype.getResolvedSchema=function(r){var i=this.normalizeId(r),o=this.schemasById[i];return o?o.getResolvedSchema():this.promise.resolve(null)},t.prototype.loadSchema=function(r){if(!this.requestService){var i="Unable to load schema from '"+Cf(r)+"'. No schema request service available";return this.promise.resolve(new ps({},[i]))}return this.requestService(r).then(function(o){if(!o){var s="Unable to load schema from '"+Cf(r)+"': No content.";return new ps({},[s])}var p={},y=[];p=ng(o,y);var A=y.length?["Unable to parse content from '"+Cf(r)+"': Parse error at offset "+y[0].offset]:[];return new ps(p,A)},function(o){var s="Unable to load schema from '"+Cf(r)+"': "+o.toString();return new ps({},[s])})},t.prototype.resolveSchemaContent=function(r,i,o){var s=this,p=r.errors.slice(0),y=r.schema;if(y.$schema){var A=this.normalizeId(y.$schema);if(A==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new Yp({},["Draft-03 schemas are not supported."]));A==="https://json-schema.org/draft/2019-09/schema"&&r.errors.push("Draft 2019-09 schemas are not yet fully supported.")}var w=this.contextService,E=function(ne,se){if(!se)return ne;var ye=ne;return se[0]==="/"&&(se=se.substr(1)),se.split("/").some(function(ge){return ye=ye[ge],!ye}),ye},F=function(ne,se,ye,ge){var Ae=E(se,ge);if(Ae)for(var me in Ae)Ae.hasOwnProperty(me)&&!ne.hasOwnProperty(me)&&(ne[me]=Ae[me]);else p.push("$ref '"+ge+"' in '"+ye+"' can not be resolved.")},G=function(ne,se,ye,ge,Ae){w&&!/^\w+:\/\/.*/.test(se)&&(se=w.resolveRelativePath(se,ge)),se=s.normalizeId(se);var me=s.getOrAddSchemaHandle(se);return me.getUnresolvedSchema().then(function(Te){if(Ae[se]=!0,Te.errors.length){var He=ye?se+"#"+ye:se;p.push("Problems loading reference '"+He+"': "+Te.errors[0]+".")}return F(ne,Te.schema,se,ye),te(ne,Te.schema,se,me.dependencies)})},te=function(ne,se,ye,ge){if(!ne||typeof ne!="object")return Promise.resolve(null);for(var Ae=[ne],me=[],Te=[],He=function(){for(var We=[],Je=0;Je<arguments.length;Je++)We[Je]=arguments[Je];for(var et=0,$e=We;et<$e.length;et++){var gt=$e[et];typeof gt=="object"&&Ae.push(gt)}},Be=function(){for(var We=[],Je=0;Je<arguments.length;Je++)We[Je]=arguments[Je];for(var et=0,$e=We;et<$e.length;et++){var gt=$e[et];if(typeof gt=="object")for(var Nt in gt){var zt=gt[Nt];typeof zt=="object"&&Ae.push(zt)}}},ze=function(){for(var We=[],Je=0;Je<arguments.length;Je++)We[Je]=arguments[Je];for(var et=0,$e=We;et<$e.length;et++){var gt=$e[et];if(Array.isArray(gt))for(var Nt=0,zt=gt;Nt<zt.length;Nt++){var or=zt[Nt];typeof or=="object"&&Ae.push(or)}}},De=function(We){for(var Je=[];We.$ref;){var et=We.$ref,$e=et.split("#",2);if(delete We.$ref,$e[0].length>0){Te.push(G(We,$e[0],$e[1],ye,ge));return}else Je.indexOf(et)===-1&&(F(We,se,ye,$e[1]),Je.push(et))}He(We.items,We.additionalProperties,We.not,We.contains,We.propertyNames,We.if,We.then,We.else),Be(We.definitions,We.properties,We.patternProperties,We.dependencies),ze(We.anyOf,We.allOf,We.oneOf,We.items)};Ae.length;){var Ue=Ae.pop();me.indexOf(Ue)>=0||(me.push(Ue),De(Ue))}return s.promise.all(Te)};return te(y,y,i,o).then(function(ne){return new Yp(y,p)})},t.prototype.getSchemaForResource=function(r,i){if(i&&i.root&&i.root.type==="object"){var o=i.root.properties.filter(function(se){return se.keyNode.value==="$schema"&&se.valueNode&&se.valueNode.type==="string"});if(o.length>0){var s=Ta(o[0].valueNode);if(s&&bg(s,".")&&this.contextService&&(s=this.contextService.resolveRelativePath(s,r)),s){var p=this.normalizeId(s);return this.getOrAddSchemaHandle(p).getResolvedSchema()}}}for(var y=Object.create(null),A=[],w=0,E=this.filePatternAssociations;w<E.length;w++){var F=E[w];if(F.matchesPattern(r))for(var G=0,te=F.getSchemas();G<te.length;G++){var ne=te[G];y[ne]||(A.push(ne),y[ne]=!0)}}return A.length>0?this.createCombinedSchema(r,A).getResolvedSchema():this.promise.resolve(null)},t.prototype.createCombinedSchema=function(r,i){if(i.length===1)return this.getOrAddSchemaHandle(i[0]);var o="schemaservice://combinedSchema/"+encodeURIComponent(r),s={allOf:i.map(function(p){return{$ref:p}})};return this.addSchemaHandle(o,s)},t}();function Cf(t){try{}catch(r){}return t}var Hg=function(){function t(r,i){this.jsonSchemaService=r,this.promise=i,this.validationEnabled=!0}return t.prototype.configure=function(r){r&&(this.validationEnabled=r.validate,this.commentSeverity=r.allowComments?void 0:$t.Error)},t.prototype.doValidation=function(r,i,o,s){var p=this;if(!this.validationEnabled)return this.promise.resolve([]);var y=[],A={},w=function(G){var te=G.range.start.line+" "+G.range.start.character+" "+G.message;A[te]||(A[te]=!0,y.push(G))},E=function(G){var te=o?Qp(o.trailingCommas):$t.Error,ne=o?Qp(o.comments):p.commentSeverity;if(G){if(G.errors.length&&i.root){var se=i.root,ye=se.type==="object"?se.properties[0]:null;if(ye&&ye.keyNode.value==="$schema"){var ge=ye.valueNode||ye,Ae=ur.create(r.positionAt(ge.offset),r.positionAt(ge.offset+ge.length));w(la.create(Ae,G.errors[0],$t.Warning,rr.SchemaResolveError))}else{var Ae=ur.create(r.positionAt(se.offset),r.positionAt(se.offset+1));w(la.create(Ae,G.errors[0],$t.Warning,rr.SchemaResolveError))}}else{var me=i.validate(r,G.schema);me&&me.forEach(w)}Jp(G.schema)&&(ne=void 0),Xp(G.schema)&&(te=void 0)}for(var Te=0,He=i.syntaxErrors;Te<He.length;Te++){var Be=He[Te];if(Be.code===rr.TrailingComma){if(typeof te!="number")continue;Be.severity=te}w(Be)}if(typeof ne=="number"){var ze="Comments are not permitted in JSON.";i.comments.forEach(function(De){w(la.create(De,ze,ne,rr.CommentNotPermitted))})}return y};if(s){var F=s.id||"schemaservice://untitled/"+zg++;return this.jsonSchemaService.resolveSchemaContent(new ps(s),F,{}).then(function(G){return E(G)})}return this.jsonSchemaService.getSchemaForResource(r.uri,i).then(function(G){return E(G)})},t}(),zg=0;function Jp(t){if(t&&typeof t=="object"){if(Ni(t.allowComments))return t.allowComments;if(t.allOf)for(var r=0,i=t.allOf;r<i.length;r++){var o=i[r],s=Jp(o);if(Ni(s))return s}}}function Xp(t){if(t&&typeof t=="object"){if(Ni(t.allowTrailingCommas))return t.allowTrailingCommas;if(Ni(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(t.allOf)for(var r=0,i=t.allOf;r<i.length;r++){var o=i[r],s=Xp(o);if(Ni(s))return s}}}function Qp(t){switch(t){case"error":return $t.Error;case"warning":return $t.Warning;case"ignore":return}}var Zp=48,Gg=57,$g=65,Of=97,Kg=102;function zr(t){return t<Zp?0:t<=Gg?t-Zp:(t<Of&&(t+=Of-$g),t>=Of&&t<=Kg?t-Of+10:0)}function Yg(t){if(t[0]!=="#")return null;switch(t.length){case 4:return{red:zr(t.charCodeAt(1))*17/255,green:zr(t.charCodeAt(2))*17/255,blue:zr(t.charCodeAt(3))*17/255,alpha:1};case 5:return{red:zr(t.charCodeAt(1))*17/255,green:zr(t.charCodeAt(2))*17/255,blue:zr(t.charCodeAt(3))*17/255,alpha:zr(t.charCodeAt(4))*17/255};case 7:return{red:(zr(t.charCodeAt(1))*16+zr(t.charCodeAt(2)))/255,green:(zr(t.charCodeAt(3))*16+zr(t.charCodeAt(4)))/255,blue:(zr(t.charCodeAt(5))*16+zr(t.charCodeAt(6)))/255,alpha:1};case 9:return{red:(zr(t.charCodeAt(1))*16+zr(t.charCodeAt(2)))/255,green:(zr(t.charCodeAt(3))*16+zr(t.charCodeAt(4)))/255,blue:(zr(t.charCodeAt(5))*16+zr(t.charCodeAt(6)))/255,alpha:(zr(t.charCodeAt(7))*16+zr(t.charCodeAt(8)))/255}}return null}function jm(t,r,i,o){return o===void 0&&(o=1),{red:t/255,green:r/255,blue:i/255,alpha:o}}var Jg=function(){function t(r){this.schemaService=r}return t.prototype.findDocumentSymbols=function(r,i,o){var s=this;o===void 0&&(o={resultLimit:Number.MAX_VALUE});var p=i.root;if(!p)return null;var y=o.resultLimit,A=r.uri;if((A==="vscode://defaultsettings/keybindings.json"||rd(A.toLowerCase(),"/user/keybindings.json"))&&p.type==="array"){for(var w=[],E=0,F=p.items;E<F.length;E++){var G=F[E];if(G.type==="object")for(var te=0,ne=G.properties;te<ne.length;te++){var se=ne[te];if(se.keyNode.value==="key"&&se.valueNode){var ye=Ol.create(r.uri,Pa(r,G));if(w.push({name:Ta(se.valueNode),kind:Bi.Function,location:ye}),y--,y<=0)return o&&o.onResultLimitExceeded&&o.onResultLimitExceeded(A),w}}}return w}var ge=function(me,Te,He){return y>=0&&(Te.type==="array"?Te.items.forEach(function(Be){return ge(me,Be,He)}):Te.type==="object"&&Te.properties.forEach(function(Be){if(y>=0){var ze=Be.valueNode;if(ze){y--;var De=Ol.create(r.uri,Pa(r,Be)),Ue=He?He+"."+Be.keyNode.value:Be.keyNode.value;me.push({name:s.getKeyLabel(Be),kind:s.getSymbolKind(ze.type),location:De,containerName:He}),ge(me,ze,Ue)}}})),me},Ae=ge([],p,void 0);return y<0&&(Ae.pop(),o&&o.onResultLimitExceeded&&o.onResultLimitExceeded(A)),Ae},t.prototype.findDocumentSymbols2=function(r,i,o){var s=this;o===void 0&&(o={resultLimit:Number.MAX_VALUE});var p=i.root;if(!p)return null;var y=o.resultLimit,A=r.uri;if((A==="vscode://defaultsettings/keybindings.json"||rd(A.toLowerCase(),"/user/keybindings.json"))&&p.type==="array"){for(var w=[],E=0,F=p.items;E<F.length;E++){var G=F[E];if(G.type==="object")for(var te=0,ne=G.properties;te<ne.length;te++){var se=ne[te];if(se.keyNode.value==="key"&&se.valueNode){var ye=Pa(r,G),ge=Pa(r,se.keyNode);if(w.push({name:Ta(se.valueNode),kind:Bi.Function,range:ye,selectionRange:ge}),y--,y<=0)return o&&o.onResultLimitExceeded&&o.onResultLimitExceeded(A),w}}}return w}var Ae=function(Te,He){return y>=0&&(He.type==="array"?He.items.forEach(function(Be,ze){if(Be&&y>=0){y--;var De=Pa(r,Be),Ue=De,We=String(ze),Je=Ae([],Be);Te.push({name:We,kind:s.getSymbolKind(Be.type),range:De,selectionRange:Ue,children:Je})}}):He.type==="object"&&He.properties.forEach(function(Be){var ze=Be.valueNode;if(ze&&y>=0){y--;var De=Pa(r,Be),Ue=Pa(r,Be.keyNode),We=Ae([],ze);Te.push({name:s.getKeyLabel(Be),kind:s.getSymbolKind(ze.type),range:De,selectionRange:Ue,children:We})}})),Te},me=Ae([],p);return y<0&&(me.pop(),o&&o.onResultLimitExceeded&&o.onResultLimitExceeded(A)),me},t.prototype.getSymbolKind=function(r){switch(r){case"object":return Bi.Module;case"string":return Bi.String;case"number":return Bi.Number;case"array":return Bi.Array;case"boolean":return Bi.Boolean;default:return Bi.Variable}},t.prototype.getKeyLabel=function(r){var i=r.keyNode.value;return i&&(i=i.replace(/[\n]/g,"\u21B5")),i&&i.trim()?i:'"'+i+'"'},t.prototype.findDocumentColors=function(r,i,o){return this.schemaService.getSchemaForResource(r.uri,i).then(function(s){var p=[];if(s)for(var y=o&&typeof o.resultLimit=="number"?o.resultLimit:Number.MAX_VALUE,A=i.getMatchingSchemas(s.schema),w={},E=0,F=A;E<F.length;E++){var G=F[E];if(!G.inverted&&G.schema&&(G.schema.format==="color"||G.schema.format==="color-hex")&&G.node&&G.node.type==="string"){var te=String(G.node.offset);if(!w[te]){var ne=Yg(Ta(G.node));if(ne){var se=Pa(r,G.node);p.push({color:ne,range:se})}if(w[te]=!0,y--,y<=0)return o&&o.onResultLimitExceeded&&o.onResultLimitExceeded(r.uri),p}}}return p})},t.prototype.getColorPresentations=function(r,i,o,s){var p=[],y=Math.round(o.red*255),A=Math.round(o.green*255),w=Math.round(o.blue*255);function E(G){var te=G.toString(16);return te.length!==2?"0"+te:te}var F;return o.alpha===1?F="#"+E(y)+E(A)+E(w):F="#"+E(y)+E(A)+E(w)+E(Math.round(o.alpha*255)),p.push({label:F,textEdit:xi.replace(s,JSON.stringify(F))}),p},t}();function Pa(t,r){return ur.create(t.positionAt(r.offset),t.positionAt(r.offset+r.length))}var Xg={schemaAssociations:{},schemas:{}};function Qg(t,r){var i=[],o=[],s=[],p=-1,y=fs(t.getText(),!1),A=y.scan();function w(Je){i.push(Je),o.push(s.length)}for(;A!==17;){switch(A){case 1:case 3:{var E=t.positionAt(y.getTokenOffset()).line,F={startLine:E,endLine:E,kind:A===1?"object":"array"};s.push(F);break}case 2:case 4:{var G=A===2?"object":"array";if(s.length>0&&s[s.length-1].kind===G){var F=s.pop(),te=t.positionAt(y.getTokenOffset()).line;F&&te>F.startLine+1&&p!==F.startLine&&(F.endLine=te-1,w(F),p=F.startLine)}break}case 13:{var E=t.positionAt(y.getTokenOffset()).line,ne=t.positionAt(y.getTokenOffset()+y.getTokenLength()).line;y.getTokenError()===1&&E+1<t.lineCount?y.setPosition(t.offsetAt(mi.create(E+1,0))):E<ne&&(w({startLine:E,endLine:ne,kind:Tl.Comment}),p=E);break}case 12:{var se=t.getText().substr(y.getTokenOffset(),y.getTokenLength()),ye=se.match(/^\/\/\s*#(region\b)|(endregion\b)/);if(ye){var te=t.positionAt(y.getTokenOffset()).line;if(ye[1]){var F={startLine:te,endLine:te,kind:Tl.Region};s.push(F)}else{for(var ge=s.length-1;ge>=0&&s[ge].kind!==Tl.Region;)ge--;if(ge>=0){var F=s[ge];s.length=ge,te>F.startLine&&p!==F.startLine&&(F.endLine=te,w(F),p=F.startLine)}}}break}}A=y.scan()}var Ae=r&&r.rangeLimit;if(typeof Ae!="number"||i.length<=Ae)return i;r&&r.onRangeLimitExceeded&&r.onRangeLimitExceeded(t.uri);for(var me=[],Te=0,He=o;Te<He.length;Te++){var Be=He[Te];Be<30&&(me[Be]=(me[Be]||0)+1)}for(var ze=0,De=0,ge=0;ge<me.length;ge++){var Ue=me[ge];if(Ue){if(Ue+ze>Ae){De=ge;break}ze+=Ue}}for(var We=[],ge=0;ge<i.length;ge++){var Be=o[ge];typeof Be=="number"&&(Be<De||Be===De&&ze++<Ae)&&We.push(i[ge])}return We}function Zg(t,r,i){function o(A){for(var w=t.offsetAt(A),E=i.getNodeFromOffset(w,!0),F=[];E;){switch(E.type){case"string":case"object":case"array":var G=E.offset+1,te=E.offset+E.length-1;G<te&&w>=G&&w<=te&&F.push(s(G,te)),F.push(s(E.offset,E.offset+E.length));break;case"number":case"boolean":case"null":case"property":F.push(s(E.offset,E.offset+E.length));break}if(E.type==="property"||E.parent&&E.parent.type==="array"){var ne=y(E.offset+E.length,5);ne!==-1&&F.push(s(E.offset,ne))}E=E.parent}for(var se=void 0,ye=F.length-1;ye>=0;ye--)se=Sf.create(F[ye],se);return se||(se=Sf.create(ur.create(A,A))),se}function s(A,w){return ur.create(t.positionAt(A),t.positionAt(w))}var p=fs(t.getText(),!0);function y(A,w){p.setPosition(A);var E=p.scan();return E===w?p.getTokenOffset()+p.getTokenLength():-1}return r.map(o)}function _g(t){var r=t.promiseConstructor||Promise,i=new Wg(t.schemaRequestService,t.workspaceContext,r);i.setSchemaContributions(Xg);var o=new Eg(i,t.contributions,r,t.clientCapabilities),s=new Cg(i,t.contributions,r),p=new Jg(i),y=new Hg(i,r);return{configure:function(A){i.clearExternalSchemas(),A.schemas&&A.schemas.forEach(function(w){i.registerExternalSchema(w.uri,w.fileMatch,w.schema)}),y.configure(A)},resetSchema:function(A){return i.onResourceChange(A)},doValidation:y.doValidation.bind(y),parseJSONDocument:function(A){return xg(A,{collectComments:!0})},newJSONDocument:function(A,w){return mg(A,w)},doComplete:o.doComplete.bind(o),findDocumentSymbols:p.findDocumentSymbols.bind(p),findDocumentSymbols2:p.findDocumentSymbols2.bind(p),findColorSymbols:function(A,w){return p.findDocumentColors(A,w).then(function(E){return E.map(function(F){return F.range})})},findDocumentColors:p.findDocumentColors.bind(p),getColorPresentations:p.getColorPresentations.bind(p),doHover:s.doHover.bind(s),getFoldingRanges:Qg,getSelectionRanges:Zg,format:function(A,w,E){var F=void 0;if(w){var G=A.offsetAt(w.start),te=A.offsetAt(w.end)-G;F={offset:G,length:te}}var ne={tabSize:E?E.tabSize:4,insertSpaces:E?E.insertSpaces:!0,eol:`
|
|
356
|
+
`};return sg(A.getText(),F,ne).map(function(se){return xi.replace(ur.create(A.positionAt(se.offset),A.positionAt(se.offset+se.length)),se.content)})}}}var Vm=a(96876),Wm=a(4328),Hm=a(3256),zm=a(71707),Gm=a(82801),$m=a(32095),Km=a(86081),Ym=a(44254),Jm=a(75019),Xm=a(13837),_p=(t,r,i)=>new Promise((o,s)=>{var p=w=>{try{A(i.next(w))}catch(E){s(E)}},y=w=>{try{A(i.throw(w))}catch(E){s(E)}},A=w=>w.done?o(w.value):Promise.resolve(w.value).then(p,y);A((i=i.apply(t,r)).next())});const hs=_g({});ls.registerHelper("lint","json",function(t,r){return _p(this,null,function*(){const{schema:i,setError:o}=r;hs.configure({validate:!0,schemas:[{uri:"stub://"+r.id,fileMatch:["*"],schema:i}]});const s=Af.create(r.id+".json","json",0,t),p=hs.parseJSONDocument(s),y=yield hs.doValidation(s,p);return y.length?o&&o(y[0].message):o&&o(void 0),y.map(A=>({from:ls.Pos(A.range.start.line,A.range.start.character),to:ls.Pos(A.range.end.line,A.range.end.character),message:A.message}))})}),ls.registerHelper("hint","json",(t,r)=>_p(void 0,null,function*(){const i=r.schema;if(!i)return;hs.configure({validate:!0,schemas:[{uri:"stub://"+r.id,fileMatch:["*"],schema:i}]});const o=t.getDoc().getCursor(),s=t.getTokenAt(o),p=Af.create(r.id+".json","json",0,t.getValue()),y=hs.parseJSONDocument(p),A=yield hs.doComplete(p,{line:o.line,character:o.ch},y),w=F=>{let G="";for(;F--;)G+=" ";return G};let E=A?A.items.map(F=>({text:F.insertText,displayText:F.label,filter:F.filterText||F.label,from:{line:F.textEdit.range.start.line,ch:F.textEdit.range.start.character},to:{line:F.textEdit.range.end.line,ch:F.textEdit.range.end.character},hint:(G,te,ne)=>{const se="_$__REDOC_CURSOR_HERE";let ye=ne.text.replace(/(\$1|\${1:[^}]+})/,se)||"";if(ye=ye.replace(/(\$\d+|\${[^}]+})/g,"")||"",G.setSelection(ne.from,ne.to),ye.indexOf(`
|
|
357
357
|
`)>-1){const Ae=G.getLine(G.getCursor().line).search(/(\S|$)/);ye=ye.replace(/\n/g,`
|
|
358
|
-
`+w(Ae))}G.replaceSelection(ye);const ge=G.getSearchCursor(se,ne.from);ge.findNext()&&(G.setCursor(ge.from()),ge.replace(""))}})):[];return/(property|string)/.test(s.type||"")&&(E=E.filter(F=>F.filter.replace(/(^"|"$)/g,"").startsWith(s.string.replace(/(^"|"$)/g,"")))),{from:ls.Pos(o.line,s.start),to:ls.Pos(o.line,o.ch),list:E}}));var qg=Object.defineProperty,ey=(r,
|
|
358
|
+
`+w(Ae))}G.replaceSelection(ye);const ge=G.getSearchCursor(se,ne.from);ge.findNext()&&(G.setCursor(ge.from()),ge.replace(""))}})):[];return/(property|string)/.test(s.type||"")&&(E=E.filter(F=>F.filter.replace(/(^"|"$)/g,"").startsWith(s.string.replace(/(^"|"$)/g,"")))),{from:ls.Pos(o.line,s.start),to:ls.Pos(o.line,o.ch),list:E}}));var qg=Object.defineProperty,ey=(t,r,i)=>r in t?qg(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,Rl=(t,r,i)=>(ey(t,typeof r!="symbol"?r+"":r,i),i);const ty=Tt.createGlobalStyle`
|
|
359
359
|
.cm-s-material.CodeMirror {
|
|
360
360
|
background-color: var(--samples-panel-controls-background-color)!important;
|
|
361
361
|
color: var(--text-color-inverse)!important;
|
|
@@ -403,7 +403,7 @@ $3`);return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function Og(r){return r.i
|
|
|
403
403
|
flex: 1;
|
|
404
404
|
border-radius: var(--panel-border-radius);
|
|
405
405
|
}
|
|
406
|
-
`;class ry extends d.PureComponent{constructor(){super(...arguments);Rl(this,"editor"),Rl(this,"_onKeyUp",(
|
|
406
|
+
`;class ry extends d.PureComponent{constructor(){super(...arguments);Rl(this,"editor"),Rl(this,"_onKeyUp",(r,i)=>{/^[a-zA-Z0-9_":]$/.test(i.key)&&this.editor.execCommand("autocomplete")}),Rl(this,"initEditor",r=>{this.editor=r,r.on("keyup",this._onKeyUp)}),Rl(this,"refreshEditor",()=>{this.editor.refresh()}),Rl(this,"showHintHandler",()=>this.editor.showHint({completeSingle:!0}))}componentDidMount(){setTimeout(()=>{this.editor.refresh()},0),document.addEventListener("click",this.refreshEditor)}componentWillUnmount(){document.removeEventListener("click",this.refreshEditor)}render(){const{value:r}=this.props.fieldState,{setValue:i,setTouched:o,setError:s}=this.props.fieldApi,{onChange:p,onBlur:y,forwardedRef:A}=this.props;return d.createElement(d.Fragment,null,d.createElement(ty,null),d.createElement(Kv.fk,{editorDidMount:this.initEditor,value:r||"",ref:A,onBeforeChange:(w,E,F)=>{i(F),p&&p(F)},onBlur:w=>{o(!1),y&&y(w)},options:{mode:this.props.mode||pf.T.JSON,theme:"material",matchBrackets:!0,autoCloseBrackets:!0,tabSize:2,foldGutter:!0,extraKeys:{"Cmd-Space":this.showHintHandler,"Ctrl-Space":this.showHintHandler},hintOptions:{id:this.props.id,completeSingle:!1,schema:this.props.schema},lint:{id:this.props.id,schema:this.props.schema,setError:s}}}))}}const ny=$r(ry);var iy=Object.defineProperty,ay=Object.defineProperties,oy=Object.getOwnPropertyDescriptors,qp=Object.getOwnPropertySymbols,sy=Object.prototype.hasOwnProperty,ly=Object.prototype.propertyIsEnumerable,eh=(t,r,i)=>r in t?iy(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,uy=(t,r)=>{for(var i in r||(r={}))sy.call(r,i)&&eh(t,i,r[i]);if(qp)for(var i of qp(r))ly.call(r,i)&&eh(t,i,r[i]);return t},fy=(t,r)=>ay(t,oy(r));const cy=(0,Fa.Pi)(({body:t,formApi:r,resolvedBody:i,properties:o,id:s,validate:p})=>{var y,A;const w=t.content,E=ye=>{var ge;if(!w||!w.hasSample)return"";const Ae=(ge=w.active)==null?void 0:ge.examples;if(!(Ae==null?void 0:Ae[ye]))return"";const me=Ae==null?void 0:Ae[ye].value,Te=o?jv()(me,o,{arrayMerge:Gn.lN}):me;return JSON.stringify(Te,null,2)},F=(y=w==null?void 0:w.operation)==null?void 0:y.activeExampleName,G=ye=>{w==null||w.activateExampleName(ye),r.setValue("body",E(ye))},te=(ye,ge)=>{r.setValue(`body.${ye}`,ge)};(0,d.useEffect)(()=>{var ye,ge;if((ye=w==null?void 0:w.operation)==null?void 0:ye.activeMimeName){const Ae=(0,tr.P6)(s,w.operation.activeMimeName,F,(ge=w==null?void 0:w.active)==null?void 0:ge.examples);r.setValue("body",(0,Gt.YQ)(Ae)||E(F||""))}else r.setValue("body",JSON.stringify(o||{},null,2))},[F,(A=w==null?void 0:w.operation)==null?void 0:A.activeMimeName,w==null?void 0:w.active]);const ne=ye=>d.createElement(Wt.DropdownOrLabel,fy(uy({},ye),{variant:"dark",fullWidth:!0,Label:$v,Dropdown:vr.Dropdown})),se=(0,d.useCallback)((ye="",ge="",Ae=[])=>me=>{(0,Gt.WW)((0,tr.P6)(s,ye,ge,Ae),me)},[s]);return d.createElement(d.Fragment,null,d.createElement(Wt.MediaTypesSwitch,{content:t.content,renderDropdown:ne},ye=>{const ge=ye.examples||{},Ae=Object.keys(ge),me=ye.schema,Te=dt(me||{},ye.name)||ye.name===pf.T.MULTIPART||ye.name===pf.T.URL_ENCODED,{exampleKey:He}=(0,zc.C6)(ye.operation,ge),Be=(0,Gt.YQ)((0,tr.P6)(s,ye.name,He,ge))||(0,tr.oY)(ge[He],o);return d.createElement(d.Fragment,null,Ae.length&&Ae.length!==1&&d.createElement(zc.b_,{examples:ge,onChange:G,exampleKey:He,panel:"try-it"})||null,Te?d.createElement(zv,{mediaType:ye,formApi:r,onChange:te}):d.createElement(ny,{id:"body"+s,field:"body",initialValue:Be,schema:((i==null?void 0:i.content[ye.name])||{}).schema,mode:ye.name,validate:p,onChange:se(ye.name,He,ge)}))}))}),dy=(0,d.memo)(cy);function py({response:t}){return d.createElement(d.Fragment,null,d.createElement(an.EE,null," Body: "),hy(t))}function hy(t){return t.body?d.createElement(oa.JsonViewer,{data:t.body,jsonSampleExpandLevel:1}):t.fileInfo?d.createElement(Wt.SourceCodeWithFile,{fileInfo:t.fileInfo}):t.data!==null?t.data?d.createElement(oa.SourceCode,{lang:(0,Wt.langFromMime)(t.headers["Content-Type"]||"text/plain"),source:t.data,withCopyButton:!0}):d.createElement(an.w3,null,d.createElement("i",null,"(no content)")):null}function vy({headers:t}){const r=d.useContext(Wt.OptionsContext),[i,o]=d.useState(!0),{maxResponseHeadersToShowInTryIt:s}=r,p=Object.keys(t),y=!!s&&p.length>s,A=y&&i?[...p].splice(0,s):[...p],w=()=>{o(!i)};return d.createElement(d.Fragment,null,d.createElement(an.EE,null," Headers: "),d.createElement(an.w3,null,A.map(E=>d.createElement("div",{key:E},d.createElement(th,null,E,":"),d.createElement("code",null,t[E]))),y&&d.createElement(rh,{onClick:w},i?"Show more...":"Hide headers")))}const th=Tt.default.strong`
|
|
407
407
|
text-transform: capitalize;
|
|
408
408
|
display: inline-block;
|
|
409
409
|
padding-right: 5px;
|
|
@@ -420,33 +420,33 @@ $3`);return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function Og(r){return r.i
|
|
|
420
420
|
text-align: center;
|
|
421
421
|
color: var(--text-color-inverse);
|
|
422
422
|
`,yy=(0,Tt.default)(od)`
|
|
423
|
-
color: ${({code:
|
|
423
|
+
color: ${({code:t})=>t>=200&&t<300?"var(--response-success-text-color)":t>=300&&t<400?"var(--response-redirect-text-color)":t>400?"var(--response-error-text-color)":"var(--response-info-text-color)"};
|
|
424
424
|
`,nh=Tt.default.header`
|
|
425
425
|
font-weight: bold;
|
|
426
426
|
margin-bottom: 10px;
|
|
427
427
|
`,my=Tt.default.code`
|
|
428
428
|
border-left: 3px solid #ff4040;
|
|
429
429
|
padding-left: 5px;
|
|
430
|
-
`;class xy extends d.PureComponent{render(){const{error:
|
|
430
|
+
`;class xy extends d.PureComponent{render(){const{error:r,response:i,time:o}=this.props,s=i||r&&r.response,p=s&&s.data&&s.data.length||0;let y;return p>1e6?y=(p/1e6).toFixed(2)+" MB":p>1e3?y=(p/1e3).toFixed(2)+" KB":y=p+" B",r&&!r.response||!s?d.createElement(d.Fragment,null,d.createElement(nh,null," Could not get any response "),d.createElement(my,null,r&&r.message||"Unknown error"),d.createElement("br",null),d.createElement(nh,null," Why this might have happened:"),d.createElement("div",null," - CORS is misconfigured on the server"),d.createElement("div",null," - The server couldn't send a response"),d.createElement("div",null," - No internet access"),d.createElement("div",null," - Documentation issue - contact API owner"),d.createElement("div",null," - Misconfigured security definition")):s?d.createElement(d.Fragment,null,d.createElement(gy,null,d.createElement(yy,{code:s.status},d.createElement("span",null," Status: "),s.status," ",s.statusText),d.createElement(od,null,d.createElement("span",null," Time: "),o,"ms"),d.createElement(od,null,d.createElement("span",null," Size: "),y)),d.createElement("div",null,d.createElement(vy,{headers:s.headers}),d.createElement(py,{response:s}))):d.createElement(d.Fragment,null,"Something went wrong")}}var ih=a(46538);function by(t,r,i){const o=r.path||{},s=r.query||{},p=Object.keys(s);let y=(0,tr.v5)(t,o);const A=w=>i.find(E=>E.name===w&&E.in==="query");return p.length&&(y+="?"+p.map(w=>{if(!s[w])return"";const E=A(w);return E?(0,Wt.serializeParameterValue)(E,s[w]):`${w}=${encodeURIComponent(s[w])}`}).filter(Boolean).join("&")),y}const wy=({loading:t,operation:r,hasResponse:i,execute:o,params:s={}})=>d.createElement(vi.k1,null,d.createElement(ih.__,null,d.createElement(Qd.FH,{type:r.httpVerb},r.httpVerb),d.createElement(ih.y$,{wrap:"true"},by(r.path,s,r.parameters))),d.createElement(Sy,{"data-cy":"send-button",color:"primary",blinking:t,onClick:()=>!t&&o()},t?"Sending...":i?"Resend":"Send")),Sy=(0,Tt.default)(uf.Button)`
|
|
431
431
|
width: var(--panel-try-it-action-button-width);
|
|
432
|
-
`,Ay=d.memo(wy);function Ey({name:
|
|
432
|
+
`,Ay=d.memo(wy);function Ey({name:t,value:r,description:i,variableEnum:o,onChange:s,defaultValue:p}){const y=(0,d.useCallback)(E=>s(E.target.value),[s]),A=(0,d.useCallback)(E=>s(E.value),[s]),w=o?o.map((E,F)=>({value:E,idx:F})):[];return d.createElement(it.NI,null,d.createElement(it.lX,null,t,":"),w&&w.length?d.createElement(an.VD,{fullWidth:!0,variant:"dark",value:r,options:w,onChange:A}):d.createElement($n,{fullWidth:!0,value:r,onChange:y,placeholder:p,panel:"try-it"}),i&&d.createElement(Cy,{compact:!0,source:i}))}const Cy=(0,Tt.default)(Wt.Markdown)`
|
|
433
433
|
margin-top: 5px;
|
|
434
434
|
color: #d0d0d0;
|
|
435
|
-
`;var Oy=Object.defineProperty,Ty=Object.defineProperties,Py=Object.getOwnPropertyDescriptors,ah=Object.getOwnPropertySymbols,Iy=Object.prototype.hasOwnProperty,Fy=Object.prototype.propertyIsEnumerable,oh=(r,
|
|
435
|
+
`;var Oy=Object.defineProperty,Ty=Object.defineProperties,Py=Object.getOwnPropertyDescriptors,ah=Object.getOwnPropertySymbols,Iy=Object.prototype.hasOwnProperty,Fy=Object.prototype.propertyIsEnumerable,oh=(t,r,i)=>r in t?Oy(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,sh=(t,r)=>{for(var i in r||(r={}))Iy.call(r,i)&&oh(t,i,r[i]);if(ah)for(var i of ah(r))Fy.call(r,i)&&oh(t,i,r[i]);return t},lh=(t,r)=>Ty(t,Py(r));const ky=(0,Fa.Pi)(({operation:t,onChange:r})=>{const i=(0,Gt.YQ)("serverUrl"),o=t.servers.findIndex(te=>te.url===i),[s,p]=(0,d.useState)(o<0?0:o),[y,A]=(0,d.useState)({});(0,Sr.b6)(()=>{const te=(0,tr.fz)(t.servers,s);r(te),A(te.variables)});const w=te=>{const ne=t.servers.find(ge=>ge.url===te.serverUrl),se=t.servers.findIndex(ge=>ge.url===te.serverUrl),ye=(0,tr.mj)(ne);r({url:te.serverUrl||"",variables:ye}),(0,Gt.WW)("serverUrl",te.serverUrl||""),p(se),A(ye)},E=(te,ne)=>{const se=t.servers[s],ye=ne||ne===""?ne:(0,tr.mj)(se)[te],ge=lh(sh({},y),{[te]:ye});A(ge),(0,tr.UY)(te,ye),r(lh(sh({},se),{variables:ge}))},F=t.servers.map((te,ne)=>({idx:ne,serverUrl:te.url,value:`
|
|
436
436
|
${(0,tr.nq)((0,tr.v5)(te.url,y),te.variables)}
|
|
437
437
|
- ${te.description||"Default"}
|
|
438
|
-
`})),G=Object.keys(y);return d.createElement(My,{"data-cy":"console-target-server"},d.createElement(it.lX,{htmlFor:"server"},"Target server: "),d.createElement(it.NI,null,d.createElement(an.VD,{variant:"dark",value:F[s].value,options:F,fullWidth:!0,onChange:w})),G==null?void 0:G.map(te=>{var ne;const se=(ne=
|
|
438
|
+
`})),G=Object.keys(y);return d.createElement(My,{"data-cy":"console-target-server"},d.createElement(it.lX,{htmlFor:"server"},"Target server: "),d.createElement(it.NI,null,d.createElement(an.VD,{variant:"dark",value:F[s].value,options:F,fullWidth:!0,onChange:w})),G==null?void 0:G.map(te=>{var ne;const se=(ne=t.servers[s].variables)==null?void 0:ne[te];if(se)return d.createElement(Ey,{key:te,name:te,value:y[te],defaultValue:se.default,onChange:ye=>E(te,ye),variableEnum:se.enum,description:se.description})}))}),My=Tt.default.div`
|
|
439
439
|
margin-bottom: 20px;
|
|
440
|
-
`;var Ry=Object.defineProperty,Ly=Object.defineProperties,Dy=Object.getOwnPropertyDescriptors,Tf=Object.getOwnPropertySymbols,uh=Object.prototype.hasOwnProperty,fh=Object.prototype.propertyIsEnumerable,ch=(r,
|
|
440
|
+
`;var Ry=Object.defineProperty,Ly=Object.defineProperties,Dy=Object.getOwnPropertyDescriptors,Tf=Object.getOwnPropertySymbols,uh=Object.prototype.hasOwnProperty,fh=Object.prototype.propertyIsEnumerable,ch=(t,r,i)=>r in t?Ry(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,Ny=(t,r)=>{for(var i in r||(r={}))uh.call(r,i)&&ch(t,i,r[i]);if(Tf)for(var i of Tf(r))fh.call(r,i)&&ch(t,i,r[i]);return t},By=(t,r)=>Ly(t,Dy(r)),Uy=(t,r)=>{var i={};for(var o in t)uh.call(t,o)&&r.indexOf(o)<0&&(i[o]=t[o]);if(t!=null&&Tf)for(var o of Tf(t))r.indexOf(o)<0&&fh.call(t,o)&&(i[o]=t[o]);return i};function sd(t){var r=t,{header:i,error:o,success:s}=r,p=Uy(r,["header","error","success"]);const y=({toggle:A,expanded:w=!1})=>d.createElement(oa.PanelHeader,{onClick:A,expanded:w,"data-cy":p["data-cy"]},d.createElement(vi.xz,null,d.createElement(oa.PanelHeaderTitle,null,i),d.createElement(oa.ShelfIcon,{direction:w?"down":"right"})),o&&d.createElement(Wt.CrossIcon,{size:"14px",color:"--color-error-500"})||null,s&&d.createElement(Wt.LockIcon,{size:"14px",color:"--color-success-500"})||null);return d.createElement(jy,By(Ny({className:"panel-try-it-nested"},p),{header:y}))}const jy=(0,Tt.default)(oa.Panel)`
|
|
441
441
|
${oa.PanelHeader} {
|
|
442
442
|
border: 1px solid
|
|
443
|
-
${({error:
|
|
443
|
+
${({error:t})=>t?"var(--color-error-300)":"var(--panel-try-it-nested-heading-border-color)"};
|
|
444
444
|
padding: 10px;
|
|
445
445
|
}
|
|
446
446
|
|
|
447
447
|
${oa.PanelBody} {
|
|
448
448
|
border: 1px solid
|
|
449
|
-
${({error:
|
|
449
|
+
${({error:t})=>t?"var(--color-error-300)":"var(--panel-try-it-nested-body-border-color)"};
|
|
450
450
|
border-top: 0;
|
|
451
451
|
}
|
|
452
452
|
`,Vy=Tt.default.div`
|
|
@@ -484,18 +484,18 @@ $3`);return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function Og(r){return r.i
|
|
|
484
484
|
background-color: var(--panel-try-it-tabs-hover-background-color);
|
|
485
485
|
}
|
|
486
486
|
|
|
487
|
-
${({active:
|
|
487
|
+
${({active:t})=>t&&Tt.css`
|
|
488
488
|
border-color: var(--panel-try-it-tabs-active-border-color);
|
|
489
489
|
background-color: var(--panel-try-it-tabs-active-background-color);
|
|
490
490
|
`||""}
|
|
491
491
|
|
|
492
|
-
${({disabled:
|
|
492
|
+
${({disabled:t})=>t&&Tt.css`
|
|
493
493
|
cursor: default;
|
|
494
494
|
border-color: var(--panel-try-it-tabs-disables-border-color)
|
|
495
495
|
background-color: var(--panel-try-it-tabs-disabled-background-color);
|
|
496
496
|
color: var(--panel-try-it-tabs-disabled-text-color);
|
|
497
497
|
`||""}
|
|
498
|
-
`;function Wy({onChange:r,active:t,hasResponse:i}){return d.createElement(Vy,null,d.createElement(dh,{onClick:()=>r(0),active:t===0},i?"Edit Request":"Request"),d.createElement(dh,{onClick:()=>i&&r(1),active:t===1,disabled:!i}," ","Response"," "))}var ph=Object.defineProperty,Hy=Object.defineProperties,zy=Object.getOwnPropertyDescriptor,Gy=Object.getOwnPropertyDescriptors,Pf=Object.getOwnPropertySymbols,hh=Object.prototype.hasOwnProperty,vh=Object.prototype.propertyIsEnumerable,ld=(r,t,i)=>t in r?ph(r,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[t]=i,Xr=(r,t)=>{for(var i in t||(t={}))hh.call(t,i)&&ld(r,i,t[i]);if(Pf)for(var i of Pf(t))vh.call(t,i)&&ld(r,i,t[i]);return r},Rn=(r,t)=>Hy(r,Gy(t)),gh=(r,t)=>{var i={};for(var o in r)hh.call(r,o)&&t.indexOf(o)<0&&(i[o]=r[o]);if(r!=null&&Pf)for(var o of Pf(r))t.indexOf(o)<0&&vh.call(r,o)&&(i[o]=r[o]);return i},$y=(r,t,i,o)=>{for(var s=o>1?void 0:o?zy(t,i):t,p=r.length-1,y;p>=0;p--)(y=r[p])&&(s=(o?y(t,i,s):y(s))||s);return o&&s&&ph(t,i,s),s},vs=(r,t,i)=>(ld(r,typeof t!="symbol"?t+"":t,i),i),yh=(r,t,i)=>new Promise((o,s)=>{var p=w=>{try{A(i.next(w))}catch(E){s(E)}},y=w=>{try{A(i.throw(w))}catch(E){s(E)}},A=w=>w.done?o(w.value):Promise.resolve(w.value).then(p,y);A((i=i.apply(r,t)).next())});function mh(r){return r.startsWith("//")?"https:"+r:r}const Ky={flex:1,display:"flex",flexDirection:"column"};let ud=class extends d.Component{constructor(r){super(r);vs(this,"formApi"),vs(this,"setFormApi",(t,i=t.getState())=>{var o=i,{values:s}=o,p=gh(o,["values"]);this.formApi=t,setTimeout(()=>{const y=Rn(Xr({},p),{values:Rn(Xr({},s),{query:(0,tr.FU)(s.query||{})})});this.setState({form:y})},0)}),vs(this,"handleChange",t=>{var i=t,{values:o}=i,s=gh(i,["values"]);const p=Rn(Xr({},s),{values:Rn(Xr({},o),{query:(0,tr.FU)(o.query||{})})});this.setState({form:p}),(0,tr.Hc)(p),this.props.operation.setRequestValues(o)}),vs(this,"handleTabChange",t=>{this.setState({activeTab:t})}),vs(this,"handleServerChange",t=>{this.setState({server:t}),this.props.operation.setActiveServer(t)}),vs(this,"handleExecute",()=>yh(this,null,function*(){var t,i,o,s,p,y,A,w;const{store:E,operation:F,onResponse:G}=this.props,{values:te,invalid:ne}=this.state.form;if((t=this.formApi)==null||t.submitForm(),ne){this.setState({shaking:!0}),setTimeout(()=>this.setState({shaking:!1}),1e3),(o=(i=E==null?void 0:E.options.events)==null?void 0:i.tryItSent)==null||o.call(i,{eventType:bl.nQ.TryItSent,resource:"Redocly_OperationTryIt",action:"ValidationFailed",operationId:F.operationId,operationPath:F.path,operationHttpVerb:F.httpVerb,operationSummary:F.description});return}const{servers:se,requestBody:ye}=this.props.operation,ge=ye&&ye.content&&ye.content.active&&ye.content.active.name||"";let Ae=te.body;if(/json/.test(ge))try{Ae=JSON.parse(Ae)}catch($e){console.error($e)}this.setState({loading:!0});const me=this.state.resolvedRawSpec,Te=(F.httpVerb||"").toLowerCase();if(!se)throw console.error("Servers are not specified in your OpenAPI file. You can't use Try It Out console without specifying servers. If you use OpenAPI 2, make sure you configured host and basepath"),new Error("Servers are not specified");const He=se.find($e=>this.state.server.url.endsWith($e.url.endsWith("/")?$e.url.substring(0,$e.url.length-1):$e.url)),Be=Date.now(),ze=!!window.document.documentMode;let De,Ue=te.auth;if(te.auth){const $e=Object.keys(te.auth)[0],gt=(0,Gt.dw)($e);De=Rn(Xr({},me),{components:Rn(Xr({},me==null?void 0:me.components),{securitySchemes:Rn(Xr({},me==null?void 0:me.components.securitySchemes),{[gt]:Rn(Xr({},me==null?void 0:me.components.securitySchemes[gt]),{type:(me==null?void 0:me.components.securitySchemes[gt].type)==="openIdConnect"?"oauth2":me==null?void 0:me.components.securitySchemes[gt].type})})})}),Ue=Rn(Xr({},Ue),{[gt]:Ue[$e]})}else De=Xr({},me);De.servers=se;const We=E.options.corsProxyUrl;We&&se.length&&(De.servers=se.map($e=>Rn(Xr({},$e),{url:We+mh($e.url)})),De.paths=Rn(Xr({},De.paths),{[F.path]:Rn(Xr({},De.paths[F.path]),{[Te]:Rn(Xr({},De.paths[F.path][Te]),{servers:void 0}),servers:void 0})}));const Je=((p=(s=ye==null?void 0:ye.content)==null?void 0:s.active)==null?void 0:p.name)||null;if(Je&&Ae&&ct(Je)){const $e=Object.values(Ae);Ae=$e.length>1?$e:$e[0]}const et={userFetch:ze&&a(54098).fetch,server:We?We+mh(He.url):He.url,serverVariables:this.state.server.variables,spec:De,pathName:F.path,method:F.httpVerb,parameters:Xr(Xr(Xr(Xr({},te.path),te.query),te.header),te.cookie),securities:{authorized:Ue},requestBody:Ae,requestContentType:Je,responseContentType:((y=te.header)==null?void 0:y.Accept)||null,requestInterceptor:(0,tr.Tz)(E.options,F,Ue==null?void 0:Ue.Authorization)};try{const $e=yield Dc.execute(et),gt=$e==null?void 0:$e.data;gt instanceof Blob&&(ct(gt.type)&&($e.fileInfo={rawData:gt,fileName:(0,tr.AM)($e.headers)}),$e.data=yield gt.text()),G==null||G({request:et,response:$e}),this.setState({response:$e,error:void 0})}catch($e){$e&&$e.response&&$e.response.data instanceof Blob&&($e.response.data=yield $e.response.data.text(),G==null||G({request:et,response:$e.response})),this.setState({response:void 0,error:$e})}finally{this.setState({loading:!1,activeTab:1,time:Date.now()-Be}),(w=(A=E==null?void 0:E.options.events)==null?void 0:A.tryItSent)==null||w.call(A,{eventType:bl.nQ.TryItSent,resource:"Redocly_OperationTryIt",action:"Sent",operationId:F.operationId,operationPath:F.path,operationHttpVerb:F.httpVerb,operationSummary:F.description})}})),this.state={form:{values:{path:(0,tr.ZS)(r.operation.parameters,"path"),cookie:(0,tr.ZS)(r.operation.parameters,"cookie"),header:(0,tr.ZS)(r.operation.parameters,"header"),query:(0,tr.ZS)(r.operation.parameters,"query")}},shaking:!1,loading:!1,activeTab:0,server:{}}}componentDidMount(){return yh(this,null,function*(){var r;const{store:t,operation:i}=this.props,o=yield t.dereferenceSpecForTryIt(i);this.setState({resolvedRawSpec:o}),(r=this.formApi)==null||r.setValues({})})}componentDidUpdate(r){r.operation!==this.props.operation&&this.setState({response:void 0,error:void 0,activeTab:0})}render(){const{operation:r,className:t,rootElement:i}=this.props,{shaking:o,activeTab:s,form:p,response:y,loading:A,error:w}=this.state,E=!!(y||w);return d.createElement(Jy,{shaking:o,className:t,rootElement:i},d.createElement(vi.Hc,null,d.createElement(Wy,{active:s,hasResponse:E,onChange:this.handleTabChange}),this.props.onClose&&d.createElement(an.PZ,{onClick:this.props.onClose}," \u2715 ")),d.createElement(an.RE,{hidden:s!==0,"data-cy":"console-request-body"},this.renderRequest()),d.createElement(an.RE,{hidden:s!==1,"data-cy":"console-response-body"},this.renderResponse()),d.createElement(Ay,{hasResponse:E,params:p.values,operation:r,loading:A,execute:this.handleExecute}))}renderRequest(){var r;const{operation:t,store:i,properties:o,securityDefaults:s}=this.props,{form:p,resolvedRawSpec:y,server:A}=this.state,w=p.errors||{},E=w.path||w.cookie||w.header||w.query,F=y&&Wt.JsonPointer.get(y,t.pointer);let G=p.values&&p.values.auth&&Object.keys(p.values.auth)[0];(!G||!p.values.auth[G])&&(G=void 0),G&&(p.values.auth[G].token!==void 0||p.values.auth[G].client_id!==void 0||p.values.auth[G].client_secret!==void 0)&&(!p.values.auth[G].token||!p.values.auth[G].token.access_token)&&(G=void 0),G&&p.values.auth[G].username!=null&&(!p.values.auth[G].username||!p.values.auth[G].password)&&(G=void 0);const te=t.parameters||[],ne=(r=i==null?void 0:i.options.hooks)==null?void 0:r.ReplaceTryItSecurityPanel;return!y&&d.createElement(d.Fragment,null,"Loading...")||d.createElement(zl,{onChange:this.handleChange,getApi:this.setFormApi,style:Rn(Xr({},Ky),{margin:0})},d.createElement(ky,{operation:t,onChange:this.handleServerChange}),d.createElement(vi.UQ,{initialActiveIdx:t.security.length&&G?1:0},t.security.length&&this.formApi&&d.createElement(sd,{header:(0,uo.l)("tryItAuth"),"data-cy":"security-trigger",error:!G&&!!w.auth,success:!!G,renderChildrenHidden:!0},ne?d.createElement(Xy,{field:"auth",validate:tr.np},se=>d.createElement(of.Q,{Hook:ne,props:{server:A,operation:t,onChange:se,OAuth2:m}})):d.createElement(Bv,{formApi:this.formApi,form:p,operation:t,activeServer:A.url,authCorsProxyUrl:i.options.authCorsProxyUrl,securityDefaults:s}))||null,t.requestBody&&d.createElement(sd,{header:(0,uo.l)("tryItBody"),"data-cy":"body-trigger",error:!!w.body,renderChildrenHidden:!0},d.createElement(dy,{validate:Yy,formApi:this.formApi,body:t.requestBody,id:t.id,resolvedBody:F==null?void 0:F.requestBody,properties:o}))||null,te.length&&d.createElement(sd,{header:(0,uo.l)("tryItParameters"),"data-cy":"parameters-trigger",error:E,renderChildrenHidden:!0},d.createElement(Vh,{operation:t,values:p.values,errors:p.errors||{}}))||null))}renderResponse(){const{response:r,error:t,time:i}=this.state;return d.createElement(xy,{response:r,error:t,time:i})}};ud=$y([Fa.Pi],ud);function Yy(){}function Jy(r){const{shaking:t,className:i,children:o,rootElement:s}=r,[p]=(0,Sr.Bs)(s),y=d.useContext(Wt.StoreContext);return d.createElement(an.q2,{scrollYOffset:y==null?void 0:y.options.scrollYOffset,shaking:t,className:i,"data-cy":"console",fullWidth:p==null?void 0:p.width},o)}function Xy(r){const{fieldApi:t,render:i,userProps:o}=Tn(Xr({},r)),{setValue:s}=t,{children:p}=o;return i(d.createElement(d.Fragment,null,p(s)))}},68929:()=>{},17648:h=>{"use strict";var I="Function.prototype.bind called on incompatible ",a=Array.prototype.slice,c=Object.prototype.toString,v="[object Function]";h.exports=function(d){var b=this;if(typeof b!="function"||c.call(b)!==v)throw new TypeError(I+b);for(var S=a.call(arguments,1),g,L=function(){if(this instanceof g){var W=b.apply(this,S.concat(a.call(arguments)));return Object(W)===W?W:this}else return b.apply(d,S.concat(a.call(arguments)))},D=Math.max(0,b.length-S.length),B=[],j=0;j<D;j++)B.push("$"+j);if(g=Function("binder","return function ("+B.join(",")+"){ return binder.apply(this,arguments); }")(L),b.prototype){var q=function(){};q.prototype=b.prototype,g.prototype=new q,q.prototype=null}return g}},58612:(h,I,a)=>{"use strict";var c=a(17648);h.exports=Function.prototype.bind||c},40210:(h,I,a)=>{"use strict";var c,v=SyntaxError,x=Function,d=TypeError,b=function(xe){try{return x('"use strict"; return ('+xe+").constructor;")()}catch(we){}},S=Object.getOwnPropertyDescriptor;if(S)try{S({},"")}catch(xe){S=null}var g=function(){throw new d},L=S?function(){try{return arguments.callee,g}catch(xe){try{return S(arguments,"callee").get}catch(we){return g}}}():g,D=a(41405)(),B=Object.getPrototypeOf||function(xe){return xe.__proto__},j={},q=typeof Uint8Array=="undefined"?c:B(Uint8Array),W={"%AggregateError%":typeof AggregateError=="undefined"?c:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?c:ArrayBuffer,"%ArrayIteratorPrototype%":D?B([][Symbol.iterator]()):c,"%AsyncFromSyncIteratorPrototype%":c,"%AsyncFunction%":j,"%AsyncGenerator%":j,"%AsyncGeneratorFunction%":j,"%AsyncIteratorPrototype%":j,"%Atomics%":typeof Atomics=="undefined"?c:Atomics,"%BigInt%":typeof BigInt=="undefined"?c:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?c:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array=="undefined"?c:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?c:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?c:FinalizationRegistry,"%Function%":x,"%GeneratorFunction%":j,"%Int8Array%":typeof Int8Array=="undefined"?c:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?c:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?c:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":D?B(B([][Symbol.iterator]())):c,"%JSON%":typeof JSON=="object"?JSON:c,"%Map%":typeof Map=="undefined"?c:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!D?c:B(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?c:Promise,"%Proxy%":typeof Proxy=="undefined"?c:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect=="undefined"?c:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?c:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!D?c:B(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?c:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":D?B(""[Symbol.iterator]()):c,"%Symbol%":D?Symbol:c,"%SyntaxError%":v,"%ThrowTypeError%":L,"%TypedArray%":q,"%TypeError%":d,"%Uint8Array%":typeof Uint8Array=="undefined"?c:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?c:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?c:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?c:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap=="undefined"?c:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?c:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?c:WeakSet},M=function xe(we){var he;if(we==="%AsyncFunction%")he=b("async function () {}");else if(we==="%GeneratorFunction%")he=b("function* () {}");else if(we==="%AsyncGeneratorFunction%")he=b("async function* () {}");else if(we==="%AsyncGenerator%"){var fe=xe("%AsyncGeneratorFunction%");fe&&(he=fe.prototype)}else if(we==="%AsyncIteratorPrototype%"){var oe=xe("%AsyncGenerator%");oe&&(he=B(oe.prototype))}return W[we]=he,he},X={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},R=a(58612),C=a(17642),V=R.call(Function.call,Array.prototype.concat),J=R.call(Function.apply,Array.prototype.splice),_=R.call(Function.call,String.prototype.replace),Q=R.call(Function.call,String.prototype.slice),Y=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ce=/\\(\\)?/g,ee=function(we){var he=Q(we,0,1),fe=Q(we,-1);if(he==="%"&&fe!=="%")throw new v("invalid intrinsic syntax, expected closing `%`");if(fe==="%"&&he!=="%")throw new v("invalid intrinsic syntax, expected opening `%`");var oe=[];return _(we,Y,function(Fe,Le,Me,Pe){oe[oe.length]=Me?_(Pe,ce,"$1"):Le||Fe}),oe},ie=function(we,he){var fe=we,oe;if(C(X,fe)&&(oe=X[fe],fe="%"+oe[0]+"%"),C(W,fe)){var Fe=W[fe];if(Fe===j&&(Fe=M(fe)),typeof Fe=="undefined"&&!he)throw new d("intrinsic "+we+" exists, but is not available. Please file an issue!");return{alias:oe,name:fe,value:Fe}}throw new v("intrinsic "+we+" does not exist!")};h.exports=function(we,he){if(typeof we!="string"||we.length===0)throw new d("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof he!="boolean")throw new d('"allowMissing" argument must be a boolean');var fe=ee(we),oe=fe.length>0?fe[0]:"",Fe=ie("%"+oe+"%",he),Le=Fe.name,Me=Fe.value,Pe=!1,rt=Fe.alias;rt&&(oe=rt[0],J(fe,V([0,1],rt)));for(var Ze=1,Xe=!0;Ze<fe.length;Ze+=1){var ft=fe[Ze],ht=Q(ft,0,1),wt=Q(ft,-1);if((ht==='"'||ht==="'"||ht==="`"||wt==='"'||wt==="'"||wt==="`")&&ht!==wt)throw new v("property names with quotes must have matching quotes");if((ft==="constructor"||!Xe)&&(Pe=!0),oe+="."+ft,Le="%"+oe+"%",C(W,Le))Me=W[Le];else if(Me!=null){if(!(ft in Me)){if(!he)throw new d("base intrinsic for "+we+" exists, but the property is not available.");return}if(S&&Ze+1>=fe.length){var nt=S(Me,ft);Xe=!!nt,Xe&&"get"in nt&&!("originalValue"in nt.get)?Me=nt.get:Me=Me[ft]}else Xe=C(Me,ft),Me=Me[ft];Xe&&!Pe&&(W[Le]=Me)}}return Me}},41405:(h,I,a)=>{"use strict";var c=typeof Symbol!="undefined"&&Symbol,v=a(55419);h.exports=function(){return typeof c!="function"||typeof Symbol!="function"||typeof c("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:v()}},55419:h=>{"use strict";h.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var a={},c=Symbol("test"),v=Object(c);if(typeof c=="string"||Object.prototype.toString.call(c)!=="[object Symbol]"||Object.prototype.toString.call(v)!=="[object Symbol]")return!1;var x=42;a[c]=x;for(c in a)return!1;if(typeof Object.keys=="function"&&Object.keys(a).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(a).length!==0)return!1;var d=Object.getOwnPropertySymbols(a);if(d.length!==1||d[0]!==c||!Object.prototype.propertyIsEnumerable.call(a,c))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var b=Object.getOwnPropertyDescriptor(a,c);if(b.value!==x||b.enumerable!==!0)return!1}return!0}},17642:(h,I,a)=>{"use strict";var c=a(58612);h.exports=c.call(Function.call,Object.prototype.hasOwnProperty)},80645:(h,I)=>{/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */I.read=function(a,c,v,x,d){var b,S,g=d*8-x-1,L=(1<<g)-1,D=L>>1,B=-7,j=v?d-1:0,q=v?-1:1,W=a[c+j];for(j+=q,b=W&(1<<-B)-1,W>>=-B,B+=g;B>0;b=b*256+a[c+j],j+=q,B-=8);for(S=b&(1<<-B)-1,b>>=-B,B+=x;B>0;S=S*256+a[c+j],j+=q,B-=8);if(b===0)b=1-D;else{if(b===L)return S?NaN:(W?-1:1)*(1/0);S=S+Math.pow(2,x),b=b-D}return(W?-1:1)*S*Math.pow(2,b-x)},I.write=function(a,c,v,x,d,b){var S,g,L,D=b*8-d-1,B=(1<<D)-1,j=B>>1,q=d===23?Math.pow(2,-24)-Math.pow(2,-77):0,W=x?0:b-1,M=x?1:-1,X=c<0||c===0&&1/c<0?1:0;for(c=Math.abs(c),isNaN(c)||c===1/0?(g=isNaN(c)?1:0,S=B):(S=Math.floor(Math.log(c)/Math.LN2),c*(L=Math.pow(2,-S))<1&&(S--,L*=2),S+j>=1?c+=q/L:c+=q*Math.pow(2,1-j),c*L>=2&&(S++,L/=2),S+j>=B?(g=0,S=B):S+j>=1?(g=(c*L-1)*Math.pow(2,d),S=S+j):(g=c*Math.pow(2,j-1)*Math.pow(2,d),S=0));d>=8;a[v+W]=g&255,W+=M,g/=256,d-=8);for(S=S<<d|g,D+=d;D>0;a[v+W]=S&255,W+=M,S/=256,D-=8);a[v+W-M]|=X*128}},5826:h=>{var I={}.toString;h.exports=Array.isArray||function(a){return I.call(a)=="[object Array]"}},57514:h=>{h.exports=window.FormData},93320:(h,I,a)=>{"use strict";var c=a(51294);h.exports=c},51294:(h,I,a)=>{"use strict";var c=a(40028),v=a(96157);function x(d){return function(){throw new Error("Function "+d+" is deprecated and cannot be used.")}}h.exports.Type=a(53899),h.exports.Schema=a(82409),h.exports.FAILSAFE_SCHEMA=a(75322),h.exports.JSON_SCHEMA=a(65796),h.exports.CORE_SCHEMA=a(17318),h.exports.DEFAULT_SAFE_SCHEMA=a(5972),h.exports.DEFAULT_FULL_SCHEMA=a(19321),h.exports.load=c.load,h.exports.loadAll=c.loadAll,h.exports.safeLoad=c.safeLoad,h.exports.safeLoadAll=c.safeLoadAll,h.exports.dump=v.dump,h.exports.safeDump=v.safeDump,h.exports.YAMLException=a(14884),h.exports.MINIMAL_SCHEMA=a(75322),h.exports.SAFE_SCHEMA=a(5972),h.exports.DEFAULT_SCHEMA=a(19321),h.exports.scan=x("scan"),h.exports.parse=x("parse"),h.exports.compose=x("compose"),h.exports.addConstructor=x("addConstructor")},25596:h=>{"use strict";function I(b){return typeof b=="undefined"||b===null}function a(b){return typeof b=="object"&&b!==null}function c(b){return Array.isArray(b)?b:I(b)?[]:[b]}function v(b,S){var g,L,D,B;if(S)for(B=Object.keys(S),g=0,L=B.length;g<L;g+=1)D=B[g],b[D]=S[D];return b}function x(b,S){var g="",L;for(L=0;L<S;L+=1)g+=b;return g}function d(b){return b===0&&Number.NEGATIVE_INFINITY===1/b}h.exports.isNothing=I,h.exports.isObject=a,h.exports.toArray=c,h.exports.repeat=x,h.exports.isNegativeZero=d,h.exports.extend=v},96157:(h,I,a)=>{"use strict";var c=a(25596),v=a(14884),x=a(19321),d=a(5972),b=Object.prototype.toString,S=Object.prototype.hasOwnProperty,g=9,L=10,D=13,B=32,j=33,q=34,W=35,M=37,X=38,R=39,C=42,V=44,J=45,_=58,Q=61,Y=62,ce=63,ee=64,ie=91,xe=93,we=96,he=123,fe=124,oe=125,Fe={};Fe[0]="\\0",Fe[7]="\\a",Fe[8]="\\b",Fe[9]="\\t",Fe[10]="\\n",Fe[11]="\\v",Fe[12]="\\f",Fe[13]="\\r",Fe[27]="\\e",Fe[34]='\\"',Fe[92]="\\\\",Fe[133]="\\N",Fe[160]="\\_",Fe[8232]="\\L",Fe[8233]="\\P";var Le=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function Me(N,re){var de,ae,pe,Ee,je,Ve,Qe;if(re===null)return{};for(de={},ae=Object.keys(re),pe=0,Ee=ae.length;pe<Ee;pe+=1)je=ae[pe],Ve=String(re[je]),je.slice(0,2)==="!!"&&(je="tag:yaml.org,2002:"+je.slice(2)),Qe=N.compiledTypeMap.fallback[je],Qe&&S.call(Qe.styleAliases,Ve)&&(Ve=Qe.styleAliases[Ve]),de[je]=Ve;return de}function Pe(N){var re,de,ae;if(re=N.toString(16).toUpperCase(),N<=255)de="x",ae=2;else if(N<=65535)de="u",ae=4;else if(N<=4294967295)de="U",ae=8;else throw new v("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+de+c.repeat("0",ae-re.length)+re}function rt(N){this.schema=N.schema||x,this.indent=Math.max(1,N.indent||2),this.noArrayIndent=N.noArrayIndent||!1,this.skipInvalid=N.skipInvalid||!1,this.flowLevel=c.isNothing(N.flowLevel)?-1:N.flowLevel,this.styleMap=Me(this.schema,N.styles||null),this.sortKeys=N.sortKeys||!1,this.lineWidth=N.lineWidth||80,this.noRefs=N.noRefs||!1,this.noCompatMode=N.noCompatMode||!1,this.condenseFlow=N.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Ze(N,re){for(var de=c.repeat(" ",re),ae=0,pe=-1,Ee="",je,Ve=N.length;ae<Ve;)pe=N.indexOf(`
|
|
498
|
+
`;function Wy({onChange:t,active:r,hasResponse:i}){return d.createElement(Vy,null,d.createElement(dh,{onClick:()=>t(0),active:r===0},i?"Edit Request":"Request"),d.createElement(dh,{onClick:()=>i&&t(1),active:r===1,disabled:!i}," ","Response"," "))}var ph=Object.defineProperty,Hy=Object.defineProperties,zy=Object.getOwnPropertyDescriptor,Gy=Object.getOwnPropertyDescriptors,Pf=Object.getOwnPropertySymbols,hh=Object.prototype.hasOwnProperty,vh=Object.prototype.propertyIsEnumerable,ld=(t,r,i)=>r in t?ph(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,Xr=(t,r)=>{for(var i in r||(r={}))hh.call(r,i)&&ld(t,i,r[i]);if(Pf)for(var i of Pf(r))vh.call(r,i)&&ld(t,i,r[i]);return t},Rn=(t,r)=>Hy(t,Gy(r)),gh=(t,r)=>{var i={};for(var o in t)hh.call(t,o)&&r.indexOf(o)<0&&(i[o]=t[o]);if(t!=null&&Pf)for(var o of Pf(t))r.indexOf(o)<0&&vh.call(t,o)&&(i[o]=t[o]);return i},$y=(t,r,i,o)=>{for(var s=o>1?void 0:o?zy(r,i):r,p=t.length-1,y;p>=0;p--)(y=t[p])&&(s=(o?y(r,i,s):y(s))||s);return o&&s&&ph(r,i,s),s},vs=(t,r,i)=>(ld(t,typeof r!="symbol"?r+"":r,i),i),yh=(t,r,i)=>new Promise((o,s)=>{var p=w=>{try{A(i.next(w))}catch(E){s(E)}},y=w=>{try{A(i.throw(w))}catch(E){s(E)}},A=w=>w.done?o(w.value):Promise.resolve(w.value).then(p,y);A((i=i.apply(t,r)).next())});function mh(t){return t.startsWith("//")?"https:"+t:t}const Ky={flex:1,display:"flex",flexDirection:"column"};let ud=class extends d.Component{constructor(t){super(t);vs(this,"formApi"),vs(this,"setFormApi",(r,i=r.getState())=>{var o=i,{values:s}=o,p=gh(o,["values"]);this.formApi=r,setTimeout(()=>{const y=Rn(Xr({},p),{values:Rn(Xr({},s),{query:(0,tr.FU)(s.query||{})})});this.setState({form:y})},0)}),vs(this,"handleChange",r=>{var i=r,{values:o}=i,s=gh(i,["values"]);const p=Rn(Xr({},s),{values:Rn(Xr({},o),{query:(0,tr.FU)(o.query||{})})});this.setState({form:p}),(0,tr.Hc)(p),this.props.operation.setRequestValues(o)}),vs(this,"handleTabChange",r=>{this.setState({activeTab:r})}),vs(this,"handleServerChange",r=>{this.setState({server:r}),this.props.operation.setActiveServer(r)}),vs(this,"handleExecute",()=>yh(this,null,function*(){var r,i,o,s,p,y,A,w;const{store:E,operation:F,onResponse:G}=this.props,{values:te,invalid:ne}=this.state.form;if((r=this.formApi)==null||r.submitForm(),ne){this.setState({shaking:!0}),setTimeout(()=>this.setState({shaking:!1}),1e3),(o=(i=E==null?void 0:E.options.events)==null?void 0:i.tryItSent)==null||o.call(i,{eventType:bl.nQ.TryItSent,resource:"Redocly_OperationTryIt",action:"ValidationFailed",operationId:F.operationId,operationPath:F.path,operationHttpVerb:F.httpVerb,operationSummary:F.description});return}const{servers:se,requestBody:ye}=this.props.operation,ge=ye&&ye.content&&ye.content.active&&ye.content.active.name||"";let Ae=te.body;if(/json/.test(ge))try{Ae=JSON.parse(Ae)}catch($e){console.error($e)}this.setState({loading:!0});const me=this.state.resolvedRawSpec,Te=(F.httpVerb||"").toLowerCase();if(!se)throw console.error("Servers are not specified in your OpenAPI file. You can't use Try It Out console without specifying servers. If you use OpenAPI 2, make sure you configured host and basepath"),new Error("Servers are not specified");const He=se.find($e=>this.state.server.url.endsWith($e.url.endsWith("/")?$e.url.substring(0,$e.url.length-1):$e.url)),Be=Date.now(),ze=!!window.document.documentMode;let De,Ue=te.auth;if(te.auth){const $e=Object.keys(te.auth)[0],gt=(0,Gt.dw)($e);De=Rn(Xr({},me),{components:Rn(Xr({},me==null?void 0:me.components),{securitySchemes:Rn(Xr({},me==null?void 0:me.components.securitySchemes),{[gt]:Rn(Xr({},me==null?void 0:me.components.securitySchemes[gt]),{type:(me==null?void 0:me.components.securitySchemes[gt].type)==="openIdConnect"?"oauth2":me==null?void 0:me.components.securitySchemes[gt].type})})})}),Ue=Rn(Xr({},Ue),{[gt]:Ue[$e]})}else De=Xr({},me);De.servers=se;const We=E.options.corsProxyUrl;We&&se.length&&(De.servers=se.map($e=>Rn(Xr({},$e),{url:We+mh($e.url)})),De.paths=Rn(Xr({},De.paths),{[F.path]:Rn(Xr({},De.paths[F.path]),{[Te]:Rn(Xr({},De.paths[F.path][Te]),{servers:void 0}),servers:void 0})}));const Je=((p=(s=ye==null?void 0:ye.content)==null?void 0:s.active)==null?void 0:p.name)||null;if(Je&&Ae&&ct(Je)){const $e=Object.values(Ae);Ae=$e.length>1?$e:$e[0]}const et={userFetch:ze&&a(54098).fetch,server:We?We+mh(He.url):He.url,serverVariables:this.state.server.variables,spec:De,pathName:F.path,method:F.httpVerb,parameters:Xr(Xr(Xr(Xr({},te.path),te.query),te.header),te.cookie),securities:{authorized:Ue},requestBody:Ae,requestContentType:Je,responseContentType:((y=te.header)==null?void 0:y.Accept)||null,requestInterceptor:(0,tr.Tz)(E.options,F,Ue==null?void 0:Ue.Authorization)};try{const $e=yield Dc.execute(et),gt=$e==null?void 0:$e.data;gt instanceof Blob&&(ct(gt.type)&&($e.fileInfo={rawData:gt,fileName:(0,tr.AM)($e.headers)}),$e.data=yield gt.text()),G==null||G({request:et,response:$e}),this.setState({response:$e,error:void 0})}catch($e){$e&&$e.response&&$e.response.data instanceof Blob&&($e.response.data=yield $e.response.data.text(),G==null||G({request:et,response:$e.response})),this.setState({response:void 0,error:$e})}finally{this.setState({loading:!1,activeTab:1,time:Date.now()-Be}),(w=(A=E==null?void 0:E.options.events)==null?void 0:A.tryItSent)==null||w.call(A,{eventType:bl.nQ.TryItSent,resource:"Redocly_OperationTryIt",action:"Sent",operationId:F.operationId,operationPath:F.path,operationHttpVerb:F.httpVerb,operationSummary:F.description})}})),this.state={form:{values:{path:(0,tr.ZS)(t.operation.parameters,"path"),cookie:(0,tr.ZS)(t.operation.parameters,"cookie"),header:(0,tr.ZS)(t.operation.parameters,"header"),query:(0,tr.ZS)(t.operation.parameters,"query")}},shaking:!1,loading:!1,activeTab:0,server:{}}}componentDidMount(){return yh(this,null,function*(){var t;const{store:r,operation:i}=this.props,o=yield r.dereferenceSpecForTryIt(i);this.setState({resolvedRawSpec:o}),(t=this.formApi)==null||t.setValues({})})}componentDidUpdate(t){t.operation!==this.props.operation&&this.setState({response:void 0,error:void 0,activeTab:0})}render(){const{operation:t,className:r,rootElement:i}=this.props,{shaking:o,activeTab:s,form:p,response:y,loading:A,error:w}=this.state,E=!!(y||w);return d.createElement(Jy,{shaking:o,className:r,rootElement:i},d.createElement(vi.Hc,null,d.createElement(Wy,{active:s,hasResponse:E,onChange:this.handleTabChange}),this.props.onClose&&d.createElement(an.PZ,{onClick:this.props.onClose}," \u2715 ")),d.createElement(an.RE,{hidden:s!==0,"data-cy":"console-request-body"},this.renderRequest()),d.createElement(an.RE,{hidden:s!==1,"data-cy":"console-response-body"},this.renderResponse()),d.createElement(Ay,{hasResponse:E,params:p.values,operation:t,loading:A,execute:this.handleExecute}))}renderRequest(){var t;const{operation:r,store:i,properties:o,securityDefaults:s}=this.props,{form:p,resolvedRawSpec:y,server:A}=this.state,w=p.errors||{},E=w.path||w.cookie||w.header||w.query,F=y&&Wt.JsonPointer.get(y,r.pointer);let G=p.values&&p.values.auth&&Object.keys(p.values.auth)[0];(!G||!p.values.auth[G])&&(G=void 0),G&&(p.values.auth[G].token!==void 0||p.values.auth[G].client_id!==void 0||p.values.auth[G].client_secret!==void 0)&&(!p.values.auth[G].token||!p.values.auth[G].token.access_token)&&(G=void 0),G&&p.values.auth[G].username!=null&&(!p.values.auth[G].username||!p.values.auth[G].password)&&(G=void 0);const te=r.parameters||[],ne=(t=i==null?void 0:i.options.hooks)==null?void 0:t.ReplaceTryItSecurityPanel;return!y&&d.createElement(d.Fragment,null,"Loading...")||d.createElement(zl,{onChange:this.handleChange,getApi:this.setFormApi,style:Rn(Xr({},Ky),{margin:0})},d.createElement(ky,{operation:r,onChange:this.handleServerChange}),d.createElement(vi.UQ,{initialActiveIdx:r.security.length&&G?1:0},r.security.length&&this.formApi&&d.createElement(sd,{header:(0,uo.l)("tryItAuth"),"data-cy":"security-trigger",error:!G&&!!w.auth,success:!!G,renderChildrenHidden:!0},ne?d.createElement(Xy,{field:"auth",validate:tr.np},se=>d.createElement(of.Q,{Hook:ne,props:{server:A,operation:r,onChange:se,OAuth2:m}})):d.createElement(Bv,{formApi:this.formApi,form:p,operation:r,activeServer:A.url,authCorsProxyUrl:i.options.authCorsProxyUrl,securityDefaults:s}))||null,r.requestBody&&this.formApi&&d.createElement(sd,{header:(0,uo.l)("tryItBody"),"data-cy":"body-trigger",error:!!w.body,renderChildrenHidden:!0},d.createElement(dy,{validate:Yy,formApi:this.formApi,body:r.requestBody,id:r.id,resolvedBody:F==null?void 0:F.requestBody,properties:o}))||null,te.length&&d.createElement(sd,{header:(0,uo.l)("tryItParameters"),"data-cy":"parameters-trigger",error:E,renderChildrenHidden:!0},d.createElement(Vh,{operation:r,values:p.values,errors:p.errors||{}}))||null))}renderResponse(){const{response:t,error:r,time:i}=this.state;return d.createElement(xy,{response:t,error:r,time:i})}};ud=$y([Fa.Pi],ud);function Yy(){}function Jy(t){const{shaking:r,className:i,children:o,rootElement:s}=t,[p]=(0,Sr.Bs)(s),y=d.useContext(Wt.StoreContext);return d.createElement(an.q2,{scrollYOffset:y==null?void 0:y.options.scrollYOffset,shaking:r,className:i,"data-cy":"console",fullWidth:p==null?void 0:p.width},o)}function Xy(t){const{fieldApi:r,render:i,userProps:o}=Tn(Xr({},t)),{setValue:s}=r,{children:p}=o;return i(d.createElement(d.Fragment,null,p(s)))}},68929:()=>{},17648:h=>{"use strict";var I="Function.prototype.bind called on incompatible ",a=Array.prototype.slice,c=Object.prototype.toString,v="[object Function]";h.exports=function(d){var b=this;if(typeof b!="function"||c.call(b)!==v)throw new TypeError(I+b);for(var S=a.call(arguments,1),g,L=function(){if(this instanceof g){var W=b.apply(this,S.concat(a.call(arguments)));return Object(W)===W?W:this}else return b.apply(d,S.concat(a.call(arguments)))},D=Math.max(0,b.length-S.length),B=[],j=0;j<D;j++)B.push("$"+j);if(g=Function("binder","return function ("+B.join(",")+"){ return binder.apply(this,arguments); }")(L),b.prototype){var q=function(){};q.prototype=b.prototype,g.prototype=new q,q.prototype=null}return g}},58612:(h,I,a)=>{"use strict";var c=a(17648);h.exports=Function.prototype.bind||c},40210:(h,I,a)=>{"use strict";var c,v=SyntaxError,x=Function,d=TypeError,b=function(xe){try{return x('"use strict"; return ('+xe+").constructor;")()}catch(we){}},S=Object.getOwnPropertyDescriptor;if(S)try{S({},"")}catch(xe){S=null}var g=function(){throw new d},L=S?function(){try{return arguments.callee,g}catch(xe){try{return S(arguments,"callee").get}catch(we){return g}}}():g,D=a(41405)(),B=Object.getPrototypeOf||function(xe){return xe.__proto__},j={},q=typeof Uint8Array=="undefined"?c:B(Uint8Array),W={"%AggregateError%":typeof AggregateError=="undefined"?c:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?c:ArrayBuffer,"%ArrayIteratorPrototype%":D?B([][Symbol.iterator]()):c,"%AsyncFromSyncIteratorPrototype%":c,"%AsyncFunction%":j,"%AsyncGenerator%":j,"%AsyncGeneratorFunction%":j,"%AsyncIteratorPrototype%":j,"%Atomics%":typeof Atomics=="undefined"?c:Atomics,"%BigInt%":typeof BigInt=="undefined"?c:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?c:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array=="undefined"?c:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?c:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?c:FinalizationRegistry,"%Function%":x,"%GeneratorFunction%":j,"%Int8Array%":typeof Int8Array=="undefined"?c:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?c:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?c:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":D?B(B([][Symbol.iterator]())):c,"%JSON%":typeof JSON=="object"?JSON:c,"%Map%":typeof Map=="undefined"?c:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!D?c:B(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?c:Promise,"%Proxy%":typeof Proxy=="undefined"?c:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect=="undefined"?c:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?c:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!D?c:B(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?c:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":D?B(""[Symbol.iterator]()):c,"%Symbol%":D?Symbol:c,"%SyntaxError%":v,"%ThrowTypeError%":L,"%TypedArray%":q,"%TypeError%":d,"%Uint8Array%":typeof Uint8Array=="undefined"?c:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?c:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?c:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?c:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap=="undefined"?c:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?c:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?c:WeakSet},M=function xe(we){var he;if(we==="%AsyncFunction%")he=b("async function () {}");else if(we==="%GeneratorFunction%")he=b("function* () {}");else if(we==="%AsyncGeneratorFunction%")he=b("async function* () {}");else if(we==="%AsyncGenerator%"){var fe=xe("%AsyncGeneratorFunction%");fe&&(he=fe.prototype)}else if(we==="%AsyncIteratorPrototype%"){var oe=xe("%AsyncGenerator%");oe&&(he=B(oe.prototype))}return W[we]=he,he},X={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},R=a(58612),C=a(17642),V=R.call(Function.call,Array.prototype.concat),J=R.call(Function.apply,Array.prototype.splice),_=R.call(Function.call,String.prototype.replace),Q=R.call(Function.call,String.prototype.slice),Y=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ce=/\\(\\)?/g,ee=function(we){var he=Q(we,0,1),fe=Q(we,-1);if(he==="%"&&fe!=="%")throw new v("invalid intrinsic syntax, expected closing `%`");if(fe==="%"&&he!=="%")throw new v("invalid intrinsic syntax, expected opening `%`");var oe=[];return _(we,Y,function(Fe,Le,Me,Pe){oe[oe.length]=Me?_(Pe,ce,"$1"):Le||Fe}),oe},ie=function(we,he){var fe=we,oe;if(C(X,fe)&&(oe=X[fe],fe="%"+oe[0]+"%"),C(W,fe)){var Fe=W[fe];if(Fe===j&&(Fe=M(fe)),typeof Fe=="undefined"&&!he)throw new d("intrinsic "+we+" exists, but is not available. Please file an issue!");return{alias:oe,name:fe,value:Fe}}throw new v("intrinsic "+we+" does not exist!")};h.exports=function(we,he){if(typeof we!="string"||we.length===0)throw new d("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof he!="boolean")throw new d('"allowMissing" argument must be a boolean');var fe=ee(we),oe=fe.length>0?fe[0]:"",Fe=ie("%"+oe+"%",he),Le=Fe.name,Me=Fe.value,Pe=!1,rt=Fe.alias;rt&&(oe=rt[0],J(fe,V([0,1],rt)));for(var Ze=1,Xe=!0;Ze<fe.length;Ze+=1){var ft=fe[Ze],ht=Q(ft,0,1),wt=Q(ft,-1);if((ht==='"'||ht==="'"||ht==="`"||wt==='"'||wt==="'"||wt==="`")&&ht!==wt)throw new v("property names with quotes must have matching quotes");if((ft==="constructor"||!Xe)&&(Pe=!0),oe+="."+ft,Le="%"+oe+"%",C(W,Le))Me=W[Le];else if(Me!=null){if(!(ft in Me)){if(!he)throw new d("base intrinsic for "+we+" exists, but the property is not available.");return}if(S&&Ze+1>=fe.length){var nt=S(Me,ft);Xe=!!nt,Xe&&"get"in nt&&!("originalValue"in nt.get)?Me=nt.get:Me=Me[ft]}else Xe=C(Me,ft),Me=Me[ft];Xe&&!Pe&&(W[Le]=Me)}}return Me}},41405:(h,I,a)=>{"use strict";var c=typeof Symbol!="undefined"&&Symbol,v=a(55419);h.exports=function(){return typeof c!="function"||typeof Symbol!="function"||typeof c("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:v()}},55419:h=>{"use strict";h.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var a={},c=Symbol("test"),v=Object(c);if(typeof c=="string"||Object.prototype.toString.call(c)!=="[object Symbol]"||Object.prototype.toString.call(v)!=="[object Symbol]")return!1;var x=42;a[c]=x;for(c in a)return!1;if(typeof Object.keys=="function"&&Object.keys(a).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(a).length!==0)return!1;var d=Object.getOwnPropertySymbols(a);if(d.length!==1||d[0]!==c||!Object.prototype.propertyIsEnumerable.call(a,c))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var b=Object.getOwnPropertyDescriptor(a,c);if(b.value!==x||b.enumerable!==!0)return!1}return!0}},17642:(h,I,a)=>{"use strict";var c=a(58612);h.exports=c.call(Function.call,Object.prototype.hasOwnProperty)},80645:(h,I)=>{/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */I.read=function(a,c,v,x,d){var b,S,g=d*8-x-1,L=(1<<g)-1,D=L>>1,B=-7,j=v?d-1:0,q=v?-1:1,W=a[c+j];for(j+=q,b=W&(1<<-B)-1,W>>=-B,B+=g;B>0;b=b*256+a[c+j],j+=q,B-=8);for(S=b&(1<<-B)-1,b>>=-B,B+=x;B>0;S=S*256+a[c+j],j+=q,B-=8);if(b===0)b=1-D;else{if(b===L)return S?NaN:(W?-1:1)*(1/0);S=S+Math.pow(2,x),b=b-D}return(W?-1:1)*S*Math.pow(2,b-x)},I.write=function(a,c,v,x,d,b){var S,g,L,D=b*8-d-1,B=(1<<D)-1,j=B>>1,q=d===23?Math.pow(2,-24)-Math.pow(2,-77):0,W=x?0:b-1,M=x?1:-1,X=c<0||c===0&&1/c<0?1:0;for(c=Math.abs(c),isNaN(c)||c===1/0?(g=isNaN(c)?1:0,S=B):(S=Math.floor(Math.log(c)/Math.LN2),c*(L=Math.pow(2,-S))<1&&(S--,L*=2),S+j>=1?c+=q/L:c+=q*Math.pow(2,1-j),c*L>=2&&(S++,L/=2),S+j>=B?(g=0,S=B):S+j>=1?(g=(c*L-1)*Math.pow(2,d),S=S+j):(g=c*Math.pow(2,j-1)*Math.pow(2,d),S=0));d>=8;a[v+W]=g&255,W+=M,g/=256,d-=8);for(S=S<<d|g,D+=d;D>0;a[v+W]=S&255,W+=M,S/=256,D-=8);a[v+W-M]|=X*128}},5826:h=>{var I={}.toString;h.exports=Array.isArray||function(a){return I.call(a)=="[object Array]"}},57514:h=>{h.exports=window.FormData},93320:(h,I,a)=>{"use strict";var c=a(51294);h.exports=c},51294:(h,I,a)=>{"use strict";var c=a(40028),v=a(96157);function x(d){return function(){throw new Error("Function "+d+" is deprecated and cannot be used.")}}h.exports.Type=a(53899),h.exports.Schema=a(82409),h.exports.FAILSAFE_SCHEMA=a(75322),h.exports.JSON_SCHEMA=a(65796),h.exports.CORE_SCHEMA=a(17318),h.exports.DEFAULT_SAFE_SCHEMA=a(5972),h.exports.DEFAULT_FULL_SCHEMA=a(19321),h.exports.load=c.load,h.exports.loadAll=c.loadAll,h.exports.safeLoad=c.safeLoad,h.exports.safeLoadAll=c.safeLoadAll,h.exports.dump=v.dump,h.exports.safeDump=v.safeDump,h.exports.YAMLException=a(14884),h.exports.MINIMAL_SCHEMA=a(75322),h.exports.SAFE_SCHEMA=a(5972),h.exports.DEFAULT_SCHEMA=a(19321),h.exports.scan=x("scan"),h.exports.parse=x("parse"),h.exports.compose=x("compose"),h.exports.addConstructor=x("addConstructor")},25596:h=>{"use strict";function I(b){return typeof b=="undefined"||b===null}function a(b){return typeof b=="object"&&b!==null}function c(b){return Array.isArray(b)?b:I(b)?[]:[b]}function v(b,S){var g,L,D,B;if(S)for(B=Object.keys(S),g=0,L=B.length;g<L;g+=1)D=B[g],b[D]=S[D];return b}function x(b,S){var g="",L;for(L=0;L<S;L+=1)g+=b;return g}function d(b){return b===0&&Number.NEGATIVE_INFINITY===1/b}h.exports.isNothing=I,h.exports.isObject=a,h.exports.toArray=c,h.exports.repeat=x,h.exports.isNegativeZero=d,h.exports.extend=v},96157:(h,I,a)=>{"use strict";var c=a(25596),v=a(14884),x=a(19321),d=a(5972),b=Object.prototype.toString,S=Object.prototype.hasOwnProperty,g=9,L=10,D=13,B=32,j=33,q=34,W=35,M=37,X=38,R=39,C=42,V=44,J=45,_=58,Q=61,Y=62,ce=63,ee=64,ie=91,xe=93,we=96,he=123,fe=124,oe=125,Fe={};Fe[0]="\\0",Fe[7]="\\a",Fe[8]="\\b",Fe[9]="\\t",Fe[10]="\\n",Fe[11]="\\v",Fe[12]="\\f",Fe[13]="\\r",Fe[27]="\\e",Fe[34]='\\"',Fe[92]="\\\\",Fe[133]="\\N",Fe[160]="\\_",Fe[8232]="\\L",Fe[8233]="\\P";var Le=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function Me(N,re){var de,ae,pe,Ee,je,Ve,Qe;if(re===null)return{};for(de={},ae=Object.keys(re),pe=0,Ee=ae.length;pe<Ee;pe+=1)je=ae[pe],Ve=String(re[je]),je.slice(0,2)==="!!"&&(je="tag:yaml.org,2002:"+je.slice(2)),Qe=N.compiledTypeMap.fallback[je],Qe&&S.call(Qe.styleAliases,Ve)&&(Ve=Qe.styleAliases[Ve]),de[je]=Ve;return de}function Pe(N){var re,de,ae;if(re=N.toString(16).toUpperCase(),N<=255)de="x",ae=2;else if(N<=65535)de="u",ae=4;else if(N<=4294967295)de="U",ae=8;else throw new v("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+de+c.repeat("0",ae-re.length)+re}function rt(N){this.schema=N.schema||x,this.indent=Math.max(1,N.indent||2),this.noArrayIndent=N.noArrayIndent||!1,this.skipInvalid=N.skipInvalid||!1,this.flowLevel=c.isNothing(N.flowLevel)?-1:N.flowLevel,this.styleMap=Me(this.schema,N.styles||null),this.sortKeys=N.sortKeys||!1,this.lineWidth=N.lineWidth||80,this.noRefs=N.noRefs||!1,this.noCompatMode=N.noCompatMode||!1,this.condenseFlow=N.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Ze(N,re){for(var de=c.repeat(" ",re),ae=0,pe=-1,Ee="",je,Ve=N.length;ae<Ve;)pe=N.indexOf(`
|
|
499
499
|
`,ae),pe===-1?(je=N.slice(ae),ae=Ve):(je=N.slice(ae,pe+1),ae=pe+1),je.length&&je!==`
|
|
500
500
|
`&&(Ee+=de),Ee+=je;return Ee}function Xe(N,re){return`
|
|
501
501
|
`+c.repeat(" ",N.indent*re)}function ft(N,re){var de,ae,pe;for(de=0,ae=N.implicitTypes.length;de<ae;de+=1)if(pe=N.implicitTypes[de],pe.resolve(re))return!0;return!1}function ht(N){return N===B||N===g}function wt(N){return 32<=N&&N<=126||161<=N&&N<=55295&&N!==8232&&N!==8233||57344<=N&&N<=65533&&N!==65279||65536<=N&&N<=1114111}function nt(N){return wt(N)&&!ht(N)&&N!==65279&&N!==D&&N!==L}function ut(N,re){return wt(N)&&N!==65279&&N!==V&&N!==ie&&N!==xe&&N!==he&&N!==oe&&N!==_&&(N!==W||re&&nt(re))}function mt(N){return wt(N)&&N!==65279&&!ht(N)&&N!==J&&N!==ce&&N!==_&&N!==V&&N!==ie&&N!==xe&&N!==he&&N!==oe&&N!==W&&N!==X&&N!==C&&N!==j&&N!==fe&&N!==Q&&N!==Y&&N!==R&&N!==q&&N!==M&&N!==ee&&N!==we}function xt(N){var re=/^\n* /;return re.test(N)}var pt=1,Mt=2,kt=3,Et=4,Ht=5;function jt(N,re,de,ae,pe){var Ee,je,Ve,Qe=!1,vt=!1,At=ae!==-1,Bt=-1,Pt=mt(N.charCodeAt(0))&&!ht(N.charCodeAt(N.length-1));if(re)for(Ee=0;Ee<N.length;Ee++){if(je=N.charCodeAt(Ee),!wt(je))return Ht;Ve=Ee>0?N.charCodeAt(Ee-1):null,Pt=Pt&&ut(je,Ve)}else{for(Ee=0;Ee<N.length;Ee++){if(je=N.charCodeAt(Ee),je===L)Qe=!0,At&&(vt=vt||Ee-Bt-1>ae&&N[Bt+1]!==" ",Bt=Ee);else if(!wt(je))return Ht;Ve=Ee>0?N.charCodeAt(Ee-1):null,Pt=Pt&&ut(je,Ve)}vt=vt||At&&Ee-Bt-1>ae&&N[Bt+1]!==" "}return!Qe&&!vt?Pt&&!pe(N)?pt:Mt:de>9&&xt(N)?Ht:vt?Et:kt}function Vt(N,re,de,ae){N.dump=function(){if(re.length===0)return"''";if(!N.noCompatMode&&Le.indexOf(re)!==-1)return"'"+re+"'";var pe=N.indent*Math.max(1,de),Ee=N.lineWidth===-1?-1:Math.max(Math.min(N.lineWidth,40),N.lineWidth-pe),je=ae||N.flowLevel>-1&&de>=N.flowLevel;function Ve(Qe){return ft(N,Qe)}switch(jt(re,je,N.indent,Ee,Ve)){case pt:return re;case Mt:return"'"+re.replace(/'/g,"''")+"'";case kt:return"|"+St(re,N.indent)+Dt(Ze(re,pe));case Et:return">"+St(re,N.indent)+Dt(Ze(ve(re,Ee),pe));case Ht:return'"'+$(re,Ee)+'"';default:throw new v("impossible error: invalid scalar style")}}()}function St(N,re){var de=xt(N)?String(re):"",ae=N[N.length-1]===`
|