redoc/redoc-demo.bundle.js

1914 lines
1.0 MiB
JavaScript
Raw Normal View History

2021-07-01 12:47:52 +03:00
/*! For license information please see redoc-demo.bundle.js.LICENSE.txt */
(()=>{var e={5499:(e,t,r)=>{"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=r(3325),o=r(6479),i=r(5522),a=r(1603),s=["/properties"],l="http://json-schema.org/draft-07/schema";class c extends n.default{_addVocabularies(){super._addVocabularies(),o.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(a,s):a;this.addMetaSchema(e,l,!1),this.refs["http://json-schema.org/schema"]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var u=r(1321);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var p=r(4475);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return p._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return p.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return p.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return p.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return p.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return p.CodeGen}})},4667:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class r{}t._CodeOrName=r,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends r{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=n;class o extends r{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function i(e,...t){const r=[e[0]];let n=0;for(;n<t.length;)l(r,t[n]),r.push(e[++n]);return new o(r)}t._Code=o,t.nil=new o(""),t._=i;const a=new o("+");function s(e,...t){const r=[u(e[0])];let n=0;for(;n<t.length;)r.push(a),l(r,t[n]),r.push(a,u(e[++n]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===a){const r=c(e[t-1],e[t+1]);if(void 0!==r){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}(r),new o(r)}function l(e,t){var r;t instanceof o?e.push(...t._items):t instanceof n?e.push(t):e.push("number"==typeof(r=t)||"boolean"==typeof r||null===r?r:u(Array.isArray(r)?r.join(","):r))}function c(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof n||'"'!==e[e.length-1])return;return"string"!=typeof t?`${e.slice(0,-1)}${t}"`:'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0}return"string"!=typeof t||'"'!==t[0]||e instanceof n?void 0:`"${e}${t.slice(1)}`}function u(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.str=s,t.addCodeArg=l,t.strConcat=function(e,t){return t.emptyStr()?e:e.emptyStr()?t:s`${e}${t}`},t.stringify=function(e){return new o(u(e))},t.safeStringify=u,t.getProperty=function(e){return"string"==typeof e&&t.IDENTIFIER.test(e)?new o(`.${e}`):i`[${e}]`},t.regexpCode=function(e){return new o(e.toString())}},4475:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=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;const n=r(4667),o=r(7791);var i=r(4667);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}
|| (${s} == "string" && ${o} && ${o} == +${o})`).assign(l,a._`+${o}`);case"integer":return void n.elseIf(a._`${s} === "boolean" || ${o} === null
|| (${s} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(l,a._`+${o}`);case"boolean":return void n.elseIf(a._`${o} === "false" || ${o} === 0 || ${o} === null`).assign(l,!1).elseIf(a._`${o} === "true" || ${o} === 1`).assign(l,!0);case"null":return n.elseIf(a._`${o} === "" || ${o} === 0 || ${o} === false`),void n.assign(l,null);case"array":n.elseIf(a._`${s} === "string" || ${s} === "number"
|| ${s} === "boolean" || ${o} === null`).assign(l,a._`[${o}]`)}}n.else(),h(e),n.endIf(),n.if(a._`${l} !== undefined`,(()=>{n.assign(o,l),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(a._`${t} !== undefined`,(()=>e.assign(a._`${t}[${r}]`,n)))}(e,l)}))}(e,t,s):h(e)}))}return c};const u=new Set(["string","number","integer","boolean","null"]);function p(e,t,r,n=l.Correct){const o=n===l.Correct?a.operators.EQ:a.operators.NEQ;let i;switch(e){case"null":return a._`${t} ${o} null`;case"array":i=a._`Array.isArray(${t})`;break;case"object":i=a._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=s(a._`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=s();break;default:return a._`typeof ${t} ${o} ${e}`}return n===l.Correct?i:a.not(i);function s(e=a.nil){return a.and(a._`typeof ${t} == "number"`,e,r?a._`isFinite(${t})`:a.nil)}}function d(e,t,r,n){if(1===e.length)return p(e[0],t,r,n);let o;const i=s.toHash(e);if(i.array&&i.object){const e=a._`typeof ${t} != "object"`;o=i.null?e:a._`!${t} || ${e}`,delete i.null,delete i.array,delete i.object}else o=a.nil;i.number&&delete i.integer;for(const e in i)o=a.and(o,p(e,t,r,n));return o}t.checkDataType=p,t.checkDataTypes=d;const f={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?a._`{type: ${e}}`:a._`{type: ${t}}`};function h(e){const t=function(e){const{gen:t,data:r,schema:n}=e,o=s.schemaRefOrVal(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:e}}(e);i.reportError(t,f)}t.reportTypeError=h},2537:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const n=r(4475),o=r(6124);function i(e,t,r){const{gen:i,compositeRule:a,data:s,opts:l}=e;if(void 0===r)return;const c=n._`${s}${n.getProperty(t)}`;if(a)return void o.checkStrictMode(e,`default is ignored for: ${c}`);let u=n._`${c} === undefined`;"empty"===l.useDefaults&&(u=n._`${u} || ${c} === null || ${c} === ""`),i.if(u,n._`${c} = ${n.stringify(r)}`)}t.assignDefaults=function(e,t){const{properties:r,items:n}=e.schema;if("object"===t&&r)for(const t in r)i(e,t,r[t].default);else"array"===t&&Array.isArray(n)&&n.forEach(((t,r)=>i(e,r,t.default)))}},1321:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const n=r(7627),o=r(7927),i=r(4566),a=r(7927),s=r(2537),l=r(6488),c=r(4688),u=r(4475),p=r(5018),d=r(9826),f=r(6124),h=r(1885);function m({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},i){o.code.es5?e.func(t,u._`${p.default.data}, ${p.default.valCxt}`,n.$async,(()=>{e.code(u._`"use strict"; ${g(r,o)}`),function(e,t){e.if(p.default.valCxt,(()=>{e.var(p.default.instancePath,u._`${p.default.valCxt}.${p.default.instancePath}`),e.var(p.default.parentData,u._`${p.default.valCxt}.${p.default.parentData}`),e.var(p.default.parentDataProperty,u._`${p.default.valCxt}.${p.default.parentDataProperty}`),e.var(p.default.rootData,u._`${p.default.valCxt}.${p.default.rootData}`),t.dynamicRef&&e.var(p.default.dynamicAnchors,u._`${p.default.valCxt}.${p.default.dynamicAnchors}`)}),(()=>{e.var(p.default.instancePath,u._`""`),e.var(p.default.parentData,u._`undefined`),e.var(p.default.parentDataProperty,u._`undefined`),e.var(p.default.rootData,p.default.data),t.dynamicRef&&e.var(p.default.dynamicAnchors,u._`{}`)}))}(e,o),e.code(i)})):e.func(t,u._`${p.default.data}, ${function(e){return u._`{${p.default.instancePath}="", ${p.default.parentData}, ${p.default.parentDataProperty}, ${p.default.rootData}=${p.default.data}${e.dynamicRef?u._`, ${p.default.dynamicAnchors}={}`:u.nil}}={}`}(o)}`,n.$async,(()=>e.code(g(r,o)).code(i)))}function g(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?u._`/*# sourceURL=${r} */`:u.nil}function y({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function v(e){return"boolean"!=typeof e.schema}function b(e){f.checkUnknownRules(e),function(e){const{schema:t,errSchemaPath:r,opt
missingProperty: ${o},
depsCount: ${t},
deps: ${r}}`};const a={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e)"__proto__"!==n&&((Array.isArray(e[n])?t:r)[n]=e[n]);return[t,r]}(e);s(e,t),l(e,r)}};function s(e,t=e.schema){const{gen:r,data:o,it:a}=e;if(0===Object.keys(t).length)return;const s=r.let("missing");for(const l in t){const c=t[l];if(0===c.length)continue;const u=i.propertyInData(r,o,l,a.opts.ownProperties);e.setParams({property:l,depsCount:c.length,deps:c.join(", ")}),a.allErrors?r.if(u,(()=>{for(const t of c)i.checkReportMissingProp(e,t)})):(r.if(n._`${u} && (${i.checkMissingProp(e,c,s)})`),i.reportMissingProp(e,s),r.else())}}function l(e,t=e.schema){const{gen:r,data:n,keyword:a,it:s}=e,l=r.name("valid");for(const c in t)o.alwaysValidSchema(s,t[c])||(r.if(i.propertyInData(r,n,c,s.opts.ownProperties),(()=>{const t=e.subschema({keyword:a,schemaProp:c},l);e.mergeValidEvaluated(t,l)}),(()=>r.var(l,!0))),e.ok(l))}t.validatePropertyDeps=s,t.validateSchemaDeps=l,t.default=a},5184:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4475),o=r(6124),i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>n.str`must match "${e.ifClause}" schema`,params:({params:e})=>n._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:i}=e;void 0===r.then&&void 0===r.else&&o.checkStrictMode(i,'"if" without "then" and "else" is ignored');const s=a(i,"then"),l=a(i,"else");if(!s&&!l)return;const c=t.let("valid",!0),u=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}(),e.reset(),s&&l){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(u,p("then",r),p("else",r))}else s?t.if(u,p("then")):t.if(n.not(u),p("else"));function p(r,o){return()=>{const i=e.subschema({keyword:r},u);t.assign(c,u),e.mergeValidEvaluated(i,c),o?t.assign(o,n._`${r}`):e.setParams({ifClause:r})}}e.pass(c,(()=>e.error(!0)))}};function a(e,t){const r=e.schema[t];return void 0!==r&&!o.alwaysValidSchema(e,r)}t.default=i},9616:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3074),o=r(6988),i=r(6348),a=r(9822),s=r(9564),l=r(1117),c=r(4002),u=r(1422),p=r(9690),d=r(9883),f=r(8435),h=r(1668),m=r(9684),g=r(5716),y=r(5184),v=r(5642);t.default=function(e=!1){const t=[f.default,h.default,m.default,g.default,y.default,v.default,c.default,u.default,l.default,p.default,d.default];return e?t.push(o.default,a.default):t.push(n.default,i.default),t.push(s.default),t}},6348:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const n=r(4475),o=r(6124),i=r(8619),a={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return s(e,"additionalItems",t);r.items=!0,o.alwaysValidSchema(r,t)||e.ok(i.validateArray(e))}};function s(e,t,r=e.schema){const{gen:i,parentSchema:a,data:s,keyword:l,it:c}=e;!function(e){const{opts:n,errSchemaPath:i}=c,a=r.length,s=a===e.minItems&&(a===e.maxItems||!1===e[t]);if(n.strictTuples&&!s){const e=`"${l}" is ${a}-tuple, but minItems or maxItems/${t} are not specified or different at path "${i}"`;o.checkStrictMode(c,e,n.strictTuples)}}(a),c.opts.unevaluated&&r.length&&!0!==c.items&&(c.items=o.mergeEvaluated.items(i,r.length,c.items));const u=i.name("valid"),p=i.const("len",n._`${s}.length`);r.forEach(((t,r)=>{o.alwaysValidSchema(c,t)||(i.if(n._`${p} > ${r}`,(()=>e.subschema({keyword:l,schemaProp:r,dataProp:r},u))),e.ok(u))}))}t.validateTuple=s,t.default=a},9822:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4475),o=r(6124),i=r(8619),a=r(3074),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:s}=r;n.items=!0,o.alwaysValidSchema(n,t)
@media ${t?"print, ":""} screen and (max-width: ${t=>t.theme.breakpoints[e]}) ${r||""} {
${yr(...n)};
2022-02-04 13:00:46 +03:00
}
`,kr=gr;function Or(e){return t=>{if(t.theme.extensionsHook)return t.theme.extensionsHook(e,t)}}const Sr=kr.div`
2022-02-04 13:00:46 +03:00
padding: 20px;
color: red;
`;class _r extends n.Component{constructor(e){super(e),this.state={error:void 0}}componentDidCatch(e){return this.setState({error:e}),!1}render(){return this.state.error?n.createElement(Sr,null,n.createElement("h1",null,"Something went wrong..."),n.createElement("small",null," ",this.state.error.message," "),n.createElement("p",null,n.createElement("details",null,n.createElement("summary",null,"Stack trace"),n.createElement("pre",null,this.state.error.stack))),n.createElement("small",null," ReDoc Version: ","2.0.0-rc.74")," ",n.createElement("br",null),n.createElement("small",null," Commit: ","cf4642e3")):n.createElement(n.Fragment,null,n.Children.only(this.props.children))}}const Er=br`
2022-02-04 13:00:46 +03:00
0% {
transform: rotate(0deg); }
100% {
transform: rotate(360deg);
}
`,Pr=kr((e=>n.createElement("svg",{className:e.className,version:"1.1",width:"512",height:"512",viewBox:"0 0 512 512"},n.createElement("path",{d:"M275.682 147.999c0 10.864-8.837 19.661-19.682 19.661v0c-10.875 0-19.681-8.796-19.681-19.661v-96.635c0-10.885 8.806-19.661 19.681-19.661v0c10.844 0 19.682 8.776 19.682 19.661v96.635z"}),n.createElement("path",{d:"M275.682 460.615c0 10.865-8.837 19.682-19.682 19.682v0c-10.875 0-19.681-8.817-19.681-19.682v-96.604c0-10.885 8.806-19.681 19.681-19.681v0c10.844 0 19.682 8.796 19.682 19.682v96.604z"}),n.createElement("path",{d:"M147.978 236.339c10.885 0 19.681 8.755 19.681 19.641v0c0 10.885-8.796 19.702-19.681 19.702h-96.624c-10.864 0-19.661-8.817-19.661-19.702v0c0-10.885 8.796-19.641 19.661-19.641h96.624z"}),n.createElement("path",{d:"M460.615 236.339c10.865 0 19.682 8.755 19.682 19.641v0c0 10.885-8.817 19.702-19.682 19.702h-96.584c-10.885 0-19.722-8.817-19.722-19.702v0c0-10.885 8.837-19.641 19.722-19.641h96.584z"}),n.createElement("path",{d:"M193.546 165.703c7.69 7.66 7.68 20.142 0 27.822v0c-7.701 7.701-20.162 7.701-27.853 0.020l-68.311-68.322c-7.68-7.701-7.68-20.142 0-27.863v0c7.68-7.68 20.121-7.68 27.822 0l68.342 68.342z"}),n.createElement("path",{d:"M414.597 386.775c7.7 7.68 7.7 20.163 0.021 27.863v0c-7.7 7.659-20.142 7.659-27.843-0.062l-68.311-68.26c-7.68-7.7-7.68-20.204 0-27.863v0c7.68-7.7 20.163-7.7 27.842 0l68.291 68.322z"}),n.createElement("path",{d:"M165.694 318.464c7.69-7.7 20.153-7.7 27.853 0v0c7.68 7.659 7.69 20.163 0 27.863l-68.342 68.322c-7.67 7.659-20.142 7.659-27.822-0.062v0c-7.68-7.68-7.68-20.122 0-27.801l68.311-68.322z"}),n.createElement("path",{d:"M386.775 97.362c7.7-7.68 20.142-7.68 27.822 0v0c7.7 7.68 7.7 20.183 0.021 27.863l-68.322 68.311c-7.68 7.68-20.163 7.68-27.843-0.020v0c-7.68-7.68-7.68-20.162 0-27.822l68.322-68.332z"}))))`
animation: 2s ${Er} linear infinite;
2022-02-04 13:00:46 +03:00
width: 50px;
height: 50px;
content: '';
display: inline-block;
margin-left: -25px;
path {
fill: ${e=>e.color};
}
`,$r=kr.div`
2022-02-04 13:00:46 +03:00
font-family: helvetica, sans;
width: 100%;
text-align: center;
font-size: 25px;
margin: 30px 0 20px 0;
color: ${e=>e.color};
`;class Cr extends n.PureComponent{render(){return n.createElement("div",{style:{textAlign:"center"}},n.createElement($r,{color:this.props.color},"Loading ..."),n.createElement(Pr,{color:this.props.color}))}}var Ar=r(5697);const Rr=n.createContext(new mr({})),jr=Rr.Provider,Tr=Rr.Consumer;function Ir(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];throw new Error("number"==typeof e?"[MobX] minified error nr: "+e+(r.length?" "+r.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var Nr={};function Lr(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:Nr}var Dr=Object.assign,Mr=Object.getOwnPropertyDescriptor,Fr=Object.defineProperty,zr=Object.prototype,Ur=[];Object.freeze(Ur);var qr={};Object.freeze(qr);var Vr="undefined"!=typeof Proxy,Br=Object.toString();function Wr(){Vr||Ir("Proxy not available")}function Hr(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var Yr=function(){};function Kr(e){return"function"==typeof e}function Gr(e){switch(typeof e){case"string":case"symbol":case"number":return!0}return!1}function Qr(e){return null!==e&&"object"==typeof e}function Xr(e){var t;if(!Qr(e))return!1;var r=Object.getPrototypeOf(e);return null==r||(null==(t=r.constructor)?void 0:t.toString())===Br}function Zr(e){var t=null==e?void 0:e.constructor;return!!t&&("GeneratorFunction"===t.name||"GeneratorFunction"===t.displayName)}function Jr(e,t,r){Fr(e,t,{enumerable:!1,writable:!0,configurable:!0,value:r})}function en(e,t,r){Fr(e,t,{enumerable:!1,writable:!1,configurable:!0,value:r})}function tn(e,t){var r="isMobX"+e;return t.prototype[r]=!0,function(e){return Qr(e)&&!0===e[r]}}function rn(e){return e instanceof Map}function nn(e){return e instanceof Set}var on=void 0!==Object.getOwnPropertySymbols,an="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:on?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function sn(e){return null===e?null:"object"==typeof e?""+e:e}function ln(e,t){return zr.hasOwnProperty.call(e,t)}var cn=Object.getOwnPropertyDescriptors||function(e){var t={};return an(e).forEach((function(r){t[r]=Mr(e,r)})),t};function un(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function pn(e,t,r){return t&&un(e.prototype,t),r&&un(e,r),e}function dn(){return dn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},dn.apply(this,arguments)}function fn(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function hn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function gn(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return mn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)}var yn=Symbol("mobx-stored-annotations");function vn(e){return Object.assign((function(t,r){bn(t,r,e)}),e)}function bn(e,t,r){ln(e,yn)||Jr(e,yn,dn({},e[yn])),function(e){return e.annotationType_===Pn}(r)||(e[yn][t]=r)}var wn=Symbol("mobx administration"),x
2022-02-04 13:00:46 +03:00
width: calc(100% - ${e=>e.theme.rightPanel.width});
padding: 0 ${e=>e.theme.spacing.sectionHorizontal}px;
${({compact:e,theme:t})=>xr("medium",!0)`
2022-02-04 13:00:46 +03:00
width: 100%;
padding: ${`${e?0:t.spacing.sectionVertical}px ${t.spacing.sectionHorizontal}px`};
`};
`,fp=kr.div.attrs((e=>({[ip]:e.id})))`
2022-02-04 13:00:46 +03:00
padding: ${e=>e.theme.spacing.sectionVertical}px 0;
&:last-child {
min-height: calc(100vh + 1px);
}
& > &:last-child {
min-height: initial;
}
${xr("medium",!0)`
2022-02-04 13:00:46 +03:00
padding: 0;
`}
${e=>e.underlined?"\n position: relative;\n\n &:not(:last-of-type):after {\n position: absolute;\n bottom: 0;\n width: 100%;\n display: block;\n content: '';\n border-bottom: 1px solid rgba(0, 0, 0, 0.2);\n }\n ":""}
`,hp=kr.div`
2022-02-04 13:00:46 +03:00
width: ${e=>e.theme.rightPanel.width};
color: ${({theme:e})=>e.rightPanel.textColor};
background-color: ${e=>e.theme.rightPanel.backgroundColor};
padding: 0 ${e=>e.theme.spacing.sectionHorizontal}px;
${xr("medium",!0)`
2022-02-04 13:00:46 +03:00
width: 100%;
padding: ${e=>`${e.theme.spacing.sectionVertical}px ${e.theme.spacing.sectionHorizontal}px`};
`};
`,mp=kr(hp)`
2022-02-04 13:00:46 +03:00
background-color: ${e=>e.theme.rightPanel.backgroundColor};
`,gp=kr.div`
2022-02-04 13:00:46 +03:00
display: flex;
width: 100%;
padding: 0;
${xr("medium",!0)`
2022-02-04 13:00:46 +03:00
flex-direction: column;
`};
`,yp={1:"1.85714em",2:"1.57143em",3:"1.27em"},vp=e=>yr`
2022-02-04 13:00:46 +03:00
font-family: ${({theme:e})=>e.typography.headings.fontFamily};
font-weight: ${({theme:e})=>e.typography.headings.fontWeight};
font-size: ${yp[e]};
2022-02-04 13:00:46 +03:00
line-height: ${({theme:e})=>e.typography.headings.lineHeight};
`,bp=kr.h1`
${vp(1)};
color: ${({theme:e})=>e.colors.text.primary};
2022-02-04 13:00:46 +03:00
${Or("H1")};
`,wp=kr.h2`
${vp(2)};
color: ${({theme:e})=>e.colors.text.primary};
margin: 0 0 20px;
2022-02-04 13:00:46 +03:00
${Or("H2")};
`,xp=(kr.h2`
${vp(3)};
color: ${({theme:e})=>e.colors.text.primary};
2022-02-04 13:00:46 +03:00
${Or("H3")};
`,kr.h3`
2022-02-04 13:00:46 +03:00
color: ${({theme:e})=>e.rightPanel.textColor};
${Or("RightPanelHeader")};
`),kp=kr.h5`
2022-02-04 13:00:46 +03:00
border-bottom: 1px solid rgba(38, 50, 56, 0.3);
margin: 1em 0 1em 0;
color: rgba(38, 50, 56, 0.5);
font-weight: normal;
text-transform: uppercase;
font-size: 0.929em;
line-height: 20px;
${Or("UnderlinedHeader")};
`,Op=(0,n.createContext)(void 0),{Provider:Sp,Consumer:_p}=Op;function Ep(e){const{spec:t,specUrl:o,options:i,onLoaded:a,children:s}=e,[l,c]=n.useState(null),[u,p]=n.useState(null);if(u)throw u;n.useEffect((()=>{!function(){return e=this,null,n=function*(){if(t||o){c(null);try{const e=yield function(e){return t=this,n=function*(){const t=new $a.Config({}),n={config:t,base:Ft?window.location.href:process.cwd()};Ft&&(t.resolve.http.customFetch=r.g.fetch),"object"==typeof e&&null!==e?n.doc={source:{absoluteRef:""},parsed:e}:n.ref=e;const{bundle:{parsed:o}}=yield(0,Pa.bundle)(n);return void 0!==o.swagger?(i=o,console.warn("[ReDoc Compatibility mode]: Converting OpenAPI 2.0 to OpenAPI 3.0"),new Promise(((e,t)=>(0,Ca.convertObj)(i,{patch:!0,warnOnly:!0,text:"{}",anchors:!0},((r,n)=>{if(r)return t(r);e(n&&n.openapi)}))))):o;var i},new Promise(((e,r)=>{var o=e=>{try{a(n.next(e))}catch(e){r(e)}},i=e=>{try{a(n.throw(e))}catch(e){r(e)}},a=t=>t.done?e(t.value):Promise.resolve(t.value).then(o,i);a((n=n.apply(t,null)).next())}));var t,n}(t||o);c(e)}catch(e){throw p(e),e}}},new Promise(((t,r)=>{var o=e=>{try{a(n.next(e))}catch(e){r(e)}},i=e=>{try{a(n.throw(e))}catch(e){r(e)}},a=e=>e.done?t(e.value):Promise.resolve(e.value).then(o,i);a((n=n.apply(e,null)).next())}));var e,n}()}),[t,o]);const d=n.useMemo((()=>{if(!l)return null;try{return new Jg(l,o,i)}catch(e){throw a&&a(e),e}}),[l,o,i]);return n.useEffect((()=>{d&&a&&a()}),[d,a]),s({loading:!d,store:d})}const Pp=e=>yr`
2022-02-04 13:00:46 +03:00
${e} {
cursor: pointer;
margin-left: -20px;
padding: 0;
line-height: 1;
width: 20px;
display: inline-block;
outline: 0;
}
${e}:before {
content: '';
width: 15px;
height: 15px;
background-size: contain;
background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgeD0iMCIgeT0iMCIgd2lkdGg9IjUxMiIgaGVpZ2h0PSI1MTIiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA1MTIgNTEyIiB4bWw6c3BhY2U9InByZXNlcnZlIj48cGF0aCBmaWxsPSIjMDEwMTAxIiBkPSJNNDU5LjcgMjMzLjRsLTkwLjUgOTAuNWMtNTAgNTAtMTMxIDUwLTE4MSAwIC03LjktNy44LTE0LTE2LjctMTkuNC0yNS44bDQyLjEtNDIuMWMyLTIgNC41LTMuMiA2LjgtNC41IDIuOSA5LjkgOCAxOS4zIDE1LjggMjcuMiAyNSAyNSA2NS42IDI0LjkgOTAuNSAwbDkwLjUtOTAuNWMyNS0yNSAyNS02NS42IDAtOTAuNSAtMjQuOS0yNS02NS41LTI1LTkwLjUgMGwtMzIuMiAzMi4yYy0yNi4xLTEwLjItNTQuMi0xMi45LTgxLjYtOC45bDY4LjYtNjguNmM1MC01MCAxMzEtNTAgMTgxIDBDNTA5LjYgMTAyLjMgNTA5LjYgMTgzLjQgNDU5LjcgMjMzLjR6TTIyMC4zIDM4Mi4ybC0zMi4yIDMyLjJjLTI1IDI0LjktNjUuNiAyNC45LTkwLjUgMCAtMjUtMjUtMjUtNjUuNiAwLTkwLjVsOTAuNS05MC41YzI1LTI1IDY1LjUtMjUgOTAuNSAwIDcuOCA3LjggMTIuOSAxNy4yIDE1LjggMjcuMSAyLjQtMS40IDQuOC0yLjUgNi44LTQuNWw0Mi4xLTQyYy01LjQtOS4yLTExLjYtMTgtMTkuNC0yNS44IC01MC01MC0xMzEtNTAtMTgxIDBsLTkwLjUgOTAuNWMtNTAgNTAtNTAgMTMxIDAgMTgxIDUwIDUwIDEzMSA1MCAxODEgMGw2OC42LTY4LjZDMjc0LjYgMzk1LjEgMjQ2LjQgMzkyLjMgMjIwLjMgMzgyLjJ6Ii8+PC9zdmc+Cg==');
opacity: 0.5;
visibility: hidden;
display: inline-block;
vertical-align: middle;
}
h1:hover > ${e}::before, h2:hover > ${e}::before, ${e}:hover::before {
visibility: visible;
}
`,$p=kr((function(e){const t=n.useContext(Op),r=n.useCallback((r=>{t&&function(e,t,r){t.defaultPrevented||0!==t.button||(e=>!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey))(t)||(t.preventDefault(),e.replace(encodeURI(r)))}(t.menu.history,r,e.to)}),[t,e.to]);return t?n.createElement("a",{className:e.className,href:t.menu.history.linkForId(e.to),onClick:r,"aria-label":e.to},e.children):null}))`
${Pp("&")};
`;function Cp(e){return n.createElement($p,{to:e.to})}const Ap={left:"90deg",right:"-90deg",up:"-180deg",down:"0"},Rp=kr((e=>n.createElement("svg",{className:e.className,style:e.style,version:"1.1",viewBox:"0 0 24 24",x:"0",xmlns:"http://www.w3.org/2000/svg",y:"0","aria-hidden":"true"},n.createElement("polygon",{points:"17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 "}))))`
2022-02-04 13:00:46 +03:00
height: ${e=>e.size||"18px"};
width: ${e=>e.size||"18px"};
min-width: ${e=>e.size||"18px"};
2022-02-04 13:00:46 +03:00
vertical-align: middle;
float: ${e=>e.float||""};
transition: transform 0.2s ease-out;
transform: rotateZ(${e=>Ap[e.direction||"down"]});
2022-02-04 13:00:46 +03:00
polygon {
fill: ${({color:e,theme:t})=>e&&t.colors.responses[e]&&t.colors.responses[e].color||e};
}
`,jp=kr.span`
2022-02-04 13:00:46 +03:00
display: inline-block;
padding: 2px 8px;
margin: 0;
background-color: ${e=>e.theme.colors[e.type].main};
color: ${e=>e.theme.colors[e.type].contrastText};
font-size: ${e=>e.theme.typography.code.fontSize};
vertical-align: middle;
line-height: 1.6;
border-radius: 4px;
font-weight: ${({theme:e})=>e.typography.fontWeightBold};
font-size: 12px;
+ span[type] {
margin-left: 4px;
}
`,Tp=yr`
2022-02-04 13:00:46 +03:00
text-decoration: line-through;
color: #707070;
`,Ip=kr.caption`
2022-02-04 13:00:46 +03:00
text-align: right;
font-size: 0.9em;
font-weight: normal;
color: ${e=>e.theme.colors.text.secondary};
`,Np=kr.td`
2022-02-04 13:00:46 +03:00
border-left: 1px solid ${e=>e.theme.schema.linesColor};
box-sizing: border-box;
position: relative;
padding: 10px 10px 10px 0;
${xr("small")`
2022-02-04 13:00:46 +03:00
display: block;
overflow: hidden;
`}
tr:first-of-type > &,
tr.last > & {
border-left-width: 0;
background-position: top left;
background-repeat: no-repeat;
background-size: 1px 100%;
}
tr:first-of-type > & {
background-image: linear-gradient(
to bottom,
transparent 0%,
transparent 22px,
${e=>e.theme.schema.linesColor} 22px,
${e=>e.theme.schema.linesColor} 100%
);
}
tr.last > & {
background-image: linear-gradient(
to bottom,
${e=>e.theme.schema.linesColor} 0%,
${e=>e.theme.schema.linesColor} 22px,
transparent 22px,
transparent 100%
);
}
tr.last + tr > & {
border-left-color: transparent;
}
tr.last:first-child > & {
background: none;
border-left-color: transparent;
}
`,Lp=kr(Np)`
2022-02-04 13:00:46 +03:00
padding: 0;
`,Dp=kr(Np)`
2022-02-04 13:00:46 +03:00
vertical-align: top;
line-height: 20px;
white-space: nowrap;
font-size: 13px;
font-family: ${e=>e.theme.typography.code.fontFamily};
&.deprecated {
${Tp};
2022-02-04 13:00:46 +03:00
}
${({kind:e})=>"patternProperties"===e&&yr`
> span.property-name {
display: inline-table;
white-space: break-spaces;
margin-right: 20px;
2022-02-04 13:00:46 +03:00
::before,
::after {
content: '/';
filter: opacity(0.2);
}
}
`}
${({kind:e=""})=>["field","additionalProperties","patternProperties"].includes(e)?"":"font-style: italic"};
${Or("PropertyNameCell")};
`,Mp=kr.td`
2022-02-04 13:00:46 +03:00
border-bottom: 1px solid #9fb4be;
padding: 10px 0;
width: ${e=>e.theme.schema.defaultDetailsWidth};
box-sizing: border-box;
tr.expanded & {
border-bottom: none;
}
${xr("small")`
2022-02-04 13:00:46 +03:00
padding: 0 20px;
border-bottom: none;
border-left: 1px solid ${e=>e.theme.schema.linesColor};
tr.last > & {
border-left: none;
}
`}
${Or("PropertyDetailsCell")};
`,Fp=kr.span`
2022-02-04 13:00:46 +03:00
color: ${e=>e.theme.schema.linesColor};
font-family: ${e=>e.theme.typography.code.fontFamily};
margin-right: 10px;
&::before {
content: '';
display: inline-block;
vertical-align: middle;
width: 10px;
height: 1px;
background: ${e=>e.theme.schema.linesColor};
}
&::after {
content: '';
display: inline-block;
vertical-align: middle;
width: 1px;
background: ${e=>e.theme.schema.linesColor};
height: 7px;
}
`,zp=kr.div`
2022-02-04 13:00:46 +03:00
padding: ${({theme:e})=>e.schema.nestingSpacing};
`,Up=kr.table`
2022-02-04 13:00:46 +03:00
border-collapse: separate;
border-radius: 3px;
font-size: ${e=>e.theme.typography.fontSize};
border-spacing: 0;
width: 100%;
> tr {
vertical-align: middle;
}
${xr("small")`
2022-02-04 13:00:46 +03:00
display: block;
> tr, > tbody > tr {
display: block;
}
`}
${xr("small",!1," and (-ms-high-contrast:none)")`
2022-02-04 13:00:46 +03:00
td {
float: left;
width: 100%;
}
`}
&
${zp},
2022-02-04 13:00:46 +03:00
&
${zp}
${zp}
${zp},
2022-02-04 13:00:46 +03:00
&
${zp}
${zp}
${zp}
${zp}
${zp} {
2022-02-04 13:00:46 +03:00
margin: ${({theme:e})=>e.schema.nestingSpacing};
margin-right: 0;
background: ${({theme:e})=>e.schema.nestedBackground};
}
&
${zp}
${zp},
2022-02-04 13:00:46 +03:00
&
${zp}
${zp}
${zp}
${zp},
2022-02-04 13:00:46 +03:00
&
${zp}
${zp}
${zp}
${zp}
${zp}
${zp} {
2022-02-04 13:00:46 +03:00
background: #ffffff;
}
`,qp=kr.div`
2022-02-04 13:00:46 +03:00
margin: 0 0 3px 0;
display: inline-block;
`,Vp=kr.span`
2022-02-04 13:00:46 +03:00
font-size: 0.9em;
margin-right: 10px;
color: ${e=>e.theme.colors.primary.main};
font-family: ${e=>e.theme.typography.headings.fontFamily};
}
`,Bp=kr.button`
2022-02-04 13:00:46 +03:00
display: inline-block;
margin-right: 10px;
margin-bottom: 5px;
font-size: 0.8em;
cursor: pointer;
border: 1px solid ${e=>e.theme.colors.primary.main};
padding: 2px 10px;
line-height: 1.5em;
outline: none;
&:focus {
box-shadow: 0 0 0 1px ${e=>e.theme.colors.primary.main};
}
${({deprecated:e})=>e&&Tp||""};
${e=>e.active?`\n color: white;\n background-color: ${e.theme.colors.primary.main};\n &:focus {\n box-shadow: none;\n background-color: ${Et(.15,e.theme.colors.primary.main)};\n }\n `:`\n color: ${e.theme.colors.primary.main};\n background-color: white;\n `}
`,Wp=kr.div`
2022-02-04 13:00:46 +03:00
font-size: 0.9em;
font-family: ${e=>e.theme.typography.code.fontFamily};
&::after {
content: ' [';
}
`,Hp=kr.div`
2022-02-04 13:00:46 +03:00
font-size: 0.9em;
font-family: ${e=>e.theme.typography.code.fontFamily};
&::after {
content: ']';
}
`;function Yp(e){return function(t){return!!t.type&&t.type.tabsRole===e}}var Kp=Yp("Tab"),Gp=Yp("TabList"),Qp=Yp("TabPanel");function Xp(){return Xp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xp.apply(this,arguments)}function Zp(e,t){return n.Children.map(e,(function(e){return null===e?null:function(e){return Kp(e)||Gp(e)||Qp(e)}(e)?t(e):e.props&&e.props.children&&"object"==typeof e.props.children?(0,n.cloneElement)(e,Xp({},e.props,{children:Zp(e.props.children,t)})):e}))}function Jp(e,t){return n.Children.forEach(e,(function(e){null!==e&&(Kp(e)||Qp(e)?t(e):e.props&&e.props.children&&"object"==typeof e.props.children&&(Gp(e)&&t(e),Jp(e.props.children,t)))}))}function ed(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=ed(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function td(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=ed(e))&&(n&&(n+=" "),n+=t);return n}var rd,nd=0;function od(){return"react-tabs-"+nd++}function id(e){var t=0;return Jp(e,(function(e){Kp(e)&&t++})),t}function ad(){return ad=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ad.apply(this,arguments)}function sd(e,t){return sd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},sd(e,t)}function ld(e){return e&&"getAttribute"in e}function cd(e){return ld(e)&&"tab"===e.getAttribute("role")}function ud(e){return ld(e)&&"true"===e.getAttribute("aria-disabled")}var pd=function(e){var t,r;function o(){for(var t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(t=e.call.apply(e,[this].concat(n))||this).tabNodes=[],t.handleKeyDown=function(e){var r=t.props,n=r.direction,o=r.disableUpDownKeys;if(t.isTabFromContainer(e.target)){var i=t.props.selectedIndex,a=!1,s=!1;32!==e.keyCode&&13!==e.keyCode||(a=!0,s=!1,t.handleClick(e)),37===e.keyCode||!o&&38===e.keyCode?(i="rtl"===n?t.getNextTab(i):t.getPrevTab(i),a=!0,s=!0):39===e.keyCode||!o&&40===e.keyCode?(i="rtl"===n?t.getPrevTab(i):t.getNextTab(i),a=!0,s=!0):35===e.keyCode?(i=t.getLastTab(),a=!0,s=!0):36===e.keyCode&&(i=t.getFirstTab(),a=!0,s=!0),a&&e.preventDefault(),s&&t.setSelected(i,e)}},t.handleClick=function(e){var r=e.target;do{if(t.isTabFromContainer(r)){if(ud(r))return;var n=[].slice.call(r.parentNode.children).filter(cd).indexOf(r);return void t.setSelected(n,e)}}while(null!=(r=r.parentNode))},t}r=e,(t=o).prototype=Object.create(r.prototype),t.prototype.constructor=t,sd(t,r);var i=o.prototype;return i.setSelected=function(e,t){if(!(e<0||e>=this.getTabsCount())){var r=this.props;(0,r.onSelect)(e,r.selectedIndex,t)}},i.getNextTab=function(e){for(var t=this.getTabsCount(),r=e+1;r<t;r++)if(!ud(this.getTab(r)))return r;for(var n=0;n<e;n++)if(!ud(this.getTab(n)))return n;return e},i.getPrevTab=function(e){for(var t=e;t--;)if(!ud(this.getTab(t)))return t;for(t=this.getTabsCount();t-- >e;)if(!ud(this.getTab(t)))return t;return e},i.getFirstTab=function(){for(var e=this.getTabsCount(),t=0;t<e;t++)if(!ud(this.getTab(t)))return t;return null},i.getLastTab=function(){for(var e=this.getTabsCount();e--;)if(!ud(this.getTab(e)))return e;return null},i.getTabsCount=function(){return id(this.props.children)},i.getPanelsCount=function(){return e=this.props.children,t=0,Jp(e,(function(e){Qp(e)&&t++})),t;var e,t},i.getTab=function(e){return this.tabNodes["tabs-"+e]},i.getChildren=function(){var e=this,t=0,r=this.props,o=r.children,i=r.disabledTabClassName,a=r.focus,s=r.forceRenderTabPanel,l=r.selectedIndex,c=r.selectedTabClassName,u=r.selectedTabPanelClassName,p=r.environment;this.tabIds=this.tabIds||[],this.panelIds=this.panelIds||[];for(var d=this.tabIds.length-this.getTabsCount();d++<0;)this.tabIds.push(od()),this.panelIds.push(od());return Zp(o,(function(r){var o=r;if(Gp(r)){var d=0,f=!1;null==rd&&function(e){var t=e||("undefi
2022-02-04 13:00:46 +03:00
> ul {
list-style: none;
padding: 0;
margin: 0;
margin: 0 -5px;
> li {
padding: 5px 10px;
display: inline-block;
background-color: ${({theme:e})=>e.codeBlock.backgroundColor};
border-bottom: 1px solid rgba(0, 0, 0, 0.5);
cursor: pointer;
text-align: center;
outline: none;
color: ${({theme:e})=>Et(e.colors.tonalOffset,e.rightPanel.textColor)};
2022-02-04 13:00:46 +03:00
margin: 0
${({theme:e})=>`${e.spacing.unit}px ${e.spacing.unit}px ${e.spacing.unit}px`};
border: 1px solid ${({theme:e})=>Et(.05,e.codeBlock.backgroundColor)};
2022-02-04 13:00:46 +03:00
border-radius: 5px;
min-width: 60px;
font-size: 0.9em;
font-weight: bold;
&.react-tabs__tab--selected {
color: ${e=>e.theme.colors.text.primary};
background: ${({theme:e})=>e.rightPanel.textColor};
&:focus {
outline: auto;
}
}
&:only-child {
flex: none;
min-width: 100px;
}
&.tab-success {
color: ${e=>e.theme.colors.responses.success.tabTextColor};
}
&.tab-redirect {
color: ${e=>e.theme.colors.responses.redirect.tabTextColor};
}
&.tab-info {
color: ${e=>e.theme.colors.responses.info.tabTextColor};
}
&.tab-error {
color: ${e=>e.theme.colors.responses.error.tabTextColor};
}
}
}
> .react-tabs__tab-panel {
background: ${({theme:e})=>e.codeBlock.backgroundColor};
& > div,
& > pre {
padding: ${e=>4*e.theme.spacing.unit}px;
margin: 0;
}
& > div > pre {
padding: 0;
}
}
`,_d=(kr(Sd)`
2022-02-04 13:00:46 +03:00
> ul {
display: block;
> li {
padding: 2px 5px;
min-width: auto;
margin: 0 15px 0 0;
font-size: 13px;
font-weight: normal;
border-bottom: 1px dashed;
color: ${({theme:e})=>Et(e.colors.tonalOffset,e.rightPanel.textColor)};
2022-02-04 13:00:46 +03:00
border-radius: 0;
background: none;
&:last-child {
margin-right: 0;
}
&.react-tabs__tab--selected {
color: ${({theme:e})=>e.rightPanel.textColor};
background: none;
}
}
}
> .react-tabs__tab-panel {
& > div,
& > pre {
padding: ${e=>2*e.theme.spacing.unit}px 0;
}
}
`,kr.div`
2022-02-04 13:00:46 +03:00
/**
* Based on prism-dark.css
*/
code[class*='language-'],
pre[class*='language-'] {
/* color: white;
background: none; */
text-shadow: 0 -0.1em 0.2em black;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
@media print {
code[class*='language-'],
pre[class*='language-'] {
text-shadow: none;
}
}
/* Code blocks */
pre[class*='language-'] {
padding: 1em;
margin: 0.5em 0;
overflow: auto;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: hsl(30, 20%, 50%);
}
.token.punctuation {
opacity: 0.7;
}
.namespace {
opacity: 0.7;
}
.token.property,
.token.tag,
.token.number,
.token.constant,
.token.symbol {
color: #4a8bb3;
}
.token.boolean {
color: #e64441;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #a0fbaa;
& + a,
& + a:visited {
color: #4ed2ba;
text-decoration: underline;
}
}
.token.property.string {
color: white;
}
.token.operator,
.token.entity,
.token.url,
.token.variable {
color: hsl(40, 90%, 60%);
}
.token.atrule,
.token.attr-value,
.token.keyword {
color: hsl(350, 40%, 70%);
}
.token.regex,
.token.important {
color: #e90;
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}
.token.deleted {
color: red;
}
${Or("Prism")};
`),Ed=kr.div`
2022-02-04 13:00:46 +03:00
opacity: 0.7;
transition: opacity 0.3s ease;
text-align: right;
&:focus-within {
opacity: 1;
}
> button {
background-color: transparent;
border: 0;
color: inherit;
padding: 2px 10px;
font-family: ${({theme:e})=>e.typography.fontFamily};
font-size: ${({theme:e})=>e.typography.fontSize};
line-height: ${({theme:e})=>e.typography.lineHeight};
cursor: pointer;
outline: 0;
:hover,
:focus {
background: rgba(255, 255, 255, 0.1);
}
}
`,Pd=kr.div`
&:hover ${Ed} {
2022-02-04 13:00:46 +03:00
opacity: 1;
}
`,$d=kr(_d.withComponent("pre"))`
2022-02-04 13:00:46 +03:00
font-family: ${e=>e.theme.typography.code.fontFamily};
font-size: ${e=>e.theme.typography.code.fontSize};
overflow-x: auto;
margin: 0;
white-space: ${({theme:e})=>e.typography.code.wrap?"pre-wrap":"pre"};
`;function Cd(e){return getComputedStyle(e)}function Ad(e,t){for(var r in t){var n=t[r];"number"==typeof n&&(n+="px"),e.style[r]=n}return e}function Rd(e){var t=document.createElement("div");return t.className=e,t}var jd="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function Td(e,t){if(!jd)throw new Error("No element matching method supported");return jd.call(e,t)}function Id(e){e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)}function Nd(e,t){return Array.prototype.filter.call(e.children,(function(e){return Td(e,t)}))}var Ld=function(e){return"ps__thumb-"+e},Dd=function(e){return"ps__rail-"+e},Md="ps__child--consume",Fd="ps--focus",zd="ps--clicking",Ud=function(e){return"ps--active-"+e},qd=function(e){return"ps--scrolling-"+e},Vd={x:null,y:null};function Bd(e,t){var r=e.element.classList,n=qd(t);r.contains(n)?clearTimeout(Vd[t]):r.add(n)}function Wd(e,t){Vd[t]=setTimeout((function(){return e.isAlive&&e.element.classList.remove(qd(t))}),e.settings.scrollingThreshold)}var Hd=function(e){this.element=e,this.handlers={}},Yd={isEmpty:{configurable:!0}};Hd.prototype.bind=function(e,t){void 0===this.handlers[e]&&(this.handlers[e]=[]),this.handlers[e].push(t),this.element.addEventListener(e,t,!1)},Hd.prototype.unbind=function(e,t){var r=this;this.handlers[e]=this.handlers[e].filter((function(n){return!(!t||n===t)||(r.element.removeEventListener(e,n,!1),!1)}))},Hd.prototype.unbindAll=function(){for(var e in this.handlers)this.unbind(e)},Yd.isEmpty.get=function(){var e=this;return Object.keys(this.handlers).every((function(t){return 0===e.handlers[t].length}))},Object.defineProperties(Hd.prototype,Yd);var Kd=function(){this.eventElements=[]};function Gd(e){if("function"==typeof window.CustomEvent)return new CustomEvent(e);var t=document.createEvent("CustomEvent");return t.initCustomEvent(e,!1,!1,void 0),t}function Qd(e,t,r,n,o){var i;if(void 0===n&&(n=!0),void 0===o&&(o=!1),"top"===t)i=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==t)throw new Error("A proper axis should be provided");i=["contentWidth","containerWidth","scrollLeft","x","left","right"]}!function(e,t,r,n,o){var i=r[0],a=r[1],s=r[2],l=r[3],c=r[4],u=r[5];void 0===n&&(n=!0),void 0===o&&(o=!1);var p=e.element;e.reach[l]=null,p[s]<1&&(e.reach[l]="start"),p[s]>e[i]-e[a]-1&&(e.reach[l]="end"),t&&(p.dispatchEvent(Gd("ps-scroll-"+l)),t<0?p.dispatchEvent(Gd("ps-scroll-"+c)):t>0&&p.dispatchEvent(Gd("ps-scroll-"+u)),n&&function(e,t){Bd(e,t),Wd(e,t)}(e,l)),e.reach[l]&&(t||o)&&p.dispatchEvent(Gd("ps-"+l+"-reach-"+e.reach[l]))}(e,r,i,n,o)}function Xd(e){return parseInt(e,10)||0}Kd.prototype.eventElement=function(e){var t=this.eventElements.filter((function(t){return t.element===e}))[0];return t||(t=new Hd(e),this.eventElements.push(t)),t},Kd.prototype.bind=function(e,t,r){this.eventElement(e).bind(t,r)},Kd.prototype.unbind=function(e,t,r){var n=this.eventElement(e);n.unbind(t,r),n.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(n),1)},Kd.prototype.unbindAll=function(){this.eventElements.forEach((function(e){return e.unbindAll()})),this.eventElements=[]},Kd.prototype.once=function(e,t,r){var n=this.eventElement(e),o=function(e){n.unbind(t,o),r(e)};n.bind(t,o)};var Zd={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)};function Jd(e){var t=e.element,r=Math.floor(t.scrollTop),n=t.getBoundingClientRect();e.containerWidth=Math.ceil(n.width),e.containerHeight=Math.ceil(n.height),e.contentWidth=t.scrollWidth,e.contentHeight=t.scrollHeight,t.contains(e.scrollbarXRail)||(Nd(t,Dd("x")).forEach((function(
position: relative;
`;class mf extends n.Component{constructor(){super(...arguments),this.handleRef=e=>{this._container=e}}componentDidMount(){const e=this._container.parentElement&&this._container.parentElement.scrollTop||0;this.inst=new pf(this._container,this.props.options||{}),this._container.scrollTo&&this._container.scrollTo(0,e)}componentDidUpdate(){this.inst.update()}componentWillUnmount(){this.inst.destroy()}render(){const{children:e,className:t,updateFn:r}=this.props;return r&&r(this.componentDidUpdate.bind(this)),n.createElement(n.Fragment,null,df&&n.createElement(ff,null),n.createElement(hf,{className:`scrollbar-container ${t}`,ref:this.handleRef},e))}}function gf(e){return n.createElement(Rr.Consumer,null,(t=>t.nativeScrollbars?n.createElement("div",{style:{overflow:"auto",overscrollBehavior:"contain",msOverflowStyle:"-ms-autohiding-scrollbar"}},e.children):n.createElement(mf,((e,t)=>{for(var r in t||(t={}))lf.call(t,r)&&uf(e,r,t[r]);if(sf)for(var r of sf(t))cf.call(t,r)&&uf(e,r,t[r]);return e})({},e),e.children)))}const yf=kr((({className:e,style:t})=>n.createElement("svg",{className:e,style:t,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},n.createElement("polyline",{points:"6 9 12 15 18 9"}))))`
position: absolute;
pointer-events: none;
z-index: 1;
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
right: 8px;
margin: auto;
text-align: center;
polyline {
color: ${e=>"dark"===e.variant&&"white"};
}
`,vf=n.memo((e=>{const{options:t,onChange:r,placeholder:o,value:i="",variant:a,className:s}=e;return n.createElement("div",{className:s},n.createElement(yf,{variant:a}),n.createElement("select",{onChange:e=>{const{selectedIndex:n}=e.target;r(t[o?n-1:n])},value:i,className:"dropdown-select"},o&&n.createElement("option",{disabled:!0,hidden:!0,value:o},o),t.map((({idx:e,value:t,title:r},o)=>n.createElement("option",{key:e||t+o,value:t},r||t)))),n.createElement("label",null,i))})),bf=He(vf)`
label {
box-sizing: border-box;
min-width: 100px;
outline: none;
display: inline-block;
font-family: ${e=>e.theme.typography.headings.fontFamily};
color: ${({theme:e})=>e.colors.text.primary};
vertical-align: bottom;
width: ${({fullWidth:e})=>e?"100%":"auto"};
text-transform: none;
padding: 0 22px 0 4px;
font-size: 0.929em;
line-height: 1.5em;
font-family: inherit;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.dropdown-select {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
border: none;
appearance: none;
cursor: pointer;
color: ${({theme:e})=>e.colors.text.primary};
line-height: inherit;
font-family: inherit;
}
box-sizing: border-box;
min-width: 100px;
outline: none;
display: inline-block;
border-radius: 2px;
border: 1px solid rgba(38, 50, 56, 0.5);
vertical-align: bottom;
padding: 2px 0px 2px 6px;
2022-02-04 13:00:46 +03:00
position: relative;
width: auto;
background: white;
color: #263238;
font-family: ${e=>e.theme.typography.headings.fontFamily};
font-size: 0.929em;
line-height: 1.5em;
cursor: pointer;
transition: border 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
&:hover,
&:focus-within {
border: 1px solid ${e=>e.theme.colors.primary.main};
color: ${e=>e.theme.colors.primary.main};
box-shadow: 0px 0px 0px 1px ${e=>e.theme.colors.primary.main};
}
`,wf=He(bf)`
margin-left: 10px;
text-transform: none;
font-size: 0.969em;
font-size: 1em;
border: none;
padding: 0 1.2em 0 0;
background: transparent;
&:hover,
&:focus-within {
border: none;
box-shadow: none;
label {
color: ${e=>e.theme.colors.primary.main};
text-shadow: 0px 0px 0px ${e=>e.theme.colors.primary.main};
}
}
`,xf=He.span`
margin-left: 10px;
text-transform: none;
font-size: 0.929em;
color: black;
`;var kf=Object.defineProperty,Of=Object.getOwnPropertySymbols,Sf=Object.prototype.hasOwnProperty,_f=Object.prototype.propertyIsEnumerable,Ef=(e,t,r)=>t in e?kf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;function Pf(e){const{Label:t=xf,Dropdown:r=wf}=e;return 1===e.options.length?n.createElement(t,null,e.options[0].value):n.createElement(r,((e,t)=>{for(var r in t||(t={}))Sf.call(t,r)&&Ef(e,r,t[r]);if(Of)for(var r of Of(t))_f.call(t,r)&&Ef(e,r,t[r]);return e})({},e))}var $f=r(7856);const Cf=yr`
2022-02-04 13:00:46 +03:00
a {
text-decoration: ${e=>e.theme.typography.links.textDecoration};
2022-02-04 13:00:46 +03:00
color: ${e=>e.theme.typography.links.color};
&:visited {
color: ${e=>e.theme.typography.links.visited};
}
&:hover {
color: ${e=>e.theme.typography.links.hover};
text-decoration: ${e=>e.theme.typography.links.hoverTextDecoration};
2022-02-04 13:00:46 +03:00
}
}
`,Af=kr(_d)`
2022-02-04 13:00:46 +03:00
font-family: ${e=>e.theme.typography.fontFamily};
font-weight: ${e=>e.theme.typography.fontWeightRegular};
line-height: ${e=>e.theme.typography.lineHeight};
p {
&:last-child {
margin-bottom: 0;
}
}
${({compact:e})=>e&&"\n p:first-child {\n margin-top: 0;\n }\n p:last-child {\n margin-bottom: 0;\n }\n "}
${({inline:e})=>e&&" p {\n display: inline-block;\n }"}
h1 {
${vp(1)};
2022-02-04 13:00:46 +03:00
color: ${e=>e.theme.colors.primary.main};
margin-top: 0;
}
h2 {
${vp(2)};
2022-02-04 13:00:46 +03:00
color: ${e=>e.theme.colors.text.primary};
}
code {
color: ${({theme:e})=>e.typography.code.color};
background-color: ${({theme:e})=>e.typography.code.backgroundColor};
font-family: ${e=>e.theme.typography.code.fontFamily};
border-radius: 2px;
border: 1px solid rgba(38, 50, 56, 0.1);
padding: 0 ${({theme:e})=>e.spacing.unit}px;
font-size: ${e=>e.theme.typography.code.fontSize};
font-weight: ${({theme:e})=>e.typography.code.fontWeight};
word-break: break-word;
}
pre {
font-family: ${e=>e.theme.typography.code.fontFamily};
white-space: ${({theme:e})=>e.typography.code.wrap?"pre-wrap":"pre"};
background-color: ${({theme:e})=>e.codeBlock.backgroundColor};
color: white;
padding: ${e=>4*e.theme.spacing.unit}px;
overflow-x: auto;
line-height: normal;
border-radius: 0px;
border: 1px solid rgba(38, 50, 56, 0.1);
code {
background-color: transparent;
color: white;
padding: 0;
&:before,
&:after {
content: none;
}
}
}
blockquote {
margin: 0;
margin-bottom: 1em;
padding: 0 15px;
color: #777;
border-left: 4px solid #ddd;
}
img {
max-width: 100%;
box-sizing: content-box;
}
ul,
ol {
padding-left: 2em;
margin: 0;
margin-bottom: 1em;
ul,
ol {
margin-bottom: 0;
margin-top: 0;
}
}
table {
display: block;
width: 100%;
overflow: auto;
word-break: normal;
word-break: keep-all;
border-collapse: collapse;
border-spacing: 0;
margin-top: 1.5em;
margin-bottom: 1.5em;
}
table tr {
background-color: #fff;
border-top: 1px solid #ccc;
&:nth-child(2n) {
background-color: ${({theme:e})=>e.schema.nestedBackground};
}
}
table th,
table td {
padding: 6px 13px;
border: 1px solid #ddd;
}
table th {
text-align: left;
font-weight: bold;
}
${Pp(".share-link")};
2022-02-04 13:00:46 +03:00
${Cf}
2022-02-04 13:00:46 +03:00
${Or("Markdown")};
`;var Rf=Object.defineProperty,jf=Object.getOwnPropertySymbols,Tf=Object.prototype.hasOwnProperty,If=Object.prototype.propertyIsEnumerable,Nf=(e,t,r)=>t in e?Rf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;const Lf=Af.withComponent("span");function Df(e){const t=e.inline?Lf:Af;return n.createElement(Tr,null,(r=>{return n.createElement(t,((e,t)=>{for(var r in t||(t={}))Tf.call(t,r)&&Nf(e,r,t[r]);if(jf)for(var r of jf(t))If.call(t,r)&&Nf(e,r,t[r]);return e})({className:"redoc-markdown "+(e.className||""),dangerouslySetInnerHTML:{__html:(o=r.untrustedSpec,i=e.html,o?$f.sanitize(i):i)},"data-role":e["data-role"]},e));var o,i}))}class Mf extends n.Component{render(){const{source:e,inline:t,compact:r,className:o,"data-role":i}=this.props,a=new Rl;return n.createElement(Df,{html:a.renderMd(e),inline:t,compact:r,className:o,"data-role":i})}}const Ff=kr.div`
2022-02-04 13:00:46 +03:00
position: relative;
`,zf=kr.div`
2022-02-04 13:00:46 +03:00
position: absolute;
min-width: 80px;
max-width: 500px;
background: #fff;
bottom: 100%;
left: 50%;
margin-bottom: 10px;
transform: translateX(-50%);
border-radius: 4px;
padding: 0.3em 0.6em;
text-align: center;
box-shadow: 0px 0px 5px 0px rgba(204, 204, 204, 1);
`,Uf=kr.div`
2022-02-04 13:00:46 +03:00
background: #fff;
color: #000;
display: inline;
font-size: 0.85em;
white-space: nowrap;
`,qf=kr.div`
2022-02-04 13:00:46 +03:00
position: absolute;
width: 0;
height: 0;
bottom: -5px;
left: 50%;
margin-left: -5px;
border-left: solid transparent 5px;
border-right: solid transparent 5px;
border-top: solid #fff 5px;
`,Vf=kr.div`
2022-02-04 13:00:46 +03:00
position: absolute;
width: 100%;
height: 20px;
bottom: -20px;
`;class Bf extends n.Component{render(){const{open:e,title:t,children:r}=this.props;return n.createElement(Ff,null,r,e&&n.createElement(zf,null,n.createElement(Uf,null,t),n.createElement(qf,null),n.createElement(Vf,null)))}}const Wf="undefined"!=typeof document&&document.queryCommandSupported&&document.queryCommandSupported("copy");class Hf{static isSupported(){return Wf}static selectElement(e){let t,r;document.body.createTextRange?(t=document.body.createTextRange(),t.moveToElementText(e),t.select()):document.createRange&&window.getSelection&&(r=window.getSelection(),t=document.createRange(),t.selectNodeContents(e),r.removeAllRanges(),r.addRange(t))}static deselect(){if(document.selection)document.selection.empty();else if(window.getSelection){const e=window.getSelection();e&&e.removeAllRanges()}}static copySelected(){let e;try{e=document.execCommand("copy")}catch(t){e=!1}return e}static copyElement(e){Hf.selectElement(e);const t=Hf.copySelected();return t&&Hf.deselect(),t}static copyCustom(e){const t=document.createElement("textarea");t.style.position="fixed",t.style.top="0",t.style.left="0",t.style.width="2em",t.style.height="2em",t.style.padding="0",t.style.border="none",t.style.outline="none",t.style.boxShadow="none",t.style.background="transparent",t.value=e,document.body.appendChild(t),t.select();const r=Hf.copySelected();return document.body.removeChild(t),r}}const Yf=e=>{const[t,r]=n.useState(!1),o=()=>{const t="string"==typeof e.data?e.data:JSON.stringify(e.data,null,2);Hf.copyCustom(t),i()},i=()=>{r(!0),setTimeout((()=>{r(!1)}),1500)};return e.children({renderCopyButton:()=>n.createElement("button",{onClick:o},n.createElement(Bf,{title:Hf.isSupported()?"Copied":"Not supported in your browser",open:t},"Copy"))})};let Kf=1;function Gf(e,t){Kf=1;let r="";return r+='<div class="redoc-json">',r+="<code>",r+=eh(e,t),r+="</code>",r+="</div>",r}function Qf(e){return void 0!==e?e.toString().replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):""}function Xf(e){return JSON.stringify(e).slice(1,-1)}function Zf(e,t){return'<span class="'+t+'">'+Qf(e)+"</span>"}function Jf(e){return'<span class="token punctuation">'+e+"</span>"}function eh(e,t){const r=typeof e;let n="";return null==e?n+=Zf("null","token keyword"):e&&e.constructor===Array?(Kf++,n+=function(e,t){const r=Kf>t?"collapsed":"";let n=`<button class="collapser" aria-label="${Kf>t+1?"expand":"collapse"}"></button>${Jf("[")}<span class="ellipsis"></span><ul class="array collapsible">`,o=!1;const i=e.length;for(let a=0;a<i;a++)o=!0,n+='<li><div class="hoverable '+r+'">',n+=eh(e[a],t),a<i-1&&(n+=","),n+="</div></li>";return n+=`</ul>${Jf("]")}`,o||(n=Jf("[ ]")),n}(e,t),Kf--):e&&e.constructor===Date?n+=Zf('"'+e.toISOString()+'"',"token string"):"object"===r?(Kf++,n+=function(e,t){const r=Kf>t?"collapsed":"",n=Object.keys(e),o=n.length;let i=`<button class="collapser" aria-label="${Kf>t+1?"expand":"collapse"}"></button>${Jf("{")}<span class="ellipsis"></span><ul class="obj collapsible">`,a=!1;for(let s=0;s<o;s++){const l=n[s];a=!0,i+='<li><div class="hoverable '+r+'">',i+='<span class="property token string">"'+Qf(l)+'"</span>: ',i+=eh(e[l],t),s<o-1&&(i+=Jf(",")),i+="</div></li>"}return i+=`</ul>${Jf("}")}`,a||(i=Jf("{ }")),i}(e,t),Kf--):"number"===r?n+=Zf(e,"token number"):"string"===r?/^(http|https):\/\/[^\s]+$/.test(e)?n+=Zf('"',"token string")+'<a href="'+encodeURI(e)+'">'+Qf(Xf(e))+"</a>"+Zf('"',"token string"):n+=Zf('"'+Xf(e)+'"',"token string"):"boolean"===r&&(n+=Zf(e,"token boolean")),n}const th=yr`
2022-02-04 13:00:46 +03:00
.redoc-json code > .collapser {
display: none;
pointer-events: none;
}
font-family: ${e=>e.theme.typography.code.fontFamily};
font-size: ${e=>e.theme.typography.code.fontSize};
white-space: ${({theme:e})=>e.typography.code.wrap?"pre-wrap":"pre"};
contain: content;
overflow-x: auto;
.callback-function {
color: gray;
}
.collapser:after {
content: '-';
cursor: pointer;
}
.collapsed > .collapser:after {
content: '+';
cursor: pointer;
}
.ellipsis:after {
content: ' … ';
}
.collapsible {
margin-left: 2em;
}
.hoverable {
padding-top: 1px;
padding-bottom: 1px;
padding-left: 2px;
padding-right: 2px;
border-radius: 2px;
}
.hovered {
background-color: rgba(235, 238, 249, 1);
}
.collapser {
background-color: transparent;
border: 0;
color: #fff;
font-family: ${e=>e.theme.typography.code.fontFamily};
font-size: ${e=>e.theme.typography.code.fontSize};
padding-right: 6px;
padding-left: 6px;
padding-top: 0;
padding-bottom: 0;
display: flex;
align-items: center;
justify-content: center;
width: 15px;
height: 15px;
position: absolute;
top: 4px;
left: -1.5em;
cursor: default;
user-select: none;
-webkit-user-select: none;
padding: 2px;
&:focus {
outline-color: #fff;
outline-style: dotted;
outline-width: 1px;
}
}
ul {
list-style-type: none;
padding: 0px;
margin: 0px 0px 0px 26px;
}
li {
position: relative;
display: block;
}
.hoverable {
display: inline-block;
}
.selected {
outline-style: solid;
outline-width: 1px;
outline-style: dotted;
}
.collapsed > .collapsible {
display: none;
}
.ellipsis {
display: none;
}
.collapsed > .ellipsis {
display: inherit;
}
`,rh=kr.div`
&:hover > ${Ed} {
2022-02-04 13:00:46 +03:00
opacity: 1;
}
`,nh=kr((e=>{const[t,r]=n.useState(),o=({renderCopyButton:t})=>{const o=e.data&&Object.values(e.data).some((e=>"object"==typeof e&&null!==e));return n.createElement(rh,null,n.createElement(Ed,null,t(),o&&n.createElement(n.Fragment,null,n.createElement("button",{onClick:i}," Expand all "),n.createElement("button",{onClick:a}," Collapse all "))),n.createElement(Rr.Consumer,null,(t=>n.createElement(_d,{className:e.className,ref:e=>r(e),dangerouslySetInnerHTML:{__html:Gf(e.data,t.jsonSampleExpandLevel)}}))))},i=()=>{const e=null==t?void 0:t.getElementsByClassName("collapsible");for(const t of Array.prototype.slice.call(e)){const e=t.parentNode;e.classList.remove("collapsed"),e.querySelector(".collapser").setAttribute("aria-label","collapse")}},a=()=>{const e=null==t?void 0:t.getElementsByClassName("collapsible"),r=Array.prototype.slice.call(e,1);for(const e of r){const t=e.parentNode;t.classList.add("collapsed"),t.querySelector(".collapser").setAttribute("aria-label","expand")}},s=e=>{let t;"collapser"===e.className&&(t=e.parentElement.getElementsByClassName("collapsible")[0],t.parentElement.classList.contains("collapsed")?(t.parentElement.classList.remove("collapsed"),e.setAttribute("aria-label","collapse")):(t.parentElement.classList.add("collapsed"),e.setAttribute("aria-label","expand")))},l=n.useCallback((e=>{s(e.target)}),[]),c=n.useCallback((e=>{"Enter"===e.key&&s(e.target)}),[]);return n.useEffect((()=>(null==t||t.addEventListener("click",l),null==t||t.addEventListener("focus",c),()=>{null==t||t.removeEventListener("click",l),null==t||t.removeEventListener("focus",c)})),[l,c,t]),n.createElement(Yf,{data:e.data},o)}))`
${th};
`,oh=e=>{const{source:t,lang:r}=e;return n.createElement($d,{dangerouslySetInnerHTML:{__html:ys(t,r)}})},ih=e=>{const{source:t,lang:r}=e;return n.createElement(Yf,{data:t},(({renderCopyButton:e})=>n.createElement(Pd,null,n.createElement(Ed,null,e()),n.createElement(oh,{lang:r,source:t}))))};function ah({value:e,mimeType:t}){return Ja(t)?n.createElement(nh,{data:e}):("object"==typeof e&&(e=JSON.stringify(e,null,2)),n.createElement(ih,{lang:(r=t,-1!==r.search(/xml/i)?"xml":-1!==r.search(/csv/i)?"csv":-1!==r.search(/plain/i)?"tex":"clike"),source:e}));var r}function sh({example:e,mimeType:t}){return void 0===e.value&&e.externalValueUrl?n.createElement(lh,{example:e,mimeType:t}):n.createElement(ah,{value:e.value,mimeType:t})}function lh({example:e,mimeType:t}){const r=function(e,t){const[,r]=(0,n.useState)(!0),o=(0,n.useRef)(void 0),i=(0,n.useRef)(void 0);return i.current!==e&&(o.current=void 0),i.current=e,(0,n.useEffect)((()=>{(()=>{return n=this,i=function*(){r(!0);try{o.current=yield e.getExternalValue(t)}catch(e){o.current=e}r(!1)},new Promise(((e,t)=>{var r=e=>{try{a(i.next(e))}catch(e){t(e)}},o=e=>{try{a(i.throw(e))}catch(e){t(e)}},a=t=>t.done?e(t.value):Promise.resolve(t.value).then(r,o);a((i=i.apply(n,null)).next())}));var n,i})()}),[e,t]),o.current}(e,t);return void 0===r?n.createElement("span",null,"Loading..."):r instanceof Error?n.createElement($d,null,"Error loading external example: ",n.createElement("br",null),n.createElement("a",{className:"token string",href:e.externalValueUrl,target:"_blank",rel:"noopener noreferrer"},e.externalValueUrl)):n.createElement(ah,{value:r,mimeType:t})}const ch=kr.div`
2022-02-04 13:00:46 +03:00
padding: 0.9em;
background-color: ${({theme:e})=>Lt(.6,e.rightPanel.backgroundColor)};
2022-02-04 13:00:46 +03:00
margin: 0 0 10px 0;
display: block;
font-family: ${({theme:e})=>e.typography.headings.fontFamily};
font-size: 0.929em;
line-height: 1.5em;
`,uh=kr.span`
2022-02-04 13:00:46 +03:00
font-family: ${({theme:e})=>e.typography.headings.fontFamily};
font-size: 12px;
position: absolute;
z-index: 1;
top: -11px;
left: 12px;
font-weight: ${({theme:e})=>e.typography.fontWeightBold};
color: ${({theme:e})=>Lt(.3,e.rightPanel.textColor)};
`,ph=kr.div`
2022-02-04 13:00:46 +03:00
position: relative;
`,dh=kr(bf)`
label {
color: ${({theme:e})=>e.rightPanel.textColor};
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
2022-02-04 13:00:46 +03:00
font-size: 1em;
text-transform: none;
border: none;
}
margin: 0 0 10px 0;
display: block;
background-color: ${({theme:e})=>Lt(.6,e.rightPanel.backgroundColor)};
border: none;
padding: 0.9em 1.6em 0.9em 0.9em;
box-shadow: none;
&:hover,
&:focus-within {
2022-02-04 13:00:46 +03:00
border: none;
box-shadow: none;
background-color: ${({theme:e})=>Lt(.3,e.rightPanel.backgroundColor)};
2022-02-04 13:00:46 +03:00
}
`,fh=kr.div`
2022-02-04 13:00:46 +03:00
font-family: ${e=>e.theme.typography.code.fontFamily};
font-size: 12px;
color: #ee807f;
`;class hh extends n.Component{constructor(){super(...arguments),this.state={activeIdx:0},this.switchMedia=({idx:e})=>{void 0!==e&&this.setState({activeIdx:e})}}render(){const{activeIdx:e}=this.state,t=this.props.mediaType.examples||{},r=this.props.mediaType.name,o=n.createElement(fh,null,"No sample"),i=Object.keys(t);if(0===i.length)return o;if(i.length>1){const o=i.map(((e,r)=>({value:t[e].summary||e,idx:r}))),a=t[i[e]],s=a.description;return n.createElement(mh,null,n.createElement(ph,null,n.createElement(uh,null,"Example"),this.props.renderDropdown({value:o[e].value,options:o,onChange:this.switchMedia,ariaLabel:"Example"})),n.createElement("div",null,s&&n.createElement(Mf,{source:s}),n.createElement(sh,{example:a,mimeType:r})))}{const e=t[i[0]];return n.createElement(mh,null,e.description&&n.createElement(Mf,{source:e.description}),n.createElement(sh,{example:e,mimeType:r}))}}}const mh=kr.div`
2022-02-04 13:00:46 +03:00
margin-top: 15px;
`;if(!n.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!Ri)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");function gh(e){e()}var yh=[];function vh(e){return di(va(e,t));var t}var bh="undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry;function wh(e){return{reaction:e,mounted:!1,changedBeforeMount:!1,cleanAt:Date.now()+xh}}var xh=1e4,kh=bh?function(e){var t=new Map,r=1,n=new e((function(e){var r=t.get(e);r&&(r.reaction.dispose(),t.delete(e))}));return{addReactionToTrack:function(e,o,i){var a=r++;return n.register(i,a,e),e.current=wh(o),e.current.finalizationRegistryCleanupToken=a,t.set(a,e.current),e.current},recordReactionAsCommitted:function(e){n.unregister(e),e.current&&e.current.finalizationRegistryCleanupToken&&t.delete(e.current.finalizationRegistryCleanupToken)},forceCleanupTimerToRunNowForTests:function(){},resetCleanupScheduleForTests:function(){}}}(bh):function(){var e,t=new Set;function r(){void 0===e&&(e=setTimeout(n,1e4))}function n(){e=void 0;var n=Date.now();t.forEach((function(e){var r=e.current;r&&n>=r.cleanAt&&(r.reaction.dispose(),e.current=null,t.delete(e))})),t.size>0&&r()}return{addReactionToTrack:function(e,n,o){var i;return e.current=wh(n),i=e,t.add(i),r(),e.current},recordReactionAsCommitted:function(e){t.delete(e)},forceCleanupTimerToRunNowForTests:function(){e&&(clearTimeout(e),n())},resetCleanupScheduleForTests:function(){var r,n;if(t.size>0){try{for(var o=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),i=o.next();!i.done;i=o.next()){var a=i.value,s=a.current;s&&(s.reaction.dispose(),a.current=null)}}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}t.clear()}e&&(clearTimeout(e),e=void 0)}}}(),Oh=kh.addReactionToTrack,Sh=kh.recordReactionAsCommitted,_h=(kh.resetCleanupScheduleForTests,kh.forceCleanupTimerToRunNowForTests,!1);function Eh(){return _h}function Ph(e){return"observer"+e}var $h=function(){};function Ch(e,t){if(void 0===t&&(t="observed"),Eh())return e();var r,o=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}(n.useState(new $h),1)[0],i=(r=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}((0,n.useState)(0),2)[1],(0,n.useCallback)((function(){r((function(e){return e+1}))}),yh)),a=n.useRef(null);if(!a.current)var s=new Wo(Ph(t),(function(){l.mounted?i():l.changedBeforeMount=!0})),l=Oh(a,s,o);var c,u,p=a.current.reaction;if(n.useDebugValue(p,vh),n.useEffect((function(){return Sh(a),a.current?(a.current.mounted=!0,a.current.changedBeforeMount&&(a.current.changedBeforeMount=!1,i())):(a.current={reaction:new Wo(Ph(t),(function(){i()})),mounted:!0,changedBeforeMount:!1,cleanAt:1/0},i()),function(){a.current.reaction.dispose(),a.current=null}}),[]),p.track((function(){try{c=e()}catch(e){u=e}})),u)throw u;return c}var Ah=function(){return Ah=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ah.apply(this,arguments)};var Rh={$$typeof:!0,render:!0,compare:!0,type:!0};function jh(e){var t=e.children,r=e.render,n=t||r;return"function"!=typeof n?null:Ch(n)}jh.displayName="Observer",function(e){e||(e=gh),pi({reactionScheduler:e})}(o.unstable_batchedUpdates);var Th=0,Ih={};function Nh(e){return Ih[e]||(Ih[e]=function(e){if("function"==typeof Symbol)return Sy
2022-02-04 13:00:46 +03:00
button {
background-color: transparent;
border: 0;
outline: 0;
font-size: 13px;
font-family: ${e=>e.theme.typography.code.fontFamily};
cursor: pointer;
padding: 0;
color: ${e=>e.theme.colors.text.primary};
&:focus {
font-weight: ${({theme:e})=>e.typography.fontWeightBold};
}
${({kind:e})=>"patternProperties"===e&&yr`
display: inline-flex;
margin-right: 20px;
> span.property-name {
white-space: break-spaces;
text-align: left;
::before,
::after {
content: '/';
filter: opacity(0.2);
}
}
> svg {
align-self: center;
}
`}
2022-02-04 13:00:46 +03:00
}
${Rp} {
2022-02-04 13:00:46 +03:00
height: ${({theme:e})=>e.schema.arrow.size};
width: ${({theme:e})=>e.schema.arrow.size};
polygon {
fill: ${({theme:e})=>e.schema.arrow.color};
}
}
`,am=kr.span`
2022-02-04 13:00:46 +03:00
vertical-align: middle;
font-size: ${({theme:e})=>e.typography.code.fontSize};
line-height: 20px;
`,sm=kr(am)`
color: ${e=>Lt(.1,e.theme.schema.typeNameColor)};
`,lm=kr(am)`
2022-02-04 13:00:46 +03:00
color: ${e=>e.theme.schema.typeNameColor};
`,cm=kr(am)`
2022-02-04 13:00:46 +03:00
color: ${e=>e.theme.schema.typeTitleColor};
word-break: break-word;
`,um=lm,pm=kr(am.withComponent("div"))`
2022-02-04 13:00:46 +03:00
color: ${e=>e.theme.schema.requireLabelColor};
font-size: ${e=>e.theme.schema.labelsTextSize};
font-weight: normal;
margin-left: 20px;
line-height: 1;
`,dm=kr(pm)`
color: ${e=>e.theme.colors.primary.light};
`,fm=kr(am)`
2022-02-04 13:00:46 +03:00
color: ${({theme:e})=>e.colors.warning.main};
font-size: 13px;
`,hm=kr(am)`
2022-02-04 13:00:46 +03:00
color: #0e7c86;
&::before,
&::after {
font-weight: bold;
}
`,mm=kr(am)`
2022-02-04 13:00:46 +03:00
border-radius: 2px;
word-break: break-word;
${({theme:e})=>`\n background-color: ${Lt(.95,e.colors.text.primary)};\n color: ${Lt(.1,e.colors.text.primary)};\n\n padding: 0 ${e.spacing.unit}px;\n border: 1px solid ${Lt(.9,e.colors.text.primary)};\n font-family: ${e.typography.code.fontFamily};\n}`};
2022-02-04 13:00:46 +03:00
& + & {
margin-left: 0;
}
${Or("ExampleValue")};
`,gm=kr(mm)``,ym=kr(am)`
2022-02-04 13:00:46 +03:00
border-radius: 2px;
${({theme:e})=>`\n background-color: ${Lt(.95,e.colors.primary.light)};\n color: ${Lt(.1,e.colors.primary.main)};\n\n margin: 0 ${e.spacing.unit}px;\n padding: 0 ${e.spacing.unit}px;\n border: 1px solid ${Lt(.9,e.colors.primary.main)};\n}`};
2022-02-04 13:00:46 +03:00
& + & {
margin-left: 0;
}
${Or("ConstraintItem")};
`,vm=kr.button`
2022-02-04 13:00:46 +03:00
background-color: transparent;
border: 0;
color: ${({theme:e})=>e.colors.text.secondary};
margin-left: ${({theme:e})=>e.spacing.unit}px;
border-radius: 2px;
cursor: pointer;
outline-color: ${({theme:e})=>e.colors.text.secondary};
font-size: 12px;
`;Object.defineProperty,Object.getOwnPropertyDescriptor;const bm=kr.div`
${Cf};
2022-02-04 13:00:46 +03:00
${({compact:e})=>e?"":"margin: 1em 0"}
`;let wm=class extends n.Component{render(){const{externalDocs:e}=this.props;return e&&e.url?n.createElement(bm,{compact:this.props.compact},n.createElement("a",{href:e.url},e.description||e.url)):null}};wm=((e,t,r,n)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([om],wm);class xm extends n.PureComponent{constructor(){super(...arguments),this.state={collapsed:!0}}toggle(){this.setState({collapsed:!this.state.collapsed})}render(){const{values:e,isArrayType:t}=this.props,{collapsed:r}=this.state,{enumSkipQuotes:o,maxDisplayedEnumValues:i}=this.context;if(!e.length)return null;const a=this.state.collapsed&&i?e.slice(0,i):e,s=!!i&&e.length>i,l=i?r?` ${e.length-i} more`:"Hide":"";return n.createElement("div",null,n.createElement(am,null,t?nr("enumArray"):""," ",1===e.length?nr("enumSingleValue"):nr("enum"),":")," ",a.map(((e,t)=>{const r=o?String(e):JSON.stringify(e);return n.createElement(n.Fragment,{key:t},n.createElement(mm,null,r)," ")})),s?n.createElement(km,{onClick:()=>{this.toggle()}},l):null)}}xm.contextType=Rr;const km=kr.span`
2022-02-04 13:00:46 +03:00
color: ${e=>e.theme.colors.primary.main};
vertical-align: middle;
font-size: 13px;
line-height: 20px;
padding: 0 5px;
cursor: pointer;
`,Om=kr(Af)`
2022-02-04 13:00:46 +03:00
margin: 2px 0;
`;class Sm extends n.PureComponent{render(){const e=this.props.extensions;return n.createElement(Rr.Consumer,null,(t=>n.createElement(n.Fragment,null,t.showExtensions&&Object.keys(e).map((t=>n.createElement(Om,{key:t},n.createElement(am,null," ",t.substring(2),": ")," ",n.createElement(gm,null,"string"==typeof e[t]?e[t]:JSON.stringify(e[t]))))))))}}function _m({field:e}){return e.examples?n.createElement(n.Fragment,null,n.createElement(am,null," ",nr("examples"),": "),er(e.examples)?e.examples.map(((t,r)=>{const o=os(e,t),i=e.in?String(o):JSON.stringify(o);return n.createElement(n.Fragment,{key:r},n.createElement(mm,null,i)," ")})):n.createElement(Em,null,Object.values(e.examples).map(((t,r)=>n.createElement("li",{key:r+t.value},n.createElement(mm,null,os(e,t.value))," -"," ",t.summary||t.description))))):null}const Em=kr.ul`
2022-02-04 13:00:46 +03:00
margin-top: 1em;
list-style-position: outside;
`;class Pm extends n.PureComponent{render(){return 0===this.props.constraints.length?null:n.createElement("span",null," ",this.props.constraints.map((e=>n.createElement(ym,{key:e}," ",e," "))))}}const $m=n.memo((function({value:e,label:t,raw:r}){if(void 0===e)return null;const o=r?String(e):JSON.stringify(e);return n.createElement("div",null,n.createElement(am,null," ",t," ")," ",n.createElement(mm,null,o))}));function Cm(e){const t=e.schema.pattern,{hideSchemaPattern:r}=n.useContext(Rr),[o,i]=n.useState(!1),a=n.useCallback((()=>i(!o)),[o]);return!t||r?null:n.createElement(n.Fragment,null,n.createElement(hm,null,o||t.length<45?t:`${t.substr(0,45)}...`),t.length>45&&n.createElement(vm,{onClick:a},o?"Hide pattern":"Show pattern"))}function Am({schema:e}){const{hideSchemaPattern:t}=n.useContext(Rr);return e&&("string"!==e.type||e.constraints.length)&&((null==e?void 0:e.pattern)&&!t||e.items||e.displayFormat||e.constraints.length)?n.createElement(Rm,null,"[ items",e.displayFormat&&n.createElement(um,null," <",e.displayFormat," >"),n.createElement(Pm,{constraints:e.constraints}),n.createElement(Cm,{schema:e}),e.items&&n.createElement(Am,{schema:e.items})," ]"):null}const Rm=kr(sm)`
2022-02-04 13:00:46 +03:00
margin: 0 5px;
vertical-align: text-top;
`;var jm=Object.defineProperty,Tm=Object.getOwnPropertySymbols,Im=Object.prototype.hasOwnProperty,Nm=Object.prototype.propertyIsEnumerable,Lm=(e,t,r)=>t in e?jm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Dm=(e,t)=>{for(var r in t||(t={}))Im.call(t,r)&&Lm(e,r,t[r]);if(Tm)for(var r of Tm(t))Nm.call(t,r)&&Lm(e,r,t[r]);return e};const Mm=om((e=>{const{enumSkipQuotes:t,hideSchemaTitles:r}=n.useContext(Rr),{showExamples:o,field:i,renderDiscriminatorSwitch:a}=e,{schema:s,description:l,deprecated:c,extensions:u,in:p,const:d}=i,f="array"===s.type,h=t||"header"===p,m=n.useMemo((()=>!o||void 0===i.example&&void 0===i.examples?null:void 0!==i.examples?n.createElement(_m,{field:i}):n.createElement($m,{label:nr("example")+":",value:os(i,i.example),raw:Boolean(i.in)})),[i,o]);return n.createElement("div",null,n.createElement("div",null,n.createElement(sm,null,s.typePrefix),n.createElement(lm,null,s.displayType),s.displayFormat&&n.createElement(um,null," ","<",s.displayFormat,">"," "),s.contentEncoding&&n.createElement(um,null," ","<",s.contentEncoding,">"," "),s.contentMediaType&&n.createElement(um,null," ","<",s.contentMediaType,">"," "),s.title&&!r&&n.createElement(cm,null," (",s.title,") "),n.createElement(Pm,{constraints:s.constraints}),n.createElement(Cm,{schema:s}),s.isCircular&&n.createElement(fm,null," ",nr("recursive")," "),f&&s.items&&n.createElement(Am,{schema:s.items})),c&&n.createElement("div",null,n.createElement(jp,{type:"warning"}," ",nr("deprecated")," ")),n.createElement($m,{raw:h,label:nr("default")+":",value:s.default}),!a&&n.createElement(xm,{isArrayType:f,values:s.enum})," ",m,n.createElement(Sm,{extensions:Dm(Dm({},u),s.extensions)}),n.createElement("div",null,n.createElement(Mf,{compact:!0,source:l})),s.externalDocs&&n.createElement(wm,{externalDocs:s.externalDocs,compact:!0}),a&&a(e)||null,d&&n.createElement($m,{label:nr("const")+":",value:d})||null)})),Fm=n.memo(Mm);var zm=Object.defineProperty,Um=(Object.getOwnPropertyDescriptor,Object.getOwnPropertySymbols),qm=Object.prototype.hasOwnProperty,Vm=Object.prototype.propertyIsEnumerable,Bm=(e,t,r)=>t in e?zm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;let Wm=class extends n.Component{constructor(){super(...arguments),this.toggle=()=>{void 0===this.props.field.expanded&&this.props.expandByDefault?this.props.field.collapse():this.props.field.toggle()},this.handleKeyPress=e=>{"Enter"===e.key&&(e.preventDefault(),this.toggle())}}render(){const{className:e="",field:t,isLast:r,expandByDefault:o}=this.props,{name:i,deprecated:a,required:s,kind:l}=t,c=!t.schema.isPrimitive&&!t.schema.isCircular,u=void 0===t.expanded?o:t.expanded,p=n.createElement(n.Fragment,null,"additionalProperties"===l&&n.createElement(dm,null,"additional property"),"patternProperties"===l&&n.createElement(dm,null,"pattern property"),s&&n.createElement(pm,null,"required")),d=c?n.createElement(im,{className:a?"deprecated":"",kind:l,title:i},n.createElement(Fp,null),n.createElement("button",{onClick:this.toggle,onKeyPress:this.handleKeyPress,"aria-label":"expand properties"},n.createElement("span",{className:"property-name"},i),n.createElement(Rp,{direction:u?"down":"right"})),p):n.createElement(Dp,{className:a?"deprecated":void 0,kind:l,title:i},n.createElement(Fp,null),n.createElement("span",{className:"property-name"},i),p);return n.createElement(n.Fragment,null,n.createElement("tr",{className:r?"last "+e:e},d,n.createElement(Mp,null,n.createElement(Fm,((e,t)=>{for(var r in t||(t={}))qm.call(t,r)&&Bm(e,r,t[r]);if(Um)for(var r of Um(t))Vm.call(t,r)&&Bm(e,r,t[r]);return e})({},this.props)))),u&&c&&n.createElement("tr",{key:t.name+"inner"},n.createElement(Lp,{colSpan:2},n.createElement(zp,null,n.createElement(Eg,{schema:t.schema,skipReadOnly:this.props.skipReadOnly,skipWriteOnly:this.props.skipWriteOnly,showTitle:this.props.showTitle,level:this.props.level})))))}};Wm=((e,t,r,n)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([om],Wm);Object.defineProperty,Object.getOwnPropertyDescriptor;let Hm=class extends n.Component{constructor(){super(
2022-02-04 13:00:46 +03:00
padding-left: ${({theme:e})=>2*e.spacing.unit}px;
`;class og extends n.PureComponent{render(){const e=this.props.schema,t=e.items,r=void 0===e.minItems&&void 0===e.maxItems?"":`(${cs(e)})`;return e.fields?n.createElement(Ym,rg(tg({},this.props),{level:this.props.level})):!e.displayType||t||r.length?n.createElement("div",null,n.createElement(Wp,null," Array ",r),n.createElement(ng,null,n.createElement(Eg,rg(tg({},this.props),{schema:t}))),n.createElement(Hp,null)):n.createElement("div",null,n.createElement(lm,null,e.displayType))}}var ig=Object.defineProperty,ag=Object.defineProperties,sg=Object.getOwnPropertyDescriptor,lg=Object.getOwnPropertyDescriptors,cg=Object.getOwnPropertySymbols,ug=Object.prototype.hasOwnProperty,pg=Object.prototype.propertyIsEnumerable,dg=(e,t,r)=>t in e?ig(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fg=(e,t,r,n)=>{for(var o,i=n>1?void 0:n?sg(t,r):t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=(n?o(t,r,i):o(i))||i);return n&&i&&ig(t,r,i),i};let hg=class extends n.Component{constructor(){super(...arguments),this.activateOneOf=()=>{this.props.schema.activateOneOf(this.props.idx)}}render(){const{idx:e,schema:t,subSchema:r}=this.props;return n.createElement(Bp,{deprecated:r.deprecated,active:e===t.activeOneOf,onClick:this.activateOneOf},r.title||r.typePrefix+r.displayType)}};hg=fg([om],hg);let mg=class extends n.Component{render(){const{schema:{oneOf:e},schema:t}=this.props;if(void 0===e)return null;const r=e[t.activeOneOf];return n.createElement("div",null,n.createElement(Vp,null," ",t.oneOfType," "),n.createElement(qp,null,e.map(((e,r)=>n.createElement(hg,{key:e.pointer,schema:t,subSchema:e,idx:r})))),n.createElement("div",null,e[t.activeOneOf].deprecated&&n.createElement(jp,{type:"warning"},"Deprecated")),n.createElement(Pm,{constraints:r.constraints}),n.createElement(Eg,((e,t)=>ag(e,lg(t)))(((e,t)=>{for(var r in t||(t={}))ug.call(t,r)&&dg(e,r,t[r]);if(cg)for(var r of cg(t))pg.call(t,r)&&dg(e,r,t[r]);return e})({},this.props),{schema:r})))}};mg=fg([om],mg);const gg=om((({schema:e})=>n.createElement("div",null,n.createElement(lm,null,e.displayType),e.title&&n.createElement(cm,null," ",e.title," "),n.createElement(fm,null," ",nr("recursive")," "))));var yg=Object.defineProperty,vg=Object.defineProperties,bg=(Object.getOwnPropertyDescriptor,Object.getOwnPropertyDescriptors),wg=Object.getOwnPropertySymbols,xg=Object.prototype.hasOwnProperty,kg=Object.prototype.propertyIsEnumerable,Og=(e,t,r)=>t in e?yg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Sg=(e,t)=>{for(var r in t||(t={}))xg.call(t,r)&&Og(e,r,t[r]);if(wg)for(var r of wg(t))kg.call(t,r)&&Og(e,r,t[r]);return e},_g=(e,t)=>vg(e,bg(t));let Eg=class extends n.Component{render(){var e;const t=this.props,{schema:r}=t,o=((e,t)=>{var r={};for(var n in e)xg.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&wg)for(var n of wg(e))t.indexOf(n)<0&&kg.call(e,n)&&(r[n]=e[n]);return r})(t,["schema"]),i=(o.level||0)+1;if(!r)return n.createElement("em",null," Schema not provided ");const{type:a,oneOf:s,discriminatorProp:l,isCircular:c}=r;if(c)return n.createElement(gg,{schema:r});if(void 0!==l){if(!s||!s.length)return console.warn(`Looks like you are using discriminator wrong: you don't have any definition inherited from the ${r.title}`),null;const e=s[r.activeOneOf];return e.isCircular?n.createElement(gg,{schema:e}):n.createElement(Ym,_g(Sg({},o),{level:i,schema:e,discriminator:{fieldName:l,parentSchema:r}}))}if(void 0!==s)return n.createElement(mg,Sg({schema:r},o));const u=er(a)?a:[a];if(u.includes("object")){if(null==(e=r.fields)?void 0:e.length)return n.createElement(Ym,_g(Sg({},this.props),{level:i}))}else if(u.includes("array"))return n.createElement(og,_g(Sg({},this.props),{level:i}));const p={schema:r,name:"",required:!1,description:r.description,externalDocs:r.externalDocs,deprecated:!1,toggle:()=>null,expanded:!1};return n.createElement("div",null,n.createElement(Fm,{field:p}))}};Eg=((e,t,r,n)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([om],Eg);var Pg=Object.defineProperty,$g=Object.defineProperties,Cg=Object.getOwnPropertyDescriptors,Ag=Object
2022-02-04 13:00:46 +03:00
background: ${({theme:e})=>e.codeBlock.backgroundColor};
& > div,
& > pre {
padding: ${e=>4*e.theme.spacing.unit}px;
margin: 0;
}
& > div > pre {
padding: 0;
}
`,Lg=(He.div`
background-color: #e4e7eb;
`,He.ul`
display: inline;
list-style: none;
padding: 0;
li {
display: inherit;
&:after {
content: ',';
}
&:last-child:after {
content: none;
}
}
`,He.code`
font-size: ${e=>e.theme.typography.code.fontSize};
font-family: ${e=>e.theme.typography.code.fontFamily};
margin: 0 3px;
padding: 0.2em;
display: inline-block;
line-height: 1;
&:after {
content: ',';
font-weight: normal;
}
&:last-child:after {
content: none;
}
`),Dg=He.span`
&:after {
content: ' and ';
font-weight: normal;
}
&:last-child:after {
content: none;
}
${Cf};
`,Mg=He.span`
${e=>!e.expanded&&"white-space: nowrap;"}
&:after {
content: ' or ';
${e=>e.expanded&&"content: ' or \\a';"}
white-space: pre;
}
&:last-child:after,
&:only-child:after {
content: none;
}
${Cf};
`,Fg=He.div`
flex: 1 1 auto;
cursor: pointer;
`,zg=He.div`
width: ${e=>e.theme.schema.defaultDetailsWidth};
text-overflow: ellipsis;
border-radius: 4px;
overflow: hidden;
${e=>e.expanded&&`background: ${e.theme.colors.gray[100]};\n padding: 8px 9.6px;\n margin: 20px 0;\n width: 100%;\n `};
${xr("small")`
margin-top: 10px;
`}
`,Ug=He(kp)`
display: inline-block;
margin: 0;
`,qg=He.div`
width: 100%;
display: flex;
margin: 1em 0;
flex-direction: ${e=>e.expanded?"column":"row"};
${xr("small")`
flex-direction: column;
`}
`,Vg=He.div`
margin: 0.5em 0;
`,Bg=He.div`
border-bottom: 1px solid ${({theme:e})=>e.colors.border.dark};
margin-bottom: 1.5em;
padding-bottom: 0.7em;
h5 {
line-height: 1em;
margin: 0 0 0.6em;
font-size: ${({theme:e})=>e.typography.fontSize};
}
.redoc-markdown p:first-child {
display: inline;
}
`;function Wg({children:e,height:t}){const r=n.createRef(),[o,i]=n.useState(!1),[a,s]=n.useState(!1);return n.useEffect((()=>{r.current&&r.current.clientHeight+20<r.current.scrollHeight&&s(!0)}),[r]),n.createElement(n.Fragment,null,n.createElement(Hg,{ref:r,className:o?"":"container",style:{height:o?"auto":t}},e),n.createElement(Yg,{dimmed:!o},a&&n.createElement(Kg,{onClick:()=>{i(!o)}},o?"See less":"See more")))}const Hg=He.div`
overflow-y: hidden;
`,Yg=He.div`
text-align: center;
line-height: 1.5em;
${({dimmed:e})=>e&&"background-image: linear-gradient(to bottom, transparent,rgb(255 255 255));\n position: relative;\n top: -0.5em;\n padding-top: 0.5em;\n background-position-y: -1em;\n "}
`,Kg=He.a`
cursor: pointer;
`,Gg=n.memo((function(e){const{type:t,flow:r,RequiredScopes:o}=e,i=Object.keys((null==r?void 0:r.scopes)||{});return n.createElement(n.Fragment,null,n.createElement(Vg,null,n.createElement("b",null,"Flow type: "),n.createElement("code",null,t," ")),("implicit"===t||"authorizationCode"===t)&&n.createElement(Vg,null,n.createElement("strong",null," Authorization URL: "),n.createElement("code",null,n.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:r.authorizationUrl},r.authorizationUrl))),("password"===t||"clientCredentials"===t||"authorizationCode"===t)&&n.createElement(Vg,null,n.createElement("b",null," Token URL: "),n.createElement("code",null,r.tokenUrl)),r.refreshUrl&&n.createElement(Vg,null,n.createElement("strong",null," Refresh URL: "),r.refreshUrl),!!i.length&&n.createElement(n.Fragment,null,o||null,n.createElement(Vg,null,n.createElement("b",null," Scopes: ")),n.createElement(Wg,{height:"4em"},n.createElement("ul",null,i.map((e=>n.createElement("li",{key:e},n.createElement("code",null,e)," -"," ",n.createElement(Mf,{className:"redoc-markdown",inline:!0,source:r.scopes[e]||""}))))))))}));function Qg(e){const{RequiredScopes:t,scheme:r}=e;return n.createElement(Af,null,r.apiKey?n.createElement(n.Fragment,null,n.createElement(Vg,null,n.createElement("b",null,(o=r.apiKey.in||"").charAt(0).toUpperCase()+o.slice(1)," parameter name: "),n.createElement("code",null,r.apiKey.name)),t):r.http?n.createElement(n.Fragment,null,n.createElement(Vg,null,n.createElement("b",null,"HTTP Authorization Scheme: "),n.createElement("code",null,r.http.scheme)),n.createElement(Vg,null,"bearer"===r.http.scheme&&r.http.bearerFormat&&n.createElement(n.Fragment,null,n.createElement("b",null,"Bearer format: "),n.createElement("code",null,r.http.bearerFormat))),t):r.openId?n.createElement(n.Fragment,null,n.createElement(Vg,null,n.createElement("b",null,"Connect URL: "),n.createElement("code",null,n.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:r.openId.connectUrl},r.openId.connectUrl))),t):r.flows?Object.keys(r.flows).map((e=>n.createElement(Gg,{key:e,type:e,RequiredScopes:t,flow:r.flows[e]}))):null);var o}const Xg={oauth2:"OAuth2",apiKey:"API Key",http:"HTTP",openIdConnect:"OpenID Connect"};class Zg extends n.PureComponent{render(){return this.props.securitySchemes.schemes.map((e=>n.createElement(fp,{id:e.sectionId,key:e.id},n.createElement(gp,null,n.createElement(dp,null,n.createElement(wp,null,n.createElement(Cp,{to:e.sectionId}),e.displayName),n.createElement(Mf,{source:e.description||""}),n.createElement(Bg,null,n.createElement(Vg,null,n.createElement("b",null,"Security Scheme Type: "),n.createElement("span",null,Xg[e.type]||e.type)),n.createElement(Qg,{scheme:e})))))))}}class Jg{constructor(e,t,r={},n=!0){var o,i,a,s;this.marker=new Ls,this.disposer=null,this.rawOptions=r,this.options=new mr(r,ey),this.scroll=new up(this.options),ap.updateOnHistory(Is.currentId,this.scroll),this.spec=new Uu(e,t,this.options),this.menu=new ap(this.spec,this.scroll,Is),this.options.disableSearch||(this.search=new pp,n&&this.search.indexItems(this.menu.items),this.disposer=(o=this.menu,i="activeItemIdx",Kr(a=e=>{this.updateMarkOnMenu(e.newValue)})?function(e,t,r,n){return ba(e,t).observe_(r,n)}(o,i,a,s):function(e,t,r){return ba(e).observe_(t,r)}(o,i,a)))}static fromJS(e){const t=new Jg(e.spec.data,e.spec.url,e.options,!1);return t.menu.activeItemIdx=e.menu.activeItemIdx||0,t.menu.activate(t.menu.flatItems[t.menu.activeItemIdx]),t.options.disableSearch||t.search.load(e.searchIndex),t}onDidMount(){this.menu.updateOnHistory(),this.updateMarkOnMenu(this.menu.activeItemIdx)}dispose(){this.scroll.dispose(),this.menu.dispose(),this.search&&this.search.dispose(),null!=this.disposer&&this.disposer()}toJS(){return e=this,t=null,r=function*(){return{menu:{activeItemIdx:this.menu.activeItemIdx},spec:{url:this.spec.parser.specUrl,data:this.spec.parser.spec},searchIndex:this.search?yield this.search.toJS():void 0,options:this.rawOptions}},new Promise(((n,o)=>{var i=e=>{try{s(r.next(e))}catch(e){o(e)}},a=e=>{try{s(r.throw(e))}catch(e){o
2022-02-04 13:00:46 +03:00
margin-top: 0;
margin-bottom: 0.5em;
${Or("ApiHeader")};
`,ry=kr.a`
2022-02-04 13:00:46 +03:00
border: 1px solid ${e=>e.theme.colors.primary.main};
color: ${e=>e.theme.colors.primary.main};
font-weight: normal;
margin-left: 0.5em;
padding: 4px 8px 4px;
display: inline-block;
text-decoration: none;
cursor: pointer;
${Or("DownloadButton")};
`,ny=kr.span`
2022-02-04 13:00:46 +03:00
&::before {
content: '|';
display: inline-block;
opacity: 0.5;
width: ${15}px;
text-align: center;
}
&:last-child::after {
display: none;
}
`,oy=kr.div`
2022-02-04 13:00:46 +03:00
overflow: hidden;
`,iy=kr.div`
2022-02-04 13:00:46 +03:00
display: flex;
flex-wrap: wrap;
// hide separator on new lines: idea from https://stackoverflow.com/a/31732902/1749888
margin-left: -${15}px;
`;Object.defineProperty,Object.getOwnPropertyDescriptor;let ay=class extends n.Component{constructor(){super(...arguments),this.handleDownloadClick=e=>{e.target.href||(e.target.href=this.props.store.spec.info.downloadLink)}}render(){const{store:e}=this.props,{info:t,externalDocs:r}=e.spec,o=e.options.hideDownloadButton,i=t.downloadFileName,a=t.downloadLink,s=t.license&&n.createElement(ny,null,"License:"," ",t.license.identifier?t.license.identifier:n.createElement("a",{href:t.license.url},t.license.name))||null,l=t.contact&&t.contact.url&&n.createElement(ny,null,"URL: ",n.createElement("a",{href:t.contact.url},t.contact.url))||null,c=t.contact&&t.contact.email&&n.createElement(ny,null,t.contact.name||"E-mail",":"," ",n.createElement("a",{href:"mailto:"+t.contact.email},t.contact.email))||null,u=t.termsOfService&&n.createElement(ny,null,n.createElement("a",{href:t.termsOfService},"Terms of Service"))||null,p=t.version&&n.createElement("span",null,"(",t.version,")")||null;return n.createElement(fp,null,n.createElement(gp,null,n.createElement(dp,{className:"api-info"},n.createElement(ty,null,t.title," ",p),!o&&n.createElement("p",null,nr("downloadSpecification"),":",n.createElement(ry,{download:i||!0,target:"_blank",href:a,onClick:this.handleDownloadClick},nr("download"))),n.createElement(Af,null,(t.license||t.contact||t.termsOfService)&&n.createElement(oy,null,n.createElement(iy,null,c," ",l," ",s," ",u))||null),n.createElement(Mf,{source:e.spec.info.summary,"data-role":"redoc-summary"}),n.createElement(Mf,{source:e.spec.info.description,"data-role":"redoc-description"}),r&&n.createElement(wm,{externalDocs:r}))))}};ay=((e,t,r,n)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([om],ay);const sy=kr.img`
2022-02-04 13:00:46 +03:00
max-height: ${e=>e.theme.logo.maxHeight};
max-width: ${e=>e.theme.logo.maxWidth};
padding: ${e=>e.theme.logo.gutter};
width: 100%;
display: block;
`,ly=kr.div`
2022-02-04 13:00:46 +03:00
text-align: center;
`,cy=kr.a`
2022-02-04 13:00:46 +03:00
display: inline-block;
`;Object.defineProperty,Object.getOwnPropertyDescriptor;let uy=class extends n.Component{render(){const{info:e}=this.props,t=e["x-logo"];if(!t||!t.url)return null;const r=t.href||e.contact&&e.contact.url,o=t.altText?t.altText:"logo",i=n.createElement(sy,{src:t.url,alt:o});return n.createElement(ly,{style:{backgroundColor:t.backgroundColor}},r?(a=r,e=>n.createElement(cy,{href:a},e))(i):i);var a}};uy=((e,t,r,n)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([om],uy);var py=Object.defineProperty,dy=Object.getOwnPropertySymbols,fy=Object.prototype.hasOwnProperty,hy=Object.prototype.propertyIsEnumerable,my=(e,t,r)=>t in e?py(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gy=(e,t)=>{for(var r in t||(t={}))fy.call(t,r)&&my(e,r,t[r]);if(dy)for(var r of dy(t))hy.call(t,r)&&my(e,r,t[r]);return e};class yy extends n.Component{render(){return n.createElement(Tr,null,(e=>n.createElement(_p,null,(t=>this.renderWithOptionsAndStore(e,t)))))}renderWithOptionsAndStore(e,t){const{source:r,htmlWrap:o=(e=>e)}=this.props;if(!t)throw new Error("When using components in markdown, store prop must be provided");const i=new Rl(e).renderMdWithComponents(r);return i.length?i.map(((e,r)=>{if("string"==typeof e)return n.cloneElement(o(n.createElement(Df,{html:e,inline:!1,compact:!1})),{key:r});const i=e.component;return n.createElement(i,gy({key:r},gy(gy({},e.props),e.propsSelector(t))))})):null}}var vy=r(4184),by=r.n(vy);const wy=kr.span.attrs((e=>({className:`operation-type ${e.type}`})))`
2022-02-04 13:00:46 +03:00
width: 9ex;
display: inline-block;
height: ${e=>e.theme.typography.code.fontSize};
line-height: ${e=>e.theme.typography.code.fontSize};
background-color: #333;
border-radius: 3px;
background-repeat: no-repeat;
background-position: 6px 4px;
font-size: 7px;
font-family: Verdana, sans-serif; // web-safe
color: white;
text-transform: uppercase;
text-align: center;
font-weight: bold;
vertical-align: middle;
margin-right: 6px;
margin-top: 2px;
&.get {
background-color: ${e=>e.theme.colors.http.get};
}
&.post {
background-color: ${e=>e.theme.colors.http.post};
}
&.put {
background-color: ${e=>e.theme.colors.http.put};
}
&.options {
background-color: ${e=>e.theme.colors.http.options};
}
&.patch {
background-color: ${e=>e.theme.colors.http.patch};
}
&.delete {
background-color: ${e=>e.theme.colors.http.delete};
}
&.basic {
background-color: ${e=>e.theme.colors.http.basic};
}
&.link {
background-color: ${e=>e.theme.colors.http.link};
}
&.head {
background-color: ${e=>e.theme.colors.http.head};
}
&.hook {
background-color: ${e=>e.theme.colors.primary.main};
}
`;function xy(e,{theme:t},r){return e>1?t.sidebar.level1Items[r]:1===e?t.sidebar.groupItems[r]:""}const ky=kr.ul`
2022-02-04 13:00:46 +03:00
margin: 0;
padding: 0;
& & {
font-size: 0.929em;
}
${e=>e.expanded?"":"display: none;"};
`,Oy=kr.li`
2022-02-04 13:00:46 +03:00
list-style: none inside none;
overflow: hidden;
text-overflow: ellipsis;
padding: 0;
${e=>0===e.depth?"margin-top: 15px":""};
`,Sy={0:yr`
2022-02-04 13:00:46 +03:00
opacity: 0.7;
text-transform: ${({theme:e})=>e.sidebar.groupItems.textTransform};
font-size: 0.8em;
padding-bottom: 0;
cursor: default;
`,1:yr`
2022-02-04 13:00:46 +03:00
font-size: 0.929em;
text-transform: ${({theme:e})=>e.sidebar.level1Items.textTransform};
`},_y=kr.label.attrs((e=>({role:"menuitem",className:by()("-depth"+e.depth,{active:e.active})})))`
2022-02-04 13:00:46 +03:00
cursor: pointer;
color: ${e=>e.active?xy(e.depth,e,"activeTextColor"):e.theme.sidebar.textColor};
2022-02-04 13:00:46 +03:00
margin: 0;
padding: 12.5px ${e=>4*e.theme.spacing.unit}px;
${({depth:e,type:t,theme:r})=>"section"===t&&e>1&&"padding-left: "+8*r.spacing.unit+"px;"||""}
2022-02-04 13:00:46 +03:00
display: flex;
justify-content: space-between;
font-family: ${e=>e.theme.typography.headings.fontFamily};
${e=>Sy[e.depth]};
background-color: ${e=>e.active?xy(e.depth,e,"activeBackgroundColor"):e.theme.sidebar.backgroundColor};
2022-02-04 13:00:46 +03:00
${e=>e.deprecated&&Tp||""};
2022-02-04 13:00:46 +03:00
&:hover {
color: ${e=>xy(e.depth,e,"activeTextColor")};
background-color: ${e=>xy(e.depth,e,"activeBackgroundColor")};
2022-02-04 13:00:46 +03:00
}
${Rp} {
2022-02-04 13:00:46 +03:00
height: ${({theme:e})=>e.sidebar.arrow.size};
width: ${({theme:e})=>e.sidebar.arrow.size};
polygon {
fill: ${({theme:e})=>e.sidebar.arrow.color};
}
}
`,Ey=kr.span`
2022-02-04 13:00:46 +03:00
display: inline-block;
vertical-align: middle;
width: ${e=>e.width?e.width:"auto"};
overflow: hidden;
text-overflow: ellipsis;
`,Py=kr.div`
${({theme:e})=>`\n font-size: 0.8em;\n margin-top: ${2*e.spacing.unit}px;\n text-align: center;\n position: fixed;\n width: ${e.sidebar.width};\n bottom: 0px;\n background: ${e.sidebar.backgroundColor};\n \n a,\n a:visited,\n a:hover {\n color: ${e.sidebar.textColor} !important;\n padding: ${e.spacing.unit}px 0;\n border-top: 1px solid ${Et(.1,e.sidebar.backgroundColor)};\n text-decoration: none;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n`};
img {
width: 15px;
margin-right: 5px;
}
${xr("small")`
width: 100%;
`};
`,$y=kr.button`
2022-02-04 13:00:46 +03:00
border: 0;
width: 100%;
text-align: left;
& > * {
vertical-align: middle;
}
${Rp} {
2022-02-04 13:00:46 +03:00
polygon {
fill: ${({theme:e})=>Et(e.colors.tonalOffset,e.colors.gray[100])};
2022-02-04 13:00:46 +03:00
}
}
`,Cy=kr.span`
2022-02-04 13:00:46 +03:00
text-decoration: ${e=>e.deprecated?"line-through":"none"};
margin-right: 8px;
`,Ay=kr(wy)`
2022-02-04 13:00:46 +03:00
margin: 0 5px 0 0;
`,Ry=kr((e=>{const{name:t,opened:r,className:o,onClick:i,httpVerb:a,deprecated:s}=e;return n.createElement($y,{className:o,onClick:i||void 0},n.createElement(Ay,{type:a},hs(a)),n.createElement(Rp,{size:"1.5em",direction:r?"down":"right",float:"left"}),n.createElement(Cy,{deprecated:s},t),s?n.createElement(jp,{type:"warning"}," ",nr("deprecated")," "):null)}))`
2022-02-04 13:00:46 +03:00
padding: 10px;
border-radius: 2px;
margin-bottom: 4px;
line-height: 1.5em;
background-color: ${({theme:e})=>e.colors.gray[100]};
cursor: pointer;
outline-color: ${({theme:e})=>Et(e.colors.tonalOffset,e.colors.gray[100])};
`,jy=kr.div`
2022-02-04 13:00:46 +03:00
padding: 10px 25px;
background-color: ${({theme:e})=>e.colors.gray[50]};
margin-bottom: 5px;
margin-top: 5px;
`;class Ty extends n.PureComponent{constructor(){super(...arguments),this.selectElement=()=>{Hf.selectElement(this.child)}}render(){const{children:e}=this.props;return n.createElement("div",{ref:e=>this.child=e,onClick:this.selectElement,onFocus:this.selectElement,tabIndex:0,role:"button"},e)}}const Iy=kr.div`
2022-02-04 13:00:46 +03:00
cursor: pointer;
position: relative;
margin-bottom: 5px;
`,Ny=kr.span`
2022-02-04 13:00:46 +03:00
font-family: ${e=>e.theme.typography.code.fontFamily};
margin-left: 10px;
flex: 1;
overflow-x: hidden;
text-overflow: ellipsis;
`,Ly=kr.button`
2022-02-04 13:00:46 +03:00
outline: 0;
color: inherit;
width: 100%;
text-align: left;
cursor: pointer;
padding: 10px 30px 10px ${e=>e.inverted?"10px":"20px"};
border-radius: ${e=>e.inverted?"0":"4px 4px 0 0"};
background-color: ${e=>e.inverted?"transparent":e.theme.codeBlock.backgroundColor};
display: flex;
white-space: nowrap;
align-items: center;
border: ${e=>e.inverted?"0":"1px solid transparent"};
border-bottom: ${e=>e.inverted?"1px solid #ccc":"0"};
transition: border-color 0.25s ease;
${e=>e.expanded&&!e.inverted&&`border-color: ${e.theme.colors.border.dark};`||""}
.${Ny} {
2022-02-04 13:00:46 +03:00
color: ${e=>e.inverted?e.theme.colors.text.primary:"#ffffff"};
}
&:focus {
box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.45), 0 2px 0 rgba(128, 128, 128, 0.25);
}
`,Dy=kr.span.attrs((e=>({className:`http-verb ${e.type}`})))`
2022-02-04 13:00:46 +03:00
font-size: ${e=>e.compact?"0.8em":"0.929em"};
line-height: ${e=>e.compact?"18px":"20px"};
background-color: ${e=>e.theme.colors.http[e.type]||"#999999"};
color: #ffffff;
padding: ${e=>e.compact?"2px 8px":"3px 10px"};
text-transform: uppercase;
font-family: ${e=>e.theme.typography.headings.fontFamily};
margin: 0;
`,My=kr.div`
2022-02-04 13:00:46 +03:00
position: absolute;
width: 100%;
z-index: 100;
background: ${e=>e.theme.rightPanel.servers.overlay.backgroundColor};
color: ${e=>e.theme.rightPanel.servers.overlay.textColor};
2022-02-04 13:00:46 +03:00
box-sizing: border-box;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.33);
overflow: hidden;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
transition: all 0.25s ease;
visibility: hidden;
${e=>e.expanded?"visibility: visible;":"transform: translateY(-50%) scaleY(0);"}
`,Fy=kr.div`
2022-02-04 13:00:46 +03:00
padding: 10px;
`,zy=kr.div`
2022-02-04 13:00:46 +03:00
padding: 5px;
border: 1px solid #ccc;
background: ${e=>e.theme.rightPanel.servers.url.backgroundColor};
2022-02-04 13:00:46 +03:00
word-break: break-all;
color: ${e=>e.theme.colors.primary.main};
> span {
color: ${e=>e.theme.colors.text.primary};
}
`;class Uy extends n.Component{constructor(e){super(e),this.toggle=()=>{this.setState({expanded:!this.state.expanded})},this.state={expanded:!1}}render(){const{operation:e,inverted:t,hideHostname:r}=this.props,{expanded:o}=this.state;return n.createElement(Rr.Consumer,null,(i=>n.createElement(Iy,null,n.createElement(Ly,{onClick:this.toggle,expanded:o,inverted:t},n.createElement(Dy,{type:e.httpVerb,compact:this.props.compact},e.httpVerb),n.createElement(Ny,null,e.path),n.createElement(Rp,{float:"right",color:t?"black":"white",size:"20px",direction:o?"up":"down",style:{marginRight:"-25px"}})),n.createElement(My,{expanded:o,"aria-hidden":!o},e.servers.map((t=>{const o=i.expandDefaultServerVariables?function(e,t={}){return e.replace(/(?:{)([\w-.]+)(?:})/g,((e,r)=>t[r]&&t[r].default||e))}(t.url,t.variables):t.url,a=function(e){try{return Zt(e).pathname}catch(t){return e}}(o);return n.createElement(Fy,{key:o},n.createElement(Mf,{source:t.description||"",compact:!0}),n.createElement(Ty,null,n.createElement(zy,null,n.createElement("span",null,r||i.hideHostname?"/"===a?"":a:o),e.path)))}))))))}}class qy extends n.PureComponent{render(){const{place:e,parameters:t}=this.props;return t&&t.length?n.createElement("div",{key:e},n.createElement(kp,null,e," Parameters"),n.createElement(Up,null,n.createElement("tbody",null,Bt(t,((e,t)=>n.createElement(Wm,{key:e.name,isLast:t,field:e,showExamples:!0})))))):null}}Object.defineProperty,Object.getOwnPropertyDescriptor;let Vy=class extends n.Component{constructor(){super(...arguments),this.switchMedia=({idx:e})=>{this.props.content&&void 0!==e&&this.props.content.activate(e)}}render(){const{content:e}=this.props;if(!e||!e.mediaTypes||!e.mediaTypes.length)return null;const t=e.activeMimeIdx,r=e.mediaTypes.map(((e,t)=>({value:e.name,idx:t}))),o=({children:e})=>this.props.withLabel?n.createElement(ph,null,n.createElement(uh,null,"Content type"),e):e;return n.createElement(n.Fragment,null,n.createElement(o,null,this.props.renderDropdown({value:r[t].value,options:r,onChange:this.switchMedia,ariaLabel:"Content type"})),this.props.children(e.active))}};Vy=((e,t,r,n)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([om],Vy);var By=Object.defineProperty,Wy=Object.getOwnPropertySymbols,Hy=Object.prototype.hasOwnProperty,Yy=Object.prototype.propertyIsEnumerable,Ky=(e,t,r)=>t in e?By(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;const Gy=["path","query","cookie","header"];class Qy extends n.PureComponent{orderParams(e){const t={};return e.forEach((e=>{var r,n,o;o=e,(r=t)[n=e.in]||(r[n]=[]),r[n].push(o)})),t}render(){const{body:e,parameters:t=[]}=this.props;if(void 0===e&&void 0===t)return null;const r=this.orderParams(t),o=t.length>0?Gy:[],i=e&&e.content,a=e&&e.description;return n.createElement(n.Fragment,null,o.map((e=>n.createElement(qy,{key:e,place:e,parameters:r[e]}))),i&&n.createElement(Zy,{content:i,description:a}))}}function Xy(e){return n.createElement(kp,{key:"header"},"Request Body schema: ",n.createElement(Pf,((e,t)=>{for(var r in t||(t={}))Hy.call(t,r)&&Ky(e,r,t[r]);if(Wy)for(var r of Wy(t))Yy.call(t,r)&&Ky(e,r,t[r]);return e})({},e)))}function Zy(e){const{content:t,description:r}=e,{isRequestType:o}=t;return n.createElement(Vy,{content:t,renderDropdown:Xy},(({schema:e})=>n.createElement(n.Fragment,null,void 0!==r&&n.createElement(Mf,{source:r}),"object"===(null==e?void 0:e.type)&&n.createElement(Pm,{constraints:(null==e?void 0:e.constraints)||[]}),n.createElement(Eg,{skipReadOnly:o,skipWriteOnly:!o,key:"schema",schema:e}))))}const Jy=n.memo((function({title:e,type:t,empty:r,code:o,opened:i,className:a,onClick:s}){return n.createElement("button",{className:a,onClick:!r&&s||void 0,"aria-expanded":i,disabled:r},!r&&n.createElement(Rp,{size:"1.5em",color:t,direction:i?"down":"right",float:"left"}),n.createElement(nv,null,o," "),n.createElement(Mf,{compact:!0,inline:!0,source:e}))})),ev=kr(Jy)`
2022-02-04 13:00:46 +03:00
display: block;
border: 0;
width: 100%;
text-align: left;
padding: 10px;
border-radius: 2px;
margin-bottom: 4px;
line-height: 1.5em;
cursor: pointer;
color: ${e=>e.theme.colors.responses[e.type].color};
background-color: ${e=>e.theme.colors.responses[e.type].backgroundColor};
&:focus {
outline: auto ${e=>e.theme.colors.responses[e.type].color};
}
${e=>e.empty?'\ncursor: default;\n&::before {\n content: "—";\n font-weight: bold;\n width: 1.5em;\n text-align: center;\n display: inline-block;\n vertical-align: top;\n}\n&:focus {\n outline: 0;\n}\n':""};
`,tv=kr.div`
2022-02-04 13:00:46 +03:00
padding: 10px;
`,rv=kr(kp.withComponent("caption"))`
2022-02-04 13:00:46 +03:00
text-align: left;
margin-top: 1em;
caption-side: top;
`,nv=kr.strong`
2022-02-04 13:00:46 +03:00
vertical-align: top;
`;class ov extends n.PureComponent{render(){const{headers:e}=this.props;return void 0===e||0===e.length?null:n.createElement(Up,null,n.createElement(rv,null," Response Headers "),n.createElement("tbody",null,Bt(e,((e,t)=>n.createElement(Wm,{isLast:t,key:e.name,field:e,showExamples:!0})))))}}var iv=Object.defineProperty,av=Object.getOwnPropertySymbols,sv=Object.prototype.hasOwnProperty,lv=Object.prototype.propertyIsEnumerable,cv=(e,t,r)=>t in e?iv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;class uv extends n.PureComponent{constructor(){super(...arguments),this.renderDropdown=e=>n.createElement(kp,{key:"header"},"Response Schema: ",n.createElement(Pf,((e,t)=>{for(var r in t||(t={}))sv.call(t,r)&&cv(e,r,t[r]);if(av)for(var r of av(t))lv.call(t,r)&&cv(e,r,t[r]);return e})({},e)))}render(){const{description:e,extensions:t,headers:r,content:o}=this.props.response;return n.createElement(n.Fragment,null,e&&n.createElement(Mf,{source:e}),n.createElement(Sm,{extensions:t}),n.createElement(ov,{headers:r}),n.createElement(Vy,{content:o,renderDropdown:this.renderDropdown},(({schema:e})=>n.createElement(n.Fragment,null,"object"===(null==e?void 0:e.type)&&n.createElement(Pm,{constraints:(null==e?void 0:e.constraints)||[]}),n.createElement(Eg,{skipWriteOnly:!0,key:"schema",schema:e})))))}}const pv=om((({response:e})=>{const{extensions:t,headers:r,type:o,summary:i,description:a,code:s,expanded:l,content:c}=e,u=n.useMemo((()=>void 0===c?[]:c.mediaTypes.filter((e=>void 0!==e.schema))),[c]),p=n.useMemo((()=>!(t&&0!==Object.keys(t).length||0!==r.length||0!==u.length||a)),[t,r,u,a]);return n.createElement("div",null,n.createElement(ev,{onClick:()=>e.toggle(),type:o,empty:p,title:i||"",code:s,opened:l}),l&&!p&&n.createElement(tv,null,n.createElement(uv,{response:e})))})),dv=kr.h3`
2022-02-04 13:00:46 +03:00
font-size: 1.3em;
padding: 0.2em 0;
margin: 3em 0 1.1em;
color: ${({theme:e})=>e.colors.text.primary};
font-weight: normal;
`;class fv extends n.PureComponent{render(){const{responses:e,isCallback:t}=this.props;return e&&0!==e.length?n.createElement("div",null,n.createElement(dv,null,nr(t?"callbackResponses":"responses")),e.map((e=>n.createElement(pv,{key:e.code,response:e})))):null}}function hv(e){const{security:t,showSecuritySchemeType:r,expanded:o}=e,i=t.schemes.length>1;return n.createElement(Mg,{expanded:o},i&&"(",t.schemes.map((e=>n.createElement(Dg,{key:e.id},r&&`${Xg[e.type]||e.type}: `,n.createElement("i",null,e.displayName),o&&e.scopes.length?[" (",e.scopes.map((e=>n.createElement(Lg,{key:e},e))),") "]:null))),i&&") ")}const mv=({scopes:e})=>e.length?n.createElement("div",null,n.createElement("b",null,"Required scopes: "),e.map(((e,t)=>n.createElement(n.Fragment,{key:t},n.createElement("code",null,e)," ")))):null;function gv(e){const t=(0,n.useContext)(Op),r=null==t?void 0:t.options.showSecuritySchemeType,[o,i]=(0,n.useState)(!1),{securities:a}=e;if(!(null==a?void 0:a.length)||(null==t?void 0:t.options.hideSecuritySection))return null;const s=null==t?void 0:t.spec.securitySchemes.schemes.filter((({id:e})=>a.find((t=>t.schemes.find((t=>t.id===e))))));return n.createElement(n.Fragment,null,n.createElement(qg,{expanded:o},n.createElement(Fg,{onClick:()=>i(!o)},n.createElement(Ug,null,"Authorizations:"),n.createElement(Rp,{size:"1.3em",direction:o?"down":"right"})),n.createElement(zg,{expanded:o},a.map(((e,t)=>n.createElement(hv,{key:t,expanded:o,showSecuritySchemeType:r,security:e}))))),o&&(null==s?void 0:s.length)&&s.map(((e,t)=>n.createElement(Bg,{key:t},n.createElement("h5",null,n.createElement(yv,null)," ",Xg[e.type]||e.type,": ",e.id),n.createElement(Mf,{source:e.description||""}),n.createElement(Qg,{key:e.id,scheme:e,RequiredScopes:n.createElement(mv,{scopes:vv(e.id,a)})})))))}const yv=()=>n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"11",height:"11"},n.createElement("path",{fill:"currentColor",d:"M18 10V6A6 6 0 0 0 6 6v4H3v14h18V10h-3zM8 6c0-2.206 1.794-4 4-4s4 1.794 4 4v4H8V6zm11 16H5V12h14v10z"}));function vv(e,t){const r=[];let n=t.length;for(;n--;){const o=t[n];let i=o.schemes.length;for(;i--;){const t=o.schemes[i];t.id===e&&r.push(...t.scopes)}}return Array.from(new Set(r))}Object.defineProperty,Object.getOwnPropertyDescriptor;let bv=class extends n.Component{render(){const{operation:e}=this.props,{description:t,externalDocs:r}=e,o=!(!t&&!r);return n.createElement(jy,null,o&&n.createElement(wv,null,void 0!==t&&n.createElement(Mf,{source:t}),r&&n.createElement(wm,{externalDocs:r})),n.createElement(Uy,{operation:this.props.operation,inverted:!0,compact:!0}),n.createElement(Sm,{extensions:e.extensions}),n.createElement(gv,{securities:e.security}),n.createElement(Qy,{parameters:e.parameters,body:e.requestBody}),n.createElement(fv,{responses:e.responses,isCallback:e.isCallback}))}};bv=((e,t,r,n)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([om],bv);const wv=kr.div`
2022-02-04 13:00:46 +03:00
margin-bottom: ${({theme:e})=>3*e.spacing.unit}px;
`;Object.defineProperty,Object.getOwnPropertyDescriptor;let xv=class extends n.Component{constructor(){super(...arguments),this.toggle=()=>{this.props.callbackOperation.toggle()}}render(){const{name:e,expanded:t,httpVerb:r,deprecated:o}=this.props.callbackOperation;return n.createElement(n.Fragment,null,n.createElement(Ry,{onClick:this.toggle,name:e,opened:t,httpVerb:r,deprecated:o}),t&&n.createElement(bv,{operation:this.props.callbackOperation}))}};xv=((e,t,r,n)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([om],xv);class kv extends n.PureComponent{render(){const{callbacks:e}=this.props;return e&&0!==e.length?n.createElement("div",null,n.createElement(Ov,null," Callbacks "),e.map((e=>e.operations.map(((t,r)=>n.createElement(xv,{key:`${e.name}_${r}`,callbackOperation:t})))))):null}}const Ov=kr.h3`
2022-02-04 13:00:46 +03:00
font-size: 1.3em;
padding: 0.2em 0;
margin: 3em 0 1.1em;
color: ${({theme:e})=>e.colors.text.primary};
font-weight: normal;
`;Object.defineProperty,Object.getOwnPropertyDescriptor;let Sv=class extends n.Component{constructor(e){super(e),this.switchItem=({idx:e})=>{this.props.items&&void 0!==e&&this.setState({activeItemIdx:e})},this.state={activeItemIdx:0}}render(){const{items:e}=this.props;if(!e||!e.length)return null;const t=({children:e})=>this.props.label?n.createElement(ph,null,n.createElement(uh,null,this.props.label),e):e;return n.createElement(n.Fragment,null,n.createElement(t,null,this.props.renderDropdown({value:this.props.options[this.state.activeItemIdx].value,options:this.props.options,onChange:this.switchItem,ariaLabel:this.props.label||"Callback"})),this.props.children(e[this.state.activeItemIdx]))}};Sv=((e,t,r,n)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([om],Sv);var _v=Object.defineProperty,Ev=Object.defineProperties,Pv=(Object.getOwnPropertyDescriptor,Object.getOwnPropertyDescriptors),$v=Object.getOwnPropertySymbols,Cv=Object.prototype.hasOwnProperty,Av=Object.prototype.propertyIsEnumerable,Rv=(e,t,r)=>t in e?_v(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;let jv=class extends n.Component{constructor(){super(...arguments),this.renderDropdown=e=>{return n.createElement(Pf,(t=((e,t)=>{for(var r in t||(t={}))Cv.call(t,r)&&Rv(e,r,t[r]);if($v)for(var r of $v(t))Av.call(t,r)&&Rv(e,r,t[r]);return e})({Label:ch,Dropdown:dh},e),Ev(t,Pv({variant:"dark"}))));var t}}render(){const e=this.props.content;return void 0===e?null:n.createElement(Vy,{content:e,renderDropdown:this.renderDropdown,withLabel:!0},(e=>n.createElement(hh,{key:"samples",mediaType:e,renderDropdown:this.renderDropdown})))}};jv=((e,t,r,n)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([om],jv);class Tv extends n.Component{render(){const e=this.props.callback.codeSamples.find((e=>wu(e)));return e?n.createElement(Iv,null,n.createElement(jv,{content:e.requestBodyContent})):null}}const Iv=kr.div`
2022-02-04 13:00:46 +03:00
margin-top: 15px;
`;var Nv=Object.defineProperty,Lv=Object.defineProperties,Dv=(Object.getOwnPropertyDescriptor,Object.getOwnPropertyDescriptors),Mv=Object.getOwnPropertySymbols,Fv=Object.prototype.hasOwnProperty,zv=Object.prototype.propertyIsEnumerable,Uv=(e,t,r)=>t in e?Nv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;let qv=class extends n.Component{constructor(){super(...arguments),this.renderDropdown=e=>{return n.createElement(Pf,(t=((e,t)=>{for(var r in t||(t={}))Fv.call(t,r)&&Uv(e,r,t[r]);if(Mv)for(var r of Mv(t))zv.call(t,r)&&Uv(e,r,t[r]);return e})({Label:ch,Dropdown:dh},e),Lv(t,Dv({variant:"dark"}))));var t}}render(){const{callbacks:e}=this.props;if(!e||0===e.length)return null;const t=e.map((e=>e.operations.map((e=>e)))).reduce(((e,t)=>e.concat(t)),[]);if(!t.some((e=>e.codeSamples.length>0)))return null;const r=t.map(((e,t)=>({value:`${e.httpVerb.toUpperCase()}: ${e.name}`,idx:t})));return n.createElement("div",null,n.createElement(xp,null," Callback payload samples "),n.createElement(Vv,null,n.createElement(Sv,{items:t,renderDropdown:this.renderDropdown,label:"Callback",options:r},(e=>n.createElement(Tv,{key:"callbackPayloadSample",callback:e,renderDropdown:this.renderDropdown})))))}};qv.contextType=Rr,qv=((e,t,r,n)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([om],qv);const Vv=kr.div`
2022-02-04 13:00:46 +03:00
background: ${({theme:e})=>e.codeBlock.backgroundColor};
padding: ${e=>4*e.theme.spacing.unit}px;
`;Object.defineProperty,Object.getOwnPropertyDescriptor;let Bv=class extends n.Component{render(){const{operation:e}=this.props,t=e.codeSamples,r=t.length>0,o=1===t.length&&this.context.hideSingleRequestSampleTab;return r&&n.createElement("div",null,n.createElement(xp,null," ",nr("requestSamples")," "),n.createElement(Sd,{defaultIndex:0},n.createElement(gd,{hidden:o},t.map((e=>n.createElement(wd,{key:e.lang+"_"+(e.label||"")},void 0!==e.label?e.label:e.lang)))),t.map((e=>n.createElement(Od,{key:e.lang+"_"+(e.label||"")},wu(e)?n.createElement("div",null,n.createElement(jv,{content:e.requestBodyContent})):n.createElement(ih,{lang:e.lang,source:e.source}))))))||null}};Bv.contextType=Rr,Bv=((e,t,r,n)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([om],Bv);Object.defineProperty,Object.getOwnPropertyDescriptor;let Wv=class extends n.Component{render(){const{operation:e}=this.props,t=e.responses.filter((e=>e.content&&e.content.hasSample));return t.length>0&&n.createElement("div",null,n.createElement(xp,null," ",nr("responseSamples")," "),n.createElement(Sd,{defaultIndex:0},n.createElement(gd,null,t.map((e=>n.createElement(wd,{className:"tab-"+e.type,key:e.code},e.code)))),t.map((e=>n.createElement(Od,{key:e.code},n.createElement("div",null,n.createElement(jv,{content:e.content})))))))||null}};Wv=((e,t,r,n)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([om],Wv);var Hv=Object.defineProperty,Yv=Object.defineProperties,Kv=Object.getOwnPropertyDescriptors,Gv=Object.getOwnPropertySymbols,Qv=Object.prototype.hasOwnProperty,Xv=Object.prototype.propertyIsEnumerable,Zv=(e,t,r)=>t in e?Hv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;const Jv=kr.div`
2022-02-04 13:00:46 +03:00
margin-bottom: ${({theme:e})=>6*e.spacing.unit}px;
`,eb=om((({operation:e})=>{const{name:t,description:r,deprecated:o,externalDocs:i,isWebhook:a,httpVerb:s}=e,l=!(!r&&!i),{showWebhookVerb:c}=n.useContext(Rr);return n.createElement(Rr.Consumer,null,(u=>n.createElement(gp,((e,t)=>Yv(e,Kv(t)))(((e,t)=>{for(var r in t||(t={}))Qv.call(t,r)&&Zv(e,r,t[r]);if(Gv)for(var r of Gv(t))Xv.call(t,r)&&Zv(e,r,t[r]);return e})({},{[ip]:e.operationHash}),{id:e.operationHash}),n.createElement(dp,null,n.createElement(wp,null,n.createElement(Cp,{to:e.id}),t," ",o&&n.createElement(jp,{type:"warning"}," Deprecated "),a&&n.createElement(jp,{type:"primary"}," ","Webhook ",c&&s&&"| "+s.toUpperCase())),u.pathInMiddlePanel&&!a&&n.createElement(Uy,{operation:e,inverted:!0}),l&&n.createElement(Jv,null,void 0!==r&&n.createElement(Mf,{source:r}),i&&n.createElement(wm,{externalDocs:i})),n.createElement(Sm,{extensions:e.extensions}),n.createElement(gv,{securities:e.security}),n.createElement(Qy,{parameters:e.parameters,body:e.requestBody}),n.createElement(fv,{responses:e.responses}),n.createElement(kv,{callbacks:e.callbacks})),n.createElement(mp,null,!u.pathInMiddlePanel&&!a&&n.createElement(Uy,{operation:e}),n.createElement(Bv,{operation:e}),n.createElement(Wv,{operation:e}),n.createElement(qv,{callbacks:e.callbacks})))))}));var tb=Object.defineProperty,rb=Object.getOwnPropertyDescriptor,nb=Object.getOwnPropertySymbols,ob=Object.prototype.hasOwnProperty,ib=Object.prototype.propertyIsEnumerable,ab=(e,t,r)=>t in e?tb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,sb=(e,t,r,n)=>{for(var o,i=n>1?void 0:n?rb(t,r):t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=(n?o(t,r,i):o(i))||i);return n&&i&&tb(t,r,i),i};let lb=class extends n.Component{render(){const e=this.props.items;return 0===e.length?null:e.map((e=>n.createElement(cb,{key:e.id,item:e})))}};lb=sb([om],lb);let cb=class extends n.Component{render(){const e=this.props.item;let t;const{type:r}=e;switch(r){case"group":t=null;break;case"tag":case"section":default:t=n.createElement(pb,((e,t)=>{for(var r in t||(t={}))ob.call(t,r)&&ab(e,r,t[r]);if(nb)for(var r of nb(t))ib.call(t,r)&&ab(e,r,t[r]);return e})({},this.props));break;case"operation":t=n.createElement(db,{item:e})}return n.createElement(n.Fragment,null,t&&n.createElement(fp,{id:e.id,underlined:"operation"===e.type},t),e.items&&n.createElement(lb,{items:e.items}))}};cb=sb([om],cb);const ub=e=>n.createElement(dp,{compact:!0},e);let pb=class extends n.Component{render(){const{name:e,description:t,externalDocs:r,level:o}=this.props.item,i=2===o?wp:bp;return n.createElement(n.Fragment,null,n.createElement(gp,null,n.createElement(dp,{compact:!1},n.createElement(i,null,n.createElement(Cp,{to:this.props.item.id}),e))),n.createElement(yy,{source:t||"",htmlWrap:ub}),r&&n.createElement(gp,null,n.createElement(dp,null,n.createElement(wm,{externalDocs:r}))))}};pb=sb([om],pb);let db=class extends n.Component{render(){return n.createElement(eb,{operation:this.props.item})}};db=sb([om],db);var fb=Object.defineProperty,hb=Object.defineProperties,mb=(Object.getOwnPropertyDescriptor,Object.getOwnPropertyDescriptors),gb=Object.getOwnPropertySymbols,yb=Object.prototype.hasOwnProperty,vb=Object.prototype.propertyIsEnumerable,bb=(e,t,r)=>t in e?fb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;let wb=class extends n.Component{constructor(){super(...arguments),this.ref=n.createRef(),this.activate=e=>{this.props.onActivate(this.props.item),e.stopPropagation()}}componentDidMount(){this.scrollIntoViewIfActive()}componentDidUpdate(){this.scrollIntoViewIfActive()}scrollIntoViewIfActive(){this.props.item.active&&this.ref.current&&Ut(this.ref.current)}render(){const{item:e,withoutChildren:t}=this.props;return n.createElement(Oy,{onClick:this.activate,depth:e.depth,"data-item-id":e.id},"operation"===e.type?n.createElement(xb,((e,t)=>hb(e,mb(t)))(((e,t)=>{for(var r in t||(t={}))yb.call(t,r)&&bb(e,r,t[r]);if(gb)for(var r of gb(t))vb.call(t,r)&&bb(e,r,t[r]);return e})({},this.props),{item:e})):n.createElement(_y,{depth:e.depth,active:e.active,type:e.type,ref:this.ref},n.createElement(Ey,{title:e.sidebarLabel},
2022-02-04 13:00:46 +03:00
user-select: none;
width: 20px;
height: 20px;
align-self: center;
display: flex;
flex-direction: column;
color: ${e=>e.theme.colors.primary.main};
`;Object.defineProperty,Object.getOwnPropertyDescriptor;let jb;Ft&&(jb=r(5114));const Tb=jb&&jb(),Ib=kr.div`
2022-02-04 13:00:46 +03:00
width: ${e=>e.theme.sidebar.width};
background-color: ${e=>e.theme.sidebar.backgroundColor};
overflow: hidden;
display: flex;
flex-direction: column;
backface-visibility: hidden;
/* contain: strict; TODO: breaks layout since Chrome 80*/
height: 100vh;
position: sticky;
position: -webkit-sticky;
top: 0;
${xr("small")`
2022-02-04 13:00:46 +03:00
position: fixed;
z-index: 20;
width: 100%;
background: ${({theme:e})=>e.sidebar.backgroundColor};
display: ${e=>e.open?"flex":"none"};
`};
@media print {
display: none;
}
`,Nb=kr.div`
2022-02-04 13:00:46 +03:00
outline: none;
user-select: none;
background-color: ${({theme:e})=>e.fab.backgroundColor};
2022-02-04 13:00:46 +03:00
color: ${e=>e.theme.colors.primary.main};
display: none;
cursor: pointer;
position: fixed;
right: 20px;
z-index: 100;
border-radius: 50%;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
${xr("small")`
2022-02-04 13:00:46 +03:00
display: flex;
`};
bottom: 44px;
width: 60px;
height: 60px;
padding: 0 20px;
svg {
color: ${({theme:e})=>e.fab.color};
}
2022-02-04 13:00:46 +03:00
@media print {
display: none;
}
`;let Lb=class extends n.Component{constructor(){super(...arguments),this.state={offsetTop:"0px"},this.toggleNavMenu=()=>{this.props.menu.toggleSidebar()}}componentDidMount(){Tb&&Tb.add(this.stickyElement),this.setState({offsetTop:this.getScrollYOffset(this.context)})}componentWillUnmount(){Tb&&Tb.remove(this.stickyElement)}getScrollYOffset(e){let t;return t=void 0!==this.props.scrollYOffset?mr.normalizeScrollYOffset(this.props.scrollYOffset)():e.scrollYOffset(),t+"px"}render(){const e=this.props.menu.sideBarOpened,t=this.state.offsetTop;return n.createElement(n.Fragment,null,n.createElement(Ib,{open:e,className:this.props.className,style:{top:t,height:`calc(100vh - ${t})`},ref:e=>{this.stickyElement=e}},this.props.children),!this.context.hideFab&&n.createElement(Nb,{onClick:this.toggleNavMenu},n.createElement(Cb,{open:e})))}};Lb.contextType=Rr,Lb=((e,t,r,n)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([om],Lb);const Db=kr.div`
2022-02-04 13:00:46 +03:00
${({theme:e})=>`\n font-family: ${e.typography.fontFamily};\n font-size: ${e.typography.fontSize};\n font-weight: ${e.typography.fontWeightRegular};\n line-height: ${e.typography.lineHeight};\n color: ${e.colors.text.primary};\n display: flex;\n position: relative;\n text-align: left;\n\n -webkit-font-smoothing: ${e.typography.smoothing};\n font-smoothing: ${e.typography.smoothing};\n ${e.typography.optimizeSpeed?"text-rendering: optimizeSpeed !important":""};\n\n tap-highlight-color: rgba(0, 0, 0, 0);\n text-size-adjust: 100%;\n\n * {\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(255, 255, 255, 0);\n }\n`};
`,Mb=kr.div`
2022-02-04 13:00:46 +03:00
z-index: 1;
position: relative;
overflow: hidden;
width: calc(100% - ${e=>e.theme.sidebar.width});
${xr("small",!0)`
2022-02-04 13:00:46 +03:00
width: 100%;
`};
contain: layout;
`,Fb=kr.div`
2022-02-04 13:00:46 +03:00
background: ${({theme:e})=>e.rightPanel.backgroundColor};
position: absolute;
top: 0;
bottom: 0;
right: 0;
width: ${({theme:e})=>{if(e.rightPanel.width.endsWith("%")){const t=parseInt(e.rightPanel.width,10);return`calc((100% - ${e.sidebar.width}) * ${t/100})`}return e.rightPanel.width}};
${xr("medium",!0)`
2022-02-04 13:00:46 +03:00
display: none;
`};
`,zb=kr.div`
2022-02-04 13:00:46 +03:00
padding: 5px 0;
`,Ub=kr.input.attrs((()=>({className:"search-input"})))`
2022-02-04 13:00:46 +03:00
width: calc(100% - ${e=>8*e.theme.spacing.unit}px);
box-sizing: border-box;
margin: 0 ${e=>4*e.theme.spacing.unit}px;
padding: 5px ${e=>2*e.theme.spacing.unit}px 5px
${e=>4*e.theme.spacing.unit}px;
border: 0;
border-bottom: 1px solid
${({theme:e})=>(Ct(e.sidebar.backgroundColor)>.5?Et:Rt)(.1,e.sidebar.backgroundColor)};
2022-02-04 13:00:46 +03:00
font-family: ${({theme:e})=>e.typography.fontFamily};
font-weight: bold;
font-size: 13px;
color: ${e=>e.theme.sidebar.textColor};
background-color: transparent;
outline: none;
`,qb=kr((e=>n.createElement("svg",{className:e.className,version:"1.1",viewBox:"0 0 1000 1000",x:"0px",xmlns:"http://www.w3.org/2000/svg",y:"0px"},n.createElement("path",{d:"M968.2,849.4L667.3,549c83.9-136.5,66.7-317.4-51.7-435.6C477.1-25,252.5-25,113.9,113.4c-138.5,138.3-138.5,362.6,0,501C219.2,730.1,413.2,743,547.6,666.5l301.9,301.4c43.6,43.6,76.9,14.9,104.2-12.4C981,928.3,1011.8,893,968.2,849.4z M524.5,522c-88.9,88.7-233,88.7-321.8,0c-88.9-88.7-88.9-232.6,0-321.3c88.9-88.7,233-88.7,321.8,0C613.4,289.4,613.4,433.3,524.5,522z"})))).attrs({className:"search-icon"})`
2022-02-04 13:00:46 +03:00
position: absolute;
left: ${e=>4*e.theme.spacing.unit}px;
height: 1.8em;
width: 0.9em;
path {
fill: ${e=>e.theme.sidebar.textColor};
}
`,Vb=kr.div`
2022-02-04 13:00:46 +03:00
padding: ${e=>e.theme.spacing.unit}px 0;
background-color: ${({theme:e})=>Et(.05,e.sidebar.backgroundColor)}};
2022-02-04 13:00:46 +03:00
color: ${e=>e.theme.sidebar.textColor};
min-height: 150px;
max-height: 250px;
border-top: ${({theme:e})=>Et(.1,e.sidebar.backgroundColor)}};
border-bottom: ${({theme:e})=>Et(.1,e.sidebar.backgroundColor)}};
2022-02-04 13:00:46 +03:00
margin-top: 10px;
line-height: 1.4;
font-size: 0.9em;
li {
background-color: inherit;
}
${_y} {
2022-02-04 13:00:46 +03:00
padding-top: 6px;
padding-bottom: 6px;
&:hover,
&.active {
background-color: ${({theme:e})=>Et(.1,e.sidebar.backgroundColor)};
2022-02-04 13:00:46 +03:00
}
> svg {
display: none;
}
}
`,Bb=kr.i`
2022-02-04 13:00:46 +03:00
position: absolute;
display: inline-block;
width: ${e=>2*e.theme.spacing.unit}px;
text-align: center;
right: ${e=>4*e.theme.spacing.unit}px;
line-height: 2em;
vertical-align: middle;
margin-right: 2px;
cursor: pointer;
font-style: normal;
color: '#666';
`;var Wb=Object.defineProperty,Hb=Object.getOwnPropertyDescriptor;class Yb extends n.PureComponent{constructor(e){super(e),this.activeItemRef=null,this.clear=()=>{this.setState({results:[],noResults:!1,term:"",activeItemIdx:-1}),this.props.marker.unmark()},this.handleKeyDown=e=>{if(27===e.keyCode&&this.clear(),40===e.keyCode&&(this.setState({activeItemIdx:Math.min(this.state.activeItemIdx+1,this.state.results.length-1)}),e.preventDefault()),38===e.keyCode&&(this.setState({activeItemIdx:Math.max(0,this.state.activeItemIdx-1)}),e.preventDefault()),13===e.keyCode){const e=this.state.results[this.state.activeItemIdx];if(e){const t=this.props.getItemById(e.meta);t&&this.props.onActivate(t)}}},this.search=e=>{const{minCharacterLengthToInitSearch:t}=this.context,r=e.target.value;r.length<t?this.clearResults(r):this.setState({term:r},(()=>this.searchCallback(this.state.term)))},this.state={results:[],noResults:!1,term:"",activeItemIdx:-1}}clearResults(e){this.setState({results:[],noResults:!1,term:e}),this.props.marker.unmark()}setResults(e,t){this.setState({results:e,noResults:0===e.length}),this.props.marker.mark(t)}searchCallback(e){this.props.search.search(e).then((t=>{this.setResults(t,e)}))}render(){const{activeItemIdx:e}=this.state,t=this.state.results.map((e=>({item:this.props.getItemById(e.meta),score:e.score})));return t.sort(((e,t)=>t.score-e.score)),n.createElement(zb,{role:"search"},this.state.term&&n.createElement(Bb,{onClick:this.clear},"×"),n.createElement(qb,null),n.createElement(Ub,{value:this.state.term,onKeyDown:this.handleKeyDown,placeholder:"Search...","aria-label":"Search",type:"text",onChange:this.search}),t.length>0&&n.createElement(gf,{options:{wheelPropagation:!1}},n.createElement(Vb,{"data-role":"search:results"},t.map(((t,r)=>n.createElement(wb,{item:Object.create(t.item,{active:{value:r===e}}),onActivate:this.props.onActivate,withoutChildren:!0,key:t.item.id,"data-role":"search:result"}))))),this.state.term&&this.state.noResults?n.createElement(Vb,{"data-role":"search:results"},nr("noResultsFound")):null)}}Yb.contextType=Rr,((e,t,r,n)=>{for(var o,i=Hb(t,r),a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(t,r,i)||i);i&&Wb(t,r,i)})([Aa.bind,(0,Aa.debounce)(400)],Yb.prototype,"searchCallback");class Kb extends n.Component{componentDidMount(){this.props.store.onDidMount()}componentWillUnmount(){this.props.store.dispose()}render(){const{store:{spec:e,menu:t,options:r,search:o,marker:i}}=this.props,a=this.props.store;return n.createElement(wr,{theme:r.theme},n.createElement(Sp,{value:a},n.createElement(jr,{value:r},n.createElement(Db,{className:"redoc-wrap"},n.createElement(Lb,{menu:t,className:"menu-content"},n.createElement(uy,{info:e.info}),!r.disableSearch&&n.createElement(Yb,{search:o,marker:i,getItemById:t.getItemById,onActivate:t.activateAndScroll})||null,n.createElement($b,{menu:t})),n.createElement(Mb,{className:"api-content"},n.createElement(ay,{store:a}),n.createElement(lb,{items:t.items})),n.createElement(Fb,null)))))}}Kb.propTypes={store:Ar.instanceOf(Jg).isRequired};const Gb=function(e){const{spec:t,specUrl:o,options:i={},onLoaded:a}=e,s=fr(i.hideLoading,!1),l=new mr(i);if(void 0!==l.nonce)try{r.nc=l.nonce}catch(e){}return n.createElement(_r,null,n.createElement(Ep,{spec:t,specUrl:o,options:i,onLoaded:a},(({loading:e,store:t})=>e?s?null:n.createElement(Cr,{color:l.theme.colors.primary.main}):n.createElement(Kb,{store:t}))))},Qb=kr.li`
2022-02-04 13:00:46 +03:00
${e=>e.active?"background-color: #eee":""};
padding: 13px 16px;
&:hover {
background-color: #eee;
}
cursor: pointer;
text-overflow: ellipsis;
overflow: hidden;
`,Xb=kr.ul`
2022-02-04 13:00:46 +03:00
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12),
0 3px 1px -2px rgba(0, 0, 0, 0.2);
background: #fff;
border-radius: 0 0 2px 2px;
top: 100%;
left: 0;
right: 0;
z-index: 200;
overflow: hidden;
position: absolute;
list-style: none;
margin: 4px 0 0 0;
padding: 5px 0;
font-family: Roboto,sans-serif;
overflow: hidden;
`,Zb=kr.div`
2022-02-04 13:00:46 +03:00
position: relative;
width: 100%;
max-width: 500px;
display: flex;
`,Jb=kr.input`
2022-02-04 13:00:46 +03:00
box-sizing: border-box;
width: 100%;
padding: 0 10px;
color: #555;
background-color: #fff;
border: 1px solid #ccc;
font-size: 16px;
height: 28px;
box-sizing: border-box;
vertical-align: middle;
line-height: 1;
outline: none;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
&:focus {
border-color: #66afe9;
outline: 0;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
}
`,ew=kr.button`
2022-02-04 13:00:46 +03:00
background-color: #fff;
color: #333;
padding: 2px 10px;
touch-action: manipulation;
cursor: pointer;
user-select: none;
border: 1px solid #ccc;
border-left: 0;
font-size: 16px;
height: 28px;
box-sizing: border-box;
vertical-align: middle;
line-height: 1;
outline: none;
width: 80px;
white-space: nowrap;
@media screen and (max-width: 450px) {
display: none;
}
`;class tw extends n.Component{constructor(){super(...arguments),this.state={open:!1,value:this.props.value||"",activeItemIdx:-1},this.open=()=>{this.setState({open:!0})},this.close=()=>{this.setState({open:!1,activeItemIdx:-1})},this.handleChange=e=>{this.updateValue(e.currentTarget.value)},this.handleTryItClick=()=>{this.handleSelect(this.state.value)},this.handleKeyPress=e=>{if(13===e.keyCode)this.handleSelect(e.currentTarget.value);else if(40===e.keyCode){const t=Math.min(this.props.options.length-1,++this.state.activeItemIdx);this.setState({open:!0,activeItemIdx:t,value:this.props.options[t].value}),e.preventDefault()}else if(38===e.keyCode){const t=Math.max(0,--this.state.activeItemIdx);this.setState({activeItemIdx:t,value:this.props.options[t].value}),e.preventDefault()}else 27===e.keyCode&&this.close()},this.handleBlur=()=>{setTimeout((()=>this.close()),100)},this.handleItemClick=(e,t)=>{this.handleSelect(e),this.setState({activeItemIdx:t})},this.renderOption=(e,t)=>n.createElement(Qb,{active:t===this.state.activeItemIdx,key:e.value,onMouseDown:()=>{this.handleItemClick(e.value,t)}},n.createElement("small",null,n.createElement("strong",null,e.label)),n.createElement("br",null),e.value)}updateValue(e){this.setState({value:e,activeItemIdx:-1})}handleSelect(e){this.updateValue(e),this.props.onChange&&this.props.onChange(e),this.close()}render(){const{open:e,value:t}=this.state,{options:r,placeholder:o}=this.props;return n.createElement(Zb,null,n.createElement(Jb,{placeholder:o,onChange:this.handleChange,value:t,onFocus:this.open,onBlur:this.handleBlur,onKeyDown:this.handleKeyPress,"aria-label":"URL to an OpenAPI definition to try"}),n.createElement(ew,{onClick:this.handleTryItClick}," TRY IT "),e&&n.createElement(Xb,null,r.map(this.renderOption)))}}var rw=function(e){return"object"==typeof e&&null!==e},nw=function(e,t){var r,n="";for(r=0;r<t;r+=1)n+=e;return n},ow=function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e};function iw(e,t){var r="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+="\n\n"+e.mark.snippet),n+" "+r):n}function aw(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=iw(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}aw.prototype=Object.create(Error.prototype),aw.prototype.constructor=aw,aw.prototype.toString=function(e){return this.name+": "+iw(this,e)};var sw=aw;function lw(e,t,r,n,o){var i="",a="",s=Math.floor(o/2)-1;return n-t>s&&(t=n-s+(i=" ... ").length),r-n>s&&(r=n+s-(a=" ...").length),{str:i+e.slice(t,r).replace(/\t/g,"→")+a,pos:n-t+i.length}}function cw(e,t){return nw(" ",t-e.length)+e}var uw=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],pw=["scalar","sequence","mapping"],dw=function(e,t){if(t=t||{},Object.keys(t).forEach((function(t){if(-1===uw.indexOf(t))throw new sw('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function(e){var t={};return null!==e&&Object.keys(e).forEach((function(r){e[r].forEach((function(e){t[String(e)]=r}))})),t}(t.styleAliases||null),-1===pw.indexOf(this.kind))throw new sw('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')};function fw(e,t){var r=[];return e[t].forEach((function(e){var t=r.length;r.forEach((function(r,n){r.tag===e.tag&&r.kind===e.kind&&r.multi===e.multi&&(t=n)})),r[t]=e})),r}function hw(e){return this.extend(e)}hw.prototype.extend=function(e){var t=[],r=[];if(e instanceof dw)r.push(e);else if(Array.isArray(e))r=r.concat(e);else{if(!e||!Array.isArray(e.impli
2022-02-04 13:00:46 +03:00
background-color: #fff;
color: #333;
padding: 2px 10px;
touch-action: manipulation;
cursor: pointer;
user-select: none;
border: 1px solid #ccc;
font-size: 16px;
height: 28px;
box-sizing: border-box;
vertical-align: middle;
line-height: 1;
outline: none;
white-space: nowrap;
@media (max-width: 699px) {
display: none;
}
`,Sx=function(e){const t=(0,n.useRef)(null);return n.createElement("span",null,n.createElement(Ox,{onClick:()=>{t&&t.current&&t.current.click()}},"Upload a file"),n.createElement("input",{type:"file",style:{display:"none"},onChange:t=>{const r=t.target.files[0],n=new FileReader;n.onload=()=>{e.onUpload(kx(n.result))},n.readAsText(r)},ref:t}))},_x="openapi.yaml",Ex="openapi-3-1.yaml",Px=[{value:Ex,label:"Petstore OpenAPI 3.1"},{value:"https://api.apis.guru/v2/specs/instagram.com/1.0.0/swagger.yaml",label:"Instagram"},{value:"https://api.apis.guru/v2/specs/googleapis.com/calendar/v3/openapi.yaml",label:"Google Calendar"},{value:"https://api.apis.guru/v2/specs/slack.com/1.7.0/openapi.yaml",label:"Slack"},{value:"https://api.apis.guru/v2/specs/zoom.us/2.0.0/openapi.yaml",label:"Zoom.us"},{value:"https://docs.graphhopper.com/openapi.json",label:"GraphHopper"}];class $x extends n.Component{constructor(e){super(e),this.handleUploadFile=e=>{this.setState({spec:e,specUrl:""})},this.handleChange=e=>{e===Ex&&this.setState({cors:!1}),this.setState({specUrl:e}),window.history.pushState(void 0,"",Tx(location.search,"url",e))},this.toggleCors=e=>{const t=e.currentTarget.checked;this.setState({cors:t}),window.history.pushState(void 0,"",Tx(location.search,"nocors",t?void 0:""))};let t=window.location.search.match(/url=([^&]+)/),r=_x;t&&t.length>1&&(r=decodeURIComponent(t[1])),t=window.location.search.match(/[?&]nocors(&|#|$)/);let n=!0;t&&t.length>1&&(n=!1),this.state={spec:void 0,specUrl:r,dropdownOpen:!1,cors:n}}render(){const{specUrl:e,cors:t}=this.state;let r=e;return e!==_x&&(r=t?"\\\\cors.redoc.ly/"+new URL(e,window.location.href).href:e),n.createElement(n.Fragment,null,n.createElement(Rx,null,n.createElement("a",{href:"."},n.createElement(jx,{src:"https://github.com/Redocly/redoc/raw/master/docs/images/redoc-logo.png",alt:"Redoc logo"})),n.createElement(Cx,null,n.createElement(Sx,{onUpload:this.handleUploadFile}),n.createElement(tw,{placeholder:"URL to a spec to try",options:Px,onChange:this.handleChange,value:e===_x?"":e}),n.createElement(Ax,{title:"Use CORS proxy"},n.createElement("input",{id:"cors_checkbox",type:"checkbox",onChange:this.toggleCors,checked:t}),n.createElement("label",{htmlFor:"cors_checkbox"},"CORS"))),n.createElement("iframe",{src:"https://ghbtns.com/github-btn.html?user=Redocly&repo=redoc&type=star&count=true&size=large",frameBorder:"0",scrolling:"0",width:"160px",height:"30px"})),n.createElement(Gb,{spec:this.state.spec,specUrl:r,options:{scrollYOffset:"nav",untrustedSpec:!0}}))}}const Cx=He.div`
2022-02-04 13:00:46 +03:00
display: flex;
justify-content: center;
flex: 1;
margin: 0 15px;
align-items: center;
`,Ax=He.div`
2022-02-04 13:00:46 +03:00
margin-left: 10px;
white-space: nowrap;
label {
font-size: 13px;
}
@media screen and (max-width: 550px) {
display: none;
}
`,Rx=He.nav`
2022-02-04 13:00:46 +03:00
position: sticky;
top: 0;
width: 100%;
height: 50px;
box-sizing: border-box;
background: white;
border-bottom: 1px solid #cccccc;
z-index: 10;
padding: 5px;
display: flex;
align-items: center;
font-family: Roboto, sans-serif;
`,jx=He.img`
2022-02-04 13:00:46 +03:00
height: 40px;
width: 124px;
display: inline-block;
margin-right: 15px;
@media screen and (max-width: 950px) {
display: none;
}
`;function Tx(e,t,r){const n=""===r?t:t+"="+r,o=new RegExp("([?|&])"+t+"=?.*?(&|#|$)","i");if(e.match(o))return void 0!==r?e.replace(o,"$1"+n+"$2"):e.replace(o,((e,t,r)=>(r.startsWith("&")&&(r=r.substring(1)),"&"===t?r:t+r)));{if(void 0===r)return e;let t="";-1!==e.indexOf("#")&&(t=e.replace(/.*#/,"#"),e=e.replace(/#.*/,""));const o=-1!==e.indexOf("?")?"&":"?";return e+o+n+t}}(0,o.render)(n.createElement($x,null),document.getElementById("container"))})()})();