@redocly/openapi-docs 3.4.10 → 3.4.11
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.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Redocly OpenAPI Docs
|
|
3
3
|
* (c) Copyright 2018 Redocly LLC, all rights reserved.
|
|
4
4
|
* -------------------------------------------------------------
|
|
5
|
-
* Version: "3.4.
|
|
5
|
+
* Version: "3.4.11"
|
|
6
6
|
*/(function(Kc,tc){typeof exports=="object"&&typeof module=="object"?module.exports=tc(require("null")):typeof define=="function"&&define.amd?define(["null"],tc):typeof exports=="object"?exports.RedoclyOpenAPIDocs=tc(require("null")):Kc.RedoclyOpenAPIDocs=tc(Kc.null)})(this,nf=>(()=>{var Kc={44607:(v,t,e)=>{"use strict";e.d(t,{A:()=>n});function n(d){var u=Object.create(null);return function(O){return u[O]===void 0&&(u[O]=d(O)),u[O]}}},61203:(v,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const n=e(85968),d=e(96735),u=e(44723),O=e(48226),p="https://json-schema.org/draft/2020-12/schema";class g extends n.default{constructor(P={}){super({...P,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),d.default.forEach(P=>this.addVocabulary(P)),this.opts.discriminator&&this.addKeyword(u.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:P,meta:b}=this.opts;b&&(O.default.call(this,P),this.refs["http://json-schema.org/schema"]=p)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(p)?p:void 0)}}v.exports=t=g,Object.defineProperty(t,"__esModule",{value:!0}),t.default=g;var f=e(9804);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return f.KeywordCxt}});var C=e(57287);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return C._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return C.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return C.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return C.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return C.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return C.CodeGen}})},76202:(v,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0,t._=u,t.str=p,t.addCodeArg=g,t.strConcat=y,t.stringify=b,t.safeStringify=I,t.getProperty=E,t.getEsmExportName=x,t.regexpCode=o;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends e{constructor(l){if(super(),!t.IDENTIFIER.test(l))throw new Error("CodeGen: name must be a valid identifier");this.str=l}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=n;class d extends e{constructor(l){super(),this._items=typeof l=="string"?[l]:l}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const l=this._items[0];return l===""||l==='""'}get str(){var l;return(l=this._str)!==null&&l!==void 0?l:this._str=this._items.reduce((R,S)=>`${R}${S}`,"")}get names(){var l;return(l=this._names)!==null&&l!==void 0?l:this._names=this._items.reduce((R,S)=>(S instanceof n&&(R[S.str]=(R[S.str]||0)+1),R),{})}}t._Code=d,t.nil=new d("");function u(a,...l){const R=[a[0]];let S=0;for(;S<l.length;)g(R,l[S]),R.push(a[++S]);return new d(R)}const O=new d("+");function p(a,...l){const R=[I(a[0])];let S=0;for(;S<l.length;)R.push(O),g(R,l[S]),R.push(O,I(a[++S]));return f(R),new d(R)}function g(a,l){l instanceof d?a.push(...l._items):l instanceof n?a.push(l):a.push(P(l))}function f(a){let l=1;for(;l<a.length-1;){if(a[l]===O){const R=C(a[l-1],a[l+1]);if(R!==void 0){a.splice(l-1,3,R);continue}a[l++]="+"}l++}}function C(a,l){if(l==='""')return a;if(a==='""')return l;if(typeof a=="string")return l instanceof n||a[a.length-1]!=='"'?void 0:typeof l!="string"?`${a.slice(0,-1)}${l}"`:l[0]==='"'?a.slice(0,-1)+l.slice(1):void 0;if(typeof l=="string"&&l[0]==='"'&&!(a instanceof n))return`"${a}${l.slice(1)}`}function y(a,l){return l.emptyStr()?a:a.emptyStr()?l:p`${a}${l}`}function P(a){return typeof a=="number"||typeof a=="boolean"||a===null?a:I(Array.isArray(a)?a.join(","):a)}function b(a){return new d(I(a))}function I(a){return JSON.stringify(a).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function E(a){return typeof a=="string"&&t.IDENTIFIER.test(a)?new d(`.${a}`):u`[${a}]`}function x(a){if(typeof a=="string"&&t.IDENTIFIER.test(a))return new d(`${a}`);throw new Error(`CodeGen: invalid export name: ${a}, use explicit $id name mapping`)}function o(a){return new d(a.toString())}},57287:(v,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0,t.not=De,t.and=ge,t.or=Y;const n=e(76202),d=e(34863);var u=e(76202);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return u.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return u.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return u.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}});var O=e(34863);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return O.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return O.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return O.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return O.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};class p{optimizeNodes(){return this}optimizeNames(Z,k){return this}}class g extends p{constructor(Z,k,ne){super(),this.varKind=Z,this.name=k,this.rhs=ne}render({es5:Z,_n:k}){const ne=Z?d.varKinds.var:this.varKind,_=this.rhs===void 0?"":` = ${this.rhs}`;return`${ne} ${this.name}${_};`+k}optimizeNames(Z,k){if(Z[this.name.str])return this.rhs&&(this.rhs=de(this.rhs,Z,k)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class f extends p{constructor(Z,k,ne){super(),this.lhs=Z,this.rhs=k,this.sideEffects=ne}render({_n:Z}){return`${this.lhs} = ${this.rhs};`+Z}optimizeNames(Z,k){if(!(this.lhs instanceof n.Name&&!Z[this.lhs.str]&&!this.sideEffects))return this.rhs=de(this.rhs,Z,k),this}get names(){const Z=this.lhs instanceof n.Name?{}:{...this.lhs.names};return ae(Z,this.rhs)}}class C extends f{constructor(Z,k,ne,_){super(Z,ne,_),this.op=k}render({_n:Z}){return`${this.lhs} ${this.op}= ${this.rhs};`+Z}}class y extends p{constructor(Z){super(),this.label=Z,this.names={}}render({_n:Z}){return`${this.label}:`+Z}}class P extends p{constructor(Z){super(),this.label=Z,this.names={}}render({_n:Z}){return`break${this.label?` ${this.label}`:""};`+Z}}class b extends p{constructor(Z){super(),this.error=Z}render({_n:Z}){return`throw ${this.error};`+Z}get names(){return this.error.names}}class I extends p{constructor(Z){super(),this.code=Z}render({_n:Z}){return`${this.code};`+Z}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(Z,k){return this.code=de(this.code,Z,k),this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class E extends p{constructor(Z=[]){super(),this.nodes=Z}render(Z){return this.nodes.reduce((k,ne)=>k+ne.render(Z),"")}optimizeNodes(){const{nodes:Z}=this;let k=Z.length;for(;k--;){const ne=Z[k].optimizeNodes();Array.isArray(ne)?Z.splice(k,1,...ne):ne?Z[k]=ne:Z.splice(k,1)}return Z.length>0?this:void 0}optimizeNames(Z,k){const{nodes:ne}=this;let _=ne.length;for(;_--;){const Ee=ne[_];Ee.optimizeNames(Z,k)||(je(Z,Ee.names),ne.splice(_,1))}return ne.length>0?this:void 0}get names(){return this.nodes.reduce((Z,k)=>ie(Z,k.names),{})}}class x extends E{render(Z){return"{"+Z._n+super.render(Z)+"}"+Z._n}}class o extends E{}class a extends x{}a.kind="else";class l extends x{constructor(Z,k){super(k),this.condition=Z}render(Z){let k=`if(${this.condition})`+super.render(Z);return this.else&&(k+="else "+this.else.render(Z)),k}optimizeNodes(){super.optimizeNodes();const Z=this.condition;if(Z===!0)return this.nodes;let k=this.else;if(k){const ne=k.optimizeNodes();k=this.else=Array.isArray(ne)?new a(ne):ne}if(k)return Z===!1?k instanceof l?k:k.nodes:this.nodes.length?this:new l(De(Z),k instanceof l?[k]:k.nodes);if(!(Z===!1||!this.nodes.length))return this}optimizeNames(Z,k){var ne;if(this.else=(ne=this.else)===null||ne===void 0?void 0:ne.optimizeNames(Z,k),!!(super.optimizeNames(Z,k)||this.else))return this.condition=de(this.condition,Z,k),this}get names(){const Z=super.names;return ae(Z,this.condition),this.else&&ie(Z,this.else.names),Z}}l.kind="if";class R extends x{}R.kind="for";class S extends R{constructor(Z){super(),this.iteration=Z}render(Z){return`for(${this.iteration})`+super.render(Z)}optimizeNames(Z,k){if(super.optimizeNames(Z,k))return this.iteration=de(this.iteration,Z,k),this}get names(){return ie(super.names,this.iteration.names)}}class T extends R{constructor(Z,k,ne,_){super(),this.varKind=Z,this.name=k,this.from=ne,this.to=_}render(Z){const k=Z.es5?d.varKinds.var:this.varKind,{name:ne,from:_,to:Ee}=this;return`for(${k} ${ne}=${_}; ${ne}<${Ee}; ${ne}++)`+super.render(Z)}get names(){const Z=ae(super.names,this.from);return ae(Z,this.to)}}class D extends R{constructor(Z,k,ne,_){super(),this.loop=Z,this.varKind=k,this.name=ne,this.iterable=_}render(Z){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(Z)}optimizeNames(Z,k){if(super.optimizeNames(Z,k))return this.iterable=de(this.iterable,Z,k),this}get names(){return ie(super.names,this.iterable.names)}}class $ extends x{constructor(Z,k,ne){super(),this.name=Z,this.args=k,this.async=ne}render(Z){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(Z)}}$.kind="func";class M extends E{render(Z){return"return "+super.render(Z)}}M.kind="return";class G extends x{render(Z){let k="try"+super.render(Z);return this.catch&&(k+=this.catch.render(Z)),this.finally&&(k+=this.finally.render(Z)),k}optimizeNodes(){var Z,k;return super.optimizeNodes(),(Z=this.catch)===null||Z===void 0||Z.optimizeNodes(),(k=this.finally)===null||k===void 0||k.optimizeNodes(),this}optimizeNames(Z,k){var ne,_;return super.optimizeNames(Z,k),(ne=this.catch)===null||ne===void 0||ne.optimizeNames(Z,k),(_=this.finally)===null||_===void 0||_.optimizeNames(Z,k),this}get names(){const Z=super.names;return this.catch&&ie(Z,this.catch.names),this.finally&&ie(Z,this.finally.names),Z}}class w extends x{constructor(Z){super(),this.error=Z}render(Z){return`catch(${this.error})`+super.render(Z)}}w.kind="catch";class q extends x{render(Z){return"finally"+super.render(Z)}}q.kind="finally";class re{constructor(Z,k={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...k,_n:k.lines?`
|
|
7
7
|
`:""},this._extScope=Z,this._scope=new d.Scope({parent:Z}),this._nodes=[new o]}toString(){return this._root.render(this.opts)}name(Z){return this._scope.name(Z)}scopeName(Z){return this._extScope.name(Z)}scopeValue(Z,k){const ne=this._extScope.value(Z,k);return(this._values[ne.prefix]||(this._values[ne.prefix]=new Set)).add(ne),ne}getScopeValue(Z,k){return this._extScope.getValue(Z,k)}scopeRefs(Z){return this._extScope.scopeRefs(Z,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(Z,k,ne,_){const Ee=this._scope.toName(k);return ne!==void 0&&_&&(this._constants[Ee.str]=ne),this._leafNode(new g(Z,Ee,ne)),Ee}const(Z,k,ne){return this._def(d.varKinds.const,Z,k,ne)}let(Z,k,ne){return this._def(d.varKinds.let,Z,k,ne)}var(Z,k,ne){return this._def(d.varKinds.var,Z,k,ne)}assign(Z,k,ne){return this._leafNode(new f(Z,k,ne))}add(Z,k){return this._leafNode(new C(Z,t.operators.ADD,k))}code(Z){return typeof Z=="function"?Z():Z!==n.nil&&this._leafNode(new I(Z)),this}object(...Z){const k=["{"];for(const[ne,_]of Z)k.length>1&&k.push(","),k.push(ne),(ne!==_||this.opts.es5)&&(k.push(":"),(0,n.addCodeArg)(k,_));return k.push("}"),new n._Code(k)}if(Z,k,ne){if(this._blockNode(new l(Z)),k&&ne)this.code(k).else().code(ne).endIf();else if(k)this.code(k).endIf();else if(ne)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(Z){return this._elseNode(new l(Z))}else(){return this._elseNode(new a)}endIf(){return this._endBlockNode(l,a)}_for(Z,k){return this._blockNode(Z),k&&this.code(k).endFor(),this}for(Z,k){return this._for(new S(Z),k)}forRange(Z,k,ne,_,Ee=this.opts.es5?d.varKinds.var:d.varKinds.let){const Oe=this._scope.toName(Z);return this._for(new T(Ee,Oe,k,ne),()=>_(Oe))}forOf(Z,k,ne,_=d.varKinds.const){const Ee=this._scope.toName(Z);if(this.opts.es5){const Oe=k instanceof n.Name?k:this.var("_arr",k);return this.forRange("_i",0,(0,n._)`${Oe}.length`,Se=>{this.var(Ee,(0,n._)`${Oe}[${Se}]`),ne(Ee)})}return this._for(new D("of",_,Ee,k),()=>ne(Ee))}forIn(Z,k,ne,_=this.opts.es5?d.varKinds.var:d.varKinds.const){if(this.opts.ownProperties)return this.forOf(Z,(0,n._)`Object.keys(${k})`,ne);const Ee=this._scope.toName(Z);return this._for(new D("in",_,Ee,k),()=>ne(Ee))}endFor(){return this._endBlockNode(R)}label(Z){return this._leafNode(new y(Z))}break(Z){return this._leafNode(new P(Z))}return(Z){const k=new M;if(this._blockNode(k),this.code(Z),k.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(M)}try(Z,k,ne){if(!k&&!ne)throw new Error('CodeGen: "try" without "catch" and "finally"');const _=new G;if(this._blockNode(_),this.code(Z),k){const Ee=this.name("e");this._currNode=_.catch=new w(Ee),k(Ee)}return ne&&(this._currNode=_.finally=new q,this.code(ne)),this._endBlockNode(w,q)}throw(Z){return this._leafNode(new b(Z))}block(Z,k){return this._blockStarts.push(this._nodes.length),Z&&this.code(Z).endBlock(k),this}endBlock(Z){const k=this._blockStarts.pop();if(k===void 0)throw new Error("CodeGen: not in self-balancing block");const ne=this._nodes.length-k;if(ne<0||Z!==void 0&&ne!==Z)throw new Error(`CodeGen: wrong number of nodes: ${ne} vs ${Z} expected`);return this._nodes.length=k,this}func(Z,k=n.nil,ne,_){return this._blockNode(new $(Z,k,ne)),_&&this.code(_).endFunc(),this}endFunc(){return this._endBlockNode($)}optimize(Z=1){for(;Z-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(Z){return this._currNode.nodes.push(Z),this}_blockNode(Z){this._currNode.nodes.push(Z),this._nodes.push(Z)}_endBlockNode(Z,k){const ne=this._currNode;if(ne instanceof Z||k&&ne instanceof k)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${k?`${Z.kind}/${k.kind}`:Z.kind}"`)}_elseNode(Z){const k=this._currNode;if(!(k instanceof l))throw new Error('CodeGen: "else" without "if"');return this._currNode=k.else=Z,this}get _root(){return this._nodes[0]}get _currNode(){const Z=this._nodes;return Z[Z.length-1]}set _currNode(Z){const k=this._nodes;k[k.length-1]=Z}}t.CodeGen=re;function ie(B,Z){for(const k in Z)B[k]=(B[k]||0)+(Z[k]||0);return B}function ae(B,Z){return Z instanceof n._CodeOrName?ie(B,Z.names):B}function de(B,Z,k){if(B instanceof n.Name)return ne(B);if(!_(B))return B;return new n._Code(B._items.reduce((Ee,Oe)=>(Oe instanceof n.Name&&(Oe=ne(Oe)),Oe instanceof n._Code?Ee.push(...Oe._items):Ee.push(Oe),Ee),[]));function ne(Ee){const Oe=k[Ee.str];return Oe===void 0||Z[Ee.str]!==1?Ee:(delete Z[Ee.str],Oe)}function _(Ee){return Ee instanceof n._Code&&Ee._items.some(Oe=>Oe instanceof n.Name&&Z[Oe.str]===1&&k[Oe.str]!==void 0)}}function je(B,Z){for(const k in Z)B[k]=(B[k]||0)-(Z[k]||0)}function De(B){return typeof B=="boolean"||typeof B=="number"||B===null?!B:(0,n._)`!${W(B)}`}const Pe=V(t.operators.AND);function ge(...B){return B.reduce(Pe)}const be=V(t.operators.OR);function Y(...B){return B.reduce(be)}function V(B){return(Z,k)=>Z===n.nil?k:k===n.nil?Z:(0,n._)`${W(Z)} ${B} ${W(k)}`}function W(B){return B instanceof n.Name?B:(0,n._)`(${B})`}},34863:(v,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const n=e(76202);class d extends Error{constructor(y){super(`CodeGen: "code" for ${y} not defined`),this.value=y.value}}var u;(function(C){C[C.Started=0]="Started",C[C.Completed=1]="Completed"})(u||(t.UsedValueState=u={})),t.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class O{constructor({prefixes:y,parent:P}={}){this._names={},this._prefixes=y,this._parent=P}toName(y){return y instanceof n.Name?y:this.name(y)}name(y){return new n.Name(this._newName(y))}_newName(y){const P=this._names[y]||this._nameGroup(y);return`${y}${P.index++}`}_nameGroup(y){var P,b;if(!((b=(P=this._parent)===null||P===void 0?void 0:P._prefixes)===null||b===void 0)&&b.has(y)||this._prefixes&&!this._prefixes.has(y))throw new Error(`CodeGen: prefix "${y}" is not allowed in this scope`);return this._names[y]={prefix:y,index:0}}}t.Scope=O;class p extends n.Name{constructor(y,P){super(P),this.prefix=y}setValue(y,{property:P,itemIndex:b}){this.value=y,this.scopePath=(0,n._)`.${new n.Name(P)}[${b}]`}}t.ValueScopeName=p;const g=(0,n._)`\n`;class f extends O{constructor(y){super(y),this._values={},this._scope=y.scope,this.opts={...y,_n:y.lines?g:n.nil}}get(){return this._scope}name(y){return new p(y,this._newName(y))}value(y,P){var b;if(P.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const I=this.toName(y),{prefix:E}=I,x=(b=P.key)!==null&&b!==void 0?b:P.ref;let o=this._values[E];if(o){const R=o.get(x);if(R)return R}else o=this._values[E]=new Map;o.set(x,I);const a=this._scope[E]||(this._scope[E]=[]),l=a.length;return a[l]=P.ref,I.setValue(P,{property:E,itemIndex:l}),I}getValue(y,P){const b=this._values[y];if(b)return b.get(P)}scopeRefs(y,P=this._values){return this._reduceValues(P,b=>{if(b.scopePath===void 0)throw new Error(`CodeGen: name "${b}" has no value`);return(0,n._)`${y}${b.scopePath}`})}scopeCode(y=this._values,P,b){return this._reduceValues(y,I=>{if(I.value===void 0)throw new Error(`CodeGen: name "${I}" has no value`);return I.value.code},P,b)}_reduceValues(y,P,b={},I){let E=n.nil;for(const x in y){const o=y[x];if(!o)continue;const a=b[x]=b[x]||new Map;o.forEach(l=>{if(a.has(l))return;a.set(l,u.Started);let R=P(l);if(R){const S=this.opts.es5?t.varKinds.var:t.varKinds.const;E=(0,n._)`${E}${S} ${l} = ${R};${this.opts._n}`}else if(R=I?.(l))E=(0,n._)`${E}${R}${this.opts._n}`;else throw new d(l);a.set(l,u.Completed)})}return E}}t.ValueScope=f},39054:(v,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keyword$DataError=t.keywordError=void 0,t.reportError=O,t.reportExtraError=p,t.resetErrorsCount=g,t.extendErrors=f;const n=e(57287),d=e(977),u=e(5057);t.keywordError={message:({keyword:a})=>(0,n.str)`must pass "${a}" keyword validation`},t.keyword$DataError={message:({keyword:a,schemaType:l})=>l?(0,n.str)`"${a}" keyword must be ${l} ($data)`:(0,n.str)`"${a}" keyword is invalid ($data)`};function O(a,l=t.keywordError,R,S){const{it:T}=a,{gen:D,compositeRule:$,allErrors:M}=T,G=b(a,l,R);S??($||M)?C(D,G):y(T,(0,n._)`[${G}]`)}function p(a,l=t.keywordError,R){const{it:S}=a,{gen:T,compositeRule:D,allErrors:$}=S,M=b(a,l,R);C(T,M),D||$||y(S,u.default.vErrors)}function g(a,l){a.assign(u.default.errors,l),a.if((0,n._)`${u.default.vErrors} !== null`,()=>a.if(l,()=>a.assign((0,n._)`${u.default.vErrors}.length`,l),()=>a.assign(u.default.vErrors,null)))}function f({gen:a,keyword:l,schemaValue:R,data:S,errsCount:T,it:D}){if(T===void 0)throw new Error("ajv implementation error");const $=a.name("err");a.forRange("i",T,u.default.errors,M=>{a.const($,(0,n._)`${u.default.vErrors}[${M}]`),a.if((0,n._)`${$}.instancePath === undefined`,()=>a.assign((0,n._)`${$}.instancePath`,(0,n.strConcat)(u.default.instancePath,D.errorPath))),a.assign((0,n._)`${$}.schemaPath`,(0,n.str)`${D.errSchemaPath}/${l}`),D.opts.verbose&&(a.assign((0,n._)`${$}.schema`,R),a.assign((0,n._)`${$}.data`,S))})}function C(a,l){const R=a.const("err",l);a.if((0,n._)`${u.default.vErrors} === null`,()=>a.assign(u.default.vErrors,(0,n._)`[${R}]`),(0,n._)`${u.default.vErrors}.push(${R})`),a.code((0,n._)`${u.default.errors}++`)}function y(a,l){const{gen:R,validateName:S,schemaEnv:T}=a;T.$async?R.throw((0,n._)`new ${a.ValidationError}(${l})`):(R.assign((0,n._)`${S}.errors`,l),R.return(!1))}const P={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function b(a,l,R){const{createErrors:S}=a.it;return S===!1?(0,n._)`{}`:I(a,l,R)}function I(a,l,R={}){const{gen:S,it:T}=a,D=[E(T,R),x(a,R)];return o(a,l,D),S.object(...D)}function E({errorPath:a},{instancePath:l}){const R=l?(0,n.str)`${a}${(0,d.getErrorPath)(l,d.Type.Str)}`:a;return[u.default.instancePath,(0,n.strConcat)(u.default.instancePath,R)]}function x({keyword:a,it:{errSchemaPath:l}},{schemaPath:R,parentSchema:S}){let T=S?l:(0,n.str)`${l}/${a}`;return R&&(T=(0,n.str)`${T}${(0,d.getErrorPath)(R,d.Type.Str)}`),[P.schemaPath,T]}function o(a,{params:l,message:R},S){const{keyword:T,data:D,schemaValue:$,it:M}=a,{opts:G,propertyName:w,topSchemaRef:q,schemaPath:re}=M;S.push([P.keyword,T],[P.params,typeof l=="function"?l(a):l||(0,n._)`{}`]),G.messages&&S.push([P.message,typeof R=="function"?R(a):R]),G.verbose&&S.push([P.schema,$],[P.parentSchema,(0,n._)`${q}${re}`],[u.default.data,D]),w&&S.push([P.propertyName,w])}},65545:(v,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaEnv=void 0,t.compileSchema=C,t.resolveRef=y,t.getCompilingSchema=b,t.resolveSchema=x;const n=e(57287),d=e(84012),u=e(5057),O=e(95421),p=e(977),g=e(9804);class f{constructor(R){var S;this.refs={},this.dynamicAnchors={};let T;typeof R.schema=="object"&&(T=R.schema),this.schema=R.schema,this.schemaId=R.schemaId,this.root=R.root||this,this.baseId=(S=R.baseId)!==null&&S!==void 0?S:(0,O.normalizeId)(T?.[R.schemaId||"$id"]),this.schemaPath=R.schemaPath,this.localRefs=R.localRefs,this.meta=R.meta,this.$async=T?.$async,this.refs={}}}t.SchemaEnv=f;function C(l){const R=b.call(this,l);if(R)return R;const S=(0,O.getFullPath)(this.opts.uriResolver,l.root.baseId),{es5:T,lines:D}=this.opts.code,{ownProperties:$}=this.opts,M=new n.CodeGen(this.scope,{es5:T,lines:D,ownProperties:$});let G;l.$async&&(G=M.scopeValue("Error",{ref:d.default,code:(0,n._)`require("ajv/dist/runtime/validation_error").default`}));const w=M.scopeName("validate");l.validateName=w;const q={gen:M,allErrors:this.opts.allErrors,data:u.default.data,parentData:u.default.parentData,parentDataProperty:u.default.parentDataProperty,dataNames:[u.default.data],dataPathArr:[n.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:M.scopeValue("schema",this.opts.code.source===!0?{ref:l.schema,code:(0,n.stringify)(l.schema)}:{ref:l.schema}),validateName:w,ValidationError:G,schema:l.schema,schemaEnv:l,rootId:S,baseId:l.baseId||S,schemaPath:n.nil,errSchemaPath:l.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,n._)`""`,opts:this.opts,self:this};let re;try{this._compilations.add(l),(0,g.validateFunctionCode)(q),M.optimize(this.opts.code.optimize);const ie=M.toString();re=`const visitedNodesForRef = new WeakMap(); ${M.scopeRefs(u.default.scope)}return ${ie}`,this.opts.code.process&&(re=this.opts.code.process(re,l));const de=new Function(`${u.default.self}`,`${u.default.scope}`,re)(this,this.scope.get());if(this.scope.value(w,{ref:de}),de.errors=null,de.schema=l.schema,de.schemaEnv=l,l.$async&&(de.$async=!0),this.opts.code.source===!0&&(de.source={validateName:w,validateCode:ie,scopeValues:M._values}),this.opts.unevaluated){const{props:je,items:De}=q;de.evaluated={props:je instanceof n.Name?void 0:je,items:De instanceof n.Name?void 0:De,dynamicProps:je instanceof n.Name,dynamicItems:De instanceof n.Name},de.source&&(de.source.evaluated=(0,n.stringify)(de.evaluated))}return l.validate=de,l}catch(ie){throw delete l.validate,delete l.validateName,re&&this.logger.error("Error compiling schema, function code:",re),ie}finally{this._compilations.delete(l)}}function y(l,R,S){var T;const D=(0,O.resolveUrl)(this.opts.uriResolver,R,S),$=l.refs[D];if($)return $;let M=E.call(this,l,D);if(M===void 0){const G=(T=l.localRefs)===null||T===void 0?void 0:T[D],{schemaId:w}=this.opts;G&&(M=new f({schema:G,schemaId:w,root:l,baseId:R}))}if(M===void 0&&this.opts.loadSchemaSync){const G=this.opts.loadSchemaSync(R,S,D);G&&!(this.refs[D]||this.schemas[D])&&(this.addSchema(G,D,void 0),M=E.call(this,l,D))}if(M!==void 0)return l.refs[D]=P.call(this,M)}function P(l){return(0,O.inlineRef)(l.schema,this.opts.inlineRefs)?l.schema:l.validate?l:C.call(this,l)}function b(l){for(const R of this._compilations)if(I(R,l))return R}function I(l,R){return l.schema===R.schema&&l.root===R.root&&l.baseId===R.baseId}function E(l,R){let S;for(;typeof(S=this.refs[R])=="string";)R=S;return S||this.schemas[R]||x.call(this,l,R)}function x(l,R){const S=this.opts.uriResolver.parse(R),T=(0,O._getFullPath)(this.opts.uriResolver,S);let D=(0,O.getFullPath)(this.opts.uriResolver,l.baseId,void 0);if(Object.keys(l.schema).length>0&&T===D)return a.call(this,S,l);const $=(0,O.normalizeId)(T),M=this.refs[$]||this.schemas[$];if(typeof M=="string"){const G=x.call(this,l,M);return typeof G?.schema!="object"?void 0:a.call(this,S,G)}if(typeof M?.schema=="object"){if(M.validate||C.call(this,M),$===(0,O.normalizeId)(R)){const{schema:G}=M,{schemaId:w}=this.opts,q=G[w];return q&&(D=(0,O.resolveUrl)(this.opts.uriResolver,D,q)),new f({schema:G,schemaId:w,root:l,baseId:D})}return a.call(this,S,M)}}const o=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function a(l,{baseId:R,schema:S,root:T}){var D;if(((D=l.fragment)===null||D===void 0?void 0:D[0])!=="/")return;for(const G of l.fragment.slice(1).split("/")){if(typeof S=="boolean")return;const w=S[(0,p.unescapeFragment)(G)];if(w===void 0)return;S=w;const q=typeof S=="object"&&S[this.opts.schemaId];!o.has(G)&&q&&(R=(0,O.resolveUrl)(this.opts.uriResolver,R,q))}let $;if(typeof S!="boolean"&&S.$ref&&!(0,p.schemaHasRulesButRef)(S,this.RULES)){const G=(0,O.resolveUrl)(this.opts.uriResolver,R,S.$ref);$=x.call(this,T,G)}const{schemaId:M}=this.opts;if($=$||new f({schema:S,schemaId:M,root:T,baseId:R}),$.schema!==$.root.schema)return $}},5057:(v,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(57287),d={data:new n.Name("data"),valCxt:new n.Name("valCxt"),instancePath:new n.Name("instancePath"),parentData:new n.Name("parentData"),parentDataProperty:new n.Name("parentDataProperty"),rootData:new n.Name("rootData"),dynamicAnchors:new n.Name("dynamicAnchors"),isAllOfVariant:new n.Name("isAllOfVariant"),vErrors:new n.Name("vErrors"),errors:new n.Name("errors"),this:new n.Name("this"),self:new n.Name("self"),scope:new n.Name("scope"),json:new n.Name("json"),jsonPos:new n.Name("jsonPos"),jsonLen:new n.Name("jsonLen"),jsonPart:new n.Name("jsonPart")};t.default=d},78805:(v,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(95421);class d extends Error{constructor(O,p,g,f){super(f||`can't resolve reference ${g} from id ${p}`),this.missingRef=(0,n.resolveUrl)(O,p,g),this.missingSchema=(0,n.normalizeId)((0,n.getFullPath)(O,this.missingRef))}}t.default=d},95421:(v,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.inlineRef=p,t.getFullPath=y,t._getFullPath=P,t.normalizeId=I,t.resolveUrl=E,t.getSchemaRefs=o;const n=e(977),d=e(67371),u=e(50205),O=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function p(a,l=!0){return typeof a=="boolean"?!0:l===!0?!f(a):l?C(a)<=l:!1}const g=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function f(a){for(const l in a){if(g.has(l))return!0;const R=a[l];if(Array.isArray(R)&&R.some(f)||typeof R=="object"&&f(R))return!0}return!1}function C(a){let l=0;for(const R in a){if(R==="$ref")return 1/0;if(l++,!O.has(R)&&(typeof a[R]=="object"&&(0,n.eachItem)(a[R],S=>l+=C(S)),l===1/0))return 1/0}return l}function y(a,l="",R){R!==!1&&(l=I(l));const S=a.parse(l);return P(a,S)}function P(a,l){return a.serialize(l).split("#")[0]+"#"}const b=/#\/?$/;function I(a){return a?a.replace(b,""):""}function E(a,l,R){return R=I(R),a.resolve(l,R)}const x=/^[a-z_][-a-z0-9._]*$/i;function o(a,l){if(typeof a=="boolean")return{};const{schemaId:R,uriResolver:S}=this.opts,T=I(a[R]||l),D={"":T},$=y(S,T,!1),M={},G=new Set;return u(a,{allKeys:!0},(re,ie,ae,de)=>{if(de===void 0)return;const je=$+ie;let De=D[de];typeof re[R]=="string"&&(De=Pe.call(this,re[R])),ge.call(this,re.$anchor),ge.call(this,re.$dynamicAnchor),D[ie]=De;function Pe(be){const Y=this.opts.uriResolver.resolve;if(be=I(De?Y(De,be):be),G.has(be))throw q(be);G.add(be);let V=this.refs[be];return typeof V=="string"&&(V=this.refs[V]),typeof V=="object"?w(re,V.schema,be):be!==I(je)&&(be[0]==="#"?(w(re,M[be],be),M[be]=re):this.refs[be]=je),be}function ge(be){if(typeof be=="string"){if(!x.test(be))throw new Error(`invalid anchor "${be}"`);Pe.call(this,`#${be}`)}}}),M;function w(re,ie,ae){if(ie!==void 0&&!d(re,ie))throw q(ae)}function q(re){return new Error(`reference "${re}" resolves to more than one schema`)}}},90942:(v,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isJSONType=d,t.getRules=u;const e=["string","number","integer","boolean","null","object","array"],n=new Set(e);function d(O){return typeof O=="string"&&n.has(O)}function u(){const O={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...O,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},O.number,O.string,O.array,O.object],post:{rules:[]},all:{},keywords:{}}}},977:(v,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Type=t.mergeEvaluated=void 0,t.toHash=u,t.alwaysValidSchema=O,t.checkUnknownRules=p,t.schemaHasRules=g,t.schemaHasRulesButRef=f,t.schemaRefOrVal=C,t.unescapeFragment=y,t.escapeFragment=P,t.escapeJsonPointer=b,t.unescapeJsonPointer=I,t.eachItem=E,t.evaluatedPropsToName=o,t.setEvaluated=a,t.useFunc=R,t.getErrorPath=T,t.checkStrictMode=D;const n=e(57287),d=e(76202);function u($){const M={};for(const G of $)M[G]=!0;return M}function O($,M){return typeof M=="boolean"?M:Object.keys(M).length===0?!0:(p($,M),!g(M,$.self.RULES.all))}function p($,M=$.schema){const{opts:G,self:w}=$;if(!G.strictSchema||typeof M=="boolean")return;const q=w.RULES.keywords;for(const re in M)q[re]||D($,`unknown keyword: "${re}"`)}function g($,M){if(typeof $=="boolean")return!$;for(const G in $)if(M[G])return!0;return!1}function f($,M){if(typeof $=="boolean")return!$;for(const G in $)if(G!=="$ref"&&M.all[G])return!0;return!1}function C({topSchemaRef:$,schemaPath:M},G,w,q){if(!q){if(typeof G=="number"||typeof G=="boolean")return G;if(typeof G=="string")return(0,n._)`${G}`}return(0,n._)`${$}${M}${(0,n.getProperty)(w)}`}function y($){return I(decodeURIComponent($))}function P($){return encodeURIComponent(b($))}function b($){return typeof $=="number"?`${$}`:$.replace(/~/g,"~0").replace(/\//g,"~1")}function I($){return $.replace(/~1/g,"/").replace(/~0/g,"~")}function E($,M){if(Array.isArray($))for(const G of $)M(G);else M($)}function x({mergeNames:$,mergeToName:M,mergeValues:G,resultToName:w}){return(q,re,ie,ae)=>{const de=ie===void 0?re:ie instanceof n.Name?(re instanceof n.Name?$(q,re,ie):M(q,re,ie),ie):re instanceof n.Name?(M(q,ie,re),re):G(re,ie);return ae===n.Name&&!(de instanceof n.Name)?w(q,de):de}}t.mergeEvaluated={props:x({mergeNames:($,M,G)=>$.if((0,n._)`${G} !== true && ${M} !== undefined`,()=>{$.if((0,n._)`${M} === true`,()=>$.assign(G,!0),()=>$.assign(G,(0,n._)`${G} || {}`).code((0,n._)`Object.assign(${G}, ${M})`))}),mergeToName:($,M,G)=>$.if((0,n._)`${G} !== true`,()=>{M===!0?$.assign(G,!0):($.assign(G,(0,n._)`${G} || {}`),a($,G,M))}),mergeValues:($,M)=>$===!0?!0:{...$,...M},resultToName:o}),items:x({mergeNames:($,M,G)=>$.if((0,n._)`${G} !== true && ${M} !== undefined`,()=>$.assign(G,(0,n._)`${M} === true ? true : ${G} > ${M} ? ${G} : ${M}`)),mergeToName:($,M,G)=>$.if((0,n._)`${G} !== true`,()=>$.assign(G,M===!0?!0:(0,n._)`${G} > ${M} ? ${G} : ${M}`)),mergeValues:($,M)=>$===!0?!0:Math.max($,M),resultToName:($,M)=>$.var("items",M)})};function o($,M){if(M===!0)return $.var("props",!0);const G=$.var("props",(0,n._)`{}`);return M!==void 0&&a($,G,M),G}function a($,M,G){Object.keys(G).forEach(w=>$.assign((0,n._)`${M}${(0,n.getProperty)(w)}`,!0))}const l={};function R($,M){return $.scopeValue("func",{ref:M,code:l[M.code]||(l[M.code]=new d._Code(M.code))})}var S;(function($){$[$.Num=0]="Num",$[$.Str=1]="Str"})(S||(t.Type=S={}));function T($,M,G){if($ instanceof n.Name){const w=M===S.Num;return G?w?(0,n._)`"[" + ${$} + "]"`:(0,n._)`"['" + ${$} + "']"`:w?(0,n._)`"/" + ${$}`:(0,n._)`"/" + ${$}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return G?(0,n.getProperty)($).toString():"/"+b($)}function D($,M,G=$.opts.strictSchema){if(G){if(M=`strict mode: ${M}`,G===!0)throw new Error(M);$.self.logger.warn(M)}}},5413:(v,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.schemaHasRulesForType=e,t.shouldUseGroup=n,t.shouldUseRule=d;function e({schema:u,self:O},p){const g=O.RULES.types[p];return g&&g!==!0&&n(u,g)}function n(u,O){return O.rules.some(p=>d(u,p))}function d(u,O){var p;return u[O.keyword]!==void 0||((p=O.definition.implements)===null||p===void 0?void 0:p.some(g=>u[g]!==void 0))}},98213:(v,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.topBoolOrEmptySchema=p,t.boolOrEmptySchema=g;const n=e(39054),d=e(57287),u=e(5057),O={message:"boolean schema is false"};function p(C){const{gen:y,schema:P,validateName:b}=C;P===!1?f(C,!1):typeof P=="object"&&P.$async===!0?y.return(u.default.data):(y.assign((0,d._)`${b}.errors`,null),y.return(!0))}function g(C,y){const{gen:P,schema:b}=C;b===!1?(P.var(y,!1),f(C)):P.var(y,!0)}function f(C,y){const{gen:P,data:b}=C,I={gen:P,keyword:"false schema",data:b,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:C};(0,n.reportError)(I,O,void 0,y)}},41434:(v,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataType=void 0,t.getSchemaTypes=f,t.getJSONTypes=C,t.coerceAndCheckDataType=y,t.checkDataType=x,t.checkDataTypes=o,t.reportTypeError=l;const n=e(90942),d=e(5413),u=e(39054),O=e(57287),p=e(977);var g;(function(S){S[S.Correct=0]="Correct",S[S.Wrong=1]="Wrong"})(g||(t.DataType=g={}));function f(S){const T=C(S.type);if(T.includes("null")){if(S.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!T.length&&S.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');S.nullable===!0&&T.push("null")}return T}function C(S){const T=Array.isArray(S)?S:S?[S]:[];if(T.every(n.isJSONType))return T;throw new Error("type must be JSONType or JSONType[]: "+T.join(","))}function y(S,T){const{gen:D,data:$,opts:M}=S,G=b(T,M.coerceTypes),w=T.length>0&&!(G.length===0&&T.length===1&&(0,d.schemaHasRulesForType)(S,T[0]));if(w){const q=o(T,$,M.strictNumbers,g.Wrong);D.if(q,()=>{G.length?I(S,T,G):l(S)})}return w}const P=new Set(["string","number","integer","boolean","null"]);function b(S,T){return T?S.filter(D=>P.has(D)||T==="array"&&D==="array"):[]}function I(S,T,D){const{gen:$,data:M,opts:G}=S,w=$.let("dataType",(0,O._)`typeof ${M}`),q=$.let("coerced",(0,O._)`undefined`);G.coerceTypes==="array"&&$.if((0,O._)`${w} == 'object' && Array.isArray(${M}) && ${M}.length == 1`,()=>$.assign(M,(0,O._)`${M}[0]`).assign(w,(0,O._)`typeof ${M}`).if(o(T,M,G.strictNumbers),()=>$.assign(q,M))),$.if((0,O._)`${q} !== undefined`);for(const ie of D)(P.has(ie)||ie==="array"&&G.coerceTypes==="array")&&re(ie);$.else(),l(S),$.endIf(),$.if((0,O._)`${q} !== undefined`,()=>{$.assign(M,q),E(S,q)});function re(ie){switch(ie){case"string":$.elseIf((0,O._)`${w} == "number" || ${w} == "boolean"`).assign(q,(0,O._)`"" + ${M}`).elseIf((0,O._)`${M} === null`).assign(q,(0,O._)`""`);return;case"number":$.elseIf((0,O._)`${w} == "boolean" || ${M} === null
|
|
8
8
|
|| (${w} == "string" && ${M} && ${M} == +${M})`).assign(q,(0,O._)`+${M}`);return;case"integer":$.elseIf((0,O._)`${w} === "boolean" || ${M} === null
|
|
@@ -2609,7 +2609,7 @@ ${_}`}}const T=k=>Array.isArray(k)&&k.some(ne=>(0,d.isObject)(ne)),D=k=>k.filter
|
|
|
2609
2609
|
|
|
2610
2610
|
height: ${({size:fe})=>fe||"16px"};
|
|
2611
2611
|
width: ${({size:fe})=>fe||"16px"};
|
|
2612
|
-
`;function Oe({onClose:fe,className:Ue}){const{useTranslate:st,useCurrentProduct:gt,useSearch:Bt,useProducts:It,useAiSearch:Ut}=useThemeHooks(),In=It(),we=gt(),[et,yt]=useState(we),[$e,ke]=useState("search"),it=$e!=="search",{query:Ct,setQuery:bt,filter:Wt,setFilter:zt,items:qt,isSearchLoading:On,facets:bn,setLoadMore:nr,advancedSearch:tr,askAi:Cr}=Bt(et?.name,it),{isFilterOpen:Kr,onFilterToggle:_r,onFilterChange:bo,onFilterReset:Wr,onFacetReset:Dr,onTopFacetsReset:Sr}=useSearchFilter(Wt,zt),xr=Ut(),xo=useRef(null),{translate:Yn}=st();useDialogHotKeys(xo,fe);const Ko=Et=>{var Zt;const ze=Et.target;typeof ze.className=="string"&&(Zt=ze.className)!=null&&Zt.includes(" overlay")&&fe()},jo=(Et,Zt)=>{let ze;if(!et&&Et.document.product){const ht=In.find(tt=>{var ct;return tt.slug.match(`/${(ct=Et.document.product)==null?void 0:ct.folder}/`)});ze=ht?{name:ht.name,icon:ht.icon}:void 0}return jsx(SearchItem,{item:Et,product:ze},`${Zt}-${Et.document.id}`)},Po=(Et,Zt=0)=>{const ze=bn.find(tt=>tt.isTop);let ht=!1;if(ze){const tt=ze.values.find(ct=>typeof ct=="object"?ct.value===Et:!1);ht=tt?tt.count>Zt:!1}return ht},Yo=!!(Wt&&Wt.length||Ct),lo=tr&&$e==="search",rt=Cr&&$e==="search",St=lo||rt;return jsx(Se,{"data-component-name":"Search/SearchDialog",ref:xo,onClick:Ko,className:concatClassNames("overlay",Ue),children:jsxs(ve,{className:"scroll-lock",role:"dialog",children:[jsxs(xe,{children:[et&&jsx(Fragment,{children:jsxs(Be,{color:"product",children:[et.name,jsx(CloseIcon,{onClick:()=>yt(void 0),color:"--icon-color-additional"})]})}),jsx(SearchInput,{value:Ct,onChange:bt,placeholder:$e==="search"?Yn("search.label","Search docs..."):Yn("search.ai.label","Ask a follow up question"),isLoading:On,showReturnButton:$e==="ai-dialog",onReturn:()=>ke("search"),onSubmit:$e==="ai-dialog"?()=>{bt(""),xr.askQuestion(Ct)}:void 0,"data-translation-key":$e==="search"?"search.label":"search.ai.label"}),St&&jsxs(Xe,{children:[rt?jsx(Ce,{disabled:!Ct.trim(),icon:jsx(AiStarsIcon,{}),onClick:()=>{ke("ai-dialog"),bt(""),xr.askQuestion(Ct)},children:Yn("search.aiButton","Search with AI")}):null,lo&&jsx(Lt,{icon:jsx(SettingsIcon,{}),onClick:_r})]})]}),jsx(L,{children:$e==="search"?jsxs(Fragment,{children:[jsxs(oe,{children:[jsx(SearchGroups,{facets:bn,searchFilter:Wt,onFilterChange:bo,onTopFacetsReset:Sr}),Yo?qt&&Object.keys(qt).some(Et=>{var Zt;return(Zt=qt[Et])==null?void 0:Zt.length})?Object.keys(qt).map(Et=>{var Zt,ze,ht;return(Zt=qt[Et])!=null&&Zt.length?jsxs(Fragment2,{children:[jsx(Qe,{children:Et}),(ze=qt[Et])==null?void 0:ze.map(jo),Po(Et,((ht=qt[Et])==null?void 0:ht.length)||0)&&jsx(Ge,{"data-translation-key":"search.showMore",onClick:()=>{var tt;return nr({groupKey:Et,offset:((tt=qt[Et])==null?void 0:tt.length)||0})},children:Yn("search.showMore","Show more")})]},Et):null}):On?jsxs(Ve,{children:[jsx(SpinnerLoader,{size:"26px",color:"var(--search-input-icon-color)"}),Yn("search.loading","Loading...")]}):
|
|
2612
|
+
`;function Oe({onClose:fe,className:Ue}){const{useTranslate:st,useCurrentProduct:gt,useSearch:Bt,useProducts:It,useAiSearch:Ut}=useThemeHooks(),In=It(),we=gt(),[et,yt]=useState(we),[$e,ke]=useState("search"),it=$e!=="search",{query:Ct,setQuery:bt,filter:Wt,setFilter:zt,items:qt,isSearchLoading:On,facets:bn,setLoadMore:nr,advancedSearch:tr,askAi:Cr}=Bt(et?.name,it),{isFilterOpen:Kr,onFilterToggle:_r,onFilterChange:bo,onFilterReset:Wr,onFacetReset:Dr,onTopFacetsReset:Sr}=useSearchFilter(Wt,zt),xr=Ut(),xo=useRef(null),{translate:Yn}=st();useDialogHotKeys(xo,fe);const Ko=Et=>{var Zt;const ze=Et.target;typeof ze.className=="string"&&(Zt=ze.className)!=null&&Zt.includes(" overlay")&&fe()},jo=(Et,Zt)=>{let ze;if(!et&&Et.document.product){const ht=In.find(tt=>{var ct;return tt.slug.match(`/${(ct=Et.document.product)==null?void 0:ct.folder}/`)});ze=ht?{name:ht.name,icon:ht.icon}:void 0}return jsx(SearchItem,{item:Et,product:ze},`${Zt}-${Et.document.id}`)},Po=(Et,Zt=0)=>{const ze=bn.find(tt=>tt.isTop);let ht=!1;if(ze){const tt=ze.values.find(ct=>typeof ct=="object"?ct.value===Et:!1);ht=tt?tt.count>Zt:!1}return ht},Yo=!!(Wt&&Wt.length||Ct),lo=tr&&$e==="search",rt=Cr&&$e==="search",St=lo||rt;return jsx(Se,{"data-component-name":"Search/SearchDialog",ref:xo,onClick:Ko,className:concatClassNames("overlay",Ue),children:jsxs(ve,{className:"scroll-lock",role:"dialog",children:[jsxs(xe,{children:[et&&jsx(Fragment,{children:jsxs(Be,{color:"product",children:[et.name,jsx(CloseIcon,{onClick:()=>yt(void 0),color:"--icon-color-additional"})]})}),jsx(SearchInput,{value:Ct,onChange:bt,placeholder:$e==="search"?Yn("search.label","Search docs..."):Yn("search.ai.label","Ask a follow up question"),isLoading:On,showReturnButton:$e==="ai-dialog",onReturn:()=>ke("search"),onSubmit:$e==="ai-dialog"?()=>{bt(""),xr.askQuestion(Ct)}:void 0,"data-translation-key":$e==="search"?"search.label":"search.ai.label"}),St&&jsxs(Xe,{children:[rt?jsx(Ce,{disabled:!Ct.trim(),icon:jsx(AiStarsIcon,{}),onClick:()=>{ke("ai-dialog"),bt(""),xr.askQuestion(Ct)},children:Yn("search.aiButton","Search with AI")}):null,lo&&jsx(Lt,{icon:jsx(SettingsIcon,{}),onClick:_r})]})]}),jsx(L,{children:$e==="search"?jsxs(Fragment,{children:[jsxs(oe,{children:[jsx(SearchGroups,{facets:bn,searchFilter:Wt,onFilterChange:bo,onTopFacetsReset:Sr}),Yo?qt&&Object.keys(qt).some(Et=>{var Zt;return(Zt=qt[Et])==null?void 0:Zt.length})?Object.keys(qt).map(Et=>{var Zt,ze,ht;return(Zt=qt[Et])!=null&&Zt.length?jsxs(Fragment2,{children:[jsx(Qe,{children:Et}),(ze=qt[Et])==null?void 0:ze.map(jo),Po(Et,((ht=qt[Et])==null?void 0:ht.length)||0)&&jsx(Ge,{"data-translation-key":"search.showMore",onClick:()=>{var tt;return nr({groupKey:Et,offset:((tt=qt[Et])==null?void 0:tt.length)||0})},children:Yn("search.showMore","Show more")})]},Et):null}):On?jsxs(Ve,{children:[jsx(SpinnerLoader,{size:"26px",color:"var(--search-input-icon-color)"}),Yn("search.loading","Loading...")]}):jsx(Ve,{"data-translation-key":"search.noResults",children:jsx("b",{children:Yn("search.noResults.title","No results")})}):jsxs(Fragment,{children:[jsx(SearchRecent,{onSelect:bt}),jsx(SearchSuggestedPages,{})]})]}),tr&&$e==="search"&&Kr&&jsx(Ne,{children:jsx(SearchFilter,{facets:bn,filter:Wt,query:Ct,onFilterChange:bo,onFilterReset:Wr,onFacetReset:Dr})})]}):jsx(SearchAiResponse,{question:xr.question,isGeneratingResponse:xr.isGeneratingResponse,response:xr.response,resources:xr.resources})}),$e==="search"&&jsxs(ft,{children:[jsxs(Je,{children:[jsx(SearchShortcut,{"data-translation-key":"search.keys.navigate",combination:"Tab",text:Yn("search.keys.navigate","to navigate")}),jsx(SearchShortcut,{"data-translation-key":"search.keys.select",combination:"\u23CE",text:Yn("search.keys.select","to select")}),jsx(SearchShortcut,{"data-translation-key":"search.keys.exit",combination:"Esc",text:Yn("search.keys.exit","to exit")})]}),On&&jsxs(dt,{children:[jsx(SpinnerLoader,{size:"16px",color:"var(--search-input-icon-color)"}),Yn("search.loading","Loading...")]}),jsx(U,{"data-translation-key":"search.cancel",variant:"secondary",size:"small",onClick:fe,children:Yn("search.cancel","Cancel")})]})]})})}const Se=u.Ay.div`
|
|
2613
2613
|
position: fixed;
|
|
2614
2614
|
display: flex;
|
|
2615
2615
|
align-items: center;
|
|
@@ -10700,12 +10700,12 @@ Error generating stack: `+se.message+`
|
|
|
10700
10700
|
background-color: var(--layer-color-hover);
|
|
10701
10701
|
border-radius: var(--border-radius);
|
|
10702
10702
|
width: ${({type:j})=>j==="icon"?"var(--control-height-sm)":"64px"};
|
|
10703
|
-
`;function kf(){return(0,v.jsxs)(Kf,{children:[(0,v.jsxs)(Pd,{children:[(0,v.jsx)(ec,{type:"icon"}),(0,v.jsx)(ec,{type:"label"})]}),(0,v.jsxs)(Pd,{children:[(0,v.jsx)(ec,{type:"icon"}),(0,v.jsx)(ec,{type:"label"})]}),(0,v.jsxs)(Pd,{children:[(0,v.jsx)(ec,{type:"icon"}),(0,v.jsx)(ec,{type:"label"})]}),(0,v.jsxs)(Pd,{children:[(0,v.jsx)(ec,{type:"icon"}),(0,v.jsx)(ec,{type:"label"})]})]})}const Gf=(0,o.memo)(kf);function Zf({languages:j,activeLanguage:N}){const[z,ye]=(0,o.useState)([]),[Ze,ut]=(0,o.useState)([]),Tt=(0,o.useRef)(null),Ft=(0,D.md)(Ao.qd),mt=(0,D.Xr)(Ao.an),Gt=Kn=>{const Wn=Ze.findIndex(Er=>Er.key===Kn);if(Wn!==-1){const Er=[...Ze],Yr=[...z];sf(Yr,Er,Wn),ye(Yr),ut(Er),mt(Kn)}},vn=(0,o.useCallback)(()=>{var Kn;const Wn=(Kn=Tt?.current)==null?void 0:Kn.offsetWidth;if(!Wn)return;const{newVisibleItems:Er,newHiddenItems:Yr}=Jf(Wn,[...j]),to=Yr.findIndex(Jo=>Jo.key===N);to!==-1&&sf(Er,Yr,to),ye(Er),ut(Yr)},[N,j]);return(0,o.useLayoutEffect)(()=>(vn(),window.addEventListener("resize",vn),()=>{window.removeEventListener("resize",vn)}),[Ft,N]),(0,v.jsxs)(go,{ref:Tt,children:[(0,v.jsxs)(Da,{children:[!z.length&&(0,v.jsx)(Gf,{}),z.map(Kn=>(0,v.jsx)(yi,{onClick:()=>mt(Kn.key),active:N===Kn.key,children:(0,v.jsx)(of,{item:Kn,withIcon:!0})},Kn.key))]}),Ze.length?(0,v.jsx)(af,{activeTab:N,samples:Ze,onChange:Gt,trigger:(0,v.jsx)(l.Button,{icon:(0,v.jsx)(l.OverflowMenuVerticalIcon,{}),variant:"text",style:{height:"100%"}}),withArrow:!1,withCheckmark:!1,width:156}):null]})}const Yf=(0,o.memo)(Zf);function Jf(j,N){let z=0;const ye=[],Ze=[];return N.forEach((ut,Tt)=>{const mt=Tt===N.length-1&&Ze.length===0?0:Pr;j&&z+hn+mt<=j?(ye.push(ut),z+=hn):Ze.push(ut)}),{newVisibleItems:ye,newHiddenItems:Ze}}function sf(j,N,z){const ye=j[j.length-1];ye&&(j[j.length-1]=N[z],N[z]=ye)}const Xf=(0,T.eU)(mo.xW.NOT_LOADED);var Qf=Object.defineProperty,qf=Object.defineProperties,_f=Object.getOwnPropertyDescriptors,lf=Object.getOwnPropertySymbols,ep=Object.prototype.hasOwnProperty,tp=Object.prototype.propertyIsEnumerable,cf=(j,N,z)=>N in j?Qf(j,N,{enumerable:!0,configurable:!0,writable:!0,value:z}):j[N]=z,np=(j,N)=>{for(var z in N||(N={}))ep.call(N,z)&&cf(j,z,N[z]);if(lf)for(var z of lf(N))tp.call(N,z)&&cf(j,z,N[z]);return j},rp=(j,N)=>qf(j,_f(N));function uf(j,N,z,ye){var Ze,ut;const Tt=ye?.activeMimeName||"application/json";return{name:j.name,method:j.httpVerb,parameters:op(j.parameters,z?.requestValues),body:sp(j.requestBody,N,(Ze=z?.requestValues)!=null&&Ze.body?{activeExampleName:z?.activeExampleName,[Tt]:(ut=z?.requestValues)==null?void 0:ut.body}:{activeExampleName:z?.activeExampleName}),path:j.path,servers:j.servers,security:cp(j.security)}}function op(j,N){const z=new Set,ye=j.map(Ze=>{var ut;return z.add(Ze.in+":"+Ze.name),{name:Ze.name,in:Ze.in,required:Ze.required,description:Ze.description,example:((ut=N?.[String(Ze.in)])==null?void 0:ut[Ze.name])||Ze.example,schema:Ze.schema}});for(const[Ze,ut]of Object.entries(N||{}))for(const[Tt,Ft]of Object.entries(ut||{}))z.has(Ze+":"+Tt)||ye.push({name:Tt,in:Ze,required:!1,description:"",example:String(Ft),schema:void 0});return ye}function ip({type:j,format:N,enum:z}){return j==="string"&&(N==="binary"||N==="base64")?"file":j==="object"?"multiline":z.length>0?"select":"text"}function ap(j,N){var z,ye,Ze,ut,Tt;const Ft=((z=j[0])==null?void 0:z.example)||((ye=j[0])==null?void 0:ye.examples);if(Ft)return Ft;if((Ze=j.schema)!=null&&Ze.example)return j.schema.example;const mt=((ut=N?.default)==null?void 0:ut.value)||((Tt=N?.default)==null?void 0:Tt.rawValue);return mt?.[j.name]?(0,l.isPrimitive)(mt?.[j.name])?String(mt?.[j.name]):JSON.stringify(mt?.[j.name]):""}function sp(j,N,z){var ye;return!j||!((ye=j.content)!=null&&ye.mediaTypes)?z?{activeExampleName:z.activeExampleName,mediaTypes:Object.fromEntries(Object.entries(z).map(([Ze,ut])=>[Ze,{name:Ze,examples:{default:{value:ut}},schema:{},parameters:[]}]))}:void 0:{required:j.required,activeExampleName:z?.activeExampleName,mediaTypes:j.content.mediaTypes.reduce((Ze,ut)=>{var Tt,Ft;const mt=ut.schema,Gt=z?.[ut.name]?{default:{value:z?.[ut.name],rawValue:z?.[ut.name],mime:ut.name}}:ut.examples||ut.formExamples;return Ze[ut.name]={name:ut.name,examples:Gt,schema:lp((Tt=ut.schema)==null?void 0:Tt.rawSchema,N),parameters:(Ft=mt?.fields)==null?void 0:Ft.map(vn=>({inputType:ip(vn.schema),name:vn.name,example:ap(vn,Gt)}))},Ze},{})}}function lp(j,N){if(!(!j||!N))return rp(np({},j),{components:N?.components||{}})}function cp(j){if(j)return j.map(({schemes:N})=>N.map(z=>({id:z.id,type:z.type,in:z.in,openIdConnectUrl:z.openIdConnectUrl,scopes:z.scopes,scheme:z.scheme,name:z.name,flows:z.flows})))}var up=Object.defineProperty,dp=Object.defineProperties,fp=Object.getOwnPropertyDescriptors,df=Object.getOwnPropertySymbols,pp=Object.prototype.hasOwnProperty,mp=Object.prototype.propertyIsEnumerable,ff=(j,N,z)=>N in j?up(j,N,{enumerable:!0,configurable:!0,writable:!0,value:z}):j[N]=z,hp=(j,N)=>{for(var z in N||(N={}))pp.call(N,z)&&ff(j,z,N[z]);if(df)for(var z of df(N))mp.call(N,z)&&ff(j,z,N[z]);return j},gp=(j,N)=>dp(j,fp(N)),vp=(j,N,z)=>new Promise((ye,Ze)=>{var ut=mt=>{try{Ft(z.next(mt))}catch(Gt){Ze(Gt)}},Tt=mt=>{try{Ft(z.throw(mt))}catch(Gt){Ze(Gt)}},Ft=mt=>mt.done?ye(mt.value):Promise.resolve(mt.value).then(ut,Tt);Ft((z=z.apply(j,N)).next())});const yp=(0,o.lazy)(()=>vp(void 0,null,function*(){return pr.e(
|
|
10703
|
+
`;function kf(){return(0,v.jsxs)(Kf,{children:[(0,v.jsxs)(Pd,{children:[(0,v.jsx)(ec,{type:"icon"}),(0,v.jsx)(ec,{type:"label"})]}),(0,v.jsxs)(Pd,{children:[(0,v.jsx)(ec,{type:"icon"}),(0,v.jsx)(ec,{type:"label"})]}),(0,v.jsxs)(Pd,{children:[(0,v.jsx)(ec,{type:"icon"}),(0,v.jsx)(ec,{type:"label"})]}),(0,v.jsxs)(Pd,{children:[(0,v.jsx)(ec,{type:"icon"}),(0,v.jsx)(ec,{type:"label"})]})]})}const Gf=(0,o.memo)(kf);function Zf({languages:j,activeLanguage:N}){const[z,ye]=(0,o.useState)([]),[Ze,ut]=(0,o.useState)([]),Tt=(0,o.useRef)(null),Ft=(0,D.md)(Ao.qd),mt=(0,D.Xr)(Ao.an),Gt=Kn=>{const Wn=Ze.findIndex(Er=>Er.key===Kn);if(Wn!==-1){const Er=[...Ze],Yr=[...z];sf(Yr,Er,Wn),ye(Yr),ut(Er),mt(Kn)}},vn=(0,o.useCallback)(()=>{var Kn;const Wn=(Kn=Tt?.current)==null?void 0:Kn.offsetWidth;if(!Wn)return;const{newVisibleItems:Er,newHiddenItems:Yr}=Jf(Wn,[...j]),to=Yr.findIndex(Jo=>Jo.key===N);to!==-1&&sf(Er,Yr,to),ye(Er),ut(Yr)},[N,j]);return(0,o.useLayoutEffect)(()=>(vn(),window.addEventListener("resize",vn),()=>{window.removeEventListener("resize",vn)}),[Ft,N]),(0,v.jsxs)(go,{ref:Tt,children:[(0,v.jsxs)(Da,{children:[!z.length&&(0,v.jsx)(Gf,{}),z.map(Kn=>(0,v.jsx)(yi,{onClick:()=>mt(Kn.key),active:N===Kn.key,children:(0,v.jsx)(of,{item:Kn,withIcon:!0})},Kn.key))]}),Ze.length?(0,v.jsx)(af,{activeTab:N,samples:Ze,onChange:Gt,trigger:(0,v.jsx)(l.Button,{icon:(0,v.jsx)(l.OverflowMenuVerticalIcon,{}),variant:"text",style:{height:"100%"}}),withArrow:!1,withCheckmark:!1,width:156}):null]})}const Yf=(0,o.memo)(Zf);function Jf(j,N){let z=0;const ye=[],Ze=[];return N.forEach((ut,Tt)=>{const mt=Tt===N.length-1&&Ze.length===0?0:Pr;j&&z+hn+mt<=j?(ye.push(ut),z+=hn):Ze.push(ut)}),{newVisibleItems:ye,newHiddenItems:Ze}}function sf(j,N,z){const ye=j[j.length-1];ye&&(j[j.length-1]=N[z],N[z]=ye)}const Xf=(0,T.eU)(mo.xW.NOT_LOADED);var Qf=Object.defineProperty,qf=Object.defineProperties,_f=Object.getOwnPropertyDescriptors,lf=Object.getOwnPropertySymbols,ep=Object.prototype.hasOwnProperty,tp=Object.prototype.propertyIsEnumerable,cf=(j,N,z)=>N in j?Qf(j,N,{enumerable:!0,configurable:!0,writable:!0,value:z}):j[N]=z,np=(j,N)=>{for(var z in N||(N={}))ep.call(N,z)&&cf(j,z,N[z]);if(lf)for(var z of lf(N))tp.call(N,z)&&cf(j,z,N[z]);return j},rp=(j,N)=>qf(j,_f(N));function uf(j,N,z,ye){var Ze,ut;const Tt=ye?.activeMimeName||"application/json";return{name:j.name,method:j.httpVerb,parameters:op(j.parameters,z?.requestValues),body:sp(j.requestBody,N,(Ze=z?.requestValues)!=null&&Ze.body?{activeExampleName:z?.activeExampleName,[Tt]:(ut=z?.requestValues)==null?void 0:ut.body}:{activeExampleName:z?.activeExampleName}),path:j.path,servers:j.servers,security:cp(j.security)}}function op(j,N){const z=new Set,ye=j.map(Ze=>{var ut;return z.add(Ze.in+":"+Ze.name),{name:Ze.name,in:Ze.in,required:Ze.required,description:Ze.description,example:((ut=N?.[String(Ze.in)])==null?void 0:ut[Ze.name])||Ze.example,schema:Ze.schema}});for(const[Ze,ut]of Object.entries(N||{}))for(const[Tt,Ft]of Object.entries(ut||{}))z.has(Ze+":"+Tt)||ye.push({name:Tt,in:Ze,required:!1,description:"",example:String(Ft),schema:void 0});return ye}function ip({type:j,format:N,enum:z}){return j==="string"&&(N==="binary"||N==="base64")?"file":j==="object"?"multiline":z.length>0?"select":"text"}function ap(j,N){var z,ye,Ze,ut,Tt;const Ft=((z=j[0])==null?void 0:z.example)||((ye=j[0])==null?void 0:ye.examples);if(Ft)return Ft;if((Ze=j.schema)!=null&&Ze.example)return j.schema.example;const mt=((ut=N?.default)==null?void 0:ut.value)||((Tt=N?.default)==null?void 0:Tt.rawValue);return mt?.[j.name]?(0,l.isPrimitive)(mt?.[j.name])?String(mt?.[j.name]):JSON.stringify(mt?.[j.name]):""}function sp(j,N,z){var ye;return!j||!((ye=j.content)!=null&&ye.mediaTypes)?z?{activeExampleName:z.activeExampleName,mediaTypes:Object.fromEntries(Object.entries(z).map(([Ze,ut])=>[Ze,{name:Ze,examples:{default:{value:ut}},schema:{},parameters:[]}]))}:void 0:{required:j.required,activeExampleName:z?.activeExampleName,mediaTypes:j.content.mediaTypes.reduce((Ze,ut)=>{var Tt,Ft;const mt=ut.schema,Gt=z?.[ut.name]?{default:{value:z?.[ut.name],rawValue:z?.[ut.name],mime:ut.name}}:ut.examples||ut.formExamples;return Ze[ut.name]={name:ut.name,examples:Gt,schema:lp((Tt=ut.schema)==null?void 0:Tt.rawSchema,N),parameters:(Ft=mt?.fields)==null?void 0:Ft.map(vn=>({inputType:ip(vn.schema),name:vn.name,example:ap(vn,Gt)}))},Ze},{})}}function lp(j,N){if(!(!j||!N))return rp(np({},j),{components:N?.components||{}})}function cp(j){if(j)return j.map(({schemes:N})=>N.map(z=>({id:z.id,type:z.type,in:z.in,openIdConnectUrl:z.openIdConnectUrl,scopes:z.scopes,scheme:z.scheme,name:z.name,flows:z.flows})))}var up=Object.defineProperty,dp=Object.defineProperties,fp=Object.getOwnPropertyDescriptors,df=Object.getOwnPropertySymbols,pp=Object.prototype.hasOwnProperty,mp=Object.prototype.propertyIsEnumerable,ff=(j,N,z)=>N in j?up(j,N,{enumerable:!0,configurable:!0,writable:!0,value:z}):j[N]=z,hp=(j,N)=>{for(var z in N||(N={}))pp.call(N,z)&&ff(j,z,N[z]);if(df)for(var z of df(N))mp.call(N,z)&&ff(j,z,N[z]);return j},gp=(j,N)=>dp(j,fp(N)),vp=(j,N,z)=>new Promise((ye,Ze)=>{var ut=mt=>{try{Ft(z.next(mt))}catch(Gt){Ze(Gt)}},Tt=mt=>{try{Ft(z.throw(mt))}catch(Gt){Ze(Gt)}},Ft=mt=>mt.done?ye(mt.value):Promise.resolve(mt.value).then(ut,Tt);Ft((z=z.apply(j,N)).next())});const yp=(0,o.lazy)(()=>vp(void 0,null,function*(){return pr.e(598).then(pr.bind(pr,89598)).then(j=>({default:j.ReplayOverlay}))}));function Cp({operation:j,corsProxyUrl:N,fullOpenApi:z}){var ye,Ze;const ut=Jt(),Tt=(0,o.useRef)(null),{routingBasePath:Ft,mockServer:mt,oAuth2RedirectURI:Gt}=(0,D.md)(Ve.HN),{parser:vn}=(0,D.md)(Ve.i$),[Kn,Wn]=(0,o.useState)(!1),[Er,Yr]=(0,D.fp)(Xf),[to,Jo]=(0,D.fp)(Rt(j.pointer)),[po,$o]=(0,D.fp)(Ao.ZM),[[,Oo],fa]=(0,D.fp)(Ao.dt);(0,l.useFocusTrap)(Tt),(0,l.useModalScrollLock)(Kn);const Bl=(0,o.useCallback)(({requestValues:ea,activeExampleName:Na,activeMimeName:Vc,environment:tf,environments:lh,activeSecuritySchemeIds:ch})=>{Jo(uh=>gp(hp({},uh),{requestValues:ea,activeExampleName:Na,activeSecuritySchemeIds:ch})),$o(Vc||po),fa({environment:tf,environments:lh})},[Jo,$o,po,fa]),Hc=()=>{Er!==mo.xW.LOADING&&Wn(!Kn),Er===mo.xW.NOT_LOADED&&Yr(mo.xW.LOADING)};return(0,v.jsxs)(bp,{children:[(0,v.jsx)(l.Button,{onClick:Hc,variant:"primary",iconPosition:"left",icon:Er===mo.xW.LOADING?(0,v.jsx)(l.CircleDashIcon,{}):(0,v.jsx)(l.RocketIcon,{}),children:Er===mo.xW.LOADING?ut("openapi.loading","Loading..."):ut("openapi.tryIt","Try it")}),Kn&&(0,v.jsx)(o.Suspense,{children:(0,v.jsx)(l.Portal,{mountId:"api-content",children:(0,v.jsx)("div",{ref:Tt,children:(0,v.jsx)(yp,{value:uf(j,z,to),onRequestChange:Bl,onClose:Hc,corsProxyUrl:N,operationUrl:Ft+j.href,onLoad:()=>Yr(mo.xW.LOADED),mockServer:mt,environment:Oo,apiId:(Ze=(ye=vn?.definition.info)==null?void 0:ye["x-metadata"])==null?void 0:Ze.apiId,oAuth2RedirectURI:Gt,definitionUrl:vn?.definitionUrl,disableCollectionsTab:!0})})})})]})}const Op=(0,o.memo)(Cp),bp=B.Ay.div`
|
|
10704
10704
|
display: flex;
|
|
10705
10705
|
justify-content: flex-end;
|
|
10706
10706
|
border-top: var(--panel-border);
|
|
10707
10707
|
padding: var(--spacing-base) var(--spacing-md) var(--spacing-md);
|
|
10708
|
-
`;var Pp=(j,N,z)=>new Promise((ye,Ze)=>{var ut=mt=>{try{Ft(z.next(mt))}catch(Gt){Ze(Gt)}},Tt=mt=>{try{Ft(z.throw(mt))}catch(Gt){Ze(Gt)}},Ft=mt=>mt.done?ye(mt.value):Promise.resolve(mt.value).then(ut,Tt);Ft((z=z.apply(j,N)).next())});const Ep=(0,o.lazy)(()=>Pp(void 0,null,function*(){return pr.e(
|
|
10708
|
+
`;var Pp=(j,N,z)=>new Promise((ye,Ze)=>{var ut=mt=>{try{Ft(z.next(mt))}catch(Gt){Ze(Gt)}},Tt=mt=>{try{Ft(z.throw(mt))}catch(Gt){Ze(Gt)}},Ft=mt=>mt.done?ye(mt.value):Promise.resolve(mt.value).then(ut,Tt);Ft((z=z.apply(j,N)).next())});const Ep=(0,o.lazy)(()=>Pp(void 0,null,function*(){return pr.e(598).then(pr.bind(pr,89598)).then(j=>({default:j.EmbeddedReplay}))}));function Sp({operation:j,corsProxyUrl:N,fullOpenApi:z}){const ye=Jt(),{routingBasePath:Ze,mockServer:ut}=(0,D.md)(Ve.HN),Tt=(0,D.md)(Rt(j.pointer)),Ft=(0,D.md)(Ao.jL),mt=(0,D.md)(Ao.wu),[Gt,vn]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{vn(!0)},[]),(0,v.jsx)(xp,{children:Gt?(0,v.jsx)(o.Suspense,{fallback:(0,v.jsx)(pf,{children:ye("openapi.loading","Loading...")}),children:(0,v.jsx)(Ep,{value:uf(j,z,Tt,Ft),environment:Ft.environment,predefinedEnvValues:mt,corsProxyUrl:N,operationUrl:Ze+j.href,mockServer:ut,disableCollectionsTab:!0})}):(0,v.jsx)(pf,{children:ye("openapi.loading","Loading...")})})}const dh=(0,o.memo)(Sp),pf=B.Ay.div`
|
|
10709
10709
|
display: flex;
|
|
10710
10710
|
justify-content: center;
|
|
10711
10711
|
align-items: center;
|
|
@@ -10888,4 +10888,4 @@ Error generating stack: `+se.message+`
|
|
|
10888
10888
|
`,vh=({pointer:j,schema:N})=>{const{options:z,parser:ye}=useAtomValue(globalStoreAtom),Ze=N||{$ref:j},ut=getSchema({parser:ye,schemaOrRef:Ze,pointer:j||"",options:z,deps:{operation:{pointer:"RedocSchema"}}});return jsx(Row,{children:jsx(FullWidthPanel,{children:jsx(Schema,{schema:ut,level:1,disableDeepLinks:!0})})})},yh=({pointer:j,mimeType:N,encoding:z})=>{const ye=useAtomValue(globalParserAtom),Ze=useAtomValue(layoutAtom),ut=getExamples({parser:ye,infoOrRef:{$ref:j},mime:N,encoding:z});return jsx(Row,{layout:Ze,children:jsx(ExamplesWrap,{children:jsx(Example,{example:ut,mimeType:N})})})},Qm=B.Ay.div`
|
|
10889
10889
|
padding: 20px;
|
|
10890
10890
|
color: red;
|
|
10891
|
-
`;class Ch extends o.Component{constructor(N){super(N),this.state={error:void 0}}componentDidCatch(N){return this.setState({error:N}),!1}render(){return this.state.error?(0,v.jsxs)(Qm,{children:[(0,v.jsx)("h1",{children:"Something went wrong..."}),(0,v.jsxs)("small",{children:[" ",this.state.error.message," "]}),(0,v.jsx)("p",{children:(0,v.jsxs)("details",{children:[(0,v.jsx)("summary",{children:"Stack trace"}),(0,v.jsx)("pre",{children:this.state.error.stack})]})}),typeof __REDOC_VERSION__<"u"?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)("small",{children:[" References docs version: ",__REDOC_VERSION__]})," ",(0,v.jsx)("br",{})]}):null,typeof __REDOC_REVISION__<"u"?(0,v.jsxs)("small",{children:[" Commit: ",__REDOC_REVISION__]}):null]}):(0,v.jsx)(v.Fragment,{children:o.Children.only(this.props.children)})}}var qm=Object.defineProperty,Ff=Object.getOwnPropertySymbols,_m=Object.prototype.hasOwnProperty,eh=Object.prototype.propertyIsEnumerable,Nf=(j,N,z)=>N in j?qm(j,N,{enumerable:!0,configurable:!0,writable:!0,value:z}):j[N]=z,Uf=(j,N)=>{for(var z in N||(N={}))_m.call(N,z)&&Nf(j,z,N[z]);if(Ff)for(var z of Ff(N))eh.call(N,z)&&Nf(j,z,N[z]);return j};const zf=(0,R.JA)(),th=zf?(0,x.dirname)(zf)+"/":"";function nh(j){const N={},z=j.attributes;for(let ye=0;ye<z.length;ye++){const Ze=z[ye];N[Ze.name]=Ze.value}return N}function rh(j){const N=nh(j),z={};for(const ye in N){const Ze=ye.replace(/-(.)/g,(ut,Tt)=>Tt.toUpperCase());z[Ze]=N[ye]}return z}function oh(j,N=document.querySelector("redoc")){(0,a.c)(N,(0,v.jsx)($f,{store:j}))}function Wf(j,N={},z=(0,R.iT)("redoc")){if(z===null)throw new Error('"element" argument is not provided and <redoc> tag is not found on the page');let ye,Ze;typeof j=="string"?ye=j:typeof j=="object"&&(Ze=j),(0,a.H)(z).render((0,o.createElement)(Jm,{definition:Ze,definitionUrl:ye,options:Uf(Uf({},N),rh(z))},["Loading..."]))}function Hf(j){pr.p=j}const ih="3.4.
|
|
10891
|
+
`;class Ch extends o.Component{constructor(N){super(N),this.state={error:void 0}}componentDidCatch(N){return this.setState({error:N}),!1}render(){return this.state.error?(0,v.jsxs)(Qm,{children:[(0,v.jsx)("h1",{children:"Something went wrong..."}),(0,v.jsxs)("small",{children:[" ",this.state.error.message," "]}),(0,v.jsx)("p",{children:(0,v.jsxs)("details",{children:[(0,v.jsx)("summary",{children:"Stack trace"}),(0,v.jsx)("pre",{children:this.state.error.stack})]})}),typeof __REDOC_VERSION__<"u"?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)("small",{children:[" References docs version: ",__REDOC_VERSION__]})," ",(0,v.jsx)("br",{})]}):null,typeof __REDOC_REVISION__<"u"?(0,v.jsxs)("small",{children:[" Commit: ",__REDOC_REVISION__]}):null]}):(0,v.jsx)(v.Fragment,{children:o.Children.only(this.props.children)})}}var qm=Object.defineProperty,Ff=Object.getOwnPropertySymbols,_m=Object.prototype.hasOwnProperty,eh=Object.prototype.propertyIsEnumerable,Nf=(j,N,z)=>N in j?qm(j,N,{enumerable:!0,configurable:!0,writable:!0,value:z}):j[N]=z,Uf=(j,N)=>{for(var z in N||(N={}))_m.call(N,z)&&Nf(j,z,N[z]);if(Ff)for(var z of Ff(N))eh.call(N,z)&&Nf(j,z,N[z]);return j};const zf=(0,R.JA)(),th=zf?(0,x.dirname)(zf)+"/":"";function nh(j){const N={},z=j.attributes;for(let ye=0;ye<z.length;ye++){const Ze=z[ye];N[Ze.name]=Ze.value}return N}function rh(j){const N=nh(j),z={};for(const ye in N){const Ze=ye.replace(/-(.)/g,(ut,Tt)=>Tt.toUpperCase());z[Ze]=N[ye]}return z}function oh(j,N=document.querySelector("redoc")){(0,a.c)(N,(0,v.jsx)($f,{store:j}))}function Wf(j,N={},z=(0,R.iT)("redoc")){if(z===null)throw new Error('"element" argument is not provided and <redoc> tag is not found on the page');let ye,Ze;typeof j=="string"?ye=j:typeof j=="object"&&(Ze=j),(0,a.H)(z).render((0,o.createElement)(Jm,{definition:Ze,definitionUrl:ye,options:Uf(Uf({},N),rh(z))},["Loading..."]))}function Hf(j){pr.p=j}const ih="3.4.11",ah="80da170a58";function sh(){const j=(0,R.iT)("redoc");if(!j)return;const N=j.getAttribute("spec-url");N&&Wf(N,{},j)}l.IS_BROWSER&&Hf(th),sh()})(),Id})());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/openapi-docs",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.11",
|
|
4
4
|
"description": "Redocly OpenAPI Docs",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib-esm/index.js",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"url": "~0.11.0",
|
|
46
46
|
"url-template": "^2.0.8",
|
|
47
47
|
"util": "~0.12.5",
|
|
48
|
-
"@redocly/replay": "0.7.
|
|
48
|
+
"@redocly/replay": "0.7.8",
|
|
49
49
|
"@redocly/config": "0.16.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"webpack": "5.94.0",
|
|
95
95
|
"webpack-cli": "5.1.4",
|
|
96
96
|
"webpack-dev-server": "5.1.0",
|
|
97
|
-
"@redocly/theme": "0.45.
|
|
97
|
+
"@redocly/theme": "0.45.1"
|
|
98
98
|
},
|
|
99
99
|
"scripts": {
|
|
100
100
|
"start": "webpack serve --mode=development --hot",
|