altio-chat 1.0.72 → 1.0.74
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 +58 -58
- package/dist/widget.js +147 -147
- package/index.d.ts +41 -41
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
# altio-chat
|
|
2
|
-
|
|
3
|
-
Embeddable Altio chat widget — a single, self-contained JavaScript bundle that renders
|
|
4
|
-
the Altio chat UI inside a **Shadow DOM** (fully isolated from the host page's CSS/JS).
|
|
5
|
-
|
|
6
|
-
Loaded with one `<script>` from a CDN. Updating the widget = publish a new version;
|
|
7
|
-
**embedding apps are never rebuilt**.
|
|
8
|
-
|
|
9
|
-
## Embed (auto-mount)
|
|
10
|
-
|
|
11
|
-
```html
|
|
12
|
-
<div id="altio-chat" style="width:100%;height:600px"></div>
|
|
13
|
-
<script
|
|
14
|
-
src="https://cdn.jsdelivr.net/npm/altio-chat@1/dist/widget.js"
|
|
15
|
-
data-auto-init
|
|
16
|
-
data-target="#altio-chat"
|
|
17
|
-
data-api-url="https://api.altio.co.kr/v1"
|
|
18
|
-
data-agent-api-url="https://v2.api.altio.co.kr/v1"
|
|
19
|
-
></script>
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
Omit `data-target` to fill the whole viewport (like a full-page chat).
|
|
23
|
-
|
|
24
|
-
## Embed (manual mount)
|
|
25
|
-
|
|
26
|
-
```html
|
|
27
|
-
<div id="altio-chat" style="width:100%;height:600px"></div>
|
|
28
|
-
<script src="https://cdn.jsdelivr.net/npm/altio-chat@1/dist/widget.js"></script>
|
|
29
|
-
<script>
|
|
30
|
-
const handle = AltioWidget.mount(document.getElementById("altio-chat"), {
|
|
31
|
-
apiUrl: "https://api.altio.co.kr/v1",
|
|
32
|
-
agentApiUrl: "https://v2.api.altio.co.kr/v1",
|
|
33
|
-
dbEnv: "…", // external-DB slot selector (optional)
|
|
34
|
-
uid: "user-123", // namespaces the saved conversation per user (optional)
|
|
35
|
-
getToken: () => host.getAccessToken(), // signed-in user's token; may be async (optional)
|
|
36
|
-
});
|
|
37
|
-
// handle.destroy() to unmount
|
|
38
|
-
</script>
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## Runtime config
|
|
42
|
-
|
|
43
|
-
| Key | Purpose |
|
|
44
|
-
|---|---|
|
|
45
|
-
| `apiUrl` | Main backend base (POST /threads). |
|
|
46
|
-
| `agentApiUrl` | Agent backend base (connect/ask); falls back to `apiUrl`. |
|
|
47
|
-
| `dbEnv` | External-DB slot selector sent as `env`. |
|
|
48
|
-
| `uid` | Host user id — keys the persisted conversation per user. |
|
|
49
|
-
| `getToken` | Returns the host user's access token (sync or async) so the backend scopes DB reads to that user. Omit for anonymous/guest. |
|
|
50
|
-
|
|
51
|
-
`AltioWidget.setConfig({...})` updates config later (e.g. after the user signs in).
|
|
52
|
-
|
|
53
|
-
## Versioning
|
|
54
|
-
|
|
55
|
-
- `@1` → latest 1.x (recommended). `@0.1.2` → exact pin.
|
|
56
|
-
- Force a fresh CDN copy: `https://purge.jsdelivr.net/npm/altio-chat@1/dist/widget.js`
|
|
57
|
-
|
|
58
|
-
See [PUBLISHING.md](./PUBLISHING.md) for release steps.
|
|
1
|
+
# altio-chat
|
|
2
|
+
|
|
3
|
+
Embeddable Altio chat widget — a single, self-contained JavaScript bundle that renders
|
|
4
|
+
the Altio chat UI inside a **Shadow DOM** (fully isolated from the host page's CSS/JS).
|
|
5
|
+
|
|
6
|
+
Loaded with one `<script>` from a CDN. Updating the widget = publish a new version;
|
|
7
|
+
**embedding apps are never rebuilt**.
|
|
8
|
+
|
|
9
|
+
## Embed (auto-mount)
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<div id="altio-chat" style="width:100%;height:600px"></div>
|
|
13
|
+
<script
|
|
14
|
+
src="https://cdn.jsdelivr.net/npm/altio-chat@1/dist/widget.js"
|
|
15
|
+
data-auto-init
|
|
16
|
+
data-target="#altio-chat"
|
|
17
|
+
data-api-url="https://api.altio.co.kr/v1"
|
|
18
|
+
data-agent-api-url="https://v2.api.altio.co.kr/v1"
|
|
19
|
+
></script>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Omit `data-target` to fill the whole viewport (like a full-page chat).
|
|
23
|
+
|
|
24
|
+
## Embed (manual mount)
|
|
25
|
+
|
|
26
|
+
```html
|
|
27
|
+
<div id="altio-chat" style="width:100%;height:600px"></div>
|
|
28
|
+
<script src="https://cdn.jsdelivr.net/npm/altio-chat@1/dist/widget.js"></script>
|
|
29
|
+
<script>
|
|
30
|
+
const handle = AltioWidget.mount(document.getElementById("altio-chat"), {
|
|
31
|
+
apiUrl: "https://api.altio.co.kr/v1",
|
|
32
|
+
agentApiUrl: "https://v2.api.altio.co.kr/v1",
|
|
33
|
+
dbEnv: "…", // external-DB slot selector (optional)
|
|
34
|
+
uid: "user-123", // namespaces the saved conversation per user (optional)
|
|
35
|
+
getToken: () => host.getAccessToken(), // signed-in user's token; may be async (optional)
|
|
36
|
+
});
|
|
37
|
+
// handle.destroy() to unmount
|
|
38
|
+
</script>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Runtime config
|
|
42
|
+
|
|
43
|
+
| Key | Purpose |
|
|
44
|
+
|---|---|
|
|
45
|
+
| `apiUrl` | Main backend base (POST /threads). |
|
|
46
|
+
| `agentApiUrl` | Agent backend base (connect/ask); falls back to `apiUrl`. |
|
|
47
|
+
| `dbEnv` | External-DB slot selector sent as `env`. |
|
|
48
|
+
| `uid` | Host user id — keys the persisted conversation per user. |
|
|
49
|
+
| `getToken` | Returns the host user's access token (sync or async) so the backend scopes DB reads to that user. Omit for anonymous/guest. |
|
|
50
|
+
|
|
51
|
+
`AltioWidget.setConfig({...})` updates config later (e.g. after the user signs in).
|
|
52
|
+
|
|
53
|
+
## Versioning
|
|
54
|
+
|
|
55
|
+
- `@1` → latest 1.x (recommended). `@0.1.2` → exact pin.
|
|
56
|
+
- Force a fresh CDN copy: `https://purge.jsdelivr.net/npm/altio-chat@1/dist/widget.js`
|
|
57
|
+
|
|
58
|
+
See [PUBLISHING.md](./PUBLISHING.md) for release steps.
|
package/dist/widget.js
CHANGED
|
@@ -60,153 +60,153 @@ Error generating stack: `+l.message+`
|
|
|
60
60
|
|
|
61
61
|
`);for(;oe!==-1;)X(B.slice(0,oe)),B=B.slice(oe+2),oe=B.indexOf(`
|
|
62
62
|
|
|
63
|
-
`)}return B.trim()&&X(B),{answer:P,model:F,references:K}}},Ia={uploadDocument:async({file:e,threadId:t,signal:n})=>{var p;const a=bi(),i=new FormData;i.append("file",e);const o=`${ws()}/kb/documents?scope=THREAD&thread_id=${encodeURIComponent(t)}`,u=await fetch(o,{method:"POST",signal:n,headers:a?{"X-Sheetric-Authorization":`Bearer ${a}`}:void 0,body:i}),c=await u.json().catch(()=>null);if(!u.ok||!((p=c==null?void 0:c.data)!=null&&p.id))throw new Error((c==null?void 0:c.message)||`upload failed: HTTP ${u.status}`);return c.data},listDocuments:async({threadId:e})=>{const t=bi(),n=`${ws()}/kb/documents?scope=THREAD&thread_id=${encodeURIComponent(e)}`;try{const a=await fetch(n,{method:"GET",headers:t?{"X-Sheetric-Authorization":`Bearer ${t}`}:void 0}),i=await a.json().catch(()=>null);return!a.ok||!Array.isArray(i==null?void 0:i.data)?[]:i.data.filter(o=>o.status!=="deleted")}catch{return[]}},previewUrl:async({documentId:e})=>{var a;const t=bi(),n=`${ws()}/kb/documents/${encodeURIComponent(e)}/preview`;try{const i=await fetch(n,{method:"GET",headers:t?{"X-Sheetric-Authorization":`Bearer ${t}`}:void 0}),o=await i.json().catch(()=>null);return!i.ok||!((a=o==null?void 0:o.data)!=null&&a.url)?null:o.data.url}catch{return null}},deleteDocument:async({documentId:e})=>{var a;const t=bi(),n=`${ws()}/kb/documents/${encodeURIComponent(e)}`;try{const i=await fetch(n,{method:"DELETE",headers:t?{"X-Sheetric-Authorization":`Bearer ${t}`}:void 0}),o=await i.json().catch(()=>null);return i.ok&&((a=o==null?void 0:o.data)==null?void 0:a.deleted)===!0}catch{return!1}}},j6="altio_thread_session";function sN(e){if(typeof window!="undefined")try{if(!e){window.localStorage.removeItem(j6);return}window.localStorage.setItem(j6,e)}catch{}}async function oN(){var a,i;const e=bi(),n=(a=(await To.post("/threads",{},e?{headers:{"X-Sheetric-Authorization":`Bearer ${e}`}}:void 0)).data)==null?void 0:a.data;return n!=null&&n.session&&sN(n.session),(i=n==null?void 0:n.tuid)!=null?i:null}const lN=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"
|
|
64
|
-
<g clip-path="url(#clip0_5675_59381)"
|
|
65
|
-
<path d="M3 4.208C3 2.98856 3.98856 2 5.208 2H10.9333L17 7.2V15.792C17 17.0114 16.0114 18 14.792 18H5.208C3.98856 18 3 17.0114 3 15.792V4.208Z" fill="#232D64"
|
|
66
|
-
<path d="M12.5896 7.2H17.0003L10.9336 2V5.544C10.9336 6.45858 11.675 7.2 12.5896 7.2Z" fill="white" fill-opacity="0.5"
|
|
67
|
-
</g
|
|
68
|
-
<defs
|
|
69
|
-
<clipPath id="clip0_5675_59381"
|
|
70
|
-
<rect width="14" height="16" fill="white" transform="translate(3 2)"
|
|
71
|
-
</clipPath
|
|
72
|
-
</defs
|
|
73
|
-
</svg
|
|
74
|
-
`,$6=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"
|
|
75
|
-
<g clip-path="url(#clip0_5675_59393)"
|
|
76
|
-
<path d="M3 4.208C3 2.98856 3.98856 2 5.208 2H10.9333L17 7.2V15.792C17 17.0114 16.0114 18 14.792 18H5.208C3.98856 18 3 17.0114 3 15.792V4.208Z" fill="#3873FF"
|
|
77
|
-
<path d="M12.5896 7.2H17.0003L10.9336 2V5.544C10.9336 6.45858 11.675 7.2 12.5896 7.2Z" fill="white" fill-opacity="0.5"
|
|
78
|
-
</g
|
|
79
|
-
<defs
|
|
80
|
-
<clipPath id="clip0_5675_59393"
|
|
81
|
-
<rect width="14" height="16" fill="white" transform="translate(3 2)"
|
|
82
|
-
</clipPath
|
|
83
|
-
</defs
|
|
84
|
-
</svg
|
|
85
|
-
`,Af=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"
|
|
86
|
-
<g clip-path="url(#clip0_3515_21305)"
|
|
87
|
-
<path d="M6.31152 2.62109H10.9365L16.3789 7.28516V14.6885C16.3786 16.1743 15.1743 17.3786 13.6885 17.3789H6.31152C4.8257 17.3786 3.62135 16.1743 3.62109 14.6885V5.31152C3.62135 3.8257 4.8257 2.62135 6.31152 2.62109Z" fill="white" stroke="#C8D2E1" stroke-width="1.242"
|
|
88
|
-
<path d="M9.9126 2.3999V4.7159C9.9126 6.08778 11.0247 7.1999 12.3966 7.1999H15.2209" stroke="#C8D2E1" stroke-width="1.242" stroke-linecap="round"
|
|
89
|
-
<circle cx="6.56042" cy="10.7999" r="0.828" fill="#6E45F0"
|
|
90
|
-
<circle cx="9.6654" cy="10.7999" r="0.828" fill="#6E45F0"
|
|
91
|
-
<circle cx="12.7704" cy="10.7999" r="0.828" fill="#6E45F0"
|
|
92
|
-
</g
|
|
93
|
-
<defs
|
|
94
|
-
<clipPath id="clip0_3515_21305"
|
|
95
|
-
<rect width="14" height="16" fill="white" transform="translate(3 2)"
|
|
96
|
-
</clipPath
|
|
97
|
-
</defs
|
|
98
|
-
</svg
|
|
99
|
-
`,uN=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"
|
|
100
|
-
<g clip-path="url(#clip0_5675_59363)"
|
|
101
|
-
<path d="M3 4.208C3 2.98856 3.98856 2 5.208 2H10.9333L17 7.2V15.792C17 17.0114 16.0114 18 14.792 18H5.208C3.98856 18 3 17.0114 3 15.792V4.208Z" fill="#0DB664"
|
|
102
|
-
<path d="M12.5896 7.2H17.0003L10.9336 2V5.544C10.9336 6.45858 11.675 7.2 12.5896 7.2Z" fill="white" fill-opacity="0.5"
|
|
103
|
-
</g
|
|
104
|
-
<defs
|
|
105
|
-
<clipPath id="clip0_5675_59363"
|
|
106
|
-
<rect width="14" height="16" fill="white" transform="translate(3 2)"
|
|
107
|
-
</clipPath
|
|
108
|
-
</defs
|
|
109
|
-
</svg
|
|
110
|
-
`,cN=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"
|
|
111
|
-
<path d="M15.9231 6.18182H10.2228L8.38462 4.31978C8.28493 4.2181 8.16631 4.13747 8.03564 4.08258C7.90496 4.02769 7.76483 3.99962 7.62337 4H4.07692C3.79131 4 3.51739 4.11494 3.31542 4.31952C3.11346 4.52411 3 4.80159 3 5.09091V14.9514C3.00053 15.2294 3.10986 15.4959 3.30403 15.6925C3.49819 15.8891 3.76136 15.9996 4.03587 16H15.983C16.2526 15.9996 16.5111 15.891 16.7017 15.6979C16.8924 15.5047 16.9996 15.2429 17 14.9698V7.27273C17 6.9834 16.8865 6.70593 16.6846 6.50134C16.4826 6.29676 16.2087 6.18182 15.9231 6.18182ZM4.07692 5.09091H7.62337L8.70029 6.18182H4.07692V5.09091Z" fill="#87C98A"
|
|
112
|
-
</svg
|
|
113
|
-
`,V6=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"
|
|
114
|
-
<g clip-path="url(#clip0_3515_19568)"
|
|
115
|
-
<path d="M16.1656 2.55005H3.74899C3.0867 2.55005 2.5498 3.08694 2.5498 3.74924V16.2509C2.5498 16.9132 3.0867 17.45 3.74899 17.45H14.3459L14.5262 17.1847L16.6298 15.0811L17.3648 14.4311V14.3461V3.74924C17.3648 3.08694 16.8279 2.55005 16.1656 2.55005Z" fill="#E7ECF6"
|
|
116
|
-
<path d="M16.2502 15.5451V4.34863C16.2502 4.01749 15.9817 3.74902 15.6505 3.74902H4.34814C4.017 3.74902 3.74854 4.01749 3.74854 4.34863V15.651C3.74854 15.9822 4.017 16.2506 4.34814 16.2506H15.5446L16.2502 15.5451Z" fill="#BED8FB"
|
|
117
|
-
<path d="M16.2509 11.8829L13.8453 8.44119C13.5231 7.98022 12.8406 7.98022 12.5184 8.44119L9.41602 12.8797H16.2508V11.8829H16.2509Z" fill="#365E7D"
|
|
118
|
-
<path d="M11.1242 6.75773C11.6418 6.75773 12.0614 6.33813 12.0614 5.82052C12.0614 5.30291 11.6418 4.8833 11.1242 4.8833C10.6066 4.8833 10.187 5.30291 10.187 5.82052C10.187 6.33813 10.6066 6.75773 11.1242 6.75773Z" fill="#FFC344"
|
|
119
|
-
<path d="M7.21133 6.92876L3.74854 11.883V12.3387L7.91736 12.8799H12.6978L8.53825 6.92876C8.21606 6.46776 7.53351 6.46776 7.21133 6.92876Z" fill="#407093"
|
|
120
|
-
<path d="M16.2502 15.5452V12.3384H3.74854V15.6512C3.74854 15.9823 4.017 16.2508 4.34814 16.2508H15.5446L16.2502 15.5452Z" fill="#B3E59F"
|
|
121
|
-
<path d="M14.3457 17.4501L17.4496 14.3462H15.5449C14.8826 14.3462 14.3457 14.8831 14.3457 15.5454V17.4501Z" fill="#ACACAC"
|
|
122
|
-
<path d="M16.2507 2.55005H15.4009C16.0632 2.55005 16.6001 3.08694 16.6001 3.74924V14.3461V15.1959L17.4499 14.3461V3.74924C17.4499 3.08694 16.913 2.55005 16.2507 2.55005Z" fill="#D8E2F1"
|
|
123
|
-
<path d="M14.3457 17.4501L17.4496 14.3462H15.5449C14.8826 14.3462 14.3457 14.8831 14.3457 15.5454V17.4501Z" fill="#80B4FB"
|
|
124
|
-
</g
|
|
125
|
-
<defs
|
|
126
|
-
<clipPath id="clip0_3515_19568"
|
|
127
|
-
<rect width="14.9" height="14.9" fill="white" transform="translate(2.5498 2.55005)"
|
|
128
|
-
</clipPath
|
|
129
|
-
</defs
|
|
130
|
-
</svg
|
|
131
|
-
`,dN=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"
|
|
132
|
-
<g clip-path="url(#clip0_3515_19459)"
|
|
133
|
-
<path d="M6.31104 2.62109H10.9858L16.4546 7.1543V14.248C16.4546 15.7342 15.2494 16.9395 13.7632 16.9395H6.31104C4.82507 16.9392 3.62063 15.7341 3.62061 14.248V5.31152C3.62086 3.8257 4.82522 2.62135 6.31104 2.62109Z" fill="white" stroke="#C8D2E1" stroke-width="1.242"
|
|
134
|
-
<path d="M10.0586 2.65015V4.84552C10.0586 6.14595 11.1128 7.20015 12.4132 7.20015H15.3669" stroke="#C8D2E1" stroke-width="1.17731" stroke-linecap="round"
|
|
135
|
-
<path d="M13.0446 8.9981H6.8326C6.54713 8.9981 6.31152 8.77483 6.31152 8.49905C6.31152 8.22327 6.54713 8 6.8326 8H13.0446C13.33 8 13.5611 8.22327 13.5611 8.49905C13.5611 8.77483 13.33 8.9981 13.0446 8.9981ZM10.9739 15H6.8326C6.54713 15 6.31152 14.7767 6.31152 14.5009C6.31152 14.2252 6.54713 14.0019 6.8326 14.0019H10.9739C11.2594 14.0019 11.4904 14.2252 11.4904 14.5009C11.4904 14.7767 11.2594 15 10.9739 15ZM13.0446 12.9994H6.8326C6.54713 12.9994 6.31152 12.7761 6.31152 12.5003C6.31152 12.2245 6.54713 12.0013 6.8326 12.0013H13.0446C13.33 12.0013 13.5611 12.2245 13.5611 12.5003C13.5611 12.7761 13.33 12.9994 13.0446 12.9994ZM13.0446 10.9987H6.8326C6.54713 10.9987 6.31152 10.7755 6.31152 10.4997C6.31152 10.2239 6.54713 10.0006 6.8326 10.0006H13.0446C13.33 10.0006 13.5611 10.2239 13.5611 10.4997C13.5611 10.7755 13.33 10.9987 13.0446 10.9987Z" fill="#595858"
|
|
136
|
-
</g
|
|
137
|
-
<defs
|
|
138
|
-
<clipPath id="clip0_3515_19459"
|
|
139
|
-
<rect width="14" height="16" fill="white" transform="translate(3 2)"
|
|
140
|
-
</clipPath
|
|
141
|
-
</defs
|
|
142
|
-
</svg
|
|
143
|
-
`,pN=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"
|
|
144
|
-
<g clip-path="url(#clip0_5675_59369)"
|
|
145
|
-
<path d="M3 4.208C3 2.98856 3.98856 2 5.208 2H10.9333L17 7.2V15.792C17 17.0114 16.0114 18 14.792 18H5.208C3.98856 18 3 17.0114 3 15.792V4.208Z" fill="#2B8FDA"
|
|
146
|
-
<path d="M12.5896 7.2H17.0003L10.9336 2V5.544C10.9336 6.45858 11.675 7.2 12.5896 7.2Z" fill="white" fill-opacity="0.5"
|
|
147
|
-
</g
|
|
148
|
-
<defs
|
|
149
|
-
<clipPath id="clip0_5675_59369"
|
|
150
|
-
<rect width="14" height="16" fill="white" transform="translate(3 2)"
|
|
151
|
-
</clipPath
|
|
152
|
-
</defs
|
|
153
|
-
</svg
|
|
154
|
-
`,Y6=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"
|
|
155
|
-
<g clip-path="url(#clip0_5675_59321)"
|
|
156
|
-
<path d="M3 4.208C3 2.98856 3.98856 2 5.208 2H10.9333L17 7.2V15.792C17 17.0114 16.0114 18 14.792 18H5.208C3.98856 18 3 17.0114 3 15.792V4.208Z" fill="#FF1607"
|
|
157
|
-
<path d="M12.5896 7.2H17.0003L10.9336 2V5.544C10.9336 6.45858 11.675 7.2 12.5896 7.2Z" fill="white" fill-opacity="0.5"
|
|
158
|
-
</g
|
|
159
|
-
<defs
|
|
160
|
-
<clipPath id="clip0_5675_59321"
|
|
161
|
-
<rect width="14" height="16" fill="white" transform="translate(3 2)"
|
|
162
|
-
</clipPath
|
|
163
|
-
</defs
|
|
164
|
-
</svg
|
|
165
|
-
`,fN=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"
|
|
166
|
-
<g clip-path="url(#clip0_5675_59387)"
|
|
167
|
-
<path d="M3 4.208C3 2.98856 3.98856 2 5.208 2H10.9333L17 7.2V15.792C17 17.0114 16.0114 18 14.792 18H5.208C3.98856 18 3 17.0114 3 15.792V4.208Z" fill="#FFAD33"
|
|
168
|
-
<path d="M12.5896 7.2H17.0003L10.9336 2V5.544C10.9336 6.45858 11.675 7.2 12.5896 7.2Z" fill="white" fill-opacity="0.5"
|
|
169
|
-
</g
|
|
170
|
-
<defs
|
|
171
|
-
<clipPath id="clip0_5675_59387"
|
|
172
|
-
<rect width="14" height="16" fill="white" transform="translate(3 2)"
|
|
173
|
-
</clipPath
|
|
174
|
-
</defs
|
|
175
|
-
</svg
|
|
176
|
-
`,hN=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"
|
|
177
|
-
<g clip-path="url(#clip0_3515_19592)"
|
|
178
|
-
<path d="M6.31152 2.62109H10.9365L16.3789 7.28516V14.6885C16.3786 16.1743 15.1743 17.3786 13.6885 17.3789H6.31152C4.8257 17.3786 3.62135 16.1743 3.62109 14.6885V5.31152C3.62135 3.8257 4.8257 2.62135 6.31152 2.62109Z" fill="white" stroke="#C8D2E1" stroke-width="1.242"
|
|
179
|
-
<path d="M9.9126 2.3999V4.7159C9.9126 6.08778 11.0247 7.1999 12.3966 7.1999H15.2209" stroke="#C8D2E1" stroke-width="1.242" stroke-linecap="round"
|
|
180
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.52539 13.954H9.65459V15.0999H6.52539V13.954ZM10.6312 8.09985H13.7704V9.23603H10.6312V8.09985ZM6.52539 8.09985H9.65459V9.23603H6.52539V8.09985ZM10.6312 10.0256H13.7704V11.1714H10.6312V10.0256ZM6.52539 10.0256H9.65459V11.1714H6.52539V10.0256ZM10.6312 12.0283H13.7704V13.1741H10.6312V12.0283ZM6.52539 12.0283H9.65459V13.1741H6.52539V12.0283ZM10.6312 13.954H13.7704V15.0999H10.6312V13.954Z" fill="#4CAF50"
|
|
181
|
-
</g
|
|
182
|
-
<defs
|
|
183
|
-
<clipPath id="clip0_3515_19592"
|
|
184
|
-
<rect width="14" height="16" fill="white" transform="translate(3 2)"
|
|
185
|
-
</clipPath
|
|
186
|
-
</defs
|
|
187
|
-
</svg
|
|
188
|
-
`,mN=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"
|
|
189
|
-
<g clip-path="url(#clip0_5675_59375)"
|
|
190
|
-
<path d="M3 4.208C3 2.98856 3.98856 2 5.208 2H10.9333L17 7.2V15.792C17 17.0114 16.0114 18 14.792 18H5.208C3.98856 18 3 17.0114 3 15.792V4.208Z" fill="#ED1B24"
|
|
191
|
-
<path d="M12.5896 7.2H17.0003L10.9336 2V5.544C10.9336 6.45858 11.675 7.2 12.5896 7.2Z" fill="white" fill-opacity="0.5"
|
|
192
|
-
</g
|
|
193
|
-
<defs
|
|
194
|
-
<clipPath id="clip0_5675_59375"
|
|
195
|
-
<rect width="14" height="16" fill="white" transform="translate(3 2)"
|
|
196
|
-
</clipPath
|
|
197
|
-
</defs
|
|
198
|
-
</svg
|
|
199
|
-
`,gN=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"
|
|
200
|
-
<g clip-path="url(#clip0_5675_59357)"
|
|
201
|
-
<path d="M3 4.208C3 2.98856 3.98856 2 5.208 2H10.9333L17 7.2V15.792C17 17.0114 16.0114 18 14.792 18H5.208C3.98856 18 3 17.0114 3 15.792V4.208Z" fill="#344054"
|
|
202
|
-
<path d="M12.5896 7.2H17.0003L10.9336 2V5.544C10.9336 6.45858 11.675 7.2 12.5896 7.2Z" fill="white" fill-opacity="0.5"
|
|
203
|
-
</g
|
|
204
|
-
<defs
|
|
205
|
-
<clipPath id="clip0_5675_59357"
|
|
206
|
-
<rect width="14" height="16" fill="white" transform="translate(3 2)"
|
|
207
|
-
</clipPath
|
|
208
|
-
</defs
|
|
209
|
-
</svg
|
|
63
|
+
`)}return B.trim()&&X(B),{answer:P,model:F,references:K}}},Ia={uploadDocument:async({file:e,threadId:t,signal:n})=>{var p;const a=bi(),i=new FormData;i.append("file",e);const o=`${ws()}/kb/documents?scope=THREAD&thread_id=${encodeURIComponent(t)}`,u=await fetch(o,{method:"POST",signal:n,headers:a?{"X-Sheetric-Authorization":`Bearer ${a}`}:void 0,body:i}),c=await u.json().catch(()=>null);if(!u.ok||!((p=c==null?void 0:c.data)!=null&&p.id))throw new Error((c==null?void 0:c.message)||`upload failed: HTTP ${u.status}`);return c.data},listDocuments:async({threadId:e})=>{const t=bi(),n=`${ws()}/kb/documents?scope=THREAD&thread_id=${encodeURIComponent(e)}`;try{const a=await fetch(n,{method:"GET",headers:t?{"X-Sheetric-Authorization":`Bearer ${t}`}:void 0}),i=await a.json().catch(()=>null);return!a.ok||!Array.isArray(i==null?void 0:i.data)?[]:i.data.filter(o=>o.status!=="deleted")}catch{return[]}},previewUrl:async({documentId:e})=>{var a;const t=bi(),n=`${ws()}/kb/documents/${encodeURIComponent(e)}/preview`;try{const i=await fetch(n,{method:"GET",headers:t?{"X-Sheetric-Authorization":`Bearer ${t}`}:void 0}),o=await i.json().catch(()=>null);return!i.ok||!((a=o==null?void 0:o.data)!=null&&a.url)?null:o.data.url}catch{return null}},deleteDocument:async({documentId:e})=>{var a;const t=bi(),n=`${ws()}/kb/documents/${encodeURIComponent(e)}`;try{const i=await fetch(n,{method:"DELETE",headers:t?{"X-Sheetric-Authorization":`Bearer ${t}`}:void 0}),o=await i.json().catch(()=>null);return i.ok&&((a=o==null?void 0:o.data)==null?void 0:a.deleted)===!0}catch{return!1}}},j6="altio_thread_session";function sN(e){if(typeof window!="undefined")try{if(!e){window.localStorage.removeItem(j6);return}window.localStorage.setItem(j6,e)}catch{}}async function oN(){var a,i;const e=bi(),n=(a=(await To.post("/threads",{},e?{headers:{"X-Sheetric-Authorization":`Bearer ${e}`}}:void 0)).data)==null?void 0:a.data;return n!=null&&n.session&&sN(n.session),(i=n==null?void 0:n.tuid)!=null?i:null}const lN=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
64
|
+
<g clip-path="url(#clip0_5675_59381)">
|
|
65
|
+
<path d="M3 4.208C3 2.98856 3.98856 2 5.208 2H10.9333L17 7.2V15.792C17 17.0114 16.0114 18 14.792 18H5.208C3.98856 18 3 17.0114 3 15.792V4.208Z" fill="#232D64"/>
|
|
66
|
+
<path d="M12.5896 7.2H17.0003L10.9336 2V5.544C10.9336 6.45858 11.675 7.2 12.5896 7.2Z" fill="white" fill-opacity="0.5"/>
|
|
67
|
+
</g>
|
|
68
|
+
<defs>
|
|
69
|
+
<clipPath id="clip0_5675_59381">
|
|
70
|
+
<rect width="14" height="16" fill="white" transform="translate(3 2)"/>
|
|
71
|
+
</clipPath>
|
|
72
|
+
</defs>
|
|
73
|
+
</svg>
|
|
74
|
+
`,$6=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
75
|
+
<g clip-path="url(#clip0_5675_59393)">
|
|
76
|
+
<path d="M3 4.208C3 2.98856 3.98856 2 5.208 2H10.9333L17 7.2V15.792C17 17.0114 16.0114 18 14.792 18H5.208C3.98856 18 3 17.0114 3 15.792V4.208Z" fill="#3873FF"/>
|
|
77
|
+
<path d="M12.5896 7.2H17.0003L10.9336 2V5.544C10.9336 6.45858 11.675 7.2 12.5896 7.2Z" fill="white" fill-opacity="0.5"/>
|
|
78
|
+
</g>
|
|
79
|
+
<defs>
|
|
80
|
+
<clipPath id="clip0_5675_59393">
|
|
81
|
+
<rect width="14" height="16" fill="white" transform="translate(3 2)"/>
|
|
82
|
+
</clipPath>
|
|
83
|
+
</defs>
|
|
84
|
+
</svg>
|
|
85
|
+
`,Af=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
86
|
+
<g clip-path="url(#clip0_3515_21305)">
|
|
87
|
+
<path d="M6.31152 2.62109H10.9365L16.3789 7.28516V14.6885C16.3786 16.1743 15.1743 17.3786 13.6885 17.3789H6.31152C4.8257 17.3786 3.62135 16.1743 3.62109 14.6885V5.31152C3.62135 3.8257 4.8257 2.62135 6.31152 2.62109Z" fill="white" stroke="#C8D2E1" stroke-width="1.242"/>
|
|
88
|
+
<path d="M9.9126 2.3999V4.7159C9.9126 6.08778 11.0247 7.1999 12.3966 7.1999H15.2209" stroke="#C8D2E1" stroke-width="1.242" stroke-linecap="round"/>
|
|
89
|
+
<circle cx="6.56042" cy="10.7999" r="0.828" fill="#6E45F0"/>
|
|
90
|
+
<circle cx="9.6654" cy="10.7999" r="0.828" fill="#6E45F0"/>
|
|
91
|
+
<circle cx="12.7704" cy="10.7999" r="0.828" fill="#6E45F0"/>
|
|
92
|
+
</g>
|
|
93
|
+
<defs>
|
|
94
|
+
<clipPath id="clip0_3515_21305">
|
|
95
|
+
<rect width="14" height="16" fill="white" transform="translate(3 2)"/>
|
|
96
|
+
</clipPath>
|
|
97
|
+
</defs>
|
|
98
|
+
</svg>
|
|
99
|
+
`,uN=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
100
|
+
<g clip-path="url(#clip0_5675_59363)">
|
|
101
|
+
<path d="M3 4.208C3 2.98856 3.98856 2 5.208 2H10.9333L17 7.2V15.792C17 17.0114 16.0114 18 14.792 18H5.208C3.98856 18 3 17.0114 3 15.792V4.208Z" fill="#0DB664"/>
|
|
102
|
+
<path d="M12.5896 7.2H17.0003L10.9336 2V5.544C10.9336 6.45858 11.675 7.2 12.5896 7.2Z" fill="white" fill-opacity="0.5"/>
|
|
103
|
+
</g>
|
|
104
|
+
<defs>
|
|
105
|
+
<clipPath id="clip0_5675_59363">
|
|
106
|
+
<rect width="14" height="16" fill="white" transform="translate(3 2)"/>
|
|
107
|
+
</clipPath>
|
|
108
|
+
</defs>
|
|
109
|
+
</svg>
|
|
110
|
+
`,cN=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
111
|
+
<path d="M15.9231 6.18182H10.2228L8.38462 4.31978C8.28493 4.2181 8.16631 4.13747 8.03564 4.08258C7.90496 4.02769 7.76483 3.99962 7.62337 4H4.07692C3.79131 4 3.51739 4.11494 3.31542 4.31952C3.11346 4.52411 3 4.80159 3 5.09091V14.9514C3.00053 15.2294 3.10986 15.4959 3.30403 15.6925C3.49819 15.8891 3.76136 15.9996 4.03587 16H15.983C16.2526 15.9996 16.5111 15.891 16.7017 15.6979C16.8924 15.5047 16.9996 15.2429 17 14.9698V7.27273C17 6.9834 16.8865 6.70593 16.6846 6.50134C16.4826 6.29676 16.2087 6.18182 15.9231 6.18182ZM4.07692 5.09091H7.62337L8.70029 6.18182H4.07692V5.09091Z" fill="#87C98A"/>
|
|
112
|
+
</svg>
|
|
113
|
+
`,V6=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
114
|
+
<g clip-path="url(#clip0_3515_19568)">
|
|
115
|
+
<path d="M16.1656 2.55005H3.74899C3.0867 2.55005 2.5498 3.08694 2.5498 3.74924V16.2509C2.5498 16.9132 3.0867 17.45 3.74899 17.45H14.3459L14.5262 17.1847L16.6298 15.0811L17.3648 14.4311V14.3461V3.74924C17.3648 3.08694 16.8279 2.55005 16.1656 2.55005Z" fill="#E7ECF6"/>
|
|
116
|
+
<path d="M16.2502 15.5451V4.34863C16.2502 4.01749 15.9817 3.74902 15.6505 3.74902H4.34814C4.017 3.74902 3.74854 4.01749 3.74854 4.34863V15.651C3.74854 15.9822 4.017 16.2506 4.34814 16.2506H15.5446L16.2502 15.5451Z" fill="#BED8FB"/>
|
|
117
|
+
<path d="M16.2509 11.8829L13.8453 8.44119C13.5231 7.98022 12.8406 7.98022 12.5184 8.44119L9.41602 12.8797H16.2508V11.8829H16.2509Z" fill="#365E7D"/>
|
|
118
|
+
<path d="M11.1242 6.75773C11.6418 6.75773 12.0614 6.33813 12.0614 5.82052C12.0614 5.30291 11.6418 4.8833 11.1242 4.8833C10.6066 4.8833 10.187 5.30291 10.187 5.82052C10.187 6.33813 10.6066 6.75773 11.1242 6.75773Z" fill="#FFC344"/>
|
|
119
|
+
<path d="M7.21133 6.92876L3.74854 11.883V12.3387L7.91736 12.8799H12.6978L8.53825 6.92876C8.21606 6.46776 7.53351 6.46776 7.21133 6.92876Z" fill="#407093"/>
|
|
120
|
+
<path d="M16.2502 15.5452V12.3384H3.74854V15.6512C3.74854 15.9823 4.017 16.2508 4.34814 16.2508H15.5446L16.2502 15.5452Z" fill="#B3E59F"/>
|
|
121
|
+
<path d="M14.3457 17.4501L17.4496 14.3462H15.5449C14.8826 14.3462 14.3457 14.8831 14.3457 15.5454V17.4501Z" fill="#ACACAC"/>
|
|
122
|
+
<path d="M16.2507 2.55005H15.4009C16.0632 2.55005 16.6001 3.08694 16.6001 3.74924V14.3461V15.1959L17.4499 14.3461V3.74924C17.4499 3.08694 16.913 2.55005 16.2507 2.55005Z" fill="#D8E2F1"/>
|
|
123
|
+
<path d="M14.3457 17.4501L17.4496 14.3462H15.5449C14.8826 14.3462 14.3457 14.8831 14.3457 15.5454V17.4501Z" fill="#80B4FB"/>
|
|
124
|
+
</g>
|
|
125
|
+
<defs>
|
|
126
|
+
<clipPath id="clip0_3515_19568">
|
|
127
|
+
<rect width="14.9" height="14.9" fill="white" transform="translate(2.5498 2.55005)"/>
|
|
128
|
+
</clipPath>
|
|
129
|
+
</defs>
|
|
130
|
+
</svg>
|
|
131
|
+
`,dN=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
132
|
+
<g clip-path="url(#clip0_3515_19459)">
|
|
133
|
+
<path d="M6.31104 2.62109H10.9858L16.4546 7.1543V14.248C16.4546 15.7342 15.2494 16.9395 13.7632 16.9395H6.31104C4.82507 16.9392 3.62063 15.7341 3.62061 14.248V5.31152C3.62086 3.8257 4.82522 2.62135 6.31104 2.62109Z" fill="white" stroke="#C8D2E1" stroke-width="1.242"/>
|
|
134
|
+
<path d="M10.0586 2.65015V4.84552C10.0586 6.14595 11.1128 7.20015 12.4132 7.20015H15.3669" stroke="#C8D2E1" stroke-width="1.17731" stroke-linecap="round"/>
|
|
135
|
+
<path d="M13.0446 8.9981H6.8326C6.54713 8.9981 6.31152 8.77483 6.31152 8.49905C6.31152 8.22327 6.54713 8 6.8326 8H13.0446C13.33 8 13.5611 8.22327 13.5611 8.49905C13.5611 8.77483 13.33 8.9981 13.0446 8.9981ZM10.9739 15H6.8326C6.54713 15 6.31152 14.7767 6.31152 14.5009C6.31152 14.2252 6.54713 14.0019 6.8326 14.0019H10.9739C11.2594 14.0019 11.4904 14.2252 11.4904 14.5009C11.4904 14.7767 11.2594 15 10.9739 15ZM13.0446 12.9994H6.8326C6.54713 12.9994 6.31152 12.7761 6.31152 12.5003C6.31152 12.2245 6.54713 12.0013 6.8326 12.0013H13.0446C13.33 12.0013 13.5611 12.2245 13.5611 12.5003C13.5611 12.7761 13.33 12.9994 13.0446 12.9994ZM13.0446 10.9987H6.8326C6.54713 10.9987 6.31152 10.7755 6.31152 10.4997C6.31152 10.2239 6.54713 10.0006 6.8326 10.0006H13.0446C13.33 10.0006 13.5611 10.2239 13.5611 10.4997C13.5611 10.7755 13.33 10.9987 13.0446 10.9987Z" fill="#595858"/>
|
|
136
|
+
</g>
|
|
137
|
+
<defs>
|
|
138
|
+
<clipPath id="clip0_3515_19459">
|
|
139
|
+
<rect width="14" height="16" fill="white" transform="translate(3 2)"/>
|
|
140
|
+
</clipPath>
|
|
141
|
+
</defs>
|
|
142
|
+
</svg>
|
|
143
|
+
`,pN=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
144
|
+
<g clip-path="url(#clip0_5675_59369)">
|
|
145
|
+
<path d="M3 4.208C3 2.98856 3.98856 2 5.208 2H10.9333L17 7.2V15.792C17 17.0114 16.0114 18 14.792 18H5.208C3.98856 18 3 17.0114 3 15.792V4.208Z" fill="#2B8FDA"/>
|
|
146
|
+
<path d="M12.5896 7.2H17.0003L10.9336 2V5.544C10.9336 6.45858 11.675 7.2 12.5896 7.2Z" fill="white" fill-opacity="0.5"/>
|
|
147
|
+
</g>
|
|
148
|
+
<defs>
|
|
149
|
+
<clipPath id="clip0_5675_59369">
|
|
150
|
+
<rect width="14" height="16" fill="white" transform="translate(3 2)"/>
|
|
151
|
+
</clipPath>
|
|
152
|
+
</defs>
|
|
153
|
+
</svg>
|
|
154
|
+
`,Y6=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
155
|
+
<g clip-path="url(#clip0_5675_59321)">
|
|
156
|
+
<path d="M3 4.208C3 2.98856 3.98856 2 5.208 2H10.9333L17 7.2V15.792C17 17.0114 16.0114 18 14.792 18H5.208C3.98856 18 3 17.0114 3 15.792V4.208Z" fill="#FF1607"/>
|
|
157
|
+
<path d="M12.5896 7.2H17.0003L10.9336 2V5.544C10.9336 6.45858 11.675 7.2 12.5896 7.2Z" fill="white" fill-opacity="0.5"/>
|
|
158
|
+
</g>
|
|
159
|
+
<defs>
|
|
160
|
+
<clipPath id="clip0_5675_59321">
|
|
161
|
+
<rect width="14" height="16" fill="white" transform="translate(3 2)"/>
|
|
162
|
+
</clipPath>
|
|
163
|
+
</defs>
|
|
164
|
+
</svg>
|
|
165
|
+
`,fN=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
166
|
+
<g clip-path="url(#clip0_5675_59387)">
|
|
167
|
+
<path d="M3 4.208C3 2.98856 3.98856 2 5.208 2H10.9333L17 7.2V15.792C17 17.0114 16.0114 18 14.792 18H5.208C3.98856 18 3 17.0114 3 15.792V4.208Z" fill="#FFAD33"/>
|
|
168
|
+
<path d="M12.5896 7.2H17.0003L10.9336 2V5.544C10.9336 6.45858 11.675 7.2 12.5896 7.2Z" fill="white" fill-opacity="0.5"/>
|
|
169
|
+
</g>
|
|
170
|
+
<defs>
|
|
171
|
+
<clipPath id="clip0_5675_59387">
|
|
172
|
+
<rect width="14" height="16" fill="white" transform="translate(3 2)"/>
|
|
173
|
+
</clipPath>
|
|
174
|
+
</defs>
|
|
175
|
+
</svg>
|
|
176
|
+
`,hN=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
177
|
+
<g clip-path="url(#clip0_3515_19592)">
|
|
178
|
+
<path d="M6.31152 2.62109H10.9365L16.3789 7.28516V14.6885C16.3786 16.1743 15.1743 17.3786 13.6885 17.3789H6.31152C4.8257 17.3786 3.62135 16.1743 3.62109 14.6885V5.31152C3.62135 3.8257 4.8257 2.62135 6.31152 2.62109Z" fill="white" stroke="#C8D2E1" stroke-width="1.242"/>
|
|
179
|
+
<path d="M9.9126 2.3999V4.7159C9.9126 6.08778 11.0247 7.1999 12.3966 7.1999H15.2209" stroke="#C8D2E1" stroke-width="1.242" stroke-linecap="round"/>
|
|
180
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.52539 13.954H9.65459V15.0999H6.52539V13.954ZM10.6312 8.09985H13.7704V9.23603H10.6312V8.09985ZM6.52539 8.09985H9.65459V9.23603H6.52539V8.09985ZM10.6312 10.0256H13.7704V11.1714H10.6312V10.0256ZM6.52539 10.0256H9.65459V11.1714H6.52539V10.0256ZM10.6312 12.0283H13.7704V13.1741H10.6312V12.0283ZM6.52539 12.0283H9.65459V13.1741H6.52539V12.0283ZM10.6312 13.954H13.7704V15.0999H10.6312V13.954Z" fill="#4CAF50"/>
|
|
181
|
+
</g>
|
|
182
|
+
<defs>
|
|
183
|
+
<clipPath id="clip0_3515_19592">
|
|
184
|
+
<rect width="14" height="16" fill="white" transform="translate(3 2)"/>
|
|
185
|
+
</clipPath>
|
|
186
|
+
</defs>
|
|
187
|
+
</svg>
|
|
188
|
+
`,mN=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
189
|
+
<g clip-path="url(#clip0_5675_59375)">
|
|
190
|
+
<path d="M3 4.208C3 2.98856 3.98856 2 5.208 2H10.9333L17 7.2V15.792C17 17.0114 16.0114 18 14.792 18H5.208C3.98856 18 3 17.0114 3 15.792V4.208Z" fill="#ED1B24"/>
|
|
191
|
+
<path d="M12.5896 7.2H17.0003L10.9336 2V5.544C10.9336 6.45858 11.675 7.2 12.5896 7.2Z" fill="white" fill-opacity="0.5"/>
|
|
192
|
+
</g>
|
|
193
|
+
<defs>
|
|
194
|
+
<clipPath id="clip0_5675_59375">
|
|
195
|
+
<rect width="14" height="16" fill="white" transform="translate(3 2)"/>
|
|
196
|
+
</clipPath>
|
|
197
|
+
</defs>
|
|
198
|
+
</svg>
|
|
199
|
+
`,gN=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
200
|
+
<g clip-path="url(#clip0_5675_59357)">
|
|
201
|
+
<path d="M3 4.208C3 2.98856 3.98856 2 5.208 2H10.9333L17 7.2V15.792C17 17.0114 16.0114 18 14.792 18H5.208C3.98856 18 3 17.0114 3 15.792V4.208Z" fill="#344054"/>
|
|
202
|
+
<path d="M12.5896 7.2H17.0003L10.9336 2V5.544C10.9336 6.45858 11.675 7.2 12.5896 7.2Z" fill="white" fill-opacity="0.5"/>
|
|
203
|
+
</g>
|
|
204
|
+
<defs>
|
|
205
|
+
<clipPath id="clip0_5675_59357">
|
|
206
|
+
<rect width="14" height="16" fill="white" transform="translate(3 2)"/>
|
|
207
|
+
</clipPath>
|
|
208
|
+
</defs>
|
|
209
|
+
</svg>
|
|
210
210
|
`;function X6(e){const t=e.lastIndexOf(".");switch(t>0?e.slice(t+1).toLowerCase():""){case"pdf":return Y6;case"doc":case"docx":case"hwp":case"hwpx":case"txt":case"rtf":return $6;case"ppt":case"pptx":return fN;case"xls":case"xlsx":case"csv":case"tsv":return uN;case"png":case"jpg":case"jpeg":case"gif":case"webp":case"bmp":case"svg":return V6;case"mp3":case"wav":case"m4a":case"ogg":case"flac":case"aac":return pN;case"mp4":case"mov":case"avi":case"mkv":case"webm":return mN;case"zip":case"rar":case"7z":case"gz":case"tar":return gN;case"md":case"markdown":return dN;case"js":case"jsx":case"ts":case"tsx":case"json":case"html":case"css":case"scss":case"py":case"java":case"kt":case"swift":case"cs":case"c":case"cpp":case"go":case"rs":case"rb":case"php":case"sh":case"xml":case"yml":case"yaml":return lN;default:return Af}}function bN(e,t,n){switch(e){case"folder":return cN;case"sheet":return hN;case"note":return $6;case"file":return t?X6(t):n!=null&&n.startsWith("image/")?V6:n==="application/pdf"?Y6:Af;default:return Af}}function EN(e,t){if(typeof window=="undefined"||!e)return;const n={type:"ALTIO_OPEN_NOTE",noteId:e,owned:t};window.postMessage(n,"*")}function yN(e){return e.kind==="note"?"note":"file"}function TN(e,t){var o;if(!(e!=null&&e.length))return[];const n=[],a=new Map;for(const u of e){if(yN(u)==="note"){const h=u.note_id;if(!h)continue;const g=`note:${h}`;a.has(g)||(n.push(g),a.set(g,{kind:"note",noteId:h,name:u.name||h,path:(o=u.path)!=null?o:[],pathTruncated:!!u.path_truncated,owned:u.owned!==!1}));continue}if(u.source==="thread"||u.document_id&&(t!=null&&t.has(u.document_id)))continue;const c=u.document_id||u.filename;if(!c)continue;const p=`file:${c}`;let f=a.get(p);f||(f={kind:"file",documentId:u.document_id||"",filename:u.filename||c,pages:[]},n.push(p),a.set(p,f)),f.kind==="file"&&typeof u.page=="number"&&Number.isFinite(u.page)&&!f.pages.includes(u.page)&&f.pages.push(u.page)}const i=n.map(u=>a.get(u));for(const u of i)u.kind==="file"&&u.pages.sort((c,p)=>c-p);return i}function vN(e){return e.pages.length?`${e.filename} (page. ${e.pages.join(", ")})`:e.filename}function SN(e,t,n){const a=[e,...t];return a.length<3&&!n?a.join(" > "):`${a[0]} > ... > ${a[a.length-1]}`}async function wN(e){const t=window.open("about:blank","_blank");t&&(t.opener=null);const n=await Ia.previewUrl({documentId:e});return n?(t?t.location.href=n:window.open(n,"_blank","noopener,noreferrer"),!0):(t==null||t.close(),!1)}function AN({label:e,title:t,onClick:n}){return ae.jsx("button",{type:"button",title:t,onClick:n,className:"cursor-pointer text-left text-[14px] leading-[20px] text-[#00000] underline decoration-from-font underline-offset-2",children:e})}function xN({references:e,attachedIds:t}){const{t:n}=Xc(),[a,i]=_.useState(null),o=TN(e,t);if(o.length===0)return null;const u=n("chat.sources.myDrive","내 드라이브"),c=p=>p.kind==="file"?vN(p):p.owned?`${p.name} — ${SN(u,p.path,p.pathTruncated)}`:p.name;return ae.jsxs("div",{className:"mt-[14px] flex flex-col gap-[4px]",children:[ae.jsx("span",{className:"text-[14px] leading-[24px] font-bold text-[#000000]",children:"출처"}),ae.jsx("ul",{className:"m-0 flex list-none flex-col gap-[2px] p-0",children:o.map(p=>{const f=p.kind==="file"?`file:${p.documentId||p.filename}`:`note:${p.noteId}`,h=c(p),g=p.kind==="file"?p.documentId:"",v=p.kind==="note"||!!g,y=!!g&&a===g;return ae.jsxs("li",{className:"flex items-start gap-[6px]",children:[ae.jsx("span",{"aria-hidden":"true",className:"text-[12px] leading-[20px] text-[#8A8FB0] select-none",children:"•"}),ae.jsxs("span",{className:"flex min-w-0 flex-col",children:[v?ae.jsx(AN,{label:h,title:h,onClick:()=>{if(p.kind==="note"){EN(p.noteId,p.owned);return}i(null),wN(g).then(k=>{k||i(g)})}}):ae.jsx("span",{title:h,className:"text-[12px] leading-[20px] text-[#4A4F73]",children:h}),y&&ae.jsx("span",{className:"text-[11px] leading-[18px] text-[#FF3D3D]",children:n("chat.sources.unavailable","이 문서는 지금 열 수 없습니다.")})]})]},f)})})]})}const kN="app-logo-cache";function _N(){if(typeof window!="undefined")try{const e=localStorage.getItem(kN);return e?JSON.parse(e):void 0}catch{return}}function RN(){var t,n,a,i;const e=_N();return(i=(a=(n=(t=e==null?void 0:e.data)==null?void 0:t.list)==null?void 0:n.logo)==null?void 0:a.icon)!=null?i:""}function K6(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=K6(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function CN(){for(var e,t,n=0,a="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=K6(e))&&(a&&(a+=" "),a+=t);return a}const NN=(e,t)=>{const n=new Array(e.length+t.length);for(let a=0;a<e.length;a++)n[a]=e[a];for(let a=0;a<t.length;a++)n[e.length+a]=t[a];return n},IN=(e,t)=>({classGroupId:e,validator:t}),W6=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ld="-",Z6=[],ON="arbitrary..",DN=e=>{const t=MN(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return LN(u);const c=u.split(ld),p=c[0]===""&&c.length>1?1:0;return Q6(c,p,t)},getConflictingClassGroupIds:(u,c)=>{if(c){const p=a[u],f=n[u];return p?f?NN(f,p):p:f||Z6}return n[u]||Z6}}},Q6=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],o=n.nextPart.get(i);if(o){const f=Q6(e,t+1,o);if(f)return f}const u=n.validators;if(u===null)return;const c=t===0?e.join(ld):e.slice(t).join(ld),p=u.length;for(let f=0;f<p;f++){const h=u[f];if(h.validator(c))return h.classGroupId}},LN=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),a=t.slice(0,n);return a?ON+a:void 0})(),MN=e=>{const{theme:t,classGroups:n}=e;return zN(n,t)},zN=(e,t)=>{const n=W6();for(const a in e){const i=e[a];xf(i,n,a,t)}return n},xf=(e,t,n,a)=>{const i=e.length;for(let o=0;o<i;o++){const u=e[o];BN(u,t,n,a)}},BN=(e,t,n,a)=>{if(typeof e=="string"){FN(e,t,n);return}if(typeof e=="function"){UN(e,t,n,a);return}PN(e,t,n,a)},FN=(e,t,n)=>{const a=e===""?t:J6(t,e);a.classGroupId=n},UN=(e,t,n,a)=>{if(HN(e)){xf(e(a),t,n,a);return}t.validators===null&&(t.validators=[]),t.validators.push(IN(n,e))},PN=(e,t,n,a)=>{const i=Object.entries(e),o=i.length;for(let u=0;u<o;u++){const[c,p]=i[u];xf(p,J6(t,c),n,a)}},J6=(e,t)=>{let n=e;const a=t.split(ld),i=a.length;for(let o=0;o<i;o++){const u=a[o];let c=n.nextPart.get(u);c||(c=W6(),n.nextPart.set(u,c)),n=c}return n},HN=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,GN=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),a=Object.create(null);const i=(o,u)=>{n[o]=u,t++,t>e&&(t=0,a=n,n=Object.create(null))};return{get(o){let u=n[o];if(u!==void 0)return u;if((u=a[o])!==void 0)return i(o,u),u},set(o,u){o in n?n[o]=u:i(o,u)}}},kf="!",eT=":",qN=[],tT=(e,t,n,a,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:a,isExternal:i}),jN=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=i=>{const o=[];let u=0,c=0,p=0,f;const h=i.length;for(let C=0;C<h;C++){const x=i[C];if(u===0&&c===0){if(x===eT){o.push(i.slice(p,C)),p=C+1;continue}if(x==="/"){f=C;continue}}x==="["?u++:x==="]"?u--:x==="("?c++:x===")"&&c--}const g=o.length===0?i:i.slice(p);let v=g,y=!1;g.endsWith(kf)?(v=g.slice(0,-1),y=!0):g.startsWith(kf)&&(v=g.slice(1),y=!0);const k=f&&f>p?f-p:void 0;return tT(o,y,v,k)};if(t){const i=t+eT,o=a;a=u=>u.startsWith(i)?o(u.slice(i.length)):tT(qN,!1,u,void 0,!0)}if(n){const i=a;a=o=>n({className:o,parseClassName:i})}return a},$N=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,a)=>{t.set(n,1e6+a)}),n=>{const a=[];let i=[];for(let o=0;o<n.length;o++){const u=n[o],c=u[0]==="[",p=t.has(u);c||p?(i.length>0&&(i.sort(),a.push(...i),i=[]),a.push(u)):i.push(u)}return i.length>0&&(i.sort(),a.push(...i)),a}},VN=e=>({cache:GN(e.cacheSize),parseClassName:jN(e),sortModifiers:$N(e),postfixLookupClassGroupIds:YN(e),...DN(e)}),YN=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let a=0;a<n.length;a++)t[n[a]]=!0;return t},XN=/\s+/,KN=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:i,sortModifiers:o,postfixLookupClassGroupIds:u}=t,c=[],p=e.trim().split(XN);let f="";for(let h=p.length-1;h>=0;h-=1){const g=p[h],{isExternal:v,modifiers:y,hasImportantModifier:k,baseClassName:C,maybePostfixModifierPosition:x}=n(g);if(v){f=g+(f.length>0?" "+f:f);continue}let A=!!x,I;if(A){const K=C.substring(0,x);I=a(K);const X=I&&u[I]?a(C):void 0;X&&X!==I&&(I=X,A=!1)}else I=a(C);if(!I){if(!A){f=g+(f.length>0?" "+f:f);continue}if(I=a(C),!I){f=g+(f.length>0?" "+f:f);continue}A=!1}const O=y.length===0?"":y.length===1?y[0]:o(y).join(":"),B=k?O+kf:O,P=B+I;if(c.indexOf(P)>-1)continue;c.push(P);const F=i(I,A);for(let K=0;K<F.length;++K){const X=F[K];c.push(B+X)}f=g+(f.length>0?" "+f:f)}return f},WN=(...e)=>{let t=0,n,a,i="";for(;t<e.length;)(n=e[t++])&&(a=nT(n))&&(i&&(i+=" "),i+=a);return i},nT=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=nT(e[a]))&&(n&&(n+=" "),n+=t);return n},ZN=(e,...t)=>{let n,a,i,o;const u=p=>{const f=t.reduce((h,g)=>g(h),e());return n=VN(f),a=n.cache.get,i=n.cache.set,o=c,c(p)},c=p=>{const f=a(p);if(f)return f;const h=KN(p,n);return i(p,h),h};return o=u,(...p)=>o(WN(...p))},QN=[],An=e=>{const t=n=>n[e]||QN;return t.isThemeGetter=!0,t},aT=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,rT=/^\((?:(\w[\w-]*):)?(.+)\)$/i,JN=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,e9=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,t9=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,n9=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,a9=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,r9=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,yi=e=>JN.test(e),ft=e=>!!e&&!Number.isNaN(Number(e)),yr=e=>!!e&&Number.isInteger(Number(e)),_f=e=>e.endsWith("%")&&ft(e.slice(0,-1)),Hr=e=>e9.test(e),iT=()=>!0,i9=e=>t9.test(e)&&!n9.test(e),Rf=()=>!1,s9=e=>a9.test(e),o9=e=>r9.test(e),l9=e=>!$e(e)&&!Ye(e),u9=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),c9=e=>Ti(e,dT,Rf),$e=e=>aT.test(e),As=e=>Ti(e,pT,i9),sT=e=>Ti(e,E9,ft),d9=e=>Ti(e,hT,iT),p9=e=>Ti(e,fT,Rf),oT=e=>Ti(e,uT,Rf),f9=e=>Ti(e,cT,o9),ud=e=>Ti(e,mT,s9),Ye=e=>rT.test(e),Jl=e=>xs(e,pT),h9=e=>xs(e,fT),lT=e=>xs(e,uT),m9=e=>xs(e,dT),g9=e=>xs(e,cT),cd=e=>xs(e,mT,!0),b9=e=>xs(e,hT,!0),Ti=(e,t,n)=>{const a=aT.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},xs=(e,t,n=!1)=>{const a=rT.exec(e);return a?a[1]?t(a[1]):n:!1},uT=e=>e==="position"||e==="percentage",cT=e=>e==="image"||e==="url",dT=e=>e==="length"||e==="size"||e==="bg-size",pT=e=>e==="length",E9=e=>e==="number",fT=e=>e==="family-name",hT=e=>e==="number"||e==="weight",mT=e=>e==="shadow",y9=ZN(()=>{const e=An("color"),t=An("font"),n=An("text"),a=An("font-weight"),i=An("tracking"),o=An("leading"),u=An("breakpoint"),c=An("container"),p=An("spacing"),f=An("radius"),h=An("shadow"),g=An("inset-shadow"),v=An("text-shadow"),y=An("drop-shadow"),k=An("blur"),C=An("perspective"),x=An("aspect"),A=An("ease"),I=An("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],P=()=>[...B(),Ye,$e],F=()=>["auto","hidden","clip","visible","scroll"],K=()=>["auto","contain","none"],X=()=>[Ye,$e,p],te=()=>[yi,"full","auto",...X()],q=()=>[yr,"none","subgrid",Ye,$e],ue=()=>["auto",{span:["full",yr,Ye,$e]},yr,Ye,$e],se=()=>[yr,"auto",Ye,$e],ye=()=>["auto","min","max","fr",Ye,$e],he=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ce=()=>["start","end","center","stretch","center-safe","end-safe"],Y=()=>["auto",...X()],oe=()=>[yi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...X()],we=()=>[yi,"screen","full","dvw","lvw","svw","min","max","fit",...X()],He=()=>[yi,"screen","full","lh","dvh","lvh","svh","min","max","fit",...X()],w=()=>[e,Ye,$e],ne=()=>[...B(),lT,oT,{position:[Ye,$e]}],ve=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z=()=>["auto","cover","contain",m9,c9,{size:[Ye,$e]}],ze=()=>[_f,Jl,As],Be=()=>["","none","full",f,Ye,$e],fe=()=>["",ft,Jl,As],xe=()=>["solid","dashed","dotted","double"],Ae=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ie=()=>[ft,_f,lT,oT],kt=()=>["","none",k,Ye,$e],It=()=>["none",ft,Ye,$e],Xt=()=>["none",ft,Ye,$e],_n=()=>[ft,Ye,$e],fn=()=>[yi,"full",...X()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Hr],breakpoint:[Hr],color:[iT],container:[Hr],"drop-shadow":[Hr],ease:["in","out","in-out"],font:[l9],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Hr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Hr],shadow:[Hr],spacing:["px",ft],text:[Hr],"text-shadow":[Hr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",yi,$e,Ye,x]}],container:["container"],"container-type":[{"@container":["","normal","size",Ye,$e]}],"container-named":[u9],columns:[{columns:[ft,$e,Ye,c]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:P()}],overflow:[{overflow:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:K()}],"overscroll-x":[{"overscroll-x":K()}],"overscroll-y":[{"overscroll-y":K()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:te()}],"inset-x":[{"inset-x":te()}],"inset-y":[{"inset-y":te()}],start:[{"inset-s":te(),start:te()}],end:[{"inset-e":te(),end:te()}],"inset-bs":[{"inset-bs":te()}],"inset-be":[{"inset-be":te()}],top:[{top:te()}],right:[{right:te()}],bottom:[{bottom:te()}],left:[{left:te()}],visibility:["visible","invisible","collapse"],z:[{z:[yr,"auto",Ye,$e]}],basis:[{basis:[yi,"full","auto",c,...X()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ft,yi,"auto","initial","none",$e]}],grow:[{grow:["",ft,Ye,$e]}],shrink:[{shrink:["",ft,Ye,$e]}],order:[{order:[yr,"first","last","none",Ye,$e]}],"grid-cols":[{"grid-cols":q()}],"col-start-end":[{col:ue()}],"col-start":[{"col-start":se()}],"col-end":[{"col-end":se()}],"grid-rows":[{"grid-rows":q()}],"row-start-end":[{row:ue()}],"row-start":[{"row-start":se()}],"row-end":[{"row-end":se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ye()}],"auto-rows":[{"auto-rows":ye()}],gap:[{gap:X()}],"gap-x":[{"gap-x":X()}],"gap-y":[{"gap-y":X()}],"justify-content":[{justify:[...he(),"normal"]}],"justify-items":[{"justify-items":[...ce(),"normal"]}],"justify-self":[{"justify-self":["auto",...ce()]}],"align-content":[{content:["normal",...he()]}],"align-items":[{items:[...ce(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ce(),{baseline:["","last"]}]}],"place-content":[{"place-content":he()}],"place-items":[{"place-items":[...ce(),"baseline"]}],"place-self":[{"place-self":["auto",...ce()]}],p:[{p:X()}],px:[{px:X()}],py:[{py:X()}],ps:[{ps:X()}],pe:[{pe:X()}],pbs:[{pbs:X()}],pbe:[{pbe:X()}],pt:[{pt:X()}],pr:[{pr:X()}],pb:[{pb:X()}],pl:[{pl:X()}],m:[{m:Y()}],mx:[{mx:Y()}],my:[{my:Y()}],ms:[{ms:Y()}],me:[{me:Y()}],mbs:[{mbs:Y()}],mbe:[{mbe:Y()}],mt:[{mt:Y()}],mr:[{mr:Y()}],mb:[{mb:Y()}],ml:[{ml:Y()}],"space-x":[{"space-x":X()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":X()}],"space-y-reverse":["space-y-reverse"],size:[{size:oe()}],"inline-size":[{inline:["auto",...we()]}],"min-inline-size":[{"min-inline":["auto",...we()]}],"max-inline-size":[{"max-inline":["none",...we()]}],"block-size":[{block:["auto",...He()]}],"min-block-size":[{"min-block":["auto",...He()]}],"max-block-size":[{"max-block":["none",...He()]}],w:[{w:[c,"screen",...oe()]}],"min-w":[{"min-w":[c,"screen","none",...oe()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[u]},...oe()]}],h:[{h:["screen","lh",...oe()]}],"min-h":[{"min-h":["screen","lh","none",...oe()]}],"max-h":[{"max-h":["screen","lh",...oe()]}],"font-size":[{text:["base",n,Jl,As]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,b9,d9]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",_f,$e]}],"font-family":[{font:[h9,p9,t]}],"font-features":[{"font-features":[$e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Ye,$e]}],"line-clamp":[{"line-clamp":[ft,"none",Ye,sT]}],leading:[{leading:[o,...X()]}],"list-image":[{"list-image":["none",Ye,$e]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ye,$e]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:w()}],"text-color":[{text:w()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...xe(),"wavy"]}],"text-decoration-thickness":[{decoration:[ft,"from-font","auto",Ye,As]}],"text-decoration-color":[{decoration:w()}],"underline-offset":[{"underline-offset":[ft,"auto",Ye,$e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:X()}],"tab-size":[{tab:[yr,Ye,$e]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ye,$e]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ye,$e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ne()}],"bg-repeat":[{bg:ve()}],"bg-size":[{bg:z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},yr,Ye,$e],radial:["",Ye,$e],conic:[yr,Ye,$e]},g9,f9]}],"bg-color":[{bg:w()}],"gradient-from-pos":[{from:ze()}],"gradient-via-pos":[{via:ze()}],"gradient-to-pos":[{to:ze()}],"gradient-from":[{from:w()}],"gradient-via":[{via:w()}],"gradient-to":[{to:w()}],rounded:[{rounded:Be()}],"rounded-s":[{"rounded-s":Be()}],"rounded-e":[{"rounded-e":Be()}],"rounded-t":[{"rounded-t":Be()}],"rounded-r":[{"rounded-r":Be()}],"rounded-b":[{"rounded-b":Be()}],"rounded-l":[{"rounded-l":Be()}],"rounded-ss":[{"rounded-ss":Be()}],"rounded-se":[{"rounded-se":Be()}],"rounded-ee":[{"rounded-ee":Be()}],"rounded-es":[{"rounded-es":Be()}],"rounded-tl":[{"rounded-tl":Be()}],"rounded-tr":[{"rounded-tr":Be()}],"rounded-br":[{"rounded-br":Be()}],"rounded-bl":[{"rounded-bl":Be()}],"border-w":[{border:fe()}],"border-w-x":[{"border-x":fe()}],"border-w-y":[{"border-y":fe()}],"border-w-s":[{"border-s":fe()}],"border-w-e":[{"border-e":fe()}],"border-w-bs":[{"border-bs":fe()}],"border-w-be":[{"border-be":fe()}],"border-w-t":[{"border-t":fe()}],"border-w-r":[{"border-r":fe()}],"border-w-b":[{"border-b":fe()}],"border-w-l":[{"border-l":fe()}],"divide-x":[{"divide-x":fe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":fe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...xe(),"hidden","none"]}],"divide-style":[{divide:[...xe(),"hidden","none"]}],"border-color":[{border:w()}],"border-color-x":[{"border-x":w()}],"border-color-y":[{"border-y":w()}],"border-color-s":[{"border-s":w()}],"border-color-e":[{"border-e":w()}],"border-color-bs":[{"border-bs":w()}],"border-color-be":[{"border-be":w()}],"border-color-t":[{"border-t":w()}],"border-color-r":[{"border-r":w()}],"border-color-b":[{"border-b":w()}],"border-color-l":[{"border-l":w()}],"divide-color":[{divide:w()}],"outline-style":[{outline:[...xe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ft,Ye,$e]}],"outline-w":[{outline:["",ft,Jl,As]}],"outline-color":[{outline:w()}],shadow:[{shadow:["","none",h,cd,ud]}],"shadow-color":[{shadow:w()}],"inset-shadow":[{"inset-shadow":["none",g,cd,ud]}],"inset-shadow-color":[{"inset-shadow":w()}],"ring-w":[{ring:fe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:w()}],"ring-offset-w":[{"ring-offset":[ft,As]}],"ring-offset-color":[{"ring-offset":w()}],"inset-ring-w":[{"inset-ring":fe()}],"inset-ring-color":[{"inset-ring":w()}],"text-shadow":[{"text-shadow":["none",v,cd,ud]}],"text-shadow-color":[{"text-shadow":w()}],opacity:[{opacity:[ft,Ye,$e]}],"mix-blend":[{"mix-blend":[...Ae(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ae()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ft]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ie()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ie()}],"mask-image-linear-from-color":[{"mask-linear-from":w()}],"mask-image-linear-to-color":[{"mask-linear-to":w()}],"mask-image-t-from-pos":[{"mask-t-from":Ie()}],"mask-image-t-to-pos":[{"mask-t-to":Ie()}],"mask-image-t-from-color":[{"mask-t-from":w()}],"mask-image-t-to-color":[{"mask-t-to":w()}],"mask-image-r-from-pos":[{"mask-r-from":Ie()}],"mask-image-r-to-pos":[{"mask-r-to":Ie()}],"mask-image-r-from-color":[{"mask-r-from":w()}],"mask-image-r-to-color":[{"mask-r-to":w()}],"mask-image-b-from-pos":[{"mask-b-from":Ie()}],"mask-image-b-to-pos":[{"mask-b-to":Ie()}],"mask-image-b-from-color":[{"mask-b-from":w()}],"mask-image-b-to-color":[{"mask-b-to":w()}],"mask-image-l-from-pos":[{"mask-l-from":Ie()}],"mask-image-l-to-pos":[{"mask-l-to":Ie()}],"mask-image-l-from-color":[{"mask-l-from":w()}],"mask-image-l-to-color":[{"mask-l-to":w()}],"mask-image-x-from-pos":[{"mask-x-from":Ie()}],"mask-image-x-to-pos":[{"mask-x-to":Ie()}],"mask-image-x-from-color":[{"mask-x-from":w()}],"mask-image-x-to-color":[{"mask-x-to":w()}],"mask-image-y-from-pos":[{"mask-y-from":Ie()}],"mask-image-y-to-pos":[{"mask-y-to":Ie()}],"mask-image-y-from-color":[{"mask-y-from":w()}],"mask-image-y-to-color":[{"mask-y-to":w()}],"mask-image-radial":[{"mask-radial":[Ye,$e]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ie()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ie()}],"mask-image-radial-from-color":[{"mask-radial-from":w()}],"mask-image-radial-to-color":[{"mask-radial-to":w()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":B()}],"mask-image-conic-pos":[{"mask-conic":[ft]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ie()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ie()}],"mask-image-conic-from-color":[{"mask-conic-from":w()}],"mask-image-conic-to-color":[{"mask-conic-to":w()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ne()}],"mask-repeat":[{mask:ve()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ye,$e]}],filter:[{filter:["","none",Ye,$e]}],blur:[{blur:kt()}],brightness:[{brightness:[ft,Ye,$e]}],contrast:[{contrast:[ft,Ye,$e]}],"drop-shadow":[{"drop-shadow":["","none",y,cd,ud]}],"drop-shadow-color":[{"drop-shadow":w()}],grayscale:[{grayscale:["",ft,Ye,$e]}],"hue-rotate":[{"hue-rotate":[ft,Ye,$e]}],invert:[{invert:["",ft,Ye,$e]}],saturate:[{saturate:[ft,Ye,$e]}],sepia:[{sepia:["",ft,Ye,$e]}],"backdrop-filter":[{"backdrop-filter":["","none",Ye,$e]}],"backdrop-blur":[{"backdrop-blur":kt()}],"backdrop-brightness":[{"backdrop-brightness":[ft,Ye,$e]}],"backdrop-contrast":[{"backdrop-contrast":[ft,Ye,$e]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ft,Ye,$e]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ft,Ye,$e]}],"backdrop-invert":[{"backdrop-invert":["",ft,Ye,$e]}],"backdrop-opacity":[{"backdrop-opacity":[ft,Ye,$e]}],"backdrop-saturate":[{"backdrop-saturate":[ft,Ye,$e]}],"backdrop-sepia":[{"backdrop-sepia":["",ft,Ye,$e]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":X()}],"border-spacing-x":[{"border-spacing-x":X()}],"border-spacing-y":[{"border-spacing-y":X()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ye,$e]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ft,"initial",Ye,$e]}],ease:[{ease:["linear","initial",A,Ye,$e]}],delay:[{delay:[ft,Ye,$e]}],animate:[{animate:["none",I,Ye,$e]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,Ye,$e]}],"perspective-origin":[{"perspective-origin":P()}],rotate:[{rotate:It()}],"rotate-x":[{"rotate-x":It()}],"rotate-y":[{"rotate-y":It()}],"rotate-z":[{"rotate-z":It()}],scale:[{scale:Xt()}],"scale-x":[{"scale-x":Xt()}],"scale-y":[{"scale-y":Xt()}],"scale-z":[{"scale-z":Xt()}],"scale-3d":["scale-3d"],skew:[{skew:_n()}],"skew-x":[{"skew-x":_n()}],"skew-y":[{"skew-y":_n()}],transform:[{transform:[Ye,$e,"","none","gpu","cpu"]}],"transform-origin":[{origin:P()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:fn()}],"translate-x":[{"translate-x":fn()}],"translate-y":[{"translate-y":fn()}],"translate-z":[{"translate-z":fn()}],"translate-none":["translate-none"],zoom:[{zoom:[yr,Ye,$e]}],accent:[{accent:w()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:w()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ye,$e]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":w()}],"scrollbar-track-color":[{"scrollbar-track":w()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":X()}],"scroll-mx":[{"scroll-mx":X()}],"scroll-my":[{"scroll-my":X()}],"scroll-ms":[{"scroll-ms":X()}],"scroll-me":[{"scroll-me":X()}],"scroll-mbs":[{"scroll-mbs":X()}],"scroll-mbe":[{"scroll-mbe":X()}],"scroll-mt":[{"scroll-mt":X()}],"scroll-mr":[{"scroll-mr":X()}],"scroll-mb":[{"scroll-mb":X()}],"scroll-ml":[{"scroll-ml":X()}],"scroll-p":[{"scroll-p":X()}],"scroll-px":[{"scroll-px":X()}],"scroll-py":[{"scroll-py":X()}],"scroll-ps":[{"scroll-ps":X()}],"scroll-pe":[{"scroll-pe":X()}],"scroll-pbs":[{"scroll-pbs":X()}],"scroll-pbe":[{"scroll-pbe":X()}],"scroll-pt":[{"scroll-pt":X()}],"scroll-pr":[{"scroll-pr":X()}],"scroll-pb":[{"scroll-pb":X()}],"scroll-pl":[{"scroll-pl":X()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ye,$e]}],fill:[{fill:["none",...w()]}],"stroke-w":[{stroke:[ft,Jl,As,sT]}],stroke:[{stroke:["none",...w()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function dn(...e){return y9(CN(e))}function T9(e){return!e||typeof e!="string"?e||"":e.replace(/\\{1,2}\(([\s\S]*?)\\{1,2}\)/g,(t,n)=>`$${n.trim()}$`).replace(/\\{1,2}\[([\s\S]*?)\\{1,2}\]/g,(t,n)=>`
|
|
211
211
|
$$
|
|
212
212
|
${n.trim()}
|
package/index.d.ts
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Type declarations for the `altio-chat` widget bundle.
|
|
3
|
-
*
|
|
4
|
-
* The runtime is a single IIFE (dist/widget.js) that registers `window.AltioWidget`
|
|
5
|
-
* as a side effect on import. Consumers typically do:
|
|
6
|
-
* await import("altio-chat"); // runs the IIFE → window.AltioWidget is set
|
|
7
|
-
* window.AltioWidget.mount(el, cfg);
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
export type TokenProvider = () =>
|
|
11
|
-
| string
|
|
12
|
-
| null
|
|
13
|
-
| undefined
|
|
14
|
-
| Promise<string | null | undefined>;
|
|
15
|
-
|
|
16
|
-
export interface AltioWidgetConfig {
|
|
17
|
-
/** Main backend base URL (POST /threads). */
|
|
18
|
-
apiUrl?: string;
|
|
19
|
-
/** Agent/widget backend base URL (connect/ask). Falls back to apiUrl. */
|
|
20
|
-
agentApiUrl?: string;
|
|
21
|
-
/** External-DB slot selector sent as `env`. */
|
|
22
|
-
dbEnv?: string;
|
|
23
|
-
/** Host user id — namespaces the persisted conversation per signed-in user. */
|
|
24
|
-
uid?: string;
|
|
25
|
-
/** Returns the host user's current access token (may be async). */
|
|
26
|
-
getToken?: TokenProvider;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface AltioWidgetApi {
|
|
30
|
-
/** Render the chat into `el` (fills it). Returns a handle with destroy(). */
|
|
31
|
-
mount(el: HTMLElement, cfg?: AltioWidgetConfig): { destroy(): void };
|
|
32
|
-
/** Update runtime config later (e.g. after the host user signs in). */
|
|
33
|
-
setConfig(cfg: AltioWidgetConfig): void;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// NOTE: the bundle also assigns `window.AltioWidget` at import time. We intentionally
|
|
37
|
-
// do NOT augment the global `Window` here so consumers can keep their own declaration
|
|
38
|
-
// without a duplicate-property conflict.
|
|
39
|
-
|
|
40
|
-
declare const AltioWidget: AltioWidgetApi;
|
|
41
|
-
export default AltioWidget;
|
|
1
|
+
/**
|
|
2
|
+
* Type declarations for the `altio-chat` widget bundle.
|
|
3
|
+
*
|
|
4
|
+
* The runtime is a single IIFE (dist/widget.js) that registers `window.AltioWidget`
|
|
5
|
+
* as a side effect on import. Consumers typically do:
|
|
6
|
+
* await import("altio-chat"); // runs the IIFE → window.AltioWidget is set
|
|
7
|
+
* window.AltioWidget.mount(el, cfg);
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export type TokenProvider = () =>
|
|
11
|
+
| string
|
|
12
|
+
| null
|
|
13
|
+
| undefined
|
|
14
|
+
| Promise<string | null | undefined>;
|
|
15
|
+
|
|
16
|
+
export interface AltioWidgetConfig {
|
|
17
|
+
/** Main backend base URL (POST /threads). */
|
|
18
|
+
apiUrl?: string;
|
|
19
|
+
/** Agent/widget backend base URL (connect/ask). Falls back to apiUrl. */
|
|
20
|
+
agentApiUrl?: string;
|
|
21
|
+
/** External-DB slot selector sent as `env`. */
|
|
22
|
+
dbEnv?: string;
|
|
23
|
+
/** Host user id — namespaces the persisted conversation per signed-in user. */
|
|
24
|
+
uid?: string;
|
|
25
|
+
/** Returns the host user's current access token (may be async). */
|
|
26
|
+
getToken?: TokenProvider;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface AltioWidgetApi {
|
|
30
|
+
/** Render the chat into `el` (fills it). Returns a handle with destroy(). */
|
|
31
|
+
mount(el: HTMLElement, cfg?: AltioWidgetConfig): { destroy(): void };
|
|
32
|
+
/** Update runtime config later (e.g. after the host user signs in). */
|
|
33
|
+
setConfig(cfg: AltioWidgetConfig): void;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// NOTE: the bundle also assigns `window.AltioWidget` at import time. We intentionally
|
|
37
|
+
// do NOT augment the global `Window` here so consumers can keep their own declaration
|
|
38
|
+
// without a duplicate-property conflict.
|
|
39
|
+
|
|
40
|
+
declare const AltioWidget: AltioWidgetApi;
|
|
41
|
+
export default AltioWidget;
|