import{r as f,m as w,g as r,G as T,u as Y,O as Z,j as t,y as S,bz as F,B as O,ag as re,W as I,b as D,ef as ke,av as ve,a as Ne,A as me,bq as V,eg as Te,bn as ae,eh as Se,x as K,V as W,w as q,b3 as ue,ac as G,b5 as xe,b4 as ge,cC as Be,I as $,cn as we,c4 as Ce,au as $e,c5 as Ae,Z as We,ei as He,d6 as ee,dk as Le,a8 as he,H as qe,cD as ze}from"./index-Csef3-wA.js";import Oe from"./index-CQxAId2n.js";import{I as be}from"./Icon-o1TUwOIX.js";import{u as Ie}from"./array-DNd3lQ_r.js";import"./reviews-CoLGA8Lj.js";import"./language-DKIuA-OH.js";import"./hooks-DWQDL114.js";import"./index-C99wF7dD.js";const te=f.createContext({apiData:null}),ne={url:"https://fonts.googleapis.com/css2?family=Roboto+Mono&display=swap",fontFamily:"'Roboto Mono', monospace"},A={default:"Default: ",enum:"Enum: ",required:"Required",example:"Example: ",char:"characters",oneOf:"One of:",arrayIn:"Array [",arrayOut:"]"},X=e=>e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").trim().toLowerCase().replace(/\s+/g,"-"):"",L=(e,o)=>{if(e===null||typeof e!="object"||!o)return e;if(Array.isArray(e))return e.map(i=>L(i,o));if("$ref"in e){const s=e.$ref.split("/"),d=s[s.length-1];return{...L(o[d],o),refName:d}}if("oneOf"in e){const i=e.oneOf.map(s=>L(s,o));return{oneOf:e.oneOf.map(s=>L(s,o)),...(i==null?void 0:i[0])||{}}}return"allOf"in e?e.allOf.reduce((i,s)=>{const d=L(s,o);return{...i,...d}},{}):Object.entries(e).reduce((i,[s,d])=>(i[s]=L(d,o),i),{})},_=e=>{const o={};return e!=null&&e.items?[_(e.items)]:(e!=null&&e.properties&&Object.entries(e.properties).forEach(([i,s])=>{s.example!==void 0?o[i]=s.example:s.type==="integer"?o[i]=0:s.type==="string"?o[i]="string":s.type==="boolean"?o[i]=!0:s.type==="object"&&s.properties?o[i]=_(s):s.type==="array"&&s.items?o[i]=[_(s.items)]:o[i]=null}),o)},se=1029,Fe=w(e=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",height:80,[e.breakpoints.down("md")]:{height:50}},logoLink:{},logoImg:{verticalAlign:"middle"},menuWrapper:{},menuLink:{whiteSpace:"noWrap",fontSize:15,color:r.white,fontWeight:400,lineHeight:"21px",background:"transparent",border:0,outline:0,cursor:"pointer",padding:"6px 7px",display:"block",position:"relative",transition:"color 0.25s ease","&.active, &:hover":{color:r.gray.dark},"&:before":{content:"''",height:2,background:r.primary.blue,position:"absolute",bottom:-2,left:"50%",transition:"all 0.25s ease",width:0},"&.active:before, &:hover:before":{left:7,width:"calc(100% - 13px)"}},actionButton:{minWidth:128,borderColor:r.white,background:"transparent",color:r.white,"&:hover:not(.Mui-disabled), &:active:not(.Mui-disabled)":{borderColor:r.white,background:r.white,color:r.black},"&:active:not(.Mui-disabled)":{background:r.gray.light}}}),"DocHeader-TopMenu"),De=w(e=>({root:{background:r.black},menuWrapper:{width:"100%",paddingBottom:12,[e.breakpoints.down("md")]:{paddingTop:8}},menuItem:{display:"flex",alignItems:"center",justifyContent:"center",width:"auto",padding:0},menuLink:{padding:"28px 33px",display:"flex",alignItems:"center",verticalAlign:"middle",justifyContent:"center",fontWeight:700,fontSize:16,lineHeight:"20px",color:T.opacity(r.white,.5),position:"relative",transition:"color 0.25s ease","&::before":{position:"absolute",display:"block",content:"''",bottom:-12,width:12,height:0,border:"none",borderLeft:"12px solid transparent",borderRight:"12px solid transparent",borderBottom:`0px solid ${r.white}`,transition:T.transition()},"&:hover":{color:T.opacity(r.white,.7)},".selected &":{color:r.white,"&::before":{borderBottom:`12px solid ${r.white}`}},".sticky &":{padding:"16px 33px"},[e.breakpoints.down("md")]:{"&, .sticky &":{padding:"14px 13px"}}},menuIcon:{marginRight:12},menuText:{},submenuWrapper:{background:"#f8f8f8",height:64,display:"flex",alignItems:"center",justifyContent:"center",[e.breakpoints.down("md")]:{height:52}},submenuItemsWrapper:{display:"flex",gap:22,padding:"0 20px",overflow:"auto",[e.breakpoints.down("md")]:{gap:10}},submenuButton:{fontWeight:700,fontSize:14,height:64,whiteSpace:"nowrap",lineHeight:"20px",color:T.opacity(r.black,.5),padding:"6px 0",borderBottom:"4px solid transparent",transition:T.transition(),"&:hover":{color:T.opacity(r.black,.8)},".selected &":{color:r.black,borderColor:r.primary.blue},[e.breakpoints.down("md")]:{fontSize:12,height:52}},submenuText:{},bottomContent:{background:r.black,".sticky &":{position:"fixed",top:0,left:0,width:"100%",zIndex:5e3}}}),"DocHeader-BottomMenu"),Ee=w(e=>({root:{background:r.black,color:r.white,position:"relative"},container:{position:"relative"},gradientBg:{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:"linear-gradient(180deg, #220E27 18.66%, #000000 100%)",transform:"matrix(1, 0, 0, -1, 0, 0)"},top:{},menuWrapper:{},content:{padding:"48px 20px 70px",maxWidth:870,[e.breakpoints.down("md")]:{padding:"45px 0 36px"}},title:{fontWeight:700,fontSize:56,lineHeight:"72px",textAlign:"center",color:r.white,[e.breakpoints.down("md")]:{fontSize:32,lineHeight:"42px"}},text:{fontWeight:400,fontSize:18,lineHeight:"28px",textAlign:"center",color:r.white,marginTop:24,[e.breakpoints.down("md")]:{fontSize:16,lineHeight:"24px",marginTop:16}}}),"DocHeader"),Pe={qr:"qr_code",folder:"folder",faq:"circle_question"},Re=(e=null,o=null)=>{if(!e||!o)return[];const{paths:i={}}=e;return Object.keys(i).reduce((d,m)=>{const g=i[m],p=Object.keys(g).map(n=>{var h,k;if(!((k=(h=g==null?void 0:g[n])==null?void 0:h.tags)!=null&&k.includes(o)))return null;const x=(g==null?void 0:g[n])||{};return{method:n,name:x.description||x.summary||""}}).filter(Boolean);return[...d,...p]},[])},Ue=e=>e<0;function _e(){var j;const e=De(),{tag:o,method:i}=Y(),{apiData:s}=f.useContext(te),d=Z(),m=f.useRef(null),[g,p]=f.useState(!1),n=(l,b="push")=>{l&&(d==null||d[b](`${I.apiDocs.replace(":tag?",l).replace(":method?","")}`))},x=(l,b="push")=>{l&&(d==null||d[b](`${I.apiDocs.replace(":tag?",o).replace(":method?",X(l))}`))},h=Re(s,o),k=f.useCallback(()=>{var u;const{y:l=1e3}=((u=m==null?void 0:m.current)==null?void 0:u.getBoundingClientRect())||{},b=Ue(l+50);p(b)},[g,m==null?void 0:m.current]),a=[...(s==null?void 0:s.tags)||[],{name:"FAQ"}];return f.useEffect(()=>(window.addEventListener("scroll",k),()=>window.removeEventListener("scroll",k)),[]),f.useEffect(()=>{if(!o&&(a==null?void 0:a.length)>1){const l=a==null?void 0:a[0];l&&n(l.name,"replace")}},[o,a]),f.useEffect(()=>{if(!i&&h){const l=h==null?void 0:h[0];l&&x(l.name,"replace")}},[o,i,h]),t.jsxs("div",{className:S([e.root,{sticky:g}]),ref:m,children:[t.jsx("div",{className:e.fixedFill,style:{height:g?(j=m.current)==null?void 0:j.clientHeight:0}}),t.jsxs("div",{className:e.bottomContent,children:[t.jsx("div",{className:e.menuWrapper,children:t.jsx(F,{maxWidth:se,children:t.jsx(O,{component:"ul",display:"flex",children:a&&!!a.length&&a.map((l,b)=>{const u=Pe[l==null?void 0:l.name.toLowerCase()];return t.jsx(O,{component:"li",display:"flex",alignItems:"center",className:S([e.menuItem,{selected:o===l.name}]),children:t.jsxs(re,{disableRipple:!0,className:e.menuLink,onClick:()=>n(l.name),children:[u&&t.jsx(be,{name:u,className:e.menuIcon,size:24}),t.jsx("span",{className:e.menuText,children:l.name})]})},`BottomMenu-menuItems--${b.toString()}`)})})})}),h&&!!h.length&&t.jsx("div",{className:e.submenuWrapper,children:t.jsx("div",{className:e.submenuItemsWrapper,children:h.map((l,b)=>{const u=i===X(l.name);return t.jsx(O,{component:"li",display:"flex",alignItems:"center",className:S([e.submenuItem,{selected:u}]),children:t.jsx(re,{disableRipple:!0,className:e.submenuButton,onClick:()=>x(l.name),children:t.jsx("span",{className:e.submenuText,children:l.name})})},`BottomMenu-submenuItems--${b.toString()}`)})})})]})]})}function Qe(){const e=D(),o=ke(),i=Fe(),s=Z(),{pathname:d}=ve(),m=Ne(x=>{var h;return(h=x.user)==null?void 0:h.loggedIn}),g=me("lgDown"),p=e.formatMessage({id:"altLogo"}),n=e.formatMessage({id:"titleLogo"});return t.jsxs("div",{className:i.root,children:[t.jsx(V,{className:i.logoLink,to:I.home,title:n,children:t.jsx("img",{src:Te,alt:p,title:p,width:g?94:104,height:"auto",style:{verticalAlign:"top"}})}),t.jsx(ae,{mdUp:!0,children:t.jsx(Se,{variant:"dark"})}),t.jsxs(ae,{mdDown:!0,children:[t.jsx("div",{className:i.menuWrapper,children:t.jsx(O,{component:"ul",display:"flex",children:o.map((x,h)=>t.jsx(O,{component:"li",px:4,display:"flex",alignItems:"center",children:x.to?t.jsx(V,{className:S([i.menuLink,{active:d.startsWith(x.to)}]),to:x.to,children:x.label}):t.jsx("a",{className:i.menuLink,href:x.href,children:x.label})},`Menu-menuItems--${h.toString()}`))})}),t.jsx(K,{onClick:()=>{let x="/login";return m&&(x=I.dashboard),s.push(x)},className:i.actionButton,variant:"outlined",size:"small",children:t.jsx(W,{id:"common.login"})})]})]})}function Ve(){const e=Ee(),{tag:o,method:i}=Y(),s=f.useRef(null);return f.useEffect(()=>{s!=null&&s.current&&window.scrollY>100&&window.scrollTo({top:s.current.clientHeight-100})},[s==null?void 0:s.current,o,i]),t.jsxs("div",{className:e.root,ref:s,children:[t.jsx("div",{className:e.gradientBg}),t.jsxs("div",{className:e.container,children:[t.jsxs(F,{maxWidth:se,children:[t.jsx(Qe,{}),t.jsxs("div",{className:e.content,children:[t.jsx("h2",{className:e.title,children:t.jsx(W,{id:"docs.topTitle"})}),t.jsx("p",{className:e.text,children:t.jsx(W,{id:"docs.topText"})})]})]}),t.jsx(_e,{})]})]})}const Ge=q((e,o,i)=>({root:{boxShadow:"none",marginTop:0,backgroundColor:"transparent",borderBottom:"1px solid #CDD1E0","&:before":{display:"none"},[`&.${i.expanded}`]:{marginTop:0},"&:last-child":{marginBottom:0}},expanded:{}}),"Accordion")(ue),Je=q(e=>({root:o=>({fontSize:20,fontWeight:700,lineHeight:"32px",padding:0,"&, &.Mui-expanded":{minHeight:88},[e.breakpoints.down("md")]:{lineHeight:"18px",fontSize:o.small?13:16,"&, &.Mui-expanded":{minHeight:72}}}),expandIconWrapper:{color:r.primary.blue}}),"AccordionSummary")(G(ge,["hasPadding","small"])),Me=q(e=>({root:{padding:"0 0 36px 0",fontSize:16,lineHeight:"28px",color:r.gray.darkest,display:"block","& a":{color:r.primary.blue,transition:T.transition(),"&:hover":{color:r.primary.darkBlue}},[e.breakpoints.down("md")]:{padding:"0 0 24px 0",fontSize:13,lineHeight:"24px"}}}),"AccordionDetails")(xe),Xe=f.createContext(!1);function Ye({expanded:e,...o}){return t.jsx(Xe.Provider,{value:e,children:t.jsx(Ge,{expanded:e,square:!0,...o})})}function Ze({hasPadding:e=!0,...o}){return t.jsx(Je,{expandIcon:t.jsx(Be,{}),hasPadding:e,...o})}const Ke=$("li")(({theme:e})=>({position:"relative",fontSize:16,lineHeight:"30px",color:r.gray.darkest,marginBottom:10,"&::before":{content:"''",display:"inline-block",verticalAlign:"middle",width:6,height:6,marginRight:15,borderRadius:"100%",background:r.black},[e.breakpoints.down("md")]:{fontSize:13,lineHeight:"24px","&::before":{width:4,height:4}}}),"CollapsibleList-ListItem"),et={Container:$("section")(({theme:e})=>({paddingTop:40,paddingBottom:40,position:"relative",[e.breakpoints.up("md")]:{paddingTop:100,paddingBottom:200}}),"Faqs-Container")},C={Container:$("div")(({theme:e})=>({marginTop:40,background:r.white,borderRadius:8,[e.breakpoints.down("lg")]:{marginTop:16}}),"CollapsibleList-Container"),ListGroup:$("ul")({width:"100%",paddingLeft:25,marginTop:10},"CollapsibleList-ListGroup"),ListItem:Ke,ItemTitle:$("h2")({fontWeight:"inherit",fontSize:"inherit"},"CollapsibleList-ItemTitle"),BottomWrapper:$("div")(({theme:e})=>({padding:16,display:"flex",flexDirection:"column",alignItems:"center",[e.breakpoints.up("md")]:{padding:"56px 0 0"}})),BottomContent:$("div")(({theme:e})=>({width:"100%",padding:"35px",display:"flex",flexDirection:"column",alignItems:"center",background:r.gray.light,[e.breakpoints.up("md")]:{padding:"60px 35px"}})),BottomTitle:$("h2")(({theme:e})=>({marginBottom:20,color:r.black,fontWeight:700,fontSize:40,lineHeight:"48px",[e.breakpoints.down("md")]:{fontSize:20,lineHeight:"24px",marginBottom:12}}),"Faqs-BottomTittle"),BottomText:$("div")(({theme:e})=>({fontSize:14,lineHeight:"24px",color:r.gray.darkest,marginBottom:16,textAlign:"center",maxWidth:208,[e.breakpoints.up("md")]:{fontSize:20,lineHeight:"34px",marginBottom:44,maxWidth:586}}),"Faqs-BottomText"),ButtonWrapper:$("h2")({width:"100%",display:"flex",justifyContent:"center"},"Faqs-ButtonWrapper"),Button:q(e=>({root:{minWidth:264,[e.breakpoints.down("sm")]:{width:"calc(100% - 30px)",minWidth:0}}}),"Faqs-Button")(K)};function tt({items:e}){const o=D(),[i,s]=f.useState(null);function d(n,x){s(x?n:!1)}const m=window.navigator.userAgent.indexOf(we)!==-1;f.useEffect(()=>{s(null)},[e]);const g=Ce("FAQPage",{mainEntity:e.map(n=>({"@type":"Question",name:n.title,acceptedAnswer:{"@type":"Answer",text:Array.isArray(n.text)?[...n.text,...(n==null?void 0:n.list)||[]].join():n.text}}))}),p=t.jsx(C.BottomWrapper,{children:t.jsxs(C.BottomContent,{children:[t.jsx(C.BottomTitle,{children:t.jsx(W,{id:"home.concepts.bottomTitle"})}),t.jsx(C.BottomText,{children:o.formatMessage({id:"home.concepts.bottomText"})}),t.jsx(C.ButtonWrapper,{children:t.jsx(C.Button,{component:V,size:"medium",to:$e("faq"),children:t.jsx(W,{id:"home.concepts.doubsButton"})})})]})});return t.jsxs(t.Fragment,{children:[!!(e!=null&&e.length)&&t.jsx(Ae,{data:g}),t.jsx(We,{in:!0,children:t.jsxs(C.Container,{children:[e.map((n,x)=>t.jsxs(Ye,{expanded:i===x||m,onChange:(h,k)=>d(x,k),style:{marginBottom:0},children:[t.jsx(Ze,{small:!0,children:t.jsx(C.ItemTitle,{children:n.title})}),t.jsxs(Me,{style:{flexWrap:"wrap"},hasPadding:!0,children:[n.text,n.list&&!!n.list.length&&t.jsx(C.ListGroup,{children:n.list.map((h,k)=>t.jsx(C.ListItem,{children:h},`CollapsibleList-listItem--${k.toString()}`))})]})]},`CollapsibleList-items--${x.toString()}`)),p]})})]})}function nt(){const e=D();return[{title:e.formatMessage({id:"docs.faqs.item1.title"}),text:e.formatMessage({id:"docs.faqs.item1.text"})},{title:e.formatMessage({id:"docs.faqs.item2.title"}),text:e.formatMessage({id:"docs.faqs.item2.text"})},{title:e.formatMessage({id:"docs.faqs.item3.title"}),text:e.formatMessage({id:"docs.faqs.item3.text"})},{title:e.formatMessage({id:"docs.faqs.item4.title"}),text:e.formatMessage({id:"docs.faqs.item4.text"})},{title:e.formatMessage({id:"docs.faqs.item5.title"}),text:e.formatMessage({id:"docs.faqs.item5.text"})},{title:e.formatMessage({id:"docs.faqs.item6.title"}),text:e.formatMessage({id:"docs.faqs.item6.text"},{link:(...o)=>t.jsx(V,{to:He(I.apiDocs,{tag:"QR",method:"generate-qr-image"}),children:o})})}]}function st(){const e=nt();return t.jsx(et.Container,{children:t.jsx(F,{maxWidth:820,children:t.jsx(tt,{items:e})})})}const ot=w({root:{marginBottom:36},label:{display:"flex",justifyContent:"flex-start",alignItems:"center",fontWeight:700,fontSize:16,lineHeight:"34px",color:r.black,marginBottom:4},description:{fontWeight:400,fontSize:13,lineHeight:"23px",color:"#5A5B70",marginBottom:4},componentWrapper:{marginTop:8},dropdownIcon:{marginLeft:10,color:r.primary.blue,transition:T.transition(),".extended &":{transform:"rotate(90deg)"}},collapsableContent:{marginTop:15}},"ApiDocs-Labeled"),it=w({root:{},content:{},icon:{marginRight:5,color:r.red},topText:{display:"flex",justifyContent:"flex-start",alignItems:"center",marginBottom:5},bottomText:{},keyNameBox:{display:"inline-block",padding:"2px 5px",background:r.gray.light,borderRadius:4,border:`1px solid ${r.gray.dark}`,color:r.red},bold:{fontWeight:700}},"ApiDocs-AuthDetails"),rt=w({root:{display:"block",width:"100%",minHeight:56,background:r.gray.light,borderRadius:4,padding:"16px 20px",fontFamily:ne.fontFamily},text:{fontWeight:400,fontSize:16,lineHeight:"24px",color:r.black}},"ApiDocs-TextBox");w((e,o,i)=>({root:{width:"100%",minHeight:56,background:r.gray.light,borderRadius:4,padding:"16px 20px",fontFamily:ne.fontFamily},text:{fontWeight:400,fontSize:16,lineHeight:"24px",color:r.black},accordionDetails:{},accordionSummary:{},accordion:{[`&.${i.success}`]:{background:"green"},[`&.${i.error}`]:{background:"red"}},success:{},error:{}}),"ApiDocs-ResponseStatus");const at=["1fr","repeat(2, 1fr)","1fr 2fr 2fr","15fr 20fr 12fr 30fr"],fe=w({root:{width:e=>e.width||820},main:{background:e=>e.transparentBg?"transparent":r.gray.light,color:r.black,fontWeight:700,fontSize:14,lineHeight:"34px"},row:{display:"grid",gridTemplateColumns:e=>at[e.columns-1],borderBottom:"1px solid #CDD1E0",alignItems:"center","&.extended":{borderBottom:"none"}},column:{padding:"14px 16px"},buttonContent:{display:"flex",justifyContent:"flex-start",alignItems:"center"},nestedArrow:{marginLeft:5,color:r.primary.blue,transition:"transform 0.25s ease",".extended &":{transform:"rotate(90deg)"}},nestedContent:{borderBottom:"1px solid #CDD1E0",paddingBottom:5},enumItem:{display:"inline-block",padding:"2px 5px",background:r.gray.normal,color:r.gray.dark,borderRadius:5,marginRight:5,marginBottom:5,fontSize:10},requiredLabel:{display:"block",color:"red",fontSize:10}},"ApiDocs-SchemaTable"),lt=w(e=>({title:{fontWeight:700,fontSize:40,lineHeight:"48px",color:r.black,marginBottom:16,"&.centered":{textAlign:"center"},[e.breakpoints.down("lg")]:{marginBottom:12,fontSize:24,lineHeight:"32px"}},description:{fontWeight:400,fontSize:18,lineHeight:"28px",color:r.black,marginBottom:36,"&.centered":{textAlign:"center"},[e.breakpoints.down("lg")]:{fontSize:14,lineHeight:"23px"}},contentWrapper:{width:"100%",padding:"80px 0 200px",[e.breakpoints.down("lg")]:{padding:"48px 0 100px"}}}),"ApiDocs-Content"),ct=w({root:{color:r.primary.blue,border:`1px solid ${r.primary.blue}`,background:T.opacity(r.primary.blue,.1),borderRadius:2,margin:"0px 5px",padding:"0px 5px"}},"ApiDocs-RangeBox"),dt=q({root:{boxShadow:"none",marginBottom:8,background:e=>e.statusType==="success"?"#F1F6F1":"#FBF1F0",pointerEvents:e=>e.collapsable?"inherit":"none","&.Mui-expanded":{marginBottom:8},"&:before":{display:"none"}},rounded:{borderRadius:4,"&:first-child":{borderRadius:4},"&:last-child":{borderRadius:4}},expanded:{}},"Accordion")(G(ue,["statusType","collapsable"])),pt=q({root:{padding:"16px 20px",minHeight:56,fontSize:16,lineHeight:"24px",fontWeight:400,color:e=>e.statusType==="success"?"#3F7E34":"#C4352A","& .MuiAccordionSummary-content":{margin:0},"&.Mui-expanded":{minHeight:56,"& .status-arrow":{transform:e=>e.collapsable?"rotate(90deg)":"none"}},"& .status-arrow":{transition:T.transition(),marginRight:10}}},"AccordionSummary")(G(ge,["statusType","collapsable"])),mt=q({root:{padding:"16px 20px"}},"AccordionDetails")(G(xe,["statusType"]));function H({label:e="",description:o="",children:i=null,collapsableContent:s=null,...d}){const[m,g]=f.useState(!1),p=ot(),n=()=>{g(x=>!x)};return t.jsxs("div",{className:p.root,...d,children:[s?t.jsx(t.Fragment,{children:e&&t.jsxs("button",{type:"button",onClick:n,className:S([p.label,{extended:m}]),children:[e,t.jsx(ee,{className:p.dropdownIcon,size:16})]})}):t.jsx(t.Fragment,{children:e&&t.jsx("h3",{className:p.label,children:e})}),o&&t.jsx("p",{className:p.description,children:o}),i&&t.jsx("div",{className:p.componentWrapper,children:i}),s&&t.jsx("div",{className:p.collapsableContent,children:t.jsx(Le,{in:m,children:s})})]})}const ut=(e={})=>Object.keys(e).reduce((o,i)=>{const s=e==null?void 0:e[i],d=X((s==null?void 0:s.description)||(s==null?void 0:s.summary));return{...o,[d]:{...s||{},method:i,description:(s==null?void 0:s.description)||(s==null?void 0:s.summary)}}},{}),le=(e={})=>{const{content:o}=e,{schema:i}=o["application/json"],{required:s=[],properties:d={}}=i;return Object.keys(d).map(m=>({...d[m],name:m,required:s.includes(m)}))},xt=(e=[])=>e.map(o=>{var i,s;return{...o,type:(i=o==null?void 0:o.schema)==null?void 0:i.type,description:(o==null?void 0:o.description)||((s=o==null?void 0:o.schema)==null?void 0:s.description)}});function gt(e={}){if(!e)return{};let o=Object.keys(e==null?void 0:e.paths).map(i=>{const s=ut(e==null?void 0:e.paths[i]),d=Object.keys(s).map(g=>s[g].tags).flat(),m=Ie(d);return{url:i,methods:s,tag:m==null?void 0:m[0]}});return o=o.reduce((i,s)=>i[s.tag]?(i[s.tag].push(s),i):{...i,[s.tag]:[s]},{}),o}const ht=["text","json"];function Q({children:e=null,type:o=ht[0],content:i=""}){const s=rt();if(o==="json"){const d=i.split(`
`);return t.jsx(he,{style:{width:"100%"},autoHeight:!0,autoHeightMax:400,children:t.jsx("code",{className:s.root,children:d&&!!d.length&&d.map((m,g)=>t.jsx("li",{children:t.jsx("p",{children:m})},`TextBox-JsonCode-${g}`))})})}return t.jsx("div",{className:s.root,children:e&&t.jsx("p",{className:s.text,children:e})})}function bt({statusCode:e="",text:o="",children:i=null}){if(!e&&!o)return null;const s=`${e} ${o}`,d=e>=200&&e<299?"success":"error";return t.jsxs(dt,{statusType:d,collapsable:!!i,children:[t.jsxs(pt,{statusType:d,collapsable:!!i,children:[t.jsx("span",{className:"status-arrow",children:i?">":"-"}),s]}),i&&t.jsx(mt,{statusType:d,children:i})]})}function ye({data:e={}}){const o=ct();if(!e)return null;const{minLength:i,maxLength:s,maximum:d,minimum:m,type:g}=e;let p="";const n=g==="string"?` ${A.char}`:"";return(m||m===0)&&(d||d===0)&&(p=`[${m}..${d}]`),i&&(p=`>= ${i}${n}`),s&&(p=`<= ${s}${n}`),p?t.jsx("span",{className:o.root,children:p}):null}const U=T.opacity(r.primary.blue,1),ft=w((e,o,i)=>({root:{margin:20,padding:20,background:r.white,"&.dark":{background:r.gray.light}},table:{width:"100%",borderSpacing:0},fieldColumn:{padding:"10px 10px 10px 0",width:"25%",borderLeft:`1px solid ${r.primary.blue}`,verticalAlign:"top",lineHeight:"20px","tr:first-of-type > &":{borderLeftWidth:0,backgroundPosition:"left top",backgroundRepeat:"no-repeat",backgroundSize:"1px 100%",backgroundImage:`linear-gradient(transparent 0%, transparent 19px, ${U} 19px, ${U} 100%)`},"tr:last-of-type > &, .last > &":{borderLeftWidth:0,backgroundPosition:"left top",backgroundRepeat:"no-repeat",backgroundSize:"1px 100%",backgroundImage:`linear-gradient(${U} 0%, ${U} 19px, transparent 18px, transparent 100%)`}},valuesColumn:{borderBottom:`1px solid ${r.gray.normal}`,padding:"10px 0",width:"75%","&.expanded":{borderBottom:"none"}},columnSimple:{padding:10,width:"100%"},nestedTableColumn:{borderLeft:`1px solid ${r.primary.blue}`,"tr:last-of-type > &":{borderLeft:"none"}},nestedButton:{display:"flex",alignItems:"center",justifyContent:"flex-start"},nestedArrow:{marginLeft:5,color:r.primary.blue,transition:"transform 0.25s ease",".extended &":{transform:"rotate(90deg)"}},rangeText:{color:r.primary.blue,border:`1px solid ${r.primary.blue}`,background:T.opacity(r.primary.blue,.1),borderRadius:2,margin:"0px 5px",padding:"0px 5px"},row:{},rowContent:{display:"flex",alignItems:"center",justifyContent:"flex-start"},valueText:{color:r.gray.dark},listShape:{display:"flex",alignItems:"center",marginRight:10,"&::before":{content:"''",display:"inline-block",verticalAlign:"middle",width:10,height:1,background:r.primary.blue},"&::after":{content:"''",display:"inline-block",verticalAlign:"middle",width:1,background:r.primary.blue,height:7}},oneOfSelector:{},oneOfTitle:{color:r.gray.dark,marginBottom:10},oneOfButton:{display:"inline-block",marginRight:10,marginBottom:5,fontSize:13,cursor:"pointer",border:`1px solid ${r.primary.blue}`,background:r.white,color:r.primary.blue,padding:"2px 10px",lineHeight:"16px",outline:"none",transition:T.transition(),"&:hover, &:active":{background:T.opacity(r.primary.blue,.5)},[`&.${i.selected}`]:{background:r.primary.blue,color:r.white}},enumValue:{display:"inline-block",padding:"2px 5px",background:r.gray.normal,color:r.gray.dark,borderRadius:5,marginRight:5,marginBottom:5,fontSize:10},requiredLabel:{display:"block",color:"red",fontSize:10,marginLeft:20},selected:{}}),"NestedTable"),ce=e=>{if(!e)return"";const{type:o,oneOf:i,items:s,nullable:d=!1,refName:m=""}=e;return i&&i.length?i.map(g=>g.refName?`${g.refName} (${g.type})`:g.type).join(" or "):s!=null&&s.type?`${o} of ${s.type}`:`${o}${m?` (${m})`:""}${d?" or null":""}`};function je({data:e={},required:o=[],dark:i=!1,defaultVal:s="",rootType:d=""}){const m=Array.isArray(e),[g,p]=f.useState(0),n=e==null?void 0:e[g],x=m?(n==null?void 0:n.properties)||{}:e,h=Object.keys(x),k=h.reduce((u,y)=>({...u,[y]:!1}),{}),[a,j]=f.useState(k),l=ft(),b=u=>{j(y=>({...y,[u]:!(y!=null&&y[u])}))};return t.jsxs("div",{className:S([l.root,{dark:i}]),children:[m&&e&&!!(e!=null&&e.length)&&t.jsxs("div",{className:l.oneOfSelector,children:[t.jsx("p",{className:l.oneOfTitle,children:A.oneOf}),e.map((u,y)=>t.jsx("button",{type:"button",className:S([l.oneOfButton,{[l.selected]:y===g}]),onClick:()=>p(y),children:(u==null?void 0:u.refName)||(u==null?void 0:u.type)},`NestedTable-RefButton-${u}-${y}`))]}),!(n!=null&&n.properties)&&(n!=null&&n.type)?t.jsx("table",{className:l.table,children:t.jsx("tbody",{children:t.jsx("tr",{className:S([l.row,"last"]),children:t.jsx("td",{className:l.columnSimple,children:t.jsxs("div",{children:[t.jsx("p",{children:ce(n)}),(n==null?void 0:n.description)&&t.jsx("p",{className:l.valueText,children:(n==null?void 0:n.description)||""}),((n==null?void 0:n.default)||(n==null?void 0:n.default)===0||s||s===0)&&t.jsxs("p",{className:l.valueText,children:[A.default,t.jsx("span",{className:l.enumValue,children:(n==null?void 0:n.default)||s})]}),(n==null?void 0:n.enum)&&t.jsxs("p",{className:l.valueText,children:[A.enum,n==null?void 0:n.enum.map((u,y)=>t.jsx("span",{className:l.enumValue,children:u},`NestedTable-Simple-Enum-${u}-${y}`))]})]})})})})}):t.jsxs("div",{children:[d==="array"&&!!(h!=null&&h.length)&&t.jsx("p",{className:l.oneOfTitle,children:A.arrayIn}),t.jsx("table",{className:l.table,children:t.jsx("tbody",{children:h&&!!h.length&&h.map((u,y)=>{var z,B,N;const c=x==null?void 0:x[u],v=!!(c!=null&&c.properties)||!!((z=c==null?void 0:c.items)!=null&&z.properties),E=o.includes(u);return t.jsxs(f.Fragment,{children:[t.jsxs("tr",{className:S([l.row,{extended:a[u],last:h.length-1===y}]),children:[t.jsxs("td",{className:l.fieldColumn,children:[t.jsxs("div",{className:l.rowContent,children:[t.jsx("span",{className:l.listShape}),v?t.jsxs("button",{type:"button",className:l.nestedButton,onClick:()=>b(u),children:[u,t.jsx(ee,{className:l.nestedArrow,size:14})]}):t.jsx("p",{children:u})]}),E&&t.jsx("span",{className:l.requiredLabel,children:A.required})]}),t.jsx("td",{className:S([l.valuesColumn,{expanded:a[u]}]),children:t.jsxs("div",{children:[t.jsxs("p",{children:[ce(c),t.jsx(ye,{data:c})]}),(c==null?void 0:c.description)&&t.jsx("p",{className:l.valueText,children:(c==null?void 0:c.description)||""}),((c==null?void 0:c.default)||(c==null?void 0:c.default)===0)&&t.jsxs("p",{className:l.valueText,children:[A.default,t.jsx("span",{className:l.enumValue,children:c==null?void 0:c.default})]}),(c==null?void 0:c.enum)&&t.jsxs("p",{className:l.valueText,children:[A.enum,c==null?void 0:c.enum.map((P,R)=>t.jsx("span",{className:l.enumValue,children:P},`NestedTable-Enum-${P}-${R}`))]})]})})]}),a[u]&&v&&t.jsx("tr",{children:t.jsx("td",{colSpan:2,className:l.nestedTableColumn,children:t.jsx(je,{data:((B=c==null?void 0:c.items)==null?void 0:B.oneOf)||(c==null?void 0:c.oneOf)||(c==null?void 0:c.properties)||((N=c==null?void 0:c.items)==null?void 0:N.properties),defaultVal:c==null?void 0:c.default,required:c==null?void 0:c.required,rootType:c==null?void 0:c.type,dark:!i})})})]},`NestedTable-column-${y}`)})})}),d==="array"&&!!(h!=null&&h.length)&&t.jsx("p",{className:l.oneOfTitle,children:A.arrayOut})]})]})}function de({items:e=[]}){const o=fe();return!e||!e.length?null:t.jsx("span",{style:{marginTop:10,display:"block"},children:e.map((i,s)=>t.jsx("span",{className:o.enumItem,children:`"${i}"`},`EnumItem-${i}-${s}`))})}function J({data:e={},columns:o=[],dataParser:i=()=>{},transparentBg:s=!1,width:d=820}){const[m,g]=f.useState({}),p=fe({columns:o.length,transparentBg:s,width:d}),n=me("lgDown"),x=i(e),h=a=>{g(j=>({...Object.keys(j).reduce((b,u)=>({...b,[u]:!1}),{}),[a]:!(j!=null&&j[a])}))},k=f.useCallback(a=>{const{nullable:j=!1,type:l,items:b={},enum:u,allOf:y=void 0,oneOf:c=void 0}=(a==null?void 0:a.schema)||a||{};return l==="array"&&b&&b.type?t.jsxs("p",{children:[`array of ${b.type}${b.enum?":":""}`,t.jsx(de,{items:b.enum})]}):u?t.jsxs("p",{children:[l,u&&!!u.length&&t.jsx(de,{items:u})]}):c&&c.length?c.map(v=>v.refName?`${v.refName} (${v.type})`:v.type).join(" or "):y?`object${j?" or null":""}`:`${l}${j?" or null":""}`},[]);return t.jsx(he,{style:{width:n?"calc(100% + 20px)":"100%"},autoHeight:!0,autoHeightMax:2e4,autoHide:!0,children:t.jsxs("div",{className:p.root,children:[t.jsx("div",{className:S([p.row,p.main]),children:o&&!!o.length&&o.map(a=>t.jsx("div",{className:p.column,children:a.label},`SchemaTable-HeadColumn-${a.value}`))}),x&&!!x.length&&x.map((a,j)=>{var b,u,y;const l=!!(a!=null&&a.properties)||!!(a!=null&&a.items&&((b=a==null?void 0:a.items)!=null&&b.properties));return t.jsxs(f.Fragment,{children:[t.jsx("div",{className:S([p.row,{extended:l&&m[a==null?void 0:a.name]}]),children:o&&!!o.length&&o.map(c=>{let v=a[c.value];return c.value==="type"&&(v=t.jsxs(f.Fragment,{children:[k(a),t.jsx("div",{children:t.jsx(ye,{data:a})})]},`SchemaTable-Type-${c.value}`)),c.value==="name"?t.jsxs("div",{className:p.column,children:[l?t.jsx("button",{type:"button",onClick:()=>h(a==null?void 0:a.name),children:t.jsxs("span",{className:p.buttonContent,children:[v||"-",l&&t.jsx(ee,{size:14,className:p.nestedArrow})]})}):v||"-",(a==null?void 0:a.required)&&t.jsx("span",{className:p.requiredLabel,children:A.required})]},`SchemaTable-Name-${c.value}`):t.jsx("div",{className:p.column,children:v||"-"},`SchemaTable-Column-${c.value}`)})}),l&&m[a==null?void 0:a.name]&&t.jsx("div",{className:p.nestedContent,children:t.jsx(je,{data:(a==null?void 0:a.oneOf)||(a==null?void 0:a.properties)||((u=a==null?void 0:a.items)==null?void 0:u.properties),rootType:a==null?void 0:a.type,required:((y=a==null?void 0:a.items)==null?void 0:y.required)||[],dark:!0})})]},`SchemaTable-field-${a.name}-${j}`)})]})})}const M={header:"Header "};function yt({apiData:e}){const o=it();if(!e)return null;const{components:i={}}=e||{},{securitySchemes:s={}}=i,d=Object.keys(s);return d!=null&&d.length?t.jsx(Q,{children:d.map((m,g)=>{var n;const p=s[m];return t.jsxs("div",{className:o.content,children:[t.jsxs("p",{className:o.topText,children:[t.jsx(be,{name:"padlock",className:o.icon,size:20})," ",t.jsx("span",{className:o.bold,children:"API Key: "})," ",m]}),t.jsxs("p",{className:o.bottomText,children:[t.jsx("strong",{className:o.parameterTitle,children:`${(M==null?void 0:M[(n=p==null?void 0:p.in)==null?void 0:n.toLowerCase()])||""}parameter name: `}),t.jsx("span",{className:o.keyNameBox,children:p==null?void 0:p.name})]})]},g)})}):null}const jt=[{label:"Parameter",value:"name"},{label:"Type",value:"type"},{label:"Example",value:"example"},{label:"Description",value:"description"}],kt=[{label:"Parameter",value:"name"},{label:"Type",value:"type"}],vt=[{label:"Parameter",value:"name"},{label:"Type",value:"type"},{label:"Description",value:"description"}],Nt=200,pe="application/json";function Tt(){var a,j,l,b,u,y,c,v,E,z;const{tag:e,method:o}=Y(),{apiData:i}=f.useContext(te),s=lt(),d=D(),m=(e==null?void 0:e.toLowerCase())==="faq",p=(((a=gt(i))==null?void 0:a[e])||[]).find(B=>Object.keys(B.methods).includes(o)),n=((j=p==null?void 0:p.methods)==null?void 0:j[o])||{},x=(y=(u=(b=(l=n==null?void 0:n.responses)==null?void 0:l[Nt])==null?void 0:b.content)==null?void 0:u[pe])==null?void 0:y.schema,h=_(x),k=Object.keys((n==null?void 0:n.responses)||{});return f.useEffect(()=>{const B=d.formatMessage({id:"docs.topTitle"});let N="";n!=null&&n.description&&(N=` - ${n.description}`),m&&(N=" - FAQ"),document.title=`${B}${N}`},[(n==null?void 0:n.description)||"",e]),m?t.jsx(st,{}):t.jsx("div",{children:t.jsx(F,{maxWidth:820,children:t.jsx("div",{className:s.contentWrapper,children:t.jsxs("div",{children:[e&&t.jsx("h2",{className:S([s.title,"centered"]),children:e}),(n==null?void 0:n.description)&&t.jsx("p",{className:S([s.description,"centered"]),children:n==null?void 0:n.description}),(n==null?void 0:n.description)&&t.jsx("h3",{className:s.title,style:{marginBottom:40},children:n==null?void 0:n.description}),!!((c=i==null?void 0:i.security)!=null&&c.length)&&t.jsx(H,{label:"Authorizations",description:i.security.map(B=>Object.keys(B).join(", ")).join(", "),collapsableContent:t.jsx(yt,{apiData:i})}),(n==null?void 0:n.method)&&t.jsx(H,{label:"Request method",children:t.jsx(Q,{children:(v=n==null?void 0:n.method)==null?void 0:v.toUpperCase()})}),(p==null?void 0:p.url)&&t.jsx(H,{label:"Request URL",children:t.jsx(Q,{children:p==null?void 0:p.url})}),(n==null?void 0:n.parameters)&&t.jsx(H,{label:"Parameters",children:t.jsx(J,{data:n==null?void 0:n.parameters,columns:vt,dataParser:xt})}),(n==null?void 0:n.requestBody)&&t.jsx(H,{label:"Request Body schema",description:((z=Object.keys(((E=n==null?void 0:n.requestBody)==null?void 0:E.content)||{}))==null?void 0:z[0])||"",children:t.jsx(J,{data:n==null?void 0:n.requestBody,columns:jt,dataParser:le})}),k&&!!k.length&&t.jsx(H,{label:"Responses status",children:Object.keys((n==null?void 0:n.responses)||{}).map(B=>{var R,oe,ie;const N=(R=n==null?void 0:n.responses)==null?void 0:R[B],P=(ie=(oe=N==null?void 0:N.content)==null?void 0:oe[pe])==null?void 0:ie.schema;return t.jsx(bt,{statusCode:B,text:N==null?void 0:N.description,children:P&&t.jsx(J,{transparentBg:!0,width:"100%",data:N,columns:kt,dataParser:le})},B)})}),h&&x&&t.jsx(H,{label:"Response sample",style:{marginBottom:0},children:t.jsx(Q,{type:"json",content:JSON.stringify(h,null,2)})})]})})})})}const St=w(e=>({root:{background:r.gray.light},container:{padding:"100px 0 120px",alignItems:"center",textAlign:"center",[e.breakpoints.down("lg")]:{padding:"80px 0 80px"}},title:{fontWeight:700,fontSize:40,lineHeight:"48px",color:r.black,[e.breakpoints.down("lg")]:{fontSize:24,lineHeight:"32px"}},text:{fontWeight:400,fontSize:20,lineHeight:"34px",color:r.gray.darkest,marginTop:20,[e.breakpoints.down("lg")]:{marginTop:12,fontSize:14,lineHeight:"24px"}},button:{marginTop:44,height:56,width:"auto",minWidth:264,[e.breakpoints.down("lg")]:{marginTop:28,height:40,width:"100%",maxWidth:280}}}),"Docs-ContactUs");function Bt(){const e=St(),o=Z();return t.jsx("div",{className:e.root,children:t.jsx(F,{maxWidth:se,children:t.jsxs("div",{className:e.container,children:[t.jsx("h2",{className:e.title,children:t.jsx(W,{id:"docs.contactUs.title"})}),t.jsx("p",{className:e.text,children:t.jsx(W,{id:"docs.contactUs.description"})}),t.jsx(K,{className:e.button,onClick:()=>o.push("/contact"),children:t.jsx(W,{id:"docs.contactUs.action"})})]})})})}function zt(){const[e,o]=f.useState(null),i=D();return f.useEffect(()=>{fetch("/public-api-specification.json").then(s=>s.json()).then(s=>{var d,m;return L(s,{...((d=s==null?void 0:s.components)==null?void 0:d.schemas)||{},...((m=s==null?void 0:s.components)==null?void 0:m.responses)||{}})}).then(o)},[]),t.jsxs(te.Provider,{value:{apiData:e},children:[t.jsx(qe,{defer:!1,children:t.jsx("link",{href:ne.url,rel:"stylesheet"})}),t.jsxs(ze,{title:i.formatMessage({id:"docs.topTitle"}),children:[t.jsx(Ve,{}),t.jsx(Tt,{}),t.jsx(Bt,{}),t.jsx(Oe,{prefooter:!1,hasTop:!1})]})]})}export{zt as default};