@brainfish-ai/components 0.26.1 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/alert-dialog.d.ts +6 -2
- package/dist/button.d.ts +4 -2
- package/dist/confirm-dialog.d.ts +3 -1
- package/dist/convos.d.ts +3 -0
- package/dist/esm/chunks/{ChatSearch.Cqo4WF3n.js → ChatSearch.bblH7kYY.js} +2 -2
- package/dist/esm/chunks/{ChatSearch.Cqo4WF3n.js.map → ChatSearch.bblH7kYY.js.map} +1 -1
- package/dist/esm/chunks/{Conversation.UZ5rx7_0.js → Conversation.CuRp-tJL.js} +2 -2
- package/dist/esm/chunks/{Conversation.UZ5rx7_0.js.map → Conversation.CuRp-tJL.js.map} +1 -1
- package/dist/esm/chunks/{FormattedMessage.D9xA6QsH.js → FormattedMessage.XNMN23hm.js} +2 -2
- package/dist/esm/chunks/{FormattedMessage.D9xA6QsH.js.map → FormattedMessage.XNMN23hm.js.map} +1 -1
- package/dist/esm/chunks/button.D_2SonNs.js +3 -0
- package/dist/esm/chunks/button.D_2SonNs.js.map +1 -0
- package/dist/esm/chunks/{combobox.CxaWbDm9.js → combobox.MyoPH18G.js} +2 -2
- package/dist/esm/chunks/{combobox.CxaWbDm9.js.map → combobox.MyoPH18G.js.map} +1 -1
- package/dist/esm/chunks/{date-picker.Bhplnvxn.js → date-picker.C2VT_rZ9.js} +2 -2
- package/dist/esm/chunks/{date-picker.Bhplnvxn.js.map → date-picker.C2VT_rZ9.js.map} +1 -1
- package/dist/esm/chunks/{feedback.BXKvlNz1.js → feedback.CLMuSvsg.js} +2 -2
- package/dist/esm/chunks/{feedback.BXKvlNz1.js.map → feedback.CLMuSvsg.js.map} +1 -1
- package/dist/esm/chunks/{file-upload-status.4ukNFyi2.js → file-upload-status.D8RhMcbO.js} +2 -2
- package/dist/esm/chunks/{file-upload-status.4ukNFyi2.js.map → file-upload-status.D8RhMcbO.js.map} +1 -1
- package/dist/esm/chunks/{filters.ita3UAnO.js → filters.BHp3ukNW.js} +2 -2
- package/dist/esm/chunks/{filters.ita3UAnO.js.map → filters.BHp3ukNW.js.map} +1 -1
- package/dist/esm/chunks/{font-picker.BwEWBowG.js → font-picker.B9GPXyK4.js} +2 -2
- package/dist/esm/chunks/{font-picker.BwEWBowG.js.map → font-picker.B9GPXyK4.js.map} +1 -1
- package/dist/esm/chunks/{header-nav.B4IJjted.js → header-nav.DdOXbPSM.js} +2 -2
- package/dist/esm/chunks/{header-nav.B4IJjted.js.map → header-nav.DdOXbPSM.js.map} +1 -1
- package/dist/esm/chunks/{header-pane.C1RWesOW.js → header-pane.DrVjpN5S.js} +2 -2
- package/dist/esm/chunks/{header-pane.C1RWesOW.js.map → header-pane.DrVjpN5S.js.map} +1 -1
- package/dist/esm/chunks/{input-with-tags.DrDDPxse.js → input-with-tags.DLv9e0XI.js} +2 -2
- package/dist/esm/chunks/{input-with-tags.DrDDPxse.js.map → input-with-tags.DLv9e0XI.js.map} +1 -1
- package/dist/esm/chunks/{review-list.qvxeqG9l.js → review-list.Cn5bw-lP.js} +4 -4
- package/dist/esm/chunks/review-list.Cn5bw-lP.js.map +1 -0
- package/dist/esm/chunks/{sidebar.IcJADYLR.js → sidebar.DsEgGwJU.js} +2 -2
- package/dist/esm/chunks/{sidebar.IcJADYLR.js.map → sidebar.DsEgGwJU.js.map} +1 -1
- package/dist/esm/chunks/status-badge.BLB0pWDn.js +3 -0
- package/dist/esm/chunks/status-badge.BLB0pWDn.js.map +1 -0
- package/dist/esm/chunks/{two-level-combobox.Bv2OQgjh.js → two-level-combobox.DJYP--W9.js} +2 -2
- package/dist/esm/chunks/{two-level-combobox.Bv2OQgjh.js.map → two-level-combobox.DJYP--W9.js.map} +1 -1
- package/dist/esm/components/article-suggestions-banner.js +2 -2
- package/dist/esm/components/article-suggestions-banner.js.map +1 -1
- package/dist/esm/components/chat-search.js +1 -1
- package/dist/esm/components/combobox.js +1 -1
- package/dist/esm/components/conversation.js +1 -1
- package/dist/esm/components/convos.js +4 -4
- package/dist/esm/components/convos.js.map +1 -1
- package/dist/esm/components/date-picker.js +1 -1
- package/dist/esm/components/feedback.js +1 -1
- package/dist/esm/components/file-upload.js +1 -1
- package/dist/esm/components/filter.js +1 -1
- package/dist/esm/components/font-picker.js +1 -1
- package/dist/esm/components/input-with-tags.js +1 -1
- package/dist/esm/components/markdown.js +1 -1
- package/dist/esm/components/two-level-combobox.js +1 -1
- package/dist/esm/components/ui/alert-dialog.js +1 -1
- package/dist/esm/components/ui/button.js +1 -1
- package/dist/esm/components/ui/combobox.js +1 -1
- package/dist/esm/components/ui/sheet.js +1 -1
- package/dist/esm/global.css +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/layouts/full-layout.js +1 -1
- package/dist/esm/layouts/header-nav.js +1 -1
- package/dist/esm/layouts/sidebar.js +1 -1
- package/dist/esm/scenes/knowledge-review.js +10 -10
- package/dist/esm/scenes/knowledge-review.js.map +1 -1
- package/dist/index.d.ts +10 -4
- package/dist/stats.html +1 -1
- package/package.json +1 -1
- package/dist/esm/chunks/button.BYc5d6AZ.js +0 -3
- package/dist/esm/chunks/button.BYc5d6AZ.js.map +0 -1
- package/dist/esm/chunks/review-list.qvxeqG9l.js.map +0 -1
- package/dist/esm/chunks/status-badge.C-jt7Zs2.js +0 -3
- package/dist/esm/chunks/status-badge.C-jt7Zs2.js.map +0 -1
package/dist/alert-dialog.d.ts
CHANGED
|
@@ -6,15 +6,19 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
6
6
|
export declare const AlertDialog: React_2.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogProps & React_2.RefAttributes<never>>;
|
|
7
7
|
|
|
8
8
|
export declare const AlertDialogAction: React_2.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
9
|
-
variant?: "link" | "dark" | "default" | "destructive" | "success" | "outline" | "
|
|
9
|
+
variant?: "link" | "dark" | "default" | "destructive" | "success" | "outline" | "surface" | "secondary" | "suggestion" | "ghost" | null | undefined;
|
|
10
10
|
size?: "default" | "icon" | "xs" | "sm" | "lg" | null | undefined;
|
|
11
|
+
elevation?: "flat" | "shadow" | null | undefined;
|
|
12
|
+
disabled?: boolean | null | undefined;
|
|
11
13
|
} & ClassProp) | undefined) => string> & {
|
|
12
14
|
asChild?: boolean | undefined;
|
|
13
15
|
} & React_2.RefAttributes<HTMLButtonElement>>;
|
|
14
16
|
|
|
15
17
|
export declare const AlertDialogCancel: React_2.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
16
|
-
variant?: "link" | "dark" | "default" | "destructive" | "success" | "outline" | "
|
|
18
|
+
variant?: "link" | "dark" | "default" | "destructive" | "success" | "outline" | "surface" | "secondary" | "suggestion" | "ghost" | null | undefined;
|
|
17
19
|
size?: "default" | "icon" | "xs" | "sm" | "lg" | null | undefined;
|
|
20
|
+
elevation?: "flat" | "shadow" | null | undefined;
|
|
21
|
+
disabled?: boolean | null | undefined;
|
|
18
22
|
} & ClassProp) | undefined) => string> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
19
23
|
|
|
20
24
|
export declare const AlertDialogContent: React_2.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & {
|
package/dist/button.d.ts
CHANGED
|
@@ -4,13 +4,15 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
4
4
|
|
|
5
5
|
export declare const Button: React_2.ForwardRefExoticComponent<ButtonProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
6
6
|
|
|
7
|
-
export declare interface ButtonProps extends React_2.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
7
|
+
export declare interface ButtonProps extends Omit<React_2.ButtonHTMLAttributes<HTMLButtonElement>, 'disabled'>, VariantProps<typeof buttonVariants> {
|
|
8
8
|
asChild?: boolean;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export declare const buttonVariants: (props?: ({
|
|
12
|
-
variant?: "link" | "dark" | "default" | "destructive" | "success" | "outline" | "
|
|
12
|
+
variant?: "link" | "dark" | "default" | "destructive" | "success" | "outline" | "surface" | "secondary" | "suggestion" | "ghost" | null | undefined;
|
|
13
13
|
size?: "default" | "icon" | "xs" | "sm" | "lg" | null | undefined;
|
|
14
|
+
elevation?: "flat" | "shadow" | null | undefined;
|
|
15
|
+
disabled?: boolean | null | undefined;
|
|
14
16
|
} & ClassProp) | undefined) => string;
|
|
15
17
|
|
|
16
18
|
export { }
|
package/dist/confirm-dialog.d.ts
CHANGED
|
@@ -5,8 +5,10 @@ import * as React_2 from 'react';
|
|
|
5
5
|
import { VariantProps } from 'class-variance-authority';
|
|
6
6
|
|
|
7
7
|
declare const AlertDialogAction: React_2.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
8
|
-
variant?: "link" | "dark" | "default" | "destructive" | "success" | "outline" | "
|
|
8
|
+
variant?: "link" | "dark" | "default" | "destructive" | "success" | "outline" | "surface" | "secondary" | "suggestion" | "ghost" | null | undefined;
|
|
9
9
|
size?: "default" | "icon" | "xs" | "sm" | "lg" | null | undefined;
|
|
10
|
+
elevation?: "flat" | "shadow" | null | undefined;
|
|
11
|
+
disabled?: boolean | null | undefined;
|
|
10
12
|
} & ClassProp) | undefined) => string> & {
|
|
11
13
|
asChild?: boolean | undefined;
|
|
12
14
|
} & React_2.RefAttributes<HTMLButtonElement>>;
|
package/dist/convos.d.ts
CHANGED
|
@@ -177,9 +177,12 @@ declare interface Source {
|
|
|
177
177
|
|
|
178
178
|
export declare const StatusBadge: default_2.ForwardRefExoticComponent<Omit<BadgeProps, "variant"> & {
|
|
179
179
|
variant?: default_2.ComponentPropsWithRef<typeof Badge>['variant'] | 'accepted';
|
|
180
|
+
surface?: SurfaceVariant | undefined;
|
|
180
181
|
suffix?: default_2.ReactNode;
|
|
181
182
|
} & default_2.RefAttributes<HTMLSpanElement>>;
|
|
182
183
|
|
|
184
|
+
declare type SurfaceVariant = 'solid' | 'transparent';
|
|
185
|
+
|
|
183
186
|
export declare function useConvosContext(): ConvosContextValue;
|
|
184
187
|
|
|
185
188
|
export declare interface UserActionMessage extends BaseMessage {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e,{useState as t,useCallback as r,useMemo as n,useContext as a,createContext as s,useRef as o,useEffect as i,forwardRef as c,useImperativeHandle as l}from"react";import{motion as d,AnimatePresence as u}from"framer-motion";import m from"rehype-raw";import p from"remark-gfm";import{TooltipProvider as h,Tooltip as f,TooltipTrigger as g,TooltipContent as y}from"../components/ui/tooltip.js";import{B as v}from"./button.
|
|
1
|
+
import e,{useState as t,useCallback as r,useMemo as n,useContext as a,createContext as s,useRef as o,useEffect as i,forwardRef as c,useImperativeHandle as l}from"react";import{motion as d,AnimatePresence as u}from"framer-motion";import m from"rehype-raw";import p from"remark-gfm";import{TooltipProvider as h,Tooltip as f,TooltipTrigger as g,TooltipContent as y}from"../components/ui/tooltip.js";import{B as v}from"./button.D_2SonNs.js";import{XCircle as w,X as b,Check as E,Copy as $,CaretDown as x,ArrowSquareOut as _,CaretRight as k,ArrowsVertical as N,Globe as C,LockSimple as I,MagnifyingGlass as S,Image as P,ArrowRight as A,ArrowLeft as T,ArrowsInSimple as R,ArrowsOutSimple as j,ClockCounterClockwise as O,UserCircle as D}from"@phosphor-icons/react";import{F as z,a as L,M as F}from"./FormattedMessage.XNMN23hm.js";import{appendErrors as U,useForm as Q,Controller as M}from"react-hook-form";import{validateFieldsNatively as V,toNestErrors as q}from"@hookform/resolvers";import K from"ajv";import{g as B}from"./_commonjsHelpers.lGe4XDVY.js";import{Input as H}from"../components/ui/input.js";import{Label as G}from"../components/ui/label.js";import{Textarea as W}from"../components/ui/textarea.js";import{S as J}from"./simpleSelect.DK1qZSXM.js";import{c as Z,i as X}from"./utils.C6Qu-kwd.js";import{D as Y}from"./date-picker.C2VT_rZ9.js";import{createId as ee}from"@paralleldrive/cuid2";import{useImmerReducer as te}from"use-immer";import{useSearchParam as re,useEffectOnce as ne}from"react-use";import{MemoizedIcon as ae}from"../components/ui/icon.js";import{Collapsible as se,CollapsibleTrigger as oe,CollapsibleContent as ie}from"../components/ui/collapsible.js";import{F as ce}from"./feedback.CLMuSvsg.js";import{G as le}from"./generating-star.BN9p_FDu.js";import{getCountry as de}from"countries-and-timezones";import{Switch as ue}from"../components/ui/switch.js";import{C as me}from"./combobox.MyoPH18G.js";import{T as pe}from"./two-level-combobox.DJYP--W9.js";import{u as he,F as fe}from"./feature-flags.DOcVlPHk.js";import{l as ge,c as ye,a as ve,f as we,m as be,b as Ee,d as $e,s as xe,e as _e,g as ke,h as Ne,i as Ce}from"./hooks.BQTKhHSv.js";import{X as Ie}from"lucide-react";import{C as Se}from"./chat-logo.CqPppEb9.js";import{ScrollArea as Pe}from"../components/ui/scroll-area.js";import '../ChatSearch.css';function Ae({suggestions:t,onQuestionClick:r,title:n="Suggested questions"}){return t&&0!==t.length?/* @__PURE__ */e.createElement("div",{className:"w-full p-3 md:p-0","data-name":"Suggestions"},/* @__PURE__ */e.createElement("h3",{className:"text-base font-medium mb-4 text-foreground"},n),/* @__PURE__ */e.createElement("div",{className:"flex flex-wrap gap-2"},t.map(t=>/* @__PURE__ */e.createElement(v,{key:t.id,onClick:()=>r(t),variant:"outline",className:"border-border font-normal whitespace-normal h-auto text-left"},void 0!==t.messageCount&&/* @__PURE__ */e.createElement(h,null,/* @__PURE__ */e.createElement(f,null,/* @__PURE__ */e.createElement(g,{asChild:!0},/* @__PURE__ */e.createElement("span",{className:"bg-gray-100 text-gray-600 px-2 py-0.5 rounded-full text-xs min-w-[20px] border flex items-center justify-center border-border"},t.messageCount)),/* @__PURE__ */e.createElement(y,null,/* @__PURE__ */e.createElement("p",null,t.messageCount," messages in this conversation")))),
|
|
2
2
|
/* @__PURE__ */e.createElement("span",{className:""},t.question))))):null}var Te,Re={exports:{}},je={},Oe={};function De(){return Te||(Te=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce((e,t)=>`${e}${t}`,"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce((e,t)=>(t instanceof r&&(e[t.str]=(e[t.str]||0)+1),e),{})}}function a(e,...t){const r=[e[0]];let a=0;for(;a<t.length;)i(r,t[a]),r.push(e[++a]);return new n(r)}e._Code=n,e.nil=new n(""),e._=a;const s=new n("+");function o(e,...t){const r=[l(e[0])];let a=0;for(;a<t.length;)r.push(s),i(r,t[a]),r.push(s,l(e[++a]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===s){const r=c(e[t-1],e[t+1]);if(void 0!==r){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}(r),new n(r)}function i(e,t){var a;t instanceof n?e.push(...t._items):t instanceof r?e.push(t):e.push("number"==typeof(a=t)||"boolean"==typeof a||null===a?a:l(Array.isArray(a)?a.join(","):a))}function c(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof r||'"'!==e[e.length-1])return;return"string"!=typeof t?`${e.slice(0,-1)}${t}"`:'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0}return"string"!=typeof t||'"'!==t[0]||e instanceof r?void 0:`"${e}${t.slice(1)}`}function l(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.str=o,e.addCodeArg=i,e.strConcat=function(e,t){return t.emptyStr()?e:e.emptyStr()?t:o`${e}${t}`},e.stringify=function(e){return new n(l(e))},e.safeStringify=l,e.getProperty=function(t){return"string"==typeof t&&e.IDENTIFIER.test(t)?new n(`.${t}`):a`[${t}]`},e.getEsmExportName=function(t){if("string"==typeof t&&e.IDENTIFIER.test(t))return new n(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)},e.regexpCode=function(e){return new n(e.toString())}}(Oe)),Oe}var ze,Le,Fe={};function Ue(){return ze||(ze=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=/*@__PURE__*/De();class r extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var n;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(n||(e.UsedValueState=n={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class a{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}e.Scope=a;class s extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=t._`.${new t.Name(r)}[${n}]`}}e.ValueScopeName=s;const o=t._`\n`;e.ValueScope=class extends a{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?o:t.nil}}get(){return this._scope}name(e){return new s(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const n=this.toName(e),{prefix:a}=n,s=null!==(r=t.key)&&void 0!==r?r:t.ref;let o=this._values[a];if(o){const e=o.get(s);if(e)return e}else o=this._values[a]=new Map;o.set(s,n);const i=this._scope[a]||(this._scope[a]=[]),c=i.length;return i[c]=t.ref,n.setValue(t,{property:a,itemIndex:c}),n}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,r=this._values){return this._reduceValues(r,r=>{if(void 0===r.scopePath)throw new Error(`CodeGen: name "${r}" has no value`);return t._`${e}${r.scopePath}`})}scopeCode(e=this._values,t,r){return this._reduceValues(e,e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,r)}_reduceValues(a,s,o={},i){let c=t.nil;for(const l in a){const d=a[l];if(!d)continue;const u=o[l]=o[l]||new Map;d.forEach(a=>{if(u.has(a))return;u.set(a,n.Started);let o=s(a);if(o){const r=this.opts.es5?e.varKinds.var:e.varKinds.const;c=t._`${c}${r} ${a} = ${o};${this.opts._n}`}else{if(!(o=null==i?void 0:i(a)))throw new r(a);c=t._`${c}${o}${this.opts._n}`}u.set(a,n.Completed)})}return c}}}(Fe)),Fe}function Qe(){return Le||(Le=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=/*@__PURE__*/De(),r=/*@__PURE__*/Ue();var n=/*@__PURE__*/De();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var a=/*@__PURE__*/Ue();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return a.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return a.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return a.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return a.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class s{optimizeNodes(){return this}optimizeNames(e,t){return this}}class o extends s{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const n=e?r.varKinds.var:this.varKind,a=void 0===this.rhs?"":` = ${this.rhs}`;return`${n} ${this.name}${a};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=S(this.rhs,e,t)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class i extends s{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof t.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=S(this.rhs,e,r),this}get names(){return I(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}}class c extends i{constructor(e,t,r,n){super(e,r,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class l extends s{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class d extends s{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class u extends s{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class m extends s{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=S(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class p extends s{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,r)=>t+r.render(e),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let n=r.length;for(;n--;){const a=r[n];a.optimizeNames(e,t)||(P(e,a.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>C(e,t.names),{})}}class h extends p{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class f extends p{}class g extends h{}g.kind="else";class y extends h{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new g(e):e}return t?!1===e?t instanceof y?t:t.nodes:this.nodes.length?this:new y(A(e),t instanceof y?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=S(this.condition,e,t),this}get names(){const e=super.names;return I(e,this.condition),this.else&&C(e,this.else.names),e}}y.kind="if";class v extends h{}v.kind="for";class w extends v{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=S(this.iteration,e,t),this}get names(){return C(super.names,this.iteration.names)}}class b extends v{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?r.varKinds.var:this.varKind,{name:n,from:a,to:s}=this;return`for(${t} ${n}=${a}; ${n}<${s}; ${n}++)`+super.render(e)}get names(){const e=I(super.names,this.from);return I(e,this.to)}}class E extends v{constructor(e,t,r,n){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=S(this.iterable,e,t),this}get names(){return C(super.names,this.iterable.names)}}class $ extends h{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}$.kind="func";class x extends p{render(e){return"return "+super.render(e)}}x.kind="return";class _ extends h{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&C(e,this.catch.names),this.finally&&C(e,this.finally.names),e}}class k extends h{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}k.kind="catch";class N extends h{render(e){return"finally"+super.render(e)}}N.kind="finally";function C(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function I(e,r){return r instanceof t._CodeOrName?C(e,r.names):e}function S(e,r,n){return e instanceof t.Name?s(e):(a=e)instanceof t._Code&&a._items.some(e=>e instanceof t.Name&&1===r[e.str]&&void 0!==n[e.str])?new t._Code(e._items.reduce((e,r)=>(r instanceof t.Name&&(r=s(r)),r instanceof t._Code?e.push(...r._items):e.push(r),e),[])):e;var a;function s(e){const t=n[e.str];return void 0===t||1!==r[e.str]?e:(delete r[e.str],t)}}function P(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function A(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:t._`!${O(e)}`}e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new r.Scope({parent:e}),this._nodes=[new f]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){const a=this._scope.toName(t);return void 0!==r&&n&&(this._constants[a.str]=r),this._leafNode(new o(e,a,r)),a}const(e,t,n){return this._def(r.varKinds.const,e,t,n)}let(e,t,n){return this._def(r.varKinds.let,e,t,n)}var(e,t,n){return this._def(r.varKinds.var,e,t,n)}assign(e,t,r){return this._leafNode(new i(e,t,r))}add(t,r){return this._leafNode(new c(t,e.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==t.nil&&this._leafNode(new m(e)),this}object(...e){const r=["{"];for(const[n,a]of e)r.length>1&&r.push(","),r.push(n),(n!==a||this.opts.es5)&&(r.push(":"),(0,t.addCodeArg)(r,a));return r.push("}"),new t._Code(r)}if(e,t,r){if(this._blockNode(new y(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new y(e))}else(){return this._elseNode(new g)}endIf(){return this._endBlockNode(y,g)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new w(e),t)}forRange(e,t,n,a,s=(this.opts.es5?r.varKinds.var:r.varKinds.let)){const o=this._scope.toName(e);return this._for(new b(s,o,t,n),()=>a(o))}forOf(e,n,a,s=r.varKinds.const){const o=this._scope.toName(e);if(this.opts.es5){const e=n instanceof t.Name?n:this.var("_arr",n);return this.forRange("_i",0,t._`${e}.length`,r=>{this.var(o,t._`${e}[${r}]`),a(o)})}return this._for(new E("of",s,o,n),()=>a(o))}forIn(e,n,a,s=(this.opts.es5?r.varKinds.var:r.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,t._`Object.keys(${n})`,a);const o=this._scope.toName(e);return this._for(new E("in",s,o,n),()=>a(o))}endFor(){return this._endBlockNode(v)}label(e){return this._leafNode(new l(e))}break(e){return this._leafNode(new d(e))}return(e){const t=new x;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(x)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new _;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new k(e),t(e)}return r&&(this._currNode=n.finally=new N,this.code(r)),this._endBlockNode(k,N)}throw(e){return this._leafNode(new u(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,r=t.nil,n,a){return this._blockNode(new $(e,r,n)),a&&this.code(a).endFunc(),this}endFunc(){return this._endBlockNode($)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof y))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},e.not=A;const T=j(e.operators.AND);e.and=function(...e){return e.reduce(T)};const R=j(e.operators.OR);function j(e){return(r,n)=>r===t.nil?n:n===t.nil?r:t._`${O(r)} ${e} ${O(n)}`}function O(e){return e instanceof t.Name?e:t._`(${e})`}e.or=function(...e){return e.reduce(R)}}(je)),je}var Me,Ve={},qe={},Ke={},Be={};function He(){if(Me)return Be;Me=1,Object.defineProperty(Be,"__esModule",{value:!0}),Be.checkStrictMode=Be.getErrorPath=Be.Type=Be.useFunc=Be.setEvaluated=Be.evaluatedPropsToName=Be.mergeEvaluated=Be.eachItem=Be.unescapeJsonPointer=Be.escapeJsonPointer=Be.escapeFragment=Be.unescapeFragment=Be.schemaRefOrVal=Be.schemaHasRulesButRef=Be.schemaHasRules=Be.checkUnknownRules=Be.alwaysValidSchema=Be.toHash=void 0;const e=/*@__PURE__*/Qe(),t=/*@__PURE__*/De();function r(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const a=n.RULES.keywords;for(const s in t)a[s]||u(e,`unknown keyword: "${s}"`)}function n(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function a(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function s(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function o({mergeNames:t,mergeToName:r,mergeValues:n,resultToName:a}){return(s,o,i,c)=>{const l=void 0===i?o:i instanceof e.Name?(o instanceof e.Name?t(s,o,i):r(s,o,i),i):o instanceof e.Name?(r(s,i,o),o):n(o,i);return c!==e.Name||l instanceof e.Name?l:a(s,l)}}function i(t,r){if(!0===r)return t.var("props",!0);const n=t.var("props",e._`{}`);return void 0!==r&&c(t,n,r),n}function c(t,r,n){Object.keys(n).forEach(n=>t.assign(e._`${r}${(0,e.getProperty)(n)}`,!0))}Be.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},Be.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(r(e,t),!n(t,e.self.RULES.all))},Be.checkUnknownRules=r,Be.schemaHasRules=n,Be.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},Be.schemaRefOrVal=function({topSchemaRef:t,schemaPath:r},n,a,s){if(!s){if("number"==typeof n||"boolean"==typeof n)return n;if("string"==typeof n)return e._`${n}`}return e._`${t}${r}${(0,e.getProperty)(a)}`},Be.unescapeFragment=function(e){return s(decodeURIComponent(e))},Be.escapeFragment=function(e){return encodeURIComponent(a(e))},Be.escapeJsonPointer=a,Be.unescapeJsonPointer=s,Be.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},Be.mergeEvaluated={props:o({mergeNames:(t,r,n)=>t.if(e._`${n} !== true && ${r} !== undefined`,()=>{t.if(e._`${r} === true`,()=>t.assign(n,!0),()=>t.assign(n,e._`${n} || {}`).code(e._`Object.assign(${n}, ${r})`))}),mergeToName:(t,r,n)=>t.if(e._`${n} !== true`,()=>{!0===r?t.assign(n,!0):(t.assign(n,e._`${n} || {}`),c(t,n,r))}),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:i}),items:o({mergeNames:(t,r,n)=>t.if(e._`${n} !== true && ${r} !== undefined`,()=>t.assign(n,e._`${r} === true ? true : ${n} > ${r} ? ${n} : ${r}`)),mergeToName:(t,r,n)=>t.if(e._`${n} !== true`,()=>t.assign(n,!0===r||e._`${n} > ${r} ? ${n} : ${r}`)),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},Be.evaluatedPropsToName=i,Be.setEvaluated=c;const l={};var d;function u(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}return Be.useFunc=function(e,r){return e.scopeValue("func",{ref:r,code:l[r.code]||(l[r.code]=new t._Code(r.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(d||(Be.Type=d={})),Be.getErrorPath=function(t,r,n){if(t instanceof e.Name){const a=r===d.Num;return n?a?e._`"[" + ${t} + "]"`:e._`"['" + ${t} + "']"`:a?e._`"/" + ${t}`:e._`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,e.getProperty)(t).toString():"/"+a(t)},Be.checkStrictMode=u,Be}var Ge,We,Je,Ze={};function Xe(){if(Ge)return Ze;Ge=1,Object.defineProperty(Ze,"__esModule",{value:!0});const e=/*@__PURE__*/Qe(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return Ze.default=t,Ze}function Ye(){return We||(We=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=/*@__PURE__*/Qe(),r=/*@__PURE__*/He(),n=/*@__PURE__*/Xe();function a(e,r){const a=e.const("err",r);e.if(t._`${n.default.vErrors} === null`,()=>e.assign(n.default.vErrors,t._`[${a}]`),t._`${n.default.vErrors}.push(${a})`),e.code(t._`${n.default.errors}++`)}function s(e,r){const{gen:n,validateName:a,schemaEnv:s}=e;s.$async?n.throw(t._`new ${e.ValidationError}(${r})`):(n.assign(t._`${a}.errors`,r),n.return(!1))}e.keywordError={message:({keyword:e})=>t.str`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:r})=>r?t.str`"${e}" keyword must be ${r} ($data)`:t.str`"${e}" keyword is invalid ($data)`},e.reportError=function(r,n=e.keywordError,o,c){const{it:l}=r,{gen:d,compositeRule:u,allErrors:m}=l,p=i(r,n,o);(null!=c?c:u||m)?a(d,p):s(l,t._`[${p}]`)},e.reportExtraError=function(t,r=e.keywordError,o){const{it:c}=t,{gen:l,compositeRule:d,allErrors:u}=c;a(l,i(t,r,o)),d||u||s(c,n.default.vErrors)},e.resetErrorsCount=function(e,r){e.assign(n.default.errors,r),e.if(t._`${n.default.vErrors} !== null`,()=>e.if(r,()=>e.assign(t._`${n.default.vErrors}.length`,r),()=>e.assign(n.default.vErrors,null)))},e.extendErrors=function({gen:e,keyword:r,schemaValue:a,data:s,errsCount:o,it:i}){if(void 0===o)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",o,n.default.errors,o=>{e.const(c,t._`${n.default.vErrors}[${o}]`),e.if(t._`${c}.instancePath === undefined`,()=>e.assign(t._`${c}.instancePath`,(0,t.strConcat)(n.default.instancePath,i.errorPath))),e.assign(t._`${c}.schemaPath`,t.str`${i.errSchemaPath}/${r}`),i.opts.verbose&&(e.assign(t._`${c}.schema`,a),e.assign(t._`${c}.data`,s))})};const o={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function i(e,r,a){const{createErrors:s}=e.it;return!1===s?t._`{}`:function(e,r,a={}){const{gen:s,it:i}=e,d=[c(i,a),l(e,a)];return function(e,{params:r,message:a},s){const{keyword:i,data:c,schemaValue:l,it:d}=e,{opts:u,propertyName:m,topSchemaRef:p,schemaPath:h}=d;s.push([o.keyword,i],[o.params,"function"==typeof r?r(e):r||t._`{}`]),u.messages&&s.push([o.message,"function"==typeof a?a(e):a]);u.verbose&&s.push([o.schema,l],[o.parentSchema,t._`${p}${h}`],[n.default.data,c]);m&&s.push([o.propertyName,m])}(e,r,d),s.object(...d)}(e,r,a)}function c({errorPath:e},{instancePath:a}){const s=a?t.str`${e}${(0,r.getErrorPath)(a,r.Type.Str)}`:e;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,s)]}function l({keyword:e,it:{errSchemaPath:n}},{schemaPath:a,parentSchema:s}){let i=s?n:t.str`${n}/${e}`;return a&&(i=t.str`${i}${(0,r.getErrorPath)(a,r.Type.Str)}`),[o.schemaPath,i]}}(Ke)),Ke}function et(){if(Je)return qe;Je=1,Object.defineProperty(qe,"__esModule",{value:!0}),qe.boolOrEmptySchema=qe.topBoolOrEmptySchema=void 0;const e=/*@__PURE__*/Ye(),t=/*@__PURE__*/Qe(),r=/*@__PURE__*/Xe(),n={message:"boolean schema is false"};function a(t,r){const{gen:a,data:s}=t,o={gen:a,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,e.reportError)(o,n,void 0,r)}return qe.topBoolOrEmptySchema=function(e){const{gen:n,schema:s,validateName:o}=e;!1===s?a(e,!1):"object"==typeof s&&!0===s.$async?n.return(r.default.data):(n.assign(t._`${o}.errors`,null),n.return(!0))},qe.boolOrEmptySchema=function(e,t){const{gen:r,schema:n}=e;!1===n?(r.var(t,!1),a(e)):r.var(t,!0)},qe}var tt,rt={},nt={};function at(){if(tt)return nt;tt=1,Object.defineProperty(nt,"__esModule",{value:!0}),nt.getRules=nt.isJSONType=void 0;const e=new Set(["string","number","integer","boolean","null","object","array"]);return nt.isJSONType=function(t){return"string"==typeof t&&e.has(t)},nt.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}},nt}var st,ot,it={};function ct(){if(st)return it;function e(e,r){return r.rules.some(r=>t(e,r))}function t(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some(t=>void 0!==e[t]))}return st=1,Object.defineProperty(it,"__esModule",{value:!0}),it.shouldUseRule=it.shouldUseGroup=it.schemaHasRulesForType=void 0,it.schemaHasRulesForType=function({schema:t,self:r},n){const a=r.RULES.types[n];return a&&!0!==a&&e(t,a)},it.shouldUseGroup=e,it.shouldUseRule=t,it}function lt(){if(ot)return rt;ot=1,Object.defineProperty(rt,"__esModule",{value:!0}),rt.reportTypeError=rt.checkDataTypes=rt.checkDataType=rt.coerceAndCheckDataType=rt.getJSONTypes=rt.getSchemaTypes=rt.DataType=void 0;const e=/*@__PURE__*/at(),t=/*@__PURE__*/ct(),r=/*@__PURE__*/Ye(),n=/*@__PURE__*/Qe(),a=/*@__PURE__*/He();var s;function o(t){const r=Array.isArray(t)?t:t?[t]:[];if(r.every(e.isJSONType))return r;throw new Error("type must be JSONType or JSONType[]: "+r.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(s||(rt.DataType=s={})),rt.getSchemaTypes=function(e){const t=o(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},rt.getJSONTypes=o,rt.coerceAndCheckDataType=function(e,r){const{gen:a,data:o,opts:c}=e,d=function(e,t){return t?e.filter(e=>i.has(e)||"array"===t&&"array"===e):[]}(r,c.coerceTypes),m=r.length>0&&!(0===d.length&&1===r.length&&(0,t.schemaHasRulesForType)(e,r[0]));if(m){const t=l(r,o,c.strictNumbers,s.Wrong);a.if(t,()=>{d.length?function(e,t,r){const{gen:a,data:s,opts:o}=e,c=a.let("dataType",n._`typeof ${s}`),d=a.let("coerced",n._`undefined`);"array"===o.coerceTypes&&a.if(n._`${c} == 'object' && Array.isArray(${s}) && ${s}.length == 1`,()=>a.assign(s,n._`${s}[0]`).assign(c,n._`typeof ${s}`).if(l(t,s,o.strictNumbers),()=>a.assign(d,s)));a.if(n._`${d} !== undefined`);for(const n of r)(i.has(n)||"array"===n&&"array"===o.coerceTypes)&&m(n);function m(e){switch(e){case"string":return void a.elseIf(n._`${c} == "number" || ${c} == "boolean"`).assign(d,n._`"" + ${s}`).elseIf(n._`${s} === null`).assign(d,n._`""`);case"number":return void a.elseIf(n._`${c} == "boolean" || ${s} === null
|
|
3
3
|
|| (${c} == "string" && ${s} && ${s} == +${s})`).assign(d,n._`+${s}`);case"integer":return void a.elseIf(n._`${c} === "boolean" || ${s} === null
|
|
4
4
|
|| (${c} === "string" && ${s} && ${s} == +${s} && !(${s} % 1))`).assign(d,n._`+${s}`);case"boolean":return void a.elseIf(n._`${s} === "false" || ${s} === 0 || ${s} === null`).assign(d,!1).elseIf(n._`${s} === "true" || ${s} === 1`).assign(d,!0);case"null":return a.elseIf(n._`${s} === "" || ${s} === 0 || ${s} === false`),void a.assign(d,null);case"array":a.elseIf(n._`${c} === "string" || ${c} === "number"
|
|
@@ -92,4 +92,4 @@ return e.createElement(d.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},t
|
|
|
92
92
|
/* @__PURE__ */e.createElement("div",{ref:dt})),fe&&tt&&!wt&&!W&&!ht&&(()=>{const t=oe.some(e=>"awaiting-knowledge-group"===e.state);/* @__PURE__ */
|
|
93
93
|
return e.createElement(Jr,{ref:lt,initialQuery:de,onQueryChange:ue,isSearching:me,handleFollowUpSearch:Ut,textConfig:ze,enableFileAttachment:Fe,attachedFiles:Ke,isUploading:Be,onAddFiles:He,onRemoveFile:Ge,disabled:t})})(),fe&&wt&&!W&&!ht&&/* @__PURE__ */e.createElement(on,{onStartNewConversation:()=>Lt()}),!ht&&W)});mn.displayName="ChatSearch";const pn=c(({featureFlags:t,...r},n)=>/* @__PURE__ */e.createElement(fe,{flags:t},/* @__PURE__ */e.createElement(xr,{searchPath:r.searchPath,contentTypeEndpoint:r.contentTypeEndpoint,widgetKey:r.apiKey},
|
|
94
94
|
/* @__PURE__ */e.createElement(mn,{...r,ref:n}))));pn.displayName="ChatSearch";export{pn as C,on as R,xr as a,Fr as b,_r as u};
|
|
95
|
-
//# sourceMappingURL=ChatSearch.
|
|
95
|
+
//# sourceMappingURL=ChatSearch.bblH7kYY.js.map
|