From 2caa2bb145a034565c9dc5348ae6bcce0905159a Mon Sep 17 00:00:00 2001 From: ah7255703 Date: Tue, 12 Mar 2024 20:16:56 +0200 Subject: [PATCH 1/4] feat: Add query_params to message payload --- copilot-widget/lib/contexts/messageHandler.tsx | 1 + copilot-widget/lib/contexts/statefulMessageHandler.tsx | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/copilot-widget/lib/contexts/messageHandler.tsx b/copilot-widget/lib/contexts/messageHandler.tsx index 102802e43..5228e0b34 100644 --- a/copilot-widget/lib/contexts/messageHandler.tsx +++ b/copilot-widget/lib/contexts/messageHandler.tsx @@ -10,6 +10,7 @@ export type UserMessageType = { session_id: string; headers: Record; bot_token: string; + query_params: Record; }; export type BotMessageType> = { diff --git a/copilot-widget/lib/contexts/statefulMessageHandler.tsx b/copilot-widget/lib/contexts/statefulMessageHandler.tsx index 52d05d9de..6fc2a52bb 100644 --- a/copilot-widget/lib/contexts/statefulMessageHandler.tsx +++ b/copilot-widget/lib/contexts/statefulMessageHandler.tsx @@ -61,13 +61,14 @@ function useChatLoading() { function useSendMessage() { const { __handler } = useMessageHandler(); - const { headers, token } = useConfigData(); + const { headers, token, queryParams } = useConfigData(); const socket = useSocket(); function send(content: string) { __handler.handleTextMessage( { headers: headers ?? {}, + query_params: queryParams ?? {}, content, bot_token: token, }, From 3f25650f0da5116208c483052e507b594ca33da2 Mon Sep 17 00:00:00 2001 From: ah7255703 Date: Tue, 12 Mar 2024 20:18:29 +0200 Subject: [PATCH 2/4] update `pilot.js` --- dashboard/public/pilot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dashboard/public/pilot.js b/dashboard/public/pilot.js index 21bc6a63d..4c59c8233 100644 --- a/dashboard/public/pilot.js +++ b/dashboard/public/pilot.js @@ -69,7 +69,7 @@ Error generating stack: `+o.message+` `&&e.push(wm),o!==null&&e.push(_e(Kt(""+o))),null;case"input":e.push(Yr("input")),l=c=a=o=null;for(s in n)if(_n.call(n,s)&&(u=n[s],u!=null))switch(s){case"children":case"dangerouslySetInnerHTML":throw Error(Se(399,"input"));case"defaultChecked":l=u;break;case"defaultValue":a=u;break;case"checked":c=u;break;case"value":o=u;break;default:Mn(e,r,s,u)}return c!==null?Mn(e,r,"checked",c):l!==null&&Mn(e,r,"checked",l),o!==null?Mn(e,r,"value",o):a!==null&&Mn(e,r,"value",a),e.push(gS),null;case"menuitem":e.push(Yr("menuitem"));for(var p in n)if(_n.call(n,p)&&(o=n[p],o!=null))switch(p){case"children":case"dangerouslySetInnerHTML":throw Error(Se(400));default:Mn(e,r,p,o)}return e.push(eo),null;case"title":e.push(Yr("title")),o=null;for(f in n)if(_n.call(n,f)&&(s=n[f],s!=null))switch(f){case"children":o=s;break;case"dangerouslySetInnerHTML":throw Error(Se(434));default:Mn(e,r,f,s)}return e.push(eo),o;case"listing":case"pre":e.push(Yr(t)),s=o=null;for(l in n)if(_n.call(n,l)&&(a=n[l],a!=null))switch(l){case"children":o=a;break;case"dangerouslySetInnerHTML":s=a;break;default:Mn(e,r,l,a)}if(e.push(eo),s!=null){if(o!=null)throw Error(Se(60));if(typeof s!="object"||!("__html"in s))throw Error(Se(61));n=s.__html,n!=null&&(typeof n=="string"&&0"),T4=re(''),O4=re(""),P4=re(''),N4=re(""),I4=re(""),D4=re("");function vS(e,t,n){if(se(e,P4),n===null)throw Error(Se(395));return se(e,n),ct(e,R4)}var L4=re('"),U4=re('"),W4=re('"),G4=re(''),X4=re(""),Q4=re(''),Z4=re(""),e5=re(''),n5=re(""),r5=re(''),o5=re("");function s5(e,t,n,r){switch(n.insertionMode){case 0:case 1:return se(e,L4),se(e,t.segmentPrefix),se(e,_e(r.toString(16))),ct(e,z4);case 2:return se(e,U4),se(e,t.segmentPrefix),se(e,_e(r.toString(16))),ct(e,V4);case 3:return se(e,W4),se(e,t.segmentPrefix),se(e,_e(r.toString(16))),ct(e,q4);case 4:return se(e,G4),se(e,t.segmentPrefix),se(e,_e(r.toString(16))),ct(e,Y4);case 5:return se(e,Q4),se(e,t.segmentPrefix),se(e,_e(r.toString(16))),ct(e,J4);case 6:return se(e,e5),se(e,t.segmentPrefix),se(e,_e(r.toString(16))),ct(e,t5);case 7:return se(e,r5),se(e,t.segmentPrefix),se(e,_e(r.toString(16))),ct(e,i5);default:throw Error(Se(397))}}function a5(e,t){switch(t.insertionMode){case 0:case 1:return ct(e,B4);case 2:return ct(e,H4);case 3:return ct(e,K4);case 4:return ct(e,X4);case 5:return ct(e,Z4);case 6:return ct(e,n5);case 7:return ct(e,o5);default:throw Error(Se(397))}}var l5=re('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'),u5=re('$RS("'),c5=re('","'),f5=re('")<\/script>'),d5=re('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("'),p5=re('$RC("'),h5=re('","'),m5=re('")<\/script>'),g5=re('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("'),y5=re('$RX("'),v5=re('"'),w5=re(")<\/script>"),bm=re(","),b5=/[<\u2028\u2029]/g;function xm(e){return JSON.stringify(e).replace(b5,function(t){switch(t){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}var Zl=Object.assign,x5=Symbol.for("react.element"),ET=Symbol.for("react.portal"),CT=Symbol.for("react.fragment"),TT=Symbol.for("react.strict_mode"),AT=Symbol.for("react.profiler"),OT=Symbol.for("react.provider"),PT=Symbol.for("react.context"),RT=Symbol.for("react.forward_ref"),NT=Symbol.for("react.suspense"),IT=Symbol.for("react.suspense_list"),DT=Symbol.for("react.memo"),Hv=Symbol.for("react.lazy"),S5=Symbol.for("react.scope"),$5=Symbol.for("react.debug_trace_mode"),k5=Symbol.for("react.legacy_hidden"),_5=Symbol.for("react.default_value"),wS=Symbol.iterator;function by(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case CT:return"Fragment";case ET:return"Portal";case AT:return"Profiler";case TT:return"StrictMode";case NT:return"Suspense";case IT:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case PT:return(e.displayName||"Context")+".Consumer";case OT:return(e._context.displayName||"Context")+".Provider";case RT:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case DT:return t=e.displayName||null,t!==null?t:by(e.type)||"Memo";case Hv:t=e._payload,e=e._init;try{return by(e(t))}catch{}}return null}var FT={};function bS(e,t){if(e=e.contextTypes,!e)return FT;var n={},r;for(r in e)n[r]=t[r];return n}var os=null;function Mp(e,t){if(e!==t){e.context._currentValue=e.parentValue,e=e.parent;var n=t.parent;if(e===null){if(n!==null)throw Error(Se(401))}else{if(n===null)throw Error(Se(401));Mp(e,n)}t.context._currentValue=t.value}}function jT(e){e.context._currentValue=e.parentValue,e=e.parent,e!==null&&jT(e)}function MT(e){var t=e.parent;t!==null&&MT(t),e.context._currentValue=e.value}function LT(e,t){if(e.context._currentValue=e.parentValue,e=e.parent,e===null)throw Error(Se(402));e.depth===t.depth?Mp(e,t):LT(e,t)}function zT(e,t){var n=t.parent;if(n===null)throw Error(Se(402));e.depth===n.depth?Mp(e,n):zT(e,n),t.context._currentValue=t.value}function jd(e){var t=os;t!==e&&(t===null?MT(e):e===null?jT(t):t.depth===e.depth?Mp(t,e):t.depth>e.depth?LT(t,e):zT(t,e),os=e)}var xS={isMounted:function(){return!1},enqueueSetState:function(e,t){e=e._reactInternals,e.queue!==null&&e.queue.push(t)},enqueueReplaceState:function(e,t){e=e._reactInternals,e.replace=!0,e.queue=[t]},enqueueForceUpdate:function(){}};function SS(e,t,n,r){var i=e.state!==void 0?e.state:null;e.updater=xS,e.props=n,e.state=i;var o={queue:[],replace:!1};e._reactInternals=o;var s=t.contextType;if(e.context=typeof s=="object"&&s!==null?s._currentValue:r,s=t.getDerivedStateFromProps,typeof s=="function"&&(s=s(n,i),i=s==null?i:Zl({},i,s),e.state=i),typeof t.getDerivedStateFromProps!="function"&&typeof e.getSnapshotBeforeUpdate!="function"&&(typeof e.UNSAFE_componentWillMount=="function"||typeof e.componentWillMount=="function"))if(t=e.state,typeof e.componentWillMount=="function"&&e.componentWillMount(),typeof e.UNSAFE_componentWillMount=="function"&&e.UNSAFE_componentWillMount(),t!==e.state&&xS.enqueueReplaceState(e,e.state,null),o.queue!==null&&0>=s,i-=s,{id:1<<32-Uf(t)+i|n<>>=0,e===0?32:31-(C5(e)/T5|0)|0}function O5(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var P5=typeof Object.is=="function"?Object.is:O5,Ni=null,Wv=null,Vf=null,it=null,Ll=!1,Md=!1,Au=0,co=null,Lp=0;function Yo(){if(Ni===null)throw Error(Se(321));return Ni}function $S(){if(0e.progressiveChunkSize)r.rootSegmentID=e.nextSegmentId++,e.completedBoundaries.push(r),vS(t,e.responseState,r.id),Xc(e,t,n);else{if(ct(t,O4),n=r.completedSegments,n.length!==1)throw Error(Se(391));zp(e,t,n[0])}return ct(t,I4)}function PS(e,t,n){return s5(t,e.responseState,n.formatContext,n.id),zp(e,t,n),a5(t,n.formatContext)}function RS(e,t,n){for(var r=n.completedSegments,i=0;ie.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(i[n]=e[n]);return i},JT=function(e,t){if(e==null)return{};var n,r,i=X5(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i},Q5=O.createContext(null);function ky(e){var t=e.children,n=JT(e,["children"]);return typeof t!="string"&&(t=j5(t)),Wt.createElement("template",QT({},n,{dangerouslySetInnerHTML:{__html:t}}))}function _y(e){var t=e.root,n=e.children;return Zu.createPortal(n,t)}function J5(e){var t=O.forwardRef(function(n,r){var i,o,s=n.mode,a=n.delegatesFocus,l=n.styleSheets,u=n.ssr,c=n.children,f=JT(n,["mode","delegatesFocus","styleSheets","ssr","children"]),p=(o=O.useRef((i=r)&&i.current),O.useEffect(function(){i&&(i.current=o.current)},[i]),o),d=O.useState(null),h=Y5(d,2),g=h[0],y=h[1],m="node_".concat(s).concat(a);return O.useLayoutEffect(function(){if(p.current)try{if(typeof r=="function"&&r(p.current),u){var v=p.current.shadowRoot;return void y(v)}var w=p.current.attachShadow({mode:s,delegatesFocus:a});l.length>0&&(w.adoptedStyleSheets=l),y(w)}catch(x){(function($){var b=$.error,k=$.styleSheets,T=$.root;switch(b.name){case"NotSupportedError":k.length>0&&(T.adoptedStyleSheets=k);break;default:throw b}})({error:x,styleSheets:l,root:g})}},[r,p,l]),Wt.createElement(Wt.Fragment,null,Wt.createElement(e.tag,QT({key:m,ref:p},f),(g||u)&&Wt.createElement(Q5.Provider,{value:g},u?Wt.createElement(ky,{shadowroot:s,shadowrootmode:s},e.render({root:g,ssr:u,children:c})):Wt.createElement(_y,{root:g},e.render({root:g,ssr:u,children:c})))))});return t.propTypes={mode:ce.oneOf(["open","closed"]),delegatesFocus:ce.bool,styleSheets:ce.arrayOf(ce.instanceOf(globalThis.CSSStyleSheet)),ssr:ce.bool,children:ce.node},t.defaultProps={mode:"open",delegatesFocus:!1,styleSheets:[],ssr:!1,children:null},t}ky.propTypes={children:ce.oneOfType([ce.string,ce.node])},ky.defaultProps={children:""},_y.propTypes={root:ce.object.isRequired,children:ce.node},_y.defaultProps={children:null};var $m=new Map;function Z5(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"core",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(r){return r.children};return new Proxy(e,{get:function(r,i){var o=H5(i,{separator:"-"}),s="".concat(t,"-").concat(o);return $m.has(s)||$m.set(s,J5({tag:o,render:n})),$m.get(s)}})}var eM=Z5();const tM='.pointer-events-auto{pointer-events:auto}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.isolate{isolation:isolate}.z-50{z-index:50}.z-\\[100\\]{z-index:100}.z-\\[50000\\]{z-index:50000}.m-0{margin:0}.mx-auto{margin-left:auto;margin-right:auto}.mb-0{margin-bottom:0}.mb-0\\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-3{margin-right:.75rem}.mt-0{margin-top:0}.mt-0\\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-auto{margin-top:auto}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.size-10{width:2.5rem;height:2.5rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.size-8{width:2rem;height:2rem}.size-\\[1em\\]{width:1em;height:1em}.h-10{height:2.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.max-h-full{max-height:100%}.min-h-fit{min-height:-moz-fit-content;min-height:fit-content}.w-1\\/2{width:50%}.w-1\\/4{width:25%}.w-3\\/4{width:75%}.w-7{width:1.75rem}.w-9{width:2.25rem}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.min-w-fit{min-width:-moz-fit-content;min-width:fit-content}.max-w-\\[15rem\\]{max-width:15rem}.max-w-\\[70\\%\\]{max-width:70%}.max-w-full{max-width:100%}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.shrink-0{flex-shrink:0}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize{resize:both}.list-inside{list-style-position:inside}.list-none{list-style-type:none}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-items-center{justify-items:center}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-px{gap:1px}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.scroll-smooth{scroll-behavior:smooth}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.border{border-width:1px}.border-0{border-width:0px}.border-b{border-bottom-width:1px}.border-none{border-style:none}.border-accent{border-color:var(--opencopilot-accent-clr)}.border-primary{border-color:var(--opencopilot-primary-clr)}.border-rose-500{--tw-border-opacity: 1;border-color:rgb(244 63 94 / var(--tw-border-opacity))}.border-b-black\\/10{border-bottom-color:#0000001a}.bg-accent{background-color:var(--opencopilot-accent-clr)}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-black\\/50{background-color:#00000080}.bg-emerald-500{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-primary{background-color:var(--opencopilot-primary-clr)}.bg-rose-200{--tw-bg-opacity: 1;background-color:rgb(254 205 211 / var(--tw-bg-opacity))}.bg-rose-500{--tw-bg-opacity: 1;background-color:rgb(244 63 94 / var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-200{--tw-bg-opacity: 1;background-color:rgb(254 240 138 / var(--tw-bg-opacity))}.fill-current{fill:currentColor}.stroke-emerald-500{stroke:#10b981}.stroke-rose-500{stroke:#f43f5e}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-2\\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.ps-10{padding-inline-start:2.5rem}.text-center{text-align:center}.text-\\[14px\\]{font-size:14px}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-tight{line-height:1.25}.text-\\[\\#5e5c5e\\]{--tw-text-opacity: 1;color:rgb(94 92 94 / var(--tw-text-opacity))}.text-accent{color:var(--opencopilot-accent-clr)}.text-emerald-500{--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-primary{color:var(--opencopilot-primary-clr)}.text-rose-500{--tw-text-opacity: 1;color:rgb(244 63 94 / var(--tw-text-opacity))}.text-rose-800{--tw-text-opacity: 1;color:rgb(159 18 57 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity))}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-\\[\\#334155\\]\\/60{--tw-ring-color: rgb(51 65 85 / .6)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.animate-out{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.fade-in-0{--tw-enter-opacity: 0}.fade-in-10{--tw-enter-opacity: .1}.fade-out{--tw-exit-opacity: 0}.slide-in-from-bottom-5{--tw-enter-translate-y: 1.25rem}.duration-300{animation-duration:.3s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.running{animation-play-state:running}.paused{animation-play-state:paused}.scrollbar-thin{scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)}.scrollbar-thin::-webkit-scrollbar-track{background-color:var(--scrollbar-track);border-radius:var(--scrollbar-track-radius)}.scrollbar-thin::-webkit-scrollbar-track:hover{background-color:var(--scrollbar-track-hover, var(--scrollbar-track))}.scrollbar-thin::-webkit-scrollbar-track:active{background-color:var(--scrollbar-track-active, var(--scrollbar-track-hover, var(--scrollbar-track)))}.scrollbar-thin::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:var(--scrollbar-thumb-radius)}.scrollbar-thin::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover, var(--scrollbar-thumb))}.scrollbar-thin::-webkit-scrollbar-thumb:active{background-color:var(--scrollbar-thumb-active, var(--scrollbar-thumb-hover, var(--scrollbar-thumb)))}.scrollbar-thin::-webkit-scrollbar-corner{background-color:var(--scrollbar-corner);border-radius:var(--scrollbar-corner-radius)}.scrollbar-thin::-webkit-scrollbar-corner:hover{background-color:var(--scrollbar-corner-hover, var(--scrollbar-corner))}.scrollbar-thin::-webkit-scrollbar-corner:active{background-color:var(--scrollbar-corner-active, var(--scrollbar-corner-hover, var(--scrollbar-corner)))}.scrollbar-thin{scrollbar-width:thin}.scrollbar-thin::-webkit-scrollbar{display:block;width:8px;height:8px}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-left-width:.25rem;border-left-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-left:1em}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:900;color:inherit}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:800;color:inherit}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){display:block;margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-family:inherit;color:var(--tw-prose-kbd);box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%),0 3px 0 rgb(var(--tw-prose-kbd-shadows) / 10%);font-size:.875em;border-radius:.3125rem;padding:.1875em .375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:"`"}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding:.8571429em 1.1428571em}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:none}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){width:100%;table-layout:auto;text-align:left;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-right:.5714286em;padding-bottom:.5714286em;padding-left:.5714286em}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose{--tw-prose-body: #374151;--tw-prose-headings: #111827;--tw-prose-lead: #4b5563;--tw-prose-links: #111827;--tw-prose-bold: #111827;--tw-prose-counters: #6b7280;--tw-prose-bullets: #d1d5db;--tw-prose-hr: #e5e7eb;--tw-prose-quotes: #111827;--tw-prose-quote-borders: #e5e7eb;--tw-prose-captions: #6b7280;--tw-prose-kbd: #111827;--tw-prose-kbd-shadows: 17 24 39;--tw-prose-code: #111827;--tw-prose-pre-code: #e5e7eb;--tw-prose-pre-bg: #1f2937;--tw-prose-th-borders: #d1d5db;--tw-prose-td-borders: #e5e7eb;--tw-prose-invert-body: #d1d5db;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #9ca3af;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #9ca3af;--tw-prose-invert-bullets: #4b5563;--tw-prose-invert-hr: #374151;--tw-prose-invert-quotes: #f3f4f6;--tw-prose-invert-quote-borders: #374151;--tw-prose-invert-captions: #9ca3af;--tw-prose-invert-kbd: #fff;--tw-prose-invert-kbd-shadows: 255 255 255;--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #d1d5db;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #4b5563;--tw-prose-invert-td-borders: #374151;font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(.prose>ul>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-left:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding:.5714286em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.prose-sm{font-size:.875rem;line-height:1.7142857}.prose-sm :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.prose-sm :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;line-height:1.5555556;margin-top:.8888889em;margin-bottom:.8888889em}.prose-sm :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.3333333em;margin-bottom:1.3333333em;padding-left:1.1111111em}.prose-sm :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:2.1428571em;margin-top:0;margin-bottom:.8em;line-height:1.2}.prose-sm :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.4285714em;margin-top:1.6em;margin-bottom:.8em;line-height:1.4}.prose-sm :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;margin-top:1.5555556em;margin-bottom:.4444444em;line-height:1.5555556}.prose-sm :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.4285714em;margin-bottom:.5714286em;line-height:1.4285714}.prose-sm :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;border-radius:.3125rem;padding:.1428571em .3571429em}.prose-sm :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em}.prose-sm :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.9em}.prose-sm :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8888889em}.prose-sm :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.6666667;margin-top:1.6666667em;margin-bottom:1.6666667em;border-radius:.25rem;padding:.6666667em 1em}.prose-sm :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-left:1.5714286em}.prose-sm :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-left:1.5714286em}.prose-sm :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;margin-bottom:.2857143em}.prose-sm :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.4285714em}.prose-sm :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.4285714em}.prose-sm :where(.prose-sm>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(.prose-sm>ul>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ul>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(.prose-sm>ol>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ol>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.prose-sm :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;padding-left:1.5714286em}.prose-sm :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2.8571429em;margin-bottom:2.8571429em}.prose-sm :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.5}.prose-sm :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:1em;padding-bottom:.6666667em;padding-left:1em}.prose-sm :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose-sm :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose-sm :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding:.6666667em 1em}.prose-sm :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose-sm :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose-sm :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.3333333;margin-top:.6666667em}.prose-sm :where(.prose-sm>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(.prose-sm>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.prose-slate{--tw-prose-body: #334155;--tw-prose-headings: #0f172a;--tw-prose-lead: #475569;--tw-prose-links: #0f172a;--tw-prose-bold: #0f172a;--tw-prose-counters: #64748b;--tw-prose-bullets: #cbd5e1;--tw-prose-hr: #e2e8f0;--tw-prose-quotes: #0f172a;--tw-prose-quote-borders: #e2e8f0;--tw-prose-captions: #64748b;--tw-prose-kbd: #0f172a;--tw-prose-kbd-shadows: 15 23 42;--tw-prose-code: #0f172a;--tw-prose-pre-code: #e2e8f0;--tw-prose-pre-bg: #1e293b;--tw-prose-th-borders: #cbd5e1;--tw-prose-td-borders: #e2e8f0;--tw-prose-invert-body: #cbd5e1;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #94a3b8;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #94a3b8;--tw-prose-invert-bullets: #475569;--tw-prose-invert-hr: #334155;--tw-prose-invert-quotes: #f1f5f9;--tw-prose-invert-quote-borders: #334155;--tw-prose-invert-captions: #94a3b8;--tw-prose-invert-kbd: #fff;--tw-prose-invert-kbd-shadows: 255 255 255;--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #cbd5e1;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #475569;--tw-prose-invert-td-borders: #334155}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*{scrollbar-color:initial;scrollbar-width:initial}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }svg{vector-effect:non-scaling-stroke}@keyframes fade-in-bottom{0%{transform:translateY(50px);opacity:0}to{transform:translateY(0);opacity:1}}.fade-in-bottom{animation:fade-in-bottom .4s cubic-bezier(.39,.575,.565,1) both}.flex-center{display:flex;align-items:center;justify-content:center}@keyframes fade-in-top{0%{transform:translateY(-50px);opacity:0}to{transform:translateY(0);opacity:1}}.fade-in-top{animation:fade-in-top .6s cubic-bezier(.39,.575,.565,1) both}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.fade-in{animation:fade-in 1.2s cubic-bezier(.39,.575,.565,1) both}@keyframes scaleIn{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes slideDown{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}@keyframes slideUp{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes fade-in-right{0%{transform:translate(50px);opacity:0}to{transform:translate(0);opacity:1}}.fade-in-right{animation:fade-in-right .6s both}@keyframes scale-out-br{0%{transform:scale(1);transform-origin:100% 100%;opacity:1}to{transform:scale(0);transform-origin:100% 100%;opacity:1}}.scale-out-br{animation:scale-out-br .5s ease-in-out forwards}.no-scrollbar::-webkit-scrollbar{display:none}@keyframes text-blur-out{0%{filter:blur(.01)}to{filter:blur(12px) opacity(0%)}}.text-blur-out{animation:text-blur-out 1.2s cubic-bezier(.55,.085,.68,.53) both}.\\*\\:fill-emerald-500>*{fill:#10b981}.\\*\\:fill-rose-500>*{fill:#f43f5e}.placeholder\\:align-middle::-moz-placeholder{vertical-align:middle}.placeholder\\:align-middle::placeholder{vertical-align:middle}.placeholder\\:text-xs::-moz-placeholder{font-size:.75rem;line-height:1rem}.placeholder\\:text-xs::placeholder{font-size:.75rem;line-height:1rem}.last-of-type\\:mb-10:last-of-type{margin-bottom:2.5rem}.focus-within\\:ring-primary:focus-within{--tw-ring-color: var(--opencopilot-primary-clr)}.data-\\[state\\=open\\]\\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\\[state\\=closed\\]\\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\\[state\\=closed\\]\\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\\[state\\=open\\]\\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\\[state\\=closed\\]\\:slide-in-from-top-0[data-state=closed]{--tw-enter-translate-y: -0px}.data-\\[state\\=closed\\]\\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y: 100%}.data-\\[state\\=open\\]\\:slide-in-from-bottom-3[data-state=open]{--tw-enter-translate-y: .75rem}.prose-headings\\:my-1 :is(:where(h1,h2,h3,h4,h5,h6,th):not(:where([class~=not-prose],[class~=not-prose] *))){margin-top:.25rem;margin-bottom:.25rem}.prose-h1\\:font-medium :is(:where(h1):not(:where([class~=not-prose],[class~=not-prose] *))){font-weight:500}.prose-h2\\:font-normal :is(:where(h2):not(:where([class~=not-prose],[class~=not-prose] *))){font-weight:400}.hover\\:bg-accent:hover{background-color:var(--opencopilot-accent-clr)}.hover\\:bg-gray-500:hover{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.hover\\:bg-rose-300:hover{--tw-bg-opacity: 1;background-color:rgb(253 164 175 / var(--tw-bg-opacity))}.hover\\:underline:hover{text-decoration-line:underline}.focus\\:border-none:focus{border-style:none}.focus\\:border-primary:focus{border-color:var(--opencopilot-primary-clr)}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-primary:focus{--tw-ring-color: var(--opencopilot-primary-clr)}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.active\\:\\*\\:scale-105>*:active{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}@media (min-width: 640px){.sm\\:text-left{text-align:left}}@media (min-width: 1024px){.lg\\:w-1\\/4{width:25%}.lg\\:w-3\\/4{width:75%}}.rtl\\:rotate-180:where([dir=rtl],[dir=rtl] *){--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\\:-scale-x-100:where([dir=rtl],[dir=rtl] *){--tw-scale-x: -1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\\[\\&\\>button\\]\\:p-1>button{padding:.25rem}.\\[\\&\\>svg\\]\\:size-4>svg{width:1rem;height:1rem}\n',nM={ok:"Ok",agree:"Agree",cancel:"Cancel","yes-exit":"Yes, exit","yes-reset":"Yes, reset","no-cancel":"No, cancel","are-you-sure":"Are you sure?",recording:"Recording","thank-you":"Thank you"},rM={ok:"حسنا",agree:"موافق",cancel:"إلغاء","yes-exit":"نعم، اخرج","yes-reset":"نعم، إعادة تعيين","no-cancel":"لا، إلغاء","are-you-sure":"هل أنت متأكد؟",recording:"تسجيل","thank-you":"شكرا"},iM={ok:"Ok",agree:"Akkoord",cancel:"Annuleren","yes-exit":"Beëindigen","yes-reset":"Reset chat","no-cancel":"Annuleren","are-you-sure":"Wil je de chat beëindigen?",recording:"Aan het opnemen...","thank-you":"Thanks!"},oM={en:nM,ar:rM,nl:iM};function sM(e,t){const n=oM[t];return n&&n[e]||""}const[Xv,aM]=ks();function lM({children:e}){const t=wr();return S.jsx(aM,{value:{get:n=>sM(n,t.language??"en"),lang:t.language??"en"},children:e})}const uM="@openchatai/copilot-widget",cM="2.8.3",fM="module",dM={dev:"vite",clean:"rm -rf ./dist ./dist-embed","build:embed":"tsc && vite build","build:lib":"vite build -c vite.lib.config.ts",lint:"eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",preview:"vite preview",release:"release-it",prepublishOnly:"pnpm clean && pnpm build:lib && pnpm build:embed","update-dashboard-pilot":"pnpm build:embed && mv ./dist-embed/*.js ../dashboard/public/pilot.js"},pM={react:"^18.x"},hM={"@radix-ui/react-popover":"^1.0.7","@radix-ui/react-slot":"^1.0.2","@radix-ui/react-tooltip":"^1.0.7","@tailwindcss/typography":"^0.5.10","@types/node":"^20.11.14","@types/react":"^18.2.48","@types/react-dom":"^18.2.18","@typescript-eslint/eslint-plugin":"^5.62.0","@typescript-eslint/parser":"^5.62.0","@vitejs/plugin-react":"^4.2.1",autoprefixer:"^10.4.17",axios:"^1.6.7","class-variance-authority":"^0.7.0",clsx:"^2.1.0",eslint:"^8.56.0","eslint-plugin-react-hooks":"^4.6.0","eslint-plugin-react-refresh":"^0.3.5",postcss:"^8.4.33",prettier:"^2.8.8",react:"^18.2.0","react-dom":"^18.2.0","react-markdown":"^8.0.7","react-shadow":"^20.4.0","react-textarea-autosize":"^8.5.3","release-it":"^17.1.1","remark-gfm":"^3.0.1","socket.io-client":"^4.7.4",swr:"^2.2.4","tailwind-merge":"^1.14.0","tailwind-scrollbar":"^3.0.5",tailwindcss:"^3.4.1","tailwindcss-animate":"^1.0.7","timeago.js":"^4.0.2",typescript:"^5.3.3",vite:"^4.5.2","vite-plugin-dts":"^3.7.2","vite-tsconfig-paths":"^4.3.1"},mM=["dist","dist-embed"],gM={url:"https://github.com/openchatai/OpenCopilot/issues"},yM={name:"openchatai",url:"https://github.com/openchatai"},vM="./dist/index.js",wM="./dist/index.d.ts",bM={".":{require:"./dist/index.cjs.js",import:"./dist/index.es.js",default:"./dist/index.es.js",types:"./dist/index.d.ts"}},xM={"@openchatai/copilot-widget":"^2.8.1","@rjsf/core":"^5.17.1","@rjsf/utils":"^5.17.1","@rjsf/validator-ajv8":"^5.17.1",immer:"^10.0.3","lucide-react":"^0.298.0"},SM={name:uM,private:!1,version:cM,type:fM,scripts:dM,peerDependencies:pM,devDependencies:hM,files:mM,bugs:gM,author:yM,main:vM,types:wM,exports:bM,dependencies:xM};function $M(e){return SM[e]}const ai=Object.create(null);ai.open="0";ai.close="1";ai.ping="2";ai.pong="3";ai.message="4";ai.upgrade="5";ai.noop="6";const Wf=Object.create(null);Object.keys(ai).forEach(e=>{Wf[ai[e]]=e});const Ey={type:"error",data:"parser error"},ZT=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",eA=typeof ArrayBuffer=="function",tA=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Qv=({type:e,data:t},n,r)=>ZT&&t instanceof Blob?n?r(t):DS(t,r):eA&&(t instanceof ArrayBuffer||tA(t))?n?r(t):DS(new Blob([t]),r):r(ai[e]+(t||"")),DS=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function FS(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let km;function kM(e,t){if(ZT&&e.data instanceof Blob)return e.data.arrayBuffer().then(FS).then(t);if(eA&&(e.data instanceof ArrayBuffer||tA(e.data)))return t(FS(e.data));Qv(e,!1,n=>{km||(km=new TextEncoder),t(km.encode(n))})}const jS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Bl=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,s,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),c=new Uint8Array(u);for(r=0;r>4,c[i++]=(s&15)<<4|a>>2,c[i++]=(a&3)<<6|l&63;return u},EM=typeof ArrayBuffer=="function",Jv=(e,t)=>{if(typeof e!="string")return{type:"message",data:nA(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:CM(e.substring(1),t)}:Wf[n]?e.length>1?{type:Wf[n],data:e.substring(1)}:{type:Wf[n]}:Ey},CM=(e,t)=>{if(EM){const n=_M(e);return nA(n,t)}else return{base64:!0,data:e}},nA=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},rA=String.fromCharCode(30),TM=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,s)=>{Qv(o,!1,a=>{r[s]=a,++i===n&&t(r.join(rA))})})},AM=(e,t)=>{const n=e.split(rA),r=[];for(let i=0;i{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,r)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let _m;function Qc(e){return e.reduce((t,n)=>t+n.length,0)}function Jc(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;iMath.pow(2,53-32)-1){a.enqueue(Ey);break}i=c*Math.pow(2,32)+u.getUint32(4),r=3}else{if(Qc(n)e){a.enqueue(Ey);break}}}})}const iA=4;function Pt(e){if(e)return RM(e)}function RM(e){for(var t in Pt.prototype)e[t]=Pt.prototype[t];return e}Pt.prototype.on=Pt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Pt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Pt.prototype.off=Pt.prototype.removeListener=Pt.prototype.removeAllListeners=Pt.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function oA(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const NM=lr.setTimeout,IM=lr.clearTimeout;function Bp(e,t){t.useNativeTimers?(e.setTimeoutFn=NM.bind(lr),e.clearTimeoutFn=IM.bind(lr)):(e.setTimeoutFn=lr.setTimeout.bind(lr),e.clearTimeoutFn=lr.clearTimeout.bind(lr))}const DM=1.33;function FM(e){return typeof e=="string"?jM(e):Math.ceil((e.byteLength||e.size)*DM)}function jM(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}function MM(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function LM(e){let t={},n=e.split("&");for(let r=0,i=n.length;r0);return t}function aA(){const e=zS(+new Date);return e!==LS?(MS=0,LS=e):e+"."+zS(MS++)}for(;Zc{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};AM(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,TM(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=aA()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new si(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class si extends Pt{constructor(t,n){super(),Bp(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.data=n.data!==void 0?n.data:null,this.create()}create(){var t;const n=oA(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new uA(n);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this.opts.extraHeaders[i])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this.opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this.opts.cookieJar)===null||i===void 0||i.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},r.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=si.requestsCount++,si.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=VM,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete si.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}si.requestsCount=0;si.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",BS);else if(typeof addEventListener=="function"){const e="onpagehide"in lr?"pagehide":"unload";addEventListener(e,BS,!1)}}function BS(){for(let e in si.requests)si.requests.hasOwnProperty(e)&&si.requests[e].abort()}const e1=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),ef=lr.WebSocket||lr.MozWebSocket,US=!0,qM="arraybuffer",VS=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class KM extends Zv{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=VS?{}:oA(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=US&&!VS?n?new ef(t,n):new ef(t):new ef(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const s={};try{US&&this.ws.send(o)}catch{}i&&e1(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=aA()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!ef}}class GM extends Zv{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const n=PM(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=OM();i.readable.pipeTo(t.writable),this.writer=i.writable.getWriter();const o=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),o())}).catch(a=>{})};o();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this.writer.write(s).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let n=0;n{i&&e1(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const YM={websocket:KM,webtransport:GM,polling:WM},XM=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,QM=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Ty(e){if(e.length>2e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=XM.exec(e||""),o={},s=14;for(;s--;)o[QM[s]]=i[s]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=JM(o,o.path),o.queryKey=ZM(o,o.query),o}function JM(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function ZM(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let cA=class zs extends Pt{constructor(t,n={}){super(),this.binaryType=qM,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=Ty(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=Ty(n.host).host),Bp(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=LM(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=iA,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new YM[t](r)}open(){let t;if(this.opts.rememberUpgrade&&zs.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;zs.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",f=>{if(!r)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;zs.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(c(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const p=new Error("probe error");p.transport=n.name,this.emitReserved("upgradeError",p)}}))};function o(){r||(r=!0,c(),n.close(),n=null)}const s=f=>{const p=new Error("probe error: "+f);p.transport=n.name,o(),this.emitReserved("upgradeError",p)};function a(){s("transport closed")}function l(){s("socket closed")}function u(f){n&&f.name!==n.name&&o()}const c=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",a),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",s),n.once("close",a),this.once("close",l),this.once("upgrading",u),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(this.readyState="open",zs.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){zs.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,fA=Object.prototype.toString,rL=typeof Blob=="function"||typeof Blob<"u"&&fA.call(Blob)==="[object BlobConstructor]",iL=typeof File=="function"||typeof File<"u"&&fA.call(File)==="[object FileConstructor]";function t1(e){return tL&&(e instanceof ArrayBuffer||nL(e))||rL&&e instanceof Blob||iL&&e instanceof File}function qf(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num{delete this.acks[t];for(let s=0;s{this.io.clearTimeoutFn(o),n.apply(this,[null,...s])}}emitWithAck(t,...n){const r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((i,o)=>{n.push((s,a)=>r?s?o(s):i(a):i(s)),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...o)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Re.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Re.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Re.EVENT:case Re.BINARY_EVENT:this.onevent(t);break;case Re.ACK:case Re.BINARY_ACK:this.onack(t);break;case Re.DISCONNECT:this.ondisconnect();break;case Re.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:Re.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Re.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}ja.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};ja.prototype.reset=function(){this.attempts=0};ja.prototype.setMin=function(e){this.ms=e};ja.prototype.setMax=function(e){this.max=e};ja.prototype.setJitter=function(e){this.jitter=e};class Py extends Pt{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Bp(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new ja({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||fL;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new cA(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Pr(n,"open",function(){r.onopen(),t&&t()}),o=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},s=Pr(n,"error",o);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Pr(t,"ping",this.onping.bind(this)),Pr(t,"data",this.ondata.bind(this)),Pr(t,"error",this.onerror.bind(this)),Pr(t,"close",this.onclose.bind(this)),Pr(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){e1(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new dA(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const bl={};function Kf(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=eL(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=bl[i]&&o in bl[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let l;return a?l=new Py(r,t):(bl[i]||(bl[i]=new Py(r,t)),l=bl[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(Kf,{Manager:Py,Socket:dA,io:Kf,connect:Kf});function pL({socketUrl:e,token:t,sessionId:n}){return Kf(e,{autoConnect:!1,transports:["websocket"],extraHeaders:{"X-Bot-Token":t,"X-Session-Id":n}})}var pA=Symbol.for("immer-nothing"),WS=Symbol.for("immer-draftable"),Jn=Symbol.for("immer-state");function Nr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ba=Object.getPrototypeOf;function xa(e){return!!e&&!!e[Jn]}function hs(e){var t;return e?hA(e)||Array.isArray(e)||!!e[WS]||!!((t=e.constructor)!=null&&t[WS])||Vp(e)||Hp(e):!1}var hL=Object.prototype.constructor.toString();function hA(e){if(!e||typeof e!="object")return!1;const t=ba(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===hL}function Pu(e,t){Up(e)===0?Object.entries(e).forEach(([n,r])=>{t(n,r,e)}):e.forEach((n,r)=>t(r,n,e))}function Up(e){const t=e[Jn];return t?t.type_:Array.isArray(e)?1:Vp(e)?2:Hp(e)?3:0}function Ry(e,t){return Up(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function mA(e,t,n){const r=Up(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function mL(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Vp(e){return e instanceof Map}function Hp(e){return e instanceof Set}function Ho(e){return e.copy_||e.base_}function Ny(e,t){if(Vp(e))return new Map(e);if(Hp(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&hA(e))return ba(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[Jn];let r=Reflect.ownKeys(n);for(let i=0;i1&&(e.set=e.add=e.clear=e.delete=gL),Object.freeze(e),t&&Pu(e,(n,r)=>r1(r,!0))),e}function gL(){Nr(2)}function Wp(e){return Object.isFrozen(e)}var yL={};function ms(e){const t=yL[e];return t||Nr(0,e),t}var Ru;function gA(){return Ru}function vL(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function qS(e,t){t&&(ms("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Iy(e){Dy(e),e.drafts_.forEach(wL),e.drafts_=null}function Dy(e){e===Ru&&(Ru=e.parent_)}function KS(e){return Ru=vL(Ru,e)}function wL(e){const t=e[Jn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function GS(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Jn].modified_&&(Iy(t),Nr(4)),hs(e)&&(e=Ud(t,e),t.parent_||Vd(t,e)),t.patches_&&ms("Patches").generateReplacementPatches_(n[Jn].base_,e,t.patches_,t.inversePatches_)):e=Ud(t,n,[]),Iy(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==pA?e:void 0}function Ud(e,t,n){if(Wp(t))return t;const r=t[Jn];if(!r)return Pu(t,(i,o)=>YS(e,r,t,i,o,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Vd(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,s=!1;r.type_===3&&(o=new Set(i),i.clear(),s=!0),Pu(o,(a,l)=>YS(e,r,i,a,l,n,s)),Vd(e,i,!1),n&&e.patches_&&ms("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function YS(e,t,n,r,i,o,s){if(xa(i)){const a=o&&t&&t.type_!==3&&!Ry(t.assigned_,r)?o.concat(r):void 0,l=Ud(e,i,a);if(mA(n,r,l),xa(l))e.canAutoFreeze_=!1;else return}else s&&n.add(i);if(hs(i)&&!Wp(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Ud(e,i),(!t||!t.scope_.parent_)&&Vd(e,i)}}function Vd(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&r1(t,n)}function bL(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:gA(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=i1;n&&(i=[r],o=Nu);const{revoke:s,proxy:a}=Proxy.revocable(i,o);return r.draft_=a,r.revoke_=s,a}var i1={get(e,t){if(t===Jn)return e;const n=Ho(e);if(!Ry(n,t))return xL(e,n,t);const r=n[t];return e.finalized_||!hs(r)?r:r===Em(e.base_,t)?(Cm(e),e.copy_[t]=jy(r,e)):r},has(e,t){return t in Ho(e)},ownKeys(e){return Reflect.ownKeys(Ho(e))},set(e,t,n){const r=yA(Ho(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=Em(Ho(e),t),o=i==null?void 0:i[Jn];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(mL(n,i)&&(n!==void 0||Ry(e.base_,t)))return!0;Cm(e),Fy(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Em(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Cm(e),Fy(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Ho(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Nr(11)},getPrototypeOf(e){return ba(e.base_)},setPrototypeOf(){Nr(12)}},Nu={};Pu(i1,(e,t)=>{Nu[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Nu.deleteProperty=function(e,t){return Nu.set.call(this,e,t,void 0)};Nu.set=function(e,t,n){return i1.set.call(this,e[0],t,n,e[0])};function Em(e,t){const n=e[Jn];return(n?Ho(n):e)[t]}function xL(e,t,n){var i;const r=yA(t,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(e.draft_):void 0}function yA(e,t){if(!(t in e))return;let n=ba(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=ba(n)}}function Fy(e){e.modified_||(e.modified_=!0,e.parent_&&Fy(e.parent_))}function Cm(e){e.copy_||(e.copy_=Ny(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var SL=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const s=this;return function(l=o,...u){return s.produce(l,c=>n.call(this,c,...u))}}typeof n!="function"&&Nr(6),r!==void 0&&typeof r!="function"&&Nr(7);let i;if(hs(t)){const o=KS(this),s=jy(t,void 0);let a=!0;try{i=n(s),a=!1}finally{a?Iy(o):Dy(o)}return qS(o,r),GS(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===pA&&(i=void 0),this.autoFreeze_&&r1(i,!0),r){const o=[],s=[];ms("Patches").generateReplacementPatches_(t,i,o,s),r(o,s)}return i}else Nr(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(s,...a)=>this.produceWithPatches(s,l=>t(l,...a));let r,i;return[this.produce(t,n,(s,a)=>{r=s,i=a}),r,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){hs(e)||Nr(8),xa(e)&&(e=$L(e));const t=KS(this),n=jy(e,void 0);return n[Jn].isManual_=!0,Dy(t),n}finishDraft(e,t){const n=e&&e[Jn];(!n||!n.isManual_)&&Nr(9);const{scope_:r}=n;return qS(r,t),GS(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=ms("Patches").applyPatches_;return xa(e)?r(e,t):this.produce(e,i=>r(i,t))}};function jy(e,t){const n=Vp(e)?ms("MapSet").proxyMap_(e,t):Hp(e)?ms("MapSet").proxySet_(e,t):bL(e,t);return(t?t.scope_:gA()).drafts_.push(n),n}function $L(e){return xa(e)||Nr(10,e),vA(e)}function vA(e){if(!hs(e)||Wp(e))return e;const t=e[Jn];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ny(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Ny(e,!0);return Pu(n,(r,i)=>{mA(n,r,vA(i))}),t&&(t.finalized_=!1),n}var Zn=new SL,wA=Zn.produce;Zn.produceWithPatches.bind(Zn);Zn.setAutoFreeze.bind(Zn);Zn.setUseStrictShallowCopy.bind(Zn);Zn.applyPatches.bind(Zn);Zn.createDraft.bind(Zn);Zn.finishDraft.bind(Zn);function kL(e,t){return wA(e,n=>{switch(t.type){case"RECONNECT_ATTEMPT":n.state="retrying",n.reconnectAttempts=t.payload;break;case"CONNECTED":n.state="connected";break;case"DISCONNECTED":n.state="disconnected",n.reason=t.payload;break}})}const[nc,_L]=ks();function EL({children:e}){const[t,n]=O.useReducer(kL,{state:"stale",reason:null,reconnectAttempts:null}),r=wr(),{sessionId:i}=_v(r.token),[o]=Ap(),s=O.useMemo(()=>pL({socketUrl:r.socketUrl,token:r.token,sessionId:i}),[r,i]),a=O.useCallback(()=>{n({type:"CONNECTED"})},[]),l=O.useCallback(c=>{n({type:"DISCONNECTED",payload:c})},[]),u=O.useCallback(c=>{n({type:"RECONNECT_ATTEMPT",payload:c})},[]);return O.useEffect(()=>(o?s.connect():s.disconnect(),()=>{s.disconnect()}),[o,s]),O.useEffect(()=>(s.on("connect",a),s.on("disconnect",l),s.on("reconnect_attempt",u),()=>{s.off("connect",a),s.off("disconnect",l),s.off("reconnect_attempt",u)}),[s,a,l,u]),S.jsx(_L,{value:{__socket:s,state:t},children:e})}let xl=null;const CL=1e3*3;class TL{constructor(t,n=[],r){Qe(this,"sessionId",null);Qe(this,"listeners",new Set);Qe(this,"components");Qe(this,"state",{currentUserMessage:null,conversationInfo:null,lastServerMessageId:null,messages:[],clientState:{}});Qe(this,"notify",()=>{this.listeners.forEach(t=>t(this.state))});Qe(this,"unSubscribe",t=>{this.listeners.delete(t)});Qe(this,"subscribe",t=>(this.listeners.add(t),()=>{this.unSubscribe(t)}));Qe(this,"getSnapshot",()=>this.state);Qe(this,"reset",()=>{this.setValueImmer(t=>{t.messages=[],t.currentUserMessage=null,t.conversationInfo=null,t.lastServerMessageId=null})});Qe(this,"genId",(t=7)=>Math.random().toString(36).substring(t));Qe(this,"getTimeStamp",()=>new Date().toLocaleTimeString("en-US",{formatMatcher:"best fit",hour:"numeric",minute:"numeric"}));Qe(this,"isLoading",()=>this.state.currentUserMessage!==null);Qe(this,"setValue",t=>{typeof t=="function"?this.state=t(this.state):this.state=t,this.notify()});Qe(this,"setValueImmer",t=>{this.setValue(wA(this.state,t))});Qe(this,"select",t=>this.state[t]);Qe(this,"setConversationInfo",t=>{this.setValueImmer(n=>{n.conversationInfo=t})});Qe(this,"settle",()=>{this.setValueImmer(t=>{t.currentUserMessage=null,t.conversationInfo=null})});Qe(this,"setLastServerMessageId",t=>{this.setValueImmer(n=>{n.lastServerMessageId=t})});Qe(this,"handleTextMessage",(t,n)=>{const r=this.sessionId;if(!r)return;this.setLastServerMessageId(null);const i=this.genId(),o={...t,from:"user",session_id:r,id:i,timestamp:this.getTimeStamp()};this.setValueImmer(s=>{s.messages.push(o),s.currentUserMessage=o}),n.emit("send_chat",o)});Qe(this,"appendToCurrentBotMessage",t=>{const n=this.state.currentUserMessage;if(!n)return;this.select("messages").find(i=>i.id===n.id)?this.setValueImmer(i=>{var s;const o=i.messages.find(a=>a.id===n.id&&a.from==="bot"&&a.type==="TEXT");o?o.data={message:(((s=o.data)==null?void 0:s.message)||"")+t}:i.messages.push({from:"bot",id:n.id,type:"TEXT",responseFor:n.id,timestamp:this.getTimeStamp(),data:{message:t}})}):this.setValueImmer(i=>{i.messages.push({from:"bot",id:n.id,type:"TEXT",responseFor:n.id,timestamp:this.getTimeStamp(),data:{content:t}})})});Qe(this,"socketChatInfoHandler",t=>{const n=this.sessionId,r=this.setConversationInfo;function i(o){r(o)}return t.on(`${n}_info`,i),()=>{t.off(`${n}_info`,i)}});Qe(this,"socketChatVoteHandler",t=>{const n=this.sessionId;if(!n)return;const r=this.setLastServerMessageId;function i(o){r(o)}return t.on(`${n}_vote`,i),()=>{t.off(`${n}_vote`,i)}});Qe(this,"socketMessageRespHandler",t=>{const n=this.sessionId;if(!n)return;const r=i=>{if(i==="|im_end|"){this.settle();return}this.select("conversationInfo")&&this.setValueImmer(o=>{o.conversationInfo=null}),this.startTimeout(()=>{this.settle()}),this.appendToCurrentBotMessage(i)};return t.on(n,r),()=>{t.off(n,r)}});Qe(this,"socketUiHandler",t=>{const n=this.sessionId;if(!n)return;const r=i=>{const o=JSON.parse(i);this.setValueImmer(s=>{let a=null;o.type==="ui_form"?a={from:"bot",type:"FORM",id:this.genId(),responseFor:o.message_id,timestamp:this.getTimeStamp(),data:{action:o.action}}:o.type==="ui_component"&&(a={from:"bot",type:o.name,id:this.genId(),responseFor:o.message_id,timestamp:this.getTimeStamp(),data:o.request_response??{}}),a&&s.messages.push(a)})};return t.on(`${n}_ui`,r),()=>{t.off(`${n}_ui`,r)}});Qe(this,"startTimeout",t=>{this.clearTimeout(),xl=setTimeout(()=>{t(),xl=null},CL)});Qe(this,"clearTimeout",()=>{xl&&(clearTimeout(xl),xl=null)});if(!t)throw new Error("sessionId is not set");this.sessionId=t,this.components=r,this.setValueImmer(i=>{i.messages=n})}}function AL(e){return S.jsx("div",{className:"space-y-2 flex-1",children:S.jsx("div",{className:"w-full max-w-full overflow-auto",children:S.jsx("code",{dir:"auto",className:"text-xs leading-tight",children:JSON.stringify(e,null,1)})})})}function yt(e){return typeof File<"u"&&e instanceof File||typeof Date<"u"&&e instanceof Date?!1:typeof e=="object"&&e!==null&&!Array.isArray(e)}function OL(e){return e.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),yt(e.additionalItems)}function XS(e){if(e==="")return;if(e===null)return null;if(/\.$/.test(e)||/\.0$/.test(e)||/\.\d*0$/.test(e))return e;const t=Number(e);return typeof t=="number"&&!Number.isNaN(t)?t:e}const Ma="__additional_property",My="additionalProperties",rc="allOf",ti="anyOf",bA="const",PL="default",qp="dependencies",RL="enum",Dr="__errors",fo="$id",NL="if",$o="items",IL="_$junk_option_schema_id$_",Gf="$name",dr="oneOf",xt="properties",DL="required",Hd="submitButtonOptions",jt="$ref",o1="__rjsf_additionalProperties",xA="__rjsf_rootSchema",FL="ui:field",s1="ui:widget",eu="ui:options",jL="ui:globalOptions";function Fe(e={},t={}){return Object.keys(e).filter(n=>n.indexOf("ui:")===0).reduce((n,r)=>{const i=e[r];return r===s1&&yt(i)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),n):r===eu&&yt(i)?{...n,...i}:{...n,[r.substring(3)]:i}},{...t})}function SA(e,t={},n){if(!e.additionalProperties)return!1;const{expandable:r=!0}=Fe(t);return r===!1?r:e.maxProperties!==void 0&&n?Object.keys(n).length({...n,[i]:Ly(r)}),t);if(a1(e)){const n=e;return Object.keys(n).reduce((r,i)=>({...r,[i]:Ly(n[i])}),t)}return t}function gz(){this.__data__=[],this.size=0}var yz=gz;function vz(e,t){return e===t||e!==e&&t!==t}var Ba=vz,wz=Ba;function bz(e,t){for(var n=e.length;n--;)if(wz(e[n][0],t))return n;return-1}var Gp=bz,xz=Gp,Sz=Array.prototype,$z=Sz.splice;function kz(e){var t=this.__data__,n=xz(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():$z.call(t,n,1),--this.size,!0}var _z=kz,Ez=Gp;function Cz(e){var t=this.__data__,n=Ez(t,e);return n<0?void 0:t[n][1]}var Tz=Cz,Az=Gp;function Oz(e){return Az(this.__data__,e)>-1}var Pz=Oz,Rz=Gp;function Nz(e,t){var n=this.__data__,r=Rz(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var Iz=Nz,Dz=yz,Fz=_z,jz=Tz,Mz=Pz,Lz=Iz;function Ua(e){var t=-1,n=e==null?0:e.length;for(this.clear();++ta))return!1;var u=o.get(e),c=o.get(t);if(u&&c)return u==t&&c==e;var f=-1,p=!0,d=n&rB?new Z6:void 0;for(o.set(e,t),o.set(t,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=rU}var p1=iU,oU=Li,sU=p1,aU=br,lU="[object Arguments]",uU="[object Array]",cU="[object Boolean]",fU="[object Date]",dU="[object Error]",pU="[object Function]",hU="[object Map]",mU="[object Number]",gU="[object Object]",yU="[object RegExp]",vU="[object Set]",wU="[object String]",bU="[object WeakMap]",xU="[object ArrayBuffer]",SU="[object DataView]",$U="[object Float32Array]",kU="[object Float64Array]",_U="[object Int8Array]",EU="[object Int16Array]",CU="[object Int32Array]",TU="[object Uint8Array]",AU="[object Uint8ClampedArray]",OU="[object Uint16Array]",PU="[object Uint32Array]",ut={};ut[$U]=ut[kU]=ut[_U]=ut[EU]=ut[CU]=ut[TU]=ut[AU]=ut[OU]=ut[PU]=!0;ut[lU]=ut[uU]=ut[xU]=ut[cU]=ut[SU]=ut[fU]=ut[dU]=ut[pU]=ut[hU]=ut[mU]=ut[gU]=ut[yU]=ut[vU]=ut[wU]=ut[bU]=!1;function RU(e){return aU(e)&&sU(e.length)&&!!ut[oU(e)]}var NU=RU;function IU(e){return function(t){return e(t)}}var Es=IU,Kd={exports:{}};Kd.exports;(function(e,t){var n=$A,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,s=o&&n.process,a=function(){try{var l=i&&i.require&&i.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();e.exports=a})(Kd,Kd.exports);var h1=Kd.exports,DU=NU,FU=Es,l$=h1,u$=l$&&l$.isTypedArray,jU=u$?FU(u$):DU,oc=jU,MU=RA,LU=ic,zU=Bt,BU=qa,UU=nh,VU=oc,HU=Object.prototype,WU=HU.hasOwnProperty;function qU(e,t){var n=zU(e),r=!n&&LU(e),i=!n&&!r&&BU(e),o=!n&&!r&&!i&&VU(e),s=n||r||i||o,a=s?MU(e.length,String):[],l=a.length;for(var u in e)(t||WU.call(e,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||UU(u,l)))&&a.push(u);return a}var IA=qU,KU=Object.prototype;function GU(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||KU;return e===n}var rh=GU,YU=_A,XU=YU(Object.keys,Object),QU=XU,JU=rh,ZU=QU,e7=Object.prototype,t7=e7.hasOwnProperty;function n7(e){if(!JU(e))return ZU(e);var t=[];for(var n in Object(e))t7.call(e,n)&&n!="constructor"&&t.push(n);return t}var DA=n7,r7=Xp,i7=p1;function o7(e){return e!=null&&i7(e.length)&&!r7(e)}var Cs=o7,s7=IA,a7=DA,l7=Cs;function u7(e){return l7(e)?s7(e):a7(e)}var sc=u7,c7=OA,f7=d1,d7=sc;function p7(e){return c7(e,d7,f7)}var FA=p7,c$=FA,h7=1,m7=Object.prototype,g7=m7.hasOwnProperty;function y7(e,t,n,r,i,o){var s=n&h7,a=c$(e),l=a.length,u=c$(t),c=u.length;if(l!=c&&!s)return!1;for(var f=l;f--;){var p=a[f];if(!(s?p in t:g7.call(t,p)))return!1}var d=o.get(e),h=o.get(t);if(d&&h)return d==t&&h==e;var g=!0;o.set(e,t),o.set(t,e);for(var y=s;++f{if(typeof n=="function"&&typeof r=="function")return!0})}var Z7=Li,e8=br,t8="[object Symbol]";function n8(e){return typeof e=="symbol"||e8(e)&&Z7(e)==t8}var Ga=n8,r8=Bt,i8=Ga,o8=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s8=/^\w*$/;function a8(e,t){if(r8(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||i8(e)?!0:s8.test(e)||!o8.test(e)||t!=null&&e in Object(t)}var m1=a8,zA=u1,l8="Expected a function";function g1(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(l8);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(g1.Cache||zA),n}g1.Cache=zA;var u8=g1,c8=u8,f8=500;function d8(e){var t=c8(e,function(r){return n.size===f8&&n.clear(),r}),n=t.cache;return t}var p8=d8,h8=p8,m8=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,g8=/\\(\\)?/g,y8=h8(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(m8,function(n,r,i,o){t.push(i?o.replace(g8,"$1"):r||n)}),t}),BA=y8;function v8(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++no,typeof e[r]>"u"&&(Array.isArray(e)&&r==="-"&&(r=e.length),i&&(t[o]!==""&&t[o]<1/0||t[o]==="-"?e[r]=[]:e[r]={})),!i)break;e=e[r]}var a=e[r];return n===void 0?delete e[r]:e[r]=n,a}function y1(e){if(typeof e=="string"){if(e=e.split("/"),e[0]==="")return e;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(e)){for(const t of e)if(typeof t!="string"&&typeof t!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return e}throw new Error("Invalid JSON pointer.")}function qA(e,t){if(typeof e!="object")throw new Error("Invalid input object.");t=y1(t);var n=t.length;if(n===1)return e;for(var r=1;ri?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r0&&n(a)?t>1?aO(a,t-1,n,r,i):Eq(i,a):r||(i[i.length]=a)}return i}var ah=aO,Tq=ah;function Aq(e){var t=e==null?0:e.length;return t?Tq(e,1):[]}var S1=Aq;function Oq(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var lO=Oq,Pq=lO,M$=Math.max;function Rq(e,t,n){return t=M$(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=M$(r.length-t,0),s=Array(o);++i0){if(++t>=zq)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Hq=Vq,Wq=Lq,qq=Hq,Kq=qq(Wq),cO=Kq,Gq=S1,Yq=uO,Xq=cO;function Qq(e){return Xq(Yq(e,void 0,Gq),e+"")}var fO=Qq,Jq=zi,Zq=iO,eK=sO,tK=Ya,nK=Xa,rK=xq,iK=fO,oK=QA,sK=1,aK=2,lK=4,uK=iK(function(e,t){var n={};if(e==null)return n;var r=!1;t=Jq(t,function(o){return o=tK(o,e),r||(r=o.length>1),o}),nK(e,oK(e),n),r&&(n=Zq(n,sK|aK|lK,rK));for(var i=t.length;i--;)eK(n,t[i]);return n}),cK=uK;const Yd=He(cK);function $1(e,t){const n=t[e];return[Yd(t,[e]),n]}function k1(e,t={}){let n=e||"";if(n.startsWith("#"))n=decodeURIComponent(n.substring(1));else throw new Error(`Could not find a definition for ${e}.`);const r=oh.get(t,n);if(r===void 0)throw new Error(`Could not find a definition for ${e}.`);if(r[jt]){const[i,o]=$1(jt,r),s=k1(o,t);return Object.keys(i).length>0?{...i,...s}:s}return r}var fK=Object.prototype,dK=fK.hasOwnProperty;function pK(e,t){return e!=null&&dK.call(e,t)}var hK=pK,mK=Ya,gK=ic,yK=Bt,vK=nh,wK=p1,bK=Ts;function xK(e,t,n){t=mK(t,e);for(var r=-1,i=t.length,o=!1;++rRY)return[];var n=Pm,r=NY(e,Pm);t=OY(t),e-=Pm;for(var i=AY(r,t);++n({required:[c]}))};let u;if(a.anyOf){const{...c}=a;c.allOf?c.allOf=c.allOf.slice():c.allOf=[],c.allOf.push(l),u=c}else u=Object.assign({},a,l);if(delete u.required,e.isValid(u,t,r))return s}else if(e.isValid(a,t,r))return s}return 0}function T1(e,t,n,r,i){return SO(e,t,n,r,i)}var FY=ih;function jY(e,t){return FY(e,t)}var A1=jY;const ys=He(A1);var MY=b1,LY=Ya,zY=nh,V$=In,BY=Ts;function UY(e,t,n,r){if(!V$(e))return e;t=LY(t,e);for(var i=-1,o=t.length,s=o-1,a=e;a!=null&&++i1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,s&&qX(n[0],n[1],s)&&(o=i<3?void 0:o,i=1),t=Object(t);++r-1}var N1=hQ;function mQ(e,t,n){for(var r=-1,i=e==null?0:e.length;++r=AQ){var u=t?null:CQ(e);if(u)return TQ(u);s=!1,i=EQ,l=new $Q}else l=t?[]:a;e:for(;++rt||o&&s&&l&&!a&&!u||r&&s&&l||!n&&l||!i)return 1;if(!r&&!o&&!u&&e=a)return l;var u=n[r];return l*(u=="desc"?-1:1)}}return e.index-t.index}var GQ=KQ,Nm=zi,YQ=lc,XQ=C1,QQ=BQ,JQ=VQ,ZQ=Es,eJ=GQ,tJ=uc,nJ=Bt;function rJ(e,t,n){t.length?t=Nm(t,function(o){return nJ(o)?function(s){return YQ(s,o.length===1?o[0]:o)}:o}):t=[tJ];var r=-1;t=Nm(t,ZQ(XQ));var i=QQ(e,function(o,s,a){var l=Nm(t,function(u){return u(o)});return{criteria:l,index:++r,value:o}});return JQ(i,function(o,s){return eJ(o,s,n)})}var iJ=rJ,oJ=ah,sJ=iJ,aJ=Do,Y$=P1,lJ=aJ(function(e,t){if(e==null)return[];var n=t.length;return n>1&&Y$(e,t[0],t[1])?t=[]:n>2&&Y$(t[0],t[1],t[2])&&(t=[t[0]]),sJ(e,oJ(t,1),[])}),PO=lJ,uJ=D1;function cJ(e,t){return t=typeof t=="function"?t:void 0,e&&e.length?uJ(e,void 0,t):[]}var F1=cJ,fJ=Do,dJ=Ba,pJ=P1,hJ=Qa,RO=Object.prototype,mJ=RO.hasOwnProperty,gJ=fJ(function(e,t){e=Object(e);var n=-1,r=t.length,i=r>2?t[2]:void 0;for(i&&pJ(t[0],t[1],i)&&(r=1);++n=120&&c.length>=120)?new vJ(s&&c):void 0}c=e[0];var f=-1,p=a[0];e:for(;++fArray.isArray(e)?e:[e],pr=e=>e===void 0,nf=e=>Xd(e)||Array.isArray(e)?Object.keys(e):[],ta=(e,t)=>e.hasOwnProperty(t),Sa=e=>MJ(j1(e)),Z$=e=>pr(e)||Array.isArray(e)&&e.length===0,BJ=(e,t,n,r)=>t&&ta(t,n)&&e&&ta(e,n)&&r(e[n],t[n]),Dm=(e,t)=>pr(e)&&t===0||pr(t)&&e===0||Ur(e,t),UJ=(e,t)=>pr(e)&&t===!1||pr(t)&&e===!1||Ur(e,t),ek=e=>pr(e)||Ur(e,{})||e===!0,rf=e=>pr(e)||Ur(e,{}),tk=e=>pr(e)||Xd(e)||e===!0||e===!1;function nk(e,t){return Z$(e)&&Z$(t)?!0:Ur(Sa(e),Sa(t))}function VJ(e,t){return e=J$(e),t=J$(t),Ur(Sa(e),Sa(t))}function Xf(e,t,n,r){var i=j1(nf(e).concat(nf(t)));return rf(e)&&rf(t)?!0:rf(e)&&nf(t).length||rf(t)&&nf(e).length?!1:i.every(function(o){var s=e[o],a=t[o];return Array.isArray(s)&&Array.isArray(a)?Ur(Sa(e),Sa(t)):Array.isArray(s)&&!Array.isArray(a)||Array.isArray(a)&&!Array.isArray(s)?!1:BJ(e,t,o,r)})}function HJ(e,t,n,r){return Xd(e)&&Xd(t)?r(e,t):Array.isArray(e)&&Array.isArray(t)?Xf(e,t,n,r):Ur(e,t)}function Fm(e,t,n,r){var i=Q$(e,r),o=Q$(t,r),s=zJ(i,o,r);return s.length===Math.max(i.length,o.length)}var WJ={title:Ur,uniqueItems:UJ,minLength:Dm,minItems:Dm,minProperties:Dm,required:nk,enum:nk,type:VJ,items:HJ,anyOf:Fm,allOf:Fm,oneOf:Fm,properties:Xf,patternProperties:Xf,dependencies:Xf},qJ=["properties","patternProperties","dependencies","uniqueItems","minLength","minItems","minProperties","required"],KJ=["additionalProperties","additionalItems","contains","propertyNames","not"];function Wy(e,t,n){if(n=LJ(n,{ignore:[]}),ek(e)&&ek(t))return!0;if(!tk(e)||!tk(t))throw new Error("Either of the values are not a JSON schema.");if(e===t)return!0;if(Im(e)&&Im(t))return e===t;if(e===void 0&&t===!1||t===void 0&&e===!1||pr(e)&&!pr(t)||!pr(e)&&pr(t))return!1;var r=j1(Object.keys(e).concat(Object.keys(t)));if(n.ignore.length&&(r=r.filter(o=>n.ignore.indexOf(o)===-1)),!r.length)return!0;function i(o,s){return Wy(o,s,n)}return r.every(function(o){var s=e[o],a=t[o];if(KJ.indexOf(o)!==-1)return Wy(s,a,n);var l=WJ[o];if(l||(l=Ur),Ur(s,a))return!0;if(qJ.indexOf(o)===-1&&(!ta(e,o)&&ta(t,o)||ta(e,o)&&!ta(t,o)))return s===a;var u=l(s,a,o,i);if(!Im(u))throw new Error("Comparer must return true or false");return u})}var M1=Wy;function GJ(e){return Object.prototype.toString.call(e)==="[object Array]"}var L1=Array.isArray||GJ;function YJ(e){return(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")&&e.valueOf()===e.valueOf()}var XJ=YJ,QJ=XJ;function JJ(e){return QJ(e)&&e%1===0}var ZJ=JJ,eZ=L1,tZ=ZJ;function nZ(e){var t;if(!eZ(e)||(t=e.length,!t))return!1;for(var n=0;nt&&(r=t,t=e,e=r),t=t-e}return n*e}function ok(e,t){var n=0,r;if(e===0)return t;if(t===0)return e;for(;!(e&1)&&!(t&1);)e>>>=1,t>>>=1,n++;for(;!(e&1);)e>>>=1;for(;t;){for(;!(t&1);)t>>>=1;e>t&&(r=t,t=e,e=r),t=t-e}return e<1){if(r=t[0],n=t[1],!oZ(n))throw new TypeError("gcd()::invalid input argument. Accessor must be a function. Value: `"+n+"`.")}else r=t[0];else throw new TypeError("gcd()::invalid input argument. Must provide an array of integers. Value: `"+t[0]+"`.");if(i=r.length,i<2)return null;if(n){for(o=new Array(i),a=0;a1){if(r=t[0],n=t[1],!uZ(n))throw new TypeError("lcm()::invalid input argument. Accessor must be a function. Value: `"+n+"`.")}else r=t[0];else throw new TypeError("lcm()::invalid input argument. Must provide an array of integers. Value: `"+t[0]+"`.");if(i=r.length,i<2)return null;if(n){for(o=new Array(i),a=0;a-1;)a!==e&&uk.call(a,l,1),uk.call(e,l,1);return e}var LZ=MZ,zZ=LZ;function BZ(e,t){return e&&e.length&&t&&t.length?zZ(e,t):e}var UZ=BZ,VZ=v1,HZ=E1,WZ=wO,qZ=Bt;function KZ(e,t){var n=qZ(e)?VZ:HZ;return n(e,WZ(t))}var LO=KZ,GZ=eh,YZ=N1,XZ=I1,QZ=zi,JZ=Es,ZZ=th,eee=200;function tee(e,t,n,r){var i=-1,o=YZ,s=!0,a=e.length,l=[],u=t.length;if(!a)return l;n&&(t=QZ(t,JZ(n))),r?(o=XZ,s=!1):t.length>=eee&&(o=ZZ,s=!1,t=new GZ(t));e:for(;++icee(uee(e.map(z1))),mee=(e,t)=>e.map(n=>n&&n[t]),BO=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),z1=e=>zO(e)||Array.isArray(e)?Object.keys(e):[],gee=e=>e!==void 0,yee=e=>zO(e)||e===!0||e===!1,UO=e=>!z1(e).length&&e!==!1&&e!==!0,vee=(e,...t)=>dee.apply(null,[e].concat(lee(t)));var VO={allUniqueKeys:hee,deleteUndefinedProps:pee,getValues:mee,has:BO,isEmptySchema:UO,isSchema:yee,keys:z1,notUndefined:gee,uniqWith:fee,withoutArr:vee};const wee=M1,bee=LO,{allUniqueKeys:xee,deleteUndefinedProps:See,getValues:$ee,keys:$l,notUndefined:kee,uniqWith:_ee,withoutArr:ck}=VO;function Eee(e){bee(e,function(t,n){t===!1&&delete e[n]})}function fk(e,t){return xee(e).reduce(function(r,i){const o=$ee(e,i),s=_ee(o.filter(kee),wee);return r[i]=t(s,i),r},{})}var Cee={keywords:["properties","patternProperties","additionalProperties"],resolver(e,t,n,r){r.ignoreAdditionalProperties||(e.forEach(function(o){const s=e.filter(c=>c!==o),a=$l(o.properties),u=$l(o.patternProperties).map(c=>new RegExp(c));s.forEach(function(c){const f=$l(c.properties),p=f.filter(h=>u.some(g=>g.test(h)));ck(f,a,p).forEach(function(h){c.properties[h]=n.properties([c.properties[h],o.additionalProperties],h)})})}),e.forEach(function(o){const s=e.filter(l=>l!==o),a=$l(o.patternProperties);o.additionalProperties===!1&&s.forEach(function(l){const u=$l(l.patternProperties);ck(u,a).forEach(f=>delete l.patternProperties[f])})}));const i={additionalProperties:n.additionalProperties(e.map(o=>o.additionalProperties)),patternProperties:fk(e.map(o=>o.patternProperties),n.patternProperties),properties:fk(e.map(o=>o.properties),n.properties)};return i.additionalProperties===!1&&Eee(i.properties),See(i)}};const Tee=M1,Aee=LO,{allUniqueKeys:Oee,deleteUndefinedProps:Pee,has:Ree,isSchema:HO,notUndefined:WO,uniqWith:Nee}=VO;function Iee(e){Aee(e,function(t,n){t===!1&&e.splice(n,1)})}function Dee(e,t){return e.map(function(n){if(n)if(Array.isArray(n.items)){const r=n.items[t];if(HO(r))return r;if(Ree(n,"additionalItems"))return n.additionalItems}else return n.items})}function Fee(e){return e.map(function(t){if(t)return Array.isArray(t.items)?t.additionalItems:t.items})}function jee(e,t,n){return Oee(n).reduce(function(i,o){const s=Dee(e,o),a=Nee(s.filter(WO),Tee);return i[o]=t(a,o),i},[])}var Mee={keywords:["items","additionalItems"],resolver(e,t,n){const r=e.map(a=>a.items),i=r.filter(WO),o={};i.every(HO)?o.items=n.items(r):o.items=jee(e,n.items,r);let s;return i.every(Array.isArray)?s=e.map(a=>a.additionalItems):i.some(Array.isArray)&&(s=Fee(e)),s&&(o.additionalItems=n.additionalItems(s)),o.additionalItems===!1&&Array.isArray(o.items)&&Iee(o.items),Pee(o)}};const qO=AO,Qd=M1,Lee=fZ,zee=$Z,KO=S1,B1=R1,Bee=AZ,Uee=DO,qy=A1,$a=za,Vee=UZ,GO=PO,U1=uh,la=F1,YO=Cee,XO=Mee,sf=(e,t)=>e.indexOf(t)!==-1,Hee=e=>$a(e)||e===!0||e===!1,Wee=e=>e===!1,QO=e=>e===!0,ch=(e,t,n)=>n(e),JO=e=>GO(U1(B1(e))),Jd=e=>e!==void 0,ZO=e=>U1(B1(e.map(Qee))),Ja=e=>e[0],qee=e=>JO(e),cc=e=>Math.max.apply(Math,e),fc=e=>Math.min.apply(Math,e),Kee=e=>e.some(QO),Gee=e=>la(KO(e),qy);function Yee(e){return function(t,n){return Qd({[e]:t},{[e]:n})}}function eP(e){let{allOf:t=[],...n}=e;return n=$a(e)?n:e,[n,...t.map(eP)]}function tP(e,t){return e.map(n=>n&&n[t])}function Xee(e,t){return e.map(function(n,r){try{return t(n,r)}catch{return}}).filter(Jd)}function Qee(e){return $a(e)||Array.isArray(e)?Object.keys(e):[]}function Ky(e,t){if(t=t||[],!e.length)return t;const n=e.slice(0).shift(),r=e.slice(1);return t.length?Ky(r,KO(t.map(i=>n.map(o=>[o].concat(i))))):Ky(r,n.map(i=>i))}function nP(e,t){let n;try{n=e.map(function(r){return JSON.stringify(r,null,2)}).join(` +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)},Y5=function(e,t){return W5(e)||q5(e,t)||K5(e,t)||G5()},QT=XT(function(e){function t(){return e.exports=t=Object.assign||function(n){for(var r=1;r=0||(i[n]=e[n]);return i},JT=function(e,t){if(e==null)return{};var n,r,i=X5(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i},Q5=O.createContext(null);function ky(e){var t=e.children,n=JT(e,["children"]);return typeof t!="string"&&(t=j5(t)),Wt.createElement("template",QT({},n,{dangerouslySetInnerHTML:{__html:t}}))}function _y(e){var t=e.root,n=e.children;return Zu.createPortal(n,t)}function J5(e){var t=O.forwardRef(function(n,r){var i,o,s=n.mode,a=n.delegatesFocus,l=n.styleSheets,u=n.ssr,c=n.children,f=JT(n,["mode","delegatesFocus","styleSheets","ssr","children"]),p=(o=O.useRef((i=r)&&i.current),O.useEffect(function(){i&&(i.current=o.current)},[i]),o),d=O.useState(null),h=Y5(d,2),g=h[0],y=h[1],m="node_".concat(s).concat(a);return O.useLayoutEffect(function(){if(p.current)try{if(typeof r=="function"&&r(p.current),u){var v=p.current.shadowRoot;return void y(v)}var w=p.current.attachShadow({mode:s,delegatesFocus:a});l.length>0&&(w.adoptedStyleSheets=l),y(w)}catch(x){(function($){var b=$.error,k=$.styleSheets,T=$.root;switch(b.name){case"NotSupportedError":k.length>0&&(T.adoptedStyleSheets=k);break;default:throw b}})({error:x,styleSheets:l,root:g})}},[r,p,l]),Wt.createElement(Wt.Fragment,null,Wt.createElement(e.tag,QT({key:m,ref:p},f),(g||u)&&Wt.createElement(Q5.Provider,{value:g},u?Wt.createElement(ky,{shadowroot:s,shadowrootmode:s},e.render({root:g,ssr:u,children:c})):Wt.createElement(_y,{root:g},e.render({root:g,ssr:u,children:c})))))});return t.propTypes={mode:ce.oneOf(["open","closed"]),delegatesFocus:ce.bool,styleSheets:ce.arrayOf(ce.instanceOf(globalThis.CSSStyleSheet)),ssr:ce.bool,children:ce.node},t.defaultProps={mode:"open",delegatesFocus:!1,styleSheets:[],ssr:!1,children:null},t}ky.propTypes={children:ce.oneOfType([ce.string,ce.node])},ky.defaultProps={children:""},_y.propTypes={root:ce.object.isRequired,children:ce.node},_y.defaultProps={children:null};var $m=new Map;function Z5(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"core",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(r){return r.children};return new Proxy(e,{get:function(r,i){var o=H5(i,{separator:"-"}),s="".concat(t,"-").concat(o);return $m.has(s)||$m.set(s,J5({tag:o,render:n})),$m.get(s)}})}var eM=Z5();const tM='.pointer-events-auto{pointer-events:auto}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.isolate{isolation:isolate}.z-50{z-index:50}.z-\\[100\\]{z-index:100}.z-\\[50000\\]{z-index:50000}.m-0{margin:0}.mx-auto{margin-left:auto;margin-right:auto}.mb-0{margin-bottom:0}.mb-0\\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-3{margin-right:.75rem}.mt-0{margin-top:0}.mt-0\\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-auto{margin-top:auto}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.size-10{width:2.5rem;height:2.5rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.size-8{width:2rem;height:2rem}.size-\\[1em\\]{width:1em;height:1em}.h-10{height:2.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.max-h-full{max-height:100%}.min-h-fit{min-height:-moz-fit-content;min-height:fit-content}.w-1\\/2{width:50%}.w-1\\/4{width:25%}.w-3\\/4{width:75%}.w-7{width:1.75rem}.w-9{width:2.25rem}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.min-w-fit{min-width:-moz-fit-content;min-width:fit-content}.max-w-\\[15rem\\]{max-width:15rem}.max-w-\\[70\\%\\]{max-width:70%}.max-w-full{max-width:100%}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.shrink-0{flex-shrink:0}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize{resize:both}.list-inside{list-style-position:inside}.list-none{list-style-type:none}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-items-center{justify-items:center}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-px{gap:1px}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.scroll-smooth{scroll-behavior:smooth}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.border{border-width:1px}.border-0{border-width:0px}.border-b{border-bottom-width:1px}.border-none{border-style:none}.border-accent{border-color:var(--opencopilot-accent-clr)}.border-primary{border-color:var(--opencopilot-primary-clr)}.border-rose-500{--tw-border-opacity: 1;border-color:rgb(244 63 94 / var(--tw-border-opacity))}.border-b-black\\/10{border-bottom-color:#0000001a}.bg-accent{background-color:var(--opencopilot-accent-clr)}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-black\\/50{background-color:#00000080}.bg-emerald-500{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-primary{background-color:var(--opencopilot-primary-clr)}.bg-rose-200{--tw-bg-opacity: 1;background-color:rgb(254 205 211 / var(--tw-bg-opacity))}.bg-rose-500{--tw-bg-opacity: 1;background-color:rgb(244 63 94 / var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-200{--tw-bg-opacity: 1;background-color:rgb(254 240 138 / var(--tw-bg-opacity))}.fill-current{fill:currentColor}.stroke-emerald-500{stroke:#10b981}.stroke-rose-500{stroke:#f43f5e}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-2\\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.ps-10{padding-inline-start:2.5rem}.text-center{text-align:center}.text-\\[14px\\]{font-size:14px}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-tight{line-height:1.25}.text-\\[\\#5e5c5e\\]{--tw-text-opacity: 1;color:rgb(94 92 94 / var(--tw-text-opacity))}.text-accent{color:var(--opencopilot-accent-clr)}.text-emerald-500{--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-primary{color:var(--opencopilot-primary-clr)}.text-rose-500{--tw-text-opacity: 1;color:rgb(244 63 94 / var(--tw-text-opacity))}.text-rose-800{--tw-text-opacity: 1;color:rgb(159 18 57 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity))}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-\\[\\#334155\\]\\/60{--tw-ring-color: rgb(51 65 85 / .6)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.animate-out{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.fade-in-0{--tw-enter-opacity: 0}.fade-in-10{--tw-enter-opacity: .1}.fade-out{--tw-exit-opacity: 0}.slide-in-from-bottom-5{--tw-enter-translate-y: 1.25rem}.duration-300{animation-duration:.3s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.running{animation-play-state:running}.paused{animation-play-state:paused}.scrollbar-thin{scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)}.scrollbar-thin::-webkit-scrollbar-track{background-color:var(--scrollbar-track);border-radius:var(--scrollbar-track-radius)}.scrollbar-thin::-webkit-scrollbar-track:hover{background-color:var(--scrollbar-track-hover, var(--scrollbar-track))}.scrollbar-thin::-webkit-scrollbar-track:active{background-color:var(--scrollbar-track-active, var(--scrollbar-track-hover, var(--scrollbar-track)))}.scrollbar-thin::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:var(--scrollbar-thumb-radius)}.scrollbar-thin::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover, var(--scrollbar-thumb))}.scrollbar-thin::-webkit-scrollbar-thumb:active{background-color:var(--scrollbar-thumb-active, var(--scrollbar-thumb-hover, var(--scrollbar-thumb)))}.scrollbar-thin::-webkit-scrollbar-corner{background-color:var(--scrollbar-corner);border-radius:var(--scrollbar-corner-radius)}.scrollbar-thin::-webkit-scrollbar-corner:hover{background-color:var(--scrollbar-corner-hover, var(--scrollbar-corner))}.scrollbar-thin::-webkit-scrollbar-corner:active{background-color:var(--scrollbar-corner-active, var(--scrollbar-corner-hover, var(--scrollbar-corner)))}.scrollbar-thin{scrollbar-width:thin}.scrollbar-thin::-webkit-scrollbar{display:block;width:8px;height:8px}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-left-width:.25rem;border-left-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-left:1em}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:900;color:inherit}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:800;color:inherit}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){display:block;margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-family:inherit;color:var(--tw-prose-kbd);box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%),0 3px 0 rgb(var(--tw-prose-kbd-shadows) / 10%);font-size:.875em;border-radius:.3125rem;padding:.1875em .375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:"`"}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding:.8571429em 1.1428571em}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:none}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){width:100%;table-layout:auto;text-align:left;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-right:.5714286em;padding-bottom:.5714286em;padding-left:.5714286em}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose{--tw-prose-body: #374151;--tw-prose-headings: #111827;--tw-prose-lead: #4b5563;--tw-prose-links: #111827;--tw-prose-bold: #111827;--tw-prose-counters: #6b7280;--tw-prose-bullets: #d1d5db;--tw-prose-hr: #e5e7eb;--tw-prose-quotes: #111827;--tw-prose-quote-borders: #e5e7eb;--tw-prose-captions: #6b7280;--tw-prose-kbd: #111827;--tw-prose-kbd-shadows: 17 24 39;--tw-prose-code: #111827;--tw-prose-pre-code: #e5e7eb;--tw-prose-pre-bg: #1f2937;--tw-prose-th-borders: #d1d5db;--tw-prose-td-borders: #e5e7eb;--tw-prose-invert-body: #d1d5db;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #9ca3af;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #9ca3af;--tw-prose-invert-bullets: #4b5563;--tw-prose-invert-hr: #374151;--tw-prose-invert-quotes: #f3f4f6;--tw-prose-invert-quote-borders: #374151;--tw-prose-invert-captions: #9ca3af;--tw-prose-invert-kbd: #fff;--tw-prose-invert-kbd-shadows: 255 255 255;--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #d1d5db;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #4b5563;--tw-prose-invert-td-borders: #374151;font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(.prose>ul>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-left:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding:.5714286em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.prose-sm{font-size:.875rem;line-height:1.7142857}.prose-sm :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.prose-sm :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;line-height:1.5555556;margin-top:.8888889em;margin-bottom:.8888889em}.prose-sm :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.3333333em;margin-bottom:1.3333333em;padding-left:1.1111111em}.prose-sm :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:2.1428571em;margin-top:0;margin-bottom:.8em;line-height:1.2}.prose-sm :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.4285714em;margin-top:1.6em;margin-bottom:.8em;line-height:1.4}.prose-sm :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;margin-top:1.5555556em;margin-bottom:.4444444em;line-height:1.5555556}.prose-sm :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.4285714em;margin-bottom:.5714286em;line-height:1.4285714}.prose-sm :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;border-radius:.3125rem;padding:.1428571em .3571429em}.prose-sm :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em}.prose-sm :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.9em}.prose-sm :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8888889em}.prose-sm :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.6666667;margin-top:1.6666667em;margin-bottom:1.6666667em;border-radius:.25rem;padding:.6666667em 1em}.prose-sm :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-left:1.5714286em}.prose-sm :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-left:1.5714286em}.prose-sm :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;margin-bottom:.2857143em}.prose-sm :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.4285714em}.prose-sm :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.4285714em}.prose-sm :where(.prose-sm>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(.prose-sm>ul>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ul>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(.prose-sm>ol>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ol>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.prose-sm :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;padding-left:1.5714286em}.prose-sm :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2.8571429em;margin-bottom:2.8571429em}.prose-sm :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.5}.prose-sm :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:1em;padding-bottom:.6666667em;padding-left:1em}.prose-sm :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose-sm :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose-sm :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding:.6666667em 1em}.prose-sm :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose-sm :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose-sm :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.3333333;margin-top:.6666667em}.prose-sm :where(.prose-sm>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(.prose-sm>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.prose-slate{--tw-prose-body: #334155;--tw-prose-headings: #0f172a;--tw-prose-lead: #475569;--tw-prose-links: #0f172a;--tw-prose-bold: #0f172a;--tw-prose-counters: #64748b;--tw-prose-bullets: #cbd5e1;--tw-prose-hr: #e2e8f0;--tw-prose-quotes: #0f172a;--tw-prose-quote-borders: #e2e8f0;--tw-prose-captions: #64748b;--tw-prose-kbd: #0f172a;--tw-prose-kbd-shadows: 15 23 42;--tw-prose-code: #0f172a;--tw-prose-pre-code: #e2e8f0;--tw-prose-pre-bg: #1e293b;--tw-prose-th-borders: #cbd5e1;--tw-prose-td-borders: #e2e8f0;--tw-prose-invert-body: #cbd5e1;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #94a3b8;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #94a3b8;--tw-prose-invert-bullets: #475569;--tw-prose-invert-hr: #334155;--tw-prose-invert-quotes: #f1f5f9;--tw-prose-invert-quote-borders: #334155;--tw-prose-invert-captions: #94a3b8;--tw-prose-invert-kbd: #fff;--tw-prose-invert-kbd-shadows: 255 255 255;--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #cbd5e1;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #475569;--tw-prose-invert-td-borders: #334155}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*{scrollbar-color:initial;scrollbar-width:initial}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }svg{vector-effect:non-scaling-stroke}@keyframes fade-in-bottom{0%{transform:translateY(50px);opacity:0}to{transform:translateY(0);opacity:1}}.fade-in-bottom{animation:fade-in-bottom .4s cubic-bezier(.39,.575,.565,1) both}.flex-center{display:flex;align-items:center;justify-content:center}@keyframes fade-in-top{0%{transform:translateY(-50px);opacity:0}to{transform:translateY(0);opacity:1}}.fade-in-top{animation:fade-in-top .6s cubic-bezier(.39,.575,.565,1) both}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.fade-in{animation:fade-in 1.2s cubic-bezier(.39,.575,.565,1) both}@keyframes scaleIn{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes slideDown{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}@keyframes slideUp{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes fade-in-right{0%{transform:translate(50px);opacity:0}to{transform:translate(0);opacity:1}}.fade-in-right{animation:fade-in-right .6s both}@keyframes scale-out-br{0%{transform:scale(1);transform-origin:100% 100%;opacity:1}to{transform:scale(0);transform-origin:100% 100%;opacity:1}}.scale-out-br{animation:scale-out-br .5s ease-in-out forwards}.no-scrollbar::-webkit-scrollbar{display:none}@keyframes text-blur-out{0%{filter:blur(.01)}to{filter:blur(12px) opacity(0%)}}.text-blur-out{animation:text-blur-out 1.2s cubic-bezier(.55,.085,.68,.53) both}.\\*\\:fill-emerald-500>*{fill:#10b981}.\\*\\:fill-rose-500>*{fill:#f43f5e}.placeholder\\:align-middle::-moz-placeholder{vertical-align:middle}.placeholder\\:align-middle::placeholder{vertical-align:middle}.placeholder\\:text-xs::-moz-placeholder{font-size:.75rem;line-height:1rem}.placeholder\\:text-xs::placeholder{font-size:.75rem;line-height:1rem}.last-of-type\\:mb-10:last-of-type{margin-bottom:2.5rem}.focus-within\\:ring-primary:focus-within{--tw-ring-color: var(--opencopilot-primary-clr)}.data-\\[state\\=open\\]\\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\\[state\\=closed\\]\\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\\[state\\=closed\\]\\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\\[state\\=open\\]\\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\\[state\\=closed\\]\\:slide-in-from-top-0[data-state=closed]{--tw-enter-translate-y: -0px}.data-\\[state\\=closed\\]\\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y: 100%}.data-\\[state\\=open\\]\\:slide-in-from-bottom-3[data-state=open]{--tw-enter-translate-y: .75rem}.prose-headings\\:my-1 :is(:where(h1,h2,h3,h4,h5,h6,th):not(:where([class~=not-prose],[class~=not-prose] *))){margin-top:.25rem;margin-bottom:.25rem}.prose-h1\\:font-medium :is(:where(h1):not(:where([class~=not-prose],[class~=not-prose] *))){font-weight:500}.prose-h2\\:font-normal :is(:where(h2):not(:where([class~=not-prose],[class~=not-prose] *))){font-weight:400}.hover\\:bg-accent:hover{background-color:var(--opencopilot-accent-clr)}.hover\\:bg-gray-500:hover{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.hover\\:bg-rose-300:hover{--tw-bg-opacity: 1;background-color:rgb(253 164 175 / var(--tw-bg-opacity))}.hover\\:underline:hover{text-decoration-line:underline}.focus\\:border-none:focus{border-style:none}.focus\\:border-primary:focus{border-color:var(--opencopilot-primary-clr)}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-primary:focus{--tw-ring-color: var(--opencopilot-primary-clr)}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.active\\:\\*\\:scale-105>*:active{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}@media (min-width: 640px){.sm\\:text-left{text-align:left}}@media (min-width: 1024px){.lg\\:w-1\\/4{width:25%}.lg\\:w-3\\/4{width:75%}}.rtl\\:rotate-180:where([dir=rtl],[dir=rtl] *){--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\\:-scale-x-100:where([dir=rtl],[dir=rtl] *){--tw-scale-x: -1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\\[\\&\\>button\\]\\:p-1>button{padding:.25rem}.\\[\\&\\>svg\\]\\:size-4>svg{width:1rem;height:1rem}\n',nM={ok:"Ok",agree:"Agree",cancel:"Cancel","yes-exit":"Yes, exit","yes-reset":"Yes, reset","no-cancel":"No, cancel","are-you-sure":"Are you sure?",recording:"Recording","thank-you":"Thank you"},rM={ok:"حسنا",agree:"موافق",cancel:"إلغاء","yes-exit":"نعم، اخرج","yes-reset":"نعم، إعادة تعيين","no-cancel":"لا، إلغاء","are-you-sure":"هل أنت متأكد؟",recording:"تسجيل","thank-you":"شكرا"},iM={ok:"Ok",agree:"Akkoord",cancel:"Annuleren","yes-exit":"Beëindigen","yes-reset":"Reset chat","no-cancel":"Annuleren","are-you-sure":"Wil je de chat beëindigen?",recording:"Aan het opnemen...","thank-you":"Thanks!"},oM={en:nM,ar:rM,nl:iM};function sM(e,t){const n=oM[t];return n&&n[e]||""}const[Xv,aM]=ks();function lM({children:e}){const t=wr();return S.jsx(aM,{value:{get:n=>sM(n,t.language??"en"),lang:t.language??"en"},children:e})}const uM="@openchatai/copilot-widget",cM="2.8.4",fM="module",dM={dev:"vite",clean:"rm -rf ./dist ./dist-embed","build:embed":"tsc && vite build","build:lib":"vite build -c vite.lib.config.ts",lint:"eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",preview:"vite preview",release:"release-it",prepublishOnly:"pnpm clean && pnpm build:lib && pnpm build:embed","update-dashboard-pilot":"pnpm build:embed && mv ./dist-embed/*.js ../dashboard/public/pilot.js"},pM={react:"^18.x"},hM={"@radix-ui/react-popover":"^1.0.7","@radix-ui/react-slot":"^1.0.2","@radix-ui/react-tooltip":"^1.0.7","@tailwindcss/typography":"^0.5.10","@types/node":"^20.11.14","@types/react":"^18.2.48","@types/react-dom":"^18.2.18","@typescript-eslint/eslint-plugin":"^5.62.0","@typescript-eslint/parser":"^5.62.0","@vitejs/plugin-react":"^4.2.1",autoprefixer:"^10.4.17",axios:"^1.6.7","class-variance-authority":"^0.7.0",clsx:"^2.1.0",eslint:"^8.56.0","eslint-plugin-react-hooks":"^4.6.0","eslint-plugin-react-refresh":"^0.3.5",postcss:"^8.4.33",prettier:"^2.8.8",react:"^18.2.0","react-dom":"^18.2.0","react-markdown":"^8.0.7","react-shadow":"^20.4.0","react-textarea-autosize":"^8.5.3","release-it":"^17.1.1","remark-gfm":"^3.0.1","socket.io-client":"^4.7.4",swr:"^2.2.4","tailwind-merge":"^1.14.0","tailwind-scrollbar":"^3.0.5",tailwindcss:"^3.4.1","tailwindcss-animate":"^1.0.7","timeago.js":"^4.0.2",typescript:"^5.3.3",vite:"^4.5.2","vite-plugin-dts":"^3.7.2","vite-tsconfig-paths":"^4.3.1"},mM=["dist","dist-embed"],gM={url:"https://github.com/openchatai/OpenCopilot/issues"},yM={name:"openchatai",url:"https://github.com/openchatai"},vM="./dist/index.js",wM="./dist/index.d.ts",bM={".":{require:"./dist/index.cjs.js",import:"./dist/index.es.js",default:"./dist/index.es.js",types:"./dist/index.d.ts"}},xM={"@openchatai/copilot-widget":"^2.8.1","@rjsf/core":"^5.17.1","@rjsf/utils":"^5.17.1","@rjsf/validator-ajv8":"^5.17.1",immer:"^10.0.3","lucide-react":"^0.298.0"},SM={name:uM,private:!1,version:cM,type:fM,scripts:dM,peerDependencies:pM,devDependencies:hM,files:mM,bugs:gM,author:yM,main:vM,types:wM,exports:bM,dependencies:xM};function $M(e){return SM[e]}const ai=Object.create(null);ai.open="0";ai.close="1";ai.ping="2";ai.pong="3";ai.message="4";ai.upgrade="5";ai.noop="6";const Wf=Object.create(null);Object.keys(ai).forEach(e=>{Wf[ai[e]]=e});const Ey={type:"error",data:"parser error"},ZT=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",eA=typeof ArrayBuffer=="function",tA=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Qv=({type:e,data:t},n,r)=>ZT&&t instanceof Blob?n?r(t):DS(t,r):eA&&(t instanceof ArrayBuffer||tA(t))?n?r(t):DS(new Blob([t]),r):r(ai[e]+(t||"")),DS=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function FS(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let km;function kM(e,t){if(ZT&&e.data instanceof Blob)return e.data.arrayBuffer().then(FS).then(t);if(eA&&(e.data instanceof ArrayBuffer||tA(e.data)))return t(FS(e.data));Qv(e,!1,n=>{km||(km=new TextEncoder),t(km.encode(n))})}const jS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Bl=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,s,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),c=new Uint8Array(u);for(r=0;r>4,c[i++]=(s&15)<<4|a>>2,c[i++]=(a&3)<<6|l&63;return u},EM=typeof ArrayBuffer=="function",Jv=(e,t)=>{if(typeof e!="string")return{type:"message",data:nA(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:CM(e.substring(1),t)}:Wf[n]?e.length>1?{type:Wf[n],data:e.substring(1)}:{type:Wf[n]}:Ey},CM=(e,t)=>{if(EM){const n=_M(e);return nA(n,t)}else return{base64:!0,data:e}},nA=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},rA=String.fromCharCode(30),TM=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,s)=>{Qv(o,!1,a=>{r[s]=a,++i===n&&t(r.join(rA))})})},AM=(e,t)=>{const n=e.split(rA),r=[];for(let i=0;i{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,r)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let _m;function Qc(e){return e.reduce((t,n)=>t+n.length,0)}function Jc(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;iMath.pow(2,53-32)-1){a.enqueue(Ey);break}i=c*Math.pow(2,32)+u.getUint32(4),r=3}else{if(Qc(n)e){a.enqueue(Ey);break}}}})}const iA=4;function Pt(e){if(e)return RM(e)}function RM(e){for(var t in Pt.prototype)e[t]=Pt.prototype[t];return e}Pt.prototype.on=Pt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Pt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Pt.prototype.off=Pt.prototype.removeListener=Pt.prototype.removeAllListeners=Pt.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function oA(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const NM=lr.setTimeout,IM=lr.clearTimeout;function Bp(e,t){t.useNativeTimers?(e.setTimeoutFn=NM.bind(lr),e.clearTimeoutFn=IM.bind(lr)):(e.setTimeoutFn=lr.setTimeout.bind(lr),e.clearTimeoutFn=lr.clearTimeout.bind(lr))}const DM=1.33;function FM(e){return typeof e=="string"?jM(e):Math.ceil((e.byteLength||e.size)*DM)}function jM(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}function MM(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function LM(e){let t={},n=e.split("&");for(let r=0,i=n.length;r0);return t}function aA(){const e=zS(+new Date);return e!==LS?(MS=0,LS=e):e+"."+zS(MS++)}for(;Zc{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};AM(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,TM(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=aA()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new si(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class si extends Pt{constructor(t,n){super(),Bp(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.data=n.data!==void 0?n.data:null,this.create()}create(){var t;const n=oA(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new uA(n);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this.opts.extraHeaders[i])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this.opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this.opts.cookieJar)===null||i===void 0||i.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},r.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=si.requestsCount++,si.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=VM,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete si.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}si.requestsCount=0;si.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",BS);else if(typeof addEventListener=="function"){const e="onpagehide"in lr?"pagehide":"unload";addEventListener(e,BS,!1)}}function BS(){for(let e in si.requests)si.requests.hasOwnProperty(e)&&si.requests[e].abort()}const e1=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),ef=lr.WebSocket||lr.MozWebSocket,US=!0,qM="arraybuffer",VS=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class KM extends Zv{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=VS?{}:oA(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=US&&!VS?n?new ef(t,n):new ef(t):new ef(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const s={};try{US&&this.ws.send(o)}catch{}i&&e1(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=aA()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!ef}}class GM extends Zv{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const n=PM(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=OM();i.readable.pipeTo(t.writable),this.writer=i.writable.getWriter();const o=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),o())}).catch(a=>{})};o();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this.writer.write(s).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let n=0;n{i&&e1(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const YM={websocket:KM,webtransport:GM,polling:WM},XM=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,QM=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Ty(e){if(e.length>2e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=XM.exec(e||""),o={},s=14;for(;s--;)o[QM[s]]=i[s]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=JM(o,o.path),o.queryKey=ZM(o,o.query),o}function JM(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function ZM(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let cA=class zs extends Pt{constructor(t,n={}){super(),this.binaryType=qM,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=Ty(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=Ty(n.host).host),Bp(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=LM(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=iA,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new YM[t](r)}open(){let t;if(this.opts.rememberUpgrade&&zs.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;zs.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",f=>{if(!r)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;zs.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(c(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const p=new Error("probe error");p.transport=n.name,this.emitReserved("upgradeError",p)}}))};function o(){r||(r=!0,c(),n.close(),n=null)}const s=f=>{const p=new Error("probe error: "+f);p.transport=n.name,o(),this.emitReserved("upgradeError",p)};function a(){s("transport closed")}function l(){s("socket closed")}function u(f){n&&f.name!==n.name&&o()}const c=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",a),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",s),n.once("close",a),this.once("close",l),this.once("upgrading",u),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(this.readyState="open",zs.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){zs.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,fA=Object.prototype.toString,rL=typeof Blob=="function"||typeof Blob<"u"&&fA.call(Blob)==="[object BlobConstructor]",iL=typeof File=="function"||typeof File<"u"&&fA.call(File)==="[object FileConstructor]";function t1(e){return tL&&(e instanceof ArrayBuffer||nL(e))||rL&&e instanceof Blob||iL&&e instanceof File}function qf(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num{delete this.acks[t];for(let s=0;s{this.io.clearTimeoutFn(o),n.apply(this,[null,...s])}}emitWithAck(t,...n){const r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((i,o)=>{n.push((s,a)=>r?s?o(s):i(a):i(s)),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...o)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Re.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Re.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Re.EVENT:case Re.BINARY_EVENT:this.onevent(t);break;case Re.ACK:case Re.BINARY_ACK:this.onack(t);break;case Re.DISCONNECT:this.ondisconnect();break;case Re.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:Re.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Re.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}ja.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};ja.prototype.reset=function(){this.attempts=0};ja.prototype.setMin=function(e){this.ms=e};ja.prototype.setMax=function(e){this.max=e};ja.prototype.setJitter=function(e){this.jitter=e};class Py extends Pt{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Bp(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new ja({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||fL;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new cA(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Pr(n,"open",function(){r.onopen(),t&&t()}),o=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},s=Pr(n,"error",o);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Pr(t,"ping",this.onping.bind(this)),Pr(t,"data",this.ondata.bind(this)),Pr(t,"error",this.onerror.bind(this)),Pr(t,"close",this.onclose.bind(this)),Pr(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){e1(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new dA(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const bl={};function Kf(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=eL(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=bl[i]&&o in bl[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let l;return a?l=new Py(r,t):(bl[i]||(bl[i]=new Py(r,t)),l=bl[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(Kf,{Manager:Py,Socket:dA,io:Kf,connect:Kf});function pL({socketUrl:e,token:t,sessionId:n}){return Kf(e,{autoConnect:!1,transports:["websocket"],extraHeaders:{"X-Bot-Token":t,"X-Session-Id":n}})}var pA=Symbol.for("immer-nothing"),WS=Symbol.for("immer-draftable"),Jn=Symbol.for("immer-state");function Nr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ba=Object.getPrototypeOf;function xa(e){return!!e&&!!e[Jn]}function hs(e){var t;return e?hA(e)||Array.isArray(e)||!!e[WS]||!!((t=e.constructor)!=null&&t[WS])||Vp(e)||Hp(e):!1}var hL=Object.prototype.constructor.toString();function hA(e){if(!e||typeof e!="object")return!1;const t=ba(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===hL}function Pu(e,t){Up(e)===0?Object.entries(e).forEach(([n,r])=>{t(n,r,e)}):e.forEach((n,r)=>t(r,n,e))}function Up(e){const t=e[Jn];return t?t.type_:Array.isArray(e)?1:Vp(e)?2:Hp(e)?3:0}function Ry(e,t){return Up(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function mA(e,t,n){const r=Up(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function mL(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Vp(e){return e instanceof Map}function Hp(e){return e instanceof Set}function Ho(e){return e.copy_||e.base_}function Ny(e,t){if(Vp(e))return new Map(e);if(Hp(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&hA(e))return ba(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[Jn];let r=Reflect.ownKeys(n);for(let i=0;i1&&(e.set=e.add=e.clear=e.delete=gL),Object.freeze(e),t&&Pu(e,(n,r)=>r1(r,!0))),e}function gL(){Nr(2)}function Wp(e){return Object.isFrozen(e)}var yL={};function ms(e){const t=yL[e];return t||Nr(0,e),t}var Ru;function gA(){return Ru}function vL(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function qS(e,t){t&&(ms("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Iy(e){Dy(e),e.drafts_.forEach(wL),e.drafts_=null}function Dy(e){e===Ru&&(Ru=e.parent_)}function KS(e){return Ru=vL(Ru,e)}function wL(e){const t=e[Jn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function GS(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Jn].modified_&&(Iy(t),Nr(4)),hs(e)&&(e=Ud(t,e),t.parent_||Vd(t,e)),t.patches_&&ms("Patches").generateReplacementPatches_(n[Jn].base_,e,t.patches_,t.inversePatches_)):e=Ud(t,n,[]),Iy(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==pA?e:void 0}function Ud(e,t,n){if(Wp(t))return t;const r=t[Jn];if(!r)return Pu(t,(i,o)=>YS(e,r,t,i,o,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Vd(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,s=!1;r.type_===3&&(o=new Set(i),i.clear(),s=!0),Pu(o,(a,l)=>YS(e,r,i,a,l,n,s)),Vd(e,i,!1),n&&e.patches_&&ms("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function YS(e,t,n,r,i,o,s){if(xa(i)){const a=o&&t&&t.type_!==3&&!Ry(t.assigned_,r)?o.concat(r):void 0,l=Ud(e,i,a);if(mA(n,r,l),xa(l))e.canAutoFreeze_=!1;else return}else s&&n.add(i);if(hs(i)&&!Wp(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Ud(e,i),(!t||!t.scope_.parent_)&&Vd(e,i)}}function Vd(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&r1(t,n)}function bL(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:gA(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=i1;n&&(i=[r],o=Nu);const{revoke:s,proxy:a}=Proxy.revocable(i,o);return r.draft_=a,r.revoke_=s,a}var i1={get(e,t){if(t===Jn)return e;const n=Ho(e);if(!Ry(n,t))return xL(e,n,t);const r=n[t];return e.finalized_||!hs(r)?r:r===Em(e.base_,t)?(Cm(e),e.copy_[t]=jy(r,e)):r},has(e,t){return t in Ho(e)},ownKeys(e){return Reflect.ownKeys(Ho(e))},set(e,t,n){const r=yA(Ho(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=Em(Ho(e),t),o=i==null?void 0:i[Jn];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(mL(n,i)&&(n!==void 0||Ry(e.base_,t)))return!0;Cm(e),Fy(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Em(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Cm(e),Fy(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Ho(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Nr(11)},getPrototypeOf(e){return ba(e.base_)},setPrototypeOf(){Nr(12)}},Nu={};Pu(i1,(e,t)=>{Nu[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Nu.deleteProperty=function(e,t){return Nu.set.call(this,e,t,void 0)};Nu.set=function(e,t,n){return i1.set.call(this,e[0],t,n,e[0])};function Em(e,t){const n=e[Jn];return(n?Ho(n):e)[t]}function xL(e,t,n){var i;const r=yA(t,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(e.draft_):void 0}function yA(e,t){if(!(t in e))return;let n=ba(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=ba(n)}}function Fy(e){e.modified_||(e.modified_=!0,e.parent_&&Fy(e.parent_))}function Cm(e){e.copy_||(e.copy_=Ny(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var SL=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const s=this;return function(l=o,...u){return s.produce(l,c=>n.call(this,c,...u))}}typeof n!="function"&&Nr(6),r!==void 0&&typeof r!="function"&&Nr(7);let i;if(hs(t)){const o=KS(this),s=jy(t,void 0);let a=!0;try{i=n(s),a=!1}finally{a?Iy(o):Dy(o)}return qS(o,r),GS(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===pA&&(i=void 0),this.autoFreeze_&&r1(i,!0),r){const o=[],s=[];ms("Patches").generateReplacementPatches_(t,i,o,s),r(o,s)}return i}else Nr(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(s,...a)=>this.produceWithPatches(s,l=>t(l,...a));let r,i;return[this.produce(t,n,(s,a)=>{r=s,i=a}),r,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){hs(e)||Nr(8),xa(e)&&(e=$L(e));const t=KS(this),n=jy(e,void 0);return n[Jn].isManual_=!0,Dy(t),n}finishDraft(e,t){const n=e&&e[Jn];(!n||!n.isManual_)&&Nr(9);const{scope_:r}=n;return qS(r,t),GS(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=ms("Patches").applyPatches_;return xa(e)?r(e,t):this.produce(e,i=>r(i,t))}};function jy(e,t){const n=Vp(e)?ms("MapSet").proxyMap_(e,t):Hp(e)?ms("MapSet").proxySet_(e,t):bL(e,t);return(t?t.scope_:gA()).drafts_.push(n),n}function $L(e){return xa(e)||Nr(10,e),vA(e)}function vA(e){if(!hs(e)||Wp(e))return e;const t=e[Jn];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ny(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Ny(e,!0);return Pu(n,(r,i)=>{mA(n,r,vA(i))}),t&&(t.finalized_=!1),n}var Zn=new SL,wA=Zn.produce;Zn.produceWithPatches.bind(Zn);Zn.setAutoFreeze.bind(Zn);Zn.setUseStrictShallowCopy.bind(Zn);Zn.applyPatches.bind(Zn);Zn.createDraft.bind(Zn);Zn.finishDraft.bind(Zn);function kL(e,t){return wA(e,n=>{switch(t.type){case"RECONNECT_ATTEMPT":n.state="retrying",n.reconnectAttempts=t.payload;break;case"CONNECTED":n.state="connected";break;case"DISCONNECTED":n.state="disconnected",n.reason=t.payload;break}})}const[nc,_L]=ks();function EL({children:e}){const[t,n]=O.useReducer(kL,{state:"stale",reason:null,reconnectAttempts:null}),r=wr(),{sessionId:i}=_v(r.token),[o]=Ap(),s=O.useMemo(()=>pL({socketUrl:r.socketUrl,token:r.token,sessionId:i}),[r,i]),a=O.useCallback(()=>{n({type:"CONNECTED"})},[]),l=O.useCallback(c=>{n({type:"DISCONNECTED",payload:c})},[]),u=O.useCallback(c=>{n({type:"RECONNECT_ATTEMPT",payload:c})},[]);return O.useEffect(()=>(o?s.connect():s.disconnect(),()=>{s.disconnect()}),[o,s]),O.useEffect(()=>(s.on("connect",a),s.on("disconnect",l),s.on("reconnect_attempt",u),()=>{s.off("connect",a),s.off("disconnect",l),s.off("reconnect_attempt",u)}),[s,a,l,u]),S.jsx(_L,{value:{__socket:s,state:t},children:e})}let xl=null;const CL=1e3*3;class TL{constructor(t,n=[],r){Qe(this,"sessionId",null);Qe(this,"listeners",new Set);Qe(this,"components");Qe(this,"state",{currentUserMessage:null,conversationInfo:null,lastServerMessageId:null,messages:[],clientState:{}});Qe(this,"notify",()=>{this.listeners.forEach(t=>t(this.state))});Qe(this,"unSubscribe",t=>{this.listeners.delete(t)});Qe(this,"subscribe",t=>(this.listeners.add(t),()=>{this.unSubscribe(t)}));Qe(this,"getSnapshot",()=>this.state);Qe(this,"reset",()=>{this.setValueImmer(t=>{t.messages=[],t.currentUserMessage=null,t.conversationInfo=null,t.lastServerMessageId=null})});Qe(this,"genId",(t=7)=>Math.random().toString(36).substring(t));Qe(this,"getTimeStamp",()=>new Date().toLocaleTimeString("en-US",{formatMatcher:"best fit",hour:"numeric",minute:"numeric"}));Qe(this,"isLoading",()=>this.state.currentUserMessage!==null);Qe(this,"setValue",t=>{typeof t=="function"?this.state=t(this.state):this.state=t,this.notify()});Qe(this,"setValueImmer",t=>{this.setValue(wA(this.state,t))});Qe(this,"select",t=>this.state[t]);Qe(this,"setConversationInfo",t=>{this.setValueImmer(n=>{n.conversationInfo=t})});Qe(this,"settle",()=>{this.setValueImmer(t=>{t.currentUserMessage=null,t.conversationInfo=null})});Qe(this,"setLastServerMessageId",t=>{this.setValueImmer(n=>{n.lastServerMessageId=t})});Qe(this,"handleTextMessage",(t,n)=>{const r=this.sessionId;if(!r)return;this.setLastServerMessageId(null);const i=this.genId(),o={...t,from:"user",session_id:r,id:i,timestamp:this.getTimeStamp()};this.setValueImmer(s=>{s.messages.push(o),s.currentUserMessage=o}),n.emit("send_chat",o)});Qe(this,"appendToCurrentBotMessage",t=>{const n=this.state.currentUserMessage;if(!n)return;this.select("messages").find(i=>i.id===n.id)?this.setValueImmer(i=>{var s;const o=i.messages.find(a=>a.id===n.id&&a.from==="bot"&&a.type==="TEXT");o?o.data={message:(((s=o.data)==null?void 0:s.message)||"")+t}:i.messages.push({from:"bot",id:n.id,type:"TEXT",responseFor:n.id,timestamp:this.getTimeStamp(),data:{message:t}})}):this.setValueImmer(i=>{i.messages.push({from:"bot",id:n.id,type:"TEXT",responseFor:n.id,timestamp:this.getTimeStamp(),data:{content:t}})})});Qe(this,"socketChatInfoHandler",t=>{const n=this.sessionId,r=this.setConversationInfo;function i(o){r(o)}return t.on(`${n}_info`,i),()=>{t.off(`${n}_info`,i)}});Qe(this,"socketChatVoteHandler",t=>{const n=this.sessionId;if(!n)return;const r=this.setLastServerMessageId;function i(o){r(o)}return t.on(`${n}_vote`,i),()=>{t.off(`${n}_vote`,i)}});Qe(this,"socketMessageRespHandler",t=>{const n=this.sessionId;if(!n)return;const r=i=>{if(i==="|im_end|"){this.settle();return}this.select("conversationInfo")&&this.setValueImmer(o=>{o.conversationInfo=null}),this.startTimeout(()=>{this.settle()}),this.appendToCurrentBotMessage(i)};return t.on(n,r),()=>{t.off(n,r)}});Qe(this,"socketUiHandler",t=>{const n=this.sessionId;if(!n)return;const r=i=>{const o=JSON.parse(i);this.setValueImmer(s=>{let a=null;o.type==="ui_form"?a={from:"bot",type:"FORM",id:this.genId(),responseFor:o.message_id,timestamp:this.getTimeStamp(),data:{action:o.action}}:o.type==="ui_component"&&(a={from:"bot",type:o.name,id:this.genId(),responseFor:o.message_id,timestamp:this.getTimeStamp(),data:o.request_response??{}}),a&&s.messages.push(a)})};return t.on(`${n}_ui`,r),()=>{t.off(`${n}_ui`,r)}});Qe(this,"startTimeout",t=>{this.clearTimeout(),xl=setTimeout(()=>{t(),xl=null},CL)});Qe(this,"clearTimeout",()=>{xl&&(clearTimeout(xl),xl=null)});if(!t)throw new Error("sessionId is not set");this.sessionId=t,this.components=r,this.setValueImmer(i=>{i.messages=n})}}function AL(e){return S.jsx("div",{className:"space-y-2 flex-1",children:S.jsx("div",{className:"w-full max-w-full overflow-auto",children:S.jsx("code",{dir:"auto",className:"text-xs leading-tight",children:JSON.stringify(e,null,1)})})})}function yt(e){return typeof File<"u"&&e instanceof File||typeof Date<"u"&&e instanceof Date?!1:typeof e=="object"&&e!==null&&!Array.isArray(e)}function OL(e){return e.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),yt(e.additionalItems)}function XS(e){if(e==="")return;if(e===null)return null;if(/\.$/.test(e)||/\.0$/.test(e)||/\.\d*0$/.test(e))return e;const t=Number(e);return typeof t=="number"&&!Number.isNaN(t)?t:e}const Ma="__additional_property",My="additionalProperties",rc="allOf",ti="anyOf",bA="const",PL="default",qp="dependencies",RL="enum",Dr="__errors",fo="$id",NL="if",$o="items",IL="_$junk_option_schema_id$_",Gf="$name",dr="oneOf",xt="properties",DL="required",Hd="submitButtonOptions",jt="$ref",o1="__rjsf_additionalProperties",xA="__rjsf_rootSchema",FL="ui:field",s1="ui:widget",eu="ui:options",jL="ui:globalOptions";function Fe(e={},t={}){return Object.keys(e).filter(n=>n.indexOf("ui:")===0).reduce((n,r)=>{const i=e[r];return r===s1&&yt(i)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),n):r===eu&&yt(i)?{...n,...i}:{...n,[r.substring(3)]:i}},{...t})}function SA(e,t={},n){if(!e.additionalProperties)return!1;const{expandable:r=!0}=Fe(t);return r===!1?r:e.maxProperties!==void 0&&n?Object.keys(n).length({...n,[i]:Ly(r)}),t);if(a1(e)){const n=e;return Object.keys(n).reduce((r,i)=>({...r,[i]:Ly(n[i])}),t)}return t}function gz(){this.__data__=[],this.size=0}var yz=gz;function vz(e,t){return e===t||e!==e&&t!==t}var Ba=vz,wz=Ba;function bz(e,t){for(var n=e.length;n--;)if(wz(e[n][0],t))return n;return-1}var Gp=bz,xz=Gp,Sz=Array.prototype,$z=Sz.splice;function kz(e){var t=this.__data__,n=xz(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():$z.call(t,n,1),--this.size,!0}var _z=kz,Ez=Gp;function Cz(e){var t=this.__data__,n=Ez(t,e);return n<0?void 0:t[n][1]}var Tz=Cz,Az=Gp;function Oz(e){return Az(this.__data__,e)>-1}var Pz=Oz,Rz=Gp;function Nz(e,t){var n=this.__data__,r=Rz(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var Iz=Nz,Dz=yz,Fz=_z,jz=Tz,Mz=Pz,Lz=Iz;function Ua(e){var t=-1,n=e==null?0:e.length;for(this.clear();++ta))return!1;var u=o.get(e),c=o.get(t);if(u&&c)return u==t&&c==e;var f=-1,p=!0,d=n&rB?new Z6:void 0;for(o.set(e,t),o.set(t,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=rU}var p1=iU,oU=Li,sU=p1,aU=br,lU="[object Arguments]",uU="[object Array]",cU="[object Boolean]",fU="[object Date]",dU="[object Error]",pU="[object Function]",hU="[object Map]",mU="[object Number]",gU="[object Object]",yU="[object RegExp]",vU="[object Set]",wU="[object String]",bU="[object WeakMap]",xU="[object ArrayBuffer]",SU="[object DataView]",$U="[object Float32Array]",kU="[object Float64Array]",_U="[object Int8Array]",EU="[object Int16Array]",CU="[object Int32Array]",TU="[object Uint8Array]",AU="[object Uint8ClampedArray]",OU="[object Uint16Array]",PU="[object Uint32Array]",ut={};ut[$U]=ut[kU]=ut[_U]=ut[EU]=ut[CU]=ut[TU]=ut[AU]=ut[OU]=ut[PU]=!0;ut[lU]=ut[uU]=ut[xU]=ut[cU]=ut[SU]=ut[fU]=ut[dU]=ut[pU]=ut[hU]=ut[mU]=ut[gU]=ut[yU]=ut[vU]=ut[wU]=ut[bU]=!1;function RU(e){return aU(e)&&sU(e.length)&&!!ut[oU(e)]}var NU=RU;function IU(e){return function(t){return e(t)}}var Es=IU,Kd={exports:{}};Kd.exports;(function(e,t){var n=$A,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,s=o&&n.process,a=function(){try{var l=i&&i.require&&i.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();e.exports=a})(Kd,Kd.exports);var h1=Kd.exports,DU=NU,FU=Es,l$=h1,u$=l$&&l$.isTypedArray,jU=u$?FU(u$):DU,oc=jU,MU=RA,LU=ic,zU=Bt,BU=qa,UU=nh,VU=oc,HU=Object.prototype,WU=HU.hasOwnProperty;function qU(e,t){var n=zU(e),r=!n&&LU(e),i=!n&&!r&&BU(e),o=!n&&!r&&!i&&VU(e),s=n||r||i||o,a=s?MU(e.length,String):[],l=a.length;for(var u in e)(t||WU.call(e,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||UU(u,l)))&&a.push(u);return a}var IA=qU,KU=Object.prototype;function GU(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||KU;return e===n}var rh=GU,YU=_A,XU=YU(Object.keys,Object),QU=XU,JU=rh,ZU=QU,e7=Object.prototype,t7=e7.hasOwnProperty;function n7(e){if(!JU(e))return ZU(e);var t=[];for(var n in Object(e))t7.call(e,n)&&n!="constructor"&&t.push(n);return t}var DA=n7,r7=Xp,i7=p1;function o7(e){return e!=null&&i7(e.length)&&!r7(e)}var Cs=o7,s7=IA,a7=DA,l7=Cs;function u7(e){return l7(e)?s7(e):a7(e)}var sc=u7,c7=OA,f7=d1,d7=sc;function p7(e){return c7(e,d7,f7)}var FA=p7,c$=FA,h7=1,m7=Object.prototype,g7=m7.hasOwnProperty;function y7(e,t,n,r,i,o){var s=n&h7,a=c$(e),l=a.length,u=c$(t),c=u.length;if(l!=c&&!s)return!1;for(var f=l;f--;){var p=a[f];if(!(s?p in t:g7.call(t,p)))return!1}var d=o.get(e),h=o.get(t);if(d&&h)return d==t&&h==e;var g=!0;o.set(e,t),o.set(t,e);for(var y=s;++f{if(typeof n=="function"&&typeof r=="function")return!0})}var Z7=Li,e8=br,t8="[object Symbol]";function n8(e){return typeof e=="symbol"||e8(e)&&Z7(e)==t8}var Ga=n8,r8=Bt,i8=Ga,o8=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s8=/^\w*$/;function a8(e,t){if(r8(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||i8(e)?!0:s8.test(e)||!o8.test(e)||t!=null&&e in Object(t)}var m1=a8,zA=u1,l8="Expected a function";function g1(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(l8);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(g1.Cache||zA),n}g1.Cache=zA;var u8=g1,c8=u8,f8=500;function d8(e){var t=c8(e,function(r){return n.size===f8&&n.clear(),r}),n=t.cache;return t}var p8=d8,h8=p8,m8=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,g8=/\\(\\)?/g,y8=h8(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(m8,function(n,r,i,o){t.push(i?o.replace(g8,"$1"):r||n)}),t}),BA=y8;function v8(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++no,typeof e[r]>"u"&&(Array.isArray(e)&&r==="-"&&(r=e.length),i&&(t[o]!==""&&t[o]<1/0||t[o]==="-"?e[r]=[]:e[r]={})),!i)break;e=e[r]}var a=e[r];return n===void 0?delete e[r]:e[r]=n,a}function y1(e){if(typeof e=="string"){if(e=e.split("/"),e[0]==="")return e;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(e)){for(const t of e)if(typeof t!="string"&&typeof t!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return e}throw new Error("Invalid JSON pointer.")}function qA(e,t){if(typeof e!="object")throw new Error("Invalid input object.");t=y1(t);var n=t.length;if(n===1)return e;for(var r=1;ri?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r0&&n(a)?t>1?aO(a,t-1,n,r,i):Eq(i,a):r||(i[i.length]=a)}return i}var ah=aO,Tq=ah;function Aq(e){var t=e==null?0:e.length;return t?Tq(e,1):[]}var S1=Aq;function Oq(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var lO=Oq,Pq=lO,M$=Math.max;function Rq(e,t,n){return t=M$(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=M$(r.length-t,0),s=Array(o);++i0){if(++t>=zq)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Hq=Vq,Wq=Lq,qq=Hq,Kq=qq(Wq),cO=Kq,Gq=S1,Yq=uO,Xq=cO;function Qq(e){return Xq(Yq(e,void 0,Gq),e+"")}var fO=Qq,Jq=zi,Zq=iO,eK=sO,tK=Ya,nK=Xa,rK=xq,iK=fO,oK=QA,sK=1,aK=2,lK=4,uK=iK(function(e,t){var n={};if(e==null)return n;var r=!1;t=Jq(t,function(o){return o=tK(o,e),r||(r=o.length>1),o}),nK(e,oK(e),n),r&&(n=Zq(n,sK|aK|lK,rK));for(var i=t.length;i--;)eK(n,t[i]);return n}),cK=uK;const Yd=He(cK);function $1(e,t){const n=t[e];return[Yd(t,[e]),n]}function k1(e,t={}){let n=e||"";if(n.startsWith("#"))n=decodeURIComponent(n.substring(1));else throw new Error(`Could not find a definition for ${e}.`);const r=oh.get(t,n);if(r===void 0)throw new Error(`Could not find a definition for ${e}.`);if(r[jt]){const[i,o]=$1(jt,r),s=k1(o,t);return Object.keys(i).length>0?{...i,...s}:s}return r}var fK=Object.prototype,dK=fK.hasOwnProperty;function pK(e,t){return e!=null&&dK.call(e,t)}var hK=pK,mK=Ya,gK=ic,yK=Bt,vK=nh,wK=p1,bK=Ts;function xK(e,t,n){t=mK(t,e);for(var r=-1,i=t.length,o=!1;++rRY)return[];var n=Pm,r=NY(e,Pm);t=OY(t),e-=Pm;for(var i=AY(r,t);++n({required:[c]}))};let u;if(a.anyOf){const{...c}=a;c.allOf?c.allOf=c.allOf.slice():c.allOf=[],c.allOf.push(l),u=c}else u=Object.assign({},a,l);if(delete u.required,e.isValid(u,t,r))return s}else if(e.isValid(a,t,r))return s}return 0}function T1(e,t,n,r,i){return SO(e,t,n,r,i)}var FY=ih;function jY(e,t){return FY(e,t)}var A1=jY;const ys=He(A1);var MY=b1,LY=Ya,zY=nh,V$=In,BY=Ts;function UY(e,t,n,r){if(!V$(e))return e;t=LY(t,e);for(var i=-1,o=t.length,s=o-1,a=e;a!=null&&++i1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,s&&qX(n[0],n[1],s)&&(o=i<3?void 0:o,i=1),t=Object(t);++r-1}var N1=hQ;function mQ(e,t,n){for(var r=-1,i=e==null?0:e.length;++r=AQ){var u=t?null:CQ(e);if(u)return TQ(u);s=!1,i=EQ,l=new $Q}else l=t?[]:a;e:for(;++rt||o&&s&&l&&!a&&!u||r&&s&&l||!n&&l||!i)return 1;if(!r&&!o&&!u&&e=a)return l;var u=n[r];return l*(u=="desc"?-1:1)}}return e.index-t.index}var GQ=KQ,Nm=zi,YQ=lc,XQ=C1,QQ=BQ,JQ=VQ,ZQ=Es,eJ=GQ,tJ=uc,nJ=Bt;function rJ(e,t,n){t.length?t=Nm(t,function(o){return nJ(o)?function(s){return YQ(s,o.length===1?o[0]:o)}:o}):t=[tJ];var r=-1;t=Nm(t,ZQ(XQ));var i=QQ(e,function(o,s,a){var l=Nm(t,function(u){return u(o)});return{criteria:l,index:++r,value:o}});return JQ(i,function(o,s){return eJ(o,s,n)})}var iJ=rJ,oJ=ah,sJ=iJ,aJ=Do,Y$=P1,lJ=aJ(function(e,t){if(e==null)return[];var n=t.length;return n>1&&Y$(e,t[0],t[1])?t=[]:n>2&&Y$(t[0],t[1],t[2])&&(t=[t[0]]),sJ(e,oJ(t,1),[])}),PO=lJ,uJ=D1;function cJ(e,t){return t=typeof t=="function"?t:void 0,e&&e.length?uJ(e,void 0,t):[]}var F1=cJ,fJ=Do,dJ=Ba,pJ=P1,hJ=Qa,RO=Object.prototype,mJ=RO.hasOwnProperty,gJ=fJ(function(e,t){e=Object(e);var n=-1,r=t.length,i=r>2?t[2]:void 0;for(i&&pJ(t[0],t[1],i)&&(r=1);++n=120&&c.length>=120)?new vJ(s&&c):void 0}c=e[0];var f=-1,p=a[0];e:for(;++fArray.isArray(e)?e:[e],pr=e=>e===void 0,nf=e=>Xd(e)||Array.isArray(e)?Object.keys(e):[],ta=(e,t)=>e.hasOwnProperty(t),Sa=e=>MJ(j1(e)),Z$=e=>pr(e)||Array.isArray(e)&&e.length===0,BJ=(e,t,n,r)=>t&&ta(t,n)&&e&&ta(e,n)&&r(e[n],t[n]),Dm=(e,t)=>pr(e)&&t===0||pr(t)&&e===0||Ur(e,t),UJ=(e,t)=>pr(e)&&t===!1||pr(t)&&e===!1||Ur(e,t),ek=e=>pr(e)||Ur(e,{})||e===!0,rf=e=>pr(e)||Ur(e,{}),tk=e=>pr(e)||Xd(e)||e===!0||e===!1;function nk(e,t){return Z$(e)&&Z$(t)?!0:Ur(Sa(e),Sa(t))}function VJ(e,t){return e=J$(e),t=J$(t),Ur(Sa(e),Sa(t))}function Xf(e,t,n,r){var i=j1(nf(e).concat(nf(t)));return rf(e)&&rf(t)?!0:rf(e)&&nf(t).length||rf(t)&&nf(e).length?!1:i.every(function(o){var s=e[o],a=t[o];return Array.isArray(s)&&Array.isArray(a)?Ur(Sa(e),Sa(t)):Array.isArray(s)&&!Array.isArray(a)||Array.isArray(a)&&!Array.isArray(s)?!1:BJ(e,t,o,r)})}function HJ(e,t,n,r){return Xd(e)&&Xd(t)?r(e,t):Array.isArray(e)&&Array.isArray(t)?Xf(e,t,n,r):Ur(e,t)}function Fm(e,t,n,r){var i=Q$(e,r),o=Q$(t,r),s=zJ(i,o,r);return s.length===Math.max(i.length,o.length)}var WJ={title:Ur,uniqueItems:UJ,minLength:Dm,minItems:Dm,minProperties:Dm,required:nk,enum:nk,type:VJ,items:HJ,anyOf:Fm,allOf:Fm,oneOf:Fm,properties:Xf,patternProperties:Xf,dependencies:Xf},qJ=["properties","patternProperties","dependencies","uniqueItems","minLength","minItems","minProperties","required"],KJ=["additionalProperties","additionalItems","contains","propertyNames","not"];function Wy(e,t,n){if(n=LJ(n,{ignore:[]}),ek(e)&&ek(t))return!0;if(!tk(e)||!tk(t))throw new Error("Either of the values are not a JSON schema.");if(e===t)return!0;if(Im(e)&&Im(t))return e===t;if(e===void 0&&t===!1||t===void 0&&e===!1||pr(e)&&!pr(t)||!pr(e)&&pr(t))return!1;var r=j1(Object.keys(e).concat(Object.keys(t)));if(n.ignore.length&&(r=r.filter(o=>n.ignore.indexOf(o)===-1)),!r.length)return!0;function i(o,s){return Wy(o,s,n)}return r.every(function(o){var s=e[o],a=t[o];if(KJ.indexOf(o)!==-1)return Wy(s,a,n);var l=WJ[o];if(l||(l=Ur),Ur(s,a))return!0;if(qJ.indexOf(o)===-1&&(!ta(e,o)&&ta(t,o)||ta(e,o)&&!ta(t,o)))return s===a;var u=l(s,a,o,i);if(!Im(u))throw new Error("Comparer must return true or false");return u})}var M1=Wy;function GJ(e){return Object.prototype.toString.call(e)==="[object Array]"}var L1=Array.isArray||GJ;function YJ(e){return(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")&&e.valueOf()===e.valueOf()}var XJ=YJ,QJ=XJ;function JJ(e){return QJ(e)&&e%1===0}var ZJ=JJ,eZ=L1,tZ=ZJ;function nZ(e){var t;if(!eZ(e)||(t=e.length,!t))return!1;for(var n=0;nt&&(r=t,t=e,e=r),t=t-e}return n*e}function ok(e,t){var n=0,r;if(e===0)return t;if(t===0)return e;for(;!(e&1)&&!(t&1);)e>>>=1,t>>>=1,n++;for(;!(e&1);)e>>>=1;for(;t;){for(;!(t&1);)t>>>=1;e>t&&(r=t,t=e,e=r),t=t-e}return e<1){if(r=t[0],n=t[1],!oZ(n))throw new TypeError("gcd()::invalid input argument. Accessor must be a function. Value: `"+n+"`.")}else r=t[0];else throw new TypeError("gcd()::invalid input argument. Must provide an array of integers. Value: `"+t[0]+"`.");if(i=r.length,i<2)return null;if(n){for(o=new Array(i),a=0;a1){if(r=t[0],n=t[1],!uZ(n))throw new TypeError("lcm()::invalid input argument. Accessor must be a function. Value: `"+n+"`.")}else r=t[0];else throw new TypeError("lcm()::invalid input argument. Must provide an array of integers. Value: `"+t[0]+"`.");if(i=r.length,i<2)return null;if(n){for(o=new Array(i),a=0;a-1;)a!==e&&uk.call(a,l,1),uk.call(e,l,1);return e}var LZ=MZ,zZ=LZ;function BZ(e,t){return e&&e.length&&t&&t.length?zZ(e,t):e}var UZ=BZ,VZ=v1,HZ=E1,WZ=wO,qZ=Bt;function KZ(e,t){var n=qZ(e)?VZ:HZ;return n(e,WZ(t))}var LO=KZ,GZ=eh,YZ=N1,XZ=I1,QZ=zi,JZ=Es,ZZ=th,eee=200;function tee(e,t,n,r){var i=-1,o=YZ,s=!0,a=e.length,l=[],u=t.length;if(!a)return l;n&&(t=QZ(t,JZ(n))),r?(o=XZ,s=!1):t.length>=eee&&(o=ZZ,s=!1,t=new GZ(t));e:for(;++icee(uee(e.map(z1))),mee=(e,t)=>e.map(n=>n&&n[t]),BO=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),z1=e=>zO(e)||Array.isArray(e)?Object.keys(e):[],gee=e=>e!==void 0,yee=e=>zO(e)||e===!0||e===!1,UO=e=>!z1(e).length&&e!==!1&&e!==!0,vee=(e,...t)=>dee.apply(null,[e].concat(lee(t)));var VO={allUniqueKeys:hee,deleteUndefinedProps:pee,getValues:mee,has:BO,isEmptySchema:UO,isSchema:yee,keys:z1,notUndefined:gee,uniqWith:fee,withoutArr:vee};const wee=M1,bee=LO,{allUniqueKeys:xee,deleteUndefinedProps:See,getValues:$ee,keys:$l,notUndefined:kee,uniqWith:_ee,withoutArr:ck}=VO;function Eee(e){bee(e,function(t,n){t===!1&&delete e[n]})}function fk(e,t){return xee(e).reduce(function(r,i){const o=$ee(e,i),s=_ee(o.filter(kee),wee);return r[i]=t(s,i),r},{})}var Cee={keywords:["properties","patternProperties","additionalProperties"],resolver(e,t,n,r){r.ignoreAdditionalProperties||(e.forEach(function(o){const s=e.filter(c=>c!==o),a=$l(o.properties),u=$l(o.patternProperties).map(c=>new RegExp(c));s.forEach(function(c){const f=$l(c.properties),p=f.filter(h=>u.some(g=>g.test(h)));ck(f,a,p).forEach(function(h){c.properties[h]=n.properties([c.properties[h],o.additionalProperties],h)})})}),e.forEach(function(o){const s=e.filter(l=>l!==o),a=$l(o.patternProperties);o.additionalProperties===!1&&s.forEach(function(l){const u=$l(l.patternProperties);ck(u,a).forEach(f=>delete l.patternProperties[f])})}));const i={additionalProperties:n.additionalProperties(e.map(o=>o.additionalProperties)),patternProperties:fk(e.map(o=>o.patternProperties),n.patternProperties),properties:fk(e.map(o=>o.properties),n.properties)};return i.additionalProperties===!1&&Eee(i.properties),See(i)}};const Tee=M1,Aee=LO,{allUniqueKeys:Oee,deleteUndefinedProps:Pee,has:Ree,isSchema:HO,notUndefined:WO,uniqWith:Nee}=VO;function Iee(e){Aee(e,function(t,n){t===!1&&e.splice(n,1)})}function Dee(e,t){return e.map(function(n){if(n)if(Array.isArray(n.items)){const r=n.items[t];if(HO(r))return r;if(Ree(n,"additionalItems"))return n.additionalItems}else return n.items})}function Fee(e){return e.map(function(t){if(t)return Array.isArray(t.items)?t.additionalItems:t.items})}function jee(e,t,n){return Oee(n).reduce(function(i,o){const s=Dee(e,o),a=Nee(s.filter(WO),Tee);return i[o]=t(a,o),i},[])}var Mee={keywords:["items","additionalItems"],resolver(e,t,n){const r=e.map(a=>a.items),i=r.filter(WO),o={};i.every(HO)?o.items=n.items(r):o.items=jee(e,n.items,r);let s;return i.every(Array.isArray)?s=e.map(a=>a.additionalItems):i.some(Array.isArray)&&(s=Fee(e)),s&&(o.additionalItems=n.additionalItems(s)),o.additionalItems===!1&&Array.isArray(o.items)&&Iee(o.items),Pee(o)}};const qO=AO,Qd=M1,Lee=fZ,zee=$Z,KO=S1,B1=R1,Bee=AZ,Uee=DO,qy=A1,$a=za,Vee=UZ,GO=PO,U1=uh,la=F1,YO=Cee,XO=Mee,sf=(e,t)=>e.indexOf(t)!==-1,Hee=e=>$a(e)||e===!0||e===!1,Wee=e=>e===!1,QO=e=>e===!0,ch=(e,t,n)=>n(e),JO=e=>GO(U1(B1(e))),Jd=e=>e!==void 0,ZO=e=>U1(B1(e.map(Qee))),Ja=e=>e[0],qee=e=>JO(e),cc=e=>Math.max.apply(Math,e),fc=e=>Math.min.apply(Math,e),Kee=e=>e.some(QO),Gee=e=>la(KO(e),qy);function Yee(e){return function(t,n){return Qd({[e]:t},{[e]:n})}}function eP(e){let{allOf:t=[],...n}=e;return n=$a(e)?n:e,[n,...t.map(eP)]}function tP(e,t){return e.map(n=>n&&n[t])}function Xee(e,t){return e.map(function(n,r){try{return t(n,r)}catch{return}}).filter(Jd)}function Qee(e){return $a(e)||Array.isArray(e)?Object.keys(e):[]}function Ky(e,t){if(t=t||[],!e.length)return t;const n=e.slice(0).shift(),r=e.slice(1);return t.length?Ky(r,KO(t.map(i=>n.map(o=>[o].concat(i))))):Ky(r,n.map(i=>i))}function nP(e,t){let n;try{n=e.map(function(r){return JSON.stringify(r,null,2)}).join(` `)}catch{n=e.join(", ")}throw new Error('Could not resolve values for path:"'+t.join(".")+`". They are probably incompatible. Values: `+n)}function Jee(e,t,n,r,i,o){if(e.length){const s=i.complexResolvers[t];if(!s||!s.resolver)throw new Error("No resolver found for "+t);const a=n.map(f=>e.reduce((p,d)=>(f[d]!==void 0&&(p[d]=f[d]),p),{})),l=la(a,Qd),u=s.keywords.reduce((f,p)=>({...f,[p]:(d,h=[])=>r(d,null,o.concat(p,h))}),{}),c=s.resolver(l,o.concat(t),u,i);return $a(c)||nP(l,o.concat(t)),c}}function Zee(e){return{required:e}}const ete=["properties","patternProperties","definitions","dependencies"],tte=["anyOf","oneOf"],nte=["additionalProperties","additionalItems","contains","propertyNames","not","items"],We={type(e){if(e.some(Array.isArray)){const t=e.map(function(r){return Array.isArray(r)?r:[r]}),n=Bee.apply(null,t);if(n.length===1)return n[0];if(n.length>1)return U1(n)}},dependencies(e,t,n){return ZO(e).reduce(function(i,o){const s=tP(e,o);let a=la(s.filter(Jd),qy);const l=a.filter(Array.isArray);if(l.length){if(l.length===a.length)i[o]=JO(a);else{const u=a.filter(Hee),c=l.map(Zee);i[o]=n(u.concat(c),o)}return i}return a=la(a,Qd),i[o]=n(a,o),i},{})},oneOf(e,t,n){const r=Ky(qO(e)),i=Xee(r,n),o=la(i,Qd);if(o.length)return o},not(e){return{anyOf:e}},pattern(e){return e.map(t=>"(?="+t+")").join("")},multipleOf(e){let t=e.slice(0),n=1;for(;t.some(r=>!Number.isInteger(r));)t=t.map(r=>r*10),n=n*10;return Lee(t)/n},enum(e){const t=Uee.apply(null,e.concat(qy));if(t.length)return GO(t)}};We.$id=Ja;We.$ref=Ja;We.$schema=Ja;We.additionalItems=ch;We.additionalProperties=ch;We.anyOf=We.oneOf;We.contains=ch;We.default=Ja;We.definitions=We.dependencies;We.description=Ja;We.examples=Gee;We.exclusiveMaximum=fc;We.exclusiveMinimum=cc;We.items=XO;We.maximum=fc;We.maxItems=fc;We.maxLength=fc;We.maxProperties=fc;We.minimum=cc;We.minItems=cc;We.minLength=cc;We.minProperties=cc;We.properties=YO;We.propertyNames=ch;We.required=qee;We.title=Ja;We.uniqueItems=Kee;const rte={properties:YO,items:XO};function V1(e,t,n){t=zee(t,{ignoreAdditionalProperties:!1,resolvers:We,complexResolvers:rte,deep:!0});const r=Object.entries(t.complexResolvers);function i(a,l,u){a=qO(a.filter(Jd)),u=u||[];const c=$a(l)?l:{};if(!a.length)return;if(a.some(Wee))return!1;if(a.every(QO))return!0;a=a.filter($a);const f=ZO(a);if(t.deep&&sf(f,"allOf"))return V1({allOf:a},t);const p=r.map(([d,h])=>f.filter(g=>h.keywords.includes(g)));return p.forEach(d=>Vee(f,d)),f.forEach(function(d){const h=tP(a,d),g=la(h.filter(Jd),Yee(d));if(g.length===1&&sf(tte,d))c[d]=g[0].map(y=>i([y],y));else if(g.length===1&&!sf(ete,d)&&!sf(nte,d))c[d]=g[0];else{const y=t.resolvers[d]||t.resolvers.defaultResolver;if(!y)throw new Error("No resolver found for key "+d+". You can provide a resolver for this keyword in the options, or provide a default resolver.");const m=(v,w=[])=>i(v,null,u.concat(d,w));c[d]=y(g,u.concat(d),m,t),c[d]===void 0?nP(g,u.concat(d)):c[d]===void 0&&delete c[d]}}),r.reduce((d,[h,g],y)=>({...d,...Jee(p[y],h,a,i,t,u)}),c)}const o=B1(eP(e));return i(o)}V1.options={resolvers:We};var ite=V1;const ote=He(ite);function ka(e){let t;const n=ae(e,"discriminator.propertyName",void 0);return _1(n)?t=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),t}function Iu(e){return Array.isArray(e)?"array":typeof e=="string"?"string":e==null?"null":typeof e=="boolean"?"boolean":isNaN(e)?typeof e=="object"?"object":"string":"number"}var ste=ah,ate=Do,lte=D1,ute=lh,cte=ate(function(e){return lte(ste(e,1,ute,!0))}),fte=cte;const dte=He(fte);function Co(e){let{type:t}=e;return!t&&e.const?Iu(e.const):!t&&e.enum?"string":!t&&(e.properties||e.additionalProperties)?"object":(Array.isArray(t)&&(t.length===2&&t.includes("null")?t=t.find(n=>n!=="null"):t=t[0]),t)}function Ii(e,t){const n=Object.assign({},e);return Object.keys(t).reduce((r,i)=>{const o=e?e[i]:{},s=t[i];return e&&i in e&&yt(s)?r[i]=Ii(o,s):e&&t&&(Co(e)==="object"||Co(t)==="object")&&i===DL&&Array.isArray(o)&&Array.isArray(s)?r[i]=dte(o,s):r[i]=s,r},n)}function Kn(e,t,n={},r){return ni(e,t,n,r)[0]}function pte(e,t,n,r,i,o){const{if:s,then:a,else:l,...u}=t,c=e.isValid(s,o||{},n);let f=[u],p=[];if(r)a&&typeof a!="boolean"&&(p=p.concat(ni(e,a,n,o,r,i))),l&&typeof l!="boolean"&&(p=p.concat(ni(e,l,n,o,r,i)));else{const d=c?a:l;d&&typeof d!="boolean"&&(p=p.concat(ni(e,d,n,o,r,i)))}return p.length&&(f=p.map(d=>Ii(u,d))),f.flatMap(d=>ni(e,d,n,o,r,i))}function rP(e){return e.reduce((n,r)=>r.length>1?r.flatMap(i=>bO(n.length,o=>[...n[o]].concat(i))):(n.forEach(i=>i.push(r[0])),n),[[]])}function hte(e,t,n,r,i,o){const s=iP(e,t,n,r,i,o);if(s.length>1||s[0]!==t)return s;if(qp in t)return oP(e,t,n,r,i,o).flatMap(l=>ni(e,l,n,o,r,i));if(rc in t&&Array.isArray(t.allOf)){const a=t.allOf.map(u=>ni(e,u,n,o,r,i));return rP(a).map(u=>({...t,allOf:u}))}return[t]}function iP(e,t,n,r,i,o){const s=Du(t,n,i);return s!==t?ni(e,s,n,o,r,i):[t]}function Du(e,t,n){if(!yt(e))return e;let r=e;if(jt in r){const{$ref:i,...o}=r;if(n.includes(i))return r;n.push(i),r={...k1(i,t),...o}}if(xt in r){const i=[],o=iX(r[xt],(s,a,l)=>{const u=[...n];s[l]=Du(a,t,u),i.push(u)},{});JX(n,NQ(nQ(i))),r={...r,[xt]:o}}return $o in r&&!Array.isArray(r.items)&&typeof r.items!="boolean"&&(r={...r,items:Du(r.items,t,n)}),ys(e,r)?e:r}function mte(e,t,n,r){const i={...t,properties:{...t.properties}},o=r&&yt(r)?r:{};return Object.keys(o).forEach(s=>{if(s in i.properties)return;let a={};typeof i.additionalProperties!="boolean"?jt in i.additionalProperties?a=Kn(e,{$ref:ae(i.additionalProperties,[jt])},n,o):"type"in i.additionalProperties?a={...i.additionalProperties}:ti in i.additionalProperties||dr in i.additionalProperties?a={type:"object",...i.additionalProperties}:a={type:Iu(ae(o,[s]))}:a={type:Iu(ae(o,[s]))},i.properties[s]=a,nn(i.properties,[s,Ma],!0)}),i}function ni(e,t,n,r,i=!1,o=[]){return yt(t)?hte(e,t,n,i,o,r).flatMap(a=>{let l=a;if(NL in l)return pte(e,l,n,i,o,r);if(rc in l){if(i){const{allOf:c,...f}=l;return[...c,f]}try{l=ote(l,{deep:!1})}catch(c){console.warn(`could not merge subschemas in allOf: `,c);const{allOf:f,...p}=l;return p}}return My in l&&l.additionalProperties!==!1?mte(e,l,n,r):l}):[{}]}function gte(e,t,n,r,i){let o;const{oneOf:s,anyOf:a,...l}=t;if(Array.isArray(s)?o=s:Array.isArray(a)&&(o=a),o){const u=i===void 0&&r?{}:i,c=ka(t);o=o.map(p=>Du(p,n,[]));const f=T1(e,u,o,n,c);if(r)return o.map(p=>Ii(l,p));t=Ii(l,o[f])}return[t]}function oP(e,t,n,r,i,o){const{dependencies:s,...a}=t;return gte(e,a,n,r,o).flatMap(u=>sP(e,s,u,n,r,i,o))}function sP(e,t,n,r,i,o,s){let a=[n];for(const l in t){if(!i&&ae(s,[l])===void 0||n.properties&&!(l in n.properties))continue;const[u,c]=$1(l,t);return Array.isArray(c)?a[0]=yte(n,c):yt(c)&&(a=vte(e,n,r,l,c,i,o,s)),a.flatMap(f=>sP(e,u,f,r,i,o,s))}return a}function yte(e,t){if(!t)return e;const n=Array.isArray(e.required)?Array.from(new Set([...e.required,...t])):t;return{...e,required:n}}function vte(e,t,n,r,i,o,s,a){return ni(e,i,n,a,o,s).flatMap(u=>{const{oneOf:c,...f}=u;if(t=Ii(t,f),c===void 0)return t;const p=c.map(h=>typeof h=="boolean"||!(jt in h)?[h]:iP(e,h,n,o,s,a));return rP(p).flatMap(h=>wte(e,t,n,r,h,o,s,a))})}function wte(e,t,n,r,i,o,s,a){const l=i.filter(u=>{if(typeof u=="boolean"||!u||!u.properties)return!1;const{[r]:c}=u.properties;if(c){const f={type:"object",properties:{[r]:c}};return e.isValid(f,a,n)||o}return!1});return!o&&l.length!==1?(console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"),[t]):l.flatMap(u=>{const c=u,[f]=$1(r,c.properties),p={...c,properties:f};return ni(e,p,n,a,o,s).map(h=>Ii(t,h))})}const bte={type:"object",$id:IL,properties:{__not_really_there__:{type:"number"}}};function Gy(e,t,n,r={}){let i=0;return n&&(Fr(n.properties)?i+=iY(n.properties,(o,s,a)=>{const l=ae(r,a);if(typeof s=="boolean")return o;if(dn(s,jt)){const u=Kn(e,s,t,l);return o+Gy(e,t,u,l||{})}if((dn(s,dr)||dn(s,ti))&&l){const u=dn(s,dr)?dr:ti,c=ka(s);return o+Fu(e,t,l,ae(s,u),-1,c)}if(s.type==="object")return o+Gy(e,t,s,l||{});if(s.type===Iu(l)){let u=o+1;return s.default?u+=l===s.default?1:-1:s.const&&(u+=l===s.const?1:-1),u}return o},0):_1(n.type)&&n.type===Iu(r)&&(i+=1)),i}function Fu(e,t,n,r,i=-1,o){const s=r.map(f=>Du(f,t,[])),a=xO(n,r,o);if(pO(a))return a;const l=s.reduce((f,p,d)=>(T1(e,n,[bte,p],t,o)===1&&f.push(d),f),[]);if(l.length===1)return l[0];l.length||bO(s.length,f=>l.push(f));const u=new Set,{bestIndex:c}=l.reduce((f,p)=>{const{bestScore:d}=f,h=s[p],g=Gy(e,t,h,n);return u.add(g),g>d?{bestIndex:p,bestScore:g}:f},{bestIndex:i,bestScore:0});return u.size===1&&i>=0?i:c}function Yy(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every(t=>yt(t))}function Zd(e,t,n=!1){if(Array.isArray(t)){const r=Array.isArray(e)?e:[],i=t.map((o,s)=>r[s]?Zd(r[s],o,n):o);return n&&i.length(i[o]=Zd(e?ae(e,o):{},ae(t,o),n),i),r)}return t}function Za(e,t,n=!1){return Object.keys(t).reduce((r,i)=>{const o=e?e[i]:{},s=t[i];if(e&&i in e&&yt(s))r[i]=Za(o,s,n);else if(n&&Array.isArray(o)&&Array.isArray(s)){let a=s;n==="preventDuplicates"&&(a=s.reduce((l,u)=>(o.includes(u)||l.push(u),l),[])),r[i]=o.concat(a)}else r[i]=s;return r},Object.assign({},e))}function xte(e){return Array.isArray(e.enum)&&e.enum.length===1||bA in e}function aP(e,t,n={}){const r=Kn(e,t,n,void 0),i=r.oneOf||r.anyOf;return Array.isArray(r.enum)?!0:Array.isArray(i)?i.every(o=>typeof o!="boolean"&&xte(o)):!1}function H1(e,t,n){return!t.uniqueItems||!t.items||typeof t.items=="boolean"?!1:aP(e,t.items,n)}var _a;(function(e){e[e.Ignore=0]="Ignore",e[e.Invert=1]="Invert",e[e.Fallback=2]="Fallback"})(_a||(_a={}));function jm(e,t=_a.Ignore,n=-1){if(n>=0){if(Array.isArray(e.items)&&nto(e,y,{rootSchema:i,includeUndefinedValues:o,_recurseList:s,experimental_defaultFormStateBehavior:a,parentDefaults:Array.isArray(n)?n[m]:void 0,rawFormData:f,required:l}));else if(dr in p){const{oneOf:y,...m}=p;if(y.length===0)return;const v=ka(p);h=y[Fu(e,i,gs(f)?void 0:f,y,0,v)],h=Ii(m,h)}else if(ti in p){const{anyOf:y,...m}=p;if(y.length===0)return;const v=ka(p);h=y[Fu(e,i,gs(f)?void 0:f,y,0,v)],h=Ii(m,h)}if(h)return to(e,h,{rootSchema:i,includeUndefinedValues:o,_recurseList:g,experimental_defaultFormStateBehavior:a,parentDefaults:d,rawFormData:f,required:l});switch(d===void 0&&(d=p.default),Co(p)){case"object":{const y=(a==null?void 0:a.allOf)==="populateDefaults"&&rc in p?Kn(e,p,i,f):p,m=Object.keys(y.properties||{}).reduce((v,w)=>{var x;const $=to(e,ae(y,[xt,w]),{rootSchema:i,_recurseList:s,experimental_defaultFormStateBehavior:a,includeUndefinedValues:o===!0,parentDefaults:ae(d,[w]),rawFormData:ae(f,[w]),required:(x=y.required)===null||x===void 0?void 0:x.includes(w)});return dk(v,w,$,o,l,y.required,a),v},{});if(y.additionalProperties){const v=yt(y.additionalProperties)?y.additionalProperties:{},w=new Set;yt(d)&&Object.keys(d).filter($=>!y.properties||!y.properties[$]).forEach($=>w.add($));const x=[];Object.keys(f).filter($=>!y.properties||!y.properties[$]).forEach($=>{w.add($),x.push($)}),w.forEach($=>{var b;const k=to(e,v,{rootSchema:i,_recurseList:s,experimental_defaultFormStateBehavior:a,includeUndefinedValues:o===!0,parentDefaults:ae(d,[$]),rawFormData:ae(f,[$]),required:(b=y.required)===null||b===void 0?void 0:b.includes($)});dk(m,$,k,o,l,x)})}return m}case"array":{const y=((u=a==null?void 0:a.arrayMinItems)===null||u===void 0?void 0:u.populate)==="never",m=((c=a==null?void 0:a.arrayMinItems)===null||c===void 0?void 0:c.populate)==="requiredOnly";if(Array.isArray(d)&&(d=d.map((k,T)=>{const N=jm(p,_a.Fallback,T);return to(e,N,{rootSchema:i,_recurseList:s,experimental_defaultFormStateBehavior:a,parentDefaults:k,required:l})})),Array.isArray(r)){const k=jm(p);y?d=r:d=r.map((T,N)=>to(e,k,{rootSchema:i,_recurseList:s,experimental_defaultFormStateBehavior:a,rawFormData:T,parentDefaults:ae(d,[N]),required:l}))}if(y)return d??[];if(m&&!l)return d||void 0;const v=Array.isArray(d)?d.length:0;if(!p.minItems||H1(e,p,i)||p.minItems<=v)return d||[];const w=d||[],x=jm(p,_a.Invert),$=x.default,b=new Array(p.minItems-v).fill(to(e,x,{parentDefaults:$,rootSchema:i,_recurseList:s,experimental_defaultFormStateBehavior:a,required:l}));return w.concat(b)}}return d}function lP(e,t,n,r,i=!1,o){if(!yt(t))throw new Error("Invalid schema: "+t);const s=Kn(e,t,r,n),a=to(e,s,{rootSchema:r,includeUndefinedValues:i,experimental_defaultFormStateBehavior:o,rawFormData:n});if(n==null||typeof n=="number"&&isNaN(n))return a;const{mergeExtraDefaults:l}=(o==null?void 0:o.arrayMinItems)||{};return yt(n)||Array.isArray(n)?Zd(a,n,l):n}function uP(e={}){return"widget"in Fe(e)&&Fe(e).widget!=="hidden"}function cP(e,t,n={},r){if(n[s1]==="files")return!0;if(t.items){const i=Kn(e,t.items,r);return i.type==="string"&&i.format==="data-url"}return!1}function Ste(e,t,n={},r,i){const o=Fe(n,i),{label:s=!0}=o;let a=!!s;const l=Co(t);return l==="array"&&(a=H1(e,t,r)||cP(e,t,n,r)||uP(n)),l==="object"&&(a=!1),l==="boolean"&&!n[s1]&&(a=!1),n[FL]&&(a=!1),a}function $te(e,t,n){if(!n)return t;const{errors:r,errorSchema:i}=t;let o=e.toErrorList(n),s=n;return gs(i)||(s=Za(i,n,!0),o=[...r].concat(o)),{errorSchema:s,errors:o}}const Ds=Symbol("no Value");function Xy(e,t,n,r,i={}){let o;if(dn(n,xt)){const s={};if(dn(r,xt)){const u=ae(r,xt,{});Object.keys(u).forEach(c=>{dn(i,c)&&(s[c]=void 0)})}const a=Object.keys(ae(n,xt,{})),l={};a.forEach(u=>{const c=ae(i,u);let f=ae(r,[xt,u],{}),p=ae(n,[xt,u],{});dn(f,jt)&&(f=Kn(e,f,t,c)),dn(p,jt)&&(p=Kn(e,p,t,c));const d=ae(f,"type"),h=ae(p,"type");if(!d||d===h)if(dn(s,u)&&delete s[u],h==="object"||h==="array"&&Array.isArray(c)){const g=Xy(e,t,p,f,c);(g!==void 0||h==="array")&&(l[u]=g)}else{const g=ae(p,"default",Ds),y=ae(f,"default",Ds);g!==Ds&&g!==c&&(y===c?s[u]=g:ae(p,"readOnly")===!0&&(s[u]=void 0));const m=ae(p,"const",Ds),v=ae(f,"const",Ds);m!==Ds&&m!==c&&(s[u]=v===c?m:void 0)}}),o={...typeof i=="string"||Array.isArray(i)?void 0:i,...s,...l}}else if(ae(r,"type")==="array"&&ae(n,"type")==="array"&&Array.isArray(i)){let s=ae(r,"items"),a=ae(n,"items");if(typeof s=="object"&&typeof a=="object"&&!Array.isArray(s)&&!Array.isArray(a)){dn(s,jt)&&(s=Kn(e,s,t,i)),dn(a,jt)&&(a=Kn(e,a,t,i));const l=ae(s,"type"),u=ae(a,"type");if(!l||l===u){const c=ae(n,"maxItems",-1);u==="object"?o=i.reduce((f,p)=>{const d=Xy(e,t,a,s,p);return d!==void 0&&(c<0||f.length0&&i.length>c?i.slice(0,c):i}}else typeof s=="boolean"&&typeof a=="boolean"&&s===a&&(o=i)}return o}function Qf(e,t,n,r,i,o,s,a=[]){if(jt in t||qp in t||rc in t){const c=Kn(e,t,o,s);if(a.findIndex(p=>ys(p,c))===-1)return Qf(e,c,n,r,i,o,s,a.concat(c))}if($o in t&&!ae(t,[$o,jt]))return Qf(e,ae(t,$o),n,r,i,o,s,a);const u={$id:i||n};if(Co(t)==="object"&&xt in t)for(const c in t.properties){const f=ae(t,[xt,c]),p=u[fo]+r+c;u[c]=Qf(e,yt(f)?f:{},n,r,p,o,ae(s,[c]),a)}return u}function kte(e,t,n,r,i,o="root",s="_"){return Qf(e,t,o,s,n,r,i)}function qo(e,t,n,r,i,o=[]){if(jt in t||qp in t||rc in t){const a=Kn(e,t,r,i);if(o.findIndex(u=>ys(u,a))===-1)return qo(e,a,n,r,i,o.concat(a))}let s={[Gf]:n.replace(/^\./,"")};if(dr in t||ti in t){const a=dr in t?t.oneOf:t.anyOf,l=ka(t),u=Fu(e,r,i,a,0,l),c=a[u];s={...s,...qo(e,c,n,r,i,o)}}if(My in t&&t[My]!==!1&&nn(s,o1,!0),$o in t&&Array.isArray(i)){const{items:a,additionalItems:l}=t;Array.isArray(a)?i.forEach((u,c)=>{a[c]?s[c]=qo(e,a[c],`${n}.${c}`,r,u,o):l?s[c]=qo(e,l,`${n}.${c}`,r,u,o):console.warn(`Unable to generate path schema for "${n}.${c}". No schema defined for it`)}):i.forEach((u,c)=>{s[c]=qo(e,a,`${n}.${c}`,r,u,o)})}else if(xt in t)for(const a in t.properties){const l=ae(t,[xt,a]);s[a]=qo(e,l,`${n}.${a}`,r,ae(i,[a]),o)}return s}function _te(e,t,n="",r,i){return qo(e,t,n,r,i)}class Ete{constructor(t,n,r){this.rootSchema=n,this.validator=t,this.experimental_defaultFormStateBehavior=r}getValidator(){return this.validator}doesSchemaUtilsDiffer(t,n,r={}){return!t||!n?!1:this.validator!==t||!cr(this.rootSchema,n)||!cr(this.experimental_defaultFormStateBehavior,r)}getDefaultFormState(t,n,r=!1){return lP(this.validator,t,n,this.rootSchema,r,this.experimental_defaultFormStateBehavior)}getDisplayLabel(t,n,r){return Ste(this.validator,t,n,this.rootSchema,r)}getClosestMatchingOption(t,n,r,i){return Fu(this.validator,this.rootSchema,t,n,r,i)}getFirstMatchingOption(t,n,r){return T1(this.validator,t,n,this.rootSchema,r)}getMatchingOption(t,n,r){return SO(this.validator,t,n,this.rootSchema,r)}isFilesArray(t,n){return cP(this.validator,t,n,this.rootSchema)}isMultiSelect(t){return H1(this.validator,t,this.rootSchema)}isSelect(t){return aP(this.validator,t,this.rootSchema)}mergeValidationData(t,n){return $te(this.validator,t,n)}retrieveSchema(t,n){return Kn(this.validator,t,this.rootSchema,n)}sanitizeDataForNewSchema(t,n,r){return Xy(this.validator,this.rootSchema,t,n,r)}toIdSchema(t,n,r,i="root",o="_"){return kte(this.validator,t,n,this.rootSchema,r,i,o)}toPathSchema(t,n,r){return _te(this.validator,t,n,this.rootSchema,r)}}function Cte(e,t,n={}){return new Ete(e,t,n)}function Tte(e){var t;if(e.indexOf("data:")===-1)throw new Error("File is invalid: URI must be a dataURI");const r=e.slice(5).split(";base64,");if(r.length!==2)throw new Error("File is invalid: dataURI must be base64");const[i,o]=r,[s,...a]=i.split(";"),l=s||"",u=decodeURI(((t=a.map(c=>c.split("=")).find(([c])=>c==="name"))===null||t===void 0?void 0:t[1])||"unknown");try{const c=atob(o),f=new Array(c.length);for(let d=0;d{const s=r.findIndex(a=>a===`%${o+1}`);s>=0&&(r[s]=i)}),n=r.join("")}return n}function Ote(e,t){return Ate(e,t)}function zt(e,t=[],n){if(Array.isArray(e))return e.map(o=>zt(o,t)).filter(o=>o!==n);const r=e===""||e===null?-1:Number(e),i=t[r];return i?i.value:n}function fP(e,t,n=[]){const r=zt(e,n);return Array.isArray(t)?t.filter(i=>!ys(i,r)):ys(r,t)?void 0:t}function dc(e,t){return Array.isArray(t)?t.some(n=>ys(n,e)):ys(t,e)}function dP(e,t=[],n=!1){const r=t.map((i,o)=>dc(i.value,e)?String(o):void 0).filter(i=>typeof i<"u");return n?r:r[0]}function Pte(e){return e==null}var Rte=Pte;const Nte=He(Rte);function pP(e,t,n=[]){const r=zt(e,n);if(!Nte(r)){const i=n.findIndex(a=>r===a.value),o=n.map(({value:a})=>a);return t.slice(0,i).concat(r,t.slice(i)).sort((a,l)=>+(o.indexOf(a)>o.indexOf(l)))}return t}class Ite{constructor(t){this.errorSchema={},this.resetAllErrors(t)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(t){let r=Array.isArray(t)&&t.length>0||typeof t=="string"?ae(this.errorSchema,t):this.errorSchema;return!r&&t&&(r={},nn(this.errorSchema,t,r)),r}resetAllErrors(t){return this.errorSchema=t?OO(t):{},this}addErrors(t,n){const r=this.getOrCreateErrorBlock(n);let i=ae(r,Dr);return Array.isArray(i)||(i=[],r[Dr]=i),Array.isArray(t)?i.push(...t):i.push(t),this}setErrors(t,n){const r=this.getOrCreateErrorBlock(n),i=Array.isArray(t)?[...t]:[t];return nn(r,Dr,i),this}clearErrors(t){const n=this.getOrCreateErrorBlock(t);return nn(n,Dr,[]),this}}function Dte(e,t,n=[1900,new Date().getFullYear()+2],r="YMD"){const{day:i,month:o,year:s,hour:a,minute:l,second:u}=e,c={type:"day",range:[1,31],value:i},f={type:"month",range:[1,12],value:o},p={type:"year",range:n,value:s},d=[];switch(r){case"MDY":d.push(f,c,p);break;case"DMY":d.push(c,f,p);break;case"YMD":default:d.push(p,f,c)}return t&&d.push({type:"hour",range:[0,23],value:a},{type:"minute",range:[0,59],value:l},{type:"second",range:[0,59],value:u}),d}function Fte(e){const t={};return e.multipleOf&&(t.step=e.multipleOf),(e.minimum||e.minimum===0)&&(t.min=e.minimum),(e.maximum||e.maximum===0)&&(t.max=e.maximum),t}function hP(e,t,n={},r=!0){const i={type:t||"text",...Fte(e)};return n.inputType?i.type=n.inputType:t||(e.type==="number"?(i.type="number",r&&i.step===void 0&&(i.step="any")):e.type==="integer"&&(i.type="number",i.step===void 0&&(i.step=1))),n.autocomplete&&(i.autoComplete=n.autocomplete),i}const pk={props:{disabled:!1},submitText:"Submit",norender:!1};function mP(e={}){const t=Fe(e);if(t&&t[Hd]){const n=t[Hd];return{...pk,...n}}return pk}function Ee(e,t,n={}){const{templates:r}=t;return e==="ButtonTemplates"?r[e]:n[e]||r[e]}var gP={exports:{}},Xe={};/** @@ -213,7 +213,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `)&&u.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),a=" ",l=t.createTracker(n),l.move(o.join(""))),o.push(l.move(t.handle(u,e,t,{...l.current(),before:a,after:c}))),a=o[o.length-1].slice(-1)}return r.pop(),o.join("")}const wye=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];tI.peek=kye;const bye={canContainEols:["delete"],enter:{strikethrough:Sye},exit:{strikethrough:$ye}},xye={unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:wye}],handlers:{delete:tI}};function Sye(e){this.enter({type:"delete",children:[]},e)}function $ye(e){this.exit(e)}function tI(e,t,n,r){const i=Ih(r),o=n.enter("strikethrough");let s=i.move("~~");return s+=eI(e,n,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),o(),s}function kye(){return"~"}nI.peek=_ye;function nI(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++ol&&(l=e[u].length);++ya[y])&&(a[y]=v)}h.push(m)}o[u]=h,s[u]=g}let c=-1;if(typeof n=="object"&&"length"in n)for(;++ca[c]&&(a[c]=m),p[c]=m),f[c]=v}o.splice(1,0,f),s.splice(1,0,p),u=-1;const d=[];for(;++un==="none"?null:n),children:[]},e),this.setData("inTable",!0)}function Pye(e){this.exit(e),this.setData("inTable")}function Rye(e){this.enter({type:"tableRow",children:[]},e)}function ug(e){this.exit(e)}function eE(e){this.enter({type:"tableCell",children:[]},e)}function Nye(e){let t=this.resume();this.getData("inTable")&&(t=t.replace(/\\([\\|])/g,Iye));const n=this.stack[this.stack.length-1];n.value=t,this.exit(e)}function Iye(e,t){return t==="|"?t:e}function Dye(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:s,tableRow:a,tableCell:l,inlineCode:p}};function s(d,h,g,y){return u(c(d,g,y),d.align)}function a(d,h,g,y){const m=f(d,g,y),v=u([m]);return v.slice(0,v.indexOf(` -`))}function l(d,h,g,y){const m=g.enter("tableCell"),v=g.enter("phrasing"),w=eI(d,g,{...y,before:o,after:o});return v(),m(),w}function u(d,h){return Eye(d,{align:h,alignDelimiters:r,padding:n,stringLength:i})}function c(d,h,g){const y=d.children;let m=-1;const v=[],w=h.enter("table");for(;++m-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const a=n.createTracker(r);a.move(o+" ".repeat(s-o.length)),a.shift(s);const l=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,a.current()),c);return l(),u;function c(f,p,d){return p?(d?"":" ".repeat(s))+f:(d?o:o+" ".repeat(s-o.length))+f}}const Lye={exit:{taskListCheckValueChecked:tE,taskListCheckValueUnchecked:tE,paragraph:Bye}},zye={unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Uye}};function tE(e){const t=this.stack[this.stack.length-2];t.checked=e.type==="taskListCheckValueChecked"}function Bye(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1],r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,s;for(;++othis.register(r)),this.components.length===0)throw new Error("No components registered");if(!this.get("FALLBACK"))throw new Error("No fallback component registered")}register(t){const n=this.components.findIndex(r=>r.key===t.key);return n!==-1?this.components[n]=t:this.components.push(t),this}get(t){const n=this.components.find(r=>r.key===t);return n||null}getOrFallback(t){return t?this.get(t)||this.get("FALLBACK"):this.get("FALLBACK")}getComponent(t,n){var r;return n?this.getOrFallback(t).component:(r=this.get(t))==null?void 0:r.component}}const[_c,Gye]=ks();function Yye(e){const{token:t,components:n}=wr(),{sessionId:r}=_v(t),{__socket:i}=nc(),o=O.useMemo(()=>new Kye({components:n}),[n]),s=O.useMemo(()=>new TL(r),[r]);return O.useEffect(()=>s.socketChatInfoHandler(i),[i,s]),O.useEffect(()=>s.socketChatVoteHandler(i),[i,s]),O.useEffect(()=>s.socketMessageRespHandler(i),[i,s]),O.useEffect(()=>s.socketUiHandler(i),[i,s]),S.jsx(Gye,{value:{__handler:s,__components:o},...e})}function Dh(){const{__handler:e}=_c();return O.useSyncExternalStore(e.subscribe,e.getSnapshot)}function Xye(){const{__handler:e}=_c();return O.useSyncExternalStore(e.subscribe,e.isLoading)}function rI(){const{__handler:e}=_c(),{headers:t,token:n}=wr(),r=nc();function i(o){e.handleTextMessage({headers:t??{},content:o,bot_token:n},r.__socket)}return{send:i}}const Qye=$M("version"),Jye={"--opencopilot-primary-clr":"hsl(200 18% 46%)","--opencopilot-accent-clr":"hsl(300, 7%, 97%)"};function Zye({children:e,options:t,containerProps:n}){const{style:r,...i}=n||{};return S.jsxs(eM.div,{...i,"data-version":Qye,style:{width:"100%",height:"100%",pointerEvents:"none",...Jye,...r},children:[S.jsx(tj,{data:t,children:S.jsx(lM,{children:S.jsx(ij,{children:S.jsx(EL,{children:S.jsx(Yye,{children:S.jsx(T3,{children:e})})})})})}),S.jsx("style",{children:tM})]})}const[Ec,e0e]=ks();function iI({children:e,...t}){const[n,r]=O.useState(t.open||!1);function i(o){var s;r(o),(s=t.onOpenChange)==null||s.call(t,o)}return S.jsx(e0e,{value:{open:n,set:i},children:e})}const ub=O.forwardRef(({className:e,onClick:t,...n},r)=>{const{set:i,open:o}=Ec();return S.jsx("button",{"data-state":o?"open":"closed",onClick:s=>{t==null||t(s),i(!0)},className:Nn("",e),ref:r,...n})});ub.displayName="DialogTrigger";const oI=O.forwardRef(({className:e,...t},n)=>{const{open:r}=Ec();return S.jsx("div",{...t,"data-state":r?"open":"closed",className:Nn("absolute flex items-center justify-center overflow-hidden inset-0 z-50 bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),ref:n})});oI.displayName="DialogOverlay";const cb=O.forwardRef(({className:e,...t},n)=>{const{open:r}=Ec();return r&&S.jsx(oI,{children:S.jsx("div",{...t,"data-state":r?"open":"closed",className:Nn("rounded-lg z-[100] w-full grid max-w-[70%] min-w-fit bg-white gap-2 shadow-lg p-4 animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom-3",e),ref:n})})});cb.displayName="DialogContent";const Hu=O.forwardRef(({className:e,onClick:t,...n},r)=>{const{set:i}=Ec();return S.jsx("button",{...n,onClick:o=>{t==null||t(o),i(!1)},className:Nn("",e),ref:r})});Hu.displayName="DialogClose";const fb=O.forwardRef(({className:e,...t},n)=>{const{open:r}=Ec();return S.jsx("div",{...t,"data-state":r?"open":"closed",className:Nn("flex flex-col space-y-1.5 text-center sm:text-left",e),ref:n})});fb.displayName="DialogHeader";function sI(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ttypeof e=="boolean"?"".concat(e):e===0?"0":e,rE=t0e,n0e=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return rE(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:o}=t,s=Object.keys(i).map(u=>{const c=n==null?void 0:n[u],f=o==null?void 0:o[u];if(c===null)return null;const p=nE(c)||nE(f);return i[u][p]}),a=n&&Object.entries(n).reduce((u,c)=>{let[f,p]=c;return p===void 0||(u[f]=p),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:f,className:p,...d}=c;return Object.entries(d).every(h=>{let[g,y]=h;return Array.isArray(y)?y.includes({...o,...a}[g]):{...o,...a}[g]===y})?[...u,f,p]:u},[]);return rE(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},r0e=n0e("inline-flex items-center justify-center font-medium whitespace-nowrap rounded-md text-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-rose-500 text-white shadow-sm hover:bg-rose-300",outline:"border border-accent bg-white shadow-sm",secondary:"bg-gray-400 text-white shadow-sm",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Wu=O.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},o)=>{const s=r?zw:"button";return S.jsx(s,{className:Nn(r0e({variant:t,size:n,className:e})),ref:o,...i})});Wu.displayName="Button";var aI={exports:{}},lI={};/** +`))}function l(d,h,g,y){const m=g.enter("tableCell"),v=g.enter("phrasing"),w=eI(d,g,{...y,before:o,after:o});return v(),m(),w}function u(d,h){return Eye(d,{align:h,alignDelimiters:r,padding:n,stringLength:i})}function c(d,h,g){const y=d.children;let m=-1;const v=[],w=h.enter("table");for(;++m-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const a=n.createTracker(r);a.move(o+" ".repeat(s-o.length)),a.shift(s);const l=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,a.current()),c);return l(),u;function c(f,p,d){return p?(d?"":" ".repeat(s))+f:(d?o:o+" ".repeat(s-o.length))+f}}const Lye={exit:{taskListCheckValueChecked:tE,taskListCheckValueUnchecked:tE,paragraph:Bye}},zye={unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Uye}};function tE(e){const t=this.stack[this.stack.length-2];t.checked=e.type==="taskListCheckValueChecked"}function Bye(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1],r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,s;for(;++othis.register(r)),this.components.length===0)throw new Error("No components registered");if(!this.get("FALLBACK"))throw new Error("No fallback component registered")}register(t){const n=this.components.findIndex(r=>r.key===t.key);return n!==-1?this.components[n]=t:this.components.push(t),this}get(t){const n=this.components.find(r=>r.key===t);return n||null}getOrFallback(t){return t?this.get(t)||this.get("FALLBACK"):this.get("FALLBACK")}getComponent(t,n){var r;return n?this.getOrFallback(t).component:(r=this.get(t))==null?void 0:r.component}}const[_c,Gye]=ks();function Yye(e){const{token:t,components:n}=wr(),{sessionId:r}=_v(t),{__socket:i}=nc(),o=O.useMemo(()=>new Kye({components:n}),[n]),s=O.useMemo(()=>new TL(r),[r]);return O.useEffect(()=>s.socketChatInfoHandler(i),[i,s]),O.useEffect(()=>s.socketChatVoteHandler(i),[i,s]),O.useEffect(()=>s.socketMessageRespHandler(i),[i,s]),O.useEffect(()=>s.socketUiHandler(i),[i,s]),S.jsx(Gye,{value:{__handler:s,__components:o},...e})}function Dh(){const{__handler:e}=_c();return O.useSyncExternalStore(e.subscribe,e.getSnapshot)}function Xye(){const{__handler:e}=_c();return O.useSyncExternalStore(e.subscribe,e.isLoading)}function rI(){const{__handler:e}=_c(),{headers:t,token:n,queryParams:r}=wr(),i=nc();function o(s){e.handleTextMessage({headers:t??{},query_params:r??{},content:s,bot_token:n},i.__socket)}return{send:o}}const Qye=$M("version"),Jye={"--opencopilot-primary-clr":"hsl(200 18% 46%)","--opencopilot-accent-clr":"hsl(300, 7%, 97%)"};function Zye({children:e,options:t,containerProps:n}){const{style:r,...i}=n||{};return S.jsxs(eM.div,{...i,"data-version":Qye,style:{width:"100%",height:"100%",pointerEvents:"none",...Jye,...r},children:[S.jsx(tj,{data:t,children:S.jsx(lM,{children:S.jsx(ij,{children:S.jsx(EL,{children:S.jsx(Yye,{children:S.jsx(T3,{children:e})})})})})}),S.jsx("style",{children:tM})]})}const[Ec,e0e]=ks();function iI({children:e,...t}){const[n,r]=O.useState(t.open||!1);function i(o){var s;r(o),(s=t.onOpenChange)==null||s.call(t,o)}return S.jsx(e0e,{value:{open:n,set:i},children:e})}const ub=O.forwardRef(({className:e,onClick:t,...n},r)=>{const{set:i,open:o}=Ec();return S.jsx("button",{"data-state":o?"open":"closed",onClick:s=>{t==null||t(s),i(!0)},className:Nn("",e),ref:r,...n})});ub.displayName="DialogTrigger";const oI=O.forwardRef(({className:e,...t},n)=>{const{open:r}=Ec();return S.jsx("div",{...t,"data-state":r?"open":"closed",className:Nn("absolute flex items-center justify-center overflow-hidden inset-0 z-50 bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),ref:n})});oI.displayName="DialogOverlay";const cb=O.forwardRef(({className:e,...t},n)=>{const{open:r}=Ec();return r&&S.jsx(oI,{children:S.jsx("div",{...t,"data-state":r?"open":"closed",className:Nn("rounded-lg z-[100] w-full grid max-w-[70%] min-w-fit bg-white gap-2 shadow-lg p-4 animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom-3",e),ref:n})})});cb.displayName="DialogContent";const Hu=O.forwardRef(({className:e,onClick:t,...n},r)=>{const{set:i}=Ec();return S.jsx("button",{...n,onClick:o=>{t==null||t(o),i(!1)},className:Nn("",e),ref:r})});Hu.displayName="DialogClose";const fb=O.forwardRef(({className:e,...t},n)=>{const{open:r}=Ec();return S.jsx("div",{...t,"data-state":r?"open":"closed",className:Nn("flex flex-col space-y-1.5 text-center sm:text-left",e),ref:n})});fb.displayName="DialogHeader";function sI(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ttypeof e=="boolean"?"".concat(e):e===0?"0":e,rE=t0e,n0e=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return rE(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:o}=t,s=Object.keys(i).map(u=>{const c=n==null?void 0:n[u],f=o==null?void 0:o[u];if(c===null)return null;const p=nE(c)||nE(f);return i[u][p]}),a=n&&Object.entries(n).reduce((u,c)=>{let[f,p]=c;return p===void 0||(u[f]=p),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:f,className:p,...d}=c;return Object.entries(d).every(h=>{let[g,y]=h;return Array.isArray(y)?y.includes({...o,...a}[g]):{...o,...a}[g]===y})?[...u,f,p]:u},[]);return rE(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},r0e=n0e("inline-flex items-center justify-center font-medium whitespace-nowrap rounded-md text-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-rose-500 text-white shadow-sm hover:bg-rose-300",outline:"border border-accent bg-white shadow-sm",secondary:"bg-gray-400 text-white shadow-sm",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Wu=O.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},o)=>{const s=r?zw:"button";return S.jsx(s,{className:Nn(r0e({variant:t,size:n,className:e})),ref:o,...i})});Wu.displayName="Button";var aI={exports:{}},lI={};/** * @license React * use-sync-external-store-shim.production.min.js * From e4704a3b6552d973d25480501296fa9a7ecc955c Mon Sep 17 00:00:00 2001 From: ah7255703 Date: Tue, 12 Mar 2024 20:20:38 +0200 Subject: [PATCH 3/4] Release 2.8.5 --- copilot-widget/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/copilot-widget/package.json b/copilot-widget/package.json index 2f13bc9de..1372af253 100644 --- a/copilot-widget/package.json +++ b/copilot-widget/package.json @@ -1,7 +1,7 @@ { "name": "@openchatai/copilot-widget", "private": false, - "version": "2.8.4", + "version": "2.8.5", "type": "module", "scripts": { "dev": "vite", From 5cf28b4f7568490fa64c24374afcc0a2aa4f4572 Mon Sep 17 00:00:00 2001 From: ah7255703 Date: Tue, 12 Mar 2024 20:21:22 +0200 Subject: [PATCH 4/4] fix: Update "@openchatai/copilot-widget" to version 2.8.5 --- dashboard/package.json | 2 +- dashboard/pnpm-lock.yaml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dashboard/package.json b/dashboard/package.json index dd808dc86..d95a47ba2 100644 --- a/dashboard/package.json +++ b/dashboard/package.json @@ -13,7 +13,7 @@ "dependencies": { "@hookform/resolvers": "^3.3.1", "@kbox-labs/react-echarts": "^1.0.3", - "@openchatai/copilot-widget": "^2.8.4", + "@openchatai/copilot-widget": "^2.8.5", "@radix-ui/react-accordion": "^1.1.2", "@radix-ui/react-alert-dialog": "^1.0.5", "@radix-ui/react-avatar": "^1.0.4", diff --git a/dashboard/pnpm-lock.yaml b/dashboard/pnpm-lock.yaml index c48c3809e..1169816ad 100644 --- a/dashboard/pnpm-lock.yaml +++ b/dashboard/pnpm-lock.yaml @@ -12,8 +12,8 @@ dependencies: specifier: ^1.0.3 version: 1.0.3(echarts@5.4.3)(react@18.2.0) '@openchatai/copilot-widget': - specifier: ^2.8.4 - version: 2.8.4(react@18.2.0) + specifier: ^2.8.5 + version: 2.8.5(react@18.2.0) '@radix-ui/react-accordion': specifier: ^1.1.2 version: 1.1.2(@types/react-dom@18.2.13)(@types/react@18.2.28)(react-dom@18.2.0)(react@18.2.0) @@ -706,8 +706,8 @@ packages: '@nodelib/fs.scandir': 2.1.5 fastq: 1.15.0 - /@openchatai/copilot-widget@2.8.4(react@18.2.0): - resolution: {integrity: sha512-8L9FctUp9SCz+90Wm6fhvGHlMlx7537ui/+Fy/1sstCOlOxJ1zlNYrPE2UCgG3E1Z3QAx30cinaD+UZl0Yh5fQ==} + /@openchatai/copilot-widget@2.8.5(react@18.2.0): + resolution: {integrity: sha512-d+HFsb3FFx5Jse5XZkNghIWMvJZMeBO6t2wriI9WmEkDOis8IIrsQtVQYAOj7IqiQEEBtCjbG5xteuw5D82LfQ==} peerDependencies: react: ^18.x dependencies: