@redocly/reference-docs 2.7.2 → 2.7.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ControlsWrap=exports.ChangeViewButton=exports.NextSectionButtonWrap=exports.BackgroundStubFix=exports.BackgroundStub=exports.ApiContentWrap=exports.RedocWrap=exports.ArrowIcon=exports.ToggleRightPanelButton=exports.StyledToggleRightPanelButton=void 0;var tslib_1=require("tslib"),React=(0,tslib_1.__importStar)(require("react")),mobx_react_1=require("mobx-react"),redoc_lib_1=require("../redoc-lib"),services_1=require("../services"),ShowRightPanelSVG=(0,redoc_lib_1.styled)((function(){return React.createElement("svg",{width:"15",height:"10",viewBox:"0 0 15 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M2.41421 5L5.70711 8.29289C6.09763 8.68342 6.09763 9.31658 5.7071 9.70711C5.31658 10.0976 4.68342 10.0976 4.29289 9.70711L0.292892 5.70711C-0.0976321 5.31658 -0.0976319 4.68342 0.292893 4.29289L4.29289 0.292894C4.68342 -0.0976302 5.31658 -0.09763 5.70711 0.292894C6.09763 0.683418 6.09763 1.31658 5.70711 1.70711L2.41421 5Z",fill:"#9AA6B1"}),React.createElement("path",{d:"M2 5C2 4.44772 2.44771 4 3 4L11 4C11.5523 4 12 4.44772 12 5C12 5.55229 11.5523 6 11 6L3 6C2.44771 6 2 5.55228 2 5Z",fill:"#9AA6B1"}),React.createElement("rect",{x:"15",y:"10",width:"2",height:"10",rx:"1",transform:"rotate(-180 15 10)",fill:"#9AA6B1"}))}))(templateObject_1||(templateObject_1=(0,tslib_1.__makeTemplateObject)(["\n position: absolute;\n"],["\n position: absolute;\n"]))),HideRightPanelSVG=(0,redoc_lib_1.styled)((function(){return React.createElement("svg",{width:"15",height:"10",viewBox:"0 0 15 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M12.5858 5L9.29289 1.70711C8.90237 1.31658 8.90237 0.683417 9.29289 0.292893C9.68342 -0.097631 10.3166 -0.0976309 10.7071 0.292893L14.7071 4.29289C15.0976 4.68342 15.0976 5.31658 14.7071 5.70711L10.7071 9.70711C10.3166 10.0976 9.68342 10.0976 9.29289 9.70711C8.90237 9.31658 8.90237 8.68342 9.29289 8.29289L12.5858 5Z",fill:"#9AA6B1"}),React.createElement("path",{d:"M13 5C13 5.55229 12.5523 6 12 6L4 6C3.44772 6 3 5.55228 3 5C3 4.44771 3.44772 4 4 4L12 4C12.5523 4 13 4.44772 13 5Z",fill:"#9AA6B1"}),React.createElement("rect",{width:"2",height:"10",rx:"1",fill:"#9AA6B1"}))}))(templateObject_2||(templateObject_2=(0,tslib_1.__makeTemplateObject)(["\n position: absolute;\n"],["\n position: absolute;\n"])));exports.StyledToggleRightPanelButton=redoc_lib_1.styled.a(templateObject_3||(templateObject_3=(0,tslib_1.__makeTemplateObject)(["\n display: flex;\n justify-content: center;\n align-items: center;\n color: '#f00';\n cursor: pointer;\n z-index: 1;\n /* Rectangle 201 */\n width: 36px;\n height: 36px;\n background: #e5e8eb;\n border-radius: ",";\n"],["\n display: flex;\n justify-content: center;\n align-items: center;\n color: '#f00';\n cursor: pointer;\n z-index: 1;\n /* Rectangle 201 */\n width: 36px;\n height: 36px;\n background: #e5e8eb;\n border-radius: ",";\n"])),(function(e){return e.theme.shape.borderRadius})),exports.ToggleRightPanelButton=(0,mobx_react_1.observer)((function(e){var t=e.store,n=e.isVisible;return t.options.showRightPanelToggle&&n?React.createElement(redoc_lib_1.Tooltip,{tip:t.showRightPanel?"Hide samples":"Show samples",placement:"left"},React.createElement(exports.StyledToggleRightPanelButton,{onClick:function(){t.toggleRightPanel()}},t.showRightPanel?React.createElement(HideRightPanelSVG,null):React.createElement(ShowRightPanelSVG,null))):null}));var IntArrowIcon=function(e){return React.createElement("svg",{className:e.className,version:"1.1",viewBox:"0 0 24 24",x:"0",xmlns:"http://www.w3.org/2000/svg",y:"0","aria-hidden":"true"},React.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 "}))};exports.ArrowIcon=(0,redoc_lib_1.styled)(IntArrowIcon)(templateObject_4||(templateObject_4=(0,tslib_1.__makeTemplateObject)(["\n width: 18px;\n height: 18px;\n transform: ",";\n\n ","\n"],["\n width: 18px;\n height: 18px;\n transform: ",";\n\n ","\n"])),(function(e){return"rotate("+("left"===e.direction?"90deg":"-90deg")+")"}),(function(e){var t,n=e.theme;return(0,redoc_lib_1.mediaCSS)({fill:null===(t=n.rightPanel)||void 0===t?void 0:t.textColor})})),exports.RedocWrap=redoc_lib_1.styled.div(templateObject_5||(templateObject_5=(0,tslib_1.__makeTemplateObject)(["\n display: flex;\n position: relative;\n text-align: left;\n tap-highlight-color: rgba(0, 0, 0, 0);\n text-size-adjust: 100%;\n ",";\n\n ","\n\n * {\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(255, 255, 255, 0);\n }\n"],["\n display: flex;\n position: relative;\n text-align: left;\n tap-highlight-color: rgba(0, 0, 0, 0);\n text-size-adjust: 100%;\n ",";\n\n ","\n\n * {\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(255, 255, 255, 0);\n }\n"])),(function(e){var t=e.theme;return"\n -webkit-font-smoothing: "+t.typography.smoothing+";\n "+(t.typography.optimizeSpeed?"text-rendering: optimizeSpeed !important":"")+";\n "}),(function(e){var t=e.theme;return(0,redoc_lib_1.mediaCSS)({fontFamily:t.typography.fontFamily,fontSize:t.typography.fontSize,lineHeight:t.typography.lineHeight,fontWeight:t.typography.fontWeightRegular,color:t.colors.text.primary,fontSmoothing:t.typography.smoothing})})),exports.ApiContentWrap=redoc_lib_1.styled.div(templateObject_7||(templateObject_7=(0,tslib_1.__makeTemplateObject)(["\n position: relative;\n overflow: hidden;\n /* contain: layout; */\n display: flex;\n flex-direction: column;\n align-items: center;\n margin: 0 auto;\n\n ","\n"],["\n position: relative;\n overflow: hidden;\n /* contain: layout; */\n display: flex;\n flex-direction: column;\n align-items: center;\n margin: 0 auto;\n\n ","\n"])),(function(e){var t,n=e.theme,i=e.layout;return(0,redoc_lib_1.css)(templateObject_6||(templateObject_6=(0,tslib_1.__makeTemplateObject)(["\n ",";\n\n "," {\n width: 100%;\n padding: 0;\n }\n "],["\n ",";\n\n "," {\n width: 100%;\n padding: 0;\n }\n "])),(0,redoc_lib_1.mediaCSS)({width:(t={},t[redoc_lib_1.ZERO_BREAKPOINT]="auto",t.small="calc(100% - "+n.sidebar.width+")",t),maxWidth:n.layout[i||services_1.LayoutVariant.THREE_PANEL].maxWidth}),n.mediaQueries.print)})),exports.BackgroundStub=redoc_lib_1.styled.div(templateObject_9||(templateObject_9=(0,tslib_1.__makeTemplateObject)(["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n ","\n"],["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n ","\n"])),(function(e){var t,n,i=e.theme;return(0,redoc_lib_1.css)(templateObject_8||(templateObject_8=(0,tslib_1.__makeTemplateObject)(["\n ","\n "," {\n display: none;\n }\n "],["\n ","\n "," {\n display: none;\n }\n "])),(0,redoc_lib_1.mediaCSS)({background:i.rightPanel.backgroundColor,display:(t={},t[redoc_lib_1.ZERO_BREAKPOINT]="none",t[i.rightPanel.showAtBreakpoint]="initial",t),left:(0,redoc_lib_1.mediaMap)(i.breakpoints,[i.rightPanel.width],(n={},n[redoc_lib_1.ZERO_BREAKPOINT]=function(){return"0"},n[i.rightPanel.showAtBreakpoint]=function(e){return"calc(100% - "+e+")"},n))}),i.mediaQueries.print)})),exports.BackgroundStubFix=redoc_lib_1.styled.div(templateObject_11||(templateObject_11=(0,tslib_1.__makeTemplateObject)(["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n ","\n"],["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n ","\n"])),(function(e){var t,n,i=e.theme;return(0,redoc_lib_1.css)(templateObject_10||(templateObject_10=(0,tslib_1.__makeTemplateObject)(["\n ","\n "," {\n display: none;\n }\n "],["\n ","\n "," {\n display: none;\n }\n "])),(0,redoc_lib_1.mediaCSS)({background:i.rightPanel.backgroundColor,display:(t={},t[redoc_lib_1.ZERO_BREAKPOINT]="none",t[i.rightPanel.showAtBreakpoint]="initial",t),width:(0,redoc_lib_1.mediaMap)(i.breakpoints,[i.sidebar.width,i.layout["three-panel"].maxWidth],(n={},n[redoc_lib_1.ZERO_BREAKPOINT]=function(){return"0"},n[i.rightPanel.showAtBreakpoint]=function(e,t){return"calc((100% - min(100% - "+e+", "+t+") - "+e+")/2 + 50px)"},n))}),i.mediaQueries.print)})),exports.NextSectionButtonWrap=redoc_lib_1.styled.div(templateObject_13||(templateObject_13=(0,tslib_1.__makeTemplateObject)(["\n padding: ",";\n align-self: flex-start;\n text-align: right;\n\n display: flex;\n flex-direction: row;\n\n ","\n"],["\n padding: ",";\n align-self: flex-start;\n text-align: right;\n\n display: flex;\n flex-direction: row;\n\n ","\n"])),(function(e){var t=e.theme;return 4*t.spacing.unit+"px "+5*t.spacing.unit+"px"}),(function(e){var t,n,i=e.theme,o=i.layout.showDarkRightPanel?i.spacing.sectionHorizontal:i.spacing.sectionHorizontal/2;return(0,redoc_lib_1.css)(templateObject_12||(templateObject_12=(0,tslib_1.__makeTemplateObject)(["\n ","\n "],["\n ","\n "])),(0,redoc_lib_1.mediaCSS)({width:(0,redoc_lib_1.mediaMap)(i.breakpoints,[i.rightPanel.width],(t={},t[redoc_lib_1.ZERO_BREAKPOINT]=function(){return"100%"},t[i.rightPanel.showAtBreakpoint]=function(e){return"calc(100% - "+e+")"},t)),paddingLeft:i.spacing.sectionHorizontal,paddingRight:(n={},n[redoc_lib_1.ZERO_BREAKPOINT]=i.spacing.sectionHorizontal,n[i.rightPanel.showAtBreakpoint]=o,n)}))}));var templateObject_1,templateObject_2,templateObject_3,templateObject_4,templateObject_5,templateObject_6,templateObject_7,templateObject_8,templateObject_9,templateObject_10,templateObject_11,templateObject_12,templateObject_13,templateObject_14,templateObject_15,templateObject_16,templateObject_17,templateObject_18,ChangeViewSvgColumn=(0,redoc_lib_1.styled)((function(){return React.createElement("svg",{width:"15",height:"20",viewBox:"0 0 15 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("line",{x1:"13.2858",y1:"5.28564",x2:"1.00005",y2:"5.28564",stroke:"#9AA6B1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),React.createElement("line",{x1:"13.2858",y1:"1",x2:"1.00005",y2:"0.999998",stroke:"#9AA6B1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),React.createElement("rect",{x:"14.2858",y:"20",width:"14.2857",height:"11.4286",rx:"1",transform:"rotate(-180 14.2858 20)",fill:"#9AA6B1"}))}))(templateObject_14||(templateObject_14=(0,tslib_1.__makeTemplateObject)(["\n position: absolute;\n"],["\n position: absolute;\n"]))),ChangeViewSvgRow=(0,redoc_lib_1.styled)((function(){return React.createElement("svg",{width:"20",height:"16",viewBox:"0 0 20 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("line",{x1:"1",y1:"4",x2:"8",y2:"4",stroke:"#9AA6B1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),React.createElement("line",{x1:"1",y1:"8",x2:"8",y2:"8",stroke:"#9AA6B1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),React.createElement("line",{x1:"1",y1:"12",x2:"8",y2:"12",stroke:"#9AA6B1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),React.createElement("rect",{x:"11",width:"9",height:"16",rx:"1",fill:"#9AA6B1"}))}))(templateObject_15||(templateObject_15=(0,tslib_1.__makeTemplateObject)(["\n position: absolute;\n"],["\n position: absolute;\n"]))),StyledChangeViewButton=redoc_lib_1.styled.a(templateObject_16||(templateObject_16=(0,tslib_1.__makeTemplateObject)(["\n display: flex;\n position: relative;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n z-index: 1;\n /* Rectangle 201 */\n width: 36px;\n height: 36px;\n background: #e5e8eb;\n border-radius: ",";\n"],["\n display: flex;\n position: relative;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n z-index: 1;\n /* Rectangle 201 */\n width: 36px;\n height: 36px;\n background: #e5e8eb;\n border-radius: ",";\n"])),(function(e){return e.theme.shape.borderRadius})),ChangeViewButton=function(e){var t=e.store,n=e.isVisible;return t.options.showChangeLayoutButton&&n?React.createElement(redoc_lib_1.Tooltip,{tip:"Change layout",placement:"left"},React.createElement(StyledChangeViewButton,{onClick:function(){t.toggleLayout(t.layout===services_1.LayoutVariant.STACKED?services_1.LayoutVariant.THREE_PANEL:services_1.LayoutVariant.STACKED)}},t.layout===services_1.LayoutVariant.STACKED?React.createElement(ChangeViewSvgRow,null):React.createElement(ChangeViewSvgColumn,null))):null};exports.ChangeViewButton=ChangeViewButton,exports.ControlsWrap=redoc_lib_1.styled.div(templateObject_18||(templateObject_18=(0,tslib_1.__makeTemplateObject)(["\n position: sticky;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n top: ",";\n right: 24px;\n height: 80px;\n z-index: 1;\n ","\n"],["\n position: sticky;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n top: ",";\n right: 24px;\n height: 80px;\n z-index: 1;\n ","\n"])),(function(e){return e.theme.components.layoutControls.top}),(function(e){var t,n=e.theme;return(0,redoc_lib_1.css)(templateObject_17||(templateObject_17=(0,tslib_1.__makeTemplateObject)(["\n ","\n "," {\n display: none;\n }\n "],["\n ","\n "," {\n display: none;\n }\n "])),(0,redoc_lib_1.mediaCSS)({display:(t={},t[redoc_lib_1.ZERO_BREAKPOINT]="none",t[n.rightPanel.showAtBreakpoint]="flex",t)}),n.mediaQueries.print)}));
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ControlsWrap=exports.ChangeViewButton=exports.NextSectionButtonWrap=exports.BackgroundStubFix=exports.BackgroundStub=exports.ApiContentWrap=exports.RedocWrap=exports.ArrowIcon=exports.ToggleRightPanelButton=exports.StyledToggleRightPanelButton=void 0;var tslib_1=require("tslib"),React=(0,tslib_1.__importStar)(require("react")),mobx_react_1=require("mobx-react"),redoc_lib_1=require("../redoc-lib"),services_1=require("../services"),ShowRightPanelSVG=(0,redoc_lib_1.styled)((function(){return React.createElement("svg",{width:"15",height:"10",viewBox:"0 0 15 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M2.41421 5L5.70711 8.29289C6.09763 8.68342 6.09763 9.31658 5.7071 9.70711C5.31658 10.0976 4.68342 10.0976 4.29289 9.70711L0.292892 5.70711C-0.0976321 5.31658 -0.0976319 4.68342 0.292893 4.29289L4.29289 0.292894C4.68342 -0.0976302 5.31658 -0.09763 5.70711 0.292894C6.09763 0.683418 6.09763 1.31658 5.70711 1.70711L2.41421 5Z",fill:"#9AA6B1"}),React.createElement("path",{d:"M2 5C2 4.44772 2.44771 4 3 4L11 4C11.5523 4 12 4.44772 12 5C12 5.55229 11.5523 6 11 6L3 6C2.44771 6 2 5.55228 2 5Z",fill:"#9AA6B1"}),React.createElement("rect",{x:"15",y:"10",width:"2",height:"10",rx:"1",transform:"rotate(-180 15 10)",fill:"#9AA6B1"}))}))(templateObject_1||(templateObject_1=(0,tslib_1.__makeTemplateObject)(["\n position: absolute;\n"],["\n position: absolute;\n"]))),HideRightPanelSVG=(0,redoc_lib_1.styled)((function(){return React.createElement("svg",{width:"15",height:"10",viewBox:"0 0 15 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M12.5858 5L9.29289 1.70711C8.90237 1.31658 8.90237 0.683417 9.29289 0.292893C9.68342 -0.097631 10.3166 -0.0976309 10.7071 0.292893L14.7071 4.29289C15.0976 4.68342 15.0976 5.31658 14.7071 5.70711L10.7071 9.70711C10.3166 10.0976 9.68342 10.0976 9.29289 9.70711C8.90237 9.31658 8.90237 8.68342 9.29289 8.29289L12.5858 5Z",fill:"#9AA6B1"}),React.createElement("path",{d:"M13 5C13 5.55229 12.5523 6 12 6L4 6C3.44772 6 3 5.55228 3 5C3 4.44771 3.44772 4 4 4L12 4C12.5523 4 13 4.44772 13 5Z",fill:"#9AA6B1"}),React.createElement("rect",{width:"2",height:"10",rx:"1",fill:"#9AA6B1"}))}))(templateObject_2||(templateObject_2=(0,tslib_1.__makeTemplateObject)(["\n position: absolute;\n"],["\n position: absolute;\n"])));exports.StyledToggleRightPanelButton=redoc_lib_1.styled.a(templateObject_3||(templateObject_3=(0,tslib_1.__makeTemplateObject)(["\n display: flex;\n justify-content: center;\n align-items: center;\n color: '#f00';\n cursor: pointer;\n z-index: 1;\n /* Rectangle 201 */\n width: ",";\n height: ",";\n background: #e5e8eb;\n border-radius: ",";\n"],["\n display: flex;\n justify-content: center;\n align-items: center;\n color: '#f00';\n cursor: pointer;\n z-index: 1;\n /* Rectangle 201 */\n width: ",";\n height: ",";\n background: #e5e8eb;\n border-radius: ",";\n"])),(function(e){return e.theme.components.layoutControls.width}),(function(e){return e.theme.components.layoutControls.height}),(function(e){return e.theme.shape.borderRadius})),exports.ToggleRightPanelButton=(0,mobx_react_1.observer)((function(e){var t=e.store,n=e.isVisible;return t.options.showRightPanelToggle&&n?React.createElement(redoc_lib_1.Tooltip,{tip:t.showRightPanel?"Hide samples":"Show samples",placement:"left"},React.createElement(exports.StyledToggleRightPanelButton,{onClick:function(){t.toggleRightPanel()}},t.showRightPanel?React.createElement(HideRightPanelSVG,null):React.createElement(ShowRightPanelSVG,null))):null}));var IntArrowIcon=function(e){return React.createElement("svg",{className:e.className,version:"1.1",viewBox:"0 0 24 24",x:"0",xmlns:"http://www.w3.org/2000/svg",y:"0","aria-hidden":"true"},React.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 "}))};exports.ArrowIcon=(0,redoc_lib_1.styled)(IntArrowIcon)(templateObject_4||(templateObject_4=(0,tslib_1.__makeTemplateObject)(["\n width: 18px;\n height: 18px;\n transform: ",";\n\n ","\n"],["\n width: 18px;\n height: 18px;\n transform: ",";\n\n ","\n"])),(function(e){return"rotate("+("left"===e.direction?"90deg":"-90deg")+")"}),(function(e){var t,n=e.theme;return(0,redoc_lib_1.mediaCSS)({fill:null===(t=n.rightPanel)||void 0===t?void 0:t.textColor})})),exports.RedocWrap=redoc_lib_1.styled.div(templateObject_5||(templateObject_5=(0,tslib_1.__makeTemplateObject)(["\n display: flex;\n position: relative;\n text-align: left;\n tap-highlight-color: rgba(0, 0, 0, 0);\n text-size-adjust: 100%;\n ",";\n\n ","\n\n * {\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(255, 255, 255, 0);\n }\n"],["\n display: flex;\n position: relative;\n text-align: left;\n tap-highlight-color: rgba(0, 0, 0, 0);\n text-size-adjust: 100%;\n ",";\n\n ","\n\n * {\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(255, 255, 255, 0);\n }\n"])),(function(e){var t=e.theme;return"\n -webkit-font-smoothing: "+t.typography.smoothing+";\n "+(t.typography.optimizeSpeed?"text-rendering: optimizeSpeed !important":"")+";\n "}),(function(e){var t=e.theme;return(0,redoc_lib_1.mediaCSS)({fontFamily:t.typography.fontFamily,fontSize:t.typography.fontSize,lineHeight:t.typography.lineHeight,fontWeight:t.typography.fontWeightRegular,color:t.colors.text.primary,fontSmoothing:t.typography.smoothing})})),exports.ApiContentWrap=redoc_lib_1.styled.div(templateObject_7||(templateObject_7=(0,tslib_1.__makeTemplateObject)(["\n position: relative;\n overflow: hidden;\n /* contain: layout; */\n display: flex;\n flex-direction: column;\n align-items: center;\n margin: 0 auto;\n\n ","\n"],["\n position: relative;\n overflow: hidden;\n /* contain: layout; */\n display: flex;\n flex-direction: column;\n align-items: center;\n margin: 0 auto;\n\n ","\n"])),(function(e){var t,n=e.theme,i=e.layout;return(0,redoc_lib_1.css)(templateObject_6||(templateObject_6=(0,tslib_1.__makeTemplateObject)(["\n ",";\n\n "," {\n width: 100%;\n padding: 0;\n }\n "],["\n ",";\n\n "," {\n width: 100%;\n padding: 0;\n }\n "])),(0,redoc_lib_1.mediaCSS)({width:(t={},t[redoc_lib_1.ZERO_BREAKPOINT]="auto",t.small="calc(100% - "+n.sidebar.width+")",t),maxWidth:n.layout[i||services_1.LayoutVariant.THREE_PANEL].maxWidth}),n.mediaQueries.print)})),exports.BackgroundStub=redoc_lib_1.styled.div(templateObject_9||(templateObject_9=(0,tslib_1.__makeTemplateObject)(["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n ","\n"],["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n ","\n"])),(function(e){var t,n,i=e.theme;return(0,redoc_lib_1.css)(templateObject_8||(templateObject_8=(0,tslib_1.__makeTemplateObject)(["\n ","\n "," {\n display: none;\n }\n "],["\n ","\n "," {\n display: none;\n }\n "])),(0,redoc_lib_1.mediaCSS)({background:i.rightPanel.backgroundColor,display:(t={},t[redoc_lib_1.ZERO_BREAKPOINT]="none",t[i.rightPanel.showAtBreakpoint]="initial",t),left:(0,redoc_lib_1.mediaMap)(i.breakpoints,[i.rightPanel.width],(n={},n[redoc_lib_1.ZERO_BREAKPOINT]=function(){return"0"},n[i.rightPanel.showAtBreakpoint]=function(e){return"calc(100% - "+e+")"},n))}),i.mediaQueries.print)})),exports.BackgroundStubFix=redoc_lib_1.styled.div(templateObject_11||(templateObject_11=(0,tslib_1.__makeTemplateObject)(["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n ","\n"],["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n ","\n"])),(function(e){var t,n,i=e.theme;return(0,redoc_lib_1.css)(templateObject_10||(templateObject_10=(0,tslib_1.__makeTemplateObject)(["\n ","\n "," {\n display: none;\n }\n "],["\n ","\n "," {\n display: none;\n }\n "])),(0,redoc_lib_1.mediaCSS)({background:i.rightPanel.backgroundColor,display:(t={},t[redoc_lib_1.ZERO_BREAKPOINT]="none",t[i.rightPanel.showAtBreakpoint]="initial",t),width:(0,redoc_lib_1.mediaMap)(i.breakpoints,[i.sidebar.width,i.layout["three-panel"].maxWidth],(n={},n[redoc_lib_1.ZERO_BREAKPOINT]=function(){return"0"},n[i.rightPanel.showAtBreakpoint]=function(e,t){return"calc((100% - min(100% - "+e+" - "+i.components.layoutControls.width+", "+t+") - "+e+" + "+i.components.layoutControls.width+")/2 + 2px)"},n))}),i.mediaQueries.print)})),exports.NextSectionButtonWrap=redoc_lib_1.styled.div(templateObject_13||(templateObject_13=(0,tslib_1.__makeTemplateObject)(["\n padding: ",";\n align-self: flex-start;\n text-align: right;\n\n display: flex;\n flex-direction: row;\n\n ","\n"],["\n padding: ",";\n align-self: flex-start;\n text-align: right;\n\n display: flex;\n flex-direction: row;\n\n ","\n"])),(function(e){var t=e.theme;return 4*t.spacing.unit+"px "+5*t.spacing.unit+"px"}),(function(e){var t,n,i=e.theme,o=i.layout.showDarkRightPanel?i.spacing.sectionHorizontal:i.spacing.sectionHorizontal/2;return(0,redoc_lib_1.css)(templateObject_12||(templateObject_12=(0,tslib_1.__makeTemplateObject)(["\n ","\n "],["\n ","\n "])),(0,redoc_lib_1.mediaCSS)({width:(0,redoc_lib_1.mediaMap)(i.breakpoints,[i.rightPanel.width],(t={},t[redoc_lib_1.ZERO_BREAKPOINT]=function(){return"100%"},t[i.rightPanel.showAtBreakpoint]=function(e){return"calc(100% - "+e+")"},t)),paddingLeft:i.spacing.sectionHorizontal,paddingRight:(n={},n[redoc_lib_1.ZERO_BREAKPOINT]=i.spacing.sectionHorizontal,n[i.rightPanel.showAtBreakpoint]=o,n)}))}));var templateObject_1,templateObject_2,templateObject_3,templateObject_4,templateObject_5,templateObject_6,templateObject_7,templateObject_8,templateObject_9,templateObject_10,templateObject_11,templateObject_12,templateObject_13,templateObject_14,templateObject_15,templateObject_16,templateObject_17,templateObject_18,ChangeViewSvgColumn=(0,redoc_lib_1.styled)((function(){return React.createElement("svg",{width:"15",height:"20",viewBox:"0 0 15 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("line",{x1:"13.2858",y1:"5.28564",x2:"1.00005",y2:"5.28564",stroke:"#9AA6B1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),React.createElement("line",{x1:"13.2858",y1:"1",x2:"1.00005",y2:"0.999998",stroke:"#9AA6B1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),React.createElement("rect",{x:"14.2858",y:"20",width:"14.2857",height:"11.4286",rx:"1",transform:"rotate(-180 14.2858 20)",fill:"#9AA6B1"}))}))(templateObject_14||(templateObject_14=(0,tslib_1.__makeTemplateObject)(["\n position: absolute;\n"],["\n position: absolute;\n"]))),ChangeViewSvgRow=(0,redoc_lib_1.styled)((function(){return React.createElement("svg",{width:"20",height:"16",viewBox:"0 0 20 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("line",{x1:"1",y1:"4",x2:"8",y2:"4",stroke:"#9AA6B1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),React.createElement("line",{x1:"1",y1:"8",x2:"8",y2:"8",stroke:"#9AA6B1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),React.createElement("line",{x1:"1",y1:"12",x2:"8",y2:"12",stroke:"#9AA6B1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),React.createElement("rect",{x:"11",width:"9",height:"16",rx:"1",fill:"#9AA6B1"}))}))(templateObject_15||(templateObject_15=(0,tslib_1.__makeTemplateObject)(["\n position: absolute;\n"],["\n position: absolute;\n"]))),StyledChangeViewButton=redoc_lib_1.styled.a(templateObject_16||(templateObject_16=(0,tslib_1.__makeTemplateObject)(["\n display: flex;\n position: relative;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n z-index: 1;\n /* Rectangle 201 */\n width: ",";\n height: ",";\n background: #e5e8eb;\n border-radius: ",";\n"],["\n display: flex;\n position: relative;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n z-index: 1;\n /* Rectangle 201 */\n width: ",";\n height: ",";\n background: #e5e8eb;\n border-radius: ",";\n"])),(function(e){return e.theme.components.layoutControls.width}),(function(e){return e.theme.components.layoutControls.height}),(function(e){return e.theme.shape.borderRadius})),ChangeViewButton=function(e){var t=e.store,n=e.isVisible;return t.options.showChangeLayoutButton&&n?React.createElement(redoc_lib_1.Tooltip,{tip:"Change layout",placement:"left"},React.createElement(StyledChangeViewButton,{onClick:function(){t.toggleLayout(t.layout===services_1.LayoutVariant.STACKED?services_1.LayoutVariant.THREE_PANEL:services_1.LayoutVariant.STACKED)}},t.layout===services_1.LayoutVariant.STACKED?React.createElement(ChangeViewSvgRow,null):React.createElement(ChangeViewSvgColumn,null))):null};exports.ChangeViewButton=ChangeViewButton,exports.ControlsWrap=redoc_lib_1.styled.div(templateObject_18||(templateObject_18=(0,tslib_1.__makeTemplateObject)(["\n position: sticky;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n top: ",";\n right: 24px;\n height: ",";\n z-index: 1;\n ","\n"],["\n position: sticky;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n top: ",";\n right: 24px;\n height: ",";\n z-index: 1;\n ","\n"])),(function(e){return e.theme.components.layoutControls.top}),(function(e){var t=e.theme;return"calc("+t.components.layoutControls.height+" * 2 + "+2*t.spacing.unit+"px)"}),(function(e){var t,n=e.theme;return(0,redoc_lib_1.css)(templateObject_17||(templateObject_17=(0,tslib_1.__makeTemplateObject)(["\n ","\n "," {\n display: none;\n }\n "],["\n ","\n "," {\n display: none;\n }\n "])),(0,redoc_lib_1.mediaCSS)({display:(t={},t[redoc_lib_1.ZERO_BREAKPOINT]="none",t[n.rightPanel.showAtBreakpoint]="flex",t)}),n.mediaQueries.print)}));
2
2
  //# sourceMappingURL=styled.elements.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.jsonStyles=void 0;var templateObject_1,tslib_1=require("tslib"),styled_components_1=require("../../styled-components");exports.jsonStyles=(0,styled_components_1.css)(templateObject_1||(templateObject_1=(0,tslib_1.__makeTemplateObject)(["\n .redoc-json code > .collapser {\n display: none;\n pointer-events: none;\n }\n\n contain: content;\n overflow-x: auto;\n padding: 10px;\n\n ","\n\n .callback-function {\n color: gray;\n }\n\n .collapser:after {\n content: '-';\n cursor: pointer;\n }\n\n .collapsed > .collapser:after {\n content: '+';\n cursor: pointer;\n }\n\n .ellipsis:after {\n content: ' … ';\n }\n\n .collapsible {\n margin-left: 2em;\n }\n\n .hoverable {\n padding-top: 1px;\n padding-bottom: 1px;\n padding-left: 2px;\n padding-right: 2px;\n }\n\n .hovered {\n background-color: rgba(235, 238, 249, 1);\n }\n\n .collapser {\n background-color: transparent;\n border: 0;\n color: #fff;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 15px;\n height: 15px;\n position: absolute;\n top: 4px;\n left: -1.5em;\n cursor: default;\n user-select: none;\n -webkit-user-select: none;\n padding: 2px;\n ","\n &:focus {\n outline: #fff dotted 1px;\n }\n }\n\n ul {\n list-style-type: none;\n padding: 0px;\n margin: 0px 0px 0px 26px;\n }\n\n li {\n position: relative;\n display: block;\n }\n\n .hoverable {\n display: inline-block;\n }\n\n .selected {\n outline-width: 1px;\n outline-style: dotted;\n }\n\n .collapsed > .collapsible {\n display: none;\n }\n\n .ellipsis {\n display: none;\n }\n\n .collapsed > .ellipsis {\n display: inherit;\n }\n"],["\n .redoc-json code > .collapser {\n display: none;\n pointer-events: none;\n }\n\n contain: content;\n overflow-x: auto;\n padding: 10px;\n\n ","\n\n .callback-function {\n color: gray;\n }\n\n .collapser:after {\n content: '-';\n cursor: pointer;\n }\n\n .collapsed > .collapser:after {\n content: '+';\n cursor: pointer;\n }\n\n .ellipsis:after {\n content: ' … ';\n }\n\n .collapsible {\n margin-left: 2em;\n }\n\n .hoverable {\n padding-top: 1px;\n padding-bottom: 1px;\n padding-left: 2px;\n padding-right: 2px;\n }\n\n .hovered {\n background-color: rgba(235, 238, 249, 1);\n }\n\n .collapser {\n background-color: transparent;\n border: 0;\n color: #fff;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 15px;\n height: 15px;\n position: absolute;\n top: 4px;\n left: -1.5em;\n cursor: default;\n user-select: none;\n -webkit-user-select: none;\n padding: 2px;\n ","\n &:focus {\n outline: #fff dotted 1px;\n }\n }\n\n ul {\n list-style-type: none;\n padding: 0px;\n margin: 0px 0px 0px 26px;\n }\n\n li {\n position: relative;\n display: block;\n }\n\n .hoverable {\n display: inline-block;\n }\n\n .selected {\n outline-width: 1px;\n outline-style: dotted;\n }\n\n .collapsed > .collapsible {\n display: none;\n }\n\n .ellipsis {\n display: none;\n }\n\n .collapsed > .ellipsis {\n display: inherit;\n }\n"])),(function(n){var e=n.theme;return(0,styled_components_1.mediaCSS)({borderRadius:e.shape.borderRadius,backgroundColor:e.rightPanel.panelControlsBackgroundColor,color:e.colors.text.light,fontSize:e.typography.code.fontSize,fontFamily:e.typography.code.fontFamily,whiteSpace:e.typography.code.wrap?"pre-wrap":"pre"})}),(function(n){var e=n.theme;return(0,styled_components_1.mediaCSS)({fontFamily:e.typography.code.fontFamily,fontSize:e.typography.code.fontSize})}));
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.jsonStyles=void 0;var templateObject_1,tslib_1=require("tslib"),styled_components_1=require("../../styled-components");exports.jsonStyles=(0,styled_components_1.css)(templateObject_1||(templateObject_1=(0,tslib_1.__makeTemplateObject)(["\n .redoc-json code > .collapser {\n display: none;\n pointer-events: none;\n }\n\n contain: content;\n overflow-x: auto;\n padding: 10px;\n\n ","\n\n .callback-function {\n color: gray;\n }\n\n .collapser:after {\n content: '-';\n cursor: pointer;\n }\n\n .collapsed > .collapser:after {\n content: '+';\n cursor: pointer;\n }\n\n .ellipsis:after {\n content: ' … ';\n }\n\n .collapsible {\n margin-left: 2ch;\n }\n\n .hoverable {\n padding-top: 1px;\n padding-bottom: 1px;\n padding-left: 2px;\n padding-right: 2px;\n }\n\n .hovered {\n background-color: rgba(235, 238, 249, 1);\n }\n\n .collapser {\n background-color: transparent;\n border: 0;\n color: #fff;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 15px;\n height: 15px;\n position: absolute;\n top: 4px;\n left: -1.5em;\n cursor: default;\n user-select: none;\n -webkit-user-select: none;\n padding: 2px;\n ","\n &:focus {\n outline: #fff dotted 1px;\n }\n }\n\n ul {\n list-style-type: none;\n padding: 0px;\n margin: 0px 0px 0px 26px;\n }\n\n li {\n position: relative;\n display: block;\n }\n\n .hoverable {\n display: inline-block;\n }\n\n .selected {\n outline-width: 1px;\n outline-style: dotted;\n }\n\n .collapsed > .collapsible {\n display: none;\n }\n\n .ellipsis {\n display: none;\n }\n\n .collapsed > .ellipsis {\n display: inherit;\n }\n"],["\n .redoc-json code > .collapser {\n display: none;\n pointer-events: none;\n }\n\n contain: content;\n overflow-x: auto;\n padding: 10px;\n\n ","\n\n .callback-function {\n color: gray;\n }\n\n .collapser:after {\n content: '-';\n cursor: pointer;\n }\n\n .collapsed > .collapser:after {\n content: '+';\n cursor: pointer;\n }\n\n .ellipsis:after {\n content: ' … ';\n }\n\n .collapsible {\n margin-left: 2ch;\n }\n\n .hoverable {\n padding-top: 1px;\n padding-bottom: 1px;\n padding-left: 2px;\n padding-right: 2px;\n }\n\n .hovered {\n background-color: rgba(235, 238, 249, 1);\n }\n\n .collapser {\n background-color: transparent;\n border: 0;\n color: #fff;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 15px;\n height: 15px;\n position: absolute;\n top: 4px;\n left: -1.5em;\n cursor: default;\n user-select: none;\n -webkit-user-select: none;\n padding: 2px;\n ","\n &:focus {\n outline: #fff dotted 1px;\n }\n }\n\n ul {\n list-style-type: none;\n padding: 0px;\n margin: 0px 0px 0px 26px;\n }\n\n li {\n position: relative;\n display: block;\n }\n\n .hoverable {\n display: inline-block;\n }\n\n .selected {\n outline-width: 1px;\n outline-style: dotted;\n }\n\n .collapsed > .collapsible {\n display: none;\n }\n\n .ellipsis {\n display: none;\n }\n\n .collapsed > .ellipsis {\n display: inherit;\n }\n"])),(function(n){var e=n.theme;return(0,styled_components_1.mediaCSS)({borderRadius:e.shape.borderRadius,backgroundColor:e.rightPanel.panelControlsBackgroundColor,color:e.colors.text.light,fontSize:e.typography.code.fontSize,fontFamily:e.typography.code.fontFamily,whiteSpace:e.typography.code.wrap?"pre-wrap":"pre"})}),(function(n){var e=n.theme;return(0,styled_components_1.mediaCSS)({fontFamily:e.typography.code.fontFamily,fontSize:e.typography.code.fontSize})}));
2
2
  //# sourceMappingURL=style.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SchemaModel=void 0;var tslib_1=require("tslib"),mobx_1=require("mobx"),Field_1=require("./Field"),utils_1=require("../../utils/"),Labels_1=require("../Labels"),SchemaModel=function(){function e(e,i,t,r,n,a,s){void 0===n&&(n=!1),void 0===s&&(s={}),Object.defineProperty(this,"parser",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"parent",{enumerable:!0,configurable:!0,writable:!0,value:a}),Object.defineProperty(this,"deps",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(this,"pointer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"displayType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"typePrefix",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"title",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"description",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"externalDocs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"isPrimitive",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"isCircular",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"format",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"displayFormat",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"nullable",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"deprecated",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pattern",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"example",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"enum",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"default",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"writeOnly",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"constraints",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_fields",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"items",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"oneOf",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"oneOfType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"discriminatorProp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"activeOneOf",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"rawSchema",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"schema",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"extensions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"x-enumDescriptions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"const",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contentEncoding",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contentMediaType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"minItems",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"maxItems",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),(0,mobx_1.makeObservable)(this),this.pointer=i.$ref||t||"",this.rawSchema=e.deref(i,!1,!0),this.schema=e.mergeAllOf(this.rawSchema,this.pointer,n),this.init(e,n),e.exitParents(this.schema),r.showExtensions&&(this.extensions=(0,utils_1.extractExtensions)(this.schema,r.showExtensions))}return Object.defineProperty(e.prototype,"activateOneOf",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.activeOneOf=e}}),Object.defineProperty(e.prototype,"hasType",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.type===e||Array.isArray(this.type)&&this.type.includes(e)}}),Object.defineProperty(e.prototype,"fields",{get:function(){if(!this.isCircular)return!this._fields&&this.hasType("object")&&(this._fields=buildFields(this.parser,this.schema,this.pointer,this.options,this,this.deps)),this._fields},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasCircularParent",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var i=this;if(this.parent){if(e.some((function(e){var t,r;if(!e)return!1;var n=i.parent;return(null==n?void 0:n.pointer)===e||(!!(null===(r=null===(t=null==n?void 0:n.schema.parentRefs)||void 0===t?void 0:t.some)||void 0===r?void 0:r.call(t,(function(i){return i===e})))||void 0)})))return!0;if(this.parent.hasCircularParent(e))return!0}return!1}}),Object.defineProperty(e.prototype,"init",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){var r=this,n=this.schema;if(this.isCircular=n["x-circular-ref"]||this.hasCircularParent((0,tslib_1.__spreadArray)([this.pointer],this.schema.parentRefs||[],!0)),this.title=n.title||(0,utils_1.isNamedDefinition)(this.pointer)&&utils_1.JsonPointer.baseName(this.pointer)||"",this.description=n.description||"",this.type=n.type||(0,utils_1.detectType)(n),this.format=n.format,this.enum=n.enum||[],this["x-enumDescriptions"]=n["x-enumDescriptions"],this.example=n.example,this.deprecated=!!n.deprecated,this.pattern=n.pattern,this.externalDocs=n.externalDocs,this.constraints=(0,utils_1.humanizeConstraints)(n),this.displayFormat=this.format,this.isPrimitive=(0,utils_1.isPrimitiveType)(n,this.type),this.default=n.default,this.readOnly=!!n.readOnly,this.writeOnly=!!n.writeOnly,this.const=n.const||"",this.contentEncoding=n.contentEncoding,this.contentMediaType=n.contentMediaType,this.minItems=n.minItems,this.maxItems=n.maxItems,(n.nullable||n["x-nullable"])&&(Array.isArray(this.type)&&!this.type.some((function(e){return null===e||"null"===e}))?this.type=(0,tslib_1.__spreadArray)((0,tslib_1.__spreadArray)([],this.type,!0),["null"],!1):Array.isArray(this.type)||null===this.type&&"null"===this.type||(this.type=[this.type,"null"])),this.displayType=Array.isArray(this.type)?this.type.map((function(e){return null===e?"null":e})).join(" or "):this.type,!this.isCircular)if(t||void 0===getDiscriminator(n)){if(t&&Array.isArray(n.oneOf)&&n.oneOf.find((function(e){return e.$ref===r.pointer}))&&delete n.oneOf,void 0!==n.oneOf)return this.initOneOf(n.oneOf,i),this.oneOfType="One of",void(void 0!==n.anyOf&&console.warn("oneOf and anyOf are not supported on the same level. Skipping anyOf at "+this.pointer));if(void 0!==n.anyOf)return this.initOneOf(n.anyOf,i),void(this.oneOfType="Any of");if(this.hasType("array")&&n.items&&(this.items=new e(i,n.items,this.pointer+"/items",this.options,!1,this,this.deps),this.displayType=(0,utils_1.pluralizeType)(this.items.displayType),this.displayFormat=this.items.format,this.typePrefix=this.items.typePrefix+(0,Labels_1.l)("arrayOf"),this.title=this.title||this.items.title,this.isPrimitive=this.items.isPrimitive,void 0===this.example&&void 0!==this.items.example&&(this.example=[this.items.example]),this.items.isPrimitive&&(this.enum=this.items.enum,this["x-enumDescriptions"]=this.items["x-enumDescriptions"]),Array.isArray(this.type))){var a=this.type.filter((function(e){return"array"!==e}));a.length&&(this.displayType+=" or "+a.join(" or "))}this.enum.length&&this.options.sortEnumValuesAlphabetically&&this.enum.sort()}else this.initDiscriminator(n,i)}}),Object.defineProperty(e.prototype,"initOneOf",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){var r=this;if(this.oneOf=i.map((function(i,n){var a=t.deref(i,!1,!0),s=t.mergeAllOf(a,r.pointer+"/oneOf/"+n),l=(0,utils_1.isNamedDefinition)(i.$ref)&&!s.title?utils_1.JsonPointer.baseName(i.$ref):""+(s.title||"")+(s.const&&JSON.stringify(s.const)||""),o=new e(t,(0,tslib_1.__assign)((0,tslib_1.__assign)({},s),{title:l,allOf:[(0,tslib_1.__assign)((0,tslib_1.__assign)({},r.schema),{oneOf:void 0,anyOf:void 0})]}),r.pointer+"/oneOf/"+n,r.options,!1,r.parent,(0,tslib_1.__assign)((0,tslib_1.__assign)({},r.deps),{parentFieldFullPath:r.deps.parentFieldFullPath?r.deps.parentFieldFullPath+r.options.deepLinkSeparator+n:n.toString()}));return t.exitRef(i),t.exitParents(s),o})),this.options.simpleOneOfTypeLabel){var n=collectUniqueOneOfTypesDeep(this);this.displayType=n.join(" or ")}else this.displayType=this.oneOf.map((function(e){var i=e.typePrefix+(e.title?e.title+" ("+e.displayType+")":e.displayType);return i.indexOf(" or ")>-1&&(i="("+i+")"),i})).join(" or ")}}),Object.defineProperty(e.prototype,"initDiscriminator",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){var r=this,n=getDiscriminator(i);this.discriminatorProp=null==n?void 0:n.propertyName;var a=t.findDerived((0,tslib_1.__spreadArray)((0,tslib_1.__spreadArray)([],i.parentRefs||[],!0),[this.pointer],!1));if(i.oneOf)for(var s=0,l=i.oneOf;s<l.length;s++){var o=l[s];if(void 0!==o.$ref){var u=utils_1.JsonPointer.baseName(o.$ref);a[o.$ref]=u}}var p=(null==n?void 0:n.mapping)||{},b=(null==n?void 0:n["x-explicitMappingOnly"])||!1;0===Object.keys(p).length&&(b=!1);var d={};for(var f in p){var c=p[f];Array.isArray(d[c])?d[c].push(f):d[c]=[f]}for(var h=b?(0,tslib_1.__assign)({},d):(0,tslib_1.__assign)((0,tslib_1.__assign)({},a),d),m=[],y=0,v=Object.keys(h);y<v.length;y++){var O=h[c=v[y]];if(Array.isArray(O))for(var _=0,g=O;_<g.length;_++){var P=g[_];m.push({$ref:c,name:P})}else m.push({$ref:c,name:O})}var w=Object.keys(p);0!==w.length&&(m=m.sort((function(e,i){var t=w.indexOf(e.name),r=w.indexOf(i.name);return t<0&&r<0?e.name.localeCompare(i.name):t<0?1:r<0?-1:t-r}))),this.oneOf=m.map((function(i,n){var a=i.$ref,s=i.name,l=new e(t,t.byRef(a),a,r.options,!0,r.parent,(0,tslib_1.__assign)((0,tslib_1.__assign)({},r.deps),{parentFieldFullPath:r.deps.parentFieldFullPath?r.deps.parentFieldFullPath+r.options.deepLinkSeparator+n:n.toString()}));return l.title=s,l}))}}),(0,tslib_1.__decorate)([mobx_1.observable],e.prototype,"activeOneOf",void 0),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"activateOneOf",null),e}();function buildFields(e,i,t,r,n,a){var s=i.properties||{},l=i.additionalProperties,o=i.default||{},u=Object.keys(s||[]).map((function(l){var u=s[l];u||(console.warn('Field "'+l+'" is invalid, skipping.\n Field must be an object but got '+typeof u+' at "'+t+'"'),u={});var p=void 0!==i.required&&i.required.indexOf(l)>-1;return new Field_1.FieldModel(e,{name:l,required:p,schema:(0,tslib_1.__assign)((0,tslib_1.__assign)({},u),{default:void 0===u.default&&o?o[l]:u.default})},t+"/properties/"+l,r,n,a)}));return r.sortPropsAlphabetically&&(u=(0,utils_1.sortByField)(u,"name")),r.requiredPropsFirst&&(u=(0,utils_1.sortByRequired)(u,r.sortPropsAlphabetically?void 0:i.required)),"object"!=typeof l&&!0!==l||u.push(new Field_1.FieldModel(e,{name:("object"==typeof l&&l["x-additionalPropertiesName"]||"property name").concat("*"),required:!1,schema:!0===l?{}:l,kind:"additionalProperties"},t+"/additionalProperties",r,n,a)),u}function getDiscriminator(e){return e.discriminator||e["x-discriminator"]}function collectUniqueOneOfTypesDeep(e){var i=new Set;return function e(t){for(var r=0,n=t.oneOf||[];r<n.length;r++){var a=n[r];a.oneOf?e(a):a.type&&i.add(a.type)}}(e),Array.from(i.values())}exports.SchemaModel=SchemaModel;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SchemaModel=void 0;var tslib_1=require("tslib"),mobx_1=require("mobx"),Field_1=require("./Field"),utils_1=require("../../utils/"),Labels_1=require("../Labels"),SchemaModel=function(){function e(e,i,t,r,n,a,s){void 0===n&&(n=!1),void 0===s&&(s={}),Object.defineProperty(this,"parser",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"parent",{enumerable:!0,configurable:!0,writable:!0,value:a}),Object.defineProperty(this,"deps",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(this,"pointer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"displayType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"typePrefix",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"title",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"description",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"externalDocs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"isPrimitive",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"isCircular",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"format",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"displayFormat",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"nullable",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"deprecated",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pattern",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"example",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"enum",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"default",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"writeOnly",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"constraints",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_fields",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"items",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"oneOf",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"oneOfType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"discriminatorProp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"activeOneOf",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"rawSchema",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"schema",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"extensions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"x-enumDescriptions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"const",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contentEncoding",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contentMediaType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"minItems",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"maxItems",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),(0,mobx_1.makeObservable)(this),this.pointer=i.$ref||t||"",this.rawSchema=e.deref(i,!1,!0),this.schema=e.mergeAllOf(this.rawSchema,this.pointer,n),this.init(e,n),e.exitRef(i),e.exitParents(this.schema),r.showExtensions&&(this.extensions=(0,utils_1.extractExtensions)(this.schema,r.showExtensions))}return Object.defineProperty(e.prototype,"activateOneOf",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.activeOneOf=e}}),Object.defineProperty(e.prototype,"hasType",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.type===e||Array.isArray(this.type)&&this.type.includes(e)}}),Object.defineProperty(e.prototype,"fields",{get:function(){if(!this.isCircular)return!this._fields&&this.hasType("object")&&(this._fields=buildFields(this.parser,this.schema,this.pointer,this.options,this,this.deps)),this._fields},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasCircularParent",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var i=this;if(this.parent){if(e.some((function(e){var t,r;if(!e)return!1;var n=i.parent;return(null==n?void 0:n.pointer)===e||(!!(null===(r=null===(t=null==n?void 0:n.schema.parentRefs)||void 0===t?void 0:t.some)||void 0===r?void 0:r.call(t,(function(i){return i===e})))||void 0)})))return!0;if(this.parent.hasCircularParent(e))return!0}return!1}}),Object.defineProperty(e.prototype,"init",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){var r=this,n=this.schema;if(this.isCircular=n["x-circular-ref"]||this.hasCircularParent((0,tslib_1.__spreadArray)([this.pointer],this.schema.parentRefs||[],!0)),this.title=n.title||(0,utils_1.isNamedDefinition)(this.pointer)&&utils_1.JsonPointer.baseName(this.pointer)||"",this.description=n.description||"",this.type=n.type||(0,utils_1.detectType)(n),this.format=n.format,this.enum=n.enum||[],this["x-enumDescriptions"]=n["x-enumDescriptions"],this.example=n.example,this.deprecated=!!n.deprecated,this.pattern=n.pattern,this.externalDocs=n.externalDocs,this.constraints=(0,utils_1.humanizeConstraints)(n),this.displayFormat=this.format,this.isPrimitive=(0,utils_1.isPrimitiveType)(n,this.type),this.default=n.default,this.readOnly=!!n.readOnly,this.writeOnly=!!n.writeOnly,this.const=n.const||"",this.contentEncoding=n.contentEncoding,this.contentMediaType=n.contentMediaType,this.minItems=n.minItems,this.maxItems=n.maxItems,(n.nullable||n["x-nullable"])&&(Array.isArray(this.type)&&!this.type.some((function(e){return null===e||"null"===e}))?this.type=(0,tslib_1.__spreadArray)((0,tslib_1.__spreadArray)([],this.type,!0),["null"],!1):Array.isArray(this.type)||null===this.type&&"null"===this.type||(this.type=[this.type,"null"])),this.displayType=Array.isArray(this.type)?this.type.map((function(e){return null===e?"null":e})).join(" or "):this.type,!this.isCircular)if(t||void 0===getDiscriminator(n)){if(t&&Array.isArray(n.oneOf)&&n.oneOf.find((function(e){return e.$ref===r.pointer}))&&delete n.oneOf,void 0!==n.oneOf)return this.initOneOf(n.oneOf,i),this.oneOfType="One of",void(void 0!==n.anyOf&&console.warn("oneOf and anyOf are not supported on the same level. Skipping anyOf at "+this.pointer));if(void 0!==n.anyOf)return this.initOneOf(n.anyOf,i),void(this.oneOfType="Any of");if(this.hasType("array")&&n.items&&(this.items=new e(i,n.items,this.pointer+"/items",this.options,!1,this,this.deps),this.displayType=(0,utils_1.pluralizeType)(this.items.displayType),this.displayFormat=this.items.format,this.typePrefix=this.items.typePrefix+(0,Labels_1.l)("arrayOf"),this.title=this.title||this.items.title,this.isPrimitive=this.items.isPrimitive,void 0===this.example&&void 0!==this.items.example&&(this.example=[this.items.example]),this.items.isPrimitive&&(this.enum=this.items.enum,this["x-enumDescriptions"]=this.items["x-enumDescriptions"]),Array.isArray(this.type))){var a=this.type.filter((function(e){return"array"!==e}));a.length&&(this.displayType+=" or "+a.join(" or "))}this.enum.length&&this.options.sortEnumValuesAlphabetically&&this.enum.sort()}else this.initDiscriminator(n,i)}}),Object.defineProperty(e.prototype,"initOneOf",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){var r=this;if(this.oneOf=i.map((function(i,n){var a=t.deref(i,!1,!0),s=t.mergeAllOf(a,r.pointer+"/oneOf/"+n),l=(0,utils_1.isNamedDefinition)(i.$ref)&&!s.title?utils_1.JsonPointer.baseName(i.$ref):""+(s.title||"")+(s.const&&JSON.stringify(s.const)||""),o=new e(t,(0,tslib_1.__assign)((0,tslib_1.__assign)({},s),{title:l,allOf:[(0,tslib_1.__assign)((0,tslib_1.__assign)({},r.schema),{oneOf:void 0,anyOf:void 0})]}),r.pointer+"/oneOf/"+n,r.options,!1,r.parent,(0,tslib_1.__assign)((0,tslib_1.__assign)({},r.deps),{parentFieldFullPath:r.deps.parentFieldFullPath?r.deps.parentFieldFullPath+r.options.deepLinkSeparator+n:n.toString()}));return t.exitRef(i),t.exitParents(s),o})),this.options.simpleOneOfTypeLabel){var n=collectUniqueOneOfTypesDeep(this);this.displayType=n.join(" or ")}else this.displayType=this.oneOf.map((function(e){var i=e.typePrefix+(e.title?e.title+" ("+e.displayType+")":e.displayType);return i.indexOf(" or ")>-1&&(i="("+i+")"),i})).join(" or ")}}),Object.defineProperty(e.prototype,"initDiscriminator",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){var r=this,n=getDiscriminator(i);this.discriminatorProp=null==n?void 0:n.propertyName;var a=t.findDerived((0,tslib_1.__spreadArray)((0,tslib_1.__spreadArray)([],i.parentRefs||[],!0),[this.pointer],!1));if(i.oneOf)for(var s=0,l=i.oneOf;s<l.length;s++){var o=l[s];if(void 0!==o.$ref){var u=utils_1.JsonPointer.baseName(o.$ref);a[o.$ref]=u}}var p=(null==n?void 0:n.mapping)||{},b=(null==n?void 0:n["x-explicitMappingOnly"])||!1;0===Object.keys(p).length&&(b=!1);var f={};for(var d in p){var c=p[d];Array.isArray(f[c])?f[c].push(d):f[c]=[d]}for(var h=b?(0,tslib_1.__assign)({},f):(0,tslib_1.__assign)((0,tslib_1.__assign)({},a),f),m=[],y=0,v=Object.keys(h);y<v.length;y++){var O=h[c=v[y]];if(Array.isArray(O))for(var _=0,g=O;_<g.length;_++){var P=g[_];m.push({$ref:c,name:P})}else m.push({$ref:c,name:O})}var w=Object.keys(p);0!==w.length&&(m=m.sort((function(e,i){var t=w.indexOf(e.name),r=w.indexOf(i.name);return t<0&&r<0?e.name.localeCompare(i.name):t<0?1:r<0?-1:t-r}))),this.oneOf=m.map((function(i,n){var a=i.$ref,s=i.name,l=new e(t,t.byRef(a),a,r.options,!0,r.parent,(0,tslib_1.__assign)((0,tslib_1.__assign)({},r.deps),{parentFieldFullPath:r.deps.parentFieldFullPath?r.deps.parentFieldFullPath+r.options.deepLinkSeparator+n:n.toString()}));return l.title=s,l}))}}),(0,tslib_1.__decorate)([mobx_1.observable],e.prototype,"activeOneOf",void 0),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"activateOneOf",null),e}();function buildFields(e,i,t,r,n,a){var s=i.properties||{},l=i.additionalProperties,o=i.default||{},u=Object.keys(s||[]).map((function(l){var u=s[l];u||(console.warn('Field "'+l+'" is invalid, skipping.\n Field must be an object but got '+typeof u+' at "'+t+'"'),u={});var p=void 0!==i.required&&i.required.indexOf(l)>-1;return new Field_1.FieldModel(e,{name:l,required:p,schema:(0,tslib_1.__assign)((0,tslib_1.__assign)({},u),{default:void 0===u.default&&o?o[l]:u.default})},t+"/properties/"+l,r,n,a)}));return r.sortPropsAlphabetically&&(u=(0,utils_1.sortByField)(u,"name")),r.requiredPropsFirst&&(u=(0,utils_1.sortByRequired)(u,r.sortPropsAlphabetically?void 0:i.required)),"object"!=typeof l&&!0!==l||u.push(new Field_1.FieldModel(e,{name:("object"==typeof l&&l["x-additionalPropertiesName"]||"property name").concat("*"),required:!1,schema:!0===l?{}:l,kind:"additionalProperties"},t+"/additionalProperties",r,n,a)),u}function getDiscriminator(e){return e.discriminator||e["x-discriminator"]}function collectUniqueOneOfTypesDeep(e){var i=new Set;return function e(t){for(var r=0,n=t.oneOf||[];r<n.length;r++){var a=n[r];a.oneOf?e(a):a.type&&i.add(a.type)}}(e),Array.from(i.values())}exports.SchemaModel=SchemaModel;
2
2
  //# sourceMappingURL=Schema.js.map
@@ -174,6 +174,8 @@ export interface ResolvedThemeInterface {
174
174
  };
175
175
  layoutControls: {
176
176
  top: string;
177
+ width: string;
178
+ height: string;
177
179
  };
178
180
  httpBadges: {
179
181
  borderRadius: string;
@@ -1,2 +1,2 @@
1
- "use strict";var _a,_b;Object.defineProperty(exports,"__esModule",{value:!0}),exports.resolveTheme=void 0;var polished_1=require("polished"),media_css_1=require("./utils/media-css"),defaultTheme={spacing:{unit:5,sectionHorizontal:function(r){return 8*r.spacing.unit},sectionVertical:function(r){return 4*r.spacing.unit}},breakpoints:{small:"50rem",medium:"85rem",large:"105rem"},colors:{tonalOffset:.2,primary:{main:"#0065FB",light:function(r){var o=r.colors;return(0,polished_1.lighten)(o.tonalOffset,o.primary.main)},dark:function(r){var o=r.colors;return(0,polished_1.darken)(o.tonalOffset,o.primary.main)},contrastText:function(r){var o=r.colors;return(0,polished_1.readableColor)(o.primary.main)}},secondary:{main:"#E4E7EB",light:"#F5F7FA",dark:"#E4E7EB",contrastText:"#3E4C59"},accent:{main:"#59C3FF",light:"#b3dcf3",dark:"#033B73",contrastText:"#ffffff"},success:{main:"#41DE50",light:function(r){var o=r.colors;return(0,polished_1.lighten)(2*o.tonalOffset,o.success.main)},dark:function(r){var o=r.colors;return(0,polished_1.darken)(o.tonalOffset,o.success.main)},contrastText:function(r){var o=r.colors;return(0,polished_1.readableColor)(o.success.main)}},warning:{main:"#ffa500",light:function(r){var o=r.colors;return(0,polished_1.lighten)(o.tonalOffset,o.warning.main)},dark:function(r){var o=r.colors;return(0,polished_1.darken)(o.tonalOffset,o.warning.main)},contrastText:"#ffffff"},error:{main:"#FF6161",light:function(r){var o=r.colors;return(0,polished_1.lighten)(o.tonalOffset,o.error.main)},dark:function(r){var o=r.colors;return(0,polished_1.darken)(o.tonalOffset,o.error.main)},contrastText:"#ffffff"},text:{primary:"#1F2933",secondary:"#7b8794",light:"#F5F7FA"},border:{dark:"#616E7C",light:"#E4E7EB"},responses:{success:{borderColor:"#B1E996",backgroundColor:"#F6FFF4",tabTextColor:function(r){return r.colors.responses.success.borderColor}},error:{borderColor:"#FFC9C9",backgroundColor:"#FFF4F4",tabTextColor:function(r){return r.colors.responses.error.borderColor}},redirect:{borderColor:function(r){return r.colors.warning.main},backgroundColor:function(r){var o=r.colors;return(0,polished_1.transparentize)(.9,o.responses.redirect.borderColor)},tabTextColor:function(r){return r.colors.responses.redirect.borderColor}},info:{borderColor:"#87ceeb",backgroundColor:function(r){var o=r.colors;return(0,polished_1.transparentize)(.9,o.responses.info.borderColor)},tabTextColor:function(r){return r.colors.responses.info.borderColor}}},http:{get:"#3A9601",post:"#0065FB",put:"#93527B",options:"#947014",patch:"#bf581d",delete:"#C83637",basic:"#707070",link:"#07818F",head:"#A23DAD"}},schema:{linesColor:function(r){return r.colors.border.light},defaultDetailsWidth:"70%",typeNameColor:function(r){return r.colors.text.secondary},typeTitleColor:function(r){return r.schema.typeNameColor},requireLabelColor:"#FF0000",labelsTextSize:"0.9em",nestingSpacing:"1em",nestedBackground:function(r){return r.colors.secondary.light},caretColor:function(r){return r.colors.text.primary},caretSize:"9px"},typography:{fontSize:"14px",lineHeight:"1.5em",fontWeightRegular:"400",fontWeightBold:"600",fontWeightLight:"300",fontFamily:"Source Sans Pro, sans-serif",smoothing:"antialiased",optimizeSpeed:!0,headings:{fontFamily:function(r){return r.typography.fontFamily},fontWeight:"700",lineHeight:"1.6em"},code:{fontSize:"13px",fontFamily:"Source Code Pro, monospace",lineHeight:function(r){return r.typography.lineHeight},fontWeight:function(r){return r.typography.fontWeightRegular},color:"#e53935",backgroundColor:"rgba(38, 50, 56, 0.05)",wrap:!1},links:{color:function(r){return r.colors.primary.main},visited:function(r){return r.typography.links.color},hover:function(r){var o=r.typography;return(0,polished_1.lighten)(.2,o.links.color)},textDecoration:"auto"},fieldName:{fontSize:function(r){return r.typography.code.fontSize},fontFamily:function(r){return r.typography.code.fontFamily},fontWeight:function(r){return r.typography.code.fontWeight}}},sidebar:{separatorLabelColor:function(r){return r.sidebar.textColor},separatorLineColor:"#DADADA",caretColor:function(r){return r.sidebar.textColor},caretSize:function(r){return r.sidebar.spacing.unit},spacing:{unit:8,paddingHorizontal:function(r){return r.sidebar.spacing.unit},paddingVertical:function(r){return r.sidebar.spacing.unit},offsetTop:function(r){return 2*r.sidebar.spacing.unit},offsetLeft:function(r){return 2*r.sidebar.spacing.unit},offsetNesting:function(r){return 2*r.sidebar.spacing.unit}},borderRadius:"4px",fontFamily:function(r){return r.typography.fontFamily},fontSize:function(r){return r.typography.fontSize},showAtBreakpoint:"small",width:"285px",backgroundColor:"#fff",rightLineColor:function(r){return r.colors.border.light},textColor:function(r){return r.colors.text.primary},activeTextColor:function(r){return r.sidebar.textColor},activeBgColor:function(r){return r.colors.border.light}},components:{buttons:{borderRadius:function(r){return r.shape.borderRadius},hoverStyle:"",fontWeight:function(r){return r.typography.fontWeightBold},boxShadow:"none",hoverBoxShadow:"0px 0px 12px 0px rgba(0, 0, 0, 0.1)",fontFamily:"inherit",sizes:{small:{fontSize:"12px",padding:"8px 10px",minWidth:"90px"},medium:{fontSize:"14px",padding:"8px 20px",minWidth:"120px"},large:{fontSize:"14px",padding:"12px 24px",minWidth:"150px"},xlarge:{fontSize:"16px",padding:"20px 24px",minWidth:"200px"}}},httpBadges:{borderRadius:"16px",fontFamily:function(r){return r.typography.code.fontFamily},fontWeight:function(r){return r.typography.fontWeightBold},color:function(r){return r.colors.text.light},sizes:{medium:{fontSize:"12px",lineHeight:"20px"},small:{fontSize:"8px",lineHeight:"15px"}}},tryItButton:{fullWidth:!1},tryItSendButton:{fullWidth:!1},panels:{borderRadius:"8px"},layoutControls:{top:"20px"}},logo:{maxHeight:function(r){return r.sidebar.width},maxWidth:function(r){return r.sidebar.width},gutter:"2px"},rightPanel:{showAtBreakpoint:"medium",backgroundColor:"#1F2933",panelBackgroundColor:"#52606D",panelControlsBackgroundColor:"#323F4B",width:"37.5%",textColor:"#ffffff"},codeBlock:{backgroundColor:function(r){return r.rightPanel.panelControlsBackgroundColor}},shape:{borderRadius:"4px"},layout:{stacked:{maxWidth:(_a={},_a[media_css_1.ZERO_BREAKPOINT]="",_a.small="90%",_a.medium="75%",_a.large="1200px",_a)},"three-panel":{middlePanelMaxWidth:"none",maxWidth:(_b={},_b[media_css_1.ZERO_BREAKPOINT]="100%",_b.small="100%",_b.medium="100%",_b.large="1800px",_b)}}};function resolveTheme(r){var o={},e=0,t=function(n,i){Object.keys(n).forEach((function(a){var l=(i?i+".":"")+a,s=n[a];"function"==typeof s?Object.defineProperty(n,a,{get:function(){if(!o[l]){if(++e>1e3)throw new Error("Theme probably contains circular dependency at "+l+": "+s.toString());o[l]=s(r)}return o[l]},enumerable:!0}):"object"==typeof s&&t(s,l)}))};return t(r,""),JSON.parse(JSON.stringify(r))}exports.default=defaultTheme,exports.resolveTheme=resolveTheme;
1
+ "use strict";var _a,_b;Object.defineProperty(exports,"__esModule",{value:!0}),exports.resolveTheme=void 0;var polished_1=require("polished"),media_css_1=require("./utils/media-css"),defaultTheme={spacing:{unit:5,sectionHorizontal:function(r){return 8*r.spacing.unit},sectionVertical:function(r){return 4*r.spacing.unit}},breakpoints:{small:"50rem",medium:"85rem",large:"105rem"},colors:{tonalOffset:.2,primary:{main:"#0065FB",light:function(r){var o=r.colors;return(0,polished_1.lighten)(o.tonalOffset,o.primary.main)},dark:function(r){var o=r.colors;return(0,polished_1.darken)(o.tonalOffset,o.primary.main)},contrastText:function(r){var o=r.colors;return(0,polished_1.readableColor)(o.primary.main)}},secondary:{main:"#E4E7EB",light:"#F5F7FA",dark:"#E4E7EB",contrastText:"#3E4C59"},accent:{main:"#59C3FF",light:"#b3dcf3",dark:"#033B73",contrastText:"#ffffff"},success:{main:"#41DE50",light:function(r){var o=r.colors;return(0,polished_1.lighten)(2*o.tonalOffset,o.success.main)},dark:function(r){var o=r.colors;return(0,polished_1.darken)(o.tonalOffset,o.success.main)},contrastText:function(r){var o=r.colors;return(0,polished_1.readableColor)(o.success.main)}},warning:{main:"#ffa500",light:function(r){var o=r.colors;return(0,polished_1.lighten)(o.tonalOffset,o.warning.main)},dark:function(r){var o=r.colors;return(0,polished_1.darken)(o.tonalOffset,o.warning.main)},contrastText:"#ffffff"},error:{main:"#FF6161",light:function(r){var o=r.colors;return(0,polished_1.lighten)(o.tonalOffset,o.error.main)},dark:function(r){var o=r.colors;return(0,polished_1.darken)(o.tonalOffset,o.error.main)},contrastText:"#ffffff"},text:{primary:"#1F2933",secondary:"#7b8794",light:"#F5F7FA"},border:{dark:"#616E7C",light:"#E4E7EB"},responses:{success:{borderColor:"#B1E996",backgroundColor:"#F6FFF4",tabTextColor:function(r){return r.colors.responses.success.borderColor}},error:{borderColor:"#FFC9C9",backgroundColor:"#FFF4F4",tabTextColor:function(r){return r.colors.responses.error.borderColor}},redirect:{borderColor:function(r){return r.colors.warning.main},backgroundColor:function(r){var o=r.colors;return(0,polished_1.transparentize)(.9,o.responses.redirect.borderColor)},tabTextColor:function(r){return r.colors.responses.redirect.borderColor}},info:{borderColor:"#87ceeb",backgroundColor:function(r){var o=r.colors;return(0,polished_1.transparentize)(.9,o.responses.info.borderColor)},tabTextColor:function(r){return r.colors.responses.info.borderColor}}},http:{get:"#3A9601",post:"#0065FB",put:"#93527B",options:"#947014",patch:"#bf581d",delete:"#C83637",basic:"#707070",link:"#07818F",head:"#A23DAD"}},schema:{linesColor:function(r){return r.colors.border.light},defaultDetailsWidth:"70%",typeNameColor:function(r){return r.colors.text.secondary},typeTitleColor:function(r){return r.schema.typeNameColor},requireLabelColor:"#FF0000",labelsTextSize:"0.9em",nestingSpacing:"1em",nestedBackground:function(r){return r.colors.secondary.light},caretColor:function(r){return r.colors.text.primary},caretSize:"9px"},typography:{fontSize:"14px",lineHeight:"1.5em",fontWeightRegular:"400",fontWeightBold:"600",fontWeightLight:"300",fontFamily:"Source Sans Pro, sans-serif",smoothing:"antialiased",optimizeSpeed:!0,headings:{fontFamily:function(r){return r.typography.fontFamily},fontWeight:"700",lineHeight:"1.6em"},code:{fontSize:"13px",fontFamily:"Source Code Pro, monospace",lineHeight:function(r){return r.typography.lineHeight},fontWeight:function(r){return r.typography.fontWeightRegular},color:"#e53935",backgroundColor:"rgba(38, 50, 56, 0.05)",wrap:!1},links:{color:function(r){return r.colors.primary.main},visited:function(r){return r.typography.links.color},hover:function(r){var o=r.typography;return(0,polished_1.lighten)(.2,o.links.color)},textDecoration:"auto"},fieldName:{fontSize:function(r){return r.typography.code.fontSize},fontFamily:function(r){return r.typography.code.fontFamily},fontWeight:function(r){return r.typography.code.fontWeight}}},sidebar:{separatorLabelColor:function(r){return r.sidebar.textColor},separatorLineColor:"#DADADA",caretColor:function(r){return r.sidebar.textColor},caretSize:function(r){return r.sidebar.spacing.unit},spacing:{unit:8,paddingHorizontal:function(r){return r.sidebar.spacing.unit},paddingVertical:function(r){return r.sidebar.spacing.unit},offsetTop:function(r){return 2*r.sidebar.spacing.unit},offsetLeft:function(r){return 2*r.sidebar.spacing.unit},offsetNesting:function(r){return 2*r.sidebar.spacing.unit}},borderRadius:"4px",fontFamily:function(r){return r.typography.fontFamily},fontSize:function(r){return r.typography.fontSize},showAtBreakpoint:"small",width:"285px",backgroundColor:"#fff",rightLineColor:function(r){return r.colors.border.light},textColor:function(r){return r.colors.text.primary},activeTextColor:function(r){return r.sidebar.textColor},activeBgColor:function(r){return r.colors.border.light}},components:{buttons:{borderRadius:function(r){return r.shape.borderRadius},hoverStyle:"",fontWeight:function(r){return r.typography.fontWeightBold},boxShadow:"none",hoverBoxShadow:"0px 0px 12px 0px rgba(0, 0, 0, 0.1)",fontFamily:"inherit",sizes:{small:{fontSize:"12px",padding:"8px 10px",minWidth:"90px"},medium:{fontSize:"14px",padding:"8px 20px",minWidth:"120px"},large:{fontSize:"14px",padding:"12px 24px",minWidth:"150px"},xlarge:{fontSize:"16px",padding:"20px 24px",minWidth:"200px"}}},httpBadges:{borderRadius:"16px",fontFamily:function(r){return r.typography.code.fontFamily},fontWeight:function(r){return r.typography.fontWeightBold},color:function(r){return r.colors.text.light},sizes:{medium:{fontSize:"12px",lineHeight:"20px"},small:{fontSize:"8px",lineHeight:"15px"}}},tryItButton:{fullWidth:!1},tryItSendButton:{fullWidth:!1},panels:{borderRadius:"8px"},layoutControls:{top:"20px",width:"36px",height:"36px"}},logo:{maxHeight:function(r){return r.sidebar.width},maxWidth:function(r){return r.sidebar.width},gutter:"2px"},rightPanel:{showAtBreakpoint:"medium",backgroundColor:"#1F2933",panelBackgroundColor:"#52606D",panelControlsBackgroundColor:"#323F4B",width:"37.5%",textColor:"#ffffff"},codeBlock:{backgroundColor:function(r){return r.rightPanel.panelControlsBackgroundColor}},shape:{borderRadius:"4px"},layout:{showDarkRightPanel:!0,stacked:{maxWidth:(_a={},_a[media_css_1.ZERO_BREAKPOINT]="",_a.small="90%",_a.medium="75%",_a.large="1200px",_a)},"three-panel":{middlePanelMaxWidth:"none",maxWidth:(_b={},_b[media_css_1.ZERO_BREAKPOINT]="100%",_b.small="100%",_b.medium="100%",_b.large="1800px",_b)}}};function resolveTheme(r){var o={},e=0,t=function(n,i){Object.keys(n).forEach((function(a){var l=(i?i+".":"")+a,s=n[a];"function"==typeof s?Object.defineProperty(n,a,{get:function(){if(!o[l]){if(++e>1e3)throw new Error("Theme probably contains circular dependency at "+l+": "+s.toString());o[l]=s(r)}return o[l]},enumerable:!0}):"object"==typeof s&&t(s,l)}))};return t(r,""),JSON.parse(JSON.stringify(r))}exports.default=defaultTheme,exports.resolveTheme=resolveTheme;
2
2
  //# sourceMappingURL=theme.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ProMenu=void 0;var tslib_1=require("tslib"),redoc_lib_1=require("../redoc-lib"),mobx_1=require("mobx"),VersionedSpecStore_1=require("./VersionedSpecStore"),constants_1=require("../redoc-lib/src/services/constants"),HistoryService_1=require("../redoc-lib/src/services/HistoryService"),ProMenu=function(){function e(e,t,i,r){var n=this;Object.defineProperty(this,"definition",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"scroll",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"history",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"flatItems",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"items",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"activeRenderItemIdx",{enumerable:!0,configurable:!0,writable:!0,value:-1}),Object.defineProperty(this,"renderItems",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"activeItemIdx",{enumerable:!0,configurable:!0,writable:!0,value:-1}),Object.defineProperty(this,"sideBarOpened",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_unsubscribe",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_hashUnsubscribe",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"getItemById",{enumerable:!0,configurable:!0,writable:!0,value:function(e){return n.flatItems.find((function(t){return t.id===e}))}}),Object.defineProperty(this,"initOnHistory",{enumerable:!0,configurable:!0,writable:!0,value:function(e){void 0===e&&(e=n.history.currentId);var t,i=e.split(n.options.deepLinkPrefix)[0];i&&((t=n.flatItems.find((function(e){return e.id===i})))?(n.activate(t,!1,!1,!1,e),t.active=!1):i.startsWith(redoc_lib_1.SECURITY_SCHEMES_SECTION_PREFIX)&&(t=n.flatItems.find((function(e){return redoc_lib_1.SECURITY_SCHEMES_SECTION_PREFIX.startsWith(e.id)})),n.activate(t,!1,!1,!1,e),t&&(t.active=!1)))}}),Object.defineProperty(this,"updateOnHistory",{enumerable:!0,configurable:!0,writable:!0,value:function(e){void 0===e&&(e=n.history.currentId);var t,i=e.split(n.options.deepLinkPrefix)[0];if(i)if(t=n.flatItems.find((function(e){return e.id===i})))n.activateAndScroll(t,!1,void 0,e);else{var r=(n.history.basePath?n.history.basePath+"/":"")+redoc_lib_1.SECURITY_SCHEMES_SECTION_PREFIX;i.startsWith(r)&&(t=n.flatItems.find((function(e){return redoc_lib_1.SECURITY_SCHEMES_SECTION_PREFIX.startsWith(e.id)})),n.activate(t)),n.scroll.prevOffsetY=0,n.scroll.scrollIntoViewBySelector("["+constants_1.SECTION_ATTR+'="'+i+'"]')}}}),Object.defineProperty(this,"updateVersionOnHistory",{enumerable:!0,configurable:!0,writable:!0,value:function(e){var t=e.split("/")[0],i=n.definition.versionsInfo.findIndex((function(e){return e.id===t}));i<0&&(i=n.definition.versionsInfo.findIndex((function(e){return e.isDefault}))),n.definition.activeVersionIdx!==i&&(n.definition.changeVersion(i<0?0:i),n.updateItemsByVersionChange(!1,e));var r=t+"/"+redoc_lib_1.SECURITY_SCHEMES_SECTION_PREFIX;if(e.startsWith(r)){var o=n.flatItems.find((function(e){return r.startsWith(e.id)}));n.activate(o,!1,!0),setTimeout((function(){return n.scroll.scrollIntoViewBySelector("["+constants_1.SECTION_ATTR+'="'+e+'"]')}),0)}}}),Object.defineProperty(this,"updateOnScroll",{enumerable:!0,configurable:!0,writable:!0,value:function(e){for(var t=e?1:-1,i=n.activeItemIdx;(-1!==i||e)&&!(i>=n.flatItems.length-1&&e);){if(e){var r=!1,o=n.flatItems[i+1];switch(n.options.pagination){case"section":r=o&&("spec"===o.type||"group"===o.type||"tag"===o.type);break;case"item":r="section"!==(null==o?void 0:o.type)}var a=n.getElementAt(i+1);if(-1===i&&"tag"===n.flatItems[0].type&&(r=!1),n.scroll.isElementBellow(a)||r)break}else{var s=n.flatItems[i]&&n.flatItems[i].type;r="section"===n.options.pagination&&("spec"===s||"group"===s||"tag"===s)||"item"===n.options.pagination&&"section"!==s,a=n.getElementAt(i);if(n.scroll.isElementAbove(a)||r)break}i+=t}var l=n.flatItems[i];"none"===n.options.pagination||"section"===n.options.pagination?l&&l.active||n.activate(l,!0,!0,!1):l&&"section"===l.type&&(l.active||n.activate(l,!0,!0,!1))}}),(0,mobx_1.makeObservable)(this),this.items=e.contentItems,this.flatItems=(0,redoc_lib_1.flattenByProp)(this.items||[],"items"),this.flatItems.forEach((function(e,t){return e.absoluteIdx=t})),i.disableSidebar||this.subscribe(),this.flatItems.forEach((function(e,t){return normalizeItem(e,t,i.pagination,n.definition instanceof VersionedSpecStore_1.VersionedSpecStore,n.history)})),this.renderItems=this.buildRenderItems(0),this.activeItemIdx=-1,this.activeRenderItemIdx=-1,this.definition instanceof VersionedSpecStore_1.VersionedSpecStore&&this.history.subscribe(this.updateVersionOnHistory)}return Object.defineProperty(e,"updateOnHistory",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){void 0===e&&(e=HistoryService_1.history.currentId),e&&t.scrollIntoViewBySelector("["+constants_1.SECTION_ATTR+'="'+e+'"]')}}),Object.defineProperty(e.prototype,"subscribe",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._unsubscribe=this.scroll.subscribe(this.updateOnScroll),this._hashUnsubscribe=this.history.subscribe(this.updateOnHistory)}}),Object.defineProperty(e.prototype,"toggleSidebar",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sideBarOpened=!this.sideBarOpened}}),Object.defineProperty(e.prototype,"closeSidebar",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sideBarOpened=!1}}),Object.defineProperty(e.prototype,"getElementAt",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.flatItems[e];return t&&(0,redoc_lib_1.querySelector)("["+constants_1.SECTION_ATTR+'="'+t.id+'"]')||null}}),Object.defineProperty(e.prototype,"getElementAtOrFirstChild",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.flatItems[e];return t&&"group"===t.type&&(t=t.items[0]),t&&(0,redoc_lib_1.querySelector)("["+constants_1.SECTION_ATTR+'="'+t.id+'"]')||null}}),Object.defineProperty(e.prototype,"activeItem",{get:function(){return this.flatItems[this.activeItemIdx]||void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"updateItemsByVersionChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var i=this,r=this.activeItem&&this.activeItem.active?this.activeItem.absoluteIdx:-1;t=t&&withoutVersion(t)||this.activeItem&&this.activeItem.active&&withoutVersion(this.activeItem.id)||"",this.deactivate(this.activeItem),this.items=this.definition.contentItems,this.flatItems=(0,redoc_lib_1.flattenByProp)(this.items||[],"items"),this.flatItems.forEach((function(e,t){return normalizeItem(e,t,i.options.pagination,i.definition instanceof VersionedSpecStore_1.VersionedSpecStore,i.history)}));var n=t?(this.flatItems.find((function(e){return withoutVersion(e.id)===t}))||{absoluteIdx:-1}).absoluteIdx:-1;if(-1!==n&&"none"!==this.options.pagination||(this.renderItems=this.buildRenderItems(0)),this.activeItemIdx=-1,-1!==n)this.activate(this.flatItems[n],e);else if(-1!==r)this.activateAndScroll(this.flatItems[0],e);else if(e){var o=this.definition.versionsInfo[this.definition.activeVersionIdx];if(!this.history.currentId&&o.isDefault)return;this.history.replace(o.id)}}}),Object.defineProperty(e.prototype,"buildRenderItems",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if("none"===this.options.pagination)return this.items;var t=this.flatItems[e];if(t||(t=this.flatItems[0]),"spec"===t.type)return this.buildRenderItems(e+1);if("section"===t.type){var i=[],r=getParentOfType(t,"tag");if("section"===this.options.pagination&&r)return[r];if("item"===this.options.pagination&&r)return[(0,tslib_1.__assign)((0,tslib_1.__assign)({},r),{items:getLeadingSectionItems(r)})];for(var n=getParentSpecItem(t),o=(null==n?void 0:n.items)||this.items,a=0;a<o.length&&"section"===o[a].type;a++)i.push(o[a]);return i}switch(this.options.pagination){case"section":if("operation"===t.type&&t.parent)return[t.parent];if("group"!==t.type)return[t];case"item":return"operation"===t.type?[t]:[(0,tslib_1.__assign)((0,tslib_1.__assign)({},t),{items:getLeadingSectionItems(t)})];default:return[]}}}),Object.defineProperty(e.prototype,"activateBase",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,i,r){var n,o,a,s=this;if(void 0===t&&(t=!0),void 0===i&&(i=!1),(null===(n=this.activeItem)||void 0===n?void 0:n.id)===(null==e?void 0:e.id)&&!r)return t&&e&&this.history.replace(e.id,i),void(e&&!e.active&&e.activate());if(!e||"group"!==e.type)if(this.deactivate(this.activeItem),e){if(!(e.depth<=redoc_lib_1.GROUP_DEPTH)){this.activeItemIdx=e.absoluteIdx,t&&this.history.replace(e.id,i),e.activate(),e.expand();var l=new URLSearchParams(r),c="request"===l.get("t"),d="response"===l.get("t"),u=l.get("c"),f=l.get("ct"),b=l.get("in"),p=l.get("path"),v=(null==p?void 0:p.split(this.options.deepLinkSeparator))||[],h=e;if(b)for(var m=h.parameters,I=function(e){var t=null==m?void 0:m.find((function(t){return t.name===e}));null==t||t.expand(),m=null===(o=null==t?void 0:t.schema)||void 0===o?void 0:o.fields},y=0,_=v;y<_.length;y++){I(_[y])}else if(c){var g=null===(a=h.requestBody)||void 0===a?void 0:a.content;h.activateMimeName(f||h.activeMimeName),setTimeout((function(){var e;return s.activateField(v,null===(e=null==g?void 0:g.active)||void 0===e?void 0:e.schema)}),0)}else if(d){var S=h.responses.find((function(e){return e.code===u}));(null==S?void 0:S.expanded)||null==S||S.expand(),h.activateMimeName(f||h.activeMimeName),setTimeout((function(){var e,t;return s.activateField(v,null===(t=null===(e=null==S?void 0:S.content)||void 0===e?void 0:e.active)||void 0===t?void 0:t.schema)}),0)}}}else this.history.replace("",i)}}),Object.defineProperty(e.prototype,"activate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,i,r,n){var o=this;if(void 0===t&&(t=!0),void 0===i&&(i=!1),void 0===r&&(r=!0),"none"===this.options.pagination)return this.activateBase(e,t,i,n),void(!e&&this.definition instanceof VersionedSpecStore_1.VersionedSpecStore&&this.history.replace(this.definition.currentVersionId,!0));if("group"!==(null==e?void 0:e.type)){if(e&&"item"===this.options.pagination&&"tag"===e.type&&!e.description){if(e.expanded)return void e.collapse();e.expand(),e=this.flatItems[e.absoluteIdx+1]}if(this.activateBase(e,e&&t,i,n),this.activeRenderItemIdx=e?e.absoluteIdx:this.activeRenderItemIdx,this.activeRenderItemIdx>=0){var a=this.buildRenderItems(this.activeRenderItemIdx);a.some((function(e,t){return e.id!==o.renderItems[t].id}))&&(this.renderItems=a),this.renderItems[0]&&(this.activeRenderItemIdx=this.renderItems[0].absoluteIdx)}r&&setTimeout((function(){return o.scrollToActive()})),!e&&this.definition instanceof VersionedSpecStore_1.VersionedSpecStore&&this.history.replace(this.definition.currentVersionId,!0)}}}),Object.defineProperty(e.prototype,"activateField",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){for(var i,r=function(r){var n=e[r],o=r===e.length-1;if((null==t?void 0:t.hasType("array"))&&(null==t?void 0:t.items)&&(t=null==t?void 0:t.items),null==t?void 0:t.oneOf){var a=Number(n);return null==t||t.activateOneOf(a),t=null==t?void 0:t.oneOf[a],"continue"}(null==t?void 0:t.hasType("array"))&&(null==t?void 0:t.items)&&(t=null==t?void 0:t.items);var s=null===(i=null==t?void 0:t.fields)||void 0===i?void 0:i.find((function(e){return e.name===n}));o||null==s||s.expand(),t=null==s?void 0:s.schema},n=0;n<e.length-1;n++)r(n)}}),Object.defineProperty(e.prototype,"deactivate",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(void 0!==e)for(e.deactivate();void 0!==e;)e.collapse(),e=e.parent}}),Object.defineProperty(e.prototype,"activateAndScroll",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,i,r){void 0===r&&(r="");var n=r.split(this.options.deepLinkPrefix)[1],o=e&&this.getItemById(e.id)||e;this.activate(o,t,i,!1,n),this.scrollToActive(n?r:""),o&&o.items.length||this.closeSidebar()}}),Object.defineProperty(e.prototype,"scrollToActive",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;e?setTimeout((function(){return t.scroll.scrollIntoViewBySelector("["+constants_1.SECTION_ATTR+'="'+e+'"]')}),0):this.scroll.scrollIntoView(this.getElementAt(this.activeItemIdx))}}),Object.defineProperty(e.prototype,"dispose",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e,t;null===(e=this._unsubscribe)||void 0===e||e.call(this),null===(t=this._hashUnsubscribe)||void 0===t||t.call(this)}}),(0,tslib_1.__decorate)([mobx_1.observable],e.prototype,"flatItems",void 0),(0,tslib_1.__decorate)([mobx_1.observable],e.prototype,"items",void 0),(0,tslib_1.__decorate)([mobx_1.observable],e.prototype,"activeRenderItemIdx",void 0),(0,tslib_1.__decorate)([mobx_1.observable.ref],e.prototype,"renderItems",void 0),(0,tslib_1.__decorate)([mobx_1.observable],e.prototype,"activeItemIdx",void 0),(0,tslib_1.__decorate)([mobx_1.observable],e.prototype,"sideBarOpened",void 0),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"toggleSidebar",null),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"closeSidebar",null),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"activateBase",null),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"activate",null),(0,tslib_1.__decorate)([mobx_1.action.bound],e.prototype,"activateAndScroll",null),e}();function withoutVersion(e){return e.split("/").slice(1).join("/")}function getParentSpecItem(e){for(;e;){if("spec"===e.type)return e;e=e.parent}}function getParentOfType(e,t){if(e&&e.parent)return e.parent.type===t?e.parent:getParentOfType(e.parent,t)}function getLeadingSectionItems(e){for(var t=[],i=0,r=e.items;i<r.length;i++){var n=r[i];if("section"!==n.type)break;t.push(n)}return t}function normalizeItem(e,t,i,r,n){if(e.absoluteIdx=t,"none"!==i){var o=getParentOfType(e,"tag");if(e.parent&&o&&!("_id_normalized"in e)){if(r){var a=e.id.split("/"),s=a[0],l=a[1],c=withoutVersion(e.id);if("operation"===e.type&&!l.startsWith("operation"))return;e.id=s+"/"+withoutVersion(o.id)+"/"+c}else{if("operation"===e.type&&!e.id.startsWith("operation"))return;e.id=o.id+"/"+e.id}e._id_normalized=!0}}"group"!==e.type&&(e.href=n.linkForId(e.id))}exports.ProMenu=ProMenu;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ProMenu=void 0;var tslib_1=require("tslib"),redoc_lib_1=require("../redoc-lib"),mobx_1=require("mobx"),VersionedSpecStore_1=require("./VersionedSpecStore"),constants_1=require("../redoc-lib/src/services/constants"),HistoryService_1=require("../redoc-lib/src/services/HistoryService"),ProMenu=function(){function e(e,t,i,r){var n=this;Object.defineProperty(this,"definition",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"scroll",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"history",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"flatItems",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"items",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"activeRenderItemIdx",{enumerable:!0,configurable:!0,writable:!0,value:-1}),Object.defineProperty(this,"renderItems",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"activeItemIdx",{enumerable:!0,configurable:!0,writable:!0,value:-1}),Object.defineProperty(this,"sideBarOpened",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_unsubscribe",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_hashUnsubscribe",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"getItemById",{enumerable:!0,configurable:!0,writable:!0,value:function(e){return n.flatItems.find((function(t){return t.id===e}))}}),Object.defineProperty(this,"initOnHistory",{enumerable:!0,configurable:!0,writable:!0,value:function(e){void 0===e&&(e=n.history.currentId);var t,i=e.split(n.options.deepLinkPrefix)[0];i&&((t=n.flatItems.find((function(e){return e.id===i})))?(n.activate(t,!1,!1,!1,e),t.active=!1):i.startsWith(redoc_lib_1.SECURITY_SCHEMES_SECTION_PREFIX)&&(t=n.flatItems.find((function(e){return redoc_lib_1.SECURITY_SCHEMES_SECTION_PREFIX.startsWith(e.id)})),n.activate(t,!1,!1,!1,e),t&&(t.active=!1)))}}),Object.defineProperty(this,"updateOnHistory",{enumerable:!0,configurable:!0,writable:!0,value:function(e){void 0===e&&(e=n.history.currentId);var t,i=e.split(n.options.deepLinkPrefix)[0];if(i)if(t=n.flatItems.find((function(e){return e.id===i})))n.activateAndScroll(t,!1,void 0,e);else{if(i.includes(redoc_lib_1.SECURITY_SCHEMES_SECTION_PREFIX)&&(t=n.flatItems.find((function(e){return redoc_lib_1.SECURITY_SCHEMES_SECTION_PREFIX.startsWith(e.id)})),n.activate(t)),n.scroll.prevOffsetY=0,n.history.basePath){var r=i.split(n.history.basePath+"/")[1];i=r||i}n.scroll.scrollIntoViewBySelector("["+constants_1.SECTION_ATTR+'="'+i+'"]')}}}),Object.defineProperty(this,"updateVersionOnHistory",{enumerable:!0,configurable:!0,writable:!0,value:function(e){var t=e.split("/")[0],i=n.definition.versionsInfo.findIndex((function(e){return e.id===t}));i<0&&(i=n.definition.versionsInfo.findIndex((function(e){return e.isDefault}))),n.definition.activeVersionIdx!==i&&(n.definition.changeVersion(i<0?0:i),n.updateItemsByVersionChange(!1,e));var r=t+"/"+redoc_lib_1.SECURITY_SCHEMES_SECTION_PREFIX;if(e.startsWith(r)){var o=n.flatItems.find((function(e){return r.startsWith(e.id)}));n.activate(o,!1,!0),setTimeout((function(){return n.scroll.scrollIntoViewBySelector("["+constants_1.SECTION_ATTR+'="'+e+'"]')}),0)}}}),Object.defineProperty(this,"updateOnScroll",{enumerable:!0,configurable:!0,writable:!0,value:function(e){for(var t=e?1:-1,i=n.activeItemIdx;(-1!==i||e)&&!(i>=n.flatItems.length-1&&e);){if(e){var r=!1,o=n.flatItems[i+1];switch(n.options.pagination){case"section":r=o&&("spec"===o.type||"group"===o.type||"tag"===o.type);break;case"item":r="section"!==(null==o?void 0:o.type)}var a=n.getElementAt(i+1);if(-1===i&&"tag"===n.flatItems[0].type&&(r=!1),n.scroll.isElementBellow(a)||r)break}else{var s=n.flatItems[i]&&n.flatItems[i].type;r="section"===n.options.pagination&&("spec"===s||"group"===s||"tag"===s)||"item"===n.options.pagination&&"section"!==s,a=n.getElementAt(i);if(n.scroll.isElementAbove(a)||r)break}i+=t}var l=n.flatItems[i];"none"===n.options.pagination||"section"===n.options.pagination?l&&l.active||n.activate(l,!0,!0,!1):l&&"section"===l.type&&(l.active||n.activate(l,!0,!0,!1))}}),(0,mobx_1.makeObservable)(this),this.items=e.contentItems,this.flatItems=(0,redoc_lib_1.flattenByProp)(this.items||[],"items"),this.flatItems.forEach((function(e,t){return e.absoluteIdx=t})),i.disableSidebar||this.subscribe(),this.flatItems.forEach((function(e,t){return normalizeItem(e,t,i.pagination,n.definition instanceof VersionedSpecStore_1.VersionedSpecStore,n.history)})),this.renderItems=this.buildRenderItems(0),this.activeItemIdx=-1,this.activeRenderItemIdx=-1,this.definition instanceof VersionedSpecStore_1.VersionedSpecStore&&this.history.subscribe(this.updateVersionOnHistory)}return Object.defineProperty(e,"updateOnHistory",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){void 0===e&&(e=HistoryService_1.history.currentId),e&&t.scrollIntoViewBySelector("["+constants_1.SECTION_ATTR+'="'+e+'"]')}}),Object.defineProperty(e.prototype,"subscribe",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._unsubscribe=this.scroll.subscribe(this.updateOnScroll),this._hashUnsubscribe=this.history.subscribe(this.updateOnHistory)}}),Object.defineProperty(e.prototype,"toggleSidebar",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sideBarOpened=!this.sideBarOpened}}),Object.defineProperty(e.prototype,"closeSidebar",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sideBarOpened=!1}}),Object.defineProperty(e.prototype,"getElementAt",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.flatItems[e];return t&&(0,redoc_lib_1.querySelector)("["+constants_1.SECTION_ATTR+'="'+t.id+'"]')||null}}),Object.defineProperty(e.prototype,"getElementAtOrFirstChild",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.flatItems[e];return t&&"group"===t.type&&(t=t.items[0]),t&&(0,redoc_lib_1.querySelector)("["+constants_1.SECTION_ATTR+'="'+t.id+'"]')||null}}),Object.defineProperty(e.prototype,"activeItem",{get:function(){return this.flatItems[this.activeItemIdx]||void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"updateItemsByVersionChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var i=this,r=this.activeItem&&this.activeItem.active?this.activeItem.absoluteIdx:-1;t=t&&withoutVersion(t)||this.activeItem&&this.activeItem.active&&withoutVersion(this.activeItem.id)||"",this.deactivate(this.activeItem),this.items=this.definition.contentItems,this.flatItems=(0,redoc_lib_1.flattenByProp)(this.items||[],"items"),this.flatItems.forEach((function(e,t){return normalizeItem(e,t,i.options.pagination,i.definition instanceof VersionedSpecStore_1.VersionedSpecStore,i.history)}));var n=t?(this.flatItems.find((function(e){return withoutVersion(e.id)===t}))||{absoluteIdx:-1}).absoluteIdx:-1;if(-1!==n&&"none"!==this.options.pagination||(this.renderItems=this.buildRenderItems(0)),this.activeItemIdx=-1,-1!==n)this.activate(this.flatItems[n],e);else if(-1!==r)this.activateAndScroll(this.flatItems[0],e);else if(e){var o=this.definition.versionsInfo[this.definition.activeVersionIdx];if(!this.history.currentId&&o.isDefault)return;this.history.replace(o.id)}}}),Object.defineProperty(e.prototype,"buildRenderItems",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if("none"===this.options.pagination)return this.items;var t=this.flatItems[e];if(t||(t=this.flatItems[0]),"spec"===t.type)return this.buildRenderItems(e+1);if("section"===t.type){var i=[],r=getParentOfType(t,"tag");if("section"===this.options.pagination&&r)return[r];if("item"===this.options.pagination&&r)return[(0,tslib_1.__assign)((0,tslib_1.__assign)({},r),{items:getLeadingSectionItems(r)})];for(var n=getParentSpecItem(t),o=(null==n?void 0:n.items)||this.items,a=0;a<o.length&&"section"===o[a].type;a++)i.push(o[a]);return i}switch(this.options.pagination){case"section":if("operation"===t.type&&t.parent)return[t.parent];if("group"!==t.type)return[t];case"item":return"operation"===t.type?[t]:[(0,tslib_1.__assign)((0,tslib_1.__assign)({},t),{items:getLeadingSectionItems(t)})];default:return[]}}}),Object.defineProperty(e.prototype,"activateBase",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,i,r){var n,o,a,s=this;if(void 0===t&&(t=!0),void 0===i&&(i=!1),(null===(n=this.activeItem)||void 0===n?void 0:n.id)===(null==e?void 0:e.id)&&!r)return t&&e&&this.history.replace(e.id,i),void(e&&!e.active&&e.activate());if(!e||"group"!==e.type)if(this.deactivate(this.activeItem),e){if(!(e.depth<=redoc_lib_1.GROUP_DEPTH)){this.activeItemIdx=e.absoluteIdx,t&&this.history.replace(e.id,i),e.activate(),e.expand();var l=new URLSearchParams(r),c="request"===l.get("t"),d="response"===l.get("t"),u=l.get("c"),f=l.get("ct"),p=l.get("in"),b=l.get("path"),v=(null==b?void 0:b.split(this.options.deepLinkSeparator))||[],h=e;if(p)for(var m=h.parameters,I=function(e){var t=null==m?void 0:m.find((function(t){return t.name===e}));null==t||t.expand(),m=null===(o=null==t?void 0:t.schema)||void 0===o?void 0:o.fields},y=0,_=v;y<_.length;y++){I(_[y])}else if(c){var g=null===(a=h.requestBody)||void 0===a?void 0:a.content;h.activateMimeName(f||h.activeMimeName),setTimeout((function(){var e;return s.activateField(v,null===(e=null==g?void 0:g.active)||void 0===e?void 0:e.schema)}),0)}else if(d){var S=h.responses.find((function(e){return e.code===u}));(null==S?void 0:S.expanded)||null==S||S.expand(),h.activateMimeName(f||h.activeMimeName),setTimeout((function(){var e,t;return s.activateField(v,null===(t=null===(e=null==S?void 0:S.content)||void 0===e?void 0:e.active)||void 0===t?void 0:t.schema)}),0)}}}else this.history.replace("",i)}}),Object.defineProperty(e.prototype,"activate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,i,r,n){var o=this;if(void 0===t&&(t=!0),void 0===i&&(i=!1),void 0===r&&(r=!0),"none"===this.options.pagination)return this.activateBase(e,t,i,n),void(!e&&this.definition instanceof VersionedSpecStore_1.VersionedSpecStore&&this.history.replace(this.definition.currentVersionId,!0));if("group"!==(null==e?void 0:e.type)){if(e&&"item"===this.options.pagination&&"tag"===e.type&&!e.description){if(e.expanded)return void e.collapse();e.expand(),e=this.flatItems[e.absoluteIdx+1]}if(this.activateBase(e,e&&t,i,n),this.activeRenderItemIdx=e?e.absoluteIdx:this.activeRenderItemIdx,this.activeRenderItemIdx>=0){var a=this.buildRenderItems(this.activeRenderItemIdx);a.some((function(e,t){return e.id!==o.renderItems[t].id}))&&(this.renderItems=a),this.renderItems[0]&&(this.activeRenderItemIdx=this.renderItems[0].absoluteIdx)}r&&setTimeout((function(){return o.scrollToActive()})),!e&&this.definition instanceof VersionedSpecStore_1.VersionedSpecStore&&this.history.replace(this.definition.currentVersionId,!0)}}}),Object.defineProperty(e.prototype,"activateField",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){for(var i,r=function(r){var n=e[r],o=r===e.length-1;if((null==t?void 0:t.hasType("array"))&&(null==t?void 0:t.items)&&(t=null==t?void 0:t.items),null==t?void 0:t.oneOf){var a=Number(n);return null==t||t.activateOneOf(a),t=null==t?void 0:t.oneOf[a],"continue"}(null==t?void 0:t.hasType("array"))&&(null==t?void 0:t.items)&&(t=null==t?void 0:t.items);var s=null===(i=null==t?void 0:t.fields)||void 0===i?void 0:i.find((function(e){return e.name===n}));o||null==s||s.expand(),t=null==s?void 0:s.schema},n=0;n<e.length-1;n++)r(n)}}),Object.defineProperty(e.prototype,"deactivate",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(void 0!==e)for(e.deactivate();void 0!==e;)e.collapse(),e=e.parent}}),Object.defineProperty(e.prototype,"activateAndScroll",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,i,r){void 0===r&&(r="");var n=r.split(this.options.deepLinkPrefix)[1],o=e&&this.getItemById(e.id)||e;this.activate(o,t,i,!1,n),this.scrollToActive(n?r:""),o&&o.items.length||this.closeSidebar()}}),Object.defineProperty(e.prototype,"scrollToActive",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;e?setTimeout((function(){return t.scroll.scrollIntoViewBySelector("["+constants_1.SECTION_ATTR+'="'+e+'"]')}),0):this.scroll.scrollIntoView(this.getElementAt(this.activeItemIdx))}}),Object.defineProperty(e.prototype,"dispose",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e,t;null===(e=this._unsubscribe)||void 0===e||e.call(this),null===(t=this._hashUnsubscribe)||void 0===t||t.call(this)}}),(0,tslib_1.__decorate)([mobx_1.observable],e.prototype,"flatItems",void 0),(0,tslib_1.__decorate)([mobx_1.observable],e.prototype,"items",void 0),(0,tslib_1.__decorate)([mobx_1.observable],e.prototype,"activeRenderItemIdx",void 0),(0,tslib_1.__decorate)([mobx_1.observable.ref],e.prototype,"renderItems",void 0),(0,tslib_1.__decorate)([mobx_1.observable],e.prototype,"activeItemIdx",void 0),(0,tslib_1.__decorate)([mobx_1.observable],e.prototype,"sideBarOpened",void 0),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"toggleSidebar",null),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"closeSidebar",null),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"activateBase",null),(0,tslib_1.__decorate)([mobx_1.action],e.prototype,"activate",null),(0,tslib_1.__decorate)([mobx_1.action.bound],e.prototype,"activateAndScroll",null),e}();function withoutVersion(e){return e.split("/").slice(1).join("/")}function getParentSpecItem(e){for(;e;){if("spec"===e.type)return e;e=e.parent}}function getParentOfType(e,t){if(e&&e.parent)return e.parent.type===t?e.parent:getParentOfType(e.parent,t)}function getLeadingSectionItems(e){for(var t=[],i=0,r=e.items;i<r.length;i++){var n=r[i];if("section"!==n.type)break;t.push(n)}return t}function normalizeItem(e,t,i,r,n){if(e.absoluteIdx=t,"none"!==i){var o=getParentOfType(e,"tag");if(e.parent&&o&&!("_id_normalized"in e)){if(r){var a=e.id.split("/"),s=a[0],l=a[1],c=withoutVersion(e.id);if("operation"===e.type&&!l.startsWith("operation"))return;e.id=s+"/"+withoutVersion(o.id)+"/"+c}else{if("operation"===e.type&&!e.id.startsWith("operation"))return;e.id=o.id+"/"+e.id}e._id_normalized=!0}}"group"!==e.type&&(e.href=n.linkForId(e.id))}exports.ProMenu=ProMenu;
2
2
  //# sourceMappingURL=ProMenu.js.map
@@ -1,2 +1,2 @@
1
- import{__makeTemplateObject}from"tslib";import*as React from"react";import{observer}from"mobx-react";import{styled,mediaCSS,mediaMap,ZERO_BREAKPOINT,css,Tooltip}from"../redoc-lib";import{LayoutVariant}from"../services";var ShowRightPanelSVG=styled((function(){return React.createElement("svg",{width:"15",height:"10",viewBox:"0 0 15 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M2.41421 5L5.70711 8.29289C6.09763 8.68342 6.09763 9.31658 5.7071 9.70711C5.31658 10.0976 4.68342 10.0976 4.29289 9.70711L0.292892 5.70711C-0.0976321 5.31658 -0.0976319 4.68342 0.292893 4.29289L4.29289 0.292894C4.68342 -0.0976302 5.31658 -0.09763 5.70711 0.292894C6.09763 0.683418 6.09763 1.31658 5.70711 1.70711L2.41421 5Z",fill:"#9AA6B1"}),React.createElement("path",{d:"M2 5C2 4.44772 2.44771 4 3 4L11 4C11.5523 4 12 4.44772 12 5C12 5.55229 11.5523 6 11 6L3 6C2.44771 6 2 5.55228 2 5Z",fill:"#9AA6B1"}),React.createElement("rect",{x:"15",y:"10",width:"2",height:"10",rx:"1",transform:"rotate(-180 15 10)",fill:"#9AA6B1"}))}))(templateObject_1||(templateObject_1=__makeTemplateObject(["\n position: absolute;\n"],["\n position: absolute;\n"]))),HideRightPanelSVG=styled((function(){return React.createElement("svg",{width:"15",height:"10",viewBox:"0 0 15 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M12.5858 5L9.29289 1.70711C8.90237 1.31658 8.90237 0.683417 9.29289 0.292893C9.68342 -0.097631 10.3166 -0.0976309 10.7071 0.292893L14.7071 4.29289C15.0976 4.68342 15.0976 5.31658 14.7071 5.70711L10.7071 9.70711C10.3166 10.0976 9.68342 10.0976 9.29289 9.70711C8.90237 9.31658 8.90237 8.68342 9.29289 8.29289L12.5858 5Z",fill:"#9AA6B1"}),React.createElement("path",{d:"M13 5C13 5.55229 12.5523 6 12 6L4 6C3.44772 6 3 5.55228 3 5C3 4.44771 3.44772 4 4 4L12 4C12.5523 4 13 4.44772 13 5Z",fill:"#9AA6B1"}),React.createElement("rect",{width:"2",height:"10",rx:"1",fill:"#9AA6B1"}))}))(templateObject_2||(templateObject_2=__makeTemplateObject(["\n position: absolute;\n"],["\n position: absolute;\n"])));export var StyledToggleRightPanelButton=styled.a(templateObject_3||(templateObject_3=__makeTemplateObject(["\n display: flex;\n justify-content: center;\n align-items: center;\n color: '#f00';\n cursor: pointer;\n z-index: 1;\n /* Rectangle 201 */\n width: 36px;\n height: 36px;\n background: #e5e8eb;\n border-radius: ",";\n"],["\n display: flex;\n justify-content: center;\n align-items: center;\n color: '#f00';\n cursor: pointer;\n z-index: 1;\n /* Rectangle 201 */\n width: 36px;\n height: 36px;\n background: #e5e8eb;\n border-radius: ",";\n"])),(function(e){return e.theme.shape.borderRadius}));export var ToggleRightPanelButton=observer((function(e){var t=e.store,n=e.isVisible;return t.options.showRightPanelToggle&&n?React.createElement(Tooltip,{tip:t.showRightPanel?"Hide samples":"Show samples",placement:"left"},React.createElement(StyledToggleRightPanelButton,{onClick:function(){t.toggleRightPanel()}},t.showRightPanel?React.createElement(HideRightPanelSVG,null):React.createElement(ShowRightPanelSVG,null))):null}));var IntArrowIcon=function(e){return React.createElement("svg",{className:e.className,version:"1.1",viewBox:"0 0 24 24",x:"0",xmlns:"http://www.w3.org/2000/svg",y:"0","aria-hidden":"true"},React.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 "}))};export var ArrowIcon=styled(IntArrowIcon)(templateObject_4||(templateObject_4=__makeTemplateObject(["\n width: 18px;\n height: 18px;\n transform: ",";\n\n ","\n"],["\n width: 18px;\n height: 18px;\n transform: ",";\n\n ","\n"])),(function(e){return"rotate("+("left"===e.direction?"90deg":"-90deg")+")"}),(function(e){var t,n=e.theme;return mediaCSS({fill:null===(t=n.rightPanel)||void 0===t?void 0:t.textColor})}));export var RedocWrap=styled.div(templateObject_5||(templateObject_5=__makeTemplateObject(["\n display: flex;\n position: relative;\n text-align: left;\n tap-highlight-color: rgba(0, 0, 0, 0);\n text-size-adjust: 100%;\n ",";\n\n ","\n\n * {\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(255, 255, 255, 0);\n }\n"],["\n display: flex;\n position: relative;\n text-align: left;\n tap-highlight-color: rgba(0, 0, 0, 0);\n text-size-adjust: 100%;\n ",";\n\n ","\n\n * {\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(255, 255, 255, 0);\n }\n"])),(function(e){var t=e.theme;return"\n -webkit-font-smoothing: "+t.typography.smoothing+";\n "+(t.typography.optimizeSpeed?"text-rendering: optimizeSpeed !important":"")+";\n "}),(function(e){var t=e.theme;return mediaCSS({fontFamily:t.typography.fontFamily,fontSize:t.typography.fontSize,lineHeight:t.typography.lineHeight,fontWeight:t.typography.fontWeightRegular,color:t.colors.text.primary,fontSmoothing:t.typography.smoothing})}));export var ApiContentWrap=styled.div(templateObject_7||(templateObject_7=__makeTemplateObject(["\n position: relative;\n overflow: hidden;\n /* contain: layout; */\n display: flex;\n flex-direction: column;\n align-items: center;\n margin: 0 auto;\n\n ","\n"],["\n position: relative;\n overflow: hidden;\n /* contain: layout; */\n display: flex;\n flex-direction: column;\n align-items: center;\n margin: 0 auto;\n\n ","\n"])),(function(e){var t,n=e.theme,a=e.layout;return css(templateObject_6||(templateObject_6=__makeTemplateObject(["\n ",";\n\n "," {\n width: 100%;\n padding: 0;\n }\n "],["\n ",";\n\n "," {\n width: 100%;\n padding: 0;\n }\n "])),mediaCSS({width:(t={},t[ZERO_BREAKPOINT]="auto",t.small="calc(100% - "+n.sidebar.width+")",t),maxWidth:n.layout[a||LayoutVariant.THREE_PANEL].maxWidth}),n.mediaQueries.print)}));export var BackgroundStub=styled.div(templateObject_9||(templateObject_9=__makeTemplateObject(["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n ","\n"],["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n ","\n"])),(function(e){var t,n,a=e.theme;return css(templateObject_8||(templateObject_8=__makeTemplateObject(["\n ","\n "," {\n display: none;\n }\n "],["\n ","\n "," {\n display: none;\n }\n "])),mediaCSS({background:a.rightPanel.backgroundColor,display:(t={},t[ZERO_BREAKPOINT]="none",t[a.rightPanel.showAtBreakpoint]="initial",t),left:mediaMap(a.breakpoints,[a.rightPanel.width],(n={},n[ZERO_BREAKPOINT]=function(){return"0"},n[a.rightPanel.showAtBreakpoint]=function(e){return"calc(100% - "+e+")"},n))}),a.mediaQueries.print)}));export var BackgroundStubFix=styled.div(templateObject_11||(templateObject_11=__makeTemplateObject(["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n ","\n"],["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n ","\n"])),(function(e){var t,n,a=e.theme;return css(templateObject_10||(templateObject_10=__makeTemplateObject(["\n ","\n "," {\n display: none;\n }\n "],["\n ","\n "," {\n display: none;\n }\n "])),mediaCSS({background:a.rightPanel.backgroundColor,display:(t={},t[ZERO_BREAKPOINT]="none",t[a.rightPanel.showAtBreakpoint]="initial",t),width:mediaMap(a.breakpoints,[a.sidebar.width,a.layout["three-panel"].maxWidth],(n={},n[ZERO_BREAKPOINT]=function(){return"0"},n[a.rightPanel.showAtBreakpoint]=function(e,t){return"calc((100% - min(100% - "+e+", "+t+") - "+e+")/2 + 50px)"},n))}),a.mediaQueries.print)}));export var NextSectionButtonWrap=styled.div(templateObject_13||(templateObject_13=__makeTemplateObject(["\n padding: ",";\n align-self: flex-start;\n text-align: right;\n\n display: flex;\n flex-direction: row;\n\n ","\n"],["\n padding: ",";\n align-self: flex-start;\n text-align: right;\n\n display: flex;\n flex-direction: row;\n\n ","\n"])),(function(e){var t=e.theme;return 4*t.spacing.unit+"px "+5*t.spacing.unit+"px"}),(function(e){var t,n,a=e.theme,i=a.layout.showDarkRightPanel?a.spacing.sectionHorizontal:a.spacing.sectionHorizontal/2;return css(templateObject_12||(templateObject_12=__makeTemplateObject(["\n ","\n "],["\n ","\n "])),mediaCSS({width:mediaMap(a.breakpoints,[a.rightPanel.width],(t={},t[ZERO_BREAKPOINT]=function(){return"100%"},t[a.rightPanel.showAtBreakpoint]=function(e){return"calc(100% - "+e+")"},t)),paddingLeft:a.spacing.sectionHorizontal,paddingRight:(n={},n[ZERO_BREAKPOINT]=a.spacing.sectionHorizontal,n[a.rightPanel.showAtBreakpoint]=i,n)}))}));var templateObject_1,templateObject_2,templateObject_3,templateObject_4,templateObject_5,templateObject_6,templateObject_7,templateObject_8,templateObject_9,templateObject_10,templateObject_11,templateObject_12,templateObject_13,templateObject_14,templateObject_15,templateObject_16,templateObject_17,templateObject_18,ChangeViewSvgColumn=styled((function(){return React.createElement("svg",{width:"15",height:"20",viewBox:"0 0 15 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("line",{x1:"13.2858",y1:"5.28564",x2:"1.00005",y2:"5.28564",stroke:"#9AA6B1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),React.createElement("line",{x1:"13.2858",y1:"1",x2:"1.00005",y2:"0.999998",stroke:"#9AA6B1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),React.createElement("rect",{x:"14.2858",y:"20",width:"14.2857",height:"11.4286",rx:"1",transform:"rotate(-180 14.2858 20)",fill:"#9AA6B1"}))}))(templateObject_14||(templateObject_14=__makeTemplateObject(["\n position: absolute;\n"],["\n position: absolute;\n"]))),ChangeViewSvgRow=styled((function(){return React.createElement("svg",{width:"20",height:"16",viewBox:"0 0 20 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("line",{x1:"1",y1:"4",x2:"8",y2:"4",stroke:"#9AA6B1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),React.createElement("line",{x1:"1",y1:"8",x2:"8",y2:"8",stroke:"#9AA6B1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),React.createElement("line",{x1:"1",y1:"12",x2:"8",y2:"12",stroke:"#9AA6B1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),React.createElement("rect",{x:"11",width:"9",height:"16",rx:"1",fill:"#9AA6B1"}))}))(templateObject_15||(templateObject_15=__makeTemplateObject(["\n position: absolute;\n"],["\n position: absolute;\n"]))),StyledChangeViewButton=styled.a(templateObject_16||(templateObject_16=__makeTemplateObject(["\n display: flex;\n position: relative;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n z-index: 1;\n /* Rectangle 201 */\n width: 36px;\n height: 36px;\n background: #e5e8eb;\n border-radius: ",";\n"],["\n display: flex;\n position: relative;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n z-index: 1;\n /* Rectangle 201 */\n width: 36px;\n height: 36px;\n background: #e5e8eb;\n border-radius: ",";\n"])),(function(e){return e.theme.shape.borderRadius}));export var ChangeViewButton=function(e){var t=e.store,n=e.isVisible;return t.options.showChangeLayoutButton&&n?React.createElement(Tooltip,{tip:"Change layout",placement:"left"},React.createElement(StyledChangeViewButton,{onClick:function(){t.toggleLayout(t.layout===LayoutVariant.STACKED?LayoutVariant.THREE_PANEL:LayoutVariant.STACKED)}},t.layout===LayoutVariant.STACKED?React.createElement(ChangeViewSvgRow,null):React.createElement(ChangeViewSvgColumn,null))):null};export var ControlsWrap=styled.div(templateObject_18||(templateObject_18=__makeTemplateObject(["\n position: sticky;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n top: ",";\n right: 24px;\n height: 80px;\n z-index: 1;\n ","\n"],["\n position: sticky;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n top: ",";\n right: 24px;\n height: 80px;\n z-index: 1;\n ","\n"])),(function(e){return e.theme.components.layoutControls.top}),(function(e){var t,n=e.theme;return css(templateObject_17||(templateObject_17=__makeTemplateObject(["\n ","\n "," {\n display: none;\n }\n "],["\n ","\n "," {\n display: none;\n }\n "])),mediaCSS({display:(t={},t[ZERO_BREAKPOINT]="none",t[n.rightPanel.showAtBreakpoint]="flex",t)}),n.mediaQueries.print)}));
1
+ import{__makeTemplateObject}from"tslib";import*as React from"react";import{observer}from"mobx-react";import{styled,mediaCSS,mediaMap,ZERO_BREAKPOINT,css,Tooltip}from"../redoc-lib";import{LayoutVariant}from"../services";var ShowRightPanelSVG=styled((function(){return React.createElement("svg",{width:"15",height:"10",viewBox:"0 0 15 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M2.41421 5L5.70711 8.29289C6.09763 8.68342 6.09763 9.31658 5.7071 9.70711C5.31658 10.0976 4.68342 10.0976 4.29289 9.70711L0.292892 5.70711C-0.0976321 5.31658 -0.0976319 4.68342 0.292893 4.29289L4.29289 0.292894C4.68342 -0.0976302 5.31658 -0.09763 5.70711 0.292894C6.09763 0.683418 6.09763 1.31658 5.70711 1.70711L2.41421 5Z",fill:"#9AA6B1"}),React.createElement("path",{d:"M2 5C2 4.44772 2.44771 4 3 4L11 4C11.5523 4 12 4.44772 12 5C12 5.55229 11.5523 6 11 6L3 6C2.44771 6 2 5.55228 2 5Z",fill:"#9AA6B1"}),React.createElement("rect",{x:"15",y:"10",width:"2",height:"10",rx:"1",transform:"rotate(-180 15 10)",fill:"#9AA6B1"}))}))(templateObject_1||(templateObject_1=__makeTemplateObject(["\n position: absolute;\n"],["\n position: absolute;\n"]))),HideRightPanelSVG=styled((function(){return React.createElement("svg",{width:"15",height:"10",viewBox:"0 0 15 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M12.5858 5L9.29289 1.70711C8.90237 1.31658 8.90237 0.683417 9.29289 0.292893C9.68342 -0.097631 10.3166 -0.0976309 10.7071 0.292893L14.7071 4.29289C15.0976 4.68342 15.0976 5.31658 14.7071 5.70711L10.7071 9.70711C10.3166 10.0976 9.68342 10.0976 9.29289 9.70711C8.90237 9.31658 8.90237 8.68342 9.29289 8.29289L12.5858 5Z",fill:"#9AA6B1"}),React.createElement("path",{d:"M13 5C13 5.55229 12.5523 6 12 6L4 6C3.44772 6 3 5.55228 3 5C3 4.44771 3.44772 4 4 4L12 4C12.5523 4 13 4.44772 13 5Z",fill:"#9AA6B1"}),React.createElement("rect",{width:"2",height:"10",rx:"1",fill:"#9AA6B1"}))}))(templateObject_2||(templateObject_2=__makeTemplateObject(["\n position: absolute;\n"],["\n position: absolute;\n"])));export var StyledToggleRightPanelButton=styled.a(templateObject_3||(templateObject_3=__makeTemplateObject(["\n display: flex;\n justify-content: center;\n align-items: center;\n color: '#f00';\n cursor: pointer;\n z-index: 1;\n /* Rectangle 201 */\n width: ",";\n height: ",";\n background: #e5e8eb;\n border-radius: ",";\n"],["\n display: flex;\n justify-content: center;\n align-items: center;\n color: '#f00';\n cursor: pointer;\n z-index: 1;\n /* Rectangle 201 */\n width: ",";\n height: ",";\n background: #e5e8eb;\n border-radius: ",";\n"])),(function(e){return e.theme.components.layoutControls.width}),(function(e){return e.theme.components.layoutControls.height}),(function(e){return e.theme.shape.borderRadius}));export var ToggleRightPanelButton=observer((function(e){var t=e.store,n=e.isVisible;return t.options.showRightPanelToggle&&n?React.createElement(Tooltip,{tip:t.showRightPanel?"Hide samples":"Show samples",placement:"left"},React.createElement(StyledToggleRightPanelButton,{onClick:function(){t.toggleRightPanel()}},t.showRightPanel?React.createElement(HideRightPanelSVG,null):React.createElement(ShowRightPanelSVG,null))):null}));var IntArrowIcon=function(e){return React.createElement("svg",{className:e.className,version:"1.1",viewBox:"0 0 24 24",x:"0",xmlns:"http://www.w3.org/2000/svg",y:"0","aria-hidden":"true"},React.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 "}))};export var ArrowIcon=styled(IntArrowIcon)(templateObject_4||(templateObject_4=__makeTemplateObject(["\n width: 18px;\n height: 18px;\n transform: ",";\n\n ","\n"],["\n width: 18px;\n height: 18px;\n transform: ",";\n\n ","\n"])),(function(e){return"rotate("+("left"===e.direction?"90deg":"-90deg")+")"}),(function(e){var t,n=e.theme;return mediaCSS({fill:null===(t=n.rightPanel)||void 0===t?void 0:t.textColor})}));export var RedocWrap=styled.div(templateObject_5||(templateObject_5=__makeTemplateObject(["\n display: flex;\n position: relative;\n text-align: left;\n tap-highlight-color: rgba(0, 0, 0, 0);\n text-size-adjust: 100%;\n ",";\n\n ","\n\n * {\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(255, 255, 255, 0);\n }\n"],["\n display: flex;\n position: relative;\n text-align: left;\n tap-highlight-color: rgba(0, 0, 0, 0);\n text-size-adjust: 100%;\n ",";\n\n ","\n\n * {\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(255, 255, 255, 0);\n }\n"])),(function(e){var t=e.theme;return"\n -webkit-font-smoothing: "+t.typography.smoothing+";\n "+(t.typography.optimizeSpeed?"text-rendering: optimizeSpeed !important":"")+";\n "}),(function(e){var t=e.theme;return mediaCSS({fontFamily:t.typography.fontFamily,fontSize:t.typography.fontSize,lineHeight:t.typography.lineHeight,fontWeight:t.typography.fontWeightRegular,color:t.colors.text.primary,fontSmoothing:t.typography.smoothing})}));export var ApiContentWrap=styled.div(templateObject_7||(templateObject_7=__makeTemplateObject(["\n position: relative;\n overflow: hidden;\n /* contain: layout; */\n display: flex;\n flex-direction: column;\n align-items: center;\n margin: 0 auto;\n\n ","\n"],["\n position: relative;\n overflow: hidden;\n /* contain: layout; */\n display: flex;\n flex-direction: column;\n align-items: center;\n margin: 0 auto;\n\n ","\n"])),(function(e){var t,n=e.theme,i=e.layout;return css(templateObject_6||(templateObject_6=__makeTemplateObject(["\n ",";\n\n "," {\n width: 100%;\n padding: 0;\n }\n "],["\n ",";\n\n "," {\n width: 100%;\n padding: 0;\n }\n "])),mediaCSS({width:(t={},t[ZERO_BREAKPOINT]="auto",t.small="calc(100% - "+n.sidebar.width+")",t),maxWidth:n.layout[i||LayoutVariant.THREE_PANEL].maxWidth}),n.mediaQueries.print)}));export var BackgroundStub=styled.div(templateObject_9||(templateObject_9=__makeTemplateObject(["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n ","\n"],["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n ","\n"])),(function(e){var t,n,i=e.theme;return css(templateObject_8||(templateObject_8=__makeTemplateObject(["\n ","\n "," {\n display: none;\n }\n "],["\n ","\n "," {\n display: none;\n }\n "])),mediaCSS({background:i.rightPanel.backgroundColor,display:(t={},t[ZERO_BREAKPOINT]="none",t[i.rightPanel.showAtBreakpoint]="initial",t),left:mediaMap(i.breakpoints,[i.rightPanel.width],(n={},n[ZERO_BREAKPOINT]=function(){return"0"},n[i.rightPanel.showAtBreakpoint]=function(e){return"calc(100% - "+e+")"},n))}),i.mediaQueries.print)}));export var BackgroundStubFix=styled.div(templateObject_11||(templateObject_11=__makeTemplateObject(["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n ","\n"],["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n ","\n"])),(function(e){var t,n,i=e.theme;return css(templateObject_10||(templateObject_10=__makeTemplateObject(["\n ","\n "," {\n display: none;\n }\n "],["\n ","\n "," {\n display: none;\n }\n "])),mediaCSS({background:i.rightPanel.backgroundColor,display:(t={},t[ZERO_BREAKPOINT]="none",t[i.rightPanel.showAtBreakpoint]="initial",t),width:mediaMap(i.breakpoints,[i.sidebar.width,i.layout["three-panel"].maxWidth],(n={},n[ZERO_BREAKPOINT]=function(){return"0"},n[i.rightPanel.showAtBreakpoint]=function(e,t){return"calc((100% - min(100% - "+e+" - "+i.components.layoutControls.width+", "+t+") - "+e+" + "+i.components.layoutControls.width+")/2 + 2px)"},n))}),i.mediaQueries.print)}));export var NextSectionButtonWrap=styled.div(templateObject_13||(templateObject_13=__makeTemplateObject(["\n padding: ",";\n align-self: flex-start;\n text-align: right;\n\n display: flex;\n flex-direction: row;\n\n ","\n"],["\n padding: ",";\n align-self: flex-start;\n text-align: right;\n\n display: flex;\n flex-direction: row;\n\n ","\n"])),(function(e){var t=e.theme;return 4*t.spacing.unit+"px "+5*t.spacing.unit+"px"}),(function(e){var t,n,i=e.theme,a=i.layout.showDarkRightPanel?i.spacing.sectionHorizontal:i.spacing.sectionHorizontal/2;return css(templateObject_12||(templateObject_12=__makeTemplateObject(["\n ","\n "],["\n ","\n "])),mediaCSS({width:mediaMap(i.breakpoints,[i.rightPanel.width],(t={},t[ZERO_BREAKPOINT]=function(){return"100%"},t[i.rightPanel.showAtBreakpoint]=function(e){return"calc(100% - "+e+")"},t)),paddingLeft:i.spacing.sectionHorizontal,paddingRight:(n={},n[ZERO_BREAKPOINT]=i.spacing.sectionHorizontal,n[i.rightPanel.showAtBreakpoint]=a,n)}))}));var templateObject_1,templateObject_2,templateObject_3,templateObject_4,templateObject_5,templateObject_6,templateObject_7,templateObject_8,templateObject_9,templateObject_10,templateObject_11,templateObject_12,templateObject_13,templateObject_14,templateObject_15,templateObject_16,templateObject_17,templateObject_18,ChangeViewSvgColumn=styled((function(){return React.createElement("svg",{width:"15",height:"20",viewBox:"0 0 15 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("line",{x1:"13.2858",y1:"5.28564",x2:"1.00005",y2:"5.28564",stroke:"#9AA6B1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),React.createElement("line",{x1:"13.2858",y1:"1",x2:"1.00005",y2:"0.999998",stroke:"#9AA6B1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),React.createElement("rect",{x:"14.2858",y:"20",width:"14.2857",height:"11.4286",rx:"1",transform:"rotate(-180 14.2858 20)",fill:"#9AA6B1"}))}))(templateObject_14||(templateObject_14=__makeTemplateObject(["\n position: absolute;\n"],["\n position: absolute;\n"]))),ChangeViewSvgRow=styled((function(){return React.createElement("svg",{width:"20",height:"16",viewBox:"0 0 20 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("line",{x1:"1",y1:"4",x2:"8",y2:"4",stroke:"#9AA6B1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),React.createElement("line",{x1:"1",y1:"8",x2:"8",y2:"8",stroke:"#9AA6B1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),React.createElement("line",{x1:"1",y1:"12",x2:"8",y2:"12",stroke:"#9AA6B1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),React.createElement("rect",{x:"11",width:"9",height:"16",rx:"1",fill:"#9AA6B1"}))}))(templateObject_15||(templateObject_15=__makeTemplateObject(["\n position: absolute;\n"],["\n position: absolute;\n"]))),StyledChangeViewButton=styled.a(templateObject_16||(templateObject_16=__makeTemplateObject(["\n display: flex;\n position: relative;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n z-index: 1;\n /* Rectangle 201 */\n width: ",";\n height: ",";\n background: #e5e8eb;\n border-radius: ",";\n"],["\n display: flex;\n position: relative;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n z-index: 1;\n /* Rectangle 201 */\n width: ",";\n height: ",";\n background: #e5e8eb;\n border-radius: ",";\n"])),(function(e){return e.theme.components.layoutControls.width}),(function(e){return e.theme.components.layoutControls.height}),(function(e){return e.theme.shape.borderRadius}));export var ChangeViewButton=function(e){var t=e.store,n=e.isVisible;return t.options.showChangeLayoutButton&&n?React.createElement(Tooltip,{tip:"Change layout",placement:"left"},React.createElement(StyledChangeViewButton,{onClick:function(){t.toggleLayout(t.layout===LayoutVariant.STACKED?LayoutVariant.THREE_PANEL:LayoutVariant.STACKED)}},t.layout===LayoutVariant.STACKED?React.createElement(ChangeViewSvgRow,null):React.createElement(ChangeViewSvgColumn,null))):null};export var ControlsWrap=styled.div(templateObject_18||(templateObject_18=__makeTemplateObject(["\n position: sticky;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n top: ",";\n right: 24px;\n height: ",";\n z-index: 1;\n ","\n"],["\n position: sticky;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n top: ",";\n right: 24px;\n height: ",";\n z-index: 1;\n ","\n"])),(function(e){return e.theme.components.layoutControls.top}),(function(e){var t=e.theme;return"calc("+t.components.layoutControls.height+" * 2 + "+2*t.spacing.unit+"px)"}),(function(e){var t,n=e.theme;return css(templateObject_17||(templateObject_17=__makeTemplateObject(["\n ","\n "," {\n display: none;\n }\n "],["\n ","\n "," {\n display: none;\n }\n "])),mediaCSS({display:(t={},t[ZERO_BREAKPOINT]="none",t[n.rightPanel.showAtBreakpoint]="flex",t)}),n.mediaQueries.print)}));
2
2
  //# sourceMappingURL=styled.elements.js.map
@@ -1,2 +1,2 @@
1
- import{__makeTemplateObject}from"tslib";import{css,mediaCSS}from"../../styled-components";export var jsonStyles=css(templateObject_1||(templateObject_1=__makeTemplateObject(["\n .redoc-json code > .collapser {\n display: none;\n pointer-events: none;\n }\n\n contain: content;\n overflow-x: auto;\n padding: 10px;\n\n ","\n\n .callback-function {\n color: gray;\n }\n\n .collapser:after {\n content: '-';\n cursor: pointer;\n }\n\n .collapsed > .collapser:after {\n content: '+';\n cursor: pointer;\n }\n\n .ellipsis:after {\n content: ' … ';\n }\n\n .collapsible {\n margin-left: 2em;\n }\n\n .hoverable {\n padding-top: 1px;\n padding-bottom: 1px;\n padding-left: 2px;\n padding-right: 2px;\n }\n\n .hovered {\n background-color: rgba(235, 238, 249, 1);\n }\n\n .collapser {\n background-color: transparent;\n border: 0;\n color: #fff;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 15px;\n height: 15px;\n position: absolute;\n top: 4px;\n left: -1.5em;\n cursor: default;\n user-select: none;\n -webkit-user-select: none;\n padding: 2px;\n ","\n &:focus {\n outline: #fff dotted 1px;\n }\n }\n\n ul {\n list-style-type: none;\n padding: 0px;\n margin: 0px 0px 0px 26px;\n }\n\n li {\n position: relative;\n display: block;\n }\n\n .hoverable {\n display: inline-block;\n }\n\n .selected {\n outline-width: 1px;\n outline-style: dotted;\n }\n\n .collapsed > .collapsible {\n display: none;\n }\n\n .ellipsis {\n display: none;\n }\n\n .collapsed > .ellipsis {\n display: inherit;\n }\n"],["\n .redoc-json code > .collapser {\n display: none;\n pointer-events: none;\n }\n\n contain: content;\n overflow-x: auto;\n padding: 10px;\n\n ","\n\n .callback-function {\n color: gray;\n }\n\n .collapser:after {\n content: '-';\n cursor: pointer;\n }\n\n .collapsed > .collapser:after {\n content: '+';\n cursor: pointer;\n }\n\n .ellipsis:after {\n content: ' … ';\n }\n\n .collapsible {\n margin-left: 2em;\n }\n\n .hoverable {\n padding-top: 1px;\n padding-bottom: 1px;\n padding-left: 2px;\n padding-right: 2px;\n }\n\n .hovered {\n background-color: rgba(235, 238, 249, 1);\n }\n\n .collapser {\n background-color: transparent;\n border: 0;\n color: #fff;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 15px;\n height: 15px;\n position: absolute;\n top: 4px;\n left: -1.5em;\n cursor: default;\n user-select: none;\n -webkit-user-select: none;\n padding: 2px;\n ","\n &:focus {\n outline: #fff dotted 1px;\n }\n }\n\n ul {\n list-style-type: none;\n padding: 0px;\n margin: 0px 0px 0px 26px;\n }\n\n li {\n position: relative;\n display: block;\n }\n\n .hoverable {\n display: inline-block;\n }\n\n .selected {\n outline-width: 1px;\n outline-style: dotted;\n }\n\n .collapsed > .collapsible {\n display: none;\n }\n\n .ellipsis {\n display: none;\n }\n\n .collapsed > .ellipsis {\n display: inherit;\n }\n"])),(function(n){var e=n.theme;return mediaCSS({borderRadius:e.shape.borderRadius,backgroundColor:e.rightPanel.panelControlsBackgroundColor,color:e.colors.text.light,fontSize:e.typography.code.fontSize,fontFamily:e.typography.code.fontFamily,whiteSpace:e.typography.code.wrap?"pre-wrap":"pre"})}),(function(n){var e=n.theme;return mediaCSS({fontFamily:e.typography.code.fontFamily,fontSize:e.typography.code.fontSize})}));var templateObject_1;
1
+ import{__makeTemplateObject}from"tslib";import{css,mediaCSS}from"../../styled-components";export var jsonStyles=css(templateObject_1||(templateObject_1=__makeTemplateObject(["\n .redoc-json code > .collapser {\n display: none;\n pointer-events: none;\n }\n\n contain: content;\n overflow-x: auto;\n padding: 10px;\n\n ","\n\n .callback-function {\n color: gray;\n }\n\n .collapser:after {\n content: '-';\n cursor: pointer;\n }\n\n .collapsed > .collapser:after {\n content: '+';\n cursor: pointer;\n }\n\n .ellipsis:after {\n content: ' … ';\n }\n\n .collapsible {\n margin-left: 2ch;\n }\n\n .hoverable {\n padding-top: 1px;\n padding-bottom: 1px;\n padding-left: 2px;\n padding-right: 2px;\n }\n\n .hovered {\n background-color: rgba(235, 238, 249, 1);\n }\n\n .collapser {\n background-color: transparent;\n border: 0;\n color: #fff;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 15px;\n height: 15px;\n position: absolute;\n top: 4px;\n left: -1.5em;\n cursor: default;\n user-select: none;\n -webkit-user-select: none;\n padding: 2px;\n ","\n &:focus {\n outline: #fff dotted 1px;\n }\n }\n\n ul {\n list-style-type: none;\n padding: 0px;\n margin: 0px 0px 0px 26px;\n }\n\n li {\n position: relative;\n display: block;\n }\n\n .hoverable {\n display: inline-block;\n }\n\n .selected {\n outline-width: 1px;\n outline-style: dotted;\n }\n\n .collapsed > .collapsible {\n display: none;\n }\n\n .ellipsis {\n display: none;\n }\n\n .collapsed > .ellipsis {\n display: inherit;\n }\n"],["\n .redoc-json code > .collapser {\n display: none;\n pointer-events: none;\n }\n\n contain: content;\n overflow-x: auto;\n padding: 10px;\n\n ","\n\n .callback-function {\n color: gray;\n }\n\n .collapser:after {\n content: '-';\n cursor: pointer;\n }\n\n .collapsed > .collapser:after {\n content: '+';\n cursor: pointer;\n }\n\n .ellipsis:after {\n content: ' … ';\n }\n\n .collapsible {\n margin-left: 2ch;\n }\n\n .hoverable {\n padding-top: 1px;\n padding-bottom: 1px;\n padding-left: 2px;\n padding-right: 2px;\n }\n\n .hovered {\n background-color: rgba(235, 238, 249, 1);\n }\n\n .collapser {\n background-color: transparent;\n border: 0;\n color: #fff;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 15px;\n height: 15px;\n position: absolute;\n top: 4px;\n left: -1.5em;\n cursor: default;\n user-select: none;\n -webkit-user-select: none;\n padding: 2px;\n ","\n &:focus {\n outline: #fff dotted 1px;\n }\n }\n\n ul {\n list-style-type: none;\n padding: 0px;\n margin: 0px 0px 0px 26px;\n }\n\n li {\n position: relative;\n display: block;\n }\n\n .hoverable {\n display: inline-block;\n }\n\n .selected {\n outline-width: 1px;\n outline-style: dotted;\n }\n\n .collapsed > .collapsible {\n display: none;\n }\n\n .ellipsis {\n display: none;\n }\n\n .collapsed > .ellipsis {\n display: inherit;\n }\n"])),(function(n){var e=n.theme;return mediaCSS({borderRadius:e.shape.borderRadius,backgroundColor:e.rightPanel.panelControlsBackgroundColor,color:e.colors.text.light,fontSize:e.typography.code.fontSize,fontFamily:e.typography.code.fontFamily,whiteSpace:e.typography.code.wrap?"pre-wrap":"pre"})}),(function(n){var e=n.theme;return mediaCSS({fontFamily:e.typography.code.fontFamily,fontSize:e.typography.code.fontSize})}));var templateObject_1;
2
2
  //# sourceMappingURL=style.js.map
@@ -1,2 +1,2 @@
1
- import{__assign,__decorate,__spreadArray}from"tslib";import{action,observable,makeObservable}from"mobx";import{FieldModel}from"./Field";import{detectType,extractExtensions,humanizeConstraints,isNamedDefinition,isPrimitiveType,JsonPointer,pluralizeType,sortByField,sortByRequired}from"../../utils/";import{l}from"../Labels";var SchemaModel=function(){function e(e,i,t,r,n,a,s){void 0===n&&(n=!1),void 0===s&&(s={}),Object.defineProperty(this,"parser",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"parent",{enumerable:!0,configurable:!0,writable:!0,value:a}),Object.defineProperty(this,"deps",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(this,"pointer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"displayType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"typePrefix",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"title",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"description",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"externalDocs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"isPrimitive",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"isCircular",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"format",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"displayFormat",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"nullable",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"deprecated",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pattern",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"example",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"enum",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"default",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"writeOnly",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"constraints",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_fields",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"items",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"oneOf",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"oneOfType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"discriminatorProp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"activeOneOf",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"rawSchema",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"schema",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"extensions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"x-enumDescriptions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"const",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contentEncoding",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contentMediaType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"minItems",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"maxItems",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),makeObservable(this),this.pointer=i.$ref||t||"",this.rawSchema=e.deref(i,!1,!0),this.schema=e.mergeAllOf(this.rawSchema,this.pointer,n),this.init(e,n),e.exitParents(this.schema),r.showExtensions&&(this.extensions=extractExtensions(this.schema,r.showExtensions))}return Object.defineProperty(e.prototype,"activateOneOf",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.activeOneOf=e}}),Object.defineProperty(e.prototype,"hasType",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.type===e||Array.isArray(this.type)&&this.type.includes(e)}}),Object.defineProperty(e.prototype,"fields",{get:function(){if(!this.isCircular)return!this._fields&&this.hasType("object")&&(this._fields=buildFields(this.parser,this.schema,this.pointer,this.options,this,this.deps)),this._fields},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasCircularParent",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var i=this;if(this.parent){if(e.some((function(e){var t,r;if(!e)return!1;var n=i.parent;return(null==n?void 0:n.pointer)===e||(!!(null===(r=null===(t=null==n?void 0:n.schema.parentRefs)||void 0===t?void 0:t.some)||void 0===r?void 0:r.call(t,(function(i){return i===e})))||void 0)})))return!0;if(this.parent.hasCircularParent(e))return!0}return!1}}),Object.defineProperty(e.prototype,"init",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){var r=this,n=this.schema;if(this.isCircular=n["x-circular-ref"]||this.hasCircularParent(__spreadArray([this.pointer],this.schema.parentRefs||[],!0)),this.title=n.title||isNamedDefinition(this.pointer)&&JsonPointer.baseName(this.pointer)||"",this.description=n.description||"",this.type=n.type||detectType(n),this.format=n.format,this.enum=n.enum||[],this["x-enumDescriptions"]=n["x-enumDescriptions"],this.example=n.example,this.deprecated=!!n.deprecated,this.pattern=n.pattern,this.externalDocs=n.externalDocs,this.constraints=humanizeConstraints(n),this.displayFormat=this.format,this.isPrimitive=isPrimitiveType(n,this.type),this.default=n.default,this.readOnly=!!n.readOnly,this.writeOnly=!!n.writeOnly,this.const=n.const||"",this.contentEncoding=n.contentEncoding,this.contentMediaType=n.contentMediaType,this.minItems=n.minItems,this.maxItems=n.maxItems,(n.nullable||n["x-nullable"])&&(Array.isArray(this.type)&&!this.type.some((function(e){return null===e||"null"===e}))?this.type=__spreadArray(__spreadArray([],this.type,!0),["null"],!1):Array.isArray(this.type)||null===this.type&&"null"===this.type||(this.type=[this.type,"null"])),this.displayType=Array.isArray(this.type)?this.type.map((function(e){return null===e?"null":e})).join(" or "):this.type,!this.isCircular)if(t||void 0===getDiscriminator(n)){if(t&&Array.isArray(n.oneOf)&&n.oneOf.find((function(e){return e.$ref===r.pointer}))&&delete n.oneOf,void 0!==n.oneOf)return this.initOneOf(n.oneOf,i),this.oneOfType="One of",void(void 0!==n.anyOf&&console.warn("oneOf and anyOf are not supported on the same level. Skipping anyOf at "+this.pointer));if(void 0!==n.anyOf)return this.initOneOf(n.anyOf,i),void(this.oneOfType="Any of");if(this.hasType("array")&&n.items&&(this.items=new e(i,n.items,this.pointer+"/items",this.options,!1,this,this.deps),this.displayType=pluralizeType(this.items.displayType),this.displayFormat=this.items.format,this.typePrefix=this.items.typePrefix+l("arrayOf"),this.title=this.title||this.items.title,this.isPrimitive=this.items.isPrimitive,void 0===this.example&&void 0!==this.items.example&&(this.example=[this.items.example]),this.items.isPrimitive&&(this.enum=this.items.enum,this["x-enumDescriptions"]=this.items["x-enumDescriptions"]),Array.isArray(this.type))){var a=this.type.filter((function(e){return"array"!==e}));a.length&&(this.displayType+=" or "+a.join(" or "))}this.enum.length&&this.options.sortEnumValuesAlphabetically&&this.enum.sort()}else this.initDiscriminator(n,i)}}),Object.defineProperty(e.prototype,"initOneOf",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){var r=this;if(this.oneOf=i.map((function(i,n){var a=t.deref(i,!1,!0),s=t.mergeAllOf(a,r.pointer+"/oneOf/"+n),o=isNamedDefinition(i.$ref)&&!s.title?JsonPointer.baseName(i.$ref):""+(s.title||"")+(s.const&&JSON.stringify(s.const)||""),l=new e(t,__assign(__assign({},s),{title:o,allOf:[__assign(__assign({},r.schema),{oneOf:void 0,anyOf:void 0})]}),r.pointer+"/oneOf/"+n,r.options,!1,r.parent,__assign(__assign({},r.deps),{parentFieldFullPath:r.deps.parentFieldFullPath?r.deps.parentFieldFullPath+r.options.deepLinkSeparator+n:n.toString()}));return t.exitRef(i),t.exitParents(s),l})),this.options.simpleOneOfTypeLabel){var n=collectUniqueOneOfTypesDeep(this);this.displayType=n.join(" or ")}else this.displayType=this.oneOf.map((function(e){var i=e.typePrefix+(e.title?e.title+" ("+e.displayType+")":e.displayType);return i.indexOf(" or ")>-1&&(i="("+i+")"),i})).join(" or ")}}),Object.defineProperty(e.prototype,"initDiscriminator",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){var r=this,n=getDiscriminator(i);this.discriminatorProp=null==n?void 0:n.propertyName;var a=t.findDerived(__spreadArray(__spreadArray([],i.parentRefs||[],!0),[this.pointer],!1));if(i.oneOf)for(var s=0,o=i.oneOf;s<o.length;s++){var l=o[s];if(void 0!==l.$ref){var p=JsonPointer.baseName(l.$ref);a[l.$ref]=p}}var u=(null==n?void 0:n.mapping)||{},f=(null==n?void 0:n["x-explicitMappingOnly"])||!1;0===Object.keys(u).length&&(f=!1);var d={};for(var b in u){var c=u[b];Array.isArray(d[c])?d[c].push(b):d[c]=[b]}for(var h=__assign(f?{}:__assign({},a),d),m=[],y=0,v=Object.keys(h);y<v.length;y++){var O=h[c=v[y]];if(Array.isArray(O))for(var g=0,P=O;g<P.length;g++){var w=P[g];m.push({$ref:c,name:w})}else m.push({$ref:c,name:O})}var j=Object.keys(u);0!==j.length&&(m=m.sort((function(e,i){var t=j.indexOf(e.name),r=j.indexOf(i.name);return t<0&&r<0?e.name.localeCompare(i.name):t<0?1:r<0?-1:t-r}))),this.oneOf=m.map((function(i,n){var a=i.$ref,s=i.name,o=new e(t,t.byRef(a),a,r.options,!0,r.parent,__assign(__assign({},r.deps),{parentFieldFullPath:r.deps.parentFieldFullPath?r.deps.parentFieldFullPath+r.options.deepLinkSeparator+n:n.toString()}));return o.title=s,o}))}}),__decorate([observable],e.prototype,"activeOneOf",void 0),__decorate([action],e.prototype,"activateOneOf",null),e}();export{SchemaModel};function buildFields(e,i,t,r,n,a){var s=i.properties||{},o=i.additionalProperties,l=i.default||{},p=Object.keys(s||[]).map((function(o){var p=s[o];p||(console.warn('Field "'+o+'" is invalid, skipping.\n Field must be an object but got '+typeof p+' at "'+t+'"'),p={});var u=void 0!==i.required&&i.required.indexOf(o)>-1;return new FieldModel(e,{name:o,required:u,schema:__assign(__assign({},p),{default:void 0===p.default&&l?l[o]:p.default})},t+"/properties/"+o,r,n,a)}));return r.sortPropsAlphabetically&&(p=sortByField(p,"name")),r.requiredPropsFirst&&(p=sortByRequired(p,r.sortPropsAlphabetically?void 0:i.required)),"object"!=typeof o&&!0!==o||p.push(new FieldModel(e,{name:("object"==typeof o&&o["x-additionalPropertiesName"]||"property name").concat("*"),required:!1,schema:!0===o?{}:o,kind:"additionalProperties"},t+"/additionalProperties",r,n,a)),p}function getDiscriminator(e){return e.discriminator||e["x-discriminator"]}function collectUniqueOneOfTypesDeep(e){var i=new Set;return function e(t){for(var r=0,n=t.oneOf||[];r<n.length;r++){var a=n[r];a.oneOf?e(a):a.type&&i.add(a.type)}}(e),Array.from(i.values())}
1
+ import{__assign,__decorate,__spreadArray}from"tslib";import{action,observable,makeObservable}from"mobx";import{FieldModel}from"./Field";import{detectType,extractExtensions,humanizeConstraints,isNamedDefinition,isPrimitiveType,JsonPointer,pluralizeType,sortByField,sortByRequired}from"../../utils/";import{l}from"../Labels";var SchemaModel=function(){function e(e,i,t,r,n,a,s){void 0===n&&(n=!1),void 0===s&&(s={}),Object.defineProperty(this,"parser",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"parent",{enumerable:!0,configurable:!0,writable:!0,value:a}),Object.defineProperty(this,"deps",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(this,"pointer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"displayType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"typePrefix",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"title",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"description",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"externalDocs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"isPrimitive",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"isCircular",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"format",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"displayFormat",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"nullable",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"deprecated",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pattern",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"example",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"enum",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"default",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"writeOnly",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"constraints",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_fields",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"items",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"oneOf",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"oneOfType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"discriminatorProp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"activeOneOf",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"rawSchema",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"schema",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"extensions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"x-enumDescriptions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"const",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contentEncoding",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contentMediaType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"minItems",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"maxItems",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),makeObservable(this),this.pointer=i.$ref||t||"",this.rawSchema=e.deref(i,!1,!0),this.schema=e.mergeAllOf(this.rawSchema,this.pointer,n),this.init(e,n),e.exitRef(i),e.exitParents(this.schema),r.showExtensions&&(this.extensions=extractExtensions(this.schema,r.showExtensions))}return Object.defineProperty(e.prototype,"activateOneOf",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.activeOneOf=e}}),Object.defineProperty(e.prototype,"hasType",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.type===e||Array.isArray(this.type)&&this.type.includes(e)}}),Object.defineProperty(e.prototype,"fields",{get:function(){if(!this.isCircular)return!this._fields&&this.hasType("object")&&(this._fields=buildFields(this.parser,this.schema,this.pointer,this.options,this,this.deps)),this._fields},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasCircularParent",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var i=this;if(this.parent){if(e.some((function(e){var t,r;if(!e)return!1;var n=i.parent;return(null==n?void 0:n.pointer)===e||(!!(null===(r=null===(t=null==n?void 0:n.schema.parentRefs)||void 0===t?void 0:t.some)||void 0===r?void 0:r.call(t,(function(i){return i===e})))||void 0)})))return!0;if(this.parent.hasCircularParent(e))return!0}return!1}}),Object.defineProperty(e.prototype,"init",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){var r=this,n=this.schema;if(this.isCircular=n["x-circular-ref"]||this.hasCircularParent(__spreadArray([this.pointer],this.schema.parentRefs||[],!0)),this.title=n.title||isNamedDefinition(this.pointer)&&JsonPointer.baseName(this.pointer)||"",this.description=n.description||"",this.type=n.type||detectType(n),this.format=n.format,this.enum=n.enum||[],this["x-enumDescriptions"]=n["x-enumDescriptions"],this.example=n.example,this.deprecated=!!n.deprecated,this.pattern=n.pattern,this.externalDocs=n.externalDocs,this.constraints=humanizeConstraints(n),this.displayFormat=this.format,this.isPrimitive=isPrimitiveType(n,this.type),this.default=n.default,this.readOnly=!!n.readOnly,this.writeOnly=!!n.writeOnly,this.const=n.const||"",this.contentEncoding=n.contentEncoding,this.contentMediaType=n.contentMediaType,this.minItems=n.minItems,this.maxItems=n.maxItems,(n.nullable||n["x-nullable"])&&(Array.isArray(this.type)&&!this.type.some((function(e){return null===e||"null"===e}))?this.type=__spreadArray(__spreadArray([],this.type,!0),["null"],!1):Array.isArray(this.type)||null===this.type&&"null"===this.type||(this.type=[this.type,"null"])),this.displayType=Array.isArray(this.type)?this.type.map((function(e){return null===e?"null":e})).join(" or "):this.type,!this.isCircular)if(t||void 0===getDiscriminator(n)){if(t&&Array.isArray(n.oneOf)&&n.oneOf.find((function(e){return e.$ref===r.pointer}))&&delete n.oneOf,void 0!==n.oneOf)return this.initOneOf(n.oneOf,i),this.oneOfType="One of",void(void 0!==n.anyOf&&console.warn("oneOf and anyOf are not supported on the same level. Skipping anyOf at "+this.pointer));if(void 0!==n.anyOf)return this.initOneOf(n.anyOf,i),void(this.oneOfType="Any of");if(this.hasType("array")&&n.items&&(this.items=new e(i,n.items,this.pointer+"/items",this.options,!1,this,this.deps),this.displayType=pluralizeType(this.items.displayType),this.displayFormat=this.items.format,this.typePrefix=this.items.typePrefix+l("arrayOf"),this.title=this.title||this.items.title,this.isPrimitive=this.items.isPrimitive,void 0===this.example&&void 0!==this.items.example&&(this.example=[this.items.example]),this.items.isPrimitive&&(this.enum=this.items.enum,this["x-enumDescriptions"]=this.items["x-enumDescriptions"]),Array.isArray(this.type))){var a=this.type.filter((function(e){return"array"!==e}));a.length&&(this.displayType+=" or "+a.join(" or "))}this.enum.length&&this.options.sortEnumValuesAlphabetically&&this.enum.sort()}else this.initDiscriminator(n,i)}}),Object.defineProperty(e.prototype,"initOneOf",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){var r=this;if(this.oneOf=i.map((function(i,n){var a=t.deref(i,!1,!0),s=t.mergeAllOf(a,r.pointer+"/oneOf/"+n),o=isNamedDefinition(i.$ref)&&!s.title?JsonPointer.baseName(i.$ref):""+(s.title||"")+(s.const&&JSON.stringify(s.const)||""),l=new e(t,__assign(__assign({},s),{title:o,allOf:[__assign(__assign({},r.schema),{oneOf:void 0,anyOf:void 0})]}),r.pointer+"/oneOf/"+n,r.options,!1,r.parent,__assign(__assign({},r.deps),{parentFieldFullPath:r.deps.parentFieldFullPath?r.deps.parentFieldFullPath+r.options.deepLinkSeparator+n:n.toString()}));return t.exitRef(i),t.exitParents(s),l})),this.options.simpleOneOfTypeLabel){var n=collectUniqueOneOfTypesDeep(this);this.displayType=n.join(" or ")}else this.displayType=this.oneOf.map((function(e){var i=e.typePrefix+(e.title?e.title+" ("+e.displayType+")":e.displayType);return i.indexOf(" or ")>-1&&(i="("+i+")"),i})).join(" or ")}}),Object.defineProperty(e.prototype,"initDiscriminator",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){var r=this,n=getDiscriminator(i);this.discriminatorProp=null==n?void 0:n.propertyName;var a=t.findDerived(__spreadArray(__spreadArray([],i.parentRefs||[],!0),[this.pointer],!1));if(i.oneOf)for(var s=0,o=i.oneOf;s<o.length;s++){var l=o[s];if(void 0!==l.$ref){var p=JsonPointer.baseName(l.$ref);a[l.$ref]=p}}var u=(null==n?void 0:n.mapping)||{},f=(null==n?void 0:n["x-explicitMappingOnly"])||!1;0===Object.keys(u).length&&(f=!1);var d={};for(var b in u){var c=u[b];Array.isArray(d[c])?d[c].push(b):d[c]=[b]}for(var h=__assign(f?{}:__assign({},a),d),m=[],y=0,v=Object.keys(h);y<v.length;y++){var O=h[c=v[y]];if(Array.isArray(O))for(var g=0,P=O;g<P.length;g++){var w=P[g];m.push({$ref:c,name:w})}else m.push({$ref:c,name:O})}var j=Object.keys(u);0!==j.length&&(m=m.sort((function(e,i){var t=j.indexOf(e.name),r=j.indexOf(i.name);return t<0&&r<0?e.name.localeCompare(i.name):t<0?1:r<0?-1:t-r}))),this.oneOf=m.map((function(i,n){var a=i.$ref,s=i.name,o=new e(t,t.byRef(a),a,r.options,!0,r.parent,__assign(__assign({},r.deps),{parentFieldFullPath:r.deps.parentFieldFullPath?r.deps.parentFieldFullPath+r.options.deepLinkSeparator+n:n.toString()}));return o.title=s,o}))}}),__decorate([observable],e.prototype,"activeOneOf",void 0),__decorate([action],e.prototype,"activateOneOf",null),e}();export{SchemaModel};function buildFields(e,i,t,r,n,a){var s=i.properties||{},o=i.additionalProperties,l=i.default||{},p=Object.keys(s||[]).map((function(o){var p=s[o];p||(console.warn('Field "'+o+'" is invalid, skipping.\n Field must be an object but got '+typeof p+' at "'+t+'"'),p={});var u=void 0!==i.required&&i.required.indexOf(o)>-1;return new FieldModel(e,{name:o,required:u,schema:__assign(__assign({},p),{default:void 0===p.default&&l?l[o]:p.default})},t+"/properties/"+o,r,n,a)}));return r.sortPropsAlphabetically&&(p=sortByField(p,"name")),r.requiredPropsFirst&&(p=sortByRequired(p,r.sortPropsAlphabetically?void 0:i.required)),"object"!=typeof o&&!0!==o||p.push(new FieldModel(e,{name:("object"==typeof o&&o["x-additionalPropertiesName"]||"property name").concat("*"),required:!1,schema:!0===o?{}:o,kind:"additionalProperties"},t+"/additionalProperties",r,n,a)),p}function getDiscriminator(e){return e.discriminator||e["x-discriminator"]}function collectUniqueOneOfTypesDeep(e){var i=new Set;return function e(t){for(var r=0,n=t.oneOf||[];r<n.length;r++){var a=n[r];a.oneOf?e(a):a.type&&i.add(a.type)}}(e),Array.from(i.values())}
2
2
  //# sourceMappingURL=Schema.js.map
@@ -174,6 +174,8 @@ export interface ResolvedThemeInterface {
174
174
  };
175
175
  layoutControls: {
176
176
  top: string;
177
+ width: string;
178
+ height: string;
177
179
  };
178
180
  httpBadges: {
179
181
  borderRadius: string;
@@ -1,2 +1,2 @@
1
- var _a,_b;import{darken,lighten,readableColor,transparentize}from"polished";import{ZERO_BREAKPOINT}from"./utils/media-css";var defaultTheme={spacing:{unit:5,sectionHorizontal:function(r){return 8*r.spacing.unit},sectionVertical:function(r){return 4*r.spacing.unit}},breakpoints:{small:"50rem",medium:"85rem",large:"105rem"},colors:{tonalOffset:.2,primary:{main:"#0065FB",light:function(r){var o=r.colors;return lighten(o.tonalOffset,o.primary.main)},dark:function(r){var o=r.colors;return darken(o.tonalOffset,o.primary.main)},contrastText:function(r){var o=r.colors;return readableColor(o.primary.main)}},secondary:{main:"#E4E7EB",light:"#F5F7FA",dark:"#E4E7EB",contrastText:"#3E4C59"},accent:{main:"#59C3FF",light:"#b3dcf3",dark:"#033B73",contrastText:"#ffffff"},success:{main:"#41DE50",light:function(r){var o=r.colors;return lighten(2*o.tonalOffset,o.success.main)},dark:function(r){var o=r.colors;return darken(o.tonalOffset,o.success.main)},contrastText:function(r){var o=r.colors;return readableColor(o.success.main)}},warning:{main:"#ffa500",light:function(r){var o=r.colors;return lighten(o.tonalOffset,o.warning.main)},dark:function(r){var o=r.colors;return darken(o.tonalOffset,o.warning.main)},contrastText:"#ffffff"},error:{main:"#FF6161",light:function(r){var o=r.colors;return lighten(o.tonalOffset,o.error.main)},dark:function(r){var o=r.colors;return darken(o.tonalOffset,o.error.main)},contrastText:"#ffffff"},text:{primary:"#1F2933",secondary:"#7b8794",light:"#F5F7FA"},border:{dark:"#616E7C",light:"#E4E7EB"},responses:{success:{borderColor:"#B1E996",backgroundColor:"#F6FFF4",tabTextColor:function(r){return r.colors.responses.success.borderColor}},error:{borderColor:"#FFC9C9",backgroundColor:"#FFF4F4",tabTextColor:function(r){return r.colors.responses.error.borderColor}},redirect:{borderColor:function(r){return r.colors.warning.main},backgroundColor:function(r){var o=r.colors;return transparentize(.9,o.responses.redirect.borderColor)},tabTextColor:function(r){return r.colors.responses.redirect.borderColor}},info:{borderColor:"#87ceeb",backgroundColor:function(r){var o=r.colors;return transparentize(.9,o.responses.info.borderColor)},tabTextColor:function(r){return r.colors.responses.info.borderColor}}},http:{get:"#3A9601",post:"#0065FB",put:"#93527B",options:"#947014",patch:"#bf581d",delete:"#C83637",basic:"#707070",link:"#07818F",head:"#A23DAD"}},schema:{linesColor:function(r){return r.colors.border.light},defaultDetailsWidth:"70%",typeNameColor:function(r){return r.colors.text.secondary},typeTitleColor:function(r){return r.schema.typeNameColor},requireLabelColor:"#FF0000",labelsTextSize:"0.9em",nestingSpacing:"1em",nestedBackground:function(r){return r.colors.secondary.light},caretColor:function(r){return r.colors.text.primary},caretSize:"9px"},typography:{fontSize:"14px",lineHeight:"1.5em",fontWeightRegular:"400",fontWeightBold:"600",fontWeightLight:"300",fontFamily:"Source Sans Pro, sans-serif",smoothing:"antialiased",optimizeSpeed:!0,headings:{fontFamily:function(r){return r.typography.fontFamily},fontWeight:"700",lineHeight:"1.6em"},code:{fontSize:"13px",fontFamily:"Source Code Pro, monospace",lineHeight:function(r){return r.typography.lineHeight},fontWeight:function(r){return r.typography.fontWeightRegular},color:"#e53935",backgroundColor:"rgba(38, 50, 56, 0.05)",wrap:!1},links:{color:function(r){return r.colors.primary.main},visited:function(r){return r.typography.links.color},hover:function(r){var o=r.typography;return lighten(.2,o.links.color)},textDecoration:"auto"},fieldName:{fontSize:function(r){return r.typography.code.fontSize},fontFamily:function(r){return r.typography.code.fontFamily},fontWeight:function(r){return r.typography.code.fontWeight}}},sidebar:{separatorLabelColor:function(r){return r.sidebar.textColor},separatorLineColor:"#DADADA",caretColor:function(r){return r.sidebar.textColor},caretSize:function(r){return r.sidebar.spacing.unit},spacing:{unit:8,paddingHorizontal:function(r){return r.sidebar.spacing.unit},paddingVertical:function(r){return r.sidebar.spacing.unit},offsetTop:function(r){return 2*r.sidebar.spacing.unit},offsetLeft:function(r){return 2*r.sidebar.spacing.unit},offsetNesting:function(r){return 2*r.sidebar.spacing.unit}},borderRadius:"4px",fontFamily:function(r){return r.typography.fontFamily},fontSize:function(r){return r.typography.fontSize},showAtBreakpoint:"small",width:"285px",backgroundColor:"#fff",rightLineColor:function(r){return r.colors.border.light},textColor:function(r){return r.colors.text.primary},activeTextColor:function(r){return r.sidebar.textColor},activeBgColor:function(r){return r.colors.border.light}},components:{buttons:{borderRadius:function(r){return r.shape.borderRadius},hoverStyle:"",fontWeight:function(r){return r.typography.fontWeightBold},boxShadow:"none",hoverBoxShadow:"0px 0px 12px 0px rgba(0, 0, 0, 0.1)",fontFamily:"inherit",sizes:{small:{fontSize:"12px",padding:"8px 10px",minWidth:"90px"},medium:{fontSize:"14px",padding:"8px 20px",minWidth:"120px"},large:{fontSize:"14px",padding:"12px 24px",minWidth:"150px"},xlarge:{fontSize:"16px",padding:"20px 24px",minWidth:"200px"}}},httpBadges:{borderRadius:"16px",fontFamily:function(r){return r.typography.code.fontFamily},fontWeight:function(r){return r.typography.fontWeightBold},color:function(r){return r.colors.text.light},sizes:{medium:{fontSize:"12px",lineHeight:"20px"},small:{fontSize:"8px",lineHeight:"15px"}}},tryItButton:{fullWidth:!1},tryItSendButton:{fullWidth:!1},panels:{borderRadius:"8px"},layoutControls:{top:"20px"}},logo:{maxHeight:function(r){return r.sidebar.width},maxWidth:function(r){return r.sidebar.width},gutter:"2px"},rightPanel:{showAtBreakpoint:"medium",backgroundColor:"#1F2933",panelBackgroundColor:"#52606D",panelControlsBackgroundColor:"#323F4B",width:"37.5%",textColor:"#ffffff"},codeBlock:{backgroundColor:function(r){return r.rightPanel.panelControlsBackgroundColor}},shape:{borderRadius:"4px"},layout:{stacked:{maxWidth:(_a={},_a[ZERO_BREAKPOINT]="",_a.small="90%",_a.medium="75%",_a.large="1200px",_a)},"three-panel":{middlePanelMaxWidth:"none",maxWidth:(_b={},_b[ZERO_BREAKPOINT]="100%",_b.small="100%",_b.medium="100%",_b.large="1800px",_b)}}};export default defaultTheme;export function resolveTheme(r){var o={},t=0,n=function(e,i){Object.keys(e).forEach((function(a){var l=(i?i+".":"")+a,c=e[a];"function"==typeof c?Object.defineProperty(e,a,{get:function(){if(!o[l]){if(++t>1e3)throw new Error("Theme probably contains circular dependency at "+l+": "+c.toString());o[l]=c(r)}return o[l]},enumerable:!0}):"object"==typeof c&&n(c,l)}))};return n(r,""),JSON.parse(JSON.stringify(r))}
1
+ var _a,_b;import{darken,lighten,readableColor,transparentize}from"polished";import{ZERO_BREAKPOINT}from"./utils/media-css";var defaultTheme={spacing:{unit:5,sectionHorizontal:function(r){return 8*r.spacing.unit},sectionVertical:function(r){return 4*r.spacing.unit}},breakpoints:{small:"50rem",medium:"85rem",large:"105rem"},colors:{tonalOffset:.2,primary:{main:"#0065FB",light:function(r){var o=r.colors;return lighten(o.tonalOffset,o.primary.main)},dark:function(r){var o=r.colors;return darken(o.tonalOffset,o.primary.main)},contrastText:function(r){var o=r.colors;return readableColor(o.primary.main)}},secondary:{main:"#E4E7EB",light:"#F5F7FA",dark:"#E4E7EB",contrastText:"#3E4C59"},accent:{main:"#59C3FF",light:"#b3dcf3",dark:"#033B73",contrastText:"#ffffff"},success:{main:"#41DE50",light:function(r){var o=r.colors;return lighten(2*o.tonalOffset,o.success.main)},dark:function(r){var o=r.colors;return darken(o.tonalOffset,o.success.main)},contrastText:function(r){var o=r.colors;return readableColor(o.success.main)}},warning:{main:"#ffa500",light:function(r){var o=r.colors;return lighten(o.tonalOffset,o.warning.main)},dark:function(r){var o=r.colors;return darken(o.tonalOffset,o.warning.main)},contrastText:"#ffffff"},error:{main:"#FF6161",light:function(r){var o=r.colors;return lighten(o.tonalOffset,o.error.main)},dark:function(r){var o=r.colors;return darken(o.tonalOffset,o.error.main)},contrastText:"#ffffff"},text:{primary:"#1F2933",secondary:"#7b8794",light:"#F5F7FA"},border:{dark:"#616E7C",light:"#E4E7EB"},responses:{success:{borderColor:"#B1E996",backgroundColor:"#F6FFF4",tabTextColor:function(r){return r.colors.responses.success.borderColor}},error:{borderColor:"#FFC9C9",backgroundColor:"#FFF4F4",tabTextColor:function(r){return r.colors.responses.error.borderColor}},redirect:{borderColor:function(r){return r.colors.warning.main},backgroundColor:function(r){var o=r.colors;return transparentize(.9,o.responses.redirect.borderColor)},tabTextColor:function(r){return r.colors.responses.redirect.borderColor}},info:{borderColor:"#87ceeb",backgroundColor:function(r){var o=r.colors;return transparentize(.9,o.responses.info.borderColor)},tabTextColor:function(r){return r.colors.responses.info.borderColor}}},http:{get:"#3A9601",post:"#0065FB",put:"#93527B",options:"#947014",patch:"#bf581d",delete:"#C83637",basic:"#707070",link:"#07818F",head:"#A23DAD"}},schema:{linesColor:function(r){return r.colors.border.light},defaultDetailsWidth:"70%",typeNameColor:function(r){return r.colors.text.secondary},typeTitleColor:function(r){return r.schema.typeNameColor},requireLabelColor:"#FF0000",labelsTextSize:"0.9em",nestingSpacing:"1em",nestedBackground:function(r){return r.colors.secondary.light},caretColor:function(r){return r.colors.text.primary},caretSize:"9px"},typography:{fontSize:"14px",lineHeight:"1.5em",fontWeightRegular:"400",fontWeightBold:"600",fontWeightLight:"300",fontFamily:"Source Sans Pro, sans-serif",smoothing:"antialiased",optimizeSpeed:!0,headings:{fontFamily:function(r){return r.typography.fontFamily},fontWeight:"700",lineHeight:"1.6em"},code:{fontSize:"13px",fontFamily:"Source Code Pro, monospace",lineHeight:function(r){return r.typography.lineHeight},fontWeight:function(r){return r.typography.fontWeightRegular},color:"#e53935",backgroundColor:"rgba(38, 50, 56, 0.05)",wrap:!1},links:{color:function(r){return r.colors.primary.main},visited:function(r){return r.typography.links.color},hover:function(r){var o=r.typography;return lighten(.2,o.links.color)},textDecoration:"auto"},fieldName:{fontSize:function(r){return r.typography.code.fontSize},fontFamily:function(r){return r.typography.code.fontFamily},fontWeight:function(r){return r.typography.code.fontWeight}}},sidebar:{separatorLabelColor:function(r){return r.sidebar.textColor},separatorLineColor:"#DADADA",caretColor:function(r){return r.sidebar.textColor},caretSize:function(r){return r.sidebar.spacing.unit},spacing:{unit:8,paddingHorizontal:function(r){return r.sidebar.spacing.unit},paddingVertical:function(r){return r.sidebar.spacing.unit},offsetTop:function(r){return 2*r.sidebar.spacing.unit},offsetLeft:function(r){return 2*r.sidebar.spacing.unit},offsetNesting:function(r){return 2*r.sidebar.spacing.unit}},borderRadius:"4px",fontFamily:function(r){return r.typography.fontFamily},fontSize:function(r){return r.typography.fontSize},showAtBreakpoint:"small",width:"285px",backgroundColor:"#fff",rightLineColor:function(r){return r.colors.border.light},textColor:function(r){return r.colors.text.primary},activeTextColor:function(r){return r.sidebar.textColor},activeBgColor:function(r){return r.colors.border.light}},components:{buttons:{borderRadius:function(r){return r.shape.borderRadius},hoverStyle:"",fontWeight:function(r){return r.typography.fontWeightBold},boxShadow:"none",hoverBoxShadow:"0px 0px 12px 0px rgba(0, 0, 0, 0.1)",fontFamily:"inherit",sizes:{small:{fontSize:"12px",padding:"8px 10px",minWidth:"90px"},medium:{fontSize:"14px",padding:"8px 20px",minWidth:"120px"},large:{fontSize:"14px",padding:"12px 24px",minWidth:"150px"},xlarge:{fontSize:"16px",padding:"20px 24px",minWidth:"200px"}}},httpBadges:{borderRadius:"16px",fontFamily:function(r){return r.typography.code.fontFamily},fontWeight:function(r){return r.typography.fontWeightBold},color:function(r){return r.colors.text.light},sizes:{medium:{fontSize:"12px",lineHeight:"20px"},small:{fontSize:"8px",lineHeight:"15px"}}},tryItButton:{fullWidth:!1},tryItSendButton:{fullWidth:!1},panels:{borderRadius:"8px"},layoutControls:{top:"20px",width:"36px",height:"36px"}},logo:{maxHeight:function(r){return r.sidebar.width},maxWidth:function(r){return r.sidebar.width},gutter:"2px"},rightPanel:{showAtBreakpoint:"medium",backgroundColor:"#1F2933",panelBackgroundColor:"#52606D",panelControlsBackgroundColor:"#323F4B",width:"37.5%",textColor:"#ffffff"},codeBlock:{backgroundColor:function(r){return r.rightPanel.panelControlsBackgroundColor}},shape:{borderRadius:"4px"},layout:{showDarkRightPanel:!0,stacked:{maxWidth:(_a={},_a[ZERO_BREAKPOINT]="",_a.small="90%",_a.medium="75%",_a.large="1200px",_a)},"three-panel":{middlePanelMaxWidth:"none",maxWidth:(_b={},_b[ZERO_BREAKPOINT]="100%",_b.small="100%",_b.medium="100%",_b.large="1800px",_b)}}};export default defaultTheme;export function resolveTheme(r){var o={},t=0,n=function(e,i){Object.keys(e).forEach((function(a){var l=(i?i+".":"")+a,c=e[a];"function"==typeof c?Object.defineProperty(e,a,{get:function(){if(!o[l]){if(++t>1e3)throw new Error("Theme probably contains circular dependency at "+l+": "+c.toString());o[l]=c(r)}return o[l]},enumerable:!0}):"object"==typeof c&&n(c,l)}))};return n(r,""),JSON.parse(JSON.stringify(r))}
2
2
  //# sourceMappingURL=theme.js.map
@@ -1,2 +1,2 @@
1
- import{__assign,__decorate}from"tslib";import{flattenByProp,SECURITY_SCHEMES_SECTION_PREFIX,querySelector,GROUP_DEPTH}from"../redoc-lib";import{action,observable,makeObservable}from"mobx";import{VersionedSpecStore}from"./VersionedSpecStore";import{SECTION_ATTR}from"../redoc-lib/src/services/constants";import{history as historyInst}from"../redoc-lib/src/services/HistoryService";var ProMenu=function(){function e(e,t,i,r){var n=this;Object.defineProperty(this,"definition",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"scroll",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"history",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"flatItems",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"items",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"activeRenderItemIdx",{enumerable:!0,configurable:!0,writable:!0,value:-1}),Object.defineProperty(this,"renderItems",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"activeItemIdx",{enumerable:!0,configurable:!0,writable:!0,value:-1}),Object.defineProperty(this,"sideBarOpened",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_unsubscribe",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_hashUnsubscribe",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"getItemById",{enumerable:!0,configurable:!0,writable:!0,value:function(e){return n.flatItems.find((function(t){return t.id===e}))}}),Object.defineProperty(this,"initOnHistory",{enumerable:!0,configurable:!0,writable:!0,value:function(e){void 0===e&&(e=n.history.currentId);var t,i=e.split(n.options.deepLinkPrefix)[0];i&&((t=n.flatItems.find((function(e){return e.id===i})))?(n.activate(t,!1,!1,!1,e),t.active=!1):i.startsWith(SECURITY_SCHEMES_SECTION_PREFIX)&&(t=n.flatItems.find((function(e){return SECURITY_SCHEMES_SECTION_PREFIX.startsWith(e.id)})),n.activate(t,!1,!1,!1,e),t&&(t.active=!1)))}}),Object.defineProperty(this,"updateOnHistory",{enumerable:!0,configurable:!0,writable:!0,value:function(e){void 0===e&&(e=n.history.currentId);var t,i=e.split(n.options.deepLinkPrefix)[0];if(i)if(t=n.flatItems.find((function(e){return e.id===i})))n.activateAndScroll(t,!1,void 0,e);else{var r=(n.history.basePath?n.history.basePath+"/":"")+SECURITY_SCHEMES_SECTION_PREFIX;i.startsWith(r)&&(t=n.flatItems.find((function(e){return SECURITY_SCHEMES_SECTION_PREFIX.startsWith(e.id)})),n.activate(t)),n.scroll.prevOffsetY=0,n.scroll.scrollIntoViewBySelector("["+SECTION_ATTR+'="'+i+'"]')}}}),Object.defineProperty(this,"updateVersionOnHistory",{enumerable:!0,configurable:!0,writable:!0,value:function(e){var t=e.split("/")[0],i=n.definition.versionsInfo.findIndex((function(e){return e.id===t}));i<0&&(i=n.definition.versionsInfo.findIndex((function(e){return e.isDefault}))),n.definition.activeVersionIdx!==i&&(n.definition.changeVersion(i<0?0:i),n.updateItemsByVersionChange(!1,e));var r=t+"/"+SECURITY_SCHEMES_SECTION_PREFIX;if(e.startsWith(r)){var o=n.flatItems.find((function(e){return r.startsWith(e.id)}));n.activate(o,!1,!0),setTimeout((function(){return n.scroll.scrollIntoViewBySelector("["+SECTION_ATTR+'="'+e+'"]')}),0)}}}),Object.defineProperty(this,"updateOnScroll",{enumerable:!0,configurable:!0,writable:!0,value:function(e){for(var t=e?1:-1,i=n.activeItemIdx;(-1!==i||e)&&!(i>=n.flatItems.length-1&&e);){if(e){var r=!1,o=n.flatItems[i+1];switch(n.options.pagination){case"section":r=o&&("spec"===o.type||"group"===o.type||"tag"===o.type);break;case"item":r="section"!==(null==o?void 0:o.type)}var a=n.getElementAt(i+1);if(-1===i&&"tag"===n.flatItems[0].type&&(r=!1),n.scroll.isElementBellow(a)||r)break}else{var s=n.flatItems[i]&&n.flatItems[i].type;r="section"===n.options.pagination&&("spec"===s||"group"===s||"tag"===s)||"item"===n.options.pagination&&"section"!==s,a=n.getElementAt(i);if(n.scroll.isElementAbove(a)||r)break}i+=t}var l=n.flatItems[i];"none"===n.options.pagination||"section"===n.options.pagination?l&&l.active||n.activate(l,!0,!0,!1):l&&"section"===l.type&&(l.active||n.activate(l,!0,!0,!1))}}),makeObservable(this),this.items=e.contentItems,this.flatItems=flattenByProp(this.items||[],"items"),this.flatItems.forEach((function(e,t){return e.absoluteIdx=t})),i.disableSidebar||this.subscribe(),this.flatItems.forEach((function(e,t){return normalizeItem(e,t,i.pagination,n.definition instanceof VersionedSpecStore,n.history)})),this.renderItems=this.buildRenderItems(0),this.activeItemIdx=-1,this.activeRenderItemIdx=-1,this.definition instanceof VersionedSpecStore&&this.history.subscribe(this.updateVersionOnHistory)}return Object.defineProperty(e,"updateOnHistory",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){void 0===e&&(e=historyInst.currentId),e&&t.scrollIntoViewBySelector("["+SECTION_ATTR+'="'+e+'"]')}}),Object.defineProperty(e.prototype,"subscribe",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._unsubscribe=this.scroll.subscribe(this.updateOnScroll),this._hashUnsubscribe=this.history.subscribe(this.updateOnHistory)}}),Object.defineProperty(e.prototype,"toggleSidebar",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sideBarOpened=!this.sideBarOpened}}),Object.defineProperty(e.prototype,"closeSidebar",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sideBarOpened=!1}}),Object.defineProperty(e.prototype,"getElementAt",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.flatItems[e];return t&&querySelector("["+SECTION_ATTR+'="'+t.id+'"]')||null}}),Object.defineProperty(e.prototype,"getElementAtOrFirstChild",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.flatItems[e];return t&&"group"===t.type&&(t=t.items[0]),t&&querySelector("["+SECTION_ATTR+'="'+t.id+'"]')||null}}),Object.defineProperty(e.prototype,"activeItem",{get:function(){return this.flatItems[this.activeItemIdx]||void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"updateItemsByVersionChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var i=this,r=this.activeItem&&this.activeItem.active?this.activeItem.absoluteIdx:-1;t=t&&withoutVersion(t)||this.activeItem&&this.activeItem.active&&withoutVersion(this.activeItem.id)||"",this.deactivate(this.activeItem),this.items=this.definition.contentItems,this.flatItems=flattenByProp(this.items||[],"items"),this.flatItems.forEach((function(e,t){return normalizeItem(e,t,i.options.pagination,i.definition instanceof VersionedSpecStore,i.history)}));var n=t?(this.flatItems.find((function(e){return withoutVersion(e.id)===t}))||{absoluteIdx:-1}).absoluteIdx:-1;if(-1!==n&&"none"!==this.options.pagination||(this.renderItems=this.buildRenderItems(0)),this.activeItemIdx=-1,-1!==n)this.activate(this.flatItems[n],e);else if(-1!==r)this.activateAndScroll(this.flatItems[0],e);else if(e){var o=this.definition.versionsInfo[this.definition.activeVersionIdx];if(!this.history.currentId&&o.isDefault)return;this.history.replace(o.id)}}}),Object.defineProperty(e.prototype,"buildRenderItems",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if("none"===this.options.pagination)return this.items;var t=this.flatItems[e];if(t||(t=this.flatItems[0]),"spec"===t.type)return this.buildRenderItems(e+1);if("section"===t.type){var i=[],r=getParentOfType(t,"tag");if("section"===this.options.pagination&&r)return[r];if("item"===this.options.pagination&&r)return[__assign(__assign({},r),{items:getLeadingSectionItems(r)})];for(var n=getParentSpecItem(t),o=(null==n?void 0:n.items)||this.items,a=0;a<o.length&&"section"===o[a].type;a++)i.push(o[a]);return i}switch(this.options.pagination){case"section":if("operation"===t.type&&t.parent)return[t.parent];if("group"!==t.type)return[t];case"item":return"operation"===t.type?[t]:[__assign(__assign({},t),{items:getLeadingSectionItems(t)})];default:return[]}}}),Object.defineProperty(e.prototype,"activateBase",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,i,r){var n,o,a,s=this;if(void 0===t&&(t=!0),void 0===i&&(i=!1),(null===(n=this.activeItem)||void 0===n?void 0:n.id)===(null==e?void 0:e.id)&&!r)return t&&e&&this.history.replace(e.id,i),void(e&&!e.active&&e.activate());if(!e||"group"!==e.type)if(this.deactivate(this.activeItem),e){if(!(e.depth<=GROUP_DEPTH)){this.activeItemIdx=e.absoluteIdx,t&&this.history.replace(e.id,i),e.activate(),e.expand();var l=new URLSearchParams(r),c="request"===l.get("t"),u="response"===l.get("t"),d=l.get("c"),f=l.get("ct"),p=l.get("in"),v=l.get("path"),b=(null==v?void 0:v.split(this.options.deepLinkSeparator))||[],h=e;if(p)for(var m=h.parameters,I=function(e){var t=null==m?void 0:m.find((function(t){return t.name===e}));null==t||t.expand(),m=null===(o=null==t?void 0:t.schema)||void 0===o?void 0:o.fields},y=0,g=b;y<g.length;y++){I(g[y])}else if(c){var O=null===(a=h.requestBody)||void 0===a?void 0:a.content;h.activateMimeName(f||h.activeMimeName),setTimeout((function(){var e;return s.activateField(b,null===(e=null==O?void 0:O.active)||void 0===e?void 0:e.schema)}),0)}else if(u){var S=h.responses.find((function(e){return e.code===d}));(null==S?void 0:S.expanded)||null==S||S.expand(),h.activateMimeName(f||h.activeMimeName),setTimeout((function(){var e,t;return s.activateField(b,null===(t=null===(e=null==S?void 0:S.content)||void 0===e?void 0:e.active)||void 0===t?void 0:t.schema)}),0)}}}else this.history.replace("",i)}}),Object.defineProperty(e.prototype,"activate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,i,r,n){var o=this;if(void 0===t&&(t=!0),void 0===i&&(i=!1),void 0===r&&(r=!0),"none"===this.options.pagination)return this.activateBase(e,t,i,n),void(!e&&this.definition instanceof VersionedSpecStore&&this.history.replace(this.definition.currentVersionId,!0));if("group"!==(null==e?void 0:e.type)){if(e&&"item"===this.options.pagination&&"tag"===e.type&&!e.description){if(e.expanded)return void e.collapse();e.expand(),e=this.flatItems[e.absoluteIdx+1]}if(this.activateBase(e,e&&t,i,n),this.activeRenderItemIdx=e?e.absoluteIdx:this.activeRenderItemIdx,this.activeRenderItemIdx>=0){var a=this.buildRenderItems(this.activeRenderItemIdx);a.some((function(e,t){return e.id!==o.renderItems[t].id}))&&(this.renderItems=a),this.renderItems[0]&&(this.activeRenderItemIdx=this.renderItems[0].absoluteIdx)}r&&setTimeout((function(){return o.scrollToActive()})),!e&&this.definition instanceof VersionedSpecStore&&this.history.replace(this.definition.currentVersionId,!0)}}}),Object.defineProperty(e.prototype,"activateField",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){for(var i,r=function(r){var n=e[r],o=r===e.length-1;if((null==t?void 0:t.hasType("array"))&&(null==t?void 0:t.items)&&(t=null==t?void 0:t.items),null==t?void 0:t.oneOf){var a=Number(n);return null==t||t.activateOneOf(a),t=null==t?void 0:t.oneOf[a],"continue"}(null==t?void 0:t.hasType("array"))&&(null==t?void 0:t.items)&&(t=null==t?void 0:t.items);var s=null===(i=null==t?void 0:t.fields)||void 0===i?void 0:i.find((function(e){return e.name===n}));o||null==s||s.expand(),t=null==s?void 0:s.schema},n=0;n<e.length-1;n++)r(n)}}),Object.defineProperty(e.prototype,"deactivate",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(void 0!==e)for(e.deactivate();void 0!==e;)e.collapse(),e=e.parent}}),Object.defineProperty(e.prototype,"activateAndScroll",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,i,r){void 0===r&&(r="");var n=r.split(this.options.deepLinkPrefix)[1],o=e&&this.getItemById(e.id)||e;this.activate(o,t,i,!1,n),this.scrollToActive(n?r:""),o&&o.items.length||this.closeSidebar()}}),Object.defineProperty(e.prototype,"scrollToActive",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;e?setTimeout((function(){return t.scroll.scrollIntoViewBySelector("["+SECTION_ATTR+'="'+e+'"]')}),0):this.scroll.scrollIntoView(this.getElementAt(this.activeItemIdx))}}),Object.defineProperty(e.prototype,"dispose",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e,t;null===(e=this._unsubscribe)||void 0===e||e.call(this),null===(t=this._hashUnsubscribe)||void 0===t||t.call(this)}}),__decorate([observable],e.prototype,"flatItems",void 0),__decorate([observable],e.prototype,"items",void 0),__decorate([observable],e.prototype,"activeRenderItemIdx",void 0),__decorate([observable.ref],e.prototype,"renderItems",void 0),__decorate([observable],e.prototype,"activeItemIdx",void 0),__decorate([observable],e.prototype,"sideBarOpened",void 0),__decorate([action],e.prototype,"toggleSidebar",null),__decorate([action],e.prototype,"closeSidebar",null),__decorate([action],e.prototype,"activateBase",null),__decorate([action],e.prototype,"activate",null),__decorate([action.bound],e.prototype,"activateAndScroll",null),e}();export{ProMenu};function withoutVersion(e){return e.split("/").slice(1).join("/")}function getParentSpecItem(e){for(;e;){if("spec"===e.type)return e;e=e.parent}}function getParentOfType(e,t){if(e&&e.parent)return e.parent.type===t?e.parent:getParentOfType(e.parent,t)}function getLeadingSectionItems(e){for(var t=[],i=0,r=e.items;i<r.length;i++){var n=r[i];if("section"!==n.type)break;t.push(n)}return t}function normalizeItem(e,t,i,r,n){if(e.absoluteIdx=t,"none"!==i){var o=getParentOfType(e,"tag");if(e.parent&&o&&!("_id_normalized"in e)){if(r){var a=e.id.split("/"),s=a[0],l=a[1],c=withoutVersion(e.id);if("operation"===e.type&&!l.startsWith("operation"))return;e.id=s+"/"+withoutVersion(o.id)+"/"+c}else{if("operation"===e.type&&!e.id.startsWith("operation"))return;e.id=o.id+"/"+e.id}e._id_normalized=!0}}"group"!==e.type&&(e.href=n.linkForId(e.id))}
1
+ import{__assign,__decorate}from"tslib";import{flattenByProp,SECURITY_SCHEMES_SECTION_PREFIX,querySelector,GROUP_DEPTH}from"../redoc-lib";import{action,observable,makeObservable}from"mobx";import{VersionedSpecStore}from"./VersionedSpecStore";import{SECTION_ATTR}from"../redoc-lib/src/services/constants";import{history as historyInst}from"../redoc-lib/src/services/HistoryService";var ProMenu=function(){function e(e,t,i,r){var n=this;Object.defineProperty(this,"definition",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"scroll",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"history",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"flatItems",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"items",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"activeRenderItemIdx",{enumerable:!0,configurable:!0,writable:!0,value:-1}),Object.defineProperty(this,"renderItems",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"activeItemIdx",{enumerable:!0,configurable:!0,writable:!0,value:-1}),Object.defineProperty(this,"sideBarOpened",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_unsubscribe",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_hashUnsubscribe",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"getItemById",{enumerable:!0,configurable:!0,writable:!0,value:function(e){return n.flatItems.find((function(t){return t.id===e}))}}),Object.defineProperty(this,"initOnHistory",{enumerable:!0,configurable:!0,writable:!0,value:function(e){void 0===e&&(e=n.history.currentId);var t,i=e.split(n.options.deepLinkPrefix)[0];i&&((t=n.flatItems.find((function(e){return e.id===i})))?(n.activate(t,!1,!1,!1,e),t.active=!1):i.startsWith(SECURITY_SCHEMES_SECTION_PREFIX)&&(t=n.flatItems.find((function(e){return SECURITY_SCHEMES_SECTION_PREFIX.startsWith(e.id)})),n.activate(t,!1,!1,!1,e),t&&(t.active=!1)))}}),Object.defineProperty(this,"updateOnHistory",{enumerable:!0,configurable:!0,writable:!0,value:function(e){void 0===e&&(e=n.history.currentId);var t,i=e.split(n.options.deepLinkPrefix)[0];if(i)if(t=n.flatItems.find((function(e){return e.id===i})))n.activateAndScroll(t,!1,void 0,e);else{if(i.includes(SECURITY_SCHEMES_SECTION_PREFIX)&&(t=n.flatItems.find((function(e){return SECURITY_SCHEMES_SECTION_PREFIX.startsWith(e.id)})),n.activate(t)),n.scroll.prevOffsetY=0,n.history.basePath){var r=i.split(n.history.basePath+"/")[1];i=r||i}n.scroll.scrollIntoViewBySelector("["+SECTION_ATTR+'="'+i+'"]')}}}),Object.defineProperty(this,"updateVersionOnHistory",{enumerable:!0,configurable:!0,writable:!0,value:function(e){var t=e.split("/")[0],i=n.definition.versionsInfo.findIndex((function(e){return e.id===t}));i<0&&(i=n.definition.versionsInfo.findIndex((function(e){return e.isDefault}))),n.definition.activeVersionIdx!==i&&(n.definition.changeVersion(i<0?0:i),n.updateItemsByVersionChange(!1,e));var r=t+"/"+SECURITY_SCHEMES_SECTION_PREFIX;if(e.startsWith(r)){var o=n.flatItems.find((function(e){return r.startsWith(e.id)}));n.activate(o,!1,!0),setTimeout((function(){return n.scroll.scrollIntoViewBySelector("["+SECTION_ATTR+'="'+e+'"]')}),0)}}}),Object.defineProperty(this,"updateOnScroll",{enumerable:!0,configurable:!0,writable:!0,value:function(e){for(var t=e?1:-1,i=n.activeItemIdx;(-1!==i||e)&&!(i>=n.flatItems.length-1&&e);){if(e){var r=!1,o=n.flatItems[i+1];switch(n.options.pagination){case"section":r=o&&("spec"===o.type||"group"===o.type||"tag"===o.type);break;case"item":r="section"!==(null==o?void 0:o.type)}var a=n.getElementAt(i+1);if(-1===i&&"tag"===n.flatItems[0].type&&(r=!1),n.scroll.isElementBellow(a)||r)break}else{var s=n.flatItems[i]&&n.flatItems[i].type;r="section"===n.options.pagination&&("spec"===s||"group"===s||"tag"===s)||"item"===n.options.pagination&&"section"!==s,a=n.getElementAt(i);if(n.scroll.isElementAbove(a)||r)break}i+=t}var l=n.flatItems[i];"none"===n.options.pagination||"section"===n.options.pagination?l&&l.active||n.activate(l,!0,!0,!1):l&&"section"===l.type&&(l.active||n.activate(l,!0,!0,!1))}}),makeObservable(this),this.items=e.contentItems,this.flatItems=flattenByProp(this.items||[],"items"),this.flatItems.forEach((function(e,t){return e.absoluteIdx=t})),i.disableSidebar||this.subscribe(),this.flatItems.forEach((function(e,t){return normalizeItem(e,t,i.pagination,n.definition instanceof VersionedSpecStore,n.history)})),this.renderItems=this.buildRenderItems(0),this.activeItemIdx=-1,this.activeRenderItemIdx=-1,this.definition instanceof VersionedSpecStore&&this.history.subscribe(this.updateVersionOnHistory)}return Object.defineProperty(e,"updateOnHistory",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){void 0===e&&(e=historyInst.currentId),e&&t.scrollIntoViewBySelector("["+SECTION_ATTR+'="'+e+'"]')}}),Object.defineProperty(e.prototype,"subscribe",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._unsubscribe=this.scroll.subscribe(this.updateOnScroll),this._hashUnsubscribe=this.history.subscribe(this.updateOnHistory)}}),Object.defineProperty(e.prototype,"toggleSidebar",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sideBarOpened=!this.sideBarOpened}}),Object.defineProperty(e.prototype,"closeSidebar",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sideBarOpened=!1}}),Object.defineProperty(e.prototype,"getElementAt",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.flatItems[e];return t&&querySelector("["+SECTION_ATTR+'="'+t.id+'"]')||null}}),Object.defineProperty(e.prototype,"getElementAtOrFirstChild",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.flatItems[e];return t&&"group"===t.type&&(t=t.items[0]),t&&querySelector("["+SECTION_ATTR+'="'+t.id+'"]')||null}}),Object.defineProperty(e.prototype,"activeItem",{get:function(){return this.flatItems[this.activeItemIdx]||void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"updateItemsByVersionChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var i=this,r=this.activeItem&&this.activeItem.active?this.activeItem.absoluteIdx:-1;t=t&&withoutVersion(t)||this.activeItem&&this.activeItem.active&&withoutVersion(this.activeItem.id)||"",this.deactivate(this.activeItem),this.items=this.definition.contentItems,this.flatItems=flattenByProp(this.items||[],"items"),this.flatItems.forEach((function(e,t){return normalizeItem(e,t,i.options.pagination,i.definition instanceof VersionedSpecStore,i.history)}));var n=t?(this.flatItems.find((function(e){return withoutVersion(e.id)===t}))||{absoluteIdx:-1}).absoluteIdx:-1;if(-1!==n&&"none"!==this.options.pagination||(this.renderItems=this.buildRenderItems(0)),this.activeItemIdx=-1,-1!==n)this.activate(this.flatItems[n],e);else if(-1!==r)this.activateAndScroll(this.flatItems[0],e);else if(e){var o=this.definition.versionsInfo[this.definition.activeVersionIdx];if(!this.history.currentId&&o.isDefault)return;this.history.replace(o.id)}}}),Object.defineProperty(e.prototype,"buildRenderItems",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if("none"===this.options.pagination)return this.items;var t=this.flatItems[e];if(t||(t=this.flatItems[0]),"spec"===t.type)return this.buildRenderItems(e+1);if("section"===t.type){var i=[],r=getParentOfType(t,"tag");if("section"===this.options.pagination&&r)return[r];if("item"===this.options.pagination&&r)return[__assign(__assign({},r),{items:getLeadingSectionItems(r)})];for(var n=getParentSpecItem(t),o=(null==n?void 0:n.items)||this.items,a=0;a<o.length&&"section"===o[a].type;a++)i.push(o[a]);return i}switch(this.options.pagination){case"section":if("operation"===t.type&&t.parent)return[t.parent];if("group"!==t.type)return[t];case"item":return"operation"===t.type?[t]:[__assign(__assign({},t),{items:getLeadingSectionItems(t)})];default:return[]}}}),Object.defineProperty(e.prototype,"activateBase",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,i,r){var n,o,a,s=this;if(void 0===t&&(t=!0),void 0===i&&(i=!1),(null===(n=this.activeItem)||void 0===n?void 0:n.id)===(null==e?void 0:e.id)&&!r)return t&&e&&this.history.replace(e.id,i),void(e&&!e.active&&e.activate());if(!e||"group"!==e.type)if(this.deactivate(this.activeItem),e){if(!(e.depth<=GROUP_DEPTH)){this.activeItemIdx=e.absoluteIdx,t&&this.history.replace(e.id,i),e.activate(),e.expand();var l=new URLSearchParams(r),c="request"===l.get("t"),u="response"===l.get("t"),d=l.get("c"),f=l.get("ct"),p=l.get("in"),v=l.get("path"),b=(null==v?void 0:v.split(this.options.deepLinkSeparator))||[],h=e;if(p)for(var m=h.parameters,I=function(e){var t=null==m?void 0:m.find((function(t){return t.name===e}));null==t||t.expand(),m=null===(o=null==t?void 0:t.schema)||void 0===o?void 0:o.fields},y=0,g=b;y<g.length;y++){I(g[y])}else if(c){var O=null===(a=h.requestBody)||void 0===a?void 0:a.content;h.activateMimeName(f||h.activeMimeName),setTimeout((function(){var e;return s.activateField(b,null===(e=null==O?void 0:O.active)||void 0===e?void 0:e.schema)}),0)}else if(u){var S=h.responses.find((function(e){return e.code===d}));(null==S?void 0:S.expanded)||null==S||S.expand(),h.activateMimeName(f||h.activeMimeName),setTimeout((function(){var e,t;return s.activateField(b,null===(t=null===(e=null==S?void 0:S.content)||void 0===e?void 0:e.active)||void 0===t?void 0:t.schema)}),0)}}}else this.history.replace("",i)}}),Object.defineProperty(e.prototype,"activate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,i,r,n){var o=this;if(void 0===t&&(t=!0),void 0===i&&(i=!1),void 0===r&&(r=!0),"none"===this.options.pagination)return this.activateBase(e,t,i,n),void(!e&&this.definition instanceof VersionedSpecStore&&this.history.replace(this.definition.currentVersionId,!0));if("group"!==(null==e?void 0:e.type)){if(e&&"item"===this.options.pagination&&"tag"===e.type&&!e.description){if(e.expanded)return void e.collapse();e.expand(),e=this.flatItems[e.absoluteIdx+1]}if(this.activateBase(e,e&&t,i,n),this.activeRenderItemIdx=e?e.absoluteIdx:this.activeRenderItemIdx,this.activeRenderItemIdx>=0){var a=this.buildRenderItems(this.activeRenderItemIdx);a.some((function(e,t){return e.id!==o.renderItems[t].id}))&&(this.renderItems=a),this.renderItems[0]&&(this.activeRenderItemIdx=this.renderItems[0].absoluteIdx)}r&&setTimeout((function(){return o.scrollToActive()})),!e&&this.definition instanceof VersionedSpecStore&&this.history.replace(this.definition.currentVersionId,!0)}}}),Object.defineProperty(e.prototype,"activateField",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){for(var i,r=function(r){var n=e[r],o=r===e.length-1;if((null==t?void 0:t.hasType("array"))&&(null==t?void 0:t.items)&&(t=null==t?void 0:t.items),null==t?void 0:t.oneOf){var a=Number(n);return null==t||t.activateOneOf(a),t=null==t?void 0:t.oneOf[a],"continue"}(null==t?void 0:t.hasType("array"))&&(null==t?void 0:t.items)&&(t=null==t?void 0:t.items);var s=null===(i=null==t?void 0:t.fields)||void 0===i?void 0:i.find((function(e){return e.name===n}));o||null==s||s.expand(),t=null==s?void 0:s.schema},n=0;n<e.length-1;n++)r(n)}}),Object.defineProperty(e.prototype,"deactivate",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(void 0!==e)for(e.deactivate();void 0!==e;)e.collapse(),e=e.parent}}),Object.defineProperty(e.prototype,"activateAndScroll",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,i,r){void 0===r&&(r="");var n=r.split(this.options.deepLinkPrefix)[1],o=e&&this.getItemById(e.id)||e;this.activate(o,t,i,!1,n),this.scrollToActive(n?r:""),o&&o.items.length||this.closeSidebar()}}),Object.defineProperty(e.prototype,"scrollToActive",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;e?setTimeout((function(){return t.scroll.scrollIntoViewBySelector("["+SECTION_ATTR+'="'+e+'"]')}),0):this.scroll.scrollIntoView(this.getElementAt(this.activeItemIdx))}}),Object.defineProperty(e.prototype,"dispose",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e,t;null===(e=this._unsubscribe)||void 0===e||e.call(this),null===(t=this._hashUnsubscribe)||void 0===t||t.call(this)}}),__decorate([observable],e.prototype,"flatItems",void 0),__decorate([observable],e.prototype,"items",void 0),__decorate([observable],e.prototype,"activeRenderItemIdx",void 0),__decorate([observable.ref],e.prototype,"renderItems",void 0),__decorate([observable],e.prototype,"activeItemIdx",void 0),__decorate([observable],e.prototype,"sideBarOpened",void 0),__decorate([action],e.prototype,"toggleSidebar",null),__decorate([action],e.prototype,"closeSidebar",null),__decorate([action],e.prototype,"activateBase",null),__decorate([action],e.prototype,"activate",null),__decorate([action.bound],e.prototype,"activateAndScroll",null),e}();export{ProMenu};function withoutVersion(e){return e.split("/").slice(1).join("/")}function getParentSpecItem(e){for(;e;){if("spec"===e.type)return e;e=e.parent}}function getParentOfType(e,t){if(e&&e.parent)return e.parent.type===t?e.parent:getParentOfType(e.parent,t)}function getLeadingSectionItems(e){for(var t=[],i=0,r=e.items;i<r.length;i++){var n=r[i];if("section"!==n.type)break;t.push(n)}return t}function normalizeItem(e,t,i,r,n){if(e.absoluteIdx=t,"none"!==i){var o=getParentOfType(e,"tag");if(e.parent&&o&&!("_id_normalized"in e)){if(r){var a=e.id.split("/"),s=a[0],l=a[1],c=withoutVersion(e.id);if("operation"===e.type&&!l.startsWith("operation"))return;e.id=s+"/"+withoutVersion(o.id)+"/"+c}else{if("operation"===e.type&&!e.id.startsWith("operation"))return;e.id=o.id+"/"+e.id}e._id_normalized=!0}}"group"!==e.type&&(e.href=n.linkForId(e.id))}
2
2
  //# sourceMappingURL=ProMenu.js.map