ordify-chat-widget 1.0.16 → 1.0.18
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.
- package/README.md +78 -1
- package/dist/hooks/useOrdifyChat.d.ts.map +1 -1
- package/dist/index.cjs.js +23 -23
- package/dist/index.esm.js +628 -628
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -106,8 +106,26 @@ function App() {
|
|
|
106
106
|
| `showHeader` | boolean | true | Show/hide chat header |
|
|
107
107
|
| `height` | number | 400 | Initial chat height (px) |
|
|
108
108
|
| `width` | string | "320px" | Chat width |
|
|
109
|
+
| `onSessionCreated` | function | - | **Optional** - Callback when a new session is created with session ID |
|
|
110
|
+
| `initialMessage` | string | - | **Optional** - Message to automatically send when chat loads |
|
|
109
111
|
|
|
110
|
-
## 🎯
|
|
112
|
+
## 🎯 Advanced Features
|
|
113
|
+
|
|
114
|
+
### Session Management
|
|
115
|
+
The `onSessionCreated` callback provides access to the auto-generated session ID when a new chat session is created. This is useful for:
|
|
116
|
+
- **User tracking**: Associate chat sessions with specific users
|
|
117
|
+
- **Analytics**: Track user engagement and conversation patterns
|
|
118
|
+
- **Support**: Link chat sessions to customer support tickets
|
|
119
|
+
- **Persistence**: Store session IDs for conversation history
|
|
120
|
+
|
|
121
|
+
### Initial Message
|
|
122
|
+
The `initialMessage` prop allows you to automatically send a message when the chat widget loads. This is perfect for:
|
|
123
|
+
- **Product pages**: Pre-populate with product-specific questions
|
|
124
|
+
- **Support**: Start with a greeting or help prompt
|
|
125
|
+
- **Onboarding**: Guide new users with initial instructions
|
|
126
|
+
- **A/B testing**: Test different conversation starters
|
|
127
|
+
|
|
128
|
+
### Theme-Aware Defaults
|
|
111
129
|
|
|
112
130
|
When no `primaryColor` is specified, the header automatically adapts:
|
|
113
131
|
- **Light mode**: White background with dark text
|
|
@@ -162,6 +180,65 @@ export function ChatWidget() {
|
|
|
162
180
|
}
|
|
163
181
|
```
|
|
164
182
|
|
|
183
|
+
#### Session Management
|
|
184
|
+
```tsx
|
|
185
|
+
// components/ChatWithSessionTracking.tsx
|
|
186
|
+
import { useState } from 'react'
|
|
187
|
+
import { OrdifyChat } from 'ordify-chat-widget'
|
|
188
|
+
|
|
189
|
+
export function ChatWithSessionTracking() {
|
|
190
|
+
const [sessionId, setSessionId] = useState<string | null>(null)
|
|
191
|
+
|
|
192
|
+
return (
|
|
193
|
+
<div>
|
|
194
|
+
{sessionId && (
|
|
195
|
+
<div className="mb-4 p-3 bg-blue-50 border border-blue-200 rounded-lg">
|
|
196
|
+
<p className="text-sm text-blue-800">
|
|
197
|
+
<strong>Session ID:</strong> <code className="bg-blue-100 px-2 py-1 rounded text-xs">{sessionId}</code>
|
|
198
|
+
</p>
|
|
199
|
+
</div>
|
|
200
|
+
)}
|
|
201
|
+
|
|
202
|
+
<OrdifyChat
|
|
203
|
+
agentId="your-agent-id"
|
|
204
|
+
apiKey="your-api-key"
|
|
205
|
+
apiBaseUrl="https://r.ordify.ai"
|
|
206
|
+
mode="floating"
|
|
207
|
+
onSessionCreated={(id) => {
|
|
208
|
+
setSessionId(id)
|
|
209
|
+
console.log('New session created:', id)
|
|
210
|
+
// Store in localStorage, send to analytics, etc.
|
|
211
|
+
}}
|
|
212
|
+
/>
|
|
213
|
+
</div>
|
|
214
|
+
)
|
|
215
|
+
}
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
#### Initial Message
|
|
219
|
+
```tsx
|
|
220
|
+
// components/ChatWithInitialMessage.tsx
|
|
221
|
+
import { OrdifyChat } from 'ordify-chat-widget'
|
|
222
|
+
|
|
223
|
+
export function ChatWithInitialMessage() {
|
|
224
|
+
return (
|
|
225
|
+
<OrdifyChat
|
|
226
|
+
agentId="your-agent-id"
|
|
227
|
+
apiKey="your-api-key"
|
|
228
|
+
apiBaseUrl="https://r.ordify.ai"
|
|
229
|
+
mode="embedded"
|
|
230
|
+
height="400px"
|
|
231
|
+
chatName="Product Assistant"
|
|
232
|
+
initialMessage="Hello! I'm interested in learning about your products."
|
|
233
|
+
onSessionCreated={(sessionId) => {
|
|
234
|
+
console.log('Chat started with session:', sessionId)
|
|
235
|
+
// Track user engagement
|
|
236
|
+
}}
|
|
237
|
+
/>
|
|
238
|
+
)
|
|
239
|
+
}
|
|
240
|
+
```
|
|
241
|
+
|
|
165
242
|
#### Landing Page Integration
|
|
166
243
|
```tsx
|
|
167
244
|
// pages/index.tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOrdifyChat.d.ts","sourceRoot":"","sources":["../../src/hooks/useOrdifyChat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAKpE,wBAAgB,aAAa,CAAC,MAAM,EAAE,YAAY,GAAG,mBAAmB,
|
|
1
|
+
{"version":3,"file":"useOrdifyChat.d.ts","sourceRoot":"","sources":["../../src/hooks/useOrdifyChat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAKpE,wBAAgB,aAAa,CAAC,MAAM,EAAE,YAAY,GAAG,mBAAmB,CAuIvE"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -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 _r;function Eo(){if(_r)return Ke;_r=1;var e=_,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function d(u,f,S){var
|
|
9
|
+
*/var _r;function Eo(){if(_r)return Ke;_r=1;var e=_,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function d(u,f,S){var v,m={},E=null,w=null;S!==void 0&&(E=""+S),f.key!==void 0&&(E=""+f.key),f.ref!==void 0&&(w=f.ref);for(v in f)n.call(f,v)&&!l.hasOwnProperty(v)&&(m[v]=f[v]);if(u&&u.defaultProps)for(v in f=u.defaultProps,f)m[v]===void 0&&(m[v]=f[v]);return{$$typeof:t,type:u,key:E,ref:w,props:m,_owner:s.current}}return Ke.Fragment=r,Ke.jsx=d,Ke.jsxs=d,Ke}var Ge={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,37 +14,37 @@
|
|
|
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 jr;function Co(){return jr||(jr=1,process.env.NODE_ENV!=="production"&&function(){var e=_,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),
|
|
18
|
-
`+ge+a}}var fe=!1,we;{var Pe=typeof WeakMap=="function"?WeakMap:Map;we=new Pe}function pe(a,p){if(!a||fe)return"";{var k=we.get(a);if(k!==void 0)return k}var $;fe=!0;var
|
|
17
|
+
*/var jr;function Co(){return jr||(jr=1,process.env.NODE_ENV!=="production"&&function(){var e=_,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),w=Symbol.for("react.offscreen"),j=Symbol.iterator,C="@@iterator";function D(a){if(a===null||typeof a!="object")return null;var p=j&&a[j]||a[C];return typeof p=="function"?p:null}var o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function c(a){{for(var p=arguments.length,k=new Array(p>1?p-1:0),$=1;$<p;$++)k[$-1]=arguments[$];i("error",a,k)}}function i(a,p,k){{var $=o.ReactDebugCurrentFrame,I=$.getStackAddendum();I!==""&&(p+="%s",k=k.concat([I]));var L=k.map(function(T){return String(T)});L.unshift("Warning: "+p),Function.prototype.apply.call(console[a],console,L)}}var g=!1,h=!1,b=!1,x=!1,P=!1,F;F=Symbol.for("react.module.reference");function Y(a){return!!(typeof a=="string"||typeof a=="function"||a===n||a===l||P||a===s||a===S||a===v||x||a===w||g||h||b||typeof a=="object"&&a!==null&&(a.$$typeof===E||a.$$typeof===m||a.$$typeof===d||a.$$typeof===u||a.$$typeof===f||a.$$typeof===F||a.getModuleId!==void 0))}function M(a,p,k){var $=a.displayName;if($)return $;var I=p.displayName||p.name||"";return I!==""?k+"("+I+")":k}function H(a){return a.displayName||"Context"}function A(a){if(a==null)return null;if(typeof a.tag=="number"&&c("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case n:return"Fragment";case r:return"Portal";case l:return"Profiler";case s:return"StrictMode";case S:return"Suspense";case v:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case u:var p=a;return H(p)+".Consumer";case d:var k=a;return H(k._context)+".Provider";case f:return M(a,a.render,"ForwardRef");case m:var $=a.displayName||null;return $!==null?$:A(a.type)||"Memo";case E:{var I=a,L=I._payload,T=I._init;try{return A(T(L))}catch{return null}}}return null}var Q=Object.assign,K=0,ae,ee,ne,q,se,oe,U;function J(){}J.__reactDisabledLog=!0;function ie(){{if(K===0){ae=console.log,ee=console.info,ne=console.warn,q=console.error,se=console.group,oe=console.groupCollapsed,U=console.groupEnd;var a={configurable:!0,enumerable:!0,value:J,writable:!0};Object.defineProperties(console,{info:a,log:a,warn:a,error:a,group:a,groupCollapsed:a,groupEnd:a})}K++}}function me(){{if(K--,K===0){var a={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Q({},a,{value:ae}),info:Q({},a,{value:ee}),warn:Q({},a,{value:ne}),error:Q({},a,{value:q}),group:Q({},a,{value:se}),groupCollapsed:Q({},a,{value:oe}),groupEnd:Q({},a,{value:U})})}K<0&&c("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ue=o.ReactCurrentDispatcher,ge;function de(a,p,k){{if(ge===void 0)try{throw Error()}catch(I){var $=I.stack.trim().match(/\n( *(at )?)/);ge=$&&$[1]||""}return`
|
|
18
|
+
`+ge+a}}var fe=!1,we;{var Pe=typeof WeakMap=="function"?WeakMap:Map;we=new Pe}function pe(a,p){if(!a||fe)return"";{var k=we.get(a);if(k!==void 0)return k}var $;fe=!0;var I=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var L;L=ue.current,ue.current=null,ie();try{if(p){var T=function(){throw Error()};if(Object.defineProperty(T.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(T,[])}catch(te){$=te}Reflect.construct(a,[],T)}else{try{T.call()}catch(te){$=te}a.call(T.prototype)}}else{try{throw Error()}catch(te){$=te}a()}}catch(te){if(te&&$&&typeof te.stack=="string"){for(var O=te.stack.split(`
|
|
19
19
|
`),X=$.stack.split(`
|
|
20
|
-
`),
|
|
21
|
-
`+O[
|
|
20
|
+
`),B=O.length-1,V=X.length-1;B>=1&&V>=0&&O[B]!==X[V];)V--;for(;B>=1&&V>=0;B--,V--)if(O[B]!==X[V]){if(B!==1||V!==1)do if(B--,V--,V<0||O[B]!==X[V]){var ce=`
|
|
21
|
+
`+O[B].replace(" at new "," at ");return a.displayName&&ce.includes("<anonymous>")&&(ce=ce.replace("<anonymous>",a.displayName)),typeof a=="function"&&we.set(a,ce),ce}while(B>=1&&V>=0);break}}}finally{fe=!1,ue.current=L,me(),Error.prepareStackTrace=I}var Ie=a?a.displayName||a.name:"",Ce=Ie?de(Ie):"";return typeof a=="function"&&we.set(a,Ce),Ce}function Jn(a,p,k){return pe(a,!1)}function Xn(a){var p=a.prototype;return!!(p&&p.isReactComponent)}function Qe(a,p,k){if(a==null)return"";if(typeof a=="function")return pe(a,Xn(a));if(typeof a=="string")return de(a);switch(a){case S:return de("Suspense");case v:return de("SuspenseList")}if(typeof a=="object")switch(a.$$typeof){case f:return Jn(a.render);case m:return Qe(a.type,p,k);case E:{var $=a,I=$._payload,L=$._init;try{return Qe(L(I),p,k)}catch{}}}return""}var He=Object.prototype.hasOwnProperty,pr={},hr=o.ReactDebugCurrentFrame;function et(a){if(a){var p=a._owner,k=Qe(a.type,a._source,p?p.type:null);hr.setExtraStackFrame(k)}else hr.setExtraStackFrame(null)}function Zn(a,p,k,$,I){{var L=Function.call.bind(He);for(var T in a)if(L(a,T)){var O=void 0;try{if(typeof a[T]!="function"){var X=Error(($||"React class")+": "+k+" type `"+T+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[T]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw X.name="Invariant Violation",X}O=a[T](p,T,$,k,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(B){O=B}O&&!(O instanceof Error)&&(et(I),c("%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).",$||"React class",k,T,typeof O),et(null)),O instanceof Error&&!(O.message in pr)&&(pr[O.message]=!0,et(I),c("Failed %s type: %s",k,O.message),et(null))}}}var Qn=Array.isArray;function $t(a){return Qn(a)}function eo(a){{var p=typeof Symbol=="function"&&Symbol.toStringTag,k=p&&a[Symbol.toStringTag]||a.constructor.name||"Object";return k}}function to(a){try{return mr(a),!1}catch{return!0}}function mr(a){return""+a}function gr(a){if(to(a))return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",eo(a)),mr(a)}var yr=o.ReactCurrentOwner,ro={key:!0,ref:!0,__self:!0,__source:!0},vr,br;function no(a){if(He.call(a,"ref")){var p=Object.getOwnPropertyDescriptor(a,"ref").get;if(p&&p.isReactWarning)return!1}return a.ref!==void 0}function oo(a){if(He.call(a,"key")){var p=Object.getOwnPropertyDescriptor(a,"key").get;if(p&&p.isReactWarning)return!1}return a.key!==void 0}function ao(a,p){typeof a.ref=="string"&&yr.current}function so(a,p){{var k=function(){vr||(vr=!0,c("%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)",p))};k.isReactWarning=!0,Object.defineProperty(a,"key",{get:k,configurable:!0})}}function io(a,p){{var k=function(){br||(br=!0,c("%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)",p))};k.isReactWarning=!0,Object.defineProperty(a,"ref",{get:k,configurable:!0})}}var co=function(a,p,k,$,I,L,T){var O={$$typeof:t,type:a,key:p,ref:k,props:T,_owner:L};return O._store={},Object.defineProperty(O._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(O,"_self",{configurable:!1,enumerable:!1,writable:!1,value:$}),Object.defineProperty(O,"_source",{configurable:!1,enumerable:!1,writable:!1,value:I}),Object.freeze&&(Object.freeze(O.props),Object.freeze(O)),O};function lo(a,p,k,$,I){{var L,T={},O=null,X=null;k!==void 0&&(gr(k),O=""+k),oo(p)&&(gr(p.key),O=""+p.key),no(p)&&(X=p.ref,ao(p,I));for(L in p)He.call(p,L)&&!ro.hasOwnProperty(L)&&(T[L]=p[L]);if(a&&a.defaultProps){var B=a.defaultProps;for(L in B)T[L]===void 0&&(T[L]=B[L])}if(O||X){var V=typeof a=="function"?a.displayName||a.name||"Unknown":a;O&&so(T,V),X&&io(T,V)}return co(a,O,X,I,$,yr.current,T)}}var Rt=o.ReactCurrentOwner,xr=o.ReactDebugCurrentFrame;function Ae(a){if(a){var p=a._owner,k=Qe(a.type,a._source,p?p.type:null);xr.setExtraStackFrame(k)}else xr.setExtraStackFrame(null)}var _t;_t=!1;function jt(a){return typeof a=="object"&&a!==null&&a.$$typeof===t}function wr(){{if(Rt.current){var a=A(Rt.current.type);if(a)return`
|
|
22
22
|
|
|
23
23
|
Check the render method of \``+a+"`."}return""}}function uo(a){return""}var kr={};function fo(a){{var p=wr();if(!p){var k=typeof a=="string"?a:a.displayName||a.name;k&&(p=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+k+">.")}return p}}function Sr(a,p){{if(!a._store||a._store.validated||a.key!=null)return;a._store.validated=!0;var k=fo(p);if(kr[k])return;kr[k]=!0;var $="";a&&a._owner&&a._owner!==Rt.current&&($=" It was passed a child from "+
|
|
25
|
+
Check the top-level render call using <`+k+">.")}return p}}function Sr(a,p){{if(!a._store||a._store.validated||a.key!=null)return;a._store.validated=!0;var k=fo(p);if(kr[k])return;kr[k]=!0;var $="";a&&a._owner&&a._owner!==Rt.current&&($=" It was passed a child from "+A(a._owner.type)+"."),Ae(a),c('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',k,$),Ae(null)}}function Er(a,p){{if(typeof a!="object")return;if($t(a))for(var k=0;k<a.length;k++){var $=a[k];jt($)&&Sr($,p)}else if(jt(a))a._store&&(a._store.validated=!0);else if(a){var I=D(a);if(typeof I=="function"&&I!==a.entries)for(var L=I.call(a),T;!(T=L.next()).done;)jt(T.value)&&Sr(T.value,p)}}}function po(a){{var p=a.type;if(p==null||typeof p=="string")return;var k;if(typeof p=="function")k=p.propTypes;else if(typeof p=="object"&&(p.$$typeof===f||p.$$typeof===m))k=p.propTypes;else return;if(k){var $=A(p);Zn(k,a.props,"prop",$,a)}else if(p.PropTypes!==void 0&&!_t){_t=!0;var I=A(p);c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",I||"Unknown")}typeof p.getDefaultProps=="function"&&!p.getDefaultProps.isReactClassApproved&&c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ho(a){{for(var p=Object.keys(a.props),k=0;k<p.length;k++){var $=p[k];if($!=="children"&&$!=="key"){Ae(a),c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",$),Ae(null);break}}a.ref!==null&&(Ae(a),c("Invalid attribute `ref` supplied to `React.Fragment`."),Ae(null))}}var Cr={};function $r(a,p,k,$,I,L){{var T=Y(a);if(!T){var O="";(a===void 0||typeof a=="object"&&a!==null&&Object.keys(a).length===0)&&(O+=" 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 X=uo();X?O+=X:O+=wr();var B;a===null?B="null":$t(a)?B="array":a!==void 0&&a.$$typeof===t?(B="<"+(A(a.type)||"Unknown")+" />",O=" Did you accidentally export a JSX literal instead of a component?"):B=typeof a,c("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",B,O)}var V=lo(a,p,k,I,L);if(V==null)return V;if(T){var ce=p.children;if(ce!==void 0)if($)if($t(ce)){for(var Ie=0;Ie<ce.length;Ie++)Er(ce[Ie],a);Object.freeze&&Object.freeze(ce)}else c("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 Er(ce,a)}if(He.call(p,"key")){var Ce=A(a),te=Object.keys(p).filter(function(xo){return xo!=="key"}),Ot=te.length>0?"{key: someKey, "+te.join(": ..., ")+": ...}":"{key: someKey}";if(!Cr[Ce+Ot]){var bo=te.length>0?"{"+te.join(": ..., ")+": ...}":"{}";c(`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} />`,Ot,Ce,bo,Ce),Cr[Ce+Ot]=!0}}return a===n?ho(
|
|
31
|
-
`);for(const
|
|
32
|
-
`).match(s);let m=!1;return{items:
|
|
30
|
+
<%s key={someKey} {...props} />`,Ot,Ce,bo,Ce),Cr[Ce+Ot]=!0}}return a===n?ho(V):po(V),V}}function mo(a,p,k){return $r(a,p,k,!0)}function go(a,p,k){return $r(a,p,k,!1)}var yo=go,vo=mo;Ge.Fragment=n,Ge.jsx=yo,Ge.jsxs=vo}()),Ge}process.env.NODE_ENV==="production"?Ut.exports=Eo():Ut.exports=Co();var y=Ut.exports;function Bt(){return Math.random().toString(36).substr(2,9)}function gt(e){return new Intl.DateTimeFormat("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}).format(e)}function $o(e,t){let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>e(...n),t)}}function Ro(e,t){let r;return(...n)=>{r||(e(...n),r=!0,setTimeout(()=>r=!1,t))}}class un{constructor(t){Rr(this,"config");this.config=t}async sendMessage(t,r){const n=`${this.config.apiBaseUrl}/chat/agents/${this.config.agentId}`,s={message:t,sessionId:r},l=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json","api-key":this.config.apiKey,accept:"application/json"},body:JSON.stringify(s)});if(!l.ok){const d=await l.json();throw new Error(`API Error: ${d.detail}`)}if(!l.body)throw new Error("No response body");return l.body}async createSession(){const t=`${this.config.apiBaseUrl}/sessions`,r=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json","api-key":this.config.apiKey,accept:"application/json"},body:JSON.stringify({name:"Chat Session",agentConfig:{type:"chat",settings:null}})});if(!r.ok){const n=await r.json();throw new Error(`API Error: ${n.detail}`)}return r.json()}async getAgents(){const t=`${this.config.apiBaseUrl}/chat/agents`,r=await fetch(t,{method:"GET",headers:{"api-key":this.config.apiKey,accept:"application/json"}});if(!r.ok){const s=await r.json();throw new Error(`API Error: ${s.detail}`)}return(await r.json()).agents||[]}async getSessions(){const t=`${this.config.apiBaseUrl}/sessions`,r=await fetch(t,{method:"GET",headers:{"api-key":this.config.apiKey,accept:"application/json"}});if(!r.ok){const n=await r.json();throw new Error(`API Error: ${n.detail}`)}return r.json()}}function dn(e){try{if(e.startsWith("data: ")){const t=e.slice(6);return t==="[DONE]"?{text:"",sessionId:"",type:"done"}:JSON.parse(t)}}catch(t){console.warn("Failed to parse streaming response:",t)}return null}function fn(e){const[t,r]=_.useState([]),[n,s]=_.useState(!1),[l,d]=_.useState(null),[u,f]=_.useState(null),[S,v]=_.useState(!1),[m,E]=_.useState(!1),w=_.useRef(null),j=_.useRef(!1);w.current||(w.current=new un({apiKey:e.apiKey,apiBaseUrl:e.apiBaseUrl||"https://api.ordify.ai",agentId:e.agentId}));const C=_.useCallback(()=>{d(null)},[]),D=_.useCallback(async o=>{if(!(!o.trim()||n)){s(!0),d(null);try{const c={id:Bt(),content:o.trim(),role:"user",timestamp:new Date,sessionId:u||void 0};r(P=>[...P,c]);let i=u;i||(i=(await w.current.createSession()).id,f(i),e.onSessionCreated&&e.onSessionCreated(i));const h=(await w.current.sendMessage(o.trim(),i)).getReader(),b=new TextDecoder;let x={id:Bt(),content:"",role:"assistant",timestamp:new Date,sessionId:i};for(r(P=>[...P,x]);;){const{done:P,value:F}=await h.read();if(P)break;const M=b.decode(F,{stream:!0}).split(`
|
|
31
|
+
`);for(const H of M){const A=dn(H);if(A){if(A.type==="stream"&&A.text)r(Q=>Q.map(K=>K.id===x.id?{...K,content:K.content+A.text}:K));else if(A.type==="done")break}}}e.onMessage&&e.onMessage(x)}catch(c){const i=c instanceof Error?c.message:"Failed to send message";d(i),e.onError&&e.onError(c instanceof Error?c:new Error(i))}finally{s(!1)}}},[e.onSessionCreated,e.onMessage,e.onError,n,u]);return _.useEffect(()=>{e.initialMessage&&!m&&!n&&!j.current&&(E(!0),j.current=!0,setTimeout(()=>{D(e.initialMessage)},0))},[e.initialMessage,m,n,D]),{messages:t,sendMessage:D,isLoading:n,error:l,clearError:C,sessionId:u,isOpen:S,setIsOpen:v}}function pn(e){return _.useMemo(()=>{const t=e.agentId||process.env.ORDIFY_AGENT_ID,r=e.apiKey||process.env.ORDIFY_API_KEY,n=e.apiBaseUrl||process.env.ORDIFY_API_BASE_URL||"https://r.ordify.ai";if(!t)throw new Error("Ordify agent ID is required. Provide agentId prop or set ORDIFY_AGENT_ID environment variable.");if(!r)throw new Error("Ordify API key is required. Provide apiKey prop or set ORDIFY_API_KEY environment variable.");return{agentId:t,apiKey:r,apiBaseUrl:n,mode:e.mode||"floating",position:e.position||"bottom-right",theme:e.theme||"light",placeholder:e.placeholder||"Type a message...",height:e.height||"500px",className:e.className||"",buttonStyle:e.buttonStyle||{},chatWindowStyle:e.chatWindowStyle||{},showHeader:e.showHeader!==!1,onMessage:e.onMessage,onError:e.onError,onClose:e.onClose,onSessionCreated:e.onSessionCreated,initialMessage:e.initialMessage}},[e])}function $e(){return $e=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$e.apply(this,arguments)}const _o=["children","options"],Or=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{class:"className",for:"htmlFor"}),Tr={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},jo=["style","script","pre"],Oo=["src","href","data","formAction","srcDoc","action"],To=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,Po=/mailto:/i,Ao=/\n{2,}$/,Pr=/^(\s*>[\s\S]*?)(?=\n\n|$)/,Io=/^ *> ?/gm,No=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,Do=/^ {2,}\n/,Mo=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,Ar=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,Ir=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,Fo=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,Lo=/^(?:\n *)*\n/,zo=/\r\n?/g,Uo=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,Bo=/^\[\^([^\]]+)]/,Vo=/\f/g,Wo=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,Yo=/^\s*?\[(x|\s)\]/,Nr=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Dr=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Mr=/^([^\n]+)\n *(=|-){3,} *\n/,Tt=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,Ho=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,Fr=/^<!--[\s\S]*?(?:-->)/,Ko=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,Pt=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,Go=/^\{.*\}$/,qo=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,Jo=/^<([^ >]+@[^ >]+)>/,Xo=/^<([^ >]+:\/[^ >]+)>/,Zo=/-([a-z])?/gi,Lr=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,Qo=/^[^\n]+(?: \n|\n{2,})/,ea=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,ta=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,ra=/^\[([^\]]*)\] ?\[([^\]]*)\]/,na=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,oa=/\t/g,aa=/(^ *\||\| *$)/g,sa=/^ *:-+: *$/,ia=/^ *:-+ *$/,ca=/^ *-+: *$/,yt=e=>`(?=[\\s\\S]+?\\1${e?"\\1":""})`,vt="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)",la=RegExp(`^([*_])\\1${yt(1)}${vt}\\1\\1(?!\\1)`),ua=RegExp(`^([*_])${yt(0)}${vt}\\1(?!\\1)`),da=RegExp(`^(==)${yt(0)}${vt}\\1`),fa=RegExp(`^(~~)${yt(0)}${vt}\\1`),pa=/^(:[a-zA-Z0-9-_]+:)/,ha=/^\\([^0-9A-Za-z\s])/,ma=/\\([^0-9A-Za-z\s])/g,ga=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,ya=/^\n+/,va=/^([ \t]*)/,ba=/(?:^|\n)( *)$/,Zt="(?:\\d+\\.)",Qt="(?:[*+-])";function hn(e){return"( *)("+(e===1?Zt:Qt)+") +"}const mn=hn(1),gn=hn(2);function yn(e){return RegExp("^"+(e===1?mn:gn))}const xa=yn(1),wa=yn(2);function vn(e){return RegExp("^"+(e===1?mn:gn)+"[^\\n]*(?:\\n(?!\\1"+(e===1?Zt:Qt)+" )[^\\n]*)*(\\n|$)","gm")}const ka=vn(1),Sa=vn(2);function bn(e){const t=e===1?Zt:Qt;return RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const xn=bn(1),wn=bn(2);function zr(e,t){const r=t===1,n=r?xn:wn,s=r?ka:Sa,l=r?xa:wa;return{t:d=>l.test(d),o:De(function(d,u){const f=ba.exec(u.prevCapture);return f&&(u.list||!u.inline&&!u.simple)?n.exec(d=f[1]+d):null}),i:1,u(d,u,f){const S=r?+d[2]:void 0,v=d[0].replace(Ao,`
|
|
32
|
+
`).match(s);let m=!1;return{items:v.map(function(E,w){const j=l.exec(E)[0].length,C=RegExp("^ {1,"+j+"}","gm"),D=E.replace(C,"").replace(l,""),o=w===v.length-1,c=D.indexOf(`
|
|
33
33
|
|
|
34
|
-
`)!==-1||o&&m;m=
|
|
34
|
+
`)!==-1||o&&m;m=c;const i=f.inline,g=f.list;let h;f.list=!0,c?(f.inline=!1,h=Xe(D)+`
|
|
35
35
|
|
|
36
|
-
`):(f.inline=!0,h=Xe(
|
|
37
|
-
`).map(function(S){return Ur(S,u,f,!0)})}(e[3],t,r):[],l=Ur(e[1],t,r,!!s.length);return r.inline=!1,s.length?{align:n,cells:s,header:l,type:"25"}:{children:l,type:"21"}}function Br(e,t){return e.align[t]==null?{}:{textAlign:e.align[t]}}function De(e){return e.inline=1,e}function ke(e){return De(function(t,r){return r.inline?e.exec(t):null})}function Se(e){return De(function(t,r){return r.inline||r.simple?e.exec(t):null})}function be(e){return function(t,r){return r.inline||r.simple?null:e.exec(t)}}function tt(e){return De(function(t){return e.exec(t)})}const ja=/(javascript|vbscript|data(?!:image)):/i;function Oa(e){try{const t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(ja.test(t))return null}catch{return null}return e}function ye(e){return e&&e.replace(ma,"$1")}function it(e,t,r){const n=r.inline||!1,s=r.simple||!1;r.inline=!0,r.simple=!0;const l=e(t,r);return r.inline=n,r.simple=s,l}function Ta(e,t,r){const n=r.inline||!1,s=r.simple||!1;r.inline=!1,r.simple=!0;const l=e(t,r);return r.inline=n,r.simple=s,l}function Pa(e,t,r){const n=r.inline||!1;r.inline=!1;const s=e(t,r);return r.inline=n,s}const At=(e,t,r)=>({children:it(t,e[2],r)});function It(){return{}}function Nt(){return null}function Aa(...e){return e.filter(Boolean).join(" ")}function Dt(e,t,r){let n=e;const s=t.split(".");for(;s.length&&(n=n[s[0]],n!==void 0);)s.shift();return n||r}function Ia(e="",t={}){t.overrides=t.overrides||{},t.namedCodesToUnicode=t.namedCodesToUnicode?$e({},Tr,t.namedCodesToUnicode):Tr;const r=t.slugify||qe,n=t.sanitizer||Oa,s=t.createElement||ln.createElement,l=[Pr,Ar,Ir,t.enforceAtxHeadings?Dr:Nr,Mr,Lr,xn,wn],d=[...l,Qo,Tt,Fr,Pt];function u(o,i
|
|
36
|
+
`):(f.inline=!0,h=Xe(D));const b=u(h,f);return f.inline=i,f.list=g,b}),ordered:r,start:S}},l:(d,u,f)=>e(d.ordered?"ol":"ul",{key:f.key,start:d.type==="20"?d.start:void 0},d.items.map(function(S,v){return e("li",{key:v},u(S,f))}))}}const Ea=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),Ca=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function Xe(e){let t=e.length;for(;t>0&&e[t-1]<=" ";)t--;return e.slice(0,t)}function st(e,t){return e.startsWith(t)}function $a(e,t,r){if(Array.isArray(r)){for(let n=0;n<r.length;n++)if(st(e,r[n]))return!0;return!1}return r(e,t)}function qe(e){return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function Ra(e){return ca.test(e)?"right":sa.test(e)?"center":ia.test(e)?"left":null}function Ur(e,t,r,n){const s=r.inTable;r.inTable=!0;let l=[[]],d="";function u(){if(!d)return;const f=l[l.length-1];f.push.apply(f,t(d,r)),d=""}return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((f,S,v)=>{f.trim()==="|"&&(u(),n)?S!==0&&S!==v.length-1&&l.push([]):d+=f}),u(),r.inTable=s,l}function _a(e,t,r){r.inline=!0;const n=e[2]?e[2].replace(aa,"").split("|").map(Ra):[],s=e[3]?function(d,u,f){return d.trim().split(`
|
|
37
|
+
`).map(function(S){return Ur(S,u,f,!0)})}(e[3],t,r):[],l=Ur(e[1],t,r,!!s.length);return r.inline=!1,s.length?{align:n,cells:s,header:l,type:"25"}:{children:l,type:"21"}}function Br(e,t){return e.align[t]==null?{}:{textAlign:e.align[t]}}function De(e){return e.inline=1,e}function ke(e){return De(function(t,r){return r.inline?e.exec(t):null})}function Se(e){return De(function(t,r){return r.inline||r.simple?e.exec(t):null})}function be(e){return function(t,r){return r.inline||r.simple?null:e.exec(t)}}function tt(e){return De(function(t){return e.exec(t)})}const ja=/(javascript|vbscript|data(?!:image)):/i;function Oa(e){try{const t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(ja.test(t))return null}catch{return null}return e}function ye(e){return e&&e.replace(ma,"$1")}function it(e,t,r){const n=r.inline||!1,s=r.simple||!1;r.inline=!0,r.simple=!0;const l=e(t,r);return r.inline=n,r.simple=s,l}function Ta(e,t,r){const n=r.inline||!1,s=r.simple||!1;r.inline=!1,r.simple=!0;const l=e(t,r);return r.inline=n,r.simple=s,l}function Pa(e,t,r){const n=r.inline||!1;r.inline=!1;const s=e(t,r);return r.inline=n,s}const At=(e,t,r)=>({children:it(t,e[2],r)});function It(){return{}}function Nt(){return null}function Aa(...e){return e.filter(Boolean).join(" ")}function Dt(e,t,r){let n=e;const s=t.split(".");for(;s.length&&(n=n[s[0]],n!==void 0);)s.shift();return n||r}function Ia(e="",t={}){t.overrides=t.overrides||{},t.namedCodesToUnicode=t.namedCodesToUnicode?$e({},Tr,t.namedCodesToUnicode):Tr;const r=t.slugify||qe,n=t.sanitizer||Oa,s=t.createElement||ln.createElement,l=[Pr,Ar,Ir,t.enforceAtxHeadings?Dr:Nr,Mr,Lr,xn,wn],d=[...l,Qo,Tt,Fr,Pt];function u(o,c,...i){const g=Dt(t.overrides,o+".props",{});return s(function(h,b){const x=Dt(b,h);return x?typeof x=="function"||typeof x=="object"&&"render"in x?x:Dt(b,h+".component",h):h}(o,t.overrides),$e({},c,g,{className:Aa(c==null?void 0:c.className,g.className)||void 0}),...i)}function f(o){o=o.replace(Wo,"");let c=!1;t.forceInline?c=!0:t.forceBlock||(c=na.test(o)===!1);const i=j(w(c?o:Xe(o).replace(ya,"")+`
|
|
38
38
|
|
|
39
|
-
`,{inline:
|
|
40
|
-
`},21:{o:De(function(o,
|
|
39
|
+
`,{inline:c}));for(;typeof i[i.length-1]=="string"&&!i[i.length-1].trim();)i.pop();if(t.wrapper===null)return i;const g=t.wrapper||(c?"span":"div");let h;if(i.length>1||t.forceWrapper)h=i;else{if(i.length===1)return h=i[0],typeof h=="string"?u("span",{key:"outer"},h):h;h=null}return s(g,{key:"outer"},h)}function S(o,c){if(!c||!c.trim())return null;const i=c.match(To);return i?i.reduce(function(g,h){const b=h.indexOf("=");if(b!==-1){const x=function(M){return M.indexOf("-")!==-1&&M.match(Ko)===null&&(M=M.replace(Zo,function(H,A){return A.toUpperCase()})),M}(h.slice(0,b)).trim(),P=function(M){const H=M[0];return(H==='"'||H==="'")&&M.length>=2&&M[M.length-1]===H?M.slice(1,-1):M}(h.slice(b+1).trim()),F=Or[x]||x;if(F==="ref")return g;const Y=g[F]=function(M,H,A,Q){return H==="style"?function(K){const ae=[];let ee="",ne=!1,q=!1,se="";if(!K)return ae;for(let U=0;U<K.length;U++){const J=K[U];if(J!=='"'&&J!=="'"||ne||(q?J===se&&(q=!1,se=""):(q=!0,se=J)),J==="("&&ee.endsWith("url")?ne=!0:J===")"&&ne&&(ne=!1),J!==";"||q||ne)ee+=J;else{const ie=ee.trim();if(ie){const me=ie.indexOf(":");if(me>0){const ue=ie.slice(0,me).trim(),ge=ie.slice(me+1).trim();ae.push([ue,ge])}}ee=""}}const oe=ee.trim();if(oe){const U=oe.indexOf(":");if(U>0){const J=oe.slice(0,U).trim(),ie=oe.slice(U+1).trim();ae.push([J,ie])}}return ae}(A).reduce(function(K,[ae,ee]){return K[ae.replace(/(-[a-z])/g,ne=>ne[1].toUpperCase())]=Q(ee,M,ae),K},{}):Oo.indexOf(H)!==-1?Q(ye(A),M,H):(A.match(Go)&&(A=ye(A.slice(1,A.length-1))),A==="true"||A!=="false"&&A)}(o,x,P,n);typeof Y=="string"&&(Tt.test(Y)||Pt.test(Y))&&(g[F]=f(Y.trim()))}else h!=="style"&&(g[Or[h]||h]=!0);return g},{}):null}const v=[],m={},E={0:{t:[">"],o:be(Pr),i:1,u(o,c,i){const[,g,h]=o[0].replace(Io,"").match(No);return{alert:g,children:c(h,i)}},l(o,c,i){const g={key:i.key};return o.alert&&(g.className="markdown-alert-"+r(o.alert.toLowerCase(),qe),o.children.unshift({attrs:{},children:[{type:"27",text:o.alert}],noInnerParse:!0,type:"11",tag:"header"})),u("blockquote",g,c(o.children,i))}},1:{o:tt(Do),i:1,u:It,l:(o,c,i)=>u("br",{key:i.key})},2:{t:o=>{const c=o[0];return c==="-"||c==="*"||c==="_"},o:be(Mo),i:1,u:It,l:(o,c,i)=>u("hr",{key:i.key})},3:{t:[" "],o:be(Ir),i:0,u:o=>({lang:void 0,text:ye(Xe(o[0].replace(/^ {4}/gm,"")))}),l:(o,c,i)=>u("pre",{key:i.key},u("code",$e({},o.attrs,{className:o.lang?"lang-"+o.lang:""}),o.text))},4:{t:["```","~~~"],o:be(Ar),i:0,u:o=>({attrs:S("code",o[3]||""),lang:o[2]||void 0,text:o[4],type:"3"})},5:{t:["`"],o:Se(Fo),i:3,u:o=>({text:ye(o[2])}),l:(o,c,i)=>u("code",{key:i.key},o.text)},6:{t:["[^"],o:be(Uo),i:0,u:o=>(v.push({footnote:o[2],identifier:o[1]}),{}),l:Nt},7:{t:["[^"],o:ke(Bo),i:1,u:o=>({target:"#"+r(o[1],qe),text:o[1]}),l:(o,c,i)=>u("a",{key:i.key,href:n(o.target,"a","href")},u("sup",{key:i.key},o.text))},8:{t:["[ ]","[x]"],o:ke(Yo),i:1,u:o=>({completed:o[1].toLowerCase()==="x"}),l:(o,c,i)=>u("input",{checked:o.completed,key:i.key,readOnly:!0,type:"checkbox"})},9:{t:["#"],o:be(t.enforceAtxHeadings?Dr:Nr),i:1,u:(o,c,i)=>({children:it(c,o[2],i),id:r(o[2],qe),level:o[1].length}),l:(o,c,i)=>u("h"+o.level,{id:o.id,key:i.key},c(o.children,i))},10:{o:be(Mr),i:0,u:(o,c,i)=>({children:it(c,o[1],i),level:o[2]==="="?1:2,type:"9"})},11:{t:["<"],o:tt(Tt),i:1,u(o,c,i){const[,g]=o[3].match(va),h=RegExp("^"+g,"gm"),b=o[3].replace(h,""),x=(P=b,d.some(A=>A.test(P))?Pa:it);var P;const F=o[1].toLowerCase(),Y=jo.indexOf(F)!==-1,M=(Y?F:o[1]).trim(),H={attrs:S(M,o[2]),noInnerParse:Y,tag:M};if(i.inAnchor=i.inAnchor||F==="a",Y)H.text=o[3];else{const A=i.inHTML;i.inHTML=!0,H.children=x(c,b,i),i.inHTML=A}return i.inAnchor=!1,H},l:(o,c,i)=>u(o.tag,$e({key:i.key},o.attrs),o.text||(o.children?c(o.children,i):""))},13:{t:["<"],o:tt(Pt),i:1,u(o){const c=o[1].trim();return{attrs:S(c,o[2]||""),tag:c}},l:(o,c,i)=>u(o.tag,$e({},o.attrs,{key:i.key}))},12:{t:["<!--"],o:tt(Fr),i:1,u:()=>({}),l:Nt},14:{t:["!["],o:Se(Ca),i:1,u:o=>({alt:ye(o[1]),target:ye(o[2]),title:ye(o[3])}),l:(o,c,i)=>u("img",{key:i.key,alt:o.alt||void 0,title:o.title||void 0,src:n(o.target,"img","src")})},15:{t:["["],o:ke(Ea),i:3,u:(o,c,i)=>({children:Ta(c,o[1],i),target:ye(o[2]),title:ye(o[3])}),l:(o,c,i)=>u("a",{key:i.key,href:n(o.target,"a","href"),title:o.title},c(o.children,i))},16:{t:["<"],o:ke(Xo),i:0,u:o=>({children:[{text:o[1],type:"27"}],target:o[1],type:"15"})},17:{t:(o,c)=>!c.inAnchor&&!t.disableAutoLink&&(st(o,"http://")||st(o,"https://")),o:ke(qo),i:0,u:o=>({children:[{text:o[1],type:"27"}],target:o[1],title:void 0,type:"15"})},18:{t:["<"],o:ke(Jo),i:0,u(o){let c=o[1],i=o[1];return Po.test(i)||(i="mailto:"+i),{children:[{text:c.replace("mailto:",""),type:"27"}],target:i,type:"15"}}},20:zr(u,1),33:zr(u,2),19:{o:be(Lo),i:3,u:It,l:()=>`
|
|
40
|
+
`},21:{o:De(function(o,c){if(c.inline||c.simple||c.inHTML&&o.indexOf(`
|
|
41
41
|
|
|
42
|
-
`)===-1&&
|
|
42
|
+
`)===-1&&c.prevCapture.indexOf(`
|
|
43
43
|
|
|
44
|
-
`)===-1)return null;let
|
|
44
|
+
`)===-1)return null;let i="";o.split(`
|
|
45
45
|
`).every(h=>(h+=`
|
|
46
|
-
`,!l.some(
|
|
47
|
-
`).replace(Vo,"").replace(oa," ")}(g),h)}}(E),j=(C=function(o,i){return function(c,g,h){const v=o[c.type].l;return i?i(()=>v(c,g,h),c,g,h):v(c,g,h)}}(E,t.renderRule),function o(i,c={}){if(Array.isArray(i)){const g=c.key,h=[];let v=!1;for(let y=0;y<i.length;y++){c.key=y;const D=o(i[y],c),L=typeof D=="string";L&&v?h[h.length-1]+=D:D!==null&&h.push(D),v=L}return c.key=g,h}return C(i,o,c)});var C;const N=f(e);return x.length?u("div",null,N,u("footer",{key:"footer"},x.map(function(o){return u("div",{id:r(o.identifier,qe),key:o.identifier},o.identifier,j(w(o.footnote,{inline:!0})))}))):N}const Na=e=>{let{children:t="",options:r}=e,n=function(s,l){if(s==null)return{};var d,u,f={},S=Object.keys(s);for(u=0;u<S.length;u++)l.indexOf(d=S[u])>=0||(f[d]=s[d]);return f}(e,_o);return ln.cloneElement(Ia(t,r),n)};function bt({content:e,className:t}){return b.jsx("div",{className:t,children:b.jsx(Na,{options:{overrides:{p:{props:{className:"mb-3 last:mb-0 leading-relaxed text-gray-900 dark:text-gray-100"}},strong:{props:{className:"font-semibold text-gray-900 dark:text-white dark:font-bold"}},em:{props:{className:"italic text-gray-700"}},code:{props:{className:"bg-gray-100 px-1.5 py-0.5 rounded text-sm font-mono text-gray-800"}},pre:{props:{className:"bg-gray-100 p-3 rounded-md text-sm font-mono text-gray-800 overflow-x-auto mb-3"}},ul:{props:{className:"list-disc list-inside mb-3 space-y-1 ml-2"}},ol:{props:{className:"list-decimal list-inside mb-3 space-y-1 ml-2"}},li:{props:{className:"leading-relaxed"}},blockquote:{props:{className:"border-l-4 border-blue-300 pl-4 italic mb-3 text-gray-700 bg-blue-50 py-2 rounded-r"}},h1:{props:{className:"text-xl font-bold mb-3 text-gray-900"}},h2:{props:{className:"text-lg font-bold mb-2 text-gray-900"}},h3:{props:{className:"text-base font-bold mb-2 text-gray-900"}},h4:{props:{className:"text-sm font-bold mb-2 text-gray-900"}},h5:{props:{className:"text-sm font-bold mb-2 text-gray-900"}},h6:{props:{className:"text-sm font-bold mb-2 text-gray-900"}},hr:{props:{className:"my-4 border-gray-200"}},a:{props:{className:"text-blue-600 hover:text-blue-800 underline",target:"_blank",rel:"noopener noreferrer"}}}},children:e})})}var re=function(){return re=Object.assign||function(t){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(t[l]=r[l])}return t},re.apply(this,arguments)};function Me(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,l;n<s;n++)(l||!(n in t))&&(l||(l=Array.prototype.slice.call(t,0,n)),l[n]=t[n]);return e.concat(l||Array.prototype.slice.call(t))}function Da(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Ma=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Fa=Da(function(e){return Ma.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),z="-ms-",Ze="-moz-",A="-webkit-",kn="comm",xt="rule",er="decl",La="@import",Sn="@keyframes",za="@layer",En=Math.abs,tr=String.fromCharCode,Vt=Object.assign;function Ua(e,t){return K(e,0)^45?(((t<<2^K(e,0))<<2^K(e,1))<<2^K(e,2))<<2^K(e,3):0}function Cn(e){return e.trim()}function xe(e,t){return(e=t.exec(e))?e[0]:e}function R(e,t,r){return e.replace(t,r)}function ct(e,t,r){return e.indexOf(t,r)}function K(e,t){return e.charCodeAt(t)|0}function Fe(e,t,r){return e.slice(t,r)}function ve(e){return e.length}function $n(e){return e.length}function Je(e,t){return t.push(e),e}function Ba(e,t){return e.map(t).join("")}function Vr(e,t){return e.filter(function(r){return!xe(r,t)})}var wt=1,Le=1,Rn=0,le=0,H=0,We="";function kt(e,t,r,n,s,l,d,u){return{value:e,root:t,parent:r,type:n,props:s,children:l,line:wt,column:Le,length:d,return:"",siblings:u}}function Ee(e,t){return Vt(kt("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function Ne(e){for(;e.root;)e=Ee(e.root,{children:[e]});Je(e,e.siblings)}function Va(){return H}function Wa(){return H=le>0?K(We,--le):0,Le--,H===10&&(Le=1,wt--),H}function he(){return H=le<Rn?K(We,le++):0,Le++,H===10&&(Le=1,wt++),H}function je(){return K(We,le)}function lt(){return le}function St(e,t){return Fe(We,e,t)}function Wt(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 Ya(e){return wt=Le=1,Rn=ve(We=e),le=0,[]}function Ha(e){return We="",e}function Mt(e){return Cn(St(le-1,Yt(e===91?e+2:e===40?e+1:e)))}function Ka(e){for(;(H=je())&&H<33;)he();return Wt(e)>2||Wt(H)>3?"":" "}function Ga(e,t){for(;--t&&he()&&!(H<48||H>102||H>57&&H<65||H>70&&H<97););return St(e,lt()+(t<6&&je()==32&&he()==32))}function Yt(e){for(;he();)switch(H){case e:return le;case 34:case 39:e!==34&&e!==39&&Yt(H);break;case 40:e===41&&Yt(e);break;case 92:he();break}return le}function qa(e,t){for(;he()&&e+H!==57;)if(e+H===84&&je()===47)break;return"/*"+St(t,le-1)+"*"+tr(e===47?e:he())}function Ja(e){for(;!Wt(je());)he();return St(e,le)}function Xa(e){return Ha(ut("",null,null,null,[""],e=Ya(e),0,[0],e))}function ut(e,t,r,n,s,l,d,u,f){for(var S=0,x=0,m=d,E=0,w=0,j=0,C=1,N=1,o=1,i=0,c="",g=s,h=l,v=n,y=c;N;)switch(j=i,i=he()){case 40:if(j!=108&&K(y,m-1)==58){ct(y+=R(Mt(i),"&","&\f"),"&\f",En(S?u[S-1]:0))!=-1&&(o=-1);break}case 34:case 39:case 91:y+=Mt(i);break;case 9:case 10:case 13:case 32:y+=Ka(j);break;case 92:y+=Ga(lt()-1,7);continue;case 47:switch(je()){case 42:case 47:Je(Za(qa(he(),lt()),t,r,f),f);break;default:y+="/"}break;case 123*C:u[S++]=ve(y)*o;case 125*C:case 59:case 0:switch(i){case 0:case 125:N=0;case 59+x:o==-1&&(y=R(y,/\f/g,"")),w>0&&ve(y)-m&&Je(w>32?Yr(y+";",n,r,m-1,f):Yr(R(y," ","")+";",n,r,m-2,f),f);break;case 59:y+=";";default:if(Je(v=Wr(y,t,r,S,x,s,u,c,g=[],h=[],m,l),l),i===123)if(x===0)ut(y,t,v,v,g,l,m,u,h);else switch(E===99&&K(y,3)===110?100:E){case 100:case 108:case 109:case 115:ut(e,v,v,n&&Je(Wr(e,v,v,0,0,s,u,c,s,g=[],m,h),h),s,h,m,u,n?g:h);break;default:ut(y,v,v,v,[""],h,0,u,h)}}S=x=w=0,C=o=1,c=y="",m=d;break;case 58:m=1+ve(y),w=j;default:if(C<1){if(i==123)--C;else if(i==125&&C++==0&&Wa()==125)continue}switch(y+=tr(i),i*C){case 38:o=x>0?1:(y+="\f",-1);break;case 44:u[S++]=(ve(y)-1)*o,o=1;break;case 64:je()===45&&(y+=Mt(he())),E=je(),x=m=ve(c=y+=Ja(lt())),i++;break;case 45:j===45&&ve(y)==2&&(C=0)}}return l}function Wr(e,t,r,n,s,l,d,u,f,S,x,m){for(var E=s-1,w=s===0?l:[""],j=$n(w),C=0,N=0,o=0;C<n;++C)for(var i=0,c=Fe(e,E+1,E=En(N=d[C])),g=e;i<j;++i)(g=Cn(N>0?w[i]+" "+c:R(c,/&\f/g,w[i])))&&(f[o++]=g);return kt(e,t,r,s===0?xt:u,f,S,x,m)}function Za(e,t,r,n){return kt(e,t,r,kn,tr(Va()),Fe(e,2,-2),0,n)}function Yr(e,t,r,n,s){return kt(e,t,r,er,Fe(e,0,n),Fe(e,n+1,-1),n,s)}function _n(e,t,r){switch(Ua(e,t)){case 5103:return A+"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 A+e+e;case 4789:return Ze+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return A+e+Ze+e+z+e+e;case 5936:switch(K(e,t+11)){case 114:return A+e+z+R(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return A+e+z+R(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return A+e+z+R(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return A+e+z+e+e;case 6165:return A+e+z+"flex-"+e+e;case 5187:return A+e+R(e,/(\w+).+(:[^]+)/,A+"box-$1$2"+z+"flex-$1$2")+e;case 5443:return A+e+z+"flex-item-"+R(e,/flex-|-self/g,"")+(xe(e,/flex-|baseline/)?"":z+"grid-row-"+R(e,/flex-|-self/g,""))+e;case 4675:return A+e+z+"flex-line-pack"+R(e,/align-content|flex-|-self/g,"")+e;case 5548:return A+e+z+R(e,"shrink","negative")+e;case 5292:return A+e+z+R(e,"basis","preferred-size")+e;case 6060:return A+"box-"+R(e,"-grow","")+A+e+z+R(e,"grow","positive")+e;case 4554:return A+R(e,/([^-])(transform)/g,"$1"+A+"$2")+e;case 6187:return R(R(R(e,/(zoom-|grab)/,A+"$1"),/(image-set)/,A+"$1"),e,"")+e;case 5495:case 3959:return R(e,/(image-set\([^]*)/,A+"$1$`$1");case 4968:return R(R(e,/(.+:)(flex-)?(.*)/,A+"box-pack:$3"+z+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+A+e+e;case 4200:if(!xe(e,/flex-|baseline/))return z+"grid-column-align"+Fe(e,t)+e;break;case 2592:case 3360:return z+R(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(n,s){return t=s,xe(n.props,/grid-\w+-end/)})?~ct(e+(r=r[t].value),"span",0)?e:z+R(e,"-start","")+e+z+"grid-row-span:"+(~ct(r,"span",0)?xe(r,/\d+/):+xe(r,/\d+/)-+xe(e,/\d+/))+";":z+R(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(n){return xe(n.props,/grid-\w+-start/)})?e:z+R(R(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return R(e,/(.+)-inline(.+)/,A+"$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(ve(e)-1-t>6)switch(K(e,t+1)){case 109:if(K(e,t+4)!==45)break;case 102:return R(e,/(.+:)(.+)-([^]+)/,"$1"+A+"$2-$3$1"+Ze+(K(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~ct(e,"stretch",0)?_n(R(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return R(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(n,s,l,d,u,f,S){return z+s+":"+l+S+(d?z+s+"-span:"+(u?f:+f-+l)+S:"")+e});case 4949:if(K(e,t+6)===121)return R(e,":",":"+A)+e;break;case 6444:switch(K(e,K(e,14)===45?18:11)){case 120:return R(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+A+(K(e,14)===45?"inline-":"")+"box$3$1"+A+"$2$3$1"+z+"$2box$3")+e;case 100:return R(e,":",":"+z)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return R(e,"scroll-","scroll-snap-")+e}return e}function pt(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function Qa(e,t,r,n){switch(e.type){case za:if(e.children.length)break;case La:case er:return e.return=e.return||e.value;case kn:return"";case Sn:return e.return=e.value+"{"+pt(e.children,n)+"}";case xt:if(!ve(e.value=e.props.join(",")))return""}return ve(r=pt(e.children,n))?e.return=e.value+"{"+r+"}":""}function es(e){var t=$n(e);return function(r,n,s,l){for(var d="",u=0;u<t;u++)d+=e[u](r,n,s,l)||"";return d}}function ts(e){return function(t){t.root||(t=t.return)&&e(t)}}function rs(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case er:e.return=_n(e.value,e.length,r);return;case Sn:return pt([Ee(e,{value:R(e.value,"@","@"+A)})],n);case xt:if(e.length)return Ba(r=e.props,function(s){switch(xe(s,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":Ne(Ee(e,{props:[R(s,/:(read-\w+)/,":"+Ze+"$1")]})),Ne(Ee(e,{props:[s]})),Vt(e,{props:Vr(r,n)});break;case"::placeholder":Ne(Ee(e,{props:[R(s,/:(plac\w+)/,":"+A+"input-$1")]})),Ne(Ee(e,{props:[R(s,/:(plac\w+)/,":"+Ze+"$1")]})),Ne(Ee(e,{props:[R(s,/:(plac\w+)/,z+"input-$1")]})),Ne(Ee(e,{props:[s]})),Vt(e,{props:Vr(r,n)});break}return""})}}var ns={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,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=typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",jn="active",On="data-styled-version",Et="6.1.19",rr=`/*!sc*/
|
|
46
|
+
`,!l.some(b=>b.test(h))&&(i+=h,!!h.trim())));const g=Xe(i);return g===""?null:[i,,g]}),i:3,u:At,l:(o,c,i)=>u("p",{key:i.key},c(o.children,i))},22:{t:["["],o:ke(ea),i:0,u:o=>(m[o[1]]={target:o[2],title:o[4]},{}),l:Nt},23:{t:["!["],o:Se(ta),i:0,u:o=>({alt:o[1]?ye(o[1]):void 0,ref:o[2]}),l:(o,c,i)=>m[o.ref]?u("img",{key:i.key,alt:o.alt,src:n(m[o.ref].target,"img","src"),title:m[o.ref].title}):null},24:{t:o=>o[0]==="["&&o.indexOf("](")===-1,o:ke(ra),i:0,u:(o,c,i)=>({children:c(o[1],i),fallbackChildren:o[0],ref:o[2]}),l:(o,c,i)=>m[o.ref]?u("a",{key:i.key,href:n(m[o.ref].target,"a","href"),title:m[o.ref].title},c(o.children,i)):u("span",{key:i.key},o.fallbackChildren)},25:{t:["|"],o:be(Lr),i:1,u:_a,l(o,c,i){const g=o;return u("table",{key:i.key},u("thead",null,u("tr",null,g.header.map(function(h,b){return u("th",{key:b,style:Br(g,b)},c(h,i))}))),u("tbody",null,g.cells.map(function(h,b){return u("tr",{key:b},h.map(function(x,P){return u("td",{key:P,style:Br(g,P)},c(x,i))}))})))}},27:{o:De(function(o,c){let i;return st(o,":")&&(i=pa.exec(o)),i||ga.exec(o)}),i:4,u(o){const c=o[0];return{text:c.indexOf("&")===-1?c:c.replace(Ho,(i,g)=>t.namedCodesToUnicode[g]||i)}},l:o=>o.text},28:{t:["**","__"],o:Se(la),i:2,u:(o,c,i)=>({children:c(o[2],i)}),l:(o,c,i)=>u("strong",{key:i.key},c(o.children,i))},29:{t:o=>{const c=o[0];return(c==="*"||c==="_")&&o[1]!==c},o:Se(ua),i:3,u:(o,c,i)=>({children:c(o[2],i)}),l:(o,c,i)=>u("em",{key:i.key},c(o.children,i))},30:{t:["\\"],o:Se(ha),i:1,u:o=>({text:o[1],type:"27"})},31:{t:["=="],o:Se(da),i:3,u:At,l:(o,c,i)=>u("mark",{key:i.key},c(o.children,i))},32:{t:["~~"],o:Se(fa),i:3,u:At,l:(o,c,i)=>u("del",{key:i.key},c(o.children,i))}};t.disableParsingRawHTML===!0&&(delete E[11],delete E[13]);const w=function(o){var c=Object.keys(o);function i(g,h){var b=[];if(h.prevCapture=h.prevCapture||"",g.trim())for(;g;)for(var x=0;x<c.length;){var P=c[x],F=o[P];if(!F.t||$a(g,h,F.t)){var Y=F.o(g,h);if(Y&&Y[0]){g=g.substring(Y[0].length);var M=F.u(Y,i,h);h.prevCapture+=Y[0],M.type||(M.type=P),b.push(M);break}x++}else x++}return h.prevCapture="",b}return c.sort(function(g,h){return o[g].i-o[h].i||(g<h?-1:1)}),function(g,h){return i(function(b){return b.replace(zo,`
|
|
47
|
+
`).replace(Vo,"").replace(oa," ")}(g),h)}}(E),j=(C=function(o,c){return function(i,g,h){const b=o[i.type].l;return c?c(()=>b(i,g,h),i,g,h):b(i,g,h)}}(E,t.renderRule),function o(c,i={}){if(Array.isArray(c)){const g=i.key,h=[];let b=!1;for(let x=0;x<c.length;x++){i.key=x;const P=o(c[x],i),F=typeof P=="string";F&&b?h[h.length-1]+=P:P!==null&&h.push(P),b=F}return i.key=g,h}return C(c,o,i)});var C;const D=f(e);return v.length?u("div",null,D,u("footer",{key:"footer"},v.map(function(o){return u("div",{id:r(o.identifier,qe),key:o.identifier},o.identifier,j(w(o.footnote,{inline:!0})))}))):D}const Na=e=>{let{children:t="",options:r}=e,n=function(s,l){if(s==null)return{};var d,u,f={},S=Object.keys(s);for(u=0;u<S.length;u++)l.indexOf(d=S[u])>=0||(f[d]=s[d]);return f}(e,_o);return ln.cloneElement(Ia(t,r),n)};function bt({content:e,className:t}){return y.jsx("div",{className:t,children:y.jsx(Na,{options:{overrides:{p:{props:{className:"mb-3 last:mb-0 leading-relaxed text-gray-900 dark:text-gray-100"}},strong:{props:{className:"font-semibold text-gray-900 dark:text-white dark:font-bold"}},em:{props:{className:"italic text-gray-700"}},code:{props:{className:"bg-gray-100 px-1.5 py-0.5 rounded text-sm font-mono text-gray-800"}},pre:{props:{className:"bg-gray-100 p-3 rounded-md text-sm font-mono text-gray-800 overflow-x-auto mb-3"}},ul:{props:{className:"list-disc list-inside mb-3 space-y-1 ml-2"}},ol:{props:{className:"list-decimal list-inside mb-3 space-y-1 ml-2"}},li:{props:{className:"leading-relaxed"}},blockquote:{props:{className:"border-l-4 border-blue-300 pl-4 italic mb-3 text-gray-700 bg-blue-50 py-2 rounded-r"}},h1:{props:{className:"text-xl font-bold mb-3 text-gray-900"}},h2:{props:{className:"text-lg font-bold mb-2 text-gray-900"}},h3:{props:{className:"text-base font-bold mb-2 text-gray-900"}},h4:{props:{className:"text-sm font-bold mb-2 text-gray-900"}},h5:{props:{className:"text-sm font-bold mb-2 text-gray-900"}},h6:{props:{className:"text-sm font-bold mb-2 text-gray-900"}},hr:{props:{className:"my-4 border-gray-200"}},a:{props:{className:"text-blue-600 hover:text-blue-800 underline",target:"_blank",rel:"noopener noreferrer"}}}},children:e})})}var re=function(){return re=Object.assign||function(t){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(t[l]=r[l])}return t},re.apply(this,arguments)};function Me(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,l;n<s;n++)(l||!(n in t))&&(l||(l=Array.prototype.slice.call(t,0,n)),l[n]=t[n]);return e.concat(l||Array.prototype.slice.call(t))}function Da(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Ma=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Fa=Da(function(e){return Ma.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),z="-ms-",Ze="-moz-",N="-webkit-",kn="comm",xt="rule",er="decl",La="@import",Sn="@keyframes",za="@layer",En=Math.abs,tr=String.fromCharCode,Vt=Object.assign;function Ua(e,t){return G(e,0)^45?(((t<<2^G(e,0))<<2^G(e,1))<<2^G(e,2))<<2^G(e,3):0}function Cn(e){return e.trim()}function xe(e,t){return(e=t.exec(e))?e[0]:e}function R(e,t,r){return e.replace(t,r)}function ct(e,t,r){return e.indexOf(t,r)}function G(e,t){return e.charCodeAt(t)|0}function Fe(e,t,r){return e.slice(t,r)}function ve(e){return e.length}function $n(e){return e.length}function Je(e,t){return t.push(e),e}function Ba(e,t){return e.map(t).join("")}function Vr(e,t){return e.filter(function(r){return!xe(r,t)})}var wt=1,Le=1,Rn=0,le=0,W=0,We="";function kt(e,t,r,n,s,l,d,u){return{value:e,root:t,parent:r,type:n,props:s,children:l,line:wt,column:Le,length:d,return:"",siblings:u}}function Ee(e,t){return Vt(kt("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function Ne(e){for(;e.root;)e=Ee(e.root,{children:[e]});Je(e,e.siblings)}function Va(){return W}function Wa(){return W=le>0?G(We,--le):0,Le--,W===10&&(Le=1,wt--),W}function he(){return W=le<Rn?G(We,le++):0,Le++,W===10&&(Le=1,wt++),W}function je(){return G(We,le)}function lt(){return le}function St(e,t){return Fe(We,e,t)}function Wt(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 Ya(e){return wt=Le=1,Rn=ve(We=e),le=0,[]}function Ha(e){return We="",e}function Mt(e){return Cn(St(le-1,Yt(e===91?e+2:e===40?e+1:e)))}function Ka(e){for(;(W=je())&&W<33;)he();return Wt(e)>2||Wt(W)>3?"":" "}function Ga(e,t){for(;--t&&he()&&!(W<48||W>102||W>57&&W<65||W>70&&W<97););return St(e,lt()+(t<6&&je()==32&&he()==32))}function Yt(e){for(;he();)switch(W){case e:return le;case 34:case 39:e!==34&&e!==39&&Yt(W);break;case 40:e===41&&Yt(e);break;case 92:he();break}return le}function qa(e,t){for(;he()&&e+W!==57;)if(e+W===84&&je()===47)break;return"/*"+St(t,le-1)+"*"+tr(e===47?e:he())}function Ja(e){for(;!Wt(je());)he();return St(e,le)}function Xa(e){return Ha(ut("",null,null,null,[""],e=Ya(e),0,[0],e))}function ut(e,t,r,n,s,l,d,u,f){for(var S=0,v=0,m=d,E=0,w=0,j=0,C=1,D=1,o=1,c=0,i="",g=s,h=l,b=n,x=i;D;)switch(j=c,c=he()){case 40:if(j!=108&&G(x,m-1)==58){ct(x+=R(Mt(c),"&","&\f"),"&\f",En(S?u[S-1]:0))!=-1&&(o=-1);break}case 34:case 39:case 91:x+=Mt(c);break;case 9:case 10:case 13:case 32:x+=Ka(j);break;case 92:x+=Ga(lt()-1,7);continue;case 47:switch(je()){case 42:case 47:Je(Za(qa(he(),lt()),t,r,f),f);break;default:x+="/"}break;case 123*C:u[S++]=ve(x)*o;case 125*C:case 59:case 0:switch(c){case 0:case 125:D=0;case 59+v:o==-1&&(x=R(x,/\f/g,"")),w>0&&ve(x)-m&&Je(w>32?Yr(x+";",n,r,m-1,f):Yr(R(x," ","")+";",n,r,m-2,f),f);break;case 59:x+=";";default:if(Je(b=Wr(x,t,r,S,v,s,u,i,g=[],h=[],m,l),l),c===123)if(v===0)ut(x,t,b,b,g,l,m,u,h);else switch(E===99&&G(x,3)===110?100:E){case 100:case 108:case 109:case 115:ut(e,b,b,n&&Je(Wr(e,b,b,0,0,s,u,i,s,g=[],m,h),h),s,h,m,u,n?g:h);break;default:ut(x,b,b,b,[""],h,0,u,h)}}S=v=w=0,C=o=1,i=x="",m=d;break;case 58:m=1+ve(x),w=j;default:if(C<1){if(c==123)--C;else if(c==125&&C++==0&&Wa()==125)continue}switch(x+=tr(c),c*C){case 38:o=v>0?1:(x+="\f",-1);break;case 44:u[S++]=(ve(x)-1)*o,o=1;break;case 64:je()===45&&(x+=Mt(he())),E=je(),v=m=ve(i=x+=Ja(lt())),c++;break;case 45:j===45&&ve(x)==2&&(C=0)}}return l}function Wr(e,t,r,n,s,l,d,u,f,S,v,m){for(var E=s-1,w=s===0?l:[""],j=$n(w),C=0,D=0,o=0;C<n;++C)for(var c=0,i=Fe(e,E+1,E=En(D=d[C])),g=e;c<j;++c)(g=Cn(D>0?w[c]+" "+i:R(i,/&\f/g,w[c])))&&(f[o++]=g);return kt(e,t,r,s===0?xt:u,f,S,v,m)}function Za(e,t,r,n){return kt(e,t,r,kn,tr(Va()),Fe(e,2,-2),0,n)}function Yr(e,t,r,n,s){return kt(e,t,r,er,Fe(e,0,n),Fe(e,n+1,-1),n,s)}function _n(e,t,r){switch(Ua(e,t)){case 5103:return N+"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 N+e+e;case 4789:return Ze+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return N+e+Ze+e+z+e+e;case 5936:switch(G(e,t+11)){case 114:return N+e+z+R(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return N+e+z+R(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return N+e+z+R(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return N+e+z+e+e;case 6165:return N+e+z+"flex-"+e+e;case 5187:return N+e+R(e,/(\w+).+(:[^]+)/,N+"box-$1$2"+z+"flex-$1$2")+e;case 5443:return N+e+z+"flex-item-"+R(e,/flex-|-self/g,"")+(xe(e,/flex-|baseline/)?"":z+"grid-row-"+R(e,/flex-|-self/g,""))+e;case 4675:return N+e+z+"flex-line-pack"+R(e,/align-content|flex-|-self/g,"")+e;case 5548:return N+e+z+R(e,"shrink","negative")+e;case 5292:return N+e+z+R(e,"basis","preferred-size")+e;case 6060:return N+"box-"+R(e,"-grow","")+N+e+z+R(e,"grow","positive")+e;case 4554:return N+R(e,/([^-])(transform)/g,"$1"+N+"$2")+e;case 6187:return R(R(R(e,/(zoom-|grab)/,N+"$1"),/(image-set)/,N+"$1"),e,"")+e;case 5495:case 3959:return R(e,/(image-set\([^]*)/,N+"$1$`$1");case 4968:return R(R(e,/(.+:)(flex-)?(.*)/,N+"box-pack:$3"+z+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+N+e+e;case 4200:if(!xe(e,/flex-|baseline/))return z+"grid-column-align"+Fe(e,t)+e;break;case 2592:case 3360:return z+R(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(n,s){return t=s,xe(n.props,/grid-\w+-end/)})?~ct(e+(r=r[t].value),"span",0)?e:z+R(e,"-start","")+e+z+"grid-row-span:"+(~ct(r,"span",0)?xe(r,/\d+/):+xe(r,/\d+/)-+xe(e,/\d+/))+";":z+R(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(n){return xe(n.props,/grid-\w+-start/)})?e:z+R(R(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return R(e,/(.+)-inline(.+)/,N+"$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(ve(e)-1-t>6)switch(G(e,t+1)){case 109:if(G(e,t+4)!==45)break;case 102:return R(e,/(.+:)(.+)-([^]+)/,"$1"+N+"$2-$3$1"+Ze+(G(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~ct(e,"stretch",0)?_n(R(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return R(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(n,s,l,d,u,f,S){return z+s+":"+l+S+(d?z+s+"-span:"+(u?f:+f-+l)+S:"")+e});case 4949:if(G(e,t+6)===121)return R(e,":",":"+N)+e;break;case 6444:switch(G(e,G(e,14)===45?18:11)){case 120:return R(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+N+(G(e,14)===45?"inline-":"")+"box$3$1"+N+"$2$3$1"+z+"$2box$3")+e;case 100:return R(e,":",":"+z)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return R(e,"scroll-","scroll-snap-")+e}return e}function pt(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function Qa(e,t,r,n){switch(e.type){case za:if(e.children.length)break;case La:case er:return e.return=e.return||e.value;case kn:return"";case Sn:return e.return=e.value+"{"+pt(e.children,n)+"}";case xt:if(!ve(e.value=e.props.join(",")))return""}return ve(r=pt(e.children,n))?e.return=e.value+"{"+r+"}":""}function es(e){var t=$n(e);return function(r,n,s,l){for(var d="",u=0;u<t;u++)d+=e[u](r,n,s,l)||"";return d}}function ts(e){return function(t){t.root||(t=t.return)&&e(t)}}function rs(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case er:e.return=_n(e.value,e.length,r);return;case Sn:return pt([Ee(e,{value:R(e.value,"@","@"+N)})],n);case xt:if(e.length)return Ba(r=e.props,function(s){switch(xe(s,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":Ne(Ee(e,{props:[R(s,/:(read-\w+)/,":"+Ze+"$1")]})),Ne(Ee(e,{props:[s]})),Vt(e,{props:Vr(r,n)});break;case"::placeholder":Ne(Ee(e,{props:[R(s,/:(plac\w+)/,":"+N+"input-$1")]})),Ne(Ee(e,{props:[R(s,/:(plac\w+)/,":"+Ze+"$1")]})),Ne(Ee(e,{props:[R(s,/:(plac\w+)/,z+"input-$1")]})),Ne(Ee(e,{props:[s]})),Vt(e,{props:Vr(r,n)});break}return""})}}var ns={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,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=typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",jn="active",On="data-styled-version",Et="6.1.19",rr=`/*!sc*/
|
|
48
48
|
`,ht=typeof window<"u"&&typeof document<"u",os=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&process.env!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==""?process.env.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&process.env.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&process.env!==void 0&&process.env.SC_DISABLE_SPEEDY!==void 0&&process.env.SC_DISABLE_SPEEDY!==""?process.env.SC_DISABLE_SPEEDY!=="false"&&process.env.SC_DISABLE_SPEEDY:process.env.NODE_ENV!=="production"),Hr=/invalid hook call/i,rt=new Set,as=function(e,t){if(process.env.NODE_ENV!=="production"){var r=t?' with the id of "'.concat(t,'"'):"",n="The component ".concat(e).concat(r,` has been created dynamically.
|
|
49
49
|
`)+`You may see this warning because you've called styled inside another component.
|
|
50
50
|
To resolve this only create new StyledComponents outside of any render method and function component.
|
|
@@ -90,7 +90,7 @@ as for instance in your render method then you may be running into this limitati
|
|
|
90
90
|
|
|
91
91
|
`,17:`CSSStyleSheet could not be found on HTMLStyleElement.
|
|
92
92
|
Has styled-components' style tag been unmounted or altered by another script?
|
|
93
|
-
`,18:"ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`"}:{};function xs(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=e[0],n=[],s=1,l=e.length;s<l;s+=1)n.push(e[s]);return n.forEach(function(d){r=r.replace(/%[a-z]/,d)}),r}function Ye(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return process.env.NODE_ENV==="production"?new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):"")):new Error(xs.apply(void 0,Me([bs[e]],t,!1)).trim())}var ws=function(){function e(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}return e.prototype.indexOfGroup=function(t){for(var r=0,n=0;n<t;n++)r+=this.groupSizes[n];return r},e.prototype.insertRules=function(t,r){if(t>=this.groupSizes.length){for(var n=this.groupSizes,s=n.length,l=s;t>=l;)if((l<<=1)<0)throw Ye(16,"".concat(t));this.groupSizes=new Uint32Array(l),this.groupSizes.set(n),this.length=l;for(var d=s;d<l;d++)this.groupSizes[d]=0}for(var u=this.indexOfGroup(t+1),f=(d=0,r.length);d<f;d++)this.tag.insertRule(u,r[d])&&(this.groupSizes[t]++,u++)},e.prototype.clearGroup=function(t){if(t<this.length){var r=this.groupSizes[t],n=this.indexOfGroup(t),s=n+r;this.groupSizes[t]=0;for(var l=n;l<s;l++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(t){var r="";if(t>=this.length||this.groupSizes[t]===0)return r;for(var n=this.groupSizes[t],s=this.indexOfGroup(t),l=s+n,d=s;d<l;d++)r+="".concat(this.tag.getRule(d)).concat(rr);return r},e}(),ks=1<<30,dt=new Map,mt=new Map,ft=1,ot=function(e){if(dt.has(e))return dt.get(e);for(;mt.has(ft);)ft++;var t=ft++;if(process.env.NODE_ENV!=="production"&&((0|t)<0||t>ks))throw Ye(16,"".concat(t));return dt.set(e,t),mt.set(t,e),t},Ss=function(e,t){ft=t+1,dt.set(e,t),mt.set(t,e)},Es="style[".concat(Te,"][").concat(On,'="').concat(Et,'"]'),Cs=new RegExp("^".concat(Te,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),$s=function(e,t,r){for(var n,s=r.split(","),l=0,d=s.length;l<d;l++)(n=s[l])&&e.registerName(t,n)},Rs=function(e,t){for(var r,n=((r=t.textContent)!==null&&r!==void 0?r:"").split(rr),s=[],l=0,d=n.length;l<d;l++){var u=n[l].trim();if(u){var f=u.match(Cs);if(f){var S=0|parseInt(f[1],10),x=f[2];S!==0&&(Ss(x,S),$s(e,x,f[3]),e.getTag().insertRules(S,s)),s.length=0}else s.push(u)}}},Qr=function(e){for(var t=document.querySelectorAll(Es),r=0,n=t.length;r<n;r++){var s=t[r];s&&s.getAttribute(Te)!==jn&&(Rs(e,s),s.parentNode&&s.parentNode.removeChild(s))}};function _s(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null}var Fn=function(e){var t=document.head,r=e||t,n=document.createElement("style"),s=function(u){var f=Array.from(u.querySelectorAll("style[".concat(Te,"]")));return f[f.length-1]}(r),l=s!==void 0?s.nextSibling:null;n.setAttribute(Te,jn),n.setAttribute(On,Et);var d=_s();return d&&n.setAttribute("nonce",d),r.insertBefore(n,l),n},js=function(){function e(t){this.element=Fn(t),this.element.appendChild(document.createTextNode("")),this.sheet=function(r){if(r.sheet)return r.sheet;for(var n=document.styleSheets,s=0,l=n.length;s<l;s++){var d=n[s];if(d.ownerNode===r)return d}throw Ye(17)}(this.element),this.length=0}return e.prototype.insertRule=function(t,r){try{return this.sheet.insertRule(r,t),this.length++,!0}catch{return!1}},e.prototype.deleteRule=function(t){this.sheet.deleteRule(t),this.length--},e.prototype.getRule=function(t){var r=this.sheet.cssRules[t];return r&&r.cssText?r.cssText:""},e}(),Os=function(){function e(t){this.element=Fn(t),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(t,r){if(t<=this.length&&t>=0){var n=document.createTextNode(r);return this.element.insertBefore(n,this.nodes[t]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},e.prototype.getRule=function(t){return t<this.length?this.nodes[t].textContent:""},e}(),Ts=function(){function e(t){this.rules=[],this.length=0}return e.prototype.insertRule=function(t,r){return t<=this.length&&(this.rules.splice(t,0,r),this.length++,!0)},e.prototype.deleteRule=function(t){this.rules.splice(t,1),this.length--},e.prototype.getRule=function(t){return t<this.length?this.rules[t]:""},e}(),en=ht,Ps={isServer:!ht,useCSSOMInjection:!os},Ln=function(){function e(t,r,n){t===void 0&&(t=ze),r===void 0&&(r={});var s=this;this.options=re(re({},Ps),t),this.gs=r,this.names=new Map(n),this.server=!!t.isServer,!this.server&&ht&&en&&(en=!1,Qr(this)),or(this,function(){return function(l){for(var d=l.getTag(),u=d.length,f="",S=function(m){var E=function(o){return mt.get(o)}(m);if(E===void 0)return"continue";var w=l.names.get(E),j=d.getGroup(m);if(w===void 0||!w.size||j.length===0)return"continue";var C="".concat(Te,".g").concat(m,'[id="').concat(E,'"]'),N="";w!==void 0&&w.forEach(function(o){o.length>0&&(N+="".concat(o,","))}),f+="".concat(j).concat(C,'{content:"').concat(N,'"}').concat(rr)},x=0;x<u;x++)S(x);return f}(s)})}return e.registerId=function(t){return ot(t)},e.prototype.rehydrate=function(){!this.server&&ht&&Qr(this)},e.prototype.reconstructWithOptions=function(t,r){return r===void 0&&(r=!0),new e(re(re({},this.options),t),this.gs,r&&this.names||void 0)},e.prototype.allocateGSInstance=function(t){return this.gs[t]=(this.gs[t]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(t=function(r){var n=r.useCSSOMInjection,s=r.target;return r.isServer?new Ts(s):n?new js(s):new Os(s)}(this.options),new ws(t)));var t},e.prototype.hasNameForId=function(t,r){return this.names.has(t)&&this.names.get(t).has(r)},e.prototype.registerName=function(t,r){if(ot(t),this.names.has(t))this.names.get(t).add(r);else{var n=new Set;n.add(r),this.names.set(t,n)}},e.prototype.insertRules=function(t,r,n){this.registerName(t,r),this.getTag().insertRules(ot(t),n)},e.prototype.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.prototype.clearRules=function(t){this.getTag().clearGroup(ot(t)),this.clearNames(t)},e.prototype.clearTag=function(){this.tag=void 0},e}(),As=/&/g,Is=/^\s*\/\/.*$/gm;function zn(e,t){return e.map(function(r){return r.type==="rule"&&(r.value="".concat(t," ").concat(r.value),r.value=r.value.replaceAll(",",",".concat(t," ")),r.props=r.props.map(function(n){return"".concat(t," ").concat(n)})),Array.isArray(r.children)&&r.type!=="@keyframes"&&(r.children=zn(r.children,t)),r})}function Ns(e){var t,r,n,s=ze,l=s.options,d=l===void 0?ze:l,u=s.plugins,f=u===void 0?Ct:u,S=function(E,w,j){return j.startsWith(r)&&j.endsWith(r)&&j.replaceAll(r,"").length>0?".".concat(t):E},x=f.slice();x.push(function(E){E.type===xt&&E.value.includes("&")&&(E.props[0]=E.props[0].replace(As,r).replace(n,S))}),d.prefix&&x.push(rs),x.push(Qa);var m=function(E,w,j,C){w===void 0&&(w=""),j===void 0&&(j=""),C===void 0&&(C="&"),t=C,r=w,n=new RegExp("\\".concat(r,"\\b"),"g");var N=E.replace(Is,""),o=Xa(j||w?"".concat(j," ").concat(w," { ").concat(N," }"):N);d.namespace&&(o=zn(o,d.namespace));var i=[];return pt(o,es(x.concat(ts(function(c){return i.push(c)})))),i};return m.hash=f.length?f.reduce(function(E,w){return w.name||Ye(15),Re(E,w.name)},Tn).toString():"",m}var Ds=new Ln,qt=Ns(),Un=_.createContext({shouldForwardProp:void 0,styleSheet:Ds,stylis:qt});Un.Consumer;_.createContext(void 0);function tn(){return _.useContext(Un)}var rn=function(){function e(t,r){var n=this;this.inject=function(s,l){l===void 0&&(l=qt);var d=n.name+l.hash;s.hasNameForId(n.id,d)||s.insertRules(n.id,d,l(n.rules,d,"@keyframes"))},this.name=t,this.id="sc-keyframes-".concat(t),this.rules=r,or(this,function(){throw Ye(12,String(n.name))})}return e.prototype.getName=function(t){return t===void 0&&(t=qt),this.name+t.hash},e}(),Ms=function(e){return e>="A"&&e<="Z"};function nn(e){for(var t="",r=0;r<e.length;r++){var n=e[r];if(r===1&&n==="-"&&e[0]==="-")return e;Ms(n)?t+="-"+n.toLowerCase():t+=n}return t.startsWith("ms-")?"-"+t:t}var Bn=function(e){return e==null||e===!1||e===""},Vn=function(e){var t,r,n=[];for(var s in e){var l=e[s];e.hasOwnProperty(s)&&!Bn(l)&&(Array.isArray(l)&&l.isCss||Ue(l)?n.push("".concat(nn(s),":"),l,";"):Be(l)?n.push.apply(n,Me(Me(["".concat(s," {")],Vn(l),!1),["}"],!1)):n.push("".concat(nn(s),": ").concat((t=s,(r=l)==null||typeof r=="boolean"||r===""?"":typeof r!="number"||r===0||t in ns||t.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return n};function Oe(e,t,r,n){if(Bn(e))return[];if(nr(e))return[".".concat(e.styledComponentId)];if(Ue(e)){if(!Ue(l=e)||l.prototype&&l.prototype.isReactComponent||!t)return[e];var s=e(t);return process.env.NODE_ENV==="production"||typeof s!="object"||Array.isArray(s)||s instanceof rn||Be(s)||s===null||console.error("".concat(An(e)," is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")),Oe(s,t,r,n)}var l;return e instanceof rn?r?(e.inject(r,n),[e.getName(n)]):[e]:Be(e)?Vn(e):Array.isArray(e)?Array.prototype.concat.apply(Ct,e.map(function(d){return Oe(d,t,r,n)})):[e.toString()]}function Fs(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(Ue(r)&&!nr(r))return!1}return!0}var Ls=Pn(Et),zs=function(){function e(t,r,n){this.rules=t,this.staticRulesId="",this.isStatic=process.env.NODE_ENV==="production"&&(n===void 0||n.isStatic)&&Fs(t),this.componentId=r,this.baseHash=Re(Ls,r),this.baseStyle=n,Ln.registerId(r)}return e.prototype.generateAndInjectStyles=function(t,r,n){var s=this.baseStyle?this.baseStyle.generateAndInjectStyles(t,r,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&r.hasNameForId(this.componentId,this.staticRulesId))s=_e(s,this.staticRulesId);else{var l=Zr(Oe(this.rules,t,r,n)),d=Kt(Re(this.baseHash,l)>>>0);if(!r.hasNameForId(this.componentId,d)){var u=n(l,".".concat(d),void 0,this.componentId);r.insertRules(this.componentId,d,u)}s=_e(s,d),this.staticRulesId=d}else{for(var f=Re(this.baseHash,n.hash),S="",x=0;x<this.rules.length;x++){var m=this.rules[x];if(typeof m=="string")S+=m,process.env.NODE_ENV!=="production"&&(f=Re(f,m));else if(m){var E=Zr(Oe(m,t,r,n));f=Re(f,E+x),S+=E}}if(S){var w=Kt(f>>>0);r.hasNameForId(this.componentId,w)||r.insertRules(this.componentId,w,n(S,".".concat(w),void 0,this.componentId)),s=_e(s,w)}}return s},e}(),Wn=_.createContext(void 0);Wn.Consumer;var zt={},on=new Set;function Us(e,t,r){var n=nr(e),s=e,l=!Lt(e),d=t.attrs,u=d===void 0?Ct:d,f=t.componentId,S=f===void 0?function(g,h){var v=typeof g!="string"?"sc":Kr(g);zt[v]=(zt[v]||0)+1;var y="".concat(v,"-").concat(us(Et+v+zt[v]));return h?"".concat(h,"-").concat(y):y}(t.displayName,t.parentComponentId):f,x=t.displayName,m=x===void 0?function(g){return Lt(g)?"styled.".concat(g):"Styled(".concat(An(g),")")}(e):x,E=t.displayName&&t.componentId?"".concat(Kr(t.displayName),"-").concat(t.componentId):t.componentId||S,w=n&&s.attrs?s.attrs.concat(u).filter(Boolean):u,j=t.shouldForwardProp;if(n&&s.shouldForwardProp){var C=s.shouldForwardProp;if(t.shouldForwardProp){var N=t.shouldForwardProp;j=function(g,h){return C(g,h)&&N(g,h)}}else j=C}var o=new zs(r,E,n?s.componentStyle:void 0);function i(g,h){return function(v,y,D){var L=v.attrs,W=v.componentStyle,M=v.defaultProps,U=v.foldedComponentIds,I=v.styledComponentId,G=v.target,Q=_.useContext(Wn),ae=tn(),ee=v.shouldForwardProp||ae.shouldForwardProp;process.env.NODE_ENV!=="production"&&_.useDebugValue(I);var ne=ss(y,Q,M)||ze,q=function(me,ue,ge){for(var de,fe=re(re({},ue),{className:void 0,theme:ge}),we=0;we<me.length;we+=1){var Pe=Ue(de=me[we])?de(fe):de;for(var pe in Pe)fe[pe]=pe==="className"?_e(fe[pe],Pe[pe]):pe==="style"?re(re({},fe[pe]),Pe[pe]):Pe[pe]}return ue.className&&(fe.className=_e(fe.className,ue.className)),fe}(L,y,ne),se=q.as||G,oe={};for(var B in q)q[B]===void 0||B[0]==="$"||B==="as"||B==="theme"&&q.theme===ne||(B==="forwardedAs"?oe.as=q.forwardedAs:ee&&!ee(B,se)||(oe[B]=q[B],ee||process.env.NODE_ENV!=="development"||Fa(B)||on.has(B)||!Ht.has(se)||(on.add(B),console.warn('styled-components: it looks like an unknown prop "'.concat(B,'" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));var J=function(me,ue){var ge=tn(),de=me.generateAndInjectStyles(ue,ge.styleSheet,ge.stylis);return process.env.NODE_ENV!=="production"&&_.useDebugValue(de),de}(W,q);process.env.NODE_ENV!=="production"&&v.warnTooManyClasses&&v.warnTooManyClasses(J);var ie=_e(U,I);return J&&(ie+=" "+J),q.className&&(ie+=" "+q.className),oe[Lt(se)&&!Ht.has(se)?"class":"className"]=ie,D&&(oe.ref=D),_.createElement(se,oe)}(c,g,h)}i.displayName=m;var c=_.forwardRef(i);return c.attrs=w,c.componentStyle=o,c.displayName=m,c.shouldForwardProp=j,c.foldedComponentIds=n?_e(s.foldedComponentIds,s.styledComponentId):"",c.styledComponentId=E,c.target=n?s.target:e,Object.defineProperty(c,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(g){this._foldedDefaultProps=n?function(h){for(var v=[],y=1;y<arguments.length;y++)v[y-1]=arguments[y];for(var D=0,L=v;D<L.length;D++)Gt(h,L[D],!0);return h}({},s.defaultProps,g):g}}),process.env.NODE_ENV!=="production"&&(as(m,E),c.warnTooManyClasses=function(g,h){var v={},y=!1;return function(D){if(!y&&(v[D]=!0,Object.keys(v).length>=200)){var L=h?' with the id of "'.concat(h,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(g).concat(L,`.
|
|
93
|
+
`,18:"ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`"}:{};function xs(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=e[0],n=[],s=1,l=e.length;s<l;s+=1)n.push(e[s]);return n.forEach(function(d){r=r.replace(/%[a-z]/,d)}),r}function Ye(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return process.env.NODE_ENV==="production"?new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):"")):new Error(xs.apply(void 0,Me([bs[e]],t,!1)).trim())}var ws=function(){function e(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}return e.prototype.indexOfGroup=function(t){for(var r=0,n=0;n<t;n++)r+=this.groupSizes[n];return r},e.prototype.insertRules=function(t,r){if(t>=this.groupSizes.length){for(var n=this.groupSizes,s=n.length,l=s;t>=l;)if((l<<=1)<0)throw Ye(16,"".concat(t));this.groupSizes=new Uint32Array(l),this.groupSizes.set(n),this.length=l;for(var d=s;d<l;d++)this.groupSizes[d]=0}for(var u=this.indexOfGroup(t+1),f=(d=0,r.length);d<f;d++)this.tag.insertRule(u,r[d])&&(this.groupSizes[t]++,u++)},e.prototype.clearGroup=function(t){if(t<this.length){var r=this.groupSizes[t],n=this.indexOfGroup(t),s=n+r;this.groupSizes[t]=0;for(var l=n;l<s;l++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(t){var r="";if(t>=this.length||this.groupSizes[t]===0)return r;for(var n=this.groupSizes[t],s=this.indexOfGroup(t),l=s+n,d=s;d<l;d++)r+="".concat(this.tag.getRule(d)).concat(rr);return r},e}(),ks=1<<30,dt=new Map,mt=new Map,ft=1,ot=function(e){if(dt.has(e))return dt.get(e);for(;mt.has(ft);)ft++;var t=ft++;if(process.env.NODE_ENV!=="production"&&((0|t)<0||t>ks))throw Ye(16,"".concat(t));return dt.set(e,t),mt.set(t,e),t},Ss=function(e,t){ft=t+1,dt.set(e,t),mt.set(t,e)},Es="style[".concat(Te,"][").concat(On,'="').concat(Et,'"]'),Cs=new RegExp("^".concat(Te,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),$s=function(e,t,r){for(var n,s=r.split(","),l=0,d=s.length;l<d;l++)(n=s[l])&&e.registerName(t,n)},Rs=function(e,t){for(var r,n=((r=t.textContent)!==null&&r!==void 0?r:"").split(rr),s=[],l=0,d=n.length;l<d;l++){var u=n[l].trim();if(u){var f=u.match(Cs);if(f){var S=0|parseInt(f[1],10),v=f[2];S!==0&&(Ss(v,S),$s(e,v,f[3]),e.getTag().insertRules(S,s)),s.length=0}else s.push(u)}}},Qr=function(e){for(var t=document.querySelectorAll(Es),r=0,n=t.length;r<n;r++){var s=t[r];s&&s.getAttribute(Te)!==jn&&(Rs(e,s),s.parentNode&&s.parentNode.removeChild(s))}};function _s(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null}var Fn=function(e){var t=document.head,r=e||t,n=document.createElement("style"),s=function(u){var f=Array.from(u.querySelectorAll("style[".concat(Te,"]")));return f[f.length-1]}(r),l=s!==void 0?s.nextSibling:null;n.setAttribute(Te,jn),n.setAttribute(On,Et);var d=_s();return d&&n.setAttribute("nonce",d),r.insertBefore(n,l),n},js=function(){function e(t){this.element=Fn(t),this.element.appendChild(document.createTextNode("")),this.sheet=function(r){if(r.sheet)return r.sheet;for(var n=document.styleSheets,s=0,l=n.length;s<l;s++){var d=n[s];if(d.ownerNode===r)return d}throw Ye(17)}(this.element),this.length=0}return e.prototype.insertRule=function(t,r){try{return this.sheet.insertRule(r,t),this.length++,!0}catch{return!1}},e.prototype.deleteRule=function(t){this.sheet.deleteRule(t),this.length--},e.prototype.getRule=function(t){var r=this.sheet.cssRules[t];return r&&r.cssText?r.cssText:""},e}(),Os=function(){function e(t){this.element=Fn(t),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(t,r){if(t<=this.length&&t>=0){var n=document.createTextNode(r);return this.element.insertBefore(n,this.nodes[t]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},e.prototype.getRule=function(t){return t<this.length?this.nodes[t].textContent:""},e}(),Ts=function(){function e(t){this.rules=[],this.length=0}return e.prototype.insertRule=function(t,r){return t<=this.length&&(this.rules.splice(t,0,r),this.length++,!0)},e.prototype.deleteRule=function(t){this.rules.splice(t,1),this.length--},e.prototype.getRule=function(t){return t<this.length?this.rules[t]:""},e}(),en=ht,Ps={isServer:!ht,useCSSOMInjection:!os},Ln=function(){function e(t,r,n){t===void 0&&(t=ze),r===void 0&&(r={});var s=this;this.options=re(re({},Ps),t),this.gs=r,this.names=new Map(n),this.server=!!t.isServer,!this.server&&ht&&en&&(en=!1,Qr(this)),or(this,function(){return function(l){for(var d=l.getTag(),u=d.length,f="",S=function(m){var E=function(o){return mt.get(o)}(m);if(E===void 0)return"continue";var w=l.names.get(E),j=d.getGroup(m);if(w===void 0||!w.size||j.length===0)return"continue";var C="".concat(Te,".g").concat(m,'[id="').concat(E,'"]'),D="";w!==void 0&&w.forEach(function(o){o.length>0&&(D+="".concat(o,","))}),f+="".concat(j).concat(C,'{content:"').concat(D,'"}').concat(rr)},v=0;v<u;v++)S(v);return f}(s)})}return e.registerId=function(t){return ot(t)},e.prototype.rehydrate=function(){!this.server&&ht&&Qr(this)},e.prototype.reconstructWithOptions=function(t,r){return r===void 0&&(r=!0),new e(re(re({},this.options),t),this.gs,r&&this.names||void 0)},e.prototype.allocateGSInstance=function(t){return this.gs[t]=(this.gs[t]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(t=function(r){var n=r.useCSSOMInjection,s=r.target;return r.isServer?new Ts(s):n?new js(s):new Os(s)}(this.options),new ws(t)));var t},e.prototype.hasNameForId=function(t,r){return this.names.has(t)&&this.names.get(t).has(r)},e.prototype.registerName=function(t,r){if(ot(t),this.names.has(t))this.names.get(t).add(r);else{var n=new Set;n.add(r),this.names.set(t,n)}},e.prototype.insertRules=function(t,r,n){this.registerName(t,r),this.getTag().insertRules(ot(t),n)},e.prototype.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.prototype.clearRules=function(t){this.getTag().clearGroup(ot(t)),this.clearNames(t)},e.prototype.clearTag=function(){this.tag=void 0},e}(),As=/&/g,Is=/^\s*\/\/.*$/gm;function zn(e,t){return e.map(function(r){return r.type==="rule"&&(r.value="".concat(t," ").concat(r.value),r.value=r.value.replaceAll(",",",".concat(t," ")),r.props=r.props.map(function(n){return"".concat(t," ").concat(n)})),Array.isArray(r.children)&&r.type!=="@keyframes"&&(r.children=zn(r.children,t)),r})}function Ns(e){var t,r,n,s=ze,l=s.options,d=l===void 0?ze:l,u=s.plugins,f=u===void 0?Ct:u,S=function(E,w,j){return j.startsWith(r)&&j.endsWith(r)&&j.replaceAll(r,"").length>0?".".concat(t):E},v=f.slice();v.push(function(E){E.type===xt&&E.value.includes("&")&&(E.props[0]=E.props[0].replace(As,r).replace(n,S))}),d.prefix&&v.push(rs),v.push(Qa);var m=function(E,w,j,C){w===void 0&&(w=""),j===void 0&&(j=""),C===void 0&&(C="&"),t=C,r=w,n=new RegExp("\\".concat(r,"\\b"),"g");var D=E.replace(Is,""),o=Xa(j||w?"".concat(j," ").concat(w," { ").concat(D," }"):D);d.namespace&&(o=zn(o,d.namespace));var c=[];return pt(o,es(v.concat(ts(function(i){return c.push(i)})))),c};return m.hash=f.length?f.reduce(function(E,w){return w.name||Ye(15),Re(E,w.name)},Tn).toString():"",m}var Ds=new Ln,qt=Ns(),Un=_.createContext({shouldForwardProp:void 0,styleSheet:Ds,stylis:qt});Un.Consumer;_.createContext(void 0);function tn(){return _.useContext(Un)}var rn=function(){function e(t,r){var n=this;this.inject=function(s,l){l===void 0&&(l=qt);var d=n.name+l.hash;s.hasNameForId(n.id,d)||s.insertRules(n.id,d,l(n.rules,d,"@keyframes"))},this.name=t,this.id="sc-keyframes-".concat(t),this.rules=r,or(this,function(){throw Ye(12,String(n.name))})}return e.prototype.getName=function(t){return t===void 0&&(t=qt),this.name+t.hash},e}(),Ms=function(e){return e>="A"&&e<="Z"};function nn(e){for(var t="",r=0;r<e.length;r++){var n=e[r];if(r===1&&n==="-"&&e[0]==="-")return e;Ms(n)?t+="-"+n.toLowerCase():t+=n}return t.startsWith("ms-")?"-"+t:t}var Bn=function(e){return e==null||e===!1||e===""},Vn=function(e){var t,r,n=[];for(var s in e){var l=e[s];e.hasOwnProperty(s)&&!Bn(l)&&(Array.isArray(l)&&l.isCss||Ue(l)?n.push("".concat(nn(s),":"),l,";"):Be(l)?n.push.apply(n,Me(Me(["".concat(s," {")],Vn(l),!1),["}"],!1)):n.push("".concat(nn(s),": ").concat((t=s,(r=l)==null||typeof r=="boolean"||r===""?"":typeof r!="number"||r===0||t in ns||t.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return n};function Oe(e,t,r,n){if(Bn(e))return[];if(nr(e))return[".".concat(e.styledComponentId)];if(Ue(e)){if(!Ue(l=e)||l.prototype&&l.prototype.isReactComponent||!t)return[e];var s=e(t);return process.env.NODE_ENV==="production"||typeof s!="object"||Array.isArray(s)||s instanceof rn||Be(s)||s===null||console.error("".concat(An(e)," is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")),Oe(s,t,r,n)}var l;return e instanceof rn?r?(e.inject(r,n),[e.getName(n)]):[e]:Be(e)?Vn(e):Array.isArray(e)?Array.prototype.concat.apply(Ct,e.map(function(d){return Oe(d,t,r,n)})):[e.toString()]}function Fs(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(Ue(r)&&!nr(r))return!1}return!0}var Ls=Pn(Et),zs=function(){function e(t,r,n){this.rules=t,this.staticRulesId="",this.isStatic=process.env.NODE_ENV==="production"&&(n===void 0||n.isStatic)&&Fs(t),this.componentId=r,this.baseHash=Re(Ls,r),this.baseStyle=n,Ln.registerId(r)}return e.prototype.generateAndInjectStyles=function(t,r,n){var s=this.baseStyle?this.baseStyle.generateAndInjectStyles(t,r,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&r.hasNameForId(this.componentId,this.staticRulesId))s=_e(s,this.staticRulesId);else{var l=Zr(Oe(this.rules,t,r,n)),d=Kt(Re(this.baseHash,l)>>>0);if(!r.hasNameForId(this.componentId,d)){var u=n(l,".".concat(d),void 0,this.componentId);r.insertRules(this.componentId,d,u)}s=_e(s,d),this.staticRulesId=d}else{for(var f=Re(this.baseHash,n.hash),S="",v=0;v<this.rules.length;v++){var m=this.rules[v];if(typeof m=="string")S+=m,process.env.NODE_ENV!=="production"&&(f=Re(f,m));else if(m){var E=Zr(Oe(m,t,r,n));f=Re(f,E+v),S+=E}}if(S){var w=Kt(f>>>0);r.hasNameForId(this.componentId,w)||r.insertRules(this.componentId,w,n(S,".".concat(w),void 0,this.componentId)),s=_e(s,w)}}return s},e}(),Wn=_.createContext(void 0);Wn.Consumer;var zt={},on=new Set;function Us(e,t,r){var n=nr(e),s=e,l=!Lt(e),d=t.attrs,u=d===void 0?Ct:d,f=t.componentId,S=f===void 0?function(g,h){var b=typeof g!="string"?"sc":Kr(g);zt[b]=(zt[b]||0)+1;var x="".concat(b,"-").concat(us(Et+b+zt[b]));return h?"".concat(h,"-").concat(x):x}(t.displayName,t.parentComponentId):f,v=t.displayName,m=v===void 0?function(g){return Lt(g)?"styled.".concat(g):"Styled(".concat(An(g),")")}(e):v,E=t.displayName&&t.componentId?"".concat(Kr(t.displayName),"-").concat(t.componentId):t.componentId||S,w=n&&s.attrs?s.attrs.concat(u).filter(Boolean):u,j=t.shouldForwardProp;if(n&&s.shouldForwardProp){var C=s.shouldForwardProp;if(t.shouldForwardProp){var D=t.shouldForwardProp;j=function(g,h){return C(g,h)&&D(g,h)}}else j=C}var o=new zs(r,E,n?s.componentStyle:void 0);function c(g,h){return function(b,x,P){var F=b.attrs,Y=b.componentStyle,M=b.defaultProps,H=b.foldedComponentIds,A=b.styledComponentId,Q=b.target,K=_.useContext(Wn),ae=tn(),ee=b.shouldForwardProp||ae.shouldForwardProp;process.env.NODE_ENV!=="production"&&_.useDebugValue(A);var ne=ss(x,K,M)||ze,q=function(me,ue,ge){for(var de,fe=re(re({},ue),{className:void 0,theme:ge}),we=0;we<me.length;we+=1){var Pe=Ue(de=me[we])?de(fe):de;for(var pe in Pe)fe[pe]=pe==="className"?_e(fe[pe],Pe[pe]):pe==="style"?re(re({},fe[pe]),Pe[pe]):Pe[pe]}return ue.className&&(fe.className=_e(fe.className,ue.className)),fe}(F,x,ne),se=q.as||Q,oe={};for(var U in q)q[U]===void 0||U[0]==="$"||U==="as"||U==="theme"&&q.theme===ne||(U==="forwardedAs"?oe.as=q.forwardedAs:ee&&!ee(U,se)||(oe[U]=q[U],ee||process.env.NODE_ENV!=="development"||Fa(U)||on.has(U)||!Ht.has(se)||(on.add(U),console.warn('styled-components: it looks like an unknown prop "'.concat(U,'" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));var J=function(me,ue){var ge=tn(),de=me.generateAndInjectStyles(ue,ge.styleSheet,ge.stylis);return process.env.NODE_ENV!=="production"&&_.useDebugValue(de),de}(Y,q);process.env.NODE_ENV!=="production"&&b.warnTooManyClasses&&b.warnTooManyClasses(J);var ie=_e(H,A);return J&&(ie+=" "+J),q.className&&(ie+=" "+q.className),oe[Lt(se)&&!Ht.has(se)?"class":"className"]=ie,P&&(oe.ref=P),_.createElement(se,oe)}(i,g,h)}c.displayName=m;var i=_.forwardRef(c);return i.attrs=w,i.componentStyle=o,i.displayName=m,i.shouldForwardProp=j,i.foldedComponentIds=n?_e(s.foldedComponentIds,s.styledComponentId):"",i.styledComponentId=E,i.target=n?s.target:e,Object.defineProperty(i,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(g){this._foldedDefaultProps=n?function(h){for(var b=[],x=1;x<arguments.length;x++)b[x-1]=arguments[x];for(var P=0,F=b;P<F.length;P++)Gt(h,F[P],!0);return h}({},s.defaultProps,g):g}}),process.env.NODE_ENV!=="production"&&(as(m,E),i.warnTooManyClasses=function(g,h){var b={},x=!1;return function(P){if(!x&&(b[P]=!0,Object.keys(b).length>=200)){var F=h?' with the id of "'.concat(h,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(g).concat(F,`.
|
|
94
94
|
`)+`Consider using the attrs method, together with a style object for frequently changed styles.
|
|
95
95
|
Example:
|
|
96
96
|
const Component = styled.div.attrs(props => ({
|
|
@@ -99,7 +99,7 @@ Example:
|
|
|
99
99
|
},
|
|
100
100
|
}))\`width: 100%;\`
|
|
101
101
|
|
|
102
|
-
<Component />`),
|
|
102
|
+
<Component />`),x=!0,b={}}}}(m,E)),or(i,function(){return".".concat(i.styledComponentId)}),l&&Mn(i,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),i}function an(e,t){for(var r=[e[0]],n=0,s=t.length;n<s;n+=1)r.push(t[n],e[n+1]);return r}var sn=function(e){return Object.assign(e,{isCss:!0})};function Bs(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(Ue(e)||Be(e))return sn(Oe(an(Ct,Me([e],t,!0))));var n=e;return t.length===0&&n.length===1&&typeof n[0]=="string"?Oe(n):sn(Oe(an(n,t)))}function Jt(e,t,r){if(r===void 0&&(r=ze),!t)throw Ye(1,t);var n=function(s){for(var l=[],d=1;d<arguments.length;d++)l[d-1]=arguments[d];return e(t,r,Bs.apply(void 0,Me([s],l,!1)))};return n.attrs=function(s){return Jt(e,t,re(re({},r),{attrs:Array.prototype.concat(r.attrs,s).filter(Boolean)}))},n.withConfig=function(s){return Jt(e,t,re(re({},r),s))},n}var Yn=function(e){return Jt(Us,e)},Z=Yn;Ht.forEach(function(e){Z[e]=Yn(e)});process.env.NODE_ENV!=="production"&&typeof navigator<"u"&&navigator.product==="ReactNative"&&console.warn(`It looks like you've imported 'styled-components' on React Native.
|
|
103
103
|
Perhaps you're looking to import 'styled-components/native'?
|
|
104
104
|
Read more about this at https://www.styled-components.com/docs/basics#react-native`);var at="__sc-".concat(Te,"__");process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&typeof window<"u"&&(window[at]||(window[at]=0),window[at]===1&&console.warn(`It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.
|
|
105
105
|
|
|
@@ -445,7 +445,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[at]+=1);const Hn=Z.div`
|
|
|
445
445
|
background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 50%, #3b82f6 100%);
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
|
-
`,dr=_.forwardRef(function({value:t,onChange:r,onKeyDown:n,placeholder:s="Type a message...",disabled:l=!1,className:d,maxLength:u=2e3},f){const S=m=>{r(m.target.value)},
|
|
448
|
+
`,dr=_.forwardRef(function({value:t,onChange:r,onKeyDown:n,placeholder:s="Type a message...",disabled:l=!1,className:d,maxLength:u=2e3},f){const S=m=>{r(m.target.value)},v=m=>{m.key==="Enter"&&!m.shiftKey&&m.preventDefault(),n(m)};return y.jsx(Vs,{ref:f,value:t,onChange:S,onKeyDown:v,placeholder:s,disabled:l,maxLength:u,className:d,onInput:m=>{const E=m.target;E.style.height="auto",E.style.height=`${Math.min(E.scrollHeight,120)}px`}})});/**
|
|
449
449
|
* @license lucide-react v0.544.0 - ISC
|
|
450
450
|
*
|
|
451
451
|
* This source code is licensed under the ISC license.
|
|
@@ -460,7 +460,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[at]+=1);const Hn=Z.div`
|
|
|
460
460
|
*
|
|
461
461
|
* This source code is licensed under the ISC license.
|
|
462
462
|
* See the LICENSE file in the root directory of this source tree.
|
|
463
|
-
*/const Zs=_.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:l,iconNode:d,...u},f)=>_.createElement("svg",{ref:f,...Xs,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Kn("lucide",s),...!l&&!Js(u)&&{"aria-hidden":"true"},...u},[...d.map(([S,
|
|
463
|
+
*/const Zs=_.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:l,iconNode:d,...u},f)=>_.createElement("svg",{ref:f,...Xs,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Kn("lucide",s),...!l&&!Js(u)&&{"aria-hidden":"true"},...u},[...d.map(([S,v])=>_.createElement(S,v)),...Array.isArray(l)?l:[l]]));/**
|
|
464
464
|
* @license lucide-react v0.544.0 - ISC
|
|
465
465
|
*
|
|
466
466
|
* This source code is licensed under the ISC license.
|
|
@@ -475,4 +475,4 @@ See https://s-c.sh/2BAXzed for more info.`),window[at]+=1);const Hn=Z.div`
|
|
|
475
475
|
*
|
|
476
476
|
* This source code is licensed under the ISC license.
|
|
477
477
|
* See the LICENSE file in the root directory of this source tree.
|
|
478
|
-
*/const ti=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],fr=Gn("send",ti);function qn({config:e,chat:t}){const{messages:r,sendMessage:n,isLoading:s,error:l}=t,[d,u]=_.useState(""),[f,S]=_.useState(!1),
|
|
478
|
+
*/const ti=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],fr=Gn("send",ti);function qn({config:e,chat:t}){const{messages:r,sendMessage:n,isLoading:s,error:l}=t,[d,u]=_.useState(""),[f,S]=_.useState(!1),v=_.useRef(null);_.useEffect(()=>{const w=()=>{S(window.matchMedia("(prefers-color-scheme: dark)").matches)};w();const j=window.matchMedia("(prefers-color-scheme: dark)");return j.addEventListener("change",w),()=>j.removeEventListener("change",w)},[]);const m=async()=>{!d.trim()||s||(await n(d.trim()),u(""),setTimeout(()=>{var w;(w=v.current)==null||w.focus()},100))},E=w=>{w.key==="Enter"&&!w.shiftKey&&(w.preventDefault(),m())};return y.jsxs(Hn,{"data-theme":f?"dark":"light",style:{height:e.height,display:"flex",flexDirection:"column",borderRadius:"8px"},children:[y.jsxs(ir,{style:{flex:1,padding:"16px"},children:[r.map(w=>y.jsx("div",{style:{display:"flex",marginBottom:"16px",justifyContent:w.role==="user"?"flex-end":"flex-start"},children:y.jsxs(Ve,{$isUser:w.role==="user",children:[w.role==="assistant"?y.jsx(bt,{content:w.content}):w.content,y.jsx(lr,{$isUser:w.role==="user",children:gt(w.timestamp)})]})},w.id)),s&&y.jsx("div",{style:{display:"flex",justifyContent:"flex-start",marginBottom:"16px"},children:y.jsx(Ve,{$isUser:!1,children:y.jsxs(cr,{children:[y.jsx("div",{className:"dot"}),y.jsx("div",{className:"dot"}),y.jsx("div",{className:"dot"})]})})}),l&&y.jsx(ur,{children:l})]}),y.jsxs(ar,{children:[y.jsx(dr,{ref:v,value:d,onChange:u,onKeyDown:E,placeholder:e.placeholder,disabled:s}),y.jsx(sr,{onClick:m,disabled:s||!d.trim(),children:y.jsx(fr,{size:16})})]})]})}function Xt({config:e,chat:t}){const{messages:r,sendMessage:n,isLoading:s,error:l,isOpen:d,setIsOpen:u}=t,[f,S]=_.useState(""),[v,m]=_.useState(e.height||400),E=_.useRef(null),w=async()=>{!f.trim()||s||(await n(f.trim()),S(""),setTimeout(()=>{var C;(C=E.current)==null||C.focus()},100))},j=C=>{C.key==="Enter"&&!C.shiftKey&&(C.preventDefault(),w())};return d?y.jsxs(Ys,{$position:e.position||"bottom-right",style:{height:v,...e.chatWindowStyle},children:[e.resizable!==!1&&y.jsx(Ks,{$position:"top",onMouseDown:C=>{C.preventDefault();const D=C.clientY,o=typeof v=="number"?v:400,c=g=>{const h=g.clientY-D,b=o-h;m(Math.max(200,Math.min(600,b)))},i=()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",i)};document.addEventListener("mousemove",c),document.addEventListener("mouseup",i)}}),e.showHeader!==!1&&y.jsxs(Hs,{primaryColor:e.primaryColor,children:[y.jsx("div",{className:"header-content",children:y.jsx("div",{className:"font-medium",children:e.chatName||"Chat Assistant"})}),y.jsx("div",{className:"header-actions",children:y.jsx("button",{onClick:()=>u(!1),className:"hover:bg-white/10 p-1 rounded",children:y.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[y.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),y.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})})]}),y.jsxs(ir,{children:[r.map(C=>y.jsx("div",{style:{display:"flex",marginBottom:"16px",justifyContent:C.role==="user"?"flex-end":"flex-start"},children:y.jsxs(Ve,{$isUser:C.role==="user",children:[C.role==="assistant"?y.jsx(bt,{content:C.content}):C.content,y.jsx(lr,{$isUser:C.role==="user",children:gt(C.timestamp)})]})},C.id)),s&&y.jsx("div",{style:{display:"flex",justifyContent:"flex-start",marginBottom:"16px"},children:y.jsx(Ve,{$isUser:!1,children:y.jsxs(cr,{children:[y.jsx("div",{className:"dot"}),y.jsx("div",{className:"dot"}),y.jsx("div",{className:"dot"})]})})}),l&&y.jsx(ur,{children:l})]}),y.jsxs(ar,{children:[y.jsx(dr,{ref:E,value:f,onChange:S,onKeyDown:j,placeholder:e.placeholder,disabled:s}),y.jsx(sr,{onClick:w,disabled:s||!f.trim(),children:y.jsx(fr,{size:16})})]})]}):y.jsxs(Ws,{onClick:()=>u(!0),style:e.buttonStyle,"aria-label":"Open chat",children:[y.jsx("div",{className:"icon-container",children:y.jsx(ei,{size:16})}),y.jsx("span",{children:e.buttonText||e.chatName||"AI Chat"})]})}function ri(e){const t=pn(e),r=fn(t);switch(t.mode){case"floating":return y.jsx(Xt,{config:t,chat:r});case"embedded":return y.jsx(qn,{config:t,chat:r});default:return y.jsx(Xt,{config:t,chat:r})}}function ni({config:e,chat:t}){const{messages:r,sendMessage:n,isLoading:s,error:l}=t,[d,u]=_.useState(""),f=_.useRef(null),S=async()=>{!d.trim()||s||(await n(d.trim()),u(""),setTimeout(()=>{var m;(m=f.current)==null||m.focus()},100))},v=m=>{m.key==="Enter"&&!m.shiftKey&&(m.preventDefault(),S())};return y.jsxs(Hn,{style:{height:e.height,display:"flex",flexDirection:"column",backgroundColor:"white",border:"1px solid #e5e7eb",borderRadius:"8px"},children:[y.jsxs(ir,{style:{flex:1,padding:"12px"},children:[r.map(m=>y.jsx("div",{style:{display:"flex",marginBottom:"12px",justifyContent:m.role==="user"?"flex-end":"flex-start"},children:y.jsxs(Ve,{$isUser:m.role==="user",children:[m.role==="assistant"?y.jsx(bt,{content:m.content}):m.content,y.jsx(lr,{$isUser:m.role==="user",children:gt(m.timestamp)})]})},m.id)),s&&y.jsx("div",{style:{display:"flex",justifyContent:"flex-start",marginBottom:"12px"},children:y.jsx(Ve,{$isUser:!1,children:y.jsxs(cr,{children:[y.jsx("div",{className:"dot"}),y.jsx("div",{className:"dot"}),y.jsx("div",{className:"dot"})]})})}),l&&y.jsx(ur,{children:l})]}),y.jsxs(ar,{children:[y.jsx(dr,{ref:f,value:d,onChange:u,onKeyDown:v,placeholder:e.placeholder,disabled:s}),y.jsx(sr,{onClick:S,disabled:s||!d.trim(),children:y.jsx(fr,{size:16})})]})]})}exports.EmbeddedChat=qn;exports.FloatingChat=Xt;exports.InlineChat=ni;exports.MarkdownRenderer=bt;exports.OrdifyApiClient=un;exports.OrdifyChat=ri;exports.debounce=$o;exports.formatTime=gt;exports.generateId=Bt;exports.parseStreamingResponse=dn;exports.throttle=Ro;exports.useOrdifyChat=fn;exports.useOrdifyConfig=pn;
|