useyuva 0.0.25 → 0.0.27
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 +1 -0
- package/dist/esm/apps-5c2vy32k.js +1 -0
- package/dist/esm/apps-ghkaqqx8.js +128 -0
- package/dist/esm/chat.js +33 -16
- package/dist/esm/{client-ebw9d6ms.js → client-k8txer77.js} +1 -1
- package/dist/esm/docs.js +4 -4
- package/dist/esm/index-0b3zs3hm.js +2 -0
- package/dist/esm/index-17p275de.js +2 -0
- package/dist/esm/index-1tyn193t.js +2 -0
- package/dist/esm/index-4mayxpxs.js +2 -0
- package/dist/esm/index-5tfxryvn.js +2 -0
- package/dist/esm/index-69xd7mjq.js +12 -0
- package/dist/esm/index-kf733km6.js +2 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/panel-jfe47dat.js +1 -0
- package/dist/esm/react.js +1 -1
- package/dist/esm/status.js +6 -4
- package/dist/esm/subscribe.js +2 -2
- package/dist/esm/thread-3y5hexyq.js +61 -0
- package/dist/esm/yuva-chat-j6fbj8y2.js +282 -0
- package/dist/types/apps/apps.d.ts +4 -0
- package/dist/types/apps/feedback.d.ts +3 -0
- package/dist/types/apps/help.d.ts +4 -0
- package/dist/types/apps/roadmap.d.ts +3 -0
- package/dist/types/apps/status.d.ts +3 -0
- package/dist/types/apps/styles.d.ts +1 -0
- package/dist/types/apps/subscribe.d.ts +3 -0
- package/dist/types/apps/whatsnew.d.ts +3 -0
- package/dist/types/catalogs/apps.d.ts +2 -0
- package/dist/types/client/api.d.ts +25 -0
- package/dist/types/client/client.d.ts +41 -2
- package/dist/types/element.d.ts +2 -1
- package/dist/types/i18n.d.ts +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/locales/ar/apps.d.ts +2 -0
- package/dist/types/locales/bn/apps.d.ts +2 -0
- package/dist/types/locales/ca/apps.d.ts +2 -0
- package/dist/types/locales/cs/apps.d.ts +2 -0
- package/dist/types/locales/da/apps.d.ts +2 -0
- package/dist/types/locales/de/apps.d.ts +2 -0
- package/dist/types/locales/el/apps.d.ts +2 -0
- package/dist/types/locales/en/apps.d.ts +2 -0
- package/dist/types/locales/es/apps.d.ts +2 -0
- package/dist/types/locales/es-MX/apps.d.ts +2 -0
- package/dist/types/locales/fi/apps.d.ts +2 -0
- package/dist/types/locales/fr/apps.d.ts +2 -0
- package/dist/types/locales/fr-CA/apps.d.ts +2 -0
- package/dist/types/locales/gu/apps.d.ts +2 -0
- package/dist/types/locales/he/apps.d.ts +2 -0
- package/dist/types/locales/hi/apps.d.ts +2 -0
- package/dist/types/locales/hr/apps.d.ts +2 -0
- package/dist/types/locales/hu/apps.d.ts +2 -0
- package/dist/types/locales/id/apps.d.ts +2 -0
- package/dist/types/locales/it/apps.d.ts +2 -0
- package/dist/types/locales/ja/apps.d.ts +2 -0
- package/dist/types/locales/kn/apps.d.ts +2 -0
- package/dist/types/locales/ko/apps.d.ts +2 -0
- package/dist/types/locales/ml/apps.d.ts +2 -0
- package/dist/types/locales/mr/apps.d.ts +2 -0
- package/dist/types/locales/ms/apps.d.ts +2 -0
- package/dist/types/locales/nb/apps.d.ts +2 -0
- package/dist/types/locales/nl/apps.d.ts +2 -0
- package/dist/types/locales/or/apps.d.ts +2 -0
- package/dist/types/locales/pa/apps.d.ts +2 -0
- package/dist/types/locales/pl/apps.d.ts +2 -0
- package/dist/types/locales/pt-BR/apps.d.ts +2 -0
- package/dist/types/locales/pt-PT/apps.d.ts +2 -0
- package/dist/types/locales/ro/apps.d.ts +2 -0
- package/dist/types/locales/ru/apps.d.ts +2 -0
- package/dist/types/locales/sk/apps.d.ts +2 -0
- package/dist/types/locales/sl/apps.d.ts +2 -0
- package/dist/types/locales/sv/apps.d.ts +2 -0
- package/dist/types/locales/ta/apps.d.ts +2 -0
- package/dist/types/locales/te/apps.d.ts +2 -0
- package/dist/types/locales/th/apps.d.ts +2 -0
- package/dist/types/locales/tr/apps.d.ts +2 -0
- package/dist/types/locales/uk/apps.d.ts +2 -0
- package/dist/types/locales/ur/apps.d.ts +2 -0
- package/dist/types/locales/vi/apps.d.ts +2 -0
- package/dist/types/locales/zh-Hans/apps.d.ts +2 -0
- package/dist/types/locales/zh-Hant/apps.d.ts +2 -0
- package/dist/types/panel/capture.d.ts +2 -0
- package/dist/types/panel/chat.d.ts +3 -1
- package/dist/types/panel/helpers.d.ts +15 -0
- package/dist/types/panel/home.d.ts +18 -0
- package/dist/types/panel/icons.d.ts +28 -0
- package/dist/types/panel/styles.d.ts +1 -1
- package/dist/types/react.d.ts +30 -2
- package/dist/types/schema.gen.d.ts +18078 -11611
- package/dist/types/translate.d.ts +1 -1
- package/dist/types/types.d.ts +33 -1
- package/dist/types/updates.d.ts +3 -0
- package/dist/widget/yuva-apps-ar-wk63tmr6.js +1 -0
- package/dist/widget/yuva-apps-bn-mv215pfz.js +1 -0
- package/dist/widget/yuva-apps-ca-mxrszyen.js +1 -0
- package/dist/widget/yuva-apps-cs-szpm8fq7.js +1 -0
- package/dist/widget/yuva-apps-da-v9sx8j55.js +1 -0
- package/dist/widget/yuva-apps-de-fd1snm0x.js +1 -0
- package/dist/widget/yuva-apps-el-wecybgxk.js +1 -0
- package/dist/widget/yuva-apps-en-skz2hc45.js +1 -0
- package/dist/widget/yuva-apps-es-18nqt6cs.js +1 -0
- package/dist/widget/yuva-apps-es-mx-23h92xvs.js +1 -0
- package/dist/widget/yuva-apps-fi-9tffjg50.js +1 -0
- package/dist/widget/yuva-apps-fr-ca-ma4cfsvr.js +1 -0
- package/dist/widget/yuva-apps-fr-v6fmnc7n.js +1 -0
- package/dist/widget/yuva-apps-gu-4v1dxzbn.js +1 -0
- package/dist/widget/yuva-apps-he-yy8ajb9j.js +1 -0
- package/dist/widget/yuva-apps-hi-zezzdfb4.js +1 -0
- package/dist/widget/yuva-apps-hr-skjtsrz6.js +1 -0
- package/dist/widget/yuva-apps-hu-q79hae7c.js +1 -0
- package/dist/widget/yuva-apps-id-rvr6g27r.js +1 -0
- package/dist/widget/yuva-apps-it-hkfb6swg.js +1 -0
- package/dist/widget/yuva-apps-ja-71z2p7a6.js +1 -0
- package/dist/widget/yuva-apps-kn-xm2wsv24.js +1 -0
- package/dist/widget/yuva-apps-ko-5b90egt2.js +1 -0
- package/dist/widget/yuva-apps-ml-qyjc0208.js +1 -0
- package/dist/widget/yuva-apps-mr-wh0985vm.js +1 -0
- package/dist/widget/yuva-apps-ms-2et5c44x.js +1 -0
- package/dist/widget/yuva-apps-nb-hnr4p136.js +1 -0
- package/dist/widget/yuva-apps-nl-m5z18z8w.js +1 -0
- package/dist/widget/yuva-apps-or-6ggz8n7c.js +1 -0
- package/dist/widget/yuva-apps-pa-p0zp743s.js +1 -0
- package/dist/widget/yuva-apps-pl-ayf5z37n.js +1 -0
- package/dist/widget/yuva-apps-pt-br-pmegf5s7.js +1 -0
- package/dist/widget/yuva-apps-pt-pt-fqqmhnsg.js +1 -0
- package/dist/widget/yuva-apps-ro-kq1mexyc.js +1 -0
- package/dist/widget/yuva-apps-ru-k3vhm4n9.js +1 -0
- package/dist/widget/yuva-apps-sk-n0st8g80.js +1 -0
- package/dist/widget/yuva-apps-sl-5yzf8nkk.js +1 -0
- package/dist/widget/yuva-apps-sv-bfchg8n0.js +1 -0
- package/dist/widget/yuva-apps-ta-zgn0hzpc.js +1 -0
- package/dist/widget/yuva-apps-te-eyyyp1fs.js +1 -0
- package/dist/widget/yuva-apps-th-tq3fdyxf.js +1 -0
- package/dist/widget/yuva-apps-tr-9bq6yzyy.js +1 -0
- package/dist/widget/yuva-apps-uk-0azd9r77.js +1 -0
- package/dist/widget/yuva-apps-ur-j8m34b8k.js +1 -0
- package/dist/widget/yuva-apps-vi-hs9e6h1q.js +1 -0
- package/dist/widget/yuva-apps-zh-hans-bc7j7gt0.js +1 -0
- package/dist/widget/yuva-apps-zh-hant-9ke56jnf.js +1 -0
- package/dist/widget/yuva-chat-apps-yrvvqdf9.js +128 -0
- package/dist/widget/{yuva-docs-thread-3594bmxy.js → yuva-docs-thread-gha4vzfm.js} +5 -5
- package/dist/widget/yuva-panel-ar-w9kxar7b.js +1 -0
- package/dist/widget/yuva-panel-bn-w0jg8rz0.js +1 -0
- package/dist/widget/yuva-panel-ca-3xmep2qy.js +1 -0
- package/dist/widget/yuva-panel-cs-jxdap7hk.js +1 -0
- package/dist/widget/yuva-panel-da-xy0gn2ch.js +1 -0
- package/dist/widget/yuva-panel-de-z1haaaf5.js +1 -0
- package/dist/widget/yuva-panel-el-vhskf13n.js +1 -0
- package/dist/widget/yuva-panel-en-yntqp1wb.js +1 -0
- package/dist/widget/yuva-panel-es-91gq45ad.js +1 -0
- package/dist/widget/yuva-panel-es-mx-593ry1sp.js +1 -0
- package/dist/widget/yuva-panel-fi-dw2qy2ep.js +1 -0
- package/dist/widget/yuva-panel-fr-ca-kwqpxepb.js +1 -0
- package/dist/widget/yuva-panel-fr-mksekp2w.js +1 -0
- package/dist/widget/yuva-panel-gu-9brj4atb.js +1 -0
- package/dist/widget/yuva-panel-he-kwf5a5r1.js +1 -0
- package/dist/widget/yuva-panel-hi-hyqwxkva.js +1 -0
- package/dist/widget/yuva-panel-hr-xyc32ytv.js +1 -0
- package/dist/widget/yuva-panel-hu-dsf2tr60.js +1 -0
- package/dist/widget/yuva-panel-id-egadejce.js +1 -0
- package/dist/widget/yuva-panel-it-dstzsdpt.js +1 -0
- package/dist/widget/yuva-panel-ja-5ep2nhr6.js +1 -0
- package/dist/widget/yuva-panel-kn-ggsqc21e.js +1 -0
- package/dist/widget/yuva-panel-ko-7cr7d0zc.js +1 -0
- package/dist/widget/yuva-panel-ml-0vb742gf.js +1 -0
- package/dist/widget/yuva-panel-mr-f7sn0acm.js +1 -0
- package/dist/widget/yuva-panel-ms-7xavwv7n.js +1 -0
- package/dist/widget/yuva-panel-nb-34x0g8mq.js +1 -0
- package/dist/widget/yuva-panel-nl-rkak2t5r.js +1 -0
- package/dist/widget/yuva-panel-or-q6eks6dh.js +1 -0
- package/dist/widget/yuva-panel-pa-26mhm7me.js +1 -0
- package/dist/widget/yuva-panel-pl-6bsq33w3.js +1 -0
- package/dist/widget/yuva-panel-pt-br-5bf6ja6w.js +1 -0
- package/dist/widget/yuva-panel-pt-pt-2a7vh8y9.js +1 -0
- package/dist/widget/yuva-panel-ro-9255bnc4.js +1 -0
- package/dist/widget/yuva-panel-ru-1ydh24ae.js +1 -0
- package/dist/widget/yuva-panel-sk-50gc8kfg.js +1 -0
- package/dist/widget/yuva-panel-sl-0j7nnz7k.js +1 -0
- package/dist/widget/yuva-panel-sv-175kbch1.js +1 -0
- package/dist/widget/yuva-panel-ta-x4nnzatk.js +1 -0
- package/dist/widget/yuva-panel-te-35y4486b.js +1 -0
- package/dist/widget/yuva-panel-th-rx5h6eq6.js +1 -0
- package/dist/widget/yuva-panel-tr-ywyzb4rn.js +1 -0
- package/dist/widget/yuva-panel-uk-9h1czxf0.js +1 -0
- package/dist/widget/yuva-panel-ur-peb4hk7h.js +1 -0
- package/dist/widget/yuva-panel-vi-t97hnjrg.js +1 -0
- package/dist/widget/yuva-panel-zh-hans-djf7yajw.js +1 -0
- package/dist/widget/yuva-panel-zh-hant-a9cgjbmw.js +1 -0
- package/dist/widget/yuva-subscribe-client-32k2vgq4.js +11 -0
- package/dist/yuva-chat.js +238 -158
- package/dist/yuva-docs.js +6 -6
- package/dist/yuva-status.js +9 -7
- package/dist/yuva-subscribe.js +2 -2
- package/dist/yuva.js +33 -16
- package/package.json +1 -1
- package/dist/esm/index-3wpqkv7x.js +0 -2
- package/dist/esm/index-6brgxahe.js +0 -12
- package/dist/esm/index-ceev0134.js +0 -2
- package/dist/esm/index-rdzxvj2r.js +0 -2
- package/dist/esm/thread-g9jsp0c5.js +0 -61
- package/dist/esm/yuva-chat-9hx7wb3q.js +0 -202
- package/dist/widget/yuva-subscribe-client-bx862wkt.js +0 -11
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{translate,localeIn}from"./index-4mayxpxs.js";var messages=JSON.parse('{"6I7cJR":["Open chat"],"OkHvGB":["Open chat, ",["count"]," unread"],"TidMpF":["Open chat, ",["count","plural",{"one":["#"," update"],"other":["#"," updates"]}]],"pqZJT2":["Close chat"]}');var messages2=JSON.parse('{"6I7cJR":["Sohbeti aç"],"OkHvGB":["Sohbeti aç, ",["count"]," okunmamış"],"TidMpF":["Sohbeti aç, ",["count"]," güncelleme"],"pqZJT2":["Sohbeti kapat"]}');var messages3=JSON.parse('{"6I7cJR":["Chat öffnen"],"OkHvGB":["Chat öffnen, ",["count"]," ungelesen"],"TidMpF":["Chat öffnen, ",["count","plural",{"one":["#"," Neuigkeit"],"other":["#"," Neuigkeiten"]}]],"pqZJT2":["Chat schließen"]}');var messages4=JSON.parse('{"6I7cJR":["فتح الدردشة"],"OkHvGB":["فتح الدردشة، ",["count"]," غير مقروءة"],"TidMpF":["فتح الدردشة، ",["count","plural",{"zero":["#"," تحديث"],"one":["تحديث واحد"],"two":["تحديثان"],"few":["#"," تحديثات"],"many":["#"," تحديثًا"],"other":["#"," تحديث"]}]],"pqZJT2":["إغلاق الدردشة"]}');var messages5=JSON.parse('{"6I7cJR":["চ্যাট খুলুন"],"OkHvGB":["চ্যাট খুলুন, ",["count"],"টি অপঠিত"],"TidMpF":["চ্যাট খুলুন, ",["count"],"টি আপডেট"],"pqZJT2":["চ্যাট বন্ধ করুন"]}');var messages6=JSON.parse('{"6I7cJR":["Obre el xat"],"OkHvGB":["Obre el xat, ",["count"]," sense llegir"],"TidMpF":["Obre el xat, ",["count","plural",{"one":["#"," novetat"],"other":["#"," novetats"]}]],"pqZJT2":["Tanca el xat"]}');var messages7=JSON.parse('{"6I7cJR":["Otevřít chat"],"OkHvGB":["Otevřít chat, nepřečtených: ",["count"]],"TidMpF":["Otevřít chat, ",["count","plural",{"one":["#"," novinka"],"few":["#"," novinky"],"many":["#"," novinky"],"other":["#"," novinek"]}]],"pqZJT2":["Zavřít chat"]}');var messages8=JSON.parse('{"6I7cJR":["Åbn chat"],"OkHvGB":["Åbn chat, ",["count"]," ulæste"],"TidMpF":["Åbn chat, ",["count","plural",{"one":["#"," opdatering"],"other":["#"," opdateringer"]}]],"pqZJT2":["Luk chat"]}');var messages9=JSON.parse('{"6I7cJR":["Άνοιγμα συνομιλίας"],"OkHvGB":["Άνοιγμα συνομιλίας, ",["count"]," μη αναγνωσμένα"],"TidMpF":["Άνοιγμα συνομιλίας, ",["count","plural",{"one":["#"," ενημέρωση"],"other":["#"," ενημερώσεις"]}]],"pqZJT2":["Κλείσιμο συνομιλίας"]}');var messages10=JSON.parse('{"6I7cJR":["Abrir chat"],"OkHvGB":["Abrir chat, ",["count"]," sin leer"],"TidMpF":["Abrir el chat, ",["count","plural",{"one":["#"," novedad"],"other":["#"," novedades"]}]],"pqZJT2":["Cerrar chat"]}');var messages11=JSON.parse('{"6I7cJR":["Abrir chat"],"OkHvGB":["Abrir chat, ",["count"]," sin leer"],"TidMpF":["Abrir el chat, ",["count","plural",{"one":["#"," novedad"],"other":["#"," novedades"]}]],"pqZJT2":["Cerrar chat"]}');var messages12=JSON.parse('{"6I7cJR":["Avaa chat"],"OkHvGB":["Avaa chat, ",["count"]," lukematonta"],"TidMpF":["Avaa chat, ",["count","plural",{"one":["#"," päivitys"],"other":["#"," päivitystä"]}]],"pqZJT2":["Sulje chat"]}');var messages13=JSON.parse('{"6I7cJR":["Ouvrir le chat"],"OkHvGB":["Ouvrir le chat, messages non lus : ",["count"]],"TidMpF":["Ouvrir le chat, ",["count","plural",{"one":["#"," nouveauté"],"other":["#"," nouveautés"]}]],"pqZJT2":["Fermer le chat"]}');var messages14=JSON.parse('{"6I7cJR":["Ouvrir le chat"],"OkHvGB":["Ouvrir le chat, messages non lus : ",["count"]],"TidMpF":["Ouvrir le clavardage, ",["count","plural",{"one":["#"," nouveauté"],"other":["#"," nouveautés"]}]],"pqZJT2":["Fermer le chat"]}');var messages15=JSON.parse('{"6I7cJR":["ચેટ ખોલો"],"OkHvGB":["ચેટ ખોલો, ",["count"]," વણવાંચેલા"],"TidMpF":["ચેટ ખોલો, ",["count"]," અપડેટ"],"pqZJT2":["ચેટ બંધ કરો"]}');var messages16=JSON.parse(`{"6I7cJR":["פתיחת הצ׳אט"],"OkHvGB":["פתיחת הצ׳אט, ",["count"]," שלא נקראו"],"TidMpF":["פתיחת הצ'אט, ",["count","plural",{"one":["עדכון אחד"],"two":["שני עדכונים"],"other":["#"," עדכונים"]}]],"pqZJT2":["סגירת הצ׳אט"]}`);var messages17=JSON.parse('{"6I7cJR":["चैट खोलें"],"OkHvGB":["चैट खोलें, ",["count"]," अपठित"],"TidMpF":["चैट खोलें, ",["count"]," अपडेट"],"pqZJT2":["चैट बंद करें"]}');var messages18=JSON.parse('{"6I7cJR":["Otvori chat"],"OkHvGB":["Otvori chat, nepročitano: ",["count"]],"TidMpF":["Otvori chat, ",["count","plural",{"one":["#"," novost"],"few":["#"," novosti"],"other":["#"," novosti"]}]],"pqZJT2":["Zatvori chat"]}');var messages19=JSON.parse('{"6I7cJR":["Csevegés megnyitása"],"OkHvGB":["Csevegés megnyitása, olvasatlan: ",["count"]],"TidMpF":["Csevegés megnyitása, ",["count"]," újdonság"],"pqZJT2":["Csevegés bezárása"]}');var messages20=JSON.parse('{"6I7cJR":["Buka obrolan"],"OkHvGB":["Buka obrolan, ",["count"]," belum dibaca"],"TidMpF":["Buka obrolan, ",["count"]," pembaruan"],"pqZJT2":["Tutup obrolan"]}');var messages21=JSON.parse('{"6I7cJR":["Apri la chat"],"OkHvGB":["Apri la chat, messaggi non letti: ",["count"]],"TidMpF":["Apri la chat, ",["count","plural",{"one":["#"," novità"],"other":["#"," novità"]}]],"pqZJT2":["Chiudi la chat"]}');var messages22=JSON.parse('{"6I7cJR":["チャットを開く"],"OkHvGB":["チャットを開く(未読",["count"],"件)"],"TidMpF":["チャットを開く、",["count"],"件の更新"],"pqZJT2":["チャットを閉じる"]}');var messages23=JSON.parse('{"6I7cJR":["ಚಾಟ್ ತೆರೆಯಿರಿ"],"OkHvGB":["ಚಾಟ್ ತೆರೆಯಿರಿ, ",["count"]," ಓದದಿರುವವು"],"TidMpF":["ಚಾಟ್ ತೆರೆಯಿರಿ, ",["count","plural",{"one":["#"," ಅಪ್ಡೇಟ್"],"other":["#"," ಅಪ್ಡೇಟ್ಗಳು"]}]],"pqZJT2":["ಚಾಟ್ ಮುಚ್ಚಿ"]}');var messages24=JSON.parse('{"6I7cJR":["채팅 열기"],"OkHvGB":["채팅 열기, 읽지 않음 ",["count"],"개"],"TidMpF":["채팅 열기, 업데이트 ",["count"],"개"],"pqZJT2":["채팅 닫기"]}');var messages25=JSON.parse('{"6I7cJR":["ചാറ്റ് തുറക്കുക"],"OkHvGB":["ചാറ്റ് തുറക്കുക, ",["count"]," വായിക്കാത്തവ"],"TidMpF":["ചാറ്റ് തുറക്കുക, ",["count","plural",{"one":["#"," അപ്ഡേറ്റ്"],"other":["#"," അപ്ഡേറ്റുകൾ"]}]],"pqZJT2":["ചാറ്റ് അടയ്ക്കുക"]}');var messages26=JSON.parse('{"6I7cJR":["चॅट उघडा"],"OkHvGB":["चॅट उघडा, ",["count"]," न वाचलेले"],"TidMpF":["चॅट उघडा, ",["count"]," अपडेट"],"pqZJT2":["चॅट बंद करा"]}');var messages27=JSON.parse('{"6I7cJR":["Buka sembang"],"OkHvGB":["Buka sembang, ",["count"]," belum dibaca"],"TidMpF":["Buka sembang, ",["count"]," kemas kini"],"pqZJT2":["Tutup sembang"]}');var messages28=JSON.parse('{"6I7cJR":["Åpne chatten"],"OkHvGB":["Åpne chatten, ",["count"]," uleste"],"TidMpF":["Åpne chat, ",["count","plural",{"one":["#"," oppdatering"],"other":["#"," oppdateringer"]}]],"pqZJT2":["Lukk chatten"]}');var messages29=JSON.parse('{"6I7cJR":["Chat openen"],"OkHvGB":["Chat openen, ",["count"]," ongelezen"],"TidMpF":["Chat openen, ",["count","plural",{"one":["#"," update"],"other":["#"," updates"]}]],"pqZJT2":["Chat sluiten"]}');var messages30=JSON.parse('{"6I7cJR":["ଚାଟ୍ ଖୋଲନ୍ତୁ"],"OkHvGB":["ଚାଟ୍ ଖୋଲନ୍ତୁ, ",["count"]," ଅପଠିତ"],"TidMpF":["ଚାଟ୍ ଖୋଲନ୍ତୁ, ",["count"],"ଟି ଅପଡେଟ୍"],"pqZJT2":["ଚାଟ୍ ବନ୍ଦ କରନ୍ତୁ"]}');var messages31=JSON.parse('{"6I7cJR":["ਚੈਟ ਖੋਲ੍ਹੋ"],"OkHvGB":["ਚੈਟ ਖੋਲ੍ਹੋ, ",["count"]," ਨਾ-ਪੜ੍ਹੇ"],"TidMpF":["ਚੈਟ ਖੋਲ੍ਹੋ, ",["count"]," ਅੱਪਡੇਟ"],"pqZJT2":["ਚੈਟ ਬੰਦ ਕਰੋ"]}');var messages32=JSON.parse('{"6I7cJR":["Otwórz czat"],"OkHvGB":["Otwórz czat, nieprzeczytane: ",["count"]],"TidMpF":["Otwórz czat, ",["count","plural",{"one":["#"," nowość"],"few":["#"," nowości"],"many":["#"," nowości"],"other":["#"," nowości"]}]],"pqZJT2":["Zamknij czat"]}');var messages33=JSON.parse('{"6I7cJR":["Abrir chat"],"OkHvGB":["Abrir chat, ",["count"]," não lidas"],"TidMpF":["Abrir o chat, ",["count","plural",{"one":["#"," novidade"],"other":["#"," novidades"]}]],"pqZJT2":["Fechar chat"]}');var messages34=JSON.parse('{"6I7cJR":["Abrir chat"],"OkHvGB":["Abrir chat, ",["count"]," por ler"],"TidMpF":["Abrir o chat, ",["count","plural",{"one":["#"," novidade"],"other":["#"," novidades"]}]],"pqZJT2":["Fechar chat"]}');var messages35=JSON.parse('{"6I7cJR":["Deschide chatul"],"OkHvGB":["Deschide chatul, ",["count"]," necitite"],"TidMpF":["Deschide chatul, ",["count","plural",{"one":["#"," noutate"],"few":["#"," noutăți"],"other":["#"," de noutăți"]}]],"pqZJT2":["Închide chatul"]}');var messages36=JSON.parse('{"6I7cJR":["Открыть чат"],"OkHvGB":["Открыть чат, непрочитанных: ",["count"]],"TidMpF":["Открыть чат, ",["count","plural",{"one":["#"," обновление"],"few":["#"," обновления"],"many":["#"," обновлений"],"other":["#"," обновления"]}]],"pqZJT2":["Закрыть чат"]}');var messages37=JSON.parse('{"6I7cJR":["Otvoriť chat"],"OkHvGB":["Otvoriť chat, neprečítané: ",["count"]],"TidMpF":["Otvoriť chat, ",["count","plural",{"one":["#"," novinka"],"few":["#"," novinky"],"many":["#"," novinky"],"other":["#"," noviniek"]}]],"pqZJT2":["Zavrieť chat"]}');var messages38=JSON.parse('{"6I7cJR":["Odpri klepet"],"OkHvGB":["Odpri klepet, neprebrano: ",["count"]],"TidMpF":["Odpri klepet, ",["count","plural",{"one":["#"," novost"],"two":["#"," novosti"],"few":["#"," novosti"],"other":["#"," novosti"]}]],"pqZJT2":["Zapri klepet"]}');var messages39=JSON.parse('{"6I7cJR":["Öppna chatten"],"OkHvGB":["Öppna chatten, ",["count"]," olästa"],"TidMpF":["Öppna chatten, ",["count","plural",{"one":["#"," uppdatering"],"other":["#"," uppdateringar"]}]],"pqZJT2":["Stäng chatten"]}');var messages40=JSON.parse('{"6I7cJR":["அரட்டையைத் திற"],"OkHvGB":["அரட்டையைத் திற, ",["count"]," படிக்காதவை"],"TidMpF":["அரட்டையைத் திற, ",["count","plural",{"one":["#"," புதுப்பிப்பு"],"other":["#"," புதுப்பிப்புகள்"]}]],"pqZJT2":["அரட்டையை மூடு"]}');var messages41=JSON.parse('{"6I7cJR":["చాట్ తెరవండి"],"OkHvGB":["చాట్ తెరవండి, ",["count"]," చదవనివి"],"TidMpF":["చాట్ తెరవండి, ",["count","plural",{"one":["#"," అప్డేట్"],"other":["#"," అప్డేట్లు"]}]],"pqZJT2":["చాట్ మూసివేయండి"]}');var messages42=JSON.parse('{"6I7cJR":["เปิดแชต"],"OkHvGB":["เปิดแชต ยังไม่ได้อ่าน ",["count"]," รายการ"],"TidMpF":["เปิดแชท อัปเดต ",["count"]," รายการ"],"pqZJT2":["ปิดแชต"]}');var messages43=JSON.parse('{"6I7cJR":["Відкрити чат"],"OkHvGB":["Відкрити чат, непрочитаних: ",["count"]],"TidMpF":["Відкрити чат, ",["count","plural",{"one":["#"," оновлення"],"few":["#"," оновлення"],"many":["#"," оновлень"],"other":["#"," оновлення"]}]],"pqZJT2":["Закрити чат"]}');var messages44=JSON.parse('{"6I7cJR":["چیٹ کھولیں"],"OkHvGB":["چیٹ کھولیں، ",["count"]," ان پڑھے"],"TidMpF":["چیٹ کھولیں، ",["count","plural",{"one":["#"," اپ ڈیٹ"],"other":["#"," اپ ڈیٹس"]}]],"pqZJT2":["چیٹ بند کریں"]}');var messages45=JSON.parse('{"6I7cJR":["Mở trò chuyện"],"OkHvGB":["Mở trò chuyện, ",["count"]," chưa đọc"],"TidMpF":["Mở trò chuyện, ",["count"]," cập nhật"],"pqZJT2":["Đóng trò chuyện"]}');var messages46=JSON.parse('{"6I7cJR":["打开聊天"],"OkHvGB":["打开聊天,",["count"]," 条未读"],"TidMpF":["打开聊天,",["count"]," 条更新"],"pqZJT2":["关闭聊天"]}');var messages47=JSON.parse('{"6I7cJR":["開啟聊天"],"OkHvGB":["開啟聊天,",["count"]," 則未讀"],"TidMpF":["開啟聊天,",["count"]," 則更新"],"pqZJT2":["關閉聊天"]}');var catalogs={en:messages,tr:messages2,de:messages3,ar:messages4,bn:messages5,ca:messages6,cs:messages7,da:messages8,el:messages9,es:messages10,"es-mx":messages11,fi:messages12,fr:messages13,"fr-ca":messages14,gu:messages15,he:messages16,hi:messages17,hr:messages18,hu:messages19,id:messages20,it:messages21,ja:messages22,kn:messages23,ko:messages24,ml:messages25,mr:messages26,ms:messages27,nb:messages28,nl:messages29,or:messages30,pa:messages31,pl:messages32,"pt-br":messages33,"pt-pt":messages34,ro:messages35,ru:messages36,sk:messages37,sl:messages38,sv:messages39,ta:messages40,te:messages41,th:messages42,uk:messages43,ur:messages44,vi:messages45,"zh-hans":messages46,"zh-hant":messages47};function resolveLocale(...candidates){return localeIn(catalogs,candidates)}function catalogFor(locale){return catalogs[locale]??messages}function translatePlain(messages2,descriptor,fallback=messages,locale){return translate(messages2,descriptor,fallback,locale)}
|
|
2
|
+
export{resolveLocale,catalogFor,translatePlain};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var messages=JSON.parse(`{"-g5O6h":["Choose at least one list."],"-qzaeL":["Voting and suggesting need a quick sign-in."],"0Z-Vvf":["How is it working for you"],"1UzENP":["No"],"1gZQhL":["Monitoring"],"1so6q_":["Allow pop-ups for this site to sign in."],"1w51t9":["Subscribing…"],"2CuHlT":["Similar ideas"],"3nRszo":["Partial"],"40pif-":["Praise"],"4ba0NE":["Scheduled"],"5N30dV":["Tell us more"],"5isRv0":["Could not load this. Try again."],"5j51A1":["Improved"],"6Dd2PM":["Maintenance"],"7fnHMC":["Open status page"],"7kOr80":["Get updates by e-mail"],"7nGhhM":["What's on your mind?"],"8hJxF9":["The team reads every note. Replies show up in your messages."],"AoOqHM":["Shipped"],"CCeCzs":["Best matches"],"CRm_lr":["View idea"],"DPfwMq":["Done"],"EDl9kS":["Subscribe"],"E_qvzP":["Enter a valid e-mail address."],"F268WL":["Idea in a few words"],"FITYG3":[["n"]," out of 5"],"GQVIIl":["You seem to be offline."],"HQrBQl":["Read on the web"],"HZx_Lj":["Related articles"],"Hw3P48":["Replies: ",["0"]],"IGDwkb":["What would make this better for you?"],"ImOQa9":["Reply"],"Iqh0Uv":["Planned"],"IyJo7F":["Partial outage"],"JN4pgo":["Incidents"],"JkW3Ph":["This file type is not accepted."],"KDw4GX":["Try again"],"KM6m8p":["Team"],"KuVpz-":["Unread"],"KyYwnP":["What do you like?"],"L3-fF1":["Suggest"],"LBTzx_":["No open incidents."],"N7m8E-":["Attach files"],"N8UzTV":["Replies"],"O26H3-":["Not good"],"O2UpM1":["Browse"],"O6H89R":["Resolved"],"OC9zF0":["Remove your vote for ",["0"]],"PEdX5E":["Thanks! Your idea is on the board."],"Pwqkdw":["Loading…"],"Qw6AA4":["Get notified about incidents"],"R2riAW":["Message us"],"RRa_CR":["Components"],"RoafuO":["Send feedback"],"SOk0EB":["Thanks for your feedback"],"SYgxDf":["Slow"],"Sad2tK":["Sending…"],"SjYh1G":["Thanks! The team will review your idea before it is shown."],"Sk2rkp":["No articles found."],"TZglEu":["Take a screenshot"],"TpqW74":["Fixed"],"UQbwrz":["All systems operational"],"WAnUgI":["Investigating"],"WpXcBJ":["Nothing here yet."],"WxATd2":["Great"],"XJURKP":["E-mail address"],"_IX_7x":["Other"],"_LCAwL":["In progress"],"bjvU7E":["Still stuck?"],"dMJfG5":["I want to receive e-mails about ",["list"]," from ",["inbox"],". I can unsubscribe at any time."],"eA01mj":["No replies yet."],"eOu9Px":["The file is too large."],"eu8b5Q":["Was this helpful?"],"fUu_-z":["What is it about"],"gUjkl_":["Down"],"giiL14":["Describe your idea"],"h16FyT":["Lists"],"hGstEn":["What happened, and what did you expect?"],"iDynVL":["Suggest an idea"],"iH8pgl":["Back"],"isRobC":["New"],"iwr7AP":["Ideas"],"jWgNnM":["Could not subscribe. Try again."],"l75CjT":["Yes"],"lDEbTy":["Tick the box to agree."],"lJuwH3":["Vote for ",["0"]],"n8LtxM":["Major outage"],"njBr8W":["you@example.com"],"qqWcBV":["Completed"],"r1ViQ0":["Waiting for approval"],"rgySXy":["Thanks! You are subscribed."],"s_9asQ":["View feedback"],"tAL5wg":["Could not send. Try again."],"tWA9nu":["Idea"],"tddaHo":["Identified"],"tzsBOP":["Too many attempts. Wait a moment and try again."],"uN55Po":["Degraded performance"],"v8ZlFT":["Send idea"],"vXemf6":["Bug"],"w61W3L":["Remove ",["0"]],"wQ8Ayo":["Write a reply"],"x7I72g":["Search for help"],"xwh17S":["No updates yet."],"y3k2zM":["Almost done. Check your inbox and confirm your subscription."],"y8C3fj":["Popular articles"],"yQ2kGp":["Load more"],"ylt3ut":["Ask the team, we read every message."],"zga9sT":["OK"]}`);
|
|
2
|
+
export{messages};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function render(parts,values,locale,hash){return parts.map((part)=>{if(typeof part==="string")return hash===void 0?part:part.replaceAll("#",String(hash));let[name="",kind,options]=part,value=values[name];if(kind!=="plural"||!options)return String(value??"");let count=Number(value),branch=options[`=${count}`]??options[new Intl.PluralRules(locale).select(count)]??options.other??[];return render(branch,values,locale,count)}).join("")}function translate(messages,descriptor,fallback,locale=sourceLocale){let entry=messages[descriptor.id]??fallback[descriptor.id],values=descriptor.values??{};if(typeof entry==="string")return entry;if(Array.isArray(entry))return render(entry,values,locale);return descriptor.message??descriptor.id}var rtlLanguages=new Set(["ar","fa","he","ur"]),sourceLocale="en",latinAmericanSpanish=new Set(["419","us","ar","bo","cl","co","cr","cu","do","ec","gt","hn","mx","ni","pa","pe","pr","py","sv","uy","ve"]),languageAliases={iw:"he",in:"id",no:"nb",nn:"nb"};function variantsOf(tag){let[language="",...rest]=tag.split("-"),base=languageAliases[language]??language,region=rest.find((part)=>part.length===2||/^\d{3}$/.test(part)),out=[];if(base==="zh"){let traditional=rest.includes("hant")||!rest.includes("hans")&&["tw","hk","mo"].includes(region??"");out.push(traditional?"zh-hant":"zh-hans")}else if(base==="pt")out.push(region==="pt"?"pt-pt":"pt-br");else if(base==="es")out.push(region&&latinAmericanSpanish.has(region)?"es-mx":"es");else if(base==="fr")out.push(region==="ca"?"fr-ca":"fr");return out.push(region?`${base}-${region}`:base,base),out}function localeIn(catalogs,candidates){for(let candidate of candidates){if(!candidate)continue;let tag=candidate.toLowerCase().replace(/_/g,"-");if(catalogs[tag])return tag;for(let variant of variantsOf(tag))if(catalogs[variant])return variant}return sourceLocale}function directionOf(locale){return rtlLanguages.has(locale.split(/[-_]/)[0]??"")?"rtl":"ltr"}var sheets=new Map;function sheetFor(css){if(typeof CSSStyleSheet>"u"||!("replaceSync"in CSSStyleSheet.prototype))return null;let sheet=sheets.get(css);if(!sheet)sheet=new CSSStyleSheet,sheet.replaceSync(css),sheets.set(css,sheet);return sheet}function fallback(css){let style=document.createElement("style");return style.textContent=css,style}function addStyles(root,css){let sheet=sheetFor(css);if(!sheet||!(root instanceof ShadowRoot))return fallback(css);if(!root.adoptedStyleSheets.includes(sheet))root.adoptedStyleSheets=[...root.adoptedStyleSheets,sheet];return null}function setStyles(root,css){let sheet=sheetFor(css);if(!sheet)return fallback(css);return root.adoptedStyleSheets=[sheet],null}
|
|
2
|
+
export{translate,localeIn,directionOf,addStyles,setStyles};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var messages2=JSON.parse(`{"-HY5kX":["New conversation"],"-f5Tkb":["Bad"],"-knPu9":["More from the team"],"-pBGNS":["Vote on what comes next"],"09Tv5j":["Reconnecting…"],"0IRz4M":["to send"],"0XGLbP":["Your sign-in has expired. Reload the page and try again."],"1CVCSY":["Powered by ",["brand"]],"1EICzz":["We're away right now"],"1QfxQT":["Dismiss"],"1gZQhL":["Monitoring"],"2mtG59":["Send us a message"],"3ePd3I":["What's new"],"3qR_b9":["News by e-mail"],"4-3tRX":["How can we help?"],"4TqZiz":["Could not send your rating. Try again."],"4ba0NE":["Scheduled"],"5IXWmO":["Check your inbox"],"5isRv0":["Could not load this. Try again."],"6Dd2PM":["Maintenance"],"6Uau97":["Skip"],"6gRgw8":["Retry"],"6lGaum":["Seen"],"7b0Aa9":["That address doesn't accept mail. Check it for a typo."],"9AhqBi":["Get updates"],"9Vnjc9":["Enter"],"A4P5nB":[["name"]," joined the conversation"],"ASr-r0":["Show older conversations"],"Amai22":["Chat is not available right now."],"CRzGla":["Help center"],"E_qvzP":["Enter a valid e-mail address."],"GQVIIl":["You seem to be offline."],"IyJo7F":["Partial outage"],"JAKtcG":["Talk to us"],"J_jxKQ":["Send again"],"JkW3Ph":["This file type is not accepted."],"JlFcis":["Send"],"KDw4GX":["Try again"],"M62PBt":["Nobody is available right now. Leave your e-mail and we'll send the reply there too."],"N7m8E-":["Attach files"],"NBdIgR":["Comment"],"O6H89R":["Resolved"],"OEEQKT":["Good"],"Pwqkdw":["Loading…"],"PxYAul":["Typing…"],"R_tuBV":["Changes and news"],"RnNe7a":[["count"]," new"],"RzWUUK":["Write a message…"],"S63MQu":["All conversations"],"SOk0EB":["Thanks for your feedback"],"Sad2tK":["Sending…"],"SdV5Cn":["Send us a message and we will reply here."],"TZglEu":["Take a screenshot"],"UQbwrz":["All systems operational"],"UY1vmE":["Attachment"],"VggdQJ":["Usually replies in ",["duration"]],"WAnUgI":["Investigating"],"XJURKP":["E-mail address"],"YirHq7":["Feedback"],"YyNOE7":["Conversation"],"ZxJcgC":["Could not save your e-mail address. Try again."],"_LCAwL":["In progress"],"_gaSVU":["Roadmap"],"axQ1h6":["Anything you'd like to add? (optional)"],"c4RuNX":["Change address"],"dEgA5A":["Cancel"],"eOu9Px":["The file is too large."],"gANddk":["Uploading…"],"gmPmD9":["We sent a link to ",["address"],". Open it so replies reach you by e-mail."],"gxoeD3":["Replies will also reach ",["address"]],"h69WC6":["Sent"],"iGNUZJ":["Thanks! We'll e-mail you at ",["known"]," if you're gone when we reply."],"iH8pgl":["Back"],"io8YUT":["We couldn't reach ",["address"]],"ju1Z9b":["Jump to latest"],"kR9y-C":["Guides and answers"],"lIb9Ab":["A bug, an idea, a thank-you"],"meAa31":["No conversations yet"],"mj_YKf":["We sent it again."],"n8LtxM":["Major outage"],"nhTADq":["We'll reply as soon as we can"],"njBr8W":["you@example.com"],"oXOSPE":["Online"],"otDzIg":["Conversation closed"],"qqWcBV":["Completed"],"t7TeQU":["Messages"],"tHaDPf":[["name"]," is typing…"],"tddaHo":["Identified"],"tfDRzk":["Save"],"tzsBOP":["Too many attempts. Wait a moment and try again."],"uA8iBc":["How did we do?"],"uAQUqI":["Status"],"uN55Po":["Degraded performance"],"upFvcp":["Not sent."],"w61W3L":["Remove ",["0"]],"x7I72g":["Search for help"],"xDAtGP":["Message"],"xGVfLh":["Continue"],"yYSSmz":[["count","plural",{"one":["#"," update"],"other":["#"," updates"]}]],"ydzYKJ":["You:"],"yz7wBu":["Close"],"zLzEI3":["Sign in to chat with us."]}`);var svg=(paths,size=18,width=1.75,flip=!1)=>`<svg${flip?' class="flip"':""} width="${size}" height="${size}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="${width}" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${paths}</svg>`,icons={close:svg('<path d="M6 6l12 12M18 6L6 18"/>'),closeSmall:svg('<path d="M6 6l12 12M18 6L6 18"/>',12,2.2),back:svg('<path d="M15 6l-6 6 6 6"/>',18,1.75,!0),chevron:svg('<path d="M9 6l6 6-6 6"/>',14,2,!0),arrow:svg('<path d="M5 12h14M13 6l6 6-6 6"/>',16,1.75,!0),attach:svg('<path d="M20 11.5l-7.8 7.8a5 5 0 0 1-7-7l8.4-8.4a3.3 3.3 0 0 1 4.7 4.7l-8.4 8.4a1.7 1.7 0 0 1-2.4-2.4l7.7-7.7"/>'),shot:svg('<path d="M4 8V5.5A1.5 1.5 0 0 1 5.5 4H8M16 4h2.5A1.5 1.5 0 0 1 20 5.5V8M20 16v2.5a1.5 1.5 0 0 1-1.5 1.5H16M8 20H5.5A1.5 1.5 0 0 1 4 18.5V16"/><circle cx="12" cy="12" r="3"/>'),send:svg('<path d="M12 19V5M6 11l6-6 6 6"/>',17,2),file:svg('<path d="M14 3H6.5A1.5 1.5 0 0 0 5 4.5v15A1.5 1.5 0 0 0 6.5 21h11a1.5 1.5 0 0 0 1.5-1.5V8z"/><path d="M14 3v5h5"/>',16),down:svg('<path d="M12 5v14M6 13l6 6 6-6"/>',14,2),seen:svg('<path d="M2 12.5l4.5 4.5L15 8.5M10 16l1 1 9.5-9.5"/>',14,2),check:svg('<path d="M5 12.5l4.5 4.5L19 7.5"/>',15,2),person:svg('<circle cx="12" cy="8" r="4"/><path d="M4 21a8 8 0 0 1 16 0"/>',15),mail:svg('<rect x="3" y="5" width="18" height="14" rx="2"/><path d="M3.5 6.5l8.5 6 8.5-6"/>'),alert:svg('<circle cx="12" cy="12" r="9"/><path d="M12 7.5v5.5M12 16.5v.01"/>',18,1.9),bubble:svg('<path d="M4 5h16v11H9l-5 4z"/><path d="M9 10.5h6"/>',20),search:svg('<circle cx="11" cy="11" r="7"/><path d="M20 20l-3.5-3.5"/>',16),book:svg('<path d="M4 5.5A1.5 1.5 0 0 1 5.5 4H11v16H5.5A1.5 1.5 0 0 1 4 18.5z"/><path d="M20 5.5A1.5 1.5 0 0 0 18.5 4H13v16h5.5a1.5 1.5 0 0 0 1.5-1.5z"/>',20),vote:svg('<path d="M12 19V5M6 11l6-6 6 6"/>',20),plus:svg('<path d="M12 5v14M5 12h14"/>',14,2),sparkle:svg('<path d="M12 3l2.2 5.3L20 9l-4.4 3.8L17 18.5 12 15.5 7 18.5l1.4-5.7L4 9l5.8-.7z"/>',20),bell:svg('<path d="M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"/><path d="M10.3 21a1.9 1.9 0 0 0 3.4 0"/>',20),idea:svg('<path d="M9.5 18h5M10.5 21h3"/><path d="M12 3a6 6 0 0 0-3.6 10.8c.6.5 1.1 1.3 1.1 2.1V16h5v-.1c0-.8.5-1.6 1.1-2.1A6 6 0 0 0 12 3z"/>'),planned:svg('<rect x="4" y="5" width="16" height="15" rx="2"/><path d="M4 10h16M9 3v4M15 3v4"/>'),progress:svg('<circle cx="12" cy="12" r="8"/><path d="M12 4a8 8 0 0 1 0 16z" fill="currentColor"/>'),shipped:svg('<circle cx="12" cy="12" r="8.5"/><path d="M8.5 12.5l2.5 2.5 4.5-5"/>')};function el(tag,className,text){let element=document.createElement(tag);if(className)element.className=className;if(text!==void 0)element.textContent=text;return element}function iconButton(icon,label,onClick,className="icon"){let button=el("button",className);return button.type="button",button.innerHTML=icon,button.setAttribute("aria-label",label),button.title=label,button.addEventListener("click",onClick),button}function textButton(label,className,onClick){let button=el("button",className,label);return button.type="button",button.addEventListener("click",onClick),button}function searchField(label,value,submit,input){let form=el("form","search");form.noValidate=!0;let field=el("input");if(field.type="search",field.value=value,field.placeholder=label,field.enterKeyHint="search",field.setAttribute("aria-label",label),field.maxLength=200,form.insertAdjacentHTML("beforeend",icons.search),form.append(field),form.addEventListener("submit",(event)=>{event.preventDefault(),submit(field.value.trim())}),input)field.addEventListener("input",()=>input(field.value));return form}var time=(value)=>Date.parse(value),byCreated=(a,b)=>time(a.created_at)-time(b.created_at),byActivity=(a,b)=>time(b.last_message_at??b.created_at)-time(a.last_message_at??a.created_at),authorKey=(m)=>m.author.type==="contact"?"contact":`${m.author.type}:${m.author.name??""}`,isImage=(a)=>/^image\/(png|jpeg|gif|webp)$/.test(a.content_type);function initialsOf(name){let parts=name.trim().split(/\s+/).filter(Boolean);return Array.from((parts[0]?.[0]??"")+(parts.length>1?parts[parts.length-1]?.[0]??"":"")).join("")}function fileKind(name,type){return(/\.([a-z0-9]{1,5})$/i.exec(name)?.[1]??type.split("/")[1]??"").toUpperCase()}function fileSize(locale,bytes){let[value,unit]=bytes<1e6?[bytes/1000,"kilobyte"]:[bytes/1e6,"megabyte"];return new Intl.NumberFormat(locale,{style:"unit",unit,unitDisplay:"narrow",maximumFractionDigits:1}).format(unit==="kilobyte"?Math.max(1,Math.round(value)):value)}function dayLabel(locale,value){let date=new Date(value),now=new Date,start=(d)=>new Date(d.getFullYear(),d.getMonth(),d.getDate()).getTime(),diff=Math.round((start(date)-start(now))/86400000);if(diff===0||diff===-1)return new Intl.RelativeTimeFormat(locale,{numeric:"auto"}).format(diff,"day");return new Intl.DateTimeFormat(locale,{month:"short",day:"numeric",year:date.getFullYear()===now.getFullYear()?void 0:"numeric"}).format(date)}function sameDay(a,b){return new Date(a).toDateString()===new Date(b).toDateString()}var canCapture=()=>typeof navigator<"u"&&!!navigator.mediaDevices?.getDisplayMedia;async function captureScreen(hide){let stream;try{stream=await navigator.mediaDevices.getDisplayMedia({video:!0,preferCurrentTab:!0})}catch{return null}try{let video=document.createElement("video");if(video.muted=!0,video.srcObject=stream,await video.play(),hide)hide.style.visibility="hidden";await new Promise((resolve)=>requestAnimationFrame(()=>requestAnimationFrame(resolve)));let canvas=document.createElement("canvas");canvas.width=video.videoWidth,canvas.height=video.videoHeight,canvas.getContext("2d")?.drawImage(video,0,0);let blob=await new Promise((resolve)=>canvas.toBlob(resolve,"image/png"));return blob?new File([blob],"screenshot.png",{type:"image/png"}):null}catch{return null}finally{if(hide)hide.style.visibility="";for(let track of stream.getTracks())track.stop()}}
|
|
2
|
+
export{messages2,icons,el,iconButton,textButton,searchField,time,byCreated,byActivity,authorKey,isImage,initialsOf,fileKind,fileSize,dayLabel,sameDay,canCapture,captureScreen};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{ApiError2,call,mailingLists,createSubscription}from"./index-gk84nm8f.js";class Realtime{server;socketClass;handlers;#socket=null;#lastEventId=0;#attempt=0;#timer=null;#stopped=!0;constructor(server,socketClass,handlers){this.server=server;this.socketClass=socketClass;this.handlers=handlers}get connected(){return this.#socket?.readyState===1}start(){if(this.#stopped=!1,!this.#socket&&!this.#timer)this.#connect()}stop(){if(this.#stopped=!0,this.#timer)clearTimeout(this.#timer);this.#timer=null;let socket=this.#socket;this.#socket=null,socket?.close(1000)}reset(){this.#lastEventId=0}nudge(){if(this.#stopped||this.#socket)return;if(this.#timer)clearTimeout(this.#timer);this.#timer=null,this.#connect()}#connect(){let token=this.handlers.token();if(!token||this.#stopped)return;let url=new URL(`${this.server}/client/v1/realtime`,globalThis.location?.href);if(url.protocol=url.protocol==="https:"?"wss:":"ws:",this.#lastEventId>0)url.searchParams.set("last_event_id",String(this.#lastEventId));let socket;try{socket=new this.socketClass(url,["yuva",`yuva.token.${token}`])}catch{this.#schedule();return}this.#socket=socket,socket.onmessage=(event)=>{let message;try{message=JSON.parse(String(event.data))}catch{return}if(message.type==="ready")this.#attempt=0,this.#lastEventId=Math.max(this.#lastEventId,message.last_event_id);else if("id"in message&&typeof message.id==="number")this.#lastEventId=Math.max(this.#lastEventId,message.id);this.handlers.event(message)},socket.onclose=(event)=>{if(this.#socket!==socket)return;if(this.#socket=null,this.#stopped)return;if(event.code===1008){this.#lastEventId=0,this.handlers.sessionEnded();return}this.#schedule()}}#schedule(){if(this.#stopped||this.#timer)return;let attempt=this.#attempt++;this.handlers.reconnecting(attempt);let delay=Math.min(30000,1000*2**attempt)*(0.75+Math.random()*0.5);this.#timer=setTimeout(()=>{this.#timer=null,this.#connect()},delay)}}function readerConnectUrl2(server,channel,origin){let url=new URL("/account/connect",server);return url.searchParams.set("channel",channel),url.searchParams.set("origin",origin),url.href}function isReaderToken(value){let data=value;return!!data&&typeof data.token==="string"&&data.token.startsWith("yuva_rd_")&&typeof data.expires_at==="string"&&!Number.isNaN(Date.parse(data.expires_at))&&typeof data.channel_key==="string"&&typeof data.origin==="string"&&!!data.reader&&typeof data.reader.initials==="string"}function openReaderPopup2(server,channel,{width=460,height=640}={}){let serverOrigin=new URL(server).origin,origin=location.origin,left=Math.max(0,(window.screenX??0)+((window.outerWidth??width)-width)/2),top=Math.max(0,(window.screenY??0)+((window.outerHeight??height)-height)/2),popup=window.open(readerConnectUrl2(server,channel,origin),"yuva-reader",`popup=yes,width=${width},height=${height},left=${Math.round(left)},top=${Math.round(top)}`);if(!popup)return Promise.reject(new ApiError2(0,"popup_blocked"));return new Promise((resolve,reject)=>{let done=!1,finish=()=>{done=!0,window.removeEventListener("message",received),clearInterval(watch)},received=(event)=>{if(done||event.origin!==serverOrigin||event.source&&event.source!==popup)return;let data=event.data;if(!isReaderToken(data)||data.channel_key!==channel||data.origin!==origin)return;finish();try{popup.close()}catch{}resolve({token:data.token,expires_at:data.expires_at,reader:data.reader})},watch=setInterval(()=>{let closed=!1;try{closed=popup.closed}catch{}if(!closed)return;clearInterval(watch),setTimeout(()=>{if(done)return;finish(),reject(new ApiError2(0,"sign_in_cancelled"))},300)},500);window.addEventListener("message",received)})}function storageKey2(channel){return`yuva:${channel}`}function readerStorageKey2(server,channel){return`yuva:reader:${server} ${channel}`}function randomId2(){if(typeof crypto.randomUUID==="function")return crypto.randomUUID();return Array.from(crypto.getRandomValues(new Uint8Array(16)),(b)=>b.toString(16).padStart(2,"0")).join("")}function jwtSubject(token){try{let part=(token.split(".")[1]??"").replace(/-/g,"+").replace(/_/g,"/"),payload=JSON.parse(atob(part));return typeof payload.sub==="string"?payload.sub:null}catch{return null}}function currentPage(){let location2=globalThis.location;if(!location2||!/^https?:$/.test(location2.protocol))return{};let page_url=location2.origin+location2.pathname;if(page_url.length>2000)return{};let title=Array.from(globalThis.document?.title.trim()??"").slice(0,300).join("").trim();return title?{page_url,page_title:title}:{page_url}}function defaultStorage(){try{let storage=globalThis.localStorage;if(storage)return storage}catch{}let memory=new Map;return{getItem:(key)=>memory.get(key)??null,setItem:(key,value)=>void memory.set(key,value)}}function query(params){let search=new URLSearchParams;for(let[name,value]of Object.entries(params))if(value!==void 0)search.set(name,String(value));let text=search.toString();return text?`?${text}`:""}function quoted(value){return value.replace(/"/g,"%22").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function multipart(fields,files,boundary){let parts=[];for(let[name,value]of fields)parts.push(`--${boundary}\r
|
|
2
|
+
Content-Disposition: form-data; name="${name}"\r
|
|
3
|
+
\r
|
|
4
|
+
${value}\r
|
|
5
|
+
`);for(let file of files){let filename=file.name||"file";parts.push(`--${boundary}\r
|
|
6
|
+
Content-Disposition: form-data; name="files"; filename="${quoted(filename)}"\r
|
|
7
|
+
Content-Type: ${file.type||"application/octet-stream"}\r
|
|
8
|
+
\r
|
|
9
|
+
`,file,`\r
|
|
10
|
+
`)}return parts.push(`--${boundary}--\r
|
|
11
|
+
`),new Blob(parts)}class YuvaClient2{server;channel;#fetch;#socketClass;#storage;#identity;#idempotencyKeys;#token=null;#session=null;#starting=null;#renewing=null;#realtime=null;#reader;#handlers=new Map;help={get:(options={})=>this.#helpCall(`${query({...options})}`),search:(q,options={})=>this.#helpCall(`/search${query({q,...options})}`),collection:(id,options={})=>this.#helpCall(`/collections/${encodeURIComponent(id)}${query({...options})}`),article:(id,options={})=>this.#helpCall(`/articles/${encodeURIComponent(id)}${query({...options})}`),react:(articleId,input)=>this.#helpCall(`/articles/${encodeURIComponent(articleId)}/reactions`,{method:"POST",json:input}),click:(input)=>this.#helpCall("/searches/click",{method:"POST",json:input})};constructor(options){this.server=options.server.replace(/\/+$/,""),this.channel=options.channel,this.#fetch=options.fetch??((url,init)=>fetch(url,init)),this.#socketClass=options.WebSocket??globalThis.WebSocket,this.#storage=options.storage??defaultStorage(),this.#identity=options.identityToken??null,this.#idempotencyKeys=options.idempotencyKeys??typeof globalThis.document>"u"}get session(){return this.#session}get token(){return this.#token}get connected(){return this.#realtime?.connected??!1}on(type,handler){let set=this.#handlers.get(type);if(!set)this.#handlers.set(type,set=new Set);return set.add(handler),()=>void set.delete(handler)}#emit(type,value){for(let handler of this.#handlers.get(type)??[])handler(value)}stored(){try{let raw=this.#storage.getItem(storageKey2(this.channel));return raw?JSON.parse(raw):{}}catch{return{}}}#store(state){try{this.#storage.setItem(storageKey2(this.channel),JSON.stringify(state))}catch{}}channelSettings(){return this.#call(`/client/v1/channels/${encodeURIComponent(this.channel)}`)}ratePage(input){return this.#call(`/client/v1/channels/${encodeURIComponent(this.channel)}/page-ratings`,{method:"POST",json:input})}lists(){return mailingLists(this.#fetch,this.server,this.channel)}subscribe(input){return createSubscription(this.#fetch,this.server,this.channel,input)}subscriptions(){return this.#authed("/client/v1/subscriptions")}subscribeList(listId,input){return this.#authed(`/client/v1/subscriptions/${encodeURIComponent(listId)}`,{method:"PUT",json:input})}unsubscribeList(listId){return this.#authed(`/client/v1/subscriptions/${encodeURIComponent(listId)}`,{method:"DELETE"})}setIdentityToken(source){this.#identity=source,this.reset()}start(){if(this.#session)return Promise.resolve(this.#session);return this.#starting??=this.#open(!1).then((session)=>(this.#emit("session",{session,renewed:!1}),session)).finally(()=>{this.#starting=null}),this.#starting}async refresh(){let info=await this.#authed("/client/v1/session");return this.#session={...this.#session,...info},this.#emit("session",{session:this.#session,renewed:!1}),this.#session}reset(){this.#realtime?.stop(),this.#realtime?.reset(),this.#starting=null,this.#renewing=null,this.#token=null,this.#session=null}async signOut(){let token=this.#token;this.reset();let stored=this.stored();if(delete stored.session,this.#store(stored),token)await this.#call("/client/v1/session",{method:"DELETE",token}).catch(()=>{return})}async connect(){if(!this.#socketClass)throw Error("Yuva: no WebSocket in this runtime; pass options.WebSocket");if(await this.start(),this.#realtime??=new Realtime(this.server,this.#socketClass,{token:()=>this.#token,event:(message)=>{if(message.type==="ready")this.#emit("connection",{state:"open",attempt:0});this.#emit("event",message)},sessionEnded:()=>void this.#renew().catch(()=>this.#realtime?.nudge()),reconnecting:(attempt)=>{if(this.#emit("connection",{state:"reconnecting",attempt}),attempt===2)this.#authed("/client/v1/session").catch(()=>{return})}}),!this.#realtime.connected)this.#emit("connection",{state:"connecting",attempt:0});this.#realtime.start()}disconnect(){this.#realtime?.stop(),this.#emit("connection",{state:"closed",attempt:0})}reconnect(){this.#realtime?.nudge()}listConversations(page={}){return this.#authed(`/client/v1/conversations${query({...page})}`)}getConversation(id){return this.#authed(`/client/v1/conversations/${encodeURIComponent(id)}`)}startConversation(input){let request=input.page_url===void 0?{...input,...currentPage()}:input;return this.#authed("/client/v1/conversations",this.#messageRequest(request))}listMessages(conversationId,page={}){return this.#authed(`/client/v1/conversations/${encodeURIComponent(conversationId)}/messages${query({...page})}`)}sendMessage(conversationId,input){return this.#authed(`/client/v1/conversations/${encodeURIComponent(conversationId)}/messages`,this.#messageRequest(input))}markRead(conversationId,messageId){return this.#authed(`/client/v1/conversations/${encodeURIComponent(conversationId)}/read`,{method:"POST",json:messageId?{message_id:messageId}:{}})}rate(conversationId,rating,comment){let body={rating,comment:comment?.trim()||void 0};return this.#authed(`/client/v1/conversations/${encodeURIComponent(conversationId)}/rating`,{method:"POST",json:body})}setTyping(conversationId,typing){return this.#authed(`/client/v1/conversations/${encodeURIComponent(conversationId)}/typing`,{method:"POST",json:{typing}})}setEmail(email){return this.#authed("/client/v1/contact/email",{method:"PUT",json:{email}})}attachment(id){return this.#authed(`/client/v1/attachments/${encodeURIComponent(id)}`,{blob:!0})}sendFeedback(input){let{files=[],...fields}=input,client_id=fields.client_id??randomId2(),headers=this.#idempotency(client_id);if(files.length===0)return this.#authed("/client/v1/feedback",{method:"POST",headers,json:{...fields,client_id}});let scalars=Object.entries({...fields,client_id}).filter(([,value])=>value!==void 0&&value!==null).map(([name,value])=>[name,String(value)]),boundary=`yuva-${client_id.replace(/[^\w-]/g,"").slice(0,60)}-${client_id.length}`;return headers["Content-Type"]=`multipart/form-data; boundary=${boundary}`,this.#authed("/client/v1/feedback",{method:"POST",headers,body:multipart(scalars,files,boundary)})}get reader(){if(this.#reader===void 0)try{let raw=this.#storage.getItem(readerStorageKey2(this.server,this.channel));this.#reader=raw?JSON.parse(raw):null}catch{this.#reader=null}if(this.#reader&&Date.parse(this.#reader.expires_at)<=Date.now()+30000)this.#setReader(null);return this.#reader}#setReader(reader){let changed=this.#reader?.token!==reader?.token;this.#reader=reader;try{this.#storage.setItem(readerStorageKey2(this.server,this.channel),reader?JSON.stringify(reader):"")}catch{}if(changed)this.#emit("reader",reader)}readerSignIn(options){return openReaderPopup2(this.server,this.channel,options).then((reader)=>(this.#setReader(reader),reader))}setReader(reader){this.#setReader(reader)}async readerSignOut(){let token=this.reader?.token;if(this.#setReader(null),token)await this.#call("/client/v1/reader-token",{method:"DELETE",token}).catch(()=>{return})}listDiscussions(page,options={}){return this.#discussionCall(`/client/v1/channels/${encodeURIComponent(this.channel)}/discussions${query({page,...options})}`,{},!1)}roadmap(){return this.#call(`/client/v1/channels/${encodeURIComponent(this.channel)}/roadmap`)}whatsNew(options={}){return this.#call(`/client/v1/channels/${encodeURIComponent(this.channel)}/whats-new${query({...options})}`)}whatsNewEntry(id,options={}){return this.#call(`/client/v1/channels/${encodeURIComponent(this.channel)}/whats-new/${encodeURIComponent(id)}${query({...options})}`)}listIdeas(options={}){return this.#discussionCall(`/client/v1/channels/${encodeURIComponent(this.channel)}/discussions${query({kind:"idea",...options})}`,{},!1)}suggestIdea(input){return this.startDiscussion({kind:"idea",...input})}getDiscussion(id){return this.#discussionCall(`/client/v1/channels/${encodeURIComponent(this.channel)}/discussions/${encodeURIComponent(id)}`,{},!1)}startDiscussion(input){return this.#discussionCall("/client/v1/discussions",{method:"POST",json:input})}replyToDiscussion(discussionId,input){return this.#discussionCall(`/client/v1/discussions/${encodeURIComponent(discussionId)}/posts`,{method:"POST",json:input})}editDiscussionPost(postId,input){return this.#discussionCall(`/client/v1/discussion-posts/${encodeURIComponent(postId)}`,{method:"PATCH",json:input})}deleteDiscussionPost(postId){return this.#discussionCall(`/client/v1/discussion-posts/${encodeURIComponent(postId)}`,{method:"DELETE"})}voteDiscussionPost(postId,voted=!0){return this.#discussionCall(`/client/v1/discussion-posts/${encodeURIComponent(postId)}/vote`,{method:voted?"PUT":"DELETE"})}followDiscussion(discussionId,following=!0){return this.#discussionCall(`/client/v1/discussions/${encodeURIComponent(discussionId)}/follow`,{method:following?"PUT":"DELETE"})}acceptDiscussionAnswer(discussionId,postId){let path=`/client/v1/discussions/${encodeURIComponent(discussionId)}/answer`;return this.#discussionCall(path,postId?{method:"PUT",json:{post_id:postId}}:{method:"DELETE"})}async discussionWriter(){if(this.reader)return"reader";if(this.#session)return this.#session.contact.identified?"contact":null;return await this.#identity?.()?"contact":null}async#discussionCall(path,request,write=!0){let reader=this.reader;if(reader)try{return await this.#call(path,{...request,token:reader.token})}catch(error){if(!(error instanceof ApiError2)||error.status!==401||this.#reader?.token!==reader.token)throw error;if(this.#setReader(null),write)throw new ApiError2(403,"sign_in_required")}if(await this.discussionWriter()==="contact")return this.#authed(path,request);if(write)throw new ApiError2(403,"sign_in_required");return this.#call(path,request)}#helpCall(path,request){return this.#call(`/client/v1/channels/${encodeURIComponent(this.channel)}/help${path}`,request)}#idempotency(client_id){return this.#idempotencyKeys&&/^[\x20-\x7e]{1,255}$/.test(client_id)?{"Idempotency-Key":client_id}:{}}#messageRequest({body,subject,files=[],client_id=randomId2(),...page}){let headers=this.#idempotency(client_id),page_url=page.page_url??void 0,page_title=page_url?page.page_title:void 0,help_article_id=page.help_article_id;if(files.length===0)return{method:"POST",headers,json:{body,subject,client_id,page_url,page_title,help_article_id}};let fields=[];if(subject)fields.push(["subject",subject]);if(body)fields.push(["body",body]);if(fields.push(["client_id",client_id]),page_url)fields.push(["page_url",page_url]);if(page_title)fields.push(["page_title",page_title]);if(help_article_id)fields.push(["help_article_id",help_article_id]);let boundary=`yuva-${client_id.replace(/[^\w-]/g,"").slice(0,60)}-${client_id.length}`;return headers["Content-Type"]=`multipart/form-data; boundary=${boundary}`,{method:"POST",headers,body:multipart(fields,files,boundary)}}#call(path,request){return call(this.#fetch,this.server,path,request)}async#authed(path,request={},retry=!0){if(!this.#token)await this.start();try{return await this.#call(path,{...request,token:this.#token})}catch(error){if(!retry||!(error instanceof ApiError2)||error.status!==401)throw error;return await this.#renew(),this.#authed(path,request,!1)}}#renew(){return this.#renewing??=(async()=>{let session=await this.#open(!0);if(this.#realtime)this.#realtime.stop(),this.#realtime.reset(),this.#realtime.start();this.#emit("session",{session,renewed:!0})})().finally(()=>{this.#renewing=null}),this.#renewing}async#open(fresh){let stored=this.stored(),identity=await this.#identity?.()||null,subject=identity?jwtSubject(identity):null,saved=stored.session;if(!fresh&&saved&&saved.sub===subject&&Date.parse(saved.expires_at)>Date.now()+60000)try{let info=await this.#call("/client/v1/session",{token:saved.token});return this.#apply(info,saved.token,subject)}catch(error){if(!(error instanceof ApiError2)||error.status!==401&&error.status!==403)throw error}let session=await this.#call("/client/v1/session",{method:"POST",json:{channel_key:this.channel,identity_token:identity??void 0,visitor_id:stored.visitor_id}}),{token,...info}=session;return this.#apply(info,token,subject)}#apply(info,token,subject){this.#token=token,this.#session=info;let stored=this.stored();if(stored.session={token,expires_at:info.expires_at,sub:subject},info.visitor_id)stored.visitor_id=info.visitor_id;else if(info.contact.identified)delete stored.visitor_id;return this.#store(stored),info}}function createYuvaClient2(options){return new YuvaClient2(options)}
|
|
12
|
+
export{readerConnectUrl2,openReaderPopup2,storageKey2,readerStorageKey2,randomId2,YuvaClient2,createYuvaClient2};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{readStored}from"./index-8f1n6nzn.js";var freshWindow=2592000000;function updatesSince(seen){return seen&&Date.parse(seen)||Date.now()-freshWindow}async function loadFeed(server,channel,locale,cache){let response=await fetch(`${server}/client/v1/channels/${encodeURIComponent(channel)}/whats-new?limit=10&locale=${encodeURIComponent(locale)}`,{credentials:"omit",cache});return response.ok?await response.json():null}async function countUpdates(server,channel,inbox,locale){let latest=inbox.whats_new?.latest_published_at,since=updatesSince(readStored(channel).whats_new_seen);if(!latest||Date.parse(latest)<=since)return 0;let feed=await loadFeed(server,channel,locale,"default"),held=feed?.changelog.latest_published_at;if(!held||Date.parse(held)<Date.parse(latest))feed=await loadFeed(server,channel,locale,"no-cache");if(!feed)return 0;return feed.items.filter((entry)=>Date.parse(entry.published_at)>since).length}
|
|
2
|
+
export{updatesSince,countUpdates};
|
package/dist/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{readerConnectUrl2,openReaderPopup2,YuvaClient2,createYuvaClient2}from"./index-
|
|
1
|
+
import{readerConnectUrl2,openReaderPopup2,YuvaClient2,createYuvaClient2}from"./index-69xd7mjq.js";import{ApiError2}from"./index-gk84nm8f.js";export{ApiError2 as ApiError,YuvaClient2 as YuvaClient,createYuvaClient2 as createYuvaClient,openReaderPopup2 as openReaderPopup,readerConnectUrl2 as readerConnectUrl};
|