@botpress/webchat 2.5.0 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/.storybook/main.ts +6 -1
  2. package/.turbo/turbo-build.log +12 -9
  3. package/dist/index.d.ts +14197 -15
  4. package/dist/index.js +11228 -10200
  5. package/dist/index.umd.cjs +72 -68
  6. package/dist/style.css +1 -1
  7. package/package.json +4 -2
  8. package/dist/adapters/index.d.ts +0 -2
  9. package/dist/adapters/target.d.ts +0 -83
  10. package/dist/adapters/typings.d.ts +0 -7
  11. package/dist/adapters/webchat-to-target.d.ts +0 -8
  12. package/dist/adapters/webchat.d.ts +0 -5
  13. package/dist/client/client.d.ts +0 -37
  14. package/dist/client/index.d.ts +0 -4
  15. package/dist/client/legacyClient.d.ts +0 -55
  16. package/dist/client/state-machine.d.ts +0 -40
  17. package/dist/client/types.d.ts +0 -35
  18. package/dist/components/Avatar.d.ts +0 -8
  19. package/dist/components/Block.d.ts +0 -9
  20. package/dist/components/Chat.d.ts +0 -30
  21. package/dist/components/CloseWindowButton.d.ts +0 -7
  22. package/dist/components/Composer/Composer.d.ts +0 -18
  23. package/dist/components/Composer/index.d.ts +0 -1
  24. package/dist/components/Composer/parts/FileAttachment.d.ts +0 -11
  25. package/dist/components/Composer/parts/FileInputButton.d.ts +0 -7
  26. package/dist/components/Composer/parts/SpeechRecognition.d.ts +0 -6
  27. package/dist/components/Composer/parts/TextInput.d.ts +0 -13
  28. package/dist/components/Composer/parts/index.d.ts +0 -4
  29. package/dist/components/Container/Container.d.ts +0 -16
  30. package/dist/components/Container/index.d.ts +0 -1
  31. package/dist/components/Fab/Fab.d.ts +0 -1
  32. package/dist/components/Fab/index.d.ts +0 -1
  33. package/dist/components/Header/Header.d.ts +0 -12
  34. package/dist/components/Header/index.d.ts +0 -1
  35. package/dist/components/Loader/Loader.d.ts +0 -5
  36. package/dist/components/Loader/index.d.ts +0 -1
  37. package/dist/components/Marquee/Marquee.d.ts +0 -7
  38. package/dist/components/Marquee/index.d.ts +0 -1
  39. package/dist/components/Message/Message.d.ts +0 -12
  40. package/dist/components/Message/index.d.ts +0 -1
  41. package/dist/components/MessageList/MessageList.d.ts +0 -16
  42. package/dist/components/MessageList/index.d.ts +0 -1
  43. package/dist/components/Modal/Modal.d.ts +0 -17
  44. package/dist/components/Modal/index.d.ts +0 -1
  45. package/dist/components/RestartConversationButton.d.ts +0 -7
  46. package/dist/components/TypingIndicator/TypingIndicator.d.ts +0 -2
  47. package/dist/components/TypingIndicator/index.d.ts +0 -1
  48. package/dist/components/Webchat.d.ts +0 -13
  49. package/dist/components/index.d.ts +0 -14
  50. package/dist/components/renderers/Audio/Audio.d.ts +0 -6
  51. package/dist/components/renderers/Audio/index.d.ts +0 -1
  52. package/dist/components/renderers/Bubble/Bubble.d.ts +0 -5
  53. package/dist/components/renderers/Bubble/index.d.ts +0 -1
  54. package/dist/components/renderers/Button/Button.d.ts +0 -4
  55. package/dist/components/renderers/Button/index.d.ts +0 -1
  56. package/dist/components/renderers/Carousel/Carousel.d.ts +0 -6
  57. package/dist/components/renderers/Carousel/index.d.ts +0 -1
  58. package/dist/components/renderers/Column/Column.d.ts +0 -5
  59. package/dist/components/renderers/Column/index.d.ts +0 -1
  60. package/dist/components/renderers/Custom/Custom.d.ts +0 -14
  61. package/dist/components/renderers/Custom/index.d.ts +0 -1
  62. package/dist/components/renderers/Dropdown/Dropdown.d.ts +0 -5
  63. package/dist/components/renderers/Dropdown/index.d.ts +0 -1
  64. package/dist/components/renderers/File/File.d.ts +0 -6
  65. package/dist/components/renderers/File/index.d.ts +0 -1
  66. package/dist/components/renderers/Image/Image.d.ts +0 -6
  67. package/dist/components/renderers/Image/index.d.ts +0 -1
  68. package/dist/components/renderers/Location/Location.d.ts +0 -6
  69. package/dist/components/renderers/Location/index.d.ts +0 -1
  70. package/dist/components/renderers/Row/Row.d.ts +0 -5
  71. package/dist/components/renderers/Row/index.d.ts +0 -1
  72. package/dist/components/renderers/Text/Text.d.ts +0 -4
  73. package/dist/components/renderers/Text/index.d.ts +0 -1
  74. package/dist/components/renderers/Video/Video.d.ts +0 -6
  75. package/dist/components/renderers/Video/index.d.ts +0 -1
  76. package/dist/components/renderers/index.d.ts +0 -2
  77. package/dist/contexts/MessageContext.d.ts +0 -8
  78. package/dist/contexts/ModalContext.d.ts +0 -14
  79. package/dist/contexts/index.d.ts +0 -2
  80. package/dist/gen/client/errors.d.ts +0 -211
  81. package/dist/gen/client/index.d.ts +0 -71
  82. package/dist/gen/client/models.d.ts +0 -259
  83. package/dist/gen/client/operations/addParticipant.d.ts +0 -57
  84. package/dist/gen/client/operations/createConversation.d.ts +0 -39
  85. package/dist/gen/client/operations/createEvent.d.ts +0 -79
  86. package/dist/gen/client/operations/createFile.d.ts +0 -65
  87. package/dist/gen/client/operations/createMessage.d.ts +0 -324
  88. package/dist/gen/client/operations/createUser.d.ts +0 -66
  89. package/dist/gen/client/operations/deleteConversation.d.ts +0 -22
  90. package/dist/gen/client/operations/deleteMessage.d.ts +0 -22
  91. package/dist/gen/client/operations/deleteUser.d.ts +0 -21
  92. package/dist/gen/client/operations/getConversation.d.ts +0 -36
  93. package/dist/gen/client/operations/getEvent.d.ts +0 -58
  94. package/dist/gen/client/operations/getMessage.d.ts +0 -182
  95. package/dist/gen/client/operations/getParticipant.d.ts +0 -54
  96. package/dist/gen/client/operations/getUser.d.ts +0 -52
  97. package/dist/gen/client/operations/listConversationMessages.d.ts +0 -186
  98. package/dist/gen/client/operations/listConversations.d.ts +0 -42
  99. package/dist/gen/client/operations/listParticipants.d.ts +0 -57
  100. package/dist/gen/client/operations/listenConversation.d.ts +0 -22
  101. package/dist/gen/client/operations/removeParticipant.d.ts +0 -23
  102. package/dist/gen/client/operations/updateUser.d.ts +0 -66
  103. package/dist/gen/client/to-axios.d.ts +0 -16
  104. package/dist/gen/signals/custom.t.d.ts +0 -8
  105. package/dist/gen/signals/custom.z.d.ts +0 -22
  106. package/dist/gen/signals/index.d.ts +0 -1035
  107. package/dist/gen/signals/messageCreated.t.d.ts +0 -163
  108. package/dist/gen/signals/messageCreated.z.d.ts +0 -930
  109. package/dist/gen/signals/typingStarted.t.d.ts +0 -6
  110. package/dist/gen/signals/typingStarted.z.d.ts +0 -22
  111. package/dist/gen/signals/typingStopped.t.d.ts +0 -4
  112. package/dist/gen/signals/typingStopped.z.d.ts +0 -12
  113. package/dist/gen/signals/webchatConfig.t.d.ts +0 -8
  114. package/dist/gen/signals/webchatConfig.z.d.ts +0 -22
  115. package/dist/gen/signals/webchatVisibility.t.d.ts +0 -6
  116. package/dist/gen/signals/webchatVisibility.z.d.ts +0 -22
  117. package/dist/get-client.d.ts +0 -7
  118. package/dist/hooks/index.d.ts +0 -5
  119. package/dist/hooks/useClient.d.ts +0 -6
  120. package/dist/hooks/useImageSize.d.ts +0 -2
  121. package/dist/hooks/useIsTyping.d.ts +0 -4
  122. package/dist/hooks/useRefresh.d.ts +0 -10
  123. package/dist/hooks/useWebchatClient.d.ts +0 -50
  124. package/dist/providers/ModalProvider.d.ts +0 -8
  125. package/dist/providers/StylesheetProvider.d.ts +0 -4
  126. package/dist/providers/index.d.ts +0 -2
  127. package/dist/schemas/configuration.d.ts +0 -157
  128. package/dist/schemas/index.d.ts +0 -3
  129. package/dist/schemas/init.d.ts +0 -8487
  130. package/dist/schemas/theme.d.ts +0 -4358
  131. package/dist/stores/composerFileStore.d.ts +0 -21
  132. package/dist/stores/customComponentsStore.d.ts +0 -9
  133. package/dist/stores/index.d.ts +0 -5
  134. package/dist/stores/messageHistoryStore.d.ts +0 -20
  135. package/dist/stores/messagesStore.d.ts +0 -21
  136. package/dist/stores/userStore.d.ts +0 -32
  137. package/dist/stores/webchatStore.d.ts +0 -13
  138. package/dist/stories/Messages/Audio.stories.d.ts +0 -6
  139. package/dist/stories/Messages/Bloc.stories.d.ts +0 -6
  140. package/dist/stories/Messages/Card.stories.d.ts +0 -6
  141. package/dist/stories/Messages/Carousel.stories.d.ts +0 -6
  142. package/dist/stories/Messages/Choice.stories.d.ts +0 -6
  143. package/dist/stories/Messages/Custom.stories.d.ts +0 -12
  144. package/dist/stories/Messages/Dropdown.stories.d.ts +0 -6
  145. package/dist/stories/Messages/File.stories.d.ts +0 -6
  146. package/dist/stories/Messages/FileAttachmentCard.stories.d.ts +0 -6
  147. package/dist/stories/Messages/Image.stories.d.ts +0 -6
  148. package/dist/stories/Messages/Location.stories.d.ts +0 -6
  149. package/dist/stories/Messages/Text.stories.d.ts +0 -6
  150. package/dist/stories/Messages/Video.stories.d.ts +0 -6
  151. package/dist/styles/classes.d.ts +0 -410
  152. package/dist/styles/index.d.ts +0 -1
  153. package/dist/types/block-type.d.ts +0 -58
  154. package/dist/types/configuration.d.ts +0 -5
  155. package/dist/types/image.d.ts +0 -11
  156. package/dist/types/index.d.ts +0 -5
  157. package/dist/types/init.d.ts +0 -6
  158. package/dist/types/theme.d.ts +0 -7
  159. package/dist/utils/colors.d.ts +0 -21
  160. package/dist/utils/colors.test.d.ts +0 -1
  161. package/dist/utils/eventEmitter.d.ts +0 -12
  162. package/dist/utils/generateCSS.d.ts +0 -1
  163. package/dist/utils/hashStringToInt.d.ts +0 -1
  164. package/dist/utils/images.d.ts +0 -2
  165. package/dist/utils/index.d.ts +0 -7
  166. package/dist/utils/message.d.ts +0 -8
  167. package/dist/utils/message.test.d.ts +0 -1
  168. package/dist/utils/theme.d.ts +0 -2
@@ -1,4 +1,4 @@
1
- (function(Pe,j){typeof exports=="object"&&typeof module<"u"?j(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],j):(Pe=typeof globalThis<"u"?globalThis:Pe||self,j(Pe.Webchat={},Pe.React,Pe.ReactDOM))})(this,function(Pe,j,_i){"use strict";var vue=Object.defineProperty;var yue=(Pe,j,_i)=>j in Pe?vue(Pe,j,{enumerable:!0,configurable:!0,writable:!0,value:_i}):Pe[j]=_i;var Te=(Pe,j,_i)=>yue(Pe,typeof j!="symbol"?j+"":j,_i);function By(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const x=By(j),Uy=By(_i),I$=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));let dl;const R$=new Uint8Array(16);function A$(){if(!dl&&(dl=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!dl))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return dl(R$)}const Yt=[];for(let e=0;e<256;++e)Yt.push((e+256).toString(16).slice(1));function P$(e,t=0){return Yt[e[t+0]]+Yt[e[t+1]]+Yt[e[t+2]]+Yt[e[t+3]]+"-"+Yt[e[t+4]]+Yt[e[t+5]]+"-"+Yt[e[t+6]]+Yt[e[t+7]]+"-"+Yt[e[t+8]]+Yt[e[t+9]]+"-"+Yt[e[t+10]]+Yt[e[t+11]]+Yt[e[t+12]]+Yt[e[t+13]]+Yt[e[t+14]]+Yt[e[t+15]]}const zy={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function qy(e,t,n){if(zy.randomUUID&&!t&&!e)return zy.randomUUID();e=e||{};const r=e.random||(e.rng||A$)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,P$(r)}const fo=e=>({block:e,type:"bubble"}),Wy=e=>{const t=e.title,n=e.subtitle,r=e.imageUrl,i=e.actions.map(o=>{switch(o.action){case"postback":return{type:"button",variant:"action",text:o.label,buttonValue:o.value,reusable:!0};case"url":return{type:"button",variant:"link",text:o.label,buttonValue:o.value,reusable:!0};case"say":return{type:"button",variant:"action",text:o.label,buttonValue:o.value,reusable:!0};default:throw new Error(`Unknown action type ${o.action}`)}}),a=[];return r&&a.push({type:"image",url:r}),t&&a.push({type:"text",text:`## ${t}`}),n&&a.push({type:"text",text:n}),i.length>0&&a.push({type:"row",blocks:i}),{type:"column",horizontalAlignment:"center",blocks:[...a]}},Vy=e=>({payload:{type:"audio",url:e.audioUrl}}),D$=e=>({payload:fo(Wy(e))}),j$=e=>({payload:{type:"carousel",blocks:e.items.map(t=>Wy(t))}}),N$=e=>{const t=e.options.map(a=>({title:a.label,value:a.value})),n=e.text,r=qy(),i=fo({type:"text",text:n});return t.length===0?{disableInput:e.disableFreeText,payload:i}:{disableInput:e.disableFreeText,payload:{type:"column",horizontalAlignment:"left",blocks:[i,{type:"row",blocks:t.map(({title:a,value:o})=>({type:"button",variant:"action",text:a,buttonValue:o,groupId:r}))}]}}},M$=e=>{const t=e.options.map(i=>({label:i.label,value:i.value})),n=e.text,r=[{type:"dropdown",label:n??"Select an option",options:t}];return n&&r.unshift({type:"text",text:n}),{disableInput:!0,payload:fo({type:"column",blocks:r})}},Hy=e=>({payload:{type:"file",url:e.fileUrl,title:e.title}}),Zy=e=>({payload:{type:"image",url:e.imageUrl}}),Ky=e=>({payload:{type:"location",latitude:e.latitude,longitude:e.longitude,title:e.title??e.address??"View on map"}}),Gy=e=>({payload:fo({type:"text",text:e.markdown})}),Yy=e=>({payload:fo({type:"text",text:e.text,value:e.value})}),Jy=e=>({payload:{type:"video",url:e.videoUrl}}),F$=e=>({payload:{type:"column",blocks:e.items.map(n=>{switch(n.type){case"audio":return Vy({...n.payload,type:n.type}).payload;case"file":return Hy({...n.payload,type:n.type}).payload;case"image":return Zy({...n.payload,type:n.type}).payload;case"location":return Ky({...n.payload,type:n.type}).payload;case"markdown":return Gy({...n.payload,type:n.type}).payload;case"text":return Yy({...n.payload,type:n.type}).payload;case"video":return Jy({...n.payload,type:n.type}).payload;default:throw new Error("Unsuported message type")}})}}),bf=e=>{switch(e.type){case"audio":return Vy(e);case"card":return D$(e);case"carousel":return j$(e);case"choice":return N$(e);case"dropdown":return M$(e);case"file":return Hy(e);case"image":return Zy(e);case"location":return Ky(e);case"markdown":return Gy(e);case"text":return Yy(e);case"video":return Jy(e);case"bloc":return F$(e);case"custom":return{payload:e};default:throw new Error("Unsuported message type")}},L$=Object.freeze(Object.defineProperty({__proto__:null,target:I$,webchatToTarget:Object.freeze(Object.defineProperty({__proto__:null,messageAdapter:bf},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));var mt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ge(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function B$(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var wf={exports:{}},po={};/**
1
+ (function(Re,j){typeof exports=="object"&&typeof module<"u"?j(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],j):(Re=typeof globalThis<"u"?globalThis:Re||self,j(Re.Webchat={},Re.React,Re.ReactDOM))})(this,function(Re,j,ji){"use strict";var ife=Object.defineProperty;var afe=(Re,j,ji)=>j in Re?ife(Re,j,{enumerable:!0,configurable:!0,writable:!0,value:ji}):Re[j]=ji;var _e=(Re,j,ji)=>afe(Re,typeof j!="symbol"?j+"":j,ji);function Eg(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const x=Eg(j),_g=Eg(ji);var vt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ge(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function CI(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Wf={exports:{}},Oo={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Xy;function U$(){if(Xy)return po;Xy=1;var e=j,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(s,u,l){var c,f={},p=null,d=null;l!==void 0&&(p=""+l),u.key!==void 0&&(p=""+u.key),u.ref!==void 0&&(d=u.ref);for(c in u)r.call(u,c)&&!a.hasOwnProperty(c)&&(f[c]=u[c]);if(s&&s.defaultProps)for(c in u=s.defaultProps,u)f[c]===void 0&&(f[c]=u[c]);return{$$typeof:t,type:s,key:p,ref:d,props:f,_owner:i.current}}return po.Fragment=n,po.jsx=o,po.jsxs=o,po}var ho={};/**
9
+ */var kg;function OI(){if(kg)return Oo;kg=1;var e=j,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(s,u,l){var c,f={},d=null,p=null;l!==void 0&&(d=""+l),u.key!==void 0&&(d=""+u.key),u.ref!==void 0&&(p=u.ref);for(c in u)r.call(u,c)&&!a.hasOwnProperty(c)&&(f[c]=u[c]);if(s&&s.defaultProps)for(c in u=s.defaultProps,u)f[c]===void 0&&(f[c]=u[c]);return{$$typeof:t,type:s,key:d,ref:p,props:f,_owner:i.current}}return Oo.Fragment=n,Oo.jsx=o,Oo.jsxs=o,Oo}var $o={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,47 +14,47 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Qy;function z$(){return Qy||(Qy=1,process.env.NODE_ENV!=="production"&&function(){var e=j,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),d=Symbol.for("react.offscreen"),m=Symbol.iterator,h="@@iterator";function y(R){if(R===null||typeof R!="object")return null;var le=m&&R[m]||R[h];return typeof le=="function"?le:null}var v=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(R){{for(var le=arguments.length,be=new Array(le>1?le-1:0),Fe=1;Fe<le;Fe++)be[Fe-1]=arguments[Fe];w("error",R,be)}}function w(R,le,be){{var Fe=v.ReactDebugCurrentFrame,dt=Fe.getStackAddendum();dt!==""&&(le+="%s",be=be.concat([dt]));var bt=be.map(function(rt){return String(rt)});bt.unshift("Warning: "+le),Function.prototype.apply.call(console[R],console,bt)}}var k=!1,E=!1,_=!1,C=!1,z=!1,B;B=Symbol.for("react.module.reference");function T(R){return!!(typeof R=="string"||typeof R=="function"||R===r||R===a||z||R===i||R===l||R===c||C||R===d||k||E||_||typeof R=="object"&&R!==null&&(R.$$typeof===p||R.$$typeof===f||R.$$typeof===o||R.$$typeof===s||R.$$typeof===u||R.$$typeof===B||R.getModuleId!==void 0))}function A(R,le,be){var Fe=R.displayName;if(Fe)return Fe;var dt=le.displayName||le.name||"";return dt!==""?be+"("+dt+")":be}function W(R){return R.displayName||"Context"}function F(R){if(R==null)return null;if(typeof R.tag=="number"&&b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof R=="function")return R.displayName||R.name||null;if(typeof R=="string")return R;switch(R){case r:return"Fragment";case n:return"Portal";case a:return"Profiler";case i:return"StrictMode";case l:return"Suspense";case c:return"SuspenseList"}if(typeof R=="object")switch(R.$$typeof){case s:var le=R;return W(le)+".Consumer";case o:var be=R;return W(be._context)+".Provider";case u:return A(R,R.render,"ForwardRef");case f:var Fe=R.displayName||null;return Fe!==null?Fe:F(R.type)||"Memo";case p:{var dt=R,bt=dt._payload,rt=dt._init;try{return F(rt(bt))}catch{return null}}}return null}var L=Object.assign,N=0,q,Y,H,I,g,P,V;function S(){}S.__reactDisabledLog=!0;function Z(){{if(N===0){q=console.log,Y=console.info,H=console.warn,I=console.error,g=console.group,P=console.groupCollapsed,V=console.groupEnd;var R={configurable:!0,enumerable:!0,value:S,writable:!0};Object.defineProperties(console,{info:R,log:R,warn:R,error:R,group:R,groupCollapsed:R,groupEnd:R})}N++}}function J(){{if(N--,N===0){var R={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:L({},R,{value:q}),info:L({},R,{value:Y}),warn:L({},R,{value:H}),error:L({},R,{value:I}),group:L({},R,{value:g}),groupCollapsed:L({},R,{value:P}),groupEnd:L({},R,{value:V})})}N<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var G=v.ReactCurrentDispatcher,X;function ae(R,le,be){{if(X===void 0)try{throw Error()}catch(dt){var Fe=dt.stack.trim().match(/\n( *(at )?)/);X=Fe&&Fe[1]||""}return`
18
- `+X+R}}var se=!1,Q;{var ee=typeof WeakMap=="function"?WeakMap:Map;Q=new ee}function K(R,le){if(!R||se)return"";{var be=Q.get(R);if(be!==void 0)return be}var Fe;se=!0;var dt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var bt;bt=G.current,G.current=null,Z();try{if(le){var rt=function(){throw Error()};if(Object.defineProperty(rt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(rt,[])}catch(Sn){Fe=Sn}Reflect.construct(R,[],rt)}else{try{rt.call()}catch(Sn){Fe=Sn}R.call(rt.prototype)}}else{try{throw Error()}catch(Sn){Fe=Sn}R()}}catch(Sn){if(Sn&&Fe&&typeof Sn.stack=="string"){for(var Xe=Sn.stack.split(`
19
- `),hn=Fe.stack.split(`
20
- `),Dt=Xe.length-1,Lt=hn.length-1;Dt>=1&&Lt>=0&&Xe[Dt]!==hn[Lt];)Lt--;for(;Dt>=1&&Lt>=0;Dt--,Lt--)if(Xe[Dt]!==hn[Lt]){if(Dt!==1||Lt!==1)do if(Dt--,Lt--,Lt<0||Xe[Dt]!==hn[Lt]){var Un=`
21
- `+Xe[Dt].replace(" at new "," at ");return R.displayName&&Un.includes("<anonymous>")&&(Un=Un.replace("<anonymous>",R.displayName)),typeof R=="function"&&Q.set(R,Un),Un}while(Dt>=1&&Lt>=0);break}}}finally{se=!1,G.current=bt,J(),Error.prepareStackTrace=dt}var co=R?R.displayName||R.name:"",Ji=co?ae(co):"";return typeof R=="function"&&Q.set(R,Ji),Ji}function pe(R,le,be){return K(R,!1)}function ge(R){var le=R.prototype;return!!(le&&le.isReactComponent)}function Ie(R,le,be){if(R==null)return"";if(typeof R=="function")return K(R,ge(R));if(typeof R=="string")return ae(R);switch(R){case l:return ae("Suspense");case c:return ae("SuspenseList")}if(typeof R=="object")switch(R.$$typeof){case u:return pe(R.render);case f:return Ie(R.type,le,be);case p:{var Fe=R,dt=Fe._payload,bt=Fe._init;try{return Ie(bt(dt),le,be)}catch{}}}return""}var M=Object.prototype.hasOwnProperty,ie={},ce=v.ReactDebugCurrentFrame;function oe(R){if(R){var le=R._owner,be=Ie(R.type,R._source,le?le.type:null);ce.setExtraStackFrame(be)}else ce.setExtraStackFrame(null)}function Oe(R,le,be,Fe,dt){{var bt=Function.call.bind(M);for(var rt in R)if(bt(R,rt)){var Xe=void 0;try{if(typeof R[rt]!="function"){var hn=Error((Fe||"React class")+": "+be+" type `"+rt+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof R[rt]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw hn.name="Invariant Violation",hn}Xe=R[rt](le,rt,Fe,be,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Dt){Xe=Dt}Xe&&!(Xe instanceof Error)&&(oe(dt),b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Fe||"React class",be,rt,typeof Xe),oe(null)),Xe instanceof Error&&!(Xe.message in ie)&&(ie[Xe.message]=!0,oe(dt),b("Failed %s type: %s",be,Xe.message),oe(null))}}}var Ee=Array.isArray;function Re(R){return Ee(R)}function He(R){{var le=typeof Symbol=="function"&&Symbol.toStringTag,be=le&&R[Symbol.toStringTag]||R.constructor.name||"Object";return be}}function te(R){try{return fe(R),!1}catch{return!0}}function fe(R){return""+R}function U(R){if(te(R))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",He(R)),fe(R)}var D=v.ReactCurrentOwner,ne={key:!0,ref:!0,__self:!0,__source:!0},he,Se,$e;$e={};function Ze(R){if(M.call(R,"ref")){var le=Object.getOwnPropertyDescriptor(R,"ref").get;if(le&&le.isReactWarning)return!1}return R.ref!==void 0}function Qe(R){if(M.call(R,"key")){var le=Object.getOwnPropertyDescriptor(R,"key").get;if(le&&le.isReactWarning)return!1}return R.key!==void 0}function _t(R,le){if(typeof R.ref=="string"&&D.current&&le&&D.current.stateNode!==le){var be=F(D.current.type);$e[be]||(b('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',F(D.current.type),R.ref),$e[be]=!0)}}function St(R,le){{var be=function(){he||(he=!0,b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",le))};be.isReactWarning=!0,Object.defineProperty(R,"key",{get:be,configurable:!0})}}function qe(R,le){{var be=function(){Se||(Se=!0,b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",le))};be.isReactWarning=!0,Object.defineProperty(R,"ref",{get:be,configurable:!0})}}var Et=function(R,le,be,Fe,dt,bt,rt){var Xe={$$typeof:t,type:R,key:le,ref:be,props:rt,_owner:bt};return Xe._store={},Object.defineProperty(Xe._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Xe,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Fe}),Object.defineProperty(Xe,"_source",{configurable:!1,enumerable:!1,writable:!1,value:dt}),Object.freeze&&(Object.freeze(Xe.props),Object.freeze(Xe)),Xe};function Ke(R,le,be,Fe,dt){{var bt,rt={},Xe=null,hn=null;be!==void 0&&(U(be),Xe=""+be),Qe(le)&&(U(le.key),Xe=""+le.key),Ze(le)&&(hn=le.ref,_t(le,dt));for(bt in le)M.call(le,bt)&&!ne.hasOwnProperty(bt)&&(rt[bt]=le[bt]);if(R&&R.defaultProps){var Dt=R.defaultProps;for(bt in Dt)rt[bt]===void 0&&(rt[bt]=Dt[bt])}if(Xe||hn){var Lt=typeof R=="function"?R.displayName||R.name||"Unknown":R;Xe&&St(rt,Lt),hn&&qe(rt,Lt)}return Et(R,Xe,hn,dt,Fe,D.current,rt)}}var un=v.ReactCurrentOwner,In=v.ReactDebugCurrentFrame;function ir(R){if(R){var le=R._owner,be=Ie(R.type,R._source,le?le.type:null);In.setExtraStackFrame(be)}else In.setExtraStackFrame(null)}var Hr;Hr=!1;function Rr(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function ar(){{if(un.current){var R=F(un.current.type);if(R)return`
17
+ */var Tg;function $I(){return Tg||(Tg=1,process.env.NODE_ENV!=="production"&&function(){var e=j,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),m=Symbol.iterator,h="@@iterator";function y(P){if(P===null||typeof P!="object")return null;var le=m&&P[m]||P[h];return typeof le=="function"?le:null}var v=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(P){{for(var le=arguments.length,be=new Array(le>1?le-1:0),Fe=1;Fe<le;Fe++)be[Fe-1]=arguments[Fe];w("error",P,be)}}function w(P,le,be){{var Fe=v.ReactDebugCurrentFrame,pt=Fe.getStackAddendum();pt!==""&&(le+="%s",be=be.concat([pt]));var wt=be.map(function(it){return String(it)});wt.unshift("Warning: "+le),Function.prototype.apply.call(console[P],console,wt)}}var T=!1,E=!1,_=!1,O=!1,z=!1,U;U=Symbol.for("react.module.reference");function k(P){return!!(typeof P=="string"||typeof P=="function"||P===r||P===a||z||P===i||P===l||P===c||O||P===p||T||E||_||typeof P=="object"&&P!==null&&(P.$$typeof===d||P.$$typeof===f||P.$$typeof===o||P.$$typeof===s||P.$$typeof===u||P.$$typeof===U||P.getModuleId!==void 0))}function D(P,le,be){var Fe=P.displayName;if(Fe)return Fe;var pt=le.displayName||le.name||"";return pt!==""?be+"("+pt+")":be}function W(P){return P.displayName||"Context"}function B(P){if(P==null)return null;if(typeof P.tag=="number"&&b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof P=="function")return P.displayName||P.name||null;if(typeof P=="string")return P;switch(P){case r:return"Fragment";case n:return"Portal";case a:return"Profiler";case i:return"StrictMode";case l:return"Suspense";case c:return"SuspenseList"}if(typeof P=="object")switch(P.$$typeof){case s:var le=P;return W(le)+".Consumer";case o:var be=P;return W(be._context)+".Provider";case u:return D(P,P.render,"ForwardRef");case f:var Fe=P.displayName||null;return Fe!==null?Fe:B(P.type)||"Memo";case d:{var pt=P,wt=pt._payload,it=pt._init;try{return B(it(wt))}catch{return null}}}return null}var I=Object.assign,A=0,L,Z,H,R,g,N,V;function S(){}S.__reactDisabledLog=!0;function K(){{if(A===0){L=console.log,Z=console.info,H=console.warn,R=console.error,g=console.group,N=console.groupCollapsed,V=console.groupEnd;var P={configurable:!0,enumerable:!0,value:S,writable:!0};Object.defineProperties(console,{info:P,log:P,warn:P,error:P,group:P,groupCollapsed:P,groupEnd:P})}A++}}function J(){{if(A--,A===0){var P={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:I({},P,{value:L}),info:I({},P,{value:Z}),warn:I({},P,{value:H}),error:I({},P,{value:R}),group:I({},P,{value:g}),groupCollapsed:I({},P,{value:N}),groupEnd:I({},P,{value:V})})}A<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Y=v.ReactCurrentDispatcher,Q;function ae(P,le,be){{if(Q===void 0)try{throw Error()}catch(pt){var Fe=pt.stack.trim().match(/\n( *(at )?)/);Q=Fe&&Fe[1]||""}return`
18
+ `+Q+P}}var oe=!1,X;{var ee=typeof WeakMap=="function"?WeakMap:Map;X=new ee}function G(P,le){if(!P||oe)return"";{var be=X.get(P);if(be!==void 0)return be}var Fe;oe=!0;var pt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var wt;wt=Y.current,Y.current=null,K();try{if(le){var it=function(){throw Error()};if(Object.defineProperty(it.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(it,[])}catch(On){Fe=On}Reflect.construct(P,[],it)}else{try{it.call()}catch(On){Fe=On}P.call(it.prototype)}}else{try{throw Error()}catch(On){Fe=On}P()}}catch(On){if(On&&Fe&&typeof On.stack=="string"){for(var Qe=On.stack.split(`
19
+ `),bn=Fe.stack.split(`
20
+ `),Ft=Qe.length-1,qt=bn.length-1;Ft>=1&&qt>=0&&Qe[Ft]!==bn[qt];)qt--;for(;Ft>=1&&qt>=0;Ft--,qt--)if(Qe[Ft]!==bn[qt]){if(Ft!==1||qt!==1)do if(Ft--,qt--,qt<0||Qe[Ft]!==bn[qt]){var Zn=`
21
+ `+Qe[Ft].replace(" at new "," at ");return P.displayName&&Zn.includes("<anonymous>")&&(Zn=Zn.replace("<anonymous>",P.displayName)),typeof P=="function"&&X.set(P,Zn),Zn}while(Ft>=1&&qt>=0);break}}}finally{oe=!1,Y.current=wt,J(),Error.prepareStackTrace=pt}var Co=P?P.displayName||P.name:"",ua=Co?ae(Co):"";return typeof P=="function"&&X.set(P,ua),ua}function pe(P,le,be){return G(P,!1)}function ge(P){var le=P.prototype;return!!(le&&le.isReactComponent)}function Ie(P,le,be){if(P==null)return"";if(typeof P=="function")return G(P,ge(P));if(typeof P=="string")return ae(P);switch(P){case l:return ae("Suspense");case c:return ae("SuspenseList")}if(typeof P=="object")switch(P.$$typeof){case u:return pe(P.render);case f:return Ie(P.type,le,be);case d:{var Fe=P,pt=Fe._payload,wt=Fe._init;try{return Ie(wt(pt),le,be)}catch{}}}return""}var F=Object.prototype.hasOwnProperty,ie={},ce=v.ReactDebugCurrentFrame;function se(P){if(P){var le=P._owner,be=Ie(P.type,P._source,le?le.type:null);ce.setExtraStackFrame(be)}else ce.setExtraStackFrame(null)}function Ce(P,le,be,Fe,pt){{var wt=Function.call.bind(F);for(var it in P)if(wt(P,it)){var Qe=void 0;try{if(typeof P[it]!="function"){var bn=Error((Fe||"React class")+": "+be+" type `"+it+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof P[it]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw bn.name="Invariant Violation",bn}Qe=P[it](le,it,Fe,be,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ft){Qe=Ft}Qe&&!(Qe instanceof Error)&&(se(pt),b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Fe||"React class",be,it,typeof Qe),se(null)),Qe instanceof Error&&!(Qe.message in ie)&&(ie[Qe.message]=!0,se(pt),b("Failed %s type: %s",be,Qe.message),se(null))}}}var Ee=Array.isArray;function Ae(P){return Ee(P)}function He(P){{var le=typeof Symbol=="function"&&Symbol.toStringTag,be=le&&P[Symbol.toStringTag]||P.constructor.name||"Object";return be}}function te(P){try{return fe(P),!1}catch{return!0}}function fe(P){return""+P}function q(P){if(te(P))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",He(P)),fe(P)}var M=v.ReactCurrentOwner,ne={key:!0,ref:!0,__self:!0,__source:!0},he,Se,$e;$e={};function Ze(P){if(F.call(P,"ref")){var le=Object.getOwnPropertyDescriptor(P,"ref").get;if(le&&le.isReactWarning)return!1}return P.ref!==void 0}function et(P){if(F.call(P,"key")){var le=Object.getOwnPropertyDescriptor(P,"key").get;if(le&&le.isReactWarning)return!1}return P.key!==void 0}function Tt(P,le){if(typeof P.ref=="string"&&M.current&&le&&M.current.stateNode!==le){var be=B(M.current.type);$e[be]||(b('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',B(M.current.type),P.ref),$e[be]=!0)}}function Et(P,le){{var be=function(){he||(he=!0,b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",le))};be.isReactWarning=!0,Object.defineProperty(P,"key",{get:be,configurable:!0})}}function qe(P,le){{var be=function(){Se||(Se=!0,b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",le))};be.isReactWarning=!0,Object.defineProperty(P,"ref",{get:be,configurable:!0})}}var _t=function(P,le,be,Fe,pt,wt,it){var Qe={$$typeof:t,type:P,key:le,ref:be,props:it,_owner:wt};return Qe._store={},Object.defineProperty(Qe._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Qe,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Fe}),Object.defineProperty(Qe,"_source",{configurable:!1,enumerable:!1,writable:!1,value:pt}),Object.freeze&&(Object.freeze(Qe.props),Object.freeze(Qe)),Qe};function Ke(P,le,be,Fe,pt){{var wt,it={},Qe=null,bn=null;be!==void 0&&(q(be),Qe=""+be),et(le)&&(q(le.key),Qe=""+le.key),Ze(le)&&(bn=le.ref,Tt(le,pt));for(wt in le)F.call(le,wt)&&!ne.hasOwnProperty(wt)&&(it[wt]=le[wt]);if(P&&P.defaultProps){var Ft=P.defaultProps;for(wt in Ft)it[wt]===void 0&&(it[wt]=Ft[wt])}if(Qe||bn){var qt=typeof P=="function"?P.displayName||P.name||"Unknown":P;Qe&&Et(it,qt),bn&&qe(it,qt)}return _t(P,Qe,bn,pt,Fe,M.current,it)}}var hn=v.ReactCurrentOwner,Nn=v.ReactDebugCurrentFrame;function fr(P){if(P){var le=P._owner,be=Ie(P.type,P._source,le?le.type:null);Nn.setExtraStackFrame(be)}else Nn.setExtraStackFrame(null)}var ti;ti=!1;function Lr(P){return typeof P=="object"&&P!==null&&P.$$typeof===t}function dr(){{if(hn.current){var P=B(hn.current.type);if(P)return`
22
22
 
23
- Check the render method of \``+R+"`."}return""}}function Zr(R){return""}var ht={};function kt(R){{var le=ar();if(!le){var be=typeof R=="string"?R:R.displayName||R.name;be&&(le=`
23
+ Check the render method of \``+P+"`."}return""}}function ni(P){return""}var mt={};function Ct(P){{var le=dr();if(!le){var be=typeof P=="string"?P:P.displayName||P.name;be&&(le=`
24
24
 
25
- Check the top-level render call using <`+be+">.")}return le}}function Wt(R,le){{if(!R._store||R._store.validated||R.key!=null)return;R._store.validated=!0;var be=kt(le);if(ht[be])return;ht[be]=!0;var Fe="";R&&R._owner&&R._owner!==un.current&&(Fe=" It was passed a child from "+F(R._owner.type)+"."),ir(R),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',be,Fe),ir(null)}}function Vt(R,le){{if(typeof R!="object")return;if(Re(R))for(var be=0;be<R.length;be++){var Fe=R[be];Rr(Fe)&&Wt(Fe,le)}else if(Rr(R))R._store&&(R._store.validated=!0);else if(R){var dt=y(R);if(typeof dt=="function"&&dt!==R.entries)for(var bt=dt.call(R),rt;!(rt=bt.next()).done;)Rr(rt.value)&&Wt(rt.value,le)}}}function en(R){{var le=R.type;if(le==null||typeof le=="string")return;var be;if(typeof le=="function")be=le.propTypes;else if(typeof le=="object"&&(le.$$typeof===u||le.$$typeof===f))be=le.propTypes;else return;if(be){var Fe=F(le);Oe(be,R.props,"prop",Fe,R)}else if(le.PropTypes!==void 0&&!Hr){Hr=!0;var dt=F(le);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",dt||"Unknown")}typeof le.getDefaultProps=="function"&&!le.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ht(R){{for(var le=Object.keys(R.props),be=0;be<le.length;be++){var Fe=le[be];if(Fe!=="children"&&Fe!=="key"){ir(R),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Fe),ir(null);break}}R.ref!==null&&(ir(R),b("Invalid attribute `ref` supplied to `React.Fragment`."),ir(null))}}var Ln={};function Bn(R,le,be,Fe,dt,bt){{var rt=T(R);if(!rt){var Xe="";(R===void 0||typeof R=="object"&&R!==null&&Object.keys(R).length===0)&&(Xe+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var hn=Zr();hn?Xe+=hn:Xe+=ar();var Dt;R===null?Dt="null":Re(R)?Dt="array":R!==void 0&&R.$$typeof===t?(Dt="<"+(F(R.type)||"Unknown")+" />",Xe=" Did you accidentally export a JSX literal instead of a component?"):Dt=typeof R,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Dt,Xe)}var Lt=Ke(R,le,be,dt,bt);if(Lt==null)return Lt;if(rt){var Un=le.children;if(Un!==void 0)if(Fe)if(Re(Un)){for(var co=0;co<Un.length;co++)Vt(Un[co],R);Object.freeze&&Object.freeze(Un)}else b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Vt(Un,R)}if(M.call(le,"key")){var Ji=F(R),Sn=Object.keys(le).filter(function(mue){return mue!=="key"}),Dy=Sn.length>0?"{key: someKey, "+Sn.join(": ..., ")+": ...}":"{key: someKey}";if(!Ln[Ji+Dy]){var hue=Sn.length>0?"{"+Sn.join(": ..., ")+": ...}":"{}";b(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+be+">.")}return le}}function Gt(P,le){{if(!P._store||P._store.validated||P.key!=null)return;P._store.validated=!0;var be=Ct(le);if(mt[be])return;mt[be]=!0;var Fe="";P&&P._owner&&P._owner!==hn.current&&(Fe=" It was passed a child from "+B(P._owner.type)+"."),fr(P),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',be,Fe),fr(null)}}function Yt(P,le){{if(typeof P!="object")return;if(Ae(P))for(var be=0;be<P.length;be++){var Fe=P[be];Lr(Fe)&&Gt(Fe,le)}else if(Lr(P))P._store&&(P._store.validated=!0);else if(P){var pt=y(P);if(typeof pt=="function"&&pt!==P.entries)for(var wt=pt.call(P),it;!(it=wt.next()).done;)Lr(it.value)&&Gt(it.value,le)}}}function on(P){{var le=P.type;if(le==null||typeof le=="string")return;var be;if(typeof le=="function")be=le.propTypes;else if(typeof le=="object"&&(le.$$typeof===u||le.$$typeof===f))be=le.propTypes;else return;if(be){var Fe=B(le);Ce(be,P.props,"prop",Fe,P)}else if(le.PropTypes!==void 0&&!ti){ti=!0;var pt=B(le);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",pt||"Unknown")}typeof le.getDefaultProps=="function"&&!le.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Jt(P){{for(var le=Object.keys(P.props),be=0;be<le.length;be++){var Fe=le[be];if(Fe!=="children"&&Fe!=="key"){fr(P),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Fe),fr(null);break}}P.ref!==null&&(fr(P),b("Invalid attribute `ref` supplied to `React.Fragment`."),fr(null))}}var Vn={};function Hn(P,le,be,Fe,pt,wt){{var it=k(P);if(!it){var Qe="";(P===void 0||typeof P=="object"&&P!==null&&Object.keys(P).length===0)&&(Qe+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var bn=ni();bn?Qe+=bn:Qe+=dr();var Ft;P===null?Ft="null":Ae(P)?Ft="array":P!==void 0&&P.$$typeof===t?(Ft="<"+(B(P.type)||"Unknown")+" />",Qe=" Did you accidentally export a JSX literal instead of a component?"):Ft=typeof P,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ft,Qe)}var qt=Ke(P,le,be,pt,wt);if(qt==null)return qt;if(it){var Zn=le.children;if(Zn!==void 0)if(Fe)if(Ae(Zn)){for(var Co=0;Co<Zn.length;Co++)Yt(Zn[Co],P);Object.freeze&&Object.freeze(Zn)}else b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Yt(Zn,P)}if(F.call(le,"key")){var ua=B(P),On=Object.keys(le).filter(function(rfe){return rfe!=="key"}),yg=On.length>0?"{key: someKey, "+On.join(": ..., ")+": ...}":"{key: someKey}";if(!Vn[ua+yg]){var nfe=On.length>0?"{"+On.join(": ..., ")+": ...}":"{}";b(`A props object containing a "key" prop is being spread into JSX:
26
26
  let props = %s;
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,Dy,Ji,hue,Ji),Ln[Ji+Dy]=!0}}return R===r?Ht(Lt):en(Lt),Lt}}function Ei(R,le,be){return Bn(R,le,be,!0)}function fue(R,le,be){return Bn(R,le,be,!1)}var due=fue,pue=Ei;ho.Fragment=r,ho.jsx=due,ho.jsxs=pue}()),ho}process.env.NODE_ENV==="production"?wf.exports=U$():wf.exports=z$();var $=wf.exports;function q$(e,t=[]){let n=[];function r(a,o){const s=x.createContext(o),u=n.length;n=[...n,o];function l(f){const{scope:p,children:d,...m}=f,h=(p==null?void 0:p[e][u])||s,y=x.useMemo(()=>m,Object.values(m));return $.jsx(h.Provider,{value:y,children:d})}function c(f,p){const d=(p==null?void 0:p[e][u])||s,m=x.useContext(d);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return l.displayName=a+"Provider",[l,c]}const i=()=>{const a=n.map(o=>x.createContext(o));return function(s){const u=(s==null?void 0:s[e])||a;return x.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,W$(i,...t)]}function W$(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:u,scopeName:l})=>{const f=u(a)[`__scope${l}`];return{...s,...f}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function Kr(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var Xi=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{};function V$(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function H$(...e){return t=>e.forEach(n=>V$(n,t))}var eg=x.forwardRef((e,t)=>{const{children:n,...r}=e,i=x.Children.toArray(n),a=i.find(K$);if(a){const o=a.props.children,s=i.map(u=>u===a?x.Children.count(o)>1?x.Children.only(null):x.isValidElement(o)?o.props.children:null:u);return $.jsx(xf,{...r,ref:t,children:x.isValidElement(o)?x.cloneElement(o,void 0,s):null})}return $.jsx(xf,{...r,ref:t,children:n})});eg.displayName="Slot";var xf=x.forwardRef((e,t)=>{const{children:n,...r}=e;if(x.isValidElement(n)){const i=Y$(n);return x.cloneElement(n,{...G$(r,n.props),ref:t?H$(t,i):i})}return x.Children.count(n)>1?x.Children.only(null):null});xf.displayName="SlotClone";var Z$=({children:e})=>$.jsx($.Fragment,{children:e});function K$(e){return x.isValidElement(e)&&e.type===Z$}function G$(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{a(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function Y$(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var J$=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Sf=J$.reduce((e,t)=>{const n=x.forwardRef((r,i)=>{const{asChild:a,...o}=r,s=a?eg:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),$.jsx(s,{...o,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Ef="Avatar",[X$,wue]=q$(Ef),[Q$,tg]=X$(Ef),_f=x.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,a]=x.useState("idle");return $.jsx(Q$,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:$.jsx(Sf.span,{...r,ref:t})})});_f.displayName=Ef;var ng="AvatarImage",kf=x.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...a}=e,o=tg(ng,n),s=eI(r),u=Kr(l=>{i(l),o.onImageLoadingStatusChange(l)});return Xi(()=>{s!=="idle"&&u(s)},[s,u]),s==="loaded"?$.jsx(Sf.img,{...a,ref:t,src:r}):null});kf.displayName=ng;var rg="AvatarFallback",Tf=x.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,a=tg(rg,n),[o,s]=x.useState(r===void 0);return x.useEffect(()=>{if(r!==void 0){const u=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(u)}},[r]),o&&a.imageLoadingStatus!=="loaded"?$.jsx(Sf.span,{...i,ref:t}):null});Tf.displayName=rg;function eI(e){const[t,n]=x.useState("idle");return Xi(()=>{if(!e){n("error");return}let r=!0;const i=new window.Image,a=o=>()=>{r&&n(o)};return n("loading"),i.onload=a("loaded"),i.onerror=a("error"),i.src=e,()=>{r=!1}},[e]),t}function Of(e){if(!/^#?([a-fA-F\d]{6}|[a-fA-F\d]{3})$/.test(e))return{r:0,g:0,b:0};const n=e.replace(/^#/,"");let r=n;n.length===3&&(r=n.split("").map(u=>u+u).join(""));const i=parseInt(r,16),a=i>>16&255,o=i>>8&255,s=i&255;return{r:a,g:o,b:s}}function tI(e){return`#${((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)}`}const nI=(e,t=30)=>{const n=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b,n+1);return{r:Math.floor((e.r-n)/(r-n)*t*(1-.299)+120-t/2),g:Math.floor((e.g-n)/(r-n)*t*(1-.587)+120-t/2),b:Math.floor((e.b-n)/(r-n)*t*(1-.114)+120-t/2)}};function ig(e){return Object.entries(e).reduce((t,[n,r])=>{const i=n.replace(/(\d+)/,a=>(1e3-parseInt(a)).toString());return{...t,[i]:r}},{})}const rI=2.4,iI=.2126729,aI=.7151522,oI=.072175,sI=.56,lI=.57,uI=.62,cI=.65,pl=.022,ag=1.414,fI=1.14,dI=1.14,pI=.035991,hI=.035991,mI=27.7847239587675,vI=27.7847239587675,og=.027,sg=.027,lg=.001,yI=5e-4;function ug(e){const{r:t,g:n,b:r}=e,i=a=>(a/255)**rI;return iI*i(t)+aI*i(n)+oI*i(r)}function cg(e,t){if(!e||!t)return 0;let n=ug(Of(e)),r=ug(Of(t)),i=0,a=0;return n=n>pl?n:n+(pl-n)**ag,r=r>pl?r:r+(pl-r)**ag,Math.abs(r-n)<yI?0:(r>n?(i=(r**sI-n**lI)*fI,a=i<lg?0:i<pI?i-i*mI*og:i-og):(i=(r**cI-n**uI)*dI,a=i>-lg?0:i>-hI?i-i*vI*sg:i+sg),Math.abs(a*100))}let Cf=class{constructor(){Te(this,"eventMap");this.eventMap={}}on(t,n){var r;return this.eventMap[t]||(this.eventMap[t]=new Set),(r=this.eventMap[t])==null||r.add(n),()=>{var i;(i=this.eventMap[t])==null||i.delete(n)}}emit(t,n){var r,i;(r=this.eventMap[t])==null||r.forEach(a=>{a(n)}),(i=this.eventMap["*"])==null||i.forEach(a=>{a({type:t,payload:n})})}};const gI=new Cf;function fg(e,t){let n=`${e} {`;for(const[r,i]of Object.entries(t))n+=`${r}: ${i}; `;return n+="}",n}function dg(e,t){let n=0;if(e.length==0)return n;for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);n=(n<<5)-n+i,n=n&n}return Math.abs(n)%t}var pg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(mt,function(){var n=1e3,r=6e4,i=36e5,a="millisecond",o="second",s="minute",u="hour",l="day",c="week",f="month",p="quarter",d="year",m="date",h="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(L){var N=["th","st","nd","rd"],q=L%100;return"["+L+(N[(q-20)%10]||N[q]||N[0])+"]"}},w=function(L,N,q){var Y=String(L);return!Y||Y.length>=N?L:""+Array(N+1-Y.length).join(q)+L},k={s:w,z:function(L){var N=-L.utcOffset(),q=Math.abs(N),Y=Math.floor(q/60),H=q%60;return(N<=0?"+":"-")+w(Y,2,"0")+":"+w(H,2,"0")},m:function L(N,q){if(N.date()<q.date())return-L(q,N);var Y=12*(q.year()-N.year())+(q.month()-N.month()),H=N.clone().add(Y,f),I=q-H<0,g=N.clone().add(Y+(I?-1:1),f);return+(-(Y+(q-H)/(I?H-g:g-H))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:f,y:d,w:c,d:l,D:m,h:u,m:s,s:o,ms:a,Q:p}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},E="en",_={};_[E]=b;var C="$isDayjsObject",z=function(L){return L instanceof W||!(!L||!L[C])},B=function L(N,q,Y){var H;if(!N)return E;if(typeof N=="string"){var I=N.toLowerCase();_[I]&&(H=I),q&&(_[I]=q,H=I);var g=N.split("-");if(!H&&g.length>1)return L(g[0])}else{var P=N.name;_[P]=N,H=P}return!Y&&H&&(E=H),H||!Y&&E},T=function(L,N){if(z(L))return L.clone();var q=typeof N=="object"?N:{};return q.date=L,q.args=arguments,new W(q)},A=k;A.l=B,A.i=z,A.w=function(L,N){return T(L,{locale:N.$L,utc:N.$u,x:N.$x,$offset:N.$offset})};var W=function(){function L(q){this.$L=B(q.locale,null,!0),this.parse(q),this.$x=this.$x||q.x||{},this[C]=!0}var N=L.prototype;return N.parse=function(q){this.$d=function(Y){var H=Y.date,I=Y.utc;if(H===null)return new Date(NaN);if(A.u(H))return new Date;if(H instanceof Date)return new Date(H);if(typeof H=="string"&&!/Z$/i.test(H)){var g=H.match(y);if(g){var P=g[2]-1||0,V=(g[7]||"0").substring(0,3);return I?new Date(Date.UTC(g[1],P,g[3]||1,g[4]||0,g[5]||0,g[6]||0,V)):new Date(g[1],P,g[3]||1,g[4]||0,g[5]||0,g[6]||0,V)}}return new Date(H)}(q),this.init()},N.init=function(){var q=this.$d;this.$y=q.getFullYear(),this.$M=q.getMonth(),this.$D=q.getDate(),this.$W=q.getDay(),this.$H=q.getHours(),this.$m=q.getMinutes(),this.$s=q.getSeconds(),this.$ms=q.getMilliseconds()},N.$utils=function(){return A},N.isValid=function(){return this.$d.toString()!==h},N.isSame=function(q,Y){var H=T(q);return this.startOf(Y)<=H&&H<=this.endOf(Y)},N.isAfter=function(q,Y){return T(q)<this.startOf(Y)},N.isBefore=function(q,Y){return this.endOf(Y)<T(q)},N.$g=function(q,Y,H){return A.u(q)?this[Y]:this.set(H,q)},N.unix=function(){return Math.floor(this.valueOf()/1e3)},N.valueOf=function(){return this.$d.getTime()},N.startOf=function(q,Y){var H=this,I=!!A.u(Y)||Y,g=A.p(q),P=function(se,Q){var ee=A.w(H.$u?Date.UTC(H.$y,Q,se):new Date(H.$y,Q,se),H);return I?ee:ee.endOf(l)},V=function(se,Q){return A.w(H.toDate()[se].apply(H.toDate("s"),(I?[0,0,0,0]:[23,59,59,999]).slice(Q)),H)},S=this.$W,Z=this.$M,J=this.$D,G="set"+(this.$u?"UTC":"");switch(g){case d:return I?P(1,0):P(31,11);case f:return I?P(1,Z):P(0,Z+1);case c:var X=this.$locale().weekStart||0,ae=(S<X?S+7:S)-X;return P(I?J-ae:J+(6-ae),Z);case l:case m:return V(G+"Hours",0);case u:return V(G+"Minutes",1);case s:return V(G+"Seconds",2);case o:return V(G+"Milliseconds",3);default:return this.clone()}},N.endOf=function(q){return this.startOf(q,!1)},N.$set=function(q,Y){var H,I=A.p(q),g="set"+(this.$u?"UTC":""),P=(H={},H[l]=g+"Date",H[m]=g+"Date",H[f]=g+"Month",H[d]=g+"FullYear",H[u]=g+"Hours",H[s]=g+"Minutes",H[o]=g+"Seconds",H[a]=g+"Milliseconds",H)[I],V=I===l?this.$D+(Y-this.$W):Y;if(I===f||I===d){var S=this.clone().set(m,1);S.$d[P](V),S.init(),this.$d=S.set(m,Math.min(this.$D,S.daysInMonth())).$d}else P&&this.$d[P](V);return this.init(),this},N.set=function(q,Y){return this.clone().$set(q,Y)},N.get=function(q){return this[A.p(q)]()},N.add=function(q,Y){var H,I=this;q=Number(q);var g=A.p(Y),P=function(Z){var J=T(I);return A.w(J.date(J.date()+Math.round(Z*q)),I)};if(g===f)return this.set(f,this.$M+q);if(g===d)return this.set(d,this.$y+q);if(g===l)return P(1);if(g===c)return P(7);var V=(H={},H[s]=r,H[u]=i,H[o]=n,H)[g]||1,S=this.$d.getTime()+q*V;return A.w(S,this)},N.subtract=function(q,Y){return this.add(-1*q,Y)},N.format=function(q){var Y=this,H=this.$locale();if(!this.isValid())return H.invalidDate||h;var I=q||"YYYY-MM-DDTHH:mm:ssZ",g=A.z(this),P=this.$H,V=this.$m,S=this.$M,Z=H.weekdays,J=H.months,G=H.meridiem,X=function(Q,ee,K,pe){return Q&&(Q[ee]||Q(Y,I))||K[ee].slice(0,pe)},ae=function(Q){return A.s(P%12||12,Q,"0")},se=G||function(Q,ee,K){var pe=Q<12?"AM":"PM";return K?pe.toLowerCase():pe};return I.replace(v,function(Q,ee){return ee||function(K){switch(K){case"YY":return String(Y.$y).slice(-2);case"YYYY":return A.s(Y.$y,4,"0");case"M":return S+1;case"MM":return A.s(S+1,2,"0");case"MMM":return X(H.monthsShort,S,J,3);case"MMMM":return X(J,S);case"D":return Y.$D;case"DD":return A.s(Y.$D,2,"0");case"d":return String(Y.$W);case"dd":return X(H.weekdaysMin,Y.$W,Z,2);case"ddd":return X(H.weekdaysShort,Y.$W,Z,3);case"dddd":return Z[Y.$W];case"H":return String(P);case"HH":return A.s(P,2,"0");case"h":return ae(1);case"hh":return ae(2);case"a":return se(P,V,!0);case"A":return se(P,V,!1);case"m":return String(V);case"mm":return A.s(V,2,"0");case"s":return String(Y.$s);case"ss":return A.s(Y.$s,2,"0");case"SSS":return A.s(Y.$ms,3,"0");case"Z":return g}return null}(Q)||g.replace(":","")})},N.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},N.diff=function(q,Y,H){var I,g=this,P=A.p(Y),V=T(q),S=(V.utcOffset()-this.utcOffset())*r,Z=this-V,J=function(){return A.m(g,V)};switch(P){case d:I=J()/12;break;case f:I=J();break;case p:I=J()/3;break;case c:I=(Z-S)/6048e5;break;case l:I=(Z-S)/864e5;break;case u:I=Z/i;break;case s:I=Z/r;break;case o:I=Z/n;break;default:I=Z}return H?I:A.a(I)},N.daysInMonth=function(){return this.endOf(f).$D},N.$locale=function(){return _[this.$L]},N.locale=function(q,Y){if(!q)return this.$L;var H=this.clone(),I=B(q,Y,!0);return I&&(H.$L=I),H},N.clone=function(){return A.w(this.$d,this)},N.toDate=function(){return new Date(this.valueOf())},N.toJSON=function(){return this.isValid()?this.toISOString():null},N.toISOString=function(){return this.$d.toISOString()},N.toString=function(){return this.$d.toUTCString()},L}(),F=W.prototype;return T.prototype=F,[["$ms",a],["$s",o],["$m",s],["$H",u],["$W",l],["$M",f],["$y",d],["$D",m]].forEach(function(L){F[L[1]]=function(N){return this.$g(N,L[0],L[1])}}),T.extend=function(L,N){return L.$i||(L(N,W,T),L.$i=!0),T},T.locale=B,T.isDayjs=z,T.unix=function(L){return T(1e3*L)},T.en=_[E],T.Ls=_,T.p={},T})})(pg);var bI=pg.exports;const hl=Ge(bI);var hg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(mt,function(){return function(n,r,i){r.prototype.isToday=function(){var a="YYYY-MM-DD",o=i();return this.format(a)===o.format(a)}}})})(hg);var wI=hg.exports;const xI=Ge(wI);var mg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(mt,function(){return function(n,r,i){r.prototype.isYesterday=function(){var a="YYYY-MM-DD",o=i().subtract(1,"day");return this.format(a)===o.format(a)}}})})(mg);var SI=mg.exports;const EI=Ge(SI);hl.extend(xI),hl.extend(EI);function _I(e,t="day"){var r,i,a;if(!e||e.length===0)return[];const n=[];(r=e[0])!=null&&r.timestamp&&n.push(vg(e[0].timestamp));for(let o=0;o<e.length;o++)if(e[o]&&n.push(e[o]),o+1<e.length){const s=(i=e[o])==null?void 0:i.timestamp,u=(a=e[o+1])==null?void 0:a.timestamp;!hl(s).isSame(u,t)&&u&&n.push(vg(u))}return n}function vg(e){return{id:qy(),direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:kI(e)}}}function kI(e,t=!1){const n=hl(e),r="h:mma";return n.isToday()?t?`Today • ${n.format(r)}`:"Today":n.isYesterday()?t?`Yesterday • ${n.format(r)}`:"Yesterday":t?n.format(`YYYY-MM-DD • ${r}`):n.format("YYYY-MM-DD")}function TI(e=""){if(typeof e!="string")throw new TypeError("Color should be string!");const t=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(e);if(t)return t.splice(1).map(r=>Number.parseInt(r,16));const n=/^#?([\da-f])([\da-f])([\da-f])$/i.exec(e);if(n)return n.splice(1).map(r=>Number.parseInt(r+r,16));if(e.includes(","))return e.split(",").map(r=>Number.parseInt(r));throw new Error("Invalid color format! Use #ABC or #AABBCC or r,g,b")}function OI(e){return"#"+e.map(t=>`0${t.toString(16).toUpperCase()}`.slice(-2)).join("")}function CI(e,t){return e.map(n=>Math.round(n+(255-n)*t))}function $I(e,t){return e.map(n=>Math.round(n*t))}const mo=e=>t=>CI(t,e),vo=e=>t=>$I(t,e),II={50:mo(.95),100:mo(.9),200:mo(.75),300:mo(.6),400:mo(.3),500:e=>e,600:vo(.9),700:vo(.6),800:vo(.45),900:vo(.3),950:vo(.2)};function yg(e,t=II){const n={},r=TI(e);for(const[i,a]of Object.entries(t))n[i]=OI(a(r));return n}var ot;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(ot||(ot={}));var $f;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})($f||($f={}));const we=ot.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Gr=e=>{switch(typeof e){case"undefined":return we.undefined;case"string":return we.string;case"number":return isNaN(e)?we.nan:we.number;case"boolean":return we.boolean;case"function":return we.function;case"bigint":return we.bigint;case"symbol":return we.symbol;case"object":return Array.isArray(e)?we.array:e===null?we.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?we.promise:typeof Map<"u"&&e instanceof Map?we.map:typeof Set<"u"&&e instanceof Set?we.set:typeof Date<"u"&&e instanceof Date?we.date:we.object;default:return we.unknown}},me=ot.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),RI=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");let zn=class extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(a){return a.message},r={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let s=r,u=0;for(;u<o.path.length;){const l=o.path[u];u===o.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(o))):s[l]=s[l]||{_errors:[]},s=s[l],u++}}};return i(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,ot.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};zn.create=e=>new zn(e);const yo=(e,t)=>{let n;switch(e.code){case me.invalid_type:e.received===we.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case me.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ot.jsonStringifyReplacer)}`;break;case me.unrecognized_keys:n=`Unrecognized key(s) in object: ${ot.joinValues(e.keys,", ")}`;break;case me.invalid_union:n="Invalid input";break;case me.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ot.joinValues(e.options)}`;break;case me.invalid_enum_value:n=`Invalid enum value. Expected ${ot.joinValues(e.options)}, received '${e.received}'`;break;case me.invalid_arguments:n="Invalid function arguments";break;case me.invalid_return_type:n="Invalid function return type";break;case me.invalid_date:n="Invalid date";break;case me.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:ot.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case me.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case me.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case me.custom:n="Invalid input";break;case me.invalid_intersection_types:n="Intersection results could not be merged";break;case me.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case me.not_finite:n="Number must be finite";break;default:n=t.defaultError,ot.assertNever(e)}return{message:n}};let gg=yo;function AI(e){gg=e}function ml(){return gg}const vl=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};let s="";const u=r.filter(l=>!!l).slice().reverse();for(const l of u)s=l(o,{data:t,defaultError:s}).message;return{...i,path:a,message:i.message||s}},PI=[];function _e(e,t){const n=vl({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,ml(),yo].filter(r=>!!r)});e.common.issues.push(n)}let mn=class k${constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Le;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n)r.push({key:await i.key,value:await i.value});return k$.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return Le;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[a.value]=o.value)}return{status:t.value,value:r}}};const Le=Object.freeze({status:"aborted"}),bg=e=>({status:"dirty",value:e}),cn=e=>({status:"valid",value:e}),If=e=>e.status==="aborted",Rf=e=>e.status==="dirty",go=e=>e.status==="valid",yl=e=>typeof Promise<"u"&&e instanceof Promise;var Ae;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ae||(Ae={}));let sr=class{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}};const wg=(e,t)=>{if(go(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new zn(e.common.issues);return this._error=n,this._error}}};function Be(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,s)=>o.code!=="invalid_type"?{message:s.defaultError}:typeof s.data>"u"?{message:r??s.defaultError}:{message:n??s.defaultError},description:i}}let We=class{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Gr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Gr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new mn,ctx:{common:t.parent.common,data:t.data,parsedType:Gr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(yl(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Gr(t)},a=this._parseSync({data:t,path:i.path,parent:i});return wg(i,a)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Gr(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(yl(i)?i:Promise.resolve(i));return wg(r,a)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const o=t(i),s=()=>a.addIssue({code:me.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(u=>u?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new qn({schema:this,typeName:je.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Pr.create(this,this._def)}nullable(){return Oi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ti.create(this,this._def)}promise(){return na.create(this,this._def)}or(t){return ko.create([this,t],this._def)}and(t){return To.create(this,t,this._def)}transform(t){return new qn({...Be(this._def),schema:this,typeName:je.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Ro({...Be(this._def),innerType:this,defaultValue:n,typeName:je.ZodDefault})}brand(){return new kg({typeName:je.ZodBranded,type:this,...Be(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new El({...Be(this._def),innerType:this,catchValue:n,typeName:je.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Df.create(this,t)}readonly(){return kl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const DI=/^c[^\s-]{8,}$/i,jI=/^[a-z][a-z0-9]*$/,NI=/^[0-9A-HJKMNP-TV-Z]{26}$/,MI=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,FI=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,LI="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Af;const BI=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,UI=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,zI=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function qI(e,t){return!!((t==="v4"||!t)&&BI.test(e)||(t==="v6"||!t)&&UI.test(e))}let Qi=class fl extends We{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==we.string){const a=this._getOrReturnCtx(t);return _e(a,{code:me.invalid_type,expected:we.string,received:a.parsedType}),Le}const r=new mn;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:me.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:me.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,s=t.data.length<a.value;(o||s)&&(i=this._getOrReturnCtx(t,i),o?_e(i,{code:me.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&_e(i,{code:me.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")FI.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"email",code:me.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")Af||(Af=new RegExp(LI,"u")),Af.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"emoji",code:me.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")MI.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"uuid",code:me.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")DI.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"cuid",code:me.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")jI.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"cuid2",code:me.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")NI.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"ulid",code:me.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),_e(i,{validation:"url",code:me.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"regex",code:me.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),_e(i,{code:me.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),_e(i,{code:me.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),_e(i,{code:me.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?zI(a).test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{code:me.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="ip"?qI(t.data,a.version)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"ip",code:me.invalid_string,message:a.message}),r.dirty()):ot.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:me.invalid_string,...Ae.errToObj(r)})}_addCheck(t){return new fl({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ae.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ae.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ae.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ae.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ae.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ae.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ae.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ae.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,...Ae.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ae.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Ae.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ae.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ae.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ae.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ae.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ae.errToObj(n)})}nonempty(t){return this.min(1,Ae.errToObj(t))}trim(){return new fl({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new fl({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new fl({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};Qi.create=e=>{var t;return new Qi({checks:[],typeName:je.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Be(e)})};function WI(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=parseInt(e.toFixed(i).replace(".","")),o=parseInt(t.toFixed(i).replace(".",""));return a%o/Math.pow(10,i)}let bo=class jy extends We{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==we.number){const a=this._getOrReturnCtx(t);return _e(a,{code:me.invalid_type,expected:we.number,received:a.parsedType}),Le}let r;const i=new mn;for(const a of this._def.checks)a.kind==="int"?ot.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),_e(r,{code:me.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:me.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:me.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?WI(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),_e(r,{code:me.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),_e(r,{code:me.not_finite,message:a.message}),i.dirty()):ot.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ae.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ae.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ae.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ae.toString(n))}setLimit(t,n,r,i){return new jy({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ae.toString(i)}]})}_addCheck(t){return new jy({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ae.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ae.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ae.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ae.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ae.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ae.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ot.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}};bo.create=e=>new bo({checks:[],typeName:je.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Be(e)});let wo=class Ny extends We{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==we.bigint){const a=this._getOrReturnCtx(t);return _e(a,{code:me.invalid_type,expected:we.bigint,received:a.parsedType}),Le}let r;const i=new mn;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:me.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:me.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:me.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):ot.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ae.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ae.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ae.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ae.toString(n))}setLimit(t,n,r,i){return new Ny({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ae.toString(i)}]})}_addCheck(t){return new Ny({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ae.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ae.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};wo.create=e=>{var t;return new wo({checks:[],typeName:je.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Be(e)})};let xo=class extends We{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==we.boolean){const r=this._getOrReturnCtx(t);return _e(r,{code:me.invalid_type,expected:we.boolean,received:r.parsedType}),Le}return cn(t.data)}};xo.create=e=>new xo({typeName:je.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Be(e)});let So=class T$ extends We{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==we.date){const a=this._getOrReturnCtx(t);return _e(a,{code:me.invalid_type,expected:we.date,received:a.parsedType}),Le}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return _e(a,{code:me.invalid_date}),Le}const r=new mn;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:me.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:me.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):ot.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new T$({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ae.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ae.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}};So.create=e=>new So({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:je.ZodDate,...Be(e)});let gl=class extends We{_parse(t){if(this._getType(t)!==we.symbol){const r=this._getOrReturnCtx(t);return _e(r,{code:me.invalid_type,expected:we.symbol,received:r.parsedType}),Le}return cn(t.data)}};gl.create=e=>new gl({typeName:je.ZodSymbol,...Be(e)});let Eo=class extends We{_parse(t){if(this._getType(t)!==we.undefined){const r=this._getOrReturnCtx(t);return _e(r,{code:me.invalid_type,expected:we.undefined,received:r.parsedType}),Le}return cn(t.data)}};Eo.create=e=>new Eo({typeName:je.ZodUndefined,...Be(e)});let _o=class extends We{_parse(t){if(this._getType(t)!==we.null){const r=this._getOrReturnCtx(t);return _e(r,{code:me.invalid_type,expected:we.null,received:r.parsedType}),Le}return cn(t.data)}};_o.create=e=>new _o({typeName:je.ZodNull,...Be(e)});let ea=class extends We{constructor(){super(...arguments),this._any=!0}_parse(t){return cn(t.data)}};ea.create=e=>new ea({typeName:je.ZodAny,...Be(e)});let ki=class extends We{constructor(){super(...arguments),this._unknown=!0}_parse(t){return cn(t.data)}};ki.create=e=>new ki({typeName:je.ZodUnknown,...Be(e)});let Ar=class extends We{_parse(t){const n=this._getOrReturnCtx(t);return _e(n,{code:me.invalid_type,expected:we.never,received:n.parsedType}),Le}};Ar.create=e=>new Ar({typeName:je.ZodNever,...Be(e)});let bl=class extends We{_parse(t){if(this._getType(t)!==we.undefined){const r=this._getOrReturnCtx(t);return _e(r,{code:me.invalid_type,expected:we.void,received:r.parsedType}),Le}return cn(t.data)}};bl.create=e=>new bl({typeName:je.ZodVoid,...Be(e)});let Ti=class yf extends We{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==we.array)return _e(n,{code:me.invalid_type,expected:we.array,received:n.parsedType}),Le;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(o||s)&&(_e(n,{code:o?me.too_big:me.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(_e(n,{code:me.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(_e(n,{code:me.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,s)=>i.type._parseAsync(new sr(n,o,n.path,s)))).then(o=>mn.mergeArray(r,o));const a=[...n.data].map((o,s)=>i.type._parseSync(new sr(n,o,n.path,s)));return mn.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new yf({...this._def,minLength:{value:t,message:Ae.toString(n)}})}max(t,n){return new yf({...this._def,maxLength:{value:t,message:Ae.toString(n)}})}length(t,n){return new yf({...this._def,exactLength:{value:t,message:Ae.toString(n)}})}nonempty(t){return this.min(1,t)}};Ti.create=(e,t)=>new Ti({type:e,minLength:null,maxLength:null,exactLength:null,typeName:je.ZodArray,...Be(t)});function ta(e){if(e instanceof Rn){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Pr.create(ta(r))}return new Rn({...e._def,shape:()=>t})}else return e instanceof Ti?new Ti({...e._def,type:ta(e.element)}):e instanceof Pr?Pr.create(ta(e.unwrap())):e instanceof Oi?Oi.create(ta(e.unwrap())):e instanceof Yr?Yr.create(e.items.map(t=>ta(t))):e}let Rn=class or extends We{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=ot.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==we.object){const l=this._getOrReturnCtx(t);return _e(l,{code:me.invalid_type,expected:we.object,received:l.parsedType}),Le}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Ar&&this._def.unknownKeys==="strip"))for(const l in i.data)o.includes(l)||s.push(l);const u=[];for(const l of o){const c=a[l],f=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new sr(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Ar){const l=this._def.unknownKeys;if(l==="passthrough")for(const c of s)u.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(l==="strict")s.length>0&&(_e(i,{code:me.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const c of s){const f=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new sr(i,f,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const c of u){const f=await c.key;l.push({key:f,value:await c.value,alwaysSet:c.alwaysSet})}return l}).then(l=>mn.mergeObjectSync(r,l)):mn.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(t){return Ae.errToObj,new or({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,a,o,s;const u=(o=(a=(i=this._def).errorMap)===null||a===void 0?void 0:a.call(i,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=Ae.errToObj(t).message)!==null&&s!==void 0?s:u}:{message:u}}}:{}})}strip(){return new or({...this._def,unknownKeys:"strip"})}passthrough(){return new or({...this._def,unknownKeys:"passthrough"})}extend(t){return new or({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new or({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:je.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new or({...this._def,catchall:t})}pick(t){const n={};return ot.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new or({...this._def,shape:()=>n})}omit(t){const n={};return ot.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new or({...this._def,shape:()=>n})}deepPartial(){return ta(this)}partial(t){const n={};return ot.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new or({...this._def,shape:()=>n})}required(t){const n={};return ot.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof Pr;)a=a._def.innerType;n[r]=a}}),new or({...this._def,shape:()=>n})}keyof(){return _g(ot.objectKeys(this.shape))}};Rn.create=(e,t)=>new Rn({shape:()=>e,unknownKeys:"strip",catchall:Ar.create(),typeName:je.ZodObject,...Be(t)}),Rn.strictCreate=(e,t)=>new Rn({shape:()=>e,unknownKeys:"strict",catchall:Ar.create(),typeName:je.ZodObject,...Be(t)}),Rn.lazycreate=(e,t)=>new Rn({shape:e,unknownKeys:"strip",catchall:Ar.create(),typeName:je.ZodObject,...Be(t)});let ko=class extends We{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new zn(s.ctx.common.issues));return _e(n,{code:me.invalid_union,unionErrors:o}),Le}if(n.common.async)return Promise.all(r.map(async a=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const u of r){const l={...n,common:{...n.common,issues:[]},parent:null},c=u._parseSync({data:n.data,path:n.path,parent:l});if(c.status==="valid")return c;c.status==="dirty"&&!a&&(a={result:c,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(u=>new zn(u));return _e(n,{code:me.invalid_union,unionErrors:s}),Le}}get options(){return this._def.options}};ko.create=(e,t)=>new ko({options:e,typeName:je.ZodUnion,...Be(t)});const wl=e=>e instanceof Oo?wl(e.schema):e instanceof qn?wl(e.innerType()):e instanceof Co?[e.value]:e instanceof $o?e.options:e instanceof Io?Object.keys(e.enum):e instanceof Ro?wl(e._def.innerType):e instanceof Eo?[void 0]:e instanceof _o?[null]:null;let xg=class O$ extends We{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==we.object)return _e(n,{code:me.invalid_type,expected:we.object,received:n.parsedType}),Le;const r=this.discriminator,i=n.data[r],a=this.optionsMap.get(i);return a?n.common.async?a._parseAsync({data:n.data,path:n.path,parent:n}):a._parseSync({data:n.data,path:n.path,parent:n}):(_e(n,{code:me.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Le)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const a of n){const o=wl(a.shape[t]);if(!o)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of o){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,a)}}return new O$({typeName:je.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Be(r)})}};function Pf(e,t){const n=Gr(e),r=Gr(t);if(e===t)return{valid:!0,data:e};if(n===we.object&&r===we.object){const i=ot.objectKeys(t),a=ot.objectKeys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...t};for(const s of a){const u=Pf(e[s],t[s]);if(!u.valid)return{valid:!1};o[s]=u.data}return{valid:!0,data:o}}else if(n===we.array&&r===we.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const o=e[a],s=t[a],u=Pf(o,s);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return n===we.date&&r===we.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}let To=class extends We{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,o)=>{if(If(a)||If(o))return Le;const s=Pf(a.value,o.value);return s.valid?((Rf(a)||Rf(o))&&n.dirty(),{status:n.value,value:s.data}):(_e(r,{code:me.invalid_intersection_types}),Le)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};To.create=(e,t,n)=>new To({left:e,right:t,typeName:je.ZodIntersection,...Be(n)});let Yr=class C$ extends We{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==we.array)return _e(r,{code:me.invalid_type,expected:we.array,received:r.parsedType}),Le;if(r.data.length<this._def.items.length)return _e(r,{code:me.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Le;!this._def.rest&&r.data.length>this._def.items.length&&(_e(r,{code:me.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((o,s)=>{const u=this._def.items[s]||this._def.rest;return u?u._parse(new sr(r,o,r.path,s)):null}).filter(o=>!!o);return r.common.async?Promise.all(a).then(o=>mn.mergeArray(n,o)):mn.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new C$({...this._def,rest:t})}};Yr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Yr({items:e,typeName:je.ZodTuple,rest:null,...Be(t)})};let Sg=class My extends We{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==we.object)return _e(r,{code:me.invalid_type,expected:we.object,received:r.parsedType}),Le;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in r.data)i.push({key:a._parse(new sr(r,s,r.path,s)),value:o._parse(new sr(r,r.data[s],r.path,s))});return r.common.async?mn.mergeObjectAsync(n,i):mn.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof We?new My({keyType:t,valueType:n,typeName:je.ZodRecord,...Be(r)}):new My({keyType:Qi.create(),valueType:t,typeName:je.ZodRecord,...Be(n)})}},xl=class extends We{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==we.map)return _e(r,{code:me.invalid_type,expected:we.map,received:r.parsedType}),Le;const i=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([s,u],l)=>({key:i._parse(new sr(r,s,r.path,[l,"key"])),value:a._parse(new sr(r,u,r.path,[l,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const u of o){const l=await u.key,c=await u.value;if(l.status==="aborted"||c.status==="aborted")return Le;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const u of o){const l=u.key,c=u.value;if(l.status==="aborted"||c.status==="aborted")return Le;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}}}};xl.create=(e,t,n)=>new xl({valueType:t,keyType:e,typeName:je.ZodMap,...Be(n)});let Sl=class Fy extends We{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==we.set)return _e(r,{code:me.invalid_type,expected:we.set,received:r.parsedType}),Le;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(_e(r,{code:me.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(_e(r,{code:me.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function o(u){const l=new Set;for(const c of u){if(c.status==="aborted")return Le;c.status==="dirty"&&n.dirty(),l.add(c.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((u,l)=>a._parse(new sr(r,u,r.path,l)));return r.common.async?Promise.all(s).then(u=>o(u)):o(s)}min(t,n){return new Fy({...this._def,minSize:{value:t,message:Ae.toString(n)}})}max(t,n){return new Fy({...this._def,maxSize:{value:t,message:Ae.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};Sl.create=(e,t)=>new Sl({valueType:e,minSize:null,maxSize:null,typeName:je.ZodSet,...Be(t)});let Eg=class gf extends We{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==we.function)return _e(n,{code:me.invalid_type,expected:we.function,received:n.parsedType}),Le;function r(s,u){return vl({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ml(),yo].filter(l=>!!l),issueData:{code:me.invalid_arguments,argumentsError:u}})}function i(s,u){return vl({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ml(),yo].filter(l=>!!l),issueData:{code:me.invalid_return_type,returnTypeError:u}})}const a={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof na){const s=this;return cn(async function(...u){const l=new zn([]),c=await s._def.args.parseAsync(u,a).catch(d=>{throw l.addIssue(r(u,d)),l}),f=await Reflect.apply(o,this,c);return await s._def.returns._def.type.parseAsync(f,a).catch(d=>{throw l.addIssue(i(f,d)),l})})}else{const s=this;return cn(function(...u){const l=s._def.args.safeParse(u,a);if(!l.success)throw new zn([r(u,l.error)]);const c=Reflect.apply(o,this,l.data),f=s._def.returns.safeParse(c,a);if(!f.success)throw new zn([i(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new gf({...this._def,args:Yr.create(t).rest(ki.create())})}returns(t){return new gf({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new gf({args:t||Yr.create([]).rest(ki.create()),returns:n||ki.create(),typeName:je.ZodFunction,...Be(r)})}},Oo=class extends We{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};Oo.create=(e,t)=>new Oo({getter:e,typeName:je.ZodLazy,...Be(t)});let Co=class extends We{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return _e(n,{received:n.data,code:me.invalid_literal,expected:this._def.value}),Le}return{status:"valid",value:t.data}}get value(){return this._def.value}};Co.create=(e,t)=>new Co({value:e,typeName:je.ZodLiteral,...Be(t)});function _g(e,t){return new $o({values:e,typeName:je.ZodEnum,...Be(t)})}let $o=class Ly extends We{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return _e(n,{expected:ot.joinValues(r),received:n.parsedType,code:me.invalid_type}),Le}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return _e(n,{received:n.data,code:me.invalid_enum_value,options:r}),Le}return cn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t){return Ly.create(t)}exclude(t){return Ly.create(this.options.filter(n=>!t.includes(n)))}};$o.create=_g;let Io=class extends We{_parse(t){const n=ot.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==we.string&&r.parsedType!==we.number){const i=ot.objectValues(n);return _e(r,{expected:ot.joinValues(i),received:r.parsedType,code:me.invalid_type}),Le}if(n.indexOf(t.data)===-1){const i=ot.objectValues(n);return _e(r,{received:r.data,code:me.invalid_enum_value,options:i}),Le}return cn(t.data)}get enum(){return this._def.values}};Io.create=(e,t)=>new Io({values:e,typeName:je.ZodNativeEnum,...Be(t)});let na=class extends We{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==we.promise&&n.common.async===!1)return _e(n,{code:me.invalid_type,expected:we.promise,received:n.parsedType}),Le;const r=n.parsedType===we.promise?n.data:Promise.resolve(n.data);return cn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}};na.create=(e,t)=>new na({type:e,typeName:je.ZodPromise,...Be(t)});let qn=class extends We{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===je.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{_e(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(r.data,a);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(o).then(s=>this._def.schema._parseAsync({data:s,path:r.path,parent:r})):this._def.schema._parseSync({data:o,path:r.path,parent:r})}if(i.type==="refinement"){const o=s=>{const u=i.refinement(s,a);if(r.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Le:(s.status==="dirty"&&n.dirty(),o(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Le:(s.status==="dirty"&&n.dirty(),o(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!go(o))return o;const s=i.transform(o.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>go(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:n.value,value:s})):o);ot.assertNever(i)}};qn.create=(e,t,n)=>new qn({schema:e,typeName:je.ZodEffects,effect:t,...Be(n)}),qn.createWithPreprocess=(e,t,n)=>new qn({schema:t,effect:{type:"preprocess",transform:e},typeName:je.ZodEffects,...Be(n)});let Pr=class extends We{_parse(t){return this._getType(t)===we.undefined?cn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Pr.create=(e,t)=>new Pr({innerType:e,typeName:je.ZodOptional,...Be(t)});let Oi=class extends We{_parse(t){return this._getType(t)===we.null?cn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Oi.create=(e,t)=>new Oi({innerType:e,typeName:je.ZodNullable,...Be(t)});let Ro=class extends We{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===we.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};Ro.create=(e,t)=>new Ro({innerType:e,typeName:je.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Be(t)});let El=class extends We{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return yl(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new zn(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new zn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};El.create=(e,t)=>new El({innerType:e,typeName:je.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Be(t)});let _l=class extends We{_parse(t){if(this._getType(t)!==we.nan){const r=this._getOrReturnCtx(t);return _e(r,{code:me.invalid_type,expected:we.nan,received:r.parsedType}),Le}return{status:"valid",value:t.data}}};_l.create=e=>new _l({typeName:je.ZodNaN,...Be(e)});const VI=Symbol("zod_brand");let kg=class extends We{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}},Df=class $$ extends We{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Le:a.status==="dirty"?(n.dirty(),bg(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Le:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new $$({in:t,out:n,typeName:je.ZodPipeline})}},kl=class extends We{_parse(t){const n=this._def.innerType._parse(t);return go(n)&&(n.value=Object.freeze(n.value)),n}};kl.create=(e,t)=>new kl({innerType:e,typeName:je.ZodReadonly,...Be(t)});const Tg=(e,t={},n)=>e?ea.create().superRefine((r,i)=>{var a,o;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,u=(o=(a=s.fatal)!==null&&a!==void 0?a:n)!==null&&o!==void 0?o:!0,l=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...l,fatal:u})}}):ea.create(),HI={object:Rn.lazycreate};var je;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(je||(je={}));const ZI=(e,t={message:`Input not instance of ${e.name}`})=>Tg(n=>n instanceof e,t),Og=Qi.create,Cg=bo.create,KI=_l.create,GI=wo.create,$g=xo.create,YI=So.create,JI=gl.create,XI=Eo.create,QI=_o.create,eR=ea.create,tR=ki.create,nR=Ar.create,rR=bl.create,iR=Ti.create,aR=Rn.create,oR=Rn.strictCreate,sR=ko.create,lR=xg.create,uR=To.create,cR=Yr.create,fR=Sg.create,dR=xl.create,pR=Sl.create,hR=Eg.create,mR=Oo.create,vR=Co.create,yR=$o.create,gR=Io.create,bR=na.create,Ig=qn.create,wR=Pr.create,xR=Oi.create,SR=qn.createWithPreprocess,ER=Df.create;var ke=Object.freeze({__proto__:null,defaultErrorMap:yo,setErrorMap:AI,getErrorMap:ml,makeIssue:vl,EMPTY_PATH:PI,addIssueToContext:_e,ParseStatus:mn,INVALID:Le,DIRTY:bg,OK:cn,isAborted:If,isDirty:Rf,isValid:go,isAsync:yl,get util(){return ot},get objectUtil(){return $f},ZodParsedType:we,getParsedType:Gr,ZodType:We,ZodString:Qi,ZodNumber:bo,ZodBigInt:wo,ZodBoolean:xo,ZodDate:So,ZodSymbol:gl,ZodUndefined:Eo,ZodNull:_o,ZodAny:ea,ZodUnknown:ki,ZodNever:Ar,ZodVoid:bl,ZodArray:Ti,ZodObject:Rn,ZodUnion:ko,ZodDiscriminatedUnion:xg,ZodIntersection:To,ZodTuple:Yr,ZodRecord:Sg,ZodMap:xl,ZodSet:Sl,ZodFunction:Eg,ZodLazy:Oo,ZodLiteral:Co,ZodEnum:$o,ZodNativeEnum:Io,ZodPromise:na,ZodEffects:qn,ZodTransformer:qn,ZodOptional:Pr,ZodNullable:Oi,ZodDefault:Ro,ZodCatch:El,ZodNaN:_l,BRAND:VI,ZodBranded:kg,ZodPipeline:Df,ZodReadonly:kl,custom:Tg,Schema:We,ZodSchema:We,late:HI,get ZodFirstPartyTypeKind(){return je},coerce:{string:e=>Qi.create({...e,coerce:!0}),number:e=>bo.create({...e,coerce:!0}),boolean:e=>xo.create({...e,coerce:!0}),bigint:e=>wo.create({...e,coerce:!0}),date:e=>So.create({...e,coerce:!0})},any:eR,array:iR,bigint:GI,boolean:$g,date:YI,discriminatedUnion:lR,effect:Ig,enum:yR,function:hR,instanceof:ZI,intersection:uR,lazy:mR,literal:vR,map:dR,nan:KI,nativeEnum:gR,never:nR,null:QI,nullable:xR,number:Cg,object:aR,oboolean:()=>$g().optional(),onumber:()=>Cg().optional(),optional:wR,ostring:()=>Og().optional(),pipeline:ER,preprocess:SR,promise:bR,record:fR,set:pR,strictObject:oR,string:Og,symbol:JI,transformer:Ig,tuple:cR,undefined:XI,union:sR,unknown:tR,void:rR,NEVER:Le,ZodIssueCode:me,quotelessJson:RI,ZodError:zn});const ra=ke.object({title:ke.string().optional(),link:ke.string().optional()}),jf=ke.object({color:ke.string().optional(),variant:ke.enum(["soft","solid"]).optional(),themeMode:ke.enum(["light","dark"]).optional(),fontFamily:ke.enum(["rubik","inter","ibm","fira"]).optional(),radius:ke.number().min(.5).max(4).optional()}),Rg=ke.object({composerPlaceholder:ke.string().optional(),botName:ke.string().optional(),botAvatar:ke.string().optional(),botDescription:ke.string().optional(),website:ra.optional(),email:ra.optional(),phone:ra.optional(),privacyPolicy:ra.optional(),termsOfService:ra.optional(),showPoweredBy:ke.boolean().optional(),storageLocation:ke.enum(["localStorage","sessionStorage"]).optional()}).merge(jf),Ag=ke.enum(["heading1","heading2","heading3","text","horizontalRule","link","italic","bold","orderedList","unorderedList","listItem","lineBreak","pre"]),Pg=ke.object({}).passthrough().transform(e=>e),ve=ke.object({className:ke.string().optional(),style:Pg.optional()}),Tl=ke.object({container:ve.optional(),image:ve.optional(),fallback:ve.optional()}),Dg=ke.object({button:ve.optional(),text:ke.record(Ag,ve.optional()),image:ke.object({image:ve.optional(),placeholder:ve.optional()}).optional(),audio:ve.optional(),video:ve.optional(),file:ke.object({container:ve.optional(),title:ve.optional(),icon:ve.optional()}).optional(),location:ke.object({container:ve.optional(),title:ve.optional(),icon:ve.optional()}).optional(),column:ve.optional(),row:ve.optional(),bubble:ve.optional(),carousel:ke.object({container:ve.optional(),slidesContainer:ve.optional(),backButton:ve.optional(),nextButton:ve.optional()}).optional(),dropdown:ke.object({button:ke.object({container:ve.optional(),icon:ve.optional(),text:ve.optional()}).optional(),content:ke.object({container:ve.optional(),item:ve.optional()}).optional()}).optional()}),jg=ke.object({container:ve.optional(),modal:ke.object({overlay:ve.optional(),container:ve.optional(),dialog:ke.object({container:ve.optional(),title:ke.object({container:ve.optional(),text:ve.optional(),closeIcon:ve.optional()}).optional(),content:ve.optional(),newConversation:ke.object({text:ve.optional(),button:ve.optional()}).optional()}).optional()}).optional(),notification:ke.object({container:ve.optional(),title:ve.optional(),description:ve.optional(),icon:ve.optional(),closeIcon:ve.optional()}).optional(),header:ke.object({container:ve.optional(),content:ke.object({container:ve.optional(),title:ve.optional(),description:ve.optional(),avatar:Tl.optional(),actions:ke.object({container:ve.optional(),icons:ve.optional()}).optional()}),expandedContent:ke.object({container:ve.optional(),group:ve.optional(),descriptionItems:ke.object({container:ve.optional(),icon:ve.optional(),text:ve.optional(),link:ve.optional(),poweredBy:ve.optional()}).optional()}).optional(),description:ke.object({container:ve.optional(),title:ve.optional(),subtitle:ve.optional()}).optional(),newConversationIcon:ve.optional()}).optional(),composer:ke.object({container:ve.optional(),input:ve.optional(),uploadButton:ke.object({container:ve.optional(),icon:ve.optional()}).optional(),button:ke.object({container:ve.optional(),icon:ve.optional()}).optional()}).optional(),fab:ke.object({icon:ve.optional(),container:ve.optional()}).optional(),messageList:ke.object({scrollbar:ke.object({container:ve.optional(),viewport:ve.optional(),thumb:ve.optional(),corner:ve.optional(),background:ve.optional()}).optional(),container:ve.optional(),marquee:ke.object({content:ve.optional(),title:ve.optional(),description:ve.optional(),avatar:Tl.optional(),container:ve.optional()}).optional(),scrollDownButton:ke.object({container:ve.optional(),button:ve.optional(),icon:ve.optional()}).optional()}).optional(),message:ke.object({container:ve.optional(),avatar:Tl.optional(),blocks:Dg.optional()}).optional(),loadingIndicator:ke.object({container:ve.optional(),loader:ve.optional()}).optional()}),Ng=ke.enum(["opened","closed","initial"]),Mg=ke.object({name:ke.string().optional(),pictureUrl:ke.string().optional(),data:ke.record(ke.unknown()).optional(),userKey:ke.string().optional()}),Fg=ke.object({configuration:Rg.optional().catch(void 0),theme:jg.optional().catch(void 0),style:ke.string().optional().catch(void 0),user:Mg.optional().catch(void 0)}),_R=Fg.extend({clientId:ke.string(),botId:ke.string(),selector:ke.string().optional().catch(void 0),webchatScriptUrl:ke.string().optional().catch(void 0),fabScriptUrl:ke.string().optional().catch(void 0),pushpinUrl:ke.string().optional().catch(void 0),defaultState:Ng.optional().catch(void 0)});function Lg(e){const{fontFamily:t,radius:n,themeMode:r,variant:i,color:a}=jf.parse(e);let o={},s={};if(a){const c=yg(a),f=r==="dark"?ig(c):c,p=yg(tI(nI(Of(a)))),d=r==="dark"?ig(p):p,m=r==="dark"?"#101010":"#fdfdfd";s=Object.entries({...f,1:m}).reduce((y,[v,b])=>({...y,[`--bpPrimary-${v}`]:b}),{});const h=Object.entries({...d,1:m}).reduce((y,[v,b])=>({...y,[`--bpGray-${v}`]:b}),{});o={...s,...h}}n&&(o={...o,"--bpRadius-scale":n.toString()});const u=s?cg(s["--bpPrimary-600"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)",l=i==="solid"?{"--header-bg":"var(--bpPrimary-600)","--header-bg-hover":"var(--bpPrimary-700)","--header-hover-dark":"var(--bpPrimary-800)","--header-title":u,"--header-description":u,"--header-description-icon":u,"--header-description-link":u,"--header-avatar-bg":"var(--bpPrimary-300)","--header-avatar-text":"var(--bpPrimary-700)","--message-bg":"var(--bpPrimary-600)","--message-bg-hover":"var(--bpPrimary-700)","--message-text":u,"--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-50)","--button-bg-hover":"var(--bpPrimary-100)","--button-text":"var(--bpPrimary-800)","--fab-bg":"var(--bpPrimary-600)","--fab-bg-hover":"var(--bpPrimary-700)","--fab-icon":u}:{"--header-bg":"var(--bpGray-50)","--header-bg-hover":"var(--bpGray-100)","--header-hover-dark":"var(--bpGray-200)","--header-title":"var(--bpGray-900)","--header-description":"var(--bpGray-800)","--header-description-icon":"var(--bpPrimary-700)","--header-description-link":"var(--bpPrimary-800)","--header-avatar-bg":"var(--bpPrimary-600)","--header-avatar-text":"var(--bpPrimary-50)","--message-bg":"var(--bpPrimary-100)","--message-bg-hover":"var(--bpPrimary-200)","--message-text":"var(--bpPrimary-900)","--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-500)","--button-bg-hover":"var(--bpPrimary-600)","--button-text":s?cg(s["--bpPrimary-500"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)","--fab-bg":"var(--bpPrimary-100)","--fab-bg-hover":"var(--bpPrimary-200)","--fab-icon":"var(--bpPrimary-700)"};return o={...o,...l},fg(":root",o)+(t?fg(".bpFont",{"font-family":`var(--${t}-font)`}):"")}const kR=(e,t={})=>new Promise((n,r)=>{if(typeof window>"u")return r("Window is not defined");if(!e)return r("Url is not defined");let i=null;const a=new Image;a.addEventListener("load",()=>{i&&clearTimeout(i),n({width:a.naturalWidth,height:a.naturalHeight})}),a.addEventListener("error",o=>{i&&clearTimeout(i),r(`${o.type}: ${o.message}`)}),a.src=e,t.timeout&&(i=setTimeout(()=>r("Timeout"),t.timeout))}),Ol=j.forwardRef(({userId:e,src:t,container:n,image:r,fallback:i,...a},o)=>{const s=dg(e??"",15);return $.jsxs(_f,{ref:o,"data-color":s,...n,...a,children:[$.jsx(kf,{src:t,...r}),$.jsx(Tf,{...i,children:typeof a.children=="string"?a.children[0]:a.children})]})});Ol.displayName="Avatar";function Tue(){}function Oue(){}function TR(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const OR=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,CR=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$R={};function Bg(e,t){return($R.jsx?CR:OR).test(e)}const IR=/[ \t\n\f\r]/g;function RR(e){return typeof e=="object"?e.type==="text"?Ug(e.value):!1:Ug(e)}function Ug(e){return e.replace(IR,"")===""}class Ao{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Ao.prototype.property={},Ao.prototype.normal={},Ao.prototype.space=null;function zg(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new Ao(n,r,t)}function Nf(e){return e.toLowerCase()}class An{constructor(t,n){this.property=t,this.attribute=n}}An.prototype.space=null,An.prototype.boolean=!1,An.prototype.booleanish=!1,An.prototype.overloadedBoolean=!1,An.prototype.number=!1,An.prototype.commaSeparated=!1,An.prototype.spaceSeparated=!1,An.prototype.commaOrSpaceSeparated=!1,An.prototype.mustUseProperty=!1,An.prototype.defined=!1;let AR=0;const Ue=Ci(),jt=Ci(),qg=Ci(),de=Ci(),wt=Ci(),ia=Ci(),En=Ci();function Ci(){return 2**++AR}const Mf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ue,booleanish:jt,commaOrSpaceSeparated:En,commaSeparated:ia,number:de,overloadedBoolean:qg,spaceSeparated:wt},Symbol.toStringTag,{value:"Module"})),Ff=Object.keys(Mf);class Lf extends An{constructor(t,n,r,i){let a=-1;if(super(t,n),Wg(this,"space",i),typeof r=="number")for(;++a<Ff.length;){const o=Ff[a];Wg(this,Ff[a],(r&Mf[o])===Mf[o])}}}Lf.prototype.defined=!0;function Wg(e,t,n){n&&(e[t]=n)}const PR={}.hasOwnProperty;function aa(e){const t={},n={};let r;for(r in e.properties)if(PR.call(e.properties,r)){const i=e.properties[r],a=new Lf(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Nf(r)]=r,n[Nf(a.attribute)]=r}return new Ao(t,n,e.space)}const Vg=aa({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Hg=aa({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Zg(e,t){return t in e?e[t]:t}function Kg(e,t){return Zg(e,t.toLowerCase())}const Gg=aa({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Kg,properties:{xmlns:null,xmlnsXLink:null}}),Yg=aa({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:jt,ariaAutoComplete:null,ariaBusy:jt,ariaChecked:jt,ariaColCount:de,ariaColIndex:de,ariaColSpan:de,ariaControls:wt,ariaCurrent:null,ariaDescribedBy:wt,ariaDetails:null,ariaDisabled:jt,ariaDropEffect:wt,ariaErrorMessage:null,ariaExpanded:jt,ariaFlowTo:wt,ariaGrabbed:jt,ariaHasPopup:null,ariaHidden:jt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:wt,ariaLevel:de,ariaLive:null,ariaModal:jt,ariaMultiLine:jt,ariaMultiSelectable:jt,ariaOrientation:null,ariaOwns:wt,ariaPlaceholder:null,ariaPosInSet:de,ariaPressed:jt,ariaReadOnly:jt,ariaRelevant:null,ariaRequired:jt,ariaRoleDescription:wt,ariaRowCount:de,ariaRowIndex:de,ariaRowSpan:de,ariaSelected:jt,ariaSetSize:de,ariaSort:null,ariaValueMax:de,ariaValueMin:de,ariaValueNow:de,ariaValueText:null,role:null}}),DR=aa({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Kg,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ia,acceptCharset:wt,accessKey:wt,action:null,allow:null,allowFullScreen:Ue,allowPaymentRequest:Ue,allowUserMedia:Ue,alt:null,as:null,async:Ue,autoCapitalize:null,autoComplete:wt,autoFocus:Ue,autoPlay:Ue,blocking:wt,capture:null,charSet:null,checked:Ue,cite:null,className:wt,cols:de,colSpan:null,content:null,contentEditable:jt,controls:Ue,controlsList:wt,coords:de|ia,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ue,defer:Ue,dir:null,dirName:null,disabled:Ue,download:qg,draggable:jt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ue,formTarget:null,headers:wt,height:de,hidden:Ue,high:de,href:null,hrefLang:null,htmlFor:wt,httpEquiv:wt,id:null,imageSizes:null,imageSrcSet:null,inert:Ue,inputMode:null,integrity:null,is:null,isMap:Ue,itemId:null,itemProp:wt,itemRef:wt,itemScope:Ue,itemType:wt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ue,low:de,manifest:null,max:null,maxLength:de,media:null,method:null,min:null,minLength:de,multiple:Ue,muted:Ue,name:null,nonce:null,noModule:Ue,noValidate:Ue,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ue,optimum:de,pattern:null,ping:wt,placeholder:null,playsInline:Ue,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ue,referrerPolicy:null,rel:wt,required:Ue,reversed:Ue,rows:de,rowSpan:de,sandbox:wt,scope:null,scoped:Ue,seamless:Ue,selected:Ue,shadowRootClonable:Ue,shadowRootDelegatesFocus:Ue,shadowRootMode:null,shape:null,size:de,sizes:null,slot:null,span:de,spellCheck:jt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:de,step:null,style:null,tabIndex:de,target:null,title:null,translate:null,type:null,typeMustMatch:Ue,useMap:null,value:jt,width:de,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:wt,axis:null,background:null,bgColor:null,border:de,borderColor:null,bottomMargin:de,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ue,declare:Ue,event:null,face:null,frame:null,frameBorder:null,hSpace:de,leftMargin:de,link:null,longDesc:null,lowSrc:null,marginHeight:de,marginWidth:de,noResize:Ue,noHref:Ue,noShade:Ue,noWrap:Ue,object:null,profile:null,prompt:null,rev:null,rightMargin:de,rules:null,scheme:null,scrolling:jt,standby:null,summary:null,text:null,topMargin:de,valueType:null,version:null,vAlign:null,vLink:null,vSpace:de,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ue,disableRemotePlayback:Ue,prefix:null,property:null,results:de,security:null,unselectable:null}}),jR=aa({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:Zg,properties:{about:En,accentHeight:de,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:de,amplitude:de,arabicForm:null,ascent:de,attributeName:null,attributeType:null,azimuth:de,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:de,by:null,calcMode:null,capHeight:de,className:wt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:de,diffuseConstant:de,direction:null,display:null,dur:null,divisor:de,dominantBaseline:null,download:Ue,dx:null,dy:null,edgeMode:null,editable:null,elevation:de,enableBackground:null,end:null,event:null,exponent:de,externalResourcesRequired:null,fill:null,fillOpacity:de,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ia,g2:ia,glyphName:ia,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:de,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:de,horizOriginX:de,horizOriginY:de,id:null,ideographic:de,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:de,k:de,k1:de,k2:de,k3:de,k4:de,kernelMatrix:En,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:de,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:de,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:de,overlineThickness:de,paintOrder:null,panose1:null,path:null,pathLength:de,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:wt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:de,pointsAtY:de,pointsAtZ:de,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:En,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:En,rev:En,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:En,requiredFeatures:En,requiredFonts:En,requiredFormats:En,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:de,specularExponent:de,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:de,strikethroughThickness:de,string:null,stroke:null,strokeDashArray:En,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:de,strokeOpacity:de,strokeWidth:null,style:null,surfaceScale:de,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:En,tabIndex:de,tableValues:null,target:null,targetX:de,targetY:de,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:En,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:de,underlineThickness:de,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:de,values:null,vAlphabetic:de,vMathematical:de,vectorEffect:null,vHanging:de,vIdeographic:de,version:null,vertAdvY:de,vertOriginX:de,vertOriginY:de,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:de,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),NR=/^data[-\w.:]+$/i,Jg=/-[a-z]/g,MR=/[A-Z]/g;function FR(e,t){const n=Nf(t);let r=t,i=An;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&NR.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Jg,BR);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Jg.test(a)){let o=a.replace(MR,LR);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=Lf}return new i(r,t)}function LR(e){return"-"+e.toLowerCase()}function BR(e){return e.charAt(1).toUpperCase()}const UR={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},zR=zg([Hg,Vg,Gg,Yg,DR],"html"),Bf=zg([Hg,Vg,Gg,Yg,jR],"svg");function qR(e){return e.join(" ").trim()}var Xg={},Qg=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,WR=/\n/g,VR=/^\s*/,HR=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,ZR=/^:\s*/,KR=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,GR=/^[;\s]*/,YR=/^\s+|\s+$/g,JR=`
31
- `,eb="/",tb="*",$i="",XR="comment",QR="declaration",eA=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(m){var h=m.match(WR);h&&(n+=h.length);var y=m.lastIndexOf(JR);r=~y?m.length-y:r+m.length}function a(){var m={line:n,column:r};return function(h){return h.position=new o(m),l(),h}}function o(m){this.start=m,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(m){var h=new Error(t.source+":"+n+":"+r+": "+m);if(h.reason=m,h.filename=t.source,h.line=n,h.column=r,h.source=e,!t.silent)throw h}function u(m){var h=m.exec(e);if(h){var y=h[0];return i(y),e=e.slice(y.length),h}}function l(){u(VR)}function c(m){var h;for(m=m||[];h=f();)h!==!1&&m.push(h);return m}function f(){var m=a();if(!(eb!=e.charAt(0)||tb!=e.charAt(1))){for(var h=2;$i!=e.charAt(h)&&(tb!=e.charAt(h)||eb!=e.charAt(h+1));)++h;if(h+=2,$i===e.charAt(h-1))return s("End of comment missing");var y=e.slice(2,h-2);return r+=2,i(y),e=e.slice(h),r+=2,m({type:XR,comment:y})}}function p(){var m=a(),h=u(HR);if(h){if(f(),!u(ZR))return s("property missing ':'");var y=u(KR),v=m({type:QR,property:nb(h[0].replace(Qg,$i)),value:y?nb(y[0].replace(Qg,$i)):$i});return u(GR),v}}function d(){var m=[];c(m);for(var h;h=p();)h!==!1&&(m.push(h),c(m));return m}return l(),d()};function nb(e){return e?e.replace(YR,$i):$i}var tA=mt&&mt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xg,"__esModule",{value:!0});var rb=Xg.default=rA,nA=tA(eA);function rA(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,nA.default)(e),i=typeof t=="function";return r.forEach(function(a){if(a.type==="declaration"){var o=a.property,s=a.value;i?t(o,s,a):s&&(n=n||{},n[o]=s)}}),n}const iA=rb.default||rb,ib=ab("end"),Uf=ab("start");function ab(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function aA(e){const t=Uf(e),n=ib(e);if(t&&n)return{start:t,end:n}}function Po(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ob(e.position):"start"in e||"end"in e?ob(e):"line"in e||"column"in e?zf(e):""}function zf(e){return sb(e&&e.line)+":"+sb(e&&e.column)}function ob(e){return zf(e&&e.start)+"-"+zf(e&&e.end)}function sb(e){return e&&typeof e=="number"?e:1}class tn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},o=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(o=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?a.ruleId=r:(a.source=r.slice(0,u),a.ruleId=r.slice(u+1))}if(!a.place&&a.ancestors&&a.ancestors){const u=a.ancestors[a.ancestors.length-1];u&&(a.place=u.position)}const s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=Po(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}tn.prototype.file="",tn.prototype.name="",tn.prototype.reason="",tn.prototype.message="",tn.prototype.stack="",tn.prototype.column=void 0,tn.prototype.line=void 0,tn.prototype.ancestors=void 0,tn.prototype.cause=void 0,tn.prototype.fatal=void 0,tn.prototype.place=void 0,tn.prototype.ruleId=void 0,tn.prototype.source=void 0;const qf={}.hasOwnProperty,oA=new Map,sA=/[A-Z]/g,lA=/-([a-z])/g,uA=new Set(["table","tbody","thead","tfoot","tr"]),cA=new Set(["td","th"]),lb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function fA(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=bA(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=gA(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Bf:zR,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=ub(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function ub(e,t,n){if(t.type==="element")return dA(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return pA(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return mA(e,t,n);if(t.type==="mdxjsEsm")return hA(e,t);if(t.type==="root")return vA(e,t,n);if(t.type==="text")return yA(e,t)}function dA(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Bf,e.schema=i),e.ancestors.push(t);const a=fb(e,t.tagName,!1),o=wA(e,t);let s=Vf(e,t);return uA.has(t.tagName)&&(s=s.filter(function(u){return typeof u=="string"?!RR(u):!0})),cb(e,o,a,t),Wf(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function pA(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Do(e,t.position)}function hA(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Do(e,t.position)}function mA(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Bf,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:fb(e,t.name,!0),o=xA(e,t),s=Vf(e,t);return cb(e,o,a,t),Wf(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function vA(e,t,n){const r={};return Wf(r,Vf(e,t)),e.create(t,e.Fragment,r,n)}function yA(e,t){return t.value}function cb(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Wf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function gA(e,t,n){return r;function r(i,a,o,s){const l=Array.isArray(o.children)?n:t;return s?l(a,o,s):l(a,o)}}function bA(e,t){return n;function n(r,i,a,o){const s=Array.isArray(a.children),u=Uf(r);return t(i,a,o,s,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function wA(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&qf.call(t.properties,i)){const a=SA(e,i,t.properties[i]);if(a){const[o,s]=a;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&cA.has(t.tagName)?r=s:n[o]=s}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function xA(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const o=a.expression;o.type;const s=o.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else Do(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else Do(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Vf(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:oA;for(;++r<t.children.length;){const a=t.children[r];let o;if(e.passKeys){const u=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(u){const l=i.get(u)||0;o=u+"-"+l,i.set(u,l+1)}}const s=ub(e,a,o);s!==void 0&&n.push(s)}return n}function SA(e,t,n){const r=FR(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?TR(n):qR(n)),r.property==="style"){let i=typeof n=="object"?n:EA(e,String(n));return e.stylePropertyNameCase==="css"&&(i=_A(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?UR[r.property]||r.property:r.attribute,n]}}function EA(e,t){const n={};try{iA(t,r)}catch(i){if(!e.ignoreInvalidStyle){const a=i,o=new tn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=lb+"#cannot-parse-style-attribute",o}}return n;function r(i,a){let o=i;o.slice(0,2)!=="--"&&(o.slice(0,4)==="-ms-"&&(o="ms-"+o.slice(4)),o=o.replace(lA,TA)),n[o]=a}}function fb(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,o;for(;++a<i.length;){const s=Bg(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};o=o?{type:"MemberExpression",object:o,property:s,computed:!!(a&&s.type==="Literal"),optional:!1}:s}r=o}else r=Bg(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return qf.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Do(e)}function Do(e,t){const n=new tn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=lb+"#cannot-handle-mdx-estrees-without-createevaluater",n}function _A(e){const t={};let n;for(n in e)qf.call(e,n)&&(t[kA(n)]=e[n]);return t}function kA(e){let t=e.replace(sA,OA);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function TA(e,t){return t.toUpperCase()}function OA(e){return"-"+e.toLowerCase()}const Hf={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},CA={};function Zf(e,t){const n=CA,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return db(e,r,i)}function db(e,t,n){if($A(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return pb(e.children,t,n)}return Array.isArray(e)?pb(e,t,n):""}function pb(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=db(e[i],t,n);return r.join("")}function $A(e){return!!(e&&typeof e=="object")}const hb=document.createElement("i");function Kf(e){const t="&"+e+";";hb.innerHTML=t;const n=hb.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Pn(e,t,n,r){const i=e.length;let a=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Dn(e,t){return e.length>0?(Pn(e,e.length,0,t),e):t}const mb={}.hasOwnProperty;function vb(e){const t={};let n=-1;for(;++n<e.length;)IA(t,e[n]);return t}function IA(e,t){let n;for(n in t){const i=(mb.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){mb.call(i,o)||(i[o]=[]);const s=a[o];RA(i[o],Array.isArray(s)?s:s?[s]:[])}}}function RA(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Pn(e,0,0,r)}function yb(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Wn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const fn=Jr(/[A-Za-z]/),nn=Jr(/[\dA-Za-z]/),AA=Jr(/[#-'*+\--9=?A-Z^-~]/);function Cl(e){return e!==null&&(e<32||e===127)}const Gf=Jr(/\d/),PA=Jr(/[\dA-Fa-f]/),DA=Jr(/[!-/:-@[-`{-~]/);function De(e){return e!==null&&e<-2}function yt(e){return e!==null&&(e<0||e===32)}function Ye(e){return e===-2||e===-1||e===32}const $l=Jr(new RegExp("\\p{P}|\\p{S}","u")),Ii=Jr(/\s/);function Jr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function oa(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let o="";if(a===37&&nn(e.charCodeAt(n+1))&&nn(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const s=e.charCodeAt(n+1);a<56320&&s>56319&&s<57344?(o=String.fromCharCode(a,s),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function et(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(u){return Ye(u)?(e.enter(n),s(u)):t(u)}function s(u){return Ye(u)&&a++<i?(e.consume(u),s):(e.exit(n),t(u))}}const jA={tokenize:NA};function NA(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),et(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),a(s)}function a(s){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,o(s)}function o(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return De(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),o)}}const MA={tokenize:FA},gb={tokenize:LA};function FA(e){const t=this,n=[];let r=0,i,a,o;return s;function s(w){if(r<n.length){const k=n[r];return t.containerState=k[1],e.attempt(k[0].continuation,u,l)(w)}return l(w)}function u(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&b();const k=t.events.length;let E=k,_;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){_=t.events[E][1].end;break}v(r);let C=k;for(;C<t.events.length;)t.events[C][1].end=Object.assign({},_),C++;return Pn(t.events,E+1,0,t.events.slice(k)),t.events.length=C,l(w)}return s(w)}function l(w){if(r===n.length){if(!i)return p(w);if(i.currentConstruct&&i.currentConstruct.concrete)return m(w);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(gb,c,f)(w)}function c(w){return i&&b(),v(r),p(w)}function f(w){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(w)}function p(w){return t.containerState={},e.attempt(gb,d,m)(w)}function d(w){return r++,n.push([t.currentConstruct,t.containerState]),p(w)}function m(w){if(w===null){i&&b(),v(0),e.consume(w);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:a,_tokenizer:i}),h(w)}function h(w){if(w===null){y(e.exit("chunkFlow"),!0),v(0),e.consume(w);return}return De(w)?(e.consume(w),y(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(w),h)}function y(w,k){const E=t.sliceStream(w);if(k&&E.push(null),w.previous=a,a&&(a.next=w),a=w,i.defineSkip(w.start),i.write(E),t.parser.lazy[w.start.line]){let _=i.events.length;for(;_--;)if(i.events[_][1].start.offset<o&&(!i.events[_][1].end||i.events[_][1].end.offset>o))return;const C=t.events.length;let z=C,B,T;for(;z--;)if(t.events[z][0]==="exit"&&t.events[z][1].type==="chunkFlow"){if(B){T=t.events[z][1].end;break}B=!0}for(v(r),_=C;_<t.events.length;)t.events[_][1].end=Object.assign({},T),_++;Pn(t.events,z+1,0,t.events.slice(C)),t.events.length=_}}function v(w){let k=n.length;for(;k-- >w;){const E=n[k];t.containerState=E[1],E[0].exit.call(t,e)}n.length=w}function b(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function LA(e,t,n){return et(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Il(e){if(e===null||yt(e)||Ii(e))return 1;if($l(e))return 2}function Rl(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Yf={name:"attention",tokenize:UA,resolveAll:BA};function BA(e,t){let n=-1,r,i,a,o,s,u,l,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),p=Object.assign({},e[n][1].start);bb(f,-u),bb(p,u),o={type:u>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},s={type:u>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:p},a={type:u>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:u>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},o.start),e[n][1].start=Object.assign({},s.end),l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Dn(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=Dn(l,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",a,t]]),l=Dn(l,Rl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Dn(l,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,l=Dn(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,Pn(e,r-1,n-r+3,l),n=r+l.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function UA(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Il(r);let a;return o;function o(u){return a=u,e.enter("attentionSequence"),s(u)}function s(u){if(u===a)return e.consume(u),s;const l=e.exit("attentionSequence"),c=Il(u),f=!c||c===2&&i||n.includes(u),p=!i||i===2&&c||n.includes(r);return l._open=!!(a===42?f:f&&(i||!p)),l._close=!!(a===42?p:p&&(c||!f)),t(u)}}function bb(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const zA={name:"autolink",tokenize:qA};function qA(e,t,n){let r=0;return i;function i(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(d){return fn(d)?(e.consume(d),o):d===64?n(d):l(d)}function o(d){return d===43||d===45||d===46||nn(d)?(r=1,s(d)):l(d)}function s(d){return d===58?(e.consume(d),r=0,u):(d===43||d===45||d===46||nn(d))&&r++<32?(e.consume(d),s):(r=0,l(d))}function u(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||Cl(d)?n(d):(e.consume(d),u)}function l(d){return d===64?(e.consume(d),c):AA(d)?(e.consume(d),l):n(d)}function c(d){return nn(d)?f(d):n(d)}function f(d){return d===46?(e.consume(d),r=0,c):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):p(d)}function p(d){if((d===45||nn(d))&&r++<63){const m=d===45?p:f;return e.consume(d),m}return n(d)}}const jo={tokenize:WA,partial:!0};function WA(e,t,n){return r;function r(a){return Ye(a)?et(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||De(a)?t(a):n(a)}}const wb={name:"blockQuote",tokenize:VA,continuation:{tokenize:HA},exit:ZA};function VA(e,t,n){const r=this;return i;function i(o){if(o===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),a}return n(o)}function a(o){return Ye(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function HA(e,t,n){const r=this;return i;function i(o){return Ye(o)?et(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):a(o)}function a(o){return e.attempt(wb,t,n)(o)}}function ZA(e){e.exit("blockQuote")}const xb={name:"characterEscape",tokenize:KA};function KA(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return DA(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Sb={name:"characterReference",tokenize:GA};function GA(e,t,n){const r=this;let i=0,a,o;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),u}function u(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),a=31,o=nn,c(f))}function l(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=PA,c):(e.enter("characterReferenceValue"),a=7,o=Gf,c(f))}function c(f){if(f===59&&i){const p=e.exit("characterReferenceValue");return o===nn&&!Kf(r.sliceSerialize(p))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(f)&&i++<a?(e.consume(f),c):n(f)}}const Eb={tokenize:JA,partial:!0},_b={name:"codeFenced",tokenize:YA,concrete:!0};function YA(e,t,n){const r=this,i={tokenize:E,partial:!0};let a=0,o=0,s;return u;function u(_){return l(_)}function l(_){const C=r.events[r.events.length-1];return a=C&&C[1].type==="linePrefix"?C[2].sliceSerialize(C[1],!0).length:0,s=_,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(_)}function c(_){return _===s?(o++,e.consume(_),c):o<3?n(_):(e.exit("codeFencedFenceSequence"),Ye(_)?et(e,f,"whitespace")(_):f(_))}function f(_){return _===null||De(_)?(e.exit("codeFencedFence"),r.interrupt?t(_):e.check(Eb,h,k)(_)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(_))}function p(_){return _===null||De(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(_)):Ye(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),et(e,d,"whitespace")(_)):_===96&&_===s?n(_):(e.consume(_),p)}function d(_){return _===null||De(_)?f(_):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(_))}function m(_){return _===null||De(_)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(_)):_===96&&_===s?n(_):(e.consume(_),m)}function h(_){return e.attempt(i,k,y)(_)}function y(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),v}function v(_){return a>0&&Ye(_)?et(e,b,"linePrefix",a+1)(_):b(_)}function b(_){return _===null||De(_)?e.check(Eb,h,k)(_):(e.enter("codeFlowValue"),w(_))}function w(_){return _===null||De(_)?(e.exit("codeFlowValue"),b(_)):(e.consume(_),w)}function k(_){return e.exit("codeFenced"),t(_)}function E(_,C,z){let B=0;return T;function T(N){return _.enter("lineEnding"),_.consume(N),_.exit("lineEnding"),A}function A(N){return _.enter("codeFencedFence"),Ye(N)?et(_,W,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):W(N)}function W(N){return N===s?(_.enter("codeFencedFenceSequence"),F(N)):z(N)}function F(N){return N===s?(B++,_.consume(N),F):B>=o?(_.exit("codeFencedFenceSequence"),Ye(N)?et(_,L,"whitespace")(N):L(N)):z(N)}function L(N){return N===null||De(N)?(_.exit("codeFencedFence"),C(N)):z(N)}}}function JA(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const Jf={name:"codeIndented",tokenize:QA},XA={tokenize:eP,partial:!0};function QA(e,t,n){const r=this;return i;function i(l){return e.enter("codeIndented"),et(e,a,"linePrefix",5)(l)}function a(l){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?o(l):n(l)}function o(l){return l===null?u(l):De(l)?e.attempt(XA,o,u)(l):(e.enter("codeFlowValue"),s(l))}function s(l){return l===null||De(l)?(e.exit("codeFlowValue"),o(l)):(e.consume(l),s)}function u(l){return e.exit("codeIndented"),t(l)}}function eP(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):De(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):et(e,a,"linePrefix",5)(o)}function a(o){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):De(o)?i(o):n(o)}}const tP={name:"codeText",tokenize:iP,resolve:nP,previous:rP};function nP(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function rP(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function iP(e,t,n){let r=0,i,a;return o;function o(f){return e.enter("codeText"),e.enter("codeTextSequence"),s(f)}function s(f){return f===96?(e.consume(f),r++,s):(e.exit("codeTextSequence"),u(f))}function u(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),u):f===96?(a=e.enter("codeTextSequence"),i=0,c(f)):De(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("codeTextData"),l(f))}function l(f){return f===null||f===32||f===96||De(f)?(e.exit("codeTextData"),u(f)):(e.consume(f),l)}function c(f){return f===96?(e.consume(f),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(a.type="codeTextData",l(f))}}class aP{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&No(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),No(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),No(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);No(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);No(this.left,n.reverse())}}}function No(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function kb(e){const t={};let n=-1,r,i,a,o,s,u,l;const c=new aP(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,a=0,a<u.length&&u[a][1].type==="lineEndingBlank"&&(a+=2),a<u.length&&u[a][1].type==="content"))for(;++a<u.length&&u[a][1].type!=="content";)u[a][1].type==="chunkText"&&(u[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,oP(c,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--&&(o=c.get(a),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank");)o[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=a);i&&(r[1].end=Object.assign({},c.get(i)[1].start),s=c.slice(i,n),s.unshift(r),c.splice(i,n-i+1,s))}}return Pn(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function oP(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[],o=n._tokenizer||r.parser[n.contentType](n.start),s=o.events,u=[],l={};let c,f,p=-1,d=n,m=0,h=0;const y=[h];for(;d;){for(;e.get(++i)[1]!==d;);a.push(i),d._tokenizer||(c=r.sliceStream(d),d.next||c.push(null),f&&o.defineSkip(d.start),d._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(c),d._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),f=d,d=d.next}for(d=n;++p<s.length;)s[p][0]==="exit"&&s[p-1][0]==="enter"&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(h=p+1,y.push(h),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(o.events=[],d?(d._tokenizer=void 0,d.previous=void 0):y.pop(),p=y.length;p--;){const v=s.slice(y[p],y[p+1]),b=a.pop();u.push([b,b+v.length-1]),e.splice(b,2,v)}for(u.reverse(),p=-1;++p<u.length;)l[m+u[p][0]]=m+u[p][1],m+=u[p][1]-u[p][0]-1;return l}const sP={tokenize:cP,resolve:uP},lP={tokenize:fP,partial:!0};function uP(e){return kb(e),e}function cP(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?a(s):De(s)?e.check(lP,o,a)(s):(e.consume(s),i)}function a(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function o(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function fP(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),et(e,a,"linePrefix")}function a(o){if(o===null||De(o))return n(o);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function Tb(e,t,n,r,i,a,o,s,u){const l=u||Number.POSITIVE_INFINITY;let c=0;return f;function f(v){return v===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(v),e.exit(a),p):v===null||v===32||v===41||Cl(v)?n(v):(e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(v))}function p(v){return v===62?(e.enter(a),e.consume(v),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),d(v))}function d(v){return v===62?(e.exit("chunkString"),e.exit(s),p(v)):v===null||v===60||De(v)?n(v):(e.consume(v),v===92?m:d)}function m(v){return v===60||v===62||v===92?(e.consume(v),d):d(v)}function h(v){return!c&&(v===null||v===41||yt(v))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(v)):c<l&&v===40?(e.consume(v),c++,h):v===41?(e.consume(v),c--,h):v===null||v===32||v===40||Cl(v)?n(v):(e.consume(v),v===92?y:h)}function y(v){return v===40||v===41||v===92?(e.consume(v),h):h(v)}}function Ob(e,t,n,r,i,a){const o=this;let s=0,u;return l;function l(d){return e.enter(r),e.enter(i),e.consume(d),e.exit(i),e.enter(a),c}function c(d){return s>999||d===null||d===91||d===93&&!u||d===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?n(d):d===93?(e.exit(a),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):De(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===null||d===91||d===93||De(d)||s++>999?(e.exit("chunkString"),c(d)):(e.consume(d),u||(u=!Ye(d)),d===92?p:f)}function p(d){return d===91||d===92||d===93?(e.consume(d),s++,f):f(d)}}function Cb(e,t,n,r,i,a){let o;return s;function s(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),o=p===40?41:p,u):n(p)}function u(p){return p===o?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(a),l(p))}function l(p){return p===o?(e.exit(a),u(o)):p===null?n(p):De(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),et(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===o||p===null||De(p)?(e.exit("chunkString"),l(p)):(e.consume(p),p===92?f:c)}function f(p){return p===o||p===92?(e.consume(p),c):c(p)}}function Mo(e,t){let n;return r;function r(i){return De(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Ye(i)?et(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const dP={name:"definition",tokenize:hP},pP={tokenize:mP,partial:!0};function hP(e,t,n){const r=this;let i;return a;function a(d){return e.enter("definition"),o(d)}function o(d){return Ob.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function s(d){return i=Wn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),u):n(d)}function u(d){return yt(d)?Mo(e,l)(d):l(d)}function l(d){return Tb(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function c(d){return e.attempt(pP,f,f)(d)}function f(d){return Ye(d)?et(e,p,"whitespace")(d):p(d)}function p(d){return d===null||De(d)?(e.exit("definition"),r.parser.defined.push(i),t(d)):n(d)}}function mP(e,t,n){return r;function r(s){return yt(s)?Mo(e,i)(s):n(s)}function i(s){return Cb(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return Ye(s)?et(e,o,"whitespace")(s):o(s)}function o(s){return s===null||De(s)?t(s):n(s)}}const vP={name:"hardBreakEscape",tokenize:yP};function yP(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return De(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const gP={name:"headingAtx",tokenize:wP,resolve:bP};function bP(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Pn(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function wP(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),a(c)}function a(c){return e.enter("atxHeadingSequence"),o(c)}function o(c){return c===35&&r++<6?(e.consume(c),o):c===null||yt(c)?(e.exit("atxHeadingSequence"),s(c)):n(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),u(c)):c===null||De(c)?(e.exit("atxHeading"),t(c)):Ye(c)?et(e,s,"whitespace")(c):(e.enter("atxHeadingText"),l(c))}function u(c){return c===35?(e.consume(c),u):(e.exit("atxHeadingSequence"),s(c))}function l(c){return c===null||c===35||yt(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),l)}}const xP=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],$b=["pre","script","style","textarea"],SP={name:"htmlFlow",tokenize:TP,resolveTo:kP,concrete:!0},EP={tokenize:CP,partial:!0},_P={tokenize:OP,partial:!0};function kP(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function TP(e,t,n){const r=this;let i,a,o,s,u;return l;function l(S){return c(S)}function c(S){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(S),f}function f(S){return S===33?(e.consume(S),p):S===47?(e.consume(S),a=!0,h):S===63?(e.consume(S),i=3,r.interrupt?t:g):fn(S)?(e.consume(S),o=String.fromCharCode(S),y):n(S)}function p(S){return S===45?(e.consume(S),i=2,d):S===91?(e.consume(S),i=5,s=0,m):fn(S)?(e.consume(S),i=4,r.interrupt?t:g):n(S)}function d(S){return S===45?(e.consume(S),r.interrupt?t:g):n(S)}function m(S){const Z="CDATA[";return S===Z.charCodeAt(s++)?(e.consume(S),s===Z.length?r.interrupt?t:W:m):n(S)}function h(S){return fn(S)?(e.consume(S),o=String.fromCharCode(S),y):n(S)}function y(S){if(S===null||S===47||S===62||yt(S)){const Z=S===47,J=o.toLowerCase();return!Z&&!a&&$b.includes(J)?(i=1,r.interrupt?t(S):W(S)):xP.includes(o.toLowerCase())?(i=6,Z?(e.consume(S),v):r.interrupt?t(S):W(S)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(S):a?b(S):w(S))}return S===45||nn(S)?(e.consume(S),o+=String.fromCharCode(S),y):n(S)}function v(S){return S===62?(e.consume(S),r.interrupt?t:W):n(S)}function b(S){return Ye(S)?(e.consume(S),b):T(S)}function w(S){return S===47?(e.consume(S),T):S===58||S===95||fn(S)?(e.consume(S),k):Ye(S)?(e.consume(S),w):T(S)}function k(S){return S===45||S===46||S===58||S===95||nn(S)?(e.consume(S),k):E(S)}function E(S){return S===61?(e.consume(S),_):Ye(S)?(e.consume(S),E):w(S)}function _(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),u=S,C):Ye(S)?(e.consume(S),_):z(S)}function C(S){return S===u?(e.consume(S),u=null,B):S===null||De(S)?n(S):(e.consume(S),C)}function z(S){return S===null||S===34||S===39||S===47||S===60||S===61||S===62||S===96||yt(S)?E(S):(e.consume(S),z)}function B(S){return S===47||S===62||Ye(S)?w(S):n(S)}function T(S){return S===62?(e.consume(S),A):n(S)}function A(S){return S===null||De(S)?W(S):Ye(S)?(e.consume(S),A):n(S)}function W(S){return S===45&&i===2?(e.consume(S),q):S===60&&i===1?(e.consume(S),Y):S===62&&i===4?(e.consume(S),P):S===63&&i===3?(e.consume(S),g):S===93&&i===5?(e.consume(S),I):De(S)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(EP,V,F)(S)):S===null||De(S)?(e.exit("htmlFlowData"),F(S)):(e.consume(S),W)}function F(S){return e.check(_P,L,V)(S)}function L(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),N}function N(S){return S===null||De(S)?F(S):(e.enter("htmlFlowData"),W(S))}function q(S){return S===45?(e.consume(S),g):W(S)}function Y(S){return S===47?(e.consume(S),o="",H):W(S)}function H(S){if(S===62){const Z=o.toLowerCase();return $b.includes(Z)?(e.consume(S),P):W(S)}return fn(S)&&o.length<8?(e.consume(S),o+=String.fromCharCode(S),H):W(S)}function I(S){return S===93?(e.consume(S),g):W(S)}function g(S){return S===62?(e.consume(S),P):S===45&&i===2?(e.consume(S),g):W(S)}function P(S){return S===null||De(S)?(e.exit("htmlFlowData"),V(S)):(e.consume(S),P)}function V(S){return e.exit("htmlFlow"),t(S)}}function OP(e,t,n){const r=this;return i;function i(o){return De(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):n(o)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function CP(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(jo,t,n)}}const $P={name:"htmlText",tokenize:IP};function IP(e,t,n){const r=this;let i,a,o;return s;function s(g){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(g),u}function u(g){return g===33?(e.consume(g),l):g===47?(e.consume(g),E):g===63?(e.consume(g),w):fn(g)?(e.consume(g),z):n(g)}function l(g){return g===45?(e.consume(g),c):g===91?(e.consume(g),a=0,m):fn(g)?(e.consume(g),b):n(g)}function c(g){return g===45?(e.consume(g),d):n(g)}function f(g){return g===null?n(g):g===45?(e.consume(g),p):De(g)?(o=f,Y(g)):(e.consume(g),f)}function p(g){return g===45?(e.consume(g),d):f(g)}function d(g){return g===62?q(g):g===45?p(g):f(g)}function m(g){const P="CDATA[";return g===P.charCodeAt(a++)?(e.consume(g),a===P.length?h:m):n(g)}function h(g){return g===null?n(g):g===93?(e.consume(g),y):De(g)?(o=h,Y(g)):(e.consume(g),h)}function y(g){return g===93?(e.consume(g),v):h(g)}function v(g){return g===62?q(g):g===93?(e.consume(g),v):h(g)}function b(g){return g===null||g===62?q(g):De(g)?(o=b,Y(g)):(e.consume(g),b)}function w(g){return g===null?n(g):g===63?(e.consume(g),k):De(g)?(o=w,Y(g)):(e.consume(g),w)}function k(g){return g===62?q(g):w(g)}function E(g){return fn(g)?(e.consume(g),_):n(g)}function _(g){return g===45||nn(g)?(e.consume(g),_):C(g)}function C(g){return De(g)?(o=C,Y(g)):Ye(g)?(e.consume(g),C):q(g)}function z(g){return g===45||nn(g)?(e.consume(g),z):g===47||g===62||yt(g)?B(g):n(g)}function B(g){return g===47?(e.consume(g),q):g===58||g===95||fn(g)?(e.consume(g),T):De(g)?(o=B,Y(g)):Ye(g)?(e.consume(g),B):q(g)}function T(g){return g===45||g===46||g===58||g===95||nn(g)?(e.consume(g),T):A(g)}function A(g){return g===61?(e.consume(g),W):De(g)?(o=A,Y(g)):Ye(g)?(e.consume(g),A):B(g)}function W(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),i=g,F):De(g)?(o=W,Y(g)):Ye(g)?(e.consume(g),W):(e.consume(g),L)}function F(g){return g===i?(e.consume(g),i=void 0,N):g===null?n(g):De(g)?(o=F,Y(g)):(e.consume(g),F)}function L(g){return g===null||g===34||g===39||g===60||g===61||g===96?n(g):g===47||g===62||yt(g)?B(g):(e.consume(g),L)}function N(g){return g===47||g===62||yt(g)?B(g):n(g)}function q(g){return g===62?(e.consume(g),e.exit("htmlTextData"),e.exit("htmlText"),t):n(g)}function Y(g){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),H}function H(g){return Ye(g)?et(e,I,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):I(g)}function I(g){return e.enter("htmlTextData"),o(g)}}const Xf={name:"labelEnd",tokenize:NP,resolveTo:jP,resolveAll:DP},RP={tokenize:MP},AP={tokenize:FP},PP={tokenize:LP};function DP(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function jP(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const u={type:e[a][1].type==="labelLink"?"link":"image",start:Object.assign({},e[a][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"label",start:Object.assign({},e[a][1].start),end:Object.assign({},e[o][1].end)},c={type:"labelText",start:Object.assign({},e[a+r+2][1].end),end:Object.assign({},e[o-2][1].start)};return s=[["enter",u,t],["enter",l,t]],s=Dn(s,e.slice(a+1,a+r+3)),s=Dn(s,[["enter",c,t]]),s=Dn(s,Rl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=Dn(s,[["exit",c,t],e[o-2],e[o-1],["exit",l,t]]),s=Dn(s,e.slice(o+1)),s=Dn(s,[["exit",u,t]]),Pn(e,a,e.length,s),e}function NP(e,t,n){const r=this;let i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(p){return a?a._inactive?f(p):(o=r.parser.defined.includes(Wn(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),u):n(p)}function u(p){return p===40?e.attempt(RP,c,o?c:f)(p):p===91?e.attempt(AP,c,o?l:f)(p):o?c(p):f(p)}function l(p){return e.attempt(PP,c,f)(p)}function c(p){return t(p)}function f(p){return a._balanced=!0,n(p)}}function MP(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return yt(f)?Mo(e,a)(f):a(f)}function a(f){return f===41?c(f):Tb(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function o(f){return yt(f)?Mo(e,u)(f):c(f)}function s(f){return n(f)}function u(f){return f===34||f===39||f===40?Cb(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function l(f){return yt(f)?Mo(e,c)(f):c(f)}function c(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function FP(e,t,n){const r=this;return i;function i(s){return Ob.call(r,e,a,o,"reference","referenceMarker","referenceString")(s)}function a(s){return r.parser.defined.includes(Wn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function o(s){return n(s)}}function LP(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const BP={name:"labelStartImage",tokenize:UP,resolveAll:Xf.resolveAll};function UP(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),a}function a(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),o):n(s)}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const zP={name:"labelStartLink",tokenize:qP,resolveAll:Xf.resolveAll};function qP(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),a}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const Qf={name:"lineEnding",tokenize:WP};function WP(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),et(e,t,"linePrefix")}}const Al={name:"thematicBreak",tokenize:VP};function VP(e,t,n){let r=0,i;return a;function a(l){return e.enter("thematicBreak"),o(l)}function o(l){return i=l,s(l)}function s(l){return l===i?(e.enter("thematicBreakSequence"),u(l)):r>=3&&(l===null||De(l))?(e.exit("thematicBreak"),t(l)):n(l)}function u(l){return l===i?(e.consume(l),r++,u):(e.exit("thematicBreakSequence"),Ye(l)?et(e,s,"whitespace")(l):s(l))}}const vn={name:"list",tokenize:KP,continuation:{tokenize:GP},exit:JP},HP={tokenize:XP,partial:!0},ZP={tokenize:YP,partial:!0};function KP(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(d){const m=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:Gf(d)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(Al,n,l)(d):l(d);if(!r.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(d)}return n(d)}function u(d){return Gf(d)&&++o<10?(e.consume(d),u):(!r.interrupt||o<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),l(d)):n(d)}function l(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,e.check(jo,r.interrupt?n:c,e.attempt(HP,p,f))}function c(d){return r.containerState.initialBlankLine=!0,a++,p(d)}function f(d){return Ye(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),p):n(d)}function p(d){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function GP(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(jo,i,a);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,et(e,t,"listItemIndent",r.containerState.size+1)(s)}function a(s){return r.containerState.furtherBlankLines||!Ye(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ZP,t,o)(s))}function o(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,et(e,e.attempt(vn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function YP(e,t,n){const r=this;return et(e,i,"listItemIndent",r.containerState.size+1);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(a):n(a)}}function JP(e){e.exit(this.containerState.type)}function XP(e,t,n){const r=this;return et(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const o=r.events[r.events.length-1];return!Ye(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const Ib={name:"setextUnderline",tokenize:eD,resolveTo:QP};function QP(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const o={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",o,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[a][1].end)):e[r][1]=o,e.push(["exit",o,t]),e}function eD(e,t,n){const r=this;let i;return a;function a(l){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=l,o(l)):n(l)}function o(l){return e.enter("setextHeadingLineSequence"),s(l)}function s(l){return l===i?(e.consume(l),s):(e.exit("setextHeadingLineSequence"),Ye(l)?et(e,u,"lineSuffix")(l):u(l))}function u(l){return l===null||De(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const tD={tokenize:nD};function nD(e){const t=this,n=e.attempt(jo,r,e.attempt(this.parser.constructs.flowInitial,i,et(e,e.attempt(this.parser.constructs.flow,i,e.attempt(sP,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const rD={resolveAll:Ab()},iD=Rb("string"),aD=Rb("text");function Rb(e){return{tokenize:t,resolveAll:Ab(e==="text"?oD:void 0)};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,o,s);return o;function o(c){return l(c)?a(c):s(c)}function s(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),u}function u(c){return l(c)?(n.exit("data"),a(c)):(n.consume(c),u)}function l(c){if(c===null)return!0;const f=i[c];let p=-1;if(f)for(;++p<f.length;){const d=f[p];if(!d.previous||d.previous.call(r,r.previous))return!0}return!1}}}function Ab(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function oD(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,o=-1,s=0,u;for(;a--;){const l=i[a];if(typeof l=="string"){for(o=l.length;l.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(l===-2)u=!0,s++;else if(l!==-1){a++;break}}if(s){const l={type:n===e.length||u||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+a,_bufferIndex:a?o:r.start._bufferIndex+o},end:Object.assign({},r.end)};r.end=Object.assign({},l.start),r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}function sD(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},a=[];let o=[],s=[];const u={consume:b,enter:w,exit:k,attempt:C(E),check:C(_),interrupt:C(_,{interrupt:!0})},l={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:d,sliceSerialize:p,now:m,defineSkip:h,write:f};let c=t.tokenize.call(l,u);return t.resolveAll&&a.push(t),l;function f(A){return o=Dn(o,A),y(),o[o.length-1]!==null?[]:(z(t,0),l.events=Rl(a,l.events,l),l.events)}function p(A,W){return uD(d(A),W)}function d(A){return lD(o,A)}function m(){const{line:A,column:W,offset:F,_index:L,_bufferIndex:N}=r;return{line:A,column:W,offset:F,_index:L,_bufferIndex:N}}function h(A){i[A.line]=A.column,T()}function y(){let A;for(;r._index<o.length;){const W=o[r._index];if(typeof W=="string")for(A=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===A&&r._bufferIndex<W.length;)v(W.charCodeAt(r._bufferIndex));else v(W)}}function v(A){c=c(A)}function b(A){De(A)?(r.line++,r.column=1,r.offset+=A===-3?2:1,T()):A!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=A}function w(A,W){const F=W||{};return F.type=A,F.start=m(),l.events.push(["enter",F,l]),s.push(F),F}function k(A){const W=s.pop();return W.end=m(),l.events.push(["exit",W,l]),W}function E(A,W){z(A,W.from)}function _(A,W){W.restore()}function C(A,W){return F;function F(L,N,q){let Y,H,I,g;return Array.isArray(L)?V(L):"tokenize"in L?V([L]):P(L);function P(G){return X;function X(ae){const se=ae!==null&&G[ae],Q=ae!==null&&G.null,ee=[...Array.isArray(se)?se:se?[se]:[],...Array.isArray(Q)?Q:Q?[Q]:[]];return V(ee)(ae)}}function V(G){return Y=G,H=0,G.length===0?q:S(G[H])}function S(G){return X;function X(ae){return g=B(),I=G,G.partial||(l.currentConstruct=G),G.name&&l.parser.constructs.disable.null.includes(G.name)?J():G.tokenize.call(W?Object.assign(Object.create(l),W):l,u,Z,J)(ae)}}function Z(G){return A(I,g),N}function J(G){return g.restore(),++H<Y.length?S(Y[H]):q}}}function z(A,W){A.resolveAll&&!a.includes(A)&&a.push(A),A.resolve&&Pn(l.events,W,l.events.length-W,A.resolve(l.events.slice(W),l)),A.resolveTo&&(l.events=A.resolveTo(l.events,l))}function B(){const A=m(),W=l.previous,F=l.currentConstruct,L=l.events.length,N=Array.from(s);return{restore:q,from:L};function q(){r=A,l.previous=W,l.currentConstruct=F,l.events.length=L,s=N,T()}}function T(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function lD(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){const s=o[0];typeof s=="string"?o[0]=s.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function uD(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let o;if(typeof a=="string")o=a;else switch(a){case-5:{o="\r";break}case-4:{o=`
30
+ <%s key={someKey} {...props} />`,yg,ua,nfe,ua),Vn[ua+yg]=!0}}return P===r?Jt(qt):on(qt),qt}}function Di(P,le,be){return Hn(P,le,be,!0)}function Qce(P,le,be){return Hn(P,le,be,!1)}var efe=Qce,tfe=Di;$o.Fragment=r,$o.jsx=efe,$o.jsxs=tfe}()),$o}process.env.NODE_ENV==="production"?Wf.exports=OI():Wf.exports=$I();var $=Wf.exports;function II(e,t=[]){let n=[];function r(a,o){const s=x.createContext(o),u=n.length;n=[...n,o];function l(f){const{scope:d,children:p,...m}=f,h=(d==null?void 0:d[e][u])||s,y=x.useMemo(()=>m,Object.values(m));return $.jsx(h.Provider,{value:y,children:p})}function c(f,d){const p=(d==null?void 0:d[e][u])||s,m=x.useContext(p);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return l.displayName=a+"Provider",[l,c]}const i=()=>{const a=n.map(o=>x.createContext(o));return function(s){const u=(s==null?void 0:s[e])||a;return x.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,RI(i,...t)]}function RI(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:u,scopeName:l})=>{const f=u(a)[`__scope${l}`];return{...s,...f}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function ri(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var ca=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{};function AI(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function PI(...e){return t=>e.forEach(n=>AI(n,t))}var Cg=x.forwardRef((e,t)=>{const{children:n,...r}=e,i=x.Children.toArray(n),a=i.find(jI);if(a){const o=a.props.children,s=i.map(u=>u===a?x.Children.count(o)>1?x.Children.only(null):x.isValidElement(o)?o.props.children:null:u);return $.jsx(Vf,{...r,ref:t,children:x.isValidElement(o)?x.cloneElement(o,void 0,s):null})}return $.jsx(Vf,{...r,ref:t,children:n})});Cg.displayName="Slot";var Vf=x.forwardRef((e,t)=>{const{children:n,...r}=e;if(x.isValidElement(n)){const i=MI(n);return x.cloneElement(n,{...NI(r,n.props),ref:t?PI(t,i):i})}return x.Children.count(n)>1?x.Children.only(null):null});Vf.displayName="SlotClone";var DI=({children:e})=>$.jsx($.Fragment,{children:e});function jI(e){return x.isValidElement(e)&&e.type===DI}function NI(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{a(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function MI(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var FI=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Hf=FI.reduce((e,t)=>{const n=x.forwardRef((r,i)=>{const{asChild:a,...o}=r,s=a?Cg:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),$.jsx(s,{...o,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Zf="Avatar",[LI,ofe]=II(Zf),[BI,Og]=LI(Zf),Kf=x.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,a]=x.useState("idle");return $.jsx(BI,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:$.jsx(Hf.span,{...r,ref:t})})});Kf.displayName=Zf;var $g="AvatarImage",Gf=x.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...a}=e,o=Og($g,n),s=UI(r),u=ri(l=>{i(l),o.onImageLoadingStatusChange(l)});return ca(()=>{s!=="idle"&&u(s)},[s,u]),s==="loaded"?$.jsx(Hf.img,{...a,ref:t,src:r}):null});Gf.displayName=$g;var Ig="AvatarFallback",Yf=x.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,a=Og(Ig,n),[o,s]=x.useState(r===void 0);return x.useEffect(()=>{if(r!==void 0){const u=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(u)}},[r]),o&&a.imageLoadingStatus!=="loaded"?$.jsx(Hf.span,{...i,ref:t}):null});Yf.displayName=Ig;function UI(e){const[t,n]=x.useState("idle");return ca(()=>{if(!e){n("error");return}let r=!0;const i=new window.Image,a=o=>()=>{r&&n(o)};return n("loading"),i.onload=a("loaded"),i.onerror=a("error"),i.src=e,()=>{r=!1}},[e]),t}function Jf(e){if(!/^#?([a-fA-F\d]{6}|[a-fA-F\d]{3})$/.test(e))return{r:0,g:0,b:0};const n=e.replace(/^#/,"");let r=n;n.length===3&&(r=n.split("").map(u=>u+u).join(""));const i=parseInt(r,16),a=i>>16&255,o=i>>8&255,s=i&255;return{r:a,g:o,b:s}}function zI(e){return`#${((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)}`}const qI=(e,t=30)=>{const n=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b,n+1);return{r:Math.floor((e.r-n)/(r-n)*t*(1-.299)+120-t/2),g:Math.floor((e.g-n)/(r-n)*t*(1-.587)+120-t/2),b:Math.floor((e.b-n)/(r-n)*t*(1-.114)+120-t/2)}};function Rg(e){return Object.entries(e).reduce((t,[n,r])=>{const i=n.replace(/(\d+)/,a=>(1e3-parseInt(a)).toString());return{...t,[i]:r}},{})}const WI=2.4,VI=.2126729,HI=.7151522,ZI=.072175,KI=.56,GI=.57,YI=.62,JI=.65,Rl=.022,Ag=1.414,XI=1.14,QI=1.14,eR=.035991,tR=.035991,nR=27.7847239587675,rR=27.7847239587675,Pg=.027,Dg=.027,jg=.001,iR=5e-4;function Ng(e){const{r:t,g:n,b:r}=e,i=a=>(a/255)**WI;return VI*i(t)+HI*i(n)+ZI*i(r)}function Mg(e,t){if(!e||!t)return 0;let n=Ng(Jf(e)),r=Ng(Jf(t)),i=0,a=0;return n=n>Rl?n:n+(Rl-n)**Ag,r=r>Rl?r:r+(Rl-r)**Ag,Math.abs(r-n)<iR?0:(r>n?(i=(r**KI-n**GI)*XI,a=i<jg?0:i<eR?i-i*nR*Pg:i-Pg):(i=(r**JI-n**YI)*QI,a=i>-jg?0:i>-tR?i-i*rR*Dg:i+Dg),Math.abs(a*100))}let Al=class{constructor(){_e(this,"eventMap");this.eventMap={}}on(t,n){var r;return this.eventMap[t]||(this.eventMap[t]=new Set),(r=this.eventMap[t])==null||r.add(n),()=>{var i;(i=this.eventMap[t])==null||i.delete(n)}}emit(t,n){var r,i;(r=this.eventMap[t])==null||r.forEach(a=>{a(n)}),(i=this.eventMap["*"])==null||i.forEach(a=>{a({type:t,payload:n})})}};const aR=new Al;function Fg(e,t){let n=`${e} {`;for(const[r,i]of Object.entries(t))n+=`${r}: ${i}; `;return n+="}",n}function Lg(e,t){let n=0;if(e.length==0)return n;for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);n=(n<<5)-n+i,n=n&n}return Math.abs(n)%t}var Bg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(vt,function(){var n=1e3,r=6e4,i=36e5,a="millisecond",o="second",s="minute",u="hour",l="day",c="week",f="month",d="quarter",p="year",m="date",h="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(I){var A=["th","st","nd","rd"],L=I%100;return"["+I+(A[(L-20)%10]||A[L]||A[0])+"]"}},w=function(I,A,L){var Z=String(I);return!Z||Z.length>=A?I:""+Array(A+1-Z.length).join(L)+I},T={s:w,z:function(I){var A=-I.utcOffset(),L=Math.abs(A),Z=Math.floor(L/60),H=L%60;return(A<=0?"+":"-")+w(Z,2,"0")+":"+w(H,2,"0")},m:function I(A,L){if(A.date()<L.date())return-I(L,A);var Z=12*(L.year()-A.year())+(L.month()-A.month()),H=A.clone().add(Z,f),R=L-H<0,g=A.clone().add(Z+(R?-1:1),f);return+(-(Z+(L-H)/(R?H-g:g-H))||0)},a:function(I){return I<0?Math.ceil(I)||0:Math.floor(I)},p:function(I){return{M:f,y:p,w:c,d:l,D:m,h:u,m:s,s:o,ms:a,Q:d}[I]||String(I||"").toLowerCase().replace(/s$/,"")},u:function(I){return I===void 0}},E="en",_={};_[E]=b;var O="$isDayjsObject",z=function(I){return I instanceof W||!(!I||!I[O])},U=function I(A,L,Z){var H;if(!A)return E;if(typeof A=="string"){var R=A.toLowerCase();_[R]&&(H=R),L&&(_[R]=L,H=R);var g=A.split("-");if(!H&&g.length>1)return I(g[0])}else{var N=A.name;_[N]=A,H=N}return!Z&&H&&(E=H),H||!Z&&E},k=function(I,A){if(z(I))return I.clone();var L=typeof A=="object"?A:{};return L.date=I,L.args=arguments,new W(L)},D=T;D.l=U,D.i=z,D.w=function(I,A){return k(I,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var W=function(){function I(L){this.$L=U(L.locale,null,!0),this.parse(L),this.$x=this.$x||L.x||{},this[O]=!0}var A=I.prototype;return A.parse=function(L){this.$d=function(Z){var H=Z.date,R=Z.utc;if(H===null)return new Date(NaN);if(D.u(H))return new Date;if(H instanceof Date)return new Date(H);if(typeof H=="string"&&!/Z$/i.test(H)){var g=H.match(y);if(g){var N=g[2]-1||0,V=(g[7]||"0").substring(0,3);return R?new Date(Date.UTC(g[1],N,g[3]||1,g[4]||0,g[5]||0,g[6]||0,V)):new Date(g[1],N,g[3]||1,g[4]||0,g[5]||0,g[6]||0,V)}}return new Date(H)}(L),this.init()},A.init=function(){var L=this.$d;this.$y=L.getFullYear(),this.$M=L.getMonth(),this.$D=L.getDate(),this.$W=L.getDay(),this.$H=L.getHours(),this.$m=L.getMinutes(),this.$s=L.getSeconds(),this.$ms=L.getMilliseconds()},A.$utils=function(){return D},A.isValid=function(){return this.$d.toString()!==h},A.isSame=function(L,Z){var H=k(L);return this.startOf(Z)<=H&&H<=this.endOf(Z)},A.isAfter=function(L,Z){return k(L)<this.startOf(Z)},A.isBefore=function(L,Z){return this.endOf(Z)<k(L)},A.$g=function(L,Z,H){return D.u(L)?this[Z]:this.set(H,L)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(L,Z){var H=this,R=!!D.u(Z)||Z,g=D.p(L),N=function(oe,X){var ee=D.w(H.$u?Date.UTC(H.$y,X,oe):new Date(H.$y,X,oe),H);return R?ee:ee.endOf(l)},V=function(oe,X){return D.w(H.toDate()[oe].apply(H.toDate("s"),(R?[0,0,0,0]:[23,59,59,999]).slice(X)),H)},S=this.$W,K=this.$M,J=this.$D,Y="set"+(this.$u?"UTC":"");switch(g){case p:return R?N(1,0):N(31,11);case f:return R?N(1,K):N(0,K+1);case c:var Q=this.$locale().weekStart||0,ae=(S<Q?S+7:S)-Q;return N(R?J-ae:J+(6-ae),K);case l:case m:return V(Y+"Hours",0);case u:return V(Y+"Minutes",1);case s:return V(Y+"Seconds",2);case o:return V(Y+"Milliseconds",3);default:return this.clone()}},A.endOf=function(L){return this.startOf(L,!1)},A.$set=function(L,Z){var H,R=D.p(L),g="set"+(this.$u?"UTC":""),N=(H={},H[l]=g+"Date",H[m]=g+"Date",H[f]=g+"Month",H[p]=g+"FullYear",H[u]=g+"Hours",H[s]=g+"Minutes",H[o]=g+"Seconds",H[a]=g+"Milliseconds",H)[R],V=R===l?this.$D+(Z-this.$W):Z;if(R===f||R===p){var S=this.clone().set(m,1);S.$d[N](V),S.init(),this.$d=S.set(m,Math.min(this.$D,S.daysInMonth())).$d}else N&&this.$d[N](V);return this.init(),this},A.set=function(L,Z){return this.clone().$set(L,Z)},A.get=function(L){return this[D.p(L)]()},A.add=function(L,Z){var H,R=this;L=Number(L);var g=D.p(Z),N=function(K){var J=k(R);return D.w(J.date(J.date()+Math.round(K*L)),R)};if(g===f)return this.set(f,this.$M+L);if(g===p)return this.set(p,this.$y+L);if(g===l)return N(1);if(g===c)return N(7);var V=(H={},H[s]=r,H[u]=i,H[o]=n,H)[g]||1,S=this.$d.getTime()+L*V;return D.w(S,this)},A.subtract=function(L,Z){return this.add(-1*L,Z)},A.format=function(L){var Z=this,H=this.$locale();if(!this.isValid())return H.invalidDate||h;var R=L||"YYYY-MM-DDTHH:mm:ssZ",g=D.z(this),N=this.$H,V=this.$m,S=this.$M,K=H.weekdays,J=H.months,Y=H.meridiem,Q=function(X,ee,G,pe){return X&&(X[ee]||X(Z,R))||G[ee].slice(0,pe)},ae=function(X){return D.s(N%12||12,X,"0")},oe=Y||function(X,ee,G){var pe=X<12?"AM":"PM";return G?pe.toLowerCase():pe};return R.replace(v,function(X,ee){return ee||function(G){switch(G){case"YY":return String(Z.$y).slice(-2);case"YYYY":return D.s(Z.$y,4,"0");case"M":return S+1;case"MM":return D.s(S+1,2,"0");case"MMM":return Q(H.monthsShort,S,J,3);case"MMMM":return Q(J,S);case"D":return Z.$D;case"DD":return D.s(Z.$D,2,"0");case"d":return String(Z.$W);case"dd":return Q(H.weekdaysMin,Z.$W,K,2);case"ddd":return Q(H.weekdaysShort,Z.$W,K,3);case"dddd":return K[Z.$W];case"H":return String(N);case"HH":return D.s(N,2,"0");case"h":return ae(1);case"hh":return ae(2);case"a":return oe(N,V,!0);case"A":return oe(N,V,!1);case"m":return String(V);case"mm":return D.s(V,2,"0");case"s":return String(Z.$s);case"ss":return D.s(Z.$s,2,"0");case"SSS":return D.s(Z.$ms,3,"0");case"Z":return g}return null}(X)||g.replace(":","")})},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(L,Z,H){var R,g=this,N=D.p(Z),V=k(L),S=(V.utcOffset()-this.utcOffset())*r,K=this-V,J=function(){return D.m(g,V)};switch(N){case p:R=J()/12;break;case f:R=J();break;case d:R=J()/3;break;case c:R=(K-S)/6048e5;break;case l:R=(K-S)/864e5;break;case u:R=K/i;break;case s:R=K/r;break;case o:R=K/n;break;default:R=K}return H?R:D.a(R)},A.daysInMonth=function(){return this.endOf(f).$D},A.$locale=function(){return _[this.$L]},A.locale=function(L,Z){if(!L)return this.$L;var H=this.clone(),R=U(L,Z,!0);return R&&(H.$L=R),H},A.clone=function(){return D.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},I}(),B=W.prototype;return k.prototype=B,[["$ms",a],["$s",o],["$m",s],["$H",u],["$W",l],["$M",f],["$y",p],["$D",m]].forEach(function(I){B[I[1]]=function(A){return this.$g(A,I[0],I[1])}}),k.extend=function(I,A){return I.$i||(I(A,W,k),I.$i=!0),k},k.locale=U,k.isDayjs=z,k.unix=function(I){return k(1e3*I)},k.en=_[E],k.Ls=_,k.p={},k})})(Bg);var oR=Bg.exports;const Pl=Ge(oR);var Ug={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(vt,function(){return function(n,r,i){r.prototype.isToday=function(){var a="YYYY-MM-DD",o=i();return this.format(a)===o.format(a)}}})})(Ug);var sR=Ug.exports;const lR=Ge(sR);var zg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(vt,function(){return function(n,r,i){r.prototype.isYesterday=function(){var a="YYYY-MM-DD",o=i().subtract(1,"day");return this.format(a)===o.format(a)}}})})(zg);var uR=zg.exports;const cR=Ge(uR);let Dl;const fR=new Uint8Array(16);function dR(){if(!Dl&&(Dl=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Dl))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Dl(fR)}const tn=[];for(let e=0;e<256;++e)tn.push((e+256).toString(16).slice(1));function pR(e,t=0){return tn[e[t+0]]+tn[e[t+1]]+tn[e[t+2]]+tn[e[t+3]]+"-"+tn[e[t+4]]+tn[e[t+5]]+"-"+tn[e[t+6]]+tn[e[t+7]]+"-"+tn[e[t+8]]+tn[e[t+9]]+"-"+tn[e[t+10]]+tn[e[t+11]]+tn[e[t+12]]+tn[e[t+13]]+tn[e[t+14]]+tn[e[t+15]]}const qg={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Wg(e,t,n){if(qg.randomUUID&&!t&&!e)return qg.randomUUID();e=e||{};const r=e.random||(e.rng||dR)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,pR(r)}Pl.extend(lR),Pl.extend(cR);function hR(e,t="day"){var r,i,a;if(!e||e.length===0)return[];const n=[];(r=e[0])!=null&&r.timestamp&&n.push(Vg(e[0].timestamp));for(let o=0;o<e.length;o++)if(e[o]&&n.push(e[o]),o+1<e.length){const s=(i=e[o])==null?void 0:i.timestamp,u=(a=e[o+1])==null?void 0:a.timestamp;!Pl(s).isSame(u,t)&&u&&n.push(Vg(u))}return n}function Vg(e){return{id:Wg(),direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:mR(e)}}}function mR(e,t=!1){const n=Pl(e),r="h:mma";return n.isToday()?t?`Today • ${n.format(r)}`:"Today":n.isYesterday()?t?`Yesterday • ${n.format(r)}`:"Yesterday":t?n.format(`YYYY-MM-DD • ${r}`):n.format("YYYY-MM-DD")}function vR(e=""){if(typeof e!="string")throw new TypeError("Color should be string!");const t=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(e);if(t)return t.splice(1).map(r=>Number.parseInt(r,16));const n=/^#?([\da-f])([\da-f])([\da-f])$/i.exec(e);if(n)return n.splice(1).map(r=>Number.parseInt(r+r,16));if(e.includes(","))return e.split(",").map(r=>Number.parseInt(r));throw new Error("Invalid color format! Use #ABC or #AABBCC or r,g,b")}function yR(e){return"#"+e.map(t=>`0${t.toString(16).toUpperCase()}`.slice(-2)).join("")}function gR(e,t){return e.map(n=>Math.round(n+(255-n)*t))}function bR(e,t){return e.map(n=>Math.round(n*t))}const Io=e=>t=>gR(t,e),Ro=e=>t=>bR(t,e),wR={50:Io(.95),100:Io(.9),200:Io(.75),300:Io(.6),400:Io(.3),500:e=>e,600:Ro(.9),700:Ro(.6),800:Ro(.45),900:Ro(.3),950:Ro(.2)};function Hg(e,t=wR){const n={},r=vR(e);for(const[i,a]of Object.entries(t))n[i]=yR(a(r));return n}var st;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(st||(st={}));var Xf;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Xf||(Xf={}));const we=st.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ii=e=>{switch(typeof e){case"undefined":return we.undefined;case"string":return we.string;case"number":return isNaN(e)?we.nan:we.number;case"boolean":return we.boolean;case"function":return we.function;case"bigint":return we.bigint;case"symbol":return we.symbol;case"object":return Array.isArray(e)?we.array:e===null?we.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?we.promise:typeof Map<"u"&&e instanceof Map?we.map:typeof Set<"u"&&e instanceof Set?we.set:typeof Date<"u"&&e instanceof Date?we.date:we.object;default:return we.unknown}},me=st.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),xR=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");let Kn=class extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(a){return a.message},r={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let s=r,u=0;for(;u<o.path.length;){const l=o.path[u];u===o.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(o))):s[l]=s[l]||{_errors:[]},s=s[l],u++}}};return i(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,st.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};Kn.create=e=>new Kn(e);const Ao=(e,t)=>{let n;switch(e.code){case me.invalid_type:e.received===we.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case me.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,st.jsonStringifyReplacer)}`;break;case me.unrecognized_keys:n=`Unrecognized key(s) in object: ${st.joinValues(e.keys,", ")}`;break;case me.invalid_union:n="Invalid input";break;case me.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${st.joinValues(e.options)}`;break;case me.invalid_enum_value:n=`Invalid enum value. Expected ${st.joinValues(e.options)}, received '${e.received}'`;break;case me.invalid_arguments:n="Invalid function arguments";break;case me.invalid_return_type:n="Invalid function return type";break;case me.invalid_date:n="Invalid date";break;case me.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:st.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case me.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case me.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case me.custom:n="Invalid input";break;case me.invalid_intersection_types:n="Intersection results could not be merged";break;case me.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case me.not_finite:n="Number must be finite";break;default:n=t.defaultError,st.assertNever(e)}return{message:n}};let Zg=Ao;function SR(e){Zg=e}function jl(){return Zg}const Nl=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};let s="";const u=r.filter(l=>!!l).slice().reverse();for(const l of u)s=l(o,{data:t,defaultError:s}).message;return{...i,path:a,message:i.message||s}},ER=[];function ke(e,t){const n=Nl({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,jl(),Ao].filter(r=>!!r)});e.common.issues.push(n)}let wn=class SI{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Le;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n)r.push({key:await i.key,value:await i.value});return SI.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return Le;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[a.value]=o.value)}return{status:t.value,value:r}}};const Le=Object.freeze({status:"aborted"}),Kg=e=>({status:"dirty",value:e}),mn=e=>({status:"valid",value:e}),Qf=e=>e.status==="aborted",ed=e=>e.status==="dirty",Po=e=>e.status==="valid",Ml=e=>typeof Promise<"u"&&e instanceof Promise;var Pe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Pe||(Pe={}));let hr=class{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}};const Gg=(e,t)=>{if(Po(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Kn(e.common.issues);return this._error=n,this._error}}};function Be(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,s)=>o.code!=="invalid_type"?{message:s.defaultError}:typeof s.data>"u"?{message:r??s.defaultError}:{message:n??s.defaultError},description:i}}let We=class{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return ii(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:ii(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new wn,ctx:{common:t.parent.common,data:t.data,parsedType:ii(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Ml(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ii(t)},a=this._parseSync({data:t,path:i.path,parent:i});return Gg(i,a)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ii(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(Ml(i)?i:Promise.resolve(i));return Gg(r,a)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const o=t(i),s=()=>a.addIssue({code:me.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(u=>u?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Gn({schema:this,typeName:je.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Ur.create(this,this._def)}nullable(){return Fi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Mi.create(this,this._def)}promise(){return ha.create(this,this._def)}or(t){return Bo.create([this,t],this._def)}and(t){return Uo.create(this,t,this._def)}transform(t){return new Gn({...Be(this._def),schema:this,typeName:je.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Ho({...Be(this._def),innerType:this,defaultValue:n,typeName:je.ZodDefault})}brand(){return new eb({typeName:je.ZodBranded,type:this,...Be(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new ql({...Be(this._def),innerType:this,catchValue:n,typeName:je.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return rd.create(this,t)}readonly(){return Vl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const _R=/^c[^\s-]{8,}$/i,kR=/^[a-z][a-z0-9]*$/,TR=/^[0-9A-HJKMNP-TV-Z]{26}$/,CR=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,OR=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,$R="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let td;const IR=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,RR=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,AR=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function PR(e,t){return!!((t==="v4"||!t)&&IR.test(e)||(t==="v6"||!t)&&RR.test(e))}let fa=class Il extends We{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==we.string){const a=this._getOrReturnCtx(t);return ke(a,{code:me.invalid_type,expected:we.string,received:a.parsedType}),Le}const r=new wn;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),ke(i,{code:me.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),ke(i,{code:me.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,s=t.data.length<a.value;(o||s)&&(i=this._getOrReturnCtx(t,i),o?ke(i,{code:me.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&ke(i,{code:me.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")OR.test(t.data)||(i=this._getOrReturnCtx(t,i),ke(i,{validation:"email",code:me.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")td||(td=new RegExp($R,"u")),td.test(t.data)||(i=this._getOrReturnCtx(t,i),ke(i,{validation:"emoji",code:me.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")CR.test(t.data)||(i=this._getOrReturnCtx(t,i),ke(i,{validation:"uuid",code:me.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")_R.test(t.data)||(i=this._getOrReturnCtx(t,i),ke(i,{validation:"cuid",code:me.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")kR.test(t.data)||(i=this._getOrReturnCtx(t,i),ke(i,{validation:"cuid2",code:me.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")TR.test(t.data)||(i=this._getOrReturnCtx(t,i),ke(i,{validation:"ulid",code:me.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),ke(i,{validation:"url",code:me.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),ke(i,{validation:"regex",code:me.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),ke(i,{code:me.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),ke(i,{code:me.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),ke(i,{code:me.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?AR(a).test(t.data)||(i=this._getOrReturnCtx(t,i),ke(i,{code:me.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="ip"?PR(t.data,a.version)||(i=this._getOrReturnCtx(t,i),ke(i,{validation:"ip",code:me.invalid_string,message:a.message}),r.dirty()):st.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:me.invalid_string,...Pe.errToObj(r)})}_addCheck(t){return new Il({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Pe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Pe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Pe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Pe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Pe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Pe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Pe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Pe.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,...Pe.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Pe.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Pe.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Pe.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Pe.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Pe.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Pe.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Pe.errToObj(n)})}nonempty(t){return this.min(1,Pe.errToObj(t))}trim(){return new Il({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Il({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Il({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};fa.create=e=>{var t;return new fa({checks:[],typeName:je.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Be(e)})};function DR(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=parseInt(e.toFixed(i).replace(".","")),o=parseInt(t.toFixed(i).replace(".",""));return a%o/Math.pow(10,i)}let Do=class gg extends We{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==we.number){const a=this._getOrReturnCtx(t);return ke(a,{code:me.invalid_type,expected:we.number,received:a.parsedType}),Le}let r;const i=new wn;for(const a of this._def.checks)a.kind==="int"?st.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ke(r,{code:me.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),ke(r,{code:me.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),ke(r,{code:me.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?DR(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),ke(r,{code:me.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ke(r,{code:me.not_finite,message:a.message}),i.dirty()):st.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Pe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Pe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Pe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Pe.toString(n))}setLimit(t,n,r,i){return new gg({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Pe.toString(i)}]})}_addCheck(t){return new gg({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Pe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Pe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Pe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Pe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Pe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Pe.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Pe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Pe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Pe.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&st.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}};Do.create=e=>new Do({checks:[],typeName:je.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Be(e)});let jo=class bg extends We{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==we.bigint){const a=this._getOrReturnCtx(t);return ke(a,{code:me.invalid_type,expected:we.bigint,received:a.parsedType}),Le}let r;const i=new wn;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),ke(r,{code:me.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),ke(r,{code:me.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ke(r,{code:me.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):st.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Pe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Pe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Pe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Pe.toString(n))}setLimit(t,n,r,i){return new bg({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Pe.toString(i)}]})}_addCheck(t){return new bg({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Pe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Pe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Pe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Pe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Pe.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};jo.create=e=>{var t;return new jo({checks:[],typeName:je.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Be(e)})};let No=class extends We{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==we.boolean){const r=this._getOrReturnCtx(t);return ke(r,{code:me.invalid_type,expected:we.boolean,received:r.parsedType}),Le}return mn(t.data)}};No.create=e=>new No({typeName:je.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Be(e)});let Mo=class EI extends We{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==we.date){const a=this._getOrReturnCtx(t);return ke(a,{code:me.invalid_type,expected:we.date,received:a.parsedType}),Le}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return ke(a,{code:me.invalid_date}),Le}const r=new wn;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),ke(i,{code:me.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),ke(i,{code:me.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):st.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new EI({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Pe.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Pe.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}};Mo.create=e=>new Mo({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:je.ZodDate,...Be(e)});let Fl=class extends We{_parse(t){if(this._getType(t)!==we.symbol){const r=this._getOrReturnCtx(t);return ke(r,{code:me.invalid_type,expected:we.symbol,received:r.parsedType}),Le}return mn(t.data)}};Fl.create=e=>new Fl({typeName:je.ZodSymbol,...Be(e)});let Fo=class extends We{_parse(t){if(this._getType(t)!==we.undefined){const r=this._getOrReturnCtx(t);return ke(r,{code:me.invalid_type,expected:we.undefined,received:r.parsedType}),Le}return mn(t.data)}};Fo.create=e=>new Fo({typeName:je.ZodUndefined,...Be(e)});let Lo=class extends We{_parse(t){if(this._getType(t)!==we.null){const r=this._getOrReturnCtx(t);return ke(r,{code:me.invalid_type,expected:we.null,received:r.parsedType}),Le}return mn(t.data)}};Lo.create=e=>new Lo({typeName:je.ZodNull,...Be(e)});let da=class extends We{constructor(){super(...arguments),this._any=!0}_parse(t){return mn(t.data)}};da.create=e=>new da({typeName:je.ZodAny,...Be(e)});let Ni=class extends We{constructor(){super(...arguments),this._unknown=!0}_parse(t){return mn(t.data)}};Ni.create=e=>new Ni({typeName:je.ZodUnknown,...Be(e)});let Br=class extends We{_parse(t){const n=this._getOrReturnCtx(t);return ke(n,{code:me.invalid_type,expected:we.never,received:n.parsedType}),Le}};Br.create=e=>new Br({typeName:je.ZodNever,...Be(e)});let Ll=class extends We{_parse(t){if(this._getType(t)!==we.undefined){const r=this._getOrReturnCtx(t);return ke(r,{code:me.invalid_type,expected:we.void,received:r.parsedType}),Le}return mn(t.data)}};Ll.create=e=>new Ll({typeName:je.ZodVoid,...Be(e)});let Mi=class zf extends We{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==we.array)return ke(n,{code:me.invalid_type,expected:we.array,received:n.parsedType}),Le;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(o||s)&&(ke(n,{code:o?me.too_big:me.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(ke(n,{code:me.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(ke(n,{code:me.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,s)=>i.type._parseAsync(new hr(n,o,n.path,s)))).then(o=>wn.mergeArray(r,o));const a=[...n.data].map((o,s)=>i.type._parseSync(new hr(n,o,n.path,s)));return wn.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new zf({...this._def,minLength:{value:t,message:Pe.toString(n)}})}max(t,n){return new zf({...this._def,maxLength:{value:t,message:Pe.toString(n)}})}length(t,n){return new zf({...this._def,exactLength:{value:t,message:Pe.toString(n)}})}nonempty(t){return this.min(1,t)}};Mi.create=(e,t)=>new Mi({type:e,minLength:null,maxLength:null,exactLength:null,typeName:je.ZodArray,...Be(t)});function pa(e){if(e instanceof Mn){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Ur.create(pa(r))}return new Mn({...e._def,shape:()=>t})}else return e instanceof Mi?new Mi({...e._def,type:pa(e.element)}):e instanceof Ur?Ur.create(pa(e.unwrap())):e instanceof Fi?Fi.create(pa(e.unwrap())):e instanceof ai?ai.create(e.items.map(t=>pa(t))):e}let Mn=class pr extends We{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=st.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==we.object){const l=this._getOrReturnCtx(t);return ke(l,{code:me.invalid_type,expected:we.object,received:l.parsedType}),Le}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Br&&this._def.unknownKeys==="strip"))for(const l in i.data)o.includes(l)||s.push(l);const u=[];for(const l of o){const c=a[l],f=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new hr(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Br){const l=this._def.unknownKeys;if(l==="passthrough")for(const c of s)u.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(l==="strict")s.length>0&&(ke(i,{code:me.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const c of s){const f=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new hr(i,f,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const c of u){const f=await c.key;l.push({key:f,value:await c.value,alwaysSet:c.alwaysSet})}return l}).then(l=>wn.mergeObjectSync(r,l)):wn.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(t){return Pe.errToObj,new pr({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,a,o,s;const u=(o=(a=(i=this._def).errorMap)===null||a===void 0?void 0:a.call(i,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=Pe.errToObj(t).message)!==null&&s!==void 0?s:u}:{message:u}}}:{}})}strip(){return new pr({...this._def,unknownKeys:"strip"})}passthrough(){return new pr({...this._def,unknownKeys:"passthrough"})}extend(t){return new pr({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new pr({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:je.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new pr({...this._def,catchall:t})}pick(t){const n={};return st.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new pr({...this._def,shape:()=>n})}omit(t){const n={};return st.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new pr({...this._def,shape:()=>n})}deepPartial(){return pa(this)}partial(t){const n={};return st.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new pr({...this._def,shape:()=>n})}required(t){const n={};return st.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof Ur;)a=a._def.innerType;n[r]=a}}),new pr({...this._def,shape:()=>n})}keyof(){return Qg(st.objectKeys(this.shape))}};Mn.create=(e,t)=>new Mn({shape:()=>e,unknownKeys:"strip",catchall:Br.create(),typeName:je.ZodObject,...Be(t)}),Mn.strictCreate=(e,t)=>new Mn({shape:()=>e,unknownKeys:"strict",catchall:Br.create(),typeName:je.ZodObject,...Be(t)}),Mn.lazycreate=(e,t)=>new Mn({shape:e,unknownKeys:"strip",catchall:Br.create(),typeName:je.ZodObject,...Be(t)});let Bo=class extends We{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new Kn(s.ctx.common.issues));return ke(n,{code:me.invalid_union,unionErrors:o}),Le}if(n.common.async)return Promise.all(r.map(async a=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const u of r){const l={...n,common:{...n.common,issues:[]},parent:null},c=u._parseSync({data:n.data,path:n.path,parent:l});if(c.status==="valid")return c;c.status==="dirty"&&!a&&(a={result:c,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(u=>new Kn(u));return ke(n,{code:me.invalid_union,unionErrors:s}),Le}}get options(){return this._def.options}};Bo.create=(e,t)=>new Bo({options:e,typeName:je.ZodUnion,...Be(t)});const Bl=e=>e instanceof zo?Bl(e.schema):e instanceof Gn?Bl(e.innerType()):e instanceof qo?[e.value]:e instanceof Wo?e.options:e instanceof Vo?Object.keys(e.enum):e instanceof Ho?Bl(e._def.innerType):e instanceof Fo?[void 0]:e instanceof Lo?[null]:null;let Yg=class _I extends We{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==we.object)return ke(n,{code:me.invalid_type,expected:we.object,received:n.parsedType}),Le;const r=this.discriminator,i=n.data[r],a=this.optionsMap.get(i);return a?n.common.async?a._parseAsync({data:n.data,path:n.path,parent:n}):a._parseSync({data:n.data,path:n.path,parent:n}):(ke(n,{code:me.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Le)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const a of n){const o=Bl(a.shape[t]);if(!o)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of o){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,a)}}return new _I({typeName:je.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Be(r)})}};function nd(e,t){const n=ii(e),r=ii(t);if(e===t)return{valid:!0,data:e};if(n===we.object&&r===we.object){const i=st.objectKeys(t),a=st.objectKeys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...t};for(const s of a){const u=nd(e[s],t[s]);if(!u.valid)return{valid:!1};o[s]=u.data}return{valid:!0,data:o}}else if(n===we.array&&r===we.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const o=e[a],s=t[a],u=nd(o,s);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return n===we.date&&r===we.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}let Uo=class extends We{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,o)=>{if(Qf(a)||Qf(o))return Le;const s=nd(a.value,o.value);return s.valid?((ed(a)||ed(o))&&n.dirty(),{status:n.value,value:s.data}):(ke(r,{code:me.invalid_intersection_types}),Le)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};Uo.create=(e,t,n)=>new Uo({left:e,right:t,typeName:je.ZodIntersection,...Be(n)});let ai=class kI extends We{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==we.array)return ke(r,{code:me.invalid_type,expected:we.array,received:r.parsedType}),Le;if(r.data.length<this._def.items.length)return ke(r,{code:me.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Le;!this._def.rest&&r.data.length>this._def.items.length&&(ke(r,{code:me.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((o,s)=>{const u=this._def.items[s]||this._def.rest;return u?u._parse(new hr(r,o,r.path,s)):null}).filter(o=>!!o);return r.common.async?Promise.all(a).then(o=>wn.mergeArray(n,o)):wn.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new kI({...this._def,rest:t})}};ai.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ai({items:e,typeName:je.ZodTuple,rest:null,...Be(t)})};let Jg=class wg extends We{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==we.object)return ke(r,{code:me.invalid_type,expected:we.object,received:r.parsedType}),Le;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in r.data)i.push({key:a._parse(new hr(r,s,r.path,s)),value:o._parse(new hr(r,r.data[s],r.path,s))});return r.common.async?wn.mergeObjectAsync(n,i):wn.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof We?new wg({keyType:t,valueType:n,typeName:je.ZodRecord,...Be(r)}):new wg({keyType:fa.create(),valueType:t,typeName:je.ZodRecord,...Be(n)})}},Ul=class extends We{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==we.map)return ke(r,{code:me.invalid_type,expected:we.map,received:r.parsedType}),Le;const i=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([s,u],l)=>({key:i._parse(new hr(r,s,r.path,[l,"key"])),value:a._parse(new hr(r,u,r.path,[l,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const u of o){const l=await u.key,c=await u.value;if(l.status==="aborted"||c.status==="aborted")return Le;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const u of o){const l=u.key,c=u.value;if(l.status==="aborted"||c.status==="aborted")return Le;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}}}};Ul.create=(e,t,n)=>new Ul({valueType:t,keyType:e,typeName:je.ZodMap,...Be(n)});let zl=class xg extends We{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==we.set)return ke(r,{code:me.invalid_type,expected:we.set,received:r.parsedType}),Le;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(ke(r,{code:me.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(ke(r,{code:me.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function o(u){const l=new Set;for(const c of u){if(c.status==="aborted")return Le;c.status==="dirty"&&n.dirty(),l.add(c.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((u,l)=>a._parse(new hr(r,u,r.path,l)));return r.common.async?Promise.all(s).then(u=>o(u)):o(s)}min(t,n){return new xg({...this._def,minSize:{value:t,message:Pe.toString(n)}})}max(t,n){return new xg({...this._def,maxSize:{value:t,message:Pe.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};zl.create=(e,t)=>new zl({valueType:e,minSize:null,maxSize:null,typeName:je.ZodSet,...Be(t)});let Xg=class qf extends We{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==we.function)return ke(n,{code:me.invalid_type,expected:we.function,received:n.parsedType}),Le;function r(s,u){return Nl({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,jl(),Ao].filter(l=>!!l),issueData:{code:me.invalid_arguments,argumentsError:u}})}function i(s,u){return Nl({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,jl(),Ao].filter(l=>!!l),issueData:{code:me.invalid_return_type,returnTypeError:u}})}const a={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof ha){const s=this;return mn(async function(...u){const l=new Kn([]),c=await s._def.args.parseAsync(u,a).catch(p=>{throw l.addIssue(r(u,p)),l}),f=await Reflect.apply(o,this,c);return await s._def.returns._def.type.parseAsync(f,a).catch(p=>{throw l.addIssue(i(f,p)),l})})}else{const s=this;return mn(function(...u){const l=s._def.args.safeParse(u,a);if(!l.success)throw new Kn([r(u,l.error)]);const c=Reflect.apply(o,this,l.data),f=s._def.returns.safeParse(c,a);if(!f.success)throw new Kn([i(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new qf({...this._def,args:ai.create(t).rest(Ni.create())})}returns(t){return new qf({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new qf({args:t||ai.create([]).rest(Ni.create()),returns:n||Ni.create(),typeName:je.ZodFunction,...Be(r)})}},zo=class extends We{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};zo.create=(e,t)=>new zo({getter:e,typeName:je.ZodLazy,...Be(t)});let qo=class extends We{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ke(n,{received:n.data,code:me.invalid_literal,expected:this._def.value}),Le}return{status:"valid",value:t.data}}get value(){return this._def.value}};qo.create=(e,t)=>new qo({value:e,typeName:je.ZodLiteral,...Be(t)});function Qg(e,t){return new Wo({values:e,typeName:je.ZodEnum,...Be(t)})}let Wo=class Sg extends We{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ke(n,{expected:st.joinValues(r),received:n.parsedType,code:me.invalid_type}),Le}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return ke(n,{received:n.data,code:me.invalid_enum_value,options:r}),Le}return mn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t){return Sg.create(t)}exclude(t){return Sg.create(this.options.filter(n=>!t.includes(n)))}};Wo.create=Qg;let Vo=class extends We{_parse(t){const n=st.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==we.string&&r.parsedType!==we.number){const i=st.objectValues(n);return ke(r,{expected:st.joinValues(i),received:r.parsedType,code:me.invalid_type}),Le}if(n.indexOf(t.data)===-1){const i=st.objectValues(n);return ke(r,{received:r.data,code:me.invalid_enum_value,options:i}),Le}return mn(t.data)}get enum(){return this._def.values}};Vo.create=(e,t)=>new Vo({values:e,typeName:je.ZodNativeEnum,...Be(t)});let ha=class extends We{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==we.promise&&n.common.async===!1)return ke(n,{code:me.invalid_type,expected:we.promise,received:n.parsedType}),Le;const r=n.parsedType===we.promise?n.data:Promise.resolve(n.data);return mn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}};ha.create=(e,t)=>new ha({type:e,typeName:je.ZodPromise,...Be(t)});let Gn=class extends We{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===je.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{ke(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(r.data,a);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(o).then(s=>this._def.schema._parseAsync({data:s,path:r.path,parent:r})):this._def.schema._parseSync({data:o,path:r.path,parent:r})}if(i.type==="refinement"){const o=s=>{const u=i.refinement(s,a);if(r.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Le:(s.status==="dirty"&&n.dirty(),o(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Le:(s.status==="dirty"&&n.dirty(),o(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Po(o))return o;const s=i.transform(o.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>Po(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:n.value,value:s})):o);st.assertNever(i)}};Gn.create=(e,t,n)=>new Gn({schema:e,typeName:je.ZodEffects,effect:t,...Be(n)}),Gn.createWithPreprocess=(e,t,n)=>new Gn({schema:t,effect:{type:"preprocess",transform:e},typeName:je.ZodEffects,...Be(n)});let Ur=class extends We{_parse(t){return this._getType(t)===we.undefined?mn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Ur.create=(e,t)=>new Ur({innerType:e,typeName:je.ZodOptional,...Be(t)});let Fi=class extends We{_parse(t){return this._getType(t)===we.null?mn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Fi.create=(e,t)=>new Fi({innerType:e,typeName:je.ZodNullable,...Be(t)});let Ho=class extends We{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===we.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};Ho.create=(e,t)=>new Ho({innerType:e,typeName:je.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Be(t)});let ql=class extends We{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Ml(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Kn(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Kn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};ql.create=(e,t)=>new ql({innerType:e,typeName:je.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Be(t)});let Wl=class extends We{_parse(t){if(this._getType(t)!==we.nan){const r=this._getOrReturnCtx(t);return ke(r,{code:me.invalid_type,expected:we.nan,received:r.parsedType}),Le}return{status:"valid",value:t.data}}};Wl.create=e=>new Wl({typeName:je.ZodNaN,...Be(e)});const jR=Symbol("zod_brand");let eb=class extends We{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}},rd=class TI extends We{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Le:a.status==="dirty"?(n.dirty(),Kg(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Le:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new TI({in:t,out:n,typeName:je.ZodPipeline})}},Vl=class extends We{_parse(t){const n=this._def.innerType._parse(t);return Po(n)&&(n.value=Object.freeze(n.value)),n}};Vl.create=(e,t)=>new Vl({innerType:e,typeName:je.ZodReadonly,...Be(t)});const tb=(e,t={},n)=>e?da.create().superRefine((r,i)=>{var a,o;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,u=(o=(a=s.fatal)!==null&&a!==void 0?a:n)!==null&&o!==void 0?o:!0,l=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...l,fatal:u})}}):da.create(),NR={object:Mn.lazycreate};var je;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(je||(je={}));const MR=(e,t={message:`Input not instance of ${e.name}`})=>tb(n=>n instanceof e,t),nb=fa.create,rb=Do.create,FR=Wl.create,LR=jo.create,ib=No.create,BR=Mo.create,UR=Fl.create,zR=Fo.create,qR=Lo.create,WR=da.create,VR=Ni.create,HR=Br.create,ZR=Ll.create,KR=Mi.create,GR=Mn.create,YR=Mn.strictCreate,JR=Bo.create,XR=Yg.create,QR=Uo.create,eA=ai.create,tA=Jg.create,nA=Ul.create,rA=zl.create,iA=Xg.create,aA=zo.create,oA=qo.create,sA=Wo.create,lA=Vo.create,uA=ha.create,ab=Gn.create,cA=Ur.create,fA=Fi.create,dA=Gn.createWithPreprocess,pA=rd.create;var Te=Object.freeze({__proto__:null,defaultErrorMap:Ao,setErrorMap:SR,getErrorMap:jl,makeIssue:Nl,EMPTY_PATH:ER,addIssueToContext:ke,ParseStatus:wn,INVALID:Le,DIRTY:Kg,OK:mn,isAborted:Qf,isDirty:ed,isValid:Po,isAsync:Ml,get util(){return st},get objectUtil(){return Xf},ZodParsedType:we,getParsedType:ii,ZodType:We,ZodString:fa,ZodNumber:Do,ZodBigInt:jo,ZodBoolean:No,ZodDate:Mo,ZodSymbol:Fl,ZodUndefined:Fo,ZodNull:Lo,ZodAny:da,ZodUnknown:Ni,ZodNever:Br,ZodVoid:Ll,ZodArray:Mi,ZodObject:Mn,ZodUnion:Bo,ZodDiscriminatedUnion:Yg,ZodIntersection:Uo,ZodTuple:ai,ZodRecord:Jg,ZodMap:Ul,ZodSet:zl,ZodFunction:Xg,ZodLazy:zo,ZodLiteral:qo,ZodEnum:Wo,ZodNativeEnum:Vo,ZodPromise:ha,ZodEffects:Gn,ZodTransformer:Gn,ZodOptional:Ur,ZodNullable:Fi,ZodDefault:Ho,ZodCatch:ql,ZodNaN:Wl,BRAND:jR,ZodBranded:eb,ZodPipeline:rd,ZodReadonly:Vl,custom:tb,Schema:We,ZodSchema:We,late:NR,get ZodFirstPartyTypeKind(){return je},coerce:{string:e=>fa.create({...e,coerce:!0}),number:e=>Do.create({...e,coerce:!0}),boolean:e=>No.create({...e,coerce:!0}),bigint:e=>jo.create({...e,coerce:!0}),date:e=>Mo.create({...e,coerce:!0})},any:WR,array:KR,bigint:LR,boolean:ib,date:BR,discriminatedUnion:XR,effect:ab,enum:sA,function:iA,instanceof:MR,intersection:QR,lazy:aA,literal:oA,map:nA,nan:FR,nativeEnum:lA,never:HR,null:qR,nullable:fA,number:rb,object:GR,oboolean:()=>ib().optional(),onumber:()=>rb().optional(),optional:cA,ostring:()=>nb().optional(),pipeline:pA,preprocess:dA,promise:uA,record:tA,set:rA,strictObject:YR,string:nb,symbol:UR,transformer:ab,tuple:eA,undefined:zR,union:JR,unknown:VR,void:ZR,NEVER:Le,ZodIssueCode:me,quotelessJson:xR,ZodError:Kn});const ma=Te.object({title:Te.string().optional(),link:Te.string().optional()}),id=Te.object({color:Te.string().optional(),variant:Te.enum(["soft","solid"]).optional(),themeMode:Te.enum(["light","dark"]).optional(),fontFamily:Te.enum(["rubik","inter","ibm","fira"]).optional(),radius:Te.number().min(.5).max(4).optional()}),ob=Te.object({composerPlaceholder:Te.string().optional(),botName:Te.string().optional(),botAvatar:Te.string().optional(),botDescription:Te.string().optional(),website:ma.optional(),email:ma.optional(),phone:ma.optional(),privacyPolicy:ma.optional(),termsOfService:ma.optional(),showPoweredBy:Te.boolean().optional(),storageLocation:Te.enum(["localStorage","sessionStorage"]).optional()}).merge(id),sb=Te.enum(["heading1","heading2","heading3","text","horizontalRule","link","italic","bold","orderedList","unorderedList","listItem","lineBreak","pre"]),lb=Te.object({}).passthrough().transform(e=>e),ve=Te.object({className:Te.string().optional(),style:lb.optional()}),Hl=Te.object({container:ve.optional(),image:ve.optional(),fallback:ve.optional()}),ub=Te.object({button:ve.optional(),text:Te.record(sb,ve.optional()),image:Te.object({image:ve.optional(),placeholder:ve.optional()}).optional(),audio:ve.optional(),video:ve.optional(),file:Te.object({container:ve.optional(),title:ve.optional(),icon:ve.optional()}).optional(),location:Te.object({container:ve.optional(),title:ve.optional(),icon:ve.optional()}).optional(),column:ve.optional(),row:ve.optional(),bubble:ve.optional(),carousel:Te.object({container:ve.optional(),slidesContainer:ve.optional(),backButton:ve.optional(),nextButton:ve.optional()}).optional(),dropdown:Te.object({button:Te.object({container:ve.optional(),icon:ve.optional(),text:ve.optional()}).optional(),content:Te.object({container:ve.optional(),item:ve.optional()}).optional()}).optional()}),cb=Te.object({container:ve.optional(),modal:Te.object({overlay:ve.optional(),container:ve.optional(),dialog:Te.object({container:ve.optional(),title:Te.object({container:ve.optional(),text:ve.optional(),closeIcon:ve.optional()}).optional(),content:ve.optional(),newConversation:Te.object({text:ve.optional(),button:ve.optional()}).optional()}).optional()}).optional(),notification:Te.object({container:ve.optional(),title:ve.optional(),description:ve.optional(),icon:ve.optional(),closeIcon:ve.optional()}).optional(),header:Te.object({container:ve.optional(),content:Te.object({container:ve.optional(),title:ve.optional(),description:ve.optional(),avatar:Hl.optional(),actions:Te.object({container:ve.optional(),icons:ve.optional()}).optional()}),expandedContent:Te.object({container:ve.optional(),group:ve.optional(),descriptionItems:Te.object({container:ve.optional(),icon:ve.optional(),text:ve.optional(),link:ve.optional(),poweredBy:ve.optional()}).optional()}).optional(),description:Te.object({container:ve.optional(),title:ve.optional(),subtitle:ve.optional()}).optional(),newConversationIcon:ve.optional()}).optional(),composer:Te.object({container:ve.optional(),input:ve.optional(),uploadButton:Te.object({container:ve.optional(),icon:ve.optional()}).optional(),button:Te.object({container:ve.optional(),icon:ve.optional()}).optional()}).optional(),fab:Te.object({icon:ve.optional(),container:ve.optional()}).optional(),messageList:Te.object({scrollbar:Te.object({container:ve.optional(),viewport:ve.optional(),thumb:ve.optional(),corner:ve.optional(),background:ve.optional()}).optional(),container:ve.optional(),marquee:Te.object({content:ve.optional(),title:ve.optional(),description:ve.optional(),avatar:Hl.optional(),container:ve.optional()}).optional(),scrollDownButton:Te.object({container:ve.optional(),button:ve.optional(),icon:ve.optional()}).optional()}).optional(),message:Te.object({container:ve.optional(),avatar:Hl.optional(),blocks:ub.optional()}).optional(),loadingIndicator:Te.object({container:ve.optional(),loader:ve.optional()}).optional()}),fb=Te.enum(["opened","closed","initial"]),db=Te.object({name:Te.string().optional(),pictureUrl:Te.string().optional(),data:Te.record(Te.unknown()).optional(),userKey:Te.string().optional()}),pb=Te.object({configuration:ob.optional().catch(void 0),theme:cb.optional().catch(void 0),style:Te.string().optional().catch(void 0),user:db.optional().catch(void 0)}),hA=pb.extend({clientId:Te.string(),botId:Te.string(),selector:Te.string().optional().catch(void 0),webchatScriptUrl:Te.string().optional().catch(void 0),fabScriptUrl:Te.string().optional().catch(void 0),pushpinUrl:Te.string().optional().catch(void 0),defaultState:fb.optional().catch(void 0)});function hb(e){const{fontFamily:t,radius:n,themeMode:r,variant:i,color:a}=id.parse(e);let o={},s={};if(a){const c=Hg(a),f=r==="dark"?Rg(c):c,d=Hg(zI(qI(Jf(a)))),p=r==="dark"?Rg(d):d,m=r==="dark"?"#101010":"#fdfdfd";s=Object.entries({...f,1:m}).reduce((y,[v,b])=>({...y,[`--bpPrimary-${v}`]:b}),{});const h=Object.entries({...p,1:m}).reduce((y,[v,b])=>({...y,[`--bpGray-${v}`]:b}),{});o={...s,...h}}n&&(o={...o,"--bpRadius-scale":n.toString()});const u=s?Mg(s["--bpPrimary-600"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)",l=i==="solid"?{"--header-bg":"var(--bpPrimary-600)","--header-bg-hover":"var(--bpPrimary-700)","--header-hover-dark":"var(--bpPrimary-800)","--header-title":u,"--header-description":u,"--header-description-icon":u,"--header-description-link":u,"--header-avatar-bg":"var(--bpPrimary-300)","--header-avatar-text":"var(--bpPrimary-700)","--message-bg":"var(--bpPrimary-600)","--message-bg-hover":"var(--bpPrimary-700)","--message-text":u,"--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-50)","--button-bg-hover":"var(--bpPrimary-100)","--button-text":"var(--bpPrimary-800)","--fab-bg":"var(--bpPrimary-600)","--fab-bg-hover":"var(--bpPrimary-700)","--fab-icon":u}:{"--header-bg":"var(--bpGray-50)","--header-bg-hover":"var(--bpGray-100)","--header-hover-dark":"var(--bpGray-200)","--header-title":"var(--bpGray-900)","--header-description":"var(--bpGray-800)","--header-description-icon":"var(--bpPrimary-700)","--header-description-link":"var(--bpPrimary-800)","--header-avatar-bg":"var(--bpPrimary-600)","--header-avatar-text":"var(--bpPrimary-50)","--message-bg":"var(--bpPrimary-100)","--message-bg-hover":"var(--bpPrimary-200)","--message-text":"var(--bpPrimary-900)","--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-500)","--button-bg-hover":"var(--bpPrimary-600)","--button-text":s?Mg(s["--bpPrimary-500"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)","--fab-bg":"var(--bpPrimary-100)","--fab-bg-hover":"var(--bpPrimary-200)","--fab-icon":"var(--bpPrimary-700)"};return o={...o,...l},Fg(":root",o)+(t?Fg(".bpFont",{"font-family":`var(--${t}-font)`}):"")}const mA=(e,t={})=>new Promise((n,r)=>{if(typeof window>"u")return r("Window is not defined");if(!e)return r("Url is not defined");let i=null;const a=new Image;a.addEventListener("load",()=>{i&&clearTimeout(i),n({width:a.naturalWidth,height:a.naturalHeight})}),a.addEventListener("error",o=>{i&&clearTimeout(i),r(`${o.type}: ${o.message}`)}),a.src=e,t.timeout&&(i=setTimeout(()=>r("Timeout"),t.timeout))}),Zl=j.forwardRef(({userId:e,src:t,container:n,image:r,fallback:i,...a},o)=>{const s=Lg(e??"",15);return $.jsxs(Kf,{ref:o,"data-color":s,...n,...a,children:[$.jsx(Gf,{src:t,...r}),$.jsx(Yf,{...i,children:typeof a.children=="string"?a.children[0]:a.children})]})});Zl.displayName="Avatar";function pfe(){}function hfe(){}function vA(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const yA=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,gA=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,bA={};function mb(e,t){return(bA.jsx?gA:yA).test(e)}const wA=/[ \t\n\f\r]/g;function xA(e){return typeof e=="object"?e.type==="text"?vb(e.value):!1:vb(e)}function vb(e){return e.replace(wA,"")===""}class Zo{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Zo.prototype.property={},Zo.prototype.normal={},Zo.prototype.space=null;function yb(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new Zo(n,r,t)}function ad(e){return e.toLowerCase()}class Fn{constructor(t,n){this.property=t,this.attribute=n}}Fn.prototype.space=null,Fn.prototype.boolean=!1,Fn.prototype.booleanish=!1,Fn.prototype.overloadedBoolean=!1,Fn.prototype.number=!1,Fn.prototype.commaSeparated=!1,Fn.prototype.spaceSeparated=!1,Fn.prototype.commaOrSpaceSeparated=!1,Fn.prototype.mustUseProperty=!1,Fn.prototype.defined=!1;let SA=0;const Ue=Li(),Lt=Li(),gb=Li(),de=Li(),xt=Li(),va=Li(),$n=Li();function Li(){return 2**++SA}const od=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ue,booleanish:Lt,commaOrSpaceSeparated:$n,commaSeparated:va,number:de,overloadedBoolean:gb,spaceSeparated:xt},Symbol.toStringTag,{value:"Module"})),sd=Object.keys(od);class ld extends Fn{constructor(t,n,r,i){let a=-1;if(super(t,n),bb(this,"space",i),typeof r=="number")for(;++a<sd.length;){const o=sd[a];bb(this,sd[a],(r&od[o])===od[o])}}}ld.prototype.defined=!0;function bb(e,t,n){n&&(e[t]=n)}const EA={}.hasOwnProperty;function ya(e){const t={},n={};let r;for(r in e.properties)if(EA.call(e.properties,r)){const i=e.properties[r],a=new ld(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ad(r)]=r,n[ad(a.attribute)]=r}return new Zo(t,n,e.space)}const wb=ya({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),xb=ya({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Sb(e,t){return t in e?e[t]:t}function Eb(e,t){return Sb(e,t.toLowerCase())}const _b=ya({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Eb,properties:{xmlns:null,xmlnsXLink:null}}),kb=ya({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Lt,ariaAutoComplete:null,ariaBusy:Lt,ariaChecked:Lt,ariaColCount:de,ariaColIndex:de,ariaColSpan:de,ariaControls:xt,ariaCurrent:null,ariaDescribedBy:xt,ariaDetails:null,ariaDisabled:Lt,ariaDropEffect:xt,ariaErrorMessage:null,ariaExpanded:Lt,ariaFlowTo:xt,ariaGrabbed:Lt,ariaHasPopup:null,ariaHidden:Lt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:xt,ariaLevel:de,ariaLive:null,ariaModal:Lt,ariaMultiLine:Lt,ariaMultiSelectable:Lt,ariaOrientation:null,ariaOwns:xt,ariaPlaceholder:null,ariaPosInSet:de,ariaPressed:Lt,ariaReadOnly:Lt,ariaRelevant:null,ariaRequired:Lt,ariaRoleDescription:xt,ariaRowCount:de,ariaRowIndex:de,ariaRowSpan:de,ariaSelected:Lt,ariaSetSize:de,ariaSort:null,ariaValueMax:de,ariaValueMin:de,ariaValueNow:de,ariaValueText:null,role:null}}),_A=ya({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Eb,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:va,acceptCharset:xt,accessKey:xt,action:null,allow:null,allowFullScreen:Ue,allowPaymentRequest:Ue,allowUserMedia:Ue,alt:null,as:null,async:Ue,autoCapitalize:null,autoComplete:xt,autoFocus:Ue,autoPlay:Ue,blocking:xt,capture:null,charSet:null,checked:Ue,cite:null,className:xt,cols:de,colSpan:null,content:null,contentEditable:Lt,controls:Ue,controlsList:xt,coords:de|va,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ue,defer:Ue,dir:null,dirName:null,disabled:Ue,download:gb,draggable:Lt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ue,formTarget:null,headers:xt,height:de,hidden:Ue,high:de,href:null,hrefLang:null,htmlFor:xt,httpEquiv:xt,id:null,imageSizes:null,imageSrcSet:null,inert:Ue,inputMode:null,integrity:null,is:null,isMap:Ue,itemId:null,itemProp:xt,itemRef:xt,itemScope:Ue,itemType:xt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ue,low:de,manifest:null,max:null,maxLength:de,media:null,method:null,min:null,minLength:de,multiple:Ue,muted:Ue,name:null,nonce:null,noModule:Ue,noValidate:Ue,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ue,optimum:de,pattern:null,ping:xt,placeholder:null,playsInline:Ue,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ue,referrerPolicy:null,rel:xt,required:Ue,reversed:Ue,rows:de,rowSpan:de,sandbox:xt,scope:null,scoped:Ue,seamless:Ue,selected:Ue,shadowRootClonable:Ue,shadowRootDelegatesFocus:Ue,shadowRootMode:null,shape:null,size:de,sizes:null,slot:null,span:de,spellCheck:Lt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:de,step:null,style:null,tabIndex:de,target:null,title:null,translate:null,type:null,typeMustMatch:Ue,useMap:null,value:Lt,width:de,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:xt,axis:null,background:null,bgColor:null,border:de,borderColor:null,bottomMargin:de,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ue,declare:Ue,event:null,face:null,frame:null,frameBorder:null,hSpace:de,leftMargin:de,link:null,longDesc:null,lowSrc:null,marginHeight:de,marginWidth:de,noResize:Ue,noHref:Ue,noShade:Ue,noWrap:Ue,object:null,profile:null,prompt:null,rev:null,rightMargin:de,rules:null,scheme:null,scrolling:Lt,standby:null,summary:null,text:null,topMargin:de,valueType:null,version:null,vAlign:null,vLink:null,vSpace:de,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ue,disableRemotePlayback:Ue,prefix:null,property:null,results:de,security:null,unselectable:null}}),kA=ya({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:Sb,properties:{about:$n,accentHeight:de,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:de,amplitude:de,arabicForm:null,ascent:de,attributeName:null,attributeType:null,azimuth:de,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:de,by:null,calcMode:null,capHeight:de,className:xt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:de,diffuseConstant:de,direction:null,display:null,dur:null,divisor:de,dominantBaseline:null,download:Ue,dx:null,dy:null,edgeMode:null,editable:null,elevation:de,enableBackground:null,end:null,event:null,exponent:de,externalResourcesRequired:null,fill:null,fillOpacity:de,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:va,g2:va,glyphName:va,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:de,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:de,horizOriginX:de,horizOriginY:de,id:null,ideographic:de,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:de,k:de,k1:de,k2:de,k3:de,k4:de,kernelMatrix:$n,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:de,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:de,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:de,overlineThickness:de,paintOrder:null,panose1:null,path:null,pathLength:de,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:xt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:de,pointsAtY:de,pointsAtZ:de,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:$n,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:$n,rev:$n,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:$n,requiredFeatures:$n,requiredFonts:$n,requiredFormats:$n,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:de,specularExponent:de,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:de,strikethroughThickness:de,string:null,stroke:null,strokeDashArray:$n,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:de,strokeOpacity:de,strokeWidth:null,style:null,surfaceScale:de,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:$n,tabIndex:de,tableValues:null,target:null,targetX:de,targetY:de,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:$n,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:de,underlineThickness:de,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:de,values:null,vAlphabetic:de,vMathematical:de,vectorEffect:null,vHanging:de,vIdeographic:de,version:null,vertAdvY:de,vertOriginX:de,vertOriginY:de,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:de,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),TA=/^data[-\w.:]+$/i,Tb=/-[a-z]/g,CA=/[A-Z]/g;function OA(e,t){const n=ad(t);let r=t,i=Fn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&TA.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Tb,IA);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Tb.test(a)){let o=a.replace(CA,$A);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=ld}return new i(r,t)}function $A(e){return"-"+e.toLowerCase()}function IA(e){return e.charAt(1).toUpperCase()}const RA={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},AA=yb([xb,wb,_b,kb,_A],"html"),ud=yb([xb,wb,_b,kb,kA],"svg");function PA(e){return e.join(" ").trim()}var Cb={},Ob=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,DA=/\n/g,jA=/^\s*/,NA=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,MA=/^:\s*/,FA=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,LA=/^[;\s]*/,BA=/^\s+|\s+$/g,UA=`
31
+ `,$b="/",Ib="*",Bi="",zA="comment",qA="declaration",WA=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(m){var h=m.match(DA);h&&(n+=h.length);var y=m.lastIndexOf(UA);r=~y?m.length-y:r+m.length}function a(){var m={line:n,column:r};return function(h){return h.position=new o(m),l(),h}}function o(m){this.start=m,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(m){var h=new Error(t.source+":"+n+":"+r+": "+m);if(h.reason=m,h.filename=t.source,h.line=n,h.column=r,h.source=e,!t.silent)throw h}function u(m){var h=m.exec(e);if(h){var y=h[0];return i(y),e=e.slice(y.length),h}}function l(){u(jA)}function c(m){var h;for(m=m||[];h=f();)h!==!1&&m.push(h);return m}function f(){var m=a();if(!($b!=e.charAt(0)||Ib!=e.charAt(1))){for(var h=2;Bi!=e.charAt(h)&&(Ib!=e.charAt(h)||$b!=e.charAt(h+1));)++h;if(h+=2,Bi===e.charAt(h-1))return s("End of comment missing");var y=e.slice(2,h-2);return r+=2,i(y),e=e.slice(h),r+=2,m({type:zA,comment:y})}}function d(){var m=a(),h=u(NA);if(h){if(f(),!u(MA))return s("property missing ':'");var y=u(FA),v=m({type:qA,property:Rb(h[0].replace(Ob,Bi)),value:y?Rb(y[0].replace(Ob,Bi)):Bi});return u(LA),v}}function p(){var m=[];c(m);for(var h;h=d();)h!==!1&&(m.push(h),c(m));return m}return l(),p()};function Rb(e){return e?e.replace(BA,Bi):Bi}var VA=vt&&vt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Cb,"__esModule",{value:!0});var Ab=Cb.default=ZA,HA=VA(WA);function ZA(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,HA.default)(e),i=typeof t=="function";return r.forEach(function(a){if(a.type==="declaration"){var o=a.property,s=a.value;i?t(o,s,a):s&&(n=n||{},n[o]=s)}}),n}const KA=Ab.default||Ab,Pb=Db("end"),cd=Db("start");function Db(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function GA(e){const t=cd(e),n=Pb(e);if(t&&n)return{start:t,end:n}}function Ko(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?jb(e.position):"start"in e||"end"in e?jb(e):"line"in e||"column"in e?fd(e):""}function fd(e){return Nb(e&&e.line)+":"+Nb(e&&e.column)}function jb(e){return fd(e&&e.start)+"-"+fd(e&&e.end)}function Nb(e){return e&&typeof e=="number"?e:1}class sn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},o=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(o=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?a.ruleId=r:(a.source=r.slice(0,u),a.ruleId=r.slice(u+1))}if(!a.place&&a.ancestors&&a.ancestors){const u=a.ancestors[a.ancestors.length-1];u&&(a.place=u.position)}const s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=Ko(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}sn.prototype.file="",sn.prototype.name="",sn.prototype.reason="",sn.prototype.message="",sn.prototype.stack="",sn.prototype.column=void 0,sn.prototype.line=void 0,sn.prototype.ancestors=void 0,sn.prototype.cause=void 0,sn.prototype.fatal=void 0,sn.prototype.place=void 0,sn.prototype.ruleId=void 0,sn.prototype.source=void 0;const dd={}.hasOwnProperty,YA=new Map,JA=/[A-Z]/g,XA=/-([a-z])/g,QA=new Set(["table","tbody","thead","tfoot","tr"]),eP=new Set(["td","th"]),Mb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function tP(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=uP(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=lP(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ud:AA,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Fb(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Fb(e,t,n){if(t.type==="element")return nP(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return rP(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return aP(e,t,n);if(t.type==="mdxjsEsm")return iP(e,t);if(t.type==="root")return oP(e,t,n);if(t.type==="text")return sP(e,t)}function nP(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=ud,e.schema=i),e.ancestors.push(t);const a=Bb(e,t.tagName,!1),o=cP(e,t);let s=hd(e,t);return QA.has(t.tagName)&&(s=s.filter(function(u){return typeof u=="string"?!xA(u):!0})),Lb(e,o,a,t),pd(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function rP(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Go(e,t.position)}function iP(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Go(e,t.position)}function aP(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=ud,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:Bb(e,t.name,!0),o=fP(e,t),s=hd(e,t);return Lb(e,o,a,t),pd(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function oP(e,t,n){const r={};return pd(r,hd(e,t)),e.create(t,e.Fragment,r,n)}function sP(e,t){return t.value}function Lb(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function pd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function lP(e,t,n){return r;function r(i,a,o,s){const l=Array.isArray(o.children)?n:t;return s?l(a,o,s):l(a,o)}}function uP(e,t){return n;function n(r,i,a,o){const s=Array.isArray(a.children),u=cd(r);return t(i,a,o,s,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function cP(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&dd.call(t.properties,i)){const a=dP(e,i,t.properties[i]);if(a){const[o,s]=a;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&eP.has(t.tagName)?r=s:n[o]=s}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function fP(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const o=a.expression;o.type;const s=o.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else Go(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else Go(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function hd(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:YA;for(;++r<t.children.length;){const a=t.children[r];let o;if(e.passKeys){const u=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(u){const l=i.get(u)||0;o=u+"-"+l,i.set(u,l+1)}}const s=Fb(e,a,o);s!==void 0&&n.push(s)}return n}function dP(e,t,n){const r=OA(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?vA(n):PA(n)),r.property==="style"){let i=typeof n=="object"?n:pP(e,String(n));return e.stylePropertyNameCase==="css"&&(i=hP(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?RA[r.property]||r.property:r.attribute,n]}}function pP(e,t){const n={};try{KA(t,r)}catch(i){if(!e.ignoreInvalidStyle){const a=i,o=new sn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=Mb+"#cannot-parse-style-attribute",o}}return n;function r(i,a){let o=i;o.slice(0,2)!=="--"&&(o.slice(0,4)==="-ms-"&&(o="ms-"+o.slice(4)),o=o.replace(XA,vP)),n[o]=a}}function Bb(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,o;for(;++a<i.length;){const s=mb(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};o=o?{type:"MemberExpression",object:o,property:s,computed:!!(a&&s.type==="Literal"),optional:!1}:s}r=o}else r=mb(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return dd.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Go(e)}function Go(e,t){const n=new sn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Mb+"#cannot-handle-mdx-estrees-without-createevaluater",n}function hP(e){const t={};let n;for(n in e)dd.call(e,n)&&(t[mP(n)]=e[n]);return t}function mP(e){let t=e.replace(JA,yP);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function vP(e,t){return t.toUpperCase()}function yP(e){return"-"+e.toLowerCase()}const md={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},gP={};function vd(e,t){const n=gP,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ub(e,r,i)}function Ub(e,t,n){if(bP(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return zb(e.children,t,n)}return Array.isArray(e)?zb(e,t,n):""}function zb(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Ub(e[i],t,n);return r.join("")}function bP(e){return!!(e&&typeof e=="object")}const qb=document.createElement("i");function yd(e){const t="&"+e+";";qb.innerHTML=t;const n=qb.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Ln(e,t,n,r){const i=e.length;let a=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Bn(e,t){return e.length>0?(Ln(e,e.length,0,t),e):t}const Wb={}.hasOwnProperty;function Vb(e){const t={};let n=-1;for(;++n<e.length;)wP(t,e[n]);return t}function wP(e,t){let n;for(n in t){const i=(Wb.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){Wb.call(i,o)||(i[o]=[]);const s=a[o];xP(i[o],Array.isArray(s)?s:s?[s]:[])}}}function xP(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Ln(e,0,0,r)}function Hb(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Yn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const vn=oi(/[A-Za-z]/),ln=oi(/[\dA-Za-z]/),SP=oi(/[#-'*+\--9=?A-Z^-~]/);function Kl(e){return e!==null&&(e<32||e===127)}const gd=oi(/\d/),EP=oi(/[\dA-Fa-f]/),_P=oi(/[!-/:-@[-`{-~]/);function De(e){return e!==null&&e<-2}function gt(e){return e!==null&&(e<0||e===32)}function Ye(e){return e===-2||e===-1||e===32}const Gl=oi(new RegExp("\\p{P}|\\p{S}","u")),Ui=oi(/\s/);function oi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ga(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let o="";if(a===37&&ln(e.charCodeAt(n+1))&&ln(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const s=e.charCodeAt(n+1);a<56320&&s>56319&&s<57344?(o=String.fromCharCode(a,s),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function tt(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(u){return Ye(u)?(e.enter(n),s(u)):t(u)}function s(u){return Ye(u)&&a++<i?(e.consume(u),s):(e.exit(n),t(u))}}const kP={tokenize:TP};function TP(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),tt(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),a(s)}function a(s){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,o(s)}function o(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return De(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),o)}}const CP={tokenize:OP},Zb={tokenize:$P};function OP(e){const t=this,n=[];let r=0,i,a,o;return s;function s(w){if(r<n.length){const T=n[r];return t.containerState=T[1],e.attempt(T[0].continuation,u,l)(w)}return l(w)}function u(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&b();const T=t.events.length;let E=T,_;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){_=t.events[E][1].end;break}v(r);let O=T;for(;O<t.events.length;)t.events[O][1].end=Object.assign({},_),O++;return Ln(t.events,E+1,0,t.events.slice(T)),t.events.length=O,l(w)}return s(w)}function l(w){if(r===n.length){if(!i)return d(w);if(i.currentConstruct&&i.currentConstruct.concrete)return m(w);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Zb,c,f)(w)}function c(w){return i&&b(),v(r),d(w)}function f(w){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(w)}function d(w){return t.containerState={},e.attempt(Zb,p,m)(w)}function p(w){return r++,n.push([t.currentConstruct,t.containerState]),d(w)}function m(w){if(w===null){i&&b(),v(0),e.consume(w);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:a,_tokenizer:i}),h(w)}function h(w){if(w===null){y(e.exit("chunkFlow"),!0),v(0),e.consume(w);return}return De(w)?(e.consume(w),y(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(w),h)}function y(w,T){const E=t.sliceStream(w);if(T&&E.push(null),w.previous=a,a&&(a.next=w),a=w,i.defineSkip(w.start),i.write(E),t.parser.lazy[w.start.line]){let _=i.events.length;for(;_--;)if(i.events[_][1].start.offset<o&&(!i.events[_][1].end||i.events[_][1].end.offset>o))return;const O=t.events.length;let z=O,U,k;for(;z--;)if(t.events[z][0]==="exit"&&t.events[z][1].type==="chunkFlow"){if(U){k=t.events[z][1].end;break}U=!0}for(v(r),_=O;_<t.events.length;)t.events[_][1].end=Object.assign({},k),_++;Ln(t.events,z+1,0,t.events.slice(O)),t.events.length=_}}function v(w){let T=n.length;for(;T-- >w;){const E=n[T];t.containerState=E[1],E[0].exit.call(t,e)}n.length=w}function b(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function $P(e,t,n){return tt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Yl(e){if(e===null||gt(e)||Ui(e))return 1;if(Gl(e))return 2}function Jl(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const bd={name:"attention",tokenize:RP,resolveAll:IP};function IP(e,t){let n=-1,r,i,a,o,s,u,l,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),d=Object.assign({},e[n][1].start);Kb(f,-u),Kb(d,u),o={type:u>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},s={type:u>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:d},a={type:u>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:u>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},o.start),e[n][1].start=Object.assign({},s.end),l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Bn(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=Bn(l,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",a,t]]),l=Bn(l,Jl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Bn(l,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,l=Bn(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,Ln(e,r-1,n-r+3,l),n=r+l.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function RP(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Yl(r);let a;return o;function o(u){return a=u,e.enter("attentionSequence"),s(u)}function s(u){if(u===a)return e.consume(u),s;const l=e.exit("attentionSequence"),c=Yl(u),f=!c||c===2&&i||n.includes(u),d=!i||i===2&&c||n.includes(r);return l._open=!!(a===42?f:f&&(i||!d)),l._close=!!(a===42?d:d&&(c||!f)),t(u)}}function Kb(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const AP={name:"autolink",tokenize:PP};function PP(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(p){return vn(p)?(e.consume(p),o):p===64?n(p):l(p)}function o(p){return p===43||p===45||p===46||ln(p)?(r=1,s(p)):l(p)}function s(p){return p===58?(e.consume(p),r=0,u):(p===43||p===45||p===46||ln(p))&&r++<32?(e.consume(p),s):(r=0,l(p))}function u(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Kl(p)?n(p):(e.consume(p),u)}function l(p){return p===64?(e.consume(p),c):SP(p)?(e.consume(p),l):n(p)}function c(p){return ln(p)?f(p):n(p)}function f(p){return p===46?(e.consume(p),r=0,c):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):d(p)}function d(p){if((p===45||ln(p))&&r++<63){const m=p===45?d:f;return e.consume(p),m}return n(p)}}const Yo={tokenize:DP,partial:!0};function DP(e,t,n){return r;function r(a){return Ye(a)?tt(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||De(a)?t(a):n(a)}}const Gb={name:"blockQuote",tokenize:jP,continuation:{tokenize:NP},exit:MP};function jP(e,t,n){const r=this;return i;function i(o){if(o===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),a}return n(o)}function a(o){return Ye(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function NP(e,t,n){const r=this;return i;function i(o){return Ye(o)?tt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):a(o)}function a(o){return e.attempt(Gb,t,n)(o)}}function MP(e){e.exit("blockQuote")}const Yb={name:"characterEscape",tokenize:FP};function FP(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return _P(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Jb={name:"characterReference",tokenize:LP};function LP(e,t,n){const r=this;let i=0,a,o;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),u}function u(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),a=31,o=ln,c(f))}function l(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=EP,c):(e.enter("characterReferenceValue"),a=7,o=gd,c(f))}function c(f){if(f===59&&i){const d=e.exit("characterReferenceValue");return o===ln&&!yd(r.sliceSerialize(d))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(f)&&i++<a?(e.consume(f),c):n(f)}}const Xb={tokenize:UP,partial:!0},Qb={name:"codeFenced",tokenize:BP,concrete:!0};function BP(e,t,n){const r=this,i={tokenize:E,partial:!0};let a=0,o=0,s;return u;function u(_){return l(_)}function l(_){const O=r.events[r.events.length-1];return a=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,s=_,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(_)}function c(_){return _===s?(o++,e.consume(_),c):o<3?n(_):(e.exit("codeFencedFenceSequence"),Ye(_)?tt(e,f,"whitespace")(_):f(_))}function f(_){return _===null||De(_)?(e.exit("codeFencedFence"),r.interrupt?t(_):e.check(Xb,h,T)(_)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(_))}function d(_){return _===null||De(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(_)):Ye(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),tt(e,p,"whitespace")(_)):_===96&&_===s?n(_):(e.consume(_),d)}function p(_){return _===null||De(_)?f(_):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(_))}function m(_){return _===null||De(_)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(_)):_===96&&_===s?n(_):(e.consume(_),m)}function h(_){return e.attempt(i,T,y)(_)}function y(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),v}function v(_){return a>0&&Ye(_)?tt(e,b,"linePrefix",a+1)(_):b(_)}function b(_){return _===null||De(_)?e.check(Xb,h,T)(_):(e.enter("codeFlowValue"),w(_))}function w(_){return _===null||De(_)?(e.exit("codeFlowValue"),b(_)):(e.consume(_),w)}function T(_){return e.exit("codeFenced"),t(_)}function E(_,O,z){let U=0;return k;function k(A){return _.enter("lineEnding"),_.consume(A),_.exit("lineEnding"),D}function D(A){return _.enter("codeFencedFence"),Ye(A)?tt(_,W,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):W(A)}function W(A){return A===s?(_.enter("codeFencedFenceSequence"),B(A)):z(A)}function B(A){return A===s?(U++,_.consume(A),B):U>=o?(_.exit("codeFencedFenceSequence"),Ye(A)?tt(_,I,"whitespace")(A):I(A)):z(A)}function I(A){return A===null||De(A)?(_.exit("codeFencedFence"),O(A)):z(A)}}}function UP(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const wd={name:"codeIndented",tokenize:qP},zP={tokenize:WP,partial:!0};function qP(e,t,n){const r=this;return i;function i(l){return e.enter("codeIndented"),tt(e,a,"linePrefix",5)(l)}function a(l){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?o(l):n(l)}function o(l){return l===null?u(l):De(l)?e.attempt(zP,o,u)(l):(e.enter("codeFlowValue"),s(l))}function s(l){return l===null||De(l)?(e.exit("codeFlowValue"),o(l)):(e.consume(l),s)}function u(l){return e.exit("codeIndented"),t(l)}}function WP(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):De(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):tt(e,a,"linePrefix",5)(o)}function a(o){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):De(o)?i(o):n(o)}}const VP={name:"codeText",tokenize:KP,resolve:HP,previous:ZP};function HP(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function ZP(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function KP(e,t,n){let r=0,i,a;return o;function o(f){return e.enter("codeText"),e.enter("codeTextSequence"),s(f)}function s(f){return f===96?(e.consume(f),r++,s):(e.exit("codeTextSequence"),u(f))}function u(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),u):f===96?(a=e.enter("codeTextSequence"),i=0,c(f)):De(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("codeTextData"),l(f))}function l(f){return f===null||f===32||f===96||De(f)?(e.exit("codeTextData"),u(f)):(e.consume(f),l)}function c(f){return f===96?(e.consume(f),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(a.type="codeTextData",l(f))}}class GP{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Jo(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Jo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Jo(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Jo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Jo(this.left,n.reverse())}}}function Jo(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function ew(e){const t={};let n=-1,r,i,a,o,s,u,l;const c=new GP(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,a=0,a<u.length&&u[a][1].type==="lineEndingBlank"&&(a+=2),a<u.length&&u[a][1].type==="content"))for(;++a<u.length&&u[a][1].type!=="content";)u[a][1].type==="chunkText"&&(u[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,YP(c,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--&&(o=c.get(a),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank");)o[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=a);i&&(r[1].end=Object.assign({},c.get(i)[1].start),s=c.slice(i,n),s.unshift(r),c.splice(i,n-i+1,s))}}return Ln(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function YP(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[],o=n._tokenizer||r.parser[n.contentType](n.start),s=o.events,u=[],l={};let c,f,d=-1,p=n,m=0,h=0;const y=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(c=r.sliceStream(p),p.next||c.push(null),f&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(c),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=n;++d<s.length;)s[d][0]==="exit"&&s[d-1][0]==="enter"&&s[d][1].type===s[d-1][1].type&&s[d][1].start.line!==s[d][1].end.line&&(h=d+1,y.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):y.pop(),d=y.length;d--;){const v=s.slice(y[d],y[d+1]),b=a.pop();u.push([b,b+v.length-1]),e.splice(b,2,v)}for(u.reverse(),d=-1;++d<u.length;)l[m+u[d][0]]=m+u[d][1],m+=u[d][1]-u[d][0]-1;return l}const JP={tokenize:eD,resolve:QP},XP={tokenize:tD,partial:!0};function QP(e){return ew(e),e}function eD(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?a(s):De(s)?e.check(XP,o,a)(s):(e.consume(s),i)}function a(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function o(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function tD(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),tt(e,a,"linePrefix")}function a(o){if(o===null||De(o))return n(o);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function tw(e,t,n,r,i,a,o,s,u){const l=u||Number.POSITIVE_INFINITY;let c=0;return f;function f(v){return v===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(v),e.exit(a),d):v===null||v===32||v===41||Kl(v)?n(v):(e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(v))}function d(v){return v===62?(e.enter(a),e.consume(v),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(v))}function p(v){return v===62?(e.exit("chunkString"),e.exit(s),d(v)):v===null||v===60||De(v)?n(v):(e.consume(v),v===92?m:p)}function m(v){return v===60||v===62||v===92?(e.consume(v),p):p(v)}function h(v){return!c&&(v===null||v===41||gt(v))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(v)):c<l&&v===40?(e.consume(v),c++,h):v===41?(e.consume(v),c--,h):v===null||v===32||v===40||Kl(v)?n(v):(e.consume(v),v===92?y:h)}function y(v){return v===40||v===41||v===92?(e.consume(v),h):h(v)}}function nw(e,t,n,r,i,a){const o=this;let s=0,u;return l;function l(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(a),c}function c(p){return s>999||p===null||p===91||p===93&&!u||p===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?n(p):p===93?(e.exit(a),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):De(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||De(p)||s++>999?(e.exit("chunkString"),c(p)):(e.consume(p),u||(u=!Ye(p)),p===92?d:f)}function d(p){return p===91||p===92||p===93?(e.consume(p),s++,f):f(p)}}function rw(e,t,n,r,i,a){let o;return s;function s(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),o=d===40?41:d,u):n(d)}function u(d){return d===o?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):(e.enter(a),l(d))}function l(d){return d===o?(e.exit(a),u(o)):d===null?n(d):De(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),tt(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===o||d===null||De(d)?(e.exit("chunkString"),l(d)):(e.consume(d),d===92?f:c)}function f(d){return d===o||d===92?(e.consume(d),c):c(d)}}function Xo(e,t){let n;return r;function r(i){return De(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Ye(i)?tt(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const nD={name:"definition",tokenize:iD},rD={tokenize:aD,partial:!0};function iD(e,t,n){const r=this;let i;return a;function a(p){return e.enter("definition"),o(p)}function o(p){return nw.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return i=Yn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),u):n(p)}function u(p){return gt(p)?Xo(e,l)(p):l(p)}function l(p){return tw(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return e.attempt(rD,f,f)(p)}function f(p){return Ye(p)?tt(e,d,"whitespace")(p):d(p)}function d(p){return p===null||De(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function aD(e,t,n){return r;function r(s){return gt(s)?Xo(e,i)(s):n(s)}function i(s){return rw(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return Ye(s)?tt(e,o,"whitespace")(s):o(s)}function o(s){return s===null||De(s)?t(s):n(s)}}const oD={name:"hardBreakEscape",tokenize:sD};function sD(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return De(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const lD={name:"headingAtx",tokenize:cD,resolve:uD};function uD(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Ln(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function cD(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),a(c)}function a(c){return e.enter("atxHeadingSequence"),o(c)}function o(c){return c===35&&r++<6?(e.consume(c),o):c===null||gt(c)?(e.exit("atxHeadingSequence"),s(c)):n(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),u(c)):c===null||De(c)?(e.exit("atxHeading"),t(c)):Ye(c)?tt(e,s,"whitespace")(c):(e.enter("atxHeadingText"),l(c))}function u(c){return c===35?(e.consume(c),u):(e.exit("atxHeadingSequence"),s(c))}function l(c){return c===null||c===35||gt(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),l)}}const fD=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],iw=["pre","script","style","textarea"],dD={name:"htmlFlow",tokenize:vD,resolveTo:mD,concrete:!0},pD={tokenize:gD,partial:!0},hD={tokenize:yD,partial:!0};function mD(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function vD(e,t,n){const r=this;let i,a,o,s,u;return l;function l(S){return c(S)}function c(S){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(S),f}function f(S){return S===33?(e.consume(S),d):S===47?(e.consume(S),a=!0,h):S===63?(e.consume(S),i=3,r.interrupt?t:g):vn(S)?(e.consume(S),o=String.fromCharCode(S),y):n(S)}function d(S){return S===45?(e.consume(S),i=2,p):S===91?(e.consume(S),i=5,s=0,m):vn(S)?(e.consume(S),i=4,r.interrupt?t:g):n(S)}function p(S){return S===45?(e.consume(S),r.interrupt?t:g):n(S)}function m(S){const K="CDATA[";return S===K.charCodeAt(s++)?(e.consume(S),s===K.length?r.interrupt?t:W:m):n(S)}function h(S){return vn(S)?(e.consume(S),o=String.fromCharCode(S),y):n(S)}function y(S){if(S===null||S===47||S===62||gt(S)){const K=S===47,J=o.toLowerCase();return!K&&!a&&iw.includes(J)?(i=1,r.interrupt?t(S):W(S)):fD.includes(o.toLowerCase())?(i=6,K?(e.consume(S),v):r.interrupt?t(S):W(S)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(S):a?b(S):w(S))}return S===45||ln(S)?(e.consume(S),o+=String.fromCharCode(S),y):n(S)}function v(S){return S===62?(e.consume(S),r.interrupt?t:W):n(S)}function b(S){return Ye(S)?(e.consume(S),b):k(S)}function w(S){return S===47?(e.consume(S),k):S===58||S===95||vn(S)?(e.consume(S),T):Ye(S)?(e.consume(S),w):k(S)}function T(S){return S===45||S===46||S===58||S===95||ln(S)?(e.consume(S),T):E(S)}function E(S){return S===61?(e.consume(S),_):Ye(S)?(e.consume(S),E):w(S)}function _(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),u=S,O):Ye(S)?(e.consume(S),_):z(S)}function O(S){return S===u?(e.consume(S),u=null,U):S===null||De(S)?n(S):(e.consume(S),O)}function z(S){return S===null||S===34||S===39||S===47||S===60||S===61||S===62||S===96||gt(S)?E(S):(e.consume(S),z)}function U(S){return S===47||S===62||Ye(S)?w(S):n(S)}function k(S){return S===62?(e.consume(S),D):n(S)}function D(S){return S===null||De(S)?W(S):Ye(S)?(e.consume(S),D):n(S)}function W(S){return S===45&&i===2?(e.consume(S),L):S===60&&i===1?(e.consume(S),Z):S===62&&i===4?(e.consume(S),N):S===63&&i===3?(e.consume(S),g):S===93&&i===5?(e.consume(S),R):De(S)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(pD,V,B)(S)):S===null||De(S)?(e.exit("htmlFlowData"),B(S)):(e.consume(S),W)}function B(S){return e.check(hD,I,V)(S)}function I(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),A}function A(S){return S===null||De(S)?B(S):(e.enter("htmlFlowData"),W(S))}function L(S){return S===45?(e.consume(S),g):W(S)}function Z(S){return S===47?(e.consume(S),o="",H):W(S)}function H(S){if(S===62){const K=o.toLowerCase();return iw.includes(K)?(e.consume(S),N):W(S)}return vn(S)&&o.length<8?(e.consume(S),o+=String.fromCharCode(S),H):W(S)}function R(S){return S===93?(e.consume(S),g):W(S)}function g(S){return S===62?(e.consume(S),N):S===45&&i===2?(e.consume(S),g):W(S)}function N(S){return S===null||De(S)?(e.exit("htmlFlowData"),V(S)):(e.consume(S),N)}function V(S){return e.exit("htmlFlow"),t(S)}}function yD(e,t,n){const r=this;return i;function i(o){return De(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):n(o)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function gD(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Yo,t,n)}}const bD={name:"htmlText",tokenize:wD};function wD(e,t,n){const r=this;let i,a,o;return s;function s(g){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(g),u}function u(g){return g===33?(e.consume(g),l):g===47?(e.consume(g),E):g===63?(e.consume(g),w):vn(g)?(e.consume(g),z):n(g)}function l(g){return g===45?(e.consume(g),c):g===91?(e.consume(g),a=0,m):vn(g)?(e.consume(g),b):n(g)}function c(g){return g===45?(e.consume(g),p):n(g)}function f(g){return g===null?n(g):g===45?(e.consume(g),d):De(g)?(o=f,Z(g)):(e.consume(g),f)}function d(g){return g===45?(e.consume(g),p):f(g)}function p(g){return g===62?L(g):g===45?d(g):f(g)}function m(g){const N="CDATA[";return g===N.charCodeAt(a++)?(e.consume(g),a===N.length?h:m):n(g)}function h(g){return g===null?n(g):g===93?(e.consume(g),y):De(g)?(o=h,Z(g)):(e.consume(g),h)}function y(g){return g===93?(e.consume(g),v):h(g)}function v(g){return g===62?L(g):g===93?(e.consume(g),v):h(g)}function b(g){return g===null||g===62?L(g):De(g)?(o=b,Z(g)):(e.consume(g),b)}function w(g){return g===null?n(g):g===63?(e.consume(g),T):De(g)?(o=w,Z(g)):(e.consume(g),w)}function T(g){return g===62?L(g):w(g)}function E(g){return vn(g)?(e.consume(g),_):n(g)}function _(g){return g===45||ln(g)?(e.consume(g),_):O(g)}function O(g){return De(g)?(o=O,Z(g)):Ye(g)?(e.consume(g),O):L(g)}function z(g){return g===45||ln(g)?(e.consume(g),z):g===47||g===62||gt(g)?U(g):n(g)}function U(g){return g===47?(e.consume(g),L):g===58||g===95||vn(g)?(e.consume(g),k):De(g)?(o=U,Z(g)):Ye(g)?(e.consume(g),U):L(g)}function k(g){return g===45||g===46||g===58||g===95||ln(g)?(e.consume(g),k):D(g)}function D(g){return g===61?(e.consume(g),W):De(g)?(o=D,Z(g)):Ye(g)?(e.consume(g),D):U(g)}function W(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),i=g,B):De(g)?(o=W,Z(g)):Ye(g)?(e.consume(g),W):(e.consume(g),I)}function B(g){return g===i?(e.consume(g),i=void 0,A):g===null?n(g):De(g)?(o=B,Z(g)):(e.consume(g),B)}function I(g){return g===null||g===34||g===39||g===60||g===61||g===96?n(g):g===47||g===62||gt(g)?U(g):(e.consume(g),I)}function A(g){return g===47||g===62||gt(g)?U(g):n(g)}function L(g){return g===62?(e.consume(g),e.exit("htmlTextData"),e.exit("htmlText"),t):n(g)}function Z(g){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),H}function H(g){return Ye(g)?tt(e,R,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):R(g)}function R(g){return e.enter("htmlTextData"),o(g)}}const xd={name:"labelEnd",tokenize:TD,resolveTo:kD,resolveAll:_D},xD={tokenize:CD},SD={tokenize:OD},ED={tokenize:$D};function _D(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function kD(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const u={type:e[a][1].type==="labelLink"?"link":"image",start:Object.assign({},e[a][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"label",start:Object.assign({},e[a][1].start),end:Object.assign({},e[o][1].end)},c={type:"labelText",start:Object.assign({},e[a+r+2][1].end),end:Object.assign({},e[o-2][1].start)};return s=[["enter",u,t],["enter",l,t]],s=Bn(s,e.slice(a+1,a+r+3)),s=Bn(s,[["enter",c,t]]),s=Bn(s,Jl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=Bn(s,[["exit",c,t],e[o-2],e[o-1],["exit",l,t]]),s=Bn(s,e.slice(o+1)),s=Bn(s,[["exit",u,t]]),Ln(e,a,e.length,s),e}function TD(e,t,n){const r=this;let i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(d){return a?a._inactive?f(d):(o=r.parser.defined.includes(Yn(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),u):n(d)}function u(d){return d===40?e.attempt(xD,c,o?c:f)(d):d===91?e.attempt(SD,c,o?l:f)(d):o?c(d):f(d)}function l(d){return e.attempt(ED,c,f)(d)}function c(d){return t(d)}function f(d){return a._balanced=!0,n(d)}}function CD(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return gt(f)?Xo(e,a)(f):a(f)}function a(f){return f===41?c(f):tw(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function o(f){return gt(f)?Xo(e,u)(f):c(f)}function s(f){return n(f)}function u(f){return f===34||f===39||f===40?rw(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function l(f){return gt(f)?Xo(e,c)(f):c(f)}function c(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function OD(e,t,n){const r=this;return i;function i(s){return nw.call(r,e,a,o,"reference","referenceMarker","referenceString")(s)}function a(s){return r.parser.defined.includes(Yn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function o(s){return n(s)}}function $D(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const ID={name:"labelStartImage",tokenize:RD,resolveAll:xd.resolveAll};function RD(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),a}function a(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),o):n(s)}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const AD={name:"labelStartLink",tokenize:PD,resolveAll:xd.resolveAll};function PD(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),a}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const Sd={name:"lineEnding",tokenize:DD};function DD(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),tt(e,t,"linePrefix")}}const Xl={name:"thematicBreak",tokenize:jD};function jD(e,t,n){let r=0,i;return a;function a(l){return e.enter("thematicBreak"),o(l)}function o(l){return i=l,s(l)}function s(l){return l===i?(e.enter("thematicBreakSequence"),u(l)):r>=3&&(l===null||De(l))?(e.exit("thematicBreak"),t(l)):n(l)}function u(l){return l===i?(e.consume(l),r++,u):(e.exit("thematicBreakSequence"),Ye(l)?tt(e,s,"whitespace")(l):s(l))}}const xn={name:"list",tokenize:FD,continuation:{tokenize:LD},exit:UD},ND={tokenize:zD,partial:!0},MD={tokenize:BD,partial:!0};function FD(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(p){const m=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:gd(p)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Xl,n,l)(p):l(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(p)}return n(p)}function u(p){return gd(p)&&++o<10?(e.consume(p),u):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),l(p)):n(p)}function l(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Yo,r.interrupt?n:c,e.attempt(ND,d,f))}function c(p){return r.containerState.initialBlankLine=!0,a++,d(p)}function f(p){return Ye(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),d):n(p)}function d(p){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function LD(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Yo,i,a);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,tt(e,t,"listItemIndent",r.containerState.size+1)(s)}function a(s){return r.containerState.furtherBlankLines||!Ye(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(MD,t,o)(s))}function o(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,tt(e,e.attempt(xn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function BD(e,t,n){const r=this;return tt(e,i,"listItemIndent",r.containerState.size+1);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(a):n(a)}}function UD(e){e.exit(this.containerState.type)}function zD(e,t,n){const r=this;return tt(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const o=r.events[r.events.length-1];return!Ye(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const aw={name:"setextUnderline",tokenize:WD,resolveTo:qD};function qD(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const o={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",o,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[a][1].end)):e[r][1]=o,e.push(["exit",o,t]),e}function WD(e,t,n){const r=this;let i;return a;function a(l){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=l,o(l)):n(l)}function o(l){return e.enter("setextHeadingLineSequence"),s(l)}function s(l){return l===i?(e.consume(l),s):(e.exit("setextHeadingLineSequence"),Ye(l)?tt(e,u,"lineSuffix")(l):u(l))}function u(l){return l===null||De(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const VD={tokenize:HD};function HD(e){const t=this,n=e.attempt(Yo,r,e.attempt(this.parser.constructs.flowInitial,i,tt(e,e.attempt(this.parser.constructs.flow,i,e.attempt(JP,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const ZD={resolveAll:sw()},KD=ow("string"),GD=ow("text");function ow(e){return{tokenize:t,resolveAll:sw(e==="text"?YD:void 0)};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,o,s);return o;function o(c){return l(c)?a(c):s(c)}function s(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),u}function u(c){return l(c)?(n.exit("data"),a(c)):(n.consume(c),u)}function l(c){if(c===null)return!0;const f=i[c];let d=-1;if(f)for(;++d<f.length;){const p=f[d];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function sw(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function YD(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,o=-1,s=0,u;for(;a--;){const l=i[a];if(typeof l=="string"){for(o=l.length;l.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(l===-2)u=!0,s++;else if(l!==-1){a++;break}}if(s){const l={type:n===e.length||u||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+a,_bufferIndex:a?o:r.start._bufferIndex+o},end:Object.assign({},r.end)};r.end=Object.assign({},l.start),r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}function JD(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},a=[];let o=[],s=[];const u={consume:b,enter:w,exit:T,attempt:O(E),check:O(_),interrupt:O(_,{interrupt:!0})},l={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:p,sliceSerialize:d,now:m,defineSkip:h,write:f};let c=t.tokenize.call(l,u);return t.resolveAll&&a.push(t),l;function f(D){return o=Bn(o,D),y(),o[o.length-1]!==null?[]:(z(t,0),l.events=Jl(a,l.events,l),l.events)}function d(D,W){return QD(p(D),W)}function p(D){return XD(o,D)}function m(){const{line:D,column:W,offset:B,_index:I,_bufferIndex:A}=r;return{line:D,column:W,offset:B,_index:I,_bufferIndex:A}}function h(D){i[D.line]=D.column,k()}function y(){let D;for(;r._index<o.length;){const W=o[r._index];if(typeof W=="string")for(D=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===D&&r._bufferIndex<W.length;)v(W.charCodeAt(r._bufferIndex));else v(W)}}function v(D){c=c(D)}function b(D){De(D)?(r.line++,r.column=1,r.offset+=D===-3?2:1,k()):D!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=D}function w(D,W){const B=W||{};return B.type=D,B.start=m(),l.events.push(["enter",B,l]),s.push(B),B}function T(D){const W=s.pop();return W.end=m(),l.events.push(["exit",W,l]),W}function E(D,W){z(D,W.from)}function _(D,W){W.restore()}function O(D,W){return B;function B(I,A,L){let Z,H,R,g;return Array.isArray(I)?V(I):"tokenize"in I?V([I]):N(I);function N(Y){return Q;function Q(ae){const oe=ae!==null&&Y[ae],X=ae!==null&&Y.null,ee=[...Array.isArray(oe)?oe:oe?[oe]:[],...Array.isArray(X)?X:X?[X]:[]];return V(ee)(ae)}}function V(Y){return Z=Y,H=0,Y.length===0?L:S(Y[H])}function S(Y){return Q;function Q(ae){return g=U(),R=Y,Y.partial||(l.currentConstruct=Y),Y.name&&l.parser.constructs.disable.null.includes(Y.name)?J():Y.tokenize.call(W?Object.assign(Object.create(l),W):l,u,K,J)(ae)}}function K(Y){return D(R,g),A}function J(Y){return g.restore(),++H<Z.length?S(Z[H]):L}}}function z(D,W){D.resolveAll&&!a.includes(D)&&a.push(D),D.resolve&&Ln(l.events,W,l.events.length-W,D.resolve(l.events.slice(W),l)),D.resolveTo&&(l.events=D.resolveTo(l.events,l))}function U(){const D=m(),W=l.previous,B=l.currentConstruct,I=l.events.length,A=Array.from(s);return{restore:L,from:I};function L(){r=D,l.previous=W,l.currentConstruct=B,l.events.length=I,s=A,k()}}function k(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function XD(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){const s=o[0];typeof s=="string"?o[0]=s.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function QD(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let o;if(typeof a=="string")o=a;else switch(a){case-5:{o="\r";break}case-4:{o=`
32
32
  `;break}case-3:{o=`\r
33
- `;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join("")}const cD=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:dP},disable:{null:[]},document:{42:vn,43:vn,45:vn,48:vn,49:vn,50:vn,51:vn,52:vn,53:vn,54:vn,55:vn,56:vn,57:vn,62:wb},flow:{35:gP,42:Al,45:[Ib,Al],60:SP,61:Ib,95:Al,96:_b,126:_b},flowInitial:{[-2]:Jf,[-1]:Jf,32:Jf},insideSpan:{null:[Yf,rD]},string:{38:Sb,92:xb},text:{[-5]:Qf,[-4]:Qf,[-3]:Qf,33:BP,38:Sb,42:Yf,60:[zA,$P],91:zP,92:[vP,xb],93:Xf,95:Yf,96:tP}},Symbol.toStringTag,{value:"Module"}));function fD(e){const n=vb([cD,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(jA),document:i(MA),flow:i(tD),string:i(iD),text:i(aD)};return r;function i(a){return o;function o(s){return sD(r,a,s)}}}function dD(e){for(;!kb(e););return e}const Pb=/[\0\t\n\r]/g;function pD(){let e=1,t="",n=!0,r;return i;function i(a,o,s){const u=[];let l,c,f,p,d;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(o||void 0).decode(a)),f=0,t="",n&&(a.charCodeAt(0)===65279&&f++,n=void 0);f<a.length;){if(Pb.lastIndex=f,l=Pb.exec(a),p=l&&l.index!==void 0?l.index:a.length,d=a.charCodeAt(p),!l){t=a.slice(f);break}if(d===10&&f===p&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),f<p&&(u.push(a.slice(f,p)),e+=p-f),d){case 0:{u.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,u.push(-2);e++<c;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}f=p+1}return s&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const hD=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function mD(e){return e.replace(hD,vD)}function vD(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return yb(n.slice(a?2:1),a?16:10)}return Kf(n)||e}const Db={}.hasOwnProperty;function yD(e,t,n){return typeof t!="string"&&(n=t,t=void 0),gD(n)(dD(fD(n).document().write(pD()(e,t,!0))))}function gD(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(oe),autolinkProtocol:B,autolinkEmail:B,atxHeading:a(Ie),blockQuote:a(Q),characterEscape:B,characterReference:B,codeFenced:a(ee),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ee,o),codeText:a(K,o),codeTextData:B,data:B,codeFlowValue:B,definition:a(pe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(ge),hardBreakEscape:a(M),hardBreakTrailing:a(M),htmlFlow:a(ie,o),htmlFlowData:B,htmlText:a(ie,o),htmlTextData:B,image:a(ce),label:o,link:a(oe),listItem:a(Ee),listItemValue:p,listOrdered:a(Oe,f),listUnordered:a(Oe),paragraph:a(Re),reference:S,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(Ie),strong:a(He),thematicBreak:a(fe)},exit:{atxHeading:u(),atxHeadingSequence:E,autolink:u(),autolinkEmail:se,autolinkProtocol:ae,blockQuote:u(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:J,characterReferenceMarkerNumeric:J,characterReferenceValue:G,characterReference:X,codeFenced:u(y),codeFencedFence:h,codeFencedFenceInfo:d,codeFencedFenceMeta:m,codeFlowValue:T,codeIndented:u(v),codeText:u(N),codeTextData:T,data:T,definition:u(),definitionDestinationString:k,definitionLabelString:b,definitionTitleString:w,emphasis:u(),hardBreakEscape:u(W),hardBreakTrailing:u(W),htmlFlow:u(F),htmlFlowData:T,htmlText:u(L),htmlTextData:T,image:u(Y),label:I,labelText:H,lineEnding:A,link:u(q),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:Z,resourceDestinationString:g,resourceTitleString:P,resource:V,setextHeading:u(z),setextHeadingLineSequence:C,setextHeadingText:_,strong:u(),thematicBreak:u()}};jb(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(U){let D={type:"root",children:[]};const ne={stack:[D],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:c,data:n},he=[];let Se=-1;for(;++Se<U.length;)if(U[Se][1].type==="listOrdered"||U[Se][1].type==="listUnordered")if(U[Se][0]==="enter")he.push(Se);else{const $e=he.pop();Se=i(U,$e,Se)}for(Se=-1;++Se<U.length;){const $e=t[U[Se][0]];Db.call($e,U[Se][1].type)&&$e[U[Se][1].type].call(Object.assign({sliceSerialize:U[Se][2].sliceSerialize},ne),U[Se][1])}if(ne.tokenStack.length>0){const $e=ne.tokenStack[ne.tokenStack.length-1];($e[1]||Nb).call(ne,void 0,$e[0])}for(D.position={start:Xr(U.length>0?U[0][1].start:{line:1,column:1,offset:0}),end:Xr(U.length>0?U[U.length-2][1].end:{line:1,column:1,offset:0})},Se=-1;++Se<t.transforms.length;)D=t.transforms[Se](D)||D;return D}function i(U,D,ne){let he=D-1,Se=-1,$e=!1,Ze,Qe,_t,St;for(;++he<=ne;){const qe=U[he];switch(qe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{qe[0]==="enter"?Se++:Se--,St=void 0;break}case"lineEndingBlank":{qe[0]==="enter"&&(Ze&&!St&&!Se&&!_t&&(_t=he),St=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:St=void 0}if(!Se&&qe[0]==="enter"&&qe[1].type==="listItemPrefix"||Se===-1&&qe[0]==="exit"&&(qe[1].type==="listUnordered"||qe[1].type==="listOrdered")){if(Ze){let Et=he;for(Qe=void 0;Et--;){const Ke=U[Et];if(Ke[1].type==="lineEnding"||Ke[1].type==="lineEndingBlank"){if(Ke[0]==="exit")continue;Qe&&(U[Qe][1].type="lineEndingBlank",$e=!0),Ke[1].type="lineEnding",Qe=Et}else if(!(Ke[1].type==="linePrefix"||Ke[1].type==="blockQuotePrefix"||Ke[1].type==="blockQuotePrefixWhitespace"||Ke[1].type==="blockQuoteMarker"||Ke[1].type==="listItemIndent"))break}_t&&(!Qe||_t<Qe)&&(Ze._spread=!0),Ze.end=Object.assign({},Qe?U[Qe][1].start:qe[1].end),U.splice(Qe||he,0,["exit",Ze,qe[2]]),he++,ne++}if(qe[1].type==="listItemPrefix"){const Et={type:"listItem",_spread:!1,start:Object.assign({},qe[1].start),end:void 0};Ze=Et,U.splice(he,0,["enter",Et,qe[2]]),he++,ne++,_t=void 0,St=!0}}}return U[D][1]._spread=$e,ne}function a(U,D){return ne;function ne(he){s.call(this,U(he),he),D&&D.call(this,he)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(U,D,ne){this.stack[this.stack.length-1].children.push(U),this.stack.push(U),this.tokenStack.push([D,ne]),U.position={start:Xr(D.start),end:void 0}}function u(U){return D;function D(ne){U&&U.call(this,ne),l.call(this,ne)}}function l(U,D){const ne=this.stack.pop(),he=this.tokenStack.pop();if(he)he[0].type!==U.type&&(D?D.call(this,U,he[0]):(he[1]||Nb).call(this,U,he[0]));else throw new Error("Cannot close `"+U.type+"` ("+Po({start:U.start,end:U.end})+"): it’s not open");ne.position.end=Xr(U.end)}function c(){return Zf(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(U){if(this.data.expectingFirstListItemValue){const D=this.stack[this.stack.length-2];D.start=Number.parseInt(this.sliceSerialize(U),10),this.data.expectingFirstListItemValue=void 0}}function d(){const U=this.resume(),D=this.stack[this.stack.length-1];D.lang=U}function m(){const U=this.resume(),D=this.stack[this.stack.length-1];D.meta=U}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const U=this.resume(),D=this.stack[this.stack.length-1];D.value=U.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const U=this.resume(),D=this.stack[this.stack.length-1];D.value=U.replace(/(\r?\n|\r)$/g,"")}function b(U){const D=this.resume(),ne=this.stack[this.stack.length-1];ne.label=D,ne.identifier=Wn(this.sliceSerialize(U)).toLowerCase()}function w(){const U=this.resume(),D=this.stack[this.stack.length-1];D.title=U}function k(){const U=this.resume(),D=this.stack[this.stack.length-1];D.url=U}function E(U){const D=this.stack[this.stack.length-1];if(!D.depth){const ne=this.sliceSerialize(U).length;D.depth=ne}}function _(){this.data.setextHeadingSlurpLineEnding=!0}function C(U){const D=this.stack[this.stack.length-1];D.depth=this.sliceSerialize(U).codePointAt(0)===61?1:2}function z(){this.data.setextHeadingSlurpLineEnding=void 0}function B(U){const ne=this.stack[this.stack.length-1].children;let he=ne[ne.length-1];(!he||he.type!=="text")&&(he=te(),he.position={start:Xr(U.start),end:void 0},ne.push(he)),this.stack.push(he)}function T(U){const D=this.stack.pop();D.value+=this.sliceSerialize(U),D.position.end=Xr(U.end)}function A(U){const D=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ne=D.children[D.children.length-1];ne.position.end=Xr(U.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(D.type)&&(B.call(this,U),T.call(this,U))}function W(){this.data.atHardBreak=!0}function F(){const U=this.resume(),D=this.stack[this.stack.length-1];D.value=U}function L(){const U=this.resume(),D=this.stack[this.stack.length-1];D.value=U}function N(){const U=this.resume(),D=this.stack[this.stack.length-1];D.value=U}function q(){const U=this.stack[this.stack.length-1];if(this.data.inReference){const D=this.data.referenceType||"shortcut";U.type+="Reference",U.referenceType=D,delete U.url,delete U.title}else delete U.identifier,delete U.label;this.data.referenceType=void 0}function Y(){const U=this.stack[this.stack.length-1];if(this.data.inReference){const D=this.data.referenceType||"shortcut";U.type+="Reference",U.referenceType=D,delete U.url,delete U.title}else delete U.identifier,delete U.label;this.data.referenceType=void 0}function H(U){const D=this.sliceSerialize(U),ne=this.stack[this.stack.length-2];ne.label=mD(D),ne.identifier=Wn(D).toLowerCase()}function I(){const U=this.stack[this.stack.length-1],D=this.resume(),ne=this.stack[this.stack.length-1];if(this.data.inReference=!0,ne.type==="link"){const he=U.children;ne.children=he}else ne.alt=D}function g(){const U=this.resume(),D=this.stack[this.stack.length-1];D.url=U}function P(){const U=this.resume(),D=this.stack[this.stack.length-1];D.title=U}function V(){this.data.inReference=void 0}function S(){this.data.referenceType="collapsed"}function Z(U){const D=this.resume(),ne=this.stack[this.stack.length-1];ne.label=D,ne.identifier=Wn(this.sliceSerialize(U)).toLowerCase(),this.data.referenceType="full"}function J(U){this.data.characterReferenceType=U.type}function G(U){const D=this.sliceSerialize(U),ne=this.data.characterReferenceType;let he;ne?(he=yb(D,ne==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):he=Kf(D);const Se=this.stack[this.stack.length-1];Se.value+=he}function X(U){const D=this.stack.pop();D.position.end=Xr(U.end)}function ae(U){T.call(this,U);const D=this.stack[this.stack.length-1];D.url=this.sliceSerialize(U)}function se(U){T.call(this,U);const D=this.stack[this.stack.length-1];D.url="mailto:"+this.sliceSerialize(U)}function Q(){return{type:"blockquote",children:[]}}function ee(){return{type:"code",lang:null,meta:null,value:""}}function K(){return{type:"inlineCode",value:""}}function pe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ge(){return{type:"emphasis",children:[]}}function Ie(){return{type:"heading",depth:0,children:[]}}function M(){return{type:"break"}}function ie(){return{type:"html",value:""}}function ce(){return{type:"image",title:null,url:"",alt:null}}function oe(){return{type:"link",title:null,url:"",children:[]}}function Oe(U){return{type:"list",ordered:U.type==="listOrdered",start:null,spread:U._spread,children:[]}}function Ee(U){return{type:"listItem",spread:U._spread,checked:null,children:[]}}function Re(){return{type:"paragraph",children:[]}}function He(){return{type:"strong",children:[]}}function te(){return{type:"text",value:""}}function fe(){return{type:"thematicBreak"}}}function Xr(e){return{line:e.line,column:e.column,offset:e.offset}}function jb(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?jb(e,r):bD(e,r)}}function bD(e,t){let n;for(n in t)if(Db.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Nb(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Po({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Po({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Po({start:t.start,end:t.end})+") is still open")}function wD(e){const t=this;t.parser=n;function n(r){return yD(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function xD(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function SD(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
34
- `}]}function ED(e,t){const n=t.value?t.value+`
35
- `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function _D(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function kD(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function TD(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=oa(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,u);const l={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,l),e.applyData(t,l)}function OD(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function CD(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Mb(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function $D(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Mb(e,t);const i={src:oa(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function ID(e,t){const n={src:oa(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function RD(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function AD(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Mb(e,t);const i={href:oa(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function PD(e,t){const n={href:oa(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function DD(e,t,n){const r=e.all(t),i=n?jD(n):Fb(t),a={},o=[];if(typeof t.checked=="boolean"){const c=r[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const c=r[s];(i||s!==0||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
33
+ `;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join("")}const ej=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:nD},disable:{null:[]},document:{42:xn,43:xn,45:xn,48:xn,49:xn,50:xn,51:xn,52:xn,53:xn,54:xn,55:xn,56:xn,57:xn,62:Gb},flow:{35:lD,42:Xl,45:[aw,Xl],60:dD,61:aw,95:Xl,96:Qb,126:Qb},flowInitial:{[-2]:wd,[-1]:wd,32:wd},insideSpan:{null:[bd,ZD]},string:{38:Jb,92:Yb},text:{[-5]:Sd,[-4]:Sd,[-3]:Sd,33:ID,38:Jb,42:bd,60:[AP,bD],91:AD,92:[oD,Yb],93:xd,95:bd,96:VP}},Symbol.toStringTag,{value:"Module"}));function tj(e){const n=Vb([ej,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(kP),document:i(CP),flow:i(VD),string:i(KD),text:i(GD)};return r;function i(a){return o;function o(s){return JD(r,a,s)}}}function nj(e){for(;!ew(e););return e}const lw=/[\0\t\n\r]/g;function rj(){let e=1,t="",n=!0,r;return i;function i(a,o,s){const u=[];let l,c,f,d,p;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(o||void 0).decode(a)),f=0,t="",n&&(a.charCodeAt(0)===65279&&f++,n=void 0);f<a.length;){if(lw.lastIndex=f,l=lw.exec(a),d=l&&l.index!==void 0?l.index:a.length,p=a.charCodeAt(d),!l){t=a.slice(f);break}if(p===10&&f===d&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),f<d&&(u.push(a.slice(f,d)),e+=d-f),p){case 0:{u.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,u.push(-2);e++<c;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}f=d+1}return s&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const ij=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function aj(e){return e.replace(ij,oj)}function oj(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return Hb(n.slice(a?2:1),a?16:10)}return yd(n)||e}const uw={}.hasOwnProperty;function sj(e,t,n){return typeof t!="string"&&(n=t,t=void 0),lj(n)(nj(tj(n).document().write(rj()(e,t,!0))))}function lj(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(se),autolinkProtocol:U,autolinkEmail:U,atxHeading:a(Ie),blockQuote:a(X),characterEscape:U,characterReference:U,codeFenced:a(ee),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ee,o),codeText:a(G,o),codeTextData:U,data:U,codeFlowValue:U,definition:a(pe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(ge),hardBreakEscape:a(F),hardBreakTrailing:a(F),htmlFlow:a(ie,o),htmlFlowData:U,htmlText:a(ie,o),htmlTextData:U,image:a(ce),label:o,link:a(se),listItem:a(Ee),listItemValue:d,listOrdered:a(Ce,f),listUnordered:a(Ce),paragraph:a(Ae),reference:S,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(Ie),strong:a(He),thematicBreak:a(fe)},exit:{atxHeading:u(),atxHeadingSequence:E,autolink:u(),autolinkEmail:oe,autolinkProtocol:ae,blockQuote:u(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:J,characterReferenceMarkerNumeric:J,characterReferenceValue:Y,characterReference:Q,codeFenced:u(y),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:k,codeIndented:u(v),codeText:u(A),codeTextData:k,data:k,definition:u(),definitionDestinationString:T,definitionLabelString:b,definitionTitleString:w,emphasis:u(),hardBreakEscape:u(W),hardBreakTrailing:u(W),htmlFlow:u(B),htmlFlowData:k,htmlText:u(I),htmlTextData:k,image:u(Z),label:R,labelText:H,lineEnding:D,link:u(L),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:K,resourceDestinationString:g,resourceTitleString:N,resource:V,setextHeading:u(z),setextHeadingLineSequence:O,setextHeadingText:_,strong:u(),thematicBreak:u()}};cw(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(q){let M={type:"root",children:[]};const ne={stack:[M],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:c,data:n},he=[];let Se=-1;for(;++Se<q.length;)if(q[Se][1].type==="listOrdered"||q[Se][1].type==="listUnordered")if(q[Se][0]==="enter")he.push(Se);else{const $e=he.pop();Se=i(q,$e,Se)}for(Se=-1;++Se<q.length;){const $e=t[q[Se][0]];uw.call($e,q[Se][1].type)&&$e[q[Se][1].type].call(Object.assign({sliceSerialize:q[Se][2].sliceSerialize},ne),q[Se][1])}if(ne.tokenStack.length>0){const $e=ne.tokenStack[ne.tokenStack.length-1];($e[1]||fw).call(ne,void 0,$e[0])}for(M.position={start:si(q.length>0?q[0][1].start:{line:1,column:1,offset:0}),end:si(q.length>0?q[q.length-2][1].end:{line:1,column:1,offset:0})},Se=-1;++Se<t.transforms.length;)M=t.transforms[Se](M)||M;return M}function i(q,M,ne){let he=M-1,Se=-1,$e=!1,Ze,et,Tt,Et;for(;++he<=ne;){const qe=q[he];switch(qe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{qe[0]==="enter"?Se++:Se--,Et=void 0;break}case"lineEndingBlank":{qe[0]==="enter"&&(Ze&&!Et&&!Se&&!Tt&&(Tt=he),Et=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Et=void 0}if(!Se&&qe[0]==="enter"&&qe[1].type==="listItemPrefix"||Se===-1&&qe[0]==="exit"&&(qe[1].type==="listUnordered"||qe[1].type==="listOrdered")){if(Ze){let _t=he;for(et=void 0;_t--;){const Ke=q[_t];if(Ke[1].type==="lineEnding"||Ke[1].type==="lineEndingBlank"){if(Ke[0]==="exit")continue;et&&(q[et][1].type="lineEndingBlank",$e=!0),Ke[1].type="lineEnding",et=_t}else if(!(Ke[1].type==="linePrefix"||Ke[1].type==="blockQuotePrefix"||Ke[1].type==="blockQuotePrefixWhitespace"||Ke[1].type==="blockQuoteMarker"||Ke[1].type==="listItemIndent"))break}Tt&&(!et||Tt<et)&&(Ze._spread=!0),Ze.end=Object.assign({},et?q[et][1].start:qe[1].end),q.splice(et||he,0,["exit",Ze,qe[2]]),he++,ne++}if(qe[1].type==="listItemPrefix"){const _t={type:"listItem",_spread:!1,start:Object.assign({},qe[1].start),end:void 0};Ze=_t,q.splice(he,0,["enter",_t,qe[2]]),he++,ne++,Tt=void 0,Et=!0}}}return q[M][1]._spread=$e,ne}function a(q,M){return ne;function ne(he){s.call(this,q(he),he),M&&M.call(this,he)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(q,M,ne){this.stack[this.stack.length-1].children.push(q),this.stack.push(q),this.tokenStack.push([M,ne]),q.position={start:si(M.start),end:void 0}}function u(q){return M;function M(ne){q&&q.call(this,ne),l.call(this,ne)}}function l(q,M){const ne=this.stack.pop(),he=this.tokenStack.pop();if(he)he[0].type!==q.type&&(M?M.call(this,q,he[0]):(he[1]||fw).call(this,q,he[0]));else throw new Error("Cannot close `"+q.type+"` ("+Ko({start:q.start,end:q.end})+"): it’s not open");ne.position.end=si(q.end)}function c(){return vd(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function d(q){if(this.data.expectingFirstListItemValue){const M=this.stack[this.stack.length-2];M.start=Number.parseInt(this.sliceSerialize(q),10),this.data.expectingFirstListItemValue=void 0}}function p(){const q=this.resume(),M=this.stack[this.stack.length-1];M.lang=q}function m(){const q=this.resume(),M=this.stack[this.stack.length-1];M.meta=q}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const q=this.resume(),M=this.stack[this.stack.length-1];M.value=q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const q=this.resume(),M=this.stack[this.stack.length-1];M.value=q.replace(/(\r?\n|\r)$/g,"")}function b(q){const M=this.resume(),ne=this.stack[this.stack.length-1];ne.label=M,ne.identifier=Yn(this.sliceSerialize(q)).toLowerCase()}function w(){const q=this.resume(),M=this.stack[this.stack.length-1];M.title=q}function T(){const q=this.resume(),M=this.stack[this.stack.length-1];M.url=q}function E(q){const M=this.stack[this.stack.length-1];if(!M.depth){const ne=this.sliceSerialize(q).length;M.depth=ne}}function _(){this.data.setextHeadingSlurpLineEnding=!0}function O(q){const M=this.stack[this.stack.length-1];M.depth=this.sliceSerialize(q).codePointAt(0)===61?1:2}function z(){this.data.setextHeadingSlurpLineEnding=void 0}function U(q){const ne=this.stack[this.stack.length-1].children;let he=ne[ne.length-1];(!he||he.type!=="text")&&(he=te(),he.position={start:si(q.start),end:void 0},ne.push(he)),this.stack.push(he)}function k(q){const M=this.stack.pop();M.value+=this.sliceSerialize(q),M.position.end=si(q.end)}function D(q){const M=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ne=M.children[M.children.length-1];ne.position.end=si(q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(M.type)&&(U.call(this,q),k.call(this,q))}function W(){this.data.atHardBreak=!0}function B(){const q=this.resume(),M=this.stack[this.stack.length-1];M.value=q}function I(){const q=this.resume(),M=this.stack[this.stack.length-1];M.value=q}function A(){const q=this.resume(),M=this.stack[this.stack.length-1];M.value=q}function L(){const q=this.stack[this.stack.length-1];if(this.data.inReference){const M=this.data.referenceType||"shortcut";q.type+="Reference",q.referenceType=M,delete q.url,delete q.title}else delete q.identifier,delete q.label;this.data.referenceType=void 0}function Z(){const q=this.stack[this.stack.length-1];if(this.data.inReference){const M=this.data.referenceType||"shortcut";q.type+="Reference",q.referenceType=M,delete q.url,delete q.title}else delete q.identifier,delete q.label;this.data.referenceType=void 0}function H(q){const M=this.sliceSerialize(q),ne=this.stack[this.stack.length-2];ne.label=aj(M),ne.identifier=Yn(M).toLowerCase()}function R(){const q=this.stack[this.stack.length-1],M=this.resume(),ne=this.stack[this.stack.length-1];if(this.data.inReference=!0,ne.type==="link"){const he=q.children;ne.children=he}else ne.alt=M}function g(){const q=this.resume(),M=this.stack[this.stack.length-1];M.url=q}function N(){const q=this.resume(),M=this.stack[this.stack.length-1];M.title=q}function V(){this.data.inReference=void 0}function S(){this.data.referenceType="collapsed"}function K(q){const M=this.resume(),ne=this.stack[this.stack.length-1];ne.label=M,ne.identifier=Yn(this.sliceSerialize(q)).toLowerCase(),this.data.referenceType="full"}function J(q){this.data.characterReferenceType=q.type}function Y(q){const M=this.sliceSerialize(q),ne=this.data.characterReferenceType;let he;ne?(he=Hb(M,ne==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):he=yd(M);const Se=this.stack[this.stack.length-1];Se.value+=he}function Q(q){const M=this.stack.pop();M.position.end=si(q.end)}function ae(q){k.call(this,q);const M=this.stack[this.stack.length-1];M.url=this.sliceSerialize(q)}function oe(q){k.call(this,q);const M=this.stack[this.stack.length-1];M.url="mailto:"+this.sliceSerialize(q)}function X(){return{type:"blockquote",children:[]}}function ee(){return{type:"code",lang:null,meta:null,value:""}}function G(){return{type:"inlineCode",value:""}}function pe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ge(){return{type:"emphasis",children:[]}}function Ie(){return{type:"heading",depth:0,children:[]}}function F(){return{type:"break"}}function ie(){return{type:"html",value:""}}function ce(){return{type:"image",title:null,url:"",alt:null}}function se(){return{type:"link",title:null,url:"",children:[]}}function Ce(q){return{type:"list",ordered:q.type==="listOrdered",start:null,spread:q._spread,children:[]}}function Ee(q){return{type:"listItem",spread:q._spread,checked:null,children:[]}}function Ae(){return{type:"paragraph",children:[]}}function He(){return{type:"strong",children:[]}}function te(){return{type:"text",value:""}}function fe(){return{type:"thematicBreak"}}}function si(e){return{line:e.line,column:e.column,offset:e.offset}}function cw(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?cw(e,r):uj(e,r)}}function uj(e,t){let n;for(n in t)if(uw.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function fw(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ko({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ko({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ko({start:t.start,end:t.end})+") is still open")}function cj(e){const t=this;t.parser=n;function n(r){return sj(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function fj(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function dj(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
34
+ `}]}function pj(e,t){const n=t.value?t.value+`
35
+ `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function hj(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function mj(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vj(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=ga(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,u);const l={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,l),e.applyData(t,l)}function yj(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gj(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function dw(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function bj(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return dw(e,t);const i={src:ga(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function wj(e,t){const n={src:ga(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function xj(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Sj(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return dw(e,t);const i={href:ga(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Ej(e,t){const n={href:ga(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function _j(e,t,n){const r=e.all(t),i=n?kj(n):pw(t),a={},o=[];if(typeof t.checked=="boolean"){const c=r[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const c=r[s];(i||s!==0||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
36
36
  `}),c.type==="element"&&c.tagName==="p"&&!i?o.push(...c.children):o.push(c)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&o.push({type:"text",value:`
37
- `});const l={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function jD(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Fb(n[r])}return t}function Fb(e){const t=e.spread;return t??e.children.length>1}function ND(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function MD(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function FD(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function LD(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function BD(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=Uf(t.children[1]),u=ib(t.children[t.children.length-1]);s&&u&&(o.position={start:s,end:u}),i.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function UD(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,s=o?o.length:t.children.length;let u=-1;const l=[];for(;++u<s;){const f=t.children[u],p={},d=o?o[u]:void 0;d&&(p.align=d);let m={type:"element",tagName:a,properties:p,children:[]};f&&(m.children=e.all(f),e.patch(f,m),m=e.applyData(f,m)),l.push(m)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)}function zD(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Lb=9,Bb=32;function qD(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(Ub(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Ub(t.slice(i),i>0,!1)),a.join("")}function Ub(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===Lb||a===Bb;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===Lb||a===Bb;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function WD(e,t){const n={type:"text",value:qD(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function VD(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const HD={blockquote:xD,break:SD,code:ED,delete:_D,emphasis:kD,footnoteReference:TD,heading:OD,html:CD,imageReference:$D,image:ID,inlineCode:RD,linkReference:AD,link:PD,listItem:DD,list:ND,paragraph:MD,root:FD,strong:LD,table:BD,tableCell:zD,tableRow:UD,text:WD,thematicBreak:VD,toml:Pl,yaml:Pl,definition:Pl,footnoteDefinition:Pl};function Pl(){}const zb=-1,Dl=0,jl=1,Nl=2,ed=3,td=4,nd=5,rd=6,qb=7,Wb=8,Vb=typeof self=="object"?self:globalThis,ZD=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,o]=t[i];switch(a){case Dl:case zb:return n(o,i);case jl:{const s=n([],i);for(const u of o)s.push(r(u));return s}case Nl:{const s=n({},i);for(const[u,l]of o)s[r(u)]=r(l);return s}case ed:return n(new Date(o),i);case td:{const{source:s,flags:u}=o;return n(new RegExp(s,u),i)}case nd:{const s=n(new Map,i);for(const[u,l]of o)s.set(r(u),r(l));return s}case rd:{const s=n(new Set,i);for(const u of o)s.add(r(u));return s}case qb:{const{name:s,message:u}=o;return n(new Vb[s](u),i)}case Wb:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i)}return n(new Vb[a](o),i)};return r},Hb=e=>ZD(new Map,e)(0),sa="",{toString:KD}={},{keys:GD}=Object,Fo=e=>{const t=typeof e;if(t!=="object"||!e)return[Dl,t];const n=KD.call(e).slice(8,-1);switch(n){case"Array":return[jl,sa];case"Object":return[Nl,sa];case"Date":return[ed,sa];case"RegExp":return[td,sa];case"Map":return[nd,sa];case"Set":return[rd,sa]}return n.includes("Array")?[jl,n]:n.includes("Error")?[qb,n]:[Nl,n]},Ml=([e,t])=>e===Dl&&(t==="function"||t==="symbol"),YD=(e,t,n,r)=>{const i=(o,s)=>{const u=r.push(o)-1;return n.set(s,u),u},a=o=>{if(n.has(o))return n.get(o);let[s,u]=Fo(o);switch(s){case Dl:{let c=o;switch(u){case"bigint":s=Wb,c=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);c=null;break;case"undefined":return i([zb],o)}return i([s,c],o)}case jl:{if(u)return i([u,[...o]],o);const c=[],f=i([s,c],o);for(const p of o)c.push(a(p));return f}case Nl:{if(u)switch(u){case"BigInt":return i([u,o.toString()],o);case"Boolean":case"Number":case"String":return i([u,o.valueOf()],o)}if(t&&"toJSON"in o)return a(o.toJSON());const c=[],f=i([s,c],o);for(const p of GD(o))(e||!Ml(Fo(o[p])))&&c.push([a(p),a(o[p])]);return f}case ed:return i([s,o.toISOString()],o);case td:{const{source:c,flags:f}=o;return i([s,{source:c,flags:f}],o)}case nd:{const c=[],f=i([s,c],o);for(const[p,d]of o)(e||!(Ml(Fo(p))||Ml(Fo(d))))&&c.push([a(p),a(d)]);return f}case rd:{const c=[],f=i([s,c],o);for(const p of o)(e||!Ml(Fo(p)))&&c.push(a(p));return f}}const{message:l}=o;return i([s,{name:u,message:l}],o)};return a},Zb=(e,{json:t,lossy:n}={})=>{const r=[];return YD(!(t||n),!!t,new Map,r)(e),r},Fl=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Hb(Zb(e,t)):structuredClone(e):(e,t)=>Hb(Zb(e,t));function JD(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function XD(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function QD(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||JD,r=e.options.footnoteBackLabel||XD,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let u=-1;for(;++u<e.footnoteOrder.length;){const l=e.footnoteById.get(e.footnoteOrder[u]);if(!l)continue;const c=e.all(l),f=String(l.identifier).toUpperCase(),p=oa(f.toLowerCase());let d=0;const m=[],h=e.footnoteCounts.get(f);for(;h!==void 0&&++d<=h;){m.length>0&&m.push({type:"text",value:" "});let b=typeof n=="string"?n:n(u,d);typeof b=="string"&&(b={type:"text",value:b}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(d>1?"-"+d:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,d),className:["data-footnote-backref"]},children:Array.isArray(b)?b:[b]})}const y=c[c.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const b=y.children[y.children.length-1];b&&b.type==="text"?b.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...m)}else c.push(...m);const v={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(c,!0)};e.patch(l,v),s.push(v)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Fl(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
37
+ `});const l={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function kj(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=pw(n[r])}return t}function pw(e){const t=e.spread;return t??e.children.length>1}function Tj(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Cj(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Oj(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function $j(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ij(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=cd(t.children[1]),u=Pb(t.children[t.children.length-1]);s&&u&&(o.position={start:s,end:u}),i.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Rj(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,s=o?o.length:t.children.length;let u=-1;const l=[];for(;++u<s;){const f=t.children[u],d={},p=o?o[u]:void 0;p&&(d.align=p);let m={type:"element",tagName:a,properties:d,children:[]};f&&(m.children=e.all(f),e.patch(f,m),m=e.applyData(f,m)),l.push(m)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)}function Aj(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const hw=9,mw=32;function Pj(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(vw(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(vw(t.slice(i),i>0,!1)),a.join("")}function vw(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===hw||a===mw;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===hw||a===mw;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Dj(e,t){const n={type:"text",value:Pj(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function jj(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Nj={blockquote:fj,break:dj,code:pj,delete:hj,emphasis:mj,footnoteReference:vj,heading:yj,html:gj,imageReference:bj,image:wj,inlineCode:xj,linkReference:Sj,link:Ej,listItem:_j,list:Tj,paragraph:Cj,root:Oj,strong:$j,table:Ij,tableCell:Aj,tableRow:Rj,text:Dj,thematicBreak:jj,toml:Ql,yaml:Ql,definition:Ql,footnoteDefinition:Ql};function Ql(){}const yw=-1,eu=0,tu=1,nu=2,Ed=3,_d=4,kd=5,Td=6,gw=7,bw=8,ww=typeof self=="object"?self:globalThis,Mj=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,o]=t[i];switch(a){case eu:case yw:return n(o,i);case tu:{const s=n([],i);for(const u of o)s.push(r(u));return s}case nu:{const s=n({},i);for(const[u,l]of o)s[r(u)]=r(l);return s}case Ed:return n(new Date(o),i);case _d:{const{source:s,flags:u}=o;return n(new RegExp(s,u),i)}case kd:{const s=n(new Map,i);for(const[u,l]of o)s.set(r(u),r(l));return s}case Td:{const s=n(new Set,i);for(const u of o)s.add(r(u));return s}case gw:{const{name:s,message:u}=o;return n(new ww[s](u),i)}case bw:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i)}return n(new ww[a](o),i)};return r},xw=e=>Mj(new Map,e)(0),ba="",{toString:Fj}={},{keys:Lj}=Object,Qo=e=>{const t=typeof e;if(t!=="object"||!e)return[eu,t];const n=Fj.call(e).slice(8,-1);switch(n){case"Array":return[tu,ba];case"Object":return[nu,ba];case"Date":return[Ed,ba];case"RegExp":return[_d,ba];case"Map":return[kd,ba];case"Set":return[Td,ba]}return n.includes("Array")?[tu,n]:n.includes("Error")?[gw,n]:[nu,n]},ru=([e,t])=>e===eu&&(t==="function"||t==="symbol"),Bj=(e,t,n,r)=>{const i=(o,s)=>{const u=r.push(o)-1;return n.set(s,u),u},a=o=>{if(n.has(o))return n.get(o);let[s,u]=Qo(o);switch(s){case eu:{let c=o;switch(u){case"bigint":s=bw,c=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);c=null;break;case"undefined":return i([yw],o)}return i([s,c],o)}case tu:{if(u)return i([u,[...o]],o);const c=[],f=i([s,c],o);for(const d of o)c.push(a(d));return f}case nu:{if(u)switch(u){case"BigInt":return i([u,o.toString()],o);case"Boolean":case"Number":case"String":return i([u,o.valueOf()],o)}if(t&&"toJSON"in o)return a(o.toJSON());const c=[],f=i([s,c],o);for(const d of Lj(o))(e||!ru(Qo(o[d])))&&c.push([a(d),a(o[d])]);return f}case Ed:return i([s,o.toISOString()],o);case _d:{const{source:c,flags:f}=o;return i([s,{source:c,flags:f}],o)}case kd:{const c=[],f=i([s,c],o);for(const[d,p]of o)(e||!(ru(Qo(d))||ru(Qo(p))))&&c.push([a(d),a(p)]);return f}case Td:{const c=[],f=i([s,c],o);for(const d of o)(e||!ru(Qo(d)))&&c.push(a(d));return f}}const{message:l}=o;return i([s,{name:u,message:l}],o)};return a},Sw=(e,{json:t,lossy:n}={})=>{const r=[];return Bj(!(t||n),!!t,new Map,r)(e),r},iu=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?xw(Sw(e,t)):structuredClone(e):(e,t)=>xw(Sw(e,t));function Uj(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function zj(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function qj(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Uj,r=e.options.footnoteBackLabel||zj,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let u=-1;for(;++u<e.footnoteOrder.length;){const l=e.footnoteById.get(e.footnoteOrder[u]);if(!l)continue;const c=e.all(l),f=String(l.identifier).toUpperCase(),d=ga(f.toLowerCase());let p=0;const m=[],h=e.footnoteCounts.get(f);for(;h!==void 0&&++p<=h;){m.length>0&&m.push({type:"text",value:" "});let b=typeof n=="string"?n:n(u,p);typeof b=="string"&&(b={type:"text",value:b}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+d+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,p),className:["data-footnote-backref"]},children:Array.isArray(b)?b:[b]})}const y=c[c.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const b=y.children[y.children.length-1];b&&b.type==="text"?b.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...m)}else c.push(...m);const v={type:"element",tagName:"li",properties:{id:t+"fn-"+d},children:e.wrap(c,!0)};e.patch(l,v),s.push(v)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...iu(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
38
38
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
39
- `}]}}const Ll=function(e){if(e==null)return rj;if(typeof e=="function")return Bl(e);if(typeof e=="object")return Array.isArray(e)?ej(e):tj(e);if(typeof e=="string")return nj(e);throw new Error("Expected function, string, or object as test")};function ej(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ll(e[n]);return Bl(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function tj(e){const t=e;return Bl(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function nj(e){return Bl(t);function t(n){return n&&n.type===e}}function Bl(e){return t;function t(n,r,i){return!!(ij(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function rj(){return!0}function ij(e){return e!==null&&typeof e=="object"&&"type"in e}function Mue(e){return e}const Kb=[],aj=!0,id=!1,oj="skip";function Gb(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=Ll(i),o=r?-1:1;s(e,void 0,[])();function s(u,l,c){const f=u&&typeof u=="object"?u:{};if(typeof f.type=="string"){const d=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(u.type+(d?"<"+d+">":""))+")"})}return p;function p(){let d=Kb,m,h,y;if((!t||a(u,l,c[c.length-1]||void 0))&&(d=sj(n(u,c)),d[0]===id))return d;if("children"in u&&u.children){const v=u;if(v.children&&d[0]!==oj)for(h=(r?v.children.length:-1)+o,y=c.concat(v);h>-1&&h<v.children.length;){const b=v.children[h];if(m=s(b,h,y)(),m[0]===id)return m;h=typeof m[1]=="number"?m[1]:h+o}}return d}}}function sj(e){return Array.isArray(e)?e:typeof e=="number"?[aj,e]:e==null?Kb:[e]}function ad(e,t,n,r){let i,a,o;typeof t=="function"&&typeof n!="function"?(a=void 0,o=t,i=n):(a=t,o=n,i=r),Gb(e,a,s,i);function s(u,l){const c=l[l.length-1],f=c?c.children.indexOf(u):void 0;return o(u,f,c)}}const od={}.hasOwnProperty,lj={};function uj(e,t){const n=t||lj,r=new Map,i=new Map,a=new Map,o={...HD,...n.handlers},s={all:l,applyData:fj,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:o,one:u,options:n,patch:cj,wrap:pj};return ad(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const f=c.type==="definition"?r:i,p=String(c.identifier).toUpperCase();f.has(p)||f.set(p,c)}}),s;function u(c,f){const p=c.type,d=s.handlers[p];if(od.call(s.handlers,p)&&d)return d(s,c,f);if(s.options.passThrough&&s.options.passThrough.includes(p)){if("children"in c){const{children:h,...y}=c,v=Fl(y);return v.children=s.all(c),v}return Fl(c)}return(s.options.unknownHandler||dj)(s,c,f)}function l(c){const f=[];if("children"in c){const p=c.children;let d=-1;for(;++d<p.length;){const m=s.one(p[d],c);if(m){if(d&&p[d-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=Yb(m.value)),!Array.isArray(m)&&m.type==="element")){const h=m.children[0];h&&h.type==="text"&&(h.value=Yb(h.value))}Array.isArray(m)?f.push(...m):f.push(m)}}}return f}}function cj(e,t){e.position&&(t.position=aA(e))}function fj(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&a&&Object.assign(n.properties,Fl(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function dj(e,t){const n=t.data||{},r="value"in t&&!(od.call(n,"hProperties")||od.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function pj(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
39
+ `}]}}const au=function(e){if(e==null)return Zj;if(typeof e=="function")return ou(e);if(typeof e=="object")return Array.isArray(e)?Wj(e):Vj(e);if(typeof e=="string")return Hj(e);throw new Error("Expected function, string, or object as test")};function Wj(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=au(e[n]);return ou(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function Vj(e){const t=e;return ou(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function Hj(e){return ou(t);function t(n){return n&&n.type===e}}function ou(e){return t;function t(n,r,i){return!!(Kj(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Zj(){return!0}function Kj(e){return e!==null&&typeof e=="object"&&"type"in e}function _fe(e){return e}const Ew=[],Gj=!0,Cd=!1,Yj="skip";function _w(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=au(i),o=r?-1:1;s(e,void 0,[])();function s(u,l,c){const f=u&&typeof u=="object"?u:{};if(typeof f.type=="string"){const p=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(d,"name",{value:"node ("+(u.type+(p?"<"+p+">":""))+")"})}return d;function d(){let p=Ew,m,h,y;if((!t||a(u,l,c[c.length-1]||void 0))&&(p=Jj(n(u,c)),p[0]===Cd))return p;if("children"in u&&u.children){const v=u;if(v.children&&p[0]!==Yj)for(h=(r?v.children.length:-1)+o,y=c.concat(v);h>-1&&h<v.children.length;){const b=v.children[h];if(m=s(b,h,y)(),m[0]===Cd)return m;h=typeof m[1]=="number"?m[1]:h+o}}return p}}}function Jj(e){return Array.isArray(e)?e:typeof e=="number"?[Gj,e]:e==null?Ew:[e]}function Od(e,t,n,r){let i,a,o;typeof t=="function"&&typeof n!="function"?(a=void 0,o=t,i=n):(a=t,o=n,i=r),_w(e,a,s,i);function s(u,l){const c=l[l.length-1],f=c?c.children.indexOf(u):void 0;return o(u,f,c)}}const $d={}.hasOwnProperty,Xj={};function Qj(e,t){const n=t||Xj,r=new Map,i=new Map,a=new Map,o={...Nj,...n.handlers},s={all:l,applyData:tN,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:o,one:u,options:n,patch:eN,wrap:rN};return Od(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const f=c.type==="definition"?r:i,d=String(c.identifier).toUpperCase();f.has(d)||f.set(d,c)}}),s;function u(c,f){const d=c.type,p=s.handlers[d];if($d.call(s.handlers,d)&&p)return p(s,c,f);if(s.options.passThrough&&s.options.passThrough.includes(d)){if("children"in c){const{children:h,...y}=c,v=iu(y);return v.children=s.all(c),v}return iu(c)}return(s.options.unknownHandler||nN)(s,c,f)}function l(c){const f=[];if("children"in c){const d=c.children;let p=-1;for(;++p<d.length;){const m=s.one(d[p],c);if(m){if(p&&d[p-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=kw(m.value)),!Array.isArray(m)&&m.type==="element")){const h=m.children[0];h&&h.type==="text"&&(h.value=kw(h.value))}Array.isArray(m)?f.push(...m):f.push(m)}}}return f}}function eN(e,t){e.position&&(t.position=GA(e))}function tN(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&a&&Object.assign(n.properties,iu(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function nN(e,t){const n=t.data||{},r="value"in t&&!($d.call(n,"hProperties")||$d.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function rN(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
40
40
  `});++r<e.length;)r&&n.push({type:"text",value:`
41
41
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
42
- `}),n}function Yb(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Jb(e,t){const n=uj(e,t),r=n.one(e,void 0),i=QD(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
43
- `},i),a}function hj(e,t){return e&&"run"in e?async function(n,r){const i=Jb(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Jb(n,{file:r,...e||t})}}function Xb(e){if(e)throw e}var Ul=Object.prototype.hasOwnProperty,Qb=Object.prototype.toString,ew=Object.defineProperty,tw=Object.getOwnPropertyDescriptor,nw=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Qb.call(t)==="[object Array]"},rw=function(t){if(!t||Qb.call(t)!=="[object Object]")return!1;var n=Ul.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Ul.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Ul.call(t,i)},iw=function(t,n){ew&&n.name==="__proto__"?ew(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},aw=function(t,n){if(n==="__proto__")if(Ul.call(t,n)){if(tw)return tw(t,n).value}else return;return t[n]},mj=function e(){var t,n,r,i,a,o,s=arguments[0],u=1,l=arguments.length,c=!1;for(typeof s=="boolean"&&(c=s,s=arguments[1]||{},u=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});u<l;++u)if(t=arguments[u],t!=null)for(n in t)r=aw(s,n),i=aw(t,n),s!==i&&(c&&i&&(rw(i)||(a=nw(i)))?(a?(a=!1,o=r&&nw(r)?r:[]):o=r&&rw(r)?r:{},iw(s,{name:n,newValue:e(c,o,i)})):typeof i<"u"&&iw(s,{name:n,newValue:i}));return s};const sd=Ge(mj);function ld(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function vj(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);s(null,...i);function s(u,...l){const c=e[++a];let f=-1;if(u){o(u);return}for(;++f<i.length;)(l[f]===null||l[f]===void 0)&&(l[f]=i[f]);i=l,c?yj(c,s)(...l):o(null,...l)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function yj(e,t){let n;return r;function r(...o){const s=e.length>o.length;let u;s&&o.push(i);try{u=e.apply(this,o)}catch(l){const c=l;if(s&&n)throw c;return i(c)}s||(u&&u.then&&typeof u.then=="function"?u.then(a,i):u instanceof Error?i(u):a(u))}function i(o,...s){n||(n=!0,t(o,...s))}function a(o){i(null,o)}}const lr={basename:gj,dirname:bj,extname:wj,join:xj,sep:"/"};function gj(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Lo(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function bj(e){if(Lo(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function wj(e){Lo(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){const s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function xj(...e){let t=-1,n;for(;++t<e.length;)Lo(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Sj(n)}function Sj(e){Lo(e);const t=e.codePointAt(0)===47;let n=Ej(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Ej(e,t){let n="",r=0,i=-1,a=0,o=-1,s,u;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else{if(s===47)break;s=47}if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=o,a=0;continue}}else if(n.length>0){n="",r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function Lo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const _j={cwd:kj};function kj(){return"/"}function ud(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Tj(e){if(typeof e=="string")e=new URL(e);else if(!ud(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Oj(e)}function Oj(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const cd=["history","path","basename","stem","extname","dirname"];class ow{constructor(t){let n;t?ud(t)?n={path:t}:typeof t=="string"||Cj(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":_j.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<cd.length;){const a=cd[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)cd.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?lr.basename(this.path):void 0}set basename(t){dd(t,"basename"),fd(t,"basename"),this.path=lr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?lr.dirname(this.path):void 0}set dirname(t){sw(this.basename,"dirname"),this.path=lr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?lr.extname(this.path):void 0}set extname(t){if(fd(t,"extname"),sw(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=lr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ud(t)&&(t=Tj(t)),dd(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?lr.basename(this.path,this.extname):void 0}set stem(t){dd(t,"stem"),fd(t,"stem"),this.path=lr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new tn(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function fd(e,t){if(e&&e.includes(lr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+lr.sep+"`")}function dd(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function sw(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Cj(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const $j=function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a},Ij={}.hasOwnProperty;class pd extends $j{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=vj()}copy(){const t=new pd;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(sd(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(vd("data",this.frozen),this.namespace[t]=n,this):Ij.call(this.namespace,t)&&this.namespace[t]||void 0:t?(vd("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=zl(t),r=this.parser||this.Parser;return hd("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),hd("process",this.parser||this.Parser),md("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,o){const s=zl(t),u=r.parse(s);r.run(u,s,function(c,f,p){if(c||!f||!p)return l(c);const d=f,m=r.stringify(d,p);Pj(m)?p.value=m:p.result=m,l(c,p)});function l(c,f){c||!f?o(c):a?a(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),hd("processSync",this.parser||this.Parser),md("processSync",this.compiler||this.Compiler),this.process(t,i),uw("processSync","process",n),r;function i(a,o){n=!0,Xb(a),r=o}}run(t,n,r){lw(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(o,s){const u=zl(n);i.run(t,u,l);function l(c,f,p){const d=f||t;c?s(c):o?o(d):r(void 0,d,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),uw("runSync","run",r),i;function a(o,s){Xb(o),i=s,r=!0}}stringify(t,n){this.freeze();const r=zl(n),i=this.compiler||this.Compiler;return md("stringify",i),lw(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(vd("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(l){if(typeof l=="function")u(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[c,...f]=l;u(c,f)}else o(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function o(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(l.plugins),l.settings&&(i.settings=sd(!0,i.settings,l.settings))}function s(l){let c=-1;if(l!=null)if(Array.isArray(l))for(;++c<l.length;){const f=l[c];a(f)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function u(l,c){let f=-1,p=-1;for(;++f<r.length;)if(r[f][0]===l){p=f;break}if(p===-1)r.push([l,...c]);else if(c.length>0){let[d,...m]=c;const h=r[p][1];ld(h)&&ld(d)&&(d=sd(!0,h,d)),r[p]=[l,d,...m]}}}}const Rj=new pd().freeze();function hd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function md(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function vd(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function lw(e){if(!ld(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function uw(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function zl(e){return Aj(e)?e:new ow(e)}function Aj(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Pj(e){return typeof e=="string"||Dj(e)}function Dj(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const jj="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",cw=[],fw={allowDangerousHtml:!0},Nj=/^(https?|ircs?|mailto|xmpp)$/i,Mj=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Fj(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,a=e.components,o=e.disallowedElements,s=e.rehypePlugins||cw,u=e.remarkPlugins||cw,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...fw}:fw,c=e.skipHtml,f=e.unwrapDisallowed,p=e.urlTransform||dw,d=Rj().use(wD).use(u).use(hj,l).use(s),m=new ow;typeof r=="string"&&(m.value=r);for(const b of Mj)Object.hasOwn(e,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+jj+b.id,void 0);const h=d.parse(m);let y=d.runSync(h,m);return i&&(y={type:"element",tagName:"div",properties:{className:i},children:y.type==="root"?y.children:[y]}),ad(y,v),fA(y,{Fragment:$.Fragment,components:a,ignoreInvalidStyle:!0,jsx:$.jsx,jsxs:$.jsxs,passKeys:!0,passNode:!0});function v(b,w,k){if(b.type==="raw"&&k&&typeof w=="number")return c?k.children.splice(w,1):k.children[w]={type:"text",value:b.value},w;if(b.type==="element"){let E;for(E in Hf)if(Object.hasOwn(Hf,E)&&Object.hasOwn(b.properties,E)){const _=b.properties[E],C=Hf[E];(C===null||C.includes(b.tagName))&&(b.properties[E]=p(String(_||""),E,b))}}if(b.type==="element"){let E=t?!t.includes(b.tagName):o?o.includes(b.tagName):!1;if(!E&&n&&typeof w=="number"&&(E=!n(b,w,k)),E&&k&&typeof w=="number")return f&&b.children?k.children.splice(w,1,...b.children):k.children.splice(w,1),w}}}function dw(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||Nj.test(e.slice(0,t))?e:""}function Lj(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function pw(e,t,n){const i=Ll((n||{}).ignore||[]),a=Bj(t);let o=-1;for(;++o<a.length;)Gb(e,"text",s);function s(l,c){let f=-1,p;for(;++f<c.length;){const d=c[f],m=p?p.children:void 0;if(i(d,m?m.indexOf(d):void 0,p))return;p=d}if(p)return u(l,c)}function u(l,c){const f=c[c.length-1],p=a[o][0],d=a[o][1];let m=0;const y=f.children.indexOf(l);let v=!1,b=[];p.lastIndex=0;let w=p.exec(l.value);for(;w;){const k=w.index,E={index:w.index,input:w.input,stack:[...c,l]};let _=d(...w,E);if(typeof _=="string"&&(_=_.length>0?{type:"text",value:_}:void 0),_===!1?p.lastIndex=k+1:(m!==k&&b.push({type:"text",value:l.value.slice(m,k)}),Array.isArray(_)?b.push(..._):_&&b.push(_),m=k+w[0].length,v=!0),!p.global)break;w=p.exec(l.value)}return v?(m<l.value.length&&b.push({type:"text",value:l.value.slice(m)}),f.children.splice(y,1,...b)):b=[l],y+b.length}}function Bj(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([Uj(i[0]),zj(i[1])])}return t}function Uj(e){return typeof e=="string"?new RegExp(Lj(e),"g"):e}function zj(e){return typeof e=="function"?e:function(){return e}}function qj(e){pw(e,[/\r?\n|\r/g,Wj])}function Wj(){return{type:"break"}}function Vj(){return function(e){qj(e)}}function hw(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const yd="phrasing",gd=["autolink","link","image","label"];function Hj(){return{transforms:[Qj],enter:{literalAutolink:Kj,literalAutolinkEmail:bd,literalAutolinkHttp:bd,literalAutolinkWww:bd},exit:{literalAutolink:Xj,literalAutolinkEmail:Jj,literalAutolinkHttp:Gj,literalAutolinkWww:Yj}}}function Zj(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:yd,notInConstruct:gd},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:yd,notInConstruct:gd},{character:":",before:"[ps]",after:"\\/",inConstruct:yd,notInConstruct:gd}]}}function Kj(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function bd(e){this.config.enter.autolinkProtocol.call(this,e)}function Gj(e){this.config.exit.autolinkProtocol.call(this,e)}function Yj(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Jj(e){this.config.exit.autolinkEmail.call(this,e)}function Xj(e){this.exit(e)}function Qj(e){pw(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,eN],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),tN]],{ignore:["link","linkReference"]})}function eN(e,t,n,r,i){let a="";if(!mw(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!nN(n)))return!1;const o=rN(n+r);if(!o[0])return!1;const s={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function tN(e,t,n,r){return!mw(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function nN(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function rN(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=hw(e,"(");let a=hw(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function mw(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ii(n)||$l(n))&&(!t||n!==47)}vw.peek=hN;function iN(){return{enter:{gfmFootnoteDefinition:oN,gfmFootnoteDefinitionLabelString:sN,gfmFootnoteCall:cN,gfmFootnoteCallString:fN},exit:{gfmFootnoteDefinition:uN,gfmFootnoteDefinitionLabelString:lN,gfmFootnoteCall:pN,gfmFootnoteCallString:dN}}}function aN(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:mN,footnoteReference:vw}}}function oN(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function sN(){this.buffer()}function lN(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Wn(this.sliceSerialize(e)).toLowerCase()}function uN(e){this.exit(e)}function cN(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function fN(){this.buffer()}function dN(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Wn(this.sliceSerialize(e)).toLowerCase()}function pN(e){this.exit(e)}function vw(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteReference"),s=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{...i.current(),before:a,after:"]"})),s(),o(),a+=i.move("]"),a}function hN(){return"["}function mN(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteDefinition"),s=n.enter("label");return a+=i.move(n.safe(n.associationId(e),{...i.current(),before:a,after:"]"})),s(),a+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),a+=i.move(n.indentLines(n.containerFlow(e,i.current()),vN)),o(),a}function vN(e,t,n){return t===0?e:(n?"":" ")+e}const yN=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];yw.peek=SN;function gN(){return{canContainEols:["delete"],enter:{strikethrough:wN},exit:{strikethrough:xN}}}function bN(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:yN}],handlers:{delete:yw}}}function wN(e){this.enter({type:"delete",children:[]},e)}function xN(e){this.exit(e)}function yw(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),a(),o}function SN(){return"~"}function EN(e){return e.length}function _N(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||EN,a=[],o=[],s=[],u=[];let l=0,c=-1;for(;++c<e.length;){const h=[],y=[];let v=-1;for(e[c].length>l&&(l=e[c].length);++v<e[c].length;){const b=kN(e[c][v]);if(n.alignDelimiters!==!1){const w=i(b);y[v]=w,(u[v]===void 0||w>u[v])&&(u[v]=w)}h.push(b)}o[c]=h,s[c]=y}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<l;)a[f]=gw(r[f]);else{const h=gw(r);for(;++f<l;)a[f]=h}f=-1;const p=[],d=[];for(;++f<l;){const h=a[f];let y="",v="";h===99?(y=":",v=":"):h===108?y=":":h===114&&(v=":");let b=n.alignDelimiters===!1?1:Math.max(1,u[f]-y.length-v.length);const w=y+"-".repeat(b)+v;n.alignDelimiters!==!1&&(b=y.length+b+v.length,b>u[f]&&(u[f]=b),d[f]=b),p[f]=w}o.splice(1,0,p),s.splice(1,0,d),c=-1;const m=[];for(;++c<o.length;){const h=o[c],y=s[c];f=-1;const v=[];for(;++f<l;){const b=h[f]||"";let w="",k="";if(n.alignDelimiters!==!1){const E=u[f]-(y[f]||0),_=a[f];_===114?w=" ".repeat(E):_===99?E%2?(w=" ".repeat(E/2+.5),k=" ".repeat(E/2-.5)):(w=" ".repeat(E/2),k=w):k=" ".repeat(E)}n.delimiterStart!==!1&&!f&&v.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&b==="")&&(n.delimiterStart!==!1||f)&&v.push(" "),n.alignDelimiters!==!1&&v.push(w),v.push(b),n.alignDelimiters!==!1&&v.push(k),n.padding!==!1&&v.push(" "),(n.delimiterEnd!==!1||f!==l-1)&&v.push("|")}m.push(n.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return m.join(`
44
- `)}function kN(e){return e==null?"":String(e)}function gw(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function TN(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const o=n.indentLines(n.containerFlow(e,a.current()),ON);return i(),o}function ON(e,t,n){return">"+(n?"":" ")+e}function CN(e,t){return bw(e,t.inConstruct,!0)&&!bw(e,t.notInConstruct,!1)}function bw(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function ww(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
45
- `&&CN(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
46
- `}function $N(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function IN(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function RN(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function AN(e,t,n,r){const i=RN(n),a=e.value||"",o=i==="`"?"GraveAccent":"Tilde";if(IN(e,n)){const f=n.enter("codeIndented"),p=n.indentLines(a,PN);return f(),p}const s=n.createTracker(r),u=i.repeat(Math.max($N(a,i)+1,3)),l=n.enter("codeFenced");let c=s.move(u);if(e.lang){const f=n.enter(`codeFencedLang${o}`);c+=s.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...s.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${o}`);c+=s.move(" "),c+=s.move(n.safe(e.meta,{before:c,after:`
42
+ `}),n}function kw(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Tw(e,t){const n=Qj(e,t),r=n.one(e,void 0),i=qj(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
43
+ `},i),a}function iN(e,t){return e&&"run"in e?async function(n,r){const i=Tw(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Tw(n,{file:r,...e||t})}}function Cw(e){if(e)throw e}var su=Object.prototype.hasOwnProperty,Ow=Object.prototype.toString,$w=Object.defineProperty,Iw=Object.getOwnPropertyDescriptor,Rw=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Ow.call(t)==="[object Array]"},Aw=function(t){if(!t||Ow.call(t)!=="[object Object]")return!1;var n=su.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&su.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||su.call(t,i)},Pw=function(t,n){$w&&n.name==="__proto__"?$w(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Dw=function(t,n){if(n==="__proto__")if(su.call(t,n)){if(Iw)return Iw(t,n).value}else return;return t[n]},aN=function e(){var t,n,r,i,a,o,s=arguments[0],u=1,l=arguments.length,c=!1;for(typeof s=="boolean"&&(c=s,s=arguments[1]||{},u=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});u<l;++u)if(t=arguments[u],t!=null)for(n in t)r=Dw(s,n),i=Dw(t,n),s!==i&&(c&&i&&(Aw(i)||(a=Rw(i)))?(a?(a=!1,o=r&&Rw(r)?r:[]):o=r&&Aw(r)?r:{},Pw(s,{name:n,newValue:e(c,o,i)})):typeof i<"u"&&Pw(s,{name:n,newValue:i}));return s};const Id=Ge(aN);function Rd(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function oN(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);s(null,...i);function s(u,...l){const c=e[++a];let f=-1;if(u){o(u);return}for(;++f<i.length;)(l[f]===null||l[f]===void 0)&&(l[f]=i[f]);i=l,c?sN(c,s)(...l):o(null,...l)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function sN(e,t){let n;return r;function r(...o){const s=e.length>o.length;let u;s&&o.push(i);try{u=e.apply(this,o)}catch(l){const c=l;if(s&&n)throw c;return i(c)}s||(u&&u.then&&typeof u.then=="function"?u.then(a,i):u instanceof Error?i(u):a(u))}function i(o,...s){n||(n=!0,t(o,...s))}function a(o){i(null,o)}}const mr={basename:lN,dirname:uN,extname:cN,join:fN,sep:"/"};function lN(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');es(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function uN(e){if(es(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function cN(e){es(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){const s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function fN(...e){let t=-1,n;for(;++t<e.length;)es(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":dN(n)}function dN(e){es(e);const t=e.codePointAt(0)===47;let n=pN(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function pN(e,t){let n="",r=0,i=-1,a=0,o=-1,s,u;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else{if(s===47)break;s=47}if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=o,a=0;continue}}else if(n.length>0){n="",r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function es(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const hN={cwd:mN};function mN(){return"/"}function Ad(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function vN(e){if(typeof e=="string")e=new URL(e);else if(!Ad(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return yN(e)}function yN(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Pd=["history","path","basename","stem","extname","dirname"];class jw{constructor(t){let n;t?Ad(t)?n={path:t}:typeof t=="string"||gN(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":hN.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Pd.length;){const a=Pd[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)Pd.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?mr.basename(this.path):void 0}set basename(t){jd(t,"basename"),Dd(t,"basename"),this.path=mr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?mr.dirname(this.path):void 0}set dirname(t){Nw(this.basename,"dirname"),this.path=mr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?mr.extname(this.path):void 0}set extname(t){if(Dd(t,"extname"),Nw(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=mr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Ad(t)&&(t=vN(t)),jd(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?mr.basename(this.path,this.extname):void 0}set stem(t){jd(t,"stem"),Dd(t,"stem"),this.path=mr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new sn(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Dd(e,t){if(e&&e.includes(mr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+mr.sep+"`")}function jd(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Nw(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function gN(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const bN=function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a},wN={}.hasOwnProperty;class Nd extends bN{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=oN()}copy(){const t=new Nd;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Id(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ld("data",this.frozen),this.namespace[t]=n,this):wN.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ld("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=lu(t),r=this.parser||this.Parser;return Md("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Md("process",this.parser||this.Parser),Fd("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,o){const s=lu(t),u=r.parse(s);r.run(u,s,function(c,f,d){if(c||!f||!d)return l(c);const p=f,m=r.stringify(p,d);EN(m)?d.value=m:d.result=m,l(c,d)});function l(c,f){c||!f?o(c):a?a(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),Md("processSync",this.parser||this.Parser),Fd("processSync",this.compiler||this.Compiler),this.process(t,i),Fw("processSync","process",n),r;function i(a,o){n=!0,Cw(a),r=o}}run(t,n,r){Mw(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(o,s){const u=lu(n);i.run(t,u,l);function l(c,f,d){const p=f||t;c?s(c):o?o(p):r(void 0,p,d)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),Fw("runSync","run",r),i;function a(o,s){Cw(o),i=s,r=!0}}stringify(t,n){this.freeze();const r=lu(n),i=this.compiler||this.Compiler;return Fd("stringify",i),Mw(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Ld("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(l){if(typeof l=="function")u(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[c,...f]=l;u(c,f)}else o(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function o(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(l.plugins),l.settings&&(i.settings=Id(!0,i.settings,l.settings))}function s(l){let c=-1;if(l!=null)if(Array.isArray(l))for(;++c<l.length;){const f=l[c];a(f)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function u(l,c){let f=-1,d=-1;for(;++f<r.length;)if(r[f][0]===l){d=f;break}if(d===-1)r.push([l,...c]);else if(c.length>0){let[p,...m]=c;const h=r[d][1];Rd(h)&&Rd(p)&&(p=Id(!0,h,p)),r[d]=[l,p,...m]}}}}const xN=new Nd().freeze();function Md(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Fd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ld(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Mw(e){if(!Rd(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Fw(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function lu(e){return SN(e)?e:new jw(e)}function SN(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function EN(e){return typeof e=="string"||_N(e)}function _N(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const kN="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Lw=[],Bw={allowDangerousHtml:!0},TN=/^(https?|ircs?|mailto|xmpp)$/i,CN=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function ON(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,a=e.components,o=e.disallowedElements,s=e.rehypePlugins||Lw,u=e.remarkPlugins||Lw,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Bw}:Bw,c=e.skipHtml,f=e.unwrapDisallowed,d=e.urlTransform||Uw,p=xN().use(cj).use(u).use(iN,l).use(s),m=new jw;typeof r=="string"&&(m.value=r);for(const b of CN)Object.hasOwn(e,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+kN+b.id,void 0);const h=p.parse(m);let y=p.runSync(h,m);return i&&(y={type:"element",tagName:"div",properties:{className:i},children:y.type==="root"?y.children:[y]}),Od(y,v),tP(y,{Fragment:$.Fragment,components:a,ignoreInvalidStyle:!0,jsx:$.jsx,jsxs:$.jsxs,passKeys:!0,passNode:!0});function v(b,w,T){if(b.type==="raw"&&T&&typeof w=="number")return c?T.children.splice(w,1):T.children[w]={type:"text",value:b.value},w;if(b.type==="element"){let E;for(E in md)if(Object.hasOwn(md,E)&&Object.hasOwn(b.properties,E)){const _=b.properties[E],O=md[E];(O===null||O.includes(b.tagName))&&(b.properties[E]=d(String(_||""),E,b))}}if(b.type==="element"){let E=t?!t.includes(b.tagName):o?o.includes(b.tagName):!1;if(!E&&n&&typeof w=="number"&&(E=!n(b,w,T)),E&&T&&typeof w=="number")return f&&b.children?T.children.splice(w,1,...b.children):T.children.splice(w,1),w}}}function Uw(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||TN.test(e.slice(0,t))?e:""}function $N(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function zw(e,t,n){const i=au((n||{}).ignore||[]),a=IN(t);let o=-1;for(;++o<a.length;)_w(e,"text",s);function s(l,c){let f=-1,d;for(;++f<c.length;){const p=c[f],m=d?d.children:void 0;if(i(p,m?m.indexOf(p):void 0,d))return;d=p}if(d)return u(l,c)}function u(l,c){const f=c[c.length-1],d=a[o][0],p=a[o][1];let m=0;const y=f.children.indexOf(l);let v=!1,b=[];d.lastIndex=0;let w=d.exec(l.value);for(;w;){const T=w.index,E={index:w.index,input:w.input,stack:[...c,l]};let _=p(...w,E);if(typeof _=="string"&&(_=_.length>0?{type:"text",value:_}:void 0),_===!1?d.lastIndex=T+1:(m!==T&&b.push({type:"text",value:l.value.slice(m,T)}),Array.isArray(_)?b.push(..._):_&&b.push(_),m=T+w[0].length,v=!0),!d.global)break;w=d.exec(l.value)}return v?(m<l.value.length&&b.push({type:"text",value:l.value.slice(m)}),f.children.splice(y,1,...b)):b=[l],y+b.length}}function IN(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([RN(i[0]),AN(i[1])])}return t}function RN(e){return typeof e=="string"?new RegExp($N(e),"g"):e}function AN(e){return typeof e=="function"?e:function(){return e}}function PN(e){zw(e,[/\r?\n|\r/g,DN])}function DN(){return{type:"break"}}function jN(){return function(e){PN(e)}}function qw(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const Bd="phrasing",Ud=["autolink","link","image","label"];function NN(){return{transforms:[qN],enter:{literalAutolink:FN,literalAutolinkEmail:zd,literalAutolinkHttp:zd,literalAutolinkWww:zd},exit:{literalAutolink:zN,literalAutolinkEmail:UN,literalAutolinkHttp:LN,literalAutolinkWww:BN}}}function MN(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Bd,notInConstruct:Ud},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Bd,notInConstruct:Ud},{character:":",before:"[ps]",after:"\\/",inConstruct:Bd,notInConstruct:Ud}]}}function FN(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function zd(e){this.config.enter.autolinkProtocol.call(this,e)}function LN(e){this.config.exit.autolinkProtocol.call(this,e)}function BN(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function UN(e){this.config.exit.autolinkEmail.call(this,e)}function zN(e){this.exit(e)}function qN(e){zw(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,WN],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),VN]],{ignore:["link","linkReference"]})}function WN(e,t,n,r,i){let a="";if(!Ww(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!HN(n)))return!1;const o=ZN(n+r);if(!o[0])return!1;const s={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function VN(e,t,n,r){return!Ww(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function HN(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function ZN(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=qw(e,"(");let a=qw(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Ww(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ui(n)||Gl(n))&&(!t||n!==47)}Vw.peek=iM;function KN(){return{enter:{gfmFootnoteDefinition:YN,gfmFootnoteDefinitionLabelString:JN,gfmFootnoteCall:eM,gfmFootnoteCallString:tM},exit:{gfmFootnoteDefinition:QN,gfmFootnoteDefinitionLabelString:XN,gfmFootnoteCall:rM,gfmFootnoteCallString:nM}}}function GN(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:aM,footnoteReference:Vw}}}function YN(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function JN(){this.buffer()}function XN(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Yn(this.sliceSerialize(e)).toLowerCase()}function QN(e){this.exit(e)}function eM(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function tM(){this.buffer()}function nM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Yn(this.sliceSerialize(e)).toLowerCase()}function rM(e){this.exit(e)}function Vw(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteReference"),s=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{...i.current(),before:a,after:"]"})),s(),o(),a+=i.move("]"),a}function iM(){return"["}function aM(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteDefinition"),s=n.enter("label");return a+=i.move(n.safe(n.associationId(e),{...i.current(),before:a,after:"]"})),s(),a+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),a+=i.move(n.indentLines(n.containerFlow(e,i.current()),oM)),o(),a}function oM(e,t,n){return t===0?e:(n?"":" ")+e}const sM=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Hw.peek=dM;function lM(){return{canContainEols:["delete"],enter:{strikethrough:cM},exit:{strikethrough:fM}}}function uM(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:sM}],handlers:{delete:Hw}}}function cM(e){this.enter({type:"delete",children:[]},e)}function fM(e){this.exit(e)}function Hw(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),a(),o}function dM(){return"~"}function pM(e){return e.length}function hM(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||pM,a=[],o=[],s=[],u=[];let l=0,c=-1;for(;++c<e.length;){const h=[],y=[];let v=-1;for(e[c].length>l&&(l=e[c].length);++v<e[c].length;){const b=mM(e[c][v]);if(n.alignDelimiters!==!1){const w=i(b);y[v]=w,(u[v]===void 0||w>u[v])&&(u[v]=w)}h.push(b)}o[c]=h,s[c]=y}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<l;)a[f]=Zw(r[f]);else{const h=Zw(r);for(;++f<l;)a[f]=h}f=-1;const d=[],p=[];for(;++f<l;){const h=a[f];let y="",v="";h===99?(y=":",v=":"):h===108?y=":":h===114&&(v=":");let b=n.alignDelimiters===!1?1:Math.max(1,u[f]-y.length-v.length);const w=y+"-".repeat(b)+v;n.alignDelimiters!==!1&&(b=y.length+b+v.length,b>u[f]&&(u[f]=b),p[f]=b),d[f]=w}o.splice(1,0,d),s.splice(1,0,p),c=-1;const m=[];for(;++c<o.length;){const h=o[c],y=s[c];f=-1;const v=[];for(;++f<l;){const b=h[f]||"";let w="",T="";if(n.alignDelimiters!==!1){const E=u[f]-(y[f]||0),_=a[f];_===114?w=" ".repeat(E):_===99?E%2?(w=" ".repeat(E/2+.5),T=" ".repeat(E/2-.5)):(w=" ".repeat(E/2),T=w):T=" ".repeat(E)}n.delimiterStart!==!1&&!f&&v.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&b==="")&&(n.delimiterStart!==!1||f)&&v.push(" "),n.alignDelimiters!==!1&&v.push(w),v.push(b),n.alignDelimiters!==!1&&v.push(T),n.padding!==!1&&v.push(" "),(n.delimiterEnd!==!1||f!==l-1)&&v.push("|")}m.push(n.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return m.join(`
44
+ `)}function mM(e){return e==null?"":String(e)}function Zw(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function vM(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const o=n.indentLines(n.containerFlow(e,a.current()),yM);return i(),o}function yM(e,t,n){return">"+(n?"":" ")+e}function gM(e,t){return Kw(e,t.inConstruct,!0)&&!Kw(e,t.notInConstruct,!1)}function Kw(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Gw(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
45
+ `&&gM(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
46
+ `}function bM(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function wM(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function xM(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function SM(e,t,n,r){const i=xM(n),a=e.value||"",o=i==="`"?"GraveAccent":"Tilde";if(wM(e,n)){const f=n.enter("codeIndented"),d=n.indentLines(a,EM);return f(),d}const s=n.createTracker(r),u=i.repeat(Math.max(bM(a,i)+1,3)),l=n.enter("codeFenced");let c=s.move(u);if(e.lang){const f=n.enter(`codeFencedLang${o}`);c+=s.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...s.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${o}`);c+=s.move(" "),c+=s.move(n.safe(e.meta,{before:c,after:`
47
47
  `,encode:["`"],...s.current()})),f()}return c+=s.move(`
48
48
  `),a&&(c+=s.move(a+`
49
- `)),c+=s.move(u),l(),c}function PN(e,t,n){return(n?"":" ")+e}function wd(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function DN(e,t,n,r){const i=wd(n),a=i==='"'?"Quote":"Apostrophe",o=n.enter("definition");let s=n.enter("label");const u=n.createTracker(r);let l=u.move("[");return l+=u.move(n.safe(n.associationId(e),{before:l,after:"]",...u.current()})),l+=u.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(n.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(s=n.enter("destinationRaw"),l+=u.move(n.safe(e.url,{before:l,after:e.title?" ":`
50
- `,...u.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=u.move(" "+i),l+=u.move(n.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),s()),o(),l}function jN(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}xw.peek=NN;function xw(e,t,n,r){const i=jN(n),a=n.enter("emphasis"),o=n.createTracker(r);let s=o.move(i);return s+=o.move(n.containerPhrasing(e,{before:s,after:i,...o.current()})),s+=o.move(i),a(),s}function NN(e,t,n){return n.options.emphasis||"*"}function MN(e,t){let n=!1;return ad(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,id}),!!((!e.depth||e.depth<3)&&Zf(e)&&(t.options.setext||n))}function FN(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(MN(e,n)){const c=n.enter("headingSetext"),f=n.enter("phrasing"),p=n.containerPhrasing(e,{...a.current(),before:`
49
+ `)),c+=s.move(u),l(),c}function EM(e,t,n){return(n?"":" ")+e}function qd(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function _M(e,t,n,r){const i=qd(n),a=i==='"'?"Quote":"Apostrophe",o=n.enter("definition");let s=n.enter("label");const u=n.createTracker(r);let l=u.move("[");return l+=u.move(n.safe(n.associationId(e),{before:l,after:"]",...u.current()})),l+=u.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(n.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(s=n.enter("destinationRaw"),l+=u.move(n.safe(e.url,{before:l,after:e.title?" ":`
50
+ `,...u.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=u.move(" "+i),l+=u.move(n.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),s()),o(),l}function kM(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}Yw.peek=TM;function Yw(e,t,n,r){const i=kM(n),a=n.enter("emphasis"),o=n.createTracker(r);let s=o.move(i);return s+=o.move(n.containerPhrasing(e,{before:s,after:i,...o.current()})),s+=o.move(i),a(),s}function TM(e,t,n){return n.options.emphasis||"*"}function CM(e,t){let n=!1;return Od(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Cd}),!!((!e.depth||e.depth<3)&&vd(e)&&(t.options.setext||n))}function OM(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(CM(e,n)){const c=n.enter("headingSetext"),f=n.enter("phrasing"),d=n.containerPhrasing(e,{...a.current(),before:`
51
51
  `,after:`
52
- `});return f(),c(),p+`
53
- `+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
52
+ `});return f(),c(),d+`
53
+ `+(i===1?"=":"-").repeat(d.length-(Math.max(d.lastIndexOf("\r"),d.lastIndexOf(`
54
54
  `))+1))}const o="#".repeat(i),s=n.enter("headingAtx"),u=n.enter("phrasing");a.move(o+" ");let l=n.containerPhrasing(e,{before:"# ",after:`
55
- `,...a.current()});return/^[\t ]/.test(l)&&(l="&#x"+l.charCodeAt(0).toString(16).toUpperCase()+";"+l.slice(1)),l=l?o+" "+l:o,n.options.closeAtx&&(l+=" "+o),u(),s(),l}Sw.peek=LN;function Sw(e){return e.value||""}function LN(){return"<"}Ew.peek=BN;function Ew(e,t,n,r){const i=wd(n),a=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let s=n.enter("label");const u=n.createTracker(r);let l=u.move("![");return l+=u.move(n.safe(e.alt,{before:l,after:"]",...u.current()})),l+=u.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(n.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(s=n.enter("destinationRaw"),l+=u.move(n.safe(e.url,{before:l,after:e.title?" ":")",...u.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=u.move(" "+i),l+=u.move(n.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),s()),l+=u.move(")"),o(),l}function BN(){return"!"}_w.peek=UN;function _w(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let o=n.enter("label");const s=n.createTracker(r);let u=s.move("![");const l=n.safe(e.alt,{before:u,after:"]",...s.current()});u+=s.move(l+"]["),o();const c=n.stack;n.stack=[],o=n.enter("reference");const f=n.safe(n.associationId(e),{before:u,after:"]",...s.current()});return o(),n.stack=c,a(),i==="full"||!l||l!==f?u+=s.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function UN(){return"!"}kw.peek=zN;function kw(e,t,n){let r=e.value||"",i="`",a=-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+" ");++a<n.unsafe.length;){const o=n.unsafe[a],s=n.compilePattern(o);let u;if(o.atBreak)for(;u=s.exec(r);){let l=u.index;r.charCodeAt(l)===10&&r.charCodeAt(l-1)===13&&l--,r=r.slice(0,l)+" "+r.slice(u.index+1)}}return i+r+i}function zN(){return"`"}function Tw(e,t){const n=Zf(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Ow.peek=qN;function Ow(e,t,n,r){const i=wd(n),a=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let s,u;if(Tw(e,n)){const c=n.stack;n.stack=[],s=n.enter("autolink");let f=o.move("<");return f+=o.move(n.containerPhrasing(e,{before:f,after:">",...o.current()})),f+=o.move(">"),s(),n.stack=c,f}s=n.enter("link"),u=n.enter("label");let l=o.move("[");return l+=o.move(n.containerPhrasing(e,{before:l,after:"](",...o.current()})),l+=o.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),l+=o.move("<"),l+=o.move(n.safe(e.url,{before:l,after:">",...o.current()})),l+=o.move(">")):(u=n.enter("destinationRaw"),l+=o.move(n.safe(e.url,{before:l,after:e.title?" ":")",...o.current()}))),u(),e.title&&(u=n.enter(`title${a}`),l+=o.move(" "+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),u()),l+=o.move(")"),s(),l}function qN(e,t,n){return Tw(e,n)?"<":"["}Cw.peek=WN;function Cw(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let o=n.enter("label");const s=n.createTracker(r);let u=s.move("[");const l=n.containerPhrasing(e,{before:u,after:"]",...s.current()});u+=s.move(l+"]["),o();const c=n.stack;n.stack=[],o=n.enter("reference");const f=n.safe(n.associationId(e),{before:u,after:"]",...s.current()});return o(),n.stack=c,a(),i==="full"||!l||l!==f?u+=s.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function WN(){return"["}function xd(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function VN(e){const t=xd(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function HN(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function $w(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function ZN(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let o=e.ordered?HN(n):xd(n);const s=e.ordered?o==="."?")":".":VN(n);let u=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(u=!0),$w(n)===o&&c){let f=-1;for(;++f<e.children.length;){const p=e.children[f];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(o=s),n.bulletCurrent=o;const l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function KN(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function GN(e,t,n,r){const i=KN(n);let a=n.bulletCurrent||xd(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const s=n.createTracker(r);s.move(a+" ".repeat(o-a.length)),s.shift(o);const u=n.enter("listItem"),l=n.indentLines(n.containerFlow(e,s.current()),c);return u(),l;function c(f,p,d){return p?(d?"":" ".repeat(o))+f:(d?a:a+" ".repeat(o-a.length))+f}}function YN(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),o=n.containerPhrasing(e,r);return a(),i(),o}const JN=Ll(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function XN(e,t,n,r){return(e.children.some(function(o){return JN(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function QN(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Iw.peek=e2;function Iw(e,t,n,r){const i=QN(n),a=n.enter("strong"),o=n.createTracker(r);let s=o.move(i+i);return s+=o.move(n.containerPhrasing(e,{before:s,after:i,...o.current()})),s+=o.move(i+i),a(),s}function e2(e,t,n){return n.options.strong||"*"}function t2(e,t,n,r){return n.safe(e.value,r)}function n2(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function r2(e,t,n){const r=($w(n)+(n.options.ruleSpaces?" ":"")).repeat(n2(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Rw={blockquote:TN,break:ww,code:AN,definition:DN,emphasis:xw,hardBreak:ww,heading:FN,html:Sw,image:Ew,imageReference:_w,inlineCode:kw,link:Ow,linkReference:Cw,list:ZN,listItem:GN,paragraph:YN,root:XN,strong:Iw,text:t2,thematicBreak:r2};function i2(){return{enter:{table:a2,tableData:Aw,tableHeader:Aw,tableRow:s2},exit:{codeText:l2,table:o2,tableData:Sd,tableHeader:Sd,tableRow:Sd}}}function a2(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function o2(e){this.exit(e),this.data.inTable=void 0}function s2(e){this.enter({type:"tableRow",children:[]},e)}function Sd(e){this.exit(e)}function Aw(e){this.enter({type:"tableCell",children:[]},e)}function l2(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,u2));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function u2(e,t){return t==="|"?t:e}function c2(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
56
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:o,tableCell:u,tableRow:s}};function o(d,m,h,y){return l(c(d,h,y),d.align)}function s(d,m,h,y){const v=f(d,h,y),b=l([v]);return b.slice(0,b.indexOf(`
57
- `))}function u(d,m,h,y){const v=h.enter("tableCell"),b=h.enter("phrasing"),w=h.containerPhrasing(d,{...y,before:a,after:a});return b(),v(),w}function l(d,m){return _N(d,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function c(d,m,h){const y=d.children;let v=-1;const b=[],w=m.enter("table");for(;++v<y.length;)b[v]=f(y[v],m,h);return w(),b}function f(d,m,h){const y=d.children;let v=-1;const b=[],w=m.enter("tableRow");for(;++v<y.length;)b[v]=u(y[v],d,m,h);return w(),b}function p(d,m,h){let y=Rw.inlineCode(d,m,h);return h.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function f2(){return{exit:{taskListCheckValueChecked:Pw,taskListCheckValueUnchecked:Pw,paragraph:p2}}}function d2(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:h2}}}function Pw(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function p2(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];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,o;for(;++a<i.length;){const s=i[a];if(s.type==="paragraph"){o=s;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function h2(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);a&&s.move(o);let u=Rw.listItem(e,t,n,{...r,...s.current()});return a&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),u;function l(c){return c+o}}function m2(){return[Hj(),iN(),gN(),i2(),f2()]}function v2(e){return{extensions:[Zj(),aN(),bN(),c2(e),d2()]}}const y2={tokenize:E2,partial:!0},Dw={tokenize:_2,partial:!0},jw={tokenize:k2,partial:!0},Nw={tokenize:T2,partial:!0},g2={tokenize:O2,partial:!0},Mw={name:"wwwAutolink",tokenize:x2,previous:Lw},Fw={name:"protocolAutolink",tokenize:S2,previous:Bw},Dr={name:"emailAutolink",tokenize:w2,previous:Uw},ur={};function b2(){return{text:ur}}let Ri=48;for(;Ri<123;)ur[Ri]=Dr,Ri++,Ri===58?Ri=65:Ri===91&&(Ri=97);ur[43]=Dr,ur[45]=Dr,ur[46]=Dr,ur[95]=Dr,ur[72]=[Dr,Fw],ur[104]=[Dr,Fw],ur[87]=[Dr,Mw],ur[119]=[Dr,Mw];function w2(e,t,n){const r=this;let i,a;return o;function o(f){return!Ed(f)||!Uw.call(r,r.previous)||_d(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return Ed(f)?(e.consume(f),s):f===64?(e.consume(f),u):n(f)}function u(f){return f===46?e.check(g2,c,l)(f):f===45||f===95||nn(f)?(a=!0,e.consume(f),u):c(f)}function l(f){return e.consume(f),i=!0,u}function c(f){return a&&i&&fn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function x2(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!Lw.call(r,r.previous)||_d(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(y2,e.attempt(Dw,e.attempt(jw,a),n),n)(o))}function a(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function S2(e,t,n){const r=this;let i="",a=!1;return o;function o(f){return(f===72||f===104)&&Bw.call(r,r.previous)&&!_d(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),s):n(f)}function s(f){if(fn(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(f),u}return n(f)}function u(f){return f===47?(e.consume(f),a?l:(a=!0,u)):n(f)}function l(f){return f===null||Cl(f)||yt(f)||Ii(f)||$l(f)?n(f):e.attempt(Dw,e.attempt(jw,c),n)(f)}function c(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function E2(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),a):n(o)}function a(o){return o===null?n(o):t(o)}}function _2(e,t,n){let r,i,a;return o;function o(l){return l===46||l===95?e.check(Nw,u,s)(l):l===null||yt(l)||Ii(l)||l!==45&&$l(l)?u(l):(a=!0,e.consume(l),o)}function s(l){return l===95?r=!0:(i=r,r=void 0),e.consume(l),o}function u(l){return i||r||!a?n(l):t(l)}}function k2(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(Nw,t,a)(o):o===null||yt(o)||Ii(o)?t(o):(e.consume(o),i)}function a(o){return o===41&&r++,e.consume(o),i}}function T2(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),a):s===93?(e.consume(s),i):s===60||s===null||yt(s)||Ii(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||yt(s)||Ii(s)?t(s):r(s)}function a(s){return fn(s)?o(s):n(s)}function o(s){return s===59?(e.consume(s),r):fn(s)?(e.consume(s),o):n(s)}}function O2(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return nn(a)?n(a):t(a)}}function Lw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||yt(e)}function Bw(e){return!fn(e)}function Uw(e){return!(e===47||Ed(e))}function Ed(e){return e===43||e===45||e===46||e===95||nn(e)}function _d(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const C2={tokenize:N2,partial:!0};function $2(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:P2,continuation:{tokenize:D2},exit:j2}},text:{91:{name:"gfmFootnoteCall",tokenize:A2},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:I2,resolveTo:R2}}}}function I2(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){o=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return s;function s(u){if(!o||!o._balanced)return n(u);const l=Wn(r.sliceSerialize({start:o.end,end:r.now()}));return l.codePointAt(0)!==94||!a.includes(l.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function R2(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function A2(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,o;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),u}function u(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(f){if(a>999||f===93&&!o||f===null||f===91||yt(f))return n(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(Wn(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return yt(f)||(o=!0),a++,e.consume(f),f===92?c:l}function c(f){return f===91||f===92||f===93?(e.consume(f),a++,l):l(f)}}function P2(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,o=0,s;return u;function u(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(m)}function c(m){if(o>999||m===93&&!s||m===null||m===91||yt(m))return n(m);if(m===93){e.exit("chunkString");const h=e.exit("gfmFootnoteDefinitionLabelString");return a=Wn(r.sliceSerialize(h)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return yt(m)||(s=!0),o++,e.consume(m),m===92?f:c}function f(m){return m===91||m===92||m===93?(e.consume(m),o++,c):c(m)}function p(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(a)||i.push(a),et(e,d,"gfmFootnoteDefinitionWhitespace")):n(m)}function d(m){return t(m)}}function D2(e,t,n){return e.check(jo,t,e.attempt(C2,t,n))}function j2(e){e.exit("gfmFootnoteDefinition")}function N2(e,t,n){const r=this;return et(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(a):n(a)}}function M2(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,s){let u=-1;for(;++u<o.length;)if(o[u][0]==="enter"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._close){let l=u;for(;l--;)if(o[l][0]==="exit"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._open&&o[u][1].end.offset-o[u][1].start.offset===o[l][1].end.offset-o[l][1].start.offset){o[u][1].type="strikethroughSequence",o[l][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},o[l][1].start),end:Object.assign({},o[u][1].end)},f={type:"strikethroughText",start:Object.assign({},o[l][1].end),end:Object.assign({},o[u][1].start)},p=[["enter",c,s],["enter",o[l][1],s],["exit",o[l][1],s],["enter",f,s]],d=s.parser.constructs.insideSpan.null;d&&Pn(p,p.length,0,Rl(d,o.slice(l+1,u),s)),Pn(p,p.length,0,[["exit",f,s],["enter",o[u][1],s],["exit",o[u][1],s],["exit",c,s]]),Pn(o,l-1,u-l+3,p),u=l+p.length-2;break}}for(u=-1;++u<o.length;)o[u][1].type==="strikethroughSequenceTemporary"&&(o[u][1].type="data");return o}function a(o,s,u){const l=this.previous,c=this.events;let f=0;return p;function p(m){return l===126&&c[c.length-1][1].type!=="characterEscape"?u(m):(o.enter("strikethroughSequenceTemporary"),d(m))}function d(m){const h=Il(l);if(m===126)return f>1?u(m):(o.consume(m),f++,d);if(f<2&&!n)return u(m);const y=o.exit("strikethroughSequenceTemporary"),v=Il(m);return y._open=!v||v===2&&!!h,y._close=!h||h===2&&!!v,s(m)}}}class F2{constructor(){this.map=[]}add(t,n,r){L2(this,t,n,r)}consume(t){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let i=r.pop();for(;i;)t.push(...i),i=r.pop();this.map.length=0}}function L2(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function B2(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function U2(){return{flow:{null:{name:"table",tokenize:z2,resolveAll:q2}}}}function z2(e,t,n){const r=this;let i=0,a=0,o;return s;function s(T){let A=r.events.length-1;for(;A>-1;){const L=r.events[A][1].type;if(L==="lineEnding"||L==="linePrefix")A--;else break}const W=A>-1?r.events[A][1].type:null,F=W==="tableHead"||W==="tableRow"?_:u;return F===_&&r.parser.lazy[r.now().line]?n(T):F(T)}function u(T){return e.enter("tableHead"),e.enter("tableRow"),l(T)}function l(T){return T===124||(o=!0,a+=1),c(T)}function c(T){return T===null?n(T):De(T)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),d):n(T):Ye(T)?et(e,c,"whitespace")(T):(a+=1,o&&(o=!1,i+=1),T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),o=!0,c):(e.enter("data"),f(T)))}function f(T){return T===null||T===124||yt(T)?(e.exit("data"),c(T)):(e.consume(T),T===92?p:f)}function p(T){return T===92||T===124?(e.consume(T),f):f(T)}function d(T){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(T):(e.enter("tableDelimiterRow"),o=!1,Ye(T)?et(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):m(T))}function m(T){return T===45||T===58?y(T):T===124?(o=!0,e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),h):E(T)}function h(T){return Ye(T)?et(e,y,"whitespace")(T):y(T)}function y(T){return T===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),v):T===45?(a+=1,v(T)):T===null||De(T)?k(T):E(T)}function v(T){return T===45?(e.enter("tableDelimiterFiller"),b(T)):E(T)}function b(T){return T===45?(e.consume(T),b):T===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(T))}function w(T){return Ye(T)?et(e,k,"whitespace")(T):k(T)}function k(T){return T===124?m(T):T===null||De(T)?!o||i!==a?E(T):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(T)):E(T)}function E(T){return n(T)}function _(T){return e.enter("tableRow"),C(T)}function C(T){return T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),C):T===null||De(T)?(e.exit("tableRow"),t(T)):Ye(T)?et(e,C,"whitespace")(T):(e.enter("data"),z(T))}function z(T){return T===null||T===124||yt(T)?(e.exit("data"),C(T)):(e.consume(T),T===92?B:z)}function B(T){return T===92||T===124?(e.consume(T),z):z(T)}}function q2(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,u=0,l,c,f;const p=new F2;for(;++n<e.length;){const d=e[n],m=d[1];d[0]==="enter"?m.type==="tableHead"?(s=!1,u!==0&&(zw(p,t,u,l,c),c=void 0,u=0),l={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",l,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,f=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,c={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",c,t]])),i=m.type==="tableDelimiterRow"?2:c?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],f=ql(p,t,a,i,void 0,f),a=[0,0,0,0]),o[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],f=ql(p,t,a,i,void 0,f)),a=o,o=[a[1],n,0,0])):m.type==="tableHead"?(s=!0,u=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(u=n,a[1]!==0?(o[0]=o[1],f=ql(p,t,a,i,n,f)):o[1]!==0&&(f=ql(p,t,o,i,n,f)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(o[3]=n)}for(u!==0&&zw(p,t,u,l,c),p.consume(t.events),n=-1;++n<t.events.length;){const d=t.events[n];d[0]==="enter"&&d[1].type==="table"&&(d[1]._align=B2(t.events,n))}return e}function ql(e,t,n,r,i,a){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(a.end=Object.assign({},la(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const u=la(t.events,n[1]);if(a={type:o,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const l=la(t.events,n[2]),c=la(t.events,n[3]),f={type:s,start:Object.assign({},l),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const p=t.events[n[2]],d=t.events[n[3]];if(p[1].end=Object.assign({},d[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,h=n[3]-n[2]-1;e.add(m,h,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(a.end=Object.assign({},la(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function zw(e,t,n,r,i){const a=[],o=la(t.events,n);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),r.end=Object.assign({},o),a.push(["exit",r,t]),e.add(n+1,0,a)}function la(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const W2={name:"tasklistCheck",tokenize:H2};function V2(){return{text:{91:W2}}}function H2(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),a)}function a(u){return yt(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),o):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),o):n(u)}function o(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(u)}function s(u){return De(u)?t(u):Ye(u)?e.check({tokenize:Z2},t,n)(u):n(u)}}function Z2(e,t,n){return et(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function K2(e){return vb([b2(),$2(),M2(e),U2(),V2()])}const G2={};function Y2(e){const t=this,n=e||G2,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(K2(n)),a.push(m2()),o.push(v2(n))}const st={container:{className:"bpReset bpContainer bpFont",dropzone:{overlay:{className:"bpDropzoneOverlay"},container:{className:"bpDropzoneContainer"}}},loader:{className:"bpReset bpLoader"},modal:{container:{className:"bpReset bpModalContainer"},overlay:{className:"bpModalOverlay"},dialog:{container:{className:"bpReset bpModalDialogContainer"},title:{container:{className:"bpReset bpModalDialogTitleContainer"},text:{className:"bpModalDialogTitleText"},closeIcon:{className:"bpModalDialogTitleCloseIcon"}},content:{className:"bpModalDialogContent"},newConversation:{button:{className:"bpModalDialogNewConversationButton"},text:{className:"bpModalDialogNewConversationText"}}}},fab:{container:{className:"bpReset bpFabContainer"},icon:{className:"bpFabIcon"}},notification:{container:{className:"bpReset bpNotificationContainer"},title:{className:"bpNotificationTitle"},description:{className:"bpNotificationDescription"},icon:{className:"bpNotificationIcon"},closeIcon:{className:"bpNotificationCloseIcon"}},header:{container:{className:"bpReset bpHeaderContainer bpFont"},content:{container:{className:"bpReset bpHeaderContentContainer"},title:{className:"bpHeaderContentTitle"},description:{className:"bpHeaderContentDescription"},avatar:{container:{className:"bpReset bpHeaderContentAvatarContainer"},image:{className:"bpHeaderContentAvatarImage"},fallback:{className:"bpHeaderContentAvatarFallback"}},actions:{container:{className:"bpReset bpHeaderContentActionsContainer"},icons:{className:"bpHeaderContentActionsIcons"}}},expandedContent:{container:{className:"bpReset bpHeaderExpandedContentContainer"},descriptionItems:{container:{className:"bpReset bpHeaderExpandedContentDescriptionItemsContainer"},icon:{className:"bpHeaderExpandedContentDescriptionItemsIcon"},text:{className:"bpHeaderExpandedContentDescriptionItemsText"},link:{className:"bpHeaderExpandedContentDescriptionItemsLink"}},group:{className:"bpHeaderExpandedContentGroup"}},newConversationIcon:{className:"bpHeaderNewConversationIcon"}},composer:{container:{className:"bpReset bpComposerContainer bpFont"},poweredBy:{className:"bpComposerPoweredBy"},inputContainer:{className:"bpComposerInputContainer"},input:{className:"bpComposerInput"},button:{container:{className:"bpReset bpComposerButtonContainer"},icon:{className:"bpComposerButtonIcon"}},uploadButton:{icon:{className:"bpComposerUploadButtonIcon"},container:{className:"bpReset bpComposerUploadButtonContainer"}},voiceButton:{icon:{className:"bpComposerVoiceButtonIcon"},container:{className:"bpReset bpComposerVoiceButtonContainer"}},fileContainer:{className:"bpComposerFileContainer"},fileWidget:{container:{className:"bpComposerFileAttachement"},loader:{className:"bpComposerFileLoader"},fileIcon:{container:{className:"bpComposerFileIconWrapper"},icon:{className:"bpComposerFileIcon"}},metadata:{container:{className:"bpComposerFileMetadata"},name:{className:"bpComposerFileName"},type:{className:"bpComposerFileExtension"}},removeIcon:{className:"bpComposerFileRemoveIcon"},errorIcon:{className:"bpComposerFileErrorIcon"},previewImage:{className:"bpComposerFilePreviewImage"}}},messageList:{scrollDownButton:{container:{className:"bpReset bpMessageListScrollDownButtonContainer"},button:{className:"bpMessageListScrollDownButtonButton"},icon:{className:"bpMessageListScrollDownButtonIcon"}},container:{className:"bpReset bpMessageListContainer bpFont"},viewPort:{className:"bpMessageListViewport"},marquee:{container:{className:"bpReset bpMessageListMarqueeContainer"},content:{className:"bpMessageListMarqueeContent"},title:{className:"bpMessageListMarqueeTitle"},description:{className:"bpMessageListMarqueeDescription"},avatar:{container:{className:"bpReset bpMessageListMarqueeAvatarContainer"},image:{className:"bpMessageListMarqueeAvatarImage"},fallback:{className:"bpMessageListMarqueeAvatarFallback"}}},headerMessage:{className:"bpMessageListHeaderMessage"}},message:{container:{className:"bpReset bpMessageContainer"},avatar:{container:{className:"bpReset bpMessageAvatarContainer"},image:{className:"bpMessageAvatarImage"},fallback:{className:"bpMessageAvatarFallback"}},blocks:{text:{heading1:{className:"bpMessageBlocksTextHeading1"},heading2:{className:"bpMessageBlocksTextHeading2"},heading3:{className:"bpMessageBlocksTextHeading3"},unorderedList:{className:"bpMessageBlocksTextUnorderedList"},orderedList:{className:"bpMessageBlocksTextOrderedList"},link:{className:"bpMessageBlocksTextLink"},italic:{className:"bpMessageBlocksTextItalic"},bold:{className:"bpMessageBlocksTextBold"},text:{className:"bpMessageBlocksTextText"},horizontalRule:{className:"bpMessageBlocksTextHorizontalRule"},listItem:{className:"bpMessageBlocksTextListItem"},lineBreak:{className:"bpMessageBlocksTextLineBreak"},pre:{className:"bpMessageBlocksTextPre"}},audio:{className:"bpMessageBlocksAudio"},image:{image:{className:"bpMessageBlocksImageImage"},placeholder:{className:"bpMessageBlocksImagePlaceholder"}},video:{className:"bpMessageBlocksVideo"},location:{container:{className:"bpMessageBlocksLocationContainer"},title:{className:"bpMessageBlocksLocationTitle"},icon:{className:"bpMessageBlocksLocationIcon"}},file:{container:{className:"bpMessageBlocksFileContainer"},title:{className:"bpMessageBlocksFileTitle"},icon:{className:"bpMessageBlocksFileIcon"}},row:{className:"bpMessageBlocksRow"},column:{className:"bpMessageBlocksColumn"},bubble:{className:"bpMessageBlocksBubble"},carousel:{container:{className:"bpMessageBlocksCarouselContainer"},slidesContainer:{className:"bpMessageBlocksCarouselSlidesContainer"},backButton:{className:"bpMessageBlocksCarouselBackButton"},nextButton:{className:"bpMessageBlocksCarouselNextButton"}},dropdown:{button:{container:{className:"bpMessageBlocksDropdownButtonContainer"},text:{className:"bpMessageBlocksDropdownButtonText"},icon:{className:"bpMessageBlocksDropdownButtonIcon"}},content:{container:{className:"bpMessageBlocksDropdownContentContainer"},item:{className:"bpMessageBlocksDropdownContentItem"}}},button:{className:"bpMessageBlocksButton"}}},typingIndicator:{container:{className:"bpTypingIndicatorContainer"},loader:{className:"bpTypingIndicatorLoader"}}},J2=({text:e})=>{const{message:{blocks:{text:t}}}=st,n={h1:({node:r,...i})=>$.jsx("h1",{...i,...t==null?void 0:t.heading1}),h2:({node:r,...i})=>$.jsx("h2",{...i,...t==null?void 0:t.heading2}),h3:({node:r,...i})=>$.jsx("h3",{...i,...t==null?void 0:t.heading3}),h4:"h3",h5:"h3",h6:"h3",em:({node:r,...i})=>$.jsx("em",{...i,...t==null?void 0:t.italic}),strong:({node:r,...i})=>$.jsx("strong",{...i,...t==null?void 0:t.bold}),p:({node:r,...i})=>$.jsx("p",{...i,...t==null?void 0:t.text}),hr:({node:r,...i})=>$.jsx("hr",{...i,...t==null?void 0:t.horizontalRule}),a:({node:r,...i})=>$.jsx("a",{...i,...t==null?void 0:t.link,target:"_blank"}),ol:({node:r,...i})=>$.jsx("ol",{...i,...t==null?void 0:t.orderedList}),ul:({node:r,...i})=>$.jsx("ul",{...i,...t==null?void 0:t.unorderedList}),li:({node:r,...i})=>$.jsx("li",{...i,...t==null?void 0:t.listItem}),br:({node:r,...i})=>$.jsx("br",{...i,...t==null?void 0:t.lineBreak}),pre:({node:r,...i})=>$.jsx("pre",{...i,...t==null?void 0:t.pre})};return $.jsx(Fj,{urlTransform:r=>r.startsWith("tel:")?r:dw(r),components:n,remarkPlugins:[Y2,Vj],children:e})},X2={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},qw=e=>{let t;const n=new Set,r=(c,f)=>{const p=typeof c=="function"?c(t):c;if(!Object.is(p,t)){const d=t;t=f??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(m=>m(t,d))}},i=()=>t,u={setState:r,getState:i,getInitialState:()=>l,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(X2?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},l=t=e(r,i,u);return u},Q2=e=>e?qw(e):qw;var kd={exports:{}},Td={},Wl={exports:{}},Od={};/**
55
+ `,...a.current()});return/^[\t ]/.test(l)&&(l="&#x"+l.charCodeAt(0).toString(16).toUpperCase()+";"+l.slice(1)),l=l?o+" "+l:o,n.options.closeAtx&&(l+=" "+o),u(),s(),l}Jw.peek=$M;function Jw(e){return e.value||""}function $M(){return"<"}Xw.peek=IM;function Xw(e,t,n,r){const i=qd(n),a=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let s=n.enter("label");const u=n.createTracker(r);let l=u.move("![");return l+=u.move(n.safe(e.alt,{before:l,after:"]",...u.current()})),l+=u.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(n.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(s=n.enter("destinationRaw"),l+=u.move(n.safe(e.url,{before:l,after:e.title?" ":")",...u.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=u.move(" "+i),l+=u.move(n.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),s()),l+=u.move(")"),o(),l}function IM(){return"!"}Qw.peek=RM;function Qw(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let o=n.enter("label");const s=n.createTracker(r);let u=s.move("![");const l=n.safe(e.alt,{before:u,after:"]",...s.current()});u+=s.move(l+"]["),o();const c=n.stack;n.stack=[],o=n.enter("reference");const f=n.safe(n.associationId(e),{before:u,after:"]",...s.current()});return o(),n.stack=c,a(),i==="full"||!l||l!==f?u+=s.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function RM(){return"!"}e0.peek=AM;function e0(e,t,n){let r=e.value||"",i="`",a=-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+" ");++a<n.unsafe.length;){const o=n.unsafe[a],s=n.compilePattern(o);let u;if(o.atBreak)for(;u=s.exec(r);){let l=u.index;r.charCodeAt(l)===10&&r.charCodeAt(l-1)===13&&l--,r=r.slice(0,l)+" "+r.slice(u.index+1)}}return i+r+i}function AM(){return"`"}function t0(e,t){const n=vd(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}n0.peek=PM;function n0(e,t,n,r){const i=qd(n),a=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let s,u;if(t0(e,n)){const c=n.stack;n.stack=[],s=n.enter("autolink");let f=o.move("<");return f+=o.move(n.containerPhrasing(e,{before:f,after:">",...o.current()})),f+=o.move(">"),s(),n.stack=c,f}s=n.enter("link"),u=n.enter("label");let l=o.move("[");return l+=o.move(n.containerPhrasing(e,{before:l,after:"](",...o.current()})),l+=o.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),l+=o.move("<"),l+=o.move(n.safe(e.url,{before:l,after:">",...o.current()})),l+=o.move(">")):(u=n.enter("destinationRaw"),l+=o.move(n.safe(e.url,{before:l,after:e.title?" ":")",...o.current()}))),u(),e.title&&(u=n.enter(`title${a}`),l+=o.move(" "+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),u()),l+=o.move(")"),s(),l}function PM(e,t,n){return t0(e,n)?"<":"["}r0.peek=DM;function r0(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let o=n.enter("label");const s=n.createTracker(r);let u=s.move("[");const l=n.containerPhrasing(e,{before:u,after:"]",...s.current()});u+=s.move(l+"]["),o();const c=n.stack;n.stack=[],o=n.enter("reference");const f=n.safe(n.associationId(e),{before:u,after:"]",...s.current()});return o(),n.stack=c,a(),i==="full"||!l||l!==f?u+=s.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function DM(){return"["}function Wd(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function jM(e){const t=Wd(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function NM(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function i0(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function MM(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let o=e.ordered?NM(n):Wd(n);const s=e.ordered?o==="."?")":".":jM(n);let u=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(u=!0),i0(n)===o&&c){let f=-1;for(;++f<e.children.length;){const d=e.children[f];if(d&&d.type==="listItem"&&d.children&&d.children[0]&&d.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(o=s),n.bulletCurrent=o;const l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function FM(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function LM(e,t,n,r){const i=FM(n);let a=n.bulletCurrent||Wd(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const s=n.createTracker(r);s.move(a+" ".repeat(o-a.length)),s.shift(o);const u=n.enter("listItem"),l=n.indentLines(n.containerFlow(e,s.current()),c);return u(),l;function c(f,d,p){return d?(p?"":" ".repeat(o))+f:(p?a:a+" ".repeat(o-a.length))+f}}function BM(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),o=n.containerPhrasing(e,r);return a(),i(),o}const UM=au(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function zM(e,t,n,r){return(e.children.some(function(o){return UM(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function qM(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}a0.peek=WM;function a0(e,t,n,r){const i=qM(n),a=n.enter("strong"),o=n.createTracker(r);let s=o.move(i+i);return s+=o.move(n.containerPhrasing(e,{before:s,after:i,...o.current()})),s+=o.move(i+i),a(),s}function WM(e,t,n){return n.options.strong||"*"}function VM(e,t,n,r){return n.safe(e.value,r)}function HM(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function ZM(e,t,n){const r=(i0(n)+(n.options.ruleSpaces?" ":"")).repeat(HM(n));return n.options.ruleSpaces?r.slice(0,-1):r}const o0={blockquote:vM,break:Gw,code:SM,definition:_M,emphasis:Yw,hardBreak:Gw,heading:OM,html:Jw,image:Xw,imageReference:Qw,inlineCode:e0,link:n0,linkReference:r0,list:MM,listItem:LM,paragraph:BM,root:zM,strong:a0,text:VM,thematicBreak:ZM};function KM(){return{enter:{table:GM,tableData:s0,tableHeader:s0,tableRow:JM},exit:{codeText:XM,table:YM,tableData:Vd,tableHeader:Vd,tableRow:Vd}}}function GM(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function YM(e){this.exit(e),this.data.inTable=void 0}function JM(e){this.enter({type:"tableRow",children:[]},e)}function Vd(e){this.exit(e)}function s0(e){this.enter({type:"tableCell",children:[]},e)}function XM(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,QM));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function QM(e,t){return t==="|"?t:e}function e2(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
56
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:d,table:o,tableCell:u,tableRow:s}};function o(p,m,h,y){return l(c(p,h,y),p.align)}function s(p,m,h,y){const v=f(p,h,y),b=l([v]);return b.slice(0,b.indexOf(`
57
+ `))}function u(p,m,h,y){const v=h.enter("tableCell"),b=h.enter("phrasing"),w=h.containerPhrasing(p,{...y,before:a,after:a});return b(),v(),w}function l(p,m){return hM(p,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function c(p,m,h){const y=p.children;let v=-1;const b=[],w=m.enter("table");for(;++v<y.length;)b[v]=f(y[v],m,h);return w(),b}function f(p,m,h){const y=p.children;let v=-1;const b=[],w=m.enter("tableRow");for(;++v<y.length;)b[v]=u(y[v],p,m,h);return w(),b}function d(p,m,h){let y=o0.inlineCode(p,m,h);return h.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function t2(){return{exit:{taskListCheckValueChecked:l0,taskListCheckValueUnchecked:l0,paragraph:r2}}}function n2(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:i2}}}function l0(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function r2(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];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,o;for(;++a<i.length;){const s=i[a];if(s.type==="paragraph"){o=s;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function i2(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);a&&s.move(o);let u=o0.listItem(e,t,n,{...r,...s.current()});return a&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),u;function l(c){return c+o}}function a2(){return[NN(),KN(),lM(),KM(),t2()]}function o2(e){return{extensions:[MN(),GN(),uM(),e2(e),n2()]}}const s2={tokenize:p2,partial:!0},u0={tokenize:h2,partial:!0},c0={tokenize:m2,partial:!0},f0={tokenize:v2,partial:!0},l2={tokenize:y2,partial:!0},d0={name:"wwwAutolink",tokenize:f2,previous:h0},p0={name:"protocolAutolink",tokenize:d2,previous:m0},zr={name:"emailAutolink",tokenize:c2,previous:v0},vr={};function u2(){return{text:vr}}let zi=48;for(;zi<123;)vr[zi]=zr,zi++,zi===58?zi=65:zi===91&&(zi=97);vr[43]=zr,vr[45]=zr,vr[46]=zr,vr[95]=zr,vr[72]=[zr,p0],vr[104]=[zr,p0],vr[87]=[zr,d0],vr[119]=[zr,d0];function c2(e,t,n){const r=this;let i,a;return o;function o(f){return!Hd(f)||!v0.call(r,r.previous)||Zd(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return Hd(f)?(e.consume(f),s):f===64?(e.consume(f),u):n(f)}function u(f){return f===46?e.check(l2,c,l)(f):f===45||f===95||ln(f)?(a=!0,e.consume(f),u):c(f)}function l(f){return e.consume(f),i=!0,u}function c(f){return a&&i&&vn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function f2(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!h0.call(r,r.previous)||Zd(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(s2,e.attempt(u0,e.attempt(c0,a),n),n)(o))}function a(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function d2(e,t,n){const r=this;let i="",a=!1;return o;function o(f){return(f===72||f===104)&&m0.call(r,r.previous)&&!Zd(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),s):n(f)}function s(f){if(vn(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const d=i.toLowerCase();if(d==="http"||d==="https")return e.consume(f),u}return n(f)}function u(f){return f===47?(e.consume(f),a?l:(a=!0,u)):n(f)}function l(f){return f===null||Kl(f)||gt(f)||Ui(f)||Gl(f)?n(f):e.attempt(u0,e.attempt(c0,c),n)(f)}function c(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function p2(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),a):n(o)}function a(o){return o===null?n(o):t(o)}}function h2(e,t,n){let r,i,a;return o;function o(l){return l===46||l===95?e.check(f0,u,s)(l):l===null||gt(l)||Ui(l)||l!==45&&Gl(l)?u(l):(a=!0,e.consume(l),o)}function s(l){return l===95?r=!0:(i=r,r=void 0),e.consume(l),o}function u(l){return i||r||!a?n(l):t(l)}}function m2(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(f0,t,a)(o):o===null||gt(o)||Ui(o)?t(o):(e.consume(o),i)}function a(o){return o===41&&r++,e.consume(o),i}}function v2(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),a):s===93?(e.consume(s),i):s===60||s===null||gt(s)||Ui(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||gt(s)||Ui(s)?t(s):r(s)}function a(s){return vn(s)?o(s):n(s)}function o(s){return s===59?(e.consume(s),r):vn(s)?(e.consume(s),o):n(s)}}function y2(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return ln(a)?n(a):t(a)}}function h0(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||gt(e)}function m0(e){return!vn(e)}function v0(e){return!(e===47||Hd(e))}function Hd(e){return e===43||e===45||e===46||e===95||ln(e)}function Zd(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const g2={tokenize:T2,partial:!0};function b2(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:E2,continuation:{tokenize:_2},exit:k2}},text:{91:{name:"gfmFootnoteCall",tokenize:S2},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:w2,resolveTo:x2}}}}function w2(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){o=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return s;function s(u){if(!o||!o._balanced)return n(u);const l=Yn(r.sliceSerialize({start:o.end,end:r.now()}));return l.codePointAt(0)!==94||!a.includes(l.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function x2(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function S2(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,o;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),u}function u(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(f){if(a>999||f===93&&!o||f===null||f===91||gt(f))return n(f);if(f===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(Yn(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return gt(f)||(o=!0),a++,e.consume(f),f===92?c:l}function c(f){return f===91||f===92||f===93?(e.consume(f),a++,l):l(f)}}function E2(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,o=0,s;return u;function u(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(m)}function c(m){if(o>999||m===93&&!s||m===null||m===91||gt(m))return n(m);if(m===93){e.exit("chunkString");const h=e.exit("gfmFootnoteDefinitionLabelString");return a=Yn(r.sliceSerialize(h)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return gt(m)||(s=!0),o++,e.consume(m),m===92?f:c}function f(m){return m===91||m===92||m===93?(e.consume(m),o++,c):c(m)}function d(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(a)||i.push(a),tt(e,p,"gfmFootnoteDefinitionWhitespace")):n(m)}function p(m){return t(m)}}function _2(e,t,n){return e.check(Yo,t,e.attempt(g2,t,n))}function k2(e){e.exit("gfmFootnoteDefinition")}function T2(e,t,n){const r=this;return tt(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(a):n(a)}}function C2(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,s){let u=-1;for(;++u<o.length;)if(o[u][0]==="enter"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._close){let l=u;for(;l--;)if(o[l][0]==="exit"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._open&&o[u][1].end.offset-o[u][1].start.offset===o[l][1].end.offset-o[l][1].start.offset){o[u][1].type="strikethroughSequence",o[l][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},o[l][1].start),end:Object.assign({},o[u][1].end)},f={type:"strikethroughText",start:Object.assign({},o[l][1].end),end:Object.assign({},o[u][1].start)},d=[["enter",c,s],["enter",o[l][1],s],["exit",o[l][1],s],["enter",f,s]],p=s.parser.constructs.insideSpan.null;p&&Ln(d,d.length,0,Jl(p,o.slice(l+1,u),s)),Ln(d,d.length,0,[["exit",f,s],["enter",o[u][1],s],["exit",o[u][1],s],["exit",c,s]]),Ln(o,l-1,u-l+3,d),u=l+d.length-2;break}}for(u=-1;++u<o.length;)o[u][1].type==="strikethroughSequenceTemporary"&&(o[u][1].type="data");return o}function a(o,s,u){const l=this.previous,c=this.events;let f=0;return d;function d(m){return l===126&&c[c.length-1][1].type!=="characterEscape"?u(m):(o.enter("strikethroughSequenceTemporary"),p(m))}function p(m){const h=Yl(l);if(m===126)return f>1?u(m):(o.consume(m),f++,p);if(f<2&&!n)return u(m);const y=o.exit("strikethroughSequenceTemporary"),v=Yl(m);return y._open=!v||v===2&&!!h,y._close=!h||h===2&&!!v,s(m)}}}class O2{constructor(){this.map=[]}add(t,n,r){$2(this,t,n,r)}consume(t){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let i=r.pop();for(;i;)t.push(...i),i=r.pop();this.map.length=0}}function $2(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function I2(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function R2(){return{flow:{null:{name:"table",tokenize:A2,resolveAll:P2}}}}function A2(e,t,n){const r=this;let i=0,a=0,o;return s;function s(k){let D=r.events.length-1;for(;D>-1;){const I=r.events[D][1].type;if(I==="lineEnding"||I==="linePrefix")D--;else break}const W=D>-1?r.events[D][1].type:null,B=W==="tableHead"||W==="tableRow"?_:u;return B===_&&r.parser.lazy[r.now().line]?n(k):B(k)}function u(k){return e.enter("tableHead"),e.enter("tableRow"),l(k)}function l(k){return k===124||(o=!0,a+=1),c(k)}function c(k){return k===null?n(k):De(k)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),p):n(k):Ye(k)?tt(e,c,"whitespace")(k):(a+=1,o&&(o=!1,i+=1),k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),o=!0,c):(e.enter("data"),f(k)))}function f(k){return k===null||k===124||gt(k)?(e.exit("data"),c(k)):(e.consume(k),k===92?d:f)}function d(k){return k===92||k===124?(e.consume(k),f):f(k)}function p(k){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(k):(e.enter("tableDelimiterRow"),o=!1,Ye(k)?tt(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):m(k))}function m(k){return k===45||k===58?y(k):k===124?(o=!0,e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),h):E(k)}function h(k){return Ye(k)?tt(e,y,"whitespace")(k):y(k)}function y(k){return k===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),v):k===45?(a+=1,v(k)):k===null||De(k)?T(k):E(k)}function v(k){return k===45?(e.enter("tableDelimiterFiller"),b(k)):E(k)}function b(k){return k===45?(e.consume(k),b):k===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(k))}function w(k){return Ye(k)?tt(e,T,"whitespace")(k):T(k)}function T(k){return k===124?m(k):k===null||De(k)?!o||i!==a?E(k):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(k)):E(k)}function E(k){return n(k)}function _(k){return e.enter("tableRow"),O(k)}function O(k){return k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),O):k===null||De(k)?(e.exit("tableRow"),t(k)):Ye(k)?tt(e,O,"whitespace")(k):(e.enter("data"),z(k))}function z(k){return k===null||k===124||gt(k)?(e.exit("data"),O(k)):(e.consume(k),k===92?U:z)}function U(k){return k===92||k===124?(e.consume(k),z):z(k)}}function P2(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,u=0,l,c,f;const d=new O2;for(;++n<e.length;){const p=e[n],m=p[1];p[0]==="enter"?m.type==="tableHead"?(s=!1,u!==0&&(y0(d,t,u,l,c),c=void 0,u=0),l={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},d.add(n,0,[["enter",l,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,f=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,c={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},d.add(n,0,[["enter",c,t]])),i=m.type==="tableDelimiterRow"?2:c?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],f=uu(d,t,a,i,void 0,f),a=[0,0,0,0]),o[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],f=uu(d,t,a,i,void 0,f)),a=o,o=[a[1],n,0,0])):m.type==="tableHead"?(s=!0,u=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(u=n,a[1]!==0?(o[0]=o[1],f=uu(d,t,a,i,n,f)):o[1]!==0&&(f=uu(d,t,o,i,n,f)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(o[3]=n)}for(u!==0&&y0(d,t,u,l,c),d.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=I2(t.events,n))}return e}function uu(e,t,n,r,i,a){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(a.end=Object.assign({},wa(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const u=wa(t.events,n[1]);if(a={type:o,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const l=wa(t.events,n[2]),c=wa(t.events,n[3]),f={type:s,start:Object.assign({},l),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const d=t.events[n[2]],p=t.events[n[3]];if(d[1].end=Object.assign({},p[1].end),d[1].type="chunkText",d[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,h=n[3]-n[2]-1;e.add(m,h,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(a.end=Object.assign({},wa(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function y0(e,t,n,r,i){const a=[],o=wa(t.events,n);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),r.end=Object.assign({},o),a.push(["exit",r,t]),e.add(n+1,0,a)}function wa(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const D2={name:"tasklistCheck",tokenize:N2};function j2(){return{text:{91:D2}}}function N2(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),a)}function a(u){return gt(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),o):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),o):n(u)}function o(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(u)}function s(u){return De(u)?t(u):Ye(u)?e.check({tokenize:M2},t,n)(u):n(u)}}function M2(e,t,n){return tt(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function F2(e){return Vb([u2(),b2(),C2(e),R2(),j2()])}const L2={};function B2(e){const t=this,n=e||L2,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(F2(n)),a.push(a2()),o.push(o2(n))}const lt={container:{className:"bpReset bpContainer bpFont",dropzone:{overlay:{className:"bpDropzoneOverlay"},container:{className:"bpDropzoneContainer"}}},loader:{className:"bpReset bpLoader"},modal:{container:{className:"bpReset bpModalContainer"},overlay:{className:"bpModalOverlay"},dialog:{container:{className:"bpReset bpModalDialogContainer"},title:{container:{className:"bpReset bpModalDialogTitleContainer"},text:{className:"bpModalDialogTitleText"},closeIcon:{className:"bpModalDialogTitleCloseIcon"}},content:{className:"bpModalDialogContent"},newConversation:{button:{className:"bpModalDialogNewConversationButton"},text:{className:"bpModalDialogNewConversationText"}}}},fab:{container:{className:"bpReset bpFabContainer"},icon:{className:"bpFabIcon"}},notification:{container:{className:"bpReset bpNotificationContainer"},title:{className:"bpNotificationTitle"},description:{className:"bpNotificationDescription"},icon:{className:"bpNotificationIcon"},closeIcon:{className:"bpNotificationCloseIcon"}},header:{container:{className:"bpReset bpHeaderContainer bpFont"},content:{container:{className:"bpReset bpHeaderContentContainer"},title:{className:"bpHeaderContentTitle"},description:{className:"bpHeaderContentDescription"},avatar:{container:{className:"bpReset bpHeaderContentAvatarContainer"},image:{className:"bpHeaderContentAvatarImage"},fallback:{className:"bpHeaderContentAvatarFallback"}},actions:{container:{className:"bpReset bpHeaderContentActionsContainer"},icons:{className:"bpHeaderContentActionsIcons"}}},expandedContent:{container:{className:"bpReset bpHeaderExpandedContentContainer"},descriptionItems:{container:{className:"bpReset bpHeaderExpandedContentDescriptionItemsContainer"},icon:{className:"bpHeaderExpandedContentDescriptionItemsIcon"},text:{className:"bpHeaderExpandedContentDescriptionItemsText"},link:{className:"bpHeaderExpandedContentDescriptionItemsLink"}},group:{className:"bpHeaderExpandedContentGroup"}},newConversationIcon:{className:"bpHeaderNewConversationIcon"}},composer:{container:{className:"bpReset bpComposerContainer bpFont"},poweredBy:{className:"bpComposerPoweredBy"},inputContainer:{className:"bpComposerInputContainer"},input:{className:"bpComposerInput"},button:{container:{className:"bpReset bpComposerButtonContainer"},icon:{className:"bpComposerButtonIcon"}},uploadButton:{icon:{className:"bpComposerUploadButtonIcon"},container:{className:"bpReset bpComposerUploadButtonContainer"}},voiceButton:{icon:{className:"bpComposerVoiceButtonIcon"},container:{className:"bpReset bpComposerVoiceButtonContainer"}},fileContainer:{className:"bpComposerFileContainer"},fileWidget:{container:{className:"bpComposerFileAttachement"},loader:{className:"bpComposerFileLoader"},fileIcon:{container:{className:"bpComposerFileIconWrapper"},icon:{className:"bpComposerFileIcon"}},metadata:{container:{className:"bpComposerFileMetadata"},name:{className:"bpComposerFileName"},type:{className:"bpComposerFileExtension"}},removeIcon:{className:"bpComposerFileRemoveIcon"},errorIcon:{className:"bpComposerFileErrorIcon"},previewImage:{className:"bpComposerFilePreviewImage"}}},messageList:{scrollDownButton:{container:{className:"bpReset bpMessageListScrollDownButtonContainer"},button:{className:"bpMessageListScrollDownButtonButton"},icon:{className:"bpMessageListScrollDownButtonIcon"}},container:{className:"bpReset bpMessageListContainer bpFont"},viewPort:{className:"bpMessageListViewport"},marquee:{container:{className:"bpReset bpMessageListMarqueeContainer"},content:{className:"bpMessageListMarqueeContent"},title:{className:"bpMessageListMarqueeTitle"},description:{className:"bpMessageListMarqueeDescription"},avatar:{container:{className:"bpReset bpMessageListMarqueeAvatarContainer"},image:{className:"bpMessageListMarqueeAvatarImage"},fallback:{className:"bpMessageListMarqueeAvatarFallback"}}},headerMessage:{className:"bpMessageListHeaderMessage"}},message:{container:{className:"bpReset bpMessageContainer"},avatar:{container:{className:"bpReset bpMessageAvatarContainer"},image:{className:"bpMessageAvatarImage"},fallback:{className:"bpMessageAvatarFallback"}},blocks:{text:{heading1:{className:"bpMessageBlocksTextHeading1"},heading2:{className:"bpMessageBlocksTextHeading2"},heading3:{className:"bpMessageBlocksTextHeading3"},unorderedList:{className:"bpMessageBlocksTextUnorderedList"},orderedList:{className:"bpMessageBlocksTextOrderedList"},link:{className:"bpMessageBlocksTextLink"},italic:{className:"bpMessageBlocksTextItalic"},bold:{className:"bpMessageBlocksTextBold"},text:{className:"bpMessageBlocksTextText"},horizontalRule:{className:"bpMessageBlocksTextHorizontalRule"},listItem:{className:"bpMessageBlocksTextListItem"},lineBreak:{className:"bpMessageBlocksTextLineBreak"},pre:{className:"bpMessageBlocksTextPre"}},audio:{className:"bpMessageBlocksAudio"},image:{image:{className:"bpMessageBlocksImageImage"},placeholder:{className:"bpMessageBlocksImagePlaceholder"}},video:{className:"bpMessageBlocksVideo"},location:{container:{className:"bpMessageBlocksLocationContainer"},title:{className:"bpMessageBlocksLocationTitle"},icon:{className:"bpMessageBlocksLocationIcon"}},file:{container:{className:"bpMessageBlocksFileContainer"},title:{className:"bpMessageBlocksFileTitle"},icon:{className:"bpMessageBlocksFileIcon"}},row:{className:"bpMessageBlocksRow"},column:{className:"bpMessageBlocksColumn"},bubble:{className:"bpMessageBlocksBubble"},carousel:{container:{className:"bpMessageBlocksCarouselContainer"},slidesContainer:{className:"bpMessageBlocksCarouselSlidesContainer"},backButton:{className:"bpMessageBlocksCarouselBackButton"},nextButton:{className:"bpMessageBlocksCarouselNextButton"}},dropdown:{button:{container:{className:"bpMessageBlocksDropdownButtonContainer"},text:{className:"bpMessageBlocksDropdownButtonText"},icon:{className:"bpMessageBlocksDropdownButtonIcon"}},content:{container:{className:"bpMessageBlocksDropdownContentContainer"},item:{className:"bpMessageBlocksDropdownContentItem"}}},button:{className:"bpMessageBlocksButton"}}},typingIndicator:{container:{className:"bpTypingIndicatorContainer"},loader:{className:"bpTypingIndicatorLoader"}}},U2=({text:e})=>{const{message:{blocks:{text:t}}}=lt,n={h1:({node:r,...i})=>$.jsx("h1",{...i,...t==null?void 0:t.heading1}),h2:({node:r,...i})=>$.jsx("h2",{...i,...t==null?void 0:t.heading2}),h3:({node:r,...i})=>$.jsx("h3",{...i,...t==null?void 0:t.heading3}),h4:"h3",h5:"h3",h6:"h3",em:({node:r,...i})=>$.jsx("em",{...i,...t==null?void 0:t.italic}),strong:({node:r,...i})=>$.jsx("strong",{...i,...t==null?void 0:t.bold}),p:({node:r,...i})=>$.jsx("p",{...i,...t==null?void 0:t.text}),hr:({node:r,...i})=>$.jsx("hr",{...i,...t==null?void 0:t.horizontalRule}),a:({node:r,...i})=>$.jsx("a",{...i,...t==null?void 0:t.link,target:"_blank"}),ol:({node:r,...i})=>$.jsx("ol",{...i,...t==null?void 0:t.orderedList}),ul:({node:r,...i})=>$.jsx("ul",{...i,...t==null?void 0:t.unorderedList}),li:({node:r,...i})=>$.jsx("li",{...i,...t==null?void 0:t.listItem}),br:({node:r,...i})=>$.jsx("br",{...i,...t==null?void 0:t.lineBreak}),pre:({node:r,...i})=>$.jsx("pre",{...i,...t==null?void 0:t.pre})};return $.jsx(ON,{urlTransform:r=>r.startsWith("tel:")?r:Uw(r),components:n,remarkPlugins:[B2,jN],children:e})},z2={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},g0=e=>{let t;const n=new Set,r=(c,f)=>{const d=typeof c=="function"?c(t):c;if(!Object.is(d,t)){const p=t;t=f??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(m=>m(t,p))}},i=()=>t,u={setState:r,getState:i,getInitialState:()=>l,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(z2?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},l=t=e(r,i,u);return u},q2=e=>e?g0(e):g0;var Kd={exports:{}},Gd={},cu={exports:{}},Yd={};/**
58
58
  * @license React
59
59
  * use-sync-external-store-shim.production.min.js
60
60
  *
@@ -62,7 +62,7 @@ React keys must be passed directly to JSX without using spread:
62
62
  *
63
63
  * This source code is licensed under the MIT license found in the
64
64
  * LICENSE file in the root directory of this source tree.
65
- */var Ww;function eM(){if(Ww)return Od;Ww=1;var e=j;function t(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,a=e.useLayoutEffect,o=e.useDebugValue;function s(f,p){var d=p(),m=r({inst:{value:d,getSnapshot:p}}),h=m[0].inst,y=m[1];return a(function(){h.value=d,h.getSnapshot=p,u(h)&&y({inst:h})},[f,d,p]),i(function(){return u(h)&&y({inst:h}),f(function(){u(h)&&y({inst:h})})},[f]),o(d),d}function u(f){var p=f.getSnapshot;f=f.value;try{var d=p();return!n(f,d)}catch{return!0}}function l(f,p){return p()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:s;return Od.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:c,Od}var Cd={};/**
65
+ */var b0;function W2(){if(b0)return Yd;b0=1;var e=j;function t(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,a=e.useLayoutEffect,o=e.useDebugValue;function s(f,d){var p=d(),m=r({inst:{value:p,getSnapshot:d}}),h=m[0].inst,y=m[1];return a(function(){h.value=p,h.getSnapshot=d,u(h)&&y({inst:h})},[f,p,d]),i(function(){return u(h)&&y({inst:h}),f(function(){u(h)&&y({inst:h})})},[f]),o(p),p}function u(f){var d=f.getSnapshot;f=f.value;try{var p=d();return!n(f,p)}catch{return!0}}function l(f,d){return d()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:s;return Yd.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:c,Yd}var Jd={};/**
66
66
  * @license React
67
67
  * use-sync-external-store-shim.development.js
68
68
  *
@@ -70,7 +70,7 @@ React keys must be passed directly to JSX without using spread:
70
70
  *
71
71
  * This source code is licensed under the MIT license found in the
72
72
  * LICENSE file in the root directory of this source tree.
73
- */var Vw;function tM(){return Vw||(Vw=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=j,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(w){{for(var k=arguments.length,E=new Array(k>1?k-1:0),_=1;_<k;_++)E[_-1]=arguments[_];r("error",w,E)}}function r(w,k,E){{var _=t.ReactDebugCurrentFrame,C=_.getStackAddendum();C!==""&&(k+="%s",E=E.concat([C]));var z=E.map(function(B){return String(B)});z.unshift("Warning: "+k),Function.prototype.apply.call(console[w],console,z)}}function i(w,k){return w===k&&(w!==0||1/w===1/k)||w!==w&&k!==k}var a=typeof Object.is=="function"?Object.is:i,o=e.useState,s=e.useEffect,u=e.useLayoutEffect,l=e.useDebugValue,c=!1,f=!1;function p(w,k,E){c||e.startTransition!==void 0&&(c=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var _=k();if(!f){var C=k();a(_,C)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var z=o({inst:{value:_,getSnapshot:k}}),B=z[0].inst,T=z[1];return u(function(){B.value=_,B.getSnapshot=k,d(B)&&T({inst:B})},[w,_,k]),s(function(){d(B)&&T({inst:B});var A=function(){d(B)&&T({inst:B})};return w(A)},[w]),l(_),_}function d(w){var k=w.getSnapshot,E=w.value;try{var _=k();return!a(E,_)}catch{return!0}}function m(w,k,E){return k()}var h=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",y=!h,v=y?m:p,b=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:v;Cd.useSyncExternalStore=b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Cd}var Hw;function Zw(){return Hw||(Hw=1,process.env.NODE_ENV==="production"?Wl.exports=eM():Wl.exports=tM()),Wl.exports}/**
73
+ */var w0;function V2(){return w0||(w0=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=j,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(w){{for(var T=arguments.length,E=new Array(T>1?T-1:0),_=1;_<T;_++)E[_-1]=arguments[_];r("error",w,E)}}function r(w,T,E){{var _=t.ReactDebugCurrentFrame,O=_.getStackAddendum();O!==""&&(T+="%s",E=E.concat([O]));var z=E.map(function(U){return String(U)});z.unshift("Warning: "+T),Function.prototype.apply.call(console[w],console,z)}}function i(w,T){return w===T&&(w!==0||1/w===1/T)||w!==w&&T!==T}var a=typeof Object.is=="function"?Object.is:i,o=e.useState,s=e.useEffect,u=e.useLayoutEffect,l=e.useDebugValue,c=!1,f=!1;function d(w,T,E){c||e.startTransition!==void 0&&(c=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var _=T();if(!f){var O=T();a(_,O)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var z=o({inst:{value:_,getSnapshot:T}}),U=z[0].inst,k=z[1];return u(function(){U.value=_,U.getSnapshot=T,p(U)&&k({inst:U})},[w,_,T]),s(function(){p(U)&&k({inst:U});var D=function(){p(U)&&k({inst:U})};return w(D)},[w]),l(_),_}function p(w){var T=w.getSnapshot,E=w.value;try{var _=T();return!a(E,_)}catch{return!0}}function m(w,T,E){return T()}var h=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",y=!h,v=y?m:d,b=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:v;Jd.useSyncExternalStore=b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Jd}var x0;function S0(){return x0||(x0=1,process.env.NODE_ENV==="production"?cu.exports=W2():cu.exports=V2()),cu.exports}/**
74
74
  * @license React
75
75
  * use-sync-external-store-shim/with-selector.production.min.js
76
76
  *
@@ -78,7 +78,7 @@ React keys must be passed directly to JSX without using spread:
78
78
  *
79
79
  * This source code is licensed under the MIT license found in the
80
80
  * LICENSE file in the root directory of this source tree.
81
- */var Kw;function nM(){if(Kw)return Td;Kw=1;var e=j,t=Zw();function n(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,a=e.useRef,o=e.useEffect,s=e.useMemo,u=e.useDebugValue;return Td.useSyncExternalStoreWithSelector=function(l,c,f,p,d){var m=a(null);if(m.current===null){var h={hasValue:!1,value:null};m.current=h}else h=m.current;m=s(function(){function v(_){if(!b){if(b=!0,w=_,_=p(_),d!==void 0&&h.hasValue){var C=h.value;if(d(C,_))return k=C}return k=_}if(C=k,r(w,_))return C;var z=p(_);return d!==void 0&&d(C,z)?C:(w=_,k=z)}var b=!1,w,k,E=f===void 0?null:f;return[function(){return v(c())},E===null?void 0:function(){return v(E())}]},[c,f,p,d]);var y=i(l,m[0],m[1]);return o(function(){h.hasValue=!0,h.value=y},[y]),u(y),y},Td}var $d={};/**
81
+ */var E0;function H2(){if(E0)return Gd;E0=1;var e=j,t=S0();function n(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,a=e.useRef,o=e.useEffect,s=e.useMemo,u=e.useDebugValue;return Gd.useSyncExternalStoreWithSelector=function(l,c,f,d,p){var m=a(null);if(m.current===null){var h={hasValue:!1,value:null};m.current=h}else h=m.current;m=s(function(){function v(_){if(!b){if(b=!0,w=_,_=d(_),p!==void 0&&h.hasValue){var O=h.value;if(p(O,_))return T=O}return T=_}if(O=T,r(w,_))return O;var z=d(_);return p!==void 0&&p(O,z)?O:(w=_,T=z)}var b=!1,w,T,E=f===void 0?null:f;return[function(){return v(c())},E===null?void 0:function(){return v(E())}]},[c,f,d,p]);var y=i(l,m[0],m[1]);return o(function(){h.hasValue=!0,h.value=y},[y]),u(y),y},Gd}var Xd={};/**
82
82
  * @license React
83
83
  * use-sync-external-store-shim/with-selector.development.js
84
84
  *
@@ -86,43 +86,43 @@ React keys must be passed directly to JSX without using spread:
86
86
  *
87
87
  * This source code is licensed under the MIT license found in the
88
88
  * LICENSE file in the root directory of this source tree.
89
- */var Gw;function rM(){return Gw||(Gw=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=j,t=Zw();function n(c,f){return c===f&&(c!==0||1/c===1/f)||c!==c&&f!==f}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,a=e.useRef,o=e.useEffect,s=e.useMemo,u=e.useDebugValue;function l(c,f,p,d,m){var h=a(null),y;h.current===null?(y={hasValue:!1,value:null},h.current=y):y=h.current;var v=s(function(){var E=!1,_,C,z=function(W){if(!E){E=!0,_=W;var F=d(W);if(m!==void 0&&y.hasValue){var L=y.value;if(m(L,F))return C=L,L}return C=F,F}var N=_,q=C;if(r(N,W))return q;var Y=d(W);return m!==void 0&&m(q,Y)?q:(_=W,C=Y,Y)},B=p===void 0?null:p,T=function(){return z(f())},A=B===null?void 0:function(){return z(B())};return[T,A]},[f,p,d,m]),b=v[0],w=v[1],k=i(c,b,w);return o(function(){y.hasValue=!0,y.value=k},[k]),u(k),k}$d.useSyncExternalStoreWithSelector=l,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),$d}process.env.NODE_ENV==="production"?kd.exports=nM():kd.exports=rM();var iM=kd.exports;const aM=Ge(iM),Yw={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:oM}=j,{useSyncExternalStoreWithSelector:sM}=aM;let Jw=!1;const lM=e=>e;function uM(e,t=lM,n){(Yw?"production":void 0)!=="production"&&n&&!Jw&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),Jw=!0);const r=sM(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return oM(r),r}const cM=e=>{(Yw?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?Q2(e):e,n=(r,i)=>uM(t,r,i);return Object.assign(n,t),n},ua=e=>cM,Vl={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Id=new Map,Hl=e=>{const t=Id.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},fM=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=Id.get(n.name);if(r)return{type:"tracked",store:e,...r};const i={connection:t.connect(n),stores:{}};return Id.set(n.name,i),{type:"tracked",store:e,...i}},Zl=(e,t={})=>(n,r,i)=>{const{enabled:a,anonymousActionType:o,store:s,...u}=t;let l;try{l=(a??(Vl?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!l)return(Vl?"production":void 0)!=="production"&&a&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(n,r,i);const{connection:c,...f}=fM(s,l,u);let p=!0;i.setState=(h,y,v)=>{const b=n(h,y);if(!p)return b;const w=v===void 0?{type:o||"anonymous"}:typeof v=="string"?{type:v}:v;return s===void 0?(c==null||c.send(w,r()),b):(c==null||c.send({...w,type:`${s}/${w.type}`},{...Hl(u.name),[s]:i.getState()}),b)};const d=(...h)=>{const y=p;p=!1,n(...h),p=y},m=e(i.setState,r,i);if(f.type==="untracked"?c==null||c.init(m):(f.stores[f.store]=i,c==null||c.init(Object.fromEntries(Object.entries(f.stores).map(([h,y])=>[h,h===f.store?m:y.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let h=!1;const y=i.dispatch;i.dispatch=(...v)=>{(Vl?"production":void 0)!=="production"&&v[0].type==="__setState"&&!h&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),h=!0),y(...v)}}return c.subscribe(h=>{var y;switch(h.type){case"ACTION":if(typeof h.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Rd(h.payload,v=>{if(v.type==="__setState"){if(s===void 0){d(v.state);return}Object.keys(v.state).length!==1&&console.error(`
89
+ */var _0;function Z2(){return _0||(_0=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=j,t=S0();function n(c,f){return c===f&&(c!==0||1/c===1/f)||c!==c&&f!==f}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,a=e.useRef,o=e.useEffect,s=e.useMemo,u=e.useDebugValue;function l(c,f,d,p,m){var h=a(null),y;h.current===null?(y={hasValue:!1,value:null},h.current=y):y=h.current;var v=s(function(){var E=!1,_,O,z=function(W){if(!E){E=!0,_=W;var B=p(W);if(m!==void 0&&y.hasValue){var I=y.value;if(m(I,B))return O=I,I}return O=B,B}var A=_,L=O;if(r(A,W))return L;var Z=p(W);return m!==void 0&&m(L,Z)?L:(_=W,O=Z,Z)},U=d===void 0?null:d,k=function(){return z(f())},D=U===null?void 0:function(){return z(U())};return[k,D]},[f,d,p,m]),b=v[0],w=v[1],T=i(c,b,w);return o(function(){y.hasValue=!0,y.value=T},[T]),u(T),T}Xd.useSyncExternalStoreWithSelector=l,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Xd}process.env.NODE_ENV==="production"?Kd.exports=H2():Kd.exports=Z2();var K2=Kd.exports;const G2=Ge(K2),k0={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:Y2}=j,{useSyncExternalStoreWithSelector:J2}=G2;let T0=!1;const X2=e=>e;function Q2(e,t=X2,n){(k0?"production":void 0)!=="production"&&n&&!T0&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),T0=!0);const r=J2(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Y2(r),r}const eF=e=>{(k0?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?q2(e):e,n=(r,i)=>Q2(t,r,i);return Object.assign(n,t),n},xa=e=>eF,fu={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Qd=new Map,du=e=>{const t=Qd.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},tF=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=Qd.get(n.name);if(r)return{type:"tracked",store:e,...r};const i={connection:t.connect(n),stores:{}};return Qd.set(n.name,i),{type:"tracked",store:e,...i}},pu=(e,t={})=>(n,r,i)=>{const{enabled:a,anonymousActionType:o,store:s,...u}=t;let l;try{l=(a??(fu?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!l)return(fu?"production":void 0)!=="production"&&a&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(n,r,i);const{connection:c,...f}=tF(s,l,u);let d=!0;i.setState=(h,y,v)=>{const b=n(h,y);if(!d)return b;const w=v===void 0?{type:o||"anonymous"}:typeof v=="string"?{type:v}:v;return s===void 0?(c==null||c.send(w,r()),b):(c==null||c.send({...w,type:`${s}/${w.type}`},{...du(u.name),[s]:i.getState()}),b)};const p=(...h)=>{const y=d;d=!1,n(...h),d=y},m=e(i.setState,r,i);if(f.type==="untracked"?c==null||c.init(m):(f.stores[f.store]=i,c==null||c.init(Object.fromEntries(Object.entries(f.stores).map(([h,y])=>[h,h===f.store?m:y.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let h=!1;const y=i.dispatch;i.dispatch=(...v)=>{(fu?"production":void 0)!=="production"&&v[0].type==="__setState"&&!h&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),h=!0),y(...v)}}return c.subscribe(h=>{var y;switch(h.type){case"ACTION":if(typeof h.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return ep(h.payload,v=>{if(v.type==="__setState"){if(s===void 0){p(v.state);return}Object.keys(v.state).length!==1&&console.error(`
90
90
  [zustand devtools middleware] Unsupported __setState action format.
91
91
  When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
92
92
  and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
93
- `);const b=v.state[s];if(b==null)return;JSON.stringify(i.getState())!==JSON.stringify(b)&&d(b);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(v)});case"DISPATCH":switch(h.payload.type){case"RESET":return d(m),s===void 0?c==null?void 0:c.init(i.getState()):c==null?void 0:c.init(Hl(u.name));case"COMMIT":if(s===void 0){c==null||c.init(i.getState());return}return c==null?void 0:c.init(Hl(u.name));case"ROLLBACK":return Rd(h.state,v=>{if(s===void 0){d(v),c==null||c.init(i.getState());return}d(v[s]),c==null||c.init(Hl(u.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Rd(h.state,v=>{if(s===void 0){d(v);return}JSON.stringify(i.getState())!==JSON.stringify(v[s])&&d(v[s])});case"IMPORT_STATE":{const{nextLiftedState:v}=h.payload,b=(y=v.computedStates.slice(-1)[0])==null?void 0:y.state;if(!b)return;d(s===void 0?b:b[s]),c==null||c.send(null,v);return}case"PAUSE_RECORDING":return p=!p}return}}),m},Rd=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)};function Xw(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var a;const o=u=>u===null?null:JSON.parse(u,void 0),s=(a=n.getItem(i))!=null?a:null;return s instanceof Promise?s.then(o):o(s)},setItem:(i,a)=>n.setItem(i,JSON.stringify(a,void 0)),removeItem:i=>n.removeItem(i)}}const Bo=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Bo(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Bo(r)(n)}}}},dM=(e,t)=>(n,r,i)=>{let a={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:y=>y,version:0,merge:(y,v)=>({...v,...y}),...t},o=!1;const s=new Set,u=new Set;let l;try{l=a.getStorage()}catch{}if(!l)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...y)},r,i);const c=Bo(a.serialize),f=()=>{const y=a.partialize({...r()});let v;const b=c({state:y,version:a.version}).then(w=>l.setItem(a.name,w)).catch(w=>{v=w});if(v)throw v;return b},p=i.setState;i.setState=(y,v)=>{p(y,v),f()};const d=e((...y)=>{n(...y),f()},r,i);let m;const h=()=>{var y;if(!l)return;o=!1,s.forEach(b=>b(r()));const v=((y=a.onRehydrateStorage)==null?void 0:y.call(a,r()))||void 0;return Bo(l.getItem.bind(l))(a.name).then(b=>{if(b)return a.deserialize(b)}).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==a.version){if(a.migrate)return a.migrate(b.state,b.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return b.state}).then(b=>{var w;return m=a.merge(b,(w=r())!=null?w:d),n(m,!0),f()}).then(()=>{v==null||v(m,void 0),o=!0,u.forEach(b=>b(m))}).catch(b=>{v==null||v(void 0,b)})};return i.persist={setOptions:y=>{a={...a,...y},y.getStorage&&(l=y.getStorage())},clearStorage:()=>{l==null||l.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>o,onHydrate:y=>(s.add(y),()=>{s.delete(y)}),onFinishHydration:y=>(u.add(y),()=>{u.delete(y)})},h(),m||d},pM=(e,t)=>(n,r,i)=>{let a={storage:Xw(()=>localStorage),partialize:h=>h,version:0,merge:(h,y)=>({...y,...h}),...t},o=!1;const s=new Set,u=new Set;let l=a.storage;if(!l)return e((...h)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...h)},r,i);const c=()=>{const h=a.partialize({...r()});return l.setItem(a.name,{state:h,version:a.version})},f=i.setState;i.setState=(h,y)=>{f(h,y),c()};const p=e((...h)=>{n(...h),c()},r,i);i.getInitialState=()=>p;let d;const m=()=>{var h,y;if(!l)return;o=!1,s.forEach(b=>{var w;return b((w=r())!=null?w:p)});const v=((y=a.onRehydrateStorage)==null?void 0:y.call(a,(h=r())!=null?h:p))||void 0;return Bo(l.getItem.bind(l))(a.name).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==a.version){if(a.migrate)return[!0,a.migrate(b.state,b.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,b.state];return[!1,void 0]}).then(b=>{var w;const[k,E]=b;if(d=a.merge(E,(w=r())!=null?w:p),n(d,!0),k)return c()}).then(()=>{v==null||v(d,void 0),d=r(),o=!0,u.forEach(b=>b(d))}).catch(b=>{v==null||v(void 0,b)})};return i.persist={setOptions:h=>{a={...a,...h},h.storage&&(l=h.storage)},clearStorage:()=>{l==null||l.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>m(),hasHydrated:()=>o,onHydrate:h=>(s.add(h),()=>{s.delete(h)}),onFinishHydration:h=>(u.add(h),()=>{u.delete(h)})},a.skipHydration||m(),d||p},Qw=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((Vl?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),dM(e,t)):pM(e,t),e0=ua()(Zl(Qw(e=>({messageHistory:[],addMessageToHistory:t=>e(n=>({...n,messageHistory:[t,...(n.messageHistory??[]).slice(0,100)]}))}),{name:"botpress-message-history"}))),Uo=ua()(Zl(e=>({messages:[],isFetching:!1,setMessages:t=>e({messages:t}),addMessage:t=>e(({messages:n})=>{var i;const r=(i=t.metadata)==null?void 0:i.clientMessageId;if(r){const a=n.findIndex(o=>{var s;return((s=o.metadata)==null?void 0:s.clientMessageId)===r});if(a!==-1)return{messages:[...n.slice(0,a),t,...n.slice(a+1)]}}return{messages:[...n.filter(a=>a.id!==t.id),t]}}),updateMessage:(t,n)=>e(({messages:r})=>({messages:r.map(i=>i.id===t?{...i,...n}:i)})),clearMessages:()=>e({messages:[]}),fetchMessages:async({client:t,userKey:n,conversationId:r})=>{const i=[];e({isFetching:!0});let a;do{const o=await t.listConversationMessages({id:r,"x-user-key":n,nextToken:a});i.push(...o.messages),a=o.meta.nextToken}while(a);return e({isFetching:!1}),i.reverse()}}),{name:"messagesStore"})),hM=(e,t)=>ua()(Zl(Qw(n=>({setUser:r=>n(i=>({...i,user:r})),setConversationId:r=>n(i=>({...i,conversationId:r})),clearAll:()=>{n(r=>({...r,messageHistory:{},user:void 0,conversationId:void 0}))}}),{name:e,storage:Xw(()=>t==="sessionStorage"?sessionStorage:localStorage)}))),uo=class uo{constructor(){}static getInstance(t="bp-webchat",n){return uo._instances[t]||(uo._instances[t]=hM(t,n)),uo._instances[t]}};Te(uo,"_instances",{});let Ad=uo;const t0=Ad.getInstance,Kl=ua()(Zl(e=>({eventEmitter:gI,messageContainerRef:{current:null},setMessageContainerRef:t=>e({messageContainerRef:t})}),{name:"webchatStore"})),mM=8,zo=ua()((e,t)=>({files:[],setFiles:n=>e({files:n}),upsertFile:n=>e(({files:r})=>({files:r.some(o=>o.name===n.name)?r.map(o=>o.name===n.name?{...o,...n}:o):[...r,{...n}]})),uploadFile:async(n,r)=>{const i=t().files.some(o=>o.name===n.name),a=t().files.length===mM;if(!(!i&&a)){t().upsertFile({name:n.name,type:"file",instance:n,status:"loading"});try{const{fileUrl:o,type:s}=await r(n);t().upsertFile({name:n.name,type:s,url:o,instance:n,status:"uploaded"})}catch(o){console.error("Error sending file:",o),t().upsertFile({name:n.name,type:"file",instance:n,status:"error"})}}},deleteFile:n=>e(({files:r})=>({files:r.filter(i=>i.name!=n)}))})),vM=({text:e,buttonValue:t,variant:n,groupId:r,reusable:i,sendMessage:a,isReadOnly:o,...s})=>{const u=Kl(w=>w.eventEmitter),[l,c]=j.useState(!1),[f,p]=j.useState(!1),[d,m]=j.useState(!1),{message:{blocks:{button:h}}}=st;j.useEffect(()=>{if(r)return u.on(`button-group-${r}-click`,()=>{p(!0),i||m(!0)})},[u,r,i]);const v={...s,onClick:w=>{if((d||o)&&n==="link"){w.preventDefault();return}c(!0),i||m(!0),r&&u.emit(`button-group-${r}-click`),n!=="link"&&a&&(a==null||a({type:"text",text:e,value:t}))},"data-activated":l?"":void 0,"data-group-activated":f?"":void 0,"data-type":n,...h},b=d||o;return n==="link"?$.jsx("a",{...v,style:o?{pointerEvents:"none"}:void 0,href:t,target:"_blank",rel:"noopener noreferrer",children:e}):$.jsx("button",{...v,style:o?{pointerEvents:"none"}:void 0,disabled:b,children:e})},n0=j.forwardRef(({block:e,direction:t,timestamp:n,sender:r,metadata:i,sendMessage:a,messageId:o,isReadOnly:s,...u},l)=>{const{message:{blocks:{bubble:c}}}=st;return $.jsx("div",{"data-direction":t,...u,...c,ref:l,children:$.jsx(xa,{block:{...e,direction:t,timestamp:n,sender:r,messageId:o,sendMessage:a,isReadOnly:s},direction:t,timestamp:n,sender:r,metadata:i,sendMessage:a,messageId:o,isReadOnly:s})})});n0.displayName="Bubble";const r0=j.createContext(null);function yM(){const e=j.useContext(r0);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const i0=j.createContext(null);function a0(){const e=j.useContext(i0);if(!e)throw new Error("useModalContext must be used within a ModalProvider");return e}var jn=function(){return jn=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},jn.apply(this,arguments)};function o0(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function ca(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(c){try{l(r.next(c))}catch(f){o(f)}}function u(c){try{l(r.throw(c))}catch(f){o(f)}}function l(c){c.done?a(c.value):i(c.value).then(s,u)}l((r=r.apply(e,t||[])).next())})}function fa(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(c){l=[6,c],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function s0(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function Pd(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;function gM(){var e=j.useRef(!1),t=j.useCallback(function(){return e.current},[]);return j.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),t}function bM(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={loading:!1});var r=j.useRef(0),i=gM(),a=j.useState(n),o=a[0],s=a[1],u=j.useCallback(function(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];var f=++r.current;return o.loading||s(function(p){return jn(jn({},p),{loading:!0})}),e.apply(void 0,l).then(function(p){return i()&&f===r.current&&s({value:p,loading:!1}),p},function(p){return i()&&f===r.current&&s({error:p,loading:!1}),p})},t);return[o,u]}function wM(e,t){t===void 0&&(t=[]);var n=bM(e,t,{loading:!0}),r=n[0],i=n[1];return j.useEffect(function(){i()},[i]),r}const l0=j.forwardRef(({url:e,type:t,orientation:n="auto",...r},i)=>{const a=j.useId(),{setIsLoading:o}=yM(),[s,u]=j.useState(n),[l,c]=j.useState(!1),{message:{blocks:{image:f}}}=st;return j.useLayoutEffect(()=>{o(p=>[...p,a])},[]),wM(async()=>{if(e){try{const{width:p,height:d}=await kR(e);s==="auto"&&u(xM(p,d))}catch(p){u("square"),console.error(p)}o(p=>p.filter(d=>d!==a))}},[e]),$.jsxs($.Fragment,{children:[l?null:$.jsx("div",{"data-orientation":s,...f.placeholder}),$.jsx("img",{"data-orientation":s,"data-loaded":l,...r,...f.image,src:e,alt:"",ref:i,loading:"lazy",onLoad:()=>{c(!0)}})]})});l0.displayName="Image";function xM(e,t){const n={square:1,portrait:.75,landscape:1.3333333333333333},r=e/t;return Object.keys(n).reduce((a,o)=>Math.abs(n[o]-r)<Math.abs(n[a]-r)?o:a)}const u0=j.forwardRef(({url:e,isReadOnly:t,...n},r)=>{const{message:{blocks:{video:i}}}=st;return $.jsx("div",{children:$.jsx("video",{...n,"data-chromatic":"ignore",style:t?{pointerEvents:"none"}:void 0,controls:!0,src:e,...i,ref:r})})});u0.displayName="Video";const c0=j.forwardRef(({url:e,isReadOnly:t,...n},r)=>{const{message:{blocks:{audio:i}}}=st;return $.jsx("div",{children:$.jsx("audio",{...n,controls:!0,style:t?{pointerEvents:"none"}:void 0,src:e,...i,ref:r})})});c0.displayName="Audio";function SM({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M15.312 11.424a5.5 5.5 0 0 1-9.201 2.466l-.312-.311h2.433a.75.75 0 0 0 0-1.5H3.989a.75.75 0 0 0-.75.75v4.242a.75.75 0 0 0 1.5 0v-2.43l.31.31a7 7 0 0 0 11.712-3.138.75.75 0 0 0-1.449-.39Zm1.23-3.723a.75.75 0 0 0 .219-.53V2.929a.75.75 0 0 0-1.5 0V5.36l-.31-.31A7 7 0 0 0 3.239 8.188a.75.75 0 1 0 1.448.389A5.5 5.5 0 0 1 13.89 6.11l.311.31h-2.432a.75.75 0 0 0 0 1.5h4.243a.75.75 0 0 0 .53-.219Z",clipRule:"evenodd"}))}const EM=x.forwardRef(SM);function _M({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const kM=x.forwardRef(_M);function TM({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M4.5 2A1.5 1.5 0 0 0 3 3.5v13A1.5 1.5 0 0 0 4.5 18h11a1.5 1.5 0 0 0 1.5-1.5V7.621a1.5 1.5 0 0 0-.44-1.06l-4.12-4.122A1.5 1.5 0 0 0 11.378 2H4.5Zm4.75 6.75a.75.75 0 0 1 1.5 0v2.546l.943-1.048a.75.75 0 0 1 1.114 1.004l-2.25 2.5a.75.75 0 0 1-1.114 0l-2.25-2.5a.75.75 0 1 1 1.114-1.004l.943 1.048V8.75Z",clipRule:"evenodd"}))}const OM=x.forwardRef(TM);function CM({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-8-5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0v-4.5A.75.75 0 0 1 10 5Zm0 10a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const $M=x.forwardRef(CM);function IM({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"m9.69 18.933.003.001C9.89 19.02 10 19 10 19s.11.02.308-.066l.002-.001.006-.003.018-.008a5.741 5.741 0 0 0 .281-.14c.186-.096.446-.24.757-.433.62-.384 1.445-.966 2.274-1.765C15.302 14.988 17 12.493 17 9A7 7 0 1 0 3 9c0 3.492 1.698 5.988 3.355 7.584a13.731 13.731 0 0 0 2.273 1.765 11.842 11.842 0 0 0 .976.544l.062.029.018.008.006.003ZM10 11.25a2.25 2.25 0 1 0 0-4.5 2.25 2.25 0 0 0 0 4.5Z",clipRule:"evenodd"}))}const RM=x.forwardRef(IM);function AM({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM8.28 7.22a.75.75 0 0 0-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 1 0 1.06 1.06L10 11.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L11.06 10l1.72-1.72a.75.75 0 0 0-1.06-1.06L10 8.94 8.28 7.22Z",clipRule:"evenodd"}))}const Dd=x.forwardRef(AM),f0=j.forwardRef(({latitude:e,longitude:t,title:n,isReadOnly:r,...i},a)=>{const o=`https://www.google.com/maps/search/?api=1&query=${e},${t}`,{message:{blocks:{location:s}}}=st;return $.jsxs("a",{...i,...s.container,style:r?{pointerEvents:"none"}:void 0,href:o,type:"_blank",rel:"noopener",ref:a,children:[$.jsx("p",{...s.title,children:n}),$.jsx(RM,{...s.icon})]})});f0.displayName="Location";const d0=j.forwardRef(({blocks:e,horizontalAlignment:t,verticalAlignment:n,direction:r,sender:i,timestamp:a,metadata:o,messageId:s,sendMessage:u,isReadOnly:l,...c},f)=>{const{message:{blocks:{column:p}}}=st;return $.jsx("div",{"data-horizontal":t,"data-vertical":n,...c,...p,ref:f,children:e.map((d,m)=>$.jsx(xa,{block:{...d,direction:r,timestamp:a,sender:i,messageId:s,sendMessage:u,isReadOnly:l},direction:r,timestamp:a,sender:i,metadata:o,sendMessage:u,messageId:s,isReadOnly:l},m))})});d0.displayName="Column";const p0=j.forwardRef(({blocks:e,horizontalAlignment:t,verticalAlignment:n,direction:r,sender:i,timestamp:a,metadata:o,sendMessage:s,messageId:u,isReadOnly:l,...c},f)=>{const{message:{blocks:{row:p}}}=st;return $.jsx("div",{"data-horizontal":t,"data-vertical":n,...c,...p,ref:f,children:e.map((d,m)=>$.jsx(xa,{block:{...d,direction:r,timestamp:a,sender:i,messageId:u,sendMessage:s,isReadOnly:l},direction:r,sender:i,timestamp:a,metadata:o,sendMessage:s,messageId:u,isReadOnly:l},m))})});p0.displayName="Row";function PM(e){return Object.prototype.toString.call(e)==="[object Object]"}function h0(e){return PM(e)||Array.isArray(e)}function DM(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function jd(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const i=JSON.stringify(Object.keys(e.breakpoints||{})),a=JSON.stringify(Object.keys(t.breakpoints||{}));return i!==a?!1:n.every(o=>{const s=e[o],u=t[o];return typeof s=="function"?`${s}`==`${u}`:!h0(s)||!h0(u)?s===u:jd(s,u)})}function m0(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function jM(e,t){if(e.length!==t.length)return!1;const n=m0(e),r=m0(t);return n.every((i,a)=>{const o=r[a];return jd(i,o)})}function Nd(e){return typeof e=="number"}function v0(e){return typeof e=="string"}function Md(e){return typeof e=="boolean"}function y0(e){return Object.prototype.toString.call(e)==="[object Object]"}function It(e){return Math.abs(e)}function Fd(e){return Math.sign(e)}function Gl(e,t){return It(e-t)}function NM(e,t){if(e===0||t===0||It(e)<=It(t))return 0;const n=Gl(It(e),It(t));return It(n/e)}function qo(e){return Jl(e).map(Number)}function jr(e){return e[Yl(e)]}function Yl(e){return Math.max(0,e.length-1)}function Jl(e){return Object.keys(e)}function g0(e,t){return[e,t].reduce((n,r)=>(Jl(r).forEach(i=>{const a=n[i],o=r[i],s=y0(a)&&y0(o);n[i]=s?g0(a,o):o}),n),{})}function b0(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function MM(e,t){const n={start:r,center:i,end:a};function r(){return 0}function i(l){return a(l)/2}function a(l){return t-l}function o(){return t*Number(e)}function s(l){return Nd(e)?o():n[e](l)}return{measure:s}}function FM(e,t){const n=e==="y"?"y":"x",r=e==="y"?"x":"y",i=s(),a=u();function o(c){const{width:f,height:p}=c;return n==="x"?f:p}function s(){return n==="y"?"top":t==="rtl"?"right":"left"}function u(){return n==="y"?"bottom":t==="rtl"?"left":"right"}return{scroll:n,cross:r,startEdge:i,endEdge:a,measureSize:o}}function Qr(e,t){const n=It(e-t);function r(l){return l<e}function i(l){return l>t}function a(l){return r(l)||i(l)}function o(l){return a(l)?r(l)?e:t:l}function s(l){return n?l-n*Math.ceil((l-t)/n):l}return{length:n,max:t,min:e,constrain:o,reachedAny:a,reachedMax:i,reachedMin:r,removeOffset:s}}function w0(e,t,n){const{constrain:r}=Qr(0,e),i=e+1;let a=o(t);function o(p){return n?It((i+p)%i):r(p)}function s(){return a}function u(p){return a=o(p),f}function l(p){return c().set(s()+p)}function c(){return w0(e,s(),n)}const f={get:s,set:u,add:l,clone:c};return f}function LM(e){const t=e==="rtl"?-1:1;function n(i){return i*t}return{apply:n}}function Wo(){let e=[];function t(i,a,o,s={passive:!0}){return i.addEventListener(a,o,s),e.push(()=>i.removeEventListener(a,o,s)),r}function n(){e=e.filter(i=>i())}const r={add:t,clear:n};return r}function BM(e,t,n,r,i,a,o,s,u,l,c,f,p,d,m,h,y,v,b){const{cross:w}=e,k=["INPUT","SELECT","TEXTAREA"],E={passive:!1},_=Wo(),C=Wo(),z=Qr(50,225).constrain(m.measure(20)),B={mouse:300,touch:400},T={mouse:500,touch:600},A=h?43:25;let W=!1,F=0,L=0,N=!1,q=!1,Y=!1,H=!1;function I(ee,K){if(!K)return;function pe(Ie){(Md(K)||K(ee,Ie))&&J(Ie)}const ge=n;_.add(ge,"dragstart",Ie=>Ie.preventDefault(),E).add(ge,"touchmove",()=>{},E).add(ge,"touchend",()=>{}).add(ge,"touchstart",pe).add(ge,"mousedown",pe).add(ge,"touchcancel",X).add(ge,"contextmenu",X).add(ge,"click",ae,!0)}function g(){_.clear(),C.clear()}function P(){const ee=H?r:n;C.add(ee,"touchmove",G,E).add(ee,"touchend",X).add(ee,"mousemove",G,E).add(ee,"mouseup",X)}function V(ee){const K=ee.nodeName||"";return k.includes(K)}function S(){return(h?T:B)[H?"mouse":"touch"]}function Z(ee,K){const pe=p.add(Fd(ee)*-1),ge=f.byDistance(ee,!h).distance;return h||It(ee)<z?ge:v&&K?ge*.5:f.byIndex(pe.get(),0).distance}function J(ee){const K=b0(ee,i);H=K,!(K&&ee.button!==0)&&(V(ee.target)||(Y=h&&K&&!ee.buttons&&W,W=Gl(a.get(),s.get())>=2,N=!0,o.pointerDown(ee),c.useFriction(0).useDuration(0),a.set(s),P(),F=o.readPoint(ee),L=o.readPoint(ee,w),d.emit("pointerDown")))}function G(ee){const K=o.readPoint(ee),pe=o.readPoint(ee,w),ge=Gl(K,F),Ie=Gl(pe,L);if(!q&&!H&&(!ee.cancelable||(q=ge>Ie,!q)))return X(ee);const M=o.pointerMove(ee);ge>y&&(Y=!0),c.useFriction(.3).useDuration(1),u.start(),a.add(t.apply(M)),ee.preventDefault()}function X(ee){const pe=f.byDistance(0,!1).index!==p.get(),ge=o.pointerUp(ee)*S(),Ie=Z(t.apply(ge),pe),M=NM(ge,Ie),ie=A-10*M,ce=b+M/50;q=!1,N=!1,C.clear(),c.useDuration(ie).useFriction(ce),l.distance(Ie,!h),H=!1,d.emit("pointerUp")}function ae(ee){Y&&(ee.stopPropagation(),ee.preventDefault())}function se(){return N}return{init:I,pointerDown:se,destroy:g}}function UM(e,t){let r,i;function a(f){return f.timeStamp}function o(f,p){const m=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(b0(f,t)?f:f.touches[0])[m]}function s(f){return r=f,i=f,o(f)}function u(f){const p=o(f)-o(i),d=a(f)-a(r)>170;return i=f,d&&(r=f),p}function l(f){if(!r||!i)return 0;const p=o(i)-o(r),d=a(f)-a(r),m=a(f)-a(i)>170,h=p/d;return d&&!m&&It(h)>.1?h:0}return{pointerDown:s,pointerMove:u,pointerUp:l,readPoint:o}}function zM(e){function t(r){return e*(r/100)}return{measure:t}}function qM(e,t,n,r,i){let a,o,s=[],u=!1;function l(d){return i.measureSize(d.getBoundingClientRect())}function c(d,m){if(!m)return;o=l(e),s=r.map(l);function h(v){for(const b of v){const w=b.target===e,k=r.indexOf(b.target),E=w?o:s[k],_=l(w?e:r[k]);if(E!==_){n.requestAnimationFrame(()=>{d.reInit(),t.emit("resize")});break}}}a=new ResizeObserver(v=>{u||(Md(m)||m(d,v))&&h(v)}),[e].concat(r).forEach(v=>a.observe(v))}function f(){a&&a.disconnect(),u=!0}return{init:c,destroy:f}}function WM(e,t,n,r){let i=!0,a=0,o=0,s=n,u=r,l=e.get(),c=0;function f(){const E=t.get()-e.get(),_=!s;let C=0;return _?(a=0,e.set(t),C=E):(a+=E/s,a*=u,l+=a,e.add(a),C=l-c),o=Fd(C),c=l,i=It(E)<.001,k}function p(){return i}function d(){return s}function m(){return o}function h(){return a}function y(){return b(n)}function v(){return w(r)}function b(E){return s=E,k}function w(E){return u=E,k}const k={direction:m,duration:d,velocity:h,seek:f,settled:p,useBaseFriction:v,useBaseDuration:y,useFriction:w,useDuration:b};return k}function VM(e,t,n,r,i){const a=i.measure(10),o=i.measure(50),s=Qr(.1,.99);let u=!1;function l(){return!(u||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function c(d){if(!l())return;const m=e.reachedMin(t.get())?"min":"max",h=It(e[m]-t.get()),y=n.get()-t.get(),v=s.constrain(h/o);n.subtract(y*v),!d&&It(y)<a&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function f(d){u=!d}return{constrain:c,toggleActive:f}}function HM(e,t,n,r){const i=Qr(-t+e,n[0]),a=u(),o=l();function s(){const f=a[0],p=jr(a),d=a.lastIndexOf(f),m=a.indexOf(p)+1;return Qr(d,m)}function u(){return n.map(i.constrain).map(f=>parseFloat(f.toFixed(3)))}function l(){if(t<=e)return[i.max];if(r==="keepSnaps")return a;const{min:f,max:p}=s();return a.slice(f,p)}return{snapsContained:o}}function ZM(e,t,n){const r=t[0],i=n?r-e:jr(t);return{limit:Qr(i,r)}}function KM(e,t,n,r){const a=t.min+.1,o=t.max+.1,{reachedMin:s,reachedMax:u}=Qr(a,o);function l(p){return p===1?u(n.get()):p===-1?s(n.get()):!1}function c(p){if(!l(p))return;const d=e*(p*-1);r.forEach(m=>m.add(d))}return{loop:c}}function GM(e){const{max:t,length:n}=e;function r(a){return(a-t)/-n}return{get:r}}function YM(e,t,n,r,i,a,o){const{startEdge:s,endEdge:u}=e,{groupSlides:l}=a,c=d().map(t.measure),f=m(),p=h();function d(){return l(r).map(v=>jr(v)[u]-v[0][s]).map(It)}function m(){return r.map(v=>n[s]-v[s]).map(v=>-It(v))}function h(){const b=jr(f)-jr(i);return l(f).map(w=>w[0]).map((w,k,E)=>{const _=!k,C=k===Yl(E);return o&&_?0:o&&C?b:w+c[k]})}return{snaps:f,snapsAligned:p}}function JM(e,t,n,r,i){const{reachedAny:a,removeOffset:o,constrain:s}=r;function u(m){return m.concat().sort((h,y)=>It(h)-It(y))[0]}function l(m){const h=e?o(m):s(m),y=t.map(b=>b-h).map(b=>c(b,0)).map((b,w)=>({diff:b,index:w})).sort((b,w)=>It(b.diff)-It(w.diff)),{index:v}=y[0];return{index:v,distance:h}}function c(m,h){const y=[m,m+n,m-n];if(!e)return y[0];if(!h)return u(y);const v=y.filter(b=>Fd(b)===h);return u(v)}function f(m,h){const y=t[m]-i.get(),v=c(y,h);return{index:m,distance:v}}function p(m,h){const y=i.get()+m,{index:v,distance:b}=l(y),w=!e&&a(y);if(!h||w)return{index:v,distance:m};const k=t[v]-b,E=m+c(k,0);return{index:v,distance:E}}return{byDistance:p,byIndex:f,shortcut:c}}function XM(e,t,n,r,i,a,o){function s(f){const p=f.distance,d=f.index!==t.get();a.add(p),p&&(i.duration()?e.start():(e.update(),e.render(1),e.update())),d&&(n.set(t.get()),t.set(f.index),o.emit("select"))}function u(f,p){const d=r.byDistance(f,p);s(d)}function l(f,p){const d=t.clone().set(f),m=r.byIndex(d.get(),p);s(m)}return{distance:u,index:l}}function Xl(e){let t=e;function n(){return t}function r(u){t=o(u)}function i(u){t+=o(u)}function a(u){t-=o(u)}function o(u){return Nd(u)?u:u.get()}return{get:n,set:r,add:i,subtract:a}}function x0(e,t,n){const r=e.scroll==="x"?o:s,i=n.style;let a=!1;function o(p){return`translate3d(${p}px,0px,0px)`}function s(p){return`translate3d(0px,${p}px,0px)`}function u(p){a||(i.transform=r(t.apply(p)))}function l(p){a=!p}function c(){a||(i.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:c,to:u,toggleActive:l}}function QM(e,t,n,r,i,a,o,s,u){const l=qo(i),c=qo(i).reverse(),f=h().concat(y());function p(E,_){return E.reduce((C,z)=>C-i[z],_)}function d(E,_){return E.reduce((C,z)=>p(C,_)>0?C.concat([z]):C,[])}function m(E,_){const C=_==="start",z=C?-r:r,B=o.findSlideBounds([z]);return E.map(T=>{const A=C?0:-r,W=C?r:0,L=B.filter(N=>N.index===T)[0][C?"end":"start"];return{index:T,slideLocation:Xl(-1),translate:x0(e,t,u[T]),target:()=>s.get()>L?A:W}})}function h(){const E=a[0]-1,_=d(c,E);return m(_,"end")}function y(){const E=n-a[0]-1,_=d(l,E);return m(_,"start")}function v(){return f.every(({index:E})=>{const _=l.filter(C=>C!==E);return p(_,n)<=.1})}function b(){f.forEach(E=>{const{target:_,translate:C,slideLocation:z}=E,B=_();B!==z.get()&&(C.to(B),z.set(B))})}function w(){f.forEach(E=>E.translate.clear())}return{canLoop:v,clear:w,loop:b,loopPoints:f}}function eF(e,t){let n,r=!1;function i(s,u){if(!u)return;function l(c){for(const f of c)if(f.type==="childList"){s.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(c=>{r||(Md(u)||u(s,c))&&l(c)}),n.observe(e,{childList:!0})}function a(){n&&n.disconnect(),r=!0}return{init:i,destroy:a}}function tF(e,t,n,r,i,a,o){const{removeOffset:s,constrain:u}=i,l=.5,c=a?[0,t,-t]:[0],f=d(c,o);function p(y){const v=y||0;return n.map(b=>Qr(l,b-l).constrain(b*v))}function d(y,v){const b=y||c,w=p(v);return b.reduce((k,E)=>{const _=r.map((C,z)=>({start:C-n[z]+w[z]+E,end:C+e-w[z]+E,index:z}));return k.concat(_)},[])}function m(y,v){const b=a?s(y):u(y);return(v||f).reduce((k,E)=>{const{index:_,start:C,end:z}=E,B=k.includes(_),T=C<b&&z>b;return!B&&T?k.concat([_]):k},[])}return{check:m,findSlideBounds:d}}function nF(e,t,n,r,i,a){const{measureSize:o,startEdge:s,endEdge:u}=e,l=n[0]&&i,c=m(),f=h(),p=n.map(o),d=y();function m(){if(!l)return 0;const b=n[0];return It(t[s]-b[s])}function h(){if(!l)return 0;const b=a.getComputedStyle(jr(r));return parseFloat(b.getPropertyValue(`margin-${u}`))}function y(){return n.map((b,w,k)=>{const E=!w,_=w===Yl(k);return E?p[w]+c:_?p[w]+f:k[w+1][s]-b[s]}).map(It)}return{slideSizes:p,slideSizesWithGaps:d}}function rF(e,t,n){const r=Nd(n);function i(u,l){return qo(u).filter(c=>c%l===0).map(c=>u.slice(c,c+l))}function a(u){return qo(u).reduce((l,c)=>{const p=t.slice(jr(l),c+1).reduce((d,m)=>d+m,0);return!c||p>e?l.concat(c):l},[]).map((l,c,f)=>u.slice(l,f[c+1]))}function o(u){return r?i(u,n):a(u)}return{groupSlides:o}}function iF(e,t,n,r,i,a,o,s){const{align:u,axis:l,direction:c,startIndex:f,inViewThreshold:p,loop:d,duration:m,dragFree:h,dragThreshold:y,slidesToScroll:v,skipSnaps:b,containScroll:w}=a,k=t.getBoundingClientRect(),E=n.map(ce=>ce.getBoundingClientRect()),_=LM(c),C=FM(l,c),z=C.measureSize(k),B=zM(z),T=MM(u,z),A=!d&&!!w,W=d||!!w,{slideSizes:F,slideSizesWithGaps:L}=nF(C,k,E,n,W,i),N=rF(z,L,v),{snaps:q,snapsAligned:Y}=YM(C,T,k,E,L,N,A),H=-jr(q)+jr(L),{snapsContained:I}=HM(z,H,Y,w),g=A?I:Y,{limit:P}=ZM(H,g,d),V=w0(Yl(g),f,d),S=V.clone(),Z=qo(n),J=({dragHandler:ce,scrollBody:oe,scrollBounds:Oe,eventHandler:Ee,animation:Re,options:{loop:He}})=>{const te=ce.pointerDown();He||Oe.constrain(te);const fe=oe.seek().settled();fe&&!te&&(Re.stop(),Ee.emit("settle")),fe||Ee.emit("scroll")},G=({scrollBody:ce,translate:oe,location:Oe,offsetLocation:Ee,scrollLooper:Re,slideLooper:He,options:{loop:te}},fe)=>{const U=ce.velocity();Ee.set(Oe.get()-U+U*fe),te&&(Re.loop(ce.direction()),He.loop()),oe.to(Ee.get())},X={start:()=>s.start(ie),stop:()=>s.stop(ie),update:()=>J(ie),render:ce=>G(ie,ce)},ae=.68,se=g[V.get()],Q=Xl(se),ee=Xl(se),K=Xl(se),pe=WM(Q,K,m,ae),ge=JM(d,g,H,P,K),Ie=XM(X,V,S,ge,pe,K,o),M=tF(z,H,F,q,P,d,p),ie={ownerDocument:r,ownerWindow:i,eventHandler:o,containerRect:k,slideRects:E,animation:X,axis:C,direction:_,dragHandler:BM(C,_,e,r,i,K,UM(C,i),Q,X,Ie,pe,ge,V,o,B,h,y,b,ae),eventStore:Wo(),percentOfView:B,index:V,indexPrevious:S,limit:P,location:Q,offsetLocation:ee,options:a,resizeHandler:qM(t,o,i,n,C),scrollBody:pe,scrollBounds:VM(P,Q,K,pe,B),scrollLooper:KM(H,P,ee,[Q,ee,K]),scrollProgress:GM(P),scrollSnaps:g,scrollTarget:ge,scrollTo:Ie,slideLooper:QM(C,_,z,H,L,g,M,ee,n),slidesHandler:eF(t,o),slidesInView:M,slideIndexes:Z,slidesToScroll:N,target:K,translate:x0(C,_,t)};return ie}function aF(e){const t=16.666666666666668;let n=[],r=null,i=0,a=0;function o(f){r||(r=f);const p=f-r;for(r=f,i+=p;i>=t;)n.forEach(({animation:m})=>m.update()),i-=t;const d=It(i/t);n.forEach(({animation:m})=>m.render(d)),a&&e.requestAnimationFrame(o)}function s(f){n.includes(f)||n.push(f),!a&&(a=e.requestAnimationFrame(o))}function u(f){n=n.filter(p=>p!==f),!n.length&&(e.cancelAnimationFrame(a),r=null,i=0,a=0)}function l(){r=null,i=0}return{start:s,stop:u,reset:l,window:e}}function oF(){const e={};let t;function n(u){t=u}function r(u){return e[u]||[]}function i(u){return r(u).forEach(l=>l(t,u)),s}function a(u,l){return e[u]=r(u).concat([l]),s}function o(u,l){return e[u]=r(u).filter(c=>c!==l),s}const s={init:n,emit:i,off:o,on:a};return s}const sF={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,breakpoints:{},dragFree:!1,dragThreshold:10,inViewThreshold:0,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0};function lF(e){function t(a,o){return g0(a,o||{})}function n(a){const o=a.breakpoints||{},s=Jl(o).filter(u=>e.matchMedia(u).matches).map(u=>o[u]).reduce((u,l)=>t(u,l),{});return t(a,s)}function r(a){return a.map(o=>Jl(o.breakpoints||{})).reduce((o,s)=>o.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function uF(e){let t=[];function n(a,o){return t=a.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(o,e)),a.reduce((s,u)=>Object.assign(s,{[u.name]:u}),{})}function r(){t=t.filter(a=>a.destroy())}return{init:n,destroy:r}}function da(e,t,n){const r=e.ownerDocument,i=r.defaultView,a=lF(i),o=uF(a),s=Wo(),u=Wo(),l=oF(),{animationRealms:c}=da,{mergeOptions:f,optionsAtMedia:p,optionsMediaQueries:d}=a,{on:m,off:h,emit:y}=l,v=F;let b=!1,w,k=f(sF,da.globalOptions),E=f(k),_=[],C,z,B;function T(){const{container:pe,slides:ge}=E;z=(v0(pe)?e.querySelector(pe):pe)||e.children[0];const M=v0(ge)?z.querySelectorAll(ge):ge;B=[].slice.call(M||z.children)}function A(pe,ge){const Ie=iF(e,z,B,r,i,pe,l,ge);if(pe.loop&&!Ie.slideLooper.canLoop()){const M=Object.assign({},pe,{loop:!1});return A(M,ge)}return Ie}function W(pe,ge){if(b)return;const Ie=c.find(ie=>ie.window===i),M=Ie||aF(i);Ie||c.push(M),k=f(k,pe),E=p(k),_=ge||_,T(),w=A(E,M),d([k,..._.map(({options:ie})=>ie)]).forEach(ie=>s.add(ie,"change",F)),E.active&&(w.translate.to(w.location.get()),w.eventHandler.init(K),w.resizeHandler.init(K,E.watchResize),w.slidesHandler.init(K,E.watchSlides),u.add(r,"visibilitychange",()=>{r.hidden&&M.reset()}),w.options.loop&&w.slideLooper.loop(),z.offsetParent&&B.length&&w.dragHandler.init(K,E.watchDrag),C=o.init(_,K))}function F(pe,ge){const Ie=J();L(),W(f({startIndex:Ie},pe),ge),l.emit("reInit")}function L(){w.dragHandler.destroy(),w.animation.stop(),w.eventStore.clear(),w.translate.clear(),w.slideLooper.clear(),w.resizeHandler.destroy(),w.slidesHandler.destroy(),o.destroy(),s.clear(),u.clear()}function N(){b||(b=!0,s.clear(),L(),l.emit("destroy"))}function q(pe){const ge=w[pe?"target":"location"].get(),Ie=E.loop?"removeOffset":"constrain";return w.slidesInView.check(w.limit[Ie](ge))}function Y(pe){const ge=q(pe);return w.slideIndexes.filter(Ie=>!ge.includes(Ie))}function H(pe,ge,Ie){!E.active||b||(w.scrollBody.useBaseFriction().useDuration(ge?0:E.duration),w.scrollTo.index(pe,Ie||0))}function I(pe){const ge=w.index.add(1).get();H(ge,pe===!0,-1)}function g(pe){const ge=w.index.add(-1).get();H(ge,pe===!0,1)}function P(){return w.index.add(1).get()!==J()}function V(){return w.index.add(-1).get()!==J()}function S(){return w.scrollSnaps.map(w.scrollProgress.get)}function Z(){return w.scrollProgress.get(w.location.get())}function J(){return w.index.get()}function G(){return w.indexPrevious.get()}function X(){return C}function ae(){return w}function se(){return e}function Q(){return z}function ee(){return B}const K={canScrollNext:P,canScrollPrev:V,containerNode:Q,internalEngine:ae,destroy:N,off:h,on:m,emit:y,plugins:X,previousScrollSnap:G,reInit:v,rootNode:se,scrollNext:I,scrollPrev:g,scrollProgress:Z,scrollSnapList:S,scrollTo:H,selectedScrollSnap:J,slideNodes:ee,slidesInView:q,slidesNotInView:Y};return W(t,n),setTimeout(()=>l.emit("init"),0),K}da.animationRealms=[],da.globalOptions=void 0;function Ld(e={},t=[]){const n=j.useRef(e),r=j.useRef(t),[i,a]=j.useState(),[o,s]=j.useState(),u=j.useCallback(()=>{i&&i.reInit(n.current,r.current)},[i]);return j.useEffect(()=>{if(DM()&&o){da.globalOptions=Ld.globalOptions;const l=da(o,n.current,r.current);return a(l),()=>l.destroy()}else a(void 0)},[o,a]),j.useEffect(()=>{jd(n.current,e)||(n.current=e,u())},[e,u]),j.useEffect(()=>{jM(r.current,t)||(r.current=t,u())},[t,u]),[s,i]}Ld.globalOptions=void 0;function cF({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M15.75 2.25H21a.75.75 0 0 1 .75.75v5.25a.75.75 0 0 1-1.5 0V4.81L8.03 17.03a.75.75 0 0 1-1.06-1.06L19.19 3.75h-3.44a.75.75 0 0 1 0-1.5Zm-10.5 4.5a1.5 1.5 0 0 0-1.5 1.5v10.5a1.5 1.5 0 0 0 1.5 1.5h10.5a1.5 1.5 0 0 0 1.5-1.5V10.5a.75.75 0 0 1 1.5 0v8.25a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3V8.25a3 3 0 0 1 3-3h8.25a.75.75 0 0 1 0 1.5H5.25Z",clipRule:"evenodd"}))}const fF=x.forwardRef(cF);function dF({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",clipRule:"evenodd"}))}const pF=x.forwardRef(dF);function hF({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",clipRule:"evenodd"}))}const mF=x.forwardRef(hF);function vF({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M10.5 3.75a6 6 0 0 0-5.98 6.496A5.25 5.25 0 0 0 6.75 20.25H18a4.5 4.5 0 0 0 2.206-8.423 3.75 3.75 0 0 0-4.133-4.303A6.001 6.001 0 0 0 10.5 3.75Zm2.03 5.47a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72v4.94a.75.75 0 0 0 1.5 0v-4.94l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3Z",clipRule:"evenodd"}))}const yF=x.forwardRef(vF);function gF({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5H5.625ZM7.5 15a.75.75 0 0 1 .75-.75h7.5a.75.75 0 0 1 0 1.5h-7.5A.75.75 0 0 1 7.5 15Zm.75 2.25a.75.75 0 0 0 0 1.5H12a.75.75 0 0 0 0-1.5H8.25Z",clipRule:"evenodd"}),x.createElement("path",{d:"M12.971 1.816A5.23 5.23 0 0 1 14.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 0 1 3.434 1.279 9.768 9.768 0 0 0-6.963-6.963Z"}))}const bF=x.forwardRef(gF);function wF({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{d:"M1.5 8.67v8.58a3 3 0 0 0 3 3h15a3 3 0 0 0 3-3V8.67l-8.928 5.493a3 3 0 0 1-3.144 0L1.5 8.67Z"}),x.createElement("path",{d:"M22.5 6.908V6.75a3 3 0 0 0-3-3h-15a3 3 0 0 0-3 3v.158l9.714 5.978a1.5 1.5 0 0 0 1.572 0L22.5 6.908Z"}))}const xF=x.forwardRef(wF);function SF({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{d:"M21.721 12.752a9.711 9.711 0 0 0-.945-5.003 12.754 12.754 0 0 1-4.339 2.708 18.991 18.991 0 0 1-.214 4.772 17.165 17.165 0 0 0 5.498-2.477ZM14.634 15.55a17.324 17.324 0 0 0 .332-4.647c-.952.227-1.945.347-2.966.347-1.021 0-2.014-.12-2.966-.347a17.515 17.515 0 0 0 .332 4.647 17.385 17.385 0 0 0 5.268 0ZM9.772 17.119a18.963 18.963 0 0 0 4.456 0A17.182 17.182 0 0 1 12 21.724a17.18 17.18 0 0 1-2.228-4.605ZM7.777 15.23a18.87 18.87 0 0 1-.214-4.774 12.753 12.753 0 0 1-4.34-2.708 9.711 9.711 0 0 0-.944 5.004 17.165 17.165 0 0 0 5.498 2.477ZM21.356 14.752a9.765 9.765 0 0 1-7.478 6.817 18.64 18.64 0 0 0 1.988-4.718 18.627 18.627 0 0 0 5.49-2.098ZM2.644 14.752c1.682.971 3.53 1.688 5.49 2.099a18.64 18.64 0 0 0 1.988 4.718 9.765 9.765 0 0 1-7.478-6.816ZM13.878 2.43a9.755 9.755 0 0 1 6.116 3.986 11.267 11.267 0 0 1-3.746 2.504 18.63 18.63 0 0 0-2.37-6.49ZM12 2.276a17.152 17.152 0 0 1 2.805 7.121c-.897.23-1.837.353-2.805.353-.968 0-1.908-.122-2.805-.353A17.151 17.151 0 0 1 12 2.276ZM10.122 2.43a18.629 18.629 0 0 0-2.37 6.49 11.266 11.266 0 0 1-3.746-2.504 9.754 9.754 0 0 1 6.116-3.985Z"}))}const EF=x.forwardRef(SF);function _F({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M12 1.5a5.25 5.25 0 0 0-5.25 5.25v3a3 3 0 0 0-3 3v6.75a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3v-6.75a3 3 0 0 0-3-3v-3c0-2.9-2.35-5.25-5.25-5.25Zm3.75 8.25v-3a3.75 3.75 0 1 0-7.5 0v3h7.5Z",clipRule:"evenodd"}))}const kF=x.forwardRef(_F);function TF({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M1.5 4.5a3 3 0 0 1 3-3h1.372c.86 0 1.61.586 1.819 1.42l1.105 4.423a1.875 1.875 0 0 1-.694 1.955l-1.293.97c-.135.101-.164.249-.126.352a11.285 11.285 0 0 0 6.697 6.697c.103.038.25.009.352-.126l.97-1.293a1.875 1.875 0 0 1 1.955-.694l4.423 1.105c.834.209 1.42.959 1.42 1.82V19.5a3 3 0 0 1-3 3h-2.25C8.552 22.5 1.5 15.448 1.5 6.75V4.5Z",clipRule:"evenodd"}))}const OF=x.forwardRef(TF);function CF({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M12 3.75a.75.75 0 0 1 .75.75v6.75h6.75a.75.75 0 0 1 0 1.5h-6.75v6.75a.75.75 0 0 1-1.5 0v-6.75H4.5a.75.75 0 0 1 0-1.5h6.75V4.5a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"}))}const $F=x.forwardRef(CF),S0=j.forwardRef(({blocks:e,direction:t,sender:n,timestamp:r,metadata:i,sendMessage:a,messageId:o,isReadOnly:s},u)=>{const[l,c]=Ld({skipSnaps:!0,loop:!0}),[f,p]=j.useState(!0),[d,m]=j.useState(!0),h=j.useCallback(()=>c==null?void 0:c.scrollPrev(),[c]),y=j.useCallback(()=>c==null?void 0:c.scrollNext(),[c]),{message:{blocks:{carousel:v}}}=st,b=j.useCallback(w=>{p(!w.canScrollPrev()),m(!w.canScrollNext())},[]);return j.useEffect(()=>{c&&(b(c),c.on("reInit",b),c.on("select",b))},[c,b]),$.jsxs("div",{...v==null?void 0:v.container,"data-container":"carousel",ref:l,children:[$.jsx("div",{ref:u,...v==null?void 0:v.slidesContainer,children:e.map((w,k)=>$.jsx(xa,{block:{...w,direction:t,timestamp:r,sender:n,messageId:o,sendMessage:a,isReadOnly:s},direction:t,sender:n,timestamp:r,metadata:i,sendMessage:a,messageId:o,isReadOnly:s},k))}),e.length>1&&$.jsxs($.Fragment,{children:[$.jsx(pF,{...v==null?void 0:v.backButton,"data-disabled":f?"":void 0,onClick:h}),$.jsx(mF,{...v==null?void 0:v.nextButton,"data-disabled":d?"":void 0,onClick:y})]})]})});S0.displayName="Carousel";const E0=Math.floor;function _0(e){return k0(e)?(e.nodeName||"").toLowerCase():"#document"}function Vo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function IF(e){var t;return(t=(k0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function k0(e){return e instanceof Node||e instanceof Vo(e).Node}function Nn(e){return e instanceof Element||e instanceof Vo(e).Element}function pa(e){return e instanceof HTMLElement||e instanceof Vo(e).HTMLElement}function Bd(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Vo(e).ShadowRoot}function RF(e){return["html","body","#document"].includes(_0(e))}function AF(e){return Vo(e).getComputedStyle(e)}function PF(e){if(_0(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Bd(e)&&e.host||IF(e);return Bd(t)?t.host:t}function ei(e){let t=e.activeElement;for(;((n=t)==null||(r=n.shadowRoot)==null?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}function yn(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Bd(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function T0(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function DF(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function O0(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(T0())||t.test(DF()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function C0(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function $0(){return/apple/i.test(navigator.vendor)}function jF(){return T0().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function I0(e,t){return["mouse","pen"].includes(e)}function NF(e){return"nativeEvent"in e}function MF(e){return e.matches("html,body")}function Vn(e){return(e==null?void 0:e.ownerDocument)||document}function Ud(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function R0(e){return"composedPath"in e?e.composedPath()[0]:e.target}const FF="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function A0(e){return pa(e)&&e.matches(FF)}function Jt(e){e.preventDefault(),e.stopPropagation()}const ha=Math.min,_n=Math.max,Ql=Math.round,eu=Math.floor,ti=e=>({x:e,y:e});function P0(e,t,n){return _n(e,ha(t,n))}function tu(e,t){return typeof e=="function"?e(t):e}function Ho(e){return e.split("-")[0]}function zd(e){return e.split("-")[1]}function D0(e){return e==="x"?"y":"x"}function LF(e){return e==="y"?"height":"width"}function Zo(e){return["top","bottom"].includes(Ho(e))?"y":"x"}function BF(e){return D0(Zo(e))}function UF(e){return{top:0,right:0,bottom:0,left:0,...e}}function zF(e){return typeof e!="number"?UF(e):{top:e,right:e,bottom:e,left:e}}function nu(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function j0(e,t,n){let{reference:r,floating:i}=e;const a=Zo(t),o=BF(t),s=LF(o),u=Ho(t),l=a==="y",c=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,p=r[s]/2-i[s]/2;let d;switch(u){case"top":d={x:c,y:r.y-i.height};break;case"bottom":d={x:c,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-i.width,y:f};break;default:d={x:r.x,y:r.y}}switch(zd(t)){case"start":d[o]-=p*(n&&l?-1:1);break;case"end":d[o]+=p*(n&&l?-1:1);break}return d}const qF=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,s=a.filter(Boolean),u=await(o.isRTL==null?void 0:o.isRTL(t));let l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:f}=j0(l,r,u),p=r,d={},m=0;for(let h=0;h<s.length;h++){const{name:y,fn:v}=s[h],{x:b,y:w,data:k,reset:E}=await v({x:c,y:f,initialPlacement:r,placement:p,strategy:i,middlewareData:d,rects:l,platform:o,elements:{reference:e,floating:t}});c=b??c,f=w??f,d={...d,[y]:{...d[y],...k}},E&&m<=50&&(m++,typeof E=="object"&&(E.placement&&(p=E.placement),E.rects&&(l=E.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):E.rects),{x:c,y:f}=j0(l,p,u)),h=-1)}return{x:c,y:f,placement:p,strategy:i,middlewareData:d}};async function N0(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:o,elements:s,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:p=!1,padding:d=0}=tu(t,e),m=zF(d),y=s[p?f==="floating"?"reference":"floating":f],v=nu(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(y)))==null||n?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:c,strategy:u})),b=f==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),k=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},E=nu(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:w,strategy:u}):b);return{top:(v.top-E.top+m.top)/k.y,bottom:(E.bottom-v.bottom+m.bottom)/k.y,left:(v.left-E.left+m.left)/k.x,right:(E.right-v.right+m.right)/k.x}}async function WF(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Ho(n),s=zd(n),u=Zo(n)==="y",l=["left","top"].includes(o)?-1:1,c=a&&u?-1:1,f=tu(t,e);let{mainAxis:p,crossAxis:d,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof m=="number"&&(d=s==="end"?m*-1:m),u?{x:d*c,y:p*l}:{x:p*l,y:d*c}}const VF=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:s}=t,u=await WF(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:a+u.y,data:{...u,placement:o}}}}},HF=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:y=>{let{x:v,y:b}=y;return{x:v,y:b}}},...u}=tu(e,t),l={x:n,y:r},c=await N0(t,u),f=Zo(Ho(i)),p=D0(f);let d=l[p],m=l[f];if(a){const y=p==="y"?"top":"left",v=p==="y"?"bottom":"right",b=d+c[y],w=d-c[v];d=P0(b,d,w)}if(o){const y=f==="y"?"top":"left",v=f==="y"?"bottom":"right",b=m+c[y],w=m-c[v];m=P0(b,m,w)}const h=s.fn({...t,[p]:d,[f]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[p]:a,[f]:o}}}}}},ZF=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:o,elements:s}=t,{apply:u=()=>{},...l}=tu(e,t),c=await N0(t,l),f=Ho(i),p=zd(i),d=Zo(i)==="y",{width:m,height:h}=a.floating;let y,v;f==="top"||f==="bottom"?(y=f,v=p===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(v=f,y=p==="end"?"top":"bottom");const b=h-c.top-c.bottom,w=m-c.left-c.right,k=ha(h-c[y],b),E=ha(m-c[v],w),_=!t.middlewareData.shift;let C=k,z=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(z=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=b),_&&!p){const T=_n(c.left,0),A=_n(c.right,0),W=_n(c.top,0),F=_n(c.bottom,0);d?z=m-2*(T!==0||A!==0?T+A:_n(c.left,c.right)):C=h-2*(W!==0||F!==0?W+F:_n(c.top,c.bottom))}await u({...t,availableWidth:z,availableHeight:C});const B=await o.getDimensions(s.floating);return m!==B.width||h!==B.height?{reset:{rects:!0}}:{}}}};function ru(){return typeof window<"u"}function ma(e){return M0(e)?(e.nodeName||"").toLowerCase():"#document"}function kn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function cr(e){var t;return(t=(M0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function M0(e){return ru()?e instanceof Node||e instanceof kn(e).Node:!1}function Hn(e){return ru()?e instanceof Element||e instanceof kn(e).Element:!1}function fr(e){return ru()?e instanceof HTMLElement||e instanceof kn(e).HTMLElement:!1}function F0(e){return!ru()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof kn(e).ShadowRoot}function Ko(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Zn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function KF(e){return["table","td","th"].includes(ma(e))}function iu(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function qd(e){const t=Wd(),n=Hn(e)?Zn(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function GF(e){let t=ni(e);for(;fr(t)&&!va(t);){if(qd(t))return t;if(iu(t))return null;t=ni(t)}return null}function Wd(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function va(e){return["html","body","#document"].includes(ma(e))}function Zn(e){return kn(e).getComputedStyle(e)}function au(e){return Hn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ni(e){if(ma(e)==="html")return e;const t=e.assignedSlot||e.parentNode||F0(e)&&e.host||cr(e);return F0(t)?t.host:t}function L0(e){const t=ni(e);return va(t)?e.ownerDocument?e.ownerDocument.body:e.body:fr(t)&&Ko(t)?t:L0(t)}function ri(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=L0(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=kn(i);if(a){const s=Vd(o);return t.concat(o,o.visualViewport||[],Ko(i)?i:[],s&&n?ri(s):[])}return t.concat(i,ri(i,[],n))}function Vd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function B0(e){const t=Zn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=fr(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Ql(n)!==a||Ql(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Hd(e){return Hn(e)?e:e.contextElement}function ya(e){const t=Hd(e);if(!fr(t))return ti(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=B0(t);let o=(a?Ql(n.width):n.width)/r,s=(a?Ql(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const YF=ti(0);function U0(e){const t=kn(e);return!Wd()||!t.visualViewport?YF:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function JF(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==kn(e)?!1:t}function Ai(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=Hd(e);let o=ti(1);t&&(r?Hn(r)&&(o=ya(r)):o=ya(e));const s=JF(a,n,r)?U0(a):ti(0);let u=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,c=i.width/o.x,f=i.height/o.y;if(a){const p=kn(a),d=r&&Hn(r)?kn(r):r;let m=p,h=Vd(m);for(;h&&r&&d!==m;){const y=ya(h),v=h.getBoundingClientRect(),b=Zn(h),w=v.left+(h.clientLeft+parseFloat(b.paddingLeft))*y.x,k=v.top+(h.clientTop+parseFloat(b.paddingTop))*y.y;u*=y.x,l*=y.y,c*=y.x,f*=y.y,u+=w,l+=k,m=kn(h),h=Vd(m)}}return nu({width:c,height:f,x:u,y:l})}function XF(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",o=cr(r),s=t?iu(t.floating):!1;if(r===o||s&&a)return n;let u={scrollLeft:0,scrollTop:0},l=ti(1);const c=ti(0),f=fr(r);if((f||!f&&!a)&&((ma(r)!=="body"||Ko(o))&&(u=au(r)),fr(r))){const p=Ai(r);l=ya(r),c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+c.x,y:n.y*l.y-u.scrollTop*l.y+c.y}}function QF(e){return Array.from(e.getClientRects())}function Zd(e,t){const n=au(e).scrollLeft;return t?t.left+n:Ai(cr(e)).left+n}function eL(e){const t=cr(e),n=au(e),r=e.ownerDocument.body,i=_n(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=_n(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Zd(e);const s=-n.scrollTop;return Zn(r).direction==="rtl"&&(o+=_n(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function tL(e,t){const n=kn(e),r=cr(e),i=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,s=0,u=0;if(i){a=i.width,o=i.height;const l=Wd();(!l||l&&t==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}return{width:a,height:o,x:s,y:u}}function nL(e,t){const n=Ai(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=fr(e)?ya(e):ti(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,u=i*a.x,l=r*a.y;return{width:o,height:s,x:u,y:l}}function z0(e,t,n){let r;if(t==="viewport")r=tL(e,n);else if(t==="document")r=eL(cr(e));else if(Hn(t))r=nL(t,n);else{const i=U0(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return nu(r)}function q0(e,t){const n=ni(e);return n===t||!Hn(n)||va(n)?!1:Zn(n).position==="fixed"||q0(n,t)}function rL(e,t){const n=t.get(e);if(n)return n;let r=ri(e,[],!1).filter(s=>Hn(s)&&ma(s)!=="body"),i=null;const a=Zn(e).position==="fixed";let o=a?ni(e):e;for(;Hn(o)&&!va(o);){const s=Zn(o),u=qd(o);!u&&s.position==="fixed"&&(i=null),(a?!u&&!i:!u&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Ko(o)&&!u&&q0(e,o))?r=r.filter(c=>c!==o):i=s,o=ni(o)}return t.set(e,r),r}function iL(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?iu(t)?[]:rL(t,this._c):[].concat(n),r],s=o[0],u=o.reduce((l,c)=>{const f=z0(t,c,i);return l.top=_n(f.top,l.top),l.right=ha(f.right,l.right),l.bottom=ha(f.bottom,l.bottom),l.left=_n(f.left,l.left),l},z0(t,s,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function aL(e){const{width:t,height:n}=B0(e);return{width:t,height:n}}function oL(e,t,n){const r=fr(t),i=cr(t),a=n==="fixed",o=Ai(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const u=ti(0);if(r||!r&&!a)if((ma(t)!=="body"||Ko(i))&&(s=au(t)),r){const d=Ai(t,!0,a,t);u.x=d.x+t.clientLeft,u.y=d.y+t.clientTop}else i&&(u.x=Zd(i));let l=0,c=0;if(i&&!r&&!a){const d=i.getBoundingClientRect();c=d.top+s.scrollTop,l=d.left+s.scrollLeft-Zd(i,d)}const f=o.left+s.scrollLeft-u.x-l,p=o.top+s.scrollTop-u.y-c;return{x:f,y:p,width:o.width,height:o.height}}function Kd(e){return Zn(e).position==="static"}function W0(e,t){if(!fr(e)||Zn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return cr(e)===n&&(n=n.ownerDocument.body),n}function V0(e,t){const n=kn(e);if(iu(e))return n;if(!fr(e)){let i=ni(e);for(;i&&!va(i);){if(Hn(i)&&!Kd(i))return i;i=ni(i)}return n}let r=W0(e,t);for(;r&&KF(r)&&Kd(r);)r=W0(r,t);return r&&va(r)&&Kd(r)&&!qd(r)?n:r||GF(e)||n}const sL=async function(e){const t=this.getOffsetParent||V0,n=this.getDimensions,r=await n(e.floating);return{reference:oL(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function lL(e){return Zn(e).direction==="rtl"}const uL={convertOffsetParentRelativeRectToViewportRelativeRect:XF,getDocumentElement:cr,getClippingRect:iL,getOffsetParent:V0,getElementRects:sL,getClientRects:QF,getDimensions:aL,getScale:ya,isElement:Hn,isRTL:lL};function cL(e,t){let n=null,r;const i=cr(e);function a(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function o(s,u){s===void 0&&(s=!1),u===void 0&&(u=1),a();const{left:l,top:c,width:f,height:p}=e.getBoundingClientRect();if(s||t(),!f||!p)return;const d=eu(c),m=eu(i.clientWidth-(l+f)),h=eu(i.clientHeight-(c+p)),y=eu(l),b={rootMargin:-d+"px "+-m+"px "+-h+"px "+-y+"px",threshold:_n(0,ha(1,u))||1};let w=!0;function k(E){const _=E[0].intersectionRatio;if(_!==u){if(!w)return o();_?o(!1,_):r=setTimeout(()=>{o(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(k,{...b,root:i.ownerDocument})}catch{n=new IntersectionObserver(k,b)}n.observe(e)}return o(!0),a}function fL(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=Hd(e),c=i||a?[...l?ri(l):[],...ri(t)]:[];c.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),a&&v.addEventListener("resize",n)});const f=l&&s?cL(l,n):null;let p=-1,d=null;o&&(d=new ResizeObserver(v=>{let[b]=v;b&&b.target===l&&d&&(d.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=d)==null||w.observe(t)})),n()}),l&&!u&&d.observe(l),d.observe(t));let m,h=u?Ai(e):null;u&&y();function y(){const v=Ai(e);h&&(v.x!==h.x||v.y!==h.y||v.width!==h.width||v.height!==h.height)&&n(),h=v,m=requestAnimationFrame(y)}return n(),()=>{var v;c.forEach(b=>{i&&b.removeEventListener("scroll",n),a&&b.removeEventListener("resize",n)}),f==null||f(),(v=d)==null||v.disconnect(),d=null,u&&cancelAnimationFrame(m)}}const dL=VF,pL=HF,hL=ZF,mL=(e,t,n)=>{const r=new Map,i={platform:uL,...n},a={...i.platform,_c:r};return qF(e,t,{...i,platform:a})};var ou=typeof document<"u"?j.useLayoutEffect:j.useEffect;function su(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!su(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!su(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function H0(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Z0(e,t){const n=H0(e);return Math.round(t*n)/n}function Gd(e){const t=x.useRef(e);return ou(()=>{t.current=e}),t}function vL(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:u,open:l}=e,[c,f]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,d]=x.useState(r);su(p,r)||d(r);const[m,h]=x.useState(null),[y,v]=x.useState(null),b=x.useCallback(H=>{H!==_.current&&(_.current=H,h(H))},[]),w=x.useCallback(H=>{H!==C.current&&(C.current=H,v(H))},[]),k=a||m,E=o||y,_=x.useRef(null),C=x.useRef(null),z=x.useRef(c),B=u!=null,T=Gd(u),A=Gd(i),W=Gd(l),F=x.useCallback(()=>{if(!_.current||!C.current)return;const H={placement:t,strategy:n,middleware:p};A.current&&(H.platform=A.current),mL(_.current,C.current,H).then(I=>{const g={...I,isPositioned:W.current!==!1};L.current&&!su(z.current,g)&&(z.current=g,Uy.flushSync(()=>{f(g)}))})},[p,t,n,A,W]);ou(()=>{l===!1&&z.current.isPositioned&&(z.current.isPositioned=!1,f(H=>({...H,isPositioned:!1})))},[l]);const L=x.useRef(!1);ou(()=>(L.current=!0,()=>{L.current=!1}),[]),ou(()=>{if(k&&(_.current=k),E&&(C.current=E),k&&E){if(T.current)return T.current(k,E,F);F()}},[k,E,F,T,B]);const N=x.useMemo(()=>({reference:_,floating:C,setReference:b,setFloating:w}),[b,w]),q=x.useMemo(()=>({reference:k,floating:E}),[k,E]),Y=x.useMemo(()=>{const H={position:n,left:0,top:0};if(!q.floating)return H;const I=Z0(q.floating,c.x),g=Z0(q.floating,c.y);return s?{...H,transform:"translate("+I+"px, "+g+"px)",...H0(q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:I,top:g}},[n,s,q.floating,c.x,c.y]);return x.useMemo(()=>({...c,update:F,refs:N,elements:q,floatingStyles:Y}),[c,F,N,q,Y])}const yL=(e,t)=>({...dL(e),options:[e,t]}),gL=(e,t)=>({...pL(e),options:[e,t]}),bL=(e,t)=>({...hL(e),options:[e,t]});/*!
93
+ `);const b=v.state[s];if(b==null)return;JSON.stringify(i.getState())!==JSON.stringify(b)&&p(b);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(v)});case"DISPATCH":switch(h.payload.type){case"RESET":return p(m),s===void 0?c==null?void 0:c.init(i.getState()):c==null?void 0:c.init(du(u.name));case"COMMIT":if(s===void 0){c==null||c.init(i.getState());return}return c==null?void 0:c.init(du(u.name));case"ROLLBACK":return ep(h.state,v=>{if(s===void 0){p(v),c==null||c.init(i.getState());return}p(v[s]),c==null||c.init(du(u.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return ep(h.state,v=>{if(s===void 0){p(v);return}JSON.stringify(i.getState())!==JSON.stringify(v[s])&&p(v[s])});case"IMPORT_STATE":{const{nextLiftedState:v}=h.payload,b=(y=v.computedStates.slice(-1)[0])==null?void 0:y.state;if(!b)return;p(s===void 0?b:b[s]),c==null||c.send(null,v);return}case"PAUSE_RECORDING":return d=!d}return}}),m},ep=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)};function C0(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var a;const o=u=>u===null?null:JSON.parse(u,void 0),s=(a=n.getItem(i))!=null?a:null;return s instanceof Promise?s.then(o):o(s)},setItem:(i,a)=>n.setItem(i,JSON.stringify(a,void 0)),removeItem:i=>n.removeItem(i)}}const ts=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return ts(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return ts(r)(n)}}}},nF=(e,t)=>(n,r,i)=>{let a={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:y=>y,version:0,merge:(y,v)=>({...v,...y}),...t},o=!1;const s=new Set,u=new Set;let l;try{l=a.getStorage()}catch{}if(!l)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...y)},r,i);const c=ts(a.serialize),f=()=>{const y=a.partialize({...r()});let v;const b=c({state:y,version:a.version}).then(w=>l.setItem(a.name,w)).catch(w=>{v=w});if(v)throw v;return b},d=i.setState;i.setState=(y,v)=>{d(y,v),f()};const p=e((...y)=>{n(...y),f()},r,i);let m;const h=()=>{var y;if(!l)return;o=!1,s.forEach(b=>b(r()));const v=((y=a.onRehydrateStorage)==null?void 0:y.call(a,r()))||void 0;return ts(l.getItem.bind(l))(a.name).then(b=>{if(b)return a.deserialize(b)}).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==a.version){if(a.migrate)return a.migrate(b.state,b.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return b.state}).then(b=>{var w;return m=a.merge(b,(w=r())!=null?w:p),n(m,!0),f()}).then(()=>{v==null||v(m,void 0),o=!0,u.forEach(b=>b(m))}).catch(b=>{v==null||v(void 0,b)})};return i.persist={setOptions:y=>{a={...a,...y},y.getStorage&&(l=y.getStorage())},clearStorage:()=>{l==null||l.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>o,onHydrate:y=>(s.add(y),()=>{s.delete(y)}),onFinishHydration:y=>(u.add(y),()=>{u.delete(y)})},h(),m||p},rF=(e,t)=>(n,r,i)=>{let a={storage:C0(()=>localStorage),partialize:h=>h,version:0,merge:(h,y)=>({...y,...h}),...t},o=!1;const s=new Set,u=new Set;let l=a.storage;if(!l)return e((...h)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...h)},r,i);const c=()=>{const h=a.partialize({...r()});return l.setItem(a.name,{state:h,version:a.version})},f=i.setState;i.setState=(h,y)=>{f(h,y),c()};const d=e((...h)=>{n(...h),c()},r,i);i.getInitialState=()=>d;let p;const m=()=>{var h,y;if(!l)return;o=!1,s.forEach(b=>{var w;return b((w=r())!=null?w:d)});const v=((y=a.onRehydrateStorage)==null?void 0:y.call(a,(h=r())!=null?h:d))||void 0;return ts(l.getItem.bind(l))(a.name).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==a.version){if(a.migrate)return[!0,a.migrate(b.state,b.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,b.state];return[!1,void 0]}).then(b=>{var w;const[T,E]=b;if(p=a.merge(E,(w=r())!=null?w:d),n(p,!0),T)return c()}).then(()=>{v==null||v(p,void 0),p=r(),o=!0,u.forEach(b=>b(p))}).catch(b=>{v==null||v(void 0,b)})};return i.persist={setOptions:h=>{a={...a,...h},h.storage&&(l=h.storage)},clearStorage:()=>{l==null||l.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>m(),hasHydrated:()=>o,onHydrate:h=>(s.add(h),()=>{s.delete(h)}),onFinishHydration:h=>(u.add(h),()=>{u.delete(h)})},a.skipHydration||m(),p||d},O0=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((fu?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),nF(e,t)):rF(e,t),$0=xa()(pu(O0(e=>({messageHistory:[],addMessageToHistory:t=>e(n=>({...n,messageHistory:[t,...(n.messageHistory??[]).slice(0,100)]}))}),{name:"botpress-message-history"})));function li(e){const{metadata:t,conversationId:n,userId:r}=e,{payload:i,disableInput:a}=tp(e.payload);return{id:e.id,conversationId:n,authorId:r,timestamp:new Date(e.createdAt),block:i,disableInput:a,metadata:t}}const tp=e=>{switch(e.type){case"audio":return I0(e);case"card":return iF(e);case"carousel":return aF(e);case"choice":return oF(e);case"dropdown":return sF(e);case"file":return R0(e);case"image":return A0(e);case"location":return P0(e);case"markdown":return D0(e);case"text":return j0(e);case"video":return N0(e);case"bloc":return lF(e);case"custom":return{payload:e};case"reaction":return{payload:{type:"text",text:"Unsupported message type"}};default:{const t=e;throw new Error(`Unsuported message type ${t}`)}}},ns=e=>({block:e,type:"bubble"}),I0=e=>({payload:{type:"audio",url:e.audioUrl}}),iF=e=>({payload:ns(M0(e))}),aF=e=>({payload:{type:"carousel",blocks:e.items.map(t=>M0({type:"card",...t}))}}),oF=e=>{const t=e.options.map(a=>({title:a.label,value:a.value})),n=e.text,r=Wg(),i=ns({type:"text",text:n});return t.length===0?{disableInput:e.disableFreeText,payload:i}:{disableInput:e.disableFreeText,payload:{type:"column",blocks:[i,{type:"row",blocks:t.map(({title:a,value:o})=>({type:"button",variant:"action",text:a,buttonValue:o,groupId:r}))}]}}},sF=e=>{const t=e.options.map(i=>({label:i.label,value:i.value})),n=e.text,r=[{type:"dropdown",label:n??"Select an option",options:t}];return n&&r.unshift({type:"text",text:n}),{disableInput:!0,payload:ns({type:"column",blocks:r})}},R0=e=>({payload:{type:"file",url:e.fileUrl,title:e.title}}),A0=e=>({payload:{type:"image",url:e.imageUrl}}),P0=e=>({payload:{type:"location",latitude:e.latitude,longitude:e.longitude,title:e.title??e.address??"View on map"}}),D0=e=>({payload:ns({type:"text",text:e.markdown})}),j0=e=>({payload:ns({type:"text",text:e.text,value:e.value})}),N0=e=>({payload:{type:"video",url:e.videoUrl}}),lF=e=>({payload:{type:"column",blocks:e.items.map(n=>{switch(n.type){case"audio":return I0({...n.payload,type:n.type}).payload;case"file":return R0({...n.payload,type:n.type}).payload;case"image":return A0({...n.payload,type:n.type}).payload;case"location":return P0({...n.payload,type:n.type}).payload;case"markdown":return D0({...n.payload,type:n.type}).payload;case"text":return j0({...n.payload,type:n.type}).payload;case"video":return N0({...n.payload,type:n.type}).payload;default:throw new Error("Unsuported message type")}})}}),M0=e=>{const t=e.title,n=e.subtitle,r=e.imageUrl,i=e.actions.map(o=>{switch(o.action){case"postback":return{type:"button",variant:"action",text:o.label,buttonValue:o.value,reusable:!0};case"url":return{type:"button",variant:"link",text:o.label,buttonValue:o.value,reusable:!0};case"say":return{type:"button",variant:"action",text:o.label,buttonValue:o.value,reusable:!0};default:throw new Error(`Unknown action type ${o.action}`)}}),a=[];return r&&a.push({type:"image",url:r}),t&&a.push({type:"text",text:`## ${t}`}),n&&a.push({type:"text",text:n}),i.length>0&&a.push({type:"row",blocks:i}),{type:"column",horizontalAlignment:"center",blocks:[...a]}};function np(e){const{metadata:t,conversationId:n,userId:r}=e;return e.payload.type==="reaction"?{id:e.id,conversationId:n,authorId:r,timestamp:new Date(e.createdAt),block:{type:"text",text:e.payload.reaction},metadata:t}:li(e)}const yr=xa()(pu(e=>({messages:[],isFetching:!1,setMessages:t=>e({messages:t}),addMessage:t=>e(({messages:n})=>{var i;const r=(i=t.metadata)==null?void 0:i.clientMessageId;if(r){const a=n.findIndex(o=>{var s;return((s=o.metadata)==null?void 0:s.clientMessageId)===r});if(a!==-1)return{messages:[...n.slice(0,a),t,...n.slice(a+1)]}}return{messages:[...n.filter(a=>a.id!==t.id),t]}}),updateMessage:(t,n)=>e(({messages:r})=>({messages:r.map(i=>i.id===t?{...i,...n}:i)})),clearMessages:()=>e({messages:[]}),fetchMessages:async({client:t,conversationId:n})=>{const r=[];e({isFetching:!0});let i;do{const{messages:a,meta:o}=await t.listConversationMessages({conversationId:n,nextToken:i});r.push(...a),i=o.nextToken}while(i);return e({isFetching:!1}),r.reverse().map(np).filter(Boolean)},fetchMessagesLegacy:async({client:t,userKey:n,conversationId:r})=>{const i=[];e({isFetching:!0});let a;do{const o=await t.listConversationMessages({id:r,"x-user-key":n,nextToken:a});i.push(...o.messages),a=o.meta.nextToken}while(a);return e({isFetching:!1}),i.reverse()}}),{name:"messagesStore"})),uF=(e,t)=>xa()(pu(O0(n=>({setUser:r=>n(i=>({...i,user:r})),setConversationId:r=>n(i=>({...i,conversationId:r})),clearAll:()=>{n(r=>({...r,messageHistory:{},user:void 0,conversationId:void 0}))}}),{name:e,storage:C0(()=>t==="sessionStorage"?sessionStorage:localStorage)}))),To=class To{constructor(){}static getInstance(t="bp-webchat",n){return To._instances[t]||(To._instances[t]=uF(t,n)),To._instances[t]}};_e(To,"_instances",{});let rp=To;const ip=rp.getInstance,hu=xa()(pu(e=>({eventEmitter:aR,messageContainerRef:{current:null},setMessageContainerRef:t=>e({messageContainerRef:t})}),{name:"webchatStore"})),cF=8,rs=xa()((e,t)=>({files:[],setFiles:n=>e({files:n}),upsertFile:n=>e(({files:r})=>({files:r.some(o=>o.name===n.name)?r.map(o=>o.name===n.name?{...o,...n}:o):[...r,{...n}]})),uploadFile:async(n,r)=>{const i=t().files.some(o=>o.name===n.name),a=t().files.length===cF;if(!(!i&&a)){t().upsertFile({name:n.name,type:"file",instance:n,status:"loading"});try{const{fileUrl:o,type:s}=await r(n);t().upsertFile({name:n.name,type:s,url:o,instance:n,status:"uploaded"})}catch(o){console.error("Error sending file:",o),t().upsertFile({name:n.name,type:"file",instance:n,status:"error"})}}},deleteFile:n=>e(({files:r})=>({files:r.filter(i=>i.name!=n)}))})),fF=({text:e,buttonValue:t,variant:n,groupId:r,reusable:i,sendMessage:a,isReadOnly:o,...s})=>{const u=hu(w=>w.eventEmitter),[l,c]=j.useState(!1),[f,d]=j.useState(!1),[p,m]=j.useState(!1),{message:{blocks:{button:h}}}=lt;j.useEffect(()=>{if(r)return u.on(`button-group-${r}-click`,()=>{d(!0),i||m(!0)})},[u,r,i]);const v={...s,onClick:w=>{if((p||o)&&n==="link"){w.preventDefault();return}c(!0),i||m(!0),r&&u.emit(`button-group-${r}-click`),n!=="link"&&a&&(a==null||a({type:"text",text:e,value:t}))},"data-activated":l?"":void 0,"data-group-activated":f?"":void 0,"data-type":n,...h},b=p||o;return n==="link"?$.jsx("a",{...v,style:o?{pointerEvents:"none"}:void 0,href:t,target:"_blank",rel:"noopener noreferrer",children:e}):$.jsx("button",{...v,style:o?{pointerEvents:"none"}:void 0,disabled:b,children:e})},F0=j.forwardRef(({block:e,direction:t,timestamp:n,sender:r,metadata:i,sendMessage:a,messageId:o,isReadOnly:s,...u},l)=>{const{message:{blocks:{bubble:c}}}=lt;return $.jsx("div",{"data-direction":t,...u,...c,ref:l,children:$.jsx(Pa,{block:{...e,direction:t,timestamp:n,sender:r,messageId:o,sendMessage:a,isReadOnly:s},direction:t,timestamp:n,sender:r,metadata:i,sendMessage:a,messageId:o,isReadOnly:s})})});F0.displayName="Bubble";const L0=j.createContext(null);function dF(){const e=j.useContext(L0);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const B0=j.createContext(null);function U0(){const e=j.useContext(B0);if(!e)throw new Error("useModalContext must be used within a ModalProvider");return e}var Un=function(){return Un=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Un.apply(this,arguments)};function z0(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Sa(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(c){try{l(r.next(c))}catch(f){o(f)}}function u(c){try{l(r.throw(c))}catch(f){o(f)}}function l(c){c.done?a(c.value):i(c.value).then(s,u)}l((r=r.apply(e,t||[])).next())})}function Ea(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(c){l=[6,c],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function q0(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function ap(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;function pF(){var e=j.useRef(!1),t=j.useCallback(function(){return e.current},[]);return j.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),t}function hF(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={loading:!1});var r=j.useRef(0),i=pF(),a=j.useState(n),o=a[0],s=a[1],u=j.useCallback(function(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];var f=++r.current;return o.loading||s(function(d){return Un(Un({},d),{loading:!0})}),e.apply(void 0,l).then(function(d){return i()&&f===r.current&&s({value:d,loading:!1}),d},function(d){return i()&&f===r.current&&s({error:d,loading:!1}),d})},t);return[o,u]}function mF(e,t){t===void 0&&(t=[]);var n=hF(e,t,{loading:!0}),r=n[0],i=n[1];return j.useEffect(function(){i()},[i]),r}const W0=j.forwardRef(({url:e,type:t,orientation:n="auto",...r},i)=>{const a=j.useId(),{setIsLoading:o}=dF(),[s,u]=j.useState(n),[l,c]=j.useState(!1),{message:{blocks:{image:f}}}=lt;return j.useLayoutEffect(()=>{o(d=>[...d,a])},[]),mF(async()=>{if(e){try{const{width:d,height:p}=await mA(e);s==="auto"&&u(vF(d,p))}catch(d){u("square"),console.error(d)}o(d=>d.filter(p=>p!==a))}},[e]),$.jsxs($.Fragment,{children:[l?null:$.jsx("div",{"data-orientation":s,...f.placeholder}),$.jsx("img",{"data-orientation":s,"data-loaded":l,...r,...f.image,src:e,alt:"",ref:i,loading:"lazy",onLoad:()=>{c(!0)}})]})});W0.displayName="Image";function vF(e,t){const n={square:1,portrait:.75,landscape:1.3333333333333333},r=e/t;return Object.keys(n).reduce((a,o)=>Math.abs(n[o]-r)<Math.abs(n[a]-r)?o:a)}const V0=j.forwardRef(({url:e,isReadOnly:t,...n},r)=>{const{message:{blocks:{video:i}}}=lt;return $.jsx("div",{children:$.jsx("video",{...n,"data-chromatic":"ignore",style:t?{pointerEvents:"none"}:void 0,controls:!0,src:e,...i,ref:r})})});V0.displayName="Video";const H0=j.forwardRef(({url:e,isReadOnly:t,...n},r)=>{const{message:{blocks:{audio:i}}}=lt;return $.jsx("div",{children:$.jsx("audio",{...n,controls:!0,style:t?{pointerEvents:"none"}:void 0,src:e,...i,ref:r})})});H0.displayName="Audio";function yF({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M15.312 11.424a5.5 5.5 0 0 1-9.201 2.466l-.312-.311h2.433a.75.75 0 0 0 0-1.5H3.989a.75.75 0 0 0-.75.75v4.242a.75.75 0 0 0 1.5 0v-2.43l.31.31a7 7 0 0 0 11.712-3.138.75.75 0 0 0-1.449-.39Zm1.23-3.723a.75.75 0 0 0 .219-.53V2.929a.75.75 0 0 0-1.5 0V5.36l-.31-.31A7 7 0 0 0 3.239 8.188a.75.75 0 1 0 1.448.389A5.5 5.5 0 0 1 13.89 6.11l.311.31h-2.432a.75.75 0 0 0 0 1.5h4.243a.75.75 0 0 0 .53-.219Z",clipRule:"evenodd"}))}const gF=x.forwardRef(yF);function bF({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const wF=x.forwardRef(bF);function xF({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M4.5 2A1.5 1.5 0 0 0 3 3.5v13A1.5 1.5 0 0 0 4.5 18h11a1.5 1.5 0 0 0 1.5-1.5V7.621a1.5 1.5 0 0 0-.44-1.06l-4.12-4.122A1.5 1.5 0 0 0 11.378 2H4.5Zm4.75 6.75a.75.75 0 0 1 1.5 0v2.546l.943-1.048a.75.75 0 0 1 1.114 1.004l-2.25 2.5a.75.75 0 0 1-1.114 0l-2.25-2.5a.75.75 0 1 1 1.114-1.004l.943 1.048V8.75Z",clipRule:"evenodd"}))}const SF=x.forwardRef(xF);function EF({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-8-5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0v-4.5A.75.75 0 0 1 10 5Zm0 10a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const _F=x.forwardRef(EF);function kF({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"m9.69 18.933.003.001C9.89 19.02 10 19 10 19s.11.02.308-.066l.002-.001.006-.003.018-.008a5.741 5.741 0 0 0 .281-.14c.186-.096.446-.24.757-.433.62-.384 1.445-.966 2.274-1.765C15.302 14.988 17 12.493 17 9A7 7 0 1 0 3 9c0 3.492 1.698 5.988 3.355 7.584a13.731 13.731 0 0 0 2.273 1.765 11.842 11.842 0 0 0 .976.544l.062.029.018.008.006.003ZM10 11.25a2.25 2.25 0 1 0 0-4.5 2.25 2.25 0 0 0 0 4.5Z",clipRule:"evenodd"}))}const TF=x.forwardRef(kF);function CF({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM8.28 7.22a.75.75 0 0 0-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 1 0 1.06 1.06L10 11.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L11.06 10l1.72-1.72a.75.75 0 0 0-1.06-1.06L10 8.94 8.28 7.22Z",clipRule:"evenodd"}))}const op=x.forwardRef(CF),Z0=j.forwardRef(({latitude:e,longitude:t,title:n,isReadOnly:r,...i},a)=>{const o=`https://www.google.com/maps/search/?api=1&query=${e},${t}`,{message:{blocks:{location:s}}}=lt;return $.jsxs("a",{...i,...s.container,style:r?{pointerEvents:"none"}:void 0,href:o,type:"_blank",rel:"noopener",ref:a,children:[$.jsx("p",{...s.title,children:n}),$.jsx(TF,{...s.icon})]})});Z0.displayName="Location";const K0=j.forwardRef(({blocks:e,horizontalAlignment:t,verticalAlignment:n,direction:r,sender:i,timestamp:a,metadata:o,messageId:s,sendMessage:u,isReadOnly:l,...c},f)=>{const{message:{blocks:{column:d}}}=lt;return $.jsx("div",{"data-horizontal":t,"data-vertical":n,...c,...d,ref:f,children:e.map((p,m)=>$.jsx(Pa,{block:{...p,direction:r,timestamp:a,sender:i,messageId:s,sendMessage:u,isReadOnly:l},direction:r,timestamp:a,sender:i,metadata:o,sendMessage:u,messageId:s,isReadOnly:l},m))})});K0.displayName="Column";const G0=j.forwardRef(({blocks:e,horizontalAlignment:t,verticalAlignment:n,direction:r,sender:i,timestamp:a,metadata:o,sendMessage:s,messageId:u,isReadOnly:l,...c},f)=>{const{message:{blocks:{row:d}}}=lt;return $.jsx("div",{"data-horizontal":t,"data-vertical":n,...c,...d,ref:f,children:e.map((p,m)=>$.jsx(Pa,{block:{...p,direction:r,timestamp:a,sender:i,messageId:u,sendMessage:s,isReadOnly:l},direction:r,sender:i,timestamp:a,metadata:o,sendMessage:s,messageId:u,isReadOnly:l},m))})});G0.displayName="Row";function OF(e){return Object.prototype.toString.call(e)==="[object Object]"}function Y0(e){return OF(e)||Array.isArray(e)}function $F(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function sp(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const i=JSON.stringify(Object.keys(e.breakpoints||{})),a=JSON.stringify(Object.keys(t.breakpoints||{}));return i!==a?!1:n.every(o=>{const s=e[o],u=t[o];return typeof s=="function"?`${s}`==`${u}`:!Y0(s)||!Y0(u)?s===u:sp(s,u)})}function J0(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function IF(e,t){if(e.length!==t.length)return!1;const n=J0(e),r=J0(t);return n.every((i,a)=>{const o=r[a];return sp(i,o)})}function lp(e){return typeof e=="number"}function X0(e){return typeof e=="string"}function up(e){return typeof e=="boolean"}function Q0(e){return Object.prototype.toString.call(e)==="[object Object]"}function At(e){return Math.abs(e)}function cp(e){return Math.sign(e)}function mu(e,t){return At(e-t)}function RF(e,t){if(e===0||t===0||At(e)<=At(t))return 0;const n=mu(At(e),At(t));return At(n/e)}function is(e){return yu(e).map(Number)}function qr(e){return e[vu(e)]}function vu(e){return Math.max(0,e.length-1)}function yu(e){return Object.keys(e)}function ex(e,t){return[e,t].reduce((n,r)=>(yu(r).forEach(i=>{const a=n[i],o=r[i],s=Q0(a)&&Q0(o);n[i]=s?ex(a,o):o}),n),{})}function tx(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function AF(e,t){const n={start:r,center:i,end:a};function r(){return 0}function i(l){return a(l)/2}function a(l){return t-l}function o(){return t*Number(e)}function s(l){return lp(e)?o():n[e](l)}return{measure:s}}function PF(e,t){const n=e==="y"?"y":"x",r=e==="y"?"x":"y",i=s(),a=u();function o(c){const{width:f,height:d}=c;return n==="x"?f:d}function s(){return n==="y"?"top":t==="rtl"?"right":"left"}function u(){return n==="y"?"bottom":t==="rtl"?"left":"right"}return{scroll:n,cross:r,startEdge:i,endEdge:a,measureSize:o}}function ui(e,t){const n=At(e-t);function r(l){return l<e}function i(l){return l>t}function a(l){return r(l)||i(l)}function o(l){return a(l)?r(l)?e:t:l}function s(l){return n?l-n*Math.ceil((l-t)/n):l}return{length:n,max:t,min:e,constrain:o,reachedAny:a,reachedMax:i,reachedMin:r,removeOffset:s}}function nx(e,t,n){const{constrain:r}=ui(0,e),i=e+1;let a=o(t);function o(d){return n?At((i+d)%i):r(d)}function s(){return a}function u(d){return a=o(d),f}function l(d){return c().set(s()+d)}function c(){return nx(e,s(),n)}const f={get:s,set:u,add:l,clone:c};return f}function DF(e){const t=e==="rtl"?-1:1;function n(i){return i*t}return{apply:n}}function as(){let e=[];function t(i,a,o,s={passive:!0}){return i.addEventListener(a,o,s),e.push(()=>i.removeEventListener(a,o,s)),r}function n(){e=e.filter(i=>i())}const r={add:t,clear:n};return r}function jF(e,t,n,r,i,a,o,s,u,l,c,f,d,p,m,h,y,v,b){const{cross:w}=e,T=["INPUT","SELECT","TEXTAREA"],E={passive:!1},_=as(),O=as(),z=ui(50,225).constrain(m.measure(20)),U={mouse:300,touch:400},k={mouse:500,touch:600},D=h?43:25;let W=!1,B=0,I=0,A=!1,L=!1,Z=!1,H=!1;function R(ee,G){if(!G)return;function pe(Ie){(up(G)||G(ee,Ie))&&J(Ie)}const ge=n;_.add(ge,"dragstart",Ie=>Ie.preventDefault(),E).add(ge,"touchmove",()=>{},E).add(ge,"touchend",()=>{}).add(ge,"touchstart",pe).add(ge,"mousedown",pe).add(ge,"touchcancel",Q).add(ge,"contextmenu",Q).add(ge,"click",ae,!0)}function g(){_.clear(),O.clear()}function N(){const ee=H?r:n;O.add(ee,"touchmove",Y,E).add(ee,"touchend",Q).add(ee,"mousemove",Y,E).add(ee,"mouseup",Q)}function V(ee){const G=ee.nodeName||"";return T.includes(G)}function S(){return(h?k:U)[H?"mouse":"touch"]}function K(ee,G){const pe=d.add(cp(ee)*-1),ge=f.byDistance(ee,!h).distance;return h||At(ee)<z?ge:v&&G?ge*.5:f.byIndex(pe.get(),0).distance}function J(ee){const G=tx(ee,i);H=G,!(G&&ee.button!==0)&&(V(ee.target)||(Z=h&&G&&!ee.buttons&&W,W=mu(a.get(),s.get())>=2,A=!0,o.pointerDown(ee),c.useFriction(0).useDuration(0),a.set(s),N(),B=o.readPoint(ee),I=o.readPoint(ee,w),p.emit("pointerDown")))}function Y(ee){const G=o.readPoint(ee),pe=o.readPoint(ee,w),ge=mu(G,B),Ie=mu(pe,I);if(!L&&!H&&(!ee.cancelable||(L=ge>Ie,!L)))return Q(ee);const F=o.pointerMove(ee);ge>y&&(Z=!0),c.useFriction(.3).useDuration(1),u.start(),a.add(t.apply(F)),ee.preventDefault()}function Q(ee){const pe=f.byDistance(0,!1).index!==d.get(),ge=o.pointerUp(ee)*S(),Ie=K(t.apply(ge),pe),F=RF(ge,Ie),ie=D-10*F,ce=b+F/50;L=!1,A=!1,O.clear(),c.useDuration(ie).useFriction(ce),l.distance(Ie,!h),H=!1,p.emit("pointerUp")}function ae(ee){Z&&(ee.stopPropagation(),ee.preventDefault())}function oe(){return A}return{init:R,pointerDown:oe,destroy:g}}function NF(e,t){let r,i;function a(f){return f.timeStamp}function o(f,d){const m=`client${(d||e.scroll)==="x"?"X":"Y"}`;return(tx(f,t)?f:f.touches[0])[m]}function s(f){return r=f,i=f,o(f)}function u(f){const d=o(f)-o(i),p=a(f)-a(r)>170;return i=f,p&&(r=f),d}function l(f){if(!r||!i)return 0;const d=o(i)-o(r),p=a(f)-a(r),m=a(f)-a(i)>170,h=d/p;return p&&!m&&At(h)>.1?h:0}return{pointerDown:s,pointerMove:u,pointerUp:l,readPoint:o}}function MF(e){function t(r){return e*(r/100)}return{measure:t}}function FF(e,t,n,r,i){let a,o,s=[],u=!1;function l(p){return i.measureSize(p.getBoundingClientRect())}function c(p,m){if(!m)return;o=l(e),s=r.map(l);function h(v){for(const b of v){const w=b.target===e,T=r.indexOf(b.target),E=w?o:s[T],_=l(w?e:r[T]);if(E!==_){n.requestAnimationFrame(()=>{p.reInit(),t.emit("resize")});break}}}a=new ResizeObserver(v=>{u||(up(m)||m(p,v))&&h(v)}),[e].concat(r).forEach(v=>a.observe(v))}function f(){a&&a.disconnect(),u=!0}return{init:c,destroy:f}}function LF(e,t,n,r){let i=!0,a=0,o=0,s=n,u=r,l=e.get(),c=0;function f(){const E=t.get()-e.get(),_=!s;let O=0;return _?(a=0,e.set(t),O=E):(a+=E/s,a*=u,l+=a,e.add(a),O=l-c),o=cp(O),c=l,i=At(E)<.001,T}function d(){return i}function p(){return s}function m(){return o}function h(){return a}function y(){return b(n)}function v(){return w(r)}function b(E){return s=E,T}function w(E){return u=E,T}const T={direction:m,duration:p,velocity:h,seek:f,settled:d,useBaseFriction:v,useBaseDuration:y,useFriction:w,useDuration:b};return T}function BF(e,t,n,r,i){const a=i.measure(10),o=i.measure(50),s=ui(.1,.99);let u=!1;function l(){return!(u||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function c(p){if(!l())return;const m=e.reachedMin(t.get())?"min":"max",h=At(e[m]-t.get()),y=n.get()-t.get(),v=s.constrain(h/o);n.subtract(y*v),!p&&At(y)<a&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function f(p){u=!p}return{constrain:c,toggleActive:f}}function UF(e,t,n,r){const i=ui(-t+e,n[0]),a=u(),o=l();function s(){const f=a[0],d=qr(a),p=a.lastIndexOf(f),m=a.indexOf(d)+1;return ui(p,m)}function u(){return n.map(i.constrain).map(f=>parseFloat(f.toFixed(3)))}function l(){if(t<=e)return[i.max];if(r==="keepSnaps")return a;const{min:f,max:d}=s();return a.slice(f,d)}return{snapsContained:o}}function zF(e,t,n){const r=t[0],i=n?r-e:qr(t);return{limit:ui(i,r)}}function qF(e,t,n,r){const a=t.min+.1,o=t.max+.1,{reachedMin:s,reachedMax:u}=ui(a,o);function l(d){return d===1?u(n.get()):d===-1?s(n.get()):!1}function c(d){if(!l(d))return;const p=e*(d*-1);r.forEach(m=>m.add(p))}return{loop:c}}function WF(e){const{max:t,length:n}=e;function r(a){return(a-t)/-n}return{get:r}}function VF(e,t,n,r,i,a,o){const{startEdge:s,endEdge:u}=e,{groupSlides:l}=a,c=p().map(t.measure),f=m(),d=h();function p(){return l(r).map(v=>qr(v)[u]-v[0][s]).map(At)}function m(){return r.map(v=>n[s]-v[s]).map(v=>-At(v))}function h(){const b=qr(f)-qr(i);return l(f).map(w=>w[0]).map((w,T,E)=>{const _=!T,O=T===vu(E);return o&&_?0:o&&O?b:w+c[T]})}return{snaps:f,snapsAligned:d}}function HF(e,t,n,r,i){const{reachedAny:a,removeOffset:o,constrain:s}=r;function u(m){return m.concat().sort((h,y)=>At(h)-At(y))[0]}function l(m){const h=e?o(m):s(m),y=t.map(b=>b-h).map(b=>c(b,0)).map((b,w)=>({diff:b,index:w})).sort((b,w)=>At(b.diff)-At(w.diff)),{index:v}=y[0];return{index:v,distance:h}}function c(m,h){const y=[m,m+n,m-n];if(!e)return y[0];if(!h)return u(y);const v=y.filter(b=>cp(b)===h);return u(v)}function f(m,h){const y=t[m]-i.get(),v=c(y,h);return{index:m,distance:v}}function d(m,h){const y=i.get()+m,{index:v,distance:b}=l(y),w=!e&&a(y);if(!h||w)return{index:v,distance:m};const T=t[v]-b,E=m+c(T,0);return{index:v,distance:E}}return{byDistance:d,byIndex:f,shortcut:c}}function ZF(e,t,n,r,i,a,o){function s(f){const d=f.distance,p=f.index!==t.get();a.add(d),d&&(i.duration()?e.start():(e.update(),e.render(1),e.update())),p&&(n.set(t.get()),t.set(f.index),o.emit("select"))}function u(f,d){const p=r.byDistance(f,d);s(p)}function l(f,d){const p=t.clone().set(f),m=r.byIndex(p.get(),d);s(m)}return{distance:u,index:l}}function gu(e){let t=e;function n(){return t}function r(u){t=o(u)}function i(u){t+=o(u)}function a(u){t-=o(u)}function o(u){return lp(u)?u:u.get()}return{get:n,set:r,add:i,subtract:a}}function rx(e,t,n){const r=e.scroll==="x"?o:s,i=n.style;let a=!1;function o(d){return`translate3d(${d}px,0px,0px)`}function s(d){return`translate3d(0px,${d}px,0px)`}function u(d){a||(i.transform=r(t.apply(d)))}function l(d){a=!d}function c(){a||(i.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:c,to:u,toggleActive:l}}function KF(e,t,n,r,i,a,o,s,u){const l=is(i),c=is(i).reverse(),f=h().concat(y());function d(E,_){return E.reduce((O,z)=>O-i[z],_)}function p(E,_){return E.reduce((O,z)=>d(O,_)>0?O.concat([z]):O,[])}function m(E,_){const O=_==="start",z=O?-r:r,U=o.findSlideBounds([z]);return E.map(k=>{const D=O?0:-r,W=O?r:0,I=U.filter(A=>A.index===k)[0][O?"end":"start"];return{index:k,slideLocation:gu(-1),translate:rx(e,t,u[k]),target:()=>s.get()>I?D:W}})}function h(){const E=a[0]-1,_=p(c,E);return m(_,"end")}function y(){const E=n-a[0]-1,_=p(l,E);return m(_,"start")}function v(){return f.every(({index:E})=>{const _=l.filter(O=>O!==E);return d(_,n)<=.1})}function b(){f.forEach(E=>{const{target:_,translate:O,slideLocation:z}=E,U=_();U!==z.get()&&(O.to(U),z.set(U))})}function w(){f.forEach(E=>E.translate.clear())}return{canLoop:v,clear:w,loop:b,loopPoints:f}}function GF(e,t){let n,r=!1;function i(s,u){if(!u)return;function l(c){for(const f of c)if(f.type==="childList"){s.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(c=>{r||(up(u)||u(s,c))&&l(c)}),n.observe(e,{childList:!0})}function a(){n&&n.disconnect(),r=!0}return{init:i,destroy:a}}function YF(e,t,n,r,i,a,o){const{removeOffset:s,constrain:u}=i,l=.5,c=a?[0,t,-t]:[0],f=p(c,o);function d(y){const v=y||0;return n.map(b=>ui(l,b-l).constrain(b*v))}function p(y,v){const b=y||c,w=d(v);return b.reduce((T,E)=>{const _=r.map((O,z)=>({start:O-n[z]+w[z]+E,end:O+e-w[z]+E,index:z}));return T.concat(_)},[])}function m(y,v){const b=a?s(y):u(y);return(v||f).reduce((T,E)=>{const{index:_,start:O,end:z}=E,U=T.includes(_),k=O<b&&z>b;return!U&&k?T.concat([_]):T},[])}return{check:m,findSlideBounds:p}}function JF(e,t,n,r,i,a){const{measureSize:o,startEdge:s,endEdge:u}=e,l=n[0]&&i,c=m(),f=h(),d=n.map(o),p=y();function m(){if(!l)return 0;const b=n[0];return At(t[s]-b[s])}function h(){if(!l)return 0;const b=a.getComputedStyle(qr(r));return parseFloat(b.getPropertyValue(`margin-${u}`))}function y(){return n.map((b,w,T)=>{const E=!w,_=w===vu(T);return E?d[w]+c:_?d[w]+f:T[w+1][s]-b[s]}).map(At)}return{slideSizes:d,slideSizesWithGaps:p}}function XF(e,t,n){const r=lp(n);function i(u,l){return is(u).filter(c=>c%l===0).map(c=>u.slice(c,c+l))}function a(u){return is(u).reduce((l,c)=>{const d=t.slice(qr(l),c+1).reduce((p,m)=>p+m,0);return!c||d>e?l.concat(c):l},[]).map((l,c,f)=>u.slice(l,f[c+1]))}function o(u){return r?i(u,n):a(u)}return{groupSlides:o}}function QF(e,t,n,r,i,a,o,s){const{align:u,axis:l,direction:c,startIndex:f,inViewThreshold:d,loop:p,duration:m,dragFree:h,dragThreshold:y,slidesToScroll:v,skipSnaps:b,containScroll:w}=a,T=t.getBoundingClientRect(),E=n.map(ce=>ce.getBoundingClientRect()),_=DF(c),O=PF(l,c),z=O.measureSize(T),U=MF(z),k=AF(u,z),D=!p&&!!w,W=p||!!w,{slideSizes:B,slideSizesWithGaps:I}=JF(O,T,E,n,W,i),A=XF(z,I,v),{snaps:L,snapsAligned:Z}=VF(O,k,T,E,I,A,D),H=-qr(L)+qr(I),{snapsContained:R}=UF(z,H,Z,w),g=D?R:Z,{limit:N}=zF(H,g,p),V=nx(vu(g),f,p),S=V.clone(),K=is(n),J=({dragHandler:ce,scrollBody:se,scrollBounds:Ce,eventHandler:Ee,animation:Ae,options:{loop:He}})=>{const te=ce.pointerDown();He||Ce.constrain(te);const fe=se.seek().settled();fe&&!te&&(Ae.stop(),Ee.emit("settle")),fe||Ee.emit("scroll")},Y=({scrollBody:ce,translate:se,location:Ce,offsetLocation:Ee,scrollLooper:Ae,slideLooper:He,options:{loop:te}},fe)=>{const q=ce.velocity();Ee.set(Ce.get()-q+q*fe),te&&(Ae.loop(ce.direction()),He.loop()),se.to(Ee.get())},Q={start:()=>s.start(ie),stop:()=>s.stop(ie),update:()=>J(ie),render:ce=>Y(ie,ce)},ae=.68,oe=g[V.get()],X=gu(oe),ee=gu(oe),G=gu(oe),pe=LF(X,G,m,ae),ge=HF(p,g,H,N,G),Ie=ZF(Q,V,S,ge,pe,G,o),F=YF(z,H,B,L,N,p,d),ie={ownerDocument:r,ownerWindow:i,eventHandler:o,containerRect:T,slideRects:E,animation:Q,axis:O,direction:_,dragHandler:jF(O,_,e,r,i,G,NF(O,i),X,Q,Ie,pe,ge,V,o,U,h,y,b,ae),eventStore:as(),percentOfView:U,index:V,indexPrevious:S,limit:N,location:X,offsetLocation:ee,options:a,resizeHandler:FF(t,o,i,n,O),scrollBody:pe,scrollBounds:BF(N,X,G,pe,U),scrollLooper:qF(H,N,ee,[X,ee,G]),scrollProgress:WF(N),scrollSnaps:g,scrollTarget:ge,scrollTo:Ie,slideLooper:KF(O,_,z,H,I,g,F,ee,n),slidesHandler:GF(t,o),slidesInView:F,slideIndexes:K,slidesToScroll:A,target:G,translate:rx(O,_,t)};return ie}function eL(e){const t=16.666666666666668;let n=[],r=null,i=0,a=0;function o(f){r||(r=f);const d=f-r;for(r=f,i+=d;i>=t;)n.forEach(({animation:m})=>m.update()),i-=t;const p=At(i/t);n.forEach(({animation:m})=>m.render(p)),a&&e.requestAnimationFrame(o)}function s(f){n.includes(f)||n.push(f),!a&&(a=e.requestAnimationFrame(o))}function u(f){n=n.filter(d=>d!==f),!n.length&&(e.cancelAnimationFrame(a),r=null,i=0,a=0)}function l(){r=null,i=0}return{start:s,stop:u,reset:l,window:e}}function tL(){const e={};let t;function n(u){t=u}function r(u){return e[u]||[]}function i(u){return r(u).forEach(l=>l(t,u)),s}function a(u,l){return e[u]=r(u).concat([l]),s}function o(u,l){return e[u]=r(u).filter(c=>c!==l),s}const s={init:n,emit:i,off:o,on:a};return s}const nL={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,breakpoints:{},dragFree:!1,dragThreshold:10,inViewThreshold:0,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0};function rL(e){function t(a,o){return ex(a,o||{})}function n(a){const o=a.breakpoints||{},s=yu(o).filter(u=>e.matchMedia(u).matches).map(u=>o[u]).reduce((u,l)=>t(u,l),{});return t(a,s)}function r(a){return a.map(o=>yu(o.breakpoints||{})).reduce((o,s)=>o.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function iL(e){let t=[];function n(a,o){return t=a.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(o,e)),a.reduce((s,u)=>Object.assign(s,{[u.name]:u}),{})}function r(){t=t.filter(a=>a.destroy())}return{init:n,destroy:r}}function _a(e,t,n){const r=e.ownerDocument,i=r.defaultView,a=rL(i),o=iL(a),s=as(),u=as(),l=tL(),{animationRealms:c}=_a,{mergeOptions:f,optionsAtMedia:d,optionsMediaQueries:p}=a,{on:m,off:h,emit:y}=l,v=B;let b=!1,w,T=f(nL,_a.globalOptions),E=f(T),_=[],O,z,U;function k(){const{container:pe,slides:ge}=E;z=(X0(pe)?e.querySelector(pe):pe)||e.children[0];const F=X0(ge)?z.querySelectorAll(ge):ge;U=[].slice.call(F||z.children)}function D(pe,ge){const Ie=QF(e,z,U,r,i,pe,l,ge);if(pe.loop&&!Ie.slideLooper.canLoop()){const F=Object.assign({},pe,{loop:!1});return D(F,ge)}return Ie}function W(pe,ge){if(b)return;const Ie=c.find(ie=>ie.window===i),F=Ie||eL(i);Ie||c.push(F),T=f(T,pe),E=d(T),_=ge||_,k(),w=D(E,F),p([T,..._.map(({options:ie})=>ie)]).forEach(ie=>s.add(ie,"change",B)),E.active&&(w.translate.to(w.location.get()),w.eventHandler.init(G),w.resizeHandler.init(G,E.watchResize),w.slidesHandler.init(G,E.watchSlides),u.add(r,"visibilitychange",()=>{r.hidden&&F.reset()}),w.options.loop&&w.slideLooper.loop(),z.offsetParent&&U.length&&w.dragHandler.init(G,E.watchDrag),O=o.init(_,G))}function B(pe,ge){const Ie=J();I(),W(f({startIndex:Ie},pe),ge),l.emit("reInit")}function I(){w.dragHandler.destroy(),w.animation.stop(),w.eventStore.clear(),w.translate.clear(),w.slideLooper.clear(),w.resizeHandler.destroy(),w.slidesHandler.destroy(),o.destroy(),s.clear(),u.clear()}function A(){b||(b=!0,s.clear(),I(),l.emit("destroy"))}function L(pe){const ge=w[pe?"target":"location"].get(),Ie=E.loop?"removeOffset":"constrain";return w.slidesInView.check(w.limit[Ie](ge))}function Z(pe){const ge=L(pe);return w.slideIndexes.filter(Ie=>!ge.includes(Ie))}function H(pe,ge,Ie){!E.active||b||(w.scrollBody.useBaseFriction().useDuration(ge?0:E.duration),w.scrollTo.index(pe,Ie||0))}function R(pe){const ge=w.index.add(1).get();H(ge,pe===!0,-1)}function g(pe){const ge=w.index.add(-1).get();H(ge,pe===!0,1)}function N(){return w.index.add(1).get()!==J()}function V(){return w.index.add(-1).get()!==J()}function S(){return w.scrollSnaps.map(w.scrollProgress.get)}function K(){return w.scrollProgress.get(w.location.get())}function J(){return w.index.get()}function Y(){return w.indexPrevious.get()}function Q(){return O}function ae(){return w}function oe(){return e}function X(){return z}function ee(){return U}const G={canScrollNext:N,canScrollPrev:V,containerNode:X,internalEngine:ae,destroy:A,off:h,on:m,emit:y,plugins:Q,previousScrollSnap:Y,reInit:v,rootNode:oe,scrollNext:R,scrollPrev:g,scrollProgress:K,scrollSnapList:S,scrollTo:H,selectedScrollSnap:J,slideNodes:ee,slidesInView:L,slidesNotInView:Z};return W(t,n),setTimeout(()=>l.emit("init"),0),G}_a.animationRealms=[],_a.globalOptions=void 0;function fp(e={},t=[]){const n=j.useRef(e),r=j.useRef(t),[i,a]=j.useState(),[o,s]=j.useState(),u=j.useCallback(()=>{i&&i.reInit(n.current,r.current)},[i]);return j.useEffect(()=>{if($F()&&o){_a.globalOptions=fp.globalOptions;const l=_a(o,n.current,r.current);return a(l),()=>l.destroy()}else a(void 0)},[o,a]),j.useEffect(()=>{sp(n.current,e)||(n.current=e,u())},[e,u]),j.useEffect(()=>{IF(r.current,t)||(r.current=t,u())},[t,u]),[s,i]}fp.globalOptions=void 0;function aL({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M15.75 2.25H21a.75.75 0 0 1 .75.75v5.25a.75.75 0 0 1-1.5 0V4.81L8.03 17.03a.75.75 0 0 1-1.06-1.06L19.19 3.75h-3.44a.75.75 0 0 1 0-1.5Zm-10.5 4.5a1.5 1.5 0 0 0-1.5 1.5v10.5a1.5 1.5 0 0 0 1.5 1.5h10.5a1.5 1.5 0 0 0 1.5-1.5V10.5a.75.75 0 0 1 1.5 0v8.25a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3V8.25a3 3 0 0 1 3-3h8.25a.75.75 0 0 1 0 1.5H5.25Z",clipRule:"evenodd"}))}const oL=x.forwardRef(aL);function sL({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",clipRule:"evenodd"}))}const lL=x.forwardRef(sL);function uL({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",clipRule:"evenodd"}))}const cL=x.forwardRef(uL);function fL({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M10.5 3.75a6 6 0 0 0-5.98 6.496A5.25 5.25 0 0 0 6.75 20.25H18a4.5 4.5 0 0 0 2.206-8.423 3.75 3.75 0 0 0-4.133-4.303A6.001 6.001 0 0 0 10.5 3.75Zm2.03 5.47a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72v4.94a.75.75 0 0 0 1.5 0v-4.94l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3Z",clipRule:"evenodd"}))}const dL=x.forwardRef(fL);function pL({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5H5.625ZM7.5 15a.75.75 0 0 1 .75-.75h7.5a.75.75 0 0 1 0 1.5h-7.5A.75.75 0 0 1 7.5 15Zm.75 2.25a.75.75 0 0 0 0 1.5H12a.75.75 0 0 0 0-1.5H8.25Z",clipRule:"evenodd"}),x.createElement("path",{d:"M12.971 1.816A5.23 5.23 0 0 1 14.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 0 1 3.434 1.279 9.768 9.768 0 0 0-6.963-6.963Z"}))}const hL=x.forwardRef(pL);function mL({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{d:"M1.5 8.67v8.58a3 3 0 0 0 3 3h15a3 3 0 0 0 3-3V8.67l-8.928 5.493a3 3 0 0 1-3.144 0L1.5 8.67Z"}),x.createElement("path",{d:"M22.5 6.908V6.75a3 3 0 0 0-3-3h-15a3 3 0 0 0-3 3v.158l9.714 5.978a1.5 1.5 0 0 0 1.572 0L22.5 6.908Z"}))}const vL=x.forwardRef(mL);function yL({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{d:"M21.721 12.752a9.711 9.711 0 0 0-.945-5.003 12.754 12.754 0 0 1-4.339 2.708 18.991 18.991 0 0 1-.214 4.772 17.165 17.165 0 0 0 5.498-2.477ZM14.634 15.55a17.324 17.324 0 0 0 .332-4.647c-.952.227-1.945.347-2.966.347-1.021 0-2.014-.12-2.966-.347a17.515 17.515 0 0 0 .332 4.647 17.385 17.385 0 0 0 5.268 0ZM9.772 17.119a18.963 18.963 0 0 0 4.456 0A17.182 17.182 0 0 1 12 21.724a17.18 17.18 0 0 1-2.228-4.605ZM7.777 15.23a18.87 18.87 0 0 1-.214-4.774 12.753 12.753 0 0 1-4.34-2.708 9.711 9.711 0 0 0-.944 5.004 17.165 17.165 0 0 0 5.498 2.477ZM21.356 14.752a9.765 9.765 0 0 1-7.478 6.817 18.64 18.64 0 0 0 1.988-4.718 18.627 18.627 0 0 0 5.49-2.098ZM2.644 14.752c1.682.971 3.53 1.688 5.49 2.099a18.64 18.64 0 0 0 1.988 4.718 9.765 9.765 0 0 1-7.478-6.816ZM13.878 2.43a9.755 9.755 0 0 1 6.116 3.986 11.267 11.267 0 0 1-3.746 2.504 18.63 18.63 0 0 0-2.37-6.49ZM12 2.276a17.152 17.152 0 0 1 2.805 7.121c-.897.23-1.837.353-2.805.353-.968 0-1.908-.122-2.805-.353A17.151 17.151 0 0 1 12 2.276ZM10.122 2.43a18.629 18.629 0 0 0-2.37 6.49 11.266 11.266 0 0 1-3.746-2.504 9.754 9.754 0 0 1 6.116-3.985Z"}))}const gL=x.forwardRef(yL);function bL({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M12 1.5a5.25 5.25 0 0 0-5.25 5.25v3a3 3 0 0 0-3 3v6.75a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3v-6.75a3 3 0 0 0-3-3v-3c0-2.9-2.35-5.25-5.25-5.25Zm3.75 8.25v-3a3.75 3.75 0 1 0-7.5 0v3h7.5Z",clipRule:"evenodd"}))}const wL=x.forwardRef(bL);function xL({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M1.5 4.5a3 3 0 0 1 3-3h1.372c.86 0 1.61.586 1.819 1.42l1.105 4.423a1.875 1.875 0 0 1-.694 1.955l-1.293.97c-.135.101-.164.249-.126.352a11.285 11.285 0 0 0 6.697 6.697c.103.038.25.009.352-.126l.97-1.293a1.875 1.875 0 0 1 1.955-.694l4.423 1.105c.834.209 1.42.959 1.42 1.82V19.5a3 3 0 0 1-3 3h-2.25C8.552 22.5 1.5 15.448 1.5 6.75V4.5Z",clipRule:"evenodd"}))}const SL=x.forwardRef(xL);function EL({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M12 3.75a.75.75 0 0 1 .75.75v6.75h6.75a.75.75 0 0 1 0 1.5h-6.75v6.75a.75.75 0 0 1-1.5 0v-6.75H4.5a.75.75 0 0 1 0-1.5h6.75V4.5a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"}))}const _L=x.forwardRef(EL),ix=j.forwardRef(({blocks:e,direction:t,sender:n,timestamp:r,metadata:i,sendMessage:a,messageId:o,isReadOnly:s},u)=>{const[l,c]=fp({skipSnaps:!0,loop:!0}),[f,d]=j.useState(!0),[p,m]=j.useState(!0),h=j.useCallback(()=>c==null?void 0:c.scrollPrev(),[c]),y=j.useCallback(()=>c==null?void 0:c.scrollNext(),[c]),{message:{blocks:{carousel:v}}}=lt,b=j.useCallback(w=>{d(!w.canScrollPrev()),m(!w.canScrollNext())},[]);return j.useEffect(()=>{c&&(b(c),c.on("reInit",b),c.on("select",b))},[c,b]),$.jsxs("div",{...v==null?void 0:v.container,"data-container":"carousel",ref:l,children:[$.jsx("div",{ref:u,...v==null?void 0:v.slidesContainer,children:e.map((w,T)=>$.jsx(Pa,{block:{...w,direction:t,timestamp:r,sender:n,messageId:o,sendMessage:a,isReadOnly:s},direction:t,sender:n,timestamp:r,metadata:i,sendMessage:a,messageId:o,isReadOnly:s},T))}),e.length>1&&$.jsxs($.Fragment,{children:[$.jsx(lL,{...v==null?void 0:v.backButton,"data-disabled":f?"":void 0,onClick:h}),$.jsx(cL,{...v==null?void 0:v.nextButton,"data-disabled":p?"":void 0,onClick:y})]})]})});ix.displayName="Carousel";const ax=Math.floor;function ox(e){return sx(e)?(e.nodeName||"").toLowerCase():"#document"}function os(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function kL(e){var t;return(t=(sx(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function sx(e){return e instanceof Node||e instanceof os(e).Node}function zn(e){return e instanceof Element||e instanceof os(e).Element}function ka(e){return e instanceof HTMLElement||e instanceof os(e).HTMLElement}function dp(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof os(e).ShadowRoot}function TL(e){return["html","body","#document"].includes(ox(e))}function CL(e){return os(e).getComputedStyle(e)}function OL(e){if(ox(e)==="html")return e;const t=e.assignedSlot||e.parentNode||dp(e)&&e.host||kL(e);return dp(t)?t.host:t}function ci(e){let t=e.activeElement;for(;((n=t)==null||(r=n.shadowRoot)==null?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}function Sn(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&dp(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function lx(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function $L(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function ux(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(lx())||t.test($L()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function cx(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function fx(){return/apple/i.test(navigator.vendor)}function IL(){return lx().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function dx(e,t){return["mouse","pen"].includes(e)}function RL(e){return"nativeEvent"in e}function AL(e){return e.matches("html,body")}function Jn(e){return(e==null?void 0:e.ownerDocument)||document}function pp(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function px(e){return"composedPath"in e?e.composedPath()[0]:e.target}const PL="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function hx(e){return ka(e)&&e.matches(PL)}function nn(e){e.preventDefault(),e.stopPropagation()}const Ta=Math.min,In=Math.max,bu=Math.round,wu=Math.floor,fi=e=>({x:e,y:e});function mx(e,t,n){return In(e,Ta(t,n))}function xu(e,t){return typeof e=="function"?e(t):e}function ss(e){return e.split("-")[0]}function hp(e){return e.split("-")[1]}function vx(e){return e==="x"?"y":"x"}function DL(e){return e==="y"?"height":"width"}function ls(e){return["top","bottom"].includes(ss(e))?"y":"x"}function jL(e){return vx(ls(e))}function NL(e){return{top:0,right:0,bottom:0,left:0,...e}}function ML(e){return typeof e!="number"?NL(e):{top:e,right:e,bottom:e,left:e}}function Su(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function yx(e,t,n){let{reference:r,floating:i}=e;const a=ls(t),o=jL(t),s=DL(o),u=ss(t),l=a==="y",c=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,d=r[s]/2-i[s]/2;let p;switch(u){case"top":p={x:c,y:r.y-i.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-i.width,y:f};break;default:p={x:r.x,y:r.y}}switch(hp(t)){case"start":p[o]-=d*(n&&l?-1:1);break;case"end":p[o]+=d*(n&&l?-1:1);break}return p}const FL=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,s=a.filter(Boolean),u=await(o.isRTL==null?void 0:o.isRTL(t));let l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:f}=yx(l,r,u),d=r,p={},m=0;for(let h=0;h<s.length;h++){const{name:y,fn:v}=s[h],{x:b,y:w,data:T,reset:E}=await v({x:c,y:f,initialPlacement:r,placement:d,strategy:i,middlewareData:p,rects:l,platform:o,elements:{reference:e,floating:t}});c=b??c,f=w??f,p={...p,[y]:{...p[y],...T}},E&&m<=50&&(m++,typeof E=="object"&&(E.placement&&(d=E.placement),E.rects&&(l=E.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):E.rects),{x:c,y:f}=yx(l,d,u)),h=-1)}return{x:c,y:f,placement:d,strategy:i,middlewareData:p}};async function gx(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:o,elements:s,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=xu(t,e),m=ML(p),y=s[d?f==="floating"?"reference":"floating":f],v=Su(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(y)))==null||n?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:c,strategy:u})),b=f==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),T=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},E=Su(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:w,strategy:u}):b);return{top:(v.top-E.top+m.top)/T.y,bottom:(E.bottom-v.bottom+m.bottom)/T.y,left:(v.left-E.left+m.left)/T.x,right:(E.right-v.right+m.right)/T.x}}async function LL(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ss(n),s=hp(n),u=ls(n)==="y",l=["left","top"].includes(o)?-1:1,c=a&&u?-1:1,f=xu(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof m=="number"&&(p=s==="end"?m*-1:m),u?{x:p*c,y:d*l}:{x:d*l,y:p*c}}const BL=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:s}=t,u=await LL(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:a+u.y,data:{...u,placement:o}}}}},UL=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:y=>{let{x:v,y:b}=y;return{x:v,y:b}}},...u}=xu(e,t),l={x:n,y:r},c=await gx(t,u),f=ls(ss(i)),d=vx(f);let p=l[d],m=l[f];if(a){const y=d==="y"?"top":"left",v=d==="y"?"bottom":"right",b=p+c[y],w=p-c[v];p=mx(b,p,w)}if(o){const y=f==="y"?"top":"left",v=f==="y"?"bottom":"right",b=m+c[y],w=m-c[v];m=mx(b,m,w)}const h=s.fn({...t,[d]:p,[f]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[d]:a,[f]:o}}}}}},zL=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:o,elements:s}=t,{apply:u=()=>{},...l}=xu(e,t),c=await gx(t,l),f=ss(i),d=hp(i),p=ls(i)==="y",{width:m,height:h}=a.floating;let y,v;f==="top"||f==="bottom"?(y=f,v=d===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(v=f,y=d==="end"?"top":"bottom");const b=h-c.top-c.bottom,w=m-c.left-c.right,T=Ta(h-c[y],b),E=Ta(m-c[v],w),_=!t.middlewareData.shift;let O=T,z=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(z=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(O=b),_&&!d){const k=In(c.left,0),D=In(c.right,0),W=In(c.top,0),B=In(c.bottom,0);p?z=m-2*(k!==0||D!==0?k+D:In(c.left,c.right)):O=h-2*(W!==0||B!==0?W+B:In(c.top,c.bottom))}await u({...t,availableWidth:z,availableHeight:O});const U=await o.getDimensions(s.floating);return m!==U.width||h!==U.height?{reset:{rects:!0}}:{}}}};function Eu(){return typeof window<"u"}function Ca(e){return bx(e)?(e.nodeName||"").toLowerCase():"#document"}function Rn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function gr(e){var t;return(t=(bx(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function bx(e){return Eu()?e instanceof Node||e instanceof Rn(e).Node:!1}function Xn(e){return Eu()?e instanceof Element||e instanceof Rn(e).Element:!1}function br(e){return Eu()?e instanceof HTMLElement||e instanceof Rn(e).HTMLElement:!1}function wx(e){return!Eu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Rn(e).ShadowRoot}function us(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Qn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function qL(e){return["table","td","th"].includes(Ca(e))}function _u(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function mp(e){const t=vp(),n=Xn(e)?Qn(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function WL(e){let t=di(e);for(;br(t)&&!Oa(t);){if(mp(t))return t;if(_u(t))return null;t=di(t)}return null}function vp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Oa(e){return["html","body","#document"].includes(Ca(e))}function Qn(e){return Rn(e).getComputedStyle(e)}function ku(e){return Xn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function di(e){if(Ca(e)==="html")return e;const t=e.assignedSlot||e.parentNode||wx(e)&&e.host||gr(e);return wx(t)?t.host:t}function xx(e){const t=di(e);return Oa(t)?e.ownerDocument?e.ownerDocument.body:e.body:br(t)&&us(t)?t:xx(t)}function pi(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=xx(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=Rn(i);if(a){const s=yp(o);return t.concat(o,o.visualViewport||[],us(i)?i:[],s&&n?pi(s):[])}return t.concat(i,pi(i,[],n))}function yp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Sx(e){const t=Qn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=br(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=bu(n)!==a||bu(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function gp(e){return Xn(e)?e:e.contextElement}function $a(e){const t=gp(e);if(!br(t))return fi(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Sx(t);let o=(a?bu(n.width):n.width)/r,s=(a?bu(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const VL=fi(0);function Ex(e){const t=Rn(e);return!vp()||!t.visualViewport?VL:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function HL(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Rn(e)?!1:t}function qi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=gp(e);let o=fi(1);t&&(r?Xn(r)&&(o=$a(r)):o=$a(e));const s=HL(a,n,r)?Ex(a):fi(0);let u=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,c=i.width/o.x,f=i.height/o.y;if(a){const d=Rn(a),p=r&&Xn(r)?Rn(r):r;let m=d,h=yp(m);for(;h&&r&&p!==m;){const y=$a(h),v=h.getBoundingClientRect(),b=Qn(h),w=v.left+(h.clientLeft+parseFloat(b.paddingLeft))*y.x,T=v.top+(h.clientTop+parseFloat(b.paddingTop))*y.y;u*=y.x,l*=y.y,c*=y.x,f*=y.y,u+=w,l+=T,m=Rn(h),h=yp(m)}}return Su({width:c,height:f,x:u,y:l})}function ZL(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",o=gr(r),s=t?_u(t.floating):!1;if(r===o||s&&a)return n;let u={scrollLeft:0,scrollTop:0},l=fi(1);const c=fi(0),f=br(r);if((f||!f&&!a)&&((Ca(r)!=="body"||us(o))&&(u=ku(r)),br(r))){const d=qi(r);l=$a(r),c.x=d.x+r.clientLeft,c.y=d.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+c.x,y:n.y*l.y-u.scrollTop*l.y+c.y}}function KL(e){return Array.from(e.getClientRects())}function bp(e,t){const n=ku(e).scrollLeft;return t?t.left+n:qi(gr(e)).left+n}function GL(e){const t=gr(e),n=ku(e),r=e.ownerDocument.body,i=In(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=In(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+bp(e);const s=-n.scrollTop;return Qn(r).direction==="rtl"&&(o+=In(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function YL(e,t){const n=Rn(e),r=gr(e),i=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,s=0,u=0;if(i){a=i.width,o=i.height;const l=vp();(!l||l&&t==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}return{width:a,height:o,x:s,y:u}}function JL(e,t){const n=qi(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=br(e)?$a(e):fi(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,u=i*a.x,l=r*a.y;return{width:o,height:s,x:u,y:l}}function _x(e,t,n){let r;if(t==="viewport")r=YL(e,n);else if(t==="document")r=GL(gr(e));else if(Xn(t))r=JL(t,n);else{const i=Ex(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return Su(r)}function kx(e,t){const n=di(e);return n===t||!Xn(n)||Oa(n)?!1:Qn(n).position==="fixed"||kx(n,t)}function XL(e,t){const n=t.get(e);if(n)return n;let r=pi(e,[],!1).filter(s=>Xn(s)&&Ca(s)!=="body"),i=null;const a=Qn(e).position==="fixed";let o=a?di(e):e;for(;Xn(o)&&!Oa(o);){const s=Qn(o),u=mp(o);!u&&s.position==="fixed"&&(i=null),(a?!u&&!i:!u&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||us(o)&&!u&&kx(e,o))?r=r.filter(c=>c!==o):i=s,o=di(o)}return t.set(e,r),r}function QL(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?_u(t)?[]:XL(t,this._c):[].concat(n),r],s=o[0],u=o.reduce((l,c)=>{const f=_x(t,c,i);return l.top=In(f.top,l.top),l.right=Ta(f.right,l.right),l.bottom=Ta(f.bottom,l.bottom),l.left=In(f.left,l.left),l},_x(t,s,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function e5(e){const{width:t,height:n}=Sx(e);return{width:t,height:n}}function t5(e,t,n){const r=br(t),i=gr(t),a=n==="fixed",o=qi(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const u=fi(0);if(r||!r&&!a)if((Ca(t)!=="body"||us(i))&&(s=ku(t)),r){const p=qi(t,!0,a,t);u.x=p.x+t.clientLeft,u.y=p.y+t.clientTop}else i&&(u.x=bp(i));let l=0,c=0;if(i&&!r&&!a){const p=i.getBoundingClientRect();c=p.top+s.scrollTop,l=p.left+s.scrollLeft-bp(i,p)}const f=o.left+s.scrollLeft-u.x-l,d=o.top+s.scrollTop-u.y-c;return{x:f,y:d,width:o.width,height:o.height}}function wp(e){return Qn(e).position==="static"}function Tx(e,t){if(!br(e)||Qn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return gr(e)===n&&(n=n.ownerDocument.body),n}function Cx(e,t){const n=Rn(e);if(_u(e))return n;if(!br(e)){let i=di(e);for(;i&&!Oa(i);){if(Xn(i)&&!wp(i))return i;i=di(i)}return n}let r=Tx(e,t);for(;r&&qL(r)&&wp(r);)r=Tx(r,t);return r&&Oa(r)&&wp(r)&&!mp(r)?n:r||WL(e)||n}const n5=async function(e){const t=this.getOffsetParent||Cx,n=this.getDimensions,r=await n(e.floating);return{reference:t5(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function r5(e){return Qn(e).direction==="rtl"}const i5={convertOffsetParentRelativeRectToViewportRelativeRect:ZL,getDocumentElement:gr,getClippingRect:QL,getOffsetParent:Cx,getElementRects:n5,getClientRects:KL,getDimensions:e5,getScale:$a,isElement:Xn,isRTL:r5};function a5(e,t){let n=null,r;const i=gr(e);function a(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function o(s,u){s===void 0&&(s=!1),u===void 0&&(u=1),a();const{left:l,top:c,width:f,height:d}=e.getBoundingClientRect();if(s||t(),!f||!d)return;const p=wu(c),m=wu(i.clientWidth-(l+f)),h=wu(i.clientHeight-(c+d)),y=wu(l),b={rootMargin:-p+"px "+-m+"px "+-h+"px "+-y+"px",threshold:In(0,Ta(1,u))||1};let w=!0;function T(E){const _=E[0].intersectionRatio;if(_!==u){if(!w)return o();_?o(!1,_):r=setTimeout(()=>{o(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(T,{...b,root:i.ownerDocument})}catch{n=new IntersectionObserver(T,b)}n.observe(e)}return o(!0),a}function o5(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=gp(e),c=i||a?[...l?pi(l):[],...pi(t)]:[];c.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),a&&v.addEventListener("resize",n)});const f=l&&s?a5(l,n):null;let d=-1,p=null;o&&(p=new ResizeObserver(v=>{let[b]=v;b&&b.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),n()}),l&&!u&&p.observe(l),p.observe(t));let m,h=u?qi(e):null;u&&y();function y(){const v=qi(e);h&&(v.x!==h.x||v.y!==h.y||v.width!==h.width||v.height!==h.height)&&n(),h=v,m=requestAnimationFrame(y)}return n(),()=>{var v;c.forEach(b=>{i&&b.removeEventListener("scroll",n),a&&b.removeEventListener("resize",n)}),f==null||f(),(v=p)==null||v.disconnect(),p=null,u&&cancelAnimationFrame(m)}}const s5=BL,l5=UL,u5=zL,c5=(e,t,n)=>{const r=new Map,i={platform:i5,...n},a={...i.platform,_c:r};return FL(e,t,{...i,platform:a})};var Tu=typeof document<"u"?j.useLayoutEffect:j.useEffect;function Cu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Cu(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!Cu(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Ox(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $x(e,t){const n=Ox(e);return Math.round(t*n)/n}function xp(e){const t=x.useRef(e);return Tu(()=>{t.current=e}),t}function f5(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:u,open:l}=e,[c,f]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,p]=x.useState(r);Cu(d,r)||p(r);const[m,h]=x.useState(null),[y,v]=x.useState(null),b=x.useCallback(H=>{H!==_.current&&(_.current=H,h(H))},[]),w=x.useCallback(H=>{H!==O.current&&(O.current=H,v(H))},[]),T=a||m,E=o||y,_=x.useRef(null),O=x.useRef(null),z=x.useRef(c),U=u!=null,k=xp(u),D=xp(i),W=xp(l),B=x.useCallback(()=>{if(!_.current||!O.current)return;const H={placement:t,strategy:n,middleware:d};D.current&&(H.platform=D.current),c5(_.current,O.current,H).then(R=>{const g={...R,isPositioned:W.current!==!1};I.current&&!Cu(z.current,g)&&(z.current=g,_g.flushSync(()=>{f(g)}))})},[d,t,n,D,W]);Tu(()=>{l===!1&&z.current.isPositioned&&(z.current.isPositioned=!1,f(H=>({...H,isPositioned:!1})))},[l]);const I=x.useRef(!1);Tu(()=>(I.current=!0,()=>{I.current=!1}),[]),Tu(()=>{if(T&&(_.current=T),E&&(O.current=E),T&&E){if(k.current)return k.current(T,E,B);B()}},[T,E,B,k,U]);const A=x.useMemo(()=>({reference:_,floating:O,setReference:b,setFloating:w}),[b,w]),L=x.useMemo(()=>({reference:T,floating:E}),[T,E]),Z=x.useMemo(()=>{const H={position:n,left:0,top:0};if(!L.floating)return H;const R=$x(L.floating,c.x),g=$x(L.floating,c.y);return s?{...H,transform:"translate("+R+"px, "+g+"px)",...Ox(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:R,top:g}},[n,s,L.floating,c.x,c.y]);return x.useMemo(()=>({...c,update:B,refs:A,elements:L,floatingStyles:Z}),[c,B,A,L,Z])}const d5=(e,t)=>({...s5(e),options:[e,t]}),p5=(e,t)=>({...l5(e),options:[e,t]}),h5=(e,t)=>({...u5(e),options:[e,t]});/*!
94
94
  * tabbable 6.2.0
95
95
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
96
- */var wL=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Yd=wL.join(","),K0=typeof Element>"u",Go=K0?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,lu=!K0&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},uu=function e(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),a=i===""||i==="true",o=a||n&&t&&e(t.parentNode);return o},xL=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},SL=function(t,n,r){if(uu(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Yd));return n&&Go.call(t,Yd)&&i.unshift(t),i=i.filter(r),i},EL=function e(t,n,r){for(var i=[],a=Array.from(t);a.length;){var o=a.shift();if(!uu(o,!1))if(o.tagName==="SLOT"){var s=o.assignedElements(),u=s.length?s:o.children,l=e(u,!0,r);r.flatten?i.push.apply(i,l):i.push({scopeParent:o,candidates:l})}else{var c=Go.call(o,Yd);c&&r.filter(o)&&(n||!t.includes(o))&&i.push(o);var f=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),p=!uu(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(f&&p){var d=e(f===!0?o.children:f.children,!0,r);r.flatten?i.push.apply(i,d):i.push({scopeParent:o,candidates:d})}else a.unshift.apply(a,o.children)}}return i},G0=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Y0=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||xL(t))&&!G0(t)?0:t.tabIndex},_L=function(t,n){var r=Y0(t);return r<0&&n&&!G0(t)?0:r},kL=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},J0=function(t){return t.tagName==="INPUT"},TL=function(t){return J0(t)&&t.type==="hidden"},OL=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},CL=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},$L=function(t){if(!t.name)return!0;var n=t.form||lu(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var a=CL(i,t.form);return!a||a===t},IL=function(t){return J0(t)&&t.type==="radio"},RL=function(t){return IL(t)&&!$L(t)},AL=function(t){var n,r=t&&lu(t),i=(n=r)===null||n===void 0?void 0:n.host,a=!1;if(r&&r!==t){var o,s,u;for(a=!!((o=i)!==null&&o!==void 0&&(s=o.ownerDocument)!==null&&s!==void 0&&s.contains(i)||t!=null&&(u=t.ownerDocument)!==null&&u!==void 0&&u.contains(t));!a&&i;){var l,c,f;r=lu(i),i=(l=r)===null||l===void 0?void 0:l.host,a=!!((c=i)!==null&&c!==void 0&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(i))}}return a},X0=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},PL=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var a=Go.call(t,"details>summary:first-of-type"),o=a?t.parentElement:t;if(Go.call(o,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var s=t;t;){var u=t.parentElement,l=lu(t);if(u&&!u.shadowRoot&&i(u)===!0)return X0(t);t.assignedSlot?t=t.assignedSlot:!u&&l!==t.ownerDocument?t=l.host:t=u}t=s}if(AL(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return X0(t);return!1},DL=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return Go.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},jL=function(t,n){return!(n.disabled||uu(n)||TL(n)||PL(n,t)||OL(n)||DL(n))},Q0=function(t,n){return!(RL(n)||Y0(n)<0||!jL(t,n))},NL=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},ML=function e(t){var n=[],r=[];return t.forEach(function(i,a){var o=!!i.scopeParent,s=o?i.scopeParent:i,u=_L(s,o),l=o?e(i.candidates):s;u===0?o?n.push.apply(n,l):n.push(s):r.push({documentOrder:a,tabIndex:u,item:i,isScope:o,content:l})}),r.sort(kL).reduce(function(i,a){return a.isScope?i.push.apply(i,a.content):i.push(a.content),i},[]).concat(n)},Jd=function(t,n){n=n||{};var r;return n.getShadowRoot?r=EL([t],n.includeContainer,{filter:Q0.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:NL}):r=SL(t,n.includeContainer,Q0.bind(null,n)),ML(r)};const Xd="ArrowUp",cu="ArrowDown",ga="ArrowLeft",Yo="ArrowRight";function fu(e,t,n){return Math.floor(e/t)!==n}function Jo(e,t){return t<0||t>=e.current.length}function Qd(e,t){return rn(e,{disabledIndices:t})}function ex(e,t){return rn(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function rn(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:a=1}=t===void 0?{}:t;const o=e.current;let s=n;do{var u,l;s=s+(r?-a:a)}while(s>=0&&s<=o.length-1&&(i?i.includes(s):o[s]==null||(u=o[s])!=null&&u.hasAttribute("disabled")||((l=o[s])==null?void 0:l.getAttribute("aria-disabled"))==="true"));return s}function FL(e,t){let{event:n,orientation:r,loop:i,cols:a,disabledIndices:o,minIndex:s,maxIndex:u,prevIndex:l,stopEvent:c=!1}=t,f=l;if(n.key===Xd){if(c&&Jt(n),l===-1)f=u;else if(f=rn(e,{startingIndex:f,amount:a,decrement:!0,disabledIndices:o}),i&&(l-a<s||f<0)){const p=l%a,d=u%a,m=u-(d-p);d===p?f=u:f=d>p?m:m-a}Jo(e,f)&&(f=l)}if(n.key===cu&&(c&&Jt(n),l===-1?f=s:(f=rn(e,{startingIndex:l,amount:a,disabledIndices:o}),i&&l+a>u&&(f=rn(e,{startingIndex:l%a-a,amount:a,disabledIndices:o}))),Jo(e,f)&&(f=l)),r==="both"){const p=E0(l/a);n.key===Yo&&(c&&Jt(n),l%a!==a-1?(f=rn(e,{startingIndex:l,disabledIndices:o}),i&&fu(f,a,p)&&(f=rn(e,{startingIndex:l-l%a-1,disabledIndices:o}))):i&&(f=rn(e,{startingIndex:l-l%a-1,disabledIndices:o})),fu(f,a,p)&&(f=l)),n.key===ga&&(c&&Jt(n),l%a!==0?(f=rn(e,{startingIndex:l,disabledIndices:o,decrement:!0}),i&&fu(f,a,p)&&(f=rn(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:o}))):i&&(f=rn(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:o})),fu(f,a,p)&&(f=l));const d=E0(u/a)===p;Jo(e,f)&&(i&&d?f=n.key===ga?u:rn(e,{startingIndex:l-l%a-1,disabledIndices:o}):f=l)}return f}let tx=0;function Nr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(tx);const a=()=>e==null?void 0:e.focus({preventScroll:n});i?a():tx=requestAnimationFrame(a)}var Bt=typeof document<"u"?j.useLayoutEffect:j.useEffect;function du(){return du=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},du.apply(this,arguments)}let ep=!1,LL=0;const nx=()=>"floating-ui-"+LL++;function BL(){const[e,t]=x.useState(()=>ep?nx():void 0);return Bt(()=>{e==null&&t(nx())},[]),x.useEffect(()=>{ep||(ep=!0)},[]),e}const tp=x.useId||BL;function UL(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(i=>i!==n))||[])}}}const zL=x.createContext(null),qL=x.createContext(null),rx=()=>{var e;return((e=x.useContext(zL))==null?void 0:e.id)||null},pu=()=>x.useContext(qL);function Xo(e){return"data-floating-ui-"+e}function ii(e){const t=j.useRef(e);return Bt(()=>{t.current=e}),t}function WL(e,t){var n;let r=[],i=(n=e.find(a=>a.id===t))==null?void 0:n.parentId;for(;i;){const a=e.find(o=>o.id===i);i=a==null?void 0:a.parentId,a&&(r=r.concat(a))}return r}function ba(e,t){let n=e.filter(i=>{var a;return i.parentId===t&&((a=i.context)==null?void 0:a.open)}),r=n;for(;r.length;)r=e.filter(i=>{var a;return(a=r)==null?void 0:a.some(o=>{var s;return i.parentId===o.id&&((s=i.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function VL(e,t){let n,r=-1;function i(a,o){o>r&&(n=a,r=o),ba(e,a).forEach(u=>{i(u.id,o+1)})}return i(t,0),e.find(a=>a.id===n)}let wa=new WeakMap,hu=new WeakSet,mu={},np=0;const HL=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,ix=e=>e&&(e.host||ix(e.parentNode)),ZL=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=ix(n);return e.contains(r)?r:null}).filter(n=>n!=null);function KL(e,t,n,r){const i="data-floating-ui-inert",a=r?"inert":n?"aria-hidden":null,o=ZL(t,e),s=new Set,u=new Set(o),l=[];mu[i]||(mu[i]=new WeakMap);const c=mu[i];o.forEach(f),p(t),s.clear();function f(d){!d||s.has(d)||(s.add(d),d.parentNode&&f(d.parentNode))}function p(d){!d||u.has(d)||Array.prototype.forEach.call(d.children,m=>{if(s.has(m))p(m);else{const h=a?m.getAttribute(a):null,y=h!==null&&h!=="false",v=(wa.get(m)||0)+1,b=(c.get(m)||0)+1;wa.set(m,v),c.set(m,b),l.push(m),v===1&&y&&hu.add(m),b===1&&m.setAttribute(i,""),!y&&a&&m.setAttribute(a,"true")}})}return np++,()=>{l.forEach(d=>{const m=(wa.get(d)||0)-1,h=(c.get(d)||0)-1;wa.set(d,m),c.set(d,h),m||(!hu.has(d)&&a&&d.removeAttribute(a),hu.delete(d)),h||d.removeAttribute(i)}),np--,np||(wa=new WeakMap,wa=new WeakMap,hu=new WeakSet,mu={})}}function ax(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Vn(e[0]).body;return KL(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const rp=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function ox(e,t){const n=Jd(e,rp());t==="prev"&&n.reverse();const r=n.indexOf(ei(Vn(e)));return n.slice(r+1)[0]}function sx(){return ox(document.body,"next")}function lx(){return ox(document.body,"prev")}function Qo(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!yn(n,r)}function GL(e){Jd(e,rp()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function YL(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const ip={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let JL;function ux(e){e.key==="Tab"&&(e.target,clearTimeout(JL))}const vu=x.forwardRef(function(t,n){const[r,i]=x.useState();Bt(()=>($0()&&i("button"),document.addEventListener("keydown",ux),()=>{document.removeEventListener("keydown",ux)}),[]);const a={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Xo("focus-guard")]:"",style:ip};return x.createElement("span",du({},t,a))}),cx=x.createContext(null);function XL(e){let{id:t,root:n}=e===void 0?{}:e;const[r,i]=x.useState(null),a=tp(),o=fx(),s=x.useMemo(()=>({id:t,root:n,portalContext:o,uniqueId:a}),[t,n,o,a]),u=x.useRef();return Bt(()=>()=>{r==null||r.remove()},[r,s]),Bt(()=>{if(u.current===s)return;u.current=s;const{id:l,root:c,portalContext:f,uniqueId:p}=s,d=l?document.getElementById(l):null,m=Xo("portal");if(d){const h=document.createElement("div");h.id=p,h.setAttribute(m,""),d.appendChild(h),i(h)}else{let h=c||(f==null?void 0:f.portalNode);h&&!Nn(h)&&(h=h.current),h=h||document.body;let y=null;l&&(y=document.createElement("div"),y.id=l,h.appendChild(y));const v=document.createElement("div");v.id=p,v.setAttribute(m,""),h=y||h,h.appendChild(v),i(v)}},[s]),r}function QL(e){let{children:t,id:n,root:r=null,preserveTabOrder:i=!0}=e;const a=XL({id:n,root:r}),[o,s]=x.useState(null),u=x.useRef(null),l=x.useRef(null),c=x.useRef(null),f=x.useRef(null),p=!!o&&!o.modal&&o.open&&i&&!!(r||a);return x.useEffect(()=>{if(!a||!i||o!=null&&o.modal)return;function d(m){a&&Qo(m)&&(m.type==="focusin"?YL:GL)(a)}return a.addEventListener("focusin",d,!0),a.addEventListener("focusout",d,!0),()=>{a.removeEventListener("focusin",d,!0),a.removeEventListener("focusout",d,!0)}},[a,i,o==null?void 0:o.modal]),x.createElement(cx.Provider,{value:x.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:u,afterOutsideRef:l,beforeInsideRef:c,afterInsideRef:f,portalNode:a,setFocusManagerState:s}),[i,a])},p&&a&&x.createElement(vu,{"data-type":"outside",ref:u,onFocus:d=>{if(Qo(d,a)){var m;(m=c.current)==null||m.focus()}else{const h=lx()||(o==null?void 0:o.refs.domReference.current);h==null||h.focus()}}}),p&&a&&x.createElement("span",{"aria-owns":a.id,style:ip}),a&&_i.createPortal(t,a),p&&a&&x.createElement(vu,{"data-type":"outside",ref:l,onFocus:d=>{if(Qo(d,a)){var m;(m=f.current)==null||m.focus()}else{const h=sx()||(o==null?void 0:o.refs.domReference.current);h==null||h.focus(),o!=null&&o.closeOnFocusOut&&(o==null||o.onOpenChange(!1,d.nativeEvent))}}}))}const fx=()=>x.useContext(cx),e5=x.forwardRef(function(t,n){return x.createElement("button",du({},t,{type:"button",ref:n,tabIndex:-1,style:ip}))});function t5(e){const{context:t,children:n,disabled:r=!1,order:i=["content"],guards:a=!0,initialFocus:o=0,returnFocus:s=!0,modal:u=!0,visuallyHiddenDismiss:l=!1,closeOnFocusOut:c=!0}=e,{open:f,refs:p,nodeId:d,onOpenChange:m,events:h,dataRef:y,elements:{domReference:v,floating:b}}=t,w=HL()?a:!0,k=ii(i),E=ii(o),_=ii(s),C=pu(),z=fx(),B=typeof o=="number"&&o<0,T=x.useRef(null),A=x.useRef(null),W=x.useRef(!1),F=x.useRef(null),L=x.useRef(!1),N=z!=null,q=v&&v.getAttribute("role")==="combobox"&&A0(v)&&B,Y=x.useCallback(function(P){return P===void 0&&(P=b),P?Jd(P,rp()):[]},[b]),H=x.useCallback(P=>{const V=Y(P);return k.current.map(S=>v&&S==="reference"?v:b&&S==="floating"?b:V).filter(Boolean).flat()},[v,b,k,Y]);x.useEffect(()=>{if(r||!u)return;function P(S){if(S.key==="Tab"){yn(b,ei(Vn(b)))&&Y().length===0&&!q&&Jt(S);const Z=H(),J=R0(S);k.current[0]==="reference"&&J===v&&(Jt(S),S.shiftKey?Nr(Z[Z.length-1]):Nr(Z[1])),k.current[1]==="floating"&&J===b&&S.shiftKey&&(Jt(S),Nr(Z[0]))}}const V=Vn(b);return V.addEventListener("keydown",P),()=>{V.removeEventListener("keydown",P)}},[r,v,b,u,k,p,q,Y,H]),x.useEffect(()=>{if(r||!c)return;function P(){L.current=!0,setTimeout(()=>{L.current=!1})}function V(S){const Z=S.relatedTarget;queueMicrotask(()=>{const J=!(yn(v,Z)||yn(b,Z)||yn(Z,b)||yn(z==null?void 0:z.portalNode,Z)||Z!=null&&Z.hasAttribute(Xo("focus-guard"))||C&&(ba(C.nodesRef.current,d).find(G=>{var X,ae;return yn((X=G.context)==null?void 0:X.elements.floating,Z)||yn((ae=G.context)==null?void 0:ae.elements.domReference,Z)})||WL(C.nodesRef.current,d).find(G=>{var X,ae;return((X=G.context)==null?void 0:X.elements.floating)===Z||((ae=G.context)==null?void 0:ae.elements.domReference)===Z})));Z&&J&&!L.current&&Z!==F.current&&(W.current=!0,m(!1,S))})}if(b&&pa(v))return v.addEventListener("focusout",V),v.addEventListener("pointerdown",P),!u&&b.addEventListener("focusout",V),()=>{v.removeEventListener("focusout",V),v.removeEventListener("pointerdown",P),!u&&b.removeEventListener("focusout",V)}},[r,v,b,u,d,C,z,m,c]),x.useEffect(()=>{var P;if(r)return;const V=Array.from((z==null||(P=z.portalNode)==null?void 0:P.querySelectorAll("["+Xo("portal")+"]"))||[]);if(b){const S=[b,...V,T.current,A.current,k.current.includes("reference")||q?v:null].filter(J=>J!=null),Z=u?ax(S,w,!w):ax(S);return()=>{Z()}}},[r,v,b,u,k,z,q,w]),Bt(()=>{if(r||!b)return;const P=Vn(b),V=ei(P);queueMicrotask(()=>{const S=H(b),Z=E.current,J=(typeof Z=="number"?S[Z]:Z.current)||b,G=yn(b,V);!B&&!G&&f&&Nr(J,{preventScroll:J===b})})},[r,f,b,B,H,E]),Bt(()=>{if(r||!b)return;let P=!1;const V=Vn(b),S=ei(V),Z=y.current;F.current=S;function J(G){if(G.type==="escapeKey"&&p.domReference.current&&(F.current=p.domReference.current),["referencePress","escapeKey"].includes(G.type))return;const X=G.data.returnFocus;typeof X=="object"?(W.current=!1,P=X.preventScroll):W.current=!X}return h.on("dismiss",J),()=>{h.off("dismiss",J);const G=ei(V);(yn(b,G)||C&&ba(C.nodesRef.current,d).some(ae=>{var se;return yn((se=ae.context)==null?void 0:se.elements.floating,G)})||Z.openEvent&&["click","mousedown"].includes(Z.openEvent.type))&&p.domReference.current&&(F.current=p.domReference.current),_.current&&pa(F.current)&&!W.current&&Nr(F.current,{cancelPrevious:!1,preventScroll:P})}},[r,b,_,y,p,h,C,d]),Bt(()=>{if(!(r||!z))return z.setFocusManagerState({modal:u,closeOnFocusOut:c,open:f,onOpenChange:m,refs:p}),()=>{z.setFocusManagerState(null)}},[r,z,u,f,m,p,c]),Bt(()=>{if(!r&&b&&typeof MutationObserver=="function"&&!B){const P=()=>{const S=b.getAttribute("tabindex");k.current.includes("floating")||ei(Vn(b))!==p.domReference.current&&Y().length===0?S!=="0"&&b.setAttribute("tabindex","0"):S!=="-1"&&b.setAttribute("tabindex","-1")};P();const V=new MutationObserver(P);return V.observe(b,{childList:!0,subtree:!0,attributes:!0}),()=>{V.disconnect()}}},[r,b,p,k,Y,B]);function I(P){return r||!l||!u?null:x.createElement(e5,{ref:P==="start"?T:A,onClick:V=>m(!1,V.nativeEvent)},typeof l=="string"?l:"Dismiss")}const g=!r&&w&&!q&&(N||u);return x.createElement(x.Fragment,null,g&&x.createElement(vu,{"data-type":"inside",ref:z==null?void 0:z.beforeInsideRef,onFocus:P=>{if(u){const S=H();Nr(i[0]==="reference"?S[0]:S[S.length-1])}else if(z!=null&&z.preserveTabOrder&&z.portalNode)if(W.current=!1,Qo(P,z.portalNode)){const S=sx()||v;S==null||S.focus()}else{var V;(V=z.beforeOutsideRef.current)==null||V.focus()}}}),!q&&I("start"),n,I("end"),g&&x.createElement(vu,{"data-type":"inside",ref:z==null?void 0:z.afterInsideRef,onFocus:P=>{if(u)Nr(H()[0]);else if(z!=null&&z.preserveTabOrder&&z.portalNode)if(c&&(W.current=!0),Qo(P,z.portalNode)){const S=lx()||v;S==null||S.focus()}else{var V;(V=z.afterOutsideRef.current)==null||V.focus()}}}))}function dx(e){return pa(e.target)&&e.target.tagName==="BUTTON"}function px(e){return A0(e)}function n5(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:a}}=e,{enabled:o=!0,event:s="click",toggle:u=!0,ignoreMouse:l=!1,keyboardHandlers:c=!0}=t,f=x.useRef(),p=x.useRef(!1);return x.useMemo(()=>o?{reference:{onPointerDown(d){f.current=d.pointerType},onMouseDown(d){d.button===0&&(I0(f.current)&&l||s!=="click"&&(n&&u&&(!i.current.openEvent||i.current.openEvent.type==="mousedown")?r(!1,d.nativeEvent):(d.preventDefault(),r(!0,d.nativeEvent))))},onClick(d){if(s==="mousedown"&&f.current){f.current=void 0;return}I0(f.current)&&l||(n&&u&&(!i.current.openEvent||i.current.openEvent.type==="click")?r(!1,d.nativeEvent):r(!0,d.nativeEvent))},onKeyDown(d){f.current=void 0,!(d.defaultPrevented||!c||dx(d))&&(d.key===" "&&!px(a)&&(d.preventDefault(),p.current=!0),d.key==="Enter"&&r(!(n&&u),d.nativeEvent))},onKeyUp(d){d.defaultPrevented||!c||dx(d)||px(a)||d.key===" "&&p.current&&(p.current=!1,r(!(n&&u),d.nativeEvent))}}}:{},[o,i,s,l,c,a,u,n,r])}const r5=x.useInsertionEffect||(e=>e());function ai(e){const t=x.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return r5(()=>{t.current=e}),x.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}const i5={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},a5={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},o5=e=>{var t,n;return{escapeKeyBubbles:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePressBubbles:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function s5(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:i,nodeId:a,elements:{reference:o,domReference:s,floating:u},dataRef:l}=e,{enabled:c=!0,escapeKey:f=!0,outsidePress:p=!0,outsidePressEvent:d="pointerdown",referencePress:m=!1,referencePressEvent:h="pointerdown",ancestorScroll:y=!1,bubbles:v}=t,b=pu(),w=rx()!=null,k=ai(typeof p=="function"?p:()=>!1),E=typeof p=="function"?k:p,_=x.useRef(!1),{escapeKeyBubbles:C,outsidePressBubbles:z}=o5(v),B=ai(A=>{if(!n||!c||!f||A.key!=="Escape")return;const W=b?ba(b.nodesRef.current,a):[];if(!C&&(A.stopPropagation(),W.length>0)){let F=!0;if(W.forEach(L=>{var N;if((N=L.context)!=null&&N.open&&!L.context.dataRef.current.__escapeKeyBubbles){F=!1;return}}),!F)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,NF(A)?A.nativeEvent:A)}),T=ai(A=>{const W=_.current;if(_.current=!1,W||typeof E=="function"&&!E(A))return;const F=R0(A),L="["+Xo("inert")+"]",N=Vn(u).querySelectorAll(L);let q=Nn(F)?F:null;for(;q&&!RF(q);){const I=PF(q);if(I===Vn(u).body||!Nn(I))break;q=I}if(N.length&&Nn(F)&&!MF(F)&&!yn(F,u)&&Array.from(N).every(I=>!yn(q,I)))return;if(pa(F)&&u){const I=F.clientWidth>0&&F.scrollWidth>F.clientWidth,g=F.clientHeight>0&&F.scrollHeight>F.clientHeight;let P=g&&A.offsetX>F.clientWidth;if(g&&AF(F).direction==="rtl"&&(P=A.offsetX<=F.offsetWidth-F.clientWidth),P||I&&A.offsetY>F.clientHeight)return}const Y=b&&ba(b.nodesRef.current,a).some(I=>{var g;return Ud(A,(g=I.context)==null?void 0:g.elements.floating)});if(Ud(A,u)||Ud(A,s)||Y)return;const H=b?ba(b.nodesRef.current,a):[];if(H.length>0){let I=!0;if(H.forEach(g=>{var P;if((P=g.context)!=null&&P.open&&!g.context.dataRef.current.__outsidePressBubbles){I=!1;return}}),!I)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:w?{preventScroll:!0}:O0(A)||C0(A)}}),r(!1,A)});return x.useEffect(()=>{if(!n||!c)return;l.current.__escapeKeyBubbles=C,l.current.__outsidePressBubbles=z;function A(L){r(!1,L)}const W=Vn(u);f&&W.addEventListener("keydown",B),E&&W.addEventListener(d,T);let F=[];return y&&(Nn(s)&&(F=ri(s)),Nn(u)&&(F=F.concat(ri(u))),!Nn(o)&&o&&o.contextElement&&(F=F.concat(ri(o.contextElement)))),F=F.filter(L=>{var N;return L!==((N=W.defaultView)==null?void 0:N.visualViewport)}),F.forEach(L=>{L.addEventListener("scroll",A,{passive:!0})}),()=>{f&&W.removeEventListener("keydown",B),E&&W.removeEventListener(d,T),F.forEach(L=>{L.removeEventListener("scroll",A)})}},[l,u,s,o,f,E,d,n,r,y,c,C,z,B,T]),x.useEffect(()=>{_.current=!1},[E,d]),x.useMemo(()=>c?{reference:{onKeyDown:B,[i5[h]]:A=>{m&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,A.nativeEvent))}},floating:{onKeyDown:B,[a5[d]]:()=>{_.current=!0}}}:{},[c,i,m,d,h,r,B])}let ap;process.env.NODE_ENV!=="production"&&(ap=new Set);function l5(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:r,nodeId:i}=e;if(process.env.NODE_ENV!=="production"){var a;const C="Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";if((a=e.elements)!=null&&a.reference&&!Nn(e.elements.reference)){var o;if(!((o=ap)!=null&&o.has(C))){var s;(s=ap)==null||s.add(C),console.error(C)}}}const[u,l]=x.useState(null),c=((t=e.elements)==null?void 0:t.reference)||u,f=vL(e),p=pu(),d=ai((C,z)=>{C&&(h.current.openEvent=z),r==null||r(C,z)}),m=x.useRef(null),h=x.useRef({}),y=x.useState(()=>UL())[0],v=tp(),b=x.useCallback(C=>{const z=Nn(C)?{getBoundingClientRect:()=>C.getBoundingClientRect(),contextElement:C}:C;f.refs.setReference(z)},[f.refs]),w=x.useCallback(C=>{(Nn(C)||C===null)&&(m.current=C,l(C)),(Nn(f.refs.reference.current)||f.refs.reference.current===null||C!==null&&!Nn(C))&&f.refs.setReference(C)},[f.refs]),k=x.useMemo(()=>({...f.refs,setReference:w,setPositionReference:b,domReference:m}),[f.refs,w,b]),E=x.useMemo(()=>({...f.elements,domReference:c}),[f.elements,c]),_=x.useMemo(()=>({...f,refs:k,elements:E,dataRef:h,nodeId:i,floatingId:v,events:y,open:n,onOpenChange:d}),[f,i,v,y,n,d,k,E]);return Bt(()=>{const C=p==null?void 0:p.nodesRef.current.find(z=>z.id===i);C&&(C.context=_)}),x.useMemo(()=>({...f,context:_,refs:k,elements:E}),[f,k,E,_])}function op(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(i=>i?i[n]:null).concat(e).reduce((i,a)=>(a&&Object.entries(a).forEach(o=>{let[s,u]=o;if(s.indexOf("on")===0){if(r.has(s)||r.set(s,[]),typeof u=="function"){var l;(l=r.get(s))==null||l.push(u),i[s]=function(){for(var c,f=arguments.length,p=new Array(f),d=0;d<f;d++)p[d]=arguments[d];return(c=r.get(s))==null?void 0:c.map(m=>m(...p)).find(m=>m!==void 0)}}}else i[s]=u}),i),{})}}function u5(e){e===void 0&&(e=[]);const t=e,n=x.useCallback(a=>op(a,e,"reference"),t),r=x.useCallback(a=>op(a,e,"floating"),t),i=x.useCallback(a=>op(a,e,"item"),e.map(a=>a==null?void 0:a.item));return x.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])}let hx=!1;function yu(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function mx(e,t){return yu(t,e===Xd||e===cu,e===ga||e===Yo)}function sp(e,t,n){return yu(t,e===cu,n?e===ga:e===Yo)||e==="Enter"||e==" "||e===""}function c5(e,t,n){return yu(t,n?e===ga:e===Yo,e===cu)}function vx(e,t,n){return yu(t,n?e===Yo:e===ga,e===Xd)}function f5(e,t){const{open:n,onOpenChange:r,refs:i,elements:{domReference:a,floating:o}}=e,{listRef:s,activeIndex:u,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:f=null,allowEscape:p=!1,loop:d=!1,nested:m=!1,rtl:h=!1,virtual:y=!1,focusItemOnOpen:v="auto",focusItemOnHover:b=!0,openOnArrowKeyDown:w=!0,disabledIndices:k=void 0,orientation:E="vertical",cols:_=1,scrollItemIntoView:C=!0,virtualItemRef:z}=t;process.env.NODE_ENV!=="production"&&(p&&(d||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),y||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),E==="vertical"&&_>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const B=rx(),T=pu(),A=ai(l),W=x.useRef(v),F=x.useRef(f??-1),L=x.useRef(null),N=x.useRef(!0),q=x.useRef(A),Y=x.useRef(!!o),H=x.useRef(!1),I=x.useRef(!1),g=ii(k),P=ii(n),V=ii(C),[S,Z]=x.useState(),[J,G]=x.useState(),X=ai(function(Q,ee,K){K===void 0&&(K=!1);const pe=Q.current[ee.current];pe&&(y?(Z(pe.id),T==null||T.events.emit("virtualfocus",pe),z&&(z.current=pe)):Nr(pe,{preventScroll:!0,sync:jF()&&$0()?hx||H.current:!1}),requestAnimationFrame(()=>{const ge=V.current;ge&&pe&&(K||!N.current)&&(pe.scrollIntoView==null||pe.scrollIntoView(typeof ge=="boolean"?{block:"nearest",inline:"nearest"}:ge))}))});Bt(()=>{document.createElement("div").focus({get preventScroll(){return hx=!0,!1}})},[]),Bt(()=>{c&&(n&&o?W.current&&f!=null&&(I.current=!0,A(f)):Y.current&&(F.current=-1,q.current(null)))},[c,n,o,f,A]),Bt(()=>{if(c&&n&&o)if(u==null){if(H.current=!1,f!=null)return;if(Y.current&&(F.current=-1,X(s,F)),!Y.current&&W.current&&(L.current!=null||W.current===!0&&L.current==null)){let Q=0;const ee=()=>{s.current[0]==null?(Q<2&&(Q?requestAnimationFrame:queueMicrotask)(ee),Q++):(F.current=L.current==null||sp(L.current,E,h)||m?Qd(s,g.current):ex(s,g.current),L.current=null,A(F.current))};ee()}}else Jo(s,u)||(F.current=u,X(s,F,I.current),I.current=!1)},[c,n,o,u,f,m,s,E,h,A,X,g]),Bt(()=>{var Q,ee;if(!c||o||!T||y||!Y.current)return;const K=T.nodesRef.current,pe=(Q=K.find(M=>M.id===B))==null||(ee=Q.context)==null?void 0:ee.elements.floating,ge=ei(Vn(o)),Ie=K.some(M=>M.context&&yn(M.context.elements.floating,ge));pe&&!Ie&&N.current&&pe.focus({preventScroll:!0})},[c,o,T,B,y]),Bt(()=>{if(!c||!T||!y||B)return;function Q(ee){G(ee.id),z&&(z.current=ee)}return T.events.on("virtualfocus",Q),()=>{T.events.off("virtualfocus",Q)}},[c,T,y,B,z]),Bt(()=>{q.current=A,Y.current=!!o}),Bt(()=>{n||(L.current=null)},[n]);const ae=u!=null,se=x.useMemo(()=>{function Q(K){if(!n)return;const pe=s.current.indexOf(K);pe!==-1&&A(pe)}return{onFocus(K){let{currentTarget:pe}=K;Q(pe)},onClick:K=>{let{currentTarget:pe}=K;return pe.focus({preventScroll:!0})},...b&&{onMouseMove(K){let{currentTarget:pe}=K;Q(pe)},onPointerLeave(K){let{pointerType:pe}=K;!N.current||pe==="touch"||(F.current=-1,X(s,F),A(null),y||Nr(i.floating.current,{preventScroll:!0}))}}}},[n,i,X,b,s,A,y]);return x.useMemo(()=>{if(!c)return{};const Q=g.current;function ee(M){if(N.current=!1,H.current=!0,!P.current&&M.currentTarget===i.floating.current)return;if(m&&vx(M.key,E,h)){Jt(M),r(!1,M.nativeEvent),pa(a)&&!y&&a.focus();return}const ie=F.current,ce=Qd(s,Q),oe=ex(s,Q);if(M.key==="Home"&&(Jt(M),F.current=ce,A(F.current)),M.key==="End"&&(Jt(M),F.current=oe,A(F.current)),!(_>1&&(F.current=FL(s,{event:M,orientation:E,loop:d,cols:_,disabledIndices:Q,minIndex:ce,maxIndex:oe,prevIndex:F.current,stopEvent:!0}),A(F.current),E==="both"))&&mx(M.key,E)){if(Jt(M),n&&!y&&ei(M.currentTarget.ownerDocument)===M.currentTarget){F.current=sp(M.key,E,h)?ce:oe,A(F.current);return}sp(M.key,E,h)?d?F.current=ie>=oe?p&&ie!==s.current.length?-1:ce:rn(s,{startingIndex:ie,disabledIndices:Q}):F.current=Math.min(oe,rn(s,{startingIndex:ie,disabledIndices:Q})):d?F.current=ie<=ce?p&&ie!==-1?s.current.length:oe:rn(s,{startingIndex:ie,decrement:!0,disabledIndices:Q}):F.current=Math.max(ce,rn(s,{startingIndex:ie,decrement:!0,disabledIndices:Q})),Jo(s,F.current)?A(null):A(F.current)}}function K(M){v==="auto"&&O0(M.nativeEvent)&&(W.current=!0)}function pe(M){W.current=v,v==="auto"&&C0(M.nativeEvent)&&(W.current=!0)}const ge=y&&n&&ae&&{"aria-activedescendant":J||S},Ie=s.current.find(M=>(M==null?void 0:M.id)===S);return{reference:{...ge,onKeyDown(M){N.current=!1;const ie=M.key.indexOf("Arrow")===0,ce=c5(M.key,E,h),oe=vx(M.key,E,h),Oe=mx(M.key,E),Ee=(m?ce:Oe)||M.key==="Enter"||M.key.trim()==="";if(y&&n){const fe=T==null?void 0:T.nodesRef.current.find(D=>D.parentId==null),U=T&&fe?VL(T.nodesRef.current,fe.id):null;if(ie&&U&&z){const D=new KeyboardEvent("keydown",{key:M.key,bubbles:!0});if(ce||oe){var Re,He;const ne=((Re=U.context)==null?void 0:Re.elements.domReference)===M.currentTarget,he=oe&&!ne?(He=U.context)==null?void 0:He.elements.domReference:ce?Ie:null;he&&(Jt(M),he.dispatchEvent(D),G(void 0))}if(Oe&&U.context&&U.context.open&&U.parentId&&M.currentTarget!==U.context.elements.domReference){var te;Jt(M),(te=U.context.elements.domReference)==null||te.dispatchEvent(D);return}}return ee(M)}if(!(!n&&!w&&ie)){if(Ee&&(L.current=m&&Oe?null:M.key),m){ce&&(Jt(M),n?(F.current=Qd(s,Q),A(F.current)):r(!0,M.nativeEvent));return}Oe&&(f!=null&&(F.current=f),Jt(M),!n&&w?r(!0,M.nativeEvent):ee(M),n&&A(F.current))}},onFocus(){n&&A(null)},onPointerDown:pe,onMouseDown:K,onClick:K},floating:{"aria-orientation":E==="both"?void 0:E,...ge,onKeyDown:ee,onPointerMove(){N.current=!0}},item:se}},[a,i,S,J,g,P,s,c,E,h,y,n,ae,m,f,w,p,_,d,v,A,r,se,T,z])}function d5(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:i=!0,role:a="dialog"}=t,o=tp();return x.useMemo(()=>{const s={id:r,role:a};return i?a==="tooltip"?{reference:{"aria-describedby":n?r:void 0},floating:s}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":n?r:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:o}},floating:{...s,...a==="menu"&&{"aria-labelledby":o}}}:{}},[i,a,n,r,o])}function p5(e,t){var n;const{open:r,dataRef:i}=e,{listRef:a,activeIndex:o,onMatch:s,onTypingChange:u,enabled:l=!0,findMatch:c=null,resetMs:f=750,ignoreKeys:p=[],selectedIndex:d=null}=t,m=x.useRef(),h=x.useRef(""),y=x.useRef((n=d??o)!=null?n:-1),v=x.useRef(null),b=ai(s),w=ai(u),k=ii(c),E=ii(p);return Bt(()=>{r&&(clearTimeout(m.current),v.current=null,h.current="")},[r]),Bt(()=>{if(r&&h.current===""){var _;y.current=(_=d??o)!=null?_:-1}},[r,d,o]),x.useMemo(()=>{if(!l)return{};function _(B){B?i.current.typing||(i.current.typing=B,w(B)):i.current.typing&&(i.current.typing=B,w(B))}function C(B,T,A){const W=k.current?k.current(T,A):T.find(F=>(F==null?void 0:F.toLocaleLowerCase().indexOf(A.toLocaleLowerCase()))===0);return W?B.indexOf(W):-1}function z(B){const T=a.current;if(h.current.length>0&&h.current[0]!==" "&&(C(T,T,h.current)===-1?_(!1):B.key===" "&&Jt(B)),T==null||E.current.includes(B.key)||B.key.length!==1||B.ctrlKey||B.metaKey||B.altKey)return;r&&B.key!==" "&&(Jt(B),_(!0)),T.every(L=>{var N,q;return L?((N=L[0])==null?void 0:N.toLocaleLowerCase())!==((q=L[1])==null?void 0:q.toLocaleLowerCase()):!0})&&h.current===B.key&&(h.current="",y.current=v.current),h.current+=B.key,clearTimeout(m.current),m.current=setTimeout(()=>{h.current="",y.current=v.current,_(!1)},f);const W=y.current,F=C(T,[...T.slice((W||0)+1),...T.slice(0,(W||0)+1)],h.current);F!==-1?(b(F),v.current=F):B.key!==" "&&(h.current="",_(!1))}return{reference:{onKeyDown:z},floating:{onKeyDown:z,onKeyUp(B){B.key===" "&&_(!1)}}}},[l,r,i,a,f,E,k,b,w])}const h5=({options:e,reusable:t,sendMessage:n,isReadOnly:r})=>{var L,N,q,Y,H;const i=Kl(I=>I.messageContainerRef),[a,o]=x.useState(!1),[s,u]=x.useState(null),[l,c]=x.useState(null),{message:{blocks:{dropdown:f}}}=st,p=e.reduce((I,g)=>(I[g.label]=g.value,I),{}),d=p?Object.keys(p):[],m=I=>{o(l!==null&&!t?!1:I)},{refs:h,floatingStyles:y,context:v}=l5({placement:"bottom-start",open:a,onOpenChange:m,whileElementsMounted:fL,middleware:[yL(5),gL({padding:10,boundary:(i==null?void 0:i.current)??void 0,crossAxis:!0}),bL({apply({rects:I,elements:g,availableHeight:P}){Object.assign(g.floating.style,{maxHeight:`${P}px`,minWidth:`${I.reference.width}px`})},padding:10})]}),b=x.useRef([]),w=x.useRef(d),k=x.useRef(!1),E=n5(v,{event:"mousedown"}),_=s5(v),C=d5(v,{role:"listbox"}),z=f5(v,{listRef:b,activeIndex:s,selectedIndex:l,onNavigate:u,loop:!0}),B=p5(v,{listRef:w,activeIndex:s,selectedIndex:l,onMatch:a?u:c,onTypingChange(I){k.current=I}}),{getReferenceProps:T,getFloatingProps:A,getItemProps:W}=u5([_,C,z,B,E]),F=I=>{c(I),d[I]!==void 0&&(n==null||n({type:"text",text:d[I]??"",value:p[d[I]]??""})),o(!1)};return $.jsxs($.Fragment,{children:[$.jsxs("div",{tabIndex:0,ref:h.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":l!==null&&!t?"":void 0,style:r?{pointerEvents:"none"}:void 0,...(L=f.button)==null?void 0:L.container,...T(),children:[$.jsx("span",{...(N=f.button)==null?void 0:N.text,children:"Select..."}),$.jsx(kM,{...(q=f.button)==null?void 0:q.icon})]}),a&&$.jsx(QL,{children:$.jsx(t5,{context:v,modal:!1,children:$.jsx("div",{ref:h.setFloating,className:(H=(Y=f.content)==null?void 0:Y.container)==null?void 0:H.className,style:{...y},...A(),children:d.map((I,g)=>{var P;return $.jsx("div",{ref:V=>{b.current[g]=V},role:"option",tabIndex:g===s?0:-1,"aria-selected":g===l&&g===s,"data-active":g===s?"":void 0,...(P=f.content)==null?void 0:P.item,...W({onClick(){F(g)},onKeyDown(V){V.key==="Enter"&&(V.preventDefault(),F(g)),V.key===" "&&!k.current&&(V.preventDefault(),F(g))}}),children:I},I)})})})})]})},yx=j.forwardRef(({title:e,url:t,isReadOnly:n,...r},i)=>{const{message:{blocks:{file:a}}}=st;return $.jsxs("a",{...r,...a.container,href:t,style:n?{pointerEvents:"none"}:void 0,download:!0,ref:i,target:"_blank",rel:"noreferrer",children:[$.jsx("p",{...a.title,children:e||t}),$.jsx(OM,{...a.icon})]})});yx.displayName="File";const m5=ua()((e,t)=>({components:{},getCustomComponent:async n=>{const r=t().components[n];if(r)return r;const i=await fetch(n).then(l=>l.text()),a=new Blob([i],{type:"application/javascript"}),s=await import(URL.createObjectURL(a)),u=()=>s.default;return e(l=>({components:{...l.components,[n]:u}})),u}}));globalThis.React=j;const gx={audio:c0,bubble:n0,button:vM,carousel:S0,column:d0,dropdown:h5,file:yx,image:l0,location:f0,row:p0,text:J2,video:u0,custom:({url:e,name:t,data:n,...r})=>{const i=m5(l=>l.getCustomComponent),[a,o]=j.useState(null),[s,u]=j.useState(null);return j.useEffect(()=>{i(e).then(o).catch(l=>{u(l.message)})},[e]),s?$.jsx("div",{style:{color:"red"},children:s}):a?$.jsx(a,{...n,...r}):null}},xa=({block:e,renderers:t,...n})=>{const r=(t==null?void 0:t[e.type])??gx[e.type],i={...n,...e};return $.jsx(r,{...i})};function v5({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M8 14a.75.75 0 0 1-.75-.75V4.56L4.03 7.78a.75.75 0 0 1-1.06-1.06l4.5-4.5a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1-1.06 1.06L8.75 4.56v8.69A.75.75 0 0 1 8 14Z",clipRule:"evenodd"}))}const y5=x.forwardRef(v5);function g5({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{d:"M8 1a2 2 0 0 0-2 2v4a2 2 0 1 0 4 0V3a2 2 0 0 0-2-2Z"}),x.createElement("path",{d:"M4.5 7A.75.75 0 0 0 3 7a5.001 5.001 0 0 0 4.25 4.944V13.5h-1.5a.75.75 0 0 0 0 1.5h4.5a.75.75 0 0 0 0-1.5h-1.5v-1.556A5.001 5.001 0 0 0 13 7a.75.75 0 0 0-1.5 0 3.5 3.5 0 1 1-7 0Z"}))}const b5=x.forwardRef(g5);function bx(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=bx(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function es(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=bx(e))&&(r&&(r+=" "),r+=t);return r}const w5=({disabled:e,onFileSelected:t})=>{const n=j.useRef(null),{container:r,icon:i}=st.composer.uploadButton,a=()=>{var s;n.current&&((s=n.current)==null||s.click())},o=async s=>{var l;const u=(l=s.target.files)==null?void 0:l[0];u&&t(u)};return $.jsxs($.Fragment,{children:[$.jsx("button",{type:"button",disabled:e,...r,children:$.jsx($F,{...i,onClick:a})}),$.jsx("input",{value:"",type:"file",ref:n,style:{display:"none"},onChange:o})]})};function x5({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"}))}const S5=x.forwardRef(x5);function E5({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"}))}const _5=x.forwardRef(E5);function k5({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.114 5.636a9 9 0 0 1 0 12.728M16.463 8.288a5.25 5.25 0 0 1 0 7.424M6.75 8.25l4.72-4.72a.75.75 0 0 1 1.28.53v15.88a.75.75 0 0 1-1.28.53l-4.72-4.72H4.51c-.88 0-1.704-.507-1.938-1.354A9.009 9.009 0 0 1 2.25 12c0-.83.112-1.633.322-2.396C2.806 8.756 3.63 8.25 4.51 8.25H6.75Z"}))}const T5=x.forwardRef(k5);function O5({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m15.75 10.5 4.72-4.72a.75.75 0 0 1 1.28.53v11.38a.75.75 0 0 1-1.28.53l-4.72-4.72M4.5 18.75h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25h-9A2.25 2.25 0 0 0 2.25 7.5v9a2.25 2.25 0 0 0 2.25 2.25Z"}))}const C5=x.forwardRef(O5);function $5({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const wx=x.forwardRef($5),I5=({name:e,type:t,instance:n,status:r,removeFile:i})=>{const{loader:a,fileIcon:o,removeIcon:s,errorIcon:u,previewImage:l}=st.composer.fileWidget,c=["PNG","JPEG","JPG"].includes(bu(e)),f=j.useMemo(()=>c?URL.createObjectURL(n):"",[n]);return r==="loading"?$.jsx(gu,{name:e,status:r,removeButton:$.jsx("div",{...a}),extension:bu(e),children:$.jsx("div",{...o.container,children:$.jsx(lp,{type:t,...o.icon})})}):r==="error"?$.jsx(gu,{name:e,status:r,removeButton:$.jsx(Dd,{onClick:()=>i(e),...s}),extension:"Upload Error",children:$.jsxs("div",{...o.container,children:[$.jsx($M,{...u}),$.jsx(lp,{type:t,...o.icon})]})}):r=="uploaded"&&c?$.jsx(gu,{name:e,status:r,removeButton:$.jsx(Dd,{onClick:()=>i(e),...s}),extension:bu(e),children:$.jsx("div",{...o.container,children:$.jsx("img",{src:f,alt:e,...l})})}):$.jsx(gu,{name:e,status:r,removeButton:$.jsx(Dd,{onClick:()=>i(e),...s}),extension:bu(e),children:$.jsx("div",{...o.container,children:$.jsx(lp,{type:t,...o.icon})})})},gu=({name:e,status:t,removeButton:n,children:r,extension:i})=>{const{container:a,metadata:o}=st.composer.fileWidget;return $.jsxs("div",{"data-status":t,title:e,...a,children:[n,r,$.jsxs("div",{...o.container,children:[$.jsx("div",{...o.name,children:e}),$.jsx("div",{...o.type,children:i})]})]})},lp=({type:e,...t})=>e==="image"?$.jsx(_5,{...t}):e==="video"?$.jsx(C5,{...t}):e==="audio"?$.jsx(T5,{...t}):$.jsx(S5,{...t}),bu=e=>{const t=e.split(".").pop();return t?t.toUpperCase():"File"};function up(){return up=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},up.apply(null,arguments)}function R5(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}var A5=j.useLayoutEffect,P5=function(t){var n=x.useRef(t);return A5(function(){n.current=t}),n},xx=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},D5=function(t,n){var r=j.useRef();return j.useCallback(function(i){t.current=i,r.current&&xx(r.current,null),r.current=n,n&&xx(n,i)},[n])},Sx={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},j5=function(t){Object.keys(Sx).forEach(function(n){t.style.setProperty(n,Sx[n],"important")})},Ex=j5,dn=null,_x=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function N5(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),dn||(dn=document.createElement("textarea"),dn.setAttribute("tabindex","-1"),dn.setAttribute("aria-hidden","true"),Ex(dn)),dn.parentNode===null&&document.body.appendChild(dn);var i=e.paddingSize,a=e.borderSize,o=e.sizingStyle,s=o.boxSizing;Object.keys(o).forEach(function(p){var d=p;dn.style[d]=o[d]}),Ex(dn),dn.value=t;var u=_x(dn,e);dn.value=t,u=_x(dn,e),dn.value="x";var l=dn.scrollHeight-i,c=l*n;s==="border-box"&&(c=c+i+a),u=Math.max(c,u);var f=l*r;return s==="border-box"&&(f=f+i+a),u=Math.min(f,u),[u,l]}var kx=function(){},M5=function(t,n){return t.reduce(function(r,i){return r[i]=n[i],r},{})},F5=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],L5=!!document.documentElement.currentStyle,B5=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=M5(F5,n),i=r.boxSizing;if(i==="")return null;L5&&i==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var a=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),o=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:a,borderSize:o}},U5=B5;function Tx(e,t,n){var r=P5(n);x.useLayoutEffect(function(){var i=function(o){return r.current(o)};if(e)return e.addEventListener(t,i),function(){return e.removeEventListener(t,i)}},[])}var z5=function(t){Tx(window,"resize",t)},q5=function(t){Tx(document.fonts,"loadingdone",t)},W5=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],V5=function(t,n){var r=t.cacheMeasurements,i=t.maxRows,a=t.minRows,o=t.onChange,s=o===void 0?kx:o,u=t.onHeightChange,l=u===void 0?kx:u,c=R5(t,W5),f=c.value!==void 0,p=x.useRef(null),d=D5(p,n),m=x.useRef(0),h=x.useRef(),y=function(){var w=p.current,k=r&&h.current?h.current:U5(w);if(k){h.current=k;var E=N5(k,w.value||w.placeholder||"x",a,i),_=E[0],C=E[1];m.current!==_&&(m.current=_,w.style.setProperty("height",_+"px","important"),l(_,{rowHeight:C}))}},v=function(w){f||y(),s(w)};return x.useLayoutEffect(y),z5(y),q5(y),x.createElement("textarea",up({},c,{onChange:v,ref:d}))},H5=x.forwardRef(V5);const Z5=({inputRef:e,composerPlaceholder:t,composerDisabled:n,textInput:r,historyIndex:i,setTextInput:a,setHistoryIndex:o,sendComposerMessage:s})=>{const u=e0(c=>c.messageHistory),{input:l}=st.composer;return $.jsx(H5,{...l,ref:e,placeholder:t??"Type your message...",disabled:n,value:r,"data-has-value":!!r,onChange:c=>a(c.target.value),maxRows:5,onKeyDown:c=>{n||(c.key==="Enter"&&c.shiftKey?(c.preventDefault(),a(`${r}
97
- `)):c.key==="Enter"&&(c.preventDefault(),s()),c.key==="ArrowUp"&&(c.preventDefault(),i<u.length-1&&a(u[i+1]??""),o(Math.min(i+1,u.length-1))),c.key==="ArrowDown"&&(c.preventDefault(),a(i===0?"":u[i-1]??""),o(Math.max(i-1,-1))))}})},K5=({textInput:e,setTextInput:t})=>{const[n,r]=j.useState(!1),i=j.useRef(null),{icon:a,container:o}=st.composer.voiceButton,s=window.SpeechRecognition||window.webkitSpeechRecognition,u=()=>{i.current||(i.current=new s);const l=i.current;l&&(l.continuous=!0,l.onresult=c=>{var p,d,m;const f=((m=(d=(p=c.results)==null?void 0:p[0])==null?void 0:d[0])==null?void 0:m.transcript)??"";t(f??""),l.stop(),r(!1)},n?(l.stop(),r(!1)):(l.start(),r(!0)))};if(s)return $.jsx("button",{...o,type:"button","aria-label":"Activate voice input",disabled:!!e,onClick:u,"data-listens":!!n,children:$.jsx(b5,{...a})})},Ox=j.memo(j.forwardRef(({className:e,inputRef:t,disableComposer:n,isReadOnly:r,allowFileUpload:i,connected:a,composerPlaceholder:o,showPoweredBy:s,sendMessage:u,uploadFile:l,...c},f)=>{const{composer:p}=st,d=n||r||!a,[m,h]=j.useState(""),[y,v]=j.useState(-1),b=zo(B=>B.files),w=zo(B=>B.setFiles),k=zo(B=>B.deleteFile),E=zo(B=>B.uploadFile),_=e0(B=>B.addMessageToHistory),C=m||b.filter(B=>B.status==="uploaded").length>0,z=()=>{const B=b.filter(W=>W.status==="uploaded");if(!B.length&&!m)return;const T=(B==null?void 0:B.map(W=>{const F=W.url,L=W.type;return{video:{type:"video",videoUrl:F},audio:{type:"audio",audioUrl:F},image:{type:"image",imageUrl:F}}[L]??{title:W.name,type:"file",fileUrl:F}}))??[];m&&T.push({type:"text",text:m});let A;T.length==1?A=T[0]:A={type:"bloc",items:T.map(F=>{const{type:L,...N}=F;return{type:L,payload:N}})},u==null||u(A),w([]),h(""),_(m),v(-1)};return r?null:$.jsxs($.Fragment,{children:[$.jsxs("div",{"data-disabled":d,...c,className:es(p.container.className,e),ref:f,children:[b.length>0&&$.jsx("div",{...p==null?void 0:p.fileContainer,children:b.map(B=>$.jsx(I5,{...B,removeFile:k},B.name))}),$.jsxs("div",{...p.inputContainer,children:[i&&$.jsx(w5,{disabled:d||!l,onFileSelected:B=>{l&&E(B,l)}}),$.jsx(Z5,{inputRef:t,composerPlaceholder:o,composerDisabled:d,textInput:m,historyIndex:y,setTextInput:h,setHistoryIndex:v,sendComposerMessage:z}),C&&$.jsx("button",{type:"button","aria-label":"Send message",...p.button.container,disabled:d,onClick:()=>z(),children:$.jsx(y5,{...p.button.icon})}),!C&&$.jsx(K5,{textInput:m,setTextInput:h})]})]}),$.jsx("a",{...p.poweredBy,"data-hidden":s===!1,hidden:s===!1,href:"https://botpress.com/?from=webchat",target:"_blank",rel:"noopener noreferrer",children:"⚡ by Botpress"})]})}));var cp={exports:{}},wu={exports:{}},ct={};/** @license React v16.13.1
96
+ */var m5=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Sp=m5.join(","),Ix=typeof Element>"u",cs=Ix?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ou=!Ix&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},$u=function e(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),a=i===""||i==="true",o=a||n&&t&&e(t.parentNode);return o},v5=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},y5=function(t,n,r){if($u(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Sp));return n&&cs.call(t,Sp)&&i.unshift(t),i=i.filter(r),i},g5=function e(t,n,r){for(var i=[],a=Array.from(t);a.length;){var o=a.shift();if(!$u(o,!1))if(o.tagName==="SLOT"){var s=o.assignedElements(),u=s.length?s:o.children,l=e(u,!0,r);r.flatten?i.push.apply(i,l):i.push({scopeParent:o,candidates:l})}else{var c=cs.call(o,Sp);c&&r.filter(o)&&(n||!t.includes(o))&&i.push(o);var f=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),d=!$u(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(f&&d){var p=e(f===!0?o.children:f.children,!0,r);r.flatten?i.push.apply(i,p):i.push({scopeParent:o,candidates:p})}else a.unshift.apply(a,o.children)}}return i},Rx=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Ax=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||v5(t))&&!Rx(t)?0:t.tabIndex},b5=function(t,n){var r=Ax(t);return r<0&&n&&!Rx(t)?0:r},w5=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Px=function(t){return t.tagName==="INPUT"},x5=function(t){return Px(t)&&t.type==="hidden"},S5=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},E5=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},_5=function(t){if(!t.name)return!0;var n=t.form||Ou(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var a=E5(i,t.form);return!a||a===t},k5=function(t){return Px(t)&&t.type==="radio"},T5=function(t){return k5(t)&&!_5(t)},C5=function(t){var n,r=t&&Ou(t),i=(n=r)===null||n===void 0?void 0:n.host,a=!1;if(r&&r!==t){var o,s,u;for(a=!!((o=i)!==null&&o!==void 0&&(s=o.ownerDocument)!==null&&s!==void 0&&s.contains(i)||t!=null&&(u=t.ownerDocument)!==null&&u!==void 0&&u.contains(t));!a&&i;){var l,c,f;r=Ou(i),i=(l=r)===null||l===void 0?void 0:l.host,a=!!((c=i)!==null&&c!==void 0&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(i))}}return a},Dx=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},O5=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var a=cs.call(t,"details>summary:first-of-type"),o=a?t.parentElement:t;if(cs.call(o,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var s=t;t;){var u=t.parentElement,l=Ou(t);if(u&&!u.shadowRoot&&i(u)===!0)return Dx(t);t.assignedSlot?t=t.assignedSlot:!u&&l!==t.ownerDocument?t=l.host:t=u}t=s}if(C5(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Dx(t);return!1},$5=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return cs.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},I5=function(t,n){return!(n.disabled||$u(n)||x5(n)||O5(n,t)||S5(n)||$5(n))},jx=function(t,n){return!(T5(n)||Ax(n)<0||!I5(t,n))},R5=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},A5=function e(t){var n=[],r=[];return t.forEach(function(i,a){var o=!!i.scopeParent,s=o?i.scopeParent:i,u=b5(s,o),l=o?e(i.candidates):s;u===0?o?n.push.apply(n,l):n.push(s):r.push({documentOrder:a,tabIndex:u,item:i,isScope:o,content:l})}),r.sort(w5).reduce(function(i,a){return a.isScope?i.push.apply(i,a.content):i.push(a.content),i},[]).concat(n)},Ep=function(t,n){n=n||{};var r;return n.getShadowRoot?r=g5([t],n.includeContainer,{filter:jx.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:R5}):r=y5(t,n.includeContainer,jx.bind(null,n)),A5(r)};const _p="ArrowUp",Iu="ArrowDown",Ia="ArrowLeft",fs="ArrowRight";function Ru(e,t,n){return Math.floor(e/t)!==n}function ds(e,t){return t<0||t>=e.current.length}function kp(e,t){return un(e,{disabledIndices:t})}function Nx(e,t){return un(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function un(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:a=1}=t===void 0?{}:t;const o=e.current;let s=n;do{var u,l;s=s+(r?-a:a)}while(s>=0&&s<=o.length-1&&(i?i.includes(s):o[s]==null||(u=o[s])!=null&&u.hasAttribute("disabled")||((l=o[s])==null?void 0:l.getAttribute("aria-disabled"))==="true"));return s}function P5(e,t){let{event:n,orientation:r,loop:i,cols:a,disabledIndices:o,minIndex:s,maxIndex:u,prevIndex:l,stopEvent:c=!1}=t,f=l;if(n.key===_p){if(c&&nn(n),l===-1)f=u;else if(f=un(e,{startingIndex:f,amount:a,decrement:!0,disabledIndices:o}),i&&(l-a<s||f<0)){const d=l%a,p=u%a,m=u-(p-d);p===d?f=u:f=p>d?m:m-a}ds(e,f)&&(f=l)}if(n.key===Iu&&(c&&nn(n),l===-1?f=s:(f=un(e,{startingIndex:l,amount:a,disabledIndices:o}),i&&l+a>u&&(f=un(e,{startingIndex:l%a-a,amount:a,disabledIndices:o}))),ds(e,f)&&(f=l)),r==="both"){const d=ax(l/a);n.key===fs&&(c&&nn(n),l%a!==a-1?(f=un(e,{startingIndex:l,disabledIndices:o}),i&&Ru(f,a,d)&&(f=un(e,{startingIndex:l-l%a-1,disabledIndices:o}))):i&&(f=un(e,{startingIndex:l-l%a-1,disabledIndices:o})),Ru(f,a,d)&&(f=l)),n.key===Ia&&(c&&nn(n),l%a!==0?(f=un(e,{startingIndex:l,disabledIndices:o,decrement:!0}),i&&Ru(f,a,d)&&(f=un(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:o}))):i&&(f=un(e,{startingIndex:l+(a-l%a),decrement:!0,disabledIndices:o})),Ru(f,a,d)&&(f=l));const p=ax(u/a)===d;ds(e,f)&&(i&&p?f=n.key===Ia?u:un(e,{startingIndex:l-l%a-1,disabledIndices:o}):f=l)}return f}let Mx=0;function Wr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(Mx);const a=()=>e==null?void 0:e.focus({preventScroll:n});i?a():Mx=requestAnimationFrame(a)}var Wt=typeof document<"u"?j.useLayoutEffect:j.useEffect;function Au(){return Au=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Au.apply(this,arguments)}let Tp=!1,D5=0;const Fx=()=>"floating-ui-"+D5++;function j5(){const[e,t]=x.useState(()=>Tp?Fx():void 0);return Wt(()=>{e==null&&t(Fx())},[]),x.useEffect(()=>{Tp||(Tp=!0)},[]),e}const Cp=x.useId||j5;function N5(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(i=>i!==n))||[])}}}const M5=x.createContext(null),F5=x.createContext(null),Lx=()=>{var e;return((e=x.useContext(M5))==null?void 0:e.id)||null},Pu=()=>x.useContext(F5);function ps(e){return"data-floating-ui-"+e}function hi(e){const t=j.useRef(e);return Wt(()=>{t.current=e}),t}function L5(e,t){var n;let r=[],i=(n=e.find(a=>a.id===t))==null?void 0:n.parentId;for(;i;){const a=e.find(o=>o.id===i);i=a==null?void 0:a.parentId,a&&(r=r.concat(a))}return r}function Ra(e,t){let n=e.filter(i=>{var a;return i.parentId===t&&((a=i.context)==null?void 0:a.open)}),r=n;for(;r.length;)r=e.filter(i=>{var a;return(a=r)==null?void 0:a.some(o=>{var s;return i.parentId===o.id&&((s=i.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function B5(e,t){let n,r=-1;function i(a,o){o>r&&(n=a,r=o),Ra(e,a).forEach(u=>{i(u.id,o+1)})}return i(t,0),e.find(a=>a.id===n)}let Aa=new WeakMap,Du=new WeakSet,ju={},Op=0;const U5=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Bx=e=>e&&(e.host||Bx(e.parentNode)),z5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Bx(n);return e.contains(r)?r:null}).filter(n=>n!=null);function q5(e,t,n,r){const i="data-floating-ui-inert",a=r?"inert":n?"aria-hidden":null,o=z5(t,e),s=new Set,u=new Set(o),l=[];ju[i]||(ju[i]=new WeakMap);const c=ju[i];o.forEach(f),d(t),s.clear();function f(p){!p||s.has(p)||(s.add(p),p.parentNode&&f(p.parentNode))}function d(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,m=>{if(s.has(m))d(m);else{const h=a?m.getAttribute(a):null,y=h!==null&&h!=="false",v=(Aa.get(m)||0)+1,b=(c.get(m)||0)+1;Aa.set(m,v),c.set(m,b),l.push(m),v===1&&y&&Du.add(m),b===1&&m.setAttribute(i,""),!y&&a&&m.setAttribute(a,"true")}})}return Op++,()=>{l.forEach(p=>{const m=(Aa.get(p)||0)-1,h=(c.get(p)||0)-1;Aa.set(p,m),c.set(p,h),m||(!Du.has(p)&&a&&p.removeAttribute(a),Du.delete(p)),h||p.removeAttribute(i)}),Op--,Op||(Aa=new WeakMap,Aa=new WeakMap,Du=new WeakSet,ju={})}}function Ux(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Jn(e[0]).body;return q5(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const $p=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function zx(e,t){const n=Ep(e,$p());t==="prev"&&n.reverse();const r=n.indexOf(ci(Jn(e)));return n.slice(r+1)[0]}function qx(){return zx(document.body,"next")}function Wx(){return zx(document.body,"prev")}function hs(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Sn(n,r)}function W5(e){Ep(e,$p()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function V5(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const Ip={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let H5;function Vx(e){e.key==="Tab"&&(e.target,clearTimeout(H5))}const Nu=x.forwardRef(function(t,n){const[r,i]=x.useState();Wt(()=>(fx()&&i("button"),document.addEventListener("keydown",Vx),()=>{document.removeEventListener("keydown",Vx)}),[]);const a={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[ps("focus-guard")]:"",style:Ip};return x.createElement("span",Au({},t,a))}),Hx=x.createContext(null);function Z5(e){let{id:t,root:n}=e===void 0?{}:e;const[r,i]=x.useState(null),a=Cp(),o=Zx(),s=x.useMemo(()=>({id:t,root:n,portalContext:o,uniqueId:a}),[t,n,o,a]),u=x.useRef();return Wt(()=>()=>{r==null||r.remove()},[r,s]),Wt(()=>{if(u.current===s)return;u.current=s;const{id:l,root:c,portalContext:f,uniqueId:d}=s,p=l?document.getElementById(l):null,m=ps("portal");if(p){const h=document.createElement("div");h.id=d,h.setAttribute(m,""),p.appendChild(h),i(h)}else{let h=c||(f==null?void 0:f.portalNode);h&&!zn(h)&&(h=h.current),h=h||document.body;let y=null;l&&(y=document.createElement("div"),y.id=l,h.appendChild(y));const v=document.createElement("div");v.id=d,v.setAttribute(m,""),h=y||h,h.appendChild(v),i(v)}},[s]),r}function K5(e){let{children:t,id:n,root:r=null,preserveTabOrder:i=!0}=e;const a=Z5({id:n,root:r}),[o,s]=x.useState(null),u=x.useRef(null),l=x.useRef(null),c=x.useRef(null),f=x.useRef(null),d=!!o&&!o.modal&&o.open&&i&&!!(r||a);return x.useEffect(()=>{if(!a||!i||o!=null&&o.modal)return;function p(m){a&&hs(m)&&(m.type==="focusin"?V5:W5)(a)}return a.addEventListener("focusin",p,!0),a.addEventListener("focusout",p,!0),()=>{a.removeEventListener("focusin",p,!0),a.removeEventListener("focusout",p,!0)}},[a,i,o==null?void 0:o.modal]),x.createElement(Hx.Provider,{value:x.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:u,afterOutsideRef:l,beforeInsideRef:c,afterInsideRef:f,portalNode:a,setFocusManagerState:s}),[i,a])},d&&a&&x.createElement(Nu,{"data-type":"outside",ref:u,onFocus:p=>{if(hs(p,a)){var m;(m=c.current)==null||m.focus()}else{const h=Wx()||(o==null?void 0:o.refs.domReference.current);h==null||h.focus()}}}),d&&a&&x.createElement("span",{"aria-owns":a.id,style:Ip}),a&&ji.createPortal(t,a),d&&a&&x.createElement(Nu,{"data-type":"outside",ref:l,onFocus:p=>{if(hs(p,a)){var m;(m=f.current)==null||m.focus()}else{const h=qx()||(o==null?void 0:o.refs.domReference.current);h==null||h.focus(),o!=null&&o.closeOnFocusOut&&(o==null||o.onOpenChange(!1,p.nativeEvent))}}}))}const Zx=()=>x.useContext(Hx),G5=x.forwardRef(function(t,n){return x.createElement("button",Au({},t,{type:"button",ref:n,tabIndex:-1,style:Ip}))});function Y5(e){const{context:t,children:n,disabled:r=!1,order:i=["content"],guards:a=!0,initialFocus:o=0,returnFocus:s=!0,modal:u=!0,visuallyHiddenDismiss:l=!1,closeOnFocusOut:c=!0}=e,{open:f,refs:d,nodeId:p,onOpenChange:m,events:h,dataRef:y,elements:{domReference:v,floating:b}}=t,w=U5()?a:!0,T=hi(i),E=hi(o),_=hi(s),O=Pu(),z=Zx(),U=typeof o=="number"&&o<0,k=x.useRef(null),D=x.useRef(null),W=x.useRef(!1),B=x.useRef(null),I=x.useRef(!1),A=z!=null,L=v&&v.getAttribute("role")==="combobox"&&hx(v)&&U,Z=x.useCallback(function(N){return N===void 0&&(N=b),N?Ep(N,$p()):[]},[b]),H=x.useCallback(N=>{const V=Z(N);return T.current.map(S=>v&&S==="reference"?v:b&&S==="floating"?b:V).filter(Boolean).flat()},[v,b,T,Z]);x.useEffect(()=>{if(r||!u)return;function N(S){if(S.key==="Tab"){Sn(b,ci(Jn(b)))&&Z().length===0&&!L&&nn(S);const K=H(),J=px(S);T.current[0]==="reference"&&J===v&&(nn(S),S.shiftKey?Wr(K[K.length-1]):Wr(K[1])),T.current[1]==="floating"&&J===b&&S.shiftKey&&(nn(S),Wr(K[0]))}}const V=Jn(b);return V.addEventListener("keydown",N),()=>{V.removeEventListener("keydown",N)}},[r,v,b,u,T,d,L,Z,H]),x.useEffect(()=>{if(r||!c)return;function N(){I.current=!0,setTimeout(()=>{I.current=!1})}function V(S){const K=S.relatedTarget;queueMicrotask(()=>{const J=!(Sn(v,K)||Sn(b,K)||Sn(K,b)||Sn(z==null?void 0:z.portalNode,K)||K!=null&&K.hasAttribute(ps("focus-guard"))||O&&(Ra(O.nodesRef.current,p).find(Y=>{var Q,ae;return Sn((Q=Y.context)==null?void 0:Q.elements.floating,K)||Sn((ae=Y.context)==null?void 0:ae.elements.domReference,K)})||L5(O.nodesRef.current,p).find(Y=>{var Q,ae;return((Q=Y.context)==null?void 0:Q.elements.floating)===K||((ae=Y.context)==null?void 0:ae.elements.domReference)===K})));K&&J&&!I.current&&K!==B.current&&(W.current=!0,m(!1,S))})}if(b&&ka(v))return v.addEventListener("focusout",V),v.addEventListener("pointerdown",N),!u&&b.addEventListener("focusout",V),()=>{v.removeEventListener("focusout",V),v.removeEventListener("pointerdown",N),!u&&b.removeEventListener("focusout",V)}},[r,v,b,u,p,O,z,m,c]),x.useEffect(()=>{var N;if(r)return;const V=Array.from((z==null||(N=z.portalNode)==null?void 0:N.querySelectorAll("["+ps("portal")+"]"))||[]);if(b){const S=[b,...V,k.current,D.current,T.current.includes("reference")||L?v:null].filter(J=>J!=null),K=u?Ux(S,w,!w):Ux(S);return()=>{K()}}},[r,v,b,u,T,z,L,w]),Wt(()=>{if(r||!b)return;const N=Jn(b),V=ci(N);queueMicrotask(()=>{const S=H(b),K=E.current,J=(typeof K=="number"?S[K]:K.current)||b,Y=Sn(b,V);!U&&!Y&&f&&Wr(J,{preventScroll:J===b})})},[r,f,b,U,H,E]),Wt(()=>{if(r||!b)return;let N=!1;const V=Jn(b),S=ci(V),K=y.current;B.current=S;function J(Y){if(Y.type==="escapeKey"&&d.domReference.current&&(B.current=d.domReference.current),["referencePress","escapeKey"].includes(Y.type))return;const Q=Y.data.returnFocus;typeof Q=="object"?(W.current=!1,N=Q.preventScroll):W.current=!Q}return h.on("dismiss",J),()=>{h.off("dismiss",J);const Y=ci(V);(Sn(b,Y)||O&&Ra(O.nodesRef.current,p).some(ae=>{var oe;return Sn((oe=ae.context)==null?void 0:oe.elements.floating,Y)})||K.openEvent&&["click","mousedown"].includes(K.openEvent.type))&&d.domReference.current&&(B.current=d.domReference.current),_.current&&ka(B.current)&&!W.current&&Wr(B.current,{cancelPrevious:!1,preventScroll:N})}},[r,b,_,y,d,h,O,p]),Wt(()=>{if(!(r||!z))return z.setFocusManagerState({modal:u,closeOnFocusOut:c,open:f,onOpenChange:m,refs:d}),()=>{z.setFocusManagerState(null)}},[r,z,u,f,m,d,c]),Wt(()=>{if(!r&&b&&typeof MutationObserver=="function"&&!U){const N=()=>{const S=b.getAttribute("tabindex");T.current.includes("floating")||ci(Jn(b))!==d.domReference.current&&Z().length===0?S!=="0"&&b.setAttribute("tabindex","0"):S!=="-1"&&b.setAttribute("tabindex","-1")};N();const V=new MutationObserver(N);return V.observe(b,{childList:!0,subtree:!0,attributes:!0}),()=>{V.disconnect()}}},[r,b,d,T,Z,U]);function R(N){return r||!l||!u?null:x.createElement(G5,{ref:N==="start"?k:D,onClick:V=>m(!1,V.nativeEvent)},typeof l=="string"?l:"Dismiss")}const g=!r&&w&&!L&&(A||u);return x.createElement(x.Fragment,null,g&&x.createElement(Nu,{"data-type":"inside",ref:z==null?void 0:z.beforeInsideRef,onFocus:N=>{if(u){const S=H();Wr(i[0]==="reference"?S[0]:S[S.length-1])}else if(z!=null&&z.preserveTabOrder&&z.portalNode)if(W.current=!1,hs(N,z.portalNode)){const S=qx()||v;S==null||S.focus()}else{var V;(V=z.beforeOutsideRef.current)==null||V.focus()}}}),!L&&R("start"),n,R("end"),g&&x.createElement(Nu,{"data-type":"inside",ref:z==null?void 0:z.afterInsideRef,onFocus:N=>{if(u)Wr(H()[0]);else if(z!=null&&z.preserveTabOrder&&z.portalNode)if(c&&(W.current=!0),hs(N,z.portalNode)){const S=Wx()||v;S==null||S.focus()}else{var V;(V=z.afterOutsideRef.current)==null||V.focus()}}}))}function Kx(e){return ka(e.target)&&e.target.tagName==="BUTTON"}function Gx(e){return hx(e)}function J5(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:a}}=e,{enabled:o=!0,event:s="click",toggle:u=!0,ignoreMouse:l=!1,keyboardHandlers:c=!0}=t,f=x.useRef(),d=x.useRef(!1);return x.useMemo(()=>o?{reference:{onPointerDown(p){f.current=p.pointerType},onMouseDown(p){p.button===0&&(dx(f.current)&&l||s!=="click"&&(n&&u&&(!i.current.openEvent||i.current.openEvent.type==="mousedown")?r(!1,p.nativeEvent):(p.preventDefault(),r(!0,p.nativeEvent))))},onClick(p){if(s==="mousedown"&&f.current){f.current=void 0;return}dx(f.current)&&l||(n&&u&&(!i.current.openEvent||i.current.openEvent.type==="click")?r(!1,p.nativeEvent):r(!0,p.nativeEvent))},onKeyDown(p){f.current=void 0,!(p.defaultPrevented||!c||Kx(p))&&(p.key===" "&&!Gx(a)&&(p.preventDefault(),d.current=!0),p.key==="Enter"&&r(!(n&&u),p.nativeEvent))},onKeyUp(p){p.defaultPrevented||!c||Kx(p)||Gx(a)||p.key===" "&&d.current&&(d.current=!1,r(!(n&&u),p.nativeEvent))}}}:{},[o,i,s,l,c,a,u,n,r])}const X5=x.useInsertionEffect||(e=>e());function mi(e){const t=x.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return X5(()=>{t.current=e}),x.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}const Q5={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},e4={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},t4=e=>{var t,n;return{escapeKeyBubbles:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePressBubbles:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function n4(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:i,nodeId:a,elements:{reference:o,domReference:s,floating:u},dataRef:l}=e,{enabled:c=!0,escapeKey:f=!0,outsidePress:d=!0,outsidePressEvent:p="pointerdown",referencePress:m=!1,referencePressEvent:h="pointerdown",ancestorScroll:y=!1,bubbles:v}=t,b=Pu(),w=Lx()!=null,T=mi(typeof d=="function"?d:()=>!1),E=typeof d=="function"?T:d,_=x.useRef(!1),{escapeKeyBubbles:O,outsidePressBubbles:z}=t4(v),U=mi(D=>{if(!n||!c||!f||D.key!=="Escape")return;const W=b?Ra(b.nodesRef.current,a):[];if(!O&&(D.stopPropagation(),W.length>0)){let B=!0;if(W.forEach(I=>{var A;if((A=I.context)!=null&&A.open&&!I.context.dataRef.current.__escapeKeyBubbles){B=!1;return}}),!B)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,RL(D)?D.nativeEvent:D)}),k=mi(D=>{const W=_.current;if(_.current=!1,W||typeof E=="function"&&!E(D))return;const B=px(D),I="["+ps("inert")+"]",A=Jn(u).querySelectorAll(I);let L=zn(B)?B:null;for(;L&&!TL(L);){const R=OL(L);if(R===Jn(u).body||!zn(R))break;L=R}if(A.length&&zn(B)&&!AL(B)&&!Sn(B,u)&&Array.from(A).every(R=>!Sn(L,R)))return;if(ka(B)&&u){const R=B.clientWidth>0&&B.scrollWidth>B.clientWidth,g=B.clientHeight>0&&B.scrollHeight>B.clientHeight;let N=g&&D.offsetX>B.clientWidth;if(g&&CL(B).direction==="rtl"&&(N=D.offsetX<=B.offsetWidth-B.clientWidth),N||R&&D.offsetY>B.clientHeight)return}const Z=b&&Ra(b.nodesRef.current,a).some(R=>{var g;return pp(D,(g=R.context)==null?void 0:g.elements.floating)});if(pp(D,u)||pp(D,s)||Z)return;const H=b?Ra(b.nodesRef.current,a):[];if(H.length>0){let R=!0;if(H.forEach(g=>{var N;if((N=g.context)!=null&&N.open&&!g.context.dataRef.current.__outsidePressBubbles){R=!1;return}}),!R)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:w?{preventScroll:!0}:ux(D)||cx(D)}}),r(!1,D)});return x.useEffect(()=>{if(!n||!c)return;l.current.__escapeKeyBubbles=O,l.current.__outsidePressBubbles=z;function D(I){r(!1,I)}const W=Jn(u);f&&W.addEventListener("keydown",U),E&&W.addEventListener(p,k);let B=[];return y&&(zn(s)&&(B=pi(s)),zn(u)&&(B=B.concat(pi(u))),!zn(o)&&o&&o.contextElement&&(B=B.concat(pi(o.contextElement)))),B=B.filter(I=>{var A;return I!==((A=W.defaultView)==null?void 0:A.visualViewport)}),B.forEach(I=>{I.addEventListener("scroll",D,{passive:!0})}),()=>{f&&W.removeEventListener("keydown",U),E&&W.removeEventListener(p,k),B.forEach(I=>{I.removeEventListener("scroll",D)})}},[l,u,s,o,f,E,p,n,r,y,c,O,z,U,k]),x.useEffect(()=>{_.current=!1},[E,p]),x.useMemo(()=>c?{reference:{onKeyDown:U,[Q5[h]]:D=>{m&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,D.nativeEvent))}},floating:{onKeyDown:U,[e4[p]]:()=>{_.current=!0}}}:{},[c,i,m,p,h,r,U])}let Rp;process.env.NODE_ENV!=="production"&&(Rp=new Set);function r4(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:r,nodeId:i}=e;if(process.env.NODE_ENV!=="production"){var a;const O="Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";if((a=e.elements)!=null&&a.reference&&!zn(e.elements.reference)){var o;if(!((o=Rp)!=null&&o.has(O))){var s;(s=Rp)==null||s.add(O),console.error(O)}}}const[u,l]=x.useState(null),c=((t=e.elements)==null?void 0:t.reference)||u,f=f5(e),d=Pu(),p=mi((O,z)=>{O&&(h.current.openEvent=z),r==null||r(O,z)}),m=x.useRef(null),h=x.useRef({}),y=x.useState(()=>N5())[0],v=Cp(),b=x.useCallback(O=>{const z=zn(O)?{getBoundingClientRect:()=>O.getBoundingClientRect(),contextElement:O}:O;f.refs.setReference(z)},[f.refs]),w=x.useCallback(O=>{(zn(O)||O===null)&&(m.current=O,l(O)),(zn(f.refs.reference.current)||f.refs.reference.current===null||O!==null&&!zn(O))&&f.refs.setReference(O)},[f.refs]),T=x.useMemo(()=>({...f.refs,setReference:w,setPositionReference:b,domReference:m}),[f.refs,w,b]),E=x.useMemo(()=>({...f.elements,domReference:c}),[f.elements,c]),_=x.useMemo(()=>({...f,refs:T,elements:E,dataRef:h,nodeId:i,floatingId:v,events:y,open:n,onOpenChange:p}),[f,i,v,y,n,p,T,E]);return Wt(()=>{const O=d==null?void 0:d.nodesRef.current.find(z=>z.id===i);O&&(O.context=_)}),x.useMemo(()=>({...f,context:_,refs:T,elements:E}),[f,T,E,_])}function Ap(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(i=>i?i[n]:null).concat(e).reduce((i,a)=>(a&&Object.entries(a).forEach(o=>{let[s,u]=o;if(s.indexOf("on")===0){if(r.has(s)||r.set(s,[]),typeof u=="function"){var l;(l=r.get(s))==null||l.push(u),i[s]=function(){for(var c,f=arguments.length,d=new Array(f),p=0;p<f;p++)d[p]=arguments[p];return(c=r.get(s))==null?void 0:c.map(m=>m(...d)).find(m=>m!==void 0)}}}else i[s]=u}),i),{})}}function i4(e){e===void 0&&(e=[]);const t=e,n=x.useCallback(a=>Ap(a,e,"reference"),t),r=x.useCallback(a=>Ap(a,e,"floating"),t),i=x.useCallback(a=>Ap(a,e,"item"),e.map(a=>a==null?void 0:a.item));return x.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])}let Yx=!1;function Mu(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Jx(e,t){return Mu(t,e===_p||e===Iu,e===Ia||e===fs)}function Pp(e,t,n){return Mu(t,e===Iu,n?e===Ia:e===fs)||e==="Enter"||e==" "||e===""}function a4(e,t,n){return Mu(t,n?e===Ia:e===fs,e===Iu)}function Xx(e,t,n){return Mu(t,n?e===fs:e===Ia,e===_p)}function o4(e,t){const{open:n,onOpenChange:r,refs:i,elements:{domReference:a,floating:o}}=e,{listRef:s,activeIndex:u,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:f=null,allowEscape:d=!1,loop:p=!1,nested:m=!1,rtl:h=!1,virtual:y=!1,focusItemOnOpen:v="auto",focusItemOnHover:b=!0,openOnArrowKeyDown:w=!0,disabledIndices:T=void 0,orientation:E="vertical",cols:_=1,scrollItemIntoView:O=!0,virtualItemRef:z}=t;process.env.NODE_ENV!=="production"&&(d&&(p||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),y||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),E==="vertical"&&_>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const U=Lx(),k=Pu(),D=mi(l),W=x.useRef(v),B=x.useRef(f??-1),I=x.useRef(null),A=x.useRef(!0),L=x.useRef(D),Z=x.useRef(!!o),H=x.useRef(!1),R=x.useRef(!1),g=hi(T),N=hi(n),V=hi(O),[S,K]=x.useState(),[J,Y]=x.useState(),Q=mi(function(X,ee,G){G===void 0&&(G=!1);const pe=X.current[ee.current];pe&&(y?(K(pe.id),k==null||k.events.emit("virtualfocus",pe),z&&(z.current=pe)):Wr(pe,{preventScroll:!0,sync:IL()&&fx()?Yx||H.current:!1}),requestAnimationFrame(()=>{const ge=V.current;ge&&pe&&(G||!A.current)&&(pe.scrollIntoView==null||pe.scrollIntoView(typeof ge=="boolean"?{block:"nearest",inline:"nearest"}:ge))}))});Wt(()=>{document.createElement("div").focus({get preventScroll(){return Yx=!0,!1}})},[]),Wt(()=>{c&&(n&&o?W.current&&f!=null&&(R.current=!0,D(f)):Z.current&&(B.current=-1,L.current(null)))},[c,n,o,f,D]),Wt(()=>{if(c&&n&&o)if(u==null){if(H.current=!1,f!=null)return;if(Z.current&&(B.current=-1,Q(s,B)),!Z.current&&W.current&&(I.current!=null||W.current===!0&&I.current==null)){let X=0;const ee=()=>{s.current[0]==null?(X<2&&(X?requestAnimationFrame:queueMicrotask)(ee),X++):(B.current=I.current==null||Pp(I.current,E,h)||m?kp(s,g.current):Nx(s,g.current),I.current=null,D(B.current))};ee()}}else ds(s,u)||(B.current=u,Q(s,B,R.current),R.current=!1)},[c,n,o,u,f,m,s,E,h,D,Q,g]),Wt(()=>{var X,ee;if(!c||o||!k||y||!Z.current)return;const G=k.nodesRef.current,pe=(X=G.find(F=>F.id===U))==null||(ee=X.context)==null?void 0:ee.elements.floating,ge=ci(Jn(o)),Ie=G.some(F=>F.context&&Sn(F.context.elements.floating,ge));pe&&!Ie&&A.current&&pe.focus({preventScroll:!0})},[c,o,k,U,y]),Wt(()=>{if(!c||!k||!y||U)return;function X(ee){Y(ee.id),z&&(z.current=ee)}return k.events.on("virtualfocus",X),()=>{k.events.off("virtualfocus",X)}},[c,k,y,U,z]),Wt(()=>{L.current=D,Z.current=!!o}),Wt(()=>{n||(I.current=null)},[n]);const ae=u!=null,oe=x.useMemo(()=>{function X(G){if(!n)return;const pe=s.current.indexOf(G);pe!==-1&&D(pe)}return{onFocus(G){let{currentTarget:pe}=G;X(pe)},onClick:G=>{let{currentTarget:pe}=G;return pe.focus({preventScroll:!0})},...b&&{onMouseMove(G){let{currentTarget:pe}=G;X(pe)},onPointerLeave(G){let{pointerType:pe}=G;!A.current||pe==="touch"||(B.current=-1,Q(s,B),D(null),y||Wr(i.floating.current,{preventScroll:!0}))}}}},[n,i,Q,b,s,D,y]);return x.useMemo(()=>{if(!c)return{};const X=g.current;function ee(F){if(A.current=!1,H.current=!0,!N.current&&F.currentTarget===i.floating.current)return;if(m&&Xx(F.key,E,h)){nn(F),r(!1,F.nativeEvent),ka(a)&&!y&&a.focus();return}const ie=B.current,ce=kp(s,X),se=Nx(s,X);if(F.key==="Home"&&(nn(F),B.current=ce,D(B.current)),F.key==="End"&&(nn(F),B.current=se,D(B.current)),!(_>1&&(B.current=P5(s,{event:F,orientation:E,loop:p,cols:_,disabledIndices:X,minIndex:ce,maxIndex:se,prevIndex:B.current,stopEvent:!0}),D(B.current),E==="both"))&&Jx(F.key,E)){if(nn(F),n&&!y&&ci(F.currentTarget.ownerDocument)===F.currentTarget){B.current=Pp(F.key,E,h)?ce:se,D(B.current);return}Pp(F.key,E,h)?p?B.current=ie>=se?d&&ie!==s.current.length?-1:ce:un(s,{startingIndex:ie,disabledIndices:X}):B.current=Math.min(se,un(s,{startingIndex:ie,disabledIndices:X})):p?B.current=ie<=ce?d&&ie!==-1?s.current.length:se:un(s,{startingIndex:ie,decrement:!0,disabledIndices:X}):B.current=Math.max(ce,un(s,{startingIndex:ie,decrement:!0,disabledIndices:X})),ds(s,B.current)?D(null):D(B.current)}}function G(F){v==="auto"&&ux(F.nativeEvent)&&(W.current=!0)}function pe(F){W.current=v,v==="auto"&&cx(F.nativeEvent)&&(W.current=!0)}const ge=y&&n&&ae&&{"aria-activedescendant":J||S},Ie=s.current.find(F=>(F==null?void 0:F.id)===S);return{reference:{...ge,onKeyDown(F){A.current=!1;const ie=F.key.indexOf("Arrow")===0,ce=a4(F.key,E,h),se=Xx(F.key,E,h),Ce=Jx(F.key,E),Ee=(m?ce:Ce)||F.key==="Enter"||F.key.trim()==="";if(y&&n){const fe=k==null?void 0:k.nodesRef.current.find(M=>M.parentId==null),q=k&&fe?B5(k.nodesRef.current,fe.id):null;if(ie&&q&&z){const M=new KeyboardEvent("keydown",{key:F.key,bubbles:!0});if(ce||se){var Ae,He;const ne=((Ae=q.context)==null?void 0:Ae.elements.domReference)===F.currentTarget,he=se&&!ne?(He=q.context)==null?void 0:He.elements.domReference:ce?Ie:null;he&&(nn(F),he.dispatchEvent(M),Y(void 0))}if(Ce&&q.context&&q.context.open&&q.parentId&&F.currentTarget!==q.context.elements.domReference){var te;nn(F),(te=q.context.elements.domReference)==null||te.dispatchEvent(M);return}}return ee(F)}if(!(!n&&!w&&ie)){if(Ee&&(I.current=m&&Ce?null:F.key),m){ce&&(nn(F),n?(B.current=kp(s,X),D(B.current)):r(!0,F.nativeEvent));return}Ce&&(f!=null&&(B.current=f),nn(F),!n&&w?r(!0,F.nativeEvent):ee(F),n&&D(B.current))}},onFocus(){n&&D(null)},onPointerDown:pe,onMouseDown:G,onClick:G},floating:{"aria-orientation":E==="both"?void 0:E,...ge,onKeyDown:ee,onPointerMove(){A.current=!0}},item:oe}},[a,i,S,J,g,N,s,c,E,h,y,n,ae,m,f,w,d,_,p,v,D,r,oe,k,z])}function s4(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:i=!0,role:a="dialog"}=t,o=Cp();return x.useMemo(()=>{const s={id:r,role:a};return i?a==="tooltip"?{reference:{"aria-describedby":n?r:void 0},floating:s}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":n?r:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:o}},floating:{...s,...a==="menu"&&{"aria-labelledby":o}}}:{}},[i,a,n,r,o])}function l4(e,t){var n;const{open:r,dataRef:i}=e,{listRef:a,activeIndex:o,onMatch:s,onTypingChange:u,enabled:l=!0,findMatch:c=null,resetMs:f=750,ignoreKeys:d=[],selectedIndex:p=null}=t,m=x.useRef(),h=x.useRef(""),y=x.useRef((n=p??o)!=null?n:-1),v=x.useRef(null),b=mi(s),w=mi(u),T=hi(c),E=hi(d);return Wt(()=>{r&&(clearTimeout(m.current),v.current=null,h.current="")},[r]),Wt(()=>{if(r&&h.current===""){var _;y.current=(_=p??o)!=null?_:-1}},[r,p,o]),x.useMemo(()=>{if(!l)return{};function _(U){U?i.current.typing||(i.current.typing=U,w(U)):i.current.typing&&(i.current.typing=U,w(U))}function O(U,k,D){const W=T.current?T.current(k,D):k.find(B=>(B==null?void 0:B.toLocaleLowerCase().indexOf(D.toLocaleLowerCase()))===0);return W?U.indexOf(W):-1}function z(U){const k=a.current;if(h.current.length>0&&h.current[0]!==" "&&(O(k,k,h.current)===-1?_(!1):U.key===" "&&nn(U)),k==null||E.current.includes(U.key)||U.key.length!==1||U.ctrlKey||U.metaKey||U.altKey)return;r&&U.key!==" "&&(nn(U),_(!0)),k.every(I=>{var A,L;return I?((A=I[0])==null?void 0:A.toLocaleLowerCase())!==((L=I[1])==null?void 0:L.toLocaleLowerCase()):!0})&&h.current===U.key&&(h.current="",y.current=v.current),h.current+=U.key,clearTimeout(m.current),m.current=setTimeout(()=>{h.current="",y.current=v.current,_(!1)},f);const W=y.current,B=O(k,[...k.slice((W||0)+1),...k.slice(0,(W||0)+1)],h.current);B!==-1?(b(B),v.current=B):U.key!==" "&&(h.current="",_(!1))}return{reference:{onKeyDown:z},floating:{onKeyDown:z,onKeyUp(U){U.key===" "&&_(!1)}}}},[l,r,i,a,f,E,T,b,w])}const u4=({options:e,reusable:t,sendMessage:n,isReadOnly:r})=>{var I,A,L,Z,H;const i=hu(R=>R.messageContainerRef),[a,o]=x.useState(!1),[s,u]=x.useState(null),[l,c]=x.useState(null),{message:{blocks:{dropdown:f}}}=lt,d=e.reduce((R,g)=>(R[g.label]=g.value,R),{}),p=d?Object.keys(d):[],m=R=>{o(l!==null&&!t?!1:R)},{refs:h,floatingStyles:y,context:v}=r4({placement:"bottom-start",open:a,onOpenChange:m,whileElementsMounted:o5,middleware:[d5(5),p5({padding:10,boundary:(i==null?void 0:i.current)??void 0,crossAxis:!0}),h5({apply({rects:R,elements:g,availableHeight:N}){Object.assign(g.floating.style,{maxHeight:`${N}px`,minWidth:`${R.reference.width}px`})},padding:10})]}),b=x.useRef([]),w=x.useRef(p),T=x.useRef(!1),E=J5(v,{event:"mousedown"}),_=n4(v),O=s4(v,{role:"listbox"}),z=o4(v,{listRef:b,activeIndex:s,selectedIndex:l,onNavigate:u,loop:!0}),U=l4(v,{listRef:w,activeIndex:s,selectedIndex:l,onMatch:a?u:c,onTypingChange(R){T.current=R}}),{getReferenceProps:k,getFloatingProps:D,getItemProps:W}=i4([_,O,z,U,E]),B=R=>{c(R),p[R]!==void 0&&(n==null||n({type:"text",text:p[R]??"",value:d[p[R]]??""})),o(!1)};return $.jsxs($.Fragment,{children:[$.jsxs("div",{tabIndex:0,ref:h.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":l!==null&&!t?"":void 0,style:r?{pointerEvents:"none"}:void 0,...(I=f.button)==null?void 0:I.container,...k(),children:[$.jsx("span",{...(A=f.button)==null?void 0:A.text,children:"Select..."}),$.jsx(wF,{...(L=f.button)==null?void 0:L.icon})]}),a&&$.jsx(K5,{children:$.jsx(Y5,{context:v,modal:!1,children:$.jsx("div",{ref:h.setFloating,className:(H=(Z=f.content)==null?void 0:Z.container)==null?void 0:H.className,style:{...y},...D(),children:p.map((R,g)=>{var N;return $.jsx("div",{ref:V=>{b.current[g]=V},role:"option",tabIndex:g===s?0:-1,"aria-selected":g===l&&g===s,"data-active":g===s?"":void 0,...(N=f.content)==null?void 0:N.item,...W({onClick(){B(g)},onKeyDown(V){V.key==="Enter"&&(V.preventDefault(),B(g)),V.key===" "&&!T.current&&(V.preventDefault(),B(g))}}),children:R},R)})})})})]})},Qx=j.forwardRef(({title:e,url:t,isReadOnly:n,...r},i)=>{const{message:{blocks:{file:a}}}=lt;return $.jsxs("a",{...r,...a.container,href:t,style:n?{pointerEvents:"none"}:void 0,download:!0,ref:i,target:"_blank",rel:"noreferrer",children:[$.jsx("p",{...a.title,children:e||t}),$.jsx(SF,{...a.icon})]})});Qx.displayName="File";const c4=xa()((e,t)=>({components:{},getCustomComponent:async n=>{const r=t().components[n];if(r)return r;const i=await fetch(n).then(l=>l.text()),a=new Blob([i],{type:"application/javascript"}),s=await import(URL.createObjectURL(a)),u=()=>s.default;return e(l=>({components:{...l.components,[n]:u}})),u}}));globalThis.React=j;const e1={audio:H0,bubble:F0,button:fF,carousel:ix,column:K0,dropdown:u4,file:Qx,image:W0,location:Z0,row:G0,text:U2,video:V0,custom:({url:e,name:t,data:n,...r})=>{const i=c4(l=>l.getCustomComponent),[a,o]=j.useState(null),[s,u]=j.useState(null);return j.useEffect(()=>{i(e).then(o).catch(l=>{u(l.message)})},[e]),s?$.jsx("div",{style:{color:"red"},children:s}):a?$.jsx(a,{...n,...r}):null}},Pa=({block:e,renderers:t,...n})=>{const r=(t==null?void 0:t[e.type])??e1[e.type],i={...n,...e};return $.jsx(r,{...i})};function f4({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{fillRule:"evenodd",d:"M8 14a.75.75 0 0 1-.75-.75V4.56L4.03 7.78a.75.75 0 0 1-1.06-1.06l4.5-4.5a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1-1.06 1.06L8.75 4.56v8.69A.75.75 0 0 1 8 14Z",clipRule:"evenodd"}))}const d4=x.forwardRef(f4);function p4({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{d:"M8 1a2 2 0 0 0-2 2v4a2 2 0 1 0 4 0V3a2 2 0 0 0-2-2Z"}),x.createElement("path",{d:"M4.5 7A.75.75 0 0 0 3 7a5.001 5.001 0 0 0 4.25 4.944V13.5h-1.5a.75.75 0 0 0 0 1.5h4.5a.75.75 0 0 0 0-1.5h-1.5v-1.556A5.001 5.001 0 0 0 13 7a.75.75 0 0 0-1.5 0 3.5 3.5 0 1 1-7 0Z"}))}const h4=x.forwardRef(p4);function t1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=t1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ms(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=t1(e))&&(r&&(r+=" "),r+=t);return r}const m4=({disabled:e,onFileSelected:t})=>{const n=j.useRef(null),{container:r,icon:i}=lt.composer.uploadButton,a=()=>{n.current&&n.current.click()},o=s=>{const u=s.target.files;u&&u.length>0&&Array.from(u).forEach(l=>{t(l)})};return $.jsxs($.Fragment,{children:[$.jsx("button",{type:"button",disabled:e,...r,children:$.jsx(_L,{...i,"data-disabled":e,onClick:a})}),$.jsx("input",{value:"",multiple:!0,type:"file",ref:n,style:{display:"none"},onChange:o})]})};function v4({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"}))}const y4=x.forwardRef(v4);function g4({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"}))}const b4=x.forwardRef(g4);function w4({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.114 5.636a9 9 0 0 1 0 12.728M16.463 8.288a5.25 5.25 0 0 1 0 7.424M6.75 8.25l4.72-4.72a.75.75 0 0 1 1.28.53v15.88a.75.75 0 0 1-1.28.53l-4.72-4.72H4.51c-.88 0-1.704-.507-1.938-1.354A9.009 9.009 0 0 1 2.25 12c0-.83.112-1.633.322-2.396C2.806 8.756 3.63 8.25 4.51 8.25H6.75Z"}))}const x4=x.forwardRef(w4);function S4({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m15.75 10.5 4.72-4.72a.75.75 0 0 1 1.28.53v11.38a.75.75 0 0 1-1.28.53l-4.72-4.72M4.5 18.75h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25h-9A2.25 2.25 0 0 0 2.25 7.5v9a2.25 2.25 0 0 0 2.25 2.25Z"}))}const E4=x.forwardRef(S4);function _4({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const n1=x.forwardRef(_4),k4=({name:e,type:t,instance:n,status:r,removeFile:i})=>{const{loader:a,fileIcon:o,removeIcon:s,errorIcon:u,previewImage:l}=lt.composer.fileWidget,c=["PNG","JPEG","JPG"].includes(Lu(e)),f=j.useMemo(()=>c?URL.createObjectURL(n):"",[n]);return r==="loading"?$.jsx(Fu,{name:e,status:r,removeButton:$.jsx("div",{...a}),extension:Lu(e),children:$.jsx("div",{...o.container,children:$.jsx(Dp,{type:t,...o.icon})})}):r==="error"?$.jsx(Fu,{name:e,status:r,removeButton:$.jsx(op,{onClick:()=>i(e),...s}),extension:"Upload Error",children:$.jsxs("div",{...o.container,children:[$.jsx(_F,{...u}),$.jsx(Dp,{type:t,...o.icon})]})}):r=="uploaded"&&c?$.jsx(Fu,{name:e,status:r,removeButton:$.jsx(op,{onClick:()=>i(e),...s}),extension:Lu(e),children:$.jsx("div",{...o.container,children:$.jsx("img",{src:f,alt:e,...l})})}):$.jsx(Fu,{name:e,status:r,removeButton:$.jsx(op,{onClick:()=>i(e),...s}),extension:Lu(e),children:$.jsx("div",{...o.container,children:$.jsx(Dp,{type:t,...o.icon})})})},Fu=({name:e,status:t,removeButton:n,children:r,extension:i})=>{const{container:a,metadata:o}=lt.composer.fileWidget;return $.jsxs("div",{"data-status":t,title:e,...a,children:[n,r,$.jsxs("div",{...o.container,children:[$.jsx("div",{...o.name,children:e}),$.jsx("div",{...o.type,children:i})]})]})},Dp=({type:e,...t})=>e==="image"?$.jsx(b4,{...t}):e==="video"?$.jsx(E4,{...t}):e==="audio"?$.jsx(x4,{...t}):$.jsx(y4,{...t}),Lu=e=>{const t=e.split(".").pop();return t?t.toUpperCase():"File"};function jp(){return jp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jp.apply(null,arguments)}function T4(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}var C4=j.useLayoutEffect,O4=function(t){var n=x.useRef(t);return C4(function(){n.current=t}),n},r1=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},$4=function(t,n){var r=j.useRef();return j.useCallback(function(i){t.current=i,r.current&&r1(r.current,null),r.current=n,n&&r1(n,i)},[n])},i1={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},I4=function(t){Object.keys(i1).forEach(function(n){t.style.setProperty(n,i1[n],"important")})},a1=I4,yn=null,o1=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function R4(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),yn||(yn=document.createElement("textarea"),yn.setAttribute("tabindex","-1"),yn.setAttribute("aria-hidden","true"),a1(yn)),yn.parentNode===null&&document.body.appendChild(yn);var i=e.paddingSize,a=e.borderSize,o=e.sizingStyle,s=o.boxSizing;Object.keys(o).forEach(function(d){var p=d;yn.style[p]=o[p]}),a1(yn),yn.value=t;var u=o1(yn,e);yn.value=t,u=o1(yn,e),yn.value="x";var l=yn.scrollHeight-i,c=l*n;s==="border-box"&&(c=c+i+a),u=Math.max(c,u);var f=l*r;return s==="border-box"&&(f=f+i+a),u=Math.min(f,u),[u,l]}var s1=function(){},A4=function(t,n){return t.reduce(function(r,i){return r[i]=n[i],r},{})},P4=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],D4=!!document.documentElement.currentStyle,j4=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=A4(P4,n),i=r.boxSizing;if(i==="")return null;D4&&i==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var a=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),o=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:a,borderSize:o}},N4=j4;function l1(e,t,n){var r=O4(n);x.useLayoutEffect(function(){var i=function(o){return r.current(o)};if(e)return e.addEventListener(t,i),function(){return e.removeEventListener(t,i)}},[])}var M4=function(t){l1(window,"resize",t)},F4=function(t){l1(document.fonts,"loadingdone",t)},L4=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],B4=function(t,n){var r=t.cacheMeasurements,i=t.maxRows,a=t.minRows,o=t.onChange,s=o===void 0?s1:o,u=t.onHeightChange,l=u===void 0?s1:u,c=T4(t,L4),f=c.value!==void 0,d=x.useRef(null),p=$4(d,n),m=x.useRef(0),h=x.useRef(),y=function(){var w=d.current,T=r&&h.current?h.current:N4(w);if(T){h.current=T;var E=R4(T,w.value||w.placeholder||"x",a,i),_=E[0],O=E[1];m.current!==_&&(m.current=_,w.style.setProperty("height",_+"px","important"),l(_,{rowHeight:O}))}},v=function(w){f||y(),s(w)};return x.useLayoutEffect(y),M4(y),F4(y),x.createElement("textarea",jp({},c,{onChange:v,ref:p}))},U4=x.forwardRef(B4);const z4=({inputRef:e,composerPlaceholder:t,composerDisabled:n,textInput:r,historyIndex:i,setTextInput:a,setHistoryIndex:o,sendComposerMessage:s})=>{const u=$0(c=>c.messageHistory),{input:l}=lt.composer;return $.jsx(U4,{...l,ref:e,placeholder:t??"Type your message...",disabled:n,value:r,"data-has-value":!!r,onChange:c=>a(c.target.value),maxRows:5,onKeyDown:c=>{n||(c.key==="Enter"&&c.shiftKey?(c.preventDefault(),a(`${r}
97
+ `)):c.key==="Enter"&&(c.preventDefault(),s()),c.key==="ArrowUp"&&(c.preventDefault(),i<u.length-1&&a(u[i+1]??""),o(Math.min(i+1,u.length-1))),c.key==="ArrowDown"&&(c.preventDefault(),a(i===0?"":u[i-1]??""),o(Math.max(i-1,-1))))}})},q4=({textInput:e,setTextInput:t})=>{const[n,r]=j.useState(!1),i=j.useRef(null),{icon:a,container:o}=lt.composer.voiceButton,s=window.SpeechRecognition||window.webkitSpeechRecognition,u=()=>{i.current||(i.current=new s);const l=i.current;l&&(l.continuous=!0,l.onresult=c=>{var d,p,m;const f=((m=(p=(d=c.results)==null?void 0:d[0])==null?void 0:p[0])==null?void 0:m.transcript)??"";t(f??""),l.stop(),r(!1)},n?(l.stop(),r(!1)):(l.start(),r(!0)))};if(s)return $.jsx("button",{...o,type:"button","aria-label":"Activate voice input",disabled:!!e,onClick:u,"data-listens":!!n,children:$.jsx(h4,{...a})})},u1=j.memo(j.forwardRef(({className:e,inputRef:t,disableComposer:n,isReadOnly:r,allowFileUpload:i,connected:a,composerPlaceholder:o,showPoweredBy:s,sendMessage:u,uploadFile:l,...c},f)=>{const{composer:d}=lt,p=n||r||!a,[m,h]=j.useState(""),[y,v]=j.useState(-1),b=rs(U=>U.files),w=rs(U=>U.setFiles),T=rs(U=>U.deleteFile),E=rs(U=>U.uploadFile),_=$0(U=>U.addMessageToHistory),O=m||b.filter(U=>U.status==="uploaded").length>0,z=()=>{const U=b.filter(W=>W.status==="uploaded");if(!U.length&&!m)return;const k=(U==null?void 0:U.map(W=>{const B=W.url,I=W.type;return{video:{type:"video",videoUrl:B},audio:{type:"audio",audioUrl:B},image:{type:"image",imageUrl:B}}[I]??{title:W.name,type:"file",fileUrl:B}}))??[];m&&k.push({type:"text",text:m});let D;k.length==1?D=k[0]:D={type:"bloc",items:k.map(B=>{const{type:I,...A}=B;return{type:I,payload:A}})},u==null||u(D),w([]),h(""),_(m),v(-1)};return r?null:$.jsxs($.Fragment,{children:[$.jsxs("div",{"data-disabled":p,...c,className:ms(d.container.className,e),ref:f,children:[b.length>0&&$.jsx("div",{...d==null?void 0:d.fileContainer,children:b.map(U=>$.jsx(k4,{...U,removeFile:T},U.name))}),$.jsxs("div",{...d.inputContainer,children:[i&&$.jsx(m4,{disabled:p||!l,onFileSelected:U=>{l&&E(U,l)}}),$.jsx(z4,{inputRef:t,composerPlaceholder:o,composerDisabled:p,textInput:m,historyIndex:y,setTextInput:h,setHistoryIndex:v,sendComposerMessage:z}),O&&$.jsx("button",{type:"button","aria-label":"Send message",...d.button.container,disabled:p,onClick:()=>z(),children:$.jsx(d4,{...d.button.icon})}),!O&&$.jsx(q4,{textInput:m,setTextInput:h})]})]}),$.jsx("a",{...d.poweredBy,"data-hidden":s===!1,hidden:s===!1,href:"https://botpress.com/?from=webchat",target:"_blank",rel:"noopener noreferrer",children:"⚡ by Botpress"})]})}));var Np={exports:{}},Bu={exports:{}},ft={};/** @license React v16.13.1
98
98
  * react-is.production.min.js
99
99
  *
100
100
  * Copyright (c) Facebook, Inc. and its affiliates.
101
101
  *
102
102
  * This source code is licensed under the MIT license found in the
103
103
  * LICENSE file in the root directory of this source tree.
104
- */var Cx;function G5(){if(Cx)return ct;Cx=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function w(E){if(typeof E=="object"&&E!==null){var _=E.$$typeof;switch(_){case t:switch(E=E.type,E){case u:case l:case r:case a:case i:case f:return E;default:switch(E=E&&E.$$typeof,E){case s:case c:case m:case d:case o:return E;default:return _}}case n:return _}}}function k(E){return w(E)===l}return ct.AsyncMode=u,ct.ConcurrentMode=l,ct.ContextConsumer=s,ct.ContextProvider=o,ct.Element=t,ct.ForwardRef=c,ct.Fragment=r,ct.Lazy=m,ct.Memo=d,ct.Portal=n,ct.Profiler=a,ct.StrictMode=i,ct.Suspense=f,ct.isAsyncMode=function(E){return k(E)||w(E)===u},ct.isConcurrentMode=k,ct.isContextConsumer=function(E){return w(E)===s},ct.isContextProvider=function(E){return w(E)===o},ct.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},ct.isForwardRef=function(E){return w(E)===c},ct.isFragment=function(E){return w(E)===r},ct.isLazy=function(E){return w(E)===m},ct.isMemo=function(E){return w(E)===d},ct.isPortal=function(E){return w(E)===n},ct.isProfiler=function(E){return w(E)===a},ct.isStrictMode=function(E){return w(E)===i},ct.isSuspense=function(E){return w(E)===f},ct.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===r||E===l||E===a||E===i||E===f||E===p||typeof E=="object"&&E!==null&&(E.$$typeof===m||E.$$typeof===d||E.$$typeof===o||E.$$typeof===s||E.$$typeof===c||E.$$typeof===y||E.$$typeof===v||E.$$typeof===b||E.$$typeof===h)},ct.typeOf=w,ct}var ft={};/** @license React v16.13.1
104
+ */var c1;function W4(){if(c1)return ft;c1=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function w(E){if(typeof E=="object"&&E!==null){var _=E.$$typeof;switch(_){case t:switch(E=E.type,E){case u:case l:case r:case a:case i:case f:return E;default:switch(E=E&&E.$$typeof,E){case s:case c:case m:case p:case o:return E;default:return _}}case n:return _}}}function T(E){return w(E)===l}return ft.AsyncMode=u,ft.ConcurrentMode=l,ft.ContextConsumer=s,ft.ContextProvider=o,ft.Element=t,ft.ForwardRef=c,ft.Fragment=r,ft.Lazy=m,ft.Memo=p,ft.Portal=n,ft.Profiler=a,ft.StrictMode=i,ft.Suspense=f,ft.isAsyncMode=function(E){return T(E)||w(E)===u},ft.isConcurrentMode=T,ft.isContextConsumer=function(E){return w(E)===s},ft.isContextProvider=function(E){return w(E)===o},ft.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},ft.isForwardRef=function(E){return w(E)===c},ft.isFragment=function(E){return w(E)===r},ft.isLazy=function(E){return w(E)===m},ft.isMemo=function(E){return w(E)===p},ft.isPortal=function(E){return w(E)===n},ft.isProfiler=function(E){return w(E)===a},ft.isStrictMode=function(E){return w(E)===i},ft.isSuspense=function(E){return w(E)===f},ft.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===r||E===l||E===a||E===i||E===f||E===d||typeof E=="object"&&E!==null&&(E.$$typeof===m||E.$$typeof===p||E.$$typeof===o||E.$$typeof===s||E.$$typeof===c||E.$$typeof===y||E.$$typeof===v||E.$$typeof===b||E.$$typeof===h)},ft.typeOf=w,ft}var dt={};/** @license React v16.13.1
105
105
  * react-is.development.js
106
106
  *
107
107
  * Copyright (c) Facebook, Inc. and its affiliates.
108
108
  *
109
109
  * This source code is licensed under the MIT license found in the
110
110
  * LICENSE file in the root directory of this source tree.
111
- */var $x;function Y5(){return $x||($x=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function w(K){return typeof K=="string"||typeof K=="function"||K===r||K===l||K===a||K===i||K===f||K===p||typeof K=="object"&&K!==null&&(K.$$typeof===m||K.$$typeof===d||K.$$typeof===o||K.$$typeof===s||K.$$typeof===c||K.$$typeof===y||K.$$typeof===v||K.$$typeof===b||K.$$typeof===h)}function k(K){if(typeof K=="object"&&K!==null){var pe=K.$$typeof;switch(pe){case t:var ge=K.type;switch(ge){case u:case l:case r:case a:case i:case f:return ge;default:var Ie=ge&&ge.$$typeof;switch(Ie){case s:case c:case m:case d:case o:return Ie;default:return pe}}case n:return pe}}}var E=u,_=l,C=s,z=o,B=t,T=c,A=r,W=m,F=d,L=n,N=a,q=i,Y=f,H=!1;function I(K){return H||(H=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),g(K)||k(K)===u}function g(K){return k(K)===l}function P(K){return k(K)===s}function V(K){return k(K)===o}function S(K){return typeof K=="object"&&K!==null&&K.$$typeof===t}function Z(K){return k(K)===c}function J(K){return k(K)===r}function G(K){return k(K)===m}function X(K){return k(K)===d}function ae(K){return k(K)===n}function se(K){return k(K)===a}function Q(K){return k(K)===i}function ee(K){return k(K)===f}ft.AsyncMode=E,ft.ConcurrentMode=_,ft.ContextConsumer=C,ft.ContextProvider=z,ft.Element=B,ft.ForwardRef=T,ft.Fragment=A,ft.Lazy=W,ft.Memo=F,ft.Portal=L,ft.Profiler=N,ft.StrictMode=q,ft.Suspense=Y,ft.isAsyncMode=I,ft.isConcurrentMode=g,ft.isContextConsumer=P,ft.isContextProvider=V,ft.isElement=S,ft.isForwardRef=Z,ft.isFragment=J,ft.isLazy=G,ft.isMemo=X,ft.isPortal=ae,ft.isProfiler=se,ft.isStrictMode=Q,ft.isSuspense=ee,ft.isValidElementType=w,ft.typeOf=k}()),ft}var Ix;function xu(){return Ix||(Ix=1,process.env.NODE_ENV==="production"?wu.exports=G5():wu.exports=Y5()),wu.exports}/*
111
+ */var f1;function V4(){return f1||(f1=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function w(G){return typeof G=="string"||typeof G=="function"||G===r||G===l||G===a||G===i||G===f||G===d||typeof G=="object"&&G!==null&&(G.$$typeof===m||G.$$typeof===p||G.$$typeof===o||G.$$typeof===s||G.$$typeof===c||G.$$typeof===y||G.$$typeof===v||G.$$typeof===b||G.$$typeof===h)}function T(G){if(typeof G=="object"&&G!==null){var pe=G.$$typeof;switch(pe){case t:var ge=G.type;switch(ge){case u:case l:case r:case a:case i:case f:return ge;default:var Ie=ge&&ge.$$typeof;switch(Ie){case s:case c:case m:case p:case o:return Ie;default:return pe}}case n:return pe}}}var E=u,_=l,O=s,z=o,U=t,k=c,D=r,W=m,B=p,I=n,A=a,L=i,Z=f,H=!1;function R(G){return H||(H=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),g(G)||T(G)===u}function g(G){return T(G)===l}function N(G){return T(G)===s}function V(G){return T(G)===o}function S(G){return typeof G=="object"&&G!==null&&G.$$typeof===t}function K(G){return T(G)===c}function J(G){return T(G)===r}function Y(G){return T(G)===m}function Q(G){return T(G)===p}function ae(G){return T(G)===n}function oe(G){return T(G)===a}function X(G){return T(G)===i}function ee(G){return T(G)===f}dt.AsyncMode=E,dt.ConcurrentMode=_,dt.ContextConsumer=O,dt.ContextProvider=z,dt.Element=U,dt.ForwardRef=k,dt.Fragment=D,dt.Lazy=W,dt.Memo=B,dt.Portal=I,dt.Profiler=A,dt.StrictMode=L,dt.Suspense=Z,dt.isAsyncMode=R,dt.isConcurrentMode=g,dt.isContextConsumer=N,dt.isContextProvider=V,dt.isElement=S,dt.isForwardRef=K,dt.isFragment=J,dt.isLazy=Y,dt.isMemo=Q,dt.isPortal=ae,dt.isProfiler=oe,dt.isStrictMode=X,dt.isSuspense=ee,dt.isValidElementType=w,dt.typeOf=T}()),dt}var d1;function Uu(){return d1||(d1=1,process.env.NODE_ENV==="production"?Bu.exports=W4():Bu.exports=V4()),Bu.exports}/*
112
112
  object-assign
113
113
  (c) Sindre Sorhus
114
114
  @license MIT
115
- */var fp,Rx;function Ax(){if(Rx)return fp;Rx=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var u=Object.getOwnPropertyNames(o).map(function(c){return o[c]});if(u.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(c){l[c]=c}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return fp=i()?Object.assign:function(a,o){for(var s,u=r(a),l,c=1;c<arguments.length;c++){s=Object(arguments[c]);for(var f in s)t.call(s,f)&&(u[f]=s[f]);if(e){l=e(s);for(var p=0;p<l.length;p++)n.call(s,l[p])&&(u[l[p]]=s[l[p]])}}return u},fp}var dp,Px;function pp(){if(Px)return dp;Px=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return dp=e,dp}var hp,Dx;function jx(){return Dx||(Dx=1,hp=Function.call.bind(Object.prototype.hasOwnProperty)),hp}var mp,Nx;function J5(){if(Nx)return mp;Nx=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=pp(),n={},r=jx();e=function(a){var o="Warning: "+a;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function i(a,o,s,u,l){if(process.env.NODE_ENV!=="production"){for(var c in a)if(r(a,c)){var f;try{if(typeof a[c]!="function"){var p=Error((u||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}f=a[c](o,c,u,s,null,t)}catch(m){f=m}if(f&&!(f instanceof Error)&&e((u||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var d=l?l():"";e("Failed "+s+" type: "+f.message+(d??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},mp=i,mp}var vp,Mx;function X5(){if(Mx)return vp;Mx=1;var e=xu(),t=Ax(),n=pp(),r=jx(),i=J5(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var u="Warning: "+s;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function o(){return null}return vp=function(s,u){var l=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function f(g){var P=g&&(l&&g[l]||g[c]);if(typeof P=="function")return P}var p="<<anonymous>>",d={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:b(),arrayOf:w,element:k(),elementType:E(),instanceOf:_,node:T(),objectOf:z,oneOf:C,oneOfType:B,shape:W,exact:F};function m(g,P){return g===P?g!==0||1/g===1/P:g!==g&&P!==P}function h(g,P){this.message=g,this.data=P&&typeof P=="object"?P:{},this.stack=""}h.prototype=Error.prototype;function y(g){if(process.env.NODE_ENV!=="production")var P={},V=0;function S(J,G,X,ae,se,Q,ee){if(ae=ae||p,Q=Q||X,ee!==n){if(u){var K=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw K.name="Invariant Violation",K}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var pe=ae+":"+X;!P[pe]&&V<3&&(a("You are manually calling a React.PropTypes validation function for the `"+Q+"` prop on `"+ae+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),P[pe]=!0,V++)}}return G[X]==null?J?G[X]===null?new h("The "+se+" `"+Q+"` is marked as required "+("in `"+ae+"`, but its value is `null`.")):new h("The "+se+" `"+Q+"` is marked as required in "+("`"+ae+"`, but its value is `undefined`.")):null:g(G,X,ae,se,Q)}var Z=S.bind(null,!1);return Z.isRequired=S.bind(null,!0),Z}function v(g){function P(V,S,Z,J,G,X){var ae=V[S],se=q(ae);if(se!==g){var Q=Y(ae);return new h("Invalid "+J+" `"+G+"` of type "+("`"+Q+"` supplied to `"+Z+"`, expected ")+("`"+g+"`."),{expectedType:g})}return null}return y(P)}function b(){return y(o)}function w(g){function P(V,S,Z,J,G){if(typeof g!="function")return new h("Property `"+G+"` of component `"+Z+"` has invalid PropType notation inside arrayOf.");var X=V[S];if(!Array.isArray(X)){var ae=q(X);return new h("Invalid "+J+" `"+G+"` of type "+("`"+ae+"` supplied to `"+Z+"`, expected an array."))}for(var se=0;se<X.length;se++){var Q=g(X,se,Z,J,G+"["+se+"]",n);if(Q instanceof Error)return Q}return null}return y(P)}function k(){function g(P,V,S,Z,J){var G=P[V];if(!s(G)){var X=q(G);return new h("Invalid "+Z+" `"+J+"` of type "+("`"+X+"` supplied to `"+S+"`, expected a single ReactElement."))}return null}return y(g)}function E(){function g(P,V,S,Z,J){var G=P[V];if(!e.isValidElementType(G)){var X=q(G);return new h("Invalid "+Z+" `"+J+"` of type "+("`"+X+"` supplied to `"+S+"`, expected a single ReactElement type."))}return null}return y(g)}function _(g){function P(V,S,Z,J,G){if(!(V[S]instanceof g)){var X=g.name||p,ae=I(V[S]);return new h("Invalid "+J+" `"+G+"` of type "+("`"+ae+"` supplied to `"+Z+"`, expected ")+("instance of `"+X+"`."))}return null}return y(P)}function C(g){if(!Array.isArray(g))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),o;function P(V,S,Z,J,G){for(var X=V[S],ae=0;ae<g.length;ae++)if(m(X,g[ae]))return null;var se=JSON.stringify(g,function(ee,K){var pe=Y(K);return pe==="symbol"?String(K):K});return new h("Invalid "+J+" `"+G+"` of value `"+String(X)+"` "+("supplied to `"+Z+"`, expected one of "+se+"."))}return y(P)}function z(g){function P(V,S,Z,J,G){if(typeof g!="function")return new h("Property `"+G+"` of component `"+Z+"` has invalid PropType notation inside objectOf.");var X=V[S],ae=q(X);if(ae!=="object")return new h("Invalid "+J+" `"+G+"` of type "+("`"+ae+"` supplied to `"+Z+"`, expected an object."));for(var se in X)if(r(X,se)){var Q=g(X,se,Z,J,G+"."+se,n);if(Q instanceof Error)return Q}return null}return y(P)}function B(g){if(!Array.isArray(g))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var P=0;P<g.length;P++){var V=g[P];if(typeof V!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+H(V)+" at index "+P+"."),o}function S(Z,J,G,X,ae){for(var se=[],Q=0;Q<g.length;Q++){var ee=g[Q],K=ee(Z,J,G,X,ae,n);if(K==null)return null;K.data&&r(K.data,"expectedType")&&se.push(K.data.expectedType)}var pe=se.length>0?", expected one of type ["+se.join(", ")+"]":"";return new h("Invalid "+X+" `"+ae+"` supplied to "+("`"+G+"`"+pe+"."))}return y(S)}function T(){function g(P,V,S,Z,J){return L(P[V])?null:new h("Invalid "+Z+" `"+J+"` supplied to "+("`"+S+"`, expected a ReactNode."))}return y(g)}function A(g,P,V,S,Z){return new h((g||"React class")+": "+P+" type `"+V+"."+S+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Z+"`.")}function W(g){function P(V,S,Z,J,G){var X=V[S],ae=q(X);if(ae!=="object")return new h("Invalid "+J+" `"+G+"` of type `"+ae+"` "+("supplied to `"+Z+"`, expected `object`."));for(var se in g){var Q=g[se];if(typeof Q!="function")return A(Z,J,G,se,Y(Q));var ee=Q(X,se,Z,J,G+"."+se,n);if(ee)return ee}return null}return y(P)}function F(g){function P(V,S,Z,J,G){var X=V[S],ae=q(X);if(ae!=="object")return new h("Invalid "+J+" `"+G+"` of type `"+ae+"` "+("supplied to `"+Z+"`, expected `object`."));var se=t({},V[S],g);for(var Q in se){var ee=g[Q];if(r(g,Q)&&typeof ee!="function")return A(Z,J,G,Q,Y(ee));if(!ee)return new h("Invalid "+J+" `"+G+"` key `"+Q+"` supplied to `"+Z+"`.\nBad object: "+JSON.stringify(V[S],null," ")+`
116
- Valid keys: `+JSON.stringify(Object.keys(g),null," "));var K=ee(X,Q,Z,J,G+"."+Q,n);if(K)return K}return null}return y(P)}function L(g){switch(typeof g){case"number":case"string":case"undefined":return!0;case"boolean":return!g;case"object":if(Array.isArray(g))return g.every(L);if(g===null||s(g))return!0;var P=f(g);if(P){var V=P.call(g),S;if(P!==g.entries){for(;!(S=V.next()).done;)if(!L(S.value))return!1}else for(;!(S=V.next()).done;){var Z=S.value;if(Z&&!L(Z[1]))return!1}}else return!1;return!0;default:return!1}}function N(g,P){return g==="symbol"?!0:P?P["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&P instanceof Symbol:!1}function q(g){var P=typeof g;return Array.isArray(g)?"array":g instanceof RegExp?"object":N(P,g)?"symbol":P}function Y(g){if(typeof g>"u"||g===null)return""+g;var P=q(g);if(P==="object"){if(g instanceof Date)return"date";if(g instanceof RegExp)return"regexp"}return P}function H(g){var P=Y(g);switch(P){case"array":case"object":return"an "+P;case"boolean":case"date":case"regexp":return"a "+P;default:return P}}function I(g){return!g.constructor||!g.constructor.name?p:g.constructor.name}return d.checkPropTypes=i,d.resetWarningCache=i.resetWarningCache,d.PropTypes=d,d},vp}var yp,Fx;function Q5(){if(Fx)return yp;Fx=1;var e=pp();function t(){}function n(){}return n.resetWarningCache=t,yp=function(){function r(o,s,u,l,c,f){if(f!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},yp}if(process.env.NODE_ENV!=="production"){var e4=xu(),t4=!0;cp.exports=X5()(e4.isElement,t4)}else cp.exports=Q5()();var n4=cp.exports;const gt=Ge(n4);var r4=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function ts(e,t){var n=i4(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function i4(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=r4.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var a4=[".DS_Store","Thumbs.db"];function o4(e){return ca(this,void 0,void 0,function(){return fa(this,function(t){return Su(e)&&s4(e.dataTransfer)?[2,f4(e.dataTransfer,e.type)]:l4(e)?[2,u4(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,c4(e)]:[2,[]]})})}function s4(e){return Su(e)}function l4(e){return Su(e)&&Su(e.target)}function Su(e){return typeof e=="object"&&e!==null}function u4(e){return gp(e.target.files).map(function(t){return ts(t)})}function c4(e){return ca(this,void 0,void 0,function(){var t;return fa(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return ts(r)})]}})})}function f4(e,t){return ca(this,void 0,void 0,function(){var n,r;return fa(this,function(i){switch(i.label){case 0:return e.items?(n=gp(e.items).filter(function(a){return a.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(d4))]):[3,2];case 1:return r=i.sent(),[2,Lx(Bx(r))];case 2:return[2,Lx(gp(e.files).map(function(a){return ts(a)}))]}})})}function Lx(e){return e.filter(function(t){return a4.indexOf(t.name)===-1})}function gp(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function d4(e){if(typeof e.webkitGetAsEntry!="function")return Ux(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?zx(t):Ux(e)}function Bx(e){return e.reduce(function(t,n){return Pd(Pd([],s0(t),!1),s0(Array.isArray(n)?Bx(n):[n]),!1)},[])}function Ux(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=ts(t);return Promise.resolve(n)}function p4(e){return ca(this,void 0,void 0,function(){return fa(this,function(t){return[2,e.isDirectory?zx(e):h4(e)]})})}function zx(e){var t=e.createReader();return new Promise(function(n,r){var i=[];function a(){var o=this;t.readEntries(function(s){return ca(o,void 0,void 0,function(){var u,l,c;return fa(this,function(f){switch(f.label){case 0:if(s.length)return[3,5];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,Promise.all(i)];case 2:return u=f.sent(),n(u),[3,4];case 3:return l=f.sent(),r(l),[3,4];case 4:return[3,6];case 5:c=Promise.all(s.map(p4)),i.push(c),a(),f.label=6;case 6:return[2]}})})},function(s){r(s)})}a()})}function h4(e){return ca(this,void 0,void 0,function(){return fa(this,function(t){return[2,new Promise(function(n,r){e.file(function(i){var a=ts(i,e.fullPath);n(a)},function(i){r(i)})})]})})}var m4=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",i=(e.type||"").toLowerCase(),a=i.replace(/\/.*$/,"");return n.some(function(o){var s=o.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?a===s.replace(/\/.*$/,""):i===s})}return!0};function qx(e){return g4(e)||y4(e)||Zx(e)||v4()}function v4(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
117
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function y4(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function g4(e){if(Array.isArray(e))return bp(e)}function Wx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Vx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Wx(Object(n),!0).forEach(function(r){Hx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wx(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hx(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ns(e,t){return x4(e)||w4(e,t)||Zx(e,t)||b4()}function b4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
118
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zx(e,t){if(e){if(typeof e=="string")return bp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bp(e,t)}}function bp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function w4(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(u){a=!0,s=u}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function x4(e){if(Array.isArray(e))return e}var S4="file-invalid-type",E4="file-too-large",_4="file-too-small",k4="too-many-files",T4=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:S4,message:"File type must be ".concat(n)}},Kx=function(t){return{code:E4,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Gx=function(t){return{code:_4,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},O4={code:k4,message:"Too many files"};function Yx(e,t){var n=e.type==="application/x-moz-file"||m4(e,t);return[n,n?null:T4(t)]}function Jx(e,t,n){if(Pi(e.size))if(Pi(t)&&Pi(n)){if(e.size>n)return[!1,Kx(n)];if(e.size<t)return[!1,Gx(t)]}else{if(Pi(t)&&e.size<t)return[!1,Gx(t)];if(Pi(n)&&e.size>n)return[!1,Kx(n)]}return[!0,null]}function Pi(e){return e!=null}function C4(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,a=e.multiple,o=e.maxFiles,s=e.validator;return!a&&t.length>1||a&&o>=1&&t.length>o?!1:t.every(function(u){var l=Yx(u,n),c=ns(l,1),f=c[0],p=Jx(u,r,i),d=ns(p,1),m=d[0],h=s?s(u):null;return f&&m&&!h})}function Eu(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function _u(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Xx(e){e.preventDefault()}function $4(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function I4(e){return e.indexOf("Edge/")!==-1}function R4(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return $4(e)||I4(e)}function dr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];return t.some(function(s){return!Eu(r)&&s&&s.apply(void 0,[r].concat(a)),Eu(r)})}}function A4(){return"showOpenFilePicker"in window}function P4(e){if(Pi(e)){var t=Object.entries(e).filter(function(n){var r=ns(n,2),i=r[0],a=r[1],o=!0;return Qx(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),(!Array.isArray(a)||!a.every(e1))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(n,r){var i=ns(r,2),a=i[0],o=i[1];return Vx(Vx({},n),{},Hx({},a,o))},{});return[{description:"Files",accept:t}]}return e}function D4(e){if(Pi(e))return Object.entries(e).reduce(function(t,n){var r=ns(n,2),i=r[0],a=r[1];return[].concat(qx(t),[i],qx(a))},[]).filter(function(t){return Qx(t)||e1(t)}).join(",")}function j4(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function N4(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Qx(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function e1(e){return/^.*\.[\w]+$/.test(e)}var M4=["children"],F4=["open"],L4=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],B4=["refKey","onChange","onClick"];function U4(e){return W4(e)||q4(e)||t1(e)||z4()}function z4(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
119
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function q4(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function W4(e){if(Array.isArray(e))return xp(e)}function wp(e,t){return Z4(e)||H4(e,t)||t1(e,t)||V4()}function V4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
120
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function t1(e,t){if(e){if(typeof e=="string")return xp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xp(e,t)}}function xp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function H4(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(u){a=!0,s=u}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function Z4(e){if(Array.isArray(e))return e}function n1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Tt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?n1(Object(n),!0).forEach(function(r){Sp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):n1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Sp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ku(e,t){if(e==null)return{};var n=K4(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function K4(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Tu=j.forwardRef(function(e,t){var n=e.children,r=ku(e,M4),i=G4(r),a=i.open,o=ku(i,F4);return j.useImperativeHandle(t,function(){return{open:a}},[a]),j.createElement(j.Fragment,null,n(Tt(Tt({},o),{},{open:a})))});Tu.displayName="Dropzone";var r1={disabled:!1,getFilesFromEvent:o4,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Tu.defaultProps=r1,Tu.propTypes={children:gt.func,accept:gt.objectOf(gt.arrayOf(gt.string)),multiple:gt.bool,preventDropOnDocument:gt.bool,noClick:gt.bool,noKeyboard:gt.bool,noDrag:gt.bool,noDragEventsBubbling:gt.bool,minSize:gt.number,maxSize:gt.number,maxFiles:gt.number,disabled:gt.bool,getFilesFromEvent:gt.func,onFileDialogCancel:gt.func,onFileDialogOpen:gt.func,useFsAccessApi:gt.bool,autoFocus:gt.bool,onDragEnter:gt.func,onDragLeave:gt.func,onDragOver:gt.func,onDrop:gt.func,onDropAccepted:gt.func,onDropRejected:gt.func,onError:gt.func,validator:gt.func};var Ep={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function G4(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Tt(Tt({},r1),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,o=t.minSize,s=t.multiple,u=t.maxFiles,l=t.onDragEnter,c=t.onDragLeave,f=t.onDragOver,p=t.onDrop,d=t.onDropAccepted,m=t.onDropRejected,h=t.onFileDialogCancel,y=t.onFileDialogOpen,v=t.useFsAccessApi,b=t.autoFocus,w=t.preventDropOnDocument,k=t.noClick,E=t.noKeyboard,_=t.noDrag,C=t.noDragEventsBubbling,z=t.onError,B=t.validator,T=j.useMemo(function(){return D4(n)},[n]),A=j.useMemo(function(){return P4(n)},[n]),W=j.useMemo(function(){return typeof y=="function"?y:i1},[y]),F=j.useMemo(function(){return typeof h=="function"?h:i1},[h]),L=j.useRef(null),N=j.useRef(null),q=j.useReducer(Y4,Ep),Y=wp(q,2),H=Y[0],I=Y[1],g=H.isFocused,P=H.isFileDialogActive,V=j.useRef(typeof window<"u"&&window.isSecureContext&&v&&A4()),S=function(){!V.current&&P&&setTimeout(function(){if(N.current){var fe=N.current.files;fe.length||(I({type:"closeDialog"}),F())}},300)};j.useEffect(function(){return window.addEventListener("focus",S,!1),function(){window.removeEventListener("focus",S,!1)}},[N,P,F,V]);var Z=j.useRef([]),J=function(fe){L.current&&L.current.contains(fe.target)||(fe.preventDefault(),Z.current=[])};j.useEffect(function(){return w&&(document.addEventListener("dragover",Xx,!1),document.addEventListener("drop",J,!1)),function(){w&&(document.removeEventListener("dragover",Xx),document.removeEventListener("drop",J))}},[L,w]),j.useEffect(function(){return!r&&b&&L.current&&L.current.focus(),function(){}},[L,b,r]);var G=j.useCallback(function(te){z?z(te):console.error(te)},[z]),X=j.useCallback(function(te){te.preventDefault(),te.persist(),Oe(te),Z.current=[].concat(U4(Z.current),[te.target]),_u(te)&&Promise.resolve(i(te)).then(function(fe){if(!(Eu(te)&&!C)){var U=fe.length,D=U>0&&C4({files:fe,accept:T,minSize:o,maxSize:a,multiple:s,maxFiles:u,validator:B}),ne=U>0&&!D;I({isDragAccept:D,isDragReject:ne,isDragActive:!0,type:"setDraggedFiles"}),l&&l(te)}}).catch(function(fe){return G(fe)})},[i,l,G,C,T,o,a,s,u,B]),ae=j.useCallback(function(te){te.preventDefault(),te.persist(),Oe(te);var fe=_u(te);if(fe&&te.dataTransfer)try{te.dataTransfer.dropEffect="copy"}catch{}return fe&&f&&f(te),!1},[f,C]),se=j.useCallback(function(te){te.preventDefault(),te.persist(),Oe(te);var fe=Z.current.filter(function(D){return L.current&&L.current.contains(D)}),U=fe.indexOf(te.target);U!==-1&&fe.splice(U,1),Z.current=fe,!(fe.length>0)&&(I({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),_u(te)&&c&&c(te))},[L,c,C]),Q=j.useCallback(function(te,fe){var U=[],D=[];te.forEach(function(ne){var he=Yx(ne,T),Se=wp(he,2),$e=Se[0],Ze=Se[1],Qe=Jx(ne,o,a),_t=wp(Qe,2),St=_t[0],qe=_t[1],Et=B?B(ne):null;if($e&&St&&!Et)U.push(ne);else{var Ke=[Ze,qe];Et&&(Ke=Ke.concat(Et)),D.push({file:ne,errors:Ke.filter(function(un){return un})})}}),(!s&&U.length>1||s&&u>=1&&U.length>u)&&(U.forEach(function(ne){D.push({file:ne,errors:[O4]})}),U.splice(0)),I({acceptedFiles:U,fileRejections:D,type:"setFiles"}),p&&p(U,D,fe),D.length>0&&m&&m(D,fe),U.length>0&&d&&d(U,fe)},[I,s,T,o,a,u,p,d,m,B]),ee=j.useCallback(function(te){te.preventDefault(),te.persist(),Oe(te),Z.current=[],_u(te)&&Promise.resolve(i(te)).then(function(fe){Eu(te)&&!C||Q(fe,te)}).catch(function(fe){return G(fe)}),I({type:"reset"})},[i,Q,G,C]),K=j.useCallback(function(){if(V.current){I({type:"openDialog"}),W();var te={multiple:s,types:A};window.showOpenFilePicker(te).then(function(fe){return i(fe)}).then(function(fe){Q(fe,null),I({type:"closeDialog"})}).catch(function(fe){j4(fe)?(F(fe),I({type:"closeDialog"})):N4(fe)?(V.current=!1,N.current?(N.current.value=null,N.current.click()):G(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):G(fe)});return}N.current&&(I({type:"openDialog"}),W(),N.current.value=null,N.current.click())},[I,W,F,v,Q,G,A,s]),pe=j.useCallback(function(te){!L.current||!L.current.isEqualNode(te.target)||(te.key===" "||te.key==="Enter"||te.keyCode===32||te.keyCode===13)&&(te.preventDefault(),K())},[L,K]),ge=j.useCallback(function(){I({type:"focus"})},[]),Ie=j.useCallback(function(){I({type:"blur"})},[]),M=j.useCallback(function(){k||(R4()?setTimeout(K,0):K())},[k,K]),ie=function(fe){return r?null:fe},ce=function(fe){return E?null:ie(fe)},oe=function(fe){return _?null:ie(fe)},Oe=function(fe){C&&fe.stopPropagation()},Ee=j.useMemo(function(){return function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},fe=te.refKey,U=fe===void 0?"ref":fe,D=te.role,ne=te.onKeyDown,he=te.onFocus,Se=te.onBlur,$e=te.onClick,Ze=te.onDragEnter,Qe=te.onDragOver,_t=te.onDragLeave,St=te.onDrop,qe=ku(te,L4);return Tt(Tt(Sp({onKeyDown:ce(dr(ne,pe)),onFocus:ce(dr(he,ge)),onBlur:ce(dr(Se,Ie)),onClick:ie(dr($e,M)),onDragEnter:oe(dr(Ze,X)),onDragOver:oe(dr(Qe,ae)),onDragLeave:oe(dr(_t,se)),onDrop:oe(dr(St,ee)),role:typeof D=="string"&&D!==""?D:"presentation"},U,L),!r&&!E?{tabIndex:0}:{}),qe)}},[L,pe,ge,Ie,M,X,ae,se,ee,E,_,r]),Re=j.useCallback(function(te){te.stopPropagation()},[]),He=j.useMemo(function(){return function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},fe=te.refKey,U=fe===void 0?"ref":fe,D=te.onChange,ne=te.onClick,he=ku(te,B4),Se=Sp({accept:T,multiple:s,type:"file",style:{display:"none"},onChange:ie(dr(D,ee)),onClick:ie(dr(ne,Re)),tabIndex:-1},U,N);return Tt(Tt({},Se),he)}},[N,n,s,ee,r]);return Tt(Tt({},H),{},{isFocused:g&&!r,getRootProps:Ee,getInputProps:He,rootRef:L,inputRef:N,open:ie(K)})}function Y4(e,t){switch(t.type){case"focus":return Tt(Tt({},e),{},{isFocused:!0});case"blur":return Tt(Tt({},e),{},{isFocused:!1});case"openDialog":return Tt(Tt({},Ep),{},{isFileDialogActive:!0});case"closeDialog":return Tt(Tt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Tt(Tt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Tt(Tt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Tt({},Ep);default:return e}}function i1(){}const _p=({children:e})=>{const[t,n]=j.useState(!1),[r,i]=j.useState(""),[a,o]=j.useState(null),s=({title:l,content:c})=>{i(l),o(c),n(!0)},u=()=>{n(!1)};return $.jsxs(i0.Provider,{value:{hideModal:u,showModal:s,title:r,content:a,open:t},children:[$.jsx(li,{open:t,onOpenChange:n,children:$.jsx(li.Content,{title:r,children:a})}),e]})},a1=({color:e,fontFamily:t,radius:n,themeMode:r,variant:i})=>{const a=j.useMemo(()=>Lg({color:e,fontFamily:t,radius:n,themeMode:r,variant:i}),[e,t,n,r,i]);return $.jsx("style",{children:a})};function Mr(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function o1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function s1(...e){return t=>{let n=!1;const r=e.map(i=>{const a=o1(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():o1(e[i],null)}}}}function oi(...e){return x.useCallback(s1(...e),e)}function J4(e,t){const n=x.createContext(t),r=a=>{const{children:o,...s}=a,u=x.useMemo(()=>s,Object.values(s));return $.jsx(n.Provider,{value:u,children:o})};r.displayName=e+"Provider";function i(a){const o=x.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function l1(e,t=[]){let n=[];function r(a,o){const s=x.createContext(o),u=n.length;n=[...n,o];const l=f=>{var v;const{scope:p,children:d,...m}=f,h=((v=p==null?void 0:p[e])==null?void 0:v[u])||s,y=x.useMemo(()=>m,Object.values(m));return $.jsx(h.Provider,{value:y,children:d})};l.displayName=a+"Provider";function c(f,p){var h;const d=((h=p==null?void 0:p[e])==null?void 0:h[u])||s,m=x.useContext(d);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[l,c]}const i=()=>{const a=n.map(o=>x.createContext(o));return function(s){const u=(s==null?void 0:s[e])||a;return x.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,X4(i,...t)]}function X4(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:u,scopeName:l})=>{const f=u(a)[`__scope${l}`];return{...s,...f}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var Q4=x.useId||(()=>{}),e3=0;function Ou(e){const[t,n]=x.useState(Q4());return Xi(()=>{e||n(r=>r??String(e3++))},[e]),e||(t?`radix-${t}`:"")}function u1({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=t3({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=Kr(n),u=x.useCallback(l=>{if(a){const f=typeof l=="function"?l(e):l;f!==e&&s(f)}else i(l)},[a,e,i,s]);return[o,u]}function t3({defaultProp:e,onChange:t}){const n=x.useState(e),[r]=n,i=x.useRef(r),a=Kr(t);return x.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}var kp=x.forwardRef((e,t)=>{const{children:n,...r}=e,i=x.Children.toArray(n),a=i.find(r3);if(a){const o=a.props.children,s=i.map(u=>u===a?x.Children.count(o)>1?x.Children.only(null):x.isValidElement(o)?o.props.children:null:u);return $.jsx(Tp,{...r,ref:t,children:x.isValidElement(o)?x.cloneElement(o,void 0,s):null})}return $.jsx(Tp,{...r,ref:t,children:n})});kp.displayName="Slot";var Tp=x.forwardRef((e,t)=>{const{children:n,...r}=e;if(x.isValidElement(n)){const i=a3(n);return x.cloneElement(n,{...i3(r,n.props),ref:t?s1(t,i):i})}return x.Children.count(n)>1?x.Children.only(null):null});Tp.displayName="SlotClone";var n3=({children:e})=>$.jsx($.Fragment,{children:e});function r3(e){return x.isValidElement(e)&&e.type===n3}function i3(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{a(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function a3(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var o3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Kn=o3.reduce((e,t)=>{const n=x.forwardRef((r,i)=>{const{asChild:a,...o}=r,s=a?kp:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),$.jsx(s,{...o,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function s3(e,t){e&&Uy.flushSync(()=>e.dispatchEvent(t))}function l3(e,t=globalThis==null?void 0:globalThis.document){const n=Kr(e);x.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var u3="DismissableLayer",Op="dismissableLayer.update",c3="dismissableLayer.pointerDownOutside",f3="dismissableLayer.focusOutside",c1,f1=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),d1=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...u}=e,l=x.useContext(f1),[c,f]=x.useState(null),p=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,d]=x.useState({}),m=oi(t,C=>f(C)),h=Array.from(l.layers),[y]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),v=h.indexOf(y),b=c?h.indexOf(c):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,k=b>=v,E=h3(C=>{const z=C.target,B=[...l.branches].some(T=>T.contains(z));!k||B||(i==null||i(C),o==null||o(C),C.defaultPrevented||s==null||s())},p),_=m3(C=>{const z=C.target;[...l.branches].some(T=>T.contains(z))||(a==null||a(C),o==null||o(C),C.defaultPrevented||s==null||s())},p);return l3(C=>{b===l.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))},p),x.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(c1=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),p1(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=c1)}},[c,p,n,l]),x.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),p1())},[c,l]),x.useEffect(()=>{const C=()=>d({});return document.addEventListener(Op,C),()=>document.removeEventListener(Op,C)},[]),$.jsx(Kn.div,{...u,ref:m,style:{pointerEvents:w?k?"auto":"none":void 0,...e.style},onFocusCapture:Mr(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Mr(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Mr(e.onPointerDownCapture,E.onPointerDownCapture)})});d1.displayName=u3;var d3="DismissableLayerBranch",p3=x.forwardRef((e,t)=>{const n=x.useContext(f1),r=x.useRef(null),i=oi(t,r);return x.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),$.jsx(Kn.div,{...e,ref:i})});p3.displayName=d3;function h3(e,t=globalThis==null?void 0:globalThis.document){const n=Kr(e),r=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let u=function(){h1(c3,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function m3(e,t=globalThis==null?void 0:globalThis.document){const n=Kr(e),r=x.useRef(!1);return x.useEffect(()=>{const i=a=>{a.target&&!r.current&&h1(f3,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function p1(){const e=new CustomEvent(Op);document.dispatchEvent(e)}function h1(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?s3(i,a):i.dispatchEvent(a)}var Cp="focusScope.autoFocusOnMount",$p="focusScope.autoFocusOnUnmount",m1={bubbles:!1,cancelable:!0},v3="FocusScope",v1=x.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,u]=x.useState(null),l=Kr(i),c=Kr(a),f=x.useRef(null),p=oi(t,h=>u(h)),d=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(r){let h=function(w){if(d.paused||!s)return;const k=w.target;s.contains(k)?f.current=k:si(f.current,{select:!0})},y=function(w){if(d.paused||!s)return;const k=w.relatedTarget;k!==null&&(s.contains(k)||si(f.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(const E of w)E.removedNodes.length>0&&si(s)};document.addEventListener("focusin",h),document.addEventListener("focusout",y);const b=new MutationObserver(v);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",y),b.disconnect()}}},[r,s,d.paused]),x.useEffect(()=>{if(s){b1.add(d);const h=document.activeElement;if(!s.contains(h)){const v=new CustomEvent(Cp,m1);s.addEventListener(Cp,l),s.dispatchEvent(v),v.defaultPrevented||(y3(S3(y1(s)),{select:!0}),document.activeElement===h&&si(s))}return()=>{s.removeEventListener(Cp,l),setTimeout(()=>{const v=new CustomEvent($p,m1);s.addEventListener($p,c),s.dispatchEvent(v),v.defaultPrevented||si(h??document.body,{select:!0}),s.removeEventListener($p,c),b1.remove(d)},0)}}},[s,l,c,d]);const m=x.useCallback(h=>{if(!n&&!r||d.paused)return;const y=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,v=document.activeElement;if(y&&v){const b=h.currentTarget,[w,k]=g3(b);w&&k?!h.shiftKey&&v===k?(h.preventDefault(),n&&si(w,{select:!0})):h.shiftKey&&v===w&&(h.preventDefault(),n&&si(k,{select:!0})):v===b&&h.preventDefault()}},[n,r,d.paused]);return $.jsx(Kn.div,{tabIndex:-1,...o,ref:p,onKeyDown:m})});v1.displayName=v3;function y3(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(si(r,{select:t}),document.activeElement!==n)return}function g3(e){const t=y1(e),n=g1(t,e),r=g1(t.reverse(),e);return[n,r]}function y1(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function g1(e,t){for(const n of e)if(!b3(n,{upTo:t}))return n}function b3(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function w3(e){return e instanceof HTMLInputElement&&"select"in e}function si(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&w3(e)&&t&&e.select()}}var b1=x3();function x3(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=w1(e,t),e.unshift(t)},remove(t){var n;e=w1(e,t),(n=e[0])==null||n.resume()}}}function w1(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function S3(e){return e.filter(t=>t.tagName!=="A")}function E3(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var Cu=e=>{const{present:t,children:n}=e,r=_3(t),i=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),a=oi(r.ref,k3(i));return typeof n=="function"||r.isPresent?x.cloneElement(i,{ref:a}):null};Cu.displayName="Presence";function _3(e){const[t,n]=x.useState(),r=x.useRef({}),i=x.useRef(e),a=x.useRef("none"),o=e?"mounted":"unmounted",[s,u]=E3(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const l=$u(r.current);a.current=s==="mounted"?l:"none"},[s]),Xi(()=>{const l=r.current,c=i.current;if(c!==e){const p=a.current,d=$u(l);e?u("MOUNT"):d==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(c&&p!==d?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),Xi(()=>{if(t){let l;const c=t.ownerDocument.defaultView??window,f=d=>{const h=$u(r.current).includes(d.animationName);if(d.target===t&&h&&(u("ANIMATION_END"),!i.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",l=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},p=d=>{d.target===t&&(a.current=$u(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{c.clearTimeout(l),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:x.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function $u(e){return(e==null?void 0:e.animationName)||"none"}function k3(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ip=0;function T3(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??x1()),document.body.insertAdjacentElement("beforeend",e[1]??x1()),Ip++,()=>{Ip===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ip--}},[])}function x1(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Iu="right-scroll-bar-position",Ru="width-before-scroll-bar",O3="with-scroll-bars-hidden",C3="--removed-body-scroll-bar-size";function Rp(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function $3(e,t){var n=j.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var I3=typeof window<"u"?x.useLayoutEffect:x.useEffect,S1=new WeakMap;function R3(e,t){var n=$3(null,function(r){return e.forEach(function(i){return Rp(i,r)})});return I3(function(){var r=S1.get(n);if(r){var i=new Set(r),a=new Set(e),o=n.current;i.forEach(function(s){a.has(s)||Rp(s,null)}),a.forEach(function(s){i.has(s)||Rp(s,o)})}S1.set(n,e)},[e]),n}function A3(e){return e}function P3(e,t){t===void 0&&(t=A3);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var o=t(a,r);return n.push(o),function(){n=n.filter(function(s){return s!==o})}},assignSyncMedium:function(a){for(r=!0;n.length;){var o=n;n=[],o.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){r=!0;var o=[];if(n.length){var s=n;n=[],s.forEach(a),o=n}var u=function(){var c=o;o=[],c.forEach(a)},l=function(){return Promise.resolve().then(u)};l(),n={push:function(c){o.push(c),l()},filter:function(c){return o=o.filter(c),n}}}};return i}function D3(e){e===void 0&&(e={});var t=P3(null);return t.options=jn({async:!0,ssr:!1},e),t}var E1=function(e){var t=e.sideCar,n=o0(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x.createElement(r,jn({},n))};E1.isSideCarExport=!0;function j3(e,t){return e.useMedium(t),E1}var _1=D3(),Ap=function(){},Au=x.forwardRef(function(e,t){var n=x.useRef(null),r=x.useState({onScrollCapture:Ap,onWheelCapture:Ap,onTouchMoveCapture:Ap}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,u=e.className,l=e.removeScrollBar,c=e.enabled,f=e.shards,p=e.sideCar,d=e.noIsolation,m=e.inert,h=e.allowPinchZoom,y=e.as,v=y===void 0?"div":y,b=e.gapMode,w=o0(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=p,E=R3([n,t]),_=jn(jn({},w),i);return x.createElement(x.Fragment,null,c&&x.createElement(k,{sideCar:_1,removeScrollBar:l,shards:f,noIsolation:d,inert:m,setCallbacks:a,allowPinchZoom:!!h,lockRef:n,gapMode:b}),o?x.cloneElement(x.Children.only(s),jn(jn({},_),{ref:E})):x.createElement(v,jn({},_,{className:u,ref:E}),s))});Au.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Au.classNames={fullWidth:Ru,zeroRight:Iu};var N3=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function M3(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=N3();return t&&e.setAttribute("nonce",t),e}function F3(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function L3(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var B3=function(){var e=0,t=null;return{add:function(n){e==0&&(t=M3())&&(F3(t,n),L3(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},U3=function(){var e=B3();return function(t,n){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},k1=function(){var e=U3(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},z3={left:0,top:0,right:0,gap:0},Pp=function(e){return parseInt(e||"",10)||0},q3=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Pp(n),Pp(r),Pp(i)]},W3=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return z3;var t=q3(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},V3=k1(),Sa="data-scroll-locked",H3=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n="margin"),`
121
- .`.concat(O3,` {
115
+ */var Mp,p1;function h1(){if(p1)return Mp;p1=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var u=Object.getOwnPropertyNames(o).map(function(c){return o[c]});if(u.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(c){l[c]=c}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Mp=i()?Object.assign:function(a,o){for(var s,u=r(a),l,c=1;c<arguments.length;c++){s=Object(arguments[c]);for(var f in s)t.call(s,f)&&(u[f]=s[f]);if(e){l=e(s);for(var d=0;d<l.length;d++)n.call(s,l[d])&&(u[l[d]]=s[l[d]])}}return u},Mp}var Fp,m1;function Lp(){if(m1)return Fp;m1=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Fp=e,Fp}var Bp,v1;function y1(){return v1||(v1=1,Bp=Function.call.bind(Object.prototype.hasOwnProperty)),Bp}var Up,g1;function H4(){if(g1)return Up;g1=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Lp(),n={},r=y1();e=function(a){var o="Warning: "+a;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function i(a,o,s,u,l){if(process.env.NODE_ENV!=="production"){for(var c in a)if(r(a,c)){var f;try{if(typeof a[c]!="function"){var d=Error((u||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}f=a[c](o,c,u,s,null,t)}catch(m){f=m}if(f&&!(f instanceof Error)&&e((u||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var p=l?l():"";e("Failed "+s+" type: "+f.message+(p??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Up=i,Up}var zp,b1;function Z4(){if(b1)return zp;b1=1;var e=Uu(),t=h1(),n=Lp(),r=y1(),i=H4(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var u="Warning: "+s;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function o(){return null}return zp=function(s,u){var l=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function f(g){var N=g&&(l&&g[l]||g[c]);if(typeof N=="function")return N}var d="<<anonymous>>",p={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:b(),arrayOf:w,element:T(),elementType:E(),instanceOf:_,node:k(),objectOf:z,oneOf:O,oneOfType:U,shape:W,exact:B};function m(g,N){return g===N?g!==0||1/g===1/N:g!==g&&N!==N}function h(g,N){this.message=g,this.data=N&&typeof N=="object"?N:{},this.stack=""}h.prototype=Error.prototype;function y(g){if(process.env.NODE_ENV!=="production")var N={},V=0;function S(J,Y,Q,ae,oe,X,ee){if(ae=ae||d,X=X||Q,ee!==n){if(u){var G=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw G.name="Invariant Violation",G}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var pe=ae+":"+Q;!N[pe]&&V<3&&(a("You are manually calling a React.PropTypes validation function for the `"+X+"` prop on `"+ae+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),N[pe]=!0,V++)}}return Y[Q]==null?J?Y[Q]===null?new h("The "+oe+" `"+X+"` is marked as required "+("in `"+ae+"`, but its value is `null`.")):new h("The "+oe+" `"+X+"` is marked as required in "+("`"+ae+"`, but its value is `undefined`.")):null:g(Y,Q,ae,oe,X)}var K=S.bind(null,!1);return K.isRequired=S.bind(null,!0),K}function v(g){function N(V,S,K,J,Y,Q){var ae=V[S],oe=L(ae);if(oe!==g){var X=Z(ae);return new h("Invalid "+J+" `"+Y+"` of type "+("`"+X+"` supplied to `"+K+"`, expected ")+("`"+g+"`."),{expectedType:g})}return null}return y(N)}function b(){return y(o)}function w(g){function N(V,S,K,J,Y){if(typeof g!="function")return new h("Property `"+Y+"` of component `"+K+"` has invalid PropType notation inside arrayOf.");var Q=V[S];if(!Array.isArray(Q)){var ae=L(Q);return new h("Invalid "+J+" `"+Y+"` of type "+("`"+ae+"` supplied to `"+K+"`, expected an array."))}for(var oe=0;oe<Q.length;oe++){var X=g(Q,oe,K,J,Y+"["+oe+"]",n);if(X instanceof Error)return X}return null}return y(N)}function T(){function g(N,V,S,K,J){var Y=N[V];if(!s(Y)){var Q=L(Y);return new h("Invalid "+K+" `"+J+"` of type "+("`"+Q+"` supplied to `"+S+"`, expected a single ReactElement."))}return null}return y(g)}function E(){function g(N,V,S,K,J){var Y=N[V];if(!e.isValidElementType(Y)){var Q=L(Y);return new h("Invalid "+K+" `"+J+"` of type "+("`"+Q+"` supplied to `"+S+"`, expected a single ReactElement type."))}return null}return y(g)}function _(g){function N(V,S,K,J,Y){if(!(V[S]instanceof g)){var Q=g.name||d,ae=R(V[S]);return new h("Invalid "+J+" `"+Y+"` of type "+("`"+ae+"` supplied to `"+K+"`, expected ")+("instance of `"+Q+"`."))}return null}return y(N)}function O(g){if(!Array.isArray(g))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),o;function N(V,S,K,J,Y){for(var Q=V[S],ae=0;ae<g.length;ae++)if(m(Q,g[ae]))return null;var oe=JSON.stringify(g,function(ee,G){var pe=Z(G);return pe==="symbol"?String(G):G});return new h("Invalid "+J+" `"+Y+"` of value `"+String(Q)+"` "+("supplied to `"+K+"`, expected one of "+oe+"."))}return y(N)}function z(g){function N(V,S,K,J,Y){if(typeof g!="function")return new h("Property `"+Y+"` of component `"+K+"` has invalid PropType notation inside objectOf.");var Q=V[S],ae=L(Q);if(ae!=="object")return new h("Invalid "+J+" `"+Y+"` of type "+("`"+ae+"` supplied to `"+K+"`, expected an object."));for(var oe in Q)if(r(Q,oe)){var X=g(Q,oe,K,J,Y+"."+oe,n);if(X instanceof Error)return X}return null}return y(N)}function U(g){if(!Array.isArray(g))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var N=0;N<g.length;N++){var V=g[N];if(typeof V!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+H(V)+" at index "+N+"."),o}function S(K,J,Y,Q,ae){for(var oe=[],X=0;X<g.length;X++){var ee=g[X],G=ee(K,J,Y,Q,ae,n);if(G==null)return null;G.data&&r(G.data,"expectedType")&&oe.push(G.data.expectedType)}var pe=oe.length>0?", expected one of type ["+oe.join(", ")+"]":"";return new h("Invalid "+Q+" `"+ae+"` supplied to "+("`"+Y+"`"+pe+"."))}return y(S)}function k(){function g(N,V,S,K,J){return I(N[V])?null:new h("Invalid "+K+" `"+J+"` supplied to "+("`"+S+"`, expected a ReactNode."))}return y(g)}function D(g,N,V,S,K){return new h((g||"React class")+": "+N+" type `"+V+"."+S+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+K+"`.")}function W(g){function N(V,S,K,J,Y){var Q=V[S],ae=L(Q);if(ae!=="object")return new h("Invalid "+J+" `"+Y+"` of type `"+ae+"` "+("supplied to `"+K+"`, expected `object`."));for(var oe in g){var X=g[oe];if(typeof X!="function")return D(K,J,Y,oe,Z(X));var ee=X(Q,oe,K,J,Y+"."+oe,n);if(ee)return ee}return null}return y(N)}function B(g){function N(V,S,K,J,Y){var Q=V[S],ae=L(Q);if(ae!=="object")return new h("Invalid "+J+" `"+Y+"` of type `"+ae+"` "+("supplied to `"+K+"`, expected `object`."));var oe=t({},V[S],g);for(var X in oe){var ee=g[X];if(r(g,X)&&typeof ee!="function")return D(K,J,Y,X,Z(ee));if(!ee)return new h("Invalid "+J+" `"+Y+"` key `"+X+"` supplied to `"+K+"`.\nBad object: "+JSON.stringify(V[S],null," ")+`
116
+ Valid keys: `+JSON.stringify(Object.keys(g),null," "));var G=ee(Q,X,K,J,Y+"."+X,n);if(G)return G}return null}return y(N)}function I(g){switch(typeof g){case"number":case"string":case"undefined":return!0;case"boolean":return!g;case"object":if(Array.isArray(g))return g.every(I);if(g===null||s(g))return!0;var N=f(g);if(N){var V=N.call(g),S;if(N!==g.entries){for(;!(S=V.next()).done;)if(!I(S.value))return!1}else for(;!(S=V.next()).done;){var K=S.value;if(K&&!I(K[1]))return!1}}else return!1;return!0;default:return!1}}function A(g,N){return g==="symbol"?!0:N?N["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&N instanceof Symbol:!1}function L(g){var N=typeof g;return Array.isArray(g)?"array":g instanceof RegExp?"object":A(N,g)?"symbol":N}function Z(g){if(typeof g>"u"||g===null)return""+g;var N=L(g);if(N==="object"){if(g instanceof Date)return"date";if(g instanceof RegExp)return"regexp"}return N}function H(g){var N=Z(g);switch(N){case"array":case"object":return"an "+N;case"boolean":case"date":case"regexp":return"a "+N;default:return N}}function R(g){return!g.constructor||!g.constructor.name?d:g.constructor.name}return p.checkPropTypes=i,p.resetWarningCache=i.resetWarningCache,p.PropTypes=p,p},zp}var qp,w1;function K4(){if(w1)return qp;w1=1;var e=Lp();function t(){}function n(){}return n.resetWarningCache=t,qp=function(){function r(o,s,u,l,c,f){if(f!==e){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},qp}if(process.env.NODE_ENV!=="production"){var G4=Uu(),Y4=!0;Np.exports=Z4()(G4.isElement,Y4)}else Np.exports=K4()();var J4=Np.exports;const bt=Ge(J4);var X4=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function vs(e,t){var n=Q4(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function Q4(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=X4.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var eB=[".DS_Store","Thumbs.db"];function tB(e){return Sa(this,void 0,void 0,function(){return Ea(this,function(t){return zu(e)&&nB(e.dataTransfer)?[2,oB(e.dataTransfer,e.type)]:rB(e)?[2,iB(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,aB(e)]:[2,[]]})})}function nB(e){return zu(e)}function rB(e){return zu(e)&&zu(e.target)}function zu(e){return typeof e=="object"&&e!==null}function iB(e){return Wp(e.target.files).map(function(t){return vs(t)})}function aB(e){return Sa(this,void 0,void 0,function(){var t;return Ea(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return vs(r)})]}})})}function oB(e,t){return Sa(this,void 0,void 0,function(){var n,r;return Ea(this,function(i){switch(i.label){case 0:return e.items?(n=Wp(e.items).filter(function(a){return a.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(sB))]):[3,2];case 1:return r=i.sent(),[2,x1(S1(r))];case 2:return[2,x1(Wp(e.files).map(function(a){return vs(a)}))]}})})}function x1(e){return e.filter(function(t){return eB.indexOf(t.name)===-1})}function Wp(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function sB(e){if(typeof e.webkitGetAsEntry!="function")return E1(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?_1(t):E1(e)}function S1(e){return e.reduce(function(t,n){return ap(ap([],q0(t),!1),q0(Array.isArray(n)?S1(n):[n]),!1)},[])}function E1(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=vs(t);return Promise.resolve(n)}function lB(e){return Sa(this,void 0,void 0,function(){return Ea(this,function(t){return[2,e.isDirectory?_1(e):uB(e)]})})}function _1(e){var t=e.createReader();return new Promise(function(n,r){var i=[];function a(){var o=this;t.readEntries(function(s){return Sa(o,void 0,void 0,function(){var u,l,c;return Ea(this,function(f){switch(f.label){case 0:if(s.length)return[3,5];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,Promise.all(i)];case 2:return u=f.sent(),n(u),[3,4];case 3:return l=f.sent(),r(l),[3,4];case 4:return[3,6];case 5:c=Promise.all(s.map(lB)),i.push(c),a(),f.label=6;case 6:return[2]}})})},function(s){r(s)})}a()})}function uB(e){return Sa(this,void 0,void 0,function(){return Ea(this,function(t){return[2,new Promise(function(n,r){e.file(function(i){var a=vs(i,e.fullPath);n(a)},function(i){r(i)})})]})})}var cB=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",i=(e.type||"").toLowerCase(),a=i.replace(/\/.*$/,"");return n.some(function(o){var s=o.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?a===s.replace(/\/.*$/,""):i===s})}return!0};function k1(e){return pB(e)||dB(e)||$1(e)||fB()}function fB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
117
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function pB(e){if(Array.isArray(e))return Vp(e)}function T1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function C1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?T1(Object(n),!0).forEach(function(r){O1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function O1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ys(e,t){return vB(e)||mB(e,t)||$1(e,t)||hB()}function hB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
118
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $1(e,t){if(e){if(typeof e=="string")return Vp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Vp(e,t)}}function Vp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function mB(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(u){a=!0,s=u}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function vB(e){if(Array.isArray(e))return e}var yB="file-invalid-type",gB="file-too-large",bB="file-too-small",wB="too-many-files",xB=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:yB,message:"File type must be ".concat(n)}},I1=function(t){return{code:gB,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},R1=function(t){return{code:bB,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},SB={code:wB,message:"Too many files"};function A1(e,t){var n=e.type==="application/x-moz-file"||cB(e,t);return[n,n?null:xB(t)]}function P1(e,t,n){if(Wi(e.size))if(Wi(t)&&Wi(n)){if(e.size>n)return[!1,I1(n)];if(e.size<t)return[!1,R1(t)]}else{if(Wi(t)&&e.size<t)return[!1,R1(t)];if(Wi(n)&&e.size>n)return[!1,I1(n)]}return[!0,null]}function Wi(e){return e!=null}function EB(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,a=e.multiple,o=e.maxFiles,s=e.validator;return!a&&t.length>1||a&&o>=1&&t.length>o?!1:t.every(function(u){var l=A1(u,n),c=ys(l,1),f=c[0],d=P1(u,r,i),p=ys(d,1),m=p[0],h=s?s(u):null;return f&&m&&!h})}function qu(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Wu(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function D1(e){e.preventDefault()}function _B(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function kB(e){return e.indexOf("Edge/")!==-1}function TB(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return _B(e)||kB(e)}function wr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];return t.some(function(s){return!qu(r)&&s&&s.apply(void 0,[r].concat(a)),qu(r)})}}function CB(){return"showOpenFilePicker"in window}function OB(e){if(Wi(e)){var t=Object.entries(e).filter(function(n){var r=ys(n,2),i=r[0],a=r[1],o=!0;return j1(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),(!Array.isArray(a)||!a.every(N1))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(n,r){var i=ys(r,2),a=i[0],o=i[1];return C1(C1({},n),{},O1({},a,o))},{});return[{description:"Files",accept:t}]}return e}function $B(e){if(Wi(e))return Object.entries(e).reduce(function(t,n){var r=ys(n,2),i=r[0],a=r[1];return[].concat(k1(t),[i],k1(a))},[]).filter(function(t){return j1(t)||N1(t)}).join(",")}function IB(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function RB(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function j1(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function N1(e){return/^.*\.[\w]+$/.test(e)}var AB=["children"],PB=["open"],DB=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],jB=["refKey","onChange","onClick"];function NB(e){return LB(e)||FB(e)||M1(e)||MB()}function MB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
119
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function LB(e){if(Array.isArray(e))return Zp(e)}function Hp(e,t){return zB(e)||UB(e,t)||M1(e,t)||BB()}function BB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
120
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M1(e,t){if(e){if(typeof e=="string")return Zp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zp(e,t)}}function Zp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function UB(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(u){a=!0,s=u}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function zB(e){if(Array.isArray(e))return e}function F1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ot(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?F1(Object(n),!0).forEach(function(r){Kp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Kp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vu(e,t){if(e==null)return{};var n=qB(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qB(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Hu=j.forwardRef(function(e,t){var n=e.children,r=Vu(e,AB),i=WB(r),a=i.open,o=Vu(i,PB);return j.useImperativeHandle(t,function(){return{open:a}},[a]),j.createElement(j.Fragment,null,n(Ot(Ot({},o),{},{open:a})))});Hu.displayName="Dropzone";var L1={disabled:!1,getFilesFromEvent:tB,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Hu.defaultProps=L1,Hu.propTypes={children:bt.func,accept:bt.objectOf(bt.arrayOf(bt.string)),multiple:bt.bool,preventDropOnDocument:bt.bool,noClick:bt.bool,noKeyboard:bt.bool,noDrag:bt.bool,noDragEventsBubbling:bt.bool,minSize:bt.number,maxSize:bt.number,maxFiles:bt.number,disabled:bt.bool,getFilesFromEvent:bt.func,onFileDialogCancel:bt.func,onFileDialogOpen:bt.func,useFsAccessApi:bt.bool,autoFocus:bt.bool,onDragEnter:bt.func,onDragLeave:bt.func,onDragOver:bt.func,onDrop:bt.func,onDropAccepted:bt.func,onDropRejected:bt.func,onError:bt.func,validator:bt.func};var Gp={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function WB(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Ot(Ot({},L1),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,o=t.minSize,s=t.multiple,u=t.maxFiles,l=t.onDragEnter,c=t.onDragLeave,f=t.onDragOver,d=t.onDrop,p=t.onDropAccepted,m=t.onDropRejected,h=t.onFileDialogCancel,y=t.onFileDialogOpen,v=t.useFsAccessApi,b=t.autoFocus,w=t.preventDropOnDocument,T=t.noClick,E=t.noKeyboard,_=t.noDrag,O=t.noDragEventsBubbling,z=t.onError,U=t.validator,k=j.useMemo(function(){return $B(n)},[n]),D=j.useMemo(function(){return OB(n)},[n]),W=j.useMemo(function(){return typeof y=="function"?y:B1},[y]),B=j.useMemo(function(){return typeof h=="function"?h:B1},[h]),I=j.useRef(null),A=j.useRef(null),L=j.useReducer(VB,Gp),Z=Hp(L,2),H=Z[0],R=Z[1],g=H.isFocused,N=H.isFileDialogActive,V=j.useRef(typeof window<"u"&&window.isSecureContext&&v&&CB()),S=function(){!V.current&&N&&setTimeout(function(){if(A.current){var fe=A.current.files;fe.length||(R({type:"closeDialog"}),B())}},300)};j.useEffect(function(){return window.addEventListener("focus",S,!1),function(){window.removeEventListener("focus",S,!1)}},[A,N,B,V]);var K=j.useRef([]),J=function(fe){I.current&&I.current.contains(fe.target)||(fe.preventDefault(),K.current=[])};j.useEffect(function(){return w&&(document.addEventListener("dragover",D1,!1),document.addEventListener("drop",J,!1)),function(){w&&(document.removeEventListener("dragover",D1),document.removeEventListener("drop",J))}},[I,w]),j.useEffect(function(){return!r&&b&&I.current&&I.current.focus(),function(){}},[I,b,r]);var Y=j.useCallback(function(te){z?z(te):console.error(te)},[z]),Q=j.useCallback(function(te){te.preventDefault(),te.persist(),Ce(te),K.current=[].concat(NB(K.current),[te.target]),Wu(te)&&Promise.resolve(i(te)).then(function(fe){if(!(qu(te)&&!O)){var q=fe.length,M=q>0&&EB({files:fe,accept:k,minSize:o,maxSize:a,multiple:s,maxFiles:u,validator:U}),ne=q>0&&!M;R({isDragAccept:M,isDragReject:ne,isDragActive:!0,type:"setDraggedFiles"}),l&&l(te)}}).catch(function(fe){return Y(fe)})},[i,l,Y,O,k,o,a,s,u,U]),ae=j.useCallback(function(te){te.preventDefault(),te.persist(),Ce(te);var fe=Wu(te);if(fe&&te.dataTransfer)try{te.dataTransfer.dropEffect="copy"}catch{}return fe&&f&&f(te),!1},[f,O]),oe=j.useCallback(function(te){te.preventDefault(),te.persist(),Ce(te);var fe=K.current.filter(function(M){return I.current&&I.current.contains(M)}),q=fe.indexOf(te.target);q!==-1&&fe.splice(q,1),K.current=fe,!(fe.length>0)&&(R({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Wu(te)&&c&&c(te))},[I,c,O]),X=j.useCallback(function(te,fe){var q=[],M=[];te.forEach(function(ne){var he=A1(ne,k),Se=Hp(he,2),$e=Se[0],Ze=Se[1],et=P1(ne,o,a),Tt=Hp(et,2),Et=Tt[0],qe=Tt[1],_t=U?U(ne):null;if($e&&Et&&!_t)q.push(ne);else{var Ke=[Ze,qe];_t&&(Ke=Ke.concat(_t)),M.push({file:ne,errors:Ke.filter(function(hn){return hn})})}}),(!s&&q.length>1||s&&u>=1&&q.length>u)&&(q.forEach(function(ne){M.push({file:ne,errors:[SB]})}),q.splice(0)),R({acceptedFiles:q,fileRejections:M,type:"setFiles"}),d&&d(q,M,fe),M.length>0&&m&&m(M,fe),q.length>0&&p&&p(q,fe)},[R,s,k,o,a,u,d,p,m,U]),ee=j.useCallback(function(te){te.preventDefault(),te.persist(),Ce(te),K.current=[],Wu(te)&&Promise.resolve(i(te)).then(function(fe){qu(te)&&!O||X(fe,te)}).catch(function(fe){return Y(fe)}),R({type:"reset"})},[i,X,Y,O]),G=j.useCallback(function(){if(V.current){R({type:"openDialog"}),W();var te={multiple:s,types:D};window.showOpenFilePicker(te).then(function(fe){return i(fe)}).then(function(fe){X(fe,null),R({type:"closeDialog"})}).catch(function(fe){IB(fe)?(B(fe),R({type:"closeDialog"})):RB(fe)?(V.current=!1,A.current?(A.current.value=null,A.current.click()):Y(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):Y(fe)});return}A.current&&(R({type:"openDialog"}),W(),A.current.value=null,A.current.click())},[R,W,B,v,X,Y,D,s]),pe=j.useCallback(function(te){!I.current||!I.current.isEqualNode(te.target)||(te.key===" "||te.key==="Enter"||te.keyCode===32||te.keyCode===13)&&(te.preventDefault(),G())},[I,G]),ge=j.useCallback(function(){R({type:"focus"})},[]),Ie=j.useCallback(function(){R({type:"blur"})},[]),F=j.useCallback(function(){T||(TB()?setTimeout(G,0):G())},[T,G]),ie=function(fe){return r?null:fe},ce=function(fe){return E?null:ie(fe)},se=function(fe){return _?null:ie(fe)},Ce=function(fe){O&&fe.stopPropagation()},Ee=j.useMemo(function(){return function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},fe=te.refKey,q=fe===void 0?"ref":fe,M=te.role,ne=te.onKeyDown,he=te.onFocus,Se=te.onBlur,$e=te.onClick,Ze=te.onDragEnter,et=te.onDragOver,Tt=te.onDragLeave,Et=te.onDrop,qe=Vu(te,DB);return Ot(Ot(Kp({onKeyDown:ce(wr(ne,pe)),onFocus:ce(wr(he,ge)),onBlur:ce(wr(Se,Ie)),onClick:ie(wr($e,F)),onDragEnter:se(wr(Ze,Q)),onDragOver:se(wr(et,ae)),onDragLeave:se(wr(Tt,oe)),onDrop:se(wr(Et,ee)),role:typeof M=="string"&&M!==""?M:"presentation"},q,I),!r&&!E?{tabIndex:0}:{}),qe)}},[I,pe,ge,Ie,F,Q,ae,oe,ee,E,_,r]),Ae=j.useCallback(function(te){te.stopPropagation()},[]),He=j.useMemo(function(){return function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},fe=te.refKey,q=fe===void 0?"ref":fe,M=te.onChange,ne=te.onClick,he=Vu(te,jB),Se=Kp({accept:k,multiple:s,type:"file",style:{display:"none"},onChange:ie(wr(M,ee)),onClick:ie(wr(ne,Ae)),tabIndex:-1},q,A);return Ot(Ot({},Se),he)}},[A,n,s,ee,r]);return Ot(Ot({},H),{},{isFocused:g&&!r,getRootProps:Ee,getInputProps:He,rootRef:I,inputRef:A,open:ie(G)})}function VB(e,t){switch(t.type){case"focus":return Ot(Ot({},e),{},{isFocused:!0});case"blur":return Ot(Ot({},e),{},{isFocused:!1});case"openDialog":return Ot(Ot({},Gp),{},{isFileDialogActive:!0});case"closeDialog":return Ot(Ot({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Ot(Ot({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Ot(Ot({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Ot({},Gp);default:return e}}function B1(){}const Yp=({children:e})=>{const[t,n]=j.useState(!1),[r,i]=j.useState(""),[a,o]=j.useState(null),s=({title:l,content:c})=>{i(l),o(c),n(!0)},u=()=>{n(!1)};return $.jsxs(B0.Provider,{value:{hideModal:u,showModal:s,title:r,content:a,open:t},children:[$.jsx(gi,{open:t,onOpenChange:n,children:$.jsx(gi.Content,{title:r,children:a})}),e]})},U1=({color:e,fontFamily:t,radius:n,themeMode:r,variant:i})=>{const a=j.useMemo(()=>hb({color:e,fontFamily:t,radius:n,themeMode:r,variant:i}),[e,t,n,r,i]);return $.jsx("style",{children:a})};function Vr(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function z1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function q1(...e){return t=>{let n=!1;const r=e.map(i=>{const a=z1(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():z1(e[i],null)}}}}function vi(...e){return x.useCallback(q1(...e),e)}function HB(e,t){const n=x.createContext(t),r=a=>{const{children:o,...s}=a,u=x.useMemo(()=>s,Object.values(s));return $.jsx(n.Provider,{value:u,children:o})};r.displayName=e+"Provider";function i(a){const o=x.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function W1(e,t=[]){let n=[];function r(a,o){const s=x.createContext(o),u=n.length;n=[...n,o];const l=f=>{var v;const{scope:d,children:p,...m}=f,h=((v=d==null?void 0:d[e])==null?void 0:v[u])||s,y=x.useMemo(()=>m,Object.values(m));return $.jsx(h.Provider,{value:y,children:p})};l.displayName=a+"Provider";function c(f,d){var h;const p=((h=d==null?void 0:d[e])==null?void 0:h[u])||s,m=x.useContext(p);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[l,c]}const i=()=>{const a=n.map(o=>x.createContext(o));return function(s){const u=(s==null?void 0:s[e])||a;return x.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,ZB(i,...t)]}function ZB(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:u,scopeName:l})=>{const f=u(a)[`__scope${l}`];return{...s,...f}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var KB=x.useId||(()=>{}),GB=0;function Zu(e){const[t,n]=x.useState(KB());return ca(()=>{e||n(r=>r??String(GB++))},[e]),e||(t?`radix-${t}`:"")}function V1({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=YB({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=ri(n),u=x.useCallback(l=>{if(a){const f=typeof l=="function"?l(e):l;f!==e&&s(f)}else i(l)},[a,e,i,s]);return[o,u]}function YB({defaultProp:e,onChange:t}){const n=x.useState(e),[r]=n,i=x.useRef(r),a=ri(t);return x.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}var Jp=x.forwardRef((e,t)=>{const{children:n,...r}=e,i=x.Children.toArray(n),a=i.find(XB);if(a){const o=a.props.children,s=i.map(u=>u===a?x.Children.count(o)>1?x.Children.only(null):x.isValidElement(o)?o.props.children:null:u);return $.jsx(Xp,{...r,ref:t,children:x.isValidElement(o)?x.cloneElement(o,void 0,s):null})}return $.jsx(Xp,{...r,ref:t,children:n})});Jp.displayName="Slot";var Xp=x.forwardRef((e,t)=>{const{children:n,...r}=e;if(x.isValidElement(n)){const i=e3(n);return x.cloneElement(n,{...QB(r,n.props),ref:t?q1(t,i):i})}return x.Children.count(n)>1?x.Children.only(null):null});Xp.displayName="SlotClone";var JB=({children:e})=>$.jsx($.Fragment,{children:e});function XB(e){return x.isValidElement(e)&&e.type===JB}function QB(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{a(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function e3(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var t3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],er=t3.reduce((e,t)=>{const n=x.forwardRef((r,i)=>{const{asChild:a,...o}=r,s=a?Jp:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),$.jsx(s,{...o,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function n3(e,t){e&&_g.flushSync(()=>e.dispatchEvent(t))}function r3(e,t=globalThis==null?void 0:globalThis.document){const n=ri(e);x.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var i3="DismissableLayer",Qp="dismissableLayer.update",a3="dismissableLayer.pointerDownOutside",o3="dismissableLayer.focusOutside",H1,Z1=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),K1=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...u}=e,l=x.useContext(Z1),[c,f]=x.useState(null),d=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=x.useState({}),m=vi(t,O=>f(O)),h=Array.from(l.layers),[y]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),v=h.indexOf(y),b=c?h.indexOf(c):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,T=b>=v,E=u3(O=>{const z=O.target,U=[...l.branches].some(k=>k.contains(z));!T||U||(i==null||i(O),o==null||o(O),O.defaultPrevented||s==null||s())},d),_=c3(O=>{const z=O.target;[...l.branches].some(k=>k.contains(z))||(a==null||a(O),o==null||o(O),O.defaultPrevented||s==null||s())},d);return r3(O=>{b===l.layers.size-1&&(r==null||r(O),!O.defaultPrevented&&s&&(O.preventDefault(),s()))},d),x.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(H1=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),G1(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=H1)}},[c,d,n,l]),x.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),G1())},[c,l]),x.useEffect(()=>{const O=()=>p({});return document.addEventListener(Qp,O),()=>document.removeEventListener(Qp,O)},[]),$.jsx(er.div,{...u,ref:m,style:{pointerEvents:w?T?"auto":"none":void 0,...e.style},onFocusCapture:Vr(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Vr(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Vr(e.onPointerDownCapture,E.onPointerDownCapture)})});K1.displayName=i3;var s3="DismissableLayerBranch",l3=x.forwardRef((e,t)=>{const n=x.useContext(Z1),r=x.useRef(null),i=vi(t,r);return x.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),$.jsx(er.div,{...e,ref:i})});l3.displayName=s3;function u3(e,t=globalThis==null?void 0:globalThis.document){const n=ri(e),r=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let u=function(){Y1(a3,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function c3(e,t=globalThis==null?void 0:globalThis.document){const n=ri(e),r=x.useRef(!1);return x.useEffect(()=>{const i=a=>{a.target&&!r.current&&Y1(o3,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function G1(){const e=new CustomEvent(Qp);document.dispatchEvent(e)}function Y1(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?n3(i,a):i.dispatchEvent(a)}var eh="focusScope.autoFocusOnMount",th="focusScope.autoFocusOnUnmount",J1={bubbles:!1,cancelable:!0},f3="FocusScope",X1=x.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,u]=x.useState(null),l=ri(i),c=ri(a),f=x.useRef(null),d=vi(t,h=>u(h)),p=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(r){let h=function(w){if(p.paused||!s)return;const T=w.target;s.contains(T)?f.current=T:yi(f.current,{select:!0})},y=function(w){if(p.paused||!s)return;const T=w.relatedTarget;T!==null&&(s.contains(T)||yi(f.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(const E of w)E.removedNodes.length>0&&yi(s)};document.addEventListener("focusin",h),document.addEventListener("focusout",y);const b=new MutationObserver(v);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",y),b.disconnect()}}},[r,s,p.paused]),x.useEffect(()=>{if(s){tS.add(p);const h=document.activeElement;if(!s.contains(h)){const v=new CustomEvent(eh,J1);s.addEventListener(eh,l),s.dispatchEvent(v),v.defaultPrevented||(d3(y3(Q1(s)),{select:!0}),document.activeElement===h&&yi(s))}return()=>{s.removeEventListener(eh,l),setTimeout(()=>{const v=new CustomEvent(th,J1);s.addEventListener(th,c),s.dispatchEvent(v),v.defaultPrevented||yi(h??document.body,{select:!0}),s.removeEventListener(th,c),tS.remove(p)},0)}}},[s,l,c,p]);const m=x.useCallback(h=>{if(!n&&!r||p.paused)return;const y=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,v=document.activeElement;if(y&&v){const b=h.currentTarget,[w,T]=p3(b);w&&T?!h.shiftKey&&v===T?(h.preventDefault(),n&&yi(w,{select:!0})):h.shiftKey&&v===w&&(h.preventDefault(),n&&yi(T,{select:!0})):v===b&&h.preventDefault()}},[n,r,p.paused]);return $.jsx(er.div,{tabIndex:-1,...o,ref:d,onKeyDown:m})});X1.displayName=f3;function d3(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(yi(r,{select:t}),document.activeElement!==n)return}function p3(e){const t=Q1(e),n=eS(t,e),r=eS(t.reverse(),e);return[n,r]}function Q1(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function eS(e,t){for(const n of e)if(!h3(n,{upTo:t}))return n}function h3(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function m3(e){return e instanceof HTMLInputElement&&"select"in e}function yi(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&m3(e)&&t&&e.select()}}var tS=v3();function v3(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=nS(e,t),e.unshift(t)},remove(t){var n;e=nS(e,t),(n=e[0])==null||n.resume()}}}function nS(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function y3(e){return e.filter(t=>t.tagName!=="A")}function g3(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var Ku=e=>{const{present:t,children:n}=e,r=b3(t),i=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),a=vi(r.ref,w3(i));return typeof n=="function"||r.isPresent?x.cloneElement(i,{ref:a}):null};Ku.displayName="Presence";function b3(e){const[t,n]=x.useState(),r=x.useRef({}),i=x.useRef(e),a=x.useRef("none"),o=e?"mounted":"unmounted",[s,u]=g3(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const l=Gu(r.current);a.current=s==="mounted"?l:"none"},[s]),ca(()=>{const l=r.current,c=i.current;if(c!==e){const d=a.current,p=Gu(l);e?u("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(c&&d!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),ca(()=>{if(t){let l;const c=t.ownerDocument.defaultView??window,f=p=>{const h=Gu(r.current).includes(p.animationName);if(p.target===t&&h&&(u("ANIMATION_END"),!i.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",l=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},d=p=>{p.target===t&&(a.current=Gu(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{c.clearTimeout(l),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:x.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function Gu(e){return(e==null?void 0:e.animationName)||"none"}function w3(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var nh=0;function x3(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??rS()),document.body.insertAdjacentElement("beforeend",e[1]??rS()),nh++,()=>{nh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),nh--}},[])}function rS(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Yu="right-scroll-bar-position",Ju="width-before-scroll-bar",S3="with-scroll-bars-hidden",E3="--removed-body-scroll-bar-size";function rh(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function _3(e,t){var n=j.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var k3=typeof window<"u"?x.useLayoutEffect:x.useEffect,iS=new WeakMap;function T3(e,t){var n=_3(null,function(r){return e.forEach(function(i){return rh(i,r)})});return k3(function(){var r=iS.get(n);if(r){var i=new Set(r),a=new Set(e),o=n.current;i.forEach(function(s){a.has(s)||rh(s,null)}),a.forEach(function(s){i.has(s)||rh(s,o)})}iS.set(n,e)},[e]),n}function C3(e){return e}function O3(e,t){t===void 0&&(t=C3);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var o=t(a,r);return n.push(o),function(){n=n.filter(function(s){return s!==o})}},assignSyncMedium:function(a){for(r=!0;n.length;){var o=n;n=[],o.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){r=!0;var o=[];if(n.length){var s=n;n=[],s.forEach(a),o=n}var u=function(){var c=o;o=[],c.forEach(a)},l=function(){return Promise.resolve().then(u)};l(),n={push:function(c){o.push(c),l()},filter:function(c){return o=o.filter(c),n}}}};return i}function $3(e){e===void 0&&(e={});var t=O3(null);return t.options=Un({async:!0,ssr:!1},e),t}var aS=function(e){var t=e.sideCar,n=z0(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x.createElement(r,Un({},n))};aS.isSideCarExport=!0;function I3(e,t){return e.useMedium(t),aS}var oS=$3(),ih=function(){},Xu=x.forwardRef(function(e,t){var n=x.useRef(null),r=x.useState({onScrollCapture:ih,onWheelCapture:ih,onTouchMoveCapture:ih}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,u=e.className,l=e.removeScrollBar,c=e.enabled,f=e.shards,d=e.sideCar,p=e.noIsolation,m=e.inert,h=e.allowPinchZoom,y=e.as,v=y===void 0?"div":y,b=e.gapMode,w=z0(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=d,E=T3([n,t]),_=Un(Un({},w),i);return x.createElement(x.Fragment,null,c&&x.createElement(T,{sideCar:oS,removeScrollBar:l,shards:f,noIsolation:p,inert:m,setCallbacks:a,allowPinchZoom:!!h,lockRef:n,gapMode:b}),o?x.cloneElement(x.Children.only(s),Un(Un({},_),{ref:E})):x.createElement(v,Un({},_,{className:u,ref:E}),s))});Xu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Xu.classNames={fullWidth:Ju,zeroRight:Yu};var R3=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function A3(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=R3();return t&&e.setAttribute("nonce",t),e}function P3(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function D3(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var j3=function(){var e=0,t=null;return{add:function(n){e==0&&(t=A3())&&(P3(t,n),D3(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},N3=function(){var e=j3();return function(t,n){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},sS=function(){var e=N3(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},M3={left:0,top:0,right:0,gap:0},ah=function(e){return parseInt(e||"",10)||0},F3=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[ah(n),ah(r),ah(i)]},L3=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return M3;var t=F3(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},B3=sS(),Da="data-scroll-locked",U3=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n="margin"),`
121
+ .`.concat(S3,` {
122
122
  overflow: hidden `).concat(r,`;
123
123
  padding-right: `).concat(s,"px ").concat(r,`;
124
124
  }
125
- body[`).concat(Sa,`] {
125
+ body[`).concat(Da,`] {
126
126
  overflow: hidden `).concat(r,`;
127
127
  overscroll-behavior: contain;
128
128
  `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
@@ -135,50 +135,54 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
135
135
  `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
136
136
  }
137
137
 
138
- .`).concat(Iu,` {
138
+ .`).concat(Yu,` {
139
139
  right: `).concat(s,"px ").concat(r,`;
140
140
  }
141
141
 
142
- .`).concat(Ru,` {
142
+ .`).concat(Ju,` {
143
143
  margin-right: `).concat(s,"px ").concat(r,`;
144
144
  }
145
145
 
146
- .`).concat(Iu," .").concat(Iu,` {
146
+ .`).concat(Yu," .").concat(Yu,` {
147
147
  right: 0 `).concat(r,`;
148
148
  }
149
149
 
150
- .`).concat(Ru," .").concat(Ru,` {
150
+ .`).concat(Ju," .").concat(Ju,` {
151
151
  margin-right: 0 `).concat(r,`;
152
152
  }
153
153
 
154
- body[`).concat(Sa,`] {
155
- `).concat(C3,": ").concat(s,`px;
154
+ body[`).concat(Da,`] {
155
+ `).concat(E3,": ").concat(s,`px;
156
156
  }
157
- `)},T1=function(){var e=parseInt(document.body.getAttribute(Sa)||"0",10);return isFinite(e)?e:0},Z3=function(){x.useEffect(function(){return document.body.setAttribute(Sa,(T1()+1).toString()),function(){var e=T1()-1;e<=0?document.body.removeAttribute(Sa):document.body.setAttribute(Sa,e.toString())}},[])},K3=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;Z3();var a=x.useMemo(function(){return W3(i)},[i]);return x.createElement(V3,{styles:H3(a,!t,i,n?"":"!important")})},Dp=!1;if(typeof window<"u")try{var Pu=Object.defineProperty({},"passive",{get:function(){return Dp=!0,!0}});window.addEventListener("test",Pu,Pu),window.removeEventListener("test",Pu,Pu)}catch{Dp=!1}var Ea=Dp?{passive:!1}:!1,G3=function(e){return e.tagName==="TEXTAREA"},O1=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!G3(e)&&n[t]==="visible")},Y3=function(e){return O1(e,"overflowY")},J3=function(e){return O1(e,"overflowX")},C1=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=$1(e,r);if(i){var a=I1(e,r),o=a[1],s=a[2];if(o>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},X3=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Q3=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},$1=function(e,t){return e==="v"?Y3(t):J3(t)},I1=function(e,t){return e==="v"?X3(t):Q3(t)},eB=function(e,t){return e==="h"&&t==="rtl"?-1:1},tB=function(e,t,n,r,i){var a=eB(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,u=t.contains(s),l=!1,c=o>0,f=0,p=0;do{var d=I1(e,s),m=d[0],h=d[1],y=d[2],v=h-y-a*m;(m||v)&&$1(e,s)&&(f+=v,p+=m),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(c&&(Math.abs(f)<1||!i)||!c&&(Math.abs(p)<1||!i))&&(l=!0),l},Du=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},R1=function(e){return[e.deltaX,e.deltaY]},A1=function(e){return e&&"current"in e?e.current:e},nB=function(e,t){return e[0]===t[0]&&e[1]===t[1]},rB=function(e){return`
157
+ `)},lS=function(){var e=parseInt(document.body.getAttribute(Da)||"0",10);return isFinite(e)?e:0},z3=function(){x.useEffect(function(){return document.body.setAttribute(Da,(lS()+1).toString()),function(){var e=lS()-1;e<=0?document.body.removeAttribute(Da):document.body.setAttribute(Da,e.toString())}},[])},q3=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;z3();var a=x.useMemo(function(){return L3(i)},[i]);return x.createElement(B3,{styles:U3(a,!t,i,n?"":"!important")})},oh=!1;if(typeof window<"u")try{var Qu=Object.defineProperty({},"passive",{get:function(){return oh=!0,!0}});window.addEventListener("test",Qu,Qu),window.removeEventListener("test",Qu,Qu)}catch{oh=!1}var ja=oh?{passive:!1}:!1,W3=function(e){return e.tagName==="TEXTAREA"},uS=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!W3(e)&&n[t]==="visible")},V3=function(e){return uS(e,"overflowY")},H3=function(e){return uS(e,"overflowX")},cS=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=fS(e,r);if(i){var a=dS(e,r),o=a[1],s=a[2];if(o>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Z3=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},K3=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},fS=function(e,t){return e==="v"?V3(t):H3(t)},dS=function(e,t){return e==="v"?Z3(t):K3(t)},G3=function(e,t){return e==="h"&&t==="rtl"?-1:1},Y3=function(e,t,n,r,i){var a=G3(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,u=t.contains(s),l=!1,c=o>0,f=0,d=0;do{var p=dS(e,s),m=p[0],h=p[1],y=p[2],v=h-y-a*m;(m||v)&&fS(e,s)&&(f+=v,d+=m),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(c&&(Math.abs(f)<1||!i)||!c&&(Math.abs(d)<1||!i))&&(l=!0),l},ec=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},pS=function(e){return[e.deltaX,e.deltaY]},hS=function(e){return e&&"current"in e?e.current:e},J3=function(e,t){return e[0]===t[0]&&e[1]===t[1]},X3=function(e){return`
158
158
  .block-interactivity-`.concat(e,` {pointer-events: none;}
159
159
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
160
- `)},iB=0,_a=[];function aB(e){var t=x.useRef([]),n=x.useRef([0,0]),r=x.useRef(),i=x.useState(iB++)[0],a=x.useState(k1)[0],o=x.useRef(e);x.useEffect(function(){o.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var h=Pd([e.lockRef.current],(e.shards||[]).map(A1),!0).filter(Boolean);return h.forEach(function(y){return y.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),h.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=x.useCallback(function(h,y){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!o.current.allowPinchZoom;var v=Du(h),b=n.current,w="deltaX"in h?h.deltaX:b[0]-v[0],k="deltaY"in h?h.deltaY:b[1]-v[1],E,_=h.target,C=Math.abs(w)>Math.abs(k)?"h":"v";if("touches"in h&&C==="h"&&_.type==="range")return!1;var z=C1(C,_);if(!z)return!0;if(z?E=C:(E=C==="v"?"h":"v",z=C1(C,_)),!z)return!1;if(!r.current&&"changedTouches"in h&&(w||k)&&(r.current=E),!E)return!0;var B=r.current||E;return tB(B,y,h,B==="h"?w:k,!0)},[]),u=x.useCallback(function(h){var y=h;if(!(!_a.length||_a[_a.length-1]!==a)){var v="deltaY"in y?R1(y):Du(y),b=t.current.filter(function(E){return E.name===y.type&&(E.target===y.target||y.target===E.shadowParent)&&nB(E.delta,v)})[0];if(b&&b.should){y.cancelable&&y.preventDefault();return}if(!b){var w=(o.current.shards||[]).map(A1).filter(Boolean).filter(function(E){return E.contains(y.target)}),k=w.length>0?s(y,w[0]):!o.current.noIsolation;k&&y.cancelable&&y.preventDefault()}}},[]),l=x.useCallback(function(h,y,v,b){var w={name:h,delta:y,target:v,should:b,shadowParent:oB(v)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(k){return k!==w})},1)},[]),c=x.useCallback(function(h){n.current=Du(h),r.current=void 0},[]),f=x.useCallback(function(h){l(h.type,R1(h),h.target,s(h,e.lockRef.current))},[]),p=x.useCallback(function(h){l(h.type,Du(h),h.target,s(h,e.lockRef.current))},[]);x.useEffect(function(){return _a.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",u,Ea),document.addEventListener("touchmove",u,Ea),document.addEventListener("touchstart",c,Ea),function(){_a=_a.filter(function(h){return h!==a}),document.removeEventListener("wheel",u,Ea),document.removeEventListener("touchmove",u,Ea),document.removeEventListener("touchstart",c,Ea)}},[]);var d=e.removeScrollBar,m=e.inert;return x.createElement(x.Fragment,null,m?x.createElement(a,{styles:rB(i)}):null,d?x.createElement(K3,{gapMode:e.gapMode}):null)}function oB(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const sB=j3(_1,aB);var P1=x.forwardRef(function(e,t){return x.createElement(Au,jn({},e,{ref:t,sideCar:sB}))});P1.classNames=Au.classNames;var lB=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ka=new WeakMap,ju=new WeakMap,Nu={},jp=0,D1=function(e){return e&&(e.host||D1(e.parentNode))},uB=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=D1(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},cB=function(e,t,n,r){var i=uB(t,Array.isArray(e)?e:[e]);Nu[n]||(Nu[n]=new WeakMap);var a=Nu[n],o=[],s=new Set,u=new Set(i),l=function(f){!f||s.has(f)||(s.add(f),l(f.parentNode))};i.forEach(l);var c=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(p){if(s.has(p))c(p);else try{var d=p.getAttribute(r),m=d!==null&&d!=="false",h=(ka.get(p)||0)+1,y=(a.get(p)||0)+1;ka.set(p,h),a.set(p,y),o.push(p),h===1&&m&&ju.set(p,!0),y===1&&p.setAttribute(n,"true"),m||p.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",p,v)}})};return c(t),s.clear(),jp++,function(){o.forEach(function(f){var p=ka.get(f)-1,d=a.get(f)-1;ka.set(f,p),a.set(f,d),p||(ju.has(f)||f.removeAttribute(r),ju.delete(f)),d||f.removeAttribute(n)}),jp--,jp||(ka=new WeakMap,ka=new WeakMap,ju=new WeakMap,Nu={})}},fB=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=lB(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),cB(r,i,n,"aria-hidden")):function(){return null}},Np="Dialog",[j1,que]=l1(Np),[dB,pr]=j1(Np),N1=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=x.useRef(null),u=x.useRef(null),[l=!1,c]=u1({prop:r,defaultProp:i,onChange:a});return $.jsx(dB,{scope:t,triggerRef:s,contentRef:u,contentId:Ou(),titleId:Ou(),descriptionId:Ou(),open:l,onOpenChange:c,onOpenToggle:x.useCallback(()=>c(f=>!f),[c]),modal:o,children:n})};N1.displayName=Np;var M1="DialogTrigger",F1=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=pr(M1,n),a=oi(t,i.triggerRef);return $.jsx(Kn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Fp(i.open),...r,ref:a,onClick:Mr(e.onClick,i.onOpenToggle)})});F1.displayName=M1;var pB="DialogPortal",[Wue,L1]=j1(pB,{forceMount:void 0}),Mu="DialogOverlay",B1=x.forwardRef((e,t)=>{const n=L1(Mu,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=pr(Mu,e.__scopeDialog);return a.modal?$.jsx(Cu,{present:r||a.open,children:$.jsx(hB,{...i,ref:t})}):null});B1.displayName=Mu;var hB=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=pr(Mu,n);return $.jsx(P1,{as:kp,allowPinchZoom:!0,shards:[i.contentRef],children:$.jsx(Kn.div,{"data-state":Fp(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Di="DialogContent",U1=x.forwardRef((e,t)=>{const n=L1(Di,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=pr(Di,e.__scopeDialog);return $.jsx(Cu,{present:r||a.open,children:a.modal?$.jsx(mB,{...i,ref:t}):$.jsx(vB,{...i,ref:t})})});U1.displayName=Di;var mB=x.forwardRef((e,t)=>{const n=pr(Di,e.__scopeDialog),r=x.useRef(null),i=oi(t,n.contentRef,r);return x.useEffect(()=>{const a=r.current;if(a)return fB(a)},[]),$.jsx(z1,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Mr(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Mr(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:Mr(e.onFocusOutside,a=>a.preventDefault())})}),vB=x.forwardRef((e,t)=>{const n=pr(Di,e.__scopeDialog),r=x.useRef(!1),i=x.useRef(!1);return $.jsx(z1,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var u,l;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((l=n.triggerRef.current)==null?void 0:l.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),z1=x.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=pr(Di,n),u=x.useRef(null),l=oi(t,u);return T3(),$.jsxs($.Fragment,{children:[$.jsx(v1,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:$.jsx(d1,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Fp(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),$.jsxs($.Fragment,{children:[$.jsx(gB,{titleId:s.titleId}),$.jsx(wB,{contentRef:u,descriptionId:s.descriptionId})]})]})}),Mp="DialogTitle",q1=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=pr(Mp,n);return $.jsx(Kn.h2,{id:i.titleId,...r,ref:t})});q1.displayName=Mp;var W1="DialogDescription",yB=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=pr(W1,n);return $.jsx(Kn.p,{id:i.descriptionId,...r,ref:t})});yB.displayName=W1;var V1="DialogClose",H1=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=pr(V1,n);return $.jsx(Kn.button,{type:"button",...r,ref:t,onClick:Mr(e.onClick,()=>i.onOpenChange(!1))})});H1.displayName=V1;function Fp(e){return e?"open":"closed"}var Z1="DialogTitleWarning",[Vue,K1]=J4(Z1,{contentName:Di,titleName:Mp,docsSlug:"dialog"}),gB=({titleId:e})=>{const t=K1(Z1),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
160
+ `)},Q3=0,Na=[];function eU(e){var t=x.useRef([]),n=x.useRef([0,0]),r=x.useRef(),i=x.useState(Q3++)[0],a=x.useState(sS)[0],o=x.useRef(e);x.useEffect(function(){o.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var h=ap([e.lockRef.current],(e.shards||[]).map(hS),!0).filter(Boolean);return h.forEach(function(y){return y.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),h.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=x.useCallback(function(h,y){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!o.current.allowPinchZoom;var v=ec(h),b=n.current,w="deltaX"in h?h.deltaX:b[0]-v[0],T="deltaY"in h?h.deltaY:b[1]-v[1],E,_=h.target,O=Math.abs(w)>Math.abs(T)?"h":"v";if("touches"in h&&O==="h"&&_.type==="range")return!1;var z=cS(O,_);if(!z)return!0;if(z?E=O:(E=O==="v"?"h":"v",z=cS(O,_)),!z)return!1;if(!r.current&&"changedTouches"in h&&(w||T)&&(r.current=E),!E)return!0;var U=r.current||E;return Y3(U,y,h,U==="h"?w:T,!0)},[]),u=x.useCallback(function(h){var y=h;if(!(!Na.length||Na[Na.length-1]!==a)){var v="deltaY"in y?pS(y):ec(y),b=t.current.filter(function(E){return E.name===y.type&&(E.target===y.target||y.target===E.shadowParent)&&J3(E.delta,v)})[0];if(b&&b.should){y.cancelable&&y.preventDefault();return}if(!b){var w=(o.current.shards||[]).map(hS).filter(Boolean).filter(function(E){return E.contains(y.target)}),T=w.length>0?s(y,w[0]):!o.current.noIsolation;T&&y.cancelable&&y.preventDefault()}}},[]),l=x.useCallback(function(h,y,v,b){var w={name:h,delta:y,target:v,should:b,shadowParent:tU(v)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(T){return T!==w})},1)},[]),c=x.useCallback(function(h){n.current=ec(h),r.current=void 0},[]),f=x.useCallback(function(h){l(h.type,pS(h),h.target,s(h,e.lockRef.current))},[]),d=x.useCallback(function(h){l(h.type,ec(h),h.target,s(h,e.lockRef.current))},[]);x.useEffect(function(){return Na.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",u,ja),document.addEventListener("touchmove",u,ja),document.addEventListener("touchstart",c,ja),function(){Na=Na.filter(function(h){return h!==a}),document.removeEventListener("wheel",u,ja),document.removeEventListener("touchmove",u,ja),document.removeEventListener("touchstart",c,ja)}},[]);var p=e.removeScrollBar,m=e.inert;return x.createElement(x.Fragment,null,m?x.createElement(a,{styles:X3(i)}):null,p?x.createElement(q3,{gapMode:e.gapMode}):null)}function tU(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const nU=I3(oS,eU);var mS=x.forwardRef(function(e,t){return x.createElement(Xu,Un({},e,{ref:t,sideCar:nU}))});mS.classNames=Xu.classNames;var rU=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ma=new WeakMap,tc=new WeakMap,nc={},sh=0,vS=function(e){return e&&(e.host||vS(e.parentNode))},iU=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=vS(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},aU=function(e,t,n,r){var i=iU(t,Array.isArray(e)?e:[e]);nc[n]||(nc[n]=new WeakMap);var a=nc[n],o=[],s=new Set,u=new Set(i),l=function(f){!f||s.has(f)||(s.add(f),l(f.parentNode))};i.forEach(l);var c=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(d){if(s.has(d))c(d);else try{var p=d.getAttribute(r),m=p!==null&&p!=="false",h=(Ma.get(d)||0)+1,y=(a.get(d)||0)+1;Ma.set(d,h),a.set(d,y),o.push(d),h===1&&m&&tc.set(d,!0),y===1&&d.setAttribute(n,"true"),m||d.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",d,v)}})};return c(t),s.clear(),sh++,function(){o.forEach(function(f){var d=Ma.get(f)-1,p=a.get(f)-1;Ma.set(f,d),a.set(f,p),d||(tc.has(f)||f.removeAttribute(r),tc.delete(f)),p||f.removeAttribute(n)}),sh--,sh||(Ma=new WeakMap,Ma=new WeakMap,tc=new WeakMap,nc={})}},oU=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=rU(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),aU(r,i,n,"aria-hidden")):function(){return null}},lh="Dialog",[yS,Ife]=W1(lh),[sU,xr]=yS(lh),gS=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=x.useRef(null),u=x.useRef(null),[l=!1,c]=V1({prop:r,defaultProp:i,onChange:a});return $.jsx(sU,{scope:t,triggerRef:s,contentRef:u,contentId:Zu(),titleId:Zu(),descriptionId:Zu(),open:l,onOpenChange:c,onOpenToggle:x.useCallback(()=>c(f=>!f),[c]),modal:o,children:n})};gS.displayName=lh;var bS="DialogTrigger",wS=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=xr(bS,n),a=vi(t,i.triggerRef);return $.jsx(er.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":ch(i.open),...r,ref:a,onClick:Vr(e.onClick,i.onOpenToggle)})});wS.displayName=bS;var lU="DialogPortal",[Rfe,xS]=yS(lU,{forceMount:void 0}),rc="DialogOverlay",SS=x.forwardRef((e,t)=>{const n=xS(rc,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=xr(rc,e.__scopeDialog);return a.modal?$.jsx(Ku,{present:r||a.open,children:$.jsx(uU,{...i,ref:t})}):null});SS.displayName=rc;var uU=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=xr(rc,n);return $.jsx(mS,{as:Jp,allowPinchZoom:!0,shards:[i.contentRef],children:$.jsx(er.div,{"data-state":ch(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Vi="DialogContent",ES=x.forwardRef((e,t)=>{const n=xS(Vi,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=xr(Vi,e.__scopeDialog);return $.jsx(Ku,{present:r||a.open,children:a.modal?$.jsx(cU,{...i,ref:t}):$.jsx(fU,{...i,ref:t})})});ES.displayName=Vi;var cU=x.forwardRef((e,t)=>{const n=xr(Vi,e.__scopeDialog),r=x.useRef(null),i=vi(t,n.contentRef,r);return x.useEffect(()=>{const a=r.current;if(a)return oU(a)},[]),$.jsx(_S,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Vr(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Vr(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:Vr(e.onFocusOutside,a=>a.preventDefault())})}),fU=x.forwardRef((e,t)=>{const n=xr(Vi,e.__scopeDialog),r=x.useRef(!1),i=x.useRef(!1);return $.jsx(_S,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var u,l;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((l=n.triggerRef.current)==null?void 0:l.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),_S=x.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=xr(Vi,n),u=x.useRef(null),l=vi(t,u);return x3(),$.jsxs($.Fragment,{children:[$.jsx(X1,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:$.jsx(K1,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ch(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),$.jsxs($.Fragment,{children:[$.jsx(pU,{titleId:s.titleId}),$.jsx(mU,{contentRef:u,descriptionId:s.descriptionId})]})]})}),uh="DialogTitle",kS=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=xr(uh,n);return $.jsx(er.h2,{id:i.titleId,...r,ref:t})});kS.displayName=uh;var TS="DialogDescription",dU=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=xr(TS,n);return $.jsx(er.p,{id:i.descriptionId,...r,ref:t})});dU.displayName=TS;var CS="DialogClose",OS=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=xr(CS,n);return $.jsx(er.button,{type:"button",...r,ref:t,onClick:Vr(e.onClick,()=>i.onOpenChange(!1))})});OS.displayName=CS;function ch(e){return e?"open":"closed"}var $S="DialogTitleWarning",[Afe,IS]=HB($S,{contentName:Vi,titleName:uh,docsSlug:"dialog"}),pU=({titleId:e})=>{const t=IS($S),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
161
161
 
162
162
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
163
163
 
164
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return x.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},bB="DialogDescriptionWarning",wB=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${K1(bB).contentName}}.`;return x.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},xB=N1,SB=F1,EB=B1,_B=U1,kB=q1,G1=H1;function li({open:e,onOpenChange:t,children:n}){return $.jsx(xB,{open:e,onOpenChange:t,children:n})}function TB({title:e,children:t}){var r,i,a,o,s,u,l,c;const{modal:n}=st;return $.jsxs($.Fragment,{children:[$.jsx(EB,{...n==null?void 0:n.overlay}),$.jsx("div",{...n==null?void 0:n.container,children:$.jsxs(_B,{...(r=n==null?void 0:n.dialog)==null?void 0:r.container,children:[$.jsxs("div",{...(a=(i=n==null?void 0:n.dialog)==null?void 0:i.title)==null?void 0:a.container,children:[$.jsx(kB,{...(s=(o=n==null?void 0:n.dialog)==null?void 0:o.title)==null?void 0:s.text,children:e}),$.jsx(G1,{children:$.jsx(wx,{role:"button",tabIndex:0,...(l=(u=n==null?void 0:n.dialog)==null?void 0:u.title)==null?void 0:l.closeIcon})})]}),$.jsx("div",{...(c=n==null?void 0:n.dialog)==null?void 0:c.content,children:t})]})})]})}li.Button=SB,li.Close=G1,li.Content=TB;const Lp=({children:e,className:t,connected:n,uploadFile:r,allowFileUpload:i,...a})=>{const{container:o}=st,s=Kl(c=>c.setMessageContainerRef),u=zo(c=>c.uploadFile),l=j.useRef(null);return j.useEffect(()=>{s(l)},[l]),i&&r?$.jsx(Tu,{noClick:!0,onDrop:c=>c.forEach(f=>u(f,r)),children:({getRootProps:c,isDragActive:f})=>$.jsxs("div",{...a,className:es(o.className,t),ref:l,children:[$.jsxs("div",{"data-hover":f,...o.dropzone.overlay,children:["Drop files to upload",$.jsx(yF,{style:{width:"50px"}})]}),$.jsxs(_p,{children:[$.jsx(Y1,{connected:n}),$.jsx("div",{...o.dropzone.container,...c(),children:e})]})]})}):$.jsx("div",{...a,className:es(o.className,t),ref:l,children:$.jsxs(_p,{children:[$.jsx(Y1,{connected:n}),e]})})},Y1=({connected:e})=>{const{modal:t}=st,{showModal:n}=a0();return j.useEffect(()=>{var r,i,a,o;e===!1&&n({title:"Connection Error",content:$.jsxs($.Fragment,{children:[$.jsx("p",{...(i=(r=t==null?void 0:t.dialog)==null?void 0:r.newConversation)==null?void 0:i.text,children:"There was an error connecting to the server. Please check your internet connection and try again."}),$.jsx(li.Close,{asChild:!0,children:$.jsx("button",{type:"button",...(o=(a=t==null?void 0:t.dialog)==null?void 0:a.newConversation)==null?void 0:o.button,onClick:()=>window.location.reload(),children:"Restart"})})]})})},[e]),$.jsx($.Fragment,{})};Lp.displayName="Container";const J1=j.forwardRef(({children:e,onClick:t,...n},r)=>{const{fab:i}=st,{container:a,icon:o}=i??{};return $.jsx("div",{...n,...a,ref:r,onClick:t,children:$.jsx("div",{...o})})});J1.displayName="Fab";var Bp="Collapsible",[OB,Hue]=l1(Bp),[CB,Up]=OB(Bp),X1=x.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[u=!1,l]=u1({prop:r,defaultProp:i,onChange:o});return $.jsx(CB,{scope:n,disabled:a,contentId:Ou(),open:u,onOpenToggle:x.useCallback(()=>l(c=>!c),[l]),children:$.jsx(Kn.div,{"data-state":qp(u),"data-disabled":a?"":void 0,...s,ref:t})})});X1.displayName=Bp;var Q1="CollapsibleTrigger",eS=x.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=Up(Q1,n);return $.jsx(Kn.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":qp(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:Mr(e.onClick,i.onOpenToggle)})});eS.displayName=Q1;var zp="CollapsibleContent",tS=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Up(zp,e.__scopeCollapsible);return $.jsx(Cu,{present:n||i.open,children:({present:a})=>$.jsx($B,{...r,ref:t,present:a})})});tS.displayName=zp;var $B=x.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...a}=e,o=Up(zp,n),[s,u]=x.useState(r),l=x.useRef(null),c=oi(t,l),f=x.useRef(0),p=f.current,d=x.useRef(0),m=d.current,h=o.open||s,y=x.useRef(h),v=x.useRef(void 0);return x.useEffect(()=>{const b=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(b)},[]),Xi(()=>{const b=l.current;if(b){v.current=v.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const w=b.getBoundingClientRect();f.current=w.height,d.current=w.width,y.current||(b.style.transitionDuration=v.current.transitionDuration,b.style.animationName=v.current.animationName),u(r)}},[o.open,r]),$.jsx(Kn.div,{"data-state":qp(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!h,...a,ref:c,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})});function qp(e){return e?"open":"closed"}var IB=X1,RB=tS;const nS=({onClick:e,...t})=>{var o,s;const{header:n,modal:r}=st,{showModal:i}=a0(),a=u=>{var l,c,f,p;u.stopPropagation(),i({title:"Restart Conversation",content:$.jsxs($.Fragment,{children:[$.jsx("p",{...(c=(l=r==null?void 0:r.dialog)==null?void 0:l.newConversation)==null?void 0:c.text,children:"Are you sure you want to restart a new conversation?"}),$.jsx(li.Close,{asChild:!0,children:$.jsx("button",{type:"button",...(p=(f=r==null?void 0:r.dialog)==null?void 0:f.newConversation)==null?void 0:p.button,onClick:e,children:"Restart"})})]})})};return $.jsx(EM,{...t,...(s=(o=n==null?void 0:n.content)==null?void 0:o.actions)==null?void 0:s.icons,role:"button",tabIndex:0,onClick:a,onKeyDown:u=>{u.key==="Enter"&&a(u)}})},AB=({onClick:e,...t})=>{const{header:n}=st,r=i=>{i.stopPropagation(),e==null||e()};return $.jsx(wx,{...t,...n.content.actions.icons,role:"button",tabIndex:0,onClick:r,onKeyDown:i=>{i.key==="Enter"&&r(i)}})},rs=({icon:e,title:t,link:n,...r})=>{var o,s,u,l,c,f,p,d,m,h,y,v;const{header:i}=st,a=e??fF;return t?n?$.jsxs("a",{...r,...(s=(o=i.expandedContent)==null?void 0:o.descriptionItems)==null?void 0:s.container,href:n,target:"_blank",rel:"noreferrer noopener",children:[$.jsx(a,{...(l=(u=i.expandedContent)==null?void 0:u.descriptionItems)==null?void 0:l.icon}),$.jsx("p",{...(f=(c=i.expandedContent)==null?void 0:c.descriptionItems)==null?void 0:f.link,children:t})]}):$.jsxs("div",{...r,...(d=(p=i.expandedContent)==null?void 0:p.descriptionItems)==null?void 0:d.container,children:[$.jsx(a,{...(h=(m=i.expandedContent)==null?void 0:m.descriptionItems)==null?void 0:h.icon}),$.jsx("p",{...(v=(y=i.expandedContent)==null?void 0:y.descriptionItems)==null?void 0:v.text,children:t})]}):null},rS=({defaultOpen:e,closeWindow:t,configuration:n,restartConversation:r,...i})=>{var l,c,f,p,d,m,h,y,v,b,w,k,E,_,C,z,B,T,A,W,F,L;const{header:a}=st,[o,s]=j.useState(!!e),u=!!((l=n.email)!=null&&l.title)||!!((c=n.phone)!=null&&c.title)||!!((f=n.website)!=null&&f.title)||!!((p=n.termsOfService)!=null&&p.link)||!!((d=n.privacyPolicy)!=null&&d.link);return $.jsxs(IB,{open:u?o:!1,onOpenChange:s,"data-disabled":u?void 0:"",...a.container,...i,children:[$.jsxs(eS,{...a.content.container,children:[$.jsx(Ol,{...i,src:n.botAvatar,...a.content.avatar,children:n.botName||"Bot"}),$.jsx("h2",{...a.content.title,children:n.botName||"Bot"}),n.botDescription&&$.jsx("p",{...a.content.description,children:n.botDescription}),$.jsxs("div",{...a.content.actions.container,children:[r&&$.jsx(nS,{onClick:r}),t&&$.jsx(AB,{onClick:t})]})]}),$.jsxs(RB,{...a.expandedContent.container,children:[$.jsxs("div",{"data-links":"",...a.expandedContent.group,children:[$.jsx(rs,{"data-email":"",icon:xF,title:(m=n.email)==null?void 0:m.title,link:(y=(h=n.email)==null?void 0:h.link)!=null&&y.startsWith("mailto:")?(v=n.email)==null?void 0:v.link:`mailto:${(b=n.email)==null?void 0:b.link}`}),$.jsx(rs,{"data-phone":"",icon:OF,title:(w=n.phone)==null?void 0:w.title,link:(E=(k=n.phone)==null?void 0:k.link)!=null&&E.startsWith("tel:")?(_=n.phone)==null?void 0:_.link:`tel:${(C=n.phone)==null?void 0:C.link}`}),$.jsx(rs,{"data-website":"",link:(z=n.website)==null?void 0:z.link,icon:EF,title:(B=n.website)==null?void 0:B.title})]}),$.jsxs("div",{"data-legal":"",...(T=a.expandedContent)==null?void 0:T.group,children:[$.jsx(rs,{"data-terms":"",link:(A=n.termsOfService)==null?void 0:A.link,icon:bF,title:(W=n.termsOfService)==null?void 0:W.title}),$.jsx(rs,{"data-privacy":"",link:(F=n.privacyPolicy)==null?void 0:F.link,icon:kF,title:(L=n.privacyPolicy)==null?void 0:L.title})]})]})]})},iS=j.memo(({...e})=>{const{typingIndicator:t}=st;return $.jsx("div",{...e,...t==null?void 0:t.container,children:$.jsx("div",{...t==null?void 0:t.loader})})}),Wp=j.memo(j.forwardRef(({direction:e,block:t,disableInput:n,children:r,sender:i,id:a,metadata:o,authorId:s,renderers:u,sendMessage:l,isReadOnly:c,...f},p)=>{var v,b,w;const[d,m]=j.useState([]),{message:h}=st,y=dg(s??"",15);return $.jsx(r0.Provider,{value:{isLoading:d,setIsLoading:m},children:$.jsxs("div",{...f,...h==null?void 0:h.container,"data-loaded":d.length===0,"data-disable-input":!!n,"data-direction":e,ref:p,children:[$.jsxs(_f,{"data-color":y,...(v=h==null?void 0:h.avatar)==null?void 0:v.container,children:[$.jsx(kf,{...(b=h==null?void 0:h.avatar)==null?void 0:b.image,src:i==null?void 0:i.avatar}),$.jsx(Tf,{...(w=h==null?void 0:h.avatar)==null?void 0:w.fallback,children:i==null?void 0:i.name[0]})]}),t&&$.jsx(xa,{block:{...t,isReadOnly:c,direction:e,timestamp:f.timestamp,sender:i,messageId:a,sendMessage:l},renderers:u,metadata:o,messageId:a,timestamp:f.timestamp,sender:i,isReadOnly:c,sendMessage:l,direction:e}),r]})})}));function PB({botAvatar:e,botDescription:t,botName:n}){const{messageList:{marquee:r}}=st;return $.jsxs("li",{...r.container,children:[$.jsx(Ol,{src:e,...r.avatar,children:(n||"Bot").slice(0,1)}),$.jsxs("div",{...r.content,children:[$.jsx("h1",{...r.title,children:n||"Bot"}),$.jsx("p",{...r.description,children:t})]})]})}function DB(e,t){try{var n=global,r=n.document;if(typeof r<"u"&&r.createElement&&r.head&&r.head.appendChild){var i=r.querySelector('html meta[name="'.concat(encodeURI(e),'"]'))||r.createElement("meta");i.setAttribute("name",e),i.setAttribute("content",t),r.head.appendChild(i)}}catch{}}function jB(){DB("react-scroll-to-bottom:version","4.2.0")}var is=function(e){return e&&e.Math===Math&&e},Ut=is(typeof globalThis=="object"&&globalThis)||is(typeof window=="object"&&window)||is(typeof self=="object"&&self)||is(typeof mt=="object"&&mt)||is(typeof mt=="object"&&mt)||function(){return this}()||Function("return this")(),zt=function(e){try{return!!e()}catch{return!0}},NB=zt,Fu=!NB(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),MB=Fu,aS=Function.prototype,oS=aS.apply,sS=aS.call,Vp=typeof Reflect=="object"&&Reflect.apply||(MB?sS.bind(oS):function(){return sS.apply(oS,arguments)}),lS=Fu,uS=Function.prototype,Hp=uS.call,FB=lS&&uS.bind.bind(Hp,Hp),Nt=lS?FB:function(e){return function(){return Hp.apply(e,arguments)}},cS=Nt,LB=cS({}.toString),BB=cS("".slice),ji=function(e){return BB(LB(e),8,-1)},UB=ji,zB=Nt,Zp=function(e){if(UB(e)==="Function")return zB(e)},Kp=typeof document=="object"&&document.all,an=typeof Kp>"u"&&Kp!==void 0?function(e){return typeof e=="function"||e===Kp}:function(e){return typeof e=="function"},as={},qB=zt,gn=!qB(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),WB=Fu,Lu=Function.prototype.call,hr=WB?Lu.bind(Lu):function(){return Lu.apply(Lu,arguments)},Gp={},fS={}.propertyIsEnumerable,dS=Object.getOwnPropertyDescriptor,VB=dS&&!fS.call({1:2},1);Gp.f=VB?function(t){var n=dS(this,t);return!!n&&n.enumerable}:fS;var os=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},HB=Nt,ZB=zt,KB=ji,Yp=Object,GB=HB("".split),pS=ZB(function(){return!Yp("z").propertyIsEnumerable(0)})?function(e){return KB(e)==="String"?GB(e,""):Yp(e)}:Yp,Jp=function(e){return e==null},YB=Jp,JB=TypeError,Bu=function(e){if(YB(e))throw new JB("Can't call method on "+e);return e},XB=pS,QB=Bu,mr=function(e){return XB(QB(e))},eU=an,Gn=function(e){return typeof e=="object"?e!==null:eU(e)},Xt={},Xp=Xt,Qp=Ut,tU=an,hS=function(e){return tU(e)?e:void 0},vr=function(e,t){return arguments.length<2?hS(Xp[e])||hS(Qp[e]):Xp[e]&&Xp[e][t]||Qp[e]&&Qp[e][t]},nU=Nt,Fr=nU({}.isPrototypeOf),rU=Ut,mS=rU.navigator,vS=mS&&mS.userAgent,eh=vS?String(vS):"",yS=Ut,th=eh,gS=yS.process,bS=yS.Deno,wS=gS&&gS.versions||bS&&bS.version,xS=wS&&wS.v8,Yn,Uu;xS&&(Yn=xS.split("."),Uu=Yn[0]>0&&Yn[0]<4?1:+(Yn[0]+Yn[1])),!Uu&&th&&(Yn=th.match(/Edge\/(\d+)/),(!Yn||Yn[1]>=74)&&(Yn=th.match(/Chrome\/(\d+)/),Yn&&(Uu=+Yn[1])));var nh=Uu,SS=nh,iU=zt,aU=Ut,oU=aU.String,Ta=!!Object.getOwnPropertySymbols&&!iU(function(){var e=Symbol("symbol detection");return!oU(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&SS&&SS<41}),sU=Ta,ES=sU&&!Symbol.sham&&typeof Symbol.iterator=="symbol",lU=vr,uU=an,cU=Fr,fU=ES,dU=Object,ss=fU?function(e){return typeof e=="symbol"}:function(e){var t=lU("Symbol");return uU(t)&&cU(t.prototype,dU(e))},pU=String,zu=function(e){try{return pU(e)}catch{return"Object"}},hU=an,mU=zu,vU=TypeError,qu=function(e){if(hU(e))return e;throw new vU(mU(e)+" is not a function")},yU=qu,gU=Jp,rh=function(e,t){var n=e[t];return gU(n)?void 0:yU(n)},ih=hr,ah=an,oh=Gn,bU=TypeError,wU=function(e,t){var n,r;if(t==="string"&&ah(n=e.toString)&&!oh(r=ih(n,e))||ah(n=e.valueOf)&&!oh(r=ih(n,e))||t!=="string"&&ah(n=e.toString)&&!oh(r=ih(n,e)))return r;throw new bU("Can't convert object to primitive value")},_S={exports:{}},kS=Ut,xU=Object.defineProperty,SU=function(e,t){try{xU(kS,e,{value:t,configurable:!0,writable:!0})}catch{kS[e]=t}return t},EU=Ut,_U=SU,TS="__core-js_shared__",OS=_S.exports=EU[TS]||_U(TS,{});(OS.versions||(OS.versions=[])).push({version:"3.38.1",mode:"pure",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"});var sh=_S.exports,CS=sh,Oa=function(e,t){return CS[e]||(CS[e]=t||{})},kU=Bu,TU=Object,Lr=function(e){return TU(kU(e))},OU=Nt,CU=Lr,$U=OU({}.hasOwnProperty),Tn=Object.hasOwn||function(t,n){return $U(CU(t),n)},IU=Nt,RU=0,AU=Math.random(),PU=IU(1 .toString),lh=function(e){return"Symbol("+(e===void 0?"":e)+")_"+PU(++RU+AU,36)},DU=Ut,jU=Oa,$S=Tn,NU=lh,MU=Ta,FU=ES,Ca=DU.Symbol,uh=jU("wks"),LU=FU?Ca.for||Ca:Ca&&Ca.withoutSetter||NU,Zt=function(e){return $S(uh,e)||(uh[e]=MU&&$S(Ca,e)?Ca[e]:LU("Symbol."+e)),uh[e]},BU=hr,IS=Gn,RS=ss,UU=rh,zU=wU,qU=Zt,WU=TypeError,VU=qU("toPrimitive"),HU=function(e,t){if(!IS(e)||RS(e))return e;var n=UU(e,VU),r;if(n){if(t===void 0&&(t="default"),r=BU(n,e,t),!IS(r)||RS(r))return r;throw new WU("Can't convert object to primitive value")}return t===void 0&&(t="number"),zU(e,t)},ZU=HU,KU=ss,ch=function(e){var t=ZU(e,"string");return KU(t)?t:t+""},GU=Ut,AS=Gn,fh=GU.document,YU=AS(fh)&&AS(fh.createElement),PS=function(e){return YU?fh.createElement(e):{}},JU=gn,XU=zt,QU=PS,DS=!JU&&!XU(function(){return Object.defineProperty(QU("div"),"a",{get:function(){return 7}}).a!==7}),ez=gn,tz=hr,nz=Gp,rz=os,iz=mr,az=ch,oz=Tn,sz=DS,jS=Object.getOwnPropertyDescriptor;as.f=ez?jS:function(t,n){if(t=iz(t),n=az(n),sz)try{return jS(t,n)}catch{}if(oz(t,n))return rz(!tz(nz.f,t,n),t[n])};var lz=zt,uz=an,cz=/#|\.prototype\./,ls=function(e,t){var n=dz[fz(e)];return n===hz?!0:n===pz?!1:uz(t)?lz(t):!!t},fz=ls.normalize=function(e){return String(e).replace(cz,".").toLowerCase()},dz=ls.data={},pz=ls.NATIVE="N",hz=ls.POLYFILL="P",mz=ls,NS=Zp,vz=qu,yz=Fu,gz=NS(NS.bind),dh=function(e,t){return vz(e),t===void 0?e:yz?gz(e,t):function(){return e.apply(t,arguments)}},Jn={},bz=gn,wz=zt,MS=bz&&wz(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),xz=Gn,Sz=String,Ez=TypeError,ui=function(e){if(xz(e))return e;throw new Ez(Sz(e)+" is not an object")},_z=gn,kz=DS,Tz=MS,Wu=ui,FS=ch,Oz=TypeError,ph=Object.defineProperty,Cz=Object.getOwnPropertyDescriptor,hh="enumerable",mh="configurable",vh="writable";Jn.f=_z?Tz?function(t,n,r){if(Wu(t),n=FS(n),Wu(r),typeof t=="function"&&n==="prototype"&&"value"in r&&vh in r&&!r[vh]){var i=Cz(t,n);i&&i[vh]&&(t[n]=r.value,r={configurable:mh in r?r[mh]:i[mh],enumerable:hh in r?r[hh]:i[hh],writable:!1})}return ph(t,n,r)}:ph:function(t,n,r){if(Wu(t),n=FS(n),Wu(r),kz)try{return ph(t,n,r)}catch{}if("get"in r||"set"in r)throw new Oz("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var $z=gn,Iz=Jn,Rz=os,Vu=$z?function(e,t,n){return Iz.f(e,t,Rz(1,n))}:function(e,t,n){return e[t]=n,e},us=Ut,Az=Vp,Pz=Zp,Dz=an,jz=as.f,Nz=mz,$a=Xt,Mz=dh,Ia=Vu,LS=Tn,Fz=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return Az(e,this,arguments)};return t.prototype=e.prototype,t},vt=function(e,t){var n=e.target,r=e.global,i=e.stat,a=e.proto,o=r?us:i?us[n]:us[n]&&us[n].prototype,s=r?$a:$a[n]||Ia($a,n,{})[n],u=s.prototype,l,c,f,p,d,m,h,y,v;for(p in t)l=Nz(r?p:n+(i?".":"#")+p,e.forced),c=!l&&o&&LS(o,p),m=s[p],c&&(e.dontCallGetSet?(v=jz(o,p),h=v&&v.value):h=o[p]),d=c&&h?h:t[p],!(!l&&!a&&typeof m==typeof d)&&(e.bind&&c?y=Mz(d,us):e.wrap&&c?y=Fz(d):a&&Dz(d)?y=Pz(d):y=d,(e.sham||d&&d.sham||m&&m.sham)&&Ia(y,"sham",!0),Ia(s,p,y),a&&(f=n+"Prototype",LS($a,f)||Ia($a,f,{}),Ia($a[f],p,d),e.real&&u&&(l||!u[p])&&Ia(u,p,d)))},Lz=ji,Ra=Array.isArray||function(t){return Lz(t)==="Array"},Bz=vt,Uz=Ra;Bz({target:"Array",stat:!0},{isArray:Uz});var zz=Xt,qz=zz.Array.isArray,Wz=qz,BS=Wz,Vz=BS,Hz=Vz,Zz=Hz,Kz=Zz,Gz=Kz;const US=Ge(Gz);function Yz(e){if(US(e))return e}var Jz=Math.ceil,Xz=Math.floor,Qz=Math.trunc||function(t){var n=+t;return(n>0?Xz:Jz)(n)},e6=Qz,Hu=function(e){var t=+e;return t!==t||t===0?0:e6(t)},t6=Hu,n6=Math.min,r6=function(e){var t=t6(e);return t>0?n6(t,9007199254740991):0},i6=r6,Ni=function(e){return i6(e.length)},a6=TypeError,o6=9007199254740991,yh=function(e){if(e>o6)throw a6("Maximum allowed index exceeded");return e},s6=gn,l6=Jn,u6=os,cs=function(e,t,n){s6?l6.f(e,t,u6(0,n)):e[t]=n},c6=Zt,f6=c6("toStringTag"),zS={};zS[f6]="z";var gh=String(zS)==="[object z]",d6=gh,p6=an,Zu=ji,h6=Zt,m6=h6("toStringTag"),v6=Object,y6=Zu(function(){return arguments}())==="Arguments",g6=function(e,t){try{return e[t]}catch{}},fs=d6?Zu:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=g6(t=v6(e),m6))=="string"?n:y6?Zu(t):(r=Zu(t))==="Object"&&p6(t.callee)?"Arguments":r},b6=Nt,w6=an,bh=sh,x6=b6(Function.toString);w6(bh.inspectSource)||(bh.inspectSource=function(e){return x6(e)});var S6=bh.inspectSource,E6=Nt,_6=zt,qS=an,k6=fs,T6=vr,O6=S6,WS=function(){},VS=T6("Reflect","construct"),wh=/^\s*(?:class|function)\b/,C6=E6(wh.exec),$6=!wh.test(WS),ds=function(t){if(!qS(t))return!1;try{return VS(WS,[],t),!0}catch{return!1}},HS=function(t){if(!qS(t))return!1;switch(k6(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return $6||!!C6(wh,O6(t))}catch{return!0}};HS.sham=!0;var xh=!VS||_6(function(){var e;return ds(ds.call)||!ds(Object)||!ds(function(){e=!0})||e})?HS:ds,ZS=Ra,I6=xh,R6=Gn,A6=Zt,P6=A6("species"),KS=Array,D6=function(e){var t;return ZS(e)&&(t=e.constructor,I6(t)&&(t===KS||ZS(t.prototype))?t=void 0:R6(t)&&(t=t[P6],t===null&&(t=void 0))),t===void 0?KS:t},j6=D6,Sh=function(e,t){return new(j6(e))(t===0?0:t)},N6=zt,M6=Zt,F6=nh,L6=M6("species"),Ku=function(e){return F6>=51||!N6(function(){var t=[],n=t.constructor={};return n[L6]=function(){return{foo:1}},t[e](Boolean).foo!==1})},B6=vt,U6=zt,z6=Ra,q6=Gn,W6=Lr,V6=Ni,GS=yh,YS=cs,H6=Sh,Z6=Ku,K6=Zt,G6=nh,JS=K6("isConcatSpreadable"),Y6=G6>=51||!U6(function(){var e=[];return e[JS]=!1,e.concat()[0]!==e}),J6=function(e){if(!q6(e))return!1;var t=e[JS];return t!==void 0?!!t:z6(e)},X6=!Y6||!Z6("concat");B6({target:"Array",proto:!0,arity:1,forced:X6},{concat:function(t){var n=W6(this),r=H6(n,0),i=0,a,o,s,u,l;for(a=-1,s=arguments.length;a<s;a++)if(l=a===-1?n:arguments[a],J6(l))for(u=V6(l),GS(i+u),o=0;o<u;o++,i++)o in l&&YS(r,i,l[o]);else GS(i+1),YS(r,i++,l);return r.length=i,r}});var Q6=fs,e7=String,ps=function(e){if(Q6(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return e7(e)},Gu={},t7=Hu,n7=Math.max,r7=Math.min,Eh=function(e,t){var n=t7(e);return n<0?n7(n+t,0):r7(n,t)},i7=mr,a7=Eh,o7=Ni,XS=function(e){return function(t,n,r){var i=i7(t),a=o7(i);if(a===0)return!e&&-1;var o=a7(r,a),s;if(e&&n!==n){for(;a>o;)if(s=i[o++],s!==s)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},QS={includes:XS(!0),indexOf:XS(!1)},Yu={},s7=Nt,_h=Tn,l7=mr,u7=QS.indexOf,c7=Yu,eE=s7([].push),tE=function(e,t){var n=l7(e),r=0,i=[],a;for(a in n)!_h(c7,a)&&_h(n,a)&&eE(i,a);for(;t.length>r;)_h(n,a=t[r++])&&(~u7(i,a)||eE(i,a));return i},kh=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],f7=tE,d7=kh,Th=Object.keys||function(t){return f7(t,d7)},p7=gn,h7=MS,m7=Jn,v7=ui,y7=mr,g7=Th;Gu.f=p7&&!h7?Object.defineProperties:function(t,n){v7(t);for(var r=y7(n),i=g7(n),a=i.length,o=0,s;a>o;)m7.f(t,s=i[o++],r[s]);return t};var b7=vr,w7=b7("document","documentElement"),x7=Oa,S7=lh,nE=x7("keys"),Ju=function(e){return nE[e]||(nE[e]=S7(e))},E7=ui,_7=Gu,rE=kh,k7=Yu,T7=w7,O7=PS,C7=Ju,iE=">",aE="<",Oh="prototype",Ch="script",oE=C7("IE_PROTO"),$h=function(){},sE=function(e){return aE+Ch+iE+e+aE+"/"+Ch+iE},lE=function(e){e.write(sE("")),e.close();var t=e.parentWindow.Object;return e=null,t},$7=function(){var e=O7("iframe"),t="java"+Ch+":",n;return e.style.display="none",T7.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(sE("document.F=Object")),n.close(),n.F},Xu,Qu=function(){try{Xu=new ActiveXObject("htmlfile")}catch{}Qu=typeof document<"u"?document.domain&&Xu?lE(Xu):$7():lE(Xu);for(var e=rE.length;e--;)delete Qu[Oh][rE[e]];return Qu()};k7[oE]=!0;var Ih=Object.create||function(t,n){var r;return t!==null?($h[Oh]=E7(t),r=new $h,$h[Oh]=null,r[oE]=t):r=Qu(),n===void 0?r:_7.f(r,n)},ec={},I7=tE,R7=kh,A7=R7.concat("length","prototype");ec.f=Object.getOwnPropertyNames||function(t){return I7(t,A7)};var uE={},P7=Nt,tc=P7([].slice),D7=ji,j7=mr,cE=ec.f,N7=tc,fE=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],M7=function(e){try{return cE(e)}catch{return N7(fE)}};uE.f=function(t){return fE&&D7(t)==="Window"?M7(t):cE(j7(t))};var nc={};nc.f=Object.getOwnPropertySymbols;var F7=Vu,rc=function(e,t,n,r){return r&&r.enumerable?e[t]=n:F7(e,t,n),e},L7=Jn,B7=function(e,t,n){return L7.f(e,t,n)},hs={},U7=Zt;hs.f=U7;var dE=Xt,z7=Tn,q7=hs,W7=Jn.f,Ot=function(e){var t=dE.Symbol||(dE.Symbol={});z7(t,e)||W7(t,e,{value:q7.f(e)})},V7=hr,H7=vr,Z7=Zt,K7=rc,pE=function(){var e=H7("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=Z7("toPrimitive");t&&!t[r]&&K7(t,r,function(i){return V7(n,this)},{arity:1})},G7=gh,Y7=fs,J7=G7?{}.toString:function(){return"[object "+Y7(this)+"]"},X7=gh,Q7=Jn.f,e9=Vu,t9=Tn,n9=J7,r9=Zt,hE=r9("toStringTag"),Aa=function(e,t,n,r){var i=n?e:e&&e.prototype;i&&(t9(i,hE)||Q7(i,hE,{configurable:!0,value:t}),r&&!X7&&e9(i,"toString",n9))},i9=Ut,a9=an,mE=i9.WeakMap,o9=a9(mE)&&/native code/.test(String(mE)),s9=o9,vE=Ut,l9=Gn,u9=Vu,Rh=Tn,Ah=sh,c9=Ju,f9=Yu,yE="Object already initialized",Ph=vE.TypeError,d9=vE.WeakMap,ic,ms,ac,p9=function(e){return ac(e)?ms(e):ic(e,{})},h9=function(e){return function(t){var n;if(!l9(t)||(n=ms(t)).type!==e)throw new Ph("Incompatible receiver, "+e+" required");return n}};if(s9||Ah.state){var yr=Ah.state||(Ah.state=new d9);yr.get=yr.get,yr.has=yr.has,yr.set=yr.set,ic=function(e,t){if(yr.has(e))throw new Ph(yE);return t.facade=e,yr.set(e,t),t},ms=function(e){return yr.get(e)||{}},ac=function(e){return yr.has(e)}}else{var Pa=c9("state");f9[Pa]=!0,ic=function(e,t){if(Rh(e,Pa))throw new Ph(yE);return t.facade=e,u9(e,Pa,t),t},ms=function(e){return Rh(e,Pa)?e[Pa]:{}},ac=function(e){return Rh(e,Pa)}}var Dh={set:ic,get:ms,has:ac,enforce:p9,getterFor:h9},m9=dh,v9=Nt,y9=pS,g9=Lr,b9=Ni,w9=Sh,gE=v9([].push),ci=function(e){var t=e===1,n=e===2,r=e===3,i=e===4,a=e===6,o=e===7,s=e===5||a;return function(u,l,c,f){for(var p=g9(u),d=y9(p),m=b9(d),h=m9(l,c),y=0,v=f||w9,b=t?v(u,m):n||o?v(u,0):void 0,w,k;m>y;y++)if((s||y in d)&&(w=d[y],k=h(w,y,p),e))if(t)b[y]=k;else if(k)switch(e){case 3:return!0;case 5:return w;case 6:return y;case 2:gE(b,w)}else switch(e){case 4:return!1;case 7:gE(b,w)}return a?-1:r||i?i:b}},jh={forEach:ci(0),map:ci(1),filter:ci(2),some:ci(3),every:ci(4),find:ci(5),findIndex:ci(6),filterReject:ci(7)},oc=vt,vs=Ut,Nh=hr,x9=Nt,Da=gn,ja=Ta,S9=zt,Kt=Tn,E9=Fr,Mh=ui,sc=mr,Fh=ch,_9=ps,Lh=os,Na=Ih,bE=Th,k9=ec,wE=uE,T9=nc,xE=as,SE=Jn,O9=Gu,EE=Gp,_E=rc,C9=B7,Bh=Oa,$9=Ju,kE=Yu,TE=lh,I9=Zt,R9=hs,A9=Ot,P9=pE,D9=Aa,OE=Dh,lc=jh.forEach,bn=$9("hidden"),uc="Symbol",ys="prototype",j9=OE.set,CE=OE.getterFor(uc),Xn=Object[ys],Mi=vs.Symbol,gs=Mi&&Mi[ys],N9=vs.RangeError,M9=vs.TypeError,Uh=vs.QObject,$E=xE.f,Fi=SE.f,IE=wE.f,F9=EE.f,RE=x9([].push),Br=Bh("symbols"),bs=Bh("op-symbols"),L9=Bh("wks"),zh=!Uh||!Uh[ys]||!Uh[ys].findChild,AE=function(e,t,n){var r=$E(Xn,t);r&&delete Xn[t],Fi(e,t,n),r&&e!==Xn&&Fi(Xn,t,r)},qh=Da&&S9(function(){return Na(Fi({},"a",{get:function(){return Fi(this,"a",{value:7}).a}})).a!==7})?AE:Fi,Wh=function(e,t){var n=Br[e]=Na(gs);return j9(n,{type:uc,tag:e,description:t}),Da||(n.description=t),n},cc=function(t,n,r){t===Xn&&cc(bs,n,r),Mh(t);var i=Fh(n);return Mh(r),Kt(Br,i)?(r.enumerable?(Kt(t,bn)&&t[bn][i]&&(t[bn][i]=!1),r=Na(r,{enumerable:Lh(0,!1)})):(Kt(t,bn)||Fi(t,bn,Lh(1,Na(null))),t[bn][i]=!0),qh(t,i,r)):Fi(t,i,r)},Vh=function(t,n){Mh(t);var r=sc(n),i=bE(r).concat(NE(r));return lc(i,function(a){(!Da||Nh(PE,r,a))&&cc(t,a,r[a])}),t},B9=function(t,n){return n===void 0?Na(t):Vh(Na(t),n)},PE=function(t){var n=Fh(t),r=Nh(F9,this,n);return this===Xn&&Kt(Br,n)&&!Kt(bs,n)?!1:r||!Kt(this,n)||!Kt(Br,n)||Kt(this,bn)&&this[bn][n]?r:!0},DE=function(t,n){var r=sc(t),i=Fh(n);if(!(r===Xn&&Kt(Br,i)&&!Kt(bs,i))){var a=$E(r,i);return a&&Kt(Br,i)&&!(Kt(r,bn)&&r[bn][i])&&(a.enumerable=!0),a}},jE=function(t){var n=IE(sc(t)),r=[];return lc(n,function(i){!Kt(Br,i)&&!Kt(kE,i)&&RE(r,i)}),r},NE=function(e){var t=e===Xn,n=IE(t?bs:sc(e)),r=[];return lc(n,function(i){Kt(Br,i)&&(!t||Kt(Xn,i))&&RE(r,Br[i])}),r};ja||(Mi=function(){if(E9(gs,this))throw new M9("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:_9(arguments[0]),n=TE(t),r=function(i){var a=this===void 0?vs:this;a===Xn&&Nh(r,bs,i),Kt(a,bn)&&Kt(a[bn],n)&&(a[bn][n]=!1);var o=Lh(1,i);try{qh(a,n,o)}catch(s){if(!(s instanceof N9))throw s;AE(a,n,o)}};return Da&&zh&&qh(Xn,n,{configurable:!0,set:r}),Wh(n,t)},gs=Mi[ys],_E(gs,"toString",function(){return CE(this).tag}),_E(Mi,"withoutSetter",function(e){return Wh(TE(e),e)}),EE.f=PE,SE.f=cc,O9.f=Vh,xE.f=DE,k9.f=wE.f=jE,T9.f=NE,R9.f=function(e){return Wh(I9(e),e)},Da&&C9(gs,"description",{configurable:!0,get:function(){return CE(this).description}})),oc({global:!0,constructor:!0,wrap:!0,forced:!ja,sham:!ja},{Symbol:Mi}),lc(bE(L9),function(e){A9(e)}),oc({target:uc,stat:!0,forced:!ja},{useSetter:function(){zh=!0},useSimple:function(){zh=!1}}),oc({target:"Object",stat:!0,forced:!ja,sham:!Da},{create:B9,defineProperty:cc,defineProperties:Vh,getOwnPropertyDescriptor:DE}),oc({target:"Object",stat:!0,forced:!ja},{getOwnPropertyNames:jE}),P9(),D9(Mi,uc),kE[bn]=!0;var U9=Ta,ME=U9&&!!Symbol.for&&!!Symbol.keyFor,z9=vt,q9=vr,W9=Tn,V9=ps,FE=Oa,H9=ME,Hh=FE("string-to-symbol-registry"),Z9=FE("symbol-to-string-registry");z9({target:"Symbol",stat:!0,forced:!H9},{for:function(e){var t=V9(e);if(W9(Hh,t))return Hh[t];var n=q9("Symbol")(t);return Hh[t]=n,Z9[n]=t,n}});var K9=vt,G9=Tn,Y9=ss,J9=zu,X9=Oa,Q9=ME,LE=X9("symbol-to-string-registry");K9({target:"Symbol",stat:!0,forced:!Q9},{keyFor:function(t){if(!Y9(t))throw new TypeError(J9(t)+" is not a symbol");if(G9(LE,t))return LE[t]}});var eq=Nt,BE=Ra,tq=an,UE=ji,nq=ps,zE=eq([].push),rq=function(e){if(tq(e))return e;if(BE(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];typeof i=="string"?zE(n,i):(typeof i=="number"||UE(i)==="Number"||UE(i)==="String")&&zE(n,nq(i))}var a=n.length,o=!0;return function(s,u){if(o)return o=!1,u;if(BE(this))return u;for(var l=0;l<a;l++)if(n[l]===s)return u}}},iq=vt,qE=vr,WE=Vp,aq=hr,ws=Nt,VE=zt,HE=an,ZE=ss,KE=tc,oq=rq,sq=Ta,lq=String,fi=qE("JSON","stringify"),fc=ws(/./.exec),GE=ws("".charAt),uq=ws("".charCodeAt),cq=ws("".replace),fq=ws(1 .toString),dq=/[\uD800-\uDFFF]/g,YE=/^[\uD800-\uDBFF]$/,JE=/^[\uDC00-\uDFFF]$/,XE=!sq||VE(function(){var e=qE("Symbol")("stringify detection");return fi([e])!=="[null]"||fi({a:e})!=="{}"||fi(Object(e))!=="{}"}),QE=VE(function(){return fi("\uDF06\uD834")!=='"\\udf06\\ud834"'||fi("\uDEAD")!=='"\\udead"'}),pq=function(e,t){var n=KE(arguments),r=oq(t);if(!(!HE(r)&&(e===void 0||ZE(e))))return n[1]=function(i,a){if(HE(r)&&(a=aq(r,this,lq(i),a)),!ZE(a))return a},WE(fi,null,n)},hq=function(e,t,n){var r=GE(n,t-1),i=GE(n,t+1);return fc(YE,e)&&!fc(JE,i)||fc(JE,e)&&!fc(YE,r)?"\\u"+fq(uq(e,0),16):e};fi&&iq({target:"JSON",stat:!0,arity:3,forced:XE||QE},{stringify:function(t,n,r){var i=KE(arguments),a=WE(XE?pq:fi,null,i);return QE&&typeof a=="string"?cq(a,dq,hq):a}});var mq=vt,vq=Ta,yq=zt,e_=nc,gq=Lr,bq=!vq||yq(function(){e_.f(1)});mq({target:"Object",stat:!0,forced:bq},{getOwnPropertySymbols:function(t){var n=e_.f;return n?n(gq(t)):[]}});var wq=Ot;wq("asyncIterator");var xq=Ot;xq("hasInstance");var Sq=Ot;Sq("isConcatSpreadable");var Eq=Ot;Eq("iterator");var _q=Ot;_q("match");var kq=Ot;kq("matchAll");var Tq=Ot;Tq("replace");var Oq=Ot;Oq("search");var Cq=Ot;Cq("species");var $q=Ot;$q("split");var Iq=Ot,Rq=pE;Iq("toPrimitive"),Rq();var Aq=vr,Pq=Ot,Dq=Aa;Pq("toStringTag"),Dq(Aq("Symbol"),"Symbol");var jq=Ot;jq("unscopables");var Nq=Ut,Mq=Aa;Mq(Nq.JSON,"JSON",!0);var Fq=Xt,Lq=Fq.Symbol,Ma={},Zh=gn,Bq=Tn,t_=Function.prototype,Uq=Zh&&Object.getOwnPropertyDescriptor,Kh=Bq(t_,"name"),zq=Kh&&(function(){}).name==="something",qq=Kh&&(!Zh||Zh&&Uq(t_,"name").configurable),Wq={EXISTS:Kh,PROPER:zq,CONFIGURABLE:qq},Vq=zt,Hq=!Vq(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Zq=Tn,Kq=an,Gq=Lr,Yq=Ju,Jq=Hq,n_=Yq("IE_PROTO"),Gh=Object,Xq=Gh.prototype,r_=Jq?Gh.getPrototypeOf:function(e){var t=Gq(e);if(Zq(t,n_))return t[n_];var n=t.constructor;return Kq(n)&&t instanceof n?n.prototype:t instanceof Gh?Xq:null},Qq=zt,eW=an,tW=Gn,nW=Ih,i_=r_,rW=rc,iW=Zt,Yh=iW("iterator"),a_=!1,Ur,Jh,Xh;[].keys&&(Xh=[].keys(),"next"in Xh?(Jh=i_(i_(Xh)),Jh!==Object.prototype&&(Ur=Jh)):a_=!0);var aW=!tW(Ur)||Qq(function(){var e={};return Ur[Yh].call(e)!==e});aW?Ur={}:Ur=nW(Ur),eW(Ur[Yh])||rW(Ur,Yh,function(){return this});var o_={IteratorPrototype:Ur,BUGGY_SAFARI_ITERATORS:a_},oW=o_.IteratorPrototype,sW=Ih,lW=os,uW=Aa,cW=Ma,fW=function(){return this},dW=function(e,t,n,r){var i=t+" Iterator";return e.prototype=sW(oW,{next:lW(+!r,n)}),uW(e,i,!1,!0),cW[i]=fW,e},pW=Nt,hW=qu,mW=function(e,t,n){try{return pW(hW(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}},vW=Gn,yW=function(e){return vW(e)||e===null},gW=yW,bW=String,wW=TypeError,xW=function(e){if(gW(e))return e;throw new wW("Can't set "+bW(e)+" as a prototype")},SW=mW,EW=Gn,_W=Bu,kW=xW;Object.setPrototypeOf||"__proto__"in{}&&function(){var e=!1,t={},n;try{n=SW(Object.prototype,"__proto__","set"),n(t,[]),e=t instanceof Array}catch{}return function(i,a){return _W(i),kW(a),EW(i)&&(e?n(i,a):i.__proto__=a),i}}();var TW=vt,OW=hr,s_=Wq,CW=dW,$W=r_,IW=Aa,l_=rc,RW=Zt,u_=Ma,c_=o_,AW=s_.PROPER;s_.CONFIGURABLE,c_.IteratorPrototype;var dc=c_.BUGGY_SAFARI_ITERATORS,Qh=RW("iterator"),f_="keys",pc="values",d_="entries",PW=function(){return this},p_=function(e,t,n,r,i,a,o){CW(n,t,r);var s=function(v){if(v===i&&p)return p;if(!dc&&v&&v in c)return c[v];switch(v){case f_:return function(){return new n(this,v)};case pc:return function(){return new n(this,v)};case d_:return function(){return new n(this,v)}}return function(){return new n(this)}},u=t+" Iterator",l=!1,c=e.prototype,f=c[Qh]||c["@@iterator"]||i&&c[i],p=!dc&&f||s(i),d=t==="Array"&&c.entries||f,m,h,y;if(d&&(m=$W(d.call(new e)),m!==Object.prototype&&m.next&&(IW(m,u,!0,!0),u_[u]=PW)),AW&&i===pc&&f&&f.name!==pc&&(l=!0,p=function(){return OW(f,this)}),i)if(h={values:s(pc),keys:a?p:s(f_),entries:s(d_)},o)for(y in h)(dc||l||!(y in c))&&l_(c,y,h[y]);else TW({target:t,proto:!0,forced:dc||l},h);return o&&c[Qh]!==p&&l_(c,Qh,p,{name:i}),u_[t]=p,h},h_=function(e,t){return{value:e,done:t}},DW=mr,m_=Ma,v_=Dh;Jn.f;var jW=p_,hc=h_,y_="Array Iterator",NW=v_.set,MW=v_.getterFor(y_);jW(Array,"Array",function(e,t){NW(this,{type:y_,target:DW(e),index:0,kind:t})},function(){var e=MW(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,hc(void 0,!0);switch(e.kind){case"keys":return hc(n,!1);case"values":return hc(t[n],!1)}return hc([n,t[n]],!1)},"values"),m_.Arguments=m_.Array;var FW={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},LW=FW,BW=Ut,UW=Aa,g_=Ma;for(var em in LW)UW(BW[em],em),g_[em]=g_.Array;var zW=Lq,qW=zW,WW=Zt,VW=Jn.f,b_=WW("metadata"),w_=Function.prototype;w_[b_]===void 0&&VW(w_,b_,{value:null});var HW=Ot;HW("asyncDispose");var ZW=Ot;ZW("dispose");var KW=Ot;KW("metadata");var GW=qW,YW=GW,JW=vr,XW=Nt,tm=JW("Symbol"),QW=tm.keyFor,e8=XW(tm.prototype.valueOf),x_=tm.isRegisteredSymbol||function(t){try{return QW(e8(t))!==void 0}catch{return!1}},t8=vt,n8=x_;t8({target:"Symbol",stat:!0},{isRegisteredSymbol:n8});for(var r8=Oa,S_=vr,i8=Nt,a8=ss,o8=Zt,mc=S_("Symbol"),E_=mc.isWellKnownSymbol,__=S_("Object","getOwnPropertyNames"),s8=i8(mc.prototype.valueOf),k_=r8("wks"),nm=0,T_=__(mc),l8=T_.length;nm<l8;nm++)try{var O_=T_[nm];a8(mc[O_])&&o8(O_)}catch{}var C_=function(t){if(E_&&E_(t))return!0;try{for(var n=s8(t),r=0,i=__(k_),a=i.length;r<a;r++)if(k_[i[r]]==n)return!0}catch{}return!1},u8=vt,c8=C_;u8({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:c8});var f8=Ot;f8("customMatcher");var d8=Ot;d8("observable");var p8=vt,h8=x_;p8({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:h8});var m8=vt,v8=C_;m8({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:v8});var y8=Ot;y8("matcher");var g8=Ot;g8("metadataKey");var b8=Ot;b8("patternMatch");var w8=Ot;w8("replaceAll");var x8=YW,S8=x8,E8=S8;const Fa=Ge(E8);var rm=Nt,_8=Hu,k8=ps,T8=Bu,O8=rm("".charAt),$_=rm("".charCodeAt),C8=rm("".slice),I_=function(e){return function(t,n){var r=k8(T8(t)),i=_8(n),a=r.length,o,s;return i<0||i>=a?e?"":void 0:(o=$_(r,i),o<55296||o>56319||i+1===a||(s=$_(r,i+1))<56320||s>57343?e?O8(r,i):o:e?C8(r,i,i+2):(o-55296<<10)+(s-56320)+65536)}},$8={codeAt:I_(!1),charAt:I_(!0)},I8=$8.charAt,R8=ps,R_=Dh,A8=p_,A_=h_,P_="String Iterator",P8=R_.set,D8=R_.getterFor(P_);A8(String,"String",function(e){P8(this,{type:P_,string:R8(e),index:0})},function(){var t=D8(this),n=t.string,r=t.index,i;return r>=n.length?A_(void 0,!0):(i=I8(n,r),t.index+=i.length,A_(i,!1))});var j8=fs,D_=rh,N8=Jp,M8=Ma,F8=Zt,L8=F8("iterator"),im=function(e){if(!N8(e))return D_(e,L8)||D_(e,"@@iterator")||M8[j8(e)]},B8=im,U8=B8,z8=U8,q8=z8,W8=q8,V8=W8,H8=V8,Z8=H8,K8=Z8;const j_=Ge(K8);var G8=gn,Y8=Ra,J8=TypeError,X8=Object.getOwnPropertyDescriptor,Q8=G8&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),N_=Q8?function(e,t){if(Y8(e)&&!X8(e,"length").writable)throw new J8("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},eV=vt,tV=Lr,nV=Ni,rV=N_,iV=yh,aV=zt,oV=aV(function(){return[].push.call({length:4294967296},1)!==4294967297}),sV=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},lV=oV||!sV();eV({target:"Array",proto:!0,arity:1,forced:lV},{push:function(t){var n=tV(this),r=nV(n),i=arguments.length;iV(r+i);for(var a=0;a<i;a++)n[r]=arguments[a],r++;return rV(n,r),r}});var uV=Ut,cV=Xt,Li=function(e,t){var n=cV[e+"Prototype"],r=n&&n[t];if(r)return r;var i=uV[e],a=i&&i.prototype;return a&&a[t]},fV=Li,dV=fV("Array","push"),pV=Fr,hV=dV,am=Array.prototype,mV=function(e){var t=e.push;return e===am||pV(am,e)&&t===am.push?hV:t},vV=mV,yV=vV,gV=yV,bV=gV,wV=bV,xV=wV,SV=xV;const EV=Ge(SV);function _V(e,t){var n=e==null?null:typeof Fa<"u"&&j_(e)||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(EV(s).call(s,r.value),s.length!==t);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}var kV=vt,M_=Ra,TV=xh,OV=Gn,F_=Eh,CV=Ni,$V=mr,IV=cs,RV=Zt,AV=Ku,PV=tc,DV=AV("slice"),jV=RV("species"),om=Array,NV=Math.max;kV({target:"Array",proto:!0,forced:!DV},{slice:function(t,n){var r=$V(this),i=CV(r),a=F_(t,i),o=F_(n===void 0?i:n,i),s,u,l;if(M_(r)&&(s=r.constructor,TV(s)&&(s===om||M_(s.prototype))?s=void 0:OV(s)&&(s=s[jV],s===null&&(s=void 0)),s===om||s===void 0))return PV(r,a,o);for(u=new(s===void 0?om:s)(NV(o-a,0)),l=0;a<o;a++,l++)a in r&&IV(u,l,r[a]);return u.length=l,u}});var MV=Li,FV=MV("Array","slice"),LV=Fr,BV=FV,sm=Array.prototype,UV=function(e){var t=e.slice;return e===sm||LV(sm,e)&&t===sm.slice?BV:t},zV=UV,qV=zV,WV=qV,VV=WV,HV=VV,ZV=HV,KV=ZV;const GV=Ge(KV);var YV=hr,L_=ui,JV=rh,XV=function(e,t,n){var r,i;L_(e);try{if(r=JV(e,"return"),!r){if(t==="throw")throw n;return n}r=YV(r,e)}catch(a){i=!0,r=a}if(t==="throw")throw n;if(i)throw r;return L_(r),n},QV=ui,eH=XV,tH=function(e,t,n,r){try{return r?t(QV(n)[0],n[1]):t(n)}catch(i){eH(e,"throw",i)}},nH=Zt,rH=Ma,iH=nH("iterator"),aH=Array.prototype,oH=function(e){return e!==void 0&&(rH.Array===e||aH[iH]===e)},sH=hr,lH=qu,uH=ui,cH=zu,fH=im,dH=TypeError,pH=function(e,t){var n=arguments.length<2?fH(e):t;if(lH(n))return uH(sH(n,e));throw new dH(cH(e)+" is not iterable")},hH=dh,mH=hr,vH=Lr,yH=tH,gH=oH,bH=xh,wH=Ni,B_=cs,xH=pH,SH=im,U_=Array,EH=function(t){var n=vH(t),r=bH(this),i=arguments.length,a=i>1?arguments[1]:void 0,o=a!==void 0;o&&(a=hH(a,i>2?arguments[2]:void 0));var s=SH(n),u=0,l,c,f,p,d,m;if(s&&!(this===U_&&gH(s)))for(c=r?new this:[],p=xH(n,s),d=p.next;!(f=mH(d,p)).done;u++)m=o?yH(p,a,[f.value,u],!0):f.value,B_(c,u,m);else for(l=wH(n),c=r?new this(l):U_(l);l>u;u++)m=o?a(n[u],u):n[u],B_(c,u,m);return c.length=u,c},_H=Zt,z_=_H("iterator"),q_=!1;try{var kH=0,W_={next:function(){return{done:!!kH++}},return:function(){q_=!0}};W_[z_]=function(){return this},Array.from(W_,function(){throw 2})}catch{}var TH=function(e,t){try{if(!t&&!q_)return!1}catch{return!1}var n=!1;try{var r={};r[z_]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},OH=vt,CH=EH,$H=TH,IH=!$H(function(e){Array.from(e)});OH({target:"Array",stat:!0,forced:IH},{from:CH});var RH=Xt,AH=RH.Array.from,PH=AH,DH=PH,jH=DH,NH=jH,MH=NH,FH=MH,LH=FH;const V_=Ge(LH);function lm(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function H_(e,t){if(e){var n;if(typeof e=="string")return lm(e,t);var r=GV(n={}.toString.call(e)).call(n,8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?V_(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?lm(e,t):void 0}}function BH(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
165
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gr(e,t){return Yz(e)||_V(e,t)||H_(e,t)||BH()}var Z_={exports:{}};/*!
164
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return x.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},hU="DialogDescriptionWarning",mU=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${IS(hU).contentName}}.`;return x.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},vU=gS,yU=wS,gU=SS,bU=ES,wU=kS,RS=OS;function gi({open:e,onOpenChange:t,children:n}){return $.jsx(vU,{open:e,onOpenChange:t,children:n})}function xU({title:e,children:t}){var r,i,a,o,s,u,l,c;const{modal:n}=lt;return $.jsxs($.Fragment,{children:[$.jsx(gU,{...n==null?void 0:n.overlay}),$.jsx("div",{...n==null?void 0:n.container,children:$.jsxs(bU,{...(r=n==null?void 0:n.dialog)==null?void 0:r.container,children:[$.jsxs("div",{...(a=(i=n==null?void 0:n.dialog)==null?void 0:i.title)==null?void 0:a.container,children:[$.jsx(wU,{...(s=(o=n==null?void 0:n.dialog)==null?void 0:o.title)==null?void 0:s.text,children:e}),$.jsx(RS,{children:$.jsx(n1,{role:"button",tabIndex:0,...(l=(u=n==null?void 0:n.dialog)==null?void 0:u.title)==null?void 0:l.closeIcon})})]}),$.jsx("div",{...(c=n==null?void 0:n.dialog)==null?void 0:c.content,children:t})]})})]})}gi.Button=yU,gi.Close=RS,gi.Content=xU;const fh=({children:e,className:t,connected:n,uploadFile:r,allowFileUpload:i,...a})=>{const{container:o}=lt,s=hu(c=>c.setMessageContainerRef),u=rs(c=>c.uploadFile),l=j.useRef(null);return j.useEffect(()=>{s(l)},[l]),i&&r?$.jsx(Hu,{noClick:!0,onDrop:c=>c.forEach(f=>u(f,r)),children:({getRootProps:c,isDragActive:f})=>$.jsxs("div",{...a,className:ms(o.className,t),ref:l,children:[$.jsxs("div",{"data-hover":f,...o.dropzone.overlay,children:["Drop files to upload",$.jsx(dL,{style:{width:"50px"}})]}),$.jsxs(Yp,{children:[$.jsx(AS,{connected:n}),$.jsx("div",{...o.dropzone.container,...c(),children:e})]})]})}):$.jsx("div",{...a,className:ms(o.className,t),ref:l,children:$.jsxs(Yp,{children:[$.jsx(AS,{connected:n}),e]})})},AS=({connected:e})=>{const{modal:t}=lt,{showModal:n}=U0();return j.useEffect(()=>{var r,i,a,o;e===!1&&n({title:"Connection Error",content:$.jsxs($.Fragment,{children:[$.jsx("p",{...(i=(r=t==null?void 0:t.dialog)==null?void 0:r.newConversation)==null?void 0:i.text,children:"There was an error connecting to the server. Please check your internet connection and try again."}),$.jsx(gi.Close,{asChild:!0,children:$.jsx("button",{type:"button",...(o=(a=t==null?void 0:t.dialog)==null?void 0:a.newConversation)==null?void 0:o.button,onClick:()=>window.location.reload(),children:"Restart"})})]})})},[e]),$.jsx($.Fragment,{})};fh.displayName="Container";const PS=j.forwardRef(({children:e,onClick:t,...n},r)=>{const{fab:i}=lt,{container:a,icon:o}=i??{};return $.jsx("div",{...n,...a,ref:r,onClick:t,children:$.jsx("div",{...o})})});PS.displayName="Fab";var dh="Collapsible",[SU,Pfe]=W1(dh),[EU,ph]=SU(dh),DS=x.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[u=!1,l]=V1({prop:r,defaultProp:i,onChange:o});return $.jsx(EU,{scope:n,disabled:a,contentId:Zu(),open:u,onOpenToggle:x.useCallback(()=>l(c=>!c),[l]),children:$.jsx(er.div,{"data-state":mh(u),"data-disabled":a?"":void 0,...s,ref:t})})});DS.displayName=dh;var jS="CollapsibleTrigger",NS=x.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=ph(jS,n);return $.jsx(er.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":mh(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:Vr(e.onClick,i.onOpenToggle)})});NS.displayName=jS;var hh="CollapsibleContent",MS=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=ph(hh,e.__scopeCollapsible);return $.jsx(Ku,{present:n||i.open,children:({present:a})=>$.jsx(_U,{...r,ref:t,present:a})})});MS.displayName=hh;var _U=x.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...a}=e,o=ph(hh,n),[s,u]=x.useState(r),l=x.useRef(null),c=vi(t,l),f=x.useRef(0),d=f.current,p=x.useRef(0),m=p.current,h=o.open||s,y=x.useRef(h),v=x.useRef(void 0);return x.useEffect(()=>{const b=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(b)},[]),ca(()=>{const b=l.current;if(b){v.current=v.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const w=b.getBoundingClientRect();f.current=w.height,p.current=w.width,y.current||(b.style.transitionDuration=v.current.transitionDuration,b.style.animationName=v.current.animationName),u(r)}},[o.open,r]),$.jsx(er.div,{"data-state":mh(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!h,...a,ref:c,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})});function mh(e){return e?"open":"closed"}var kU=DS,TU=MS;const FS=({onClick:e,...t})=>{var o,s;const{header:n,modal:r}=lt,{showModal:i}=U0(),a=u=>{var l,c,f,d;u.stopPropagation(),i({title:"Restart Conversation",content:$.jsxs($.Fragment,{children:[$.jsx("p",{...(c=(l=r==null?void 0:r.dialog)==null?void 0:l.newConversation)==null?void 0:c.text,children:"Are you sure you want to restart a new conversation?"}),$.jsx(gi.Close,{asChild:!0,children:$.jsx("button",{type:"button",...(d=(f=r==null?void 0:r.dialog)==null?void 0:f.newConversation)==null?void 0:d.button,onClick:e,children:"Restart"})})]})})};return $.jsx(gF,{...t,...(s=(o=n==null?void 0:n.content)==null?void 0:o.actions)==null?void 0:s.icons,role:"button",tabIndex:0,onClick:a,onKeyDown:u=>{u.key==="Enter"&&a(u)}})},CU=({onClick:e,...t})=>{const{header:n}=lt,r=i=>{i.stopPropagation(),e==null||e()};return $.jsx(n1,{...t,...n.content.actions.icons,role:"button",tabIndex:0,onClick:r,onKeyDown:i=>{i.key==="Enter"&&r(i)}})},gs=({icon:e,title:t,link:n,...r})=>{var o,s,u,l,c,f,d,p,m,h,y,v;const{header:i}=lt,a=e??oL;return t?n?$.jsxs("a",{...r,...(s=(o=i.expandedContent)==null?void 0:o.descriptionItems)==null?void 0:s.container,href:n,target:"_blank",rel:"noreferrer noopener",children:[$.jsx(a,{...(l=(u=i.expandedContent)==null?void 0:u.descriptionItems)==null?void 0:l.icon}),$.jsx("p",{...(f=(c=i.expandedContent)==null?void 0:c.descriptionItems)==null?void 0:f.link,children:t})]}):$.jsxs("div",{...r,...(p=(d=i.expandedContent)==null?void 0:d.descriptionItems)==null?void 0:p.container,children:[$.jsx(a,{...(h=(m=i.expandedContent)==null?void 0:m.descriptionItems)==null?void 0:h.icon}),$.jsx("p",{...(v=(y=i.expandedContent)==null?void 0:y.descriptionItems)==null?void 0:v.text,children:t})]}):null},LS=({defaultOpen:e,closeWindow:t,configuration:n,restartConversation:r,...i})=>{var c,f,d,p,m,h,y,v,b,w,T,E,_,O,z,U,k,D,W,B,I,A;const{header:a}=lt,[o,s]=j.useState(!!e),u=!!((c=n.email)!=null&&c.title)||!!((f=n.phone)!=null&&f.title)||!!((d=n.website)!=null&&d.title)||!!((p=n.termsOfService)!=null&&p.link)||!!((m=n.privacyPolicy)!=null&&m.link),l=u||!!n.botDescription;return $.jsxs(kU,{open:l?o:!1,onOpenChange:s,"data-disabled":l?void 0:"",...a.container,...i,children:[$.jsxs(NS,{...a.content.container,children:[$.jsx(Zl,{...i,src:n.botAvatar,...a.content.avatar,children:n.botName||"Bot"}),$.jsx("h2",{...a.content.title,children:n.botName||"Bot"}),n.botDescription&&$.jsx("p",{...a.content.description,children:n.botDescription}),$.jsxs("div",{...a.content.actions.container,children:[r&&$.jsx(FS,{onClick:r}),t&&$.jsx(CU,{onClick:t})]})]}),u&&$.jsxs(TU,{...a.expandedContent.container,children:[$.jsxs("div",{"data-links":"",...a.expandedContent.group,children:[$.jsx(gs,{"data-email":"",icon:vL,title:(h=n.email)==null?void 0:h.title,link:(v=(y=n.email)==null?void 0:y.link)!=null&&v.startsWith("mailto:")?(b=n.email)==null?void 0:b.link:`mailto:${(w=n.email)==null?void 0:w.link}`}),$.jsx(gs,{"data-phone":"",icon:SL,title:(T=n.phone)==null?void 0:T.title,link:(_=(E=n.phone)==null?void 0:E.link)!=null&&_.startsWith("tel:")?(O=n.phone)==null?void 0:O.link:`tel:${(z=n.phone)==null?void 0:z.link}`}),$.jsx(gs,{"data-website":"",link:(U=n.website)==null?void 0:U.link,icon:gL,title:(k=n.website)==null?void 0:k.title})]}),$.jsxs("div",{"data-legal":"",...(D=a.expandedContent)==null?void 0:D.group,children:[$.jsx(gs,{"data-terms":"",link:(W=n.termsOfService)==null?void 0:W.link,icon:hL,title:(B=n.termsOfService)==null?void 0:B.title}),$.jsx(gs,{"data-privacy":"",link:(I=n.privacyPolicy)==null?void 0:I.link,icon:wL,title:(A=n.privacyPolicy)==null?void 0:A.title})]})]})]})},BS=j.memo(({...e})=>{const{typingIndicator:t}=lt;return $.jsx("div",{...e,...t==null?void 0:t.container,children:$.jsx("div",{...t==null?void 0:t.loader})})}),vh=j.memo(j.forwardRef(({direction:e,block:t,disableInput:n,children:r,sender:i,id:a,authorId:o,renderers:s,sendMessage:u,isReadOnly:l,timestamp:c},f)=>{var b,w,T;const[d,p]=j.useState([]),{message:m}=lt,h=Lg(o??"",15),[y,v]=j.useState("idle");return $.jsx(L0.Provider,{value:{isLoading:d,setIsLoading:p},children:$.jsxs("div",{...m==null?void 0:m.container,"data-loaded":d.length===0,"data-disable-input":!!n,"data-direction":e,ref:f,children:[$.jsxs(Kf,{"data-color":h,"data-loading-status":y,...(b=m==null?void 0:m.avatar)==null?void 0:b.container,children:[$.jsx(Gf,{...(w=m==null?void 0:m.avatar)==null?void 0:w.image,onLoadingStatusChange:v,src:i==null?void 0:i.avatar}),$.jsxs(Yf,{...(T=m==null?void 0:m.avatar)==null?void 0:T.fallback,children:[i==null?void 0:i.name[0]," "]})]}),t&&$.jsx(Pa,{block:{...t,isReadOnly:l,direction:e,timestamp:c,sender:i,messageId:a,sendMessage:u},renderers:s}),r]})})}));function OU({botAvatar:e,botDescription:t,botName:n}){const{messageList:{marquee:r}}=lt;return $.jsxs("li",{...r.container,children:[$.jsx(Zl,{src:e,...r.avatar,children:(n||"Bot").slice(0,1)}),$.jsxs("div",{...r.content,children:[$.jsx("h1",{...r.title,children:n||"Bot"}),$.jsx("p",{...r.description,children:t})]})]})}function $U(e,t){try{var n=global,r=n.document;if(typeof r<"u"&&r.createElement&&r.head&&r.head.appendChild){var i=r.querySelector('html meta[name="'.concat(encodeURI(e),'"]'))||r.createElement("meta");i.setAttribute("name",e),i.setAttribute("content",t),r.head.appendChild(i)}}catch{}}function IU(){$U("react-scroll-to-bottom:version","4.2.0")}var bs=function(e){return e&&e.Math===Math&&e},Vt=bs(typeof globalThis=="object"&&globalThis)||bs(typeof window=="object"&&window)||bs(typeof self=="object"&&self)||bs(typeof vt=="object"&&vt)||bs(typeof vt=="object"&&vt)||function(){return this}()||Function("return this")(),Ht=function(e){try{return!!e()}catch{return!0}},RU=Ht,ic=!RU(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),AU=ic,US=Function.prototype,zS=US.apply,qS=US.call,yh=typeof Reflect=="object"&&Reflect.apply||(AU?qS.bind(zS):function(){return qS.apply(zS,arguments)}),WS=ic,VS=Function.prototype,gh=VS.call,PU=WS&&VS.bind.bind(gh,gh),Bt=WS?PU:function(e){return function(){return gh.apply(e,arguments)}},HS=Bt,DU=HS({}.toString),jU=HS("".slice),Hi=function(e){return jU(DU(e),8,-1)},NU=Hi,MU=Bt,bh=function(e){if(NU(e)==="Function")return MU(e)},wh=typeof document=="object"&&document.all,cn=typeof wh>"u"&&wh!==void 0?function(e){return typeof e=="function"||e===wh}:function(e){return typeof e=="function"},ws={},FU=Ht,En=!FU(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),LU=ic,ac=Function.prototype.call,Sr=LU?ac.bind(ac):function(){return ac.apply(ac,arguments)},xh={},ZS={}.propertyIsEnumerable,KS=Object.getOwnPropertyDescriptor,BU=KS&&!ZS.call({1:2},1);xh.f=BU?function(t){var n=KS(this,t);return!!n&&n.enumerable}:ZS;var xs=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},UU=Bt,zU=Ht,qU=Hi,Sh=Object,WU=UU("".split),GS=zU(function(){return!Sh("z").propertyIsEnumerable(0)})?function(e){return qU(e)==="String"?WU(e,""):Sh(e)}:Sh,Eh=function(e){return e==null},VU=Eh,HU=TypeError,oc=function(e){if(VU(e))throw new HU("Can't call method on "+e);return e},ZU=GS,KU=oc,Er=function(e){return ZU(KU(e))},GU=cn,tr=function(e){return typeof e=="object"?e!==null:GU(e)},rn={},_h=rn,kh=Vt,YU=cn,YS=function(e){return YU(e)?e:void 0},_r=function(e,t){return arguments.length<2?YS(_h[e])||YS(kh[e]):_h[e]&&_h[e][t]||kh[e]&&kh[e][t]},JU=Bt,Hr=JU({}.isPrototypeOf),XU=Vt,JS=XU.navigator,XS=JS&&JS.userAgent,Th=XS?String(XS):"",QS=Vt,Ch=Th,eE=QS.process,tE=QS.Deno,nE=eE&&eE.versions||tE&&tE.version,rE=nE&&nE.v8,nr,sc;rE&&(nr=rE.split("."),sc=nr[0]>0&&nr[0]<4?1:+(nr[0]+nr[1])),!sc&&Ch&&(nr=Ch.match(/Edge\/(\d+)/),(!nr||nr[1]>=74)&&(nr=Ch.match(/Chrome\/(\d+)/),nr&&(sc=+nr[1])));var Oh=sc,iE=Oh,QU=Ht,ez=Vt,tz=ez.String,Fa=!!Object.getOwnPropertySymbols&&!QU(function(){var e=Symbol("symbol detection");return!tz(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&iE&&iE<41}),nz=Fa,aE=nz&&!Symbol.sham&&typeof Symbol.iterator=="symbol",rz=_r,iz=cn,az=Hr,oz=aE,sz=Object,Ss=oz?function(e){return typeof e=="symbol"}:function(e){var t=rz("Symbol");return iz(t)&&az(t.prototype,sz(e))},lz=String,lc=function(e){try{return lz(e)}catch{return"Object"}},uz=cn,cz=lc,fz=TypeError,uc=function(e){if(uz(e))return e;throw new fz(cz(e)+" is not a function")},dz=uc,pz=Eh,$h=function(e,t){var n=e[t];return pz(n)?void 0:dz(n)},Ih=Sr,Rh=cn,Ah=tr,hz=TypeError,mz=function(e,t){var n,r;if(t==="string"&&Rh(n=e.toString)&&!Ah(r=Ih(n,e))||Rh(n=e.valueOf)&&!Ah(r=Ih(n,e))||t!=="string"&&Rh(n=e.toString)&&!Ah(r=Ih(n,e)))return r;throw new hz("Can't convert object to primitive value")},oE={exports:{}},sE=Vt,vz=Object.defineProperty,yz=function(e,t){try{vz(sE,e,{value:t,configurable:!0,writable:!0})}catch{sE[e]=t}return t},gz=Vt,bz=yz,lE="__core-js_shared__",uE=oE.exports=gz[lE]||bz(lE,{});(uE.versions||(uE.versions=[])).push({version:"3.38.1",mode:"pure",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Ph=oE.exports,cE=Ph,La=function(e,t){return cE[e]||(cE[e]=t||{})},wz=oc,xz=Object,Zr=function(e){return xz(wz(e))},Sz=Bt,Ez=Zr,_z=Sz({}.hasOwnProperty),An=Object.hasOwn||function(t,n){return _z(Ez(t),n)},kz=Bt,Tz=0,Cz=Math.random(),Oz=kz(1 .toString),Dh=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Oz(++Tz+Cz,36)},$z=Vt,Iz=La,fE=An,Rz=Dh,Az=Fa,Pz=aE,Ba=$z.Symbol,jh=Iz("wks"),Dz=Pz?Ba.for||Ba:Ba&&Ba.withoutSetter||Rz,Xt=function(e){return fE(jh,e)||(jh[e]=Az&&fE(Ba,e)?Ba[e]:Dz("Symbol."+e)),jh[e]},jz=Sr,dE=tr,pE=Ss,Nz=$h,Mz=mz,Fz=Xt,Lz=TypeError,Bz=Fz("toPrimitive"),Uz=function(e,t){if(!dE(e)||pE(e))return e;var n=Nz(e,Bz),r;if(n){if(t===void 0&&(t="default"),r=jz(n,e,t),!dE(r)||pE(r))return r;throw new Lz("Can't convert object to primitive value")}return t===void 0&&(t="number"),Mz(e,t)},zz=Uz,qz=Ss,Nh=function(e){var t=zz(e,"string");return qz(t)?t:t+""},Wz=Vt,hE=tr,Mh=Wz.document,Vz=hE(Mh)&&hE(Mh.createElement),mE=function(e){return Vz?Mh.createElement(e):{}},Hz=En,Zz=Ht,Kz=mE,vE=!Hz&&!Zz(function(){return Object.defineProperty(Kz("div"),"a",{get:function(){return 7}}).a!==7}),Gz=En,Yz=Sr,Jz=xh,Xz=xs,Qz=Er,e6=Nh,t6=An,n6=vE,yE=Object.getOwnPropertyDescriptor;ws.f=Gz?yE:function(t,n){if(t=Qz(t),n=e6(n),n6)try{return yE(t,n)}catch{}if(t6(t,n))return Xz(!Yz(Jz.f,t,n),t[n])};var r6=Ht,i6=cn,a6=/#|\.prototype\./,Es=function(e,t){var n=s6[o6(e)];return n===u6?!0:n===l6?!1:i6(t)?r6(t):!!t},o6=Es.normalize=function(e){return String(e).replace(a6,".").toLowerCase()},s6=Es.data={},l6=Es.NATIVE="N",u6=Es.POLYFILL="P",c6=Es,gE=bh,f6=uc,d6=ic,p6=gE(gE.bind),Fh=function(e,t){return f6(e),t===void 0?e:d6?p6(e,t):function(){return e.apply(t,arguments)}},rr={},h6=En,m6=Ht,bE=h6&&m6(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),v6=tr,y6=String,g6=TypeError,bi=function(e){if(v6(e))return e;throw new g6(y6(e)+" is not an object")},b6=En,w6=vE,x6=bE,cc=bi,wE=Nh,S6=TypeError,Lh=Object.defineProperty,E6=Object.getOwnPropertyDescriptor,Bh="enumerable",Uh="configurable",zh="writable";rr.f=b6?x6?function(t,n,r){if(cc(t),n=wE(n),cc(r),typeof t=="function"&&n==="prototype"&&"value"in r&&zh in r&&!r[zh]){var i=E6(t,n);i&&i[zh]&&(t[n]=r.value,r={configurable:Uh in r?r[Uh]:i[Uh],enumerable:Bh in r?r[Bh]:i[Bh],writable:!1})}return Lh(t,n,r)}:Lh:function(t,n,r){if(cc(t),n=wE(n),cc(r),w6)try{return Lh(t,n,r)}catch{}if("get"in r||"set"in r)throw new S6("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var _6=En,k6=rr,T6=xs,fc=_6?function(e,t,n){return k6.f(e,t,T6(1,n))}:function(e,t,n){return e[t]=n,e},_s=Vt,C6=yh,O6=bh,$6=cn,I6=ws.f,R6=c6,Ua=rn,A6=Fh,za=fc,xE=An,P6=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return C6(e,this,arguments)};return t.prototype=e.prototype,t},yt=function(e,t){var n=e.target,r=e.global,i=e.stat,a=e.proto,o=r?_s:i?_s[n]:_s[n]&&_s[n].prototype,s=r?Ua:Ua[n]||za(Ua,n,{})[n],u=s.prototype,l,c,f,d,p,m,h,y,v;for(d in t)l=R6(r?d:n+(i?".":"#")+d,e.forced),c=!l&&o&&xE(o,d),m=s[d],c&&(e.dontCallGetSet?(v=I6(o,d),h=v&&v.value):h=o[d]),p=c&&h?h:t[d],!(!l&&!a&&typeof m==typeof p)&&(e.bind&&c?y=A6(p,_s):e.wrap&&c?y=P6(p):a&&$6(p)?y=O6(p):y=p,(e.sham||p&&p.sham||m&&m.sham)&&za(y,"sham",!0),za(s,d,y),a&&(f=n+"Prototype",xE(Ua,f)||za(Ua,f,{}),za(Ua[f],d,p),e.real&&u&&(l||!u[d])&&za(u,d,p)))},D6=Hi,qa=Array.isArray||function(t){return D6(t)==="Array"},j6=yt,N6=qa;j6({target:"Array",stat:!0},{isArray:N6});var M6=rn,F6=M6.Array.isArray,L6=F6,SE=L6,B6=SE,U6=B6,z6=U6,q6=z6,W6=q6;const EE=Ge(W6);function V6(e){if(EE(e))return e}var H6=Math.ceil,Z6=Math.floor,K6=Math.trunc||function(t){var n=+t;return(n>0?Z6:H6)(n)},G6=K6,dc=function(e){var t=+e;return t!==t||t===0?0:G6(t)},Y6=dc,J6=Math.min,X6=function(e){var t=Y6(e);return t>0?J6(t,9007199254740991):0},Q6=X6,Zi=function(e){return Q6(e.length)},e7=TypeError,t7=9007199254740991,qh=function(e){if(e>t7)throw e7("Maximum allowed index exceeded");return e},n7=En,r7=rr,i7=xs,ks=function(e,t,n){n7?r7.f(e,t,i7(0,n)):e[t]=n},a7=Xt,o7=a7("toStringTag"),_E={};_E[o7]="z";var Wh=String(_E)==="[object z]",s7=Wh,l7=cn,pc=Hi,u7=Xt,c7=u7("toStringTag"),f7=Object,d7=pc(function(){return arguments}())==="Arguments",p7=function(e,t){try{return e[t]}catch{}},Ts=s7?pc:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=p7(t=f7(e),c7))=="string"?n:d7?pc(t):(r=pc(t))==="Object"&&l7(t.callee)?"Arguments":r},h7=Bt,m7=cn,Vh=Ph,v7=h7(Function.toString);m7(Vh.inspectSource)||(Vh.inspectSource=function(e){return v7(e)});var y7=Vh.inspectSource,g7=Bt,b7=Ht,kE=cn,w7=Ts,x7=_r,S7=y7,TE=function(){},CE=x7("Reflect","construct"),Hh=/^\s*(?:class|function)\b/,E7=g7(Hh.exec),_7=!Hh.test(TE),Cs=function(t){if(!kE(t))return!1;try{return CE(TE,[],t),!0}catch{return!1}},OE=function(t){if(!kE(t))return!1;switch(w7(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return _7||!!E7(Hh,S7(t))}catch{return!0}};OE.sham=!0;var Zh=!CE||b7(function(){var e;return Cs(Cs.call)||!Cs(Object)||!Cs(function(){e=!0})||e})?OE:Cs,$E=qa,k7=Zh,T7=tr,C7=Xt,O7=C7("species"),IE=Array,$7=function(e){var t;return $E(e)&&(t=e.constructor,k7(t)&&(t===IE||$E(t.prototype))?t=void 0:T7(t)&&(t=t[O7],t===null&&(t=void 0))),t===void 0?IE:t},I7=$7,Kh=function(e,t){return new(I7(e))(t===0?0:t)},R7=Ht,A7=Xt,P7=Oh,D7=A7("species"),hc=function(e){return P7>=51||!R7(function(){var t=[],n=t.constructor={};return n[D7]=function(){return{foo:1}},t[e](Boolean).foo!==1})},j7=yt,N7=Ht,M7=qa,F7=tr,L7=Zr,B7=Zi,RE=qh,AE=ks,U7=Kh,z7=hc,q7=Xt,W7=Oh,PE=q7("isConcatSpreadable"),V7=W7>=51||!N7(function(){var e=[];return e[PE]=!1,e.concat()[0]!==e}),H7=function(e){if(!F7(e))return!1;var t=e[PE];return t!==void 0?!!t:M7(e)},Z7=!V7||!z7("concat");j7({target:"Array",proto:!0,arity:1,forced:Z7},{concat:function(t){var n=L7(this),r=U7(n,0),i=0,a,o,s,u,l;for(a=-1,s=arguments.length;a<s;a++)if(l=a===-1?n:arguments[a],H7(l))for(u=B7(l),RE(i+u),o=0;o<u;o++,i++)o in l&&AE(r,i,l[o]);else RE(i+1),AE(r,i++,l);return r.length=i,r}});var K7=Ts,G7=String,Os=function(e){if(K7(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return G7(e)},mc={},Y7=dc,J7=Math.max,X7=Math.min,Gh=function(e,t){var n=Y7(e);return n<0?J7(n+t,0):X7(n,t)},Q7=Er,e9=Gh,t9=Zi,DE=function(e){return function(t,n,r){var i=Q7(t),a=t9(i);if(a===0)return!e&&-1;var o=e9(r,a),s;if(e&&n!==n){for(;a>o;)if(s=i[o++],s!==s)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},jE={includes:DE(!0),indexOf:DE(!1)},vc={},n9=Bt,Yh=An,r9=Er,i9=jE.indexOf,a9=vc,NE=n9([].push),ME=function(e,t){var n=r9(e),r=0,i=[],a;for(a in n)!Yh(a9,a)&&Yh(n,a)&&NE(i,a);for(;t.length>r;)Yh(n,a=t[r++])&&(~i9(i,a)||NE(i,a));return i},Jh=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],o9=ME,s9=Jh,Xh=Object.keys||function(t){return o9(t,s9)},l9=En,u9=bE,c9=rr,f9=bi,d9=Er,p9=Xh;mc.f=l9&&!u9?Object.defineProperties:function(t,n){f9(t);for(var r=d9(n),i=p9(n),a=i.length,o=0,s;a>o;)c9.f(t,s=i[o++],r[s]);return t};var h9=_r,m9=h9("document","documentElement"),v9=La,y9=Dh,FE=v9("keys"),yc=function(e){return FE[e]||(FE[e]=y9(e))},g9=bi,b9=mc,LE=Jh,w9=vc,x9=m9,S9=mE,E9=yc,BE=">",UE="<",Qh="prototype",em="script",zE=E9("IE_PROTO"),tm=function(){},qE=function(e){return UE+em+BE+e+UE+"/"+em+BE},WE=function(e){e.write(qE("")),e.close();var t=e.parentWindow.Object;return e=null,t},_9=function(){var e=S9("iframe"),t="java"+em+":",n;return e.style.display="none",x9.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(qE("document.F=Object")),n.close(),n.F},gc,bc=function(){try{gc=new ActiveXObject("htmlfile")}catch{}bc=typeof document<"u"?document.domain&&gc?WE(gc):_9():WE(gc);for(var e=LE.length;e--;)delete bc[Qh][LE[e]];return bc()};w9[zE]=!0;var nm=Object.create||function(t,n){var r;return t!==null?(tm[Qh]=g9(t),r=new tm,tm[Qh]=null,r[zE]=t):r=bc(),n===void 0?r:b9.f(r,n)},wc={},k9=ME,T9=Jh,C9=T9.concat("length","prototype");wc.f=Object.getOwnPropertyNames||function(t){return k9(t,C9)};var VE={},O9=Bt,xc=O9([].slice),$9=Hi,I9=Er,HE=wc.f,R9=xc,ZE=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],A9=function(e){try{return HE(e)}catch{return R9(ZE)}};VE.f=function(t){return ZE&&$9(t)==="Window"?A9(t):HE(I9(t))};var Sc={};Sc.f=Object.getOwnPropertySymbols;var P9=fc,Ec=function(e,t,n,r){return r&&r.enumerable?e[t]=n:P9(e,t,n),e},D9=rr,j9=function(e,t,n){return D9.f(e,t,n)},$s={},N9=Xt;$s.f=N9;var KE=rn,M9=An,F9=$s,L9=rr.f,$t=function(e){var t=KE.Symbol||(KE.Symbol={});M9(t,e)||L9(t,e,{value:F9.f(e)})},B9=Sr,U9=_r,z9=Xt,q9=Ec,GE=function(){var e=U9("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=z9("toPrimitive");t&&!t[r]&&q9(t,r,function(i){return B9(n,this)},{arity:1})},W9=Wh,V9=Ts,H9=W9?{}.toString:function(){return"[object "+V9(this)+"]"},Z9=Wh,K9=rr.f,G9=fc,Y9=An,J9=H9,X9=Xt,YE=X9("toStringTag"),Wa=function(e,t,n,r){var i=n?e:e&&e.prototype;i&&(Y9(i,YE)||K9(i,YE,{configurable:!0,value:t}),r&&!Z9&&G9(i,"toString",J9))},Q9=Vt,eq=cn,JE=Q9.WeakMap,tq=eq(JE)&&/native code/.test(String(JE)),nq=tq,XE=Vt,rq=tr,iq=fc,rm=An,im=Ph,aq=yc,oq=vc,QE="Object already initialized",am=XE.TypeError,sq=XE.WeakMap,_c,Is,kc,lq=function(e){return kc(e)?Is(e):_c(e,{})},uq=function(e){return function(t){var n;if(!rq(t)||(n=Is(t)).type!==e)throw new am("Incompatible receiver, "+e+" required");return n}};if(nq||im.state){var kr=im.state||(im.state=new sq);kr.get=kr.get,kr.has=kr.has,kr.set=kr.set,_c=function(e,t){if(kr.has(e))throw new am(QE);return t.facade=e,kr.set(e,t),t},Is=function(e){return kr.get(e)||{}},kc=function(e){return kr.has(e)}}else{var Va=aq("state");oq[Va]=!0,_c=function(e,t){if(rm(e,Va))throw new am(QE);return t.facade=e,iq(e,Va,t),t},Is=function(e){return rm(e,Va)?e[Va]:{}},kc=function(e){return rm(e,Va)}}var om={set:_c,get:Is,has:kc,enforce:lq,getterFor:uq},cq=Fh,fq=Bt,dq=GS,pq=Zr,hq=Zi,mq=Kh,e_=fq([].push),wi=function(e){var t=e===1,n=e===2,r=e===3,i=e===4,a=e===6,o=e===7,s=e===5||a;return function(u,l,c,f){for(var d=pq(u),p=dq(d),m=hq(p),h=cq(l,c),y=0,v=f||mq,b=t?v(u,m):n||o?v(u,0):void 0,w,T;m>y;y++)if((s||y in p)&&(w=p[y],T=h(w,y,d),e))if(t)b[y]=T;else if(T)switch(e){case 3:return!0;case 5:return w;case 6:return y;case 2:e_(b,w)}else switch(e){case 4:return!1;case 7:e_(b,w)}return a?-1:r||i?i:b}},sm={forEach:wi(0),map:wi(1),filter:wi(2),some:wi(3),every:wi(4),find:wi(5),findIndex:wi(6),filterReject:wi(7)},Tc=yt,Rs=Vt,lm=Sr,vq=Bt,Ha=En,Za=Fa,yq=Ht,Qt=An,gq=Hr,um=bi,Cc=Er,cm=Nh,bq=Os,fm=xs,Ka=nm,t_=Xh,wq=wc,n_=VE,xq=Sc,r_=ws,i_=rr,Sq=mc,a_=xh,o_=Ec,Eq=j9,dm=La,_q=yc,s_=vc,l_=Dh,kq=Xt,Tq=$s,Cq=$t,Oq=GE,$q=Wa,u_=om,Oc=sm.forEach,_n=_q("hidden"),$c="Symbol",As="prototype",Iq=u_.set,c_=u_.getterFor($c),ir=Object[As],Ki=Rs.Symbol,Ps=Ki&&Ki[As],Rq=Rs.RangeError,Aq=Rs.TypeError,pm=Rs.QObject,f_=r_.f,Gi=i_.f,d_=n_.f,Pq=a_.f,p_=vq([].push),Kr=dm("symbols"),Ds=dm("op-symbols"),Dq=dm("wks"),hm=!pm||!pm[As]||!pm[As].findChild,h_=function(e,t,n){var r=f_(ir,t);r&&delete ir[t],Gi(e,t,n),r&&e!==ir&&Gi(ir,t,r)},mm=Ha&&yq(function(){return Ka(Gi({},"a",{get:function(){return Gi(this,"a",{value:7}).a}})).a!==7})?h_:Gi,vm=function(e,t){var n=Kr[e]=Ka(Ps);return Iq(n,{type:$c,tag:e,description:t}),Ha||(n.description=t),n},Ic=function(t,n,r){t===ir&&Ic(Ds,n,r),um(t);var i=cm(n);return um(r),Qt(Kr,i)?(r.enumerable?(Qt(t,_n)&&t[_n][i]&&(t[_n][i]=!1),r=Ka(r,{enumerable:fm(0,!1)})):(Qt(t,_n)||Gi(t,_n,fm(1,Ka(null))),t[_n][i]=!0),mm(t,i,r)):Gi(t,i,r)},ym=function(t,n){um(t);var r=Cc(n),i=t_(r).concat(g_(r));return Oc(i,function(a){(!Ha||lm(m_,r,a))&&Ic(t,a,r[a])}),t},jq=function(t,n){return n===void 0?Ka(t):ym(Ka(t),n)},m_=function(t){var n=cm(t),r=lm(Pq,this,n);return this===ir&&Qt(Kr,n)&&!Qt(Ds,n)?!1:r||!Qt(this,n)||!Qt(Kr,n)||Qt(this,_n)&&this[_n][n]?r:!0},v_=function(t,n){var r=Cc(t),i=cm(n);if(!(r===ir&&Qt(Kr,i)&&!Qt(Ds,i))){var a=f_(r,i);return a&&Qt(Kr,i)&&!(Qt(r,_n)&&r[_n][i])&&(a.enumerable=!0),a}},y_=function(t){var n=d_(Cc(t)),r=[];return Oc(n,function(i){!Qt(Kr,i)&&!Qt(s_,i)&&p_(r,i)}),r},g_=function(e){var t=e===ir,n=d_(t?Ds:Cc(e)),r=[];return Oc(n,function(i){Qt(Kr,i)&&(!t||Qt(ir,i))&&p_(r,Kr[i])}),r};Za||(Ki=function(){if(gq(Ps,this))throw new Aq("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:bq(arguments[0]),n=l_(t),r=function(i){var a=this===void 0?Rs:this;a===ir&&lm(r,Ds,i),Qt(a,_n)&&Qt(a[_n],n)&&(a[_n][n]=!1);var o=fm(1,i);try{mm(a,n,o)}catch(s){if(!(s instanceof Rq))throw s;h_(a,n,o)}};return Ha&&hm&&mm(ir,n,{configurable:!0,set:r}),vm(n,t)},Ps=Ki[As],o_(Ps,"toString",function(){return c_(this).tag}),o_(Ki,"withoutSetter",function(e){return vm(l_(e),e)}),a_.f=m_,i_.f=Ic,Sq.f=ym,r_.f=v_,wq.f=n_.f=y_,xq.f=g_,Tq.f=function(e){return vm(kq(e),e)},Ha&&Eq(Ps,"description",{configurable:!0,get:function(){return c_(this).description}})),Tc({global:!0,constructor:!0,wrap:!0,forced:!Za,sham:!Za},{Symbol:Ki}),Oc(t_(Dq),function(e){Cq(e)}),Tc({target:$c,stat:!0,forced:!Za},{useSetter:function(){hm=!0},useSimple:function(){hm=!1}}),Tc({target:"Object",stat:!0,forced:!Za,sham:!Ha},{create:jq,defineProperty:Ic,defineProperties:ym,getOwnPropertyDescriptor:v_}),Tc({target:"Object",stat:!0,forced:!Za},{getOwnPropertyNames:y_}),Oq(),$q(Ki,$c),s_[_n]=!0;var Nq=Fa,b_=Nq&&!!Symbol.for&&!!Symbol.keyFor,Mq=yt,Fq=_r,Lq=An,Bq=Os,w_=La,Uq=b_,gm=w_("string-to-symbol-registry"),zq=w_("symbol-to-string-registry");Mq({target:"Symbol",stat:!0,forced:!Uq},{for:function(e){var t=Bq(e);if(Lq(gm,t))return gm[t];var n=Fq("Symbol")(t);return gm[t]=n,zq[n]=t,n}});var qq=yt,Wq=An,Vq=Ss,Hq=lc,Zq=La,Kq=b_,x_=Zq("symbol-to-string-registry");qq({target:"Symbol",stat:!0,forced:!Kq},{keyFor:function(t){if(!Vq(t))throw new TypeError(Hq(t)+" is not a symbol");if(Wq(x_,t))return x_[t]}});var Gq=Bt,S_=qa,Yq=cn,E_=Hi,Jq=Os,__=Gq([].push),Xq=function(e){if(Yq(e))return e;if(S_(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];typeof i=="string"?__(n,i):(typeof i=="number"||E_(i)==="Number"||E_(i)==="String")&&__(n,Jq(i))}var a=n.length,o=!0;return function(s,u){if(o)return o=!1,u;if(S_(this))return u;for(var l=0;l<a;l++)if(n[l]===s)return u}}},Qq=yt,k_=_r,T_=yh,eW=Sr,js=Bt,C_=Ht,O_=cn,$_=Ss,I_=xc,tW=Xq,nW=Fa,rW=String,xi=k_("JSON","stringify"),Rc=js(/./.exec),R_=js("".charAt),iW=js("".charCodeAt),aW=js("".replace),oW=js(1 .toString),sW=/[\uD800-\uDFFF]/g,A_=/^[\uD800-\uDBFF]$/,P_=/^[\uDC00-\uDFFF]$/,D_=!nW||C_(function(){var e=k_("Symbol")("stringify detection");return xi([e])!=="[null]"||xi({a:e})!=="{}"||xi(Object(e))!=="{}"}),j_=C_(function(){return xi("\uDF06\uD834")!=='"\\udf06\\ud834"'||xi("\uDEAD")!=='"\\udead"'}),lW=function(e,t){var n=I_(arguments),r=tW(t);if(!(!O_(r)&&(e===void 0||$_(e))))return n[1]=function(i,a){if(O_(r)&&(a=eW(r,this,rW(i),a)),!$_(a))return a},T_(xi,null,n)},uW=function(e,t,n){var r=R_(n,t-1),i=R_(n,t+1);return Rc(A_,e)&&!Rc(P_,i)||Rc(P_,e)&&!Rc(A_,r)?"\\u"+oW(iW(e,0),16):e};xi&&Qq({target:"JSON",stat:!0,arity:3,forced:D_||j_},{stringify:function(t,n,r){var i=I_(arguments),a=T_(D_?lW:xi,null,i);return j_&&typeof a=="string"?aW(a,sW,uW):a}});var cW=yt,fW=Fa,dW=Ht,N_=Sc,pW=Zr,hW=!fW||dW(function(){N_.f(1)});cW({target:"Object",stat:!0,forced:hW},{getOwnPropertySymbols:function(t){var n=N_.f;return n?n(pW(t)):[]}});var mW=$t;mW("asyncIterator");var vW=$t;vW("hasInstance");var yW=$t;yW("isConcatSpreadable");var gW=$t;gW("iterator");var bW=$t;bW("match");var wW=$t;wW("matchAll");var xW=$t;xW("replace");var SW=$t;SW("search");var EW=$t;EW("species");var _W=$t;_W("split");var kW=$t,TW=GE;kW("toPrimitive"),TW();var CW=_r,OW=$t,$W=Wa;OW("toStringTag"),$W(CW("Symbol"),"Symbol");var IW=$t;IW("unscopables");var RW=Vt,AW=Wa;AW(RW.JSON,"JSON",!0);var PW=rn,DW=PW.Symbol,Ga={},bm=En,jW=An,M_=Function.prototype,NW=bm&&Object.getOwnPropertyDescriptor,wm=jW(M_,"name"),MW=wm&&(function(){}).name==="something",FW=wm&&(!bm||bm&&NW(M_,"name").configurable),LW={EXISTS:wm,PROPER:MW,CONFIGURABLE:FW},BW=Ht,UW=!BW(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),zW=An,qW=cn,WW=Zr,VW=yc,HW=UW,F_=VW("IE_PROTO"),xm=Object,ZW=xm.prototype,L_=HW?xm.getPrototypeOf:function(e){var t=WW(e);if(zW(t,F_))return t[F_];var n=t.constructor;return qW(n)&&t instanceof n?n.prototype:t instanceof xm?ZW:null},KW=Ht,GW=cn,YW=tr,JW=nm,B_=L_,XW=Ec,QW=Xt,Sm=QW("iterator"),U_=!1,Gr,Em,_m;[].keys&&(_m=[].keys(),"next"in _m?(Em=B_(B_(_m)),Em!==Object.prototype&&(Gr=Em)):U_=!0);var eV=!YW(Gr)||KW(function(){var e={};return Gr[Sm].call(e)!==e});eV?Gr={}:Gr=JW(Gr),GW(Gr[Sm])||XW(Gr,Sm,function(){return this});var z_={IteratorPrototype:Gr,BUGGY_SAFARI_ITERATORS:U_},tV=z_.IteratorPrototype,nV=nm,rV=xs,iV=Wa,aV=Ga,oV=function(){return this},sV=function(e,t,n,r){var i=t+" Iterator";return e.prototype=nV(tV,{next:rV(+!r,n)}),iV(e,i,!1,!0),aV[i]=oV,e},lV=Bt,uV=uc,cV=function(e,t,n){try{return lV(uV(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}},fV=tr,dV=function(e){return fV(e)||e===null},pV=dV,hV=String,mV=TypeError,vV=function(e){if(pV(e))return e;throw new mV("Can't set "+hV(e)+" as a prototype")},yV=cV,gV=tr,bV=oc,wV=vV;Object.setPrototypeOf||"__proto__"in{}&&function(){var e=!1,t={},n;try{n=yV(Object.prototype,"__proto__","set"),n(t,[]),e=t instanceof Array}catch{}return function(i,a){return bV(i),wV(a),gV(i)&&(e?n(i,a):i.__proto__=a),i}}();var xV=yt,SV=Sr,q_=LW,EV=sV,_V=L_,kV=Wa,W_=Ec,TV=Xt,V_=Ga,H_=z_,CV=q_.PROPER;q_.CONFIGURABLE,H_.IteratorPrototype;var Ac=H_.BUGGY_SAFARI_ITERATORS,km=TV("iterator"),Z_="keys",Pc="values",K_="entries",OV=function(){return this},G_=function(e,t,n,r,i,a,o){EV(n,t,r);var s=function(v){if(v===i&&d)return d;if(!Ac&&v&&v in c)return c[v];switch(v){case Z_:return function(){return new n(this,v)};case Pc:return function(){return new n(this,v)};case K_:return function(){return new n(this,v)}}return function(){return new n(this)}},u=t+" Iterator",l=!1,c=e.prototype,f=c[km]||c["@@iterator"]||i&&c[i],d=!Ac&&f||s(i),p=t==="Array"&&c.entries||f,m,h,y;if(p&&(m=_V(p.call(new e)),m!==Object.prototype&&m.next&&(kV(m,u,!0,!0),V_[u]=OV)),CV&&i===Pc&&f&&f.name!==Pc&&(l=!0,d=function(){return SV(f,this)}),i)if(h={values:s(Pc),keys:a?d:s(Z_),entries:s(K_)},o)for(y in h)(Ac||l||!(y in c))&&W_(c,y,h[y]);else xV({target:t,proto:!0,forced:Ac||l},h);return o&&c[km]!==d&&W_(c,km,d,{name:i}),V_[t]=d,h},Y_=function(e,t){return{value:e,done:t}},$V=Er,J_=Ga,X_=om;rr.f;var IV=G_,Dc=Y_,Q_="Array Iterator",RV=X_.set,AV=X_.getterFor(Q_);IV(Array,"Array",function(e,t){RV(this,{type:Q_,target:$V(e),index:0,kind:t})},function(){var e=AV(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,Dc(void 0,!0);switch(e.kind){case"keys":return Dc(n,!1);case"values":return Dc(t[n],!1)}return Dc([n,t[n]],!1)},"values"),J_.Arguments=J_.Array;var PV={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},DV=PV,jV=Vt,NV=Wa,ek=Ga;for(var Tm in DV)NV(jV[Tm],Tm),ek[Tm]=ek.Array;var MV=DW,FV=MV,LV=Xt,BV=rr.f,tk=LV("metadata"),nk=Function.prototype;nk[tk]===void 0&&BV(nk,tk,{value:null});var UV=$t;UV("asyncDispose");var zV=$t;zV("dispose");var qV=$t;qV("metadata");var WV=FV,VV=WV,HV=_r,ZV=Bt,Cm=HV("Symbol"),KV=Cm.keyFor,GV=ZV(Cm.prototype.valueOf),rk=Cm.isRegisteredSymbol||function(t){try{return KV(GV(t))!==void 0}catch{return!1}},YV=yt,JV=rk;YV({target:"Symbol",stat:!0},{isRegisteredSymbol:JV});for(var XV=La,ik=_r,QV=Bt,e8=Ss,t8=Xt,jc=ik("Symbol"),ak=jc.isWellKnownSymbol,ok=ik("Object","getOwnPropertyNames"),n8=QV(jc.prototype.valueOf),sk=XV("wks"),Om=0,lk=ok(jc),r8=lk.length;Om<r8;Om++)try{var uk=lk[Om];e8(jc[uk])&&t8(uk)}catch{}var ck=function(t){if(ak&&ak(t))return!0;try{for(var n=n8(t),r=0,i=ok(sk),a=i.length;r<a;r++)if(sk[i[r]]==n)return!0}catch{}return!1},i8=yt,a8=ck;i8({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:a8});var o8=$t;o8("customMatcher");var s8=$t;s8("observable");var l8=yt,u8=rk;l8({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:u8});var c8=yt,f8=ck;c8({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:f8});var d8=$t;d8("matcher");var p8=$t;p8("metadataKey");var h8=$t;h8("patternMatch");var m8=$t;m8("replaceAll");var v8=VV,y8=v8,g8=y8;const Ya=Ge(g8);var $m=Bt,b8=dc,w8=Os,x8=oc,S8=$m("".charAt),fk=$m("".charCodeAt),E8=$m("".slice),dk=function(e){return function(t,n){var r=w8(x8(t)),i=b8(n),a=r.length,o,s;return i<0||i>=a?e?"":void 0:(o=fk(r,i),o<55296||o>56319||i+1===a||(s=fk(r,i+1))<56320||s>57343?e?S8(r,i):o:e?E8(r,i,i+2):(o-55296<<10)+(s-56320)+65536)}},_8={codeAt:dk(!1),charAt:dk(!0)},k8=_8.charAt,T8=Os,pk=om,C8=G_,hk=Y_,mk="String Iterator",O8=pk.set,$8=pk.getterFor(mk);C8(String,"String",function(e){O8(this,{type:mk,string:T8(e),index:0})},function(){var t=$8(this),n=t.string,r=t.index,i;return r>=n.length?hk(void 0,!0):(i=k8(n,r),t.index+=i.length,hk(i,!1))});var I8=Ts,vk=$h,R8=Eh,A8=Ga,P8=Xt,D8=P8("iterator"),Im=function(e){if(!R8(e))return vk(e,D8)||vk(e,"@@iterator")||A8[I8(e)]},j8=Im,N8=j8,M8=N8,F8=M8,L8=F8,B8=L8,U8=B8,z8=U8,q8=z8;const yk=Ge(q8);var W8=En,V8=qa,H8=TypeError,Z8=Object.getOwnPropertyDescriptor,K8=W8&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),gk=K8?function(e,t){if(V8(e)&&!Z8(e,"length").writable)throw new H8("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},G8=yt,Y8=Zr,J8=Zi,X8=gk,Q8=qh,eH=Ht,tH=eH(function(){return[].push.call({length:4294967296},1)!==4294967297}),nH=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},rH=tH||!nH();G8({target:"Array",proto:!0,arity:1,forced:rH},{push:function(t){var n=Y8(this),r=J8(n),i=arguments.length;Q8(r+i);for(var a=0;a<i;a++)n[r]=arguments[a],r++;return X8(n,r),r}});var iH=Vt,aH=rn,Yi=function(e,t){var n=aH[e+"Prototype"],r=n&&n[t];if(r)return r;var i=iH[e],a=i&&i.prototype;return a&&a[t]},oH=Yi,sH=oH("Array","push"),lH=Hr,uH=sH,Rm=Array.prototype,cH=function(e){var t=e.push;return e===Rm||lH(Rm,e)&&t===Rm.push?uH:t},fH=cH,dH=fH,pH=dH,hH=pH,mH=hH,vH=mH,yH=vH;const gH=Ge(yH);function bH(e,t){var n=e==null?null:typeof Ya<"u"&&yk(e)||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(gH(s).call(s,r.value),s.length!==t);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}var wH=yt,bk=qa,xH=Zh,SH=tr,wk=Gh,EH=Zi,_H=Er,kH=ks,TH=Xt,CH=hc,OH=xc,$H=CH("slice"),IH=TH("species"),Am=Array,RH=Math.max;wH({target:"Array",proto:!0,forced:!$H},{slice:function(t,n){var r=_H(this),i=EH(r),a=wk(t,i),o=wk(n===void 0?i:n,i),s,u,l;if(bk(r)&&(s=r.constructor,xH(s)&&(s===Am||bk(s.prototype))?s=void 0:SH(s)&&(s=s[IH],s===null&&(s=void 0)),s===Am||s===void 0))return OH(r,a,o);for(u=new(s===void 0?Am:s)(RH(o-a,0)),l=0;a<o;a++,l++)a in r&&kH(u,l,r[a]);return u.length=l,u}});var AH=Yi,PH=AH("Array","slice"),DH=Hr,jH=PH,Pm=Array.prototype,NH=function(e){var t=e.slice;return e===Pm||DH(Pm,e)&&t===Pm.slice?jH:t},MH=NH,FH=MH,LH=FH,BH=LH,UH=BH,zH=UH,qH=zH;const WH=Ge(qH);var VH=Sr,xk=bi,HH=$h,ZH=function(e,t,n){var r,i;xk(e);try{if(r=HH(e,"return"),!r){if(t==="throw")throw n;return n}r=VH(r,e)}catch(a){i=!0,r=a}if(t==="throw")throw n;if(i)throw r;return xk(r),n},KH=bi,GH=ZH,YH=function(e,t,n,r){try{return r?t(KH(n)[0],n[1]):t(n)}catch(i){GH(e,"throw",i)}},JH=Xt,XH=Ga,QH=JH("iterator"),eZ=Array.prototype,tZ=function(e){return e!==void 0&&(XH.Array===e||eZ[QH]===e)},nZ=Sr,rZ=uc,iZ=bi,aZ=lc,oZ=Im,sZ=TypeError,lZ=function(e,t){var n=arguments.length<2?oZ(e):t;if(rZ(n))return iZ(nZ(n,e));throw new sZ(aZ(e)+" is not iterable")},uZ=Fh,cZ=Sr,fZ=Zr,dZ=YH,pZ=tZ,hZ=Zh,mZ=Zi,Sk=ks,vZ=lZ,yZ=Im,Ek=Array,gZ=function(t){var n=fZ(t),r=hZ(this),i=arguments.length,a=i>1?arguments[1]:void 0,o=a!==void 0;o&&(a=uZ(a,i>2?arguments[2]:void 0));var s=yZ(n),u=0,l,c,f,d,p,m;if(s&&!(this===Ek&&pZ(s)))for(c=r?new this:[],d=vZ(n,s),p=d.next;!(f=cZ(p,d)).done;u++)m=o?dZ(d,a,[f.value,u],!0):f.value,Sk(c,u,m);else for(l=mZ(n),c=r?new this(l):Ek(l);l>u;u++)m=o?a(n[u],u):n[u],Sk(c,u,m);return c.length=u,c},bZ=Xt,_k=bZ("iterator"),kk=!1;try{var wZ=0,Tk={next:function(){return{done:!!wZ++}},return:function(){kk=!0}};Tk[_k]=function(){return this},Array.from(Tk,function(){throw 2})}catch{}var xZ=function(e,t){try{if(!t&&!kk)return!1}catch{return!1}var n=!1;try{var r={};r[_k]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},SZ=yt,EZ=gZ,_Z=xZ,kZ=!_Z(function(e){Array.from(e)});SZ({target:"Array",stat:!0,forced:kZ},{from:EZ});var TZ=rn,CZ=TZ.Array.from,OZ=CZ,$Z=OZ,IZ=$Z,RZ=IZ,AZ=RZ,PZ=AZ,DZ=PZ;const Ck=Ge(DZ);function Dm(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ok(e,t){if(e){var n;if(typeof e=="string")return Dm(e,t);var r=WH(n={}.toString.call(e)).call(n,8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Ck(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Dm(e,t):void 0}}function jZ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
165
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tr(e,t){return V6(e)||bH(e,t)||Ok(e,t)||jZ()}var $k={exports:{}};/*!
166
166
  Copyright (c) 2018 Jed Watson.
167
167
  Licensed under the MIT License (MIT), see
168
168
  http://jedwatson.github.io/classnames
169
- */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var a=arguments[i];if(a){var o=typeof a;if(o==="string"||o==="number")r.push(a);else if(Array.isArray(a)){if(a.length){var s=n.apply(null,a);s&&r.push(s)}}else if(o==="object")if(a.toString===Object.prototype.toString)for(var u in a)t.call(a,u)&&a[u]&&r.push(u);else r.push(a.toString())}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Z_);var UH=Z_.exports;const um=Ge(UH);var cm={exports:{}},fm,K_;function dm(){if(K_)return fm;K_=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return fm=e,fm}var pm,G_;function zH(){if(G_)return pm;G_=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=dm(),n={},r=Function.call.bind(Object.prototype.hasOwnProperty);e=function(a){var o="Warning: "+a;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function i(a,o,s,u,l){if(process.env.NODE_ENV!=="production"){for(var c in a)if(r(a,c)){var f;try{if(typeof a[c]!="function"){var p=Error((u||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[c]+"`.");throw p.name="Invariant Violation",p}f=a[c](o,c,u,s,null,t)}catch(m){f=m}if(f&&!(f instanceof Error)&&e((u||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var d=l?l():"";e("Failed "+s+" type: "+f.message+(d??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},pm=i,pm}var hm,Y_;function qH(){if(Y_)return hm;Y_=1;var e=xu(),t=Ax(),n=dm(),r=zH(),i=Function.call.bind(Object.prototype.hasOwnProperty),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var u="Warning: "+s;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function o(){return null}return hm=function(s,u){var l=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function f(I){var g=I&&(l&&I[l]||I[c]);if(typeof g=="function")return g}var p="<<anonymous>>",d={array:v("array"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:b(),arrayOf:w,element:k(),elementType:E(),instanceOf:_,node:T(),objectOf:z,oneOf:C,oneOfType:B,shape:A,exact:W};function m(I,g){return I===g?I!==0||1/I===1/g:I!==I&&g!==g}function h(I){this.message=I,this.stack=""}h.prototype=Error.prototype;function y(I){if(process.env.NODE_ENV!=="production")var g={},P=0;function V(Z,J,G,X,ae,se,Q){if(X=X||p,se=se||G,Q!==n){if(u){var ee=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw ee.name="Invariant Violation",ee}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var K=X+":"+G;!g[K]&&P<3&&(a("You are manually calling a React.PropTypes validation function for the `"+se+"` prop on `"+X+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),g[K]=!0,P++)}}return J[G]==null?Z?J[G]===null?new h("The "+ae+" `"+se+"` is marked as required "+("in `"+X+"`, but its value is `null`.")):new h("The "+ae+" `"+se+"` is marked as required in "+("`"+X+"`, but its value is `undefined`.")):null:I(J,G,X,ae,se)}var S=V.bind(null,!1);return S.isRequired=V.bind(null,!0),S}function v(I){function g(P,V,S,Z,J,G){var X=P[V],ae=N(X);if(ae!==I){var se=q(X);return new h("Invalid "+Z+" `"+J+"` of type "+("`"+se+"` supplied to `"+S+"`, expected ")+("`"+I+"`."))}return null}return y(g)}function b(){return y(o)}function w(I){function g(P,V,S,Z,J){if(typeof I!="function")return new h("Property `"+J+"` of component `"+S+"` has invalid PropType notation inside arrayOf.");var G=P[V];if(!Array.isArray(G)){var X=N(G);return new h("Invalid "+Z+" `"+J+"` of type "+("`"+X+"` supplied to `"+S+"`, expected an array."))}for(var ae=0;ae<G.length;ae++){var se=I(G,ae,S,Z,J+"["+ae+"]",n);if(se instanceof Error)return se}return null}return y(g)}function k(){function I(g,P,V,S,Z){var J=g[P];if(!s(J)){var G=N(J);return new h("Invalid "+S+" `"+Z+"` of type "+("`"+G+"` supplied to `"+V+"`, expected a single ReactElement."))}return null}return y(I)}function E(){function I(g,P,V,S,Z){var J=g[P];if(!e.isValidElementType(J)){var G=N(J);return new h("Invalid "+S+" `"+Z+"` of type "+("`"+G+"` supplied to `"+V+"`, expected a single ReactElement type."))}return null}return y(I)}function _(I){function g(P,V,S,Z,J){if(!(P[V]instanceof I)){var G=I.name||p,X=H(P[V]);return new h("Invalid "+Z+" `"+J+"` of type "+("`"+X+"` supplied to `"+S+"`, expected ")+("instance of `"+G+"`."))}return null}return y(g)}function C(I){if(!Array.isArray(I))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),o;function g(P,V,S,Z,J){for(var G=P[V],X=0;X<I.length;X++)if(m(G,I[X]))return null;var ae=JSON.stringify(I,function(Q,ee){var K=q(ee);return K==="symbol"?String(ee):ee});return new h("Invalid "+Z+" `"+J+"` of value `"+String(G)+"` "+("supplied to `"+S+"`, expected one of "+ae+"."))}return y(g)}function z(I){function g(P,V,S,Z,J){if(typeof I!="function")return new h("Property `"+J+"` of component `"+S+"` has invalid PropType notation inside objectOf.");var G=P[V],X=N(G);if(X!=="object")return new h("Invalid "+Z+" `"+J+"` of type "+("`"+X+"` supplied to `"+S+"`, expected an object."));for(var ae in G)if(i(G,ae)){var se=I(G,ae,S,Z,J+"."+ae,n);if(se instanceof Error)return se}return null}return y(g)}function B(I){if(!Array.isArray(I))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var g=0;g<I.length;g++){var P=I[g];if(typeof P!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Y(P)+" at index "+g+"."),o}function V(S,Z,J,G,X){for(var ae=0;ae<I.length;ae++){var se=I[ae];if(se(S,Z,J,G,X,n)==null)return null}return new h("Invalid "+G+" `"+X+"` supplied to "+("`"+J+"`."))}return y(V)}function T(){function I(g,P,V,S,Z){return F(g[P])?null:new h("Invalid "+S+" `"+Z+"` supplied to "+("`"+V+"`, expected a ReactNode."))}return y(I)}function A(I){function g(P,V,S,Z,J){var G=P[V],X=N(G);if(X!=="object")return new h("Invalid "+Z+" `"+J+"` of type `"+X+"` "+("supplied to `"+S+"`, expected `object`."));for(var ae in I){var se=I[ae];if(se){var Q=se(G,ae,S,Z,J+"."+ae,n);if(Q)return Q}}return null}return y(g)}function W(I){function g(P,V,S,Z,J){var G=P[V],X=N(G);if(X!=="object")return new h("Invalid "+Z+" `"+J+"` of type `"+X+"` "+("supplied to `"+S+"`, expected `object`."));var ae=t({},P[V],I);for(var se in ae){var Q=I[se];if(!Q)return new h("Invalid "+Z+" `"+J+"` key `"+se+"` supplied to `"+S+"`.\nBad object: "+JSON.stringify(P[V],null," ")+`
170
- Valid keys: `+JSON.stringify(Object.keys(I),null," "));var ee=Q(G,se,S,Z,J+"."+se,n);if(ee)return ee}return null}return y(g)}function F(I){switch(typeof I){case"number":case"string":case"undefined":return!0;case"boolean":return!I;case"object":if(Array.isArray(I))return I.every(F);if(I===null||s(I))return!0;var g=f(I);if(g){var P=g.call(I),V;if(g!==I.entries){for(;!(V=P.next()).done;)if(!F(V.value))return!1}else for(;!(V=P.next()).done;){var S=V.value;if(S&&!F(S[1]))return!1}}else return!1;return!0;default:return!1}}function L(I,g){return I==="symbol"?!0:g?g["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&g instanceof Symbol:!1}function N(I){var g=typeof I;return Array.isArray(I)?"array":I instanceof RegExp?"object":L(g,I)?"symbol":g}function q(I){if(typeof I>"u"||I===null)return""+I;var g=N(I);if(g==="object"){if(I instanceof Date)return"date";if(I instanceof RegExp)return"regexp"}return g}function Y(I){var g=q(I);switch(g){case"array":case"object":return"an "+g;case"boolean":case"date":case"regexp":return"a "+g;default:return g}}function H(I){return!I.constructor||!I.constructor.name?p:I.constructor.name}return d.checkPropTypes=r,d.resetWarningCache=r.resetWarningCache,d.PropTypes=d,d},hm}var mm,J_;function WH(){if(J_)return mm;J_=1;var e=dm();function t(){}function n(){}return n.resetWarningCache=t,mm=function(){function r(o,s,u,l,c,f){if(f!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function i(){return r}var a={array:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},mm}if(process.env.NODE_ENV!=="production"){var VH=xu(),HH=!0;cm.exports=qH()(VH.isElement,HH)}else cm.exports=WH()();var ZH=cm.exports;const it=Ge(ZH);var vm=j.createContext({scrollTo:function(){return 0},scrollToBottom:function(){return 0},scrollToEnd:function(){return 0},scrollToStart:function(){return 0},scrollToTop:function(){return 0}});vm.displayName="ScrollToBottomFunctionContext";function KH(){return j.useContext(vm)}function GH(){var e=KH(),t=e.scrollToEnd;return t}var ym=j.createContext({atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom"});ym.displayName="ScrollToBottomState1Context";var gm=j.createContext({animating:!1,animatingToEnd:!1,sticky:!0});gm.displayName="ScrollToBottomState2Context";var bm=j.createContext({animating:!1,animatingToEnd:!1,atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom",sticky:!0});bm.displayName="ScrollToBottomStateContext";var X_=[bm,ym,gm];function YH(e){return j.useContext(X_[e]||X_[0])}function JH(){var e=YH(2),t=e.sticky;return[t]}var vc=j.createContext({offsetHeight:0,scrollHeight:0,setTarget:function(){return 0},styleToClassName:function(){return""}});vc.displayName="ScrollToBottomInternalContext";function XH(){return j.useContext(vc)}function wm(){var e=XH(),t=e.styleToClassName;return t}var QH={backgroundColor:"rgba(0, 0, 0, .2)",borderRadius:10,borderWidth:0,bottom:5,cursor:"pointer",height:20,outline:0,position:"absolute",right:20,width:20,"&:hover":{backgroundColor:"rgba(0, 0, 0, .4)"},"&:active":{backgroundColor:"rgba(0, 0, 0, .6)"}},xm=function(t){var n=t.children,r=t.className,i=JH(),a=gr(i,1),o=a[0],s=wm()(QH),u=GH();return!o&&j.createElement("button",{className:um(s,(r||"")+""),onClick:u,type:"button"},n)};xm.defaultProps={children:void 0,className:""},xm.propTypes={children:it.any,className:it.string};var Q_={exports:{}},eZ=vt,tZ=gn,ek=Jn.f;eZ({target:"Object",stat:!0,forced:Object.defineProperty!==ek,sham:!tZ},{defineProperty:ek});var nZ=Xt,tk=nZ.Object,rZ=Q_.exports=function(t,n,r){return tk.defineProperty(t,n,r)};tk.defineProperty.sham&&(rZ.sham=!0);var iZ=Q_.exports,aZ=iZ,nk=aZ,oZ=nk,sZ=oZ,lZ=sZ,uZ=lZ,cZ=uZ;const fZ=Ge(cZ);var dZ=hs,pZ=dZ.f("iterator"),hZ=pZ,mZ=hZ,vZ=mZ,yZ=vZ,gZ=yZ,bZ=gZ,wZ=bZ;const xZ=Ge(wZ);function xs(e){"@babel/helpers - typeof";return xs=typeof Fa=="function"&&typeof xZ=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Fa=="function"&&t.constructor===Fa&&t!==Fa.prototype?"symbol":typeof t},xs(e)}var SZ=hs,EZ=SZ.f("toPrimitive"),_Z=EZ,kZ=_Z,TZ=kZ,OZ=TZ,CZ=OZ,$Z=CZ,IZ=$Z;const RZ=Ge(IZ);function AZ(e,t){if(xs(e)!="object"||!e)return e;var n=e[RZ];if(n!==void 0){var r=n.call(e,t||"default");if(xs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function PZ(e){var t=AZ(e,"string");return xs(t)=="symbol"?t:t+""}function DZ(e,t,n){return(t=PZ(t))in e?fZ(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jZ(e){if(US(e))return lm(e)}function NZ(e){if(typeof Fa<"u"&&j_(e)!=null||e["@@iterator"]!=null)return V_(e)}function MZ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
171
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tt(e){return jZ(e)||NZ(e)||H_(e)||MZ()}var yc=function(e){return e&&e.Math==Math&&e},On=yc(typeof globalThis=="object"&&globalThis)||yc(typeof window=="object"&&window)||yc(typeof self=="object"&&self)||yc(typeof mt=="object"&&mt)||function(){return this}()||Function("return this")(),Sm={},Qn=function(e){try{return!!e()}catch{return!0}},FZ=Qn,Bi=!FZ(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),rk={},ik={}.propertyIsEnumerable,ak=Object.getOwnPropertyDescriptor,LZ=ak&&!ik.call({1:2},1);rk.f=LZ?function(t){var n=ak(this,t);return!!n&&n.enumerable}:ik;var ok=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},BZ={}.toString,Em=function(e){return BZ.call(e).slice(8,-1)},UZ=Qn,zZ=Em,qZ="".split,WZ=UZ(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return zZ(e)=="String"?qZ.call(e,""):Object(e)}:Object,gc=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},VZ=WZ,HZ=gc,_m=function(e){return VZ(HZ(e))},Mn=function(e){return typeof e=="function"},ZZ=Mn,Ss=function(e){return typeof e=="object"?e!==null:ZZ(e)},km=On,KZ=Mn,GZ=function(e){return KZ(e)?e:void 0},bc=function(e,t){return arguments.length<2?GZ(km[e]):km[e]&&km[e][t]},YZ=bc,JZ=YZ("navigator","userAgent")||"",sk=On,Tm=JZ,lk=sk.process,uk=sk.Deno,ck=lk&&lk.versions||uk&&uk.version,fk=ck&&ck.v8,br,wc;fk?(br=fk.split("."),wc=br[0]<4?1:br[0]+br[1]):Tm&&(br=Tm.match(/Edge\/(\d+)/),(!br||br[1]>=74)&&(br=Tm.match(/Chrome\/(\d+)/),br&&(wc=br[1])));var XZ=wc&&+wc,dk=XZ,QZ=Qn,pk=!!Object.getOwnPropertySymbols&&!QZ(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&dk&&dk<41}),eK=pk,hk=eK&&!Symbol.sham&&typeof Symbol.iterator=="symbol",tK=Mn,nK=bc,rK=hk,mk=rK?function(e){return typeof e=="symbol"}:function(e){var t=nK("Symbol");return tK(t)&&Object(e)instanceof t},iK=function(e){try{return String(e)}catch{return"Object"}},aK=Mn,oK=iK,sK=function(e){if(aK(e))return e;throw TypeError(oK(e)+" is not a function")},lK=sK,vk=function(e,t){var n=e[t];return n==null?void 0:lK(n)},Om=Mn,Cm=Ss,uK=function(e,t){var n,r;if(t==="string"&&Om(n=e.toString)&&!Cm(r=n.call(e))||Om(n=e.valueOf)&&!Cm(r=n.call(e))||t!=="string"&&Om(n=e.toString)&&!Cm(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},yk={exports:{}},gk=On,$m=function(e,t){try{Object.defineProperty(gk,e,{value:t,configurable:!0,writable:!0})}catch{gk[e]=t}return t},cK=On,fK=$m,bk="__core-js_shared__",dK=cK[bk]||fK(bk,{}),Im=dK,wk=Im;(yk.exports=function(e,t){return wk[e]||(wk[e]=t!==void 0?t:{})})("versions",[]).push({version:"3.18.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var Rm=yk.exports,pK=gc,xk=function(e){return Object(pK(e))},hK=xk,mK={}.hasOwnProperty,Ui=Object.hasOwn||function(t,n){return mK.call(hK(t),n)},vK=0,yK=Math.random(),Sk=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++vK+yK).toString(36)},gK=On,bK=Rm,Ek=Ui,wK=Sk,_k=pk,xK=hk,Es=bK("wks"),_s=gK.Symbol,SK=xK?_s:_s&&_s.withoutSetter||wK,ks=function(e){return(!Ek(Es,e)||!(_k||typeof Es[e]=="string"))&&(_k&&Ek(_s,e)?Es[e]=_s[e]:Es[e]=SK("Symbol."+e)),Es[e]},kk=Ss,Tk=mk,EK=vk,_K=uK,kK=ks,TK=kK("toPrimitive"),OK=function(e,t){if(!kk(e)||Tk(e))return e;var n=EK(e,TK),r;if(n){if(t===void 0&&(t="default"),r=n.call(e,t),!kk(r)||Tk(r))return r;throw TypeError("Can't convert object to primitive value")}return t===void 0&&(t="number"),_K(e,t)},CK=OK,$K=mk,Ok=function(e){var t=CK(e,"string");return $K(t)?t:String(t)},IK=On,Ck=Ss,Am=IK.document,RK=Ck(Am)&&Ck(Am.createElement),$k=function(e){return RK?Am.createElement(e):{}},AK=Bi,PK=Qn,DK=$k,Ik=!AK&&!PK(function(){return Object.defineProperty(DK("div"),"a",{get:function(){return 7}}).a!=7}),jK=Bi,NK=rk,MK=ok,FK=_m,LK=Ok,BK=Ui,UK=Ik,Rk=Object.getOwnPropertyDescriptor;Sm.f=jK?Rk:function(t,n){if(t=FK(t),n=LK(n),UK)try{return Rk(t,n)}catch{}if(BK(t,n))return MK(!NK.f.call(t,n),t[n])};var Ts={},zK=Ss,di=function(e){if(zK(e))return e;throw TypeError(String(e)+" is not an object")},qK=Bi,WK=Ik,Ak=di,VK=Ok,Pk=Object.defineProperty;Ts.f=qK?Pk:function(t,n,r){if(Ak(t),n=VK(n),Ak(r),WK)try{return Pk(t,n,r)}catch{}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var HK=Bi,ZK=Ts,KK=ok,xc=HK?function(e,t,n){return ZK.f(e,t,KK(1,n))}:function(e,t,n){return e[t]=n,e},Dk={exports:{}},GK=Mn,Pm=Im,YK=Function.toString;GK(Pm.inspectSource)||(Pm.inspectSource=function(e){return YK.call(e)});var jk=Pm.inspectSource,JK=On,XK=Mn,QK=jk,Nk=JK.WeakMap,eG=XK(Nk)&&/native code/.test(QK(Nk)),tG=Rm,nG=Sk,Mk=tG("keys"),Fk=function(e){return Mk[e]||(Mk[e]=nG(e))},Dm={},rG=eG,iG=On,aG=Ss,oG=xc,jm=Ui,Nm=Im,sG=Fk,lG=Dm,Lk="Object already initialized",uG=iG.WeakMap,Sc,Os,Ec,cG=function(e){return Ec(e)?Os(e):Sc(e,{})},fG=function(e){return function(t){var n;if(!aG(t)||(n=Os(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}};if(rG||Nm.state){var zi=Nm.state||(Nm.state=new uG),dG=zi.get,Bk=zi.has,pG=zi.set;Sc=function(e,t){if(Bk.call(zi,e))throw new TypeError(Lk);return t.facade=e,pG.call(zi,e,t),t},Os=function(e){return dG.call(zi,e)||{}},Ec=function(e){return Bk.call(zi,e)}}else{var La=sG("state");lG[La]=!0,Sc=function(e,t){if(jm(e,La))throw new TypeError(Lk);return t.facade=e,oG(e,La,t),t},Os=function(e){return jm(e,La)?e[La]:{}},Ec=function(e){return jm(e,La)}}var Uk={set:Sc,get:Os,has:Ec,enforce:cG,getterFor:fG},Mm=Bi,hG=Ui,zk=Function.prototype,mG=Mm&&Object.getOwnPropertyDescriptor,Fm=hG(zk,"name"),vG=Fm&&(function(){}).name==="something",yG=Fm&&(!Mm||Mm&&mG(zk,"name").configurable),Lm={EXISTS:Fm,PROPER:vG,CONFIGURABLE:yG},gG=On,qk=Mn,bG=Ui,Wk=xc,wG=$m,xG=jk,Vk=Uk,SG=Lm.CONFIGURABLE,EG=Vk.get,_G=Vk.enforce,kG=String(String).split("String");(Dk.exports=function(e,t,n,r){var i=r?!!r.unsafe:!1,a=r?!!r.enumerable:!1,o=r?!!r.noTargetGet:!1,s=r&&r.name!==void 0?r.name:t,u;if(qk(n)&&(String(s).slice(0,7)==="Symbol("&&(s="["+String(s).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!bG(n,"name")||SG&&n.name!==s)&&Wk(n,"name",s),u=_G(n),u.source||(u.source=kG.join(typeof s=="string"?s:""))),e===gG){a?e[t]=n:wG(t,n);return}else i?!o&&e[t]&&(a=!0):delete e[t];a?e[t]=n:Wk(e,t,n)})(Function.prototype,"toString",function(){return qk(this)&&EG(this).source||xG(this)});var Cs=Dk.exports,Hk={},TG=Math.ceil,OG=Math.floor,_c=function(e){var t=+e;return t!==t||t===0?0:(t>0?OG:TG)(t)},CG=_c,$G=Math.max,IG=Math.min,RG=function(e,t){var n=CG(e);return n<0?$G(n+t,0):IG(n,t)},AG=_c,PG=Math.min,Zk=function(e){return e>0?PG(AG(e),9007199254740991):0},DG=Zk,jG=function(e){return DG(e.length)},NG=_m,MG=RG,FG=jG,Kk=function(e){return function(t,n,r){var i=NG(t),a=FG(i),o=MG(r,a),s;if(e&&n!=n){for(;a>o;)if(s=i[o++],s!=s)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},LG={includes:Kk(!0),indexOf:Kk(!1)},Bm=Ui,BG=_m,UG=LG.indexOf,zG=Dm,Gk=function(e,t){var n=BG(e),r=0,i=[],a;for(a in n)!Bm(zG,a)&&Bm(n,a)&&i.push(a);for(;t.length>r;)Bm(n,a=t[r++])&&(~UG(i,a)||i.push(a));return i},Um=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],qG=Gk,WG=Um,VG=WG.concat("length","prototype");Hk.f=Object.getOwnPropertyNames||function(t){return qG(t,VG)};var Yk={};Yk.f=Object.getOwnPropertySymbols;var HG=bc,ZG=Hk,KG=Yk,GG=di,YG=HG("Reflect","ownKeys")||function(t){var n=ZG.f(GG(t)),r=KG.f;return r?n.concat(r(t)):n},JG=Ui,XG=YG,QG=Sm,eY=Ts,tY=function(e,t){for(var n=XG(t),r=eY.f,i=QG.f,a=0;a<n.length;a++){var o=n[a];JG(e,o)||r(e,o,i(t,o))}},nY=Qn,rY=Mn,iY=/#|\.prototype\./,$s=function(e,t){var n=oY[aY(e)];return n==lY?!0:n==sY?!1:rY(t)?nY(t):!!t},aY=$s.normalize=function(e){return String(e).replace(iY,".").toLowerCase()},oY=$s.data={},sY=$s.NATIVE="N",lY=$s.POLYFILL="P",uY=$s,zm=On,cY=Sm.f,fY=xc,dY=Cs,pY=$m,hY=tY,mY=uY,vY=function(e,t){var n=e.target,r=e.global,i=e.stat,a,o,s,u,l,c;if(r?o=zm:i?o=zm[n]||pY(n,{}):o=(zm[n]||{}).prototype,o)for(s in t){if(l=t[s],e.noTargetGet?(c=cY(o,s),u=c&&c.value):u=o[s],a=mY(r?s:n+(i?".":"#")+s,e.forced),!a&&u!==void 0){if(typeof l==typeof u)continue;hY(l,u)}(e.sham||u&&u.sham)&&fY(l,"sham",!0),dY(o,s,l,e)}},yY=ks,gY=yY("toStringTag"),Jk={};Jk[gY]="z";var qm=String(Jk)==="[object z]",bY=qm,wY=Mn,kc=Em,xY=ks,SY=xY("toStringTag"),EY=kc(function(){return arguments}())=="Arguments",_Y=function(e,t){try{return e[t]}catch{}},Xk=bY?kc:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=_Y(t=Object(e),SY))=="string"?n:EY?kc(t):(r=kc(t))=="Object"&&wY(t.callee)?"Arguments":r},kY=Xk,Tc=function(e){if(kY(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return String(e)},TY=di,Qk=function(){var e=TY(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},Wm={},eT=Qn,OY=On,tT=OY.RegExp;Wm.UNSUPPORTED_Y=eT(function(){var e=tT("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),Wm.BROKEN_CARET=eT(function(){var e=tT("^r","gy");return e.lastIndex=2,e.exec("str")!=null});var CY=Gk,$Y=Um,IY=Object.keys||function(t){return CY(t,$Y)},RY=Bi,AY=Ts,PY=di,DY=IY,jY=RY?Object.defineProperties:function(t,n){PY(t);for(var r=DY(n),i=r.length,a=0,o;i>a;)AY.f(t,o=r[a++],n[o]);return t},NY=bc,MY=NY("document","documentElement"),FY=di,LY=jY,nT=Um,BY=Dm,UY=MY,zY=$k,qY=Fk,rT=">",iT="<",Vm="prototype",Hm="script",aT=qY("IE_PROTO"),Zm=function(){},oT=function(e){return iT+Hm+rT+e+iT+"/"+Hm+rT},sT=function(e){e.write(oT("")),e.close();var t=e.parentWindow.Object;return e=null,t},WY=function(){var e=zY("iframe"),t="java"+Hm+":",n;return e.style.display="none",UY.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(oT("document.F=Object")),n.close(),n.F},Oc,Cc=function(){try{Oc=new ActiveXObject("htmlfile")}catch{}Cc=typeof document<"u"?document.domain&&Oc?sT(Oc):WY():sT(Oc);for(var e=nT.length;e--;)delete Cc[Vm][nT[e]];return Cc()};BY[aT]=!0;var VY=Object.create||function(t,n){var r;return t!==null?(Zm[Vm]=FY(t),r=new Zm,Zm[Vm]=null,r[aT]=t):r=Cc(),n===void 0?r:LY(r,n)},HY=Qn,ZY=On,KY=ZY.RegExp,GY=HY(function(){var e=KY(".","s");return!(e.dotAll&&e.exec(`
172
- `)&&e.flags==="s")}),YY=Qn,JY=On,XY=JY.RegExp,QY=YY(function(){var e=XY("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),eJ=Tc,tJ=Qk,lT=Wm,nJ=Rm,rJ=VY,iJ=Uk.get,aJ=GY,oJ=QY,$c=RegExp.prototype.exec,sJ=nJ("native-string-replace",String.prototype.replace),Km=$c,Gm=function(){var e=/a/,t=/b*/g;return $c.call(e,"a"),$c.call(t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),uT=lT.UNSUPPORTED_Y||lT.BROKEN_CARET,Ym=/()??/.exec("")[1]!==void 0,lJ=Gm||Ym||uT||aJ||oJ;lJ&&(Km=function(t){var n=this,r=iJ(n),i=eJ(t),a=r.raw,o,s,u,l,c,f,p;if(a)return a.lastIndex=n.lastIndex,o=Km.call(a,i),n.lastIndex=a.lastIndex,o;var d=r.groups,m=uT&&n.sticky,h=tJ.call(n),y=n.source,v=0,b=i;if(m&&(h=h.replace("y",""),h.indexOf("g")===-1&&(h+="g"),b=i.slice(n.lastIndex),n.lastIndex>0&&(!n.multiline||n.multiline&&i.charAt(n.lastIndex-1)!==`
173
- `)&&(y="(?: "+y+")",b=" "+b,v++),s=new RegExp("^(?:"+y+")",h)),Ym&&(s=new RegExp("^"+y+"$(?!\\s)",h)),Gm&&(u=n.lastIndex),l=$c.call(m?s:n,b),m?l?(l.input=l.input.slice(v),l[0]=l[0].slice(v),l.index=n.lastIndex,n.lastIndex+=l[0].length):n.lastIndex=0:Gm&&l&&(n.lastIndex=n.global?l.index+l[0].length:u),Ym&&l&&l.length>1&&sJ.call(l[0],s,function(){for(c=1;c<arguments.length-2;c++)arguments[c]===void 0&&(l[c]=void 0)}),l&&d)for(l.groups=f=rJ(null),c=0;c<d.length;c++)p=d[c],f[p[0]]=l[p[1]];return l});var Jm=Km,uJ=vY,cT=Jm;uJ({target:"RegExp",proto:!0,forced:/./.exec!==cT},{exec:cT});var fT=Cs,cJ=Jm,dT=Qn,pT=ks,fJ=xc,dJ=pT("species"),Xm=RegExp.prototype,pJ=function(e,t,n,r){var i=pT(e),a=!dT(function(){var l={};return l[i]=function(){return 7},""[e](l)!=7}),o=a&&!dT(function(){var l=!1,c=/a/;return e==="split"&&(c={},c.constructor={},c.constructor[dJ]=function(){return c},c.flags="",c[i]=/./[i]),c.exec=function(){return l=!0,null},c[i](""),!l});if(!a||!o||n){var s=/./[i],u=t(i,""[e],function(l,c,f,p,d){var m=c.exec;return m===cJ||m===Xm.exec?a&&!d?{done:!0,value:s.call(c,f,p)}:{done:!0,value:l.call(f,c,p)}:{done:!1}});fT(String.prototype,e,u[0]),fT(Xm,i,u[1])}r&&fJ(Xm[i],"sham",!0)},hJ=_c,mJ=Tc,vJ=gc,hT=function(e){return function(t,n){var r=mJ(vJ(t)),i=hJ(n),a=r.length,o,s;return i<0||i>=a?e?"":void 0:(o=r.charCodeAt(i),o<55296||o>56319||i+1===a||(s=r.charCodeAt(i+1))<56320||s>57343?e?r.charAt(i):o:e?r.slice(i,i+2):(o-55296<<10)+(s-56320)+65536)}},yJ={codeAt:hT(!1),charAt:hT(!0)},gJ=yJ.charAt,bJ=function(e,t,n){return t+(n?gJ(e,t).length:1)},wJ=xk,xJ=Math.floor,SJ="".replace,EJ=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,_J=/\$([$&'`]|\d{1,2})/g,kJ=function(e,t,n,r,i,a){var o=n+e.length,s=r.length,u=_J;return i!==void 0&&(i=wJ(i),u=EJ),SJ.call(a,u,function(l,c){var f;switch(c.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(o);case"<":f=i[c.slice(1,-1)];break;default:var p=+c;if(p===0)return l;if(p>s){var d=xJ(p/10);return d===0?l:d<=s?r[d-1]===void 0?c.charAt(1):r[d-1]+c.charAt(1):l}f=r[p-1]}return f===void 0?"":f})},TJ=di,OJ=Mn,CJ=Em,$J=Jm,IJ=function(e,t){var n=e.exec;if(OJ(n)){var r=n.call(e,t);return r!==null&&TJ(r),r}if(CJ(e)==="RegExp")return $J.call(e,t);throw TypeError("RegExp#exec called on incompatible receiver")},RJ=pJ,AJ=Qn,PJ=di,DJ=Mn,jJ=_c,NJ=Zk,Ba=Tc,MJ=gc,FJ=bJ,LJ=vk,BJ=kJ,UJ=IJ,zJ=ks,Qm=zJ("replace"),qJ=Math.max,WJ=Math.min,VJ=function(e){return e===void 0?e:String(e)},HJ=function(){return"a".replace(/./,"$0")==="$0"}(),mT=function(){return/./[Qm]?/./[Qm]("a","$0")==="":!1}(),ZJ=!AJ(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"});RJ("replace",function(e,t,n){var r=mT?"$":"$0";return[function(a,o){var s=MJ(this),u=a==null?void 0:LJ(a,Qm);return u?u.call(a,s,o):t.call(Ba(s),a,o)},function(i,a){var o=PJ(this),s=Ba(i);if(typeof a=="string"&&a.indexOf(r)===-1&&a.indexOf("$<")===-1){var u=n(t,o,s,a);if(u.done)return u.value}var l=DJ(a);l||(a=Ba(a));var c=o.global;if(c){var f=o.unicode;o.lastIndex=0}for(var p=[];;){var d=UJ(o,s);if(d===null||(p.push(d),!c))break;var m=Ba(d[0]);m===""&&(o.lastIndex=FJ(s,NJ(o.lastIndex),f))}for(var h="",y=0,v=0;v<p.length;v++){d=p[v];for(var b=Ba(d[0]),w=qJ(WJ(jJ(d.index),s.length),0),k=[],E=1;E<d.length;E++)k.push(VJ(d[E]));var _=d.groups;if(l){var C=[b].concat(k,w,s);_!==void 0&&C.push(_);var z=Ba(a.apply(void 0,C))}else z=BJ(b,s,w,k,_,a);w>=y&&(h+=s.slice(y,w)+z,y=w+b.length)}return h+s.slice(y)}]},!ZJ||!HJ||mT);var Is=Ut,KJ=eh,GJ=ji,Ic=function(e){return KJ.slice(0,e.length)===e},YJ=function(){return Ic("Bun/")?"BUN":Ic("Cloudflare-Workers")?"CLOUDFLARE":Ic("Deno/")?"DENO":Ic("Node.js/")?"NODE":Is.Bun&&typeof Bun.version=="string"?"BUN":Is.Deno&&typeof Deno.version=="object"?"DENO":GJ(Is.process)==="process"?"NODE":Is.window&&Is.document?"BROWSER":"REST"}(),JJ=TypeError,XJ=function(e,t){if(e<t)throw new JJ("Not enough arguments");return e},vT=Ut,QJ=Vp,eX=an,tX=YJ,nX=eh,rX=tc,iX=XJ,aX=vT.Function,oX=/MSIE .\./.test(nX)||tX==="BUN"&&function(){var e=vT.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}(),yT=function(e,t){var n=t?2:1;return oX?function(r,i){var a=iX(arguments.length,1)>n,o=eX(r)?r:aX(r),s=a?rX(arguments,n):[],u=a?function(){QJ(o,this,s)}:o;return t?e(u,i):e(u)}:e},sX=vt,gT=Ut,lX=yT,bT=lX(gT.setInterval,!0);sX({global:!0,bind:!0,forced:gT.setInterval!==bT},{setInterval:bT});var uX=vt,wT=Ut,cX=yT,xT=cX(wT.setTimeout,!0);uX({global:!0,bind:!0,forced:wT.setTimeout!==xT},{setTimeout:xT});var fX=Xt,dX=fX.setInterval,pX=dX;const hX=Ge(pX);var mX=zt,ST=function(e,t){var n=[][e];return!!n&&mX(function(){n.call(null,t||function(){return 1},1)})},vX=vt,yX=Zp,gX=QS.indexOf,bX=ST,ev=yX([].indexOf),ET=!!ev&&1/ev([1],1,-0)<0,wX=ET||!bX("indexOf");vX({target:"Array",proto:!0,forced:wX},{indexOf:function(t){var n=arguments.length>1?arguments[1]:void 0;return ET?ev(this,t,n)||0:gX(this,t,n)}});var xX=Li,SX=xX("Array","indexOf"),EX=Fr,_X=SX,tv=Array.prototype,kX=function(e){var t=e.indexOf;return e===tv||EX(tv,e)&&t===tv.indexOf?_X:t},TX=kX,OX=TX,CX=OX;const $X=Ge(CX);var _T=zu,IX=TypeError,RX=function(e,t){if(!delete e[t])throw new IX("Cannot delete property "+_T(t)+" of "+_T(e))},AX=vt,PX=Lr,DX=Eh,jX=Hu,NX=Ni,MX=N_,FX=yh,LX=Sh,BX=cs,nv=RX,UX=Ku,zX=UX("splice"),qX=Math.max,WX=Math.min;AX({target:"Array",proto:!0,forced:!zX},{splice:function(t,n){var r=PX(this),i=NX(r),a=DX(t,i),o=arguments.length,s,u,l,c,f,p;for(o===0?s=u=0:o===1?(s=0,u=i-a):(s=o-2,u=WX(qX(jX(n),0),i-a)),FX(i+s-u),l=LX(r,u),c=0;c<u;c++)f=a+c,f in r&&BX(l,c,r[f]);if(l.length=u,s<u){for(c=a;c<i-u;c++)f=c+u,p=c+s,f in r?r[p]=r[f]:nv(r,p);for(c=i;c>i-u+s;c--)nv(r,c-1)}else if(s>u)for(c=i-u;c>a;c--)f=c+u-1,p=c+s-1,f in r?r[p]=r[f]:nv(r,p);for(c=0;c<s;c++)r[c+a]=arguments[c+2];return MX(r,i-u+s),l}});var VX=Li,HX=VX("Array","splice"),ZX=Fr,KX=HX,rv=Array.prototype,GX=function(e){var t=e.splice;return e===rv||ZX(rv,e)&&t===rv.splice?KX:t},YX=GX,JX=YX,XX=JX;const QX=Ge(XX);var eQ=Li,tQ=eQ("Array","concat"),nQ=Fr,rQ=tQ,iv=Array.prototype,iQ=function(e){var t=e.concat;return e===iv||nQ(iv,e)&&t===iv.concat?rQ:t},aQ=iQ,oQ=aQ,sQ=oQ;const Ct=Ge(sQ);var lQ=vt,uQ=Nt,kT=Date,cQ=uQ(kT.prototype.getTime);lQ({target:"Date",stat:!0},{now:function(){return cQ(new kT)}});var fQ=Xt,dQ=fQ.Date.now,pQ=dQ,hQ=pQ,mQ=hQ;const pi=Ge(mQ);var vQ=jh.forEach,yQ=ST,gQ=yQ("forEach"),bQ=gQ?[].forEach:function(t){return vQ(this,t,arguments.length>1?arguments[1]:void 0)},wQ=vt,TT=bQ;wQ({target:"Array",proto:!0,forced:[].forEach!==TT},{forEach:TT});var xQ=Li,SQ=xQ("Array","forEach"),EQ=SQ,_Q=EQ,kQ=fs,TQ=Tn,OQ=Fr,CQ=_Q,av=Array.prototype,$Q={DOMTokenList:!0,NodeList:!0},IQ=function(e){var t=e.forEach;return e===av||OQ(av,e)&&t===av.forEach||TQ($Q,kQ(e))?CQ:t},RQ=IQ;const Rc=Ge(RQ);var AQ=vt,PQ=Lr,OT=Th,DQ=zt,jQ=DQ(function(){OT(1)});AQ({target:"Object",stat:!0,forced:jQ},{keys:function(t){return OT(PQ(t))}});var NQ=Xt,MQ=NQ.Object.keys,FQ=MQ,LQ=FQ,BQ=LQ;const UQ=Ge(BQ);var zQ=Xt,qQ=zQ.Object.getOwnPropertySymbols,WQ=qQ,VQ=WQ,HQ=VQ;const CT=Ge(HQ);var ZQ=vt,KQ=jh.filter,GQ=Ku,YQ=GQ("filter");ZQ({target:"Array",proto:!0,forced:!YQ},{filter:function(t){return KQ(this,t,arguments.length>1?arguments[1]:void 0)}});var JQ=Li,XQ=JQ("Array","filter"),QQ=Fr,eee=XQ,ov=Array.prototype,tee=function(e){var t=e.filter;return e===ov||QQ(ov,e)&&t===ov.filter?eee:t},nee=tee,ree=nee,iee=ree;const aee=Ge(iee);var $T={exports:{}},oee=vt,see=zt,lee=mr,IT=as.f,RT=gn,uee=!RT||see(function(){IT(1)});oee({target:"Object",stat:!0,forced:uee,sham:!RT},{getOwnPropertyDescriptor:function(t,n){return IT(lee(t),n)}});var cee=Xt,AT=cee.Object,fee=$T.exports=function(t,n){return AT.getOwnPropertyDescriptor(t,n)};AT.getOwnPropertyDescriptor.sham&&(fee.sham=!0);var dee=$T.exports,pee=dee,hee=pee,mee=hee;const PT=Ge(mee);var vee=vr,yee=Nt,gee=ec,bee=nc,wee=ui,xee=yee([].concat),See=vee("Reflect","ownKeys")||function(t){var n=gee.f(wee(t)),r=bee.f;return r?xee(n,r(t)):n},Eee=vt,_ee=gn,kee=See,Tee=mr,Oee=as,Cee=cs;Eee({target:"Object",stat:!0,sham:!_ee},{getOwnPropertyDescriptors:function(t){for(var n=Tee(t),r=Oee.f,i=kee(n),a={},o=0,s,u;i.length>o;)u=r(n,s=i[o++]),u!==void 0&&Cee(a,s,u);return a}});var $ee=Xt,Iee=$ee.Object.getOwnPropertyDescriptors,Ree=Iee,Aee=Ree,Pee=Aee;const DT=Ge(Pee);var jT={exports:{}},Dee=vt,jee=gn,NT=Gu.f;Dee({target:"Object",stat:!0,forced:Object.defineProperties!==NT,sham:!jee},{defineProperties:NT});var Nee=Xt,MT=Nee.Object,Mee=jT.exports=function(t,n){return MT.defineProperties(t,n)};MT.defineProperties.sham&&(Mee.sham=!0);var Fee=jT.exports,Lee=Fee,Bee=Lee,Uee=Bee;const zee=Ge(Uee);var qee=nk;const Wee=Ge(qee);var Vee=!1;function Hee(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function Zee(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var Kee=function(){function e(n){var r=this;this._insertTag=function(i){var a;r.tags.length===0?r.insertionPoint?a=r.insertionPoint.nextSibling:r.prepend?a=r.container.firstChild:a=r.before:a=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,a),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!Vee:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Zee(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var a=Hee(i);try{a.insertRule(r,a.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var i;return(i=r.parentNode)==null?void 0:i.removeChild(r)}),this.tags=[],this.ctr=0},e}(),on="-ms-",Ac="-moz-",lt="-webkit-",FT="comm",sv="rule",lv="decl",Gee="@import",LT="@keyframes",Yee="@layer",Jee=Math.abs,Pc=String.fromCharCode,Xee=Object.assign;function Qee(e,t){return Qt(e,0)^45?(((t<<2^Qt(e,0))<<2^Qt(e,1))<<2^Qt(e,2))<<2^Qt(e,3):0}function BT(e){return e.trim()}function ete(e,t){return(e=t.exec(e))?e[0]:e}function ut(e,t,n){return e.replace(t,n)}function uv(e,t){return e.indexOf(t)}function Qt(e,t){return e.charCodeAt(t)|0}function Rs(e,t,n){return e.slice(t,n)}function wr(e){return e.length}function cv(e){return e.length}function Dc(e,t){return t.push(e),e}function tte(e,t){return e.map(t).join("")}var jc=1,Ua=1,UT=0,wn=0,Mt=0,za="";function Nc(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:jc,column:Ua,length:o,return:""}}function As(e,t){return Xee(Nc("",null,null,"",null,null,0),e,{length:-e.length},t)}function nte(){return Mt}function rte(){return Mt=wn>0?Qt(za,--wn):0,Ua--,Mt===10&&(Ua=1,jc--),Mt}function Cn(){return Mt=wn<UT?Qt(za,wn++):0,Ua++,Mt===10&&(Ua=1,jc++),Mt}function xr(){return Qt(za,wn)}function Mc(){return wn}function Ps(e,t){return Rs(za,e,t)}function Ds(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function zT(e){return jc=Ua=1,UT=wr(za=e),wn=0,[]}function qT(e){return za="",e}function Fc(e){return BT(Ps(wn-1,fv(e===91?e+2:e===40?e+1:e)))}function ite(e){for(;(Mt=xr())&&Mt<33;)Cn();return Ds(e)>2||Ds(Mt)>3?"":" "}function ate(e,t){for(;--t&&Cn()&&!(Mt<48||Mt>102||Mt>57&&Mt<65||Mt>70&&Mt<97););return Ps(e,Mc()+(t<6&&xr()==32&&Cn()==32))}function fv(e){for(;Cn();)switch(Mt){case e:return wn;case 34:case 39:e!==34&&e!==39&&fv(Mt);break;case 40:e===41&&fv(e);break;case 92:Cn();break}return wn}function ote(e,t){for(;Cn()&&e+Mt!==57;)if(e+Mt===84&&xr()===47)break;return"/*"+Ps(t,wn-1)+"*"+Pc(e===47?e:Cn())}function ste(e){for(;!Ds(xr());)Cn();return Ps(e,wn)}function lte(e){return qT(Lc("",null,null,null,[""],e=zT(e),0,[0],e))}function Lc(e,t,n,r,i,a,o,s,u){for(var l=0,c=0,f=o,p=0,d=0,m=0,h=1,y=1,v=1,b=0,w="",k=i,E=a,_=r,C=w;y;)switch(m=b,b=Cn()){case 40:if(m!=108&&Qt(C,f-1)==58){uv(C+=ut(Fc(b),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:C+=Fc(b);break;case 9:case 10:case 13:case 32:C+=ite(m);break;case 92:C+=ate(Mc()-1,7);continue;case 47:switch(xr()){case 42:case 47:Dc(ute(ote(Cn(),Mc()),t,n),u);break;default:C+="/"}break;case 123*h:s[l++]=wr(C)*v;case 125*h:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+c:v==-1&&(C=ut(C,/\f/g,"")),d>0&&wr(C)-f&&Dc(d>32?VT(C+";",r,n,f-1):VT(ut(C," ","")+";",r,n,f-2),u);break;case 59:C+=";";default:if(Dc(_=WT(C,t,n,l,c,i,s,w,k=[],E=[],f),a),b===123)if(c===0)Lc(C,t,_,_,k,a,f,s,E);else switch(p===99&&Qt(C,3)===110?100:p){case 100:case 108:case 109:case 115:Lc(e,_,_,r&&Dc(WT(e,_,_,0,0,i,s,w,i,k=[],f),E),i,E,f,s,r?k:E);break;default:Lc(C,_,_,_,[""],E,0,s,E)}}l=c=d=0,h=v=1,w=C="",f=o;break;case 58:f=1+wr(C),d=m;default:if(h<1){if(b==123)--h;else if(b==125&&h++==0&&rte()==125)continue}switch(C+=Pc(b),b*h){case 38:v=c>0?1:(C+="\f",-1);break;case 44:s[l++]=(wr(C)-1)*v,v=1;break;case 64:xr()===45&&(C+=Fc(Cn())),p=xr(),c=f=wr(w=C+=ste(Mc())),b++;break;case 45:m===45&&wr(C)==2&&(h=0)}}return a}function WT(e,t,n,r,i,a,o,s,u,l,c){for(var f=i-1,p=i===0?a:[""],d=cv(p),m=0,h=0,y=0;m<r;++m)for(var v=0,b=Rs(e,f+1,f=Jee(h=o[m])),w=e;v<d;++v)(w=BT(h>0?p[v]+" "+b:ut(b,/&\f/g,p[v])))&&(u[y++]=w);return Nc(e,t,n,i===0?sv:s,u,l,c)}function ute(e,t,n){return Nc(e,t,n,FT,Pc(nte()),Rs(e,2,-2),0)}function VT(e,t,n,r){return Nc(e,t,n,lv,Rs(e,0,r),Rs(e,r+1,-1),r)}function qa(e,t){for(var n="",r=cv(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function cte(e,t,n,r){switch(e.type){case Yee:if(e.children.length)break;case Gee:case lv:return e.return=e.return||e.value;case FT:return"";case LT:return e.return=e.value+"{"+qa(e.children,r)+"}";case sv:e.value=e.props.join(",")}return wr(n=qa(e.children,r))?e.return=e.value+"{"+n+"}":""}function fte(e){var t=cv(e);return function(n,r,i,a){for(var o="",s=0;s<t;s++)o+=e[s](n,r,i,a)||"";return o}}function dte(e){return function(t){t.root||(t=t.return)&&e(t)}}function pte(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var hte=function(t,n,r){for(var i=0,a=0;i=a,a=xr(),i===38&&a===12&&(n[r]=1),!Ds(a);)Cn();return Ps(t,wn)},mte=function(t,n){var r=-1,i=44;do switch(Ds(i)){case 0:i===38&&xr()===12&&(n[r]=1),t[r]+=hte(wn-1,n,r);break;case 2:t[r]+=Fc(i);break;case 4:if(i===44){t[++r]=xr()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Pc(i)}while(i=Cn());return t},vte=function(t,n){return qT(mte(zT(t),n))},HT=new WeakMap,yte=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!HT.get(r))&&!i){HT.set(t,!0);for(var a=[],o=vte(n,a),s=r.props,u=0,l=0;u<o.length;u++)for(var c=0;c<s.length;c++,l++)t.props[l]=a[u]?o[u].replace(/&\f/g,s[c]):s[c]+" "+o[u]}}},gte=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function ZT(e,t){switch(Qee(e,t)){case 5103:return lt+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return lt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return lt+e+Ac+e+on+e+e;case 6828:case 4268:return lt+e+on+e+e;case 6165:return lt+e+on+"flex-"+e+e;case 5187:return lt+e+ut(e,/(\w+).+(:[^]+)/,lt+"box-$1$2"+on+"flex-$1$2")+e;case 5443:return lt+e+on+"flex-item-"+ut(e,/flex-|-self/,"")+e;case 4675:return lt+e+on+"flex-line-pack"+ut(e,/align-content|flex-|-self/,"")+e;case 5548:return lt+e+on+ut(e,"shrink","negative")+e;case 5292:return lt+e+on+ut(e,"basis","preferred-size")+e;case 6060:return lt+"box-"+ut(e,"-grow","")+lt+e+on+ut(e,"grow","positive")+e;case 4554:return lt+ut(e,/([^-])(transform)/g,"$1"+lt+"$2")+e;case 6187:return ut(ut(ut(e,/(zoom-|grab)/,lt+"$1"),/(image-set)/,lt+"$1"),e,"")+e;case 5495:case 3959:return ut(e,/(image-set\([^]*)/,lt+"$1$`$1");case 4968:return ut(ut(e,/(.+:)(flex-)?(.*)/,lt+"box-pack:$3"+on+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+lt+e+e;case 4095:case 3583:case 4068:case 2532:return ut(e,/(.+)-inline(.+)/,lt+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(wr(e)-1-t>6)switch(Qt(e,t+1)){case 109:if(Qt(e,t+4)!==45)break;case 102:return ut(e,/(.+:)(.+)-([^]+)/,"$1"+lt+"$2-$3$1"+Ac+(Qt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~uv(e,"stretch")?ZT(ut(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Qt(e,t+1)!==115)break;case 6444:switch(Qt(e,wr(e)-3-(~uv(e,"!important")&&10))){case 107:return ut(e,":",":"+lt)+e;case 101:return ut(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+lt+(Qt(e,14)===45?"inline-":"")+"box$3$1"+lt+"$2$3$1"+on+"$2box$3")+e}break;case 5936:switch(Qt(e,t+11)){case 114:return lt+e+on+ut(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return lt+e+on+ut(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return lt+e+on+ut(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return lt+e+on+e+e}return e}var bte=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case lv:t.return=ZT(t.value,t.length);break;case LT:return qa([As(t,{value:ut(t.value,"@","@"+lt)})],i);case sv:if(t.length)return tte(t.props,function(a){switch(ete(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return qa([As(t,{props:[ut(a,/:(read-\w+)/,":"+Ac+"$1")]})],i);case"::placeholder":return qa([As(t,{props:[ut(a,/:(plac\w+)/,":"+lt+"input-$1")]}),As(t,{props:[ut(a,/:(plac\w+)/,":"+Ac+"$1")]}),As(t,{props:[ut(a,/:(plac\w+)/,on+"input-$1")]})],i)}return""})}},wte=[bte],xte=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(h){var y=h.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var i=t.stylisPlugins||wte,a={},o,s=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(h){for(var y=h.getAttribute("data-emotion").split(" "),v=1;v<y.length;v++)a[y[v]]=!0;s.push(h)});var u,l=[yte,gte];{var c,f=[cte,dte(function(h){c.insert(h)})],p=fte(l.concat(i,f)),d=function(y){return qa(lte(y),p)};u=function(y,v,b,w){c=b,d(y?y+"{"+v.styles+"}":v.styles),w&&(m.inserted[v.name]=!0)}}var m={key:n,sheet:new Kee({key:n,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:a,registered:{},insert:u};return m.sheet.hydrate(s),m};function Ste(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Ete={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},_te=!1,kte=/[A-Z]|^ms/g,Tte=/_EMO_([^_]+?)_([^]*?)_EMO_/g,KT=function(t){return t.charCodeAt(1)===45},GT=function(t){return t!=null&&typeof t!="boolean"},dv=pte(function(e){return KT(e)?e:e.replace(kte,"-$&").toLowerCase()}),YT=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Tte,function(r,i,a){return hi={name:i,styles:a,next:hi},i})}return Ete[t]!==1&&!KT(t)&&typeof n=="number"&&n!==0?n+"px":n},Ote="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Bc(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return hi={name:i.name,styles:i.styles,next:hi},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)hi={name:o.name,styles:o.styles,next:hi},o=o.next;var s=a.styles+";";return s}return Cte(e,t,n)}}var u=n;if(t==null)return u;var l=t[u];return l!==void 0?l:u}function Cte(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Bc(e,t,n[i])+";";else for(var a in n){var o=n[a];if(typeof o!="object"){var s=o;t!=null&&t[s]!==void 0?r+=a+"{"+t[s]+"}":GT(s)&&(r+=dv(a)+":"+YT(a,s)+";")}else{if(a==="NO_COMPONENT_SELECTOR"&&_te)throw new Error(Ote);if(Array.isArray(o)&&typeof o[0]=="string"&&(t==null||t[o[0]]===void 0))for(var u=0;u<o.length;u++)GT(o[u])&&(r+=dv(a)+":"+YT(a,o[u])+";");else{var l=Bc(e,t,o);switch(a){case"animation":case"animationName":{r+=dv(a)+":"+l+";";break}default:r+=a+"{"+l+"}"}}}}return r}var JT=/label:\s*([^\s;{]+)\s*(;|$)/g,hi;function pv(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";hi=void 0;var a=e[0];if(a==null||a.raw===void 0)r=!1,i+=Bc(n,t,a);else{var o=a;i+=o[0]}for(var s=1;s<e.length;s++)if(i+=Bc(n,t,e[s]),r){var u=a;i+=u[s]}JT.lastIndex=0;for(var l="",c;(c=JT.exec(i))!==null;)l+="-"+c[1];var f=Ste(i)+l;return{name:f,styles:i,next:hi}}function XT(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(r+=i+" ")}),r}var $te=function(t,n,r){var i=t.key+"-"+n.name;t.registered[i]===void 0&&(t.registered[i]=n.styles)},Ite=function(t,n,r){$te(t,n);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var a=n;do t.insert(n===a?"."+i:"",a,t.sheet,!0),a=a.next;while(a!==void 0)}};function QT(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function eO(e,t,n){var r=[],i=XT(e,r,n);return r.length<2?n:i+t(r)}var Rte=function(t){var n=xte(t);n.sheet.speedy=function(s){if(process.env.NODE_ENV!=="production"&&this.ctr!==0)throw new Error("speedy must be changed before any rules are inserted");this.isSpeedy=s},n.compat=!0;var r=function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];var f=pv(l,n.registered,void 0);return Ite(n,f),n.key+"-"+f.name},i=function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];var f=pv(l,n.registered),p="animation-"+f.name;return QT(n,{name:f.name,styles:"@keyframes "+p+"{"+f.styles+"}"}),p},a=function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];var f=pv(l,n.registered);QT(n,f)},o=function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];return eO(n.registered,r,Ate(l))};return{css:r,cx:o,injectGlobal:a,keyframes:i,hydrate:function(u){u.forEach(function(l){n.inserted[l]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:XT.bind(null,n.registered),merge:eO.bind(null,n.registered,r)}},Ate=function e(t){for(var n="",r=0;r<t.length;r++){var i=t[r];if(i!=null){var a=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))a=e(i);else{a="";for(var o in i)i[o]&&o&&(a&&(a+=" "),a+=o)}break}default:a=i}a&&(n&&(n+=" "),n+=a)}}return n},Pte=Cs,hv=Date.prototype,tO="Invalid Date",nO="toString",Dte=hv[nO],jte=hv.getTime;String(new Date(NaN))!=tO&&Pte(hv,nO,function(){var t=jte.call(this);return t===t?Dte.call(this):tO});var Nte=qm,Mte=Xk,Fte=Nte?{}.toString:function(){return"[object "+Mte(this)+"]"},Lte=qm,Bte=Cs,Ute=Fte;Lte||Bte(Object.prototype,"toString",Ute,{unsafe:!0});var zte=Lm.PROPER,qte=Cs,Wte=di,rO=Tc,Vte=Qn,Hte=Qk,mv="toString",iO=RegExp.prototype,aO=iO[mv],Zte=Vte(function(){return aO.call({source:"a",flags:"b"})!="/a/b"}),Kte=zte&&aO.name!=mv;(Zte||Kte)&&qte(RegExp.prototype,mv,function(){var t=Wte(this),n=rO(t.source),r=t.flags,i=rO(r===void 0&&t instanceof RegExp&&!("flags"in iO)?Hte.call(t):r);return"/"+n+"/"+i},{unsafe:!0});var oO=typeof window<"u"?window:self,Gte=oO.crypto||oO.msCrypto,Yte=function(e){if(!e)return Math.random;var t=Math.pow(2,32),n=new Uint32Array(1);return function(){return e.getRandomValues(n)[0]/t}}(Gte);const Jte=Ge(Yte);function Xte(){return Jte().toString(26).substr(2,5).replace(/[0-9]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+65)})}var Qte=BS;const sO=Ge(Qte);function pt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"white",n="background-color: ".concat(e,"; border-radius: 4px; padding: 2px 4px;");return t&&(n+=" color: ".concat(t,";")),[n,""]}function lO(e,t){for(var n,r,i=arguments.length,a=new Array(i>2?i-2:0),o=2;o<i;o++)a[o-2]=arguments[o];return Ct(n=[Ct(r="%c".concat(e,"%c ")).call(r,t)]).call(n,tt(pt("green","white")),a)}function ene(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.force,r=n===void 0?!1:n;return r?function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];if(a.length){var s=a,u=gr(s,1),l=u[0];typeof l=="function"&&(a=l());var c=sO(a[0])?a:[a],f=c.length===1;Rc(c).call(c,function(p,d){if(f){var m,h;(m=console).log.apply(m,tt(lO.apply(void 0,Ct(h=[e]).call(h,tt(p)))))}else if(d){var y;(y=console).log.apply(y,tt(sO(p)?p:[p]))}else{var v,b;(v=console).groupCollapsed.apply(v,tt(lO.apply(void 0,Ct(b=[e]).call(b,tt(p)))))}}),f||console.groupEnd()}}:function(){return 0}}var tne=Bi,nne=Lm.EXISTS,rne=Ts.f,uO=Function.prototype,ine=uO.toString,ane=/^\s*function ([^ (]*)/,one="name";tne&&!nne&&rne(uO,one,{configurable:!0,get:function(){try{return ine.call(this).match(ane)[1]}catch{return""}}});var sne=Xt,lne=sne.setTimeout,une=lne;const cne=Ge(une);function fne(e,t){if(!t)return e;var n=0,r=null;return function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s=pi();s-n>t?(e.apply(void 0,a),n=s):(clearTimeout(r),r=cne(function(){e.apply(void 0,a),n=pi()},Math.max(0,t-s+n)))}}var cO=function(t){var n=t.debounce,r=t.name,i=t.onEvent,a=t.target,o=j.useRef();o.current=i;var s=j.useMemo(function(){return fne(function(l){var c=o.current;c&&c(l)},n)},[n,o]),u=j.useCallback(function(l){l.timeStampLow=pi(),s(l)},[s]);return j.useLayoutEffect(function(){return a.addEventListener(r,u,{passive:!0}),u({target:a,type:r}),function(){return a.removeEventListener(r,u)}},[r,u,a]),!1};cO.defaultProps={debounce:200};var dne=Math.sign||function(t){var n=+t;return n===0||n!==n?n:n<0?-1:1},pne=vt,hne=dne;pne({target:"Math",stat:!0},{sign:hne});var mne=Xt,vne=mne.Math.sign,yne=vne,gne=yne,bne=gne;const wne=Ge(bne);function xne(e,t){var n=wne(t-e),r=Math.sqrt(Math.abs(t-e)),i=e+r*n;return n>0?Math.min(t,i):Math.max(t,i)}function Sne(e,t,n,r){for(var i=e,a=0;a<r;a++)i=n(i,t);return i}var fO=function(t){var n=t.name,r=t.onEnd,i=t.target,a=t.value,o=j.useRef(),s=j.useCallback(function(l,c,f,p){var d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:pi();(f==="100%"||typeof f=="number")&&(cancelAnimationFrame(o.current),o.current=requestAnimationFrame(function(){if(i){var m=f==="100%"?i.scrollHeight-i.offsetHeight:f,h=Sne(c,m,xne,(pi()-d)/5);Math.abs(m-h)<1.5&&(h=m),i[l]=h,m===h?r&&r(!0):s(l,c,f,p+1,d)}}))},[o,r,i]),u=j.useCallback(function(){cancelAnimationFrame(o.current),r&&r(!1)},[r]);return j.useLayoutEffect(function(){return s(n,i[n],a,1),i?(i.addEventListener("pointerdown",u,{passive:!0}),i.addEventListener("wheel",u,{passive:!0}),function(){i.removeEventListener("pointerdown",u),i.removeEventListener("wheel",u),cancelAnimationFrame(o.current)}):function(){return cancelAnimationFrame(o.current)}},[s,o,u,n,i,a]),!1};fO.propTypes={name:it.string.isRequired,onEnd:it.func,target:it.any.isRequired,value:it.oneOfType([it.number,it.oneOf(["100%"])]).isRequired};function vv(e){var t=j.useState(e),n=gr(t,2),r=n[0],i=n[1],a=j.useRef(),o=j.useCallback(function(s){typeof s=="function"?o(function(u){return s=s(u),a.current=s,s}):(a.current=s,o(s))},[a]);return a.current=r,[r,i,a]}function dO(e,t){var n=UQ(e);if(CT){var r=CT(e);t&&(r=aee(r).call(r,function(i){return PT(e,i).enumerable})),n.push.apply(n,r)}return n}function pO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};if(t%2){var r;Rc(r=dO(Object(n),!0)).call(r,function(a){DZ(e,a,n[a])})}else if(DT)zee(e,DT(n));else{var i;Rc(i=dO(Object(n))).call(i,function(a){Wee(e,a,PT(n,a))})}}return e}var Ene=function(){return 1/0},hO=17,_ne="bottom",er="top",mO=1,kne=34,vO={};function Tne(e,t){return e(),hX(e,t)}function yO(e){var t=e.mode,n=e.target,r=n.offsetHeight,i=n.scrollHeight,a=n.scrollTop,o=i-a-r<mO,s=a<mO,u=t===er?s:o,l=t!==er?s:o;return{atBottom:o,atEnd:u,atStart:l,atTop:s}}function js(e,t){return e===(t===er?0:"100%")}var yv=function(t){var n=t.checkInterval,r=t.children,i=t.debounce,a=t.debug,o=t.initialScrollBehavior,s=t.mode,u=t.nonce,l=t.scroller,c=j.useMemo(function(){return ene("<ScrollToBottom>",{force:a})},[a]);s=s===er?er:_ne;var f=j.useRef(0),p=j.useRef(o),d=vv(s===er?0:"100%"),m=gr(d,3),h=m[0],y=m[1],v=m[2],b=vv(null),w=gr(b,3),k=w[0],E=w[1],_=w[2],C=j.useRef(0),z=j.useRef(0),B=j.useRef(0),T=j.useState(!0),A=gr(T,2),W=A[0],F=A[1],L=j.useState(!0),N=gr(L,2),q=N[0],Y=N[1],H=j.useState(!0),I=gr(H,2),g=I[0],P=I[1],V=j.useState(!1),S=gr(V,2),Z=S[0],J=S[1],G=vv(!0),X=gr(G,3),ae=X[0],se=X[1],Q=X[2],ee=j.useRef([]),K=j.useCallback(function(D){var ne=_.current;return ee.current.push(D),ne&&D({scrollTop:ne.scrollTop}),function(){var he=ee.current,Se=$X(he).call(he,D);~Se&&QX(he).call(he,Se,1)}},[ee,_]),pe=j.useCallback(function(){var D=v.current;c(function(){var ne;return Ct(ne=["%cSpineTo%c: %conEnd%c is fired."]).call(ne,tt(pt("magenta")),tt(pt("orange")),[{animateTo:D}])}),f.current=pi(),js(D,s)||se(!1),y(null)},[v,c,f,s,y,se]),ge=j.useCallback(function(D){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},he=ne.behavior,Se=_.current;if(typeof D!="number"&&D!=="100%")return console.warn('react-scroll-to-bottom: Arguments passed to scrollTo() must be either number or "100%".');c(function(){var $e;return[Ct($e=["%cscrollTo%c: Will scroll to %c".concat(typeof D=="number"?D+"px":D.replace(/%/g,"%%"),"%c")]).call($e,tt(pt("lime","")),tt(pt("purple"))),{behavior:he,nextAnimateTo:D,target:Se}]}),he==="auto"?(pe(),Se&&(Se.scrollTop=D==="100%"?Se.scrollHeight-Se.offsetHeight:D)):(he!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollTo". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),y(D)),js(D,s)&&(c(function(){var $e;return[Ct($e=["%cscrollTo%c: Scrolling to end, will set sticky to %ctrue%c."]).call($e,tt(pt("lime","")),tt(pt("purple"))),[{mode:s,nextAnimateTo:D}]]}),se(!0))},[c,pe,s,y,se,_]),Ie=j.useCallback(function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=D.behavior;c(function(){var he;return Ct(he=["%cscrollToBottom%c: Called"]).call(he,tt(pt("yellow","")))}),ne!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToBottom". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),ge("100%",{behavior:ne||"smooth"})},[c,ge]),M=j.useCallback(function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=D.behavior;c(function(){var he;return Ct(he=["%cscrollToTop%c: Called"]).call(he,tt(pt("yellow","")))}),ne!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToTop". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),ge(0,{behavior:ne||"smooth"})},[c,ge]),ie=j.useCallback(function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=D.behavior;c(function(){var Se;return Ct(Se=["%cscrollToEnd%c: Called"]).call(Se,tt(pt("yellow","")))}),ne!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToEnd". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var he={behavior:ne||"smooth"};s===er?M(he):Ie(he)},[c,s,Ie,M]),ce=j.useCallback(function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=D.behavior;c(function(){var Se;return Ct(Se=["%cscrollToStart%c: Called"]).call(Se,tt(pt("yellow","")))}),ne!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToStart". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var he={behavior:ne||"smooth"};s===er?Ie(he):M(he)},[c,s,Ie,M]),oe=j.useCallback(function(){var D=_.current;if(D){if(p.current==="auto"){c(function(){var Et;return Ct(Et=["%ctarget changed%c: Initial scroll"]).call(Et,tt(pt("blue")))}),D.scrollTop=s===er?0:D.scrollHeight-D.offsetHeight,p.current=!1;return}var ne=C.current,he=D.offsetHeight,Se=D.scrollHeight,$e=D.scrollTop,Ze=s===er?0:Math.max(0,Se-he-$e),Qe=Math.max(0,ne-$e),_t=l({maxValue:Ze,minValue:Qe,offsetHeight:he,scrollHeight:Se,scrollTop:$e}),St=Math.max(0,Math.min(Ze,_t)),qe;s===er||St!==Ze?qe=$e+St:qe="100%",c(function(){var Et,Ke,un;return[Ct(Et=[Ct(Ke=Ct(un="%cscrollToSticky%c: Will animate from %c".concat(ne,"px%c to %c")).call(un,typeof qe=="number"?qe+"px":qe.replace(/%/g,"%%"),"%c (%c")).call(Ke,(qe==="100%"?Ze:qe)+ne,"px%c)")]).call(Et,tt(pt("orange")),tt(pt("purple")),tt(pt("purple")),tt(pt("purple"))),{animateFrom:ne,maxValue:Ze,minValue:Qe,nextAnimateTo:qe,nextValue:St,offsetHeight:he,rawNextValue:_t,scrollHeight:Se,scrollTop:$e}]}),ge(qe,{behavior:"smooth"})}},[C,c,s,l,ge,_]),Oe=j.useCallback(function(D){var ne,he=D.timeStampLow,Se=v.current,$e=_.current,Ze=Se!==null;if(!(he<=f.current||!$e)){var Qe=yO({mode:s,target:$e}),_t=Qe.atBottom,St=Qe.atEnd,qe=Qe.atStart,Et=Qe.atTop;F(_t),Y(St),J(qe),P(Et);var Ke=$e.offsetHeight,un=$e.scrollHeight,In=z.current,ir=B.current,Hr=Ke!==In,Rr=un!==ir;if(Hr&&(z.current=Ke),Rr&&(B.current=un),!Hr&&!Rr){var ar=Ze&&js(Se,s)||St;Q.current!==ar&&(c(function(){var ht,kt,Wt,Vt;return[Ct(ht=["%conScroll%c: %csetSticky%c(%c".concat(ar,"%c)")]).call(ht,tt(pt("red")),tt(pt("red")),tt(pt("purple"))),Ct(kt=[Ct(Wt=Ct(Vt="(animating = %c".concat(Ze,"%c && isEnd = %c")).call(Vt,js(Se,s),"%c) || atEnd = %c")).call(Wt,St,"%c")]).call(kt,tt(pt("purple")),tt(pt("purple")),tt(pt("purple")),[{animating:Ze,animateTo:Se,atEnd:St,mode:s,offsetHeight:$e.offsetHeight,scrollHeight:$e.scrollHeight,sticky:Q.current,nextSticky:ar}])]}),se(ar))}else Q.current&&(c(function(){var ht;return[Ct(ht=["%conScroll%c: Size changed while sticky, calling %cscrollToSticky()%c"]).call(ht,tt(pt("red")),tt(pt("orange")),[{offsetHeightChanged:Hr,scrollHeightChanged:Rr}]),{nextOffsetHeight:Ke,prevOffsetHeight:In,nextScrollHeight:un,prevScrollHeight:ir}]}),oe());var Zr=$e.scrollTop;Rc(ne=ee.current).call(ne,function(ht){return ht({scrollTop:Zr})})}},[v,c,f,s,z,B,ee,oe,F,Y,J,P,se,Q,_]);j.useEffect(function(){if(k){var D=!1,ne=Tne(function(){var he=_.current,Se=v.current!==null;Q.current?yO({mode:s,target:he}).atEnd?D=!1:D?pi()-D>kne&&(Se||(C.current=he.scrollTop,c(function(){var $e;return Ct($e=["%cInterval check%c: Should sticky but not at end, calling %cscrollToSticky()%c to scroll"]).call($e,tt(pt("navy")),tt(pt("orange")))}),oe()),D=!1):D=pi():he.scrollHeight<=he.offsetHeight&&!Q.current&&(c(function(){var $e;return[Ct($e=["%cInterval check%c: Container is emptied, setting sticky back to %ctrue%c"]).call($e,tt(pt("navy")),tt(pt("purple"))),[{offsetHeight:he.offsetHeight,scrollHeight:he.scrollHeight,sticky:Q.current}]]}),se(!0))},Math.max(hO,n)||hO);return function(){return clearInterval(ne)}}},[v,n,c,s,oe,se,Q,k,_]);var Ee=j.useMemo(function(){var D=vO[u]||(vO[u]=Rte({key:"react-scroll-to-bottom--css-"+Xte(),nonce:u}));return function(ne){return D.css(ne)+""}},[u]),Re=j.useMemo(function(){return{observeScrollPosition:K,setTarget:E,styleToClassName:Ee}},[K,E,Ee]),He=j.useMemo(function(){return{atBottom:W,atEnd:q,atStart:Z,atTop:g,mode:s}},[W,q,Z,g,s]),te=j.useMemo(function(){var D=h!==null;return{animating:D,animatingToEnd:D&&js(h,s),sticky:ae}},[h,s,ae]),fe=j.useMemo(function(){return pO(pO({},He),te)},[He,te]),U=j.useMemo(function(){return{scrollTo:ge,scrollToBottom:Ie,scrollToEnd:ie,scrollToStart:ce,scrollToTop:M}},[ge,Ie,ie,ce,M]);return j.useEffect(function(){if(k){var D=function(){B.current=k.scrollHeight};return k.addEventListener("focus",D,{capture:!0,passive:!0}),function(){return k.removeEventListener("focus",D)}}},[k]),c(function(){var D;return[Ct(D=["%cRender%c: Render"]).call(D,tt(pt("cyan",""))),{animateTo:h,animating:h!==null,sticky:ae,target:k}]}),j.createElement(vc.Provider,{value:Re},j.createElement(vm.Provider,{value:U},j.createElement(bm.Provider,{value:fe},j.createElement(ym.Provider,{value:He},j.createElement(gm.Provider,{value:te},r,k&&j.createElement(cO,{debounce:i,name:"scroll",onEvent:Oe,target:k}),k&&h!==null&&j.createElement(fO,{name:"scrollTop",onEnd:pe,target:k,value:h}))))))};yv.defaultProps={checkInterval:100,children:void 0,debounce:17,debug:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:Ene},yv.propTypes={checkInterval:it.number,children:it.any,debounce:it.number,debug:it.bool,initialScrollBehavior:it.oneOf(["auto","smooth"]),mode:it.oneOf(["bottom","top"]),nonce:it.string,scroller:it.func};var One={height:"100%",overflowY:"auto",width:"100%"},gv=function(t){var n=t.children,r=t.className,i=j.useContext(vc),a=i.setTarget,o=wm()(One);return j.createElement("div",{className:um(o,(r||"")+""),ref:a},n)};gv.defaultProps={children:void 0,className:void 0},gv.propTypes={children:it.any,className:it.string};var Cne={position:"relative"},bv=function(t){var n=t.children,r=t.className,i=t.followButtonClassName,a=t.scrollViewClassName,o=wm()(Cne);return j.createElement("div",{className:um(o,(r||"")+"")},j.createElement(gv,{className:(a||"")+""},n),j.createElement(xm,{className:(i||"")+""}))};bv.defaultProps={children:void 0,className:void 0,followButtonClassName:void 0,scrollViewClassName:void 0},bv.propTypes={children:it.any,className:it.string,followButtonClassName:it.string,scrollViewClassName:it.string};var wv=function(t){var n=t.checkInterval,r=t.children,i=t.className,a=t.debounce,o=t.debug,s=t.followButtonClassName,u=t.initialScrollBehavior,l=t.mode,c=t.nonce,f=t.scroller,p=t.scrollViewClassName;return j.createElement(yv,{checkInterval:n,debounce:a,debug:o,initialScrollBehavior:u,mode:l,nonce:c,scroller:f},j.createElement(bv,{className:i,followButtonClassName:s,scrollViewClassName:p},r))};wv.defaultProps={checkInterval:void 0,children:void 0,className:void 0,debounce:void 0,debug:void 0,followButtonClassName:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:void 0,scrollViewClassName:void 0},wv.propTypes={checkInterval:it.number,children:it.any,className:it.string,debounce:it.number,debug:it.bool,followButtonClassName:it.string,initialScrollBehavior:it.oneOf(["auto","smooth"]),mode:it.oneOf(["bottom","top"]),nonce:it.string,scroller:it.func,scrollViewClassName:it.string},jB();let gO=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");const xv=j.memo(({className:e,messages:t=[],isTyping:n,headerMessage:r,renderers:i,botAvatar:a,botDescription:o,botName:s,sendMessage:u,showMarquee:l=!0,...c})=>{const{messageList:f}=st,p=j.useMemo(()=>_I(t),[t]);return $.jsxs(wv,{...c,className:es(f.container.className,e),followButtonClassName:f.scrollDownButton.button.className,scrollViewClassName:f.viewPort.className,children:[r&&$.jsx("span",{...f.headerMessage,children:r}),l&&$.jsx(PB,{botAvatar:a,botDescription:o,botName:s}),p.map(d=>$.jsx(Wp,{renderers:i,sendMessage:u,...d},d.id)),n&&$.jsx(Wp,{id:gO(),renderers:i,sendMessage:u,direction:"incoming",timestamp:new Date,block:void 0,sender:{name:s??"",avatar:a},children:$.jsx(iS,{})})]})});xv.displayName="MessageList";const $ne=({className:e,...t})=>{const{className:n}=st.loader;return $.jsx("div",{...t,className:es(e,n)})},bO=({connected:e,configuration:t,closeWindow:n,isTyping:r,messages:i,user:a,sendMessage:o,uploadFile:s,isLoading:u,renderers:l,isReadOnly:c,disableComposer:f,restartConversation:p,allowFileUpload:d,...m})=>{const{color:h,fontFamily:y,radius:v,themeMode:b,variant:w,botAvatar:k,botDescription:E,botName:_,composerPlaceholder:C,showPoweredBy:z}=t,B={color:h,fontFamily:y,radius:v,themeMode:b,variant:w},T=j.useMemo(()=>i.map(A=>{const{authorId:W}=A,F=W===a.id?"outgoing":"incoming";return{...A,direction:F,sender:F==="outgoing"?{name:a.name??"You",avatar:a.pictureUrl}:{name:t.botName??"Bot",avatar:t.botAvatar}}}),[t.botAvatar,t.botName,i,a.id,a.name,a.pictureUrl]);return $.jsxs($.Fragment,{children:[$.jsx(a1,{...B}),$.jsxs(Lp,{connected:e,allowFileUpload:d,uploadFile:s,...m,children:[$.jsx(rS,{closeWindow:n,configuration:t,restartConversation:p}),u?$.jsx($ne,{}):$.jsx($.Fragment,{children:$.jsx(xv,{botAvatar:k,botDescription:E,botName:_,renderers:l,isTyping:r,sendMessage:o,messages:T})}),$.jsx(Ox,{sendMessage:o,uploadFile:s,connected:e,isReadOnly:c,disableComposer:f,showPoweredBy:z,composerPlaceholder:C,allowFileUpload:d})]})]})};function wO(e,t){return function(){return e.apply(t,arguments)}}const{toString:xO}=Object.prototype,{getPrototypeOf:Sv}=Object,Ev=(e=>t=>{const n=xO.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),zr=e=>(e=e.toLowerCase(),t=>Ev(t)===e),Uc=e=>t=>typeof t===e,{isArray:Wa}=Array,Ns=Uc("undefined");function Ine(e){return e!==null&&!Ns(e)&&e.constructor!==null&&!Ns(e.constructor)&&qi(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const SO=zr("ArrayBuffer");function Rne(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&SO(e.buffer),t}const Ane=Uc("string"),qi=Uc("function"),EO=Uc("number"),_v=e=>e!==null&&typeof e=="object",Pne=e=>e===!0||e===!1,zc=e=>{if(Ev(e)!=="object")return!1;const t=Sv(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Dne=zr("Date"),jne=zr("File"),Nne=zr("Blob"),Mne=zr("FileList"),Fne=e=>_v(e)&&qi(e.pipe),Lne=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||xO.call(e)===t||qi(e.toString)&&e.toString()===t)},Bne=zr("URLSearchParams"),Une=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ms(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Wa(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let s;for(r=0;r<o;r++)s=a[r],t.call(null,e[s],s,e)}}function _O(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const kO=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,TO=e=>!Ns(e)&&e!==kO;function kv(){const{caseless:e}=TO(this)&&this||{},t={},n=(r,i)=>{const a=e&&_O(t,i)||i;zc(t[a])&&zc(r)?t[a]=kv(t[a],r):zc(r)?t[a]=kv({},r):Wa(r)?t[a]=r.slice():t[a]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Ms(arguments[r],n);return t}const zne=(e,t,n,{allOwnKeys:r}={})=>(Ms(t,(i,a)=>{n&&qi(i)?e[a]=wO(i,n):e[a]=i},{allOwnKeys:r}),e),qne=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Wne=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Vne=(e,t,n,r)=>{let i,a,o;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&Sv(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Hne=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Zne=e=>{if(!e)return null;if(Wa(e))return e;let t=e.length;if(!EO(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Kne=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Sv(Uint8Array)),Gne=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},Yne=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Jne=zr("HTMLFormElement"),Xne=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),OO=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Qne=zr("RegExp"),CO=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ms(n,(i,a)=>{t(i,a,e)!==!1&&(r[a]=i)}),Object.defineProperties(e,r)},re={isArray:Wa,isArrayBuffer:SO,isBuffer:Ine,isFormData:Lne,isArrayBufferView:Rne,isString:Ane,isNumber:EO,isBoolean:Pne,isObject:_v,isPlainObject:zc,isUndefined:Ns,isDate:Dne,isFile:jne,isBlob:Nne,isRegExp:Qne,isFunction:qi,isStream:Fne,isURLSearchParams:Bne,isTypedArray:Kne,isFileList:Mne,forEach:Ms,merge:kv,extend:zne,trim:Une,stripBOM:qne,inherits:Wne,toFlatObject:Vne,kindOf:Ev,kindOfTest:zr,endsWith:Hne,toArray:Zne,forEachEntry:Gne,matchAll:Yne,isHTMLForm:Jne,hasOwnProperty:OO,hasOwnProp:OO,reduceDescriptors:CO,freezeMethods:e=>{CO(e,(t,n)=>{if(qi(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(qi(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},toObjectSet:(e,t)=>{const n={},r=i=>{i.forEach(a=>{n[a]=!0})};return Wa(e)?r(e):r(String(e).split(t)),n},toCamelCase:Xne,noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:_O,global:kO,isContextDefined:TO,toJSONObject:e=>{const t=new Array(10),n=(r,i)=>{if(_v(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const a=Wa(r)?[]:{};return Ms(r,(o,s)=>{const u=n(o,i+1);!Ns(u)&&(a[s]=u)}),t[i]=void 0,a}}return r};return n(e,0)}};function at(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}re.inherits(at,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:re.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const $O=at.prototype,IO={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{IO[e]={value:e}}),Object.defineProperties(at,IO),Object.defineProperty($O,"isAxiosError",{value:!0}),at.from=(e,t,n,r,i,a)=>{const o=Object.create($O);return re.toFlatObject(e,o,function(u){return u!==Error.prototype},s=>s!=="isAxiosError"),at.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};var ere=typeof self=="object"?self.FormData:window.FormData;const tre=Ge(ere);function Tv(e){return re.isPlainObject(e)||re.isArray(e)}function RO(e){return re.endsWith(e,"[]")?e.slice(0,-2):e}function AO(e,t,n){return e?e.concat(t).map(function(i,a){return i=RO(i),!n&&a?"["+i+"]":i}).join(n?".":""):t}function nre(e){return re.isArray(e)&&!e.some(Tv)}const rre=re.toFlatObject(re,{},null,function(t){return/^is[A-Z]/.test(t)});function ire(e){return e&&re.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function qc(e,t,n){if(!re.isObject(e))throw new TypeError("target must be an object");t=t||new(tre||FormData),n=re.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,y){return!re.isUndefined(y[h])});const r=n.metaTokens,i=n.visitor||c,a=n.dots,o=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&ire(t);if(!re.isFunction(i))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(re.isDate(m))return m.toISOString();if(!u&&re.isBlob(m))throw new at("Blob is not supported. Use a Buffer instead.");return re.isArrayBuffer(m)||re.isTypedArray(m)?u&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function c(m,h,y){let v=m;if(m&&!y&&typeof m=="object"){if(re.endsWith(h,"{}"))h=r?h:h.slice(0,-2),m=JSON.stringify(m);else if(re.isArray(m)&&nre(m)||re.isFileList(m)||re.endsWith(h,"[]")&&(v=re.toArray(m)))return h=RO(h),v.forEach(function(w,k){!(re.isUndefined(w)||w===null)&&t.append(o===!0?AO([h],k,a):o===null?h:h+"[]",l(w))}),!1}return Tv(m)?!0:(t.append(AO(y,h,a),l(m)),!1)}const f=[],p=Object.assign(rre,{defaultVisitor:c,convertValue:l,isVisitable:Tv});function d(m,h){if(!re.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+h.join("."));f.push(m),re.forEach(m,function(v,b){(!(re.isUndefined(v)||v===null)&&i.call(t,v,re.isString(b)?b.trim():b,h,p))===!0&&d(v,h?h.concat(b):[b])}),f.pop()}}if(!re.isObject(e))throw new TypeError("data must be an object");return d(e),t}function PO(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Ov(e,t){this._pairs=[],e&&qc(e,this,t)}const DO=Ov.prototype;DO.append=function(t,n){this._pairs.push([t,n])},DO.toString=function(t){const n=t?function(r){return t.call(this,r,PO)}:PO;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function are(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function jO(e,t,n){if(!t)return e;const r=n&&n.encode||are,i=n&&n.serialize;let a;if(i?a=i(t,n):a=re.isURLSearchParams(t)?t.toString():new Ov(t,n).toString(r),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class NO{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){re.forEach(this.handlers,function(r){r!==null&&t(r)})}}const MO={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ore=typeof URLSearchParams<"u"?URLSearchParams:Ov,sre=FormData,lre=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),ure=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Sr={isBrowser:!0,classes:{URLSearchParams:ore,FormData:sre,Blob},isStandardBrowserEnv:lre,isStandardBrowserWebWorkerEnv:ure,protocols:["http","https","file","blob","url","data"]};function cre(e,t){return qc(e,new Sr.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,a){return Sr.isNode&&re.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function fre(e){return re.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function dre(e){const t={},n=Object.keys(e);let r;const i=n.length;let a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function FO(e){function t(n,r,i,a){let o=n[a++];const s=Number.isFinite(+o),u=a>=n.length;return o=!o&&re.isArray(i)?i.length:o,u?(re.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!s):((!i[o]||!re.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],a)&&re.isArray(i[o])&&(i[o]=dre(i[o])),!s)}if(re.isFormData(e)&&re.isFunction(e.entries)){const n={};return re.forEachEntry(e,(r,i)=>{t(fre(r),i,n,0)}),n}return null}const pre={"Content-Type":void 0};function hre(e,t,n){if(re.isString(e))try{return(t||JSON.parse)(e),re.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Va={transitional:MO,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,a=re.isObject(t);if(a&&re.isHTMLForm(t)&&(t=new FormData(t)),re.isFormData(t))return i&&i?JSON.stringify(FO(t)):t;if(re.isArrayBuffer(t)||re.isBuffer(t)||re.isStream(t)||re.isFile(t)||re.isBlob(t))return t;if(re.isArrayBufferView(t))return t.buffer;if(re.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return cre(t,this.formSerializer).toString();if((s=re.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return qc(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}return a||i?(n.setContentType("application/json",!1),hre(t)):t}],transformResponse:[function(t){const n=this.transitional||Va.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&re.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(o)throw s.name==="SyntaxError"?at.from(s,at.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Sr.classes.FormData,Blob:Sr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};re.forEach(["delete","get","head"],function(t){Va.headers[t]={}}),re.forEach(["post","put","patch"],function(t){Va.headers[t]=re.merge(pre)});const mre=re.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),vre=e=>{const t={};let n,r,i;return e&&e.split(`
174
- `).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&mre[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},LO=Symbol("internals");function Fs(e){return e&&String(e).trim().toLowerCase()}function Wc(e){return e===!1||e==null?e:re.isArray(e)?e.map(Wc):String(e)}function yre(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}function gre(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function BO(e,t,n,r){if(re.isFunction(r))return r.call(this,t,n);if(re.isString(t)){if(re.isString(r))return t.indexOf(r)!==-1;if(re.isRegExp(r))return r.test(t)}}function bre(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function wre(e,t){const n=re.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,a,o){return this[r].call(this,t,i,a,o)},configurable:!0})})}class Fn{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function a(s,u,l){const c=Fs(u);if(!c)throw new Error("header name must be a non-empty string");const f=re.findKey(i,c);(!f||i[f]===void 0||l===!0||l===void 0&&i[f]!==!1)&&(i[f||u]=Wc(s))}const o=(s,u)=>re.forEach(s,(l,c)=>a(l,c,u));return re.isPlainObject(t)||t instanceof this.constructor?o(t,n):re.isString(t)&&(t=t.trim())&&!gre(t)?o(vre(t),n):t!=null&&a(n,t,r),this}get(t,n){if(t=Fs(t),t){const r=re.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return yre(i);if(re.isFunction(n))return n.call(this,i,r);if(re.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Fs(t),t){const r=re.findKey(this,t);return!!(r&&(!n||BO(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function a(o){if(o=Fs(o),o){const s=re.findKey(r,o);s&&(!n||BO(r,r[s],s,n))&&(delete r[s],i=!0)}}return re.isArray(t)?t.forEach(a):a(t),i}clear(){return Object.keys(this).forEach(this.delete.bind(this))}normalize(t){const n=this,r={};return re.forEach(this,(i,a)=>{const o=re.findKey(r,a);if(o){n[o]=Wc(i),delete n[a];return}const s=t?bre(a):String(a).trim();s!==a&&delete n[a],n[s]=Wc(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return re.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&re.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
175
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[LO]=this[LO]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=Fs(o);r[s]||(wre(i,o),r[s]=!0)}return re.isArray(t)?t.forEach(a):a(t),this}}Fn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),re.freezeMethods(Fn.prototype),re.freezeMethods(Fn);function Cv(e,t){const n=this||Va,r=t||n,i=Fn.from(r.headers);let a=r.data;return re.forEach(e,function(s){a=s.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function UO(e){return!!(e&&e.__CANCEL__)}function Ls(e,t,n){at.call(this,e??"canceled",at.ERR_CANCELED,t,n),this.name="CanceledError"}re.inherits(Ls,at,{__CANCEL__:!0});const xre=null;function Sre(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new at("Request failed with status code "+n.status,[at.ERR_BAD_REQUEST,at.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Ere=Sr.isStandardBrowserEnv?function(){return{write:function(n,r,i,a,o,s){const u=[];u.push(n+"="+encodeURIComponent(r)),re.isNumber(i)&&u.push("expires="+new Date(i).toGMTString()),re.isString(a)&&u.push("path="+a),re.isString(o)&&u.push("domain="+o),s===!0&&u.push("secure"),document.cookie=u.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function _re(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function kre(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function zO(e,t){return e&&!_re(t)?kre(e,t):t}const Tre=Sr.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(a){let o=a;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(o){const s=re.isString(o)?i(o):o;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();function Ore(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Cre(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(u){const l=Date.now(),c=r[a];o||(o=l),n[i]=u,r[i]=l;let f=a,p=0;for(;f!==i;)p+=n[f++],f=f%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),l-o<t)return;const d=c&&l-c;return d?Math.round(p*1e3/d):void 0}}function qO(e,t){let n=0;const r=Cre(50,250);return i=>{const a=i.loaded,o=i.lengthComputable?i.total:void 0,s=a-n,u=r(s),l=a<=o;n=a;const c={loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:u||void 0,estimated:u&&o&&l?(o-a)/u:void 0,event:i};c[t?"download":"upload"]=!0,e(c)}}const Vc={http:xre,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let i=e.data;const a=Fn.from(e.headers).normalize(),o=e.responseType;let s;function u(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}re.isFormData(i)&&(Sr.isStandardBrowserEnv||Sr.isStandardBrowserWebWorkerEnv)&&a.setContentType(!1);let l=new XMLHttpRequest;if(e.auth){const d=e.auth.username||"",m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(d+":"+m))}const c=zO(e.baseURL,e.url);l.open(e.method.toUpperCase(),jO(c,e.params,e.paramsSerializer),!0),l.timeout=e.timeout;function f(){if(!l)return;const d=Fn.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),h={data:!o||o==="text"||o==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:d,config:e,request:l};Sre(function(v){n(v),u()},function(v){r(v),u()},h),l=null}if("onloadend"in l?l.onloadend=f:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(f)},l.onabort=function(){l&&(r(new at("Request aborted",at.ECONNABORTED,e,l)),l=null)},l.onerror=function(){r(new at("Network Error",at.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let m=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const h=e.transitional||MO;e.timeoutErrorMessage&&(m=e.timeoutErrorMessage),r(new at(m,h.clarifyTimeoutError?at.ETIMEDOUT:at.ECONNABORTED,e,l)),l=null},Sr.isStandardBrowserEnv){const d=(e.withCredentials||Tre(c))&&e.xsrfCookieName&&Ere.read(e.xsrfCookieName);d&&a.set(e.xsrfHeaderName,d)}i===void 0&&a.setContentType(null),"setRequestHeader"in l&&re.forEach(a.toJSON(),function(m,h){l.setRequestHeader(h,m)}),re.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),o&&o!=="json"&&(l.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&l.addEventListener("progress",qO(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",qO(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=d=>{l&&(r(!d||d.type?new Ls(null,e,l):d),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const p=Ore(c);if(p&&Sr.protocols.indexOf(p)===-1){r(new at("Unsupported protocol "+p+":",at.ERR_BAD_REQUEST,e));return}l.send(i||null)})}};re.forEach(Vc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const $re={getAdapter:e=>{e=re.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let i=0;i<t&&(n=e[i],!(r=re.isString(n)?Vc[n.toLowerCase()]:n));i++);if(!r)throw r===!1?new at(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(re.hasOwnProp(Vc,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!re.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:Vc};function $v(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ls(null,e)}function WO(e){return $v(e),e.headers=Fn.from(e.headers),e.data=Cv.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),$re.getAdapter(e.adapter||Va.adapter)(e).then(function(r){return $v(e),r.data=Cv.call(e,e.transformResponse,r),r.headers=Fn.from(r.headers),r},function(r){return UO(r)||($v(e),r&&r.response&&(r.response.data=Cv.call(e,e.transformResponse,r.response),r.response.headers=Fn.from(r.response.headers))),Promise.reject(r)})}const VO=e=>e instanceof Fn?e.toJSON():e;function Ha(e,t){t=t||{};const n={};function r(l,c,f){return re.isPlainObject(l)&&re.isPlainObject(c)?re.merge.call({caseless:f},l,c):re.isPlainObject(c)?re.merge({},c):re.isArray(c)?c.slice():c}function i(l,c,f){if(re.isUndefined(c)){if(!re.isUndefined(l))return r(void 0,l,f)}else return r(l,c,f)}function a(l,c){if(!re.isUndefined(c))return r(void 0,c)}function o(l,c){if(re.isUndefined(c)){if(!re.isUndefined(l))return r(void 0,l)}else return r(void 0,c)}function s(l,c,f){if(f in t)return r(l,c);if(f in e)return r(void 0,l)}const u={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(l,c)=>i(VO(l),VO(c),!0)};return re.forEach(Object.keys(e).concat(Object.keys(t)),function(c){const f=u[c]||i,p=f(e[c],t[c],c);re.isUndefined(p)&&f!==s||(n[c]=p)}),n}const HO="1.2.5",Iv={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Iv[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ZO={};Iv.transitional=function(t,n,r){function i(a,o){return"[Axios v"+HO+"] Transitional option '"+a+"'"+o+(r?". "+r:"")}return(a,o,s)=>{if(t===!1)throw new at(i(o," has been removed"+(n?" in "+n:"")),at.ERR_DEPRECATED);return n&&!ZO[o]&&(ZO[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,o,s):!0}};function Ire(e,t,n){if(typeof e!="object")throw new at("options must be an object",at.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const a=r[i],o=t[a];if(o){const s=e[a],u=s===void 0||o(s,a,e);if(u!==!0)throw new at("option "+a+" must be "+u,at.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new at("Unknown option "+a,at.ERR_BAD_OPTION)}}const Rv={assertOptions:Ire,validators:Iv},mi=Rv.validators;class Wi{constructor(t){this.defaults=t,this.interceptors={request:new NO,response:new NO}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ha(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:a}=n;r!==void 0&&Rv.assertOptions(r,{silentJSONParsing:mi.transitional(mi.boolean),forcedJSONParsing:mi.transitional(mi.boolean),clarifyTimeoutError:mi.transitional(mi.boolean)},!1),i!==void 0&&Rv.assertOptions(i,{encode:mi.function,serialize:mi.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o;o=a&&re.merge(a.common,a[n.method]),o&&re.forEach(["delete","get","head","post","put","patch","common"],m=>{delete a[m]}),n.headers=Fn.concat(o,a);const s=[];let u=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(u=u&&h.synchronous,s.unshift(h.fulfilled,h.rejected))});const l=[];this.interceptors.response.forEach(function(h){l.push(h.fulfilled,h.rejected)});let c,f=0,p;if(!u){const m=[WO.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,l),p=m.length,c=Promise.resolve(n);f<p;)c=c.then(m[f++],m[f++]);return c}p=s.length;let d=n;for(f=0;f<p;){const m=s[f++],h=s[f++];try{d=m(d)}catch(y){h.call(this,y);break}}try{c=WO.call(this,d)}catch(m){return Promise.reject(m)}for(f=0,p=l.length;f<p;)c=c.then(l[f++],l[f++]);return c}getUri(t){t=Ha(this.defaults,t);const n=zO(t.baseURL,t.url);return jO(n,t.params,t.paramsSerializer)}}re.forEach(["delete","get","head","options"],function(t){Wi.prototype[t]=function(n,r){return this.request(Ha(r||{},{method:t,url:n,data:(r||{}).data}))}}),re.forEach(["post","put","patch"],function(t){function n(r){return function(a,o,s){return this.request(Ha(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}Wi.prototype[t]=n(),Wi.prototype[t+"Form"]=n(!0)});class Av{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(i=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](i);r._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(s=>{r.subscribe(s),a=s}).then(i);return o.cancel=function(){r.unsubscribe(a)},o},t(function(a,o,s){r.reason||(r.reason=new Ls(a,o,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Av(function(i){t=i}),cancel:t}}}function Rre(e){return function(n){return e.apply(null,n)}}function Are(e){return re.isObject(e)&&e.isAxiosError===!0}const Pv={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Pv).forEach(([e,t])=>{Pv[t]=e});function KO(e){const t=new Wi(e),n=wO(Wi.prototype.request,t);return re.extend(n,Wi.prototype,t,{allOwnKeys:!0}),re.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return KO(Ha(e,i))},n}const Ft=KO(Va);Ft.Axios=Wi,Ft.CanceledError=Ls,Ft.CancelToken=Av,Ft.isCancel=UO,Ft.VERSION=HO,Ft.toFormData=qc,Ft.AxiosError=at,Ft.Cancel=Ft.CanceledError,Ft.all=function(t){return Promise.all(t)},Ft.spread=Rre,Ft.isAxiosError=Are,Ft.mergeConfig=Ha,Ft.AxiosHeaders=Fn,Ft.formToJSON=e=>FO(re.isHTMLForm(e)?new FormData(e):e),Ft.HttpStatusCode=Pv,Ft.default=Ft;const GO={},Pre=Object.freeze(Object.defineProperty({__proto__:null,default:GO},Symbol.toStringTag,{value:"Module"}));var YO=Object,Dre=Error,jre=EvalError,Nre=RangeError,Mre=ReferenceError,JO=SyntaxError,Za=TypeError,Fre=URIError,Lre=Math.abs,Bre=Math.floor,Ure=Math.max,zre=Math.min,qre=Math.pow,Wre=Math.round,Vre=Number.isNaN||function(t){return t!==t},Hre=Vre,Zre=function(t){return Hre(t)||t===0?t:t<0?-1:1},Kre=Object.getOwnPropertyDescriptor,Hc=Kre;if(Hc)try{Hc([],"length")}catch{Hc=null}var Zc=Hc,Kc=Object.defineProperty||!1;if(Kc)try{Kc({},"a",{value:1})}catch{Kc=!1}var Gc=Kc,Dv,XO;function Gre(){return XO||(XO=1,Dv=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;t[n]=i;for(var a in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==i||s.enumerable!==!0)return!1}return!0}),Dv}var jv,QO;function Yre(){if(QO)return jv;QO=1;var e=typeof Symbol<"u"&&Symbol,t=Gre();return jv=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},jv}var Nv,eC;function tC(){return eC||(eC=1,Nv=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Nv}var Mv,nC;function rC(){if(nC)return Mv;nC=1;var e=YO;return Mv=e.getPrototypeOf||null,Mv}var Jre="Function.prototype.bind called on incompatible ",Xre=Object.prototype.toString,Qre=Math.max,eie="[object Function]",iC=function(t,n){for(var r=[],i=0;i<t.length;i+=1)r[i]=t[i];for(var a=0;a<n.length;a+=1)r[a+t.length]=n[a];return r},tie=function(t,n){for(var r=[],i=n,a=0;i<t.length;i+=1,a+=1)r[a]=t[i];return r},nie=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},rie=function(t){var n=this;if(typeof n!="function"||Xre.apply(n)!==eie)throw new TypeError(Jre+n);for(var r=tie(arguments,1),i,a=function(){if(this instanceof i){var c=n.apply(this,iC(r,arguments));return Object(c)===c?c:this}return n.apply(t,iC(r,arguments))},o=Qre(0,n.length-r.length),s=[],u=0;u<o;u++)s[u]="$"+u;if(i=Function("binder","return function ("+nie(s,",")+"){ return binder.apply(this,arguments); }")(a),n.prototype){var l=function(){};l.prototype=n.prototype,i.prototype=new l,l.prototype=null}return i},iie=rie,Bs=Function.prototype.bind||iie,Fv,aC;function Lv(){return aC||(aC=1,Fv=Function.prototype.call),Fv}var Bv,oC;function sC(){return oC||(oC=1,Bv=Function.prototype.apply),Bv}var Uv,lC;function aie(){return lC||(lC=1,Uv=typeof Reflect<"u"&&Reflect&&Reflect.apply),Uv}var zv,uC;function oie(){if(uC)return zv;uC=1;var e=Bs,t=sC(),n=Lv(),r=aie();return zv=r||e.call(n,t),zv}var qv,cC;function sie(){if(cC)return qv;cC=1;var e=Bs,t=Za,n=Lv(),r=oie();return qv=function(a){if(a.length<1||typeof a[0]!="function")throw new t("a function is required");return r(e,n,a)},qv}var Wv,fC;function lie(){if(fC)return Wv;fC=1;var e=sie(),t=Zc,n;try{n=[].__proto__===Array.prototype}catch(o){if(!o||typeof o!="object"||!("code"in o)||o.code!=="ERR_PROTO_ACCESS")throw o}var r=!!n&&t&&t(Object.prototype,"__proto__"),i=Object,a=i.getPrototypeOf;return Wv=r&&typeof r.get=="function"?e([r.get]):typeof a=="function"?function(s){return a(s==null?s:i(s))}:!1,Wv}var Vv,dC;function uie(){if(dC)return Vv;dC=1;var e=tC(),t=rC(),n=lie();return Vv=e?function(i){return e(i)}:t?function(i){if(!i||typeof i!="object"&&typeof i!="function")throw new TypeError("getProto: not an object");return t(i)}:n?function(i){return n(i)}:null,Vv}var Hv,pC;function cie(){if(pC)return Hv;pC=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Bs;return Hv=n.call(e,t),Hv}var Je,fie=YO,die=Dre,pie=jre,hie=Nre,mie=Mre,Ka=JO,Ga=Za,vie=Fre,yie=Lre,gie=Bre,bie=Ure,wie=zre,xie=qre,Sie=Wre,Eie=Zre,hC=Function,Zv=function(e){try{return hC('"use strict"; return ('+e+").constructor;")()}catch{}},Us=Zc,_ie=Gc,Kv=function(){throw new Ga},kie=Us?function(){try{return arguments.callee,Kv}catch{try{return Us(arguments,"callee").get}catch{return Kv}}}():Kv,Ya=Yre()(),Gt=uie(),Tie=rC(),Oie=tC(),mC=sC(),zs=Lv(),Ja={},Cie=typeof Uint8Array>"u"||!Gt?Je:Gt(Uint8Array),Vi={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Je:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Je:ArrayBuffer,"%ArrayIteratorPrototype%":Ya&&Gt?Gt([][Symbol.iterator]()):Je,"%AsyncFromSyncIteratorPrototype%":Je,"%AsyncFunction%":Ja,"%AsyncGenerator%":Ja,"%AsyncGeneratorFunction%":Ja,"%AsyncIteratorPrototype%":Ja,"%Atomics%":typeof Atomics>"u"?Je:Atomics,"%BigInt%":typeof BigInt>"u"?Je:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Je:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Je:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Je:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":die,"%eval%":eval,"%EvalError%":pie,"%Float32Array%":typeof Float32Array>"u"?Je:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Je:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Je:FinalizationRegistry,"%Function%":hC,"%GeneratorFunction%":Ja,"%Int8Array%":typeof Int8Array>"u"?Je:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Je:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Je:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ya&&Gt?Gt(Gt([][Symbol.iterator]())):Je,"%JSON%":typeof JSON=="object"?JSON:Je,"%Map%":typeof Map>"u"?Je:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ya||!Gt?Je:Gt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":fie,"%Object.getOwnPropertyDescriptor%":Us,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Je:Promise,"%Proxy%":typeof Proxy>"u"?Je:Proxy,"%RangeError%":hie,"%ReferenceError%":mie,"%Reflect%":typeof Reflect>"u"?Je:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Je:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ya||!Gt?Je:Gt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Je:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ya&&Gt?Gt(""[Symbol.iterator]()):Je,"%Symbol%":Ya?Symbol:Je,"%SyntaxError%":Ka,"%ThrowTypeError%":kie,"%TypedArray%":Cie,"%TypeError%":Ga,"%Uint8Array%":typeof Uint8Array>"u"?Je:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Je:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Je:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Je:Uint32Array,"%URIError%":vie,"%WeakMap%":typeof WeakMap>"u"?Je:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Je:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Je:WeakSet,"%Function.prototype.call%":zs,"%Function.prototype.apply%":mC,"%Object.defineProperty%":_ie,"%Object.getPrototypeOf%":Tie,"%Math.abs%":yie,"%Math.floor%":gie,"%Math.max%":bie,"%Math.min%":wie,"%Math.pow%":xie,"%Math.round%":Sie,"%Math.sign%":Eie,"%Reflect.getPrototypeOf%":Oie};if(Gt)try{null.error}catch(e){var $ie=Gt(Gt(e));Vi["%Error.prototype%"]=$ie}var Iie=function e(t){var n;if(t==="%AsyncFunction%")n=Zv("async function () {}");else if(t==="%GeneratorFunction%")n=Zv("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=Zv("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Gt&&(n=Gt(i.prototype))}return Vi[t]=n,n},vC={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},qs=Bs,Yc=cie(),Rie=qs.call(zs,Array.prototype.concat),Aie=qs.call(mC,Array.prototype.splice),yC=qs.call(zs,String.prototype.replace),Jc=qs.call(zs,String.prototype.slice),Pie=qs.call(zs,RegExp.prototype.exec),Die=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,jie=/\\(\\)?/g,Nie=function(t){var n=Jc(t,0,1),r=Jc(t,-1);if(n==="%"&&r!=="%")throw new Ka("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Ka("invalid intrinsic syntax, expected opening `%`");var i=[];return yC(t,Die,function(a,o,s,u){i[i.length]=s?yC(u,jie,"$1"):o||a}),i},Mie=function(t,n){var r=t,i;if(Yc(vC,r)&&(i=vC[r],r="%"+i[0]+"%"),Yc(Vi,r)){var a=Vi[r];if(a===Ja&&(a=Iie(r)),typeof a>"u"&&!n)throw new Ga("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:a}}throw new Ka("intrinsic "+t+" does not exist!")},Xc=function(t,n){if(typeof t!="string"||t.length===0)throw new Ga("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Ga('"allowMissing" argument must be a boolean');if(Pie(/^%?[^%]*%?$/,t)===null)throw new Ka("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Nie(t),i=r.length>0?r[0]:"",a=Mie("%"+i+"%",n),o=a.name,s=a.value,u=!1,l=a.alias;l&&(i=l[0],Aie(r,Rie([0,1],l)));for(var c=1,f=!0;c<r.length;c+=1){var p=r[c],d=Jc(p,0,1),m=Jc(p,-1);if((d==='"'||d==="'"||d==="`"||m==='"'||m==="'"||m==="`")&&d!==m)throw new Ka("property names with quotes must have matching quotes");if((p==="constructor"||!f)&&(u=!0),i+="."+p,o="%"+i+"%",Yc(Vi,o))s=Vi[o];else if(s!=null){if(!(p in s)){if(!n)throw new Ga("base intrinsic for "+t+" exists, but the property is not available.");return}if(Us&&c+1>=r.length){var h=Us(s,p);f=!!h,f&&"get"in h&&!("originalValue"in h.get)?s=h.get:s=s[p]}else f=Yc(s,p),s=s[p];f&&!u&&(Vi[o]=s)}}return s},gC={exports:{}},bC=Gc,Fie=JO,Xa=Za,wC=Zc,Lie=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Xa("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Xa("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Xa("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Xa("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Xa("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Xa("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,u=!!wC&&wC(t,n);if(bC)bC(t,n,{configurable:o===null&&u?u.configurable:!o,enumerable:i===null&&u?u.enumerable:!i,value:r,writable:a===null&&u?u.writable:!a});else if(s||!i&&!a&&!o)t[n]=r;else throw new Fie("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Gv=Gc,xC=function(){return!!Gv};xC.hasArrayLengthDefineBug=function(){if(!Gv)return null;try{return Gv([],"length",{value:1}).length!==1}catch{return!0}};var Bie=xC,Uie=Xc,SC=Lie,zie=Bie(),EC=Zc,_C=Za,qie=Uie("%Math.floor%"),Wie=function(t,n){if(typeof t!="function")throw new _C("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||qie(n)!==n)throw new _C("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],i=!0,a=!0;if("length"in t&&EC){var o=EC(t,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(a=!1)}return(i||a||!r)&&(zie?SC(t,"length",n,!0,!0):SC(t,"length",n)),t};(function(e){var t=Bs,n=Xc,r=Wie,i=Za,a=n("%Function.prototype.apply%"),o=n("%Function.prototype.call%"),s=n("%Reflect.apply%",!0)||t.call(o,a),u=Gc,l=n("%Math.max%");e.exports=function(p){if(typeof p!="function")throw new i("a function is required");var d=s(t,o,arguments);return r(d,1+l(0,p.length-(arguments.length-1)),!0)};var c=function(){return s(t,a,arguments)};u?u(e.exports,"apply",{value:c}):e.exports.apply=c})(gC);var Vie=gC.exports,kC=Xc,TC=Vie,Hie=TC(kC("String.prototype.indexOf")),Zie=function(t,n){var r=kC(t,!!n);return typeof r=="function"&&Hie(t,".prototype.")>-1?TC(r):r};const Kie=B$(Pre);var Yv=typeof Map=="function"&&Map.prototype,Jv=Object.getOwnPropertyDescriptor&&Yv?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Qc=Yv&&Jv&&typeof Jv.get=="function"?Jv.get:null,OC=Yv&&Map.prototype.forEach,Xv=typeof Set=="function"&&Set.prototype,Qv=Object.getOwnPropertyDescriptor&&Xv?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ef=Xv&&Qv&&typeof Qv.get=="function"?Qv.get:null,CC=Xv&&Set.prototype.forEach,Gie=typeof WeakMap=="function"&&WeakMap.prototype,Ws=Gie?WeakMap.prototype.has:null,Yie=typeof WeakSet=="function"&&WeakSet.prototype,Vs=Yie?WeakSet.prototype.has:null,Jie=typeof WeakRef=="function"&&WeakRef.prototype,$C=Jie?WeakRef.prototype.deref:null,Xie=Boolean.prototype.valueOf,Qie=Object.prototype.toString,eae=Function.prototype.toString,tae=String.prototype.match,ey=String.prototype.slice,vi=String.prototype.replace,nae=String.prototype.toUpperCase,IC=String.prototype.toLowerCase,RC=RegExp.prototype.test,AC=Array.prototype.concat,Er=Array.prototype.join,rae=Array.prototype.slice,PC=Math.floor,ty=typeof BigInt=="function"?BigInt.prototype.valueOf:null,ny=Object.getOwnPropertySymbols,ry=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Qa=typeof Symbol=="function"&&typeof Symbol.iterator=="object",sn=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Qa||!0)?Symbol.toStringTag:null,DC=Object.prototype.propertyIsEnumerable,jC=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function NC(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||RC.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-PC(-e):PC(e);if(r!==e){var i=String(r),a=ey.call(t,i.length+1);return vi.call(i,n,"$&_")+"."+vi.call(vi.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return vi.call(t,n,"$&_")}var iy=Kie,MC=iy.custom,FC=UC(MC)?MC:null,iae=function e(t,n,r,i){var a=n||{};if(yi(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(yi(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=yi(a,"customInspect")?a.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(yi(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(yi(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=a.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return qC(t,a);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var u=String(t);return s?NC(t,u):u}if(typeof t=="bigint"){var l=String(t)+"n";return s?NC(t,l):l}var c=typeof a.depth>"u"?5:a.depth;if(typeof r>"u"&&(r=0),r>=c&&c>0&&typeof t=="object")return ay(t)?"[Array]":"[Object]";var f=Sae(a,r);if(typeof i>"u")i=[];else if(zC(i,t)>=0)return"[Circular]";function p(F,L,N){if(L&&(i=rae.call(i),i.push(L)),N){var q={depth:a.depth};return yi(a,"quoteStyle")&&(q.quoteStyle=a.quoteStyle),e(F,q,r+1,i)}return e(F,a,r+1,i)}if(typeof t=="function"&&!BC(t)){var d=pae(t),m=tf(t,p);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(m.length>0?" { "+Er.call(m,", ")+" }":"")}if(UC(t)){var h=Qa?vi.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):ry.call(t);return typeof t=="object"&&!Qa?Hs(h):h}if(bae(t)){for(var y="<"+IC.call(String(t.nodeName)),v=t.attributes||[],b=0;b<v.length;b++)y+=" "+v[b].name+"="+LC(aae(v[b].value),"double",a);return y+=">",t.childNodes&&t.childNodes.length&&(y+="..."),y+="</"+IC.call(String(t.nodeName))+">",y}if(ay(t)){if(t.length===0)return"[]";var w=tf(t,p);return f&&!xae(w)?"["+sy(w,f)+"]":"[ "+Er.call(w,", ")+" ]"}if(sae(t)){var k=tf(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!DC.call(t,"cause")?"{ ["+String(t)+"] "+Er.call(AC.call("[cause]: "+p(t.cause),k),", ")+" }":k.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Er.call(k,", ")+" }"}if(typeof t=="object"&&o){if(FC&&typeof t[FC]=="function"&&iy)return iy(t,{depth:c-r});if(o!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(hae(t)){var E=[];return OC&&OC.call(t,function(F,L){E.push(p(L,t,!0)+" => "+p(F,t))}),WC("Map",Qc.call(t),E,f)}if(yae(t)){var _=[];return CC&&CC.call(t,function(F){_.push(p(F,t))}),WC("Set",ef.call(t),_,f)}if(mae(t))return oy("WeakMap");if(gae(t))return oy("WeakSet");if(vae(t))return oy("WeakRef");if(uae(t))return Hs(p(Number(t)));if(fae(t))return Hs(p(ty.call(t)));if(cae(t))return Hs(Xie.call(t));if(lae(t))return Hs(p(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof mt<"u"&&t===mt)return"{ [object globalThis] }";if(!oae(t)&&!BC(t)){var C=tf(t,p),z=jC?jC(t)===Object.prototype:t instanceof Object||t.constructor===Object,B=t instanceof Object?"":"null prototype",T=!z&&sn&&Object(t)===t&&sn in t?ey.call(gi(t),8,-1):B?"Object":"",A=z||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",W=A+(T||B?"["+Er.call(AC.call([],T||[],B||[]),": ")+"] ":"");return C.length===0?W+"{}":f?W+"{"+sy(C,f)+"}":W+"{ "+Er.call(C,", ")+" }"}return String(t)};function LC(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function aae(e){return vi.call(String(e),/"/g,"&quot;")}function ay(e){return gi(e)==="[object Array]"&&(!sn||!(typeof e=="object"&&sn in e))}function oae(e){return gi(e)==="[object Date]"&&(!sn||!(typeof e=="object"&&sn in e))}function BC(e){return gi(e)==="[object RegExp]"&&(!sn||!(typeof e=="object"&&sn in e))}function sae(e){return gi(e)==="[object Error]"&&(!sn||!(typeof e=="object"&&sn in e))}function lae(e){return gi(e)==="[object String]"&&(!sn||!(typeof e=="object"&&sn in e))}function uae(e){return gi(e)==="[object Number]"&&(!sn||!(typeof e=="object"&&sn in e))}function cae(e){return gi(e)==="[object Boolean]"&&(!sn||!(typeof e=="object"&&sn in e))}function UC(e){if(Qa)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!ry)return!1;try{return ry.call(e),!0}catch{}return!1}function fae(e){if(!e||typeof e!="object"||!ty)return!1;try{return ty.call(e),!0}catch{}return!1}var dae=Object.prototype.hasOwnProperty||function(e){return e in this};function yi(e,t){return dae.call(e,t)}function gi(e){return Qie.call(e)}function pae(e){if(e.name)return e.name;var t=tae.call(eae.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function zC(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function hae(e){if(!Qc||!e||typeof e!="object")return!1;try{Qc.call(e);try{ef.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function mae(e){if(!Ws||!e||typeof e!="object")return!1;try{Ws.call(e,Ws);try{Vs.call(e,Vs)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function vae(e){if(!$C||!e||typeof e!="object")return!1;try{return $C.call(e),!0}catch{}return!1}function yae(e){if(!ef||!e||typeof e!="object")return!1;try{ef.call(e);try{Qc.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function gae(e){if(!Vs||!e||typeof e!="object")return!1;try{Vs.call(e,Vs);try{Ws.call(e,Ws)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function bae(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function qC(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return qC(ey.call(e,0,t.maxStringLength),t)+r}var i=vi.call(vi.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,wae);return LC(i,"single",t)}function wae(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+nae.call(t.toString(16))}function Hs(e){return"Object("+e+")"}function oy(e){return e+" { ? }"}function WC(e,t,n,r){var i=r?sy(n,r):Er.call(n,", ");return e+" ("+t+") {"+i+"}"}function xae(e){for(var t=0;t<e.length;t++)if(zC(e[t],`
176
- `)>=0)return!1;return!0}function Sae(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=Er.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Er.call(Array(t+1),n)}}function sy(e,t){if(e.length===0)return"";var n=`
177
- `+t.prev+t.base;return n+Er.call(e,","+n)+`
178
- `+t.prev}function tf(e,t){var n=ay(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=yi(e,i)?t(e[i],e):""}var a=typeof ny=="function"?ny(e):[],o;if(Qa){o={};for(var s=0;s<a.length;s++)o["$"+a[s]]=a[s]}for(var u in e)yi(e,u)&&(n&&String(Number(u))===u&&u<e.length||Qa&&o["$"+u]instanceof Symbol||(RC.call(/[^\w$]/,u)?r.push(t(u,e)+": "+t(e[u],e)):r.push(u+": "+t(e[u],e))));if(typeof ny=="function")for(var l=0;l<a.length;l++)DC.call(e,a[l])&&r.push("["+t(a[l])+"]: "+t(e[a[l]],e));return r}var VC=Xc,eo=Zie,Eae=iae,_ae=Za,nf=VC("%WeakMap%",!0),rf=VC("%Map%",!0),kae=eo("WeakMap.prototype.get",!0),Tae=eo("WeakMap.prototype.set",!0),Oae=eo("WeakMap.prototype.has",!0),Cae=eo("Map.prototype.get",!0),$ae=eo("Map.prototype.set",!0),Iae=eo("Map.prototype.has",!0),ly=function(e,t){for(var n=e,r;(r=n.next)!==null;n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},Rae=function(e,t){var n=ly(e,t);return n&&n.value},Aae=function(e,t,n){var r=ly(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},Pae=function(e,t){return!!ly(e,t)},Dae=function(){var t,n,r,i={assert:function(a){if(!i.has(a))throw new _ae("Side channel does not contain "+Eae(a))},get:function(a){if(nf&&a&&(typeof a=="object"||typeof a=="function")){if(t)return kae(t,a)}else if(rf){if(n)return Cae(n,a)}else if(r)return Rae(r,a)},has:function(a){if(nf&&a&&(typeof a=="object"||typeof a=="function")){if(t)return Oae(t,a)}else if(rf){if(n)return Iae(n,a)}else if(r)return Pae(r,a);return!1},set:function(a,o){nf&&a&&(typeof a=="object"||typeof a=="function")?(t||(t=new nf),Tae(t,a,o)):rf?(n||(n=new rf),$ae(n,a,o)):(r||(r={key:{},next:null}),Aae(r,a,o))}};return i},jae=String.prototype.replace,Nae=/%20/g,uy={RFC1738:"RFC1738",RFC3986:"RFC3986"},cy={default:uy.RFC3986,formatters:{RFC1738:function(e){return jae.call(e,Nae,"+")},RFC3986:function(e){return String(e)}},RFC1738:uy.RFC1738,RFC3986:uy.RFC3986},Mae=cy,fy=Object.prototype.hasOwnProperty,Hi=Array.isArray,_r=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Fae=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Hi(r)){for(var i=[],a=0;a<r.length;++a)typeof r[a]<"u"&&i.push(r[a]);n.obj[n.prop]=i}}},HC=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},i=0;i<t.length;++i)typeof t[i]<"u"&&(r[i]=t[i]);return r},Lae=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Hi(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!fy.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var i=t;return Hi(t)&&!Hi(n)&&(i=HC(t,r)),Hi(t)&&Hi(n)?(n.forEach(function(a,o){if(fy.call(t,o)){var s=t[o];s&&typeof s=="object"&&a&&typeof a=="object"?t[o]=e(s,a,r):t.push(a)}else t[o]=a}),t):Object.keys(n).reduce(function(a,o){var s=n[o];return fy.call(a,o)?a[o]=e(a[o],s,r):a[o]=s,a},i)},Bae=function(t,n){return Object.keys(n).reduce(function(r,i){return r[i]=n[i],r},t)},Uae=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},dy=1024,zae=function(t,n,r,i,a){if(t.length===0)return t;var o=t;if(typeof t=="symbol"?o=Symbol.prototype.toString.call(t):typeof t!="string"&&(o=String(t)),r==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(d){return"%26%23"+parseInt(d.slice(2),16)+"%3B"});for(var s="",u=0;u<o.length;u+=dy){for(var l=o.length>=dy?o.slice(u,u+dy):o,c=[],f=0;f<l.length;++f){var p=l.charCodeAt(f);if(p===45||p===46||p===95||p===126||p>=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122||a===Mae.RFC1738&&(p===40||p===41)){c[c.length]=l.charAt(f);continue}if(p<128){c[c.length]=_r[p];continue}if(p<2048){c[c.length]=_r[192|p>>6]+_r[128|p&63];continue}if(p<55296||p>=57344){c[c.length]=_r[224|p>>12]+_r[128|p>>6&63]+_r[128|p&63];continue}f+=1,p=65536+((p&1023)<<10|l.charCodeAt(f)&1023),c[c.length]=_r[240|p>>18]+_r[128|p>>12&63]+_r[128|p>>6&63]+_r[128|p&63]}s+=c.join("")}return s},qae=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],i=0;i<n.length;++i)for(var a=n[i],o=a.obj[a.prop],s=Object.keys(o),u=0;u<s.length;++u){var l=s[u],c=o[l];typeof c=="object"&&c!==null&&r.indexOf(c)===-1&&(n.push({obj:o,prop:l}),r.push(c))}return Fae(n),t},Wae=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},Vae=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},Hae=function(t,n){return[].concat(t,n)},Zae=function(t,n){if(Hi(t)){for(var r=[],i=0;i<t.length;i+=1)r.push(n(t[i]));return r}return n(t)},ZC={arrayToObject:HC,assign:Bae,combine:Hae,compact:qae,decode:Uae,encode:zae,isBuffer:Vae,isRegExp:Wae,maybeMap:Zae,merge:Lae},KC=Dae,af=ZC,Zs=cy,Kae=Object.prototype.hasOwnProperty,GC={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},kr=Array.isArray,Gae=Array.prototype.push,YC=function(e,t){Gae.apply(e,kr(t)?t:[t])},Yae=Date.prototype.toISOString,JC=Zs.default,qt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:af.encode,encodeValuesOnly:!1,format:JC,formatter:Zs.formatters[JC],indices:!1,serializeDate:function(t){return Yae.call(t)},skipNulls:!1,strictNullHandling:!1},Jae=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},py={},Xae=function e(t,n,r,i,a,o,s,u,l,c,f,p,d,m,h,y,v,b){for(var w=t,k=b,E=0,_=!1;(k=k.get(py))!==void 0&&!_;){var C=k.get(t);if(E+=1,typeof C<"u"){if(C===E)throw new RangeError("Cyclic object value");_=!0}typeof k.get(py)>"u"&&(E=0)}if(typeof c=="function"?w=c(n,w):w instanceof Date?w=d(w):r==="comma"&&kr(w)&&(w=af.maybeMap(w,function(g){return g instanceof Date?d(g):g})),w===null){if(o)return l&&!y?l(n,qt.encoder,v,"key",m):n;w=""}if(Jae(w)||af.isBuffer(w)){if(l){var z=y?n:l(n,qt.encoder,v,"key",m);return[h(z)+"="+h(l(w,qt.encoder,v,"value",m))]}return[h(n)+"="+h(String(w))]}var B=[];if(typeof w>"u")return B;var T;if(r==="comma"&&kr(w))y&&l&&(w=af.maybeMap(w,l)),T=[{value:w.length>0?w.join(",")||null:void 0}];else if(kr(c))T=c;else{var A=Object.keys(w);T=f?A.sort(f):A}var W=u?n.replace(/\./g,"%2E"):n,F=i&&kr(w)&&w.length===1?W+"[]":W;if(a&&kr(w)&&w.length===0)return F+"[]";for(var L=0;L<T.length;++L){var N=T[L],q=typeof N=="object"&&typeof N.value<"u"?N.value:w[N];if(!(s&&q===null)){var Y=p&&u?N.replace(/\./g,"%2E"):N,H=kr(w)?typeof r=="function"?r(F,Y):F:F+(p?"."+Y:"["+Y+"]");b.set(t,E);var I=KC();I.set(py,b),YC(B,e(q,H,r,i,a,o,s,u,r==="comma"&&y&&kr(w)?null:l,c,f,p,d,m,h,y,v,I))}}return B},Qae=function(t){if(!t)return qt;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.encodeDotInKeys<"u"&&typeof t.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||qt.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=Zs.default;if(typeof t.format<"u"){if(!Kae.call(Zs.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var i=Zs.formatters[r],a=qt.filter;(typeof t.filter=="function"||kr(t.filter))&&(a=t.filter);var o;if(t.arrayFormat in GC?o=t.arrayFormat:"indices"in t?o=t.indices?"indices":"repeat":o=qt.arrayFormat,"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var s=typeof t.allowDots>"u"?t.encodeDotInKeys===!0?!0:qt.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:qt.addQueryPrefix,allowDots:s,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:qt.allowEmptyArrays,arrayFormat:o,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:qt.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?qt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:qt.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:qt.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:qt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:qt.encodeValuesOnly,filter:a,format:r,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:qt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:qt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:qt.strictNullHandling}},eoe=function(e,t){var n=e,r=Qae(t),i,a;typeof r.filter=="function"?(a=r.filter,n=a("",n)):kr(r.filter)&&(a=r.filter,i=a);var o=[];if(typeof n!="object"||n===null)return"";var s=GC[r.arrayFormat],u=s==="comma"&&r.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var l=KC(),c=0;c<i.length;++c){var f=i[c];r.skipNulls&&n[f]===null||YC(o,Xae(n[f],f,s,u,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,l))}var p=o.join(r.delimiter),d=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?d+="utf8=%26%2310003%3B&":d+="utf8=%E2%9C%93&"),p.length>0?d+p:""},to=ZC,hy=Object.prototype.hasOwnProperty,toe=Array.isArray,Rt={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:to.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},noe=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},XC=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},roe="utf8=%26%2310003%3B",ioe="utf8=%E2%9C%93",aoe=function(t,n){var r={__proto__:null},i=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;i=i.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=n.parameterLimit===1/0?void 0:n.parameterLimit,o=i.split(n.delimiter,a),s=-1,u,l=n.charset;if(n.charsetSentinel)for(u=0;u<o.length;++u)o[u].indexOf("utf8=")===0&&(o[u]===ioe?l="utf-8":o[u]===roe&&(l="iso-8859-1"),s=u,u=o.length);for(u=0;u<o.length;++u)if(u!==s){var c=o[u],f=c.indexOf("]="),p=f===-1?c.indexOf("="):f+1,d,m;p===-1?(d=n.decoder(c,Rt.decoder,l,"key"),m=n.strictNullHandling?null:""):(d=n.decoder(c.slice(0,p),Rt.decoder,l,"key"),m=to.maybeMap(XC(c.slice(p+1),n),function(y){return n.decoder(y,Rt.decoder,l,"value")})),m&&n.interpretNumericEntities&&l==="iso-8859-1"&&(m=noe(m)),c.indexOf("[]=")>-1&&(m=toe(m)?[m]:m);var h=hy.call(r,d);h&&n.duplicates==="combine"?r[d]=to.combine(r[d],m):(!h||n.duplicates==="last")&&(r[d]=m)}return r},ooe=function(e,t,n,r){for(var i=r?t:XC(t,n),a=e.length-1;a>=0;--a){var o,s=e[a];if(s==="[]"&&n.parseArrays)o=n.allowEmptyArrays&&(i===""||n.strictNullHandling&&i===null)?[]:[].concat(i);else{o=n.plainObjects?Object.create(null):{};var u=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,l=n.decodeDotInKeys?u.replace(/%2E/g,"."):u,c=parseInt(l,10);!n.parseArrays&&l===""?o={0:i}:!isNaN(c)&&s!==l&&String(c)===l&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(o=[],o[c]=i):l!=="__proto__"&&(o[l]=i)}i=o}return i},soe=function(t,n,r,i){if(t){var a=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,o=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,u=r.depth>0&&o.exec(a),l=u?a.slice(0,u.index):a,c=[];if(l){if(!r.plainObjects&&hy.call(Object.prototype,l)&&!r.allowPrototypes)return;c.push(l)}for(var f=0;r.depth>0&&(u=s.exec(a))!==null&&f<r.depth;){if(f+=1,!r.plainObjects&&hy.call(Object.prototype,u[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(u[1])}if(u){if(r.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");c.push("["+a.slice(u.index)+"]")}return ooe(c,n,r,i)}},loe=function(t){if(!t)return Rt;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof t.charset>"u"?Rt.charset:t.charset,r=typeof t.duplicates>"u"?Rt.duplicates:t.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var i=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:Rt.allowDots:!!t.allowDots;return{allowDots:i,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Rt.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Rt.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Rt.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Rt.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Rt.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Rt.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:Rt.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:Rt.decoder,delimiter:typeof t.delimiter=="string"||to.isRegExp(t.delimiter)?t.delimiter:Rt.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Rt.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Rt.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Rt.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Rt.plainObjects,strictDepth:typeof t.strictDepth=="boolean"?!!t.strictDepth:Rt.strictDepth,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Rt.strictNullHandling}},uoe=function(e,t){var n=loe(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?aoe(e,n):e,i=n.plainObjects?Object.create(null):{},a=Object.keys(r),o=0;o<a.length;++o){var s=a[o],u=soe(s,r[s],n,typeof e=="string");i=to.merge(i,u,n)}return n.allowSparse===!0?i:to.compact(i)},coe=eoe,foe=uoe,doe=cy,poe={formats:doe,parse:foe,stringify:coe};const hoe=Ge(poe);var my={exports:{}};/** @license
169
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var a=arguments[i];if(a){var o=typeof a;if(o==="string"||o==="number")r.push(a);else if(Array.isArray(a)){if(a.length){var s=n.apply(null,a);s&&r.push(s)}}else if(o==="object")if(a.toString===Object.prototype.toString)for(var u in a)t.call(a,u)&&a[u]&&r.push(u);else r.push(a.toString())}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})($k);var NZ=$k.exports;const jm=Ge(NZ);var Nm={exports:{}},Mm,Ik;function Fm(){if(Ik)return Mm;Ik=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Mm=e,Mm}var Lm,Rk;function MZ(){if(Rk)return Lm;Rk=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Fm(),n={},r=Function.call.bind(Object.prototype.hasOwnProperty);e=function(a){var o="Warning: "+a;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function i(a,o,s,u,l){if(process.env.NODE_ENV!=="production"){for(var c in a)if(r(a,c)){var f;try{if(typeof a[c]!="function"){var d=Error((u||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[c]+"`.");throw d.name="Invariant Violation",d}f=a[c](o,c,u,s,null,t)}catch(m){f=m}if(f&&!(f instanceof Error)&&e((u||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var p=l?l():"";e("Failed "+s+" type: "+f.message+(p??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Lm=i,Lm}var Bm,Ak;function FZ(){if(Ak)return Bm;Ak=1;var e=Uu(),t=h1(),n=Fm(),r=MZ(),i=Function.call.bind(Object.prototype.hasOwnProperty),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var u="Warning: "+s;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function o(){return null}return Bm=function(s,u){var l=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function f(R){var g=R&&(l&&R[l]||R[c]);if(typeof g=="function")return g}var d="<<anonymous>>",p={array:v("array"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:b(),arrayOf:w,element:T(),elementType:E(),instanceOf:_,node:k(),objectOf:z,oneOf:O,oneOfType:U,shape:D,exact:W};function m(R,g){return R===g?R!==0||1/R===1/g:R!==R&&g!==g}function h(R){this.message=R,this.stack=""}h.prototype=Error.prototype;function y(R){if(process.env.NODE_ENV!=="production")var g={},N=0;function V(K,J,Y,Q,ae,oe,X){if(Q=Q||d,oe=oe||Y,X!==n){if(u){var ee=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw ee.name="Invariant Violation",ee}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var G=Q+":"+Y;!g[G]&&N<3&&(a("You are manually calling a React.PropTypes validation function for the `"+oe+"` prop on `"+Q+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),g[G]=!0,N++)}}return J[Y]==null?K?J[Y]===null?new h("The "+ae+" `"+oe+"` is marked as required "+("in `"+Q+"`, but its value is `null`.")):new h("The "+ae+" `"+oe+"` is marked as required in "+("`"+Q+"`, but its value is `undefined`.")):null:R(J,Y,Q,ae,oe)}var S=V.bind(null,!1);return S.isRequired=V.bind(null,!0),S}function v(R){function g(N,V,S,K,J,Y){var Q=N[V],ae=A(Q);if(ae!==R){var oe=L(Q);return new h("Invalid "+K+" `"+J+"` of type "+("`"+oe+"` supplied to `"+S+"`, expected ")+("`"+R+"`."))}return null}return y(g)}function b(){return y(o)}function w(R){function g(N,V,S,K,J){if(typeof R!="function")return new h("Property `"+J+"` of component `"+S+"` has invalid PropType notation inside arrayOf.");var Y=N[V];if(!Array.isArray(Y)){var Q=A(Y);return new h("Invalid "+K+" `"+J+"` of type "+("`"+Q+"` supplied to `"+S+"`, expected an array."))}for(var ae=0;ae<Y.length;ae++){var oe=R(Y,ae,S,K,J+"["+ae+"]",n);if(oe instanceof Error)return oe}return null}return y(g)}function T(){function R(g,N,V,S,K){var J=g[N];if(!s(J)){var Y=A(J);return new h("Invalid "+S+" `"+K+"` of type "+("`"+Y+"` supplied to `"+V+"`, expected a single ReactElement."))}return null}return y(R)}function E(){function R(g,N,V,S,K){var J=g[N];if(!e.isValidElementType(J)){var Y=A(J);return new h("Invalid "+S+" `"+K+"` of type "+("`"+Y+"` supplied to `"+V+"`, expected a single ReactElement type."))}return null}return y(R)}function _(R){function g(N,V,S,K,J){if(!(N[V]instanceof R)){var Y=R.name||d,Q=H(N[V]);return new h("Invalid "+K+" `"+J+"` of type "+("`"+Q+"` supplied to `"+S+"`, expected ")+("instance of `"+Y+"`."))}return null}return y(g)}function O(R){if(!Array.isArray(R))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),o;function g(N,V,S,K,J){for(var Y=N[V],Q=0;Q<R.length;Q++)if(m(Y,R[Q]))return null;var ae=JSON.stringify(R,function(X,ee){var G=L(ee);return G==="symbol"?String(ee):ee});return new h("Invalid "+K+" `"+J+"` of value `"+String(Y)+"` "+("supplied to `"+S+"`, expected one of "+ae+"."))}return y(g)}function z(R){function g(N,V,S,K,J){if(typeof R!="function")return new h("Property `"+J+"` of component `"+S+"` has invalid PropType notation inside objectOf.");var Y=N[V],Q=A(Y);if(Q!=="object")return new h("Invalid "+K+" `"+J+"` of type "+("`"+Q+"` supplied to `"+S+"`, expected an object."));for(var ae in Y)if(i(Y,ae)){var oe=R(Y,ae,S,K,J+"."+ae,n);if(oe instanceof Error)return oe}return null}return y(g)}function U(R){if(!Array.isArray(R))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var g=0;g<R.length;g++){var N=R[g];if(typeof N!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Z(N)+" at index "+g+"."),o}function V(S,K,J,Y,Q){for(var ae=0;ae<R.length;ae++){var oe=R[ae];if(oe(S,K,J,Y,Q,n)==null)return null}return new h("Invalid "+Y+" `"+Q+"` supplied to "+("`"+J+"`."))}return y(V)}function k(){function R(g,N,V,S,K){return B(g[N])?null:new h("Invalid "+S+" `"+K+"` supplied to "+("`"+V+"`, expected a ReactNode."))}return y(R)}function D(R){function g(N,V,S,K,J){var Y=N[V],Q=A(Y);if(Q!=="object")return new h("Invalid "+K+" `"+J+"` of type `"+Q+"` "+("supplied to `"+S+"`, expected `object`."));for(var ae in R){var oe=R[ae];if(oe){var X=oe(Y,ae,S,K,J+"."+ae,n);if(X)return X}}return null}return y(g)}function W(R){function g(N,V,S,K,J){var Y=N[V],Q=A(Y);if(Q!=="object")return new h("Invalid "+K+" `"+J+"` of type `"+Q+"` "+("supplied to `"+S+"`, expected `object`."));var ae=t({},N[V],R);for(var oe in ae){var X=R[oe];if(!X)return new h("Invalid "+K+" `"+J+"` key `"+oe+"` supplied to `"+S+"`.\nBad object: "+JSON.stringify(N[V],null," ")+`
170
+ Valid keys: `+JSON.stringify(Object.keys(R),null," "));var ee=X(Y,oe,S,K,J+"."+oe,n);if(ee)return ee}return null}return y(g)}function B(R){switch(typeof R){case"number":case"string":case"undefined":return!0;case"boolean":return!R;case"object":if(Array.isArray(R))return R.every(B);if(R===null||s(R))return!0;var g=f(R);if(g){var N=g.call(R),V;if(g!==R.entries){for(;!(V=N.next()).done;)if(!B(V.value))return!1}else for(;!(V=N.next()).done;){var S=V.value;if(S&&!B(S[1]))return!1}}else return!1;return!0;default:return!1}}function I(R,g){return R==="symbol"?!0:g?g["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&g instanceof Symbol:!1}function A(R){var g=typeof R;return Array.isArray(R)?"array":R instanceof RegExp?"object":I(g,R)?"symbol":g}function L(R){if(typeof R>"u"||R===null)return""+R;var g=A(R);if(g==="object"){if(R instanceof Date)return"date";if(R instanceof RegExp)return"regexp"}return g}function Z(R){var g=L(R);switch(g){case"array":case"object":return"an "+g;case"boolean":case"date":case"regexp":return"a "+g;default:return g}}function H(R){return!R.constructor||!R.constructor.name?d:R.constructor.name}return p.checkPropTypes=r,p.resetWarningCache=r.resetWarningCache,p.PropTypes=p,p},Bm}var Um,Pk;function LZ(){if(Pk)return Um;Pk=1;var e=Fm();function t(){}function n(){}return n.resetWarningCache=t,Um=function(){function r(o,s,u,l,c,f){if(f!==e){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}r.isRequired=r;function i(){return r}var a={array:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},Um}if(process.env.NODE_ENV!=="production"){var BZ=Uu(),UZ=!0;Nm.exports=FZ()(BZ.isElement,UZ)}else Nm.exports=LZ()();var zZ=Nm.exports;const at=Ge(zZ);var zm=j.createContext({scrollTo:function(){return 0},scrollToBottom:function(){return 0},scrollToEnd:function(){return 0},scrollToStart:function(){return 0},scrollToTop:function(){return 0}});zm.displayName="ScrollToBottomFunctionContext";function qZ(){return j.useContext(zm)}function WZ(){var e=qZ(),t=e.scrollToEnd;return t}var qm=j.createContext({atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom"});qm.displayName="ScrollToBottomState1Context";var Wm=j.createContext({animating:!1,animatingToEnd:!1,sticky:!0});Wm.displayName="ScrollToBottomState2Context";var Vm=j.createContext({animating:!1,animatingToEnd:!1,atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom",sticky:!0});Vm.displayName="ScrollToBottomStateContext";var Dk=[Vm,qm,Wm];function VZ(e){return j.useContext(Dk[e]||Dk[0])}function HZ(){var e=VZ(2),t=e.sticky;return[t]}var Nc=j.createContext({offsetHeight:0,scrollHeight:0,setTarget:function(){return 0},styleToClassName:function(){return""}});Nc.displayName="ScrollToBottomInternalContext";function ZZ(){return j.useContext(Nc)}function Hm(){var e=ZZ(),t=e.styleToClassName;return t}var KZ={backgroundColor:"rgba(0, 0, 0, .2)",borderRadius:10,borderWidth:0,bottom:5,cursor:"pointer",height:20,outline:0,position:"absolute",right:20,width:20,"&:hover":{backgroundColor:"rgba(0, 0, 0, .4)"},"&:active":{backgroundColor:"rgba(0, 0, 0, .6)"}},Zm=function(t){var n=t.children,r=t.className,i=HZ(),a=Tr(i,1),o=a[0],s=Hm()(KZ),u=WZ();return!o&&j.createElement("button",{className:jm(s,(r||"")+""),onClick:u,type:"button"},n)};Zm.defaultProps={children:void 0,className:""},Zm.propTypes={children:at.any,className:at.string};var jk={exports:{}},GZ=yt,YZ=En,Nk=rr.f;GZ({target:"Object",stat:!0,forced:Object.defineProperty!==Nk,sham:!YZ},{defineProperty:Nk});var JZ=rn,Mk=JZ.Object,XZ=jk.exports=function(t,n,r){return Mk.defineProperty(t,n,r)};Mk.defineProperty.sham&&(XZ.sham=!0);var QZ=jk.exports,eK=QZ,Fk=eK,tK=Fk,nK=tK,rK=nK,iK=rK,aK=iK;const oK=Ge(aK);var sK=$s,lK=sK.f("iterator"),uK=lK,cK=uK,fK=cK,dK=fK,pK=dK,hK=pK,mK=hK;const vK=Ge(mK);function Ns(e){"@babel/helpers - typeof";return Ns=typeof Ya=="function"&&typeof vK=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Ya=="function"&&t.constructor===Ya&&t!==Ya.prototype?"symbol":typeof t},Ns(e)}var yK=$s,gK=yK.f("toPrimitive"),bK=gK,wK=bK,xK=wK,SK=xK,EK=SK,_K=EK,kK=_K;const TK=Ge(kK);function CK(e,t){if(Ns(e)!="object"||!e)return e;var n=e[TK];if(n!==void 0){var r=n.call(e,t||"default");if(Ns(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function OK(e){var t=CK(e,"string");return Ns(t)=="symbol"?t:t+""}function $K(e,t,n){return(t=OK(t))in e?oK(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IK(e){if(EE(e))return Dm(e)}function RK(e){if(typeof Ya<"u"&&yk(e)!=null||e["@@iterator"]!=null)return Ck(e)}function AK(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
171
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nt(e){return IK(e)||RK(e)||Ok(e)||AK()}var Mc=function(e){return e&&e.Math==Math&&e},Pn=Mc(typeof globalThis=="object"&&globalThis)||Mc(typeof window=="object"&&window)||Mc(typeof self=="object"&&self)||Mc(typeof vt=="object"&&vt)||function(){return this}()||Function("return this")(),Km={},ar=function(e){try{return!!e()}catch{return!0}},PK=ar,Ji=!PK(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Lk={},Bk={}.propertyIsEnumerable,Uk=Object.getOwnPropertyDescriptor,DK=Uk&&!Bk.call({1:2},1);Lk.f=DK?function(t){var n=Uk(this,t);return!!n&&n.enumerable}:Bk;var zk=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},jK={}.toString,Gm=function(e){return jK.call(e).slice(8,-1)},NK=ar,MK=Gm,FK="".split,LK=NK(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return MK(e)=="String"?FK.call(e,""):Object(e)}:Object,Fc=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},BK=LK,UK=Fc,Ym=function(e){return BK(UK(e))},qn=function(e){return typeof e=="function"},zK=qn,Ms=function(e){return typeof e=="object"?e!==null:zK(e)},Jm=Pn,qK=qn,WK=function(e){return qK(e)?e:void 0},Lc=function(e,t){return arguments.length<2?WK(Jm[e]):Jm[e]&&Jm[e][t]},VK=Lc,HK=VK("navigator","userAgent")||"",qk=Pn,Xm=HK,Wk=qk.process,Vk=qk.Deno,Hk=Wk&&Wk.versions||Vk&&Vk.version,Zk=Hk&&Hk.v8,Cr,Bc;Zk?(Cr=Zk.split("."),Bc=Cr[0]<4?1:Cr[0]+Cr[1]):Xm&&(Cr=Xm.match(/Edge\/(\d+)/),(!Cr||Cr[1]>=74)&&(Cr=Xm.match(/Chrome\/(\d+)/),Cr&&(Bc=Cr[1])));var ZK=Bc&&+Bc,Kk=ZK,KK=ar,Gk=!!Object.getOwnPropertySymbols&&!KK(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Kk&&Kk<41}),GK=Gk,Yk=GK&&!Symbol.sham&&typeof Symbol.iterator=="symbol",YK=qn,JK=Lc,XK=Yk,Jk=XK?function(e){return typeof e=="symbol"}:function(e){var t=JK("Symbol");return YK(t)&&Object(e)instanceof t},QK=function(e){try{return String(e)}catch{return"Object"}},eG=qn,tG=QK,nG=function(e){if(eG(e))return e;throw TypeError(tG(e)+" is not a function")},rG=nG,Xk=function(e,t){var n=e[t];return n==null?void 0:rG(n)},Qm=qn,ev=Ms,iG=function(e,t){var n,r;if(t==="string"&&Qm(n=e.toString)&&!ev(r=n.call(e))||Qm(n=e.valueOf)&&!ev(r=n.call(e))||t!=="string"&&Qm(n=e.toString)&&!ev(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},Qk={exports:{}},eT=Pn,tv=function(e,t){try{Object.defineProperty(eT,e,{value:t,configurable:!0,writable:!0})}catch{eT[e]=t}return t},aG=Pn,oG=tv,tT="__core-js_shared__",sG=aG[tT]||oG(tT,{}),nv=sG,nT=nv;(Qk.exports=function(e,t){return nT[e]||(nT[e]=t!==void 0?t:{})})("versions",[]).push({version:"3.18.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var rv=Qk.exports,lG=Fc,rT=function(e){return Object(lG(e))},uG=rT,cG={}.hasOwnProperty,Xi=Object.hasOwn||function(t,n){return cG.call(uG(t),n)},fG=0,dG=Math.random(),iT=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++fG+dG).toString(36)},pG=Pn,hG=rv,aT=Xi,mG=iT,oT=Gk,vG=Yk,Fs=hG("wks"),Ls=pG.Symbol,yG=vG?Ls:Ls&&Ls.withoutSetter||mG,Bs=function(e){return(!aT(Fs,e)||!(oT||typeof Fs[e]=="string"))&&(oT&&aT(Ls,e)?Fs[e]=Ls[e]:Fs[e]=yG("Symbol."+e)),Fs[e]},sT=Ms,lT=Jk,gG=Xk,bG=iG,wG=Bs,xG=wG("toPrimitive"),SG=function(e,t){if(!sT(e)||lT(e))return e;var n=gG(e,xG),r;if(n){if(t===void 0&&(t="default"),r=n.call(e,t),!sT(r)||lT(r))return r;throw TypeError("Can't convert object to primitive value")}return t===void 0&&(t="number"),bG(e,t)},EG=SG,_G=Jk,uT=function(e){var t=EG(e,"string");return _G(t)?t:String(t)},kG=Pn,cT=Ms,iv=kG.document,TG=cT(iv)&&cT(iv.createElement),fT=function(e){return TG?iv.createElement(e):{}},CG=Ji,OG=ar,$G=fT,dT=!CG&&!OG(function(){return Object.defineProperty($G("div"),"a",{get:function(){return 7}}).a!=7}),IG=Ji,RG=Lk,AG=zk,PG=Ym,DG=uT,jG=Xi,NG=dT,pT=Object.getOwnPropertyDescriptor;Km.f=IG?pT:function(t,n){if(t=PG(t),n=DG(n),NG)try{return pT(t,n)}catch{}if(jG(t,n))return AG(!RG.f.call(t,n),t[n])};var Us={},MG=Ms,Si=function(e){if(MG(e))return e;throw TypeError(String(e)+" is not an object")},FG=Ji,LG=dT,hT=Si,BG=uT,mT=Object.defineProperty;Us.f=FG?mT:function(t,n,r){if(hT(t),n=BG(n),hT(r),LG)try{return mT(t,n,r)}catch{}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var UG=Ji,zG=Us,qG=zk,Uc=UG?function(e,t,n){return zG.f(e,t,qG(1,n))}:function(e,t,n){return e[t]=n,e},vT={exports:{}},WG=qn,av=nv,VG=Function.toString;WG(av.inspectSource)||(av.inspectSource=function(e){return VG.call(e)});var yT=av.inspectSource,HG=Pn,ZG=qn,KG=yT,gT=HG.WeakMap,GG=ZG(gT)&&/native code/.test(KG(gT)),YG=rv,JG=iT,bT=YG("keys"),wT=function(e){return bT[e]||(bT[e]=JG(e))},ov={},XG=GG,QG=Pn,eY=Ms,tY=Uc,sv=Xi,lv=nv,nY=wT,rY=ov,xT="Object already initialized",iY=QG.WeakMap,zc,zs,qc,aY=function(e){return qc(e)?zs(e):zc(e,{})},oY=function(e){return function(t){var n;if(!eY(t)||(n=zs(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}};if(XG||lv.state){var Qi=lv.state||(lv.state=new iY),sY=Qi.get,ST=Qi.has,lY=Qi.set;zc=function(e,t){if(ST.call(Qi,e))throw new TypeError(xT);return t.facade=e,lY.call(Qi,e,t),t},zs=function(e){return sY.call(Qi,e)||{}},qc=function(e){return ST.call(Qi,e)}}else{var Ja=nY("state");rY[Ja]=!0,zc=function(e,t){if(sv(e,Ja))throw new TypeError(xT);return t.facade=e,tY(e,Ja,t),t},zs=function(e){return sv(e,Ja)?e[Ja]:{}},qc=function(e){return sv(e,Ja)}}var ET={set:zc,get:zs,has:qc,enforce:aY,getterFor:oY},uv=Ji,uY=Xi,_T=Function.prototype,cY=uv&&Object.getOwnPropertyDescriptor,cv=uY(_T,"name"),fY=cv&&(function(){}).name==="something",dY=cv&&(!uv||uv&&cY(_T,"name").configurable),fv={EXISTS:cv,PROPER:fY,CONFIGURABLE:dY},pY=Pn,kT=qn,hY=Xi,TT=Uc,mY=tv,vY=yT,CT=ET,yY=fv.CONFIGURABLE,gY=CT.get,bY=CT.enforce,wY=String(String).split("String");(vT.exports=function(e,t,n,r){var i=r?!!r.unsafe:!1,a=r?!!r.enumerable:!1,o=r?!!r.noTargetGet:!1,s=r&&r.name!==void 0?r.name:t,u;if(kT(n)&&(String(s).slice(0,7)==="Symbol("&&(s="["+String(s).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!hY(n,"name")||yY&&n.name!==s)&&TT(n,"name",s),u=bY(n),u.source||(u.source=wY.join(typeof s=="string"?s:""))),e===pY){a?e[t]=n:mY(t,n);return}else i?!o&&e[t]&&(a=!0):delete e[t];a?e[t]=n:TT(e,t,n)})(Function.prototype,"toString",function(){return kT(this)&&gY(this).source||vY(this)});var qs=vT.exports,OT={},xY=Math.ceil,SY=Math.floor,Wc=function(e){var t=+e;return t!==t||t===0?0:(t>0?SY:xY)(t)},EY=Wc,_Y=Math.max,kY=Math.min,TY=function(e,t){var n=EY(e);return n<0?_Y(n+t,0):kY(n,t)},CY=Wc,OY=Math.min,$T=function(e){return e>0?OY(CY(e),9007199254740991):0},$Y=$T,IY=function(e){return $Y(e.length)},RY=Ym,AY=TY,PY=IY,IT=function(e){return function(t,n,r){var i=RY(t),a=PY(i),o=AY(r,a),s;if(e&&n!=n){for(;a>o;)if(s=i[o++],s!=s)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},DY={includes:IT(!0),indexOf:IT(!1)},dv=Xi,jY=Ym,NY=DY.indexOf,MY=ov,RT=function(e,t){var n=jY(e),r=0,i=[],a;for(a in n)!dv(MY,a)&&dv(n,a)&&i.push(a);for(;t.length>r;)dv(n,a=t[r++])&&(~NY(i,a)||i.push(a));return i},pv=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],FY=RT,LY=pv,BY=LY.concat("length","prototype");OT.f=Object.getOwnPropertyNames||function(t){return FY(t,BY)};var AT={};AT.f=Object.getOwnPropertySymbols;var UY=Lc,zY=OT,qY=AT,WY=Si,VY=UY("Reflect","ownKeys")||function(t){var n=zY.f(WY(t)),r=qY.f;return r?n.concat(r(t)):n},HY=Xi,ZY=VY,KY=Km,GY=Us,YY=function(e,t){for(var n=ZY(t),r=GY.f,i=KY.f,a=0;a<n.length;a++){var o=n[a];HY(e,o)||r(e,o,i(t,o))}},JY=ar,XY=qn,QY=/#|\.prototype\./,Ws=function(e,t){var n=tJ[eJ(e)];return n==rJ?!0:n==nJ?!1:XY(t)?JY(t):!!t},eJ=Ws.normalize=function(e){return String(e).replace(QY,".").toLowerCase()},tJ=Ws.data={},nJ=Ws.NATIVE="N",rJ=Ws.POLYFILL="P",iJ=Ws,hv=Pn,aJ=Km.f,oJ=Uc,sJ=qs,lJ=tv,uJ=YY,cJ=iJ,fJ=function(e,t){var n=e.target,r=e.global,i=e.stat,a,o,s,u,l,c;if(r?o=hv:i?o=hv[n]||lJ(n,{}):o=(hv[n]||{}).prototype,o)for(s in t){if(l=t[s],e.noTargetGet?(c=aJ(o,s),u=c&&c.value):u=o[s],a=cJ(r?s:n+(i?".":"#")+s,e.forced),!a&&u!==void 0){if(typeof l==typeof u)continue;uJ(l,u)}(e.sham||u&&u.sham)&&oJ(l,"sham",!0),sJ(o,s,l,e)}},dJ=Bs,pJ=dJ("toStringTag"),PT={};PT[pJ]="z";var mv=String(PT)==="[object z]",hJ=mv,mJ=qn,Vc=Gm,vJ=Bs,yJ=vJ("toStringTag"),gJ=Vc(function(){return arguments}())=="Arguments",bJ=function(e,t){try{return e[t]}catch{}},DT=hJ?Vc:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=bJ(t=Object(e),yJ))=="string"?n:gJ?Vc(t):(r=Vc(t))=="Object"&&mJ(t.callee)?"Arguments":r},wJ=DT,Hc=function(e){if(wJ(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return String(e)},xJ=Si,jT=function(){var e=xJ(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},vv={},NT=ar,SJ=Pn,MT=SJ.RegExp;vv.UNSUPPORTED_Y=NT(function(){var e=MT("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),vv.BROKEN_CARET=NT(function(){var e=MT("^r","gy");return e.lastIndex=2,e.exec("str")!=null});var EJ=RT,_J=pv,kJ=Object.keys||function(t){return EJ(t,_J)},TJ=Ji,CJ=Us,OJ=Si,$J=kJ,IJ=TJ?Object.defineProperties:function(t,n){OJ(t);for(var r=$J(n),i=r.length,a=0,o;i>a;)CJ.f(t,o=r[a++],n[o]);return t},RJ=Lc,AJ=RJ("document","documentElement"),PJ=Si,DJ=IJ,FT=pv,jJ=ov,NJ=AJ,MJ=fT,FJ=wT,LT=">",BT="<",yv="prototype",gv="script",UT=FJ("IE_PROTO"),bv=function(){},zT=function(e){return BT+gv+LT+e+BT+"/"+gv+LT},qT=function(e){e.write(zT("")),e.close();var t=e.parentWindow.Object;return e=null,t},LJ=function(){var e=MJ("iframe"),t="java"+gv+":",n;return e.style.display="none",NJ.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(zT("document.F=Object")),n.close(),n.F},Zc,Kc=function(){try{Zc=new ActiveXObject("htmlfile")}catch{}Kc=typeof document<"u"?document.domain&&Zc?qT(Zc):LJ():qT(Zc);for(var e=FT.length;e--;)delete Kc[yv][FT[e]];return Kc()};jJ[UT]=!0;var BJ=Object.create||function(t,n){var r;return t!==null?(bv[yv]=PJ(t),r=new bv,bv[yv]=null,r[UT]=t):r=Kc(),n===void 0?r:DJ(r,n)},UJ=ar,zJ=Pn,qJ=zJ.RegExp,WJ=UJ(function(){var e=qJ(".","s");return!(e.dotAll&&e.exec(`
172
+ `)&&e.flags==="s")}),VJ=ar,HJ=Pn,ZJ=HJ.RegExp,KJ=VJ(function(){var e=ZJ("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),GJ=Hc,YJ=jT,WT=vv,JJ=rv,XJ=BJ,QJ=ET.get,eX=WJ,tX=KJ,Gc=RegExp.prototype.exec,nX=JJ("native-string-replace",String.prototype.replace),wv=Gc,xv=function(){var e=/a/,t=/b*/g;return Gc.call(e,"a"),Gc.call(t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),VT=WT.UNSUPPORTED_Y||WT.BROKEN_CARET,Sv=/()??/.exec("")[1]!==void 0,rX=xv||Sv||VT||eX||tX;rX&&(wv=function(t){var n=this,r=QJ(n),i=GJ(t),a=r.raw,o,s,u,l,c,f,d;if(a)return a.lastIndex=n.lastIndex,o=wv.call(a,i),n.lastIndex=a.lastIndex,o;var p=r.groups,m=VT&&n.sticky,h=YJ.call(n),y=n.source,v=0,b=i;if(m&&(h=h.replace("y",""),h.indexOf("g")===-1&&(h+="g"),b=i.slice(n.lastIndex),n.lastIndex>0&&(!n.multiline||n.multiline&&i.charAt(n.lastIndex-1)!==`
173
+ `)&&(y="(?: "+y+")",b=" "+b,v++),s=new RegExp("^(?:"+y+")",h)),Sv&&(s=new RegExp("^"+y+"$(?!\\s)",h)),xv&&(u=n.lastIndex),l=Gc.call(m?s:n,b),m?l?(l.input=l.input.slice(v),l[0]=l[0].slice(v),l.index=n.lastIndex,n.lastIndex+=l[0].length):n.lastIndex=0:xv&&l&&(n.lastIndex=n.global?l.index+l[0].length:u),Sv&&l&&l.length>1&&nX.call(l[0],s,function(){for(c=1;c<arguments.length-2;c++)arguments[c]===void 0&&(l[c]=void 0)}),l&&p)for(l.groups=f=XJ(null),c=0;c<p.length;c++)d=p[c],f[d[0]]=l[d[1]];return l});var Ev=wv,iX=fJ,HT=Ev;iX({target:"RegExp",proto:!0,forced:/./.exec!==HT},{exec:HT});var ZT=qs,aX=Ev,KT=ar,GT=Bs,oX=Uc,sX=GT("species"),_v=RegExp.prototype,lX=function(e,t,n,r){var i=GT(e),a=!KT(function(){var l={};return l[i]=function(){return 7},""[e](l)!=7}),o=a&&!KT(function(){var l=!1,c=/a/;return e==="split"&&(c={},c.constructor={},c.constructor[sX]=function(){return c},c.flags="",c[i]=/./[i]),c.exec=function(){return l=!0,null},c[i](""),!l});if(!a||!o||n){var s=/./[i],u=t(i,""[e],function(l,c,f,d,p){var m=c.exec;return m===aX||m===_v.exec?a&&!p?{done:!0,value:s.call(c,f,d)}:{done:!0,value:l.call(f,c,d)}:{done:!1}});ZT(String.prototype,e,u[0]),ZT(_v,i,u[1])}r&&oX(_v[i],"sham",!0)},uX=Wc,cX=Hc,fX=Fc,YT=function(e){return function(t,n){var r=cX(fX(t)),i=uX(n),a=r.length,o,s;return i<0||i>=a?e?"":void 0:(o=r.charCodeAt(i),o<55296||o>56319||i+1===a||(s=r.charCodeAt(i+1))<56320||s>57343?e?r.charAt(i):o:e?r.slice(i,i+2):(o-55296<<10)+(s-56320)+65536)}},dX={codeAt:YT(!1),charAt:YT(!0)},pX=dX.charAt,hX=function(e,t,n){return t+(n?pX(e,t).length:1)},mX=rT,vX=Math.floor,yX="".replace,gX=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,bX=/\$([$&'`]|\d{1,2})/g,wX=function(e,t,n,r,i,a){var o=n+e.length,s=r.length,u=bX;return i!==void 0&&(i=mX(i),u=gX),yX.call(a,u,function(l,c){var f;switch(c.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(o);case"<":f=i[c.slice(1,-1)];break;default:var d=+c;if(d===0)return l;if(d>s){var p=vX(d/10);return p===0?l:p<=s?r[p-1]===void 0?c.charAt(1):r[p-1]+c.charAt(1):l}f=r[d-1]}return f===void 0?"":f})},xX=Si,SX=qn,EX=Gm,_X=Ev,kX=function(e,t){var n=e.exec;if(SX(n)){var r=n.call(e,t);return r!==null&&xX(r),r}if(EX(e)==="RegExp")return _X.call(e,t);throw TypeError("RegExp#exec called on incompatible receiver")},TX=lX,CX=ar,OX=Si,$X=qn,IX=Wc,RX=$T,Xa=Hc,AX=Fc,PX=hX,DX=Xk,jX=wX,NX=kX,MX=Bs,kv=MX("replace"),FX=Math.max,LX=Math.min,BX=function(e){return e===void 0?e:String(e)},UX=function(){return"a".replace(/./,"$0")==="$0"}(),JT=function(){return/./[kv]?/./[kv]("a","$0")==="":!1}(),zX=!CX(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"});TX("replace",function(e,t,n){var r=JT?"$":"$0";return[function(a,o){var s=AX(this),u=a==null?void 0:DX(a,kv);return u?u.call(a,s,o):t.call(Xa(s),a,o)},function(i,a){var o=OX(this),s=Xa(i);if(typeof a=="string"&&a.indexOf(r)===-1&&a.indexOf("$<")===-1){var u=n(t,o,s,a);if(u.done)return u.value}var l=$X(a);l||(a=Xa(a));var c=o.global;if(c){var f=o.unicode;o.lastIndex=0}for(var d=[];;){var p=NX(o,s);if(p===null||(d.push(p),!c))break;var m=Xa(p[0]);m===""&&(o.lastIndex=PX(s,RX(o.lastIndex),f))}for(var h="",y=0,v=0;v<d.length;v++){p=d[v];for(var b=Xa(p[0]),w=FX(LX(IX(p.index),s.length),0),T=[],E=1;E<p.length;E++)T.push(BX(p[E]));var _=p.groups;if(l){var O=[b].concat(T,w,s);_!==void 0&&O.push(_);var z=Xa(a.apply(void 0,O))}else z=jX(b,s,w,T,_,a);w>=y&&(h+=s.slice(y,w)+z,y=w+b.length)}return h+s.slice(y)}]},!zX||!UX||JT);var Vs=Vt,qX=Th,WX=Hi,Yc=function(e){return qX.slice(0,e.length)===e},VX=function(){return Yc("Bun/")?"BUN":Yc("Cloudflare-Workers")?"CLOUDFLARE":Yc("Deno/")?"DENO":Yc("Node.js/")?"NODE":Vs.Bun&&typeof Bun.version=="string"?"BUN":Vs.Deno&&typeof Deno.version=="object"?"DENO":WX(Vs.process)==="process"?"NODE":Vs.window&&Vs.document?"BROWSER":"REST"}(),HX=TypeError,ZX=function(e,t){if(e<t)throw new HX("Not enough arguments");return e},XT=Vt,KX=yh,GX=cn,YX=VX,JX=Th,XX=xc,QX=ZX,eQ=XT.Function,tQ=/MSIE .\./.test(JX)||YX==="BUN"&&function(){var e=XT.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}(),QT=function(e,t){var n=t?2:1;return tQ?function(r,i){var a=QX(arguments.length,1)>n,o=GX(r)?r:eQ(r),s=a?XX(arguments,n):[],u=a?function(){KX(o,this,s)}:o;return t?e(u,i):e(u)}:e},nQ=yt,eC=Vt,rQ=QT,tC=rQ(eC.setInterval,!0);nQ({global:!0,bind:!0,forced:eC.setInterval!==tC},{setInterval:tC});var iQ=yt,nC=Vt,aQ=QT,rC=aQ(nC.setTimeout,!0);iQ({global:!0,bind:!0,forced:nC.setTimeout!==rC},{setTimeout:rC});var oQ=rn,sQ=oQ.setInterval,lQ=sQ;const uQ=Ge(lQ);var cQ=Ht,iC=function(e,t){var n=[][e];return!!n&&cQ(function(){n.call(null,t||function(){return 1},1)})},fQ=yt,dQ=bh,pQ=jE.indexOf,hQ=iC,Tv=dQ([].indexOf),aC=!!Tv&&1/Tv([1],1,-0)<0,mQ=aC||!hQ("indexOf");fQ({target:"Array",proto:!0,forced:mQ},{indexOf:function(t){var n=arguments.length>1?arguments[1]:void 0;return aC?Tv(this,t,n)||0:pQ(this,t,n)}});var vQ=Yi,yQ=vQ("Array","indexOf"),gQ=Hr,bQ=yQ,Cv=Array.prototype,wQ=function(e){var t=e.indexOf;return e===Cv||gQ(Cv,e)&&t===Cv.indexOf?bQ:t},xQ=wQ,SQ=xQ,EQ=SQ;const _Q=Ge(EQ);var oC=lc,kQ=TypeError,TQ=function(e,t){if(!delete e[t])throw new kQ("Cannot delete property "+oC(t)+" of "+oC(e))},CQ=yt,OQ=Zr,$Q=Gh,IQ=dc,RQ=Zi,AQ=gk,PQ=qh,DQ=Kh,jQ=ks,Ov=TQ,NQ=hc,MQ=NQ("splice"),FQ=Math.max,LQ=Math.min;CQ({target:"Array",proto:!0,forced:!MQ},{splice:function(t,n){var r=OQ(this),i=RQ(r),a=$Q(t,i),o=arguments.length,s,u,l,c,f,d;for(o===0?s=u=0:o===1?(s=0,u=i-a):(s=o-2,u=LQ(FQ(IQ(n),0),i-a)),PQ(i+s-u),l=DQ(r,u),c=0;c<u;c++)f=a+c,f in r&&jQ(l,c,r[f]);if(l.length=u,s<u){for(c=a;c<i-u;c++)f=c+u,d=c+s,f in r?r[d]=r[f]:Ov(r,d);for(c=i;c>i-u+s;c--)Ov(r,c-1)}else if(s>u)for(c=i-u;c>a;c--)f=c+u-1,d=c+s-1,f in r?r[d]=r[f]:Ov(r,d);for(c=0;c<s;c++)r[c+a]=arguments[c+2];return AQ(r,i-u+s),l}});var BQ=Yi,UQ=BQ("Array","splice"),zQ=Hr,qQ=UQ,$v=Array.prototype,WQ=function(e){var t=e.splice;return e===$v||zQ($v,e)&&t===$v.splice?qQ:t},VQ=WQ,HQ=VQ,ZQ=HQ;const KQ=Ge(ZQ);var GQ=Yi,YQ=GQ("Array","concat"),JQ=Hr,XQ=YQ,Iv=Array.prototype,QQ=function(e){var t=e.concat;return e===Iv||JQ(Iv,e)&&t===Iv.concat?XQ:t},eee=QQ,tee=eee,nee=tee;const It=Ge(nee);var ree=yt,iee=Bt,sC=Date,aee=iee(sC.prototype.getTime);ree({target:"Date",stat:!0},{now:function(){return aee(new sC)}});var oee=rn,see=oee.Date.now,lee=see,uee=lee,cee=uee;const Ei=Ge(cee);var fee=sm.forEach,dee=iC,pee=dee("forEach"),hee=pee?[].forEach:function(t){return fee(this,t,arguments.length>1?arguments[1]:void 0)},mee=yt,lC=hee;mee({target:"Array",proto:!0,forced:[].forEach!==lC},{forEach:lC});var vee=Yi,yee=vee("Array","forEach"),gee=yee,bee=gee,wee=Ts,xee=An,See=Hr,Eee=bee,Rv=Array.prototype,_ee={DOMTokenList:!0,NodeList:!0},kee=function(e){var t=e.forEach;return e===Rv||See(Rv,e)&&t===Rv.forEach||xee(_ee,wee(e))?Eee:t},Tee=kee;const Jc=Ge(Tee);var Cee=yt,Oee=Zr,uC=Xh,$ee=Ht,Iee=$ee(function(){uC(1)});Cee({target:"Object",stat:!0,forced:Iee},{keys:function(t){return uC(Oee(t))}});var Ree=rn,Aee=Ree.Object.keys,Pee=Aee,Dee=Pee,jee=Dee;const Nee=Ge(jee);var Mee=rn,Fee=Mee.Object.getOwnPropertySymbols,Lee=Fee,Bee=Lee,Uee=Bee;const cC=Ge(Uee);var zee=yt,qee=sm.filter,Wee=hc,Vee=Wee("filter");zee({target:"Array",proto:!0,forced:!Vee},{filter:function(t){return qee(this,t,arguments.length>1?arguments[1]:void 0)}});var Hee=Yi,Zee=Hee("Array","filter"),Kee=Hr,Gee=Zee,Av=Array.prototype,Yee=function(e){var t=e.filter;return e===Av||Kee(Av,e)&&t===Av.filter?Gee:t},Jee=Yee,Xee=Jee,Qee=Xee;const ete=Ge(Qee);var fC={exports:{}},tte=yt,nte=Ht,rte=Er,dC=ws.f,pC=En,ite=!pC||nte(function(){dC(1)});tte({target:"Object",stat:!0,forced:ite,sham:!pC},{getOwnPropertyDescriptor:function(t,n){return dC(rte(t),n)}});var ate=rn,hC=ate.Object,ote=fC.exports=function(t,n){return hC.getOwnPropertyDescriptor(t,n)};hC.getOwnPropertyDescriptor.sham&&(ote.sham=!0);var ste=fC.exports,lte=ste,ute=lte,cte=ute;const mC=Ge(cte);var fte=_r,dte=Bt,pte=wc,hte=Sc,mte=bi,vte=dte([].concat),yte=fte("Reflect","ownKeys")||function(t){var n=pte.f(mte(t)),r=hte.f;return r?vte(n,r(t)):n},gte=yt,bte=En,wte=yte,xte=Er,Ste=ws,Ete=ks;gte({target:"Object",stat:!0,sham:!bte},{getOwnPropertyDescriptors:function(t){for(var n=xte(t),r=Ste.f,i=wte(n),a={},o=0,s,u;i.length>o;)u=r(n,s=i[o++]),u!==void 0&&Ete(a,s,u);return a}});var _te=rn,kte=_te.Object.getOwnPropertyDescriptors,Tte=kte,Cte=Tte,Ote=Cte;const vC=Ge(Ote);var yC={exports:{}},$te=yt,Ite=En,gC=mc.f;$te({target:"Object",stat:!0,forced:Object.defineProperties!==gC,sham:!Ite},{defineProperties:gC});var Rte=rn,bC=Rte.Object,Ate=yC.exports=function(t,n){return bC.defineProperties(t,n)};bC.defineProperties.sham&&(Ate.sham=!0);var Pte=yC.exports,Dte=Pte,jte=Dte,Nte=jte;const Mte=Ge(Nte);var Fte=Fk;const Lte=Ge(Fte);var Bte=!1;function Ute(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function zte(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var qte=function(){function e(n){var r=this;this._insertTag=function(i){var a;r.tags.length===0?r.insertionPoint?a=r.insertionPoint.nextSibling:r.prepend?a=r.container.firstChild:a=r.before:a=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,a),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!Bte:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(zte(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var a=Ute(i);try{a.insertRule(r,a.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var i;return(i=r.parentNode)==null?void 0:i.removeChild(r)}),this.tags=[],this.ctr=0},e}(),fn="-ms-",Xc="-moz-",ut="-webkit-",wC="comm",Pv="rule",Dv="decl",Wte="@import",xC="@keyframes",Vte="@layer",Hte=Math.abs,Qc=String.fromCharCode,Zte=Object.assign;function Kte(e,t){return an(e,0)^45?(((t<<2^an(e,0))<<2^an(e,1))<<2^an(e,2))<<2^an(e,3):0}function SC(e){return e.trim()}function Gte(e,t){return(e=t.exec(e))?e[0]:e}function ct(e,t,n){return e.replace(t,n)}function jv(e,t){return e.indexOf(t)}function an(e,t){return e.charCodeAt(t)|0}function Hs(e,t,n){return e.slice(t,n)}function Or(e){return e.length}function Nv(e){return e.length}function ef(e,t){return t.push(e),e}function Yte(e,t){return e.map(t).join("")}var tf=1,Qa=1,EC=0,kn=0,Ut=0,eo="";function nf(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:tf,column:Qa,length:o,return:""}}function Zs(e,t){return Zte(nf("",null,null,"",null,null,0),e,{length:-e.length},t)}function Jte(){return Ut}function Xte(){return Ut=kn>0?an(eo,--kn):0,Qa--,Ut===10&&(Qa=1,tf--),Ut}function Dn(){return Ut=kn<EC?an(eo,kn++):0,Qa++,Ut===10&&(Qa=1,tf++),Ut}function $r(){return an(eo,kn)}function rf(){return kn}function Ks(e,t){return Hs(eo,e,t)}function Gs(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function _C(e){return tf=Qa=1,EC=Or(eo=e),kn=0,[]}function kC(e){return eo="",e}function af(e){return SC(Ks(kn-1,Mv(e===91?e+2:e===40?e+1:e)))}function Qte(e){for(;(Ut=$r())&&Ut<33;)Dn();return Gs(e)>2||Gs(Ut)>3?"":" "}function ene(e,t){for(;--t&&Dn()&&!(Ut<48||Ut>102||Ut>57&&Ut<65||Ut>70&&Ut<97););return Ks(e,rf()+(t<6&&$r()==32&&Dn()==32))}function Mv(e){for(;Dn();)switch(Ut){case e:return kn;case 34:case 39:e!==34&&e!==39&&Mv(Ut);break;case 40:e===41&&Mv(e);break;case 92:Dn();break}return kn}function tne(e,t){for(;Dn()&&e+Ut!==57;)if(e+Ut===84&&$r()===47)break;return"/*"+Ks(t,kn-1)+"*"+Qc(e===47?e:Dn())}function nne(e){for(;!Gs($r());)Dn();return Ks(e,kn)}function rne(e){return kC(of("",null,null,null,[""],e=_C(e),0,[0],e))}function of(e,t,n,r,i,a,o,s,u){for(var l=0,c=0,f=o,d=0,p=0,m=0,h=1,y=1,v=1,b=0,w="",T=i,E=a,_=r,O=w;y;)switch(m=b,b=Dn()){case 40:if(m!=108&&an(O,f-1)==58){jv(O+=ct(af(b),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:O+=af(b);break;case 9:case 10:case 13:case 32:O+=Qte(m);break;case 92:O+=ene(rf()-1,7);continue;case 47:switch($r()){case 42:case 47:ef(ine(tne(Dn(),rf()),t,n),u);break;default:O+="/"}break;case 123*h:s[l++]=Or(O)*v;case 125*h:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+c:v==-1&&(O=ct(O,/\f/g,"")),p>0&&Or(O)-f&&ef(p>32?CC(O+";",r,n,f-1):CC(ct(O," ","")+";",r,n,f-2),u);break;case 59:O+=";";default:if(ef(_=TC(O,t,n,l,c,i,s,w,T=[],E=[],f),a),b===123)if(c===0)of(O,t,_,_,T,a,f,s,E);else switch(d===99&&an(O,3)===110?100:d){case 100:case 108:case 109:case 115:of(e,_,_,r&&ef(TC(e,_,_,0,0,i,s,w,i,T=[],f),E),i,E,f,s,r?T:E);break;default:of(O,_,_,_,[""],E,0,s,E)}}l=c=p=0,h=v=1,w=O="",f=o;break;case 58:f=1+Or(O),p=m;default:if(h<1){if(b==123)--h;else if(b==125&&h++==0&&Xte()==125)continue}switch(O+=Qc(b),b*h){case 38:v=c>0?1:(O+="\f",-1);break;case 44:s[l++]=(Or(O)-1)*v,v=1;break;case 64:$r()===45&&(O+=af(Dn())),d=$r(),c=f=Or(w=O+=nne(rf())),b++;break;case 45:m===45&&Or(O)==2&&(h=0)}}return a}function TC(e,t,n,r,i,a,o,s,u,l,c){for(var f=i-1,d=i===0?a:[""],p=Nv(d),m=0,h=0,y=0;m<r;++m)for(var v=0,b=Hs(e,f+1,f=Hte(h=o[m])),w=e;v<p;++v)(w=SC(h>0?d[v]+" "+b:ct(b,/&\f/g,d[v])))&&(u[y++]=w);return nf(e,t,n,i===0?Pv:s,u,l,c)}function ine(e,t,n){return nf(e,t,n,wC,Qc(Jte()),Hs(e,2,-2),0)}function CC(e,t,n,r){return nf(e,t,n,Dv,Hs(e,0,r),Hs(e,r+1,-1),r)}function to(e,t){for(var n="",r=Nv(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function ane(e,t,n,r){switch(e.type){case Vte:if(e.children.length)break;case Wte:case Dv:return e.return=e.return||e.value;case wC:return"";case xC:return e.return=e.value+"{"+to(e.children,r)+"}";case Pv:e.value=e.props.join(",")}return Or(n=to(e.children,r))?e.return=e.value+"{"+n+"}":""}function one(e){var t=Nv(e);return function(n,r,i,a){for(var o="",s=0;s<t;s++)o+=e[s](n,r,i,a)||"";return o}}function sne(e){return function(t){t.root||(t=t.return)&&e(t)}}function lne(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var une=function(t,n,r){for(var i=0,a=0;i=a,a=$r(),i===38&&a===12&&(n[r]=1),!Gs(a);)Dn();return Ks(t,kn)},cne=function(t,n){var r=-1,i=44;do switch(Gs(i)){case 0:i===38&&$r()===12&&(n[r]=1),t[r]+=une(kn-1,n,r);break;case 2:t[r]+=af(i);break;case 4:if(i===44){t[++r]=$r()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Qc(i)}while(i=Dn());return t},fne=function(t,n){return kC(cne(_C(t),n))},OC=new WeakMap,dne=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!OC.get(r))&&!i){OC.set(t,!0);for(var a=[],o=fne(n,a),s=r.props,u=0,l=0;u<o.length;u++)for(var c=0;c<s.length;c++,l++)t.props[l]=a[u]?o[u].replace(/&\f/g,s[c]):s[c]+" "+o[u]}}},pne=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function $C(e,t){switch(Kte(e,t)){case 5103:return ut+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ut+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ut+e+Xc+e+fn+e+e;case 6828:case 4268:return ut+e+fn+e+e;case 6165:return ut+e+fn+"flex-"+e+e;case 5187:return ut+e+ct(e,/(\w+).+(:[^]+)/,ut+"box-$1$2"+fn+"flex-$1$2")+e;case 5443:return ut+e+fn+"flex-item-"+ct(e,/flex-|-self/,"")+e;case 4675:return ut+e+fn+"flex-line-pack"+ct(e,/align-content|flex-|-self/,"")+e;case 5548:return ut+e+fn+ct(e,"shrink","negative")+e;case 5292:return ut+e+fn+ct(e,"basis","preferred-size")+e;case 6060:return ut+"box-"+ct(e,"-grow","")+ut+e+fn+ct(e,"grow","positive")+e;case 4554:return ut+ct(e,/([^-])(transform)/g,"$1"+ut+"$2")+e;case 6187:return ct(ct(ct(e,/(zoom-|grab)/,ut+"$1"),/(image-set)/,ut+"$1"),e,"")+e;case 5495:case 3959:return ct(e,/(image-set\([^]*)/,ut+"$1$`$1");case 4968:return ct(ct(e,/(.+:)(flex-)?(.*)/,ut+"box-pack:$3"+fn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ut+e+e;case 4095:case 3583:case 4068:case 2532:return ct(e,/(.+)-inline(.+)/,ut+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Or(e)-1-t>6)switch(an(e,t+1)){case 109:if(an(e,t+4)!==45)break;case 102:return ct(e,/(.+:)(.+)-([^]+)/,"$1"+ut+"$2-$3$1"+Xc+(an(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~jv(e,"stretch")?$C(ct(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(an(e,t+1)!==115)break;case 6444:switch(an(e,Or(e)-3-(~jv(e,"!important")&&10))){case 107:return ct(e,":",":"+ut)+e;case 101:return ct(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ut+(an(e,14)===45?"inline-":"")+"box$3$1"+ut+"$2$3$1"+fn+"$2box$3")+e}break;case 5936:switch(an(e,t+11)){case 114:return ut+e+fn+ct(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ut+e+fn+ct(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ut+e+fn+ct(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ut+e+fn+e+e}return e}var hne=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case Dv:t.return=$C(t.value,t.length);break;case xC:return to([Zs(t,{value:ct(t.value,"@","@"+ut)})],i);case Pv:if(t.length)return Yte(t.props,function(a){switch(Gte(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return to([Zs(t,{props:[ct(a,/:(read-\w+)/,":"+Xc+"$1")]})],i);case"::placeholder":return to([Zs(t,{props:[ct(a,/:(plac\w+)/,":"+ut+"input-$1")]}),Zs(t,{props:[ct(a,/:(plac\w+)/,":"+Xc+"$1")]}),Zs(t,{props:[ct(a,/:(plac\w+)/,fn+"input-$1")]})],i)}return""})}},mne=[hne],vne=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(h){var y=h.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var i=t.stylisPlugins||mne,a={},o,s=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(h){for(var y=h.getAttribute("data-emotion").split(" "),v=1;v<y.length;v++)a[y[v]]=!0;s.push(h)});var u,l=[dne,pne];{var c,f=[ane,sne(function(h){c.insert(h)})],d=one(l.concat(i,f)),p=function(y){return to(rne(y),d)};u=function(y,v,b,w){c=b,p(y?y+"{"+v.styles+"}":v.styles),w&&(m.inserted[v.name]=!0)}}var m={key:n,sheet:new qte({key:n,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:a,registered:{},insert:u};return m.sheet.hydrate(s),m};function yne(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var gne={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},bne=!1,wne=/[A-Z]|^ms/g,xne=/_EMO_([^_]+?)_([^]*?)_EMO_/g,IC=function(t){return t.charCodeAt(1)===45},RC=function(t){return t!=null&&typeof t!="boolean"},Fv=lne(function(e){return IC(e)?e:e.replace(wne,"-$&").toLowerCase()}),AC=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(xne,function(r,i,a){return _i={name:i,styles:a,next:_i},i})}return gne[t]!==1&&!IC(t)&&typeof n=="number"&&n!==0?n+"px":n},Sne="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function sf(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return _i={name:i.name,styles:i.styles,next:_i},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)_i={name:o.name,styles:o.styles,next:_i},o=o.next;var s=a.styles+";";return s}return Ene(e,t,n)}}var u=n;if(t==null)return u;var l=t[u];return l!==void 0?l:u}function Ene(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=sf(e,t,n[i])+";";else for(var a in n){var o=n[a];if(typeof o!="object"){var s=o;t!=null&&t[s]!==void 0?r+=a+"{"+t[s]+"}":RC(s)&&(r+=Fv(a)+":"+AC(a,s)+";")}else{if(a==="NO_COMPONENT_SELECTOR"&&bne)throw new Error(Sne);if(Array.isArray(o)&&typeof o[0]=="string"&&(t==null||t[o[0]]===void 0))for(var u=0;u<o.length;u++)RC(o[u])&&(r+=Fv(a)+":"+AC(a,o[u])+";");else{var l=sf(e,t,o);switch(a){case"animation":case"animationName":{r+=Fv(a)+":"+l+";";break}default:r+=a+"{"+l+"}"}}}}return r}var PC=/label:\s*([^\s;{]+)\s*(;|$)/g,_i;function Lv(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";_i=void 0;var a=e[0];if(a==null||a.raw===void 0)r=!1,i+=sf(n,t,a);else{var o=a;i+=o[0]}for(var s=1;s<e.length;s++)if(i+=sf(n,t,e[s]),r){var u=a;i+=u[s]}PC.lastIndex=0;for(var l="",c;(c=PC.exec(i))!==null;)l+="-"+c[1];var f=yne(i)+l;return{name:f,styles:i,next:_i}}function DC(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(r+=i+" ")}),r}var _ne=function(t,n,r){var i=t.key+"-"+n.name;t.registered[i]===void 0&&(t.registered[i]=n.styles)},kne=function(t,n,r){_ne(t,n);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var a=n;do t.insert(n===a?"."+i:"",a,t.sheet,!0),a=a.next;while(a!==void 0)}};function jC(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function NC(e,t,n){var r=[],i=DC(e,r,n);return r.length<2?n:i+t(r)}var Tne=function(t){var n=vne(t);n.sheet.speedy=function(s){if(process.env.NODE_ENV!=="production"&&this.ctr!==0)throw new Error("speedy must be changed before any rules are inserted");this.isSpeedy=s},n.compat=!0;var r=function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];var f=Lv(l,n.registered,void 0);return kne(n,f),n.key+"-"+f.name},i=function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];var f=Lv(l,n.registered),d="animation-"+f.name;return jC(n,{name:f.name,styles:"@keyframes "+d+"{"+f.styles+"}"}),d},a=function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];var f=Lv(l,n.registered);jC(n,f)},o=function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];return NC(n.registered,r,Cne(l))};return{css:r,cx:o,injectGlobal:a,keyframes:i,hydrate:function(u){u.forEach(function(l){n.inserted[l]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:DC.bind(null,n.registered),merge:NC.bind(null,n.registered,r)}},Cne=function e(t){for(var n="",r=0;r<t.length;r++){var i=t[r];if(i!=null){var a=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))a=e(i);else{a="";for(var o in i)i[o]&&o&&(a&&(a+=" "),a+=o)}break}default:a=i}a&&(n&&(n+=" "),n+=a)}}return n},One=qs,Bv=Date.prototype,MC="Invalid Date",FC="toString",$ne=Bv[FC],Ine=Bv.getTime;String(new Date(NaN))!=MC&&One(Bv,FC,function(){var t=Ine.call(this);return t===t?$ne.call(this):MC});var Rne=mv,Ane=DT,Pne=Rne?{}.toString:function(){return"[object "+Ane(this)+"]"},Dne=mv,jne=qs,Nne=Pne;Dne||jne(Object.prototype,"toString",Nne,{unsafe:!0});var Mne=fv.PROPER,Fne=qs,Lne=Si,LC=Hc,Bne=ar,Une=jT,Uv="toString",BC=RegExp.prototype,UC=BC[Uv],zne=Bne(function(){return UC.call({source:"a",flags:"b"})!="/a/b"}),qne=Mne&&UC.name!=Uv;(zne||qne)&&Fne(RegExp.prototype,Uv,function(){var t=Lne(this),n=LC(t.source),r=t.flags,i=LC(r===void 0&&t instanceof RegExp&&!("flags"in BC)?Une.call(t):r);return"/"+n+"/"+i},{unsafe:!0});var zC=typeof window<"u"?window:self,Wne=zC.crypto||zC.msCrypto,Vne=function(e){if(!e)return Math.random;var t=Math.pow(2,32),n=new Uint32Array(1);return function(){return e.getRandomValues(n)[0]/t}}(Wne);const Hne=Ge(Vne);function Zne(){return Hne().toString(26).substr(2,5).replace(/[0-9]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+65)})}var Kne=SE;const qC=Ge(Kne);function ht(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"white",n="background-color: ".concat(e,"; border-radius: 4px; padding: 2px 4px;");return t&&(n+=" color: ".concat(t,";")),[n,""]}function WC(e,t){for(var n,r,i=arguments.length,a=new Array(i>2?i-2:0),o=2;o<i;o++)a[o-2]=arguments[o];return It(n=[It(r="%c".concat(e,"%c ")).call(r,t)]).call(n,nt(ht("green","white")),a)}function Gne(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.force,r=n===void 0?!1:n;return r?function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];if(a.length){var s=a,u=Tr(s,1),l=u[0];typeof l=="function"&&(a=l());var c=qC(a[0])?a:[a],f=c.length===1;Jc(c).call(c,function(d,p){if(f){var m,h;(m=console).log.apply(m,nt(WC.apply(void 0,It(h=[e]).call(h,nt(d)))))}else if(p){var y;(y=console).log.apply(y,nt(qC(d)?d:[d]))}else{var v,b;(v=console).groupCollapsed.apply(v,nt(WC.apply(void 0,It(b=[e]).call(b,nt(d)))))}}),f||console.groupEnd()}}:function(){return 0}}var Yne=Ji,Jne=fv.EXISTS,Xne=Us.f,VC=Function.prototype,Qne=VC.toString,ere=/^\s*function ([^ (]*)/,tre="name";Yne&&!Jne&&Xne(VC,tre,{configurable:!0,get:function(){try{return Qne.call(this).match(ere)[1]}catch{return""}}});var nre=rn,rre=nre.setTimeout,ire=rre;const are=Ge(ire);function ore(e,t){if(!t)return e;var n=0,r=null;return function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s=Ei();s-n>t?(e.apply(void 0,a),n=s):(clearTimeout(r),r=are(function(){e.apply(void 0,a),n=Ei()},Math.max(0,t-s+n)))}}var HC=function(t){var n=t.debounce,r=t.name,i=t.onEvent,a=t.target,o=j.useRef();o.current=i;var s=j.useMemo(function(){return ore(function(l){var c=o.current;c&&c(l)},n)},[n,o]),u=j.useCallback(function(l){l.timeStampLow=Ei(),s(l)},[s]);return j.useLayoutEffect(function(){return a.addEventListener(r,u,{passive:!0}),u({target:a,type:r}),function(){return a.removeEventListener(r,u)}},[r,u,a]),!1};HC.defaultProps={debounce:200};var sre=Math.sign||function(t){var n=+t;return n===0||n!==n?n:n<0?-1:1},lre=yt,ure=sre;lre({target:"Math",stat:!0},{sign:ure});var cre=rn,fre=cre.Math.sign,dre=fre,pre=dre,hre=pre;const mre=Ge(hre);function vre(e,t){var n=mre(t-e),r=Math.sqrt(Math.abs(t-e)),i=e+r*n;return n>0?Math.min(t,i):Math.max(t,i)}function yre(e,t,n,r){for(var i=e,a=0;a<r;a++)i=n(i,t);return i}var ZC=function(t){var n=t.name,r=t.onEnd,i=t.target,a=t.value,o=j.useRef(),s=j.useCallback(function(l,c,f,d){var p=arguments.length>4&&arguments[4]!==void 0?arguments[4]:Ei();(f==="100%"||typeof f=="number")&&(cancelAnimationFrame(o.current),o.current=requestAnimationFrame(function(){if(i){var m=f==="100%"?i.scrollHeight-i.offsetHeight:f,h=yre(c,m,vre,(Ei()-p)/5);Math.abs(m-h)<1.5&&(h=m),i[l]=h,m===h?r&&r(!0):s(l,c,f,d+1,p)}}))},[o,r,i]),u=j.useCallback(function(){cancelAnimationFrame(o.current),r&&r(!1)},[r]);return j.useLayoutEffect(function(){return s(n,i[n],a,1),i?(i.addEventListener("pointerdown",u,{passive:!0}),i.addEventListener("wheel",u,{passive:!0}),function(){i.removeEventListener("pointerdown",u),i.removeEventListener("wheel",u),cancelAnimationFrame(o.current)}):function(){return cancelAnimationFrame(o.current)}},[s,o,u,n,i,a]),!1};ZC.propTypes={name:at.string.isRequired,onEnd:at.func,target:at.any.isRequired,value:at.oneOfType([at.number,at.oneOf(["100%"])]).isRequired};function zv(e){var t=j.useState(e),n=Tr(t,2),r=n[0],i=n[1],a=j.useRef(),o=j.useCallback(function(s){typeof s=="function"?o(function(u){return s=s(u),a.current=s,s}):(a.current=s,o(s))},[a]);return a.current=r,[r,i,a]}function KC(e,t){var n=Nee(e);if(cC){var r=cC(e);t&&(r=ete(r).call(r,function(i){return mC(e,i).enumerable})),n.push.apply(n,r)}return n}function GC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};if(t%2){var r;Jc(r=KC(Object(n),!0)).call(r,function(a){$K(e,a,n[a])})}else if(vC)Mte(e,vC(n));else{var i;Jc(i=KC(Object(n))).call(i,function(a){Lte(e,a,mC(n,a))})}}return e}var gre=function(){return 1/0},YC=17,bre="bottom",or="top",JC=1,wre=34,XC={};function xre(e,t){return e(),uQ(e,t)}function QC(e){var t=e.mode,n=e.target,r=n.offsetHeight,i=n.scrollHeight,a=n.scrollTop,o=i-a-r<JC,s=a<JC,u=t===or?s:o,l=t!==or?s:o;return{atBottom:o,atEnd:u,atStart:l,atTop:s}}function Ys(e,t){return e===(t===or?0:"100%")}var qv=function(t){var n=t.checkInterval,r=t.children,i=t.debounce,a=t.debug,o=t.initialScrollBehavior,s=t.mode,u=t.nonce,l=t.scroller,c=j.useMemo(function(){return Gne("<ScrollToBottom>",{force:a})},[a]);s=s===or?or:bre;var f=j.useRef(0),d=j.useRef(o),p=zv(s===or?0:"100%"),m=Tr(p,3),h=m[0],y=m[1],v=m[2],b=zv(null),w=Tr(b,3),T=w[0],E=w[1],_=w[2],O=j.useRef(0),z=j.useRef(0),U=j.useRef(0),k=j.useState(!0),D=Tr(k,2),W=D[0],B=D[1],I=j.useState(!0),A=Tr(I,2),L=A[0],Z=A[1],H=j.useState(!0),R=Tr(H,2),g=R[0],N=R[1],V=j.useState(!1),S=Tr(V,2),K=S[0],J=S[1],Y=zv(!0),Q=Tr(Y,3),ae=Q[0],oe=Q[1],X=Q[2],ee=j.useRef([]),G=j.useCallback(function(M){var ne=_.current;return ee.current.push(M),ne&&M({scrollTop:ne.scrollTop}),function(){var he=ee.current,Se=_Q(he).call(he,M);~Se&&KQ(he).call(he,Se,1)}},[ee,_]),pe=j.useCallback(function(){var M=v.current;c(function(){var ne;return It(ne=["%cSpineTo%c: %conEnd%c is fired."]).call(ne,nt(ht("magenta")),nt(ht("orange")),[{animateTo:M}])}),f.current=Ei(),Ys(M,s)||oe(!1),y(null)},[v,c,f,s,y,oe]),ge=j.useCallback(function(M){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},he=ne.behavior,Se=_.current;if(typeof M!="number"&&M!=="100%")return console.warn('react-scroll-to-bottom: Arguments passed to scrollTo() must be either number or "100%".');c(function(){var $e;return[It($e=["%cscrollTo%c: Will scroll to %c".concat(typeof M=="number"?M+"px":M.replace(/%/g,"%%"),"%c")]).call($e,nt(ht("lime","")),nt(ht("purple"))),{behavior:he,nextAnimateTo:M,target:Se}]}),he==="auto"?(pe(),Se&&(Se.scrollTop=M==="100%"?Se.scrollHeight-Se.offsetHeight:M)):(he!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollTo". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),y(M)),Ys(M,s)&&(c(function(){var $e;return[It($e=["%cscrollTo%c: Scrolling to end, will set sticky to %ctrue%c."]).call($e,nt(ht("lime","")),nt(ht("purple"))),[{mode:s,nextAnimateTo:M}]]}),oe(!0))},[c,pe,s,y,oe,_]),Ie=j.useCallback(function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=M.behavior;c(function(){var he;return It(he=["%cscrollToBottom%c: Called"]).call(he,nt(ht("yellow","")))}),ne!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToBottom". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),ge("100%",{behavior:ne||"smooth"})},[c,ge]),F=j.useCallback(function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=M.behavior;c(function(){var he;return It(he=["%cscrollToTop%c: Called"]).call(he,nt(ht("yellow","")))}),ne!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToTop". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),ge(0,{behavior:ne||"smooth"})},[c,ge]),ie=j.useCallback(function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=M.behavior;c(function(){var Se;return It(Se=["%cscrollToEnd%c: Called"]).call(Se,nt(ht("yellow","")))}),ne!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToEnd". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var he={behavior:ne||"smooth"};s===or?F(he):Ie(he)},[c,s,Ie,F]),ce=j.useCallback(function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=M.behavior;c(function(){var Se;return It(Se=["%cscrollToStart%c: Called"]).call(Se,nt(ht("yellow","")))}),ne!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToStart". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var he={behavior:ne||"smooth"};s===or?Ie(he):F(he)},[c,s,Ie,F]),se=j.useCallback(function(){var M=_.current;if(M){if(d.current==="auto"){c(function(){var _t;return It(_t=["%ctarget changed%c: Initial scroll"]).call(_t,nt(ht("blue")))}),M.scrollTop=s===or?0:M.scrollHeight-M.offsetHeight,d.current=!1;return}var ne=O.current,he=M.offsetHeight,Se=M.scrollHeight,$e=M.scrollTop,Ze=s===or?0:Math.max(0,Se-he-$e),et=Math.max(0,ne-$e),Tt=l({maxValue:Ze,minValue:et,offsetHeight:he,scrollHeight:Se,scrollTop:$e}),Et=Math.max(0,Math.min(Ze,Tt)),qe;s===or||Et!==Ze?qe=$e+Et:qe="100%",c(function(){var _t,Ke,hn;return[It(_t=[It(Ke=It(hn="%cscrollToSticky%c: Will animate from %c".concat(ne,"px%c to %c")).call(hn,typeof qe=="number"?qe+"px":qe.replace(/%/g,"%%"),"%c (%c")).call(Ke,(qe==="100%"?Ze:qe)+ne,"px%c)")]).call(_t,nt(ht("orange")),nt(ht("purple")),nt(ht("purple")),nt(ht("purple"))),{animateFrom:ne,maxValue:Ze,minValue:et,nextAnimateTo:qe,nextValue:Et,offsetHeight:he,rawNextValue:Tt,scrollHeight:Se,scrollTop:$e}]}),ge(qe,{behavior:"smooth"})}},[O,c,s,l,ge,_]),Ce=j.useCallback(function(M){var ne,he=M.timeStampLow,Se=v.current,$e=_.current,Ze=Se!==null;if(!(he<=f.current||!$e)){var et=QC({mode:s,target:$e}),Tt=et.atBottom,Et=et.atEnd,qe=et.atStart,_t=et.atTop;B(Tt),Z(Et),J(qe),N(_t);var Ke=$e.offsetHeight,hn=$e.scrollHeight,Nn=z.current,fr=U.current,ti=Ke!==Nn,Lr=hn!==fr;if(ti&&(z.current=Ke),Lr&&(U.current=hn),!ti&&!Lr){var dr=Ze&&Ys(Se,s)||Et;X.current!==dr&&(c(function(){var mt,Ct,Gt,Yt;return[It(mt=["%conScroll%c: %csetSticky%c(%c".concat(dr,"%c)")]).call(mt,nt(ht("red")),nt(ht("red")),nt(ht("purple"))),It(Ct=[It(Gt=It(Yt="(animating = %c".concat(Ze,"%c && isEnd = %c")).call(Yt,Ys(Se,s),"%c) || atEnd = %c")).call(Gt,Et,"%c")]).call(Ct,nt(ht("purple")),nt(ht("purple")),nt(ht("purple")),[{animating:Ze,animateTo:Se,atEnd:Et,mode:s,offsetHeight:$e.offsetHeight,scrollHeight:$e.scrollHeight,sticky:X.current,nextSticky:dr}])]}),oe(dr))}else X.current&&(c(function(){var mt;return[It(mt=["%conScroll%c: Size changed while sticky, calling %cscrollToSticky()%c"]).call(mt,nt(ht("red")),nt(ht("orange")),[{offsetHeightChanged:ti,scrollHeightChanged:Lr}]),{nextOffsetHeight:Ke,prevOffsetHeight:Nn,nextScrollHeight:hn,prevScrollHeight:fr}]}),se());var ni=$e.scrollTop;Jc(ne=ee.current).call(ne,function(mt){return mt({scrollTop:ni})})}},[v,c,f,s,z,U,ee,se,B,Z,J,N,oe,X,_]);j.useEffect(function(){if(T){var M=!1,ne=xre(function(){var he=_.current,Se=v.current!==null;X.current?QC({mode:s,target:he}).atEnd?M=!1:M?Ei()-M>wre&&(Se||(O.current=he.scrollTop,c(function(){var $e;return It($e=["%cInterval check%c: Should sticky but not at end, calling %cscrollToSticky()%c to scroll"]).call($e,nt(ht("navy")),nt(ht("orange")))}),se()),M=!1):M=Ei():he.scrollHeight<=he.offsetHeight&&!X.current&&(c(function(){var $e;return[It($e=["%cInterval check%c: Container is emptied, setting sticky back to %ctrue%c"]).call($e,nt(ht("navy")),nt(ht("purple"))),[{offsetHeight:he.offsetHeight,scrollHeight:he.scrollHeight,sticky:X.current}]]}),oe(!0))},Math.max(YC,n)||YC);return function(){return clearInterval(ne)}}},[v,n,c,s,se,oe,X,T,_]);var Ee=j.useMemo(function(){var M=XC[u]||(XC[u]=Tne({key:"react-scroll-to-bottom--css-"+Zne(),nonce:u}));return function(ne){return M.css(ne)+""}},[u]),Ae=j.useMemo(function(){return{observeScrollPosition:G,setTarget:E,styleToClassName:Ee}},[G,E,Ee]),He=j.useMemo(function(){return{atBottom:W,atEnd:L,atStart:K,atTop:g,mode:s}},[W,L,K,g,s]),te=j.useMemo(function(){var M=h!==null;return{animating:M,animatingToEnd:M&&Ys(h,s),sticky:ae}},[h,s,ae]),fe=j.useMemo(function(){return GC(GC({},He),te)},[He,te]),q=j.useMemo(function(){return{scrollTo:ge,scrollToBottom:Ie,scrollToEnd:ie,scrollToStart:ce,scrollToTop:F}},[ge,Ie,ie,ce,F]);return j.useEffect(function(){if(T){var M=function(){U.current=T.scrollHeight};return T.addEventListener("focus",M,{capture:!0,passive:!0}),function(){return T.removeEventListener("focus",M)}}},[T]),c(function(){var M;return[It(M=["%cRender%c: Render"]).call(M,nt(ht("cyan",""))),{animateTo:h,animating:h!==null,sticky:ae,target:T}]}),j.createElement(Nc.Provider,{value:Ae},j.createElement(zm.Provider,{value:q},j.createElement(Vm.Provider,{value:fe},j.createElement(qm.Provider,{value:He},j.createElement(Wm.Provider,{value:te},r,T&&j.createElement(HC,{debounce:i,name:"scroll",onEvent:Ce,target:T}),T&&h!==null&&j.createElement(ZC,{name:"scrollTop",onEnd:pe,target:T,value:h}))))))};qv.defaultProps={checkInterval:100,children:void 0,debounce:17,debug:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:gre},qv.propTypes={checkInterval:at.number,children:at.any,debounce:at.number,debug:at.bool,initialScrollBehavior:at.oneOf(["auto","smooth"]),mode:at.oneOf(["bottom","top"]),nonce:at.string,scroller:at.func};var Sre={height:"100%",overflowY:"auto",width:"100%"},Wv=function(t){var n=t.children,r=t.className,i=j.useContext(Nc),a=i.setTarget,o=Hm()(Sre);return j.createElement("div",{className:jm(o,(r||"")+""),ref:a},n)};Wv.defaultProps={children:void 0,className:void 0},Wv.propTypes={children:at.any,className:at.string};var Ere={position:"relative"},Vv=function(t){var n=t.children,r=t.className,i=t.followButtonClassName,a=t.scrollViewClassName,o=Hm()(Ere);return j.createElement("div",{className:jm(o,(r||"")+"")},j.createElement(Wv,{className:(a||"")+""},n),j.createElement(Zm,{className:(i||"")+""}))};Vv.defaultProps={children:void 0,className:void 0,followButtonClassName:void 0,scrollViewClassName:void 0},Vv.propTypes={children:at.any,className:at.string,followButtonClassName:at.string,scrollViewClassName:at.string};var Hv=function(t){var n=t.checkInterval,r=t.children,i=t.className,a=t.debounce,o=t.debug,s=t.followButtonClassName,u=t.initialScrollBehavior,l=t.mode,c=t.nonce,f=t.scroller,d=t.scrollViewClassName;return j.createElement(qv,{checkInterval:n,debounce:a,debug:o,initialScrollBehavior:u,mode:l,nonce:c,scroller:f},j.createElement(Vv,{className:i,followButtonClassName:s,scrollViewClassName:d},r))};Hv.defaultProps={checkInterval:void 0,children:void 0,className:void 0,debounce:void 0,debug:void 0,followButtonClassName:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:void 0,scrollViewClassName:void 0},Hv.propTypes={checkInterval:at.number,children:at.any,className:at.string,debounce:at.number,debug:at.bool,followButtonClassName:at.string,initialScrollBehavior:at.oneOf(["auto","smooth"]),mode:at.oneOf(["bottom","top"]),nonce:at.string,scroller:at.func,scrollViewClassName:at.string},IU();let Zv=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");const Kv=j.memo(({className:e,messages:t=[],isTyping:n,headerMessage:r,renderers:i,botAvatar:a,botDescription:o,botName:s,sendMessage:u,showMarquee:l=!0,...c})=>{const{messageList:f}=lt,d=j.useMemo(()=>hR(t),[t.length]);return $.jsxs(Hv,{...c,className:ms(f.container.className,e),followButtonClassName:f.scrollDownButton.button.className,scrollViewClassName:f.viewPort.className,children:[r&&$.jsx("span",{...f.headerMessage,children:r}),l&&$.jsx(OU,{botAvatar:a,botDescription:o,botName:s}),d.map(p=>$.jsx(vh,{renderers:i,sendMessage:u,...p},p.id)),n&&$.jsx(vh,{id:Zv(),renderers:i,sendMessage:u,direction:"incoming",timestamp:new Date,block:void 0,sender:{name:s??"",avatar:a},children:$.jsx(BS,{})})]})});Kv.displayName="MessageList";const _re=({className:e,...t})=>{const{className:n}=lt.loader;return $.jsx("div",{...t,className:ms(e,n)})},eO=({connected:e,configuration:t,closeWindow:n,isTyping:r,messages:i,user:a,sendMessage:o,uploadFile:s,isLoading:u,renderers:l,isReadOnly:c,disableComposer:f,restartConversation:d,allowFileUpload:p,...m})=>{const{color:h,fontFamily:y,radius:v,themeMode:b,variant:w,botAvatar:T,botDescription:E,botName:_,composerPlaceholder:O,showPoweredBy:z}=t,U={color:h,fontFamily:y,radius:v,themeMode:b,variant:w},k=j.useMemo(()=>i.map(D=>{const{authorId:W}=D,B=W===(a==null?void 0:a.id)?"outgoing":"incoming";return{...D,direction:B,sender:B==="outgoing"?{name:"You"}:{name:t.botName??"Bot",avatar:t.botAvatar}}}),[t.botAvatar,t.botName,i.length,a==null?void 0:a.id]);return $.jsxs($.Fragment,{children:[$.jsx(U1,{...U}),$.jsxs(fh,{connected:e,allowFileUpload:p,uploadFile:s,...m,children:[$.jsx(LS,{closeWindow:n,configuration:t,restartConversation:d}),u?$.jsx(_re,{}):$.jsx($.Fragment,{children:$.jsx(Kv,{botAvatar:T,botDescription:E,botName:_,renderers:l,isTyping:r,sendMessage:o,messages:k})}),$.jsx(u1,{sendMessage:o,uploadFile:s,connected:e,isReadOnly:c,disableComposer:f,showPoweredBy:z,composerPlaceholder:O,allowFileUpload:p})]})]})};function tO(e,t){return function(){return e.apply(t,arguments)}}const{toString:nO}=Object.prototype,{getPrototypeOf:Gv}=Object,Yv=(e=>t=>{const n=nO.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Yr=e=>(e=e.toLowerCase(),t=>Yv(t)===e),lf=e=>t=>typeof t===e,{isArray:no}=Array,Js=lf("undefined");function kre(e){return e!==null&&!Js(e)&&e.constructor!==null&&!Js(e.constructor)&&ea(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const rO=Yr("ArrayBuffer");function Tre(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&rO(e.buffer),t}const Cre=lf("string"),ea=lf("function"),iO=lf("number"),Jv=e=>e!==null&&typeof e=="object",Ore=e=>e===!0||e===!1,uf=e=>{if(Yv(e)!=="object")return!1;const t=Gv(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},$re=Yr("Date"),Ire=Yr("File"),Rre=Yr("Blob"),Are=Yr("FileList"),Pre=e=>Jv(e)&&ea(e.pipe),Dre=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||nO.call(e)===t||ea(e.toString)&&e.toString()===t)},jre=Yr("URLSearchParams"),Nre=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Xs(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),no(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let s;for(r=0;r<o;r++)s=a[r],t.call(null,e[s],s,e)}}function aO(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const oO=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,sO=e=>!Js(e)&&e!==oO;function Xv(){const{caseless:e}=sO(this)&&this||{},t={},n=(r,i)=>{const a=e&&aO(t,i)||i;uf(t[a])&&uf(r)?t[a]=Xv(t[a],r):uf(r)?t[a]=Xv({},r):no(r)?t[a]=r.slice():t[a]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Xs(arguments[r],n);return t}const Mre=(e,t,n,{allOwnKeys:r}={})=>(Xs(t,(i,a)=>{n&&ea(i)?e[a]=tO(i,n):e[a]=i},{allOwnKeys:r}),e),Fre=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Lre=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Bre=(e,t,n,r)=>{let i,a,o;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&Gv(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Ure=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},zre=e=>{if(!e)return null;if(no(e))return e;let t=e.length;if(!iO(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},qre=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Gv(Uint8Array)),Wre=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},Vre=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Hre=Yr("HTMLFormElement"),Zre=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),lO=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Kre=Yr("RegExp"),uO=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Xs(n,(i,a)=>{t(i,a,e)!==!1&&(r[a]=i)}),Object.defineProperties(e,r)},re={isArray:no,isArrayBuffer:rO,isBuffer:kre,isFormData:Dre,isArrayBufferView:Tre,isString:Cre,isNumber:iO,isBoolean:Ore,isObject:Jv,isPlainObject:uf,isUndefined:Js,isDate:$re,isFile:Ire,isBlob:Rre,isRegExp:Kre,isFunction:ea,isStream:Pre,isURLSearchParams:jre,isTypedArray:qre,isFileList:Are,forEach:Xs,merge:Xv,extend:Mre,trim:Nre,stripBOM:Fre,inherits:Lre,toFlatObject:Bre,kindOf:Yv,kindOfTest:Yr,endsWith:Ure,toArray:zre,forEachEntry:Wre,matchAll:Vre,isHTMLForm:Hre,hasOwnProperty:lO,hasOwnProp:lO,reduceDescriptors:uO,freezeMethods:e=>{uO(e,(t,n)=>{if(ea(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(ea(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},toObjectSet:(e,t)=>{const n={},r=i=>{i.forEach(a=>{n[a]=!0})};return no(e)?r(e):r(String(e).split(t)),n},toCamelCase:Zre,noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:aO,global:oO,isContextDefined:sO,toJSONObject:e=>{const t=new Array(10),n=(r,i)=>{if(Jv(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const a=no(r)?[]:{};return Xs(r,(o,s)=>{const u=n(o,i+1);!Js(u)&&(a[s]=u)}),t[i]=void 0,a}}return r};return n(e,0)}};function ot(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}re.inherits(ot,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:re.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const cO=ot.prototype,fO={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{fO[e]={value:e}}),Object.defineProperties(ot,fO),Object.defineProperty(cO,"isAxiosError",{value:!0}),ot.from=(e,t,n,r,i,a)=>{const o=Object.create(cO);return re.toFlatObject(e,o,function(u){return u!==Error.prototype},s=>s!=="isAxiosError"),ot.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};var Gre=typeof self=="object"?self.FormData:window.FormData;const Yre=Ge(Gre);function Qv(e){return re.isPlainObject(e)||re.isArray(e)}function dO(e){return re.endsWith(e,"[]")?e.slice(0,-2):e}function pO(e,t,n){return e?e.concat(t).map(function(i,a){return i=dO(i),!n&&a?"["+i+"]":i}).join(n?".":""):t}function Jre(e){return re.isArray(e)&&!e.some(Qv)}const Xre=re.toFlatObject(re,{},null,function(t){return/^is[A-Z]/.test(t)});function Qre(e){return e&&re.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function cf(e,t,n){if(!re.isObject(e))throw new TypeError("target must be an object");t=t||new(Yre||FormData),n=re.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,y){return!re.isUndefined(y[h])});const r=n.metaTokens,i=n.visitor||c,a=n.dots,o=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&Qre(t);if(!re.isFunction(i))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(re.isDate(m))return m.toISOString();if(!u&&re.isBlob(m))throw new ot("Blob is not supported. Use a Buffer instead.");return re.isArrayBuffer(m)||re.isTypedArray(m)?u&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function c(m,h,y){let v=m;if(m&&!y&&typeof m=="object"){if(re.endsWith(h,"{}"))h=r?h:h.slice(0,-2),m=JSON.stringify(m);else if(re.isArray(m)&&Jre(m)||re.isFileList(m)||re.endsWith(h,"[]")&&(v=re.toArray(m)))return h=dO(h),v.forEach(function(w,T){!(re.isUndefined(w)||w===null)&&t.append(o===!0?pO([h],T,a):o===null?h:h+"[]",l(w))}),!1}return Qv(m)?!0:(t.append(pO(y,h,a),l(m)),!1)}const f=[],d=Object.assign(Xre,{defaultVisitor:c,convertValue:l,isVisitable:Qv});function p(m,h){if(!re.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+h.join("."));f.push(m),re.forEach(m,function(v,b){(!(re.isUndefined(v)||v===null)&&i.call(t,v,re.isString(b)?b.trim():b,h,d))===!0&&p(v,h?h.concat(b):[b])}),f.pop()}}if(!re.isObject(e))throw new TypeError("data must be an object");return p(e),t}function hO(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function ey(e,t){this._pairs=[],e&&cf(e,this,t)}const mO=ey.prototype;mO.append=function(t,n){this._pairs.push([t,n])},mO.toString=function(t){const n=t?function(r){return t.call(this,r,hO)}:hO;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function eie(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function vO(e,t,n){if(!t)return e;const r=n&&n.encode||eie,i=n&&n.serialize;let a;if(i?a=i(t,n):a=re.isURLSearchParams(t)?t.toString():new ey(t,n).toString(r),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class yO{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){re.forEach(this.handlers,function(r){r!==null&&t(r)})}}const gO={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},tie=typeof URLSearchParams<"u"?URLSearchParams:ey,nie=FormData,rie=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),iie=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ir={isBrowser:!0,classes:{URLSearchParams:tie,FormData:nie,Blob},isStandardBrowserEnv:rie,isStandardBrowserWebWorkerEnv:iie,protocols:["http","https","file","blob","url","data"]};function aie(e,t){return cf(e,new Ir.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,a){return Ir.isNode&&re.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function oie(e){return re.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function sie(e){const t={},n=Object.keys(e);let r;const i=n.length;let a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function bO(e){function t(n,r,i,a){let o=n[a++];const s=Number.isFinite(+o),u=a>=n.length;return o=!o&&re.isArray(i)?i.length:o,u?(re.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!s):((!i[o]||!re.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],a)&&re.isArray(i[o])&&(i[o]=sie(i[o])),!s)}if(re.isFormData(e)&&re.isFunction(e.entries)){const n={};return re.forEachEntry(e,(r,i)=>{t(oie(r),i,n,0)}),n}return null}const lie={"Content-Type":void 0};function uie(e,t,n){if(re.isString(e))try{return(t||JSON.parse)(e),re.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ro={transitional:gO,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,a=re.isObject(t);if(a&&re.isHTMLForm(t)&&(t=new FormData(t)),re.isFormData(t))return i&&i?JSON.stringify(bO(t)):t;if(re.isArrayBuffer(t)||re.isBuffer(t)||re.isStream(t)||re.isFile(t)||re.isBlob(t))return t;if(re.isArrayBufferView(t))return t.buffer;if(re.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return aie(t,this.formSerializer).toString();if((s=re.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return cf(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}return a||i?(n.setContentType("application/json",!1),uie(t)):t}],transformResponse:[function(t){const n=this.transitional||ro.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&re.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(o)throw s.name==="SyntaxError"?ot.from(s,ot.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ir.classes.FormData,Blob:Ir.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};re.forEach(["delete","get","head"],function(t){ro.headers[t]={}}),re.forEach(["post","put","patch"],function(t){ro.headers[t]=re.merge(lie)});const cie=re.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),fie=e=>{const t={};let n,r,i;return e&&e.split(`
174
+ `).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&cie[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},wO=Symbol("internals");function Qs(e){return e&&String(e).trim().toLowerCase()}function ff(e){return e===!1||e==null?e:re.isArray(e)?e.map(ff):String(e)}function die(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}function pie(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function xO(e,t,n,r){if(re.isFunction(r))return r.call(this,t,n);if(re.isString(t)){if(re.isString(r))return t.indexOf(r)!==-1;if(re.isRegExp(r))return r.test(t)}}function hie(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function mie(e,t){const n=re.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,a,o){return this[r].call(this,t,i,a,o)},configurable:!0})})}class Wn{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function a(s,u,l){const c=Qs(u);if(!c)throw new Error("header name must be a non-empty string");const f=re.findKey(i,c);(!f||i[f]===void 0||l===!0||l===void 0&&i[f]!==!1)&&(i[f||u]=ff(s))}const o=(s,u)=>re.forEach(s,(l,c)=>a(l,c,u));return re.isPlainObject(t)||t instanceof this.constructor?o(t,n):re.isString(t)&&(t=t.trim())&&!pie(t)?o(fie(t),n):t!=null&&a(n,t,r),this}get(t,n){if(t=Qs(t),t){const r=re.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return die(i);if(re.isFunction(n))return n.call(this,i,r);if(re.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Qs(t),t){const r=re.findKey(this,t);return!!(r&&(!n||xO(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function a(o){if(o=Qs(o),o){const s=re.findKey(r,o);s&&(!n||xO(r,r[s],s,n))&&(delete r[s],i=!0)}}return re.isArray(t)?t.forEach(a):a(t),i}clear(){return Object.keys(this).forEach(this.delete.bind(this))}normalize(t){const n=this,r={};return re.forEach(this,(i,a)=>{const o=re.findKey(r,a);if(o){n[o]=ff(i),delete n[a];return}const s=t?hie(a):String(a).trim();s!==a&&delete n[a],n[s]=ff(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return re.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&re.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
175
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[wO]=this[wO]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=Qs(o);r[s]||(mie(i,o),r[s]=!0)}return re.isArray(t)?t.forEach(a):a(t),this}}Wn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),re.freezeMethods(Wn.prototype),re.freezeMethods(Wn);function ty(e,t){const n=this||ro,r=t||n,i=Wn.from(r.headers);let a=r.data;return re.forEach(e,function(s){a=s.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function SO(e){return!!(e&&e.__CANCEL__)}function el(e,t,n){ot.call(this,e??"canceled",ot.ERR_CANCELED,t,n),this.name="CanceledError"}re.inherits(el,ot,{__CANCEL__:!0});const vie=null;function yie(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ot("Request failed with status code "+n.status,[ot.ERR_BAD_REQUEST,ot.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const gie=Ir.isStandardBrowserEnv?function(){return{write:function(n,r,i,a,o,s){const u=[];u.push(n+"="+encodeURIComponent(r)),re.isNumber(i)&&u.push("expires="+new Date(i).toGMTString()),re.isString(a)&&u.push("path="+a),re.isString(o)&&u.push("domain="+o),s===!0&&u.push("secure"),document.cookie=u.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function bie(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function wie(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function EO(e,t){return e&&!bie(t)?wie(e,t):t}const xie=Ir.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(a){let o=a;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(o){const s=re.isString(o)?i(o):o;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();function Sie(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Eie(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(u){const l=Date.now(),c=r[a];o||(o=l),n[i]=u,r[i]=l;let f=a,d=0;for(;f!==i;)d+=n[f++],f=f%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),l-o<t)return;const p=c&&l-c;return p?Math.round(d*1e3/p):void 0}}function _O(e,t){let n=0;const r=Eie(50,250);return i=>{const a=i.loaded,o=i.lengthComputable?i.total:void 0,s=a-n,u=r(s),l=a<=o;n=a;const c={loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:u||void 0,estimated:u&&o&&l?(o-a)/u:void 0,event:i};c[t?"download":"upload"]=!0,e(c)}}const df={http:vie,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let i=e.data;const a=Wn.from(e.headers).normalize(),o=e.responseType;let s;function u(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}re.isFormData(i)&&(Ir.isStandardBrowserEnv||Ir.isStandardBrowserWebWorkerEnv)&&a.setContentType(!1);let l=new XMLHttpRequest;if(e.auth){const p=e.auth.username||"",m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(p+":"+m))}const c=EO(e.baseURL,e.url);l.open(e.method.toUpperCase(),vO(c,e.params,e.paramsSerializer),!0),l.timeout=e.timeout;function f(){if(!l)return;const p=Wn.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),h={data:!o||o==="text"||o==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:p,config:e,request:l};yie(function(v){n(v),u()},function(v){r(v),u()},h),l=null}if("onloadend"in l?l.onloadend=f:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(f)},l.onabort=function(){l&&(r(new ot("Request aborted",ot.ECONNABORTED,e,l)),l=null)},l.onerror=function(){r(new ot("Network Error",ot.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let m=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const h=e.transitional||gO;e.timeoutErrorMessage&&(m=e.timeoutErrorMessage),r(new ot(m,h.clarifyTimeoutError?ot.ETIMEDOUT:ot.ECONNABORTED,e,l)),l=null},Ir.isStandardBrowserEnv){const p=(e.withCredentials||xie(c))&&e.xsrfCookieName&&gie.read(e.xsrfCookieName);p&&a.set(e.xsrfHeaderName,p)}i===void 0&&a.setContentType(null),"setRequestHeader"in l&&re.forEach(a.toJSON(),function(m,h){l.setRequestHeader(h,m)}),re.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),o&&o!=="json"&&(l.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&l.addEventListener("progress",_O(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",_O(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=p=>{l&&(r(!p||p.type?new el(null,e,l):p),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const d=Sie(c);if(d&&Ir.protocols.indexOf(d)===-1){r(new ot("Unsupported protocol "+d+":",ot.ERR_BAD_REQUEST,e));return}l.send(i||null)})}};re.forEach(df,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const _ie={getAdapter:e=>{e=re.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let i=0;i<t&&(n=e[i],!(r=re.isString(n)?df[n.toLowerCase()]:n));i++);if(!r)throw r===!1?new ot(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(re.hasOwnProp(df,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!re.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:df};function ny(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new el(null,e)}function kO(e){return ny(e),e.headers=Wn.from(e.headers),e.data=ty.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),_ie.getAdapter(e.adapter||ro.adapter)(e).then(function(r){return ny(e),r.data=ty.call(e,e.transformResponse,r),r.headers=Wn.from(r.headers),r},function(r){return SO(r)||(ny(e),r&&r.response&&(r.response.data=ty.call(e,e.transformResponse,r.response),r.response.headers=Wn.from(r.response.headers))),Promise.reject(r)})}const TO=e=>e instanceof Wn?e.toJSON():e;function io(e,t){t=t||{};const n={};function r(l,c,f){return re.isPlainObject(l)&&re.isPlainObject(c)?re.merge.call({caseless:f},l,c):re.isPlainObject(c)?re.merge({},c):re.isArray(c)?c.slice():c}function i(l,c,f){if(re.isUndefined(c)){if(!re.isUndefined(l))return r(void 0,l,f)}else return r(l,c,f)}function a(l,c){if(!re.isUndefined(c))return r(void 0,c)}function o(l,c){if(re.isUndefined(c)){if(!re.isUndefined(l))return r(void 0,l)}else return r(void 0,c)}function s(l,c,f){if(f in t)return r(l,c);if(f in e)return r(void 0,l)}const u={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(l,c)=>i(TO(l),TO(c),!0)};return re.forEach(Object.keys(e).concat(Object.keys(t)),function(c){const f=u[c]||i,d=f(e[c],t[c],c);re.isUndefined(d)&&f!==s||(n[c]=d)}),n}const CO="1.2.5",ry={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ry[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const OO={};ry.transitional=function(t,n,r){function i(a,o){return"[Axios v"+CO+"] Transitional option '"+a+"'"+o+(r?". "+r:"")}return(a,o,s)=>{if(t===!1)throw new ot(i(o," has been removed"+(n?" in "+n:"")),ot.ERR_DEPRECATED);return n&&!OO[o]&&(OO[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,o,s):!0}};function kie(e,t,n){if(typeof e!="object")throw new ot("options must be an object",ot.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const a=r[i],o=t[a];if(o){const s=e[a],u=s===void 0||o(s,a,e);if(u!==!0)throw new ot("option "+a+" must be "+u,ot.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ot("Unknown option "+a,ot.ERR_BAD_OPTION)}}const iy={assertOptions:kie,validators:ry},ki=iy.validators;class ta{constructor(t){this.defaults=t,this.interceptors={request:new yO,response:new yO}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=io(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:a}=n;r!==void 0&&iy.assertOptions(r,{silentJSONParsing:ki.transitional(ki.boolean),forcedJSONParsing:ki.transitional(ki.boolean),clarifyTimeoutError:ki.transitional(ki.boolean)},!1),i!==void 0&&iy.assertOptions(i,{encode:ki.function,serialize:ki.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o;o=a&&re.merge(a.common,a[n.method]),o&&re.forEach(["delete","get","head","post","put","patch","common"],m=>{delete a[m]}),n.headers=Wn.concat(o,a);const s=[];let u=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(u=u&&h.synchronous,s.unshift(h.fulfilled,h.rejected))});const l=[];this.interceptors.response.forEach(function(h){l.push(h.fulfilled,h.rejected)});let c,f=0,d;if(!u){const m=[kO.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,l),d=m.length,c=Promise.resolve(n);f<d;)c=c.then(m[f++],m[f++]);return c}d=s.length;let p=n;for(f=0;f<d;){const m=s[f++],h=s[f++];try{p=m(p)}catch(y){h.call(this,y);break}}try{c=kO.call(this,p)}catch(m){return Promise.reject(m)}for(f=0,d=l.length;f<d;)c=c.then(l[f++],l[f++]);return c}getUri(t){t=io(this.defaults,t);const n=EO(t.baseURL,t.url);return vO(n,t.params,t.paramsSerializer)}}re.forEach(["delete","get","head","options"],function(t){ta.prototype[t]=function(n,r){return this.request(io(r||{},{method:t,url:n,data:(r||{}).data}))}}),re.forEach(["post","put","patch"],function(t){function n(r){return function(a,o,s){return this.request(io(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}ta.prototype[t]=n(),ta.prototype[t+"Form"]=n(!0)});class ay{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(i=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](i);r._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(s=>{r.subscribe(s),a=s}).then(i);return o.cancel=function(){r.unsubscribe(a)},o},t(function(a,o,s){r.reason||(r.reason=new el(a,o,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new ay(function(i){t=i}),cancel:t}}}function Tie(e){return function(n){return e.apply(null,n)}}function Cie(e){return re.isObject(e)&&e.isAxiosError===!0}const oy={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(oy).forEach(([e,t])=>{oy[t]=e});function $O(e){const t=new ta(e),n=tO(ta.prototype.request,t);return re.extend(n,ta.prototype,t,{allOwnKeys:!0}),re.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return $O(io(e,i))},n}const zt=$O(ro);zt.Axios=ta,zt.CanceledError=el,zt.CancelToken=ay,zt.isCancel=SO,zt.VERSION=CO,zt.toFormData=cf,zt.AxiosError=ot,zt.Cancel=zt.CanceledError,zt.all=function(t){return Promise.all(t)},zt.spread=Tie,zt.isAxiosError=Cie,zt.mergeConfig=io,zt.AxiosHeaders=Wn,zt.formToJSON=e=>bO(re.isHTMLForm(e)?new FormData(e):e),zt.HttpStatusCode=oy,zt.default=zt;const IO={},Oie=Object.freeze(Object.defineProperty({__proto__:null,default:IO},Symbol.toStringTag,{value:"Module"}));var RO=Object,$ie=Error,Iie=EvalError,Rie=RangeError,Aie=ReferenceError,AO=SyntaxError,ao=TypeError,Pie=URIError,Die=Math.abs,jie=Math.floor,Nie=Math.max,Mie=Math.min,Fie=Math.pow,Lie=Math.round,Bie=Number.isNaN||function(t){return t!==t},Uie=Bie,zie=function(t){return Uie(t)||t===0?t:t<0?-1:1},qie=Object.getOwnPropertyDescriptor,pf=qie;if(pf)try{pf([],"length")}catch{pf=null}var hf=pf,mf=Object.defineProperty||!1;if(mf)try{mf({},"a",{value:1})}catch{mf=!1}var vf=mf,sy,PO;function Wie(){return PO||(PO=1,sy=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;t[n]=i;for(var a in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==i||s.enumerable!==!0)return!1}return!0}),sy}var ly,DO;function Vie(){if(DO)return ly;DO=1;var e=typeof Symbol<"u"&&Symbol,t=Wie();return ly=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},ly}var uy,jO;function NO(){return jO||(jO=1,uy=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),uy}var cy,MO;function FO(){if(MO)return cy;MO=1;var e=RO;return cy=e.getPrototypeOf||null,cy}var Hie="Function.prototype.bind called on incompatible ",Zie=Object.prototype.toString,Kie=Math.max,Gie="[object Function]",LO=function(t,n){for(var r=[],i=0;i<t.length;i+=1)r[i]=t[i];for(var a=0;a<n.length;a+=1)r[a+t.length]=n[a];return r},Yie=function(t,n){for(var r=[],i=n,a=0;i<t.length;i+=1,a+=1)r[a]=t[i];return r},Jie=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},Xie=function(t){var n=this;if(typeof n!="function"||Zie.apply(n)!==Gie)throw new TypeError(Hie+n);for(var r=Yie(arguments,1),i,a=function(){if(this instanceof i){var c=n.apply(this,LO(r,arguments));return Object(c)===c?c:this}return n.apply(t,LO(r,arguments))},o=Kie(0,n.length-r.length),s=[],u=0;u<o;u++)s[u]="$"+u;if(i=Function("binder","return function ("+Jie(s,",")+"){ return binder.apply(this,arguments); }")(a),n.prototype){var l=function(){};l.prototype=n.prototype,i.prototype=new l,l.prototype=null}return i},Qie=Xie,tl=Function.prototype.bind||Qie,fy,BO;function dy(){return BO||(BO=1,fy=Function.prototype.call),fy}var py,UO;function zO(){return UO||(UO=1,py=Function.prototype.apply),py}var hy,qO;function eae(){return qO||(qO=1,hy=typeof Reflect<"u"&&Reflect&&Reflect.apply),hy}var my,WO;function tae(){if(WO)return my;WO=1;var e=tl,t=zO(),n=dy(),r=eae();return my=r||e.call(n,t),my}var vy,VO;function nae(){if(VO)return vy;VO=1;var e=tl,t=ao,n=dy(),r=tae();return vy=function(a){if(a.length<1||typeof a[0]!="function")throw new t("a function is required");return r(e,n,a)},vy}var yy,HO;function rae(){if(HO)return yy;HO=1;var e=nae(),t=hf,n;try{n=[].__proto__===Array.prototype}catch(o){if(!o||typeof o!="object"||!("code"in o)||o.code!=="ERR_PROTO_ACCESS")throw o}var r=!!n&&t&&t(Object.prototype,"__proto__"),i=Object,a=i.getPrototypeOf;return yy=r&&typeof r.get=="function"?e([r.get]):typeof a=="function"?function(s){return a(s==null?s:i(s))}:!1,yy}var gy,ZO;function iae(){if(ZO)return gy;ZO=1;var e=NO(),t=FO(),n=rae();return gy=e?function(i){return e(i)}:t?function(i){if(!i||typeof i!="object"&&typeof i!="function")throw new TypeError("getProto: not an object");return t(i)}:n?function(i){return n(i)}:null,gy}var by,KO;function aae(){if(KO)return by;KO=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=tl;return by=n.call(e,t),by}var Xe,oae=RO,sae=$ie,lae=Iie,uae=Rie,cae=Aie,oo=AO,so=ao,fae=Pie,dae=Die,pae=jie,hae=Nie,mae=Mie,vae=Fie,yae=Lie,gae=zie,GO=Function,wy=function(e){try{return GO('"use strict"; return ('+e+").constructor;")()}catch{}},nl=hf,bae=vf,xy=function(){throw new so},wae=nl?function(){try{return arguments.callee,xy}catch{try{return nl(arguments,"callee").get}catch{return xy}}}():xy,lo=Vie()(),en=iae(),xae=FO(),Sae=NO(),YO=zO(),rl=dy(),uo={},Eae=typeof Uint8Array>"u"||!en?Xe:en(Uint8Array),na={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Xe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Xe:ArrayBuffer,"%ArrayIteratorPrototype%":lo&&en?en([][Symbol.iterator]()):Xe,"%AsyncFromSyncIteratorPrototype%":Xe,"%AsyncFunction%":uo,"%AsyncGenerator%":uo,"%AsyncGeneratorFunction%":uo,"%AsyncIteratorPrototype%":uo,"%Atomics%":typeof Atomics>"u"?Xe:Atomics,"%BigInt%":typeof BigInt>"u"?Xe:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Xe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Xe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Xe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":sae,"%eval%":eval,"%EvalError%":lae,"%Float32Array%":typeof Float32Array>"u"?Xe:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Xe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Xe:FinalizationRegistry,"%Function%":GO,"%GeneratorFunction%":uo,"%Int8Array%":typeof Int8Array>"u"?Xe:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Xe:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Xe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":lo&&en?en(en([][Symbol.iterator]())):Xe,"%JSON%":typeof JSON=="object"?JSON:Xe,"%Map%":typeof Map>"u"?Xe:Map,"%MapIteratorPrototype%":typeof Map>"u"||!lo||!en?Xe:en(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":oae,"%Object.getOwnPropertyDescriptor%":nl,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Xe:Promise,"%Proxy%":typeof Proxy>"u"?Xe:Proxy,"%RangeError%":uae,"%ReferenceError%":cae,"%Reflect%":typeof Reflect>"u"?Xe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Xe:Set,"%SetIteratorPrototype%":typeof Set>"u"||!lo||!en?Xe:en(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Xe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":lo&&en?en(""[Symbol.iterator]()):Xe,"%Symbol%":lo?Symbol:Xe,"%SyntaxError%":oo,"%ThrowTypeError%":wae,"%TypedArray%":Eae,"%TypeError%":so,"%Uint8Array%":typeof Uint8Array>"u"?Xe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Xe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Xe:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Xe:Uint32Array,"%URIError%":fae,"%WeakMap%":typeof WeakMap>"u"?Xe:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Xe:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Xe:WeakSet,"%Function.prototype.call%":rl,"%Function.prototype.apply%":YO,"%Object.defineProperty%":bae,"%Object.getPrototypeOf%":xae,"%Math.abs%":dae,"%Math.floor%":pae,"%Math.max%":hae,"%Math.min%":mae,"%Math.pow%":vae,"%Math.round%":yae,"%Math.sign%":gae,"%Reflect.getPrototypeOf%":Sae};if(en)try{null.error}catch(e){var _ae=en(en(e));na["%Error.prototype%"]=_ae}var kae=function e(t){var n;if(t==="%AsyncFunction%")n=wy("async function () {}");else if(t==="%GeneratorFunction%")n=wy("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=wy("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&en&&(n=en(i.prototype))}return na[t]=n,n},JO={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},il=tl,yf=aae(),Tae=il.call(rl,Array.prototype.concat),Cae=il.call(YO,Array.prototype.splice),XO=il.call(rl,String.prototype.replace),gf=il.call(rl,String.prototype.slice),Oae=il.call(rl,RegExp.prototype.exec),$ae=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Iae=/\\(\\)?/g,Rae=function(t){var n=gf(t,0,1),r=gf(t,-1);if(n==="%"&&r!=="%")throw new oo("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new oo("invalid intrinsic syntax, expected opening `%`");var i=[];return XO(t,$ae,function(a,o,s,u){i[i.length]=s?XO(u,Iae,"$1"):o||a}),i},Aae=function(t,n){var r=t,i;if(yf(JO,r)&&(i=JO[r],r="%"+i[0]+"%"),yf(na,r)){var a=na[r];if(a===uo&&(a=kae(r)),typeof a>"u"&&!n)throw new so("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:a}}throw new oo("intrinsic "+t+" does not exist!")},bf=function(t,n){if(typeof t!="string"||t.length===0)throw new so("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new so('"allowMissing" argument must be a boolean');if(Oae(/^%?[^%]*%?$/,t)===null)throw new oo("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Rae(t),i=r.length>0?r[0]:"",a=Aae("%"+i+"%",n),o=a.name,s=a.value,u=!1,l=a.alias;l&&(i=l[0],Cae(r,Tae([0,1],l)));for(var c=1,f=!0;c<r.length;c+=1){var d=r[c],p=gf(d,0,1),m=gf(d,-1);if((p==='"'||p==="'"||p==="`"||m==='"'||m==="'"||m==="`")&&p!==m)throw new oo("property names with quotes must have matching quotes");if((d==="constructor"||!f)&&(u=!0),i+="."+d,o="%"+i+"%",yf(na,o))s=na[o];else if(s!=null){if(!(d in s)){if(!n)throw new so("base intrinsic for "+t+" exists, but the property is not available.");return}if(nl&&c+1>=r.length){var h=nl(s,d);f=!!h,f&&"get"in h&&!("originalValue"in h.get)?s=h.get:s=s[d]}else f=yf(s,d),s=s[d];f&&!u&&(na[o]=s)}}return s},QO={exports:{}},e$=vf,Pae=AO,co=ao,t$=hf,Dae=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new co("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new co("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new co("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new co("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new co("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new co("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,u=!!t$&&t$(t,n);if(e$)e$(t,n,{configurable:o===null&&u?u.configurable:!o,enumerable:i===null&&u?u.enumerable:!i,value:r,writable:a===null&&u?u.writable:!a});else if(s||!i&&!a&&!o)t[n]=r;else throw new Pae("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Sy=vf,n$=function(){return!!Sy};n$.hasArrayLengthDefineBug=function(){if(!Sy)return null;try{return Sy([],"length",{value:1}).length!==1}catch{return!0}};var jae=n$,Nae=bf,r$=Dae,Mae=jae(),i$=hf,a$=ao,Fae=Nae("%Math.floor%"),Lae=function(t,n){if(typeof t!="function")throw new a$("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||Fae(n)!==n)throw new a$("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],i=!0,a=!0;if("length"in t&&i$){var o=i$(t,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(a=!1)}return(i||a||!r)&&(Mae?r$(t,"length",n,!0,!0):r$(t,"length",n)),t};(function(e){var t=tl,n=bf,r=Lae,i=ao,a=n("%Function.prototype.apply%"),o=n("%Function.prototype.call%"),s=n("%Reflect.apply%",!0)||t.call(o,a),u=vf,l=n("%Math.max%");e.exports=function(d){if(typeof d!="function")throw new i("a function is required");var p=s(t,o,arguments);return r(p,1+l(0,d.length-(arguments.length-1)),!0)};var c=function(){return s(t,a,arguments)};u?u(e.exports,"apply",{value:c}):e.exports.apply=c})(QO);var Bae=QO.exports,o$=bf,s$=Bae,Uae=s$(o$("String.prototype.indexOf")),zae=function(t,n){var r=o$(t,!!n);return typeof r=="function"&&Uae(t,".prototype.")>-1?s$(r):r};const qae=CI(Oie);var Ey=typeof Map=="function"&&Map.prototype,_y=Object.getOwnPropertyDescriptor&&Ey?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,wf=Ey&&_y&&typeof _y.get=="function"?_y.get:null,l$=Ey&&Map.prototype.forEach,ky=typeof Set=="function"&&Set.prototype,Ty=Object.getOwnPropertyDescriptor&&ky?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,xf=ky&&Ty&&typeof Ty.get=="function"?Ty.get:null,u$=ky&&Set.prototype.forEach,Wae=typeof WeakMap=="function"&&WeakMap.prototype,al=Wae?WeakMap.prototype.has:null,Vae=typeof WeakSet=="function"&&WeakSet.prototype,ol=Vae?WeakSet.prototype.has:null,Hae=typeof WeakRef=="function"&&WeakRef.prototype,c$=Hae?WeakRef.prototype.deref:null,Zae=Boolean.prototype.valueOf,Kae=Object.prototype.toString,Gae=Function.prototype.toString,Yae=String.prototype.match,Cy=String.prototype.slice,Ti=String.prototype.replace,Jae=String.prototype.toUpperCase,f$=String.prototype.toLowerCase,d$=RegExp.prototype.test,p$=Array.prototype.concat,Rr=Array.prototype.join,Xae=Array.prototype.slice,h$=Math.floor,Oy=typeof BigInt=="function"?BigInt.prototype.valueOf:null,$y=Object.getOwnPropertySymbols,Iy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,fo=typeof Symbol=="function"&&typeof Symbol.iterator=="object",dn=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===fo||!0)?Symbol.toStringTag:null,m$=Object.prototype.propertyIsEnumerable,v$=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function y$(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||d$.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-h$(-e):h$(e);if(r!==e){var i=String(r),a=Cy.call(t,i.length+1);return Ti.call(i,n,"$&_")+"."+Ti.call(Ti.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Ti.call(t,n,"$&_")}var Ry=qae,g$=Ry.custom,b$=S$(g$)?g$:null,Qae=function e(t,n,r,i){var a=n||{};if(Ci(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ci(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=Ci(a,"customInspect")?a.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ci(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ci(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=a.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return _$(t,a);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var u=String(t);return s?y$(t,u):u}if(typeof t=="bigint"){var l=String(t)+"n";return s?y$(t,l):l}var c=typeof a.depth>"u"?5:a.depth;if(typeof r>"u"&&(r=0),r>=c&&c>0&&typeof t=="object")return Ay(t)?"[Array]":"[Object]";var f=yoe(a,r);if(typeof i>"u")i=[];else if(E$(i,t)>=0)return"[Circular]";function d(B,I,A){if(I&&(i=Xae.call(i),i.push(I)),A){var L={depth:a.depth};return Ci(a,"quoteStyle")&&(L.quoteStyle=a.quoteStyle),e(B,L,r+1,i)}return e(B,a,r+1,i)}if(typeof t=="function"&&!x$(t)){var p=loe(t),m=Sf(t,d);return"[Function"+(p?": "+p:" (anonymous)")+"]"+(m.length>0?" { "+Rr.call(m,", ")+" }":"")}if(S$(t)){var h=fo?Ti.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Iy.call(t);return typeof t=="object"&&!fo?sl(h):h}if(hoe(t)){for(var y="<"+f$.call(String(t.nodeName)),v=t.attributes||[],b=0;b<v.length;b++)y+=" "+v[b].name+"="+w$(eoe(v[b].value),"double",a);return y+=">",t.childNodes&&t.childNodes.length&&(y+="..."),y+="</"+f$.call(String(t.nodeName))+">",y}if(Ay(t)){if(t.length===0)return"[]";var w=Sf(t,d);return f&&!voe(w)?"["+Dy(w,f)+"]":"[ "+Rr.call(w,", ")+" ]"}if(noe(t)){var T=Sf(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!m$.call(t,"cause")?"{ ["+String(t)+"] "+Rr.call(p$.call("[cause]: "+d(t.cause),T),", ")+" }":T.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Rr.call(T,", ")+" }"}if(typeof t=="object"&&o){if(b$&&typeof t[b$]=="function"&&Ry)return Ry(t,{depth:c-r});if(o!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(uoe(t)){var E=[];return l$&&l$.call(t,function(B,I){E.push(d(I,t,!0)+" => "+d(B,t))}),k$("Map",wf.call(t),E,f)}if(doe(t)){var _=[];return u$&&u$.call(t,function(B){_.push(d(B,t))}),k$("Set",xf.call(t),_,f)}if(coe(t))return Py("WeakMap");if(poe(t))return Py("WeakSet");if(foe(t))return Py("WeakRef");if(ioe(t))return sl(d(Number(t)));if(ooe(t))return sl(d(Oy.call(t)));if(aoe(t))return sl(Zae.call(t));if(roe(t))return sl(d(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof vt<"u"&&t===vt)return"{ [object globalThis] }";if(!toe(t)&&!x$(t)){var O=Sf(t,d),z=v$?v$(t)===Object.prototype:t instanceof Object||t.constructor===Object,U=t instanceof Object?"":"null prototype",k=!z&&dn&&Object(t)===t&&dn in t?Cy.call(Oi(t),8,-1):U?"Object":"",D=z||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",W=D+(k||U?"["+Rr.call(p$.call([],k||[],U||[]),": ")+"] ":"");return O.length===0?W+"{}":f?W+"{"+Dy(O,f)+"}":W+"{ "+Rr.call(O,", ")+" }"}return String(t)};function w$(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function eoe(e){return Ti.call(String(e),/"/g,"&quot;")}function Ay(e){return Oi(e)==="[object Array]"&&(!dn||!(typeof e=="object"&&dn in e))}function toe(e){return Oi(e)==="[object Date]"&&(!dn||!(typeof e=="object"&&dn in e))}function x$(e){return Oi(e)==="[object RegExp]"&&(!dn||!(typeof e=="object"&&dn in e))}function noe(e){return Oi(e)==="[object Error]"&&(!dn||!(typeof e=="object"&&dn in e))}function roe(e){return Oi(e)==="[object String]"&&(!dn||!(typeof e=="object"&&dn in e))}function ioe(e){return Oi(e)==="[object Number]"&&(!dn||!(typeof e=="object"&&dn in e))}function aoe(e){return Oi(e)==="[object Boolean]"&&(!dn||!(typeof e=="object"&&dn in e))}function S$(e){if(fo)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Iy)return!1;try{return Iy.call(e),!0}catch{}return!1}function ooe(e){if(!e||typeof e!="object"||!Oy)return!1;try{return Oy.call(e),!0}catch{}return!1}var soe=Object.prototype.hasOwnProperty||function(e){return e in this};function Ci(e,t){return soe.call(e,t)}function Oi(e){return Kae.call(e)}function loe(e){if(e.name)return e.name;var t=Yae.call(Gae.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function E$(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function uoe(e){if(!wf||!e||typeof e!="object")return!1;try{wf.call(e);try{xf.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function coe(e){if(!al||!e||typeof e!="object")return!1;try{al.call(e,al);try{ol.call(e,ol)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function foe(e){if(!c$||!e||typeof e!="object")return!1;try{return c$.call(e),!0}catch{}return!1}function doe(e){if(!xf||!e||typeof e!="object")return!1;try{xf.call(e);try{wf.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function poe(e){if(!ol||!e||typeof e!="object")return!1;try{ol.call(e,ol);try{al.call(e,al)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function hoe(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function _$(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return _$(Cy.call(e,0,t.maxStringLength),t)+r}var i=Ti.call(Ti.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,moe);return w$(i,"single",t)}function moe(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+Jae.call(t.toString(16))}function sl(e){return"Object("+e+")"}function Py(e){return e+" { ? }"}function k$(e,t,n,r){var i=r?Dy(n,r):Rr.call(n,", ");return e+" ("+t+") {"+i+"}"}function voe(e){for(var t=0;t<e.length;t++)if(E$(e[t],`
176
+ `)>=0)return!1;return!0}function yoe(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=Rr.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Rr.call(Array(t+1),n)}}function Dy(e,t){if(e.length===0)return"";var n=`
177
+ `+t.prev+t.base;return n+Rr.call(e,","+n)+`
178
+ `+t.prev}function Sf(e,t){var n=Ay(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=Ci(e,i)?t(e[i],e):""}var a=typeof $y=="function"?$y(e):[],o;if(fo){o={};for(var s=0;s<a.length;s++)o["$"+a[s]]=a[s]}for(var u in e)Ci(e,u)&&(n&&String(Number(u))===u&&u<e.length||fo&&o["$"+u]instanceof Symbol||(d$.call(/[^\w$]/,u)?r.push(t(u,e)+": "+t(e[u],e)):r.push(u+": "+t(e[u],e))));if(typeof $y=="function")for(var l=0;l<a.length;l++)m$.call(e,a[l])&&r.push("["+t(a[l])+"]: "+t(e[a[l]],e));return r}var T$=bf,po=zae,goe=Qae,boe=ao,Ef=T$("%WeakMap%",!0),_f=T$("%Map%",!0),woe=po("WeakMap.prototype.get",!0),xoe=po("WeakMap.prototype.set",!0),Soe=po("WeakMap.prototype.has",!0),Eoe=po("Map.prototype.get",!0),_oe=po("Map.prototype.set",!0),koe=po("Map.prototype.has",!0),jy=function(e,t){for(var n=e,r;(r=n.next)!==null;n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},Toe=function(e,t){var n=jy(e,t);return n&&n.value},Coe=function(e,t,n){var r=jy(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},Ooe=function(e,t){return!!jy(e,t)},$oe=function(){var t,n,r,i={assert:function(a){if(!i.has(a))throw new boe("Side channel does not contain "+goe(a))},get:function(a){if(Ef&&a&&(typeof a=="object"||typeof a=="function")){if(t)return woe(t,a)}else if(_f){if(n)return Eoe(n,a)}else if(r)return Toe(r,a)},has:function(a){if(Ef&&a&&(typeof a=="object"||typeof a=="function")){if(t)return Soe(t,a)}else if(_f){if(n)return koe(n,a)}else if(r)return Ooe(r,a);return!1},set:function(a,o){Ef&&a&&(typeof a=="object"||typeof a=="function")?(t||(t=new Ef),xoe(t,a,o)):_f?(n||(n=new _f),_oe(n,a,o)):(r||(r={key:{},next:null}),Coe(r,a,o))}};return i},Ioe=String.prototype.replace,Roe=/%20/g,Ny={RFC1738:"RFC1738",RFC3986:"RFC3986"},My={default:Ny.RFC3986,formatters:{RFC1738:function(e){return Ioe.call(e,Roe,"+")},RFC3986:function(e){return String(e)}},RFC1738:Ny.RFC1738,RFC3986:Ny.RFC3986},Aoe=My,Fy=Object.prototype.hasOwnProperty,ra=Array.isArray,Ar=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Poe=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(ra(r)){for(var i=[],a=0;a<r.length;++a)typeof r[a]<"u"&&i.push(r[a]);n.obj[n.prop]=i}}},C$=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},i=0;i<t.length;++i)typeof t[i]<"u"&&(r[i]=t[i]);return r},Doe=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(ra(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Fy.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var i=t;return ra(t)&&!ra(n)&&(i=C$(t,r)),ra(t)&&ra(n)?(n.forEach(function(a,o){if(Fy.call(t,o)){var s=t[o];s&&typeof s=="object"&&a&&typeof a=="object"?t[o]=e(s,a,r):t.push(a)}else t[o]=a}),t):Object.keys(n).reduce(function(a,o){var s=n[o];return Fy.call(a,o)?a[o]=e(a[o],s,r):a[o]=s,a},i)},joe=function(t,n){return Object.keys(n).reduce(function(r,i){return r[i]=n[i],r},t)},Noe=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},Ly=1024,Moe=function(t,n,r,i,a){if(t.length===0)return t;var o=t;if(typeof t=="symbol"?o=Symbol.prototype.toString.call(t):typeof t!="string"&&(o=String(t)),r==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(p){return"%26%23"+parseInt(p.slice(2),16)+"%3B"});for(var s="",u=0;u<o.length;u+=Ly){for(var l=o.length>=Ly?o.slice(u,u+Ly):o,c=[],f=0;f<l.length;++f){var d=l.charCodeAt(f);if(d===45||d===46||d===95||d===126||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||a===Aoe.RFC1738&&(d===40||d===41)){c[c.length]=l.charAt(f);continue}if(d<128){c[c.length]=Ar[d];continue}if(d<2048){c[c.length]=Ar[192|d>>6]+Ar[128|d&63];continue}if(d<55296||d>=57344){c[c.length]=Ar[224|d>>12]+Ar[128|d>>6&63]+Ar[128|d&63];continue}f+=1,d=65536+((d&1023)<<10|l.charCodeAt(f)&1023),c[c.length]=Ar[240|d>>18]+Ar[128|d>>12&63]+Ar[128|d>>6&63]+Ar[128|d&63]}s+=c.join("")}return s},Foe=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],i=0;i<n.length;++i)for(var a=n[i],o=a.obj[a.prop],s=Object.keys(o),u=0;u<s.length;++u){var l=s[u],c=o[l];typeof c=="object"&&c!==null&&r.indexOf(c)===-1&&(n.push({obj:o,prop:l}),r.push(c))}return Poe(n),t},Loe=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},Boe=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},Uoe=function(t,n){return[].concat(t,n)},zoe=function(t,n){if(ra(t)){for(var r=[],i=0;i<t.length;i+=1)r.push(n(t[i]));return r}return n(t)},O$={arrayToObject:C$,assign:joe,combine:Uoe,compact:Foe,decode:Noe,encode:Moe,isBuffer:Boe,isRegExp:Loe,maybeMap:zoe,merge:Doe},$$=$oe,kf=O$,ll=My,qoe=Object.prototype.hasOwnProperty,I$={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},Pr=Array.isArray,Woe=Array.prototype.push,R$=function(e,t){Woe.apply(e,Pr(t)?t:[t])},Voe=Date.prototype.toISOString,A$=ll.default,Zt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:kf.encode,encodeValuesOnly:!1,format:A$,formatter:ll.formatters[A$],indices:!1,serializeDate:function(t){return Voe.call(t)},skipNulls:!1,strictNullHandling:!1},Hoe=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},By={},Zoe=function e(t,n,r,i,a,o,s,u,l,c,f,d,p,m,h,y,v,b){for(var w=t,T=b,E=0,_=!1;(T=T.get(By))!==void 0&&!_;){var O=T.get(t);if(E+=1,typeof O<"u"){if(O===E)throw new RangeError("Cyclic object value");_=!0}typeof T.get(By)>"u"&&(E=0)}if(typeof c=="function"?w=c(n,w):w instanceof Date?w=p(w):r==="comma"&&Pr(w)&&(w=kf.maybeMap(w,function(g){return g instanceof Date?p(g):g})),w===null){if(o)return l&&!y?l(n,Zt.encoder,v,"key",m):n;w=""}if(Hoe(w)||kf.isBuffer(w)){if(l){var z=y?n:l(n,Zt.encoder,v,"key",m);return[h(z)+"="+h(l(w,Zt.encoder,v,"value",m))]}return[h(n)+"="+h(String(w))]}var U=[];if(typeof w>"u")return U;var k;if(r==="comma"&&Pr(w))y&&l&&(w=kf.maybeMap(w,l)),k=[{value:w.length>0?w.join(",")||null:void 0}];else if(Pr(c))k=c;else{var D=Object.keys(w);k=f?D.sort(f):D}var W=u?n.replace(/\./g,"%2E"):n,B=i&&Pr(w)&&w.length===1?W+"[]":W;if(a&&Pr(w)&&w.length===0)return B+"[]";for(var I=0;I<k.length;++I){var A=k[I],L=typeof A=="object"&&typeof A.value<"u"?A.value:w[A];if(!(s&&L===null)){var Z=d&&u?A.replace(/\./g,"%2E"):A,H=Pr(w)?typeof r=="function"?r(B,Z):B:B+(d?"."+Z:"["+Z+"]");b.set(t,E);var R=$$();R.set(By,b),R$(U,e(L,H,r,i,a,o,s,u,r==="comma"&&y&&Pr(w)?null:l,c,f,d,p,m,h,y,v,R))}}return U},Koe=function(t){if(!t)return Zt;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.encodeDotInKeys<"u"&&typeof t.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||Zt.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=ll.default;if(typeof t.format<"u"){if(!qoe.call(ll.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var i=ll.formatters[r],a=Zt.filter;(typeof t.filter=="function"||Pr(t.filter))&&(a=t.filter);var o;if(t.arrayFormat in I$?o=t.arrayFormat:"indices"in t?o=t.indices?"indices":"repeat":o=Zt.arrayFormat,"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var s=typeof t.allowDots>"u"?t.encodeDotInKeys===!0?!0:Zt.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Zt.addQueryPrefix,allowDots:s,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Zt.allowEmptyArrays,arrayFormat:o,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Zt.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?Zt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Zt.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:Zt.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:Zt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Zt.encodeValuesOnly,filter:a,format:r,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Zt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Zt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Zt.strictNullHandling}},Goe=function(e,t){var n=e,r=Koe(t),i,a;typeof r.filter=="function"?(a=r.filter,n=a("",n)):Pr(r.filter)&&(a=r.filter,i=a);var o=[];if(typeof n!="object"||n===null)return"";var s=I$[r.arrayFormat],u=s==="comma"&&r.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var l=$$(),c=0;c<i.length;++c){var f=i[c];r.skipNulls&&n[f]===null||R$(o,Zoe(n[f],f,s,u,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,l))}var d=o.join(r.delimiter),p=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),d.length>0?p+d:""},ho=O$,Uy=Object.prototype.hasOwnProperty,Yoe=Array.isArray,Pt={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:ho.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},Joe=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},P$=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},Xoe="utf8=%26%2310003%3B",Qoe="utf8=%E2%9C%93",ese=function(t,n){var r={__proto__:null},i=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;i=i.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=n.parameterLimit===1/0?void 0:n.parameterLimit,o=i.split(n.delimiter,a),s=-1,u,l=n.charset;if(n.charsetSentinel)for(u=0;u<o.length;++u)o[u].indexOf("utf8=")===0&&(o[u]===Qoe?l="utf-8":o[u]===Xoe&&(l="iso-8859-1"),s=u,u=o.length);for(u=0;u<o.length;++u)if(u!==s){var c=o[u],f=c.indexOf("]="),d=f===-1?c.indexOf("="):f+1,p,m;d===-1?(p=n.decoder(c,Pt.decoder,l,"key"),m=n.strictNullHandling?null:""):(p=n.decoder(c.slice(0,d),Pt.decoder,l,"key"),m=ho.maybeMap(P$(c.slice(d+1),n),function(y){return n.decoder(y,Pt.decoder,l,"value")})),m&&n.interpretNumericEntities&&l==="iso-8859-1"&&(m=Joe(m)),c.indexOf("[]=")>-1&&(m=Yoe(m)?[m]:m);var h=Uy.call(r,p);h&&n.duplicates==="combine"?r[p]=ho.combine(r[p],m):(!h||n.duplicates==="last")&&(r[p]=m)}return r},tse=function(e,t,n,r){for(var i=r?t:P$(t,n),a=e.length-1;a>=0;--a){var o,s=e[a];if(s==="[]"&&n.parseArrays)o=n.allowEmptyArrays&&(i===""||n.strictNullHandling&&i===null)?[]:[].concat(i);else{o=n.plainObjects?Object.create(null):{};var u=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,l=n.decodeDotInKeys?u.replace(/%2E/g,"."):u,c=parseInt(l,10);!n.parseArrays&&l===""?o={0:i}:!isNaN(c)&&s!==l&&String(c)===l&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(o=[],o[c]=i):l!=="__proto__"&&(o[l]=i)}i=o}return i},nse=function(t,n,r,i){if(t){var a=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,o=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,u=r.depth>0&&o.exec(a),l=u?a.slice(0,u.index):a,c=[];if(l){if(!r.plainObjects&&Uy.call(Object.prototype,l)&&!r.allowPrototypes)return;c.push(l)}for(var f=0;r.depth>0&&(u=s.exec(a))!==null&&f<r.depth;){if(f+=1,!r.plainObjects&&Uy.call(Object.prototype,u[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(u[1])}if(u){if(r.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");c.push("["+a.slice(u.index)+"]")}return tse(c,n,r,i)}},rse=function(t){if(!t)return Pt;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof t.charset>"u"?Pt.charset:t.charset,r=typeof t.duplicates>"u"?Pt.duplicates:t.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var i=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:Pt.allowDots:!!t.allowDots;return{allowDots:i,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Pt.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Pt.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Pt.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Pt.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Pt.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Pt.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:Pt.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:Pt.decoder,delimiter:typeof t.delimiter=="string"||ho.isRegExp(t.delimiter)?t.delimiter:Pt.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Pt.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Pt.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Pt.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Pt.plainObjects,strictDepth:typeof t.strictDepth=="boolean"?!!t.strictDepth:Pt.strictDepth,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Pt.strictNullHandling}},ise=function(e,t){var n=rse(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?ese(e,n):e,i=n.plainObjects?Object.create(null):{},a=Object.keys(r),o=0;o<a.length;++o){var s=a[o],u=nse(s,r[s],n,typeof e=="string");i=ho.merge(i,u,n)}return n.allowSparse===!0?i:ho.compact(i)},ase=Goe,ose=ise,sse=My,lse={formats:sse,parse:ose,stringify:ase};const use=Ge(lse);var zy={exports:{}};/** @license
179
179
  * eventsource.js
180
180
  * Available under MIT License (MIT)
181
181
  * https://github.com/Yaffle/EventSource/
182
- */(function(e,t){(function(n){var r=n.setTimeout,i=n.clearTimeout,a=n.XMLHttpRequest,o=n.XDomainRequest,s=n.ActiveXObject,u=n.EventSource,l=n.document,c=n.Promise,f=n.fetch,p=n.Response,d=n.TextDecoder,m=n.TextEncoder,h=n.AbortController;if(typeof window<"u"&&typeof l<"u"&&!("readyState"in l)&&l.body==null&&(l.readyState="loading",window.addEventListener("load",function(M){l.readyState="complete"},!1)),a==null&&s!=null&&(a=function(){return new s("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(M){function ie(){}return ie.prototype=M,new ie}),Date.now||(Date.now=function(){return new Date().getTime()}),h==null){var y=f;f=function(M,ie){var ce=ie.signal;return y(M,{headers:ie.headers,credentials:ie.credentials,cache:ie.cache}).then(function(oe){var Oe=oe.body.getReader();return ce._reader=Oe,ce._aborted&&ce._reader.cancel(),{status:oe.status,statusText:oe.statusText,headers:oe.headers,body:{getReader:function(){return Oe}}}})},h=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function v(){this.bitsNeeded=0,this.codePoint=0}v.prototype.decode=function(M){function ie(fe,U,D){if(D===1)return fe>=128>>U&&fe<<U<=2047;if(D===2)return fe>=2048>>U&&fe<<U<=55295||fe>=57344>>U&&fe<<U<=65535;if(D===3)return fe>=65536>>U&&fe<<U<=1114111;throw new Error}function ce(fe,U){if(fe===6*1)return U>>6>15?3:U>31?2:1;if(fe===6*2)return U>15?3:2;if(fe===6*3)return 3;throw new Error}for(var oe=65533,Oe="",Ee=this.bitsNeeded,Re=this.codePoint,He=0;He<M.length;He+=1){var te=M[He];Ee!==0&&(te<128||te>191||!ie(Re<<6|te&63,Ee-6,ce(Ee,Re)))&&(Ee=0,Re=oe,Oe+=String.fromCharCode(Re)),Ee===0?(te>=0&&te<=127?(Ee=0,Re=te):te>=192&&te<=223?(Ee=6*1,Re=te&31):te>=224&&te<=239?(Ee=6*2,Re=te&15):te>=240&&te<=247?(Ee=6*3,Re=te&7):(Ee=0,Re=oe),Ee!==0&&!ie(Re,Ee,ce(Ee,Re))&&(Ee=0,Re=oe)):(Ee-=6,Re=Re<<6|te&63),Ee===0&&(Re<=65535?Oe+=String.fromCharCode(Re):(Oe+=String.fromCharCode(55296+(Re-65535-1>>10)),Oe+=String.fromCharCode(56320+(Re-65535-1&1023))))}return this.bitsNeeded=Ee,this.codePoint=Re,Oe};var b=function(){try{return new d().decode(new m().encode("test"),{stream:!0})==="test"}catch(M){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+M)}return!1};(d==null||m==null||!b())&&(d=v);var w=function(){};function k(M){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=w,this.onload=w,this.onerror=w,this.onreadystatechange=w,this._contentType="",this._xhr=M,this._sendTimeout=0,this._abort=w}k.prototype.open=function(M,ie){this._abort(!0);var ce=this,oe=this._xhr,Oe=1,Ee=0;this._abort=function(D){ce._sendTimeout!==0&&(i(ce._sendTimeout),ce._sendTimeout=0),(Oe===1||Oe===2||Oe===3)&&(Oe=4,oe.onload=w,oe.onerror=w,oe.onabort=w,oe.onprogress=w,oe.onreadystatechange=w,oe.abort(),Ee!==0&&(i(Ee),Ee=0),D||(ce.readyState=4,ce.onabort(null),ce.onreadystatechange())),Oe=0};var Re=function(){if(Oe===1){var D=0,ne="",he=void 0;if("contentType"in oe)D=200,ne="OK",he=oe.contentType;else try{D=oe.status,ne=oe.statusText,he=oe.getResponseHeader("Content-Type")}catch{D=0,ne="",he=void 0}D!==0&&(Oe=2,ce.readyState=2,ce.status=D,ce.statusText=ne,ce._contentType=he,ce.onreadystatechange())}},He=function(){if(Re(),Oe===2||Oe===3){Oe=3;var D="";try{D=oe.responseText}catch{}ce.readyState=3,ce.responseText=D,ce.onprogress()}},te=function(D,ne){if((ne==null||ne.preventDefault==null)&&(ne={preventDefault:w}),He(),Oe===1||Oe===2||Oe===3){if(Oe=4,Ee!==0&&(i(Ee),Ee=0),ce.readyState=4,D==="load")ce.onload(ne);else if(D==="error")ce.onerror(ne);else if(D==="abort")ce.onabort(ne);else throw new TypeError;ce.onreadystatechange()}},fe=function(D){oe!=null&&(oe.readyState===4?(!("onload"in oe)||!("onerror"in oe)||!("onabort"in oe))&&te(oe.responseText===""?"error":"load",D):oe.readyState===3?"onprogress"in oe||He():oe.readyState===2&&Re())},U=function(){Ee=r(function(){U()},500),oe.readyState===3&&He()};"onload"in oe&&(oe.onload=function(D){te("load",D)}),"onerror"in oe&&(oe.onerror=function(D){te("error",D)}),"onabort"in oe&&(oe.onabort=function(D){te("abort",D)}),"onprogress"in oe&&(oe.onprogress=He),"onreadystatechange"in oe&&(oe.onreadystatechange=function(D){fe(D)}),("contentType"in oe||!("ontimeout"in a.prototype))&&(ie+=(ie.indexOf("?")===-1?"?":"&")+"padding=true"),oe.open(M,ie,!0),"readyState"in oe&&(Ee=r(function(){U()},0))},k.prototype.abort=function(){this._abort(!1)},k.prototype.getResponseHeader=function(M){return this._contentType},k.prototype.setRequestHeader=function(M,ie){var ce=this._xhr;"setRequestHeader"in ce&&ce.setRequestHeader(M,ie)},k.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},k.prototype.send=function(){if((!("ontimeout"in a.prototype)||!("sendAsBinary"in a.prototype)&&!("mozAnon"in a.prototype))&&l!=null&&l.readyState!=null&&l.readyState!=="complete"){var M=this;M._sendTimeout=r(function(){M._sendTimeout=0,M.send()},4);return}var ie=this._xhr;"withCredentials"in ie&&(ie.withCredentials=this.withCredentials);try{ie.send(void 0)}catch(ce){throw ce}};function E(M){return M.replace(/[A-Z]/g,function(ie){return String.fromCharCode(ie.charCodeAt(0)+32)})}function _(M){for(var ie=Object.create(null),ce=M.split(`\r
183
- `),oe=0;oe<ce.length;oe+=1){var Oe=ce[oe],Ee=Oe.split(": "),Re=Ee.shift(),He=Ee.join(": ");ie[E(Re)]=He}this._map=ie}_.prototype.get=function(M){return this._map[E(M)]},a!=null&&a.HEADERS_RECEIVED==null&&(a.HEADERS_RECEIVED=2);function C(){}C.prototype.open=function(M,ie,ce,oe,Oe,Ee,Re){M.open("GET",Oe);var He=0;M.onprogress=function(){var fe=M.responseText,U=fe.slice(He);He+=U.length,ce(U)},M.onerror=function(fe){fe.preventDefault(),oe(new Error("NetworkError"))},M.onload=function(){oe(null)},M.onabort=function(){oe(null)},M.onreadystatechange=function(){if(M.readyState===a.HEADERS_RECEIVED){var fe=M.status,U=M.statusText,D=M.getResponseHeader("Content-Type"),ne=M.getAllResponseHeaders();ie(fe,U,D,new _(ne))}},M.withCredentials=Ee;for(var te in Re)Object.prototype.hasOwnProperty.call(Re,te)&&M.setRequestHeader(te,Re[te]);return M.send(),M};function z(M){this._headers=M}z.prototype.get=function(M){return this._headers.get(M)};function B(){}B.prototype.open=function(M,ie,ce,oe,Oe,Ee,Re){var He=null,te=new h,fe=te.signal,U=new d;return f(Oe,{headers:Re,credentials:Ee?"include":"same-origin",signal:fe,cache:"no-store"}).then(function(D){return He=D.body.getReader(),ie(D.status,D.statusText,D.headers.get("Content-Type"),new z(D.headers)),new c(function(ne,he){var Se=function(){He.read().then(function($e){if($e.done)ne(void 0);else{var Ze=U.decode($e.value,{stream:!0});ce(Ze),Se()}}).catch(function($e){he($e)})};Se()})}).catch(function(D){if(D.name!=="AbortError")return D}).then(function(D){oe(D)}),{abort:function(){He!=null&&He.cancel(),te.abort()}}};function T(){this._listeners=Object.create(null)}function A(M){r(function(){throw M},0)}T.prototype.dispatchEvent=function(M){M.target=this;var ie=this._listeners[M.type];if(ie!=null)for(var ce=ie.length,oe=0;oe<ce;oe+=1){var Oe=ie[oe];try{typeof Oe.handleEvent=="function"?Oe.handleEvent(M):Oe.call(this,M)}catch(Ee){A(Ee)}}},T.prototype.addEventListener=function(M,ie){M=String(M);var ce=this._listeners,oe=ce[M];oe==null&&(oe=[],ce[M]=oe);for(var Oe=!1,Ee=0;Ee<oe.length;Ee+=1)oe[Ee]===ie&&(Oe=!0);Oe||oe.push(ie)},T.prototype.removeEventListener=function(M,ie){M=String(M);var ce=this._listeners,oe=ce[M];if(oe!=null){for(var Oe=[],Ee=0;Ee<oe.length;Ee+=1)oe[Ee]!==ie&&Oe.push(oe[Ee]);Oe.length===0?delete ce[M]:ce[M]=Oe}};function W(M){this.type=M,this.target=void 0}function F(M,ie){W.call(this,M),this.data=ie.data,this.lastEventId=ie.lastEventId}F.prototype=Object.create(W.prototype);function L(M,ie){W.call(this,M),this.status=ie.status,this.statusText=ie.statusText,this.headers=ie.headers}L.prototype=Object.create(W.prototype);function N(M,ie){W.call(this,M),this.error=ie.error}N.prototype=Object.create(W.prototype);var q=-1,Y=0,H=1,I=2,g=-1,P=0,V=1,S=2,Z=3,J=/^text\/event\-stream(;.*)?$/i,G=1e3,X=18e6,ae=function(M,ie){var ce=M==null?ie:parseInt(M,10);return ce!==ce&&(ce=ie),se(ce)},se=function(M){return Math.min(Math.max(M,G),X)},Q=function(M,ie,ce){try{typeof ie=="function"&&ie.call(M,ce)}catch(oe){A(oe)}};function ee(M,ie){T.call(this),ie=ie||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,ge(this,M,ie)}function K(){return a!=null&&"withCredentials"in a.prototype||o==null?new a:new o}var pe=f!=null&&p!=null&&"body"in p.prototype;function ge(M,ie,ce){ie=String(ie);var oe=!!ce.withCredentials,Oe=ce.lastEventIdQueryParameterName||"lastEventId",Ee=se(1e3),Re=ae(ce.heartbeatTimeout,45e3),He="",te=Ee,fe=!1,U=0,D=ce.headers||{},ne=ce.Transport,he=pe&&ne==null?void 0:new k(ne!=null?new ne:K()),Se=ne!=null&&typeof ne!="string"?new ne:he==null?new B:new C,$e=void 0,Ze=0,Qe=q,_t="",St="",qe="",Et="",Ke=P,un=0,In=0,ir=function(ht,kt,Wt,Vt){if(Qe===Y)if(ht===200&&Wt!=null&&J.test(Wt)){Qe=H,fe=Date.now(),te=Ee,M.readyState=H;var en=new L("open",{status:ht,statusText:kt,headers:Vt});M.dispatchEvent(en),Q(M,M.onopen,en)}else{var Ht="";ht!==200?(kt&&(kt=kt.replace(/\s+/g," ")),Ht="EventSource's response has a status "+ht+" "+kt+" that is not 200. Aborting the connection."):Ht="EventSource's response has a Content-Type specifying an unsupported type: "+(Wt==null?"-":Wt.replace(/\s+/g," "))+". Aborting the connection.",ar();var en=new L("error",{status:ht,statusText:kt,headers:Vt});M.dispatchEvent(en),Q(M,M.onerror,en),console.error(Ht)}},Hr=function(ht){if(Qe===H){for(var kt=-1,Wt=0;Wt<ht.length;Wt+=1){var Vt=ht.charCodeAt(Wt);(Vt===10||Vt===13)&&(kt=Wt)}var en=(kt!==-1?Et:"")+ht.slice(0,kt+1);Et=(kt===-1?Et:"")+ht.slice(kt+1),ht!==""&&(fe=Date.now(),U+=ht.length);for(var Ht=0;Ht<en.length;Ht+=1){var Vt=en.charCodeAt(Ht);if(Ke===g&&Vt===10)Ke=P;else if(Ke===g&&(Ke=P),Vt===13||Vt===10){if(Ke!==P){Ke===V&&(In=Ht+1);var Ln=en.slice(un,In-1),Bn=en.slice(In+(In<Ht&&en.charCodeAt(In)===32?1:0),Ht);Ln==="data"?(_t+=`
184
- `,_t+=Bn):Ln==="id"?St=Bn:Ln==="event"?qe=Bn:Ln==="retry"?(Ee=ae(Bn,Ee),te=Ee):Ln==="heartbeatTimeout"&&(Re=ae(Bn,Re),Ze!==0&&(i(Ze),Ze=r(function(){Zr()},Re)))}if(Ke===P){if(_t!==""){He=St,qe===""&&(qe="message");var Ei=new F(qe,{data:_t.slice(1),lastEventId:St});if(M.dispatchEvent(Ei),qe==="open"?Q(M,M.onopen,Ei):qe==="message"?Q(M,M.onmessage,Ei):qe==="error"&&Q(M,M.onerror,Ei),Qe===I)return}_t="",qe=""}Ke=Vt===13?g:P}else Ke===P&&(un=Ht,Ke=V),Ke===V?Vt===58&&(In=Ht+1,Ke=S):Ke===S&&(Ke=Z)}}},Rr=function(ht){if(Qe===H||Qe===Y){Qe=q,Ze!==0&&(i(Ze),Ze=0),Ze=r(function(){Zr()},te),te=se(Math.min(Ee*16,te*2)),M.readyState=Y;var kt=new N("error",{error:ht});M.dispatchEvent(kt),Q(M,M.onerror,kt),ht!=null&&console.error(ht)}},ar=function(){Qe=I,$e!=null&&($e.abort(),$e=void 0),Ze!==0&&(i(Ze),Ze=0),M.readyState=I},Zr=function(){if(Ze=0,Qe!==q){if(!fe&&$e!=null)Rr(new Error("No activity within "+Re+" milliseconds. "+(Qe===Y?"No response received.":U+" chars received.")+" Reconnecting.")),$e!=null&&($e.abort(),$e=void 0);else{var ht=Math.max((fe||Date.now())+Re-Date.now(),1);fe=!1,Ze=r(function(){Zr()},ht)}return}fe=!1,U=0,Ze=r(function(){Zr()},Re),Qe=Y,_t="",qe="",St=He,Et="",un=0,In=0,Ke=P;var kt=ie;if(ie.slice(0,5)!=="data:"&&ie.slice(0,5)!=="blob:"&&He!==""){var Wt=ie.indexOf("?");kt=Wt===-1?ie:ie.slice(0,Wt+1)+ie.slice(Wt+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Bn,Ei){return Ei===Oe?"":Bn}),kt+=(ie.indexOf("?")===-1?"?":"&")+Oe+"="+encodeURIComponent(He)}var Vt=M.withCredentials,en={};en.Accept="text/event-stream";var Ht=M.headers;if(Ht!=null)for(var Ln in Ht)Object.prototype.hasOwnProperty.call(Ht,Ln)&&(en[Ln]=Ht[Ln]);try{$e=Se.open(he,ir,Hr,Rr,kt,Vt,en)}catch(Bn){throw ar(),Bn}};M.url=ie,M.readyState=Y,M.withCredentials=oe,M.headers=D,M._close=ar,Zr()}ee.prototype=Object.create(T.prototype),ee.prototype.CONNECTING=Y,ee.prototype.OPEN=H,ee.prototype.CLOSED=I,ee.prototype.close=function(){this._close()},ee.CONNECTING=Y,ee.OPEN=H,ee.CLOSED=I,ee.prototype.withCredentials=void 0;var Ie=u;a!=null&&(u==null||!("withCredentials"in u.prototype))&&(Ie=ee),function(M){{var ie=M(t);ie!==void 0&&(e.exports=ie)}}(function(M){M.EventSourcePolyfill=ee,M.NativeEventSource=u,M.EventSource=Ie})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:mt:globalThis)})(my,my.exports);var moe=my.exports;const voe=Ge(moe);var nt;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(nt||(nt={}));var vy;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(vy||(vy={}));const xe=nt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),qr=e=>{switch(typeof e){case"undefined":return xe.undefined;case"string":return xe.string;case"number":return isNaN(e)?xe.nan:xe.number;case"boolean":return xe.boolean;case"function":return xe.function;case"bigint":return xe.bigint;case"symbol":return xe.symbol;case"object":return Array.isArray(e)?xe.array:e===null?xe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?xe.promise:typeof Map<"u"&&e instanceof Map?xe.map:typeof Set<"u"&&e instanceof Set?xe.set:typeof Date<"u"&&e instanceof Date?xe.date:xe.object;default:return xe.unknown}},ue=nt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),yoe=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class $n extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(a){return a.message},r={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let s=r,u=0;for(;u<o.path.length;){const l=o.path[u];u===o.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(o))):s[l]=s[l]||{_errors:[]},s=s[l],u++}}};return i(this),r}static assert(t){if(!(t instanceof $n))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,nt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}$n.create=e=>new $n(e);const no=(e,t)=>{let n;switch(e.code){case ue.invalid_type:e.received===xe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ue.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,nt.jsonStringifyReplacer)}`;break;case ue.unrecognized_keys:n=`Unrecognized key(s) in object: ${nt.joinValues(e.keys,", ")}`;break;case ue.invalid_union:n="Invalid input";break;case ue.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${nt.joinValues(e.options)}`;break;case ue.invalid_enum_value:n=`Invalid enum value. Expected ${nt.joinValues(e.options)}, received '${e.received}'`;break;case ue.invalid_arguments:n="Invalid function arguments";break;case ue.invalid_return_type:n="Invalid function return type";break;case ue.invalid_date:n="Invalid date";break;case ue.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:nt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ue.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case ue.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case ue.custom:n="Invalid input";break;case ue.invalid_intersection_types:n="Intersection results could not be merged";break;case ue.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ue.not_finite:n="Number must be finite";break;default:n=t.defaultError,nt.assertNever(e)}return{message:n}};let QC=no;function goe(e){QC=e}function of(){return QC}const sf=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s="";const u=r.filter(l=>!!l).slice().reverse();for(const l of u)s=l(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}},boe=[];function ye(e,t){const n=of(),r=sf({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===no?void 0:no].filter(i=>!!i)});e.common.issues.push(r)}class ln{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Me;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const a=await i.key,o=await i.value;r.push({key:a,value:o})}return ln.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return Me;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[a.value]=o.value)}return{status:t.value,value:r}}}const Me=Object.freeze({status:"aborted"}),ro=e=>({status:"dirty",value:e}),pn=e=>({status:"valid",value:e}),yy=e=>e.status==="aborted",gy=e=>e.status==="dirty",Zi=e=>e.status==="valid",Ks=e=>typeof Promise<"u"&&e instanceof Promise;function lf(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function e$(e,t,n,r,i){if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var Ce;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ce||(Ce={}));var Gs,Ys;class Tr{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const t$=(e,t)=>{if(Zi(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new $n(e.common.issues);return this._error=n,this._error}}};function ze(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,s)=>{var u,l;const{message:c}=e;return o.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:(u=c??r)!==null&&u!==void 0?u:s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:(l=c??n)!==null&&l!==void 0?l:s.defaultError}},description:i}}class Ve{get description(){return this._def.description}_getType(t){return qr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:qr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ln,ctx:{common:t.parent.common,data:t.data,parsedType:qr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Ks(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:qr(t)},a=this._parseSync({data:t,path:i.path,parent:i});return t$(i,a)}"~validate"(t){var n,r;const i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:qr(t)};if(!this["~standard"].async)try{const a=this._parseSync({data:t,path:[],parent:i});return Zi(a)?{value:a.value}:{issues:i.common.issues}}catch(a){!((r=(n=a==null?void 0:a.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:i}).then(a=>Zi(a)?{value:a.value}:{issues:i.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:qr(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(Ks(i)?i:Promise.resolve(i));return t$(r,a)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const o=t(i),s=()=>a.addIssue({code:ue.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(u=>u?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new rr({schema:this,typeName:Ne.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Cr.create(this,this._def)}nullable(){return Si.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return nr.create(this)}promise(){return so.create(this,this._def)}or(t){return el.create([this,t],this._def)}and(t){return tl.create(this,t,this._def)}transform(t){return new rr({...ze(this._def),schema:this,typeName:Ne.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new ol({...ze(this._def),innerType:this,defaultValue:n,typeName:Ne.ZodDefault})}brand(){return new xy({typeName:Ne.ZodBranded,type:this,...ze(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new sl({...ze(this._def),innerType:this,catchValue:n,typeName:Ne.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return ll.create(this,t)}readonly(){return ul.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const woe=/^c[^\s-]{8,}$/i,xoe=/^[0-9a-z]+$/,Soe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Eoe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,_oe=/^[a-z0-9_-]{21}$/i,koe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Toe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Ooe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Coe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let by;const $oe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ioe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Roe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Aoe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Poe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Doe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,n$="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",joe=new RegExp(`^${n$}$`);function r$(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function Noe(e){return new RegExp(`^${r$(e)}$`)}function i$(e){let t=`${n$}T${r$(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Moe(e,t){return!!((t==="v4"||!t)&&$oe.test(e)||(t==="v6"||!t)&&Roe.test(e))}function Foe(e,t){if(!koe.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||!i.typ||!i.alg||t&&i.alg!==t)}catch{return!1}}function Loe(e,t){return!!((t==="v4"||!t)&&Ioe.test(e)||(t==="v6"||!t)&&Aoe.test(e))}class tr extends Ve{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==xe.string){const a=this._getOrReturnCtx(t);return ye(a,{code:ue.invalid_type,expected:xe.string,received:a.parsedType}),Me}const r=new ln;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),ye(i,{code:ue.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),ye(i,{code:ue.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,s=t.data.length<a.value;(o||s)&&(i=this._getOrReturnCtx(t,i),o?ye(i,{code:ue.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&ye(i,{code:ue.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")Ooe.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"email",code:ue.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")by||(by=new RegExp(Coe,"u")),by.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"emoji",code:ue.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")Eoe.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"uuid",code:ue.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")_oe.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"nanoid",code:ue.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")woe.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"cuid",code:ue.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")xoe.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"cuid2",code:ue.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")Soe.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"ulid",code:ue.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),ye(i,{validation:"url",code:ue.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"regex",code:ue.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),ye(i,{code:ue.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),ye(i,{code:ue.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),ye(i,{code:ue.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?i$(a).test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{code:ue.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?joe.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{code:ue.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?Noe(a).test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{code:ue.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?Toe.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"duration",code:ue.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?Moe(t.data,a.version)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"ip",code:ue.invalid_string,message:a.message}),r.dirty()):a.kind==="jwt"?Foe(t.data,a.alg)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"jwt",code:ue.invalid_string,message:a.message}),r.dirty()):a.kind==="cidr"?Loe(t.data,a.version)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"cidr",code:ue.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?Poe.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"base64",code:ue.invalid_string,message:a.message}),r.dirty()):a.kind==="base64url"?Doe.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"base64url",code:ue.invalid_string,message:a.message}),r.dirty()):nt.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:ue.invalid_string,...Ce.errToObj(r)})}_addCheck(t){return new tr({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ce.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ce.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ce.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ce.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ce.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ce.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ce.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ce.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ce.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Ce.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Ce.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ce.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Ce.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...Ce.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Ce.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Ce.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ce.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Ce.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ce.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ce.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ce.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ce.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ce.errToObj(n)})}nonempty(t){return this.min(1,Ce.errToObj(t))}trim(){return new tr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new tr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new tr({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}tr.create=e=>{var t;return new tr({checks:[],typeName:Ne.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ze(e)})};function Boe(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=parseInt(e.toFixed(i).replace(".","")),o=parseInt(t.toFixed(i).replace(".",""));return a%o/Math.pow(10,i)}class bi extends Ve{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==xe.number){const a=this._getOrReturnCtx(t);return ye(a,{code:ue.invalid_type,expected:xe.number,received:a.parsedType}),Me}let r;const i=new ln;for(const a of this._def.checks)a.kind==="int"?nt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ye(r,{code:ue.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ue.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ue.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?Boe(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ue.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ye(r,{code:ue.not_finite,message:a.message}),i.dirty()):nt.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ce.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ce.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ce.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ce.toString(n))}setLimit(t,n,r,i){return new bi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ce.toString(i)}]})}_addCheck(t){return new bi({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ce.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ce.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ce.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ce.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ce.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ce.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&nt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}bi.create=e=>new bi({checks:[],typeName:Ne.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ze(e)});class wi extends Ve{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==xe.bigint)return this._getInvalidInput(t);let r;const i=new ln;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ue.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ue.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ue.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):nt.assertNever(a);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ye(n,{code:ue.invalid_type,expected:xe.bigint,received:n.parsedType}),Me}gte(t,n){return this.setLimit("min",t,!0,Ce.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ce.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ce.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ce.toString(n))}setLimit(t,n,r,i){return new wi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ce.toString(i)}]})}_addCheck(t){return new wi({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ce.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ce.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ce.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ce.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ce.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}wi.create=e=>{var t;return new wi({checks:[],typeName:Ne.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ze(e)})};class Js extends Ve{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==xe.boolean){const r=this._getOrReturnCtx(t);return ye(r,{code:ue.invalid_type,expected:xe.boolean,received:r.parsedType}),Me}return pn(t.data)}}Js.create=e=>new Js({typeName:Ne.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ze(e)});class Ki extends Ve{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==xe.date){const a=this._getOrReturnCtx(t);return ye(a,{code:ue.invalid_type,expected:xe.date,received:a.parsedType}),Me}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return ye(a,{code:ue.invalid_date}),Me}const r=new ln;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),ye(i,{code:ue.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),ye(i,{code:ue.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):nt.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Ki({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ce.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ce.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Ki.create=e=>new Ki({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ne.ZodDate,...ze(e)});class uf extends Ve{_parse(t){if(this._getType(t)!==xe.symbol){const r=this._getOrReturnCtx(t);return ye(r,{code:ue.invalid_type,expected:xe.symbol,received:r.parsedType}),Me}return pn(t.data)}}uf.create=e=>new uf({typeName:Ne.ZodSymbol,...ze(e)});class Xs extends Ve{_parse(t){if(this._getType(t)!==xe.undefined){const r=this._getOrReturnCtx(t);return ye(r,{code:ue.invalid_type,expected:xe.undefined,received:r.parsedType}),Me}return pn(t.data)}}Xs.create=e=>new Xs({typeName:Ne.ZodUndefined,...ze(e)});class Qs extends Ve{_parse(t){if(this._getType(t)!==xe.null){const r=this._getOrReturnCtx(t);return ye(r,{code:ue.invalid_type,expected:xe.null,received:r.parsedType}),Me}return pn(t.data)}}Qs.create=e=>new Qs({typeName:Ne.ZodNull,...ze(e)});class io extends Ve{constructor(){super(...arguments),this._any=!0}_parse(t){return pn(t.data)}}io.create=e=>new io({typeName:Ne.ZodAny,...ze(e)});class Gi extends Ve{constructor(){super(...arguments),this._unknown=!0}_parse(t){return pn(t.data)}}Gi.create=e=>new Gi({typeName:Ne.ZodUnknown,...ze(e)});class Wr extends Ve{_parse(t){const n=this._getOrReturnCtx(t);return ye(n,{code:ue.invalid_type,expected:xe.never,received:n.parsedType}),Me}}Wr.create=e=>new Wr({typeName:Ne.ZodNever,...ze(e)});class cf extends Ve{_parse(t){if(this._getType(t)!==xe.undefined){const r=this._getOrReturnCtx(t);return ye(r,{code:ue.invalid_type,expected:xe.void,received:r.parsedType}),Me}return pn(t.data)}}cf.create=e=>new cf({typeName:Ne.ZodVoid,...ze(e)});class nr extends Ve{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==xe.array)return ye(n,{code:ue.invalid_type,expected:xe.array,received:n.parsedType}),Me;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(o||s)&&(ye(n,{code:o?ue.too_big:ue.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(ye(n,{code:ue.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(ye(n,{code:ue.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,s)=>i.type._parseAsync(new Tr(n,o,n.path,s)))).then(o=>ln.mergeArray(r,o));const a=[...n.data].map((o,s)=>i.type._parseSync(new Tr(n,o,n.path,s)));return ln.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new nr({...this._def,minLength:{value:t,message:Ce.toString(n)}})}max(t,n){return new nr({...this._def,maxLength:{value:t,message:Ce.toString(n)}})}length(t,n){return new nr({...this._def,exactLength:{value:t,message:Ce.toString(n)}})}nonempty(t){return this.min(1,t)}}nr.create=(e,t)=>new nr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ne.ZodArray,...ze(t)});function ao(e){if(e instanceof $t){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Cr.create(ao(r))}return new $t({...e._def,shape:()=>t})}else return e instanceof nr?new nr({...e._def,type:ao(e.element)}):e instanceof Cr?Cr.create(ao(e.unwrap())):e instanceof Si?Si.create(ao(e.unwrap())):e instanceof Or?Or.create(e.items.map(t=>ao(t))):e}class $t extends Ve{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=nt.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==xe.object){const l=this._getOrReturnCtx(t);return ye(l,{code:ue.invalid_type,expected:xe.object,received:l.parsedType}),Me}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Wr&&this._def.unknownKeys==="strip"))for(const l in i.data)o.includes(l)||s.push(l);const u=[];for(const l of o){const c=a[l],f=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new Tr(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Wr){const l=this._def.unknownKeys;if(l==="passthrough")for(const c of s)u.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(l==="strict")s.length>0&&(ye(i,{code:ue.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const c of s){const f=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new Tr(i,f,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const c of u){const f=await c.key,p=await c.value;l.push({key:f,value:p,alwaysSet:c.alwaysSet})}return l}).then(l=>ln.mergeObjectSync(r,l)):ln.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(t){return Ce.errToObj,new $t({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,a,o,s;const u=(o=(a=(i=this._def).errorMap)===null||a===void 0?void 0:a.call(i,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=Ce.errToObj(t).message)!==null&&s!==void 0?s:u}:{message:u}}}:{}})}strip(){return new $t({...this._def,unknownKeys:"strip"})}passthrough(){return new $t({...this._def,unknownKeys:"passthrough"})}extend(t){return new $t({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new $t({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ne.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new $t({...this._def,catchall:t})}pick(t){const n={};return nt.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new $t({...this._def,shape:()=>n})}omit(t){const n={};return nt.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new $t({...this._def,shape:()=>n})}deepPartial(){return ao(this)}partial(t){const n={};return nt.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new $t({...this._def,shape:()=>n})}required(t){const n={};return nt.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof Cr;)a=a._def.innerType;n[r]=a}}),new $t({...this._def,shape:()=>n})}keyof(){return a$(nt.objectKeys(this.shape))}}$t.create=(e,t)=>new $t({shape:()=>e,unknownKeys:"strip",catchall:Wr.create(),typeName:Ne.ZodObject,...ze(t)}),$t.strictCreate=(e,t)=>new $t({shape:()=>e,unknownKeys:"strict",catchall:Wr.create(),typeName:Ne.ZodObject,...ze(t)}),$t.lazycreate=(e,t)=>new $t({shape:e,unknownKeys:"strip",catchall:Wr.create(),typeName:Ne.ZodObject,...ze(t)});class el extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new $n(s.ctx.common.issues));return ye(n,{code:ue.invalid_union,unionErrors:o}),Me}if(n.common.async)return Promise.all(r.map(async a=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const u of r){const l={...n,common:{...n.common,issues:[]},parent:null},c=u._parseSync({data:n.data,path:n.path,parent:l});if(c.status==="valid")return c;c.status==="dirty"&&!a&&(a={result:c,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(u=>new $n(u));return ye(n,{code:ue.invalid_union,unionErrors:s}),Me}}get options(){return this._def.options}}el.create=(e,t)=>new el({options:e,typeName:Ne.ZodUnion,...ze(t)});const Vr=e=>e instanceof rl?Vr(e.schema):e instanceof rr?Vr(e.innerType()):e instanceof il?[e.value]:e instanceof xi?e.options:e instanceof al?nt.objectValues(e.enum):e instanceof ol?Vr(e._def.innerType):e instanceof Xs?[void 0]:e instanceof Qs?[null]:e instanceof Cr?[void 0,...Vr(e.unwrap())]:e instanceof Si?[null,...Vr(e.unwrap())]:e instanceof xy||e instanceof ul?Vr(e.unwrap()):e instanceof sl?Vr(e._def.innerType):[];class ff extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==xe.object)return ye(n,{code:ue.invalid_type,expected:xe.object,received:n.parsedType}),Me;const r=this.discriminator,i=n.data[r],a=this.optionsMap.get(i);return a?n.common.async?a._parseAsync({data:n.data,path:n.path,parent:n}):a._parseSync({data:n.data,path:n.path,parent:n}):(ye(n,{code:ue.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Me)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const a of n){const o=Vr(a.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of o){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,a)}}return new ff({typeName:Ne.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...ze(r)})}}function wy(e,t){const n=qr(e),r=qr(t);if(e===t)return{valid:!0,data:e};if(n===xe.object&&r===xe.object){const i=nt.objectKeys(t),a=nt.objectKeys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...t};for(const s of a){const u=wy(e[s],t[s]);if(!u.valid)return{valid:!1};o[s]=u.data}return{valid:!0,data:o}}else if(n===xe.array&&r===xe.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const o=e[a],s=t[a],u=wy(o,s);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return n===xe.date&&r===xe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class tl extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,o)=>{if(yy(a)||yy(o))return Me;const s=wy(a.value,o.value);return s.valid?((gy(a)||gy(o))&&n.dirty(),{status:n.value,value:s.data}):(ye(r,{code:ue.invalid_intersection_types}),Me)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}tl.create=(e,t,n)=>new tl({left:e,right:t,typeName:Ne.ZodIntersection,...ze(n)});class Or extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==xe.array)return ye(r,{code:ue.invalid_type,expected:xe.array,received:r.parsedType}),Me;if(r.data.length<this._def.items.length)return ye(r,{code:ue.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Me;!this._def.rest&&r.data.length>this._def.items.length&&(ye(r,{code:ue.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((o,s)=>{const u=this._def.items[s]||this._def.rest;return u?u._parse(new Tr(r,o,r.path,s)):null}).filter(o=>!!o);return r.common.async?Promise.all(a).then(o=>ln.mergeArray(n,o)):ln.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new Or({...this._def,rest:t})}}Or.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Or({items:e,typeName:Ne.ZodTuple,rest:null,...ze(t)})};class nl extends Ve{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==xe.object)return ye(r,{code:ue.invalid_type,expected:xe.object,received:r.parsedType}),Me;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in r.data)i.push({key:a._parse(new Tr(r,s,r.path,s)),value:o._parse(new Tr(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?ln.mergeObjectAsync(n,i):ln.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Ve?new nl({keyType:t,valueType:n,typeName:Ne.ZodRecord,...ze(r)}):new nl({keyType:tr.create(),valueType:t,typeName:Ne.ZodRecord,...ze(n)})}}class df extends Ve{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==xe.map)return ye(r,{code:ue.invalid_type,expected:xe.map,received:r.parsedType}),Me;const i=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([s,u],l)=>({key:i._parse(new Tr(r,s,r.path,[l,"key"])),value:a._parse(new Tr(r,u,r.path,[l,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const u of o){const l=await u.key,c=await u.value;if(l.status==="aborted"||c.status==="aborted")return Me;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const u of o){const l=u.key,c=u.value;if(l.status==="aborted"||c.status==="aborted")return Me;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}}}}df.create=(e,t,n)=>new df({valueType:t,keyType:e,typeName:Ne.ZodMap,...ze(n)});class Yi extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==xe.set)return ye(r,{code:ue.invalid_type,expected:xe.set,received:r.parsedType}),Me;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(ye(r,{code:ue.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(ye(r,{code:ue.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function o(u){const l=new Set;for(const c of u){if(c.status==="aborted")return Me;c.status==="dirty"&&n.dirty(),l.add(c.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((u,l)=>a._parse(new Tr(r,u,r.path,l)));return r.common.async?Promise.all(s).then(u=>o(u)):o(s)}min(t,n){return new Yi({...this._def,minSize:{value:t,message:Ce.toString(n)}})}max(t,n){return new Yi({...this._def,maxSize:{value:t,message:Ce.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Yi.create=(e,t)=>new Yi({valueType:e,minSize:null,maxSize:null,typeName:Ne.ZodSet,...ze(t)});class oo extends Ve{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==xe.function)return ye(n,{code:ue.invalid_type,expected:xe.function,received:n.parsedType}),Me;function r(s,u){return sf({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,of(),no].filter(l=>!!l),issueData:{code:ue.invalid_arguments,argumentsError:u}})}function i(s,u){return sf({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,of(),no].filter(l=>!!l),issueData:{code:ue.invalid_return_type,returnTypeError:u}})}const a={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof so){const s=this;return pn(async function(...u){const l=new $n([]),c=await s._def.args.parseAsync(u,a).catch(d=>{throw l.addIssue(r(u,d)),l}),f=await Reflect.apply(o,this,c);return await s._def.returns._def.type.parseAsync(f,a).catch(d=>{throw l.addIssue(i(f,d)),l})})}else{const s=this;return pn(function(...u){const l=s._def.args.safeParse(u,a);if(!l.success)throw new $n([r(u,l.error)]);const c=Reflect.apply(o,this,l.data),f=s._def.returns.safeParse(c,a);if(!f.success)throw new $n([i(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new oo({...this._def,args:Or.create(t).rest(Gi.create())})}returns(t){return new oo({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new oo({args:t||Or.create([]).rest(Gi.create()),returns:n||Gi.create(),typeName:Ne.ZodFunction,...ze(r)})}}class rl extends Ve{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}rl.create=(e,t)=>new rl({getter:e,typeName:Ne.ZodLazy,...ze(t)});class il extends Ve{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ye(n,{received:n.data,code:ue.invalid_literal,expected:this._def.value}),Me}return{status:"valid",value:t.data}}get value(){return this._def.value}}il.create=(e,t)=>new il({value:e,typeName:Ne.ZodLiteral,...ze(t)});function a$(e,t){return new xi({values:e,typeName:Ne.ZodEnum,...ze(t)})}class xi extends Ve{constructor(){super(...arguments),Gs.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ye(n,{expected:nt.joinValues(r),received:n.parsedType,code:ue.invalid_type}),Me}if(lf(this,Gs)||e$(this,Gs,new Set(this._def.values)),!lf(this,Gs).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ye(n,{received:n.data,code:ue.invalid_enum_value,options:r}),Me}return pn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return xi.create(t,{...this._def,...n})}exclude(t,n=this._def){return xi.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Gs=new WeakMap,xi.create=a$;class al extends Ve{constructor(){super(...arguments),Ys.set(this,void 0)}_parse(t){const n=nt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==xe.string&&r.parsedType!==xe.number){const i=nt.objectValues(n);return ye(r,{expected:nt.joinValues(i),received:r.parsedType,code:ue.invalid_type}),Me}if(lf(this,Ys)||e$(this,Ys,new Set(nt.getValidEnumValues(this._def.values))),!lf(this,Ys).has(t.data)){const i=nt.objectValues(n);return ye(r,{received:r.data,code:ue.invalid_enum_value,options:i}),Me}return pn(t.data)}get enum(){return this._def.values}}Ys=new WeakMap,al.create=(e,t)=>new al({values:e,typeName:Ne.ZodNativeEnum,...ze(t)});class so extends Ve{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==xe.promise&&n.common.async===!1)return ye(n,{code:ue.invalid_type,expected:xe.promise,received:n.parsedType}),Me;const r=n.parsedType===xe.promise?n.data:Promise.resolve(n.data);return pn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}so.create=(e,t)=>new so({type:e,typeName:Ne.ZodPromise,...ze(t)});class rr extends Ve{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ne.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{ye(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(r.data,a);if(r.common.async)return Promise.resolve(o).then(async s=>{if(n.value==="aborted")return Me;const u=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return u.status==="aborted"?Me:u.status==="dirty"||n.value==="dirty"?ro(u.value):u});{if(n.value==="aborted")return Me;const s=this._def.schema._parseSync({data:o,path:r.path,parent:r});return s.status==="aborted"?Me:s.status==="dirty"||n.value==="dirty"?ro(s.value):s}}if(i.type==="refinement"){const o=s=>{const u=i.refinement(s,a);if(r.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Me:(s.status==="dirty"&&n.dirty(),o(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Me:(s.status==="dirty"&&n.dirty(),o(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Zi(o))return o;const s=i.transform(o.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>Zi(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:n.value,value:s})):o);nt.assertNever(i)}}rr.create=(e,t,n)=>new rr({schema:e,typeName:Ne.ZodEffects,effect:t,...ze(n)}),rr.createWithPreprocess=(e,t,n)=>new rr({schema:t,effect:{type:"preprocess",transform:e},typeName:Ne.ZodEffects,...ze(n)});class Cr extends Ve{_parse(t){return this._getType(t)===xe.undefined?pn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Cr.create=(e,t)=>new Cr({innerType:e,typeName:Ne.ZodOptional,...ze(t)});class Si extends Ve{_parse(t){return this._getType(t)===xe.null?pn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Si.create=(e,t)=>new Si({innerType:e,typeName:Ne.ZodNullable,...ze(t)});class ol extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===xe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ol.create=(e,t)=>new ol({innerType:e,typeName:Ne.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ze(t)});class sl extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Ks(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new $n(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new $n(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}sl.create=(e,t)=>new sl({innerType:e,typeName:Ne.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ze(t)});class pf extends Ve{_parse(t){if(this._getType(t)!==xe.nan){const r=this._getOrReturnCtx(t);return ye(r,{code:ue.invalid_type,expected:xe.nan,received:r.parsedType}),Me}return{status:"valid",value:t.data}}}pf.create=e=>new pf({typeName:Ne.ZodNaN,...ze(e)});const Uoe=Symbol("zod_brand");class xy extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class ll extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Me:a.status==="dirty"?(n.dirty(),ro(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Me:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new ll({in:t,out:n,typeName:Ne.ZodPipeline})}}class ul extends Ve{_parse(t){const n=this._def.innerType._parse(t),r=i=>(Zi(i)&&(i.value=Object.freeze(i.value)),i);return Ks(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}ul.create=(e,t)=>new ul({innerType:e,typeName:Ne.ZodReadonly,...ze(t)});function o$(e,t){const n=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof n=="string"?{message:n}:n}function s$(e,t={},n){return e?io.create().superRefine((r,i)=>{var a,o;const s=e(r);if(s instanceof Promise)return s.then(u=>{var l,c;if(!u){const f=o$(t,r),p=(c=(l=f.fatal)!==null&&l!==void 0?l:n)!==null&&c!==void 0?c:!0;i.addIssue({code:"custom",...f,fatal:p})}});if(!s){const u=o$(t,r),l=(o=(a=u.fatal)!==null&&a!==void 0?a:n)!==null&&o!==void 0?o:!0;i.addIssue({code:"custom",...u,fatal:l})}}):io.create()}const zoe={object:$t.lazycreate};var Ne;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ne||(Ne={}));const qoe=(e,t={message:`Input not instance of ${e.name}`})=>s$(n=>n instanceof e,t),l$=tr.create,u$=bi.create,Woe=pf.create,Voe=wi.create,c$=Js.create,Hoe=Ki.create,Zoe=uf.create,Koe=Xs.create,Goe=Qs.create,Yoe=io.create,Joe=Gi.create,Xoe=Wr.create,Qoe=cf.create,ese=nr.create,tse=$t.create,nse=$t.strictCreate,rse=el.create,ise=ff.create,ase=tl.create,ose=Or.create,sse=nl.create,lse=df.create,use=Yi.create,cse=oo.create,fse=rl.create,dse=il.create,pse=xi.create,hse=al.create,mse=so.create,f$=rr.create,vse=Cr.create,yse=Si.create,gse=rr.createWithPreprocess,bse=ll.create;var O=Object.freeze({__proto__:null,defaultErrorMap:no,setErrorMap:goe,getErrorMap:of,makeIssue:sf,EMPTY_PATH:boe,addIssueToContext:ye,ParseStatus:ln,INVALID:Me,DIRTY:ro,OK:pn,isAborted:yy,isDirty:gy,isValid:Zi,isAsync:Ks,get util(){return nt},get objectUtil(){return vy},ZodParsedType:xe,getParsedType:qr,ZodType:Ve,datetimeRegex:i$,ZodString:tr,ZodNumber:bi,ZodBigInt:wi,ZodBoolean:Js,ZodDate:Ki,ZodSymbol:uf,ZodUndefined:Xs,ZodNull:Qs,ZodAny:io,ZodUnknown:Gi,ZodNever:Wr,ZodVoid:cf,ZodArray:nr,ZodObject:$t,ZodUnion:el,ZodDiscriminatedUnion:ff,ZodIntersection:tl,ZodTuple:Or,ZodRecord:nl,ZodMap:df,ZodSet:Yi,ZodFunction:oo,ZodLazy:rl,ZodLiteral:il,ZodEnum:xi,ZodNativeEnum:al,ZodPromise:so,ZodEffects:rr,ZodTransformer:rr,ZodOptional:Cr,ZodNullable:Si,ZodDefault:ol,ZodCatch:sl,ZodNaN:pf,BRAND:Uoe,ZodBranded:xy,ZodPipeline:ll,ZodReadonly:ul,custom:s$,Schema:Ve,ZodSchema:Ve,late:zoe,get ZodFirstPartyTypeKind(){return Ne},coerce:{string:e=>tr.create({...e,coerce:!0}),number:e=>bi.create({...e,coerce:!0}),boolean:e=>Js.create({...e,coerce:!0}),bigint:e=>wi.create({...e,coerce:!0}),date:e=>Ki.create({...e,coerce:!0})},any:Yoe,array:ese,bigint:Voe,boolean:c$,date:Hoe,discriminatedUnion:ise,effect:f$,enum:pse,function:cse,instanceof:qoe,intersection:ase,lazy:fse,literal:dse,map:lse,nan:Woe,nativeEnum:hse,never:Xoe,null:Goe,nullable:yse,number:u$,object:tse,oboolean:()=>c$().optional(),onumber:()=>u$().optional(),optional:vse,ostring:()=>l$().optional(),pipeline:bse,preprocess:gse,promise:mse,record:sse,set:use,strictObject:nse,string:l$,symbol:Zoe,transformer:f$,tuple:ose,undefined:Koe,union:rse,unknown:Joe,void:Qoe,NEVER:Me,ZodIssueCode:ue,quotelessJson:yoe,ZodError:$n}),wse=Object.defineProperty,xse=(e,t,n)=>t in e?wse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Sse=(e,t,n)=>(xse(e,t+"",n),n),Ese={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},Sy=typeof window<"u"&&typeof window.document<"u"?window.crypto:GO;Sy.getRandomValues||(Sy=Ese);var xt=class extends Error{constructor(t,n,r,i,a,o,s){super(i);Te(this,"isApiError",!0);this.code=t,this.description=n,this.type=r,this.message=i,this.error=a,this.id=o,this.metadata=s,this.id||(this.id=xt.generateId())}format(){return`[${this.type}] ${this.message} (Error ID: ${this.id})`}toJSON(){return{id:this.id,code:this.code,type:this.type,message:this.message,metadata:this.metadata}}static generateId(){const t=this.getPrefix(),n=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],r=4,i=Array.from(Sy.getRandomValues(new Uint8Array(r))).map(a=>a.toString(16).padStart(2,"0")).join("").toUpperCase();return`${t}_${n}x${i}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}},_se=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,Ey=e=>e instanceof xt||_se(e)&&e.isApiError===!0,cl=class extends xt{constructor(e,t,n,r){super(500,"An unknown error occurred","Unknown",e,t,n,r)}},kse=class extends xt{constructor(e,t,n,r){super(500,"An internal error occurred","Internal",e,t,n,r)}},Tse=class extends xt{constructor(e,t,n,r){super(401,"The request requires to be authenticated.","Unauthorized",e,t,n,r)}},Ose=class extends xt{constructor(e,t,n,r){super(403,"The requested action can't be peform by this resource.","Forbidden",e,t,n,r)}},Cse=class extends xt{constructor(e,t,n,r){super(413,"The request payload is too large.","PayloadTooLarge",e,t,n,r)}},$se=class extends xt{constructor(e,t,n,r){super(400,"The request payload is invalid.","InvalidPayload",e,t,n,r)}},Ise=class extends xt{constructor(e,t,n,r){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",e,t,n,r)}},Rse=class extends xt{constructor(e,t,n,r){super(405,"The requested method does not exist.","MethodNotFound",e,t,n,r)}},Ase=class extends xt{constructor(e,t,n,r){super(404,"The requested resource does not exist.","ResourceNotFound",e,t,n,r)}},Pse=class extends xt{constructor(e,t,n,r){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",e,t,n,r)}},Dse=class extends xt{constructor(e,t,n,r){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",e,t,n,r)}},jse=class extends xt{constructor(e,t,n,r){super(400,"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters.","InvalidIdentifier",e,t,n,r)}},Nse=class extends xt{constructor(e,t,n,r){super(409,"The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together.","RelationConflict",e,t,n,r)}},Mse=class extends xt{constructor(e,t,n,r){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",e,t,n,r)}},Fse=class extends xt{constructor(e,t,n,r){super(409,"The resource is current locked and cannot be operated on until the lock is released.","ResourceLockedConflict",e,t,n,r)}},Lse=class extends xt{constructor(e,t,n,r){super(400,"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request.","ReferenceNotFound",e,t,n,r)}},Bse=class extends xt{constructor(e,t,n,r){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",e,t,n,r)}},Use=class extends xt{constructor(e,t,n,r){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",e,t,n,r)}},zse=class extends xt{constructor(e,t,n,r){super(409,"The record attempted to be created already exists.","AlreadyExists",e,t,n,r)}},qse=class extends xt{constructor(e,t,n,r){super(429,"The request has been rate limited.","RateLimited",e,t,n,r)}},Wse=class extends xt{constructor(e,t,n,r){super(402,"A payment is required to perform this request.","PaymentRequired",e,t,n,r)}},Vse=class extends xt{constructor(e,t,n,r){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",e,t,n,r)}},Hse=class extends xt{constructor(e,t,n,r){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",e,t,n,r)}},Zse=class extends xt{constructor(e,t,n,r){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",e,t,n,r)}},Kse={Unknown:cl,Internal:kse,Unauthorized:Tse,Forbidden:Ose,PayloadTooLarge:Cse,InvalidPayload:$se,UnsupportedMediaType:Ise,MethodNotFound:Rse,ResourceNotFound:Ase,InvalidJsonSchema:Pse,InvalidDataFormat:Dse,InvalidIdentifier:jse,RelationConflict:Nse,ReferenceConstraint:Mse,ResourceLockedConflict:Fse,ReferenceNotFound:Lse,InvalidQuery:Bse,Runtime:Use,AlreadyExists:zse,RateLimited:qse,PaymentRequired:Wse,QuotaExceeded:Vse,LimitExceeded:Hse,BreakingChanges:Zse},d$=e=>Ey(e)?e:e instanceof Error?new cl(e.message,e):typeof e=="string"?new cl(e):Gse(e);function Gse(e){if(typeof e=="object"&&"code"in e&&"type"in e&&"id"in e&&"message"in e&&typeof e.type=="string"&&typeof e.message=="string"){const t=Kse[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN",e.metadata):new cl(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new cl("An invalid error occurred: "+JSON.stringify(e))}var Yse=e=>e[1]!==void 0,At=e=>{const{method:t,path:n,query:r,headers:i,body:a}=e,o=Object.entries(i).filter(Yse),s=Object.fromEntries(o),u=hoe.stringify(r,{encode:!0,arrayFormat:"repeat",allowDots:!0}),l=u?[n,u].join("?"):n,c=["put","post","delete","patch"].includes(t.toLowerCase())?a:void 0;return{method:t,url:l,headers:s,data:c}},Jse=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Xse=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{_:e._}}),Qse=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),ele=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{},body:{}}),tle=e=>({path:`/conversations/${encodeURIComponent(e.id)}/listen`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),nle=e=>({path:`/conversations/${encodeURIComponent(e.id)}/messages`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),rle=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{userId:e.userId}}),ile=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id,userId:e.userId},body:{}}),ale=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id,userId:e.userId},body:{}}),ole=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),sle=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),lle=e=>({path:"/messages",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId,metadata:e.metadata}}),ule=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{payload:e.payload,metadata:e.metadata}}),cle=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),fle=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),dle=e=>({path:"/users",headers:{},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),ple=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),hle=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),mle=e=>({path:`/events/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),vle=e=>({path:"/events",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId,bindConversation:e.bindConversation,bindUser:e.bindUser}}),yle=e=>({path:"/files",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{key:e.key,size:e.size,accessPolicies:e.accessPolicies,index:e.index,contentType:e.contentType,tags:e.tags,expiresAt:e.expiresAt}}),gle=class{constructor(e,t={}){Te(this,"getConversation",async e=>{const{path:t,headers:n,query:r,body:i}=Jse(e),o=(this.props.toAxiosRequest??At)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Pt(s)})});Te(this,"createConversation",async e=>{const{path:t,headers:n,query:r,body:i}=Xse(e),o=(this.props.toAxiosRequest??At)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Pt(s)})});Te(this,"deleteConversation",async e=>{const{path:t,headers:n,query:r,body:i}=Qse(e),o=(this.props.toAxiosRequest??At)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Pt(s)})});Te(this,"listConversations",async e=>{const{path:t,headers:n,query:r,body:i}=ele(e),o=(this.props.toAxiosRequest??At)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Pt(s)})});Te(this,"listenConversation",async e=>{const{path:t,headers:n,query:r,body:i}=tle(e),o=(this.props.toAxiosRequest??At)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Pt(s)})});Te(this,"listConversationMessages",async e=>{const{path:t,headers:n,query:r,body:i}=nle(e),o=(this.props.toAxiosRequest??At)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Pt(s)})});Te(this,"addParticipant",async e=>{const{path:t,headers:n,query:r,body:i}=rle(e),o=(this.props.toAxiosRequest??At)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Pt(s)})});Te(this,"removeParticipant",async e=>{const{path:t,headers:n,query:r,body:i}=ile(e),o=(this.props.toAxiosRequest??At)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Pt(s)})});Te(this,"getParticipant",async e=>{const{path:t,headers:n,query:r,body:i}=ale(e),o=(this.props.toAxiosRequest??At)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Pt(s)})});Te(this,"listParticipants",async e=>{const{path:t,headers:n,query:r,body:i}=ole(e),o=(this.props.toAxiosRequest??At)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Pt(s)})});Te(this,"getMessage",async e=>{const{path:t,headers:n,query:r,body:i}=sle(e),o=(this.props.toAxiosRequest??At)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Pt(s)})});Te(this,"createMessage",async e=>{const{path:t,headers:n,query:r,body:i}=lle(e),o=(this.props.toAxiosRequest??At)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Pt(s)})});Te(this,"updateMessage",async e=>{const{path:t,headers:n,query:r,body:i}=ule(e),o=(this.props.toAxiosRequest??At)({method:"put",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Pt(s)})});Te(this,"deleteMessage",async e=>{const{path:t,headers:n,query:r,body:i}=cle(e),o=(this.props.toAxiosRequest??At)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Pt(s)})});Te(this,"getUser",async e=>{const{path:t,headers:n,query:r,body:i}=fle(e),o=(this.props.toAxiosRequest??At)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Pt(s)})});Te(this,"createUser",async e=>{const{path:t,headers:n,query:r,body:i}=dle(e),o=(this.props.toAxiosRequest??At)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Pt(s)})});Te(this,"updateUser",async e=>{const{path:t,headers:n,query:r,body:i}=ple(e),o=(this.props.toAxiosRequest??At)({method:"put",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Pt(s)})});Te(this,"deleteUser",async e=>{const{path:t,headers:n,query:r,body:i}=hle(e),o=(this.props.toAxiosRequest??At)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Pt(s)})});Te(this,"getEvent",async e=>{const{path:t,headers:n,query:r,body:i}=mle(e),o=(this.props.toAxiosRequest??At)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Pt(s)})});Te(this,"createEvent",async e=>{const{path:t,headers:n,query:r,body:i}=vle(e),o=(this.props.toAxiosRequest??At)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Pt(s)})});Te(this,"createFile",async e=>{const{path:t,headers:n,query:r,body:i}=yle(e),o=(this.props.toAxiosRequest??At)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw Pt(s)})});this.axiosInstance=e,this.props=t}};function Pt(e){var t;return Ft.isAxiosError(e)&&((t=e.response)!=null&&t.data)?d$(e.response.data):d$(e)}var p$=class{constructor(){Te(this,"listeners",{})}emit(e,t){const n=this.listeners[e];if(n)for(const r of[...n])r(t)}onceOrMore(e,t){const n=r=>{t(r)==="stop-listening"&&this.off(e,n)};this.on(e,n)}once(e,t){const n=r=>{this.off(e,n),t(r)};this.on(e,n)}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}off(e,t){const n=this.listeners[e];if(!n)return;const r=n.indexOf(t);r!==-1&&n.splice(r,1)}cleanup(){this.listeners={}}},ble=(e,t)=>{const n=new voe.EventSourcePolyfill(e,{headers:t.headers,heartbeatTimeout:t.timeout}),r=new p$;return n.onopen=i=>r.emit("open",i),n.onmessage=i=>r.emit("message",i),n.onerror=i=>r.emit("error",i),{emitter:r,source:n}},wle=async(e,t={})=>{const{emitter:n,source:r}=ble(e,t);return await new Promise((i,a)=>{n.on("open",()=>{i()}),n.on("error",o=>{a(o)})}).finally(()=>n.cleanup()),{on:n.on.bind(n),close:()=>{n.cleanup(),r.close()}}},xle=O.object({type:O.literal("message_created"),data:O.object({id:O.string().describe("Id of the [Message](#schema_message)"),createdAt:O.string().datetime().describe("Creation date of the [Message](#schema_message) in ISO 8601 format"),payload:O.union([O.object({audioUrl:O.string().min(1),type:O.literal("audio")}),O.object({title:O.string().min(1),subtitle:O.string().min(1).optional(),imageUrl:O.string().min(1).optional(),actions:O.array(O.object({action:O.enum(["postback","url","say"]),label:O.string().min(1),value:O.string().min(1)})),type:O.literal("card")}),O.object({items:O.array(O.object({title:O.string().min(1),subtitle:O.string().min(1).optional(),imageUrl:O.string().min(1).optional(),actions:O.array(O.object({action:O.enum(["postback","url","say"]),label:O.string().min(1),value:O.string().min(1)}))})),type:O.literal("carousel")}),O.object({text:O.string().min(1),options:O.array(O.object({label:O.string().min(1),value:O.string().min(1)})),type:O.literal("choice"),disableFreeText:O.boolean().optional()}),O.object({text:O.string().min(1),options:O.array(O.object({label:O.string().min(1),value:O.string().min(1)})),type:O.literal("dropdown")}),O.object({fileUrl:O.string().min(1),title:O.string().min(1).optional(),type:O.literal("file")}),O.object({imageUrl:O.string().min(1),type:O.literal("image")}),O.object({latitude:O.number(),longitude:O.number(),address:O.string().optional(),title:O.string().optional(),type:O.literal("location")}),O.object({text:O.string().min(1),type:O.literal("text"),value:O.string().optional()}),O.object({videoUrl:O.string().min(1),type:O.literal("video")}),O.object({items:O.array(O.union([O.object({type:O.literal("text"),payload:O.object({text:O.string().min(1)})}),O.object({type:O.literal("markdown"),payload:O.object({markdown:O.string().min(1)})}),O.object({type:O.literal("image"),payload:O.object({imageUrl:O.string().min(1)})}),O.object({type:O.literal("audio"),payload:O.object({audioUrl:O.string().min(1)})}),O.object({type:O.literal("video"),payload:O.object({videoUrl:O.string().min(1)})}),O.object({type:O.literal("file"),payload:O.object({fileUrl:O.string().min(1),title:O.string().min(1).optional()})}),O.object({type:O.literal("location"),payload:O.object({latitude:O.number(),longitude:O.number(),address:O.string().optional(),title:O.string().optional()})})])),type:O.literal("bloc")}),O.object({markdown:O.string().min(1),type:O.literal("markdown")}),O.object({type:O.literal("custom"),url:O.string(),name:O.string(),data:O.union([O.any(),O.null()]).optional()})]).describe("Payload is the content type of the message."),userId:O.string().describe("ID of the [User](#schema_user)"),conversationId:O.string().describe("ID of the [Conversation](#schema_conversation)"),metadata:O.record(O.union([O.any(),O.null()])).describe("Metadata of the message").optional()}).describe("The Message object represents a message in a [Conversation](#schema_conversation) for a specific [User](#schema_user).")}),Sle=O.object({type:O.literal("message_updated"),data:O.object({id:O.string().describe("Id of the [Message](#schema_message)"),createdAt:O.string().datetime().describe("Creation date of the [Message](#schema_message) in ISO 8601 format"),payload:O.union([O.object({audioUrl:O.string().min(1),type:O.literal("audio")}),O.object({title:O.string().min(1),subtitle:O.string().min(1).optional(),imageUrl:O.string().min(1).optional(),actions:O.array(O.object({action:O.enum(["postback","url","say"]),label:O.string().min(1),value:O.string().min(1)})),type:O.literal("card")}),O.object({items:O.array(O.object({title:O.string().min(1),subtitle:O.string().min(1).optional(),imageUrl:O.string().min(1).optional(),actions:O.array(O.object({action:O.enum(["postback","url","say"]),label:O.string().min(1),value:O.string().min(1)}))})),type:O.literal("carousel")}),O.object({text:O.string().min(1),options:O.array(O.object({label:O.string().min(1),value:O.string().min(1)})),type:O.literal("choice"),disableFreeText:O.boolean().optional()}),O.object({text:O.string().min(1),options:O.array(O.object({label:O.string().min(1),value:O.string().min(1)})),type:O.literal("dropdown")}),O.object({fileUrl:O.string().min(1),title:O.string().min(1).optional(),type:O.literal("file")}),O.object({imageUrl:O.string().min(1),type:O.literal("image")}),O.object({latitude:O.number(),longitude:O.number(),address:O.string().optional(),title:O.string().optional(),type:O.literal("location")}),O.object({text:O.string().min(1),type:O.literal("text"),value:O.string().optional()}),O.object({videoUrl:O.string().min(1),type:O.literal("video")}),O.object({items:O.array(O.union([O.object({type:O.literal("text"),payload:O.object({text:O.string().min(1)})}),O.object({type:O.literal("markdown"),payload:O.object({markdown:O.string().min(1)})}),O.object({type:O.literal("image"),payload:O.object({imageUrl:O.string().min(1)})}),O.object({type:O.literal("audio"),payload:O.object({audioUrl:O.string().min(1)})}),O.object({type:O.literal("video"),payload:O.object({videoUrl:O.string().min(1)})}),O.object({type:O.literal("file"),payload:O.object({fileUrl:O.string().min(1),title:O.string().min(1).optional()})}),O.object({type:O.literal("location"),payload:O.object({latitude:O.number(),longitude:O.number(),address:O.string().optional(),title:O.string().optional()})})])),type:O.literal("bloc")}),O.object({markdown:O.string().min(1),type:O.literal("markdown")}),O.object({type:O.literal("custom"),url:O.string(),name:O.string(),data:O.union([O.any(),O.null()]).optional()})]).describe("Payload is the content type of the message."),userId:O.string().describe("ID of the [User](#schema_user)"),conversationId:O.string().describe("ID of the [Conversation](#schema_conversation)"),metadata:O.record(O.union([O.any(),O.null()])).describe("Metadata of the message").optional()}).describe("The Message object represents a message in a [Conversation](#schema_conversation) for a specific [User](#schema_user).")}),Ele=O.object({type:O.literal("webchat_visibility"),data:O.object({visibility:O.union([O.literal("show"),O.literal("hide"),O.literal("toggle")])})}),_le=O.object({type:O.literal("webchat_config"),data:O.object({config:O.record(O.union([O.any(),O.null()]))})}),kle=O.object({type:O.literal("custom"),data:O.object({event:O.record(O.union([O.any(),O.null()]))})}),Tle=O.object({type:O.literal("typing_started"),data:O.object({timeout:O.number().optional()})}),Ole=O.object({type:O.literal("typing_stopped"),data:O.record(O.never())}),Cle={messageCreated:xle,messageUpdated:Sle,webchatVisibility:Ele,webchatConfig:_le,custom:kle,typingStarted:Tle,typingStopped:Ole},h$="unknown error",m$=class extends p${constructor(t){super();Te(this,"_state",{status:"disconnected"});Te(this,"connect",async()=>{if(this._state.status==="connected")return;if(this._state.status==="connecting"){await this._state.connectionPromise;return}const t=this._connect();this._state={status:"connecting",connectionPromise:t},await t});Te(this,"disconnect",async()=>{if(this._state.status==="disconnected")return;let t;this._state.status==="connecting"?t=await this._state.connectionPromise:t=this._state.source,this._disconnectSync(t)});Te(this,"_connect",async()=>{const t=await wle(`${this._props.url}/conversations/${this._props.conversationId}/listen`,{headers:{"x-user-key":this._props.userKey},timeout:this._props.timeout});return t.on("message",this._handleMessage),t.on("error",this._handleError(t)),this._state={status:"connected",source:t},t});Te(this,"_disconnectSync",t=>{t.close(),this._state={status:"disconnected"}});Te(this,"_handleMessage",t=>{const n=this._parseSignal(t.data);this.emit(n.type,n.data)});Te(this,"_handleError",t=>n=>{this._disconnectSync(t);const r=this._toError(n);this.emit("error",r)});Te(this,"_parseSignal",t=>{for(const n of Object.values(Cle)){const r=this._safeJsonParse(t),i=n.safeParse(r);if(i.success)return i.data}return{type:"unknown",data:t}});Te(this,"_safeJsonParse",t=>{try{return JSON.parse(t)}catch{return t}});Te(this,"_toError",t=>{if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t===null)return new Error(h$);if(typeof t=="object"&&"message"in t)return this._toError(t.message);try{const n=JSON.stringify(t);return new Error(n)}catch{return new Error(h$)}});this._props=t}get status(){return this._state.status}},v$=m$;Sse(v$,"listen",async e=>{const t=new m$(e);return await t.connect(),t});var y$=100*1024*1024,$le=y$,Ile=y$,Rle=6e4,g$=class{constructor(e){Te(this,"_auto");Te(this,"createConversation",e=>this._auto.createConversation(e));Te(this,"getConversation",e=>this._auto.getConversation(e));Te(this,"deleteConversation",e=>this._auto.deleteConversation(e));Te(this,"listConversations",e=>this._auto.listConversations(e));Te(this,"listConversationMessages",e=>this._auto.listConversationMessages(e));Te(this,"addParticipant",e=>this._auto.addParticipant(e));Te(this,"removeParticipant",e=>this._auto.removeParticipant(e));Te(this,"getParticipant",e=>this._auto.getParticipant(e));Te(this,"listParticipants",e=>this._auto.listParticipants(e));Te(this,"createMessage",e=>this._auto.createMessage(e));Te(this,"updateMessage",e=>this._auto.updateMessage(e));Te(this,"getMessage",e=>this._auto.getMessage(e));Te(this,"deleteMessage",e=>this._auto.deleteMessage(e));Te(this,"createFile",e=>this._auto.createFile(e));Te(this,"createUser",e=>this._auto.createUser(e));Te(this,"getUser",e=>this._auto.getUser(e));Te(this,"updateUser",e=>this._auto.updateUser(e));Te(this,"deleteUser",e=>this._auto.deleteUser(e));Te(this,"createEvent",e=>this._auto.createEvent(e));Te(this,"getEvent",e=>this._auto.getEvent(e));Te(this,"listenConversation",async({id:e,"x-user-key":t})=>await v$.listen({url:this.props.apiUrl,conversationId:e,userKey:t,timeout:this.props.sseTimeout}));this.props=e;const{apiUrl:t}=e,n={...e.headers},r=this.props.timeout??Rle,i=Ft.create({baseURL:t,headers:n,withCredentials:!0,timeout:r,maxBodyLength:$le,maxContentLength:Ile});this._auto=new gle(i)}};const Ale=6e4;function b$({apiUrl:e,clientId:t,sseTimeout:n=Ale}){const r=new g$({apiUrl:`${e}/${t}`,sseTimeout:n});return{sendMessage:async i=>{const{message:a}=await r.createMessage(i);return lo(a)},getMessage:async i=>{const{message:a}=await r.getMessage(i);return lo(a)},listConversationMessages:async i=>{const{messages:a,meta:o}=await r.listConversationMessages(i);return{messages:a.map(lo),meta:o}},createMessage:async i=>{const{message:a}=await r.createMessage(i);return lo(a)},addParticipant:r.addParticipant.bind(r),createConversation:r.createConversation.bind(r),createEvent:r.createEvent.bind(r),createFile:r.createFile.bind(r),createUser:r.createUser.bind(r),deleteConversation:r.deleteConversation.bind(r),deleteMessage:r.deleteMessage.bind(r),deleteUser:r.deleteUser.bind(r),getConversation:r.getConversation.bind(r),getEvent:r.getEvent.bind(r),getParticipant:r.getParticipant.bind(r),getUser:r.getUser.bind(r),listConversations:r.listConversations.bind(r),removeParticipant:r.removeParticipant.bind(r),updateUser:r.updateUser.bind(r),listenConversation:r.listenConversation.bind(r)}}function lo(e){const{metadata:t,conversationId:n,userId:r}=e,{payload:i,disableInput:a}=bf(e.payload);return{id:e.id,conversationId:n,authorId:r,timestamp:new Date(e.createdAt),block:i,disableInput:a,metadata:t}}const hf={disconnected:0,user_creating:1,user_created:2,conversation_creating:3,conversation_created:4},xn=(e,t)=>e.status===t,$r=(e,t)=>hf[e.status]<hf[t],w$=(e,t)=>hf[e.status]>=hf[t];class Ir extends Error{constructor(t){super(`Unexpected state: ${t.status}`),this.state=t}}const x$=["audio","file","image","video"],_y=e=>x$.includes(e),Ple=6e4;class Dle extends Cf{constructor(n){super();Te(this,"_client");Te(this,"_webhookId");Te(this,"_apiUrl");Te(this,"_state",{status:"disconnected"});Te(this,"mode","pushpin");Te(this,"_initialConnect",async({data:n,name:r,pictureUrl:i})=>{if(w$(this._state,"user_created"))throw new Error("Client is already connected. Please disconnect first.");if(xn(this._state,"user_creating"))return;this._state={status:"user_creating"};const{user:{id:a},key:o}=await this._client.createUser({name:r,pictureUrl:i,userData:n});return this._state={status:"user_created",userId:a,userKey:o},{userId:a,userToken:o}});Te(this,"_reConnect",async(n,{data:r,name:i,pictureUrl:a})=>{if(w$(this._state,"user_created")){if(this._state.userId!==n.userId)throw new Error("Client is already connected. Please disconnect first.");return n}return xn(this._state,"user_creating")||(this._state={status:"user_created",userId:n.userId,userKey:n.userToken},await this._client.updateUser({"x-user-key":n.userToken,name:i,pictureUrl:a,userData:r})),n});Te(this,"_mapMessage",n=>{const{metadata:r}=n,{payload:i,disableInput:a}=bf(n.payload);return{id:n.id,conversationId:n.conversationId,authorId:n.userId,sentOn:new Date(n.createdAt),payload:i,disableInput:a,metadata:r}});const r=`${n.apiUrl}/${n.clientId}`;this._webhookId=n.clientId,this._apiUrl=r,this._client=new g$({apiUrl:r,sseTimeout:Ple})}get apiUrl(){return this._apiUrl}get clientId(){return this._webhookId}get userId(){if(!$r(this._state,"user_created"))return this._state.userId}async getUser(){if($r(this._state,"user_created"))throw new Ir(this._state);const{user:n}=await this._client.getUser({"x-user-key":this._state.userKey});return{data:n.data}}async updateUser(n){if($r(this._state,"user_created"))throw new Ir(this._state);const{user:r}=await this._client.updateUser({"x-user-key":this._state.userKey,name:n.name,pictureUrl:n.pictureUrl,userData:n.data});return r}get conversationId(){if(!$r(this._state,"conversation_created"))return this._state.conversationId}async connect(n,r,i={}){const a={data:r,...i};return n?await this.userExists(n)?this._reConnect(n,a):this._initialConnect(a):this._initialConnect(a)}async disconnect(){xn(this._state,"conversation_created")?this._state.signalEmitter.cleanup():xn(this._state,"conversation_creating")&&console.warn("zombie conversation..."),this._state={status:"disconnected"}}async sendFile(n){if($r(this._state,"user_created"))throw new Ir(this._state);if(xn(this._state,"conversation_creating"))throw new Ir(this._state);let r;xn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state));const{size:i,name:a}=n,s=await(m=>new Promise((h,y)=>{const v=new FileReader;v.onload=b=>{var w;return h((w=b.target)==null?void 0:w.result)},v.onerror=b=>{var w;return y((w=b.target)==null?void 0:w.error)},v.readAsArrayBuffer(m)}))(n),{file:{uploadUrl:u,contentType:l,url:c}}=await this._client.createFile({"x-user-key":r.userKey,size:i,key:a,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"}});await fetch(u,{method:"PUT",headers:{"x-amz-tagging":"public=true"},body:s});const f=l.split("/").shift()??"",p=_y(f)?f:"file",d=p==="image"?{type:p,imageUrl:c}:p==="audio"?{type:p,audioUrl:c}:p==="video"?{type:p,videoUrl:c}:{type:p,fileUrl:c};return await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:d}),this.emit("messageSent",d),{fileUrl:c,name:a,type:p}}async sendMessage(n){if($r(this._state,"user_created"))throw new Ir(this._state);if(xn(this._state,"conversation_creating"))throw new Ir(this._state);let r;xn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:n}),this.emit("messageSent",n)}async sendEvent(n){if($r(this._state,"user_created"))throw new Ir(this._state);if(xn(this._state,"conversation_creating"))throw new Ir(this._state);let r;xn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createEvent({"x-user-key":r.userKey,conversationId:r.conversationId,payload:{type:"custom",data:n}})}async switchConversation(n){if($r(this._state,"user_created"))throw new Ir(this._state);xn(this._state,"conversation_created")&&this._state.conversationId===n||xn(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._connectConversation(this._state,n))}async conversationExists(n){if($r(this._state,"user_created"))return!1;try{return await this._client.getConversation({"x-user-key":this._state.userKey,id:n}),!0}catch(r){if(Ey(r)&&r.code===404)return!1;throw r}}async userExists({userToken:n}){try{return await this._client.getUser({"x-user-key":n}),!0}catch(r){const i=a=>a.code===404||a.code===401;if(Ey(r)&&i(r))return!1;throw r}}async newConversation(){if($r(this._state,"user_created"))throw new Ir(this._state);xn(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._createNewConversation(this._state))}async _createNewConversation(n){const{conversation:{id:r}}=await this._client.createConversation({"x-user-key":n.userKey}),i=await this._connectConversation(n,r);return await this._client.createEvent({"x-user-key":n.userKey,conversationId:r,payload:{type:"conversation_started",data:{}}}),i}async listMessages(){if(!xn(this._state,"conversation_created"))return[];const{conversationId:n,userKey:r}=this._state,i=[];let a;do{const o=await this._client.listConversationMessages({id:n,"x-user-key":r,nextToken:a});i.push(...o.messages),a=o.meta.nextToken}while(a);return i.map(this._mapMessage)}async _connectConversation(n,r){const i=await this._client.listenConversation({id:r,"x-user-key":n.userKey});return i.on("unknown",a=>{typeof a=="string"&&a==="ping"||console.debug("unknown event",a)}),i.on("message_created",a=>{a.userId,n.userId}),i.on("error",a=>{this._state={status:"user_created",userId:n.userId,userKey:n.userKey},this.emit("error",new Error(`Connection to conversation lost: ${a.message}`))}),i.on("webchat_visibility",a=>{this.emit("webchatVisibility",a.visibility)}),i.on("webchat_config",a=>{this.emit("webchatConfig",a.config)}),i.on("typing_started",a=>{this.emit("isTyping",{isTyping:!0,timeout:a.timeout??5e3})}),i.on("typing_stopped",()=>{this.emit("isTyping",{isTyping:!1,timeout:0})}),i.on("custom",a=>{this.emit("customEvent",a.event)}),this.emit("conversation",r),this._state={status:"conversation_created",userId:n.userId,userKey:n.userKey,conversationId:r,signalEmitter:i},this._state}}const jle=({clientId:e,apiUrl:t="https://webchat.botpress.cloud"})=>new Dle({apiUrl:t,clientId:e}),Nle=({clientId:e,apiUrl:t="https://webchat.botpress.cloud"})=>{const[n]=j.useState(jle({clientId:e,apiUrl:t}));return n};function Mle(){const[e,t]=j.useState(!1),n=j.useRef(null);return{isTyping:e,setIsTyping:(r,i)=>{if(t(r),!r)return()=>{};if(n.current=new Date,!i)return()=>{};const a=setTimeout(()=>{const o=n.current;o&&new Date().getTime()-o.getTime()>i&&t(!1)},i+100);return()=>clearTimeout(a)}}}var S$={},ky={},mf=mt&&mt.__assign||function(){return mf=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},mf.apply(this,arguments)};Object.defineProperty(ky,"__esModule",{value:!0});var Fle={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function Lle(e){var t=mf(mf({},Fle),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}ky.getSanitizedOptions=Lle;var Ty={},Oy={},vf={},Cy={},$y={};Object.defineProperty($y,"__esModule",{value:!0});function Ble(e){var t=Math.random()*e;return Math.round(t)}$y.fullJitter=Ble;var Iy={};Object.defineProperty(Iy,"__esModule",{value:!0});function Ule(e){return e}Iy.noJitter=Ule,Object.defineProperty(Cy,"__esModule",{value:!0});var zle=$y,qle=Iy;function Wle(e){switch(e.jitter){case"full":return zle.fullJitter;case"none":default:return qle.noJitter}}Cy.JitterFactory=Wle,Object.defineProperty(vf,"__esModule",{value:!0});var Vle=Cy,Hle=function(){function e(t){this.options=t,this.attempt=0}return e.prototype.apply=function(){var t=this;return new Promise(function(n){return setTimeout(n,t.jitteredDelay)})},e.prototype.setAttemptNumber=function(t){this.attempt=t},Object.defineProperty(e.prototype,"jitteredDelay",{get:function(){var t=Vle.JitterFactory(this.options);return t(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delay",{get:function(){var t=this.options.startingDelay,n=this.options.timeMultiple,r=this.numOfDelayedAttempts,i=t*Math.pow(n,r);return Math.min(i,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),e}();vf.Delay=Hle;var Zle=mt&&mt.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Kle=mt&&mt.__awaiter||function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(c){try{l(r.next(c))}catch(f){o(f)}}function u(c){try{l(r.throw(c))}catch(f){o(f)}}function l(c){c.done?a(c.value):i(c.value).then(s,u)}l((r=r.apply(e,t||[])).next())})},Gle=mt&&mt.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(c){l=[6,c],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(Oy,"__esModule",{value:!0});var Yle=vf,Jle=function(e){Zle(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return Kle(this,void 0,void 0,function(){return Gle(this,function(n){return[2,this.isFirstAttempt?!0:e.prototype.apply.call(this)]})})},Object.defineProperty(t.prototype,"isFirstAttempt",{get:function(){return this.attempt===0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),t}(Yle.Delay);Oy.SkipFirstDelay=Jle;var Ry={},Xle=mt&&mt.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(Ry,"__esModule",{value:!0});var Qle=vf,eue=function(e){Xle(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Qle.Delay);Ry.AlwaysDelay=eue,Object.defineProperty(Ty,"__esModule",{value:!0});var tue=Oy,nue=Ry;function rue(e,t){var n=iue(e);return n.setAttemptNumber(t),n}Ty.DelayFactory=rue;function iue(e){return e.delayFirstAttempt?new nue.AlwaysDelay(e):new tue.SkipFirstDelay(e)}var Ay=mt&&mt.__awaiter||function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(c){try{l(r.next(c))}catch(f){o(f)}}function u(c){try{l(r.throw(c))}catch(f){o(f)}}function l(c){c.done?a(c.value):i(c.value).then(s,u)}l((r=r.apply(e,t||[])).next())})},Py=mt&&mt.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(c){l=[6,c],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(S$,"__esModule",{value:!0});var aue=ky,oue=Ty;function sue(e,t){return t===void 0&&(t={}),Ay(this,void 0,void 0,function(){var n,r;return Py(this,function(i){switch(i.label){case 0:return n=aue.getSanitizedOptions(t),r=new uue(e,n),[4,r.execute()];case 1:return[2,i.sent()]}})})}var lue=S$.backOff=sue,uue=function(){function e(t,n){this.request=t,this.options=n,this.attemptNumber=0}return e.prototype.execute=function(){return Ay(this,void 0,void 0,function(){var t,n;return Py(this,function(r){switch(r.label){case 0:if(this.attemptLimitReached)return[3,7];r.label=1;case 1:return r.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return r.sent(),[4,this.request()];case 3:return[2,r.sent()];case 4:return t=r.sent(),this.attemptNumber++,[4,this.options.retry(t,this.attemptNumber)];case 5:if(n=r.sent(),!n||this.attemptLimitReached)throw t;return[3,6];case 6:return[3,0];case 7:throw new Error("Something went wrong.")}})})},Object.defineProperty(e.prototype,"attemptLimitReached",{get:function(){return this.attemptNumber>=this.options.numOfAttempts},enumerable:!0,configurable:!0}),e.prototype.applyDelay=function(){return Ay(this,void 0,void 0,function(){var t;return Py(this,function(n){switch(n.label){case 0:return t=oue.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return n.sent(),[2]}})})},e}();function E$({apiUrl:e="https://webchat.botpress.cloud",clientId:t,storageKey:n,storageLocation:r,...i}){const[a,o]=j.useState(),s=Uo(T=>T.messages),u=Uo(T=>T.addMessage),l=Uo(T=>T.fetchMessages),c=Uo(T=>T.setMessages),f=Uo(T=>T.isFetching),[p,d]=j.useState("connecting"),{isTyping:m,setIsTyping:h}=Mle(),y=j.useMemo(()=>new Cf,[]),v=t0(n,r),b=j.useMemo(()=>b$({apiUrl:e,clientId:t}),[e,t]),w=j.useRef(null),[k,E]=j.useState(i.userKey),[_,C]=j.useState(i.conversationId);async function z(T){const{conversation:A}=await b.createConversation({"x-user-key":T});return v.setState({conversationId:A.id}),await b.createEvent({"x-user-key":T,conversationId:A.id,payload:{type:"conversation_started",data:{}}}),A.id}if(j.useEffect(()=>{let T=!0;async function A({userKey:W,conversationId:F}){let L,N=i.userKey??W,q=i.conversationId??F;if(d("connecting"),!N){const I=v.getState().user;N=I==null?void 0:I.userToken}if(!N){const{key:I,user:g}=await b.createUser({});L=g,N=I,v.setState({user:{userId:g.id,userToken:N}})}if(!L){const{user:I}=await b.getUser({"x-user-key":N});L=I}q||(q=v.getState().conversationId),q||(q=await z(N));const[Y,H]=[await b.listenConversation({"x-user-key":N,id:q}),await l({client:b,conversationId:q,userKey:N})];y.emit("conversation",q),_$({emitter:y,signalEmitter:Y}),T&&(w.current=Y,E(N),C(q),o(L),c(H),d("connected"))}return A({userKey:k,conversationId:_}).catch(W=>{console.error(W)}),()=>{w.current&&(w.current.cleanup(),w.current=null),T=!1}},[k,_,b,y,i.conversationId,i.userKey]),j.useEffect(()=>{var A;if(!k||!_)return;async function T({userKey:W,conversationId:F}){const L=await b.listenConversation({"x-user-key":W,id:F});w.current=L,_$({emitter:y,signalEmitter:L})}p==="error"&&((A=w.current)==null||A.cleanup(),lue(()=>T({conversationId:_,userKey:k}),{startingDelay:2e3,maxDelay:1e4,numOfAttempts:1/0}),d("connected"))},[p,k,_]),j.useEffect(()=>{const T=[y.on("message",A=>((a==null?void 0:a.id)!==A.authorId&&y.emit("isTyping",{isTyping:!1,timeout:0}),u(A))),y.on("isTyping",({isTyping:A,timeout:W})=>{h(A,W)}),y.on("error",()=>{d("error")})];return()=>{T.forEach(A=>A())}},[]),p==="connecting"||!k||!_)return{clientState:"connecting",on:y.on.bind(y),client:void 0,messages:[],conversationId:void 0,newConversation:()=>{},user:void 0,isTyping:void 0,isFetchingMessages:f};const B={sendMessage:async T=>{const A=gO();u(lo({id:A,createdAt:new Date().toISOString(),userId:(a==null?void 0:a.id)??"",conversationId:_,payload:T,metadata:{clientMessageId:A,delivered:!1}})),await b.createMessage({"x-user-key":k,conversationId:_,payload:T,metadata:{clientMessageId:A}}).catch(W=>y.emit("error",W))},updateUser:async T=>{const{user:A}=await b.updateUser({"x-user-key":k,name:T.name,pictureUrl:T.pictureUrl,userData:T.data});return A},sendEvent:async T=>{await b.createEvent({"x-user-key":k,conversationId:_,payload:{type:"custom",data:T}})},uploadFile:async T=>{const{size:A,name:W}=T,L=await(P=>new Promise((V,S)=>{const Z=new FileReader;Z.onload=J=>{var G;return V((G=J.target)==null?void 0:G.result)},Z.onerror=J=>{var G;return S((G=J.target)==null?void 0:G.error)},Z.readAsArrayBuffer(P)}))(T),N=new Date;N.setDate(N.getDate()+30);const{file:{uploadUrl:q,contentType:Y,url:H}}=await b.createFile({"x-user-key":k,size:A,key:W,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"},expiresAt:N.toISOString()});await fetch(q,{method:"PUT",headers:{"x-amz-tagging":"public=true"},body:L});const I=Y.split("/").shift()??"",g=_y(I)?I:"file";return{fileUrl:H,name:W,type:g}},getUser:async()=>{const{user:T}=await b.getUser({"x-user-key":k});return T}};return{clientState:p,on:y.on.bind(y),client:B,messages:s,conversationId:_,newConversation:()=>{c([]),z(k).then(C)},user:a,isTyping:m,isFetchingMessages:f}}function _$({emitter:e,signalEmitter:t}){t.on("unknown",n=>{}),t.on("message_created",n=>{e.emit("message",lo(n))}),t.on("error",n=>{e.emit("error",new Error(`Connection to conversation lost: ${n.message}`))}),t.on("webchat_visibility",n=>{e.emit("webchatVisibility",n.visibility)}),t.on("webchat_config",n=>{e.emit("webchatConfig",n.config)}),t.on("typing_started",n=>{e.emit("isTyping",{isTyping:!0,timeout:n.timeout??5e3})}),t.on("typing_stopped",()=>{e.emit("isTyping",{isTyping:!1,timeout:0})}),t.on("custom",n=>{e.emit("customEvent",n.event)})}const cue=({clientId:e,storageKey:t,configuration:n,allowFileUpload:r,apiUrl:i,userKey:a,conversationId:o,...s})=>{const u=t||`bp-webchat-${e}`,{clientState:l,client:c,isFetchingMessages:f,isTyping:p,newConversation:d,messages:m,user:h}=E$({clientId:e,apiUrl:i,conversationId:o,userKey:a,storageKey:u,storageLocation:n==null?void 0:n.storageLocation}),{sendMessage:y,uploadFile:v}=c??{};return $.jsx(bO,{configuration:n??{},user:h??{id:""},isLoading:f||l==="connecting",isTyping:p,connected:l==="connected"?!0:l==="disconnected"?!1:void 0,messages:m,sendMessage:y,uploadFile:v,allowFileUpload:r,restartConversation:d,...s})};Pe.Avatar=Ol,Pe.Block=xa,Pe.Chat=bO,Pe.Composer=Ox,Pe.Container=Lp,Pe.Fab=J1,Pe.Header=rS,Pe.Message=Wp,Pe.MessageList=xv,Pe.Modal=li,Pe.ModalProvider=_p,Pe.RestartConversationButton=nS,Pe.StylesheetProvider=a1,Pe.TypingIndicator=iS,Pe.Webchat=cue,Pe.WebchatThemeSchema=jf,Pe.__adapters=L$,Pe.avatarThemeSchema=Tl,Pe.blockThemeSchema=Dg,Pe.configPropsSchema=Fg,Pe.configurationSchema=Rg,Pe.cssStyleSchema=Pg,Pe.descriptionItemSchema=ra,Pe.fileTypes=x$,Pe.generateThemeStylesheet=Lg,Pe.getClient=b$,Pe.getUseUserStore=t0,Pe.initPropsSchema=_R,Pe.isFileType=_y,Pe.markdownTypeSchema=Ag,Pe.renderers=gx,Pe.statePropsSchema=Ng,Pe.styleOptionSchema=ve,Pe.themeSchema=jg,Pe.useClient=Nle,Pe.useWebchatClient=E$,Pe.useWebchatStore=Kl,Pe.userPropsSchema=Mg,Pe.webchatClasses=st,Object.defineProperty(Pe,Symbol.toStringTag,{value:"Module"})});
182
+ */(function(e,t){(function(n){var r=n.setTimeout,i=n.clearTimeout,a=n.XMLHttpRequest,o=n.XDomainRequest,s=n.ActiveXObject,u=n.EventSource,l=n.document,c=n.Promise,f=n.fetch,d=n.Response,p=n.TextDecoder,m=n.TextEncoder,h=n.AbortController;if(typeof window<"u"&&typeof l<"u"&&!("readyState"in l)&&l.body==null&&(l.readyState="loading",window.addEventListener("load",function(F){l.readyState="complete"},!1)),a==null&&s!=null&&(a=function(){return new s("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(F){function ie(){}return ie.prototype=F,new ie}),Date.now||(Date.now=function(){return new Date().getTime()}),h==null){var y=f;f=function(F,ie){var ce=ie.signal;return y(F,{headers:ie.headers,credentials:ie.credentials,cache:ie.cache}).then(function(se){var Ce=se.body.getReader();return ce._reader=Ce,ce._aborted&&ce._reader.cancel(),{status:se.status,statusText:se.statusText,headers:se.headers,body:{getReader:function(){return Ce}}}})},h=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function v(){this.bitsNeeded=0,this.codePoint=0}v.prototype.decode=function(F){function ie(fe,q,M){if(M===1)return fe>=128>>q&&fe<<q<=2047;if(M===2)return fe>=2048>>q&&fe<<q<=55295||fe>=57344>>q&&fe<<q<=65535;if(M===3)return fe>=65536>>q&&fe<<q<=1114111;throw new Error}function ce(fe,q){if(fe===6*1)return q>>6>15?3:q>31?2:1;if(fe===6*2)return q>15?3:2;if(fe===6*3)return 3;throw new Error}for(var se=65533,Ce="",Ee=this.bitsNeeded,Ae=this.codePoint,He=0;He<F.length;He+=1){var te=F[He];Ee!==0&&(te<128||te>191||!ie(Ae<<6|te&63,Ee-6,ce(Ee,Ae)))&&(Ee=0,Ae=se,Ce+=String.fromCharCode(Ae)),Ee===0?(te>=0&&te<=127?(Ee=0,Ae=te):te>=192&&te<=223?(Ee=6*1,Ae=te&31):te>=224&&te<=239?(Ee=6*2,Ae=te&15):te>=240&&te<=247?(Ee=6*3,Ae=te&7):(Ee=0,Ae=se),Ee!==0&&!ie(Ae,Ee,ce(Ee,Ae))&&(Ee=0,Ae=se)):(Ee-=6,Ae=Ae<<6|te&63),Ee===0&&(Ae<=65535?Ce+=String.fromCharCode(Ae):(Ce+=String.fromCharCode(55296+(Ae-65535-1>>10)),Ce+=String.fromCharCode(56320+(Ae-65535-1&1023))))}return this.bitsNeeded=Ee,this.codePoint=Ae,Ce};var b=function(){try{return new p().decode(new m().encode("test"),{stream:!0})==="test"}catch(F){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+F)}return!1};(p==null||m==null||!b())&&(p=v);var w=function(){};function T(F){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=w,this.onload=w,this.onerror=w,this.onreadystatechange=w,this._contentType="",this._xhr=F,this._sendTimeout=0,this._abort=w}T.prototype.open=function(F,ie){this._abort(!0);var ce=this,se=this._xhr,Ce=1,Ee=0;this._abort=function(M){ce._sendTimeout!==0&&(i(ce._sendTimeout),ce._sendTimeout=0),(Ce===1||Ce===2||Ce===3)&&(Ce=4,se.onload=w,se.onerror=w,se.onabort=w,se.onprogress=w,se.onreadystatechange=w,se.abort(),Ee!==0&&(i(Ee),Ee=0),M||(ce.readyState=4,ce.onabort(null),ce.onreadystatechange())),Ce=0};var Ae=function(){if(Ce===1){var M=0,ne="",he=void 0;if("contentType"in se)M=200,ne="OK",he=se.contentType;else try{M=se.status,ne=se.statusText,he=se.getResponseHeader("Content-Type")}catch{M=0,ne="",he=void 0}M!==0&&(Ce=2,ce.readyState=2,ce.status=M,ce.statusText=ne,ce._contentType=he,ce.onreadystatechange())}},He=function(){if(Ae(),Ce===2||Ce===3){Ce=3;var M="";try{M=se.responseText}catch{}ce.readyState=3,ce.responseText=M,ce.onprogress()}},te=function(M,ne){if((ne==null||ne.preventDefault==null)&&(ne={preventDefault:w}),He(),Ce===1||Ce===2||Ce===3){if(Ce=4,Ee!==0&&(i(Ee),Ee=0),ce.readyState=4,M==="load")ce.onload(ne);else if(M==="error")ce.onerror(ne);else if(M==="abort")ce.onabort(ne);else throw new TypeError;ce.onreadystatechange()}},fe=function(M){se!=null&&(se.readyState===4?(!("onload"in se)||!("onerror"in se)||!("onabort"in se))&&te(se.responseText===""?"error":"load",M):se.readyState===3?"onprogress"in se||He():se.readyState===2&&Ae())},q=function(){Ee=r(function(){q()},500),se.readyState===3&&He()};"onload"in se&&(se.onload=function(M){te("load",M)}),"onerror"in se&&(se.onerror=function(M){te("error",M)}),"onabort"in se&&(se.onabort=function(M){te("abort",M)}),"onprogress"in se&&(se.onprogress=He),"onreadystatechange"in se&&(se.onreadystatechange=function(M){fe(M)}),("contentType"in se||!("ontimeout"in a.prototype))&&(ie+=(ie.indexOf("?")===-1?"?":"&")+"padding=true"),se.open(F,ie,!0),"readyState"in se&&(Ee=r(function(){q()},0))},T.prototype.abort=function(){this._abort(!1)},T.prototype.getResponseHeader=function(F){return this._contentType},T.prototype.setRequestHeader=function(F,ie){var ce=this._xhr;"setRequestHeader"in ce&&ce.setRequestHeader(F,ie)},T.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},T.prototype.send=function(){if((!("ontimeout"in a.prototype)||!("sendAsBinary"in a.prototype)&&!("mozAnon"in a.prototype))&&l!=null&&l.readyState!=null&&l.readyState!=="complete"){var F=this;F._sendTimeout=r(function(){F._sendTimeout=0,F.send()},4);return}var ie=this._xhr;"withCredentials"in ie&&(ie.withCredentials=this.withCredentials);try{ie.send(void 0)}catch(ce){throw ce}};function E(F){return F.replace(/[A-Z]/g,function(ie){return String.fromCharCode(ie.charCodeAt(0)+32)})}function _(F){for(var ie=Object.create(null),ce=F.split(`\r
183
+ `),se=0;se<ce.length;se+=1){var Ce=ce[se],Ee=Ce.split(": "),Ae=Ee.shift(),He=Ee.join(": ");ie[E(Ae)]=He}this._map=ie}_.prototype.get=function(F){return this._map[E(F)]},a!=null&&a.HEADERS_RECEIVED==null&&(a.HEADERS_RECEIVED=2);function O(){}O.prototype.open=function(F,ie,ce,se,Ce,Ee,Ae){F.open("GET",Ce);var He=0;F.onprogress=function(){var fe=F.responseText,q=fe.slice(He);He+=q.length,ce(q)},F.onerror=function(fe){fe.preventDefault(),se(new Error("NetworkError"))},F.onload=function(){se(null)},F.onabort=function(){se(null)},F.onreadystatechange=function(){if(F.readyState===a.HEADERS_RECEIVED){var fe=F.status,q=F.statusText,M=F.getResponseHeader("Content-Type"),ne=F.getAllResponseHeaders();ie(fe,q,M,new _(ne))}},F.withCredentials=Ee;for(var te in Ae)Object.prototype.hasOwnProperty.call(Ae,te)&&F.setRequestHeader(te,Ae[te]);return F.send(),F};function z(F){this._headers=F}z.prototype.get=function(F){return this._headers.get(F)};function U(){}U.prototype.open=function(F,ie,ce,se,Ce,Ee,Ae){var He=null,te=new h,fe=te.signal,q=new p;return f(Ce,{headers:Ae,credentials:Ee?"include":"same-origin",signal:fe,cache:"no-store"}).then(function(M){return He=M.body.getReader(),ie(M.status,M.statusText,M.headers.get("Content-Type"),new z(M.headers)),new c(function(ne,he){var Se=function(){He.read().then(function($e){if($e.done)ne(void 0);else{var Ze=q.decode($e.value,{stream:!0});ce(Ze),Se()}}).catch(function($e){he($e)})};Se()})}).catch(function(M){if(M.name!=="AbortError")return M}).then(function(M){se(M)}),{abort:function(){He!=null&&He.cancel(),te.abort()}}};function k(){this._listeners=Object.create(null)}function D(F){r(function(){throw F},0)}k.prototype.dispatchEvent=function(F){F.target=this;var ie=this._listeners[F.type];if(ie!=null)for(var ce=ie.length,se=0;se<ce;se+=1){var Ce=ie[se];try{typeof Ce.handleEvent=="function"?Ce.handleEvent(F):Ce.call(this,F)}catch(Ee){D(Ee)}}},k.prototype.addEventListener=function(F,ie){F=String(F);var ce=this._listeners,se=ce[F];se==null&&(se=[],ce[F]=se);for(var Ce=!1,Ee=0;Ee<se.length;Ee+=1)se[Ee]===ie&&(Ce=!0);Ce||se.push(ie)},k.prototype.removeEventListener=function(F,ie){F=String(F);var ce=this._listeners,se=ce[F];if(se!=null){for(var Ce=[],Ee=0;Ee<se.length;Ee+=1)se[Ee]!==ie&&Ce.push(se[Ee]);Ce.length===0?delete ce[F]:ce[F]=Ce}};function W(F){this.type=F,this.target=void 0}function B(F,ie){W.call(this,F),this.data=ie.data,this.lastEventId=ie.lastEventId}B.prototype=Object.create(W.prototype);function I(F,ie){W.call(this,F),this.status=ie.status,this.statusText=ie.statusText,this.headers=ie.headers}I.prototype=Object.create(W.prototype);function A(F,ie){W.call(this,F),this.error=ie.error}A.prototype=Object.create(W.prototype);var L=-1,Z=0,H=1,R=2,g=-1,N=0,V=1,S=2,K=3,J=/^text\/event\-stream(;.*)?$/i,Y=1e3,Q=18e6,ae=function(F,ie){var ce=F==null?ie:parseInt(F,10);return ce!==ce&&(ce=ie),oe(ce)},oe=function(F){return Math.min(Math.max(F,Y),Q)},X=function(F,ie,ce){try{typeof ie=="function"&&ie.call(F,ce)}catch(se){D(se)}};function ee(F,ie){k.call(this),ie=ie||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,ge(this,F,ie)}function G(){return a!=null&&"withCredentials"in a.prototype||o==null?new a:new o}var pe=f!=null&&d!=null&&"body"in d.prototype;function ge(F,ie,ce){ie=String(ie);var se=!!ce.withCredentials,Ce=ce.lastEventIdQueryParameterName||"lastEventId",Ee=oe(1e3),Ae=ae(ce.heartbeatTimeout,45e3),He="",te=Ee,fe=!1,q=0,M=ce.headers||{},ne=ce.Transport,he=pe&&ne==null?void 0:new T(ne!=null?new ne:G()),Se=ne!=null&&typeof ne!="string"?new ne:he==null?new U:new O,$e=void 0,Ze=0,et=L,Tt="",Et="",qe="",_t="",Ke=N,hn=0,Nn=0,fr=function(mt,Ct,Gt,Yt){if(et===Z)if(mt===200&&Gt!=null&&J.test(Gt)){et=H,fe=Date.now(),te=Ee,F.readyState=H;var on=new I("open",{status:mt,statusText:Ct,headers:Yt});F.dispatchEvent(on),X(F,F.onopen,on)}else{var Jt="";mt!==200?(Ct&&(Ct=Ct.replace(/\s+/g," ")),Jt="EventSource's response has a status "+mt+" "+Ct+" that is not 200. Aborting the connection."):Jt="EventSource's response has a Content-Type specifying an unsupported type: "+(Gt==null?"-":Gt.replace(/\s+/g," "))+". Aborting the connection.",dr();var on=new I("error",{status:mt,statusText:Ct,headers:Yt});F.dispatchEvent(on),X(F,F.onerror,on),console.error(Jt)}},ti=function(mt){if(et===H){for(var Ct=-1,Gt=0;Gt<mt.length;Gt+=1){var Yt=mt.charCodeAt(Gt);(Yt===10||Yt===13)&&(Ct=Gt)}var on=(Ct!==-1?_t:"")+mt.slice(0,Ct+1);_t=(Ct===-1?_t:"")+mt.slice(Ct+1),mt!==""&&(fe=Date.now(),q+=mt.length);for(var Jt=0;Jt<on.length;Jt+=1){var Yt=on.charCodeAt(Jt);if(Ke===g&&Yt===10)Ke=N;else if(Ke===g&&(Ke=N),Yt===13||Yt===10){if(Ke!==N){Ke===V&&(Nn=Jt+1);var Vn=on.slice(hn,Nn-1),Hn=on.slice(Nn+(Nn<Jt&&on.charCodeAt(Nn)===32?1:0),Jt);Vn==="data"?(Tt+=`
184
+ `,Tt+=Hn):Vn==="id"?Et=Hn:Vn==="event"?qe=Hn:Vn==="retry"?(Ee=ae(Hn,Ee),te=Ee):Vn==="heartbeatTimeout"&&(Ae=ae(Hn,Ae),Ze!==0&&(i(Ze),Ze=r(function(){ni()},Ae)))}if(Ke===N){if(Tt!==""){He=Et,qe===""&&(qe="message");var Di=new B(qe,{data:Tt.slice(1),lastEventId:Et});if(F.dispatchEvent(Di),qe==="open"?X(F,F.onopen,Di):qe==="message"?X(F,F.onmessage,Di):qe==="error"&&X(F,F.onerror,Di),et===R)return}Tt="",qe=""}Ke=Yt===13?g:N}else Ke===N&&(hn=Jt,Ke=V),Ke===V?Yt===58&&(Nn=Jt+1,Ke=S):Ke===S&&(Ke=K)}}},Lr=function(mt){if(et===H||et===Z){et=L,Ze!==0&&(i(Ze),Ze=0),Ze=r(function(){ni()},te),te=oe(Math.min(Ee*16,te*2)),F.readyState=Z;var Ct=new A("error",{error:mt});F.dispatchEvent(Ct),X(F,F.onerror,Ct),mt!=null&&console.error(mt)}},dr=function(){et=R,$e!=null&&($e.abort(),$e=void 0),Ze!==0&&(i(Ze),Ze=0),F.readyState=R},ni=function(){if(Ze=0,et!==L){if(!fe&&$e!=null)Lr(new Error("No activity within "+Ae+" milliseconds. "+(et===Z?"No response received.":q+" chars received.")+" Reconnecting.")),$e!=null&&($e.abort(),$e=void 0);else{var mt=Math.max((fe||Date.now())+Ae-Date.now(),1);fe=!1,Ze=r(function(){ni()},mt)}return}fe=!1,q=0,Ze=r(function(){ni()},Ae),et=Z,Tt="",qe="",Et=He,_t="",hn=0,Nn=0,Ke=N;var Ct=ie;if(ie.slice(0,5)!=="data:"&&ie.slice(0,5)!=="blob:"&&He!==""){var Gt=ie.indexOf("?");Ct=Gt===-1?ie:ie.slice(0,Gt+1)+ie.slice(Gt+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Hn,Di){return Di===Ce?"":Hn}),Ct+=(ie.indexOf("?")===-1?"?":"&")+Ce+"="+encodeURIComponent(He)}var Yt=F.withCredentials,on={};on.Accept="text/event-stream";var Jt=F.headers;if(Jt!=null)for(var Vn in Jt)Object.prototype.hasOwnProperty.call(Jt,Vn)&&(on[Vn]=Jt[Vn]);try{$e=Se.open(he,fr,ti,Lr,Ct,Yt,on)}catch(Hn){throw dr(),Hn}};F.url=ie,F.readyState=Z,F.withCredentials=se,F.headers=M,F._close=dr,ni()}ee.prototype=Object.create(k.prototype),ee.prototype.CONNECTING=Z,ee.prototype.OPEN=H,ee.prototype.CLOSED=R,ee.prototype.close=function(){this._close()},ee.CONNECTING=Z,ee.OPEN=H,ee.CLOSED=R,ee.prototype.withCredentials=void 0;var Ie=u;a!=null&&(u==null||!("withCredentials"in u.prototype))&&(Ie=ee),function(F){{var ie=F(t);ie!==void 0&&(e.exports=ie)}}(function(F){F.EventSourcePolyfill=ee,F.NativeEventSource=u,F.EventSource=Ie})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:vt:globalThis)})(zy,zy.exports);var cse=zy.exports;const fse=Ge(cse);var rt;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(rt||(rt={}));var qy;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(qy||(qy={}));const xe=rt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Jr=e=>{switch(typeof e){case"undefined":return xe.undefined;case"string":return xe.string;case"number":return isNaN(e)?xe.nan:xe.number;case"boolean":return xe.boolean;case"function":return xe.function;case"bigint":return xe.bigint;case"symbol":return xe.symbol;case"object":return Array.isArray(e)?xe.array:e===null?xe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?xe.promise:typeof Map<"u"&&e instanceof Map?xe.map:typeof Set<"u"&&e instanceof Set?xe.set:typeof Date<"u"&&e instanceof Date?xe.date:xe.object;default:return xe.unknown}},ue=rt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),dse=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class jn extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(a){return a.message},r={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let s=r,u=0;for(;u<o.path.length;){const l=o.path[u];u===o.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(o))):s[l]=s[l]||{_errors:[]},s=s[l],u++}}};return i(this),r}static assert(t){if(!(t instanceof jn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,rt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}jn.create=e=>new jn(e);const mo=(e,t)=>{let n;switch(e.code){case ue.invalid_type:e.received===xe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ue.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,rt.jsonStringifyReplacer)}`;break;case ue.unrecognized_keys:n=`Unrecognized key(s) in object: ${rt.joinValues(e.keys,", ")}`;break;case ue.invalid_union:n="Invalid input";break;case ue.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${rt.joinValues(e.options)}`;break;case ue.invalid_enum_value:n=`Invalid enum value. Expected ${rt.joinValues(e.options)}, received '${e.received}'`;break;case ue.invalid_arguments:n="Invalid function arguments";break;case ue.invalid_return_type:n="Invalid function return type";break;case ue.invalid_date:n="Invalid date";break;case ue.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:rt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ue.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case ue.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case ue.custom:n="Invalid input";break;case ue.invalid_intersection_types:n="Intersection results could not be merged";break;case ue.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ue.not_finite:n="Number must be finite";break;default:n=t.defaultError,rt.assertNever(e)}return{message:n}};let D$=mo;function pse(e){D$=e}function Tf(){return D$}const Cf=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s="";const u=r.filter(l=>!!l).slice().reverse();for(const l of u)s=l(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}},hse=[];function ye(e,t){const n=Tf(),r=Cf({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===mo?void 0:mo].filter(i=>!!i)});e.common.issues.push(r)}class pn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Me;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const a=await i.key,o=await i.value;r.push({key:a,value:o})}return pn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return Me;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[a.value]=o.value)}return{status:t.value,value:r}}}const Me=Object.freeze({status:"aborted"}),vo=e=>({status:"dirty",value:e}),gn=e=>({status:"valid",value:e}),Wy=e=>e.status==="aborted",Vy=e=>e.status==="dirty",ia=e=>e.status==="valid",ul=e=>typeof Promise<"u"&&e instanceof Promise;function Of(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function j$(e,t,n,r,i){if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var Oe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Oe||(Oe={}));var cl,fl;class Dr{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const N$=(e,t)=>{if(ia(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new jn(e.common.issues);return this._error=n,this._error}}};function ze(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,s)=>{var u,l;const{message:c}=e;return o.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:(u=c??r)!==null&&u!==void 0?u:s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:(l=c??n)!==null&&l!==void 0?l:s.defaultError}},description:i}}class Ve{get description(){return this._def.description}_getType(t){return Jr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Jr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new pn,ctx:{common:t.parent.common,data:t.data,parsedType:Jr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(ul(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Jr(t)},a=this._parseSync({data:t,path:i.path,parent:i});return N$(i,a)}"~validate"(t){var n,r;const i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Jr(t)};if(!this["~standard"].async)try{const a=this._parseSync({data:t,path:[],parent:i});return ia(a)?{value:a.value}:{issues:i.common.issues}}catch(a){!((r=(n=a==null?void 0:a.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:i}).then(a=>ia(a)?{value:a.value}:{issues:i.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Jr(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(ul(i)?i:Promise.resolve(i));return N$(r,a)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const o=t(i),s=()=>a.addIssue({code:ue.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(u=>u?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new ur({schema:this,typeName:Ne.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Nr.create(this,this._def)}nullable(){return Ai.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return lr.create(this)}promise(){return wo.create(this,this._def)}or(t){return ml.create([this,t],this._def)}and(t){return vl.create(this,t,this._def)}transform(t){return new ur({...ze(this._def),schema:this,typeName:Ne.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new xl({...ze(this._def),innerType:this,defaultValue:n,typeName:Ne.ZodDefault})}brand(){return new Ky({typeName:Ne.ZodBranded,type:this,...ze(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Sl({...ze(this._def),innerType:this,catchValue:n,typeName:Ne.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return El.create(this,t)}readonly(){return _l.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const mse=/^c[^\s-]{8,}$/i,vse=/^[0-9a-z]+$/,yse=/^[0-9A-HJKMNP-TV-Z]{26}$/i,gse=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,bse=/^[a-z0-9_-]{21}$/i,wse=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,xse=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Sse=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ese="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Hy;const _se=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,kse=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Tse=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Cse=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ose=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,$se=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,M$="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Ise=new RegExp(`^${M$}$`);function F$(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function Rse(e){return new RegExp(`^${F$(e)}$`)}function L$(e){let t=`${M$}T${F$(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Ase(e,t){return!!((t==="v4"||!t)&&_se.test(e)||(t==="v6"||!t)&&Tse.test(e))}function Pse(e,t){if(!wse.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||!i.typ||!i.alg||t&&i.alg!==t)}catch{return!1}}function Dse(e,t){return!!((t==="v4"||!t)&&kse.test(e)||(t==="v6"||!t)&&Cse.test(e))}class sr extends Ve{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==xe.string){const a=this._getOrReturnCtx(t);return ye(a,{code:ue.invalid_type,expected:xe.string,received:a.parsedType}),Me}const r=new pn;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),ye(i,{code:ue.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),ye(i,{code:ue.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,s=t.data.length<a.value;(o||s)&&(i=this._getOrReturnCtx(t,i),o?ye(i,{code:ue.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&ye(i,{code:ue.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")Sse.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"email",code:ue.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")Hy||(Hy=new RegExp(Ese,"u")),Hy.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"emoji",code:ue.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")gse.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"uuid",code:ue.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")bse.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"nanoid",code:ue.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")mse.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"cuid",code:ue.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")vse.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"cuid2",code:ue.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")yse.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"ulid",code:ue.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),ye(i,{validation:"url",code:ue.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"regex",code:ue.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),ye(i,{code:ue.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),ye(i,{code:ue.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),ye(i,{code:ue.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?L$(a).test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{code:ue.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?Ise.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{code:ue.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?Rse(a).test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{code:ue.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?xse.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"duration",code:ue.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?Ase(t.data,a.version)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"ip",code:ue.invalid_string,message:a.message}),r.dirty()):a.kind==="jwt"?Pse(t.data,a.alg)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"jwt",code:ue.invalid_string,message:a.message}),r.dirty()):a.kind==="cidr"?Dse(t.data,a.version)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"cidr",code:ue.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?Ose.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"base64",code:ue.invalid_string,message:a.message}),r.dirty()):a.kind==="base64url"?$se.test(t.data)||(i=this._getOrReturnCtx(t,i),ye(i,{validation:"base64url",code:ue.invalid_string,message:a.message}),r.dirty()):rt.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:ue.invalid_string,...Oe.errToObj(r)})}_addCheck(t){return new sr({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Oe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Oe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Oe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Oe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Oe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Oe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Oe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Oe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Oe.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Oe.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Oe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Oe.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Oe.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...Oe.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Oe.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Oe.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Oe.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Oe.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Oe.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Oe.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Oe.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Oe.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Oe.errToObj(n)})}nonempty(t){return this.min(1,Oe.errToObj(t))}trim(){return new sr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new sr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new sr({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}sr.create=e=>{var t;return new sr({checks:[],typeName:Ne.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ze(e)})};function jse(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=parseInt(e.toFixed(i).replace(".","")),o=parseInt(t.toFixed(i).replace(".",""));return a%o/Math.pow(10,i)}class $i extends Ve{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==xe.number){const a=this._getOrReturnCtx(t);return ye(a,{code:ue.invalid_type,expected:xe.number,received:a.parsedType}),Me}let r;const i=new pn;for(const a of this._def.checks)a.kind==="int"?rt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ye(r,{code:ue.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ue.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ue.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?jse(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ue.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ye(r,{code:ue.not_finite,message:a.message}),i.dirty()):rt.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Oe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Oe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Oe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Oe.toString(n))}setLimit(t,n,r,i){return new $i({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Oe.toString(i)}]})}_addCheck(t){return new $i({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Oe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Oe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Oe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Oe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Oe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Oe.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Oe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Oe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Oe.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&rt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}$i.create=e=>new $i({checks:[],typeName:Ne.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ze(e)});class Ii extends Ve{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==xe.bigint)return this._getInvalidInput(t);let r;const i=new pn;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ue.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ue.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ue.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):rt.assertNever(a);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ye(n,{code:ue.invalid_type,expected:xe.bigint,received:n.parsedType}),Me}gte(t,n){return this.setLimit("min",t,!0,Oe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Oe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Oe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Oe.toString(n))}setLimit(t,n,r,i){return new Ii({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Oe.toString(i)}]})}_addCheck(t){return new Ii({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Oe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Oe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Oe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Oe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Oe.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ii.create=e=>{var t;return new Ii({checks:[],typeName:Ne.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ze(e)})};class dl extends Ve{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==xe.boolean){const r=this._getOrReturnCtx(t);return ye(r,{code:ue.invalid_type,expected:xe.boolean,received:r.parsedType}),Me}return gn(t.data)}}dl.create=e=>new dl({typeName:Ne.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ze(e)});class aa extends Ve{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==xe.date){const a=this._getOrReturnCtx(t);return ye(a,{code:ue.invalid_type,expected:xe.date,received:a.parsedType}),Me}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return ye(a,{code:ue.invalid_date}),Me}const r=new pn;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),ye(i,{code:ue.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),ye(i,{code:ue.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):rt.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new aa({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Oe.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Oe.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}aa.create=e=>new aa({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ne.ZodDate,...ze(e)});class $f extends Ve{_parse(t){if(this._getType(t)!==xe.symbol){const r=this._getOrReturnCtx(t);return ye(r,{code:ue.invalid_type,expected:xe.symbol,received:r.parsedType}),Me}return gn(t.data)}}$f.create=e=>new $f({typeName:Ne.ZodSymbol,...ze(e)});class pl extends Ve{_parse(t){if(this._getType(t)!==xe.undefined){const r=this._getOrReturnCtx(t);return ye(r,{code:ue.invalid_type,expected:xe.undefined,received:r.parsedType}),Me}return gn(t.data)}}pl.create=e=>new pl({typeName:Ne.ZodUndefined,...ze(e)});class hl extends Ve{_parse(t){if(this._getType(t)!==xe.null){const r=this._getOrReturnCtx(t);return ye(r,{code:ue.invalid_type,expected:xe.null,received:r.parsedType}),Me}return gn(t.data)}}hl.create=e=>new hl({typeName:Ne.ZodNull,...ze(e)});class yo extends Ve{constructor(){super(...arguments),this._any=!0}_parse(t){return gn(t.data)}}yo.create=e=>new yo({typeName:Ne.ZodAny,...ze(e)});class oa extends Ve{constructor(){super(...arguments),this._unknown=!0}_parse(t){return gn(t.data)}}oa.create=e=>new oa({typeName:Ne.ZodUnknown,...ze(e)});class Xr extends Ve{_parse(t){const n=this._getOrReturnCtx(t);return ye(n,{code:ue.invalid_type,expected:xe.never,received:n.parsedType}),Me}}Xr.create=e=>new Xr({typeName:Ne.ZodNever,...ze(e)});class If extends Ve{_parse(t){if(this._getType(t)!==xe.undefined){const r=this._getOrReturnCtx(t);return ye(r,{code:ue.invalid_type,expected:xe.void,received:r.parsedType}),Me}return gn(t.data)}}If.create=e=>new If({typeName:Ne.ZodVoid,...ze(e)});class lr extends Ve{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==xe.array)return ye(n,{code:ue.invalid_type,expected:xe.array,received:n.parsedType}),Me;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(o||s)&&(ye(n,{code:o?ue.too_big:ue.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(ye(n,{code:ue.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(ye(n,{code:ue.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,s)=>i.type._parseAsync(new Dr(n,o,n.path,s)))).then(o=>pn.mergeArray(r,o));const a=[...n.data].map((o,s)=>i.type._parseSync(new Dr(n,o,n.path,s)));return pn.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new lr({...this._def,minLength:{value:t,message:Oe.toString(n)}})}max(t,n){return new lr({...this._def,maxLength:{value:t,message:Oe.toString(n)}})}length(t,n){return new lr({...this._def,exactLength:{value:t,message:Oe.toString(n)}})}nonempty(t){return this.min(1,t)}}lr.create=(e,t)=>new lr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ne.ZodArray,...ze(t)});function go(e){if(e instanceof Rt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Nr.create(go(r))}return new Rt({...e._def,shape:()=>t})}else return e instanceof lr?new lr({...e._def,type:go(e.element)}):e instanceof Nr?Nr.create(go(e.unwrap())):e instanceof Ai?Ai.create(go(e.unwrap())):e instanceof jr?jr.create(e.items.map(t=>go(t))):e}class Rt extends Ve{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=rt.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==xe.object){const l=this._getOrReturnCtx(t);return ye(l,{code:ue.invalid_type,expected:xe.object,received:l.parsedType}),Me}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Xr&&this._def.unknownKeys==="strip"))for(const l in i.data)o.includes(l)||s.push(l);const u=[];for(const l of o){const c=a[l],f=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new Dr(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Xr){const l=this._def.unknownKeys;if(l==="passthrough")for(const c of s)u.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(l==="strict")s.length>0&&(ye(i,{code:ue.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const c of s){const f=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new Dr(i,f,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const c of u){const f=await c.key,d=await c.value;l.push({key:f,value:d,alwaysSet:c.alwaysSet})}return l}).then(l=>pn.mergeObjectSync(r,l)):pn.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(t){return Oe.errToObj,new Rt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,a,o,s;const u=(o=(a=(i=this._def).errorMap)===null||a===void 0?void 0:a.call(i,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=Oe.errToObj(t).message)!==null&&s!==void 0?s:u}:{message:u}}}:{}})}strip(){return new Rt({...this._def,unknownKeys:"strip"})}passthrough(){return new Rt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Rt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Rt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ne.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Rt({...this._def,catchall:t})}pick(t){const n={};return rt.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Rt({...this._def,shape:()=>n})}omit(t){const n={};return rt.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Rt({...this._def,shape:()=>n})}deepPartial(){return go(this)}partial(t){const n={};return rt.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new Rt({...this._def,shape:()=>n})}required(t){const n={};return rt.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof Nr;)a=a._def.innerType;n[r]=a}}),new Rt({...this._def,shape:()=>n})}keyof(){return B$(rt.objectKeys(this.shape))}}Rt.create=(e,t)=>new Rt({shape:()=>e,unknownKeys:"strip",catchall:Xr.create(),typeName:Ne.ZodObject,...ze(t)}),Rt.strictCreate=(e,t)=>new Rt({shape:()=>e,unknownKeys:"strict",catchall:Xr.create(),typeName:Ne.ZodObject,...ze(t)}),Rt.lazycreate=(e,t)=>new Rt({shape:e,unknownKeys:"strip",catchall:Xr.create(),typeName:Ne.ZodObject,...ze(t)});class ml extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new jn(s.ctx.common.issues));return ye(n,{code:ue.invalid_union,unionErrors:o}),Me}if(n.common.async)return Promise.all(r.map(async a=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const u of r){const l={...n,common:{...n.common,issues:[]},parent:null},c=u._parseSync({data:n.data,path:n.path,parent:l});if(c.status==="valid")return c;c.status==="dirty"&&!a&&(a={result:c,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(u=>new jn(u));return ye(n,{code:ue.invalid_union,unionErrors:s}),Me}}get options(){return this._def.options}}ml.create=(e,t)=>new ml({options:e,typeName:Ne.ZodUnion,...ze(t)});const Qr=e=>e instanceof gl?Qr(e.schema):e instanceof ur?Qr(e.innerType()):e instanceof bl?[e.value]:e instanceof Ri?e.options:e instanceof wl?rt.objectValues(e.enum):e instanceof xl?Qr(e._def.innerType):e instanceof pl?[void 0]:e instanceof hl?[null]:e instanceof Nr?[void 0,...Qr(e.unwrap())]:e instanceof Ai?[null,...Qr(e.unwrap())]:e instanceof Ky||e instanceof _l?Qr(e.unwrap()):e instanceof Sl?Qr(e._def.innerType):[];class Rf extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==xe.object)return ye(n,{code:ue.invalid_type,expected:xe.object,received:n.parsedType}),Me;const r=this.discriminator,i=n.data[r],a=this.optionsMap.get(i);return a?n.common.async?a._parseAsync({data:n.data,path:n.path,parent:n}):a._parseSync({data:n.data,path:n.path,parent:n}):(ye(n,{code:ue.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Me)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const a of n){const o=Qr(a.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of o){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,a)}}return new Rf({typeName:Ne.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...ze(r)})}}function Zy(e,t){const n=Jr(e),r=Jr(t);if(e===t)return{valid:!0,data:e};if(n===xe.object&&r===xe.object){const i=rt.objectKeys(t),a=rt.objectKeys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...t};for(const s of a){const u=Zy(e[s],t[s]);if(!u.valid)return{valid:!1};o[s]=u.data}return{valid:!0,data:o}}else if(n===xe.array&&r===xe.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const o=e[a],s=t[a],u=Zy(o,s);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return n===xe.date&&r===xe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class vl extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,o)=>{if(Wy(a)||Wy(o))return Me;const s=Zy(a.value,o.value);return s.valid?((Vy(a)||Vy(o))&&n.dirty(),{status:n.value,value:s.data}):(ye(r,{code:ue.invalid_intersection_types}),Me)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}vl.create=(e,t,n)=>new vl({left:e,right:t,typeName:Ne.ZodIntersection,...ze(n)});class jr extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==xe.array)return ye(r,{code:ue.invalid_type,expected:xe.array,received:r.parsedType}),Me;if(r.data.length<this._def.items.length)return ye(r,{code:ue.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Me;!this._def.rest&&r.data.length>this._def.items.length&&(ye(r,{code:ue.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((o,s)=>{const u=this._def.items[s]||this._def.rest;return u?u._parse(new Dr(r,o,r.path,s)):null}).filter(o=>!!o);return r.common.async?Promise.all(a).then(o=>pn.mergeArray(n,o)):pn.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new jr({...this._def,rest:t})}}jr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new jr({items:e,typeName:Ne.ZodTuple,rest:null,...ze(t)})};class yl extends Ve{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==xe.object)return ye(r,{code:ue.invalid_type,expected:xe.object,received:r.parsedType}),Me;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in r.data)i.push({key:a._parse(new Dr(r,s,r.path,s)),value:o._parse(new Dr(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?pn.mergeObjectAsync(n,i):pn.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Ve?new yl({keyType:t,valueType:n,typeName:Ne.ZodRecord,...ze(r)}):new yl({keyType:sr.create(),valueType:t,typeName:Ne.ZodRecord,...ze(n)})}}class Af extends Ve{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==xe.map)return ye(r,{code:ue.invalid_type,expected:xe.map,received:r.parsedType}),Me;const i=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([s,u],l)=>({key:i._parse(new Dr(r,s,r.path,[l,"key"])),value:a._parse(new Dr(r,u,r.path,[l,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const u of o){const l=await u.key,c=await u.value;if(l.status==="aborted"||c.status==="aborted")return Me;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const u of o){const l=u.key,c=u.value;if(l.status==="aborted"||c.status==="aborted")return Me;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}}}}Af.create=(e,t,n)=>new Af({valueType:t,keyType:e,typeName:Ne.ZodMap,...ze(n)});class sa extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==xe.set)return ye(r,{code:ue.invalid_type,expected:xe.set,received:r.parsedType}),Me;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(ye(r,{code:ue.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(ye(r,{code:ue.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function o(u){const l=new Set;for(const c of u){if(c.status==="aborted")return Me;c.status==="dirty"&&n.dirty(),l.add(c.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((u,l)=>a._parse(new Dr(r,u,r.path,l)));return r.common.async?Promise.all(s).then(u=>o(u)):o(s)}min(t,n){return new sa({...this._def,minSize:{value:t,message:Oe.toString(n)}})}max(t,n){return new sa({...this._def,maxSize:{value:t,message:Oe.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}sa.create=(e,t)=>new sa({valueType:e,minSize:null,maxSize:null,typeName:Ne.ZodSet,...ze(t)});class bo extends Ve{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==xe.function)return ye(n,{code:ue.invalid_type,expected:xe.function,received:n.parsedType}),Me;function r(s,u){return Cf({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Tf(),mo].filter(l=>!!l),issueData:{code:ue.invalid_arguments,argumentsError:u}})}function i(s,u){return Cf({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Tf(),mo].filter(l=>!!l),issueData:{code:ue.invalid_return_type,returnTypeError:u}})}const a={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof wo){const s=this;return gn(async function(...u){const l=new jn([]),c=await s._def.args.parseAsync(u,a).catch(p=>{throw l.addIssue(r(u,p)),l}),f=await Reflect.apply(o,this,c);return await s._def.returns._def.type.parseAsync(f,a).catch(p=>{throw l.addIssue(i(f,p)),l})})}else{const s=this;return gn(function(...u){const l=s._def.args.safeParse(u,a);if(!l.success)throw new jn([r(u,l.error)]);const c=Reflect.apply(o,this,l.data),f=s._def.returns.safeParse(c,a);if(!f.success)throw new jn([i(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new bo({...this._def,args:jr.create(t).rest(oa.create())})}returns(t){return new bo({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new bo({args:t||jr.create([]).rest(oa.create()),returns:n||oa.create(),typeName:Ne.ZodFunction,...ze(r)})}}class gl extends Ve{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}gl.create=(e,t)=>new gl({getter:e,typeName:Ne.ZodLazy,...ze(t)});class bl extends Ve{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ye(n,{received:n.data,code:ue.invalid_literal,expected:this._def.value}),Me}return{status:"valid",value:t.data}}get value(){return this._def.value}}bl.create=(e,t)=>new bl({value:e,typeName:Ne.ZodLiteral,...ze(t)});function B$(e,t){return new Ri({values:e,typeName:Ne.ZodEnum,...ze(t)})}class Ri extends Ve{constructor(){super(...arguments),cl.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ye(n,{expected:rt.joinValues(r),received:n.parsedType,code:ue.invalid_type}),Me}if(Of(this,cl)||j$(this,cl,new Set(this._def.values)),!Of(this,cl).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ye(n,{received:n.data,code:ue.invalid_enum_value,options:r}),Me}return gn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Ri.create(t,{...this._def,...n})}exclude(t,n=this._def){return Ri.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}cl=new WeakMap,Ri.create=B$;class wl extends Ve{constructor(){super(...arguments),fl.set(this,void 0)}_parse(t){const n=rt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==xe.string&&r.parsedType!==xe.number){const i=rt.objectValues(n);return ye(r,{expected:rt.joinValues(i),received:r.parsedType,code:ue.invalid_type}),Me}if(Of(this,fl)||j$(this,fl,new Set(rt.getValidEnumValues(this._def.values))),!Of(this,fl).has(t.data)){const i=rt.objectValues(n);return ye(r,{received:r.data,code:ue.invalid_enum_value,options:i}),Me}return gn(t.data)}get enum(){return this._def.values}}fl=new WeakMap,wl.create=(e,t)=>new wl({values:e,typeName:Ne.ZodNativeEnum,...ze(t)});class wo extends Ve{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==xe.promise&&n.common.async===!1)return ye(n,{code:ue.invalid_type,expected:xe.promise,received:n.parsedType}),Me;const r=n.parsedType===xe.promise?n.data:Promise.resolve(n.data);return gn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}wo.create=(e,t)=>new wo({type:e,typeName:Ne.ZodPromise,...ze(t)});class ur extends Ve{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ne.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{ye(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(r.data,a);if(r.common.async)return Promise.resolve(o).then(async s=>{if(n.value==="aborted")return Me;const u=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return u.status==="aborted"?Me:u.status==="dirty"||n.value==="dirty"?vo(u.value):u});{if(n.value==="aborted")return Me;const s=this._def.schema._parseSync({data:o,path:r.path,parent:r});return s.status==="aborted"?Me:s.status==="dirty"||n.value==="dirty"?vo(s.value):s}}if(i.type==="refinement"){const o=s=>{const u=i.refinement(s,a);if(r.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Me:(s.status==="dirty"&&n.dirty(),o(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Me:(s.status==="dirty"&&n.dirty(),o(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ia(o))return o;const s=i.transform(o.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>ia(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:n.value,value:s})):o);rt.assertNever(i)}}ur.create=(e,t,n)=>new ur({schema:e,typeName:Ne.ZodEffects,effect:t,...ze(n)}),ur.createWithPreprocess=(e,t,n)=>new ur({schema:t,effect:{type:"preprocess",transform:e},typeName:Ne.ZodEffects,...ze(n)});class Nr extends Ve{_parse(t){return this._getType(t)===xe.undefined?gn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Nr.create=(e,t)=>new Nr({innerType:e,typeName:Ne.ZodOptional,...ze(t)});class Ai extends Ve{_parse(t){return this._getType(t)===xe.null?gn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ai.create=(e,t)=>new Ai({innerType:e,typeName:Ne.ZodNullable,...ze(t)});class xl extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===xe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}xl.create=(e,t)=>new xl({innerType:e,typeName:Ne.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ze(t)});class Sl extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return ul(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new jn(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new jn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Sl.create=(e,t)=>new Sl({innerType:e,typeName:Ne.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ze(t)});class Pf extends Ve{_parse(t){if(this._getType(t)!==xe.nan){const r=this._getOrReturnCtx(t);return ye(r,{code:ue.invalid_type,expected:xe.nan,received:r.parsedType}),Me}return{status:"valid",value:t.data}}}Pf.create=e=>new Pf({typeName:Ne.ZodNaN,...ze(e)});const Nse=Symbol("zod_brand");class Ky extends Ve{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class El extends Ve{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Me:a.status==="dirty"?(n.dirty(),vo(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Me:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new El({in:t,out:n,typeName:Ne.ZodPipeline})}}class _l extends Ve{_parse(t){const n=this._def.innerType._parse(t),r=i=>(ia(i)&&(i.value=Object.freeze(i.value)),i);return ul(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}_l.create=(e,t)=>new _l({innerType:e,typeName:Ne.ZodReadonly,...ze(t)});function U$(e,t){const n=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof n=="string"?{message:n}:n}function z$(e,t={},n){return e?yo.create().superRefine((r,i)=>{var a,o;const s=e(r);if(s instanceof Promise)return s.then(u=>{var l,c;if(!u){const f=U$(t,r),d=(c=(l=f.fatal)!==null&&l!==void 0?l:n)!==null&&c!==void 0?c:!0;i.addIssue({code:"custom",...f,fatal:d})}});if(!s){const u=U$(t,r),l=(o=(a=u.fatal)!==null&&a!==void 0?a:n)!==null&&o!==void 0?o:!0;i.addIssue({code:"custom",...u,fatal:l})}}):yo.create()}const Mse={object:Rt.lazycreate};var Ne;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ne||(Ne={}));const Fse=(e,t={message:`Input not instance of ${e.name}`})=>z$(n=>n instanceof e,t),q$=sr.create,W$=$i.create,Lse=Pf.create,Bse=Ii.create,V$=dl.create,Use=aa.create,zse=$f.create,qse=pl.create,Wse=hl.create,Vse=yo.create,Hse=oa.create,Zse=Xr.create,Kse=If.create,Gse=lr.create,Yse=Rt.create,Jse=Rt.strictCreate,Xse=ml.create,Qse=Rf.create,ele=vl.create,tle=jr.create,nle=yl.create,rle=Af.create,ile=sa.create,ale=bo.create,ole=gl.create,sle=bl.create,lle=Ri.create,ule=wl.create,cle=wo.create,H$=ur.create,fle=Nr.create,dle=Ai.create,ple=ur.createWithPreprocess,hle=El.create;var C=Object.freeze({__proto__:null,defaultErrorMap:mo,setErrorMap:pse,getErrorMap:Tf,makeIssue:Cf,EMPTY_PATH:hse,addIssueToContext:ye,ParseStatus:pn,INVALID:Me,DIRTY:vo,OK:gn,isAborted:Wy,isDirty:Vy,isValid:ia,isAsync:ul,get util(){return rt},get objectUtil(){return qy},ZodParsedType:xe,getParsedType:Jr,ZodType:Ve,datetimeRegex:L$,ZodString:sr,ZodNumber:$i,ZodBigInt:Ii,ZodBoolean:dl,ZodDate:aa,ZodSymbol:$f,ZodUndefined:pl,ZodNull:hl,ZodAny:yo,ZodUnknown:oa,ZodNever:Xr,ZodVoid:If,ZodArray:lr,ZodObject:Rt,ZodUnion:ml,ZodDiscriminatedUnion:Rf,ZodIntersection:vl,ZodTuple:jr,ZodRecord:yl,ZodMap:Af,ZodSet:sa,ZodFunction:bo,ZodLazy:gl,ZodLiteral:bl,ZodEnum:Ri,ZodNativeEnum:wl,ZodPromise:wo,ZodEffects:ur,ZodTransformer:ur,ZodOptional:Nr,ZodNullable:Ai,ZodDefault:xl,ZodCatch:Sl,ZodNaN:Pf,BRAND:Nse,ZodBranded:Ky,ZodPipeline:El,ZodReadonly:_l,custom:z$,Schema:Ve,ZodSchema:Ve,late:Mse,get ZodFirstPartyTypeKind(){return Ne},coerce:{string:e=>sr.create({...e,coerce:!0}),number:e=>$i.create({...e,coerce:!0}),boolean:e=>dl.create({...e,coerce:!0}),bigint:e=>Ii.create({...e,coerce:!0}),date:e=>aa.create({...e,coerce:!0})},any:Vse,array:Gse,bigint:Bse,boolean:V$,date:Use,discriminatedUnion:Qse,effect:H$,enum:lle,function:ale,instanceof:Fse,intersection:ele,lazy:ole,literal:sle,map:rle,nan:Lse,nativeEnum:ule,never:Zse,null:Wse,nullable:dle,number:W$,object:Yse,oboolean:()=>V$().optional(),onumber:()=>W$().optional(),optional:fle,ostring:()=>q$().optional(),pipeline:hle,preprocess:ple,promise:cle,record:nle,set:ile,strictObject:Jse,string:q$,symbol:zse,transformer:H$,tuple:tle,undefined:qse,union:Xse,unknown:Hse,void:Kse,NEVER:Me,ZodIssueCode:ue,quotelessJson:dse,ZodError:jn}),mle=Object.defineProperty,vle=(e,t,n)=>t in e?mle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yle=(e,t,n)=>(vle(e,t+"",n),n),gle={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},Gy=typeof window<"u"&&typeof window.document<"u"?window.crypto:IO;Gy.getRandomValues||(Gy=gle);var St=class extends Error{constructor(t,n,r,i,a,o,s){super(i);_e(this,"isApiError",!0);this.code=t,this.description=n,this.type=r,this.message=i,this.error=a,this.id=o,this.metadata=s,this.id||(this.id=St.generateId())}format(){return`[${this.type}] ${this.message} (Error ID: ${this.id})`}toJSON(){return{id:this.id,code:this.code,type:this.type,message:this.message,metadata:this.metadata}}static generateId(){const t=this.getPrefix(),n=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],r=4,i=Array.from(Gy.getRandomValues(new Uint8Array(r))).map(a=>a.toString(16).padStart(2,"0")).join("").toUpperCase();return`${t}_${n}x${i}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}},ble=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,Yy=e=>e instanceof St||ble(e)&&e.isApiError===!0,kl=class extends St{constructor(e,t,n,r){super(500,"An unknown error occurred","Unknown",e,t,n,r)}},wle=class extends St{constructor(e,t,n,r){super(500,"An internal error occurred","Internal",e,t,n,r)}},xle=class extends St{constructor(e,t,n,r){super(401,"The request requires to be authenticated.","Unauthorized",e,t,n,r)}},Sle=class extends St{constructor(e,t,n,r){super(403,"The requested action can't be peform by this resource.","Forbidden",e,t,n,r)}},Ele=class extends St{constructor(e,t,n,r){super(413,"The request payload is too large.","PayloadTooLarge",e,t,n,r)}},_le=class extends St{constructor(e,t,n,r){super(400,"The request payload is invalid.","InvalidPayload",e,t,n,r)}},kle=class extends St{constructor(e,t,n,r){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",e,t,n,r)}},Tle=class extends St{constructor(e,t,n,r){super(405,"The requested method does not exist.","MethodNotFound",e,t,n,r)}},Cle=class extends St{constructor(e,t,n,r){super(404,"The requested resource does not exist.","ResourceNotFound",e,t,n,r)}},Ole=class extends St{constructor(e,t,n,r){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",e,t,n,r)}},$le=class extends St{constructor(e,t,n,r){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",e,t,n,r)}},Ile=class extends St{constructor(e,t,n,r){super(400,"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters.","InvalidIdentifier",e,t,n,r)}},Rle=class extends St{constructor(e,t,n,r){super(409,"The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together.","RelationConflict",e,t,n,r)}},Ale=class extends St{constructor(e,t,n,r){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",e,t,n,r)}},Ple=class extends St{constructor(e,t,n,r){super(409,"The resource is current locked and cannot be operated on until the lock is released.","ResourceLockedConflict",e,t,n,r)}},Dle=class extends St{constructor(e,t,n,r){super(400,"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request.","ReferenceNotFound",e,t,n,r)}},jle=class extends St{constructor(e,t,n,r){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",e,t,n,r)}},Nle=class extends St{constructor(e,t,n,r){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",e,t,n,r)}},Mle=class extends St{constructor(e,t,n,r){super(409,"The record attempted to be created already exists.","AlreadyExists",e,t,n,r)}},Fle=class extends St{constructor(e,t,n,r){super(429,"The request has been rate limited.","RateLimited",e,t,n,r)}},Lle=class extends St{constructor(e,t,n,r){super(402,"A payment is required to perform this request.","PaymentRequired",e,t,n,r)}},Ble=class extends St{constructor(e,t,n,r){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",e,t,n,r)}},Ule=class extends St{constructor(e,t,n,r){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",e,t,n,r)}},zle=class extends St{constructor(e,t,n,r){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",e,t,n,r)}},qle={Unknown:kl,Internal:wle,Unauthorized:xle,Forbidden:Sle,PayloadTooLarge:Ele,InvalidPayload:_le,UnsupportedMediaType:kle,MethodNotFound:Tle,ResourceNotFound:Cle,InvalidJsonSchema:Ole,InvalidDataFormat:$le,InvalidIdentifier:Ile,RelationConflict:Rle,ReferenceConstraint:Ale,ResourceLockedConflict:Ple,ReferenceNotFound:Dle,InvalidQuery:jle,Runtime:Nle,AlreadyExists:Mle,RateLimited:Fle,PaymentRequired:Lle,QuotaExceeded:Ble,LimitExceeded:Ule,BreakingChanges:zle},Z$=e=>Yy(e)?e:e instanceof Error?new kl(e.message,e):typeof e=="string"?new kl(e):Wle(e);function Wle(e){if(typeof e=="object"&&"code"in e&&"type"in e&&"id"in e&&"message"in e&&typeof e.type=="string"&&typeof e.message=="string"){const t=qle[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN",e.metadata):new kl(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new kl("An invalid error occurred: "+JSON.stringify(e))}var Vle=e=>e[1]!==void 0,Dt=e=>{const{method:t,path:n,query:r,headers:i,body:a}=e,o=Object.entries(i).filter(Vle),s=Object.fromEntries(o),u=use.stringify(r,{encode:!0,arrayFormat:"repeat",allowDots:!0}),l=u?[n,u].join("?"):n,c=["put","post","delete","patch"].includes(t.toLowerCase())?a:void 0;return{method:t,url:l,headers:s,data:c}},Hle=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Zle=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{_:e._}}),Kle=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Gle=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{},body:{}}),Yle=e=>({path:`/conversations/${encodeURIComponent(e.id)}/listen`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),Jle=e=>({path:`/conversations/${encodeURIComponent(e.id)}/messages`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),Xle=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{userId:e.userId}}),Qle=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id,userId:e.userId},body:{}}),eue=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id,userId:e.userId},body:{}}),tue=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),nue=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),rue=e=>({path:"/messages",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId,metadata:e.metadata,replyTo:e.replyTo}}),iue=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{payload:e.payload,metadata:e.metadata}}),aue=e=>({path:`/messages/${encodeURIComponent(e.id)}/select`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),oue=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),sue=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),lue=e=>({path:"/users",headers:{},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),uue=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),cue=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),fue=e=>({path:`/events/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),due=e=>({path:"/events",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId,bindConversation:e.bindConversation,bindUser:e.bindUser}}),pue=e=>({path:"/files",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{key:e.key,size:e.size,accessPolicies:e.accessPolicies,index:e.index,contentType:e.contentType,tags:e.tags,expiresAt:e.expiresAt}}),hue=class{constructor(e,t={}){_e(this,"getConversation",async e=>{const{path:t,headers:n,query:r,body:i}=Hle(e),o=(this.props.toAxiosRequest??Dt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"createConversation",async e=>{const{path:t,headers:n,query:r,body:i}=Zle(e),o=(this.props.toAxiosRequest??Dt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"deleteConversation",async e=>{const{path:t,headers:n,query:r,body:i}=Kle(e),o=(this.props.toAxiosRequest??Dt)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"listConversations",async e=>{const{path:t,headers:n,query:r,body:i}=Gle(e),o=(this.props.toAxiosRequest??Dt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"listenConversation",async e=>{const{path:t,headers:n,query:r,body:i}=Yle(e),o=(this.props.toAxiosRequest??Dt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"listConversationMessages",async e=>{const{path:t,headers:n,query:r,body:i}=Jle(e),o=(this.props.toAxiosRequest??Dt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"addParticipant",async e=>{const{path:t,headers:n,query:r,body:i}=Xle(e),o=(this.props.toAxiosRequest??Dt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"removeParticipant",async e=>{const{path:t,headers:n,query:r,body:i}=Qle(e),o=(this.props.toAxiosRequest??Dt)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"getParticipant",async e=>{const{path:t,headers:n,query:r,body:i}=eue(e),o=(this.props.toAxiosRequest??Dt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"listParticipants",async e=>{const{path:t,headers:n,query:r,body:i}=tue(e),o=(this.props.toAxiosRequest??Dt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"getMessage",async e=>{const{path:t,headers:n,query:r,body:i}=nue(e),o=(this.props.toAxiosRequest??Dt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"createMessage",async e=>{const{path:t,headers:n,query:r,body:i}=rue(e),o=(this.props.toAxiosRequest??Dt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"updateMessage",async e=>{const{path:t,headers:n,query:r,body:i}=iue(e),o=(this.props.toAxiosRequest??Dt)({method:"put",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"selectMessage",async e=>{const{path:t,headers:n,query:r,body:i}=aue(e),o=(this.props.toAxiosRequest??Dt)({method:"put",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"deleteMessage",async e=>{const{path:t,headers:n,query:r,body:i}=oue(e),o=(this.props.toAxiosRequest??Dt)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"getUser",async e=>{const{path:t,headers:n,query:r,body:i}=sue(e),o=(this.props.toAxiosRequest??Dt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"createUser",async e=>{const{path:t,headers:n,query:r,body:i}=lue(e),o=(this.props.toAxiosRequest??Dt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"updateUser",async e=>{const{path:t,headers:n,query:r,body:i}=uue(e),o=(this.props.toAxiosRequest??Dt)({method:"put",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"deleteUser",async e=>{const{path:t,headers:n,query:r,body:i}=cue(e),o=(this.props.toAxiosRequest??Dt)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"getEvent",async e=>{const{path:t,headers:n,query:r,body:i}=fue(e),o=(this.props.toAxiosRequest??Dt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"createEvent",async e=>{const{path:t,headers:n,query:r,body:i}=due(e),o=(this.props.toAxiosRequest??Dt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});_e(this,"createFile",async e=>{const{path:t,headers:n,query:r,body:i}=pue(e),o=(this.props.toAxiosRequest??Dt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});this.axiosInstance=e,this.props=t}};function jt(e){var t;return zt.isAxiosError(e)&&((t=e.response)!=null&&t.data)?Z$(e.response.data):Z$(e)}var K$=class{constructor(){_e(this,"listeners",{})}emit(e,t){const n=this.listeners[e];if(n)for(const r of[...n])r(t)}onceOrMore(e,t){const n=r=>{t(r)==="stop-listening"&&this.off(e,n)};this.on(e,n)}once(e,t){const n=r=>{this.off(e,n),t(r)};this.on(e,n)}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}off(e,t){const n=this.listeners[e];if(!n)return;const r=n.indexOf(t);r!==-1&&n.splice(r,1)}cleanup(){this.listeners={}}},mue=(e,t)=>{const n=new fse.EventSourcePolyfill(e,{headers:t.headers,heartbeatTimeout:t.timeout}),r=new K$;return n.onopen=i=>r.emit("open",i),n.onmessage=i=>r.emit("message",i),n.onerror=i=>r.emit("error",i),{emitter:r,source:n}},vue=async(e,t={})=>{const{emitter:n,source:r}=mue(e,t);return await new Promise((i,a)=>{n.on("open",()=>{i()}),n.on("error",o=>{a(o)})}).finally(()=>n.cleanup()),{on:n.on.bind(n),close:()=>{n.cleanup(),r.close()}}},yue=C.object({type:C.literal("message_created"),data:C.object({id:C.string().describe("Id of the [Message](#schema_message)"),createdAt:C.string().datetime().describe("Creation date of the [Message](#schema_message) in ISO 8601 format"),payload:C.union([C.object({audioUrl:C.string().min(1),type:C.literal("audio")}),C.object({title:C.string().min(1),subtitle:C.string().min(1).optional(),imageUrl:C.string().min(1).optional(),actions:C.array(C.object({action:C.enum(["postback","url","say"]),label:C.string().min(1),value:C.string().min(1)})),type:C.literal("card")}),C.object({items:C.array(C.object({title:C.string().min(1),subtitle:C.string().min(1).optional(),imageUrl:C.string().min(1).optional(),actions:C.array(C.object({action:C.enum(["postback","url","say"]),label:C.string().min(1),value:C.string().min(1)}))})),type:C.literal("carousel")}),C.object({text:C.string().min(1),options:C.array(C.object({label:C.string().min(1),value:C.string().min(1)})),disableFreeText:C.boolean().optional(),type:C.literal("choice")}),C.object({text:C.string().min(1),options:C.array(C.object({label:C.string().min(1),value:C.string().min(1)})),disableFreeText:C.boolean().optional(),type:C.literal("dropdown")}),C.object({fileUrl:C.string().min(1),title:C.string().min(1).optional(),type:C.literal("file")}),C.object({imageUrl:C.string().min(1),type:C.literal("image")}),C.object({latitude:C.number(),longitude:C.number(),address:C.string().optional(),title:C.string().optional(),type:C.literal("location")}),C.object({text:C.string().min(1),value:C.string().optional(),type:C.literal("text")}),C.object({videoUrl:C.string().min(1),type:C.literal("video")}),C.object({items:C.array(C.union([C.object({type:C.literal("text"),payload:C.object({text:C.string().min(1),value:C.string().optional()})}),C.object({type:C.literal("markdown"),payload:C.object({markdown:C.string().min(1)})}),C.object({type:C.literal("image"),payload:C.object({imageUrl:C.string().min(1)})}),C.object({type:C.literal("audio"),payload:C.object({audioUrl:C.string().min(1)})}),C.object({type:C.literal("video"),payload:C.object({videoUrl:C.string().min(1)})}),C.object({type:C.literal("file"),payload:C.object({fileUrl:C.string().min(1),title:C.string().min(1).optional()})}),C.object({type:C.literal("location"),payload:C.object({latitude:C.number(),longitude:C.number(),address:C.string().optional(),title:C.string().optional()})})])),type:C.literal("bloc")}),C.object({markdown:C.string().min(1),type:C.literal("markdown")}),C.object({url:C.string(),name:C.string(),data:C.union([C.any(),C.null()]).optional(),type:C.literal("custom")}),C.object({reaction:C.string(),type:C.literal("reaction")})]).describe("Payload is the content of the message."),userId:C.string().describe("ID of the [User](#schema_user)"),conversationId:C.string().describe("ID of the [Conversation](#schema_conversation)"),metadata:C.record(C.union([C.any(),C.null()])).describe("Metadata of the message").optional(),replyTo:C.string().describe("ID of the message this message is replying to").optional(),selectedBy:C.string().describe("ID of the user who selected this message. Undefined if not selected.").optional()}).describe("The Message object represents a message in a [Conversation](#schema_conversation) for a specific [User](#schema_user).")}),gue=C.object({type:C.literal("message_updated"),data:C.object({id:C.string().describe("Id of the [Message](#schema_message)"),createdAt:C.string().datetime().describe("Creation date of the [Message](#schema_message) in ISO 8601 format"),payload:C.union([C.object({audioUrl:C.string().min(1),type:C.literal("audio")}),C.object({title:C.string().min(1),subtitle:C.string().min(1).optional(),imageUrl:C.string().min(1).optional(),actions:C.array(C.object({action:C.enum(["postback","url","say"]),label:C.string().min(1),value:C.string().min(1)})),type:C.literal("card")}),C.object({items:C.array(C.object({title:C.string().min(1),subtitle:C.string().min(1).optional(),imageUrl:C.string().min(1).optional(),actions:C.array(C.object({action:C.enum(["postback","url","say"]),label:C.string().min(1),value:C.string().min(1)}))})),type:C.literal("carousel")}),C.object({text:C.string().min(1),options:C.array(C.object({label:C.string().min(1),value:C.string().min(1)})),disableFreeText:C.boolean().optional(),type:C.literal("choice")}),C.object({text:C.string().min(1),options:C.array(C.object({label:C.string().min(1),value:C.string().min(1)})),disableFreeText:C.boolean().optional(),type:C.literal("dropdown")}),C.object({fileUrl:C.string().min(1),title:C.string().min(1).optional(),type:C.literal("file")}),C.object({imageUrl:C.string().min(1),type:C.literal("image")}),C.object({latitude:C.number(),longitude:C.number(),address:C.string().optional(),title:C.string().optional(),type:C.literal("location")}),C.object({text:C.string().min(1),value:C.string().optional(),type:C.literal("text")}),C.object({videoUrl:C.string().min(1),type:C.literal("video")}),C.object({items:C.array(C.union([C.object({type:C.literal("text"),payload:C.object({text:C.string().min(1),value:C.string().optional()})}),C.object({type:C.literal("markdown"),payload:C.object({markdown:C.string().min(1)})}),C.object({type:C.literal("image"),payload:C.object({imageUrl:C.string().min(1)})}),C.object({type:C.literal("audio"),payload:C.object({audioUrl:C.string().min(1)})}),C.object({type:C.literal("video"),payload:C.object({videoUrl:C.string().min(1)})}),C.object({type:C.literal("file"),payload:C.object({fileUrl:C.string().min(1),title:C.string().min(1).optional()})}),C.object({type:C.literal("location"),payload:C.object({latitude:C.number(),longitude:C.number(),address:C.string().optional(),title:C.string().optional()})})])),type:C.literal("bloc")}),C.object({markdown:C.string().min(1),type:C.literal("markdown")}),C.object({url:C.string(),name:C.string(),data:C.union([C.any(),C.null()]).optional(),type:C.literal("custom")}),C.object({reaction:C.string(),type:C.literal("reaction")})]).describe("Payload is the content of the message."),userId:C.string().describe("ID of the [User](#schema_user)"),conversationId:C.string().describe("ID of the [Conversation](#schema_conversation)"),metadata:C.record(C.union([C.any(),C.null()])).describe("Metadata of the message").optional(),replyTo:C.string().describe("ID of the message this message is replying to").optional(),selectedBy:C.string().describe("ID of the user who selected this message. Undefined if not selected.").optional()}).describe("The Message object represents a message in a [Conversation](#schema_conversation) for a specific [User](#schema_user).")}),bue=C.object({type:C.literal("webchat_visibility"),data:C.object({visibility:C.union([C.literal("show"),C.literal("hide"),C.literal("toggle")])})}),wue=C.object({type:C.literal("webchat_config"),data:C.object({config:C.record(C.union([C.any(),C.null()]))})}),xue=C.object({type:C.literal("custom"),data:C.object({event:C.record(C.union([C.any(),C.null()]))})}),Sue=C.object({type:C.literal("typing_started"),data:C.object({timeout:C.number().optional()})}),Eue=C.object({type:C.literal("typing_stopped"),data:C.record(C.never())}),_ue={messageCreated:yue,messageUpdated:gue,webchatVisibility:bue,webchatConfig:wue,custom:xue,typingStarted:Sue,typingStopped:Eue},G$="unknown error",Y$=class extends K${constructor(t){super();_e(this,"_state",{status:"disconnected"});_e(this,"connect",async()=>{if(this._state.status==="connected")return;if(this._state.status==="connecting"){await this._state.connectionPromise;return}const t=this._connect();this._state={status:"connecting",connectionPromise:t},await t});_e(this,"disconnect",async()=>{if(this._state.status==="disconnected")return;let t;this._state.status==="connecting"?t=await this._state.connectionPromise:t=this._state.source,this._disconnectSync(t)});_e(this,"_connect",async()=>{const t=await vue(`${this._props.url}/conversations/${this._props.conversationId}/listen`,{headers:{"x-user-key":this._props.userKey},timeout:this._props.timeout});return t.on("message",this._handleMessage),t.on("error",this._handleError(t)),this._state={status:"connected",source:t},t});_e(this,"_disconnectSync",t=>{t.close(),this._state={status:"disconnected"}});_e(this,"_handleMessage",t=>{const n=this._parseSignal(t.data);this.emit(n.type,n.data)});_e(this,"_handleError",t=>n=>{this._disconnectSync(t);const r=this._toError(n);this.emit("error",r)});_e(this,"_parseSignal",t=>{for(const n of Object.values(_ue)){const r=this._safeJsonParse(t),i=n.safeParse(r);if(i.success)return i.data}return{type:"unknown",data:t}});_e(this,"_safeJsonParse",t=>{try{return JSON.parse(t)}catch{return t}});_e(this,"_toError",t=>{if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t===null)return new Error(G$);if(typeof t=="object"&&"message"in t)return this._toError(t.message);try{const n=JSON.stringify(t);return new Error(n)}catch{return new Error(G$)}});this._props=t}get status(){return this._state.status}},J$=Y$;yle(J$,"listen",async e=>{const t=new Y$(e);return await t.connect(),t});var X$=100*1024*1024,kue=X$,Tue=X$,Cue=6e4,Q$=class{constructor(e){_e(this,"_auto");_e(this,"createConversation",e=>this._auto.createConversation(e));_e(this,"getConversation",e=>this._auto.getConversation(e));_e(this,"deleteConversation",e=>this._auto.deleteConversation(e));_e(this,"listConversations",e=>this._auto.listConversations(e));_e(this,"listConversationMessages",e=>this._auto.listConversationMessages(e));_e(this,"addParticipant",e=>this._auto.addParticipant(e));_e(this,"removeParticipant",e=>this._auto.removeParticipant(e));_e(this,"getParticipant",e=>this._auto.getParticipant(e));_e(this,"listParticipants",e=>this._auto.listParticipants(e));_e(this,"createMessage",e=>this._auto.createMessage(e));_e(this,"updateMessage",e=>this._auto.updateMessage(e));_e(this,"selectMessage",e=>this._auto.selectMessage(e));_e(this,"getMessage",e=>this._auto.getMessage(e));_e(this,"deleteMessage",e=>this._auto.deleteMessage(e));_e(this,"createFile",e=>this._auto.createFile(e));_e(this,"createUser",e=>this._auto.createUser(e));_e(this,"getUser",e=>this._auto.getUser(e));_e(this,"updateUser",e=>this._auto.updateUser(e));_e(this,"deleteUser",e=>this._auto.deleteUser(e));_e(this,"createEvent",e=>this._auto.createEvent(e));_e(this,"getEvent",e=>this._auto.getEvent(e));_e(this,"listenConversation",async({id:e,"x-user-key":t})=>await J$.listen({url:this.props.apiUrl,conversationId:e,userKey:t,timeout:this.props.sseTimeout}));this.props=e;const{apiUrl:t}=e,n={...e.headers},r=this.props.timeout??Cue,i=zt.create({baseURL:t,headers:n,withCredentials:!0,timeout:r,maxBodyLength:kue,maxContentLength:Tue});this._auto=new hue(i)}};const Oue=6e4;function eI({apiUrl:e,clientId:t,sseTimeout:n=Oue}){const r=new Q$({apiUrl:`${e}/${t}`,sseTimeout:n});return{sendMessage:async i=>{const{message:a}=await r.createMessage(i);return li(a)},getMessage:async i=>{const{message:a}=await r.getMessage(i);return li(a)},listConversationMessages:async i=>{const{messages:a,meta:o}=await r.listConversationMessages(i);return{messages:a.map(li),meta:o}},createMessage:async i=>{const{message:a}=await r.createMessage(i);return li(a)},addParticipant:r.addParticipant.bind(r),createConversation:r.createConversation.bind(r),createEvent:r.createEvent.bind(r),createFile:r.createFile.bind(r),createUser:r.createUser.bind(r),deleteConversation:r.deleteConversation.bind(r),deleteMessage:r.deleteMessage.bind(r),deleteUser:r.deleteUser.bind(r),getConversation:r.getConversation.bind(r),getEvent:r.getEvent.bind(r),getParticipant:r.getParticipant.bind(r),getUser:r.getUser.bind(r),listConversations:r.listConversations.bind(r),removeParticipant:r.removeParticipant.bind(r),updateUser:r.updateUser.bind(r),listenConversation:r.listenConversation.bind(r)}}const Df={disconnected:0,user_creating:1,user_created:2,conversation_creating:3,conversation_created:4},Tn=(e,t)=>e.status===t,Mr=(e,t)=>Df[e.status]<Df[t],tI=(e,t)=>Df[e.status]>=Df[t];class Fr extends Error{constructor(t){super(`Unexpected state: ${t.status}`),this.state=t}}const nI=["audio","file","image","video"],jf=e=>nI.includes(e),$ue=6e4;class Iue extends Al{constructor(n){super();_e(this,"_client");_e(this,"_webhookId");_e(this,"_apiUrl");_e(this,"_state",{status:"disconnected"});_e(this,"mode","pushpin");_e(this,"_initialConnect",async({data:n,name:r,pictureUrl:i})=>{if(tI(this._state,"user_created"))throw new Error("Client is already connected. Please disconnect first.");if(Tn(this._state,"user_creating"))return;this._state={status:"user_creating"};const{user:{id:a},key:o}=await this._client.createUser({name:r,pictureUrl:i,userData:n});return this._state={status:"user_created",userId:a,userKey:o},{userId:a,userToken:o}});_e(this,"_reConnect",async(n,{data:r,name:i,pictureUrl:a})=>{if(tI(this._state,"user_created")){if(this._state.userId!==n.userId)throw new Error("Client is already connected. Please disconnect first.");return n}return Tn(this._state,"user_creating")||(this._state={status:"user_created",userId:n.userId,userKey:n.userToken},await this._client.updateUser({"x-user-key":n.userToken,name:i,pictureUrl:a,userData:r})),n});_e(this,"_mapMessage",n=>{const{metadata:r}=n,{payload:i,disableInput:a}=tp(n.payload);return{id:n.id,conversationId:n.conversationId,authorId:n.userId,sentOn:new Date(n.createdAt),payload:i,disableInput:a,metadata:r}});const r=`${n.apiUrl}/${n.clientId}`;this._webhookId=n.clientId,this._apiUrl=r,this._client=new Q$({apiUrl:r,sseTimeout:$ue})}get apiUrl(){return this._apiUrl}get clientId(){return this._webhookId}get userId(){if(!Mr(this._state,"user_created"))return this._state.userId}async getUser(){if(Mr(this._state,"user_created"))throw new Fr(this._state);const{user:n}=await this._client.getUser({"x-user-key":this._state.userKey});return{data:n.data}}async updateUser(n){if(Mr(this._state,"user_created"))throw new Fr(this._state);const{user:r}=await this._client.updateUser({"x-user-key":this._state.userKey,name:n.name,pictureUrl:n.pictureUrl,userData:n.data});return r}get conversationId(){if(!Mr(this._state,"conversation_created"))return this._state.conversationId}async connect(n,r,i={}){const a={data:r,...i};return n?await this.userExists(n)?this._reConnect(n,a):this._initialConnect(a):this._initialConnect(a)}async disconnect(){Tn(this._state,"conversation_created")?this._state.signalEmitter.cleanup():Tn(this._state,"conversation_creating")&&console.warn("zombie conversation..."),this._state={status:"disconnected"}}async sendFile(n){if(Mr(this._state,"user_created"))throw new Fr(this._state);if(Tn(this._state,"conversation_creating"))throw new Fr(this._state);let r;Tn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state));const{size:i,name:a}=n,s=await(m=>new Promise((h,y)=>{const v=new FileReader;v.onload=b=>{var w;return h((w=b.target)==null?void 0:w.result)},v.onerror=b=>{var w;return y((w=b.target)==null?void 0:w.error)},v.readAsArrayBuffer(m)}))(n),{file:{uploadUrl:u,contentType:l,url:c}}=await this._client.createFile({"x-user-key":r.userKey,size:i,key:a,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"}});await fetch(u,{method:"PUT",headers:{"x-amz-tagging":"public=true"},body:s});const f=l.split("/").shift()??"",d=jf(f)?f:"file",p=d==="image"?{type:d,imageUrl:c}:d==="audio"?{type:d,audioUrl:c}:d==="video"?{type:d,videoUrl:c}:{type:d,fileUrl:c};return await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:p}),this.emit("messageSent",p),{fileUrl:c,name:a,type:d}}async sendMessage(n){if(Mr(this._state,"user_created"))throw new Fr(this._state);if(Tn(this._state,"conversation_creating"))throw new Fr(this._state);let r;Tn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:n}),this.emit("messageSent",n)}async sendEvent(n){if(Mr(this._state,"user_created"))throw new Fr(this._state);if(Tn(this._state,"conversation_creating"))throw new Fr(this._state);let r;Tn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createEvent({"x-user-key":r.userKey,conversationId:r.conversationId,payload:{type:"custom",data:n}})}async switchConversation(n){if(Mr(this._state,"user_created"))throw new Fr(this._state);Tn(this._state,"conversation_created")&&this._state.conversationId===n||Tn(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._connectConversation(this._state,n))}async conversationExists(n){if(Mr(this._state,"user_created"))return!1;try{return await this._client.getConversation({"x-user-key":this._state.userKey,id:n}),!0}catch(r){if(Yy(r)&&r.code===404)return!1;throw r}}async userExists({userToken:n}){try{return await this._client.getUser({"x-user-key":n}),!0}catch(r){const i=a=>a.code===404||a.code===401;if(Yy(r)&&i(r))return!1;throw r}}async newConversation(){if(Mr(this._state,"user_created"))throw new Fr(this._state);Tn(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._createNewConversation(this._state))}async _createNewConversation(n){const{conversation:{id:r}}=await this._client.createConversation({"x-user-key":n.userKey}),i=await this._connectConversation(n,r);return await this._client.createEvent({"x-user-key":n.userKey,conversationId:r,payload:{type:"conversation_started",data:{}}}),i}async listMessages(){if(!Tn(this._state,"conversation_created"))return[];const{conversationId:n,userKey:r}=this._state,i=[];let a;do{const o=await this._client.listConversationMessages({id:n,"x-user-key":r,nextToken:a});i.push(...o.messages),a=o.meta.nextToken}while(a);return i.map(this._mapMessage)}async _connectConversation(n,r){const i=await this._client.listenConversation({id:r,"x-user-key":n.userKey});return i.on("unknown",a=>{typeof a=="string"&&a==="ping"||console.debug("unknown event",a)}),i.on("message_created",a=>{a.userId,n.userId}),i.on("error",a=>{this._state={status:"user_created",userId:n.userId,userKey:n.userKey},this.emit("error",new Error(`Connection to conversation lost: ${a.message}`))}),i.on("webchat_visibility",a=>{this.emit("webchatVisibility",a.visibility)}),i.on("webchat_config",a=>{this.emit("webchatConfig",a.config)}),i.on("typing_started",a=>{this.emit("isTyping",{isTyping:!0,timeout:a.timeout??5e3})}),i.on("typing_stopped",()=>{this.emit("isTyping",{isTyping:!1,timeout:0})}),i.on("custom",a=>{this.emit("customEvent",a.event)}),this.emit("conversation",r),this._state={status:"conversation_created",userId:n.userId,userKey:n.userKey,conversationId:r,signalEmitter:i},this._state}}const Rue=({clientId:e,apiUrl:t="https://webchat.botpress.cloud"})=>new Iue({apiUrl:t,clientId:e}),Aue=({clientId:e,apiUrl:t="https://webchat.botpress.cloud"})=>{const[n]=j.useState(Rue({clientId:e,apiUrl:t}));return n};function rI(){const[e,t]=j.useState(!1),n=j.useRef(null);return{isTyping:e,setIsTyping:(r,i)=>{if(t(r),!r)return()=>{};if(n.current=new Date,!i)return()=>{};const a=setTimeout(()=>{const o=n.current;o&&new Date().getTime()-o.getTime()>i&&t(!1)},i+100);return()=>clearTimeout(a)}}}var Pue=Object.defineProperty,Due=(e,t,n)=>t in e?Pue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jue=(e,t,n)=>Due(e,t+"",n),Nue=async(e,t)=>{let n=typeof t=="function"?await t(e):t;if(n)return e.scheme==="bearer"?`Bearer ${n}`:e.scheme==="basic"?`Basic ${btoa(n)}`:n},Mue={bodySerializer:e=>JSON.stringify(e,(t,n)=>typeof n=="bigint"?n.toString():n)},Fue=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Lue=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},Bue=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},iI=({allowReserved:e,explode:t,name:n,style:r,value:i})=>{if(!t){let s=(e?i:i.map(u=>encodeURIComponent(u))).join(Lue(r));switch(r){case"label":return`.${s}`;case"matrix":return`;${n}=${s}`;case"simple":return s;default:return`${n}=${s}`}}let a=Fue(r),o=i.map(s=>r==="label"||r==="simple"?e?s:encodeURIComponent(s):Nf({allowReserved:e,name:n,value:s})).join(a);return r==="label"||r==="matrix"?a+o:o},Nf=({allowReserved:e,name:t,value:n})=>{if(n==null)return"";if(typeof n=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?n:encodeURIComponent(n)}`},aI=({allowReserved:e,explode:t,name:n,style:r,value:i})=>{if(i instanceof Date)return`${n}=${i.toISOString()}`;if(r!=="deepObject"&&!t){let s=[];Object.entries(i).forEach(([l,c])=>{s=[...s,l,e?c:encodeURIComponent(c)]});let u=s.join(",");switch(r){case"form":return`${n}=${u}`;case"label":return`.${u}`;case"matrix":return`;${n}=${u}`;default:return u}}let a=Bue(r),o=Object.entries(i).map(([s,u])=>Nf({allowReserved:e,name:r==="deepObject"?`${n}[${s}]`:s,value:u})).join(a);return r==="label"||r==="matrix"?a+o:o},Uue=/\{[^{}]+\}/g,zue=({path:e,url:t})=>{let n=t,r=t.match(Uue);if(r)for(let i of r){let a=!1,o=i.substring(1,i.length-1),s="simple";o.endsWith("*")&&(a=!0,o=o.substring(0,o.length-1)),o.startsWith(".")?(o=o.substring(1),s="label"):o.startsWith(";")&&(o=o.substring(1),s="matrix");let u=e[o];if(u==null)continue;if(Array.isArray(u)){n=n.replace(i,iI({explode:a,name:o,style:s,value:u}));continue}if(typeof u=="object"){n=n.replace(i,aI({explode:a,name:o,style:s,value:u}));continue}if(s==="matrix"){n=n.replace(i,`;${Nf({name:o,value:u})}`);continue}let l=encodeURIComponent(s==="label"?`.${u}`:u);n=n.replace(i,l)}return n},oI=({allowReserved:e,array:t,object:n}={})=>r=>{let i=[];if(r&&typeof r=="object")for(let a in r){let o=r[a];if(o!=null){if(Array.isArray(o)){i=[...i,iI({allowReserved:e,explode:!0,name:a,style:"form",value:o,...t})];continue}if(typeof o=="object"){i=[...i,aI({allowReserved:e,explode:!0,name:a,style:"deepObject",value:o,...n})];continue}i=[...i,Nf({allowReserved:e,name:a,value:o})]}}return i.join("&")},que=e=>{var t;if(!e)return"stream";let n=(t=e.split(";")[0])==null?void 0:t.trim();if(n){if(n.startsWith("application/json")||n.endsWith("+json"))return"json";if(n==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(r=>n.startsWith(r)))return"blob";if(n.startsWith("text/"))return"text"}},Wue=async({security:e,...t})=>{for(let n of e){let r=await Nue(n,t.auth);if(!r)continue;let i=n.name??"Authorization";switch(n.in){case"query":t.query||(t.query={}),t.query[i]=r;break;case"cookie":t.headers.append("Cookie",`${i}=${r}`);break;case"header":default:t.headers.set(i,r);break}return}},sI=e=>Vue({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:oI(e.querySerializer),url:e.url}),Vue=({baseUrl:e,path:t,query:n,querySerializer:r,url:i})=>{let a=i.startsWith("/")?i:`/${i}`,o=(e??"")+a;t&&(o=zue({path:t,url:o}));let s=n?r(n):"";return s.startsWith("?")&&(s=s.substring(1)),s&&(o+=`?${s}`),o},lI=(e,t)=>{var n;let r={...e,...t};return(n=r.baseUrl)!=null&&n.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=uI(e.headers,t.headers),r},uI=(...e)=>{let t=new Headers;for(let n of e){if(!n||typeof n!="object")continue;let r=n instanceof Headers?n.entries():Object.entries(n);for(let[i,a]of r)if(a===null)t.delete(i);else if(Array.isArray(a))for(let o of a)t.append(i,o);else a!==void 0&&t.set(i,typeof a=="object"?JSON.stringify(a):a)}return t},Jy=class{constructor(){jue(this,"_fns"),this._fns=[]}clear(){this._fns=[]}exists(t){return this._fns.indexOf(t)!==-1}eject(t){let n=this._fns.indexOf(t);n!==-1&&(this._fns=[...this._fns.slice(0,n),...this._fns.slice(n+1)])}use(t){this._fns=[...this._fns,t]}},Hue=()=>({error:new Jy,request:new Jy,response:new Jy}),Zue=oI({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),Kue={"Content-Type":"application/json"},cI=(e={})=>({...Mue,headers:Kue,parseAs:"auto",querySerializer:Zue,...e}),Gue=(e={})=>{let t=lI(cI(),e),n=()=>({...t}),r=o=>(t=lI(t,o),n()),i=Hue(),a=async o=>{let s={...t,...o,fetch:o.fetch??t.fetch??globalThis.fetch,headers:uI(t.headers,o.headers)};s.security&&await Wue({...s,security:s.security}),s.body&&s.bodySerializer&&(s.body=s.bodySerializer(s.body)),(s.body===void 0||s.body==="")&&s.headers.delete("Content-Type");let u=sI(s),l={redirect:"follow",...s},c=new Request(u,l);for(let y of i.request._fns)c=await y(c,s);let f=s.fetch,d=await f(c);for(let y of i.response._fns)d=await y(d,c,s);let p={request:c,response:d};if(d.ok){if(d.status===204||d.headers.get("Content-Length")==="0")return{data:{},...p};let y=(s.parseAs==="auto"?que(d.headers.get("Content-Type")):s.parseAs)??"json";if(y==="stream")return{data:d.body,...p};let v=await d[y]();return y==="json"&&(s.responseValidator&&await s.responseValidator(v),s.responseTransformer&&(v=await s.responseTransformer(v))),{data:v,...p}}let m=await d.text();try{m=JSON.parse(m)}catch{}let h=m;for(let y of i.error._fns)h=await y(m,d,c,s);if(h=h||{},s.throwOnError)throw h;return{error:h,...p}};return{buildUrl:sI,connect:o=>a({...o,method:"CONNECT"}),delete:o=>a({...o,method:"DELETE"}),get:o=>a({...o,method:"GET"}),getConfig:n,head:o=>a({...o,method:"HEAD"}),interceptors:i,options:o=>a({...o,method:"OPTIONS"}),patch:o=>a({...o,method:"PATCH"}),post:o=>a({...o,method:"POST"}),put:o=>a({...o,method:"PUT"}),request:a,setConfig:r,trace:o=>a({...o,method:"TRACE"})}},Yue=Gue,Jue=cI;const Nt=Yue((e=>({...e,withCredentials:!0,timeout:6e4,maxBodyLength:104857600,maxContentLength:104857600,throwOnError:!0}))(Jue({baseUrl:"https://webchat.botpress.cloud/"}))),Xue=e=>(e.client??Nt).delete({url:"/conversations/{id}",...e}),Que=e=>(e.client??Nt).get({url:"/conversations/{id}",...e}),ece=e=>(e.client??Nt).get({url:"/conversations",...e}),tce=e=>(e.client??Nt).post({url:"/conversations",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),nce=e=>(e.client??Nt).get({url:"/conversations/{id}/messages",...e}),rce=e=>(e.client??Nt).get({url:"/conversations/{id}/participants",...e}),ice=e=>(e.client??Nt).post({url:"/conversations/{id}/participants",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),ace=e=>(e.client??Nt).delete({url:"/conversations/{id}/participants/{userId}",...e}),oce=e=>(e.client??Nt).get({url:"/conversations/{id}/participants/{userId}",...e}),sce=e=>(e.client??Nt).delete({url:"/messages/{id}",...e}),lce=e=>(e.client??Nt).get({url:"/messages/{id}",...e}),uce=e=>(e.client??Nt).put({url:"/messages/{id}",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),cce=e=>(e.client??Nt).post({url:"/messages",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),fce=e=>(e.client??Nt).delete({url:"/users/me",...e}),dce=e=>(e.client??Nt).get({url:"/users/me",...e}),pce=e=>(e.client??Nt).put({url:"/users/me",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),fI=e=>((e==null?void 0:e.client)??Nt).post({url:"/users",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),hce=e=>(e.client??Nt).get({url:"/events/{id}",...e}),mce=e=>(e.client??Nt).post({url:"/events",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),vce=e=>(e.client??Nt).post({url:"/files",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}});let dI=class extends Error{constructor(t,n){super(t),this.name="ParseError",this.type=n.type,this.field=n.field,this.value=n.value,this.line=n.line}};function Xy(e){}function yce(e){if(typeof e=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:t=Xy,onError:n=Xy,onRetry:r=Xy,onComment:i}=e;let a="",o=!0,s,u="",l="";function c(h){const y=o?h.replace(/^\xEF\xBB\xBF/,""):h,[v,b]=gce(`${a}${y}`);for(const w of v)f(w);a=b,o=!1}function f(h){if(h===""){p();return}if(h.startsWith(":")){i&&i(h.slice(h.startsWith(": ")?2:1));return}const y=h.indexOf(":");if(y!==-1){const v=h.slice(0,y),b=h[y+1]===" "?2:1,w=h.slice(y+b);d(v,w,h);return}d(h,"",h)}function d(h,y,v){switch(h){case"event":l=y;break;case"data":u=`${u}${y}
185
+ `;break;case"id":s=y.includes("\0")?void 0:y;break;case"retry":/^\d+$/.test(y)?r(parseInt(y,10)):n(new dI(`Invalid \`retry\` value: "${y}"`,{type:"invalid-retry",value:y,line:v}));break;default:n(new dI(`Unknown field "${h.length>20?`${h.slice(0,20)}…`:h}"`,{type:"unknown-field",field:h,value:y,line:v}));break}}function p(){u.length>0&&t({id:s,event:l||void 0,data:u.endsWith(`
186
+ `)?u.slice(0,-1):u}),s=void 0,u="",l=""}function m(h={}){a&&h.consume&&f(a),o=!0,s=void 0,u="",l="",a=""}return{feed:c,reset:m}}function gce(e){const t=[];let n="",r=0;for(;r<e.length;){const i=e.indexOf("\r",r),a=e.indexOf(`
187
+ `,r);let o=-1;if(i!==-1&&a!==-1?o=Math.min(i,a):i!==-1?o=i:a!==-1&&(o=a),o===-1){n=e.slice(r);break}else{const s=e.slice(r,o);t.push(s),r=o+1,e[r-1]==="\r"&&e[r]===`
188
+ `&&r++}}return[t,n]}class pI extends Event{constructor(t,n){var r,i;super(t),this.code=(r=n==null?void 0:n.code)!=null?r:void 0,this.message=(i=n==null?void 0:n.message)!=null?i:void 0}[Symbol.for("nodejs.util.inspect.custom")](t,n,r){return r(hI(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(hI(this),n)}}function bce(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function Qy(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(Qy).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${Qy(e.cause)}`:e.message:`${e}`}function hI(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var mI=e=>{throw TypeError(e)},eg=(e,t,n)=>t.has(e)||mI("Cannot "+n),Je=(e,t,n)=>(eg(e,t,"read from private field"),n?n.call(e):t.get(e)),Kt=(e,t,n)=>t.has(e)?mI("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),kt=(e,t,n,r)=>(eg(e,t,"write to private field"),t.set(e,n),n),ei=(e,t,n)=>(eg(e,t,"access private method"),n),Cn,la,xo,Mf,Ff,Tl,So,Cl,Pi,Eo,_o,ko,Ol,cr,tg,ng,rg,vI,ig,ag,$l,og,sg;class Lf extends EventTarget{constructor(t,n){var r,i;super(),Kt(this,cr),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,Kt(this,Cn),Kt(this,la),Kt(this,xo),Kt(this,Mf),Kt(this,Ff),Kt(this,Tl),Kt(this,So),Kt(this,Cl,null),Kt(this,Pi),Kt(this,Eo),Kt(this,_o,null),Kt(this,ko,null),Kt(this,Ol,null),Kt(this,ng,async a=>{var o;Je(this,Eo).reset();const{body:s,redirected:u,status:l,headers:c}=a;if(l===204){ei(this,cr,$l).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(u?kt(this,xo,new URL(a.url)):kt(this,xo,void 0),l!==200){ei(this,cr,$l).call(this,`Non-200 status code (${l})`,l);return}if(!(c.get("content-type")||"").startsWith("text/event-stream")){ei(this,cr,$l).call(this,'Invalid content type, expected "text/event-stream"',l);return}if(Je(this,Cn)===this.CLOSED)return;kt(this,Cn,this.OPEN);const f=new Event("open");if((o=Je(this,Ol))==null||o.call(this,f),this.dispatchEvent(f),typeof s!="object"||!s||!("getReader"in s)){ei(this,cr,$l).call(this,"Invalid response body, expected a web ReadableStream",l),this.close();return}const d=new TextDecoder,p=s.getReader();let m=!0;do{const{done:h,value:y}=await p.read();y&&Je(this,Eo).feed(d.decode(y,{stream:!h})),h&&(m=!1,Je(this,Eo).reset(),ei(this,cr,og).call(this))}while(m)}),Kt(this,rg,a=>{kt(this,Pi,void 0),!(a.name==="AbortError"||a.type==="aborted")&&ei(this,cr,og).call(this,Qy(a))}),Kt(this,ig,a=>{typeof a.id=="string"&&kt(this,Cl,a.id);const o=new MessageEvent(a.event||"message",{data:a.data,origin:Je(this,xo)?Je(this,xo).origin:Je(this,la).origin,lastEventId:a.id||""});Je(this,ko)&&(!a.event||a.event==="message")&&Je(this,ko).call(this,o),this.dispatchEvent(o)}),Kt(this,ag,a=>{kt(this,Tl,a)}),Kt(this,sg,()=>{kt(this,So,void 0),Je(this,Cn)===this.CONNECTING&&ei(this,cr,tg).call(this)});try{if(t instanceof URL)kt(this,la,t);else if(typeof t=="string")kt(this,la,new URL(t,wce()));else throw new Error("Invalid URL")}catch{throw bce("An invalid or illegal string was specified")}kt(this,Eo,yce({onEvent:Je(this,ig),onRetry:Je(this,ag)})),kt(this,Cn,this.CONNECTING),kt(this,Tl,3e3),kt(this,Ff,(r=n==null?void 0:n.fetch)!=null?r:globalThis.fetch),kt(this,Mf,(i=n==null?void 0:n.withCredentials)!=null?i:!1),ei(this,cr,tg).call(this)}get readyState(){return Je(this,Cn)}get url(){return Je(this,la).href}get withCredentials(){return Je(this,Mf)}get onerror(){return Je(this,_o)}set onerror(t){kt(this,_o,t)}get onmessage(){return Je(this,ko)}set onmessage(t){kt(this,ko,t)}get onopen(){return Je(this,Ol)}set onopen(t){kt(this,Ol,t)}addEventListener(t,n,r){const i=n;super.addEventListener(t,i,r)}removeEventListener(t,n,r){const i=n;super.removeEventListener(t,i,r)}close(){Je(this,So)&&clearTimeout(Je(this,So)),Je(this,Cn)!==this.CLOSED&&(Je(this,Pi)&&Je(this,Pi).abort(),kt(this,Cn,this.CLOSED),kt(this,Pi,void 0))}}Cn=new WeakMap,la=new WeakMap,xo=new WeakMap,Mf=new WeakMap,Ff=new WeakMap,Tl=new WeakMap,So=new WeakMap,Cl=new WeakMap,Pi=new WeakMap,Eo=new WeakMap,_o=new WeakMap,ko=new WeakMap,Ol=new WeakMap,cr=new WeakSet,tg=function(){kt(this,Cn,this.CONNECTING),kt(this,Pi,new AbortController),Je(this,Ff)(Je(this,la),ei(this,cr,vI).call(this)).then(Je(this,ng)).catch(Je(this,rg))},ng=new WeakMap,rg=new WeakMap,vI=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...Je(this,Cl)?{"Last-Event-ID":Je(this,Cl)}:void 0},cache:"no-store",signal:(e=Je(this,Pi))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},ig=new WeakMap,ag=new WeakMap,$l=function(e,t){var n;Je(this,Cn)!==this.CLOSED&&kt(this,Cn,this.CLOSED);const r=new pI("error",{code:t,message:e});(n=Je(this,_o))==null||n.call(this,r),this.dispatchEvent(r)},og=function(e,t){var n;if(Je(this,Cn)===this.CLOSED)return;kt(this,Cn,this.CONNECTING);const r=new pI("error",{code:t,message:e});(n=Je(this,_o))==null||n.call(this,r),this.dispatchEvent(r),kt(this,So,setTimeout(Je(this,sg),Je(this,Tl)))},sg=new WeakMap,Lf.CONNECTING=0,Lf.OPEN=1,Lf.CLOSED=2;function wce(){const e="document"in globalThis?globalThis.document:void 0;return e&&typeof e=="object"&&"baseURI"in e&&typeof e.baseURI=="string"?e.baseURI:void 0}class xce{constructor(){this.eventMap={}}on(t,n){var r;return this.eventMap[t]||(this.eventMap[t]=new Set),(r=this.eventMap[t])==null||r.add(n),()=>{var i;(i=this.eventMap[t])==null||i.delete(n)}}emit(t,n){var r,i;(r=this.eventMap[t])==null||r.forEach(a=>{a(n)}),(i=this.eventMap["*"])==null||i.forEach(a=>{a({type:t,payload:n})})}}const Mt=e=>e.data,yI={throwOnError:!0},Sce=({clientId:e,apiUrl:t})=>{const n=`${t||Nt.getConfig().baseUrl}/${e}`,r={...yI,baseUrl:n};return fI({...r,body:{}}).then(Mt)},gI=({userKey:e,clientId:t,apiUrl:n})=>{const r={"x-user-key":e},i=`${n||Nt.getConfig().baseUrl}/${t}`,a={...yI,baseUrl:i};return{createConversation:()=>tce({...a,headers:r,body:{}}).then(Mt),getConversation:({conversationId:o})=>Que({...a,headers:r,path:{id:o}}).then(Mt),deleteConversation:({conversationId:o})=>Xue({...a,headers:r,path:{id:o}}).then(Mt),listConversations:({nextToken:o})=>ece({...a,headers:r,query:{nextToken:o}}).then(Mt),listConversationMessages:({conversationId:o,nextToken:s})=>nce({...a,headers:r,path:{id:o},query:{nextToken:s}}).then(Mt),addParticipant:({conversationId:o,userId:s})=>ice({...a,headers:r,path:{id:o},body:{userId:s}}).then(Mt),removeParticipant:({conversationId:o,userId:s})=>ace({...a,headers:r,path:{id:o,userId:s}}).then(Mt),getParticipant:({conversationId:o,userId:s})=>oce({...a,headers:r,path:{id:o,userId:s}}).then(Mt),listParticipants:({conversationId:o,nextToken:s})=>rce({...a,headers:r,path:{id:o},query:{nextToken:s}}).then(Mt),createMessage:o=>cce({...a,headers:r,body:o}).then(Mt),updateMessage:({messageId:o,...s})=>uce({...a,headers:r,path:{id:o},body:s}).then(Mt),getMessage:({messageId:o})=>lce({...a,headers:r,path:{id:o}}).then(Mt),deleteMessage:({messageId:o})=>sce({...a,headers:r,path:{id:o}}).then(Mt),createFile:o=>vce({...a,headers:r,body:o}).then(Mt),createUser:o=>fI({...a,headers:r,body:o}).then(Mt),getUser:()=>dce({...a,headers:r}).then(Mt),updateUser:o=>pce({...a,headers:r,body:o}).then(Mt),deleteUser:()=>fce({...a,headers:r}).then(Mt),createEvent:o=>mce({...a,headers:r,body:o}).then(Mt),getEvent:({eventId:o})=>hce({...a,headers:r,path:{id:o}}).then(Mt),listenConversation:({conversationId:o})=>{let s=0,u=null;const l=new xce,c=()=>{u&&u.close();const f=`${i}/conversations/${o}/listen`;u=new Lf(f,{fetch:(d,p)=>fetch(d,{...p,headers:{...p==null?void 0:p.headers,...r,timeout:"60_000"}})}),u.onopen=()=>l.emit("open"),u.onerror=d=>{l.emit("error",d),s<10&&(s++,setTimeout(()=>c(),3e3))},u.onmessage=d=>{const p=Ece(d.data);l.emit(p.type,p.data)}};return c(),l.on.bind(l)}}},Ece=e=>{try{return JSON.parse(e)}catch{return e}};async function _ce({conversationId:e,userCredentials:t,clientId:n,apiUrl:r}){let i=t,a=e,o;if(i){if(o=gI({userKey:i.userToken,clientId:n,apiUrl:r}),!a){const{conversation:s}=await o.createConversation();a=s.id}}else{const{key:s,user:u}=await Sce({clientId:n,apiUrl:r});i={userId:u.id,userToken:s},o=gI({userKey:i.userToken,clientId:n,apiUrl:r});const{conversation:l}=await o.createConversation();a=l.id}return{client:o,conversationId:a,userCredentials:i}}function bI({apiUrl:e="https://webchat.botpress.cloud",clientId:t,storageKey:n,storageLocation:r,...i}){const a=ip(n,r),o=a(I=>I.conversationId),s=a(I=>I.user),u=a(I=>I.setConversationId),l=a(I=>I.setUser),c=yr(I=>I.messages),f=yr(I=>I.addMessage),d=yr(I=>I.fetchMessages),p=yr(I=>I.setMessages),m=yr(I=>I.isFetching),[h,y]=j.useState("connecting"),{isTyping:v,setIsTyping:b}=rI(),w=j.useMemo(()=>new Al,[]),[T,E]=j.useState(!!i.conversationId||!!o),[_,O]=j.useState(i.conversationId),[z,U]=j.useState(i.user),[k,D]=j.useState(void 0);if(j.useEffect(()=>{async function I(){try{const A=i.conversationId||o;A&&E(!0);const{client:L,conversationId:Z,userCredentials:H}=await _ce({clientId:t,apiUrl:e,userCredentials:i.user||s,conversationId:A});D(L),O(Z),U(H),l(H),u(Z),y("connected"),!A&&w.emit("conversation",Z)}catch(A){console.error("Failed to initialize webchat:",A),y("error")}}I()},[i.user,i.conversationId]),j.useEffect(()=>{async function I(){if(T&&k&&_){const A=await d({client:k,conversationId:_});p(A),E(!1)}}I()},[T,k,_]),j.useEffect(()=>{if(!k||!_)return;const I=k.listenConversation({conversationId:_}),A=[I("open",()=>y("connected")),I("error",L=>{w.emit("error",new Error(`Connection to conversation lost: ${L.message}`)),y("error")}),I("message_created",L=>{const Z=np(L);f(Z),w.emit("message",Z),b(!1),w.emit("isTyping",{isTyping:!1,timeout:0})}),I("webchat_visibility",L=>w.emit("webchatVisibility",L.visibility)),I("webchat_config",L=>w.emit("webchatConfig",L.config)),I("typing_started",L=>{const Z=L.timeout??5e3;b(!0,Z),w.emit("isTyping",{isTyping:!0,timeout:Z})}),I("typing_stopped",()=>{b(!1),w.emit("isTyping",{isTyping:!1,timeout:0})}),I("custom",L=>w.emit("customEvent",L.event))];return()=>{A.forEach(L=>L())}},[_,k]),h==="connecting"||!z||!_||!k)return{clientState:"connecting",on:w.on.bind(w),client:void 0,messages:[],conversationId:void 0,newConversation:()=>{},user:void 0,isTyping:void 0,isFetchingMessages:m};const W=async()=>{const{conversation:I}=await k.createConversation();return a.setState({conversationId:I.id}),O(I.id),await k.createEvent({conversationId:I.id,payload:{type:"conversation_started",data:{}}}),I.id},B={sendMessage:async I=>{const A=Zv();f(np({id:A,createdAt:new Date().toISOString(),userId:z.userId,conversationId:_,payload:I,metadata:{clientMessageId:A,delivered:!1}})),await k.createMessage({conversationId:_,payload:I,metadata:{clientMessageId:A}}).catch(L=>w.emit("error",L))},updateUser:async I=>{const{user:A}=await k.updateUser({name:I.name,pictureUrl:I.pictureUrl,userData:I.data});return A},sendEvent:async I=>{await k.createEvent({conversationId:_,payload:{type:"custom",data:I}})},uploadFile:async I=>{const{size:A,name:L}=I,H=await(J=>new Promise((Y,Q)=>{const ae=new FileReader;ae.onload=oe=>{var X;return Y((X=oe.target)==null?void 0:X.result)},ae.onerror=oe=>{var X;return Q((X=oe.target)==null?void 0:X.error)},ae.readAsArrayBuffer(J)}))(I),R=new Date;R.setDate(R.getDate()+30);const{file:{uploadUrl:g,contentType:N,url:V}}=await k.createFile({size:A,key:L,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"},expiresAt:R.toISOString()});await fetch(g,{method:"PUT",headers:{"x-amz-tagging":"public=true"},body:H});const S=N.split("/").shift()??"",K=jf(S)?S:"file";return{fileUrl:V,name:L,type:K}},getUser:async()=>{const{user:I}=await k.getUser({userId:z.userId});return I}};return{clientState:h,on:w.on.bind(w),client:B,messages:c,conversationId:_,newConversation:()=>{p([]),W().then(u)},user:s,isTyping:v,isFetchingMessages:m}}var wI={},lg={},Bf=vt&&vt.__assign||function(){return Bf=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Bf.apply(this,arguments)};Object.defineProperty(lg,"__esModule",{value:!0});var kce={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function Tce(e){var t=Bf(Bf({},kce),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}lg.getSanitizedOptions=Tce;var ug={},cg={},Uf={},fg={},dg={};Object.defineProperty(dg,"__esModule",{value:!0});function Cce(e){var t=Math.random()*e;return Math.round(t)}dg.fullJitter=Cce;var pg={};Object.defineProperty(pg,"__esModule",{value:!0});function Oce(e){return e}pg.noJitter=Oce,Object.defineProperty(fg,"__esModule",{value:!0});var $ce=dg,Ice=pg;function Rce(e){switch(e.jitter){case"full":return $ce.fullJitter;case"none":default:return Ice.noJitter}}fg.JitterFactory=Rce,Object.defineProperty(Uf,"__esModule",{value:!0});var Ace=fg,Pce=function(){function e(t){this.options=t,this.attempt=0}return e.prototype.apply=function(){var t=this;return new Promise(function(n){return setTimeout(n,t.jitteredDelay)})},e.prototype.setAttemptNumber=function(t){this.attempt=t},Object.defineProperty(e.prototype,"jitteredDelay",{get:function(){var t=Ace.JitterFactory(this.options);return t(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delay",{get:function(){var t=this.options.startingDelay,n=this.options.timeMultiple,r=this.numOfDelayedAttempts,i=t*Math.pow(n,r);return Math.min(i,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),e}();Uf.Delay=Pce;var Dce=vt&&vt.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),jce=vt&&vt.__awaiter||function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(c){try{l(r.next(c))}catch(f){o(f)}}function u(c){try{l(r.throw(c))}catch(f){o(f)}}function l(c){c.done?a(c.value):i(c.value).then(s,u)}l((r=r.apply(e,t||[])).next())})},Nce=vt&&vt.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(c){l=[6,c],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(cg,"__esModule",{value:!0});var Mce=Uf,Fce=function(e){Dce(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return jce(this,void 0,void 0,function(){return Nce(this,function(n){return[2,this.isFirstAttempt?!0:e.prototype.apply.call(this)]})})},Object.defineProperty(t.prototype,"isFirstAttempt",{get:function(){return this.attempt===0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),t}(Mce.Delay);cg.SkipFirstDelay=Fce;var hg={},Lce=vt&&vt.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(hg,"__esModule",{value:!0});var Bce=Uf,Uce=function(e){Lce(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Bce.Delay);hg.AlwaysDelay=Uce,Object.defineProperty(ug,"__esModule",{value:!0});var zce=cg,qce=hg;function Wce(e,t){var n=Vce(e);return n.setAttemptNumber(t),n}ug.DelayFactory=Wce;function Vce(e){return e.delayFirstAttempt?new qce.AlwaysDelay(e):new zce.SkipFirstDelay(e)}var mg=vt&&vt.__awaiter||function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(c){try{l(r.next(c))}catch(f){o(f)}}function u(c){try{l(r.throw(c))}catch(f){o(f)}}function l(c){c.done?a(c.value):i(c.value).then(s,u)}l((r=r.apply(e,t||[])).next())})},vg=vt&&vt.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(c){l=[6,c],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(wI,"__esModule",{value:!0});var Hce=lg,Zce=ug;function Kce(e,t){return t===void 0&&(t={}),mg(this,void 0,void 0,function(){var n,r;return vg(this,function(i){switch(i.label){case 0:return n=Hce.getSanitizedOptions(t),r=new Yce(e,n),[4,r.execute()];case 1:return[2,i.sent()]}})})}var Gce=wI.backOff=Kce,Yce=function(){function e(t,n){this.request=t,this.options=n,this.attemptNumber=0}return e.prototype.execute=function(){return mg(this,void 0,void 0,function(){var t,n;return vg(this,function(r){switch(r.label){case 0:if(this.attemptLimitReached)return[3,7];r.label=1;case 1:return r.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return r.sent(),[4,this.request()];case 3:return[2,r.sent()];case 4:return t=r.sent(),this.attemptNumber++,[4,this.options.retry(t,this.attemptNumber)];case 5:if(n=r.sent(),!n||this.attemptLimitReached)throw t;return[3,6];case 6:return[3,0];case 7:throw new Error("Something went wrong.")}})})},Object.defineProperty(e.prototype,"attemptLimitReached",{get:function(){return this.attemptNumber>=this.options.numOfAttempts},enumerable:!0,configurable:!0}),e.prototype.applyDelay=function(){return mg(this,void 0,void 0,function(){var t;return vg(this,function(n){switch(n.label){case 0:return t=Zce.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return n.sent(),[2]}})})},e}();function Jce({apiUrl:e="https://webchat.botpress.cloud",clientId:t,storageKey:n,storageLocation:r,...i}){const[a,o]=j.useState(),s=yr(k=>k.messages),u=yr(k=>k.addMessage),l=yr(k=>k.fetchMessagesLegacy),c=yr(k=>k.setMessages),f=yr(k=>k.isFetching),[d,p]=j.useState("connecting"),{isTyping:m,setIsTyping:h}=rI(),y=j.useMemo(()=>new Al,[]),v=ip(n,r),b=j.useMemo(()=>eI({apiUrl:e,clientId:t}),[e,t]),w=j.useRef(null),[T,E]=j.useState(i.userKey),[_,O]=j.useState(i.conversationId);async function z(k){const{conversation:D}=await b.createConversation({"x-user-key":k});return v.setState({conversationId:D.id}),await b.createEvent({"x-user-key":k,conversationId:D.id,payload:{type:"conversation_started",data:{}}}),D.id}if(j.useEffect(()=>{let k=!0;async function D({userKey:W,conversationId:B}){let I,A=i.userKey??W,L=i.conversationId??B;if(p("connecting"),!A){const R=v.getState().user;A=R==null?void 0:R.userToken}if(!A){const{key:R,user:g}=await b.createUser({});I=g,A=R,v.setState({user:{userId:g.id,userToken:A}})}if(!I){const{user:R}=await b.getUser({"x-user-key":A});I=R}L||(L=v.getState().conversationId),L||(L=await z(A));const[Z,H]=await Promise.all([b.listenConversation({"x-user-key":A,id:L}),l({client:b,conversationId:L,userKey:A})]);y.emit("conversation",L),xI({emitter:y,signalEmitter:Z}),k&&(w.current=Z,E(A),O(L),o(I),c(H),p("connected"))}return D({userKey:T,conversationId:_}).catch(W=>{console.error(W)}),()=>{w.current&&(w.current.cleanup(),w.current=null),k=!1}},[T,_,b,y,i.conversationId,i.userKey]),j.useEffect(()=>{var D;if(!T||!_)return;async function k({userKey:W,conversationId:B}){const I=await b.listenConversation({"x-user-key":W,id:B});w.current=I,xI({emitter:y,signalEmitter:I})}d==="error"&&((D=w.current)==null||D.cleanup(),Gce(()=>k({conversationId:_,userKey:T}),{startingDelay:2e3,maxDelay:1e4,numOfAttempts:1/0}),p("connected"))},[d,T,_]),j.useEffect(()=>{const k=[y.on("message",D=>((a==null?void 0:a.id)!==D.authorId&&y.emit("isTyping",{isTyping:!1,timeout:0}),u(D))),y.on("isTyping",({isTyping:D,timeout:W})=>{h(D,W)}),y.on("error",()=>{p("error")})];return()=>{k.forEach(D=>D())}},[]),d==="connecting"||!T||!_)return{clientState:"connecting",on:y.on.bind(y),client:void 0,messages:[],conversationId:void 0,newConversation:()=>{},user:void 0,isTyping:void 0,isFetchingMessages:f};const U={sendMessage:async k=>{const D=Zv();u(li({id:D,createdAt:new Date().toISOString(),userId:(a==null?void 0:a.id)??"",conversationId:_,payload:k,metadata:{clientMessageId:D,delivered:!1}})),await b.createMessage({"x-user-key":T,conversationId:_,payload:k,metadata:{clientMessageId:D}}).catch(W=>y.emit("error",W))},updateUser:async k=>{const{user:D}=await b.updateUser({"x-user-key":T,name:k.name,pictureUrl:k.pictureUrl,userData:k.data});return D},sendEvent:async k=>{await b.createEvent({"x-user-key":T,conversationId:_,payload:{type:"custom",data:k}})},uploadFile:async k=>{const{size:D,name:W}=k,I=await(N=>new Promise((V,S)=>{const K=new FileReader;K.onload=J=>{var Y;return V((Y=J.target)==null?void 0:Y.result)},K.onerror=J=>{var Y;return S((Y=J.target)==null?void 0:Y.error)},K.readAsArrayBuffer(N)}))(k),A=new Date;A.setDate(A.getDate()+30);const{file:{uploadUrl:L,contentType:Z,url:H}}=await b.createFile({"x-user-key":T,size:D,key:W,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"},expiresAt:A.toISOString()});await fetch(L,{method:"PUT",headers:{"x-amz-tagging":"public=true"},body:I});const R=Z.split("/").shift()??"",g=jf(R)?R:"file";return{fileUrl:H,name:W,type:g}},getUser:async()=>{const{user:k}=await b.getUser({"x-user-key":T});return k}};return{clientState:d,on:y.on.bind(y),client:U,messages:s,conversationId:_,newConversation:()=>{c([]),z(T).then(O)},user:a,isTyping:m,isFetchingMessages:f}}function xI({emitter:e,signalEmitter:t}){t.on("unknown",n=>{}),t.on("message_created",n=>{e.emit("message",li(n))}),t.on("error",n=>{e.emit("error",new Error(`Connection to conversation lost: ${n.message}`))}),t.on("webchat_visibility",n=>{e.emit("webchatVisibility",n.visibility)}),t.on("webchat_config",n=>{e.emit("webchatConfig",n.config)}),t.on("typing_started",n=>{e.emit("isTyping",{isTyping:!0,timeout:n.timeout??5e3})}),t.on("typing_stopped",()=>{e.emit("isTyping",{isTyping:!1,timeout:0})}),t.on("custom",n=>{e.emit("customEvent",n.event)})}const Xce=({clientId:e,storageKey:t,configuration:n,allowFileUpload:r,apiUrl:i,user:a,conversationId:o,...s})=>{const u=t||`bp-webchat-${e}`,{clientState:l,client:c,isFetchingMessages:f,isTyping:d,newConversation:p,messages:m,user:h}=bI({clientId:e,apiUrl:i,conversationId:o,user:a,storageKey:u,storageLocation:n==null?void 0:n.storageLocation}),{sendMessage:y,uploadFile:v}=c??{};return $.jsx(eO,{configuration:n??{},user:h!=null&&h.userId?{id:h==null?void 0:h.userId}:void 0,isLoading:f||l==="connecting",isTyping:d,connected:l==="connected"?!0:l==="disconnected"?!1:void 0,messages:m,sendMessage:y,uploadFile:v,allowFileUpload:r,restartConversation:p,...s})};Re.Avatar=Zl,Re.Block=Pa,Re.Chat=eO,Re.Composer=u1,Re.Container=fh,Re.Fab=PS,Re.Header=LS,Re.Message=vh,Re.MessageList=Kv,Re.Modal=gi,Re.ModalProvider=Yp,Re.RestartConversationButton=FS,Re.StylesheetProvider=U1,Re.TypingIndicator=BS,Re.Webchat=Xce,Re.WebchatThemeSchema=id,Re.avatarThemeSchema=Hl,Re.blockThemeSchema=ub,Re.configPropsSchema=pb,Re.configurationSchema=ob,Re.cssStyleSchema=lb,Re.descriptionItemSchema=ma,Re.fileTypes=nI,Re.generateThemeStylesheet=hb,Re.getClient=eI,Re.getUseWebchatClientStore=ip,Re.initPropsSchema=hA,Re.integrationMessagePayloadToBlockPayload=tp,Re.integrationMessageToBlockMessage=li,Re.isFileType=jf,Re.markdownTypeSchema=sb,Re.renderers=e1,Re.statePropsSchema=fb,Re.styleOptionSchema=ve,Re.themeSchema=cb,Re.useClient=Aue,Re.useWebchat=bI,Re.useWebchatClient=Jce,Re.useWebchatStore=hu,Re.userPropsSchema=db,Re.webchatClasses=lt,Object.defineProperty(Re,Symbol.toStringTag,{value:"Module"})});